summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2017-10-23 18:26:46 +0900
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-11-01 11:02:10 +0000
commitbe02238a0e92c74a13daaf516b5f379f29217eb8 (patch)
tree15e1b814a50a9f4833a318a1ba55b8d029f81b8b /src/main.cpp
parentac5b834e535b95d2b893dbe527b2a7a9b6e2103d (diff)
Modify event notification from broadcast to subscribe model
The event notification was implemented using a broadcast model, change it to a subscription model. Bug-AGL: SPEC-987 Change-Id: I344a3a73320eb81c3f670736b032f07400bb8f64 Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/main.cpp')
-rwxr-xr-xsrc/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index f33b20e..c90eeb1 100755
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -167,22 +167,22 @@ void binding_api::send_event(char const *evname, char const *label) {
json_object *j = json_object_new_object();
json_object_object_add(j, kKeyDrawingName, json_object_new_string(label));
- int ret = afb_daemon_broadcast_event(evname, j);
+ int ret = afb_event_push(g_afb_instance->app.map_afb_event[evname], j);
if (ret != 0) {
- logdebug("afb_event_broadcast failed: %m");
+ logdebug("afb_event_push failed: %m");
}
}
void binding_api::send_event(char const *evname, char const *label, char const *area) {
- logdebug("%s: %s(%s, %s)", __func__, evname, label, area);
+ logdebug("%s: %s(%s, %s)", __func__, evname, label, area);
json_object *j = json_object_new_object();
json_object_object_add(j, kKeyDrawingName, json_object_new_string(label));
json_object_object_add(j, kKeyDrawingArea, json_object_new_string(area));
- int ret = afb_daemon_broadcast_event(evname, j);
+ int ret = afb_event_push(g_afb_instance->app.map_afb_event[evname], j);
if (ret != 0) {
- logdebug("afb_event_broadcast failed: %m");
+ logdebug("afb_event_push failed: %m");
}
}
} // namespace wm