pyxmpp.jabber.muc.MucRoomManager

Package pyxmpp :: Package jabber :: Module muc :: Class MucRoomManager |
[show private | hide private]
[frames | no frames]

## Class MucRoomManager

Manage collection of MucRoomState objects and dispatch events.

Method Summary
| ``__init__`(self, stream)` Initialize a `MucRoomManager` object.
| ``forget`(self, rs)` Remove a room from the list of managed rooms.
`MucRoomState` | ``get_room_state`(self, room)` Get the room state object of a room.
`MucRoomState` | ``join`(self, room, nick, handler, password, history_maxchars, history_maxstanzas, history_seconds, history_since)` Create and return a new room state object and request joining to a MUC room.
| ``set_handlers`(self, priority)` Assign MUC stanza handlers to the `self.stream`.
| ``set_stream`(self, stream)` Change the stream assigned to `self`.

Instance Variable Summary
| `rooms`: a dictionary containing known MUC rooms.
| `stream`: the stream associated with the room manager.

Method Details

### __init__(self, stream) (Constructor) Initialize a `MucRoomManager` object. Parameters: `stream` - a stream to be initially assigned to `self`. (type=`pyxmpp.stream.Stream`)

### forget(self, rs) Remove a room from the list of managed rooms. Parameters: `rs` - the state object of the room. (type=`MucRoomState`)

### get_room_state(self, room) Get the room state object of a room. Parameters: `room` - JID or the room which state is requested. (type=`JID`) Returns: the state object. (type=`MucRoomState`)

### join(self, room, nick, handler, password=None, history_maxchars=None, history_maxstanzas=None, history_seconds=None, history_since=None) Create and return a new room state object and request joining to a MUC room. Parameters: `room` - the name of a room to be joined (type=`JID`) `nick` - the nickname to be used in the room (type=`unicode`) `handler` - is an object to handle room events. (type=`MucRoomHandler`) `password` - password for the room, if any (type=`unicode`) `history_maxchars` - limit of the total number of characters in history. (type=`int`) `history_maxstanzas` - limit of the total number of messages in history. (type=`int`) `history_seconds` - send only messages received in the last `history_seconds` seconds. (type=`int`) `history_since` - Send only the messages received since the dateTime specified (UTC). (type=`datetime.datetime`) Returns: the room state object created. (type=`MucRoomState`)

### set_handlers(self, priority=10) Assign MUC stanza handlers to the `self.stream`. Parameters: `priority` - priority for the handlers. (type=`int`)

### set_stream(self, stream) Change the stream assigned to `self`. Parameters: `stream` - the new stream to be assigned to `self`. (type=`pyxmpp.stream.Stream`)

Instance Variable Details

### rooms a dictionary containing known MUC rooms. Unicode room JIDs are the keys.

### stream the stream associated with the room manager.