Package pyxmpp :: Module roster :: Class RosterItem
[show private | hide private]
[frames | no frames]

Type RosterItem

         object --+    
                  |    
StanzaPayloadObject --+
                      |
                     RosterItem


Roster item.

Represents part of a roster, or roster update request.

Method Summary
  __init__(self, node_or_jid, subscription, name, groups, ask)
Initialize a roster item from XML node or jid and optional attributes.
  __str__(self)
  complete_xml_element(self, xmlnode, _unused)
Complete the XML node with `self` content.
  from_xml(self, node)
Initialize RosterItem from XML node.
  make_roster_push(self)
Make "roster push" IQ stanza from the item representing roster update request.
    Inherited from StanzaPayloadObject
  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)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Class Variable Summary
str xml_element_name = 'item'
str xml_element_namespace = 'jabber:iq:roster'

Method Details

__init__(self, node_or_jid, subscription='none', name=None, groups=(), ask=None)
(Constructor)

Initialize a roster item from XML node or jid and optional attributes.

:Parameters:
    - `node_or_jid`: XML node or JID
    - `subscription`: subscription type ("none", "to", "from" or "both"
    - `name`: item visible name
    - `groups`: sequence of groups the item is member of
    - `ask`: True if there was unreplied subsription or unsubscription
      request sent.
Overrides:
__builtin__.object.__init__

complete_xml_element(self, xmlnode, _unused)

Complete the XML node with `self` content.

Should be overriden in classes derived from `StanzaPayloadObject`.

:Parameters:
    - `xmlnode`: XML node with the element being built. It has already
      right name and namespace, but no attributes or content.
    - `_unused`: document to which the element belongs.
:Types:
    - `xmlnode`: `libxml2.xmlNode`
    - `_unused`: `libxml2.xmlDoc`
Overrides:
pyxmpp.objects.StanzaPayloadObject.complete_xml_element

from_xml(self, node)

Initialize RosterItem from XML node.

make_roster_push(self)

Make "roster push" IQ stanza from the item representing roster update
request.

Class Variable Details

xml_element_name

Type:
str
Value:
'item'                                                                 

xml_element_namespace

Type:
str
Value:
'jabber:iq:roster'                                                     

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