コード例 #1
0
    def _handle_stream_features(self, features):
        """Process the received stream features.

        :param features: The features stanza.
        """
        for order, name in self._stream_feature_order:
            if name in features['features']:
                handler, restart = self._stream_feature_handlers[name]
                if handler(features) and restart:
                    # Don't continue if the feature requires
                    # restarting the XML stream.
                    return True
コード例 #2
0
    def _handle_stream_features(self, features):
        """Process the received stream features.

        :param features: The features stanza.
        """
        for order, name in self._stream_feature_order:
            if name in features['features']:
                handler, restart = self._stream_feature_handlers[name]
                if handler(features) and restart:
                    # Don't continue if the feature requires
                    # restarting the XML stream.
                    return True
コード例 #3
0
ファイル: clientxmpp.py プロジェクト: h4ck3rm1k3/SleekXMPP
    def _handle_stream_features(self, features):
        """
        Process the received stream features.

        Arguments:
            features -- The features stanza.
        """
        # Record all of the features.
        self.features = []
        for sub in features.xml:
            self.features.append(sub.tag)

        # Process the features.
        for sub in features.xml:
            for feature in self.registered_features:
                mask, handler, halt = feature
                if mask.match(sub):
                    if handler(sub) and halt:
                        # Don't continue if the feature was
                        # marked as a breaker.
                        return True
コード例 #4
0
ファイル: clientxmpp.py プロジェクト: pombredanne/SleekXMPP
    def _handle_stream_features(self, features):
        """
        Process the received stream features.

        Arguments:
            features -- The features stanza.
        """
        # Record all of the features.
        self.features = []
        for sub in features.xml:
            self.features.append(sub.tag)

        # Process the features.
        for sub in features.xml:
            for feature in self.registered_features:
                mask, handler, halt = feature
                if mask.match(sub):
                    if handler(sub) and halt:
                        # Don't continue if the feature was
                        # marked as a breaker.
                        return True