Package common :: Module contacts :: Class LegacyContactsAPI
[hide private]
[frames] | no frames]

Class LegacyContactsAPI

source code

This is a GOD class for accessing contact and groupchat information. The API has several flaws:

It is a long way to cleanup this API. Therefore just stick with it and use it as before. We will try to figure out a migration path.

Instance Methods [hide private]
 
__init__(self) source code
 
change_account_name(self, old_name, new_name) source code
 
add_account(self, account_name) source code
 
get_accounts(self) source code
 
remove_account(self, account) source code
 
create_contact(self, jid, account, name='', groups=[], show='', status='', sub='', ask='', resource='', priority=0, keyID='', client_caps=None, our_chatstate=None, chatstate=None, last_status_time=None, composing_xep=None, last_activity_time=None) source code
 
create_self_contact(self, jid, account, resource, show, status, priority, name='', keyID='') source code
 
create_not_in_roster_contact(self, jid, account, resource='', name='', keyID='') source code
 
copy_contact(self, contact) source code
 
add_contact(self, account, contact) source code
 
remove_contact(self, account, contact) source code
 
remove_jid(self, account, jid, remove_meta=True) source code
 
get_contacts(self, account, jid) source code
 
get_contact(self, account, jid, resource=None) source code
 
iter_contacts(self, account) source code
 
get_contact_from_full_jid(self, account, fjid) source code
 
get_first_contact_from_jid(self, account, jid) source code
 
get_contacts_from_group(self, account, group) source code
 
get_contacts_jid_list(self, account) source code
 
get_jid_list(self, account) source code
 
change_contact_jid(self, old_jid, new_jid, account) source code
 
get_highest_prio_contact_from_contacts(self, contacts) source code
 
get_contact_with_highest_priority(self, account, jid) source code
 
get_nb_online_total_contacts(self, accounts=[], groups=[])
Return the number of online contacts and the total number of contacts
source code
 
__getattr__(self, attr_name) source code
 
create_gc_contact(self, room_jid, account, name='', show='', status='', role='', affiliation='', jid='', resource='') source code
 
add_gc_contact(self, account, gc_contact) source code
 
remove_gc_contact(self, account, gc_contact) source code
 
remove_room(self, account, room_jid) source code
 
get_gc_list(self, account) source code
 
get_nick_list(self, account, room_jid) source code
 
get_gc_contact(self, account, room_jid, nick) source code
 
get_nb_role_total_gc_contacts(self, account, room_jid, role) source code
Method Details [hide private]

__init__(self)
(Constructor)

source code 

change_account_name(self, old_name, new_name)

source code 

add_account(self, account_name)

source code 

get_accounts(self)

source code 

remove_account(self, account)

source code 

create_contact(self, jid, account, name='', groups=[], show='', status='', sub='', ask='', resource='', priority=0, keyID='', client_caps=None, our_chatstate=None, chatstate=None, last_status_time=None, composing_xep=None, last_activity_time=None)

source code 

create_self_contact(self, jid, account, resource, show, status, priority, name='', keyID='')

source code 

create_not_in_roster_contact(self, jid, account, resource='', name='', keyID='')

source code 

copy_contact(self, contact)

source code 

add_contact(self, account, contact)

source code 

remove_contact(self, account, contact)

source code 

remove_jid(self, account, jid, remove_meta=True)

source code 

get_contacts(self, account, jid)

source code 

get_contact(self, account, jid, resource=None)

source code 

iter_contacts(self, account)

source code 

get_contact_from_full_jid(self, account, fjid)

source code 

get_first_contact_from_jid(self, account, jid)

source code 

get_contacts_from_group(self, account, group)

source code 

get_contacts_jid_list(self, account)

source code 

get_jid_list(self, account)

source code 

change_contact_jid(self, old_jid, new_jid, account)

source code 

get_highest_prio_contact_from_contacts(self, contacts)

source code 

get_contact_with_highest_priority(self, account, jid)

source code 

get_nb_online_total_contacts(self, accounts=[], groups=[])

source code 
Return the number of online contacts and the total number of contacts

__getattr__(self, attr_name)
(Qualification operator)

source code 

create_gc_contact(self, room_jid, account, name='', show='', status='', role='', affiliation='', jid='', resource='')

source code 

add_gc_contact(self, account, gc_contact)

source code 

remove_gc_contact(self, account, gc_contact)

source code 

remove_room(self, account, room_jid)

source code 

get_gc_list(self, account)

source code 

get_nick_list(self, account, room_jid)

source code 

get_gc_contact(self, account, room_jid, nick)

source code 

get_nb_role_total_gc_contacts(self, account, room_jid, role)

source code