Package xmpp :: Module protocol :: Class Presence
[show private | hide private]
[frames | no frames]

Class Presence

Node --+    
       |    
Protocol --+
           |
          Presence


XMPP Presence object.
Method Summary
  __init__(self, to, typ, priority, show, status, attrs, frm, timestamp, payload, xmlns, node)
Create presence object.
  getActor(self)
Returns the reason of the presence (for groupchat)
  getAffiliation(self)
Returns the presence affiliation (for groupchat)
  getJid(self)
Returns the presence jid (for groupchat)
  getNick(self)
Returns the nick value (for nick change in groupchat)
  getPriority(self)
Returns the priority of the message.
  getReason(self)
Returns the reason of the presence (for groupchat)
  getRole(self)
Returns the presence role (for groupchat)
  getShow(self)
Returns the show value of the message.
  getStatus(self)
Returns the status string of the message.
  getStatusCode(self)
Returns the status code of the presence (for groupchat)
  setPriority(self, val)
Sets the priority of the message.
  setShow(self, val)
Sets the show value of the message.
  setStatus(self, val)
Sets the status string of the message.
  _muc_getItemAttr(self, tag, attr)
  _muc_getSubTagDataAttr(self, tag, attr)
    Inherited from Protocol
  __setitem__(self, item, val)
Set the item 'item' to the value 'val'.
  getError(self)
Return the error-condition (if present) or the textual description of the error (otherwise).
  getErrorCode(self)
Return the error code.
  getFrom(self)
Return value of the 'from' attribute.
  getID(self)
Return the value of the 'id' attribute.
  getProperties(self)
Return the list of namespaces to which belongs the direct childs of element
  getTimestamp(self)
Return the timestamp in the 'yyyymmddThhmmss' format.
  getTo(self)
Return value of the 'to' attribute.
  getType(self)
Return the value of the 'type' attribute.
  setError(self, error, code)
Set the error code.
  setFrom(self, val)
Set the value of the 'from' attribute.
  setID(self, val)
Set the value of the 'id' attribute.
  setTimestamp(self, val)
Set the timestamp.
  setTo(self, val)
Set the value of the 'to' attribute.
  setType(self, val)
Set the value of the 'type' attribute.
    Inherited from Node
  __delitem__(self, item)
Deletes node's attribute "item".
  __getattr__(self, attr)
Reduce memory usage caused by T/NT classes - use memory only when needed.
  __getitem__(self, item)
Returns node's attribute "item" value.
  __str__(self, fancy)
Method used to dump node into textual representation.
  addChild(self, name, attrs, payload, namespace, node)
If "node" argument is provided, adds it as child node.
  addData(self, data)
Adds some CDATA to node.
  clearData(self)
Removes all CDATA from the node.
  delAttr(self, key)
Deletes an attribute "key"
  delChild(self, node, attrs)
Deletes the "node" from the node's childs list, if "node" is an instance.
  getAttr(self, key)
Returns value of specified attribute.
  getAttrs(self)
Returns all node's attributes as dictionary.
  getCDATA(self)
Serialise node, dropping all tags and leaving CDATA intact.
  getChildren(self)
Returns all node's child nodes as list.
  getData(self)
Returns all node CDATA as string (concatenated).
  getName(self)
Returns the name of node
  getNamespace(self)
Returns the namespace of node
  getParent(self)
Returns the parent of node (if present).
  getPayload(self)
Return the payload of node i.e.
  getTag(self, name, attrs, namespace)
Filters all child nodes using specified arguments as filter.
  getTagAttr(self, tag, attr)
Returns attribute value of the child with specified name (or None if no such attribute).
  getTagData(self, tag)
Returns cocatenated CDATA of the child with specified name.
  getTags(self, name, attrs, namespace, one)
Filters all child nodes using specified arguments as filter.
  has_attr(self, key)
Checks if node have attribute "key".
  setAttr(self, key, val)
Sets attribute "key" with the value "val".
  setData(self, data)
Sets node's CDATA to provided string.
  setName(self, val)
Changes the node name.
  setNamespace(self, namespace)
Changes the node namespace.
  setParent(self, node)
Sets node's parent to "node".
  setPayload(self, payload, add)
Sets node payload according to the list specified.
  setTag(self, name, attrs, namespace)
Same as getTag but if the node with specified namespace/attributes not found, creates such node and returns it.
  setTagAttr(self, tag, attr, val)
Creates new node (if not already present) with name "tag" and sets it's attribute "attr" to value "val".
  setTagData(self, tag, val, attrs)
Creates new node (if not already present) with name "tag" and (optionally) attributes "attrs" and sets it's CDATA to string "val".

Class Variable Summary
    Inherited from Node
int FORCE_NODE_RECREATION = 0                                                                     

Method Details

__init__(self, to=None, typ=None, priority=None, show=None, status=None, attrs={}, frm=None, timestamp=None, payload=[], xmlns='jabber:client', node=None)
(Constructor)

Create presence object. You can specify recipient, type of message, priority, show and status values any additional attributes, sender of the presence, timestamp, any additional payload (f.e. jabber:x:delay element) and namespace in one go. Alternatively you can pass in the other XML object as the 'node' parameted to replicate it as presence.
Overrides:
xmpp.protocol.Protocol.__init__

getActor(self)

Returns the reason of the presence (for groupchat)

getAffiliation(self)

Returns the presence affiliation (for groupchat)

getJid(self)

Returns the presence jid (for groupchat)

getNick(self)

Returns the nick value (for nick change in groupchat)

getPriority(self)

Returns the priority of the message.

getReason(self)

Returns the reason of the presence (for groupchat)

getRole(self)

Returns the presence role (for groupchat)

getShow(self)

Returns the show value of the message.

getStatus(self)

Returns the status string of the message.

getStatusCode(self)

Returns the status code of the presence (for groupchat)

setPriority(self, val)

Sets the priority of the message.

setShow(self, val)

Sets the show value of the message.

setStatus(self, val)

Sets the status string of the message.

Generated by Epydoc 2.1 on Thu Oct 5 23:57:43 2006 http://epydoc.sf.net