| Home | Trees | Index | Help |
|
|---|
| Package pyxmpp :: Package jabber :: Module disco :: Class DiscoItems |
|
object --+
|
CachedPropertyObject --+
|
object --+ |
| |
StanzaPayloadWrapperObject --+
|
DiscoItems
A disco#items response or publish-request object.
:Ivariables:
- `node`: node name of the disco#items element (cached).
- `items`: items in the disco#items element (cached).
- `xmlnode`: XML element listing the items.
:Types:
- `node`: `unicode`
- `items`: `tuple` of `DiscoItem`
- `xmlnode`: `libxml2.xmlNode`
| Method Summary | |
|---|---|
Initialize an `DiscoItems` object. | |
__del__(self)
| |
Add a new item to the `DiscoItems` object. | |
Get the items contained in `self`. | |
Get the node address of the `DiscoItems` object. | |
Check if `self` contains an item. | |
Clear cached item list. | |
Set items in the disco#items object. | |
Set the node of the disco#item 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)
|
add_item(self, jid, node=None, name=None, action=None)
Add a new item to the `DiscoItems` object.
:Parameters:
- `jid`: item JID.
- `node`: item node name.
- `name`: item name.
- `action`: action for a "disco push".
:Types:
- `jid`: `pyxmpp.JID`
- `node`: `unicode`
- `name`: `unicode`
- `action`: `unicode`
:returns: the item created.
:returntype: `DiscoItem`.
|
get_items(self)Get the items contained in `self`. :return: the items contained. :returntype: `list` of `DiscoItem` |
get_node(self)Get the node address of the `DiscoItems` object. :return: the node name. :returntype: `unicode` |
has_item(self, jid, node=None)
Check if `self` contains an item.
:Parameters:
- `jid`: JID of the item.
- `node`: node name of the item.
:Types:
- `jid`: `JID`
- `node`: `libxml2.xmlNode`
:return: `True` if the item is found in `self`.
:returntype: `bool`
|
invalidate_items(self)Clear cached item list. |
set_items(self, item_list)
Set items in the disco#items object.
All previous items are removed.
:Parameters:
- `item_list`: list of items or item properties
(jid,node,name,action).
:Types:
- `item_list`: sequence of `DiscoItem` or sequence of sequences
|
set_node(self, node)
Set the node of the disco#item 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 |