diff options
author | José Bollo <jose.bollo@iot.bzh> | 2016-05-10 23:36:26 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2016-05-11 13:07:31 +0200 |
commit | 728bc162968a99f25dbe07ae8e48e53281f01253 (patch) | |
tree | 1e50cf764498f67f2aa556b724d1421a04fa298e /src/utils-jbus.h | |
parent | c162bc1988b15a8188036c85f9b7c785b20f0f38 (diff) |
upgrade to use systemd
Change-Id: Ic07116882d572af7e9b4618e2cf1fce55b997453
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/utils-jbus.h')
-rw-r--r-- | src/utils-jbus.h | 50 |
1 files changed, 12 insertions, 38 deletions
diff --git a/src/utils-jbus.h b/src/utils-jbus.h index 1069098..ff4c8fa 100644 --- a/src/utils-jbus.h +++ b/src/utils-jbus.h @@ -16,44 +16,18 @@ limitations under the License. */ -struct jreq; +#pragma once + +struct sd_bus; + +struct sd_bus_message; struct jbus; -struct pollfd; -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 struct jbus *create_jbus(struct sd_bus *sdbus, const char *path); extern void jbus_addref(struct jbus *jbus); extern void jbus_unref(struct jbus *jbus); -extern int jbus_fill_pollfds( - struct jbus **jbuses, - int njbuses, - struct pollfd *fds); - -extern int jbus_dispatch_pollfds( - struct jbus **jbuses, - int njbuses, - struct pollfd *fds, - int maxcount); - -extern int jbus_read_write_dispatch_multiple( - struct jbus **jbuses, - int njbuses, - int toms, - int maxcount); - -extern int jbus_dispatch_multiple( - struct jbus **jbuses, - int njbuses, - int maxcount); - -extern int jbus_read_write_dispatch( - struct jbus *jbus, - int toms); - - /* verbs for the clients */ extern int jbus_call_ss( struct jbus *jbus, @@ -117,31 +91,31 @@ extern int jbus_on_signal_j( /* verbs for servers */ extern int jbus_reply_s( - struct jreq *jreq, + struct sd_bus_message *smsg, const char *reply); extern int jbus_reply_j( - struct jreq *jreq, + struct sd_bus_message *smsg, struct json_object *reply); extern int jbus_reply_error_s( - struct jreq *jreq, + struct sd_bus_message *smsg, const char *reply); extern int jbus_reply_error_j( - struct jreq *jreq, + struct sd_bus_message *smsg, struct json_object *reply); extern int jbus_add_service_s( struct jbus *jbus, const char *method, - void (*oncall) (struct jreq *, const char *, void *), + void (*oncall) (struct sd_bus_message *, 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 (*oncall) (struct sd_bus_message *, struct json_object *, void *), void *data); extern int jbus_start_serving( |