summaryrefslogtreecommitdiffstats
path: root/plugins/afm-main-plugin/utils-jbus.h
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-03-16 22:14:40 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2016-03-17 11:36:44 +0100
commitc2560bd51498fb38e645b60ae638e2e888c74b65 (patch)
tree57b941bd3835e8ef1e5bcf5ed5ccef0316149ae4 /plugins/afm-main-plugin/utils-jbus.h
parent1309721790b7b2aeb29658b8907c99fcaabf85a5 (diff)
afm-main-plugin: update utils-jbus
Change-Id: I0c433bdd1136d4150e612468aab91dfcda383633 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'plugins/afm-main-plugin/utils-jbus.h')
-rw-r--r--plugins/afm-main-plugin/utils-jbus.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/plugins/afm-main-plugin/utils-jbus.h b/plugins/afm-main-plugin/utils-jbus.h
index 3b6ec75f..11cb8ede 100644
--- a/plugins/afm-main-plugin/utils-jbus.h
+++ b/plugins/afm-main-plugin/utils-jbus.h
@@ -20,7 +20,10 @@
struct jreq;
struct jbus;
-extern struct jbus *create_jbus(int session, const char *path);
+extern struct jbus *create_jbus(const char *path, int session);
+extern struct jbus *create_jbus_session(const char *path);
+extern struct jbus *create_jbus_system(const char *path);
+
extern void jbus_addref(struct jbus *jbus);
extern void jbus_unref(struct jbus *jbus);
@@ -43,8 +46,8 @@ extern char *jbus_call_js_sync(struct jbus *jbus, const char *method, struct jso
extern struct json_object *jbus_call_sj_sync(struct jbus *jbus, const char *method, const char *query);
extern struct json_object *jbus_call_jj_sync(struct jbus *jbus, const char *method, struct json_object *query);
-extern int jbus_on_signal_s(struct jbus *jbus, const char *name, void (*onsignal)(const char *));
-extern int jbus_on_signal_j(struct jbus *jbus, const char *name, void (*onsignal)(struct json_object *));
+extern int jbus_on_signal_s(struct jbus *jbus, const char *name, void (*onsignal)(const char *, void *), void *data);
+extern int jbus_on_signal_j(struct jbus *jbus, const char *name, void (*onsignal)(struct json_object *, void *), void *data);
/* verbs for servers */
extern int jbus_reply_s(struct jreq *jreq, const char *reply);
@@ -52,8 +55,8 @@ extern int jbus_reply_j(struct jreq *jreq, struct json_object *reply);
extern int jbus_reply_error_s(struct jreq *jreq, const char *reply);
extern int jbus_reply_error_j(struct jreq *jreq, struct json_object *reply);
-extern int jbus_add_service_s(struct jbus *jbus, const char *method, void (*oncall)(struct jreq *, const char *));
-extern int jbus_add_service_j(struct jbus *jbus, const char *method, void (*oncall)(struct jreq *, struct json_object *));
+extern int jbus_add_service_s(struct jbus *jbus, const char *method, void (*oncall)(struct jreq *, const char *, void *), void *data);
+extern int jbus_add_service_j(struct jbus *jbus, const char *method, void (*oncall)(struct jreq *, struct json_object *, void *), void *data);
extern int jbus_start_serving(struct jbus *jbus);
extern int jbus_send_signal_s(struct jbus *jbus, const char *name, const char *content);
extern int jbus_send_signal_j(struct jbus *jbus, const char *name, struct json_object *content);