Home | Trees | Index | Help |
|
---|
Package pyxmpp :: Module presence :: Class Presence |
|
Stanza
--+
|
Presence
MucPresence
Wraper object for <presence /> stanzas.
Method Summary | |
---|---|
Initialize a `Presence` object. | |
Create a deep copy of the presence stanza. | |
Get presence priority. | |
Get presence "show" field. | |
Get presence status description. | |
Create "accept" response for the "subscribe"/"subscribed"/"unsubscribe"/"unsubscribed" presence stanza. | |
Create "deny" response for the "subscribe"/"subscribed"/"unsubscribe"/"unsubscribed" presence stanza. | |
Create error response for the any non-error presence stanza. | |
Change presence priority. | |
Change presence "show" field. | |
Change presence status description. | |
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 = 'presence'
|
Method Details |
---|
__init__(self,
xmlnode=None,
from_jid=None,
to_jid=None,
stanza_type=None,
stanza_id=None,
show=None,
status=None,
priority=0,
error=None,
error_cond=None)
|
copy(self)Create a deep copy of the presence stanza. :returntype: `Presence`
|
get_priority(self)Get presence priority. :return: value of stanza's priority. 0 if the stanza doesn't contain <priority/> element. :returntype: `int` |
get_show(self)Get presence "show" field. :return: value of stanza's <show/> field. :returntype: `unicode` |
get_status(self)Get presence status description. :return: value of stanza's <status/> field. :returntype: `unicode` |
make_accept_response(self)Create "accept" response for the "subscribe"/"subscribed"/"unsubscribe"/"unsubscribed" presence stanza. :return: new stanza. :returntype: `Presence` |
make_deny_response(self)Create "deny" response for the "subscribe"/"subscribed"/"unsubscribe"/"unsubscribed" presence stanza. :return: new presence stanza. :returntype: `Presence` |
make_error_response(self, cond)Create error response for the any non-error presence stanza. :Parameters: - `cond`: error condition name, as defined in XMPP specification. :Types: - `cond`: `unicode` :return: new presence stanza. :returntype: `Presence` |
set_priority(self, priority)Change presence priority. :Parameters: - `priority`: new presence priority. :Types: - `priority`: `int` |
set_show(self, show)Change presence "show" field. :Parameters: - `show`: new value for the "show" field of presence stanza. One of: None, "away", "xa", "dnd", "chat". :Types: - `show`: `unicode` |
set_status(self, status)Change presence status description. :Parameters: - `status`: descriptive text for the presence stanza. :Types: - `status`: `unicode` |
Class Variable Details |
---|
stanza_type
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Wed May 31 22:36:59 2006 | http://epydoc.sf.net |