summaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/source.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-11-23 10:00:09 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2018-11-23 10:00:56 +0100
commit74c0e1f8e2a6dbc5b7485c3b06e12d4ad7f43c6b (patch)
treed518d880d94d7df189ad1a34093dc8ad348691ba /signal-composer-binding/source.hpp
parente1ef945da61ae0dfec7a5c8d1e9cde2716c0c1fd (diff)
Use specific binder's event handlersguppy_6.99.2guppy/6.99.26.99.2
Use specific binder's event handlers which allows you to bind a callback with an incoming event based on a pattern matching. This replace the global event listener and internal callback search algorythm which is now delegated to the binder. Clean unused constructor Bug-AGL: SPEC-1968 Change-Id: I4b22c003661189fb71498efc4d9021c1a54ae866 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'signal-composer-binding/source.hpp')
-rw-r--r--signal-composer-binding/source.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/signal-composer-binding/source.hpp b/signal-composer-binding/source.hpp
index b4f1348..bc28b54 100644
--- a/signal-composer-binding/source.hpp
+++ b/signal-composer-binding/source.hpp
@@ -46,6 +46,9 @@ public:
void init();
std::string api() const;
+
+ static void onSourceEvents(void *closure, const char *event_name, json_object *event_obj, AFB_ApiT api);
+ static void onSignalEvents(void *closure, const char *event_name, json_object *event_obj, AFB_ApiT api);
const struct signalsDefault& signalsDefault() const;
void addSignal(const std::string& id, const std::string& event, std::vector<std::string>& sources, int retention, const std::string& unit, json_object *metadata, double frequency, CtlActionT* onReceived, json_object* getSignalsArgs);