Home | Trees | Index | Help |
|
---|
Package pyxmpp :: Package jabber :: Module disco :: Class DiscoInfo |
|
object
--+ |CachedPropertyObject
--+ |object
--+ | | |StanzaPayloadWrapperObject
--+ | DiscoInfo
A disco#info response object. :Ivariables: - `node`: node name of the disco#info element (cached). - `identities`: identities in the disco#info object. - `features`: features in the disco#info object. - `xmlnode`: XML element listing the items. :Types: - `node`: `unicode` - `identities`: `tuple` of `DiscoIdentity` - `features`: `tuple` of `unicode` - `xmlnode`: `libxml2.xmlNode`
Method Summary | |
---|---|
Initialize an `DiscoInfo` object. | |
__del__(self)
| |
Add a feature to `self`. | |
Add an identity to the `DiscoInfo` object. | |
Get the features contained in `self`. | |
List the identity objects contained in `self`. | |
Get the node address of the `DiscoInfo` object. | |
Check if `self` contains the named feature. | |
Check if the item described by `self` belongs to the given category and type. | |
Clear cached feature list. | |
Clear cached identity list. | |
Remove a feature from `self`. | |
Set features in the disco#info object. | |
Set identities in the disco#info object. | |
Set the node of the disco#info element. | |
Inherited from CachedPropertyObject | |
| |
| |
Inherited from StanzaPayloadWrapperObject | |
Get the XML representation of `self`. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__str__() <==> str(x) |
Method Details |
---|
__init__(self,
xmlnode_or_node=None,
parent=None,
doc=None)
|
add_feature(self, var)Add a feature to `self`. :Parameters: - `var`: the feature name. :Types: - `var`: `unicode` |
add_identity(self, item_name, item_category=None, item_type=None)Add an identity to the `DiscoInfo` object. :Parameters: - `item_name`: name of the item. - `item_category`: category of the item. - `item_type`: type of the item. :Types: - `item_name`: `unicode` - `item_category`: `unicode` - `item_type`: `unicode` :returns: the identity created. :returntype: `DiscoIdentity` |
get_features(self)Get the features contained in `self`. :return: the list of features. :returntype: `list` of `unicode` |
get_identities(self)List the identity objects contained in `self`. :return: the list of identities. :returntype: `list` of `DiscoIdentity` |
get_node(self)Get the node address of the `DiscoInfo` object. :return: the node name. :returntype: `unicode` |
has_feature(self, var)Check if `self` contains the named feature. :Parameters: - `var`: the feature name. :Types: - `var`: `unicode` :return: `True` if the feature is found in `self`. :returntype: `bool` |
identity_is(self, item_category, item_type=None)Check if the item described by `self` belongs to the given category and type. :Parameters: - `item_category`: the category name. - `item_type`: the type name. If `None` then only the category is checked. :Types: - `item_category`: unicode - `item_type`: unicode :return: `True` if `self` contains at least one <identity/> object with given type and category. :returntype: `bool` |
invalidate_features(self)Clear cached feature list. |
invalidate_identities(self)Clear cached identity list. |
remove_feature(self, var)Remove a feature from `self`. :Parameters: - `var`: the feature name. :Types: - `var`: `unicode` |
set_features(self, features)Set features in the disco#info object. All existing features are removed from `self`. :Parameters: - `features`: list of features. :Types: - `features`: sequence of `unicode` |
set_identities(self, identities)Set identities in the disco#info object. Remove all existing identities from `self`. :Parameters: - `identities`: list of identities or identity properties (jid,node,category,type,name). :Types: - `identities`: sequence of `DiscoIdentity` or sequence of sequences |
set_node(self, node)Set the node of the disco#info element. :Parameters: - `node`: the new node or `None`. :Types: - `node`: `unicode` |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Wed May 31 22:36:58 2006 | http://epydoc.sf.net |