Ejemplo n.º 1
0
class MUCData:
    def __init__(self, room_jid, nick, password, rejoin, config=None):
        self._room_jid = JID(room_jid)
        self._nick = nick
        self._password = password
        self._rejoin = rejoin
        self._config = config
        self._state = MUCJoinedState.NOT_JOINED

    @property
    def jid(self):
        return self._room_jid

    @property
    def occupant_jid(self):
        jid = self._room_jid.copy()
        jid.setResource(self._nick)
        return jid

    @property
    def nick(self):
        return self._nick

    @nick.setter
    def nick(self, value):
        self._nick = value

    @property
    def password(self):
        return self._password

    @property
    def state(self):
        return self._state

    @state.setter
    def state(self, value):
        self._state = value

    @property
    def rejoin(self):
        return self._rejoin

    @rejoin.setter
    def rejoin(self, value):
        self._rejoin = value

    @property
    def config(self):
        return self._config
Ejemplo n.º 2
0
class MUCData:
    def __init__(self, room_jid, nick, password, config=None):
        self._room_jid = JID(room_jid)
        self._config = config
        self.nick = nick
        self.password = password
        self.state = MUCJoinedState.NOT_JOINED
        # Message id of the captcha challenge
        self.captcha_id = None

    @property
    def jid(self):
        return self._room_jid

    @property
    def occupant_jid(self):
        jid = self._room_jid.copy()
        jid.setResource(self.nick)
        return jid

    @property
    def config(self):
        return self._config