pyxmpp.jabber.muccore.MucIq

Package pyxmpp :: Package jabber :: Module muccore :: Class MucIq |
[show private | hide private]
[frames | no frames]

## Class MucIq

      Stanza --+
               |
              Iq --+
                   |
    MucStanzaExt --+
                   |
                  MucIq

Extend `Iq` with MUC related interface.

Method Summary
| ``__init__`(self, xmlnode, from_jid, to_jid, stanza_type, stanza_id, error, error_cond)` Initialize an `Iq` object.
| ``copy`(self)` Return a copy of `self`.
| ``free`(self)` Free the data associated with this `MucIq` object.
`MucItem` | ``make_kick_request`(self, nick, reason)` Make the iq stanza a MUC room participant kick request.
Inherited from Iq
`libxml2.xmlNode` | ``get_query`(self)` Get the payload element of the stanza.
`str` | ``get_query_ns`(self)` Get a namespace of the stanza payload.
`Iq` | ``make_error_response`(self, cond)` Create error response for the a "get" or "set" iq stanza.
`Iq` | ``make_result_response`(self)` Create result response for the a "get" or "set" iq stanza.
`libxml2.xmlNode` | ``new_query`(self, ns_uri, name)` Create new payload element for the stanza.
Inherited from Stanza
| ``__del__`(self)`
| ``__eq__`(self, other)`
| ``__ne__`(self, other)`
| ``add_content`(self, content)` Add an XML node to the stanza's payload.
| ``add_new_content`(self, ns_uri, name)` Add a new XML element to the stanza payload.
`pyxmpp.error.StanzaErrorNode` | ``get_error`(self)` Get stanza error information.
`unicode` | ``get_from`(self)` Get "from" attribute of the stanza.
`unicode` | ``get_from_jid`(self)` Get "from" attribute of the stanza.
`unicode` | ``get_id`(self)` Get "id" attribute of the stanza.
`libxml2.xmlNode` | ``get_node`(self)` Return the XML node wrapped into `self`.
`unicode` | ``get_stanza_id`(self)` Get "id" attribute of the stanza.
`unicode` | ``get_stanza_type`(self)` Get "type" attribute of the stanza.
`unicode` | ``get_to`(self)` Get "to" attribute of the stanza.
`unicode` | ``get_to_jid`(self)` Get "to" attribute of the stanza.
`unicode` | ``get_type`(self)` Get "type" attribute of the stanza.
`str` | ``serialize`(self)` Serialize the stanza into an UTF-8 encoded XML string.
| ``set_content`(self, content)` Set stanza content to an XML node.
| ``set_from`(self, from_jid)` Set "from" attribute of the stanza.
| ``set_id`(self, stanza_id)` Set "id" attribute of the stanza.
| ``set_new_content`(self, ns_uri, name)` Set stanza payload to a new XML element.
| ``set_to`(self, to_jid)` Set "to" attribute of the stanza.
| ``set_type`(self, stanza_type)` Set "type" attribute of the stanza.
| ``xpath_eval`(self, expr, namespaces)` Evaluate an XPath expression on the stanza XML node.
Inherited from MucStanzaExt
| ``clear_muc_child`(self)` Remove the MUC specific stanza payload element.
`MucX` or `MucUserX` or `MucAdminQuery` or `MucOwnerX` | ``get_muc_child`(self)` Get the MUC specific payload element.
`MucAdminQuery` | ``make_muc_admin_quey`(self)` Create <query xmlns="...muc#admin"/> element in the stanza.
`MucUserX` | ``make_muc_userinfo`(self)` Create <x xmlns="...muc#user"/> element in the stanza.
| ``muc_free`(self)` Free MUC specific data.

Instance Variable Summary
Inherited from Stanza
`libxml2.xmlNode` | `xmlnode`: stanza XML node.

Class Variable Summary
Inherited from Iq
`str` | `stanza_type` = `'iq'`

Method Details

### __init__(self, xmlnode=None, from_jid=None, to_jid=None, stanza_type=None, stanza_id=None, error=None, error_cond=None) (Constructor) Initialize an `Iq` object. Parameters: `xmlnode` - XML node to_jid be wrapped into the `Iq` object or other Iq object to be copied. If not given then new presence stanza is created using following parameters. (type=`unicode` or `libxml2.xmlNode` or `Iq`) `from_jid` - sender JID. (type=`JID`) `to_jid` - recipient JID. (type=`JID`) `stanza_type` - staza type: one of: "get", "set", "result" or "error". (type=`unicode`) `stanza_id` - stanza id -- value of stanza's "id" attribute. If not given, then unique for the session value is generated. (type=`unicode`) `error_cond` - error condition name. Ignored if `stanza_type` is not "error". (type=`unicode`) Overrides: `pyxmpp.iq.Iq.__init__`

### copy(self) Return a copy of `self`. Overrides: `pyxmpp.iq.Iq.copy`

### free(self) Free the data associated with this `MucIq` object. Overrides: `pyxmpp.stanza.Stanza.free`

### make_kick_request(self, nick, reason) Make the iq stanza a MUC room participant kick request. Parameters: `nick` - nickname of user to kick. (type=`unicode`) `reason` - reason of the kick. (type=`unicode`) Returns: object describing the kick request details. (type=`MucItem`)