diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-07-17 14:19:04 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-07-17 14:19:04 +0200 |
commit | 5ab77c745270d7d5c016c1dc7ef2a82533a4b16e (patch) | |
tree | 259377cc666f8b9c7954fc4e7b8f7a912bcfe101 /sleekxmpp/plugins/google/nosave/stanza.py | |
parent | e5582694c07236e6830c20361840360a1dde37f3 (diff) | |
download | slixmpp-5ab77c745270d7d5c016c1dc7ef2a82533a4b16e.tar.gz slixmpp-5ab77c745270d7d5c016c1dc7ef2a82533a4b16e.tar.bz2 slixmpp-5ab77c745270d7d5c016c1dc7ef2a82533a4b16e.tar.xz slixmpp-5ab77c745270d7d5c016c1dc7ef2a82533a4b16e.zip |
Rename to slixmpp
Diffstat (limited to 'sleekxmpp/plugins/google/nosave/stanza.py')
-rw-r--r-- | sleekxmpp/plugins/google/nosave/stanza.py | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/sleekxmpp/plugins/google/nosave/stanza.py b/sleekxmpp/plugins/google/nosave/stanza.py deleted file mode 100644 index d8701322..00000000 --- a/sleekxmpp/plugins/google/nosave/stanza.py +++ /dev/null @@ -1,59 +0,0 @@ -""" - SleekXMPP: The Sleek XMPP Library - Copyright (C) 2013 Nathanael C. Fritz, Lance J.T. Stout - This file is part of SleekXMPP. - - See the file LICENSE for copying permission. -""" - -from sleekxmpp.jid import JID -from sleekxmpp.xmlstream import ElementBase, register_stanza_plugin - - -class NoSave(ElementBase): - name = 'x' - namespace = 'google:nosave' - plugin_attrib = 'google_nosave' - interfaces = set(['value']) - - def get_value(self): - return self._get_attr('value', '') == 'enabled' - - def set_value(self, value): - self._set_attr('value', 'enabled' if value else 'disabled') - - -class NoSaveQuery(ElementBase): - name = 'query' - namespace = 'google:nosave' - plugin_attrib = 'google_nosave' - interfaces = set() - - -class Item(ElementBase): - name = 'item' - namespace = 'google:nosave' - plugin_attrib = 'item' - plugin_multi_attrib = 'items' - interfaces = set(['jid', 'source', 'value']) - - def get_value(self): - return self._get_attr('value', '') == 'enabled' - - def set_value(self, value): - self._set_attr('value', 'enabled' if value else 'disabled') - - def get_jid(self): - return JID(self._get_attr('jid', '')) - - def set_jid(self, value): - self._set_attr('jid', str(value)) - - def get_source(self): - return JID(self._get_attr('source', '')) - - def set_source(self): - self._set_attr('source', str(value)) - - -register_stanza_plugin(NoSaveQuery, Item) |