Package common :: Module connection_handlers :: Class ConnectionVcard
[hide private]
[frames] | no frames]

Class ConnectionVcard

source code

Instance Methods [hide private]
 
__init__(self) source code
 
add_sha(self, p, send_caps=True) source code
 
_add_caps(self, p)
advertise our capabilities in presence stanza (xep-0115)
source code
 
_node_to_dict(self, node) source code
 
_save_vcard_to_hd(self, full_jid, card) source code
 
get_cached_vcard(self, fjid, is_fake_jid=False)
Return the vcard as a dict.
source code
 
request_vcard(self, jid=None, groupchat_jid=None)
Request the VCARD
source code
 
send_vcard(self, vcard) source code
 
_IqCB(self, con, iq_obj) source code
 
_vCardCB(self, con, vc)
Called when we receive a vCard Parse the vCard and send it to plugins
source code
Method Details [hide private]

__init__(self)
(Constructor)

source code 

add_sha(self, p, send_caps=True)

source code 

_add_caps(self, p)

source code 
advertise our capabilities in presence stanza (xep-0115)

_node_to_dict(self, node)

source code 

_save_vcard_to_hd(self, full_jid, card)

source code 

get_cached_vcard(self, fjid, is_fake_jid=False)

source code 
Return the vcard as a dict. Return {} if vcard was too old. Return None if we don't have cached vcard.

request_vcard(self, jid=None, groupchat_jid=None)

source code 

Request the VCARD

If groupchat_jid is not null, it means we request a vcard to a fake jid, like in private messages in groupchat. jid can be the real jid of the contact, but we want to consider it comes from a fake jid

send_vcard(self, vcard)

source code 

_IqCB(self, con, iq_obj)

source code 

_vCardCB(self, con, vc)

source code 
Called when we receive a vCard Parse the vCard and send it to plugins