| Home | Trees | Index | Help |
|
|---|
| Package pyxmpp :: Module message :: Class Message |
|
Stanza --+
|
Message
Wraper object for <message /> stanzas.
| Method Summary | |
|---|---|
Initialize a `Message` object. | |
Create a deep copy of the message stanza. | |
Get the body of the message. | |
Get the message subject. | |
Get the thread-id subject. | |
Create error response for any non-error message stanza. | |
| Inherited from Stanza | |
| |
| |
| |
Add an XML node to the stanza's payload. | |
Add a new XML element to the stanza payload. | |
Free the node associated with this `Stanza` object. | |
Get stanza error information. | |
Get "from" attribute of the stanza. | |
Get "from" attribute of the stanza. | |
Get "id" attribute of the stanza. | |
Return the XML node wrapped into `self`. | |
Get "id" attribute of the stanza. | |
Get "type" attribute of the stanza. | |
Get "to" attribute of the stanza. | |
Get "to" attribute of the stanza. | |
Get "type" attribute of the stanza. | |
Serialize the stanza into an UTF-8 encoded XML string. | |
Set stanza content to an XML node. | |
Set "from" attribute of the stanza. | |
Set "id" attribute of the stanza. | |
Set stanza payload to a new XML element. | |
Set "to" attribute of the stanza. | |
Set "type" attribute of the stanza. | |
Evaluate an XPath expression on the stanza XML node. | |
| Class Variable Summary | |
|---|---|
str |
stanza_type = 'message'
|
| Method Details |
|---|
__init__(self,
xmlnode=None,
from_jid=None,
to_jid=None,
stanza_type=None,
stanza_id=None,
subject=None,
body=None,
thread=None,
error=None,
error_cond=None)
|
copy(self)Create a deep copy of the message stanza. :returntype: `Message`
|
get_body(self)Get the body of the message. :return: the body of the message or `None` if there is no body. :returntype: `unicode` |
get_subject(self)Get the message subject. :return: the message subject or `None` if there is no subject. :returntype: `unicode` |
get_thread(self)Get the thread-id subject. :return: the thread-id or `None` if there is no thread-id. :returntype: `unicode` |
make_error_response(self, cond)
Create error response for any non-error message stanza.
:Parameters:
- `cond`: error condition name, as defined in XMPP specification.
:return: new message stanza with the same "id" as self, "from" and
"to" attributes swapped, type="error" and containing <error />
element plus payload of `self`.
:returntype: `unicode`
|
| Class Variable Details |
|---|
stanza_type
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Wed May 31 22:37:02 2006 | http://epydoc.sf.net |