Package pyxmpp :: Package jabber :: Module disco :: Class DiscoIdentity |
[hide private]

# Class DiscoIdentity

source code

                            object --+
                                     |
    objects.StanzaPayloadWrapperObject --+
                                         |
                                        DiscoIdentity

An <identity/> element of disco#info reply.

Identifies an item by its name, category and type.

Instance Methods | [hide private]
__init__(self, disco, xmlnode_or_name, item_category=None, item_type=None, replace=False) Initialize an DiscoIdentity object. | source code
__del__(self) | source code
__str__(self) str(x) | source code
remove(self) Remove `self` from the containing DiscoInfo object. | source code
`unicode` |
get_name(self) Get the name of the item. | source code
set_name(self, name) Set the name of the item. | source code
`unicode` |
get_category(self) Get the category of the item. | source code
set_category(self, category) Set the category of the item. | source code
`unicode` |
get_type(self) Get the type of the item. | source code
set_type(self, item_type) Set the type of the item. | source code
Inherited from `objects.StanzaPayloadWrapperObject`: `as_xml` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Instance Variables | [hide private]
DiscoInfo | disco the disco reply this is the part of.
`libxml2.xmlNode` | xmlnode XML node of the object.

Properties | [hide private]
`unicode` | name Get the name of the item.
`unicode` | category Get the category of the item.
`unicode` | type Get the type of the item.
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, disco, xmlnode_or_name, item_category=None, item_type=None, replace=False) (Constructor) | source code
Initialize an DiscoIdentity object. Parameters: `disco` (DiscoItems) - the disco#info reply `self` is a part of. `xmlnode_or_name` (`libxml2.xmlNode` or `unicode`) - XML element describing the identity or the name of the item described. `item_category` (`unicode`) - category of the item described. `item_type` (`unicode`) - type of the item described. `replace` (`bool`) - if `True` than all other <identity/> elements in disco will be removed. Overrides: object.__init__

### __str__(self) (Informal representation operator) | source code
str(x) Overrides: object.__str__ (inherited documentation)

### get_name(self) | source code
Get the name of the item. Returns: `unicode` the name of the item or `None`.

### set_name(self, name) | source code
Set the name of the item. Parameters: `name` (`unicode`) - the new name or `None`.

### get_category(self) | source code
Get the category of the item. Returns: `unicode` the category of the item.

### set_category(self, category) | source code
Set the category of the item. Parameters: `category` (`unicode`) - the new category.

### get_type(self) | source code
Get the type of the item. Returns: `unicode` the type of the item.

### set_type(self, item_type) | source code
Set the type of the item. Parameters: `item_type` (`unicode`) - the new type.

Property Details | [hide private]

### name Get the name of the item. Get Method: get_name(self) - Get the name of the item. Set Method: set_name(self, name) - Set the name of the item. Type: `unicode`

### category Get the category of the item. Get Method: get_category(self) - Get the category of the item. Set Method: set_category(self, category) - Set the category of the item. Type: `unicode`

### type Get the type of the item. Get Method: get_type(self) - Get the type of the item. Set Method: set_type(self, item_type) - Set the type of the item. Type: `unicode`