Package twisted :: Package protocols :: Module msn :: Class MSNContactList
[show private | hide private]
[frames | no frames]

Class MSNContactList


This class represents a basic MSN contact list.
Method Summary
  __init__(self)
  addContact(self, listType, contact, force)
Add a contact to the desired list.
  removeContact(self, listType, contact)
Remove a contact from the desired list.

Instance Variable Summary
dict (mapping user handles to MSNContact objects) authorizedContacts - Contacts that I have allowed to be notified when my state changes (allow list)
dict (mapping user handles to MSNContact objects) blockedContacts - Contacts not allowed to see state changes nor talk to me
dict (mapping user handles to MSNContact objects) contacts - The forward list (users on my list)

dict

Note: This is used only for storage and doesn't effect the server's contact list.
groups - a mapping of group ids to group names (groups can only exist on the forward list)
dict (mapping user handles to MSNContact objects) reverseContacts - Contacts who have added me to their list
  version - The current contact list version (used for list syncing)

Method Details

addContact(self, listType, contact, force=0)

Add a contact to the desired list.
Parameters:
listType - Which underlying contact list to add the user to:
  • FORWARD_LIST - 'fl': the forward list
  • ALLOW_LIST - 'al': the allow list
  • REVERSE_LIST - 'rl': the reverse list
  • BLOCK_LIST - 'bl': the block list The above are defined in the *_LIST constants.
contact - the contact to add
           (type=MSNContact object)
force -

Should we overwrite an existing contact? (1=yes, 0=no(default))

NOTE: this changes nothing on the server, it only effects _this_ list.

removeContact(self, listType, contact)

Remove a contact from the desired list.
Parameters:
listType - Which underlying contact list to remove the user from:
  • FORWARD_LIST - 'fl': the forward list
  • ALLOW_LIST - 'al': the allow list
  • REVERSE_LIST - 'rl': the reverse list
  • BLOCK_LIST - 'bl': the block list The above are defined in the *_LIST constants.
contact - the contact to remove
           (type=

MSNContact object

NOTE: this changes nothing on the server, it only effects _this_ list.)

Instance Variable Details

authorizedContacts

Contacts that I have allowed to be notified when my state changes (allow list)
Type:
dict (mapping user handles to MSNContact objects)

blockedContacts

Contacts not allowed to see state changes nor talk to me
Type:
dict (mapping user handles to MSNContact objects)

contacts

The forward list (users on my list)
Type:
dict (mapping user handles to MSNContact objects)

groups

a mapping of group ids to group names (groups can only exist on the forward list)
Type:

dict

Note: This is used only for storage and doesn't effect the server's contact list.

reverseContacts

Contacts who have added me to their list
Type:
dict (mapping user handles to MSNContact objects)

version

The current contact list version (used for list syncing)

Generated by Epydoc 1.1 on Fri Jun 27 03:48:33 2003 http://epydoc.sf.net