started work on pubsub#event stanzas

This commit is contained in:
Nathan Fritz 2010-04-20 00:53:13 -07:00
parent 212660091f
commit 2a30e3fe0c

View file

@ -1,5 +1,6 @@
from .. xmlstream.stanzabase import ElementBase, ET, JID from .. xmlstream.stanzabase import ElementBase, ET, JID
from .. stanza.iq import Iq from .. stanza.iq import Iq
from .. stanza.message import Message
from .. basexmpp import basexmpp from .. basexmpp import basexmpp
from .. xmlstream.xmlstream import XMLStream from .. xmlstream.xmlstream import XMLStream
import logging import logging
@ -463,3 +464,33 @@ class OwnerSubscription(ElementBase):
def getJid(self): def getJid(self):
return JID(self._getAttr('from')) return JID(self._getAttr('from'))
class Event(ElementBase):
namespace = 'http://jabber.org/protocol/pubsub#event'
name = 'event'
plugin_attrib = 'pubsub_event'
interfaces = set(('node',))
plugin_attrib_map = {}
plugin_tag_map = {}
stanzaPlugin(Message, Event)
class EventItems(ElementBase):
namespace = 'http://jabber.org/protocol/pubsub#event'
name = 'items'
plugin_attrib = 'items'
interfaces = set(tuple())
plugin_attrib_map = {}
plugin_tag_map = {}
stanzaPlugin(Event, EventItems)
class EventItem(ElementBase):
namespace = 'http://jabber.org/protocol/pubsub#event'
name = 'item'
plugin_attrib = 'item'
interfaces = set(tuple())
plugin_attrib_map = {}
plugin_tag_map = {}
stanzaPlugin(Event, EventItems)