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

Class MucPresence

source code

stanza.Stanza --+    
                |    
presence.Presence --+
                    |
     MucStanzaExt --+
                    |
                   MucPresence

Extend Presence with MUC related interface.
Instance Methods [hide private]
 
__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)
Initialize a MucPresence object.
source code
Presence
copy(self)
Return a copy of self.
source code
 
make_join_request(self, password=None, history_maxchars=None, history_maxstanzas=None, history_seconds=None, history_since=None)
Make the presence stanza a MUC room join request.
source code
MucX
get_join_info(self)
If self is a MUC room join request return the information contained.
source code
 
free(self)
Free the data associated with this MucPresence object.
source code

Inherited from presence.Presence: get_priority, get_show, get_status, make_accept_response, make_deny_response, make_error_response, set_priority, set_show, set_status

Inherited from stanza.Stanza: __del__, __eq__, __ne__, add_content, add_new_content, get_error, get_from, get_from_jid, get_id, get_node, get_stanza_id, get_stanza_type, get_to, get_to_jid, get_type, serialize, set_content, set_from, set_id, set_new_content, set_to, set_type, xpath_eval

Inherited from MucStanzaExt: clear_muc_child, get_muc_child, make_muc_admin_quey, make_muc_userinfo, muc_free

Class Variables [hide private]

Inherited from presence.Presence: stanza_type

Instance Variables [hide private]

Inherited from stanza.Stanza: stream, xmlnode

Inherited from stanza.Stanza (private): _error

Method Details [hide private]

__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)
(Constructor)

source code 
Initialize a MucPresence object.
Parameters:
  • xmlnode (: unicode or libxml2.xmlNode or pyxmpp.stanza.Stanza) - : XML node to_jid be wrapped into the MucPresence object or other Presence object to be copied. If not given then new presence stanza is created using following parameters.
  • from_jid (: JID) - : sender JID.
  • to_jid (: JID) - : recipient JID.
  • stanza_type (: unicode) - : staza type: one of: None, "available", "unavailable", "subscribe", "subscribed", "unsubscribe", "unsubscribed" or "error". "available" is automaticaly changed to_jid None.
  • stanza_id (: unicode) - : stanza id -- value of stanza's "id" attribute
  • show (: unicode) - : "show" field of presence stanza. One of: None, "away", "xa", "dnd", "chat".
  • status (: unicode) - : descriptive text for the presence stanza.
  • priority (: unicode) - : presence priority.
  • error_cond (: unicode) - : error condition name. Ignored if stanza_type is not "error"
Overrides: MucStanzaExt.__init__

copy(self)

source code 
Return a copy of self.
Returns: Presence
Overrides: stanza.Stanza.copy

make_join_request(self, password=None, history_maxchars=None, history_maxstanzas=None, history_seconds=None, history_since=None)

source code 
Make the presence stanza a MUC room join request.
Parameters:
  • password (: unicode) - : password to the room.
  • history_maxchars (: int) - : limit of the total number of characters in history.
  • history_maxstanzas (: int) - : limit of the total number of messages in history.
  • history_seconds (: int) - : send only messages received in the last seconds seconds.
  • history_since (: datetime.datetime) - : Send only the messages received since the dateTime specified (UTC).

get_join_info(self)

source code 
If self is a MUC room join request return the information contained.
Returns: MucX
the join request details or None.

free(self)

source code 
Free the data associated with this MucPresence object.
Overrides: stanza.Stanza.free