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

Type DiscoIdentity

                object --+    
                         |    
      CachedPropertyObject --+
                             |
                object --+   |
                         |   |
StanzaPayloadWrapperObject --+
                             |
                            DiscoIdentity


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

Identifies an item by its name, category and type.

:Ivariables:
    - `disco`: the disco reply this is the part of.
    - `xmlnode`: XML element describing the identity.
:Types:
    - `disco`: `DiscoInfo`
    - `xmlnode`: `libxml2.xmlNode`

Method Summary
  __init__(self, disco, xmlnode_or_name, item_category, item_type, replace)
Initialize an `DiscoIdentity` object.
  __del__(self)
  __str__(self)
  get_category(self)
Get the category of the item.
  get_name(self)
Get the name of the item.
  get_type(self)
Get the type of the item.
  remove(self)
Remove `self` from the containing `DiscoInfo` object.
  set_category(self, category)
Set the category of the item.
  set_name(self, name)
Set the name of the item.
  set_type(self, item_type)
Set the type of the item.
    Inherited from CachedPropertyObject
  __getattr__(self, name)
  __setattr__(self, name, value)
    Inherited from StanzaPayloadWrapperObject
  as_xml(self, parent, doc)
Get the XML representation of `self`.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)

Method Details

__init__(self, disco, xmlnode_or_name, item_category=None, item_type=None, replace=False)
(Constructor)

Initialize an `DiscoIdentity` object.

:Parameters:
    - `disco`: the disco#info reply `self` is a part of.
    - `xmlnode_or_name`: XML element describing the identity or the
      name of the item described.
    - `item_category`: category of the item described.
    - `item_type`: type of the item described.
    - `replace`: if `True` than all other <identity/> elements in
      `disco` will be removed.
:Types:
    - `disco`: `DiscoItems`
    - `xmlnode_or_name`: `libxml2.xmlNode` or `unicode`
    - `item_category`: `unicode`
    - `item_type`: `unicode`
    - `replace`: `bool`
Overrides:
__builtin__.object.__init__

get_category(self)

Get the category of the item.

:return: the category of the item.
:returntype: `unicode`

get_name(self)

Get the name of the item.

:return: the name of the item or `None`.
:returntype: `unicode`

get_type(self)

Get the type of the item.

:return: the type of the item.
:returntype: `unicode`

remove(self)

Remove `self` from the containing `DiscoInfo` object.

set_category(self, category)

Set the category of the item.

:Parameters:
    - `category`: the new category.
:Types:
    - `category`: `unicode`

set_name(self, name)

Set the name of the item.

:Parameters:
    - `name`: the new name or `None`.
:Types:
    - `name`: `unicode`

set_type(self, item_type)

Set the type of the item.

:Parameters:
    - `item_type`: the new type.
:Types:
    - `item_type`: `unicode`

Generated by Epydoc 2.1 on Wed May 31 22:36:59 2006 http://epydoc.sf.net