Mercurial > libervia-pubsub
comparison idavoll/pubsub.py @ 9:52bd563b7a5d
Add disco support.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Thu, 01 Jul 2004 15:48:59 +0000 |
parents | a8cfb31dc50c |
children | d45e921a5d2a |
comparison
equal
deleted
inserted
replaced
8:688992a789e4 | 9:52bd563b7a5d |
---|---|
38 self.addObserver(PUBSUB_SET, self.notImplemented, -1) | 38 self.addObserver(PUBSUB_SET, self.notImplemented, -1) |
39 | 39 |
40 def componentConnected(self, xmlstream): | 40 def componentConnected(self, xmlstream): |
41 xmlstream.addObserver(PUBSUB_SET, self.onPubSub) | 41 xmlstream.addObserver(PUBSUB_SET, self.onPubSub) |
42 xmlstream.addObserver(PUBSUB_GET, self.onPubSub) | 42 xmlstream.addObserver(PUBSUB_GET, self.onPubSub) |
43 | |
44 def getIdentities(self, node): | |
45 results = [] | |
46 if not node: | |
47 results.append({ | |
48 'category': 'pubsub', | |
49 'type': 'generic', | |
50 'name': 'Generic Pubsub Service' | |
51 }) | |
52 return results | |
43 | 53 |
44 def error(self, failure, iq): | 54 def error(self, failure, iq): |
45 r = failure.trap(*error_map.keys()) | 55 r = failure.trap(*error_map.keys()) |
46 | 56 |
47 xmpp_error.error_from_iq(iq, error_map[r], failure.value.msg) | 57 xmpp_error.error_from_iq(iq, error_map[r], failure.value.msg) |