comparison src/tmp/wokkel/pubsub.py @ 1677:a125b11af711

tmp (wokkel.pubsub): implemented missing notifyRetract
author Goffi <goffi@goffi.org>
date Wed, 25 Nov 2015 15:35:21 +0100
parents 91631837ce5c
children b77dc676a4df
comparison
equal deleted inserted replaced
1676:a0810e0f386e 1677:a125b11af711
1467 item.uri = NS_PUBSUB_EVENT 1467 item.uri = NS_PUBSUB_EVENT
1468 message.event.items.addChild(item) 1468 message.event.items.addChild(item)
1469 self.send(message) 1469 self.send(message)
1470 1470
1471 1471
1472 def notifyRetract(self, service, nodeIdentifier, notifications):
1473 for subscriber, subscriptions, items in notifications:
1474 message = self._createNotification('items', service,
1475 nodeIdentifier, subscriber,
1476 subscriptions)
1477 for item in items:
1478 retract = domish.Element((None, "retract"))
1479 retract['id'] = item['id']
1480 message.event.items.addChild(retract)
1481 self.send(message)
1482
1483
1472 def notifyDelete(self, service, nodeIdentifier, subscribers, 1484 def notifyDelete(self, service, nodeIdentifier, subscribers,
1473 redirectURI=None): 1485 redirectURI=None):
1474 for subscriber in subscribers: 1486 for subscriber in subscribers:
1475 message = self._createNotification('delete', service, 1487 message = self._createNotification('delete', service,
1476 nodeIdentifier, 1488 nodeIdentifier,