Package papyon :: Module client :: Class Client

Class Client

source code

            object --+    
                     |    
event.EventsDispatcher --+
                         |
                        Client

This class provides way to connect to the notification server as well as methods to manage the contact list, and the personnal settings.

Instance Methods
 
__init__(self, server, proxies={}, transport_class=<class 'papyon.transport.DirectConnection'>)
Initializer
source code
 
login(self, account, password)
Login to the server.
source code
 
logout(self)
Logout from the server.
source code

Inherited from event.EventsDispatcher: register_events_handler

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties
papyon.event.ClientState state
The state of this Client
User profile
The profile of the current user
AddressBook address_book
The address book of the current user
MSNObjectStore msn_object_store
The MSNObjectStore instance associated with this client.
OfflineIM oim_box
The offline IM for the current user
Spaces spaces
The MSN Spaces of the current user
  webcam_handler
mailbox
The mailbox of the current user

Inherited from object: __class__

Method Details

__init__(self, server, proxies={}, transport_class=<class 'papyon.transport.DirectConnection'>)
(Constructor)

source code 

Initializer

Parameters:
  • server (tuple(host, port)) - the Notification server to connect to.
  • proxies ({type: string => gnet.proxy.ProxyInfos}) - proxies that we can use to connect
  • transport_class (papyon.transport.BaseTransport) - the transport class to use for the network connection
Overrides: object.__init__

login(self, account, password)

source code 

Login to the server.

Parameters:
  • account (utf-8 encoded string) - the account to use for authentication.
  • password (utf-8 encoded string) - the password needed to authenticate to the account

Property Details

state

The state of this Client

Get Method:
unreachable.state(self) - The state of this Client
Type:
papyon.event.ClientState

profile

The profile of the current user

Get Method:
unreachable.profile(self) - The profile of the current user
Type:
User

address_book

The address book of the current user

Get Method:
unreachable.address_book(self) - The address book of the current user
Type:
AddressBook

msn_object_store

The MSNObjectStore instance associated with this client.

Get Method:
unreachable.msn_object_store(self) - The MSNObjectStore instance associated with this client.
Type:
MSNObjectStore

oim_box

The offline IM for the current user

Get Method:
unreachable.oim_box(self) - The offline IM for the current user
Type:
OfflineIM

spaces

The MSN Spaces of the current user

Get Method:
unreachable.spaces(self) - The MSN Spaces of the current user
Type:
Spaces

webcam_handler

Get Method:
unreachable.webcam_handler(self)

mailbox

The mailbox of the current user

Get Method:
unreachable.mailbox(self) - The mailbox of the current user
Type: