コード例 #1
0
ファイル: stream.py プロジェクト: kgodlewski/xmpp-to-tlen
    def _uplink_element(self, element):
        # logger.debug('uplink %s', element)
        # The element processing might be deferred
        if element is None:
            return

        element = self._add_namespaces(element)
        self.uplink.send(stanza_factory(element))
コード例 #2
0
ファイル: stanzaprocessor.py プロジェクト: zeeying/pyxmpp2
 def test_presence(self):
     element = ElementTree.XML(PRESENCE1)
     stanza = stanza_factory(element)
     self.assertTrue(isinstance(stanza, Presence))
コード例 #3
0
ファイル: stanzaprocessor.py プロジェクト: zeeying/pyxmpp2
 def test_message(self):
     element = ElementTree.XML(MESSAGE1)
     stanza = stanza_factory(element)
     self.assertTrue(isinstance(stanza, Message))
コード例 #4
0
ファイル: stanzaprocessor.py プロジェクト: zeeying/pyxmpp2
 def test_iq(self):
     element = ElementTree.XML(IQ1)
     stanza = stanza_factory(element)
     self.assertTrue(isinstance(stanza, Iq))
コード例 #5
0
ファイル: stanzaprocessor.py プロジェクト: zeeying/pyxmpp2
 def process_stanzas(self, xml_elements):
     for xml in xml_elements:
         stanza = stanza_factory(ElementTree.XML(xml))
         self.proc.process_stanza(stanza)
コード例 #6
0
ファイル: stanzaprocessor.py プロジェクト: DanyPlay/pyxmpp2
 def test_presence(self):
     element = ElementTree.XML(PRESENCE1)
     stanza = stanza_factory(element)
     self.assertTrue( isinstance(stanza, Presence) )
コード例 #7
0
ファイル: stanzaprocessor.py プロジェクト: DanyPlay/pyxmpp2
 def test_message(self):
     element = ElementTree.XML(MESSAGE1)
     stanza = stanza_factory(element)
     self.assertTrue( isinstance(stanza, Message) )
コード例 #8
0
ファイル: stanzaprocessor.py プロジェクト: DanyPlay/pyxmpp2
 def test_iq(self):
     element = ElementTree.XML(IQ1)
     stanza = stanza_factory(element)
     self.assertTrue( isinstance(stanza, Iq) )
コード例 #9
0
ファイル: stanzaprocessor.py プロジェクト: DanyPlay/pyxmpp2
 def process_stanzas(self, xml_elements):
     for xml in xml_elements:
         stanza = stanza_factory(ElementTree.XML(xml))
         self.proc.process_stanza(stanza)