Part of twisted.words.protocols.msn View Source View In Hierarchy
Method | __init__ | Undocumented |
Method | connectionMade | Called when a connection is made. |
Method | connectionLost | Called when the connection is shut down. |
Method | checkMessage | hook used for detecting specific notification messages |
Method | handle_VER | Undocumented |
Method | handle_CVR | Undocumented |
Method | handle_USR | Undocumented |
Method | handle_CHG | Undocumented |
Method | handle_ILN | Undocumented |
Method | handle_CHL | Undocumented |
Method | handle_QRY | Undocumented |
Method | handle_NLN | Undocumented |
Method | handle_FLN | Undocumented |
Method | handle_LST | Undocumented |
Method | handle_BLP | Undocumented |
Method | handle_GTC | Undocumented |
Method | handle_SYN | Undocumented |
Method | handle_LSG | Undocumented |
Method | handle_PRP | Undocumented |
Method | handle_BPR | Undocumented |
Method | handle_ADG | Undocumented |
Method | handle_RMG | Undocumented |
Method | handle_REG | Undocumented |
Method | handle_ADD | Undocumented |
Method | handle_REM | Undocumented |
Method | handle_REA | Undocumented |
Method | handle_XFR | Undocumented |
Method | handle_RNG | Undocumented |
Method | handle_OUT | Undocumented |
Method | loggedIn | No summary |
Method | loginFailure | Called when the client fails to login. |
Method | gotProfile | No summary |
Method | listSynchronized | 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. |
Method | statusChanged | 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. |
Method | gotContactStatus | 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. |
Method | contactStatusChanged | 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. |
Method | contactOffline | Called when a contact goes offline. By default this method will update the status attribute of the contact stored on the factory. |
Method | gotPhoneNumber | No summary |
Method | userAddedMe | No summary |
Method | userRemovedMe | No summary |
Method | gotSwitchboardInvitation | Called when we get an invitation to a switchboard server. This happens when a user requests a chat session with us. |
Method | multipleLogin | Called when the server says there has been another login under our account, the server should disconnect us right away. |
Method | serverGoingDown | Called when the server has notified us that it is going down for maintenance. |
Method | changeStatus | No summary |
Method | setPrivacyMode | Set my privacy mode on the server. |
Method | syncList | No summary |
Method | setPhoneDetails | Set/change my phone numbers stored on the server. |
Method | addListGroup | No summary |
Method | remListGroup | No summary |
Method | renameListGroup | No summary |
Method | addContact | No summary |
Method | remContact | No summary |
Method | changeScreenName | No summary |
Method | requestSwitchboardServer | Used to request a switchboard server to use for conversations. |
Method | logOut | Used to log out of the notification server. After running the method the server is expected to close the connection. |
Method | _setState | Undocumented |
Method | _getState | Undocumented |
Method | _getStateData | Undocumented |
Method | _setStateData | Undocumented |
Method | _remStateData | Undocumented |
Method | _passportLogin | Undocumented |
Method | _passportError | Handle a problem logging in via the Passport server, passing on the
error as a string message to the loginFailure callback. |
Inherited from MSNEventBase:
Method | lineReceived | Override this for when each line is received. |
Method | rawDataReceived | Override this for when raw data is received. |
Method | handle_MSG | Undocumented |
Method | handle_UNKNOWN | implement me in subclasses if you want to handle unknown events |
Method | gotMessage | called when we receive a message - override in notification and switchboard clients |
Method | gotBadLine | called when a handler notifies me that this line is broken |
Method | gotError | called when the server sends an error which is not in response to a sent command (ie. it has no matching transaction ID) |
Method | _fireCallback | Fire the callback for the given id if one exists and return 1, else return false |
Method | _nextTransactionID | return a usable transaction ID |
Method | _createIDMapping | return a unique transaction ID that is mapped internally to a deferred .. also store arbitrary data if it is needed |
Inherited from LineReceiver (via MSNEventBase):
Class Variable | delimiter | The line-ending delimiter to use. By default this is b'\r\n' . |
Class Variable | MAX_LENGTH | The maximum length of a line to allow (If a sent line is longer than this, the connection is dropped). Default is 16384. |
Method | clearLineBuffer | Clear buffered data. |
Method | dataReceived | Protocol.dataReceived. Translates bytes into lines, and calls lineReceived (or rawDataReceived, depending on mode.) |
Method | setLineMode | Sets the line-mode of this receiver. |
Method | setRawMode | Sets the raw mode of this receiver. Further data received will be sent to rawDataReceived rather than lineReceived. |
Method | sendLine | Sends a line to the other end of the connection. |
Method | lineLengthExceeded | Called when the maximum line length has been reached. Override if it needs to be dealt with in some special way. |
Inherited from Protocol (via MSNEventBase, LineReceiver):
Method | logPrefix | Return a prefix matching the class name, to identify log messages related to this protocol instance. |
Inherited from BaseProtocol (via MSNEventBase, LineReceiver, Protocol):
Method | makeConnection | Make a connection to a transport and a server. |
Inherited from _PauseableMixin (via MSNEventBase, LineReceiver):
Method | pauseProducing | Undocumented |
Method | resumeProducing | Undocumented |
Method | stopProducing | Undocumented |
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.
Clear any circular references here, and any external references to this Protocol. The connection has been closed.
loginFailure
callback.Parameters | userHandle | our userHandle |
screenName | our screenName | |
verified | 1 if our passport has been (verified), 0 if not. (i'm not sure of the significace of this) (type: int) |
Parameters | message | a message indicating the problem that was encountered |
Parameters | message | The profile message |
Parameters | statusCode | 3-letter status code |
Parameters | statusCode | 3-letter status code |
userHandle | the contact's user handle (passport) | |
screenName | the contact's screen name |
Parameters | statusCode | 3-letter status code |
userHandle | the contact's user handle (passport) | |
screenName | the contact's screen name |
Parameters | userHandle | the contact's user handle |
Parameters | listVersion | the new list version |
userHandle | the contact's user handle (passport) | |
phoneType | the specific phoneType (*_PHONE constants or HAS_PAGER) | |
number | the value/phone number. |
Parameters | userHandle | the userHandle of the user |
screenName | the screen name of the user | |
listVersion | the new list version (type: int) |
Parameters | userHandle | the contact's user handle (passport) |
listVersion | the new list version |
Parameters | sessionID | session ID number, must be remembered for logging in |
host | the hostname of the switchboard server | |
port | the port to connect to | |
key | used for authorization when connecting | |
userHandle | the user handle of the person who invited us | |
screenName | the screen name of the person who invited us |
Parameters | status | 3-letter status code (as defined by the STATUS_* constants) |
Returns | A Deferred, the callback of which will be fired when the server confirms the change of status. The callback argument will be a tuple with the new status code as the only element. |
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.
Parameters | privLevel | This parameter can be true, in which case the server will keep the state as 'al' which the official client interprets as -> allow messages from only users on the allow list. Alternatively it can be false, in which case the server will keep the state as 'bl' which the official client interprets as -> allow messages from all users except those on the block list. |
Returns | A Deferred, the callback of which will be fired when the server replies with the new privacy setting. The callback argument will be a tuple, the 2 elements of which being the list version and either 'al' or 'bl' (the new privacy setting). |
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.
Parameters | version | The current known list version |
Returns | A Deferred, the callback of which will be fired when the server sends an adequate reply. The callback argument will be a tuple with two elements, the new list (MSNContactList) and your current state (a dictionary). If the version you sent _was_ the latest list version, both elements will be None. To just request the list send a version of 0. |
Parameters | phoneType | phoneType can be one of the following constants - HOME_PHONE, WORK_PHONE, MOBILE_PHONE, HAS_PAGER. These are pretty self-explanatory, except maybe HAS_PAGER which refers to whether or not you have a pager. |
value | for all of the *_PHONE constants the value is a phone number (str), for HAS_PAGER accepted values are 'Y' (for yes) and 'N' (for no). | |
Returns | A Deferred, the callback for which will be fired when the server confirms the change has been made. The callback argument will be a tuple with 2 elements, the first being the new list version (int) and the second being the new phone number value (str). |
Parameters | name | The desired name of the new group. |
Returns | A Deferred, the callbacck for which will be called when the server clarifies that the new group has been created. The callback argument will be a tuple with 3 elements: the new list version (int), the new group name (str) and the new group ID (int). |
Parameters | groupID | the ID of the desired group to be removed. |
Returns | A Deferred, the callback for which will be called when the server clarifies the deletion of the group. The callback argument will be a tuple with 2 elements: the new list version (int) and the group ID (int) of the removed group. |
Parameters | groupID | the ID of the desired group to rename. |
newName | the desired new name for the group. | |
Returns | A Deferred, the callback for which will be called when the server clarifies the renaming. The callback argument will be a tuple of 3 elements, the new list version (int), the group id (int) and the new group name (str). |
Parameters | listType | (as defined by the *_LIST constants) |
userHandle | the user handle (passport) of the contact that is being added | |
groupID | the group ID for which to associate this contact with. (default 0 - default group). Groups are only valid for FORWARD_LIST. | |
Returns | A Deferred, the callback for which will be called when the server has clarified that the user has been added. The callback argument will be a tuple with 4 elements: the list type, the contact's user handle, the new list version, and the group id (if relevant, otherwise it will be None) |
Parameters | listType | (as defined by the *_LIST constants) |
userHandle | the user handle (passport) of the contact being removed | |
groupID | the ID of the group to which this contact belongs (only relevant for FORWARD_LIST, default is 0) | |
Returns | A Deferred, the callback for which will be called when the server has clarified that the user has been removed. The callback argument will be a tuple of 4 elements: the list type, the contact's user handle, the new list version, and the group id (if relevant, otherwise it will be None) |
Parameters | newName | the new screen name |
Returns | A Deferred, the callback for which will be called when the server sends an adequate reply. The callback argument will be a tuple of 2 elements: the new list version and the new screen name. |
Returns | A Deferred, the callback for which will be called when the server responds with the switchboard information. The callback argument will be a tuple with 3 elements: the host of the switchboard server, the port and a key used for logging in. |