summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0323/stanza
diff options
context:
space:
mode:
authorJoachim Lindborg <Joachim.Lindborg@lsys.se>2013-05-17 12:18:00 +0200
committerJoachim Lindborg <Joachim.Lindborg@lsys.se>2013-05-17 12:18:00 +0200
commitb7adaafb3ecb0a615c93fbb1830e66357b081fe3 (patch)
treed542dbb5263e6b5f21714916bd6b0061e3435842 /sleekxmpp/plugins/xep_0323/stanza
parent0a2737dc77709daa0196340368b7ffbfaf71f641 (diff)
downloadslixmpp-b7adaafb3ecb0a615c93fbb1830e66357b081fe3.tar.gz
slixmpp-b7adaafb3ecb0a615c93fbb1830e66357b081fe3.tar.bz2
slixmpp-b7adaafb3ecb0a615c93fbb1830e66357b081fe3.tar.xz
slixmpp-b7adaafb3ecb0a615c93fbb1830e66357b081fe3.zip
First test stanza
Diffstat (limited to 'sleekxmpp/plugins/xep_0323/stanza')
l---------sleekxmpp/plugins/xep_0323/stanza/.#sensordata.py1
-rw-r--r--sleekxmpp/plugins/xep_0323/stanza/__init__.py12
-rw-r--r--sleekxmpp/plugins/xep_0323/stanza/base.py12
-rw-r--r--sleekxmpp/plugins/xep_0323/stanza/sensordata.py64
4 files changed, 89 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0323/stanza/.#sensordata.py b/sleekxmpp/plugins/xep_0323/stanza/.#sensordata.py
new file mode 120000
index 00000000..c6761e8f
--- /dev/null
+++ b/sleekxmpp/plugins/xep_0323/stanza/.#sensordata.py
@@ -0,0 +1 @@
+jocke@Joachim-Lindborg.local.29709 \ No newline at end of file
diff --git a/sleekxmpp/plugins/xep_0323/stanza/__init__.py b/sleekxmpp/plugins/xep_0323/stanza/__init__.py
new file mode 100644
index 00000000..82dc9eea
--- /dev/null
+++ b/sleekxmpp/plugins/xep_0323/stanza/__init__.py
@@ -0,0 +1,12 @@
+"""
+ SleekXMPP: The Sleek XMPP Library
+ Implementation of xeps for Internet of Things
+ http://wiki.xmpp.org/web/Tech_pages/IoT_systems
+ Copyright (C) 2013 Joachim Lindborg, Joachim.lindborg@lsys.se
+ This file is part of SleekXMPP.
+
+ See the file LICENSE for copying permission.
+"""
+
+from sleekxmpp.plugins.xep_0323.stanza.sensordata import *
+
diff --git a/sleekxmpp/plugins/xep_0323/stanza/base.py b/sleekxmpp/plugins/xep_0323/stanza/base.py
new file mode 100644
index 00000000..4caf07b2
--- /dev/null
+++ b/sleekxmpp/plugins/xep_0323/stanza/base.py
@@ -0,0 +1,12 @@
+"""
+ SleekXMPP: The Sleek XMPP Library
+
+ Implementation of xeps for Internet of Things
+ http://wiki.xmpp.org/web/Tech_pages/IoT_systems
+ Copyright (C) 2013 Joachim Lindborg, Joachim.lindborg@lsys.se
+ See the file LICENSE for copying permission.
+"""
+
+from sleekxmpp.xmlstream import ET
+
+pass
diff --git a/sleekxmpp/plugins/xep_0323/stanza/sensordata.py b/sleekxmpp/plugins/xep_0323/stanza/sensordata.py
new file mode 100644
index 00000000..9567ef87
--- /dev/null
+++ b/sleekxmpp/plugins/xep_0323/stanza/sensordata.py
@@ -0,0 +1,64 @@
+"""
+ SleekXMPP: The Sleek XMPP Library
+ Implementation of xeps for Internet of Things
+ http://wiki.xmpp.org/web/Tech_pages/IoT_systems
+ Copyright (C) 2013 Joachim Lindborg, Joachim.lindborg@lsys.se
+ This file is part of SleekXMPP.
+
+ See the file LICENSE for copying permission.
+"""
+
+from sleekxmpp import Iq, Message
+from sleekxmpp.xmlstream import register_stanza_plugin, ElementBase, ET, JID
+
+
+class Sensordata(ElementBase):
+ namespace = 'http://xmpp.org/iot/sensordata'
+ name = 'sensordata'
+ plugin_attrib = name
+ interfaces = set(tuple())
+
+class Request(ElementBase):
+ namespace = 'http://xmpp.org/iot/sensordata'
+ name = 'req'
+ plugin_attrib = name
+ interfaces = set(('seqnr','momentary'))
+
+
+class Accepted(ElementBase):
+ namespace = 'http://xmpp.org/iot/sensordata'
+ name = 'accepted'
+ plugin_attrib = name
+ interfaces = set(('seqnr'))
+
+
+class Failure(ElementBase):
+ namespace = 'http://xmpp.org/iot/sensordata'
+ name = 'failure'
+ plugin_attrib = name
+ interfaces = set(('seqnr','done'))
+
+
+
+register_stanza_plugin(Iq, Sensordata)
+register_stanza_plugin(Sensordata, Request)
+register_stanza_plugin(Sensordata, Accepted)
+register_stanza_plugin(Sensordata, Failure)
+# register_stanza_plugin(Pubsub, Default)
+# register_stanza_plugin(Pubsub, Items)
+# register_stanza_plugin(Pubsub, Options)
+# register_stanza_plugin(Pubsub, Publish)
+# register_stanza_plugin(Pubsub, PublishOptions)
+# register_stanza_plugin(Pubsub, Retract)
+# register_stanza_plugin(Pubsub, Subscribe)
+# register_stanza_plugin(Pubsub, Subscription)
+# register_stanza_plugin(Pubsub, Subscriptions)
+# register_stanza_plugin(Pubsub, Unsubscribe)
+# register_stanza_plugin(Affiliations, Affiliation, iterable=True)
+# register_stanza_plugin(Configure, xep_0004.Form)
+# register_stanza_plugin(Items, Item, iterable=True)
+# register_stanza_plugin(Publish, Item, iterable=True)
+# register_stanza_plugin(Retract, Item)
+# register_stanza_plugin(Subscribe, Options)
+# register_stanza_plugin(Subscription, SubscribeOptions)
+# register_stanza_plugin(Subscriptions, Subscription, iterable=True)