Package pyxmpp :: Package jabber :: Module muccore :: Class MucItem
[hide private]

Class MucItem

source code

 object --+    
          |    
MucItemBase --+
              |
             MucItem

MUC <item/> element -- describes a room occupant.
Instance Methods [hide private]
 
__init__(self, xmlnode_or_affiliation, role=None, jid=None, nick=None, actor=None, reason=None)
Initialize a MucItem object.
source code
 
__init(self, affiliation, role, jid=None, nick=None, actor=None, reason=None)
Initialize a MucItem object from a set of attributes.
source code
 
__from_xmlnode(self, xmlnode)
Initialize a MucItem object from an XML node.
source code
libxml2.xmlNode
as_xml(self, parent)
Create XML representation of self.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]
: JID actor
: actor modyfying the user data.
: str affiliation
: affiliation of the user.
: JID jid
: JID of the user.
: unicode nick
: nickname of the user.
: unicode reason
: reason of change of the user data.
: str role
: role of the user.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, xmlnode_or_affiliation, role=None, jid=None, nick=None, actor=None, reason=None)
(Constructor)

source code 
Initialize a MucItem object.
Parameters:
  • xmlnode_or_affiliation (: libxml2.xmlNode or str) - : XML node to be pased or the affiliation of the user being described.
  • role (: str) - : role of the user.
  • jid (: JID) - : JID of the user.
  • nick (: unicode) - : nickname of the user.
  • actor (: JID) - : actor modyfying the user data.
  • reason (: unicode) - : reason of change of the user data.
Overrides: object.__init__

__init(self, affiliation, role, jid=None, nick=None, actor=None, reason=None)

source code 
Initialize a MucItem object from a set of attributes.
Parameters:
  • affiliation (: str) - : affiliation of the user.
  • role (: str) - : role of the user.
  • jid (: JID) - : JID of the user.
  • nick (: unicode) - : nickname of the user.
  • actor (: JID) - : actor modyfying the user data.
  • reason (: unicode) - : reason of change of the user data.

__from_xmlnode(self, xmlnode)

source code 
Initialize a MucItem object from an XML node.
Parameters:
  • xmlnode (: libxml2.xmlNode) - : the XML node.

as_xml(self, parent)

source code 
Create XML representation of self.
Parameters:
  • parent (: libxml2.xmlNode) - : the element to which the created node should be linked to.
Returns: libxml2.xmlNode
an XML node.