diff options
author | Lance Stout <lancestout@gmail.com> | 2011-08-29 21:38:41 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2011-08-29 21:38:41 -0700 |
commit | 850e3bb99bc2e403e62bef758f451c12af53f4e4 (patch) | |
tree | d55f7b38d40ddb0bbe4b9f93f4132f79859083ab /sleekxmpp/plugins/xep_0060/pubsub.py | |
parent | 2d90deb96a86af6d8365994caa26a1ec1474a065 (diff) | |
download | slixmpp-850e3bb99bc2e403e62bef758f451c12af53f4e4.tar.gz slixmpp-850e3bb99bc2e403e62bef758f451c12af53f4e4.tar.bz2 slixmpp-850e3bb99bc2e403e62bef758f451c12af53f4e4.tar.xz slixmpp-850e3bb99bc2e403e62bef758f451c12af53f4e4.zip |
Stub out missing functionality for pubsub
Diffstat (limited to 'sleekxmpp/plugins/xep_0060/pubsub.py')
-rw-r--r-- | sleekxmpp/plugins/xep_0060/pubsub.py | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/sleekxmpp/plugins/xep_0060/pubsub.py b/sleekxmpp/plugins/xep_0060/pubsub.py index e1107325..a4913c06 100644 --- a/sleekxmpp/plugins/xep_0060/pubsub.py +++ b/sleekxmpp/plugins/xep_0060/pubsub.py @@ -78,8 +78,8 @@ class xep_0060(base_plugin): return iq.send(block=block, callback=callback, timeout=timeout) - def subscribe(self, jid, node, bare=True, subscribee=None, ifrom=None, - block=True, callback=None, timeout=None): + def subscribe(self, jid, node, bare=True, subscribee=None, options=None, + ifrom=None, block=True, callback=None, timeout=None): """ Subscribe to updates from a pubsub node. @@ -94,6 +94,7 @@ class xep_0060(base_plugin): bare -- Indicates if the subscribee is a bare or full JID. Defaults to True for a bare JID. subscribee -- The JID that is subscribing to the node. + options -- ifrom -- Specify the sender's JID. block -- Specify if the send call will block until a response is received, or a timeout occurs. Defaults to True. @@ -168,6 +169,12 @@ class xep_0060(base_plugin): iq['pubsub']['unsubscribe']['subid'] = subid return iq.send(block=block, callback=callback, timeout=timeout) + def get_subscription_options(self): + pass + + def set_subscription_options(self): + pass + def get_node_config(self, jid, node=None, ifrom=None, block=None, callback=None, timeout=None): """ @@ -288,13 +295,17 @@ class xep_0060(base_plugin): iq['pubsub']['retract'].append(item) return iq.send(block=block, callback=callback, timeout=timeout) - def get_nodes(self, jid, ifrom=None, block=True, - callback=None, timeout=None, iterator=False): - return self.xmpp.plugin['xep_0030'].get_items(jid, ifrom=ifrom, - block=block, - callback=callback, - timeout=timeout, - iterator=iterator) + def purge(self, jid, node, ifrom=None, block=True, callback=None, + timeout=None): + iq = self.xmpp.Iq(sto=jid, sfrom=ifrom, stype='set') + iq['pubsub']['purge']['node'] = node + return iq.send(block=block, callback=callback, timeout=timeout) + + def get_nodes(self, *args, **kwargs): + return self.xmpp.plugin['xep_0040'].get_items(*args, **kwargs) + + def get_item(self): + pass def get_items(self, jid, node, ifrom=None, block=True, callback=None, timeout=None, iterator=False): @@ -318,3 +329,9 @@ class xep_0060(base_plugin): aff['affiliation'] = affiliation iq['pubsub_owner']['affiliations'].append(aff) return iq.send(block=block, callback=callback, timeout=timeout) + + def modify_subscription(self): + pass + + def purge(self): + pass |