Module caps_cache
source code
Module containing all XEP-115 (Entity Capabilities) related classes
Basic Idea:
CapsCache caches features to hash relationships. The cache is queried
through ClientCaps objects which are hold by contact instances.
|
|
AbstractClientCaps
Base class representing a client and its capabilities as advertised by a
caps tag in a presence
|
|
|
ClientCaps
The current XEP-115 implementation
|
|
|
OldClientCaps
Old XEP-115 implemtation.
|
|
|
NullClientCaps
This is a NULL-Object to streamline caps handling if a client has not
advertised any caps or has advertised them in an improper way
|
|
|
CapsCache
This object keeps the mapping between caps data and real disco features they
represent, and provides simple way to query that info
|
Imports:
base64,
hashlib,
logging,
NS_XHTML_IM,
NS_RECEIPTS,
NS_ESESSION,
NS_CHATSTATES,
NS_JINGLE_ICE_UDP,
NS_JINGLE_RTP_AUDIO,
NS_JINGLE_RTP_VIDEO,
NS_CAPS
client_supports(client_caps,
requested_feature)
| source code
|
|
create_suitable_client_caps(node,
caps_hash,
hash_method)
| source code
|
Create and return a suitable ClientCaps object for the given node,
caps_hash, hash_method combination.
|
compute_caps_hash(identities,
features,
dataforms=[],
hash_method='sha-1')
| source code
|
Compute caps hash according to XEP-0115, V1.5
dataforms are xmpp.DataForms objects as common.dataforms don't allow several
values without a field type list-multi
|
log
- Value:
logging.getLogger('gajim.c.caps_cache')
|
|
FEATURE_BLACKLIST
- Value:
['http://jabber.org/protocol/chatstates',
'http://jabber.org/protocol/xhtml-im',
'urn:xmpp:receipts',
'http://www.xmpp.org/extensions/xep-0116.html#ns',
'urn:xmpp:jingle:transports:ice-udp:1',
'urn:xmpp:jingle:apps:rtp:audio',
'urn:xmpp:jingle:apps:rtp:video']
|
|