Tag broadcasted events with UUID and hop
[src/app-framework-binder.git] / src / afb-export.c
index a1112d2..c146f7e 100644 (file)
@@ -1178,10 +1178,20 @@ static void listener_of_events(void *closure, const char *event, int eventid, st
        json_object_put(object);
 }
 
+static void listener_of_pushed_events(void *closure, const char *event, int eventid, struct json_object *object)
+{
+       listener_of_events(closure, event, eventid, object);
+}
+
+static void listener_of_broadcasted_events(void *closure, const char *event, struct json_object *object, const uuid_binary_t uuid, uint8_t hop)
+{
+       listener_of_events(closure, event, 0, object);
+}
+
 /* the interface for events */
 static const struct afb_evt_itf evt_itf = {
-       .broadcast = listener_of_events,
-       .push = listener_of_events
+       .broadcast = listener_of_broadcasted_events,
+       .push = listener_of_pushed_events
 };
 
 /* ensure an existing listener */