comparison src/plugins/plugin_exp_pubsub_hook.py @ 2444:30278ea1ca7c

plugin XEP-0060: added node watching methods to bridge: new methods psNodeWatchAdd and psNodeWatchRemove allows to set a watch for the time of the session on one node, to have a signal called when something change on this node. This signal (psEventRaw) send raw data (raw XML), in opposition to psEvent which is there to send high level data (e.g. parsed blog data). Those method are primarely there to let frontends manage local cache for pubsub nodes.
author Goffi <goffi@goffi.org>
date Sun, 19 Nov 2017 16:51:39 +0100
parents 8fa7edd0da24
children 0046283a285d
comparison
equal deleted inserted replaced
2443:81a45e7886c9 2444:30278ea1ca7c
177 - HOOK_TYPE_PYTHON: a python module (must be in path) 177 - HOOK_TYPE_PYTHON: a python module (must be in path)
178 module must have a "hook" method which will be called 178 module must have a "hook" method which will be called
179 - HOOK_TYPE_PYTHON_FILE: a python file 179 - HOOK_TYPE_PYTHON_FILE: a python file
180 file must have a "hook" method which will be called 180 file must have a "hook" method which will be called
181 - HOOK_TYPE_PYTHON_CODE: direct python code 181 - HOOK_TYPE_PYTHON_CODE: direct python code
182 /!\ Python hooks will be executed in SàT context, 182 /!\ Python hooks will be executed in SàT context,
183 with host, client and item as arguments, it means that: 183 with host, client and item as arguments, it means that:
184 - they can do whatever they wants, so don't run untrusted hooks 184 - they can do whatever they wants, so don't run untrusted hooks
185 - they MUST NOT BLOCK, they are run in Twisted async environment and blocking would block whole SàT process 185 - they MUST NOT BLOCK, they are run in Twisted async environment and blocking would block whole SàT process
186 - item are domish.Element 186 - item are domish.Element
187 @param hook_arg(unicode): argument of the hook, depending on the hook_type 187 @param hook_arg(unicode): argument of the hook, depending on the hook_type