コード例 #1
0
ファイル: presence.py プロジェクト: pombredanne/SleekXMPP
    def setup(self, xml=None):
        """
        Populate the stanza object using an optional XML object.

        Overrides ElementBase.setup.

        Arguments:
            xml -- Use an existing XML object for the stanza's values.
        """
        # To comply with PEP8, method names now use underscores.
        # Deprecated method names are re-mapped for backwards compatibility.
        self.setShow = self.set_show
        self.getType = self.get_type
        self.setType = self.set_type
        self.delType = self.get_type
        self.getPriority = self.get_priority
        self.setPriority = self.set_priority

        return StanzaBase.setup(self, xml)
コード例 #2
0
    def setup(self, xml=None):
        """
        Populate the stanza object using an optional XML object.

        Overrides ElementBase.setup.

        Arguments:
            xml -- Use an existing XML object for the stanza's values.
        """
        # To comply with PEP8, method names now use underscores.
        # Deprecated method names are re-mapped for backwards compatibility.
        self.setShow = self.set_show
        self.getType = self.get_type
        self.setType = self.set_type
        self.delType = self.get_type
        self.getPriority = self.get_priority
        self.setPriority = self.set_priority

        return StanzaBase.setup(self, xml)
コード例 #3
0
ファイル: message.py プロジェクト: pombredanne/SleekXMPP
    def setup(self, xml=None):
        """
        Populate the stanza object using an optional XML object.

        Overrides StanzaBase.setup.

        Arguments:
            xml -- Use an existing XML object for the stanza's values.
        """
        # To comply with PEP8, method names now use underscores.
        # Deprecated method names are re-mapped for backwards compatibility.
        self.getType = self.get_type
        self.getMucroom = self.get_mucroom
        self.setMucroom = self.set_mucroom
        self.delMucroom = self.del_mucroom
        self.getMucnick = self.get_mucnick
        self.setMucnick = self.set_mucnick
        self.delMucnick = self.del_mucnick

        return StanzaBase.setup(self, xml)
コード例 #4
0
ファイル: failure.py プロジェクト: E-Tahta/sleekxmpp
    def setup(self, xml=None):
        """
        Populate the stanza object using an optional XML object.

        Overrides ElementBase.setup.

        Sets a default error type and condition, and changes the
        parent stanza's type to 'error'.

        Arguments:
            xml -- Use an existing XML object for the stanza's values.
        """
        # StanzaBase overrides self.namespace
        self.namespace = Failure.namespace

        if StanzaBase.setup(self, xml):
            #If we had to generate XML then set default values.
            self['condition'] = 'not-authorized'

        self.xml.tag = self.tag_name()
コード例 #5
0
ファイル: stream_features.py プロジェクト: 2M1R/SleekXMPP
 def setup(self, xml):
     StanzaBase.setup(self, xml)
     self.values = self.values
コード例 #6
0
ファイル: response.py プロジェクト: 2M1R/SleekXMPP
 def setup(self, xml):
     StanzaBase.setup(self, xml)
     self.xml.tag = self.tag_name()
コード例 #7
0
ファイル: stream_features.py プロジェクト: taoGit/SleekXMPP
 def setup(self, xml):
     StanzaBase.setup(self, xml)
     self.values = self.values
コード例 #8
0
ファイル: stanza.py プロジェクト: E-Tahta/sleekxmpp
 def setup(self, xml):
     StanzaBase.setup(self, xml)
     self.xml.tag = self.tag_name()