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

Class Contacts

source code

Information concerning all contacts and groupchat contacts
Instance Methods [hide private]
 
__init__(self) source code
 
change_account_name(self, old_name, new_name) source code
 
add_account(self, account) source code
 
get_accounts(self) source code
 
remove_account(self, account) source code
 
create_contact(self, jid='', name='', groups=[], show='', status='', sub='', ask='', resource='', priority=0, keyID='', caps_node=None, caps_hash_method=None, caps_hash=None, our_chatstate=None, chatstate=None, last_status_time=None, composing_xep=None, mood={}, tune={}, activity={}) source code
 
copy_contact(self, contact) source code
 
add_contact(self, account, contact) source code
 
remove_contact(self, account, contact) source code
 
clear_contacts(self, account) source code
 
remove_jid(self, account, jid, remove_meta=True)
Removes all contacts for a given jid
source code
 
get_contacts(self, account, jid)
Returns the list of contact instances for this jid.
source code
 
get_contact(self, account, jid, resource=None)
Returns the contact instance for the given resource if it's given else the first contact is no resource is given or None if there is not
source code
 
iter_contacts(self, account) source code
 
get_contact_from_full_jid(self, account, fjid)
Get Contact object for specific resource of given jid
source code
 
get_highest_prio_contact_from_contacts(self, contacts) source code
 
get_contact_with_highest_priority(self, account, jid) source code
 
get_first_contact_from_jid(self, account, jid) source code
 
get_contacts_from_group(self, account, group)
Returns all contacts in the given group
source code
 
get_nb_online_total_contacts(self, accounts=[], groups=[])
Returns the number of online contacts and the total number of contacts
source code
 
define_metacontacts(self, account, tags_list) source code
 
get_new_metacontacts_tag(self, jid) source code
 
get_metacontacts_tag(self, account, jid)
Returns the tag of a jid
source code
 
add_metacontact(self, brother_account, brother_jid, account, jid) source code
 
remove_metacontact(self, account, jid) source code
 
has_brother(self, account, jid, accounts) source code
 
is_big_brother(self, account, jid, accounts) source code
 
get_metacontacts_jids(self, tag, accounts)
Returns all jid for the given tag in the form {acct: [jid1, jid2],.}
source code
 
get_metacontacts_family(self, account, jid)
return the family of the given jid, including jid in the form: [{'account': acct, 'jid': jid, 'order': order}, ] 'order' is optional
source code
 
compare_metacontacts(self, data1, data2)
compare 2 metacontacts.
source code
 
get_metacontacts_big_brother(self, family)
which of the family will be the big brother under wich all others will be ?
source code
 
is_pm_from_jid(self, account, jid)
Returns True if the given jid is a private message jid
source code
 
is_pm_from_contact(self, account, contact)
Returns True if the given contact is a private message contact
source code
 
get_jid_list(self, account) source code
 
contact_from_gc_contact(self, gc_contact)
Create a Contact instance from a GC_Contact instance
source code
 
create_gc_contact(self, room_jid='', 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)
Returns the number of group chat contacts for the given role and the total number of group chat contacts
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)

source code 

get_accounts(self)

source code 

remove_account(self, account)

source code 

create_contact(self, jid='', name='', groups=[], show='', status='', sub='', ask='', resource='', priority=0, keyID='', caps_node=None, caps_hash_method=None, caps_hash=None, our_chatstate=None, chatstate=None, last_status_time=None, composing_xep=None, mood={}, tune={}, activity={})

source code 

copy_contact(self, contact)

source code 

add_contact(self, account, contact)

source code 

remove_contact(self, account, contact)

source code 

clear_contacts(self, account)

source code 

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

source code 
Removes all contacts for a given jid

get_contacts(self, account, jid)

source code 
Returns the list of contact instances for this jid.

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

source code 
Returns the contact instance for the given resource if it's given else the first contact is no resource is given or None if there is not

iter_contacts(self, account)

source code 

get_contact_from_full_jid(self, account, fjid)

source code 
Get Contact object for specific resource of given jid

get_highest_prio_contact_from_contacts(self, contacts)

source code 

get_contact_with_highest_priority(self, account, jid)

source code 

get_first_contact_from_jid(self, account, jid)

source code 

get_contacts_from_group(self, account, group)

source code 
Returns all contacts in the given group

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

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

define_metacontacts(self, account, tags_list)

source code 

get_new_metacontacts_tag(self, jid)

source code 

get_metacontacts_tag(self, account, jid)

source code 
Returns the tag of a jid

add_metacontact(self, brother_account, brother_jid, account, jid)

source code 

remove_metacontact(self, account, jid)

source code 

has_brother(self, account, jid, accounts)

source code 

is_big_brother(self, account, jid, accounts)

source code 

get_metacontacts_jids(self, tag, accounts)

source code 
Returns all jid for the given tag in the form {acct: [jid1, jid2],.}

get_metacontacts_family(self, account, jid)

source code 
return the family of the given jid, including jid in the form: [{'account': acct, 'jid': jid, 'order': order}, ] 'order' is optional

compare_metacontacts(self, data1, data2)

source code 
compare 2 metacontacts. Data is {'jid': jid, 'account': account, 'order': order} order is optional

get_metacontacts_big_brother(self, family)

source code 
which of the family will be the big brother under wich all others will be ?

is_pm_from_jid(self, account, jid)

source code 
Returns True if the given jid is a private message jid

is_pm_from_contact(self, account, contact)

source code 
Returns True if the given contact is a private message contact

get_jid_list(self, account)

source code 

contact_from_gc_contact(self, gc_contact)

source code 
Create a Contact instance from a GC_Contact instance

create_gc_contact(self, room_jid='', 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 
Returns the number of group chat contacts for the given role and the total number of group chat contacts