Mercurial > libervia-pubsub
comparison sat_pubsub/tap.py @ 287:61f92273fb69
implementation of XEP-0355 (Namespace Delegation) to use SàT Pubsub as PEP service, first draft
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 16 Apr 2015 21:06:19 +0200 |
parents | a87c155d0fd5 |
children | a776544d84e5 |
comparison
equal
deleted
inserted
replaced
286:2f87fa282dfd | 287:61f92273fb69 |
---|---|
63 from wokkel import pubsub, rsm, mam as wokkel_mam | 63 from wokkel import pubsub, rsm, mam as wokkel_mam |
64 | 64 |
65 from sat_pubsub import __version__, const, mam | 65 from sat_pubsub import __version__, const, mam |
66 from sat_pubsub.backend import BackendService | 66 from sat_pubsub.backend import BackendService |
67 from sat_pubsub.privilege import PrivilegesHandler | 67 from sat_pubsub.privilege import PrivilegesHandler |
68 from sat_pubsub.delegation import DelegationsHandler | |
68 | 69 |
69 | 70 |
70 class Options(usage.Options): | 71 class Options(usage.Options): |
71 optParameters = [ | 72 optParameters = [ |
72 ('jid', None, 'pubsub', 'JID this component will be available at'), | 73 ('jid', None, 'pubsub', 'JID this component will be available at'), |
140 | 141 |
141 ph = PrivilegesHandler() | 142 ph = PrivilegesHandler() |
142 ph.setHandlerParent(cs) | 143 ph.setHandlerParent(cs) |
143 bs.privilege = ph | 144 bs.privilege = ph |
144 | 145 |
146 dh = DelegationsHandler() | |
147 dh.setHandlerParent(cs) | |
148 bs.delegation = dh | |
149 | |
145 resource = IPubSubResource(bs) | 150 resource = IPubSubResource(bs) |
146 resource.hideNodes = config["hide-nodes"] | 151 resource.hideNodes = config["hide-nodes"] |
147 resource.serviceJID = config["jid"] | 152 resource.serviceJID = config["jid"] |
148 | 153 |
149 ps = (rsm if const.FLAG_ENABLE_RSM else pubsub).PubSubService(resource) | 154 ps = (rsm if const.FLAG_ENABLE_RSM else pubsub).PubSubService(resource) |