diff options
author | Nathan Fritz <fritzy@netflint.net> | 2009-06-03 22:56:51 +0000 |
---|---|---|
committer | Nathan Fritz <fritzy@netflint.net> | 2009-06-03 22:56:51 +0000 |
commit | 96b103b27599e5af247c1e3b95d62c80c1e32a63 (patch) | |
tree | 0527b1607b16adb020759ee9a944e1b22e3e0e6b /sleekxmpp/stanza | |
download | slixmpp-96b103b27599e5af247c1e3b95d62c80c1e32a63.tar.gz slixmpp-96b103b27599e5af247c1e3b95d62c80c1e32a63.tar.bz2 slixmpp-96b103b27599e5af247c1e3b95d62c80c1e32a63.tar.xz slixmpp-96b103b27599e5af247c1e3b95d62c80c1e32a63.zip |
moved seesmic branch to trunk
Diffstat (limited to 'sleekxmpp/stanza')
-rw-r--r-- | sleekxmpp/stanza/__init__.py | 1 | ||||
-rw-r--r-- | sleekxmpp/stanza/iq.py | 0 | ||||
-rw-r--r-- | sleekxmpp/stanza/message.py | 0 | ||||
-rw-r--r-- | sleekxmpp/stanza/presence.py | 21 |
4 files changed, 22 insertions, 0 deletions
diff --git a/sleekxmpp/stanza/__init__.py b/sleekxmpp/stanza/__init__.py new file mode 100644 index 00000000..765748ca --- /dev/null +++ b/sleekxmpp/stanza/__init__.py @@ -0,0 +1 @@ +__all__ = ['presence'] diff --git a/sleekxmpp/stanza/iq.py b/sleekxmpp/stanza/iq.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/sleekxmpp/stanza/iq.py diff --git a/sleekxmpp/stanza/message.py b/sleekxmpp/stanza/message.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/sleekxmpp/stanza/message.py diff --git a/sleekxmpp/stanza/presence.py b/sleekxmpp/stanza/presence.py new file mode 100644 index 00000000..0733e9a9 --- /dev/null +++ b/sleekxmpp/stanza/presence.py @@ -0,0 +1,21 @@ +from .. xmlstream.stanzabase import StanzaBase +from .. xmlstream import xmlstream as xmlstreammod +from .. xmlstream.matcher.xpath import MatchXPath + +#_bases = [StanzaBase] + xmlstreammod.stanza_extensions.get('PresenceStanza', []) + +#class PresenceStanza(*_bases): +class PresenceStanza(StanzaBase): + + def __init__(self, stream, xml=None): + self.pfrom = '' + self.pto = '' + StanzaBase.__init__(self, stream, xml, xmlstreammod.stanza_extensions.get('PresenceStanza', [])) + + def fromXML(self, xml): + StanzaBase.fromXML(self, xml) + self.pfrom = xml.get('from') + self.pto = xml.get('to') + self.ptype = xml.get('type') + +stanzas = ({'stanza_class': PresenceStanza, 'matcher': MatchXPath('{jabber:client}presence'), 'root': True},) |