Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0277.py @ 1656:069abd15354f
plugin XEP-0277: checkFeatures implemented
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 23 Nov 2015 23:30:41 +0100 |
parents | b58c8b4715c6 |
children | 96ee986dab3c |
comparison
equal
deleted
inserted
replaced
1655:ad2ad28b8923 | 1656:069abd15354f |
---|---|
101 method=self._mbGetFromManyWithCommentsRTResult, async=True) | 101 method=self._mbGetFromManyWithCommentsRTResult, async=True) |
102 host.bridge.addMethod("mbGetFromManyWithComments", ".plugin", in_sign='sasiia{ss}a{ss}s', out_sign='s', | 102 host.bridge.addMethod("mbGetFromManyWithComments", ".plugin", in_sign='sasiia{ss}a{ss}s', out_sign='s', |
103 method=self._mbGetFromManyWithComments) | 103 method=self._mbGetFromManyWithComments) |
104 host.bridge.addMethod("mbGetAtom", ".plugin", in_sign='ssiasa{ss}s', out_sign='s', | 104 host.bridge.addMethod("mbGetAtom", ".plugin", in_sign='ssiasa{ss}s', out_sign='s', |
105 method=self._mbGetAtom, async=True) | 105 method=self._mbGetAtom, async=True) |
106 | |
107 def _checkFeaturesCb(self, available): | |
108 return {'available': C.BOOL_TRUE} | |
109 | |
110 def _checkFeaturesEb(self, fail): | |
111 return {'available': C.BOOL_FALSE} | |
112 | |
113 def getFeatures(self, profile): | |
114 d = self.host.checkFeatures([], identity=('pubsub', 'pep'), profile=profile) | |
115 d.addCallbacks(self._checkFeaturesCb, self._checkFeaturesEb) | |
116 return d | |
106 | 117 |
107 ## plugin management methods ## | 118 ## plugin management methods ## |
108 | 119 |
109 def _itemsReceived(self, itemsEvent, profile): | 120 def _itemsReceived(self, itemsEvent, profile): |
110 """Callback which manage items notifications (publish + retract)""" | 121 """Callback which manage items notifications (publish + retract)""" |