xmpp.protocol.Message

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

# Class Message

source code

    simplexml.Node --+
                     |
              Protocol --+
                         |
                        Message

XMPP Message stanza - "push" mechanism.

Instance Methods | [hide private]
__init__(self, to=None, body=None, typ=None, subject=None, attrs=`{``}`, frm=None, payload=`[``]`, timestamp=None, xmlns=`'``jabber:client``'`, node=None) Create message object. | source code
getBody(self) Returns text of the message. | source code
getSubject(self) Returns subject of the message. | source code
getThread(self) Returns thread of the message. | source code
setBody(self, val) Sets the text of the message. | source code
setSubject(self, val) Sets the subject of the message. | source code
setThread(self, val) Sets the thread of the message. | source code
buildReply(self, text=None) Builds and returns another message object with specified text. | source code
Inherited from `Protocol`: `__setitem__`, `getError`, `getErrorCode`, `getFrom`, `getID`, `getProperties`, `getTimestamp`, `getTo`, `getType`, `setError`, `setFrom`, `setID`, `setTimestamp`, `setTo`, `setType` Inherited from `simplexml.Node`: `__delitem__`, `__getattr__`, `__getitem__`, `__str__`, `addChild`, `addData`, `clearData`, `delAttr`, `delChild`, `getAttr`, `getAttrs`, `getCDATA`, `getChildren`, `getData`, `getName`, `getNamespace`, `getParent`, `getPayload`, `getTag`, `getTagAttr`, `getTagData`, `getTags`, `has_attr`, `setAttr`, `setData`, `setName`, `setNamespace`, `setParent`, `setPayload`, `setTag`, `setTagAttr`, `setTagData`

Class Variables | [hide private]
Inherited from `simplexml.Node`: `FORCE_NODE_RECREATION`

Method Details | [hide private]

### __init__(self, to=None, body=None, typ=None, subject=None, attrs=`{``}`, frm=None, payload=`[``]`, timestamp=None, xmlns=`'``jabber:client``'`, node=None) (Constructor) | source code
Create message object. You can specify recipient, text of message, type of message any additional attributes, sender of the message, 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 message. Overrides: Protocol.__init__

### buildReply(self, text=None) | source code
Builds and returns another message object with specified text. The to, from and thread properties of new message are pre-set as reply to this message.