Home | Trees | Index | Help |
|
---|
Package twisted :: Package protocols :: Module msn :: Class NotificationClient |
|
BaseProtocol
--+ |Protocol
--+ |LineReceiver
--+ |MSNEventBase
--+ | NotificationClient
Method Summary | |
---|---|
__init__(self,
currentID)
| |
_getState(self)
| |
_getStateData(self,
key)
| |
_passportError(self,
failure)
| |
_passportLogin(self,
result)
| |
_remStateData(self,
*args)
| |
_setState(self,
state)
| |
_setStateData(self,
key,
value)
| |
Used to add a contact to the desired list. | |
Used to create a new list group. | |
Used to change your current screen name. | |
Change my current status. | |
hook used for detecting specific notification messages | |
connectionLost(self,
reason)
| |
Called when a connection is made. | |
Called when a contact goes offline. | |
Called when we're notified that a contact's status has changed. | |
Called after loggin in when the server sends status of online contacts. | |
Called when the server sends us phone details about a specific user (for example after a user is added the server will send their status, phone details etc. | |
Called after logging in when the server sends an initial message with MSN/passport specific profile information such as country, number of kids, etc. | |
Called when we get an invitation to a switchboard server. | |
handle_ADD(self,
params)
| |
handle_ADG(self,
params)
| |
handle_BLP(self,
params)
| |
handle_BPR(self,
params)
| |
handle_CHG(self,
params)
| |
handle_CHL(self,
params)
| |
handle_CVR(self,
params)
| |
handle_FLN(self,
params)
| |
handle_GTC(self,
params)
| |
handle_ILN(self,
params)
| |
handle_LSG(self,
params)
| |
handle_LST(self,
params)
| |
handle_NLN(self,
params)
| |
handle_OUT(self,
params)
| |
handle_PRP(self,
params)
| |
handle_QRY(self,
params)
| |
handle_REA(self,
params)
| |
handle_REG(self,
params)
| |
handle_REM(self,
params)
| |
handle_RMG(self,
params)
| |
handle_RNG(self,
params)
| |
handle_SYN(self,
params)
| |
handle_USR(self,
params)
| |
handle_VER(self,
params)
| |
handle_XFR(self,
params)
| |
Lists are now synchronized by default upon logging in, this method is called after the synchronization has finished and the factory now has the up-to-date contacts. | |
Called when the client has logged in. | |
Called when the client fails to login. | |
Used to log out of the notification server. | |
Called when the server says there has been another login under our account, the server should disconnect us right away. | |
Used to remove a contact from the desired list. | |
Used to remove a list group. | |
Used to rename an existing list group. | |
Used to request a switchboard server to use for conversations. | |
Called when the server has notified us that it is going down for maintenance. | |
Set/change my phone numbers stored on the server. | |
Set my privacy mode on the server. | |
Called when our status changes and it isn't in response to a client command. | |
Used for keeping an up-to-date contact list. | |
Called when a user adds me to their list. | |
Called when a user removes us from their contact list (they are no longer on our reverseContacts list. | |
Inherited from MSNEventBase | |
return a unique transaction ID that is mapped internally to a deferred .. | |
Fire the callback for the given id if one exists and return 1, else return false | |
return a usable transaction ID | |
called when a handler notifies me that this line is broken | |
called when the server sends an error which is not in response to a sent command (ie. | |
called when we receive a message - override in notification and switchboard clients | |
| |
implement me in subclasses if you want to handle unknown events | |
Override this for when each line is received. | |
Override this for when raw data is received. | |
Inherited from LineReceiver | |
Clear buffered data. | |
Protocol.dataReceived. | |
Called when the maximum line length has been reached. | |
Sends a line to the other end of the connection. | |
Sets the line-mode of this receiver. | |
Sets the raw mode of this receiver. | |
Inherited from Protocol | |
(Deprecated) | |
Inherited from BaseProtocol | |
Make a connection to a transport and a server. |
Class Variable Summary | |
---|---|
NoneType |
factory = None |
Inherited from LineReceiver | |
str |
_LineReceiver__buffer = ''
|
str |
delimiter : The line-ending delimiter to use. |
int |
line_mode = 1 |
int |
MAX_LENGTH : The maximum length of a line to allow (If a sent line is longer than
this, the connection is dropped). |
Inherited from Protocol | |
tuple |
__implements__ = (<class twisted.internet.interfaces.IPr...
|
Inherited from BaseProtocol | |
int |
connected = 0 |
NoneType |
transport = None |
Method Details |
---|
addContact(self, listType, userHandle, groupID=0)Used to add a contact to the desired list. A default callback is added to the returned Deferred which updates the contacts attribute of the factory with the new contact information. If you are adding a contact to the forward list and you want to associate this contact with multiple groups then you will need to call this method for each group you would like to add them to, changing the groupID parameter. The default callback will take care of updating the group information on the factory's contact list.
|
addListGroup(self, name)Used to create a new list group. A default callback is added to the returned Deferred which updates the contacts attribute of the factory.
|
changeScreenName(self, newName)Used to change your current screen name. A default callback is added to the returned Deferred which updates the screenName attribute of the factory and also updates the contact list version.
|
changeStatus(self, status)Change my current status. This method will add a default callback to the returned Deferred which will update the status attribute of the factory.
|
checkMessage(self, message)hook used for detecting specific notification messages |
connectionMade(self)Called when a connection is made. This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.
|
contactOffline(self, userHandle)Called when a contact goes offline. By default this method will update the status attribute of the contact stored on the factory.
|
contactStatusChanged(self, statusCode, userHandle, screenName)Called when we're notified that a contact's status has changed. By default we will update the status attribute of the contact stored on the factory.
|
gotContactStatus(self, statusCode, userHandle, screenName)Called after loggin in when the server sends status of online contacts. By default we will update the status attribute of the contact stored on the factory.
|
gotPhoneNumber(self, listVersion, userHandle, phoneType, number)Called when the server sends us phone details about a specific user (for example after a user is added the server will send their status, phone details etc. By default we will update the list version for the factory's contact list and update the phone details for the specific user.
|
gotProfile(self, message)Called after logging in when the server sends an initial message with MSN/passport specific profile information such as country, number of kids, etc. Check the message headers for the specific values.
|
gotSwitchboardInvitation(self, sessionID, host, port, key, userHandle, screenName)Called when we get an invitation to a switchboard server. This happens when a user requests a chat session with us.
|
listSynchronized(self, *args)Lists are now synchronized by default upon logging in, this method is called after the synchronization has finished and the factory now has the up-to-date contacts. |
loggedIn(self, userHandle, screenName, verified)Called when the client has logged in. The default behaviour of this method is to update the factory with our screenName and to sync the contact list (factory.contacts). When this is complete self.listSynchronized will be called.
|
loginFailure(self, message)Called when the client fails to login.
|
logOut(self)Used to log out of the notification server. After running the method the server is expected to close the connection. |
multipleLogin(self)Called when the server says there has been another login under our account, the server should disconnect us right away. |
remContact(self, listType, userHandle, groupID=0)Used to remove a contact from the desired list. A default callback is added to the returned deferred which updates the contacts attribute of the factory to reflect the new contact information. If you are removing from the forward list then you will need to supply a groupID, if the contact is in more than one group then they will only be removed from this group and not the entire forward list, but if this is their only group they will be removed from the whole list.
|
remListGroup(self, groupID)Used to remove a list group. A default callback is added to the returned Deferred which updates the contacts attribute of the factory.
|
renameListGroup(self, groupID, newName)Used to rename an existing list group. A default callback is added to the returned Deferred which updates the contacts attribute of the factory.
|
requestSwitchboardServer(self)Used to request a switchboard server to use for conversations.
|
serverGoingDown(self)Called when the server has notified us that it is going down for maintenance. |
setPhoneDetails(self, phoneType, value)Set/change my phone numbers stored on the server.
|
setPrivacyMode(self, privLevel)Set my privacy mode on the server. Note: This only keeps the current privacy setting on the server for later retrieval, it does not effect the way the server works at all.
|
statusChanged(self, statusCode)Called when our status changes and it isn't in response to a client command. By default we will update the status attribute of the factory.
|
syncList(self, version)Used for keeping an up-to-date contact list. A callback is added to the returned Deferred that updates the contact list on the factory and also sets my state to STATUS_ONLINE. Note: This is called automatically upon signing in using the version attribute of factory.contacts, so you may want to persist this object accordingly. Because of this there is no real need to ever call this method directly.
|
userAddedMe(self, userHandle, screenName, listVersion)Called when a user adds me to their list. (ie. they have been added to the reverse list. By default this method will update the version of the factory's contact list -- that is, if the contact already exists it will update the associated lists attribute, otherwise it will create a new MSNContact object and store it.
|
userRemovedMe(self, userHandle, listVersion)Called when a user removes us from their contact list (they are no longer on our reverseContacts list. By default this method will update the version of the factory's contact list -- that is, the user will be removed from the reverse list and if they are no longer part of any lists they will be removed from the contact list entirely.
|
Class Variable Details |
---|
factory
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Sat May 15 20:07:54 2004 | http://epydoc.sf.net |