summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-07-19 04:02:28 -0400
committerLance Stout <lancestout@gmail.com>2010-07-19 04:02:28 -0400
commit1ef112966bd591e5cd075cb2287724c7ae4bc05e (patch)
tree77f3c28b164d7c17af114797ad6598f38c6772d7 /sleekxmpp
parent35212c7991312b26e813afde3bf0bbe002058c11 (diff)
parent078c71ed3fd550812461795149f6ffca35397871 (diff)
downloadslixmpp-1ef112966bd591e5cd075cb2287724c7ae4bc05e.tar.gz
slixmpp-1ef112966bd591e5cd075cb2287724c7ae4bc05e.tar.bz2
slixmpp-1ef112966bd591e5cd075cb2287724c7ae4bc05e.tar.xz
slixmpp-1ef112966bd591e5cd075cb2287724c7ae4bc05e.zip
Merge branch 'develop' of git://github.com/fritzy/SleekXMPP into develop
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/__init__.py8
-rw-r--r--sleekxmpp/stanza/atom.py11
2 files changed, 18 insertions, 1 deletions
diff --git a/sleekxmpp/__init__.py b/sleekxmpp/__init__.py
index ccb43522..df0af09c 100644
--- a/sleekxmpp/__init__.py
+++ b/sleekxmpp/__init__.py
@@ -146,10 +146,16 @@ class ClientXMPP(basexmpp, XMLStream):
def updateRoster(self, jid, name=None, subscription=None, groups=[]):
"""Add or change a roster item."""
iq = self.Iq().setValues({'type': 'set'})
- iq['roster'] = {jid: {'name': name, 'subscription': subscription, 'groups': groups}}
+ iq['roster']['items'] = {jid: {'name': name, 'subscription': subscription, 'groups': groups}}
#self.send(iq, self.Iq().setValues({'id': iq['id']}))
r = iq.send()
return r['type'] == 'result'
+
+ def delRosterItem(self, jid):
+ iq = self.Iq()
+ iq['type'] = 'set'
+ iq['roster']['items'] = {jid: {'subscription': 'remove'}}
+ return iq.send()['type'] == 'result'
def getRoster(self):
"""Request the roster be sent."""
diff --git a/sleekxmpp/stanza/atom.py b/sleekxmpp/stanza/atom.py
new file mode 100644
index 00000000..5e82cb98
--- /dev/null
+++ b/sleekxmpp/stanza/atom.py
@@ -0,0 +1,11 @@
+from .. xmlstream.stanzabase import ElementBase, ET, JID
+from xml.etree import cElementTree as ET
+
+class AtomEntry(ElementBase):
+ namespace = 'http://www.w3.org/2005/Atom'
+ name = 'entry'
+ plugin_attrib = 'entry'
+ interfaces = set(('title', 'summary'))
+ sub_interfaces = set(('title', 'summary'))
+ plugin_attrib_map = {}
+ plugin_tag_map = {}