moved seesmic branch to trunk
This commit is contained in:
1
sleekxmpp/stanza/__init__.py
Normal file
1
sleekxmpp/stanza/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
__all__ = ['presence']
|
0
sleekxmpp/stanza/iq.py
Normal file
0
sleekxmpp/stanza/iq.py
Normal file
0
sleekxmpp/stanza/message.py
Normal file
0
sleekxmpp/stanza/message.py
Normal file
21
sleekxmpp/stanza/presence.py
Normal file
21
sleekxmpp/stanza/presence.py
Normal file
@@ -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},)
|
Reference in New Issue
Block a user