summaryrefslogtreecommitdiffstats
path: root/plugins/afm-main-plugin/utils-jbus.h
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-04-15 16:40:38 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-04-15 16:40:38 +0200
commit68a8eaafe5f43480f29308bfd2ec12ad54da43f1 (patch)
tree5c8782a09cb48df20695fa6ba562e00f523d22f3 /plugins/afm-main-plugin/utils-jbus.h
parent67966a2f96613d833f493ef3773c442d35f8ed31 (diff)
use upoll for event loop
also add '#pragma once' in headers Change-Id: I90cc2d53ec60d4d1e66cf0f229109621e4019864 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.h48
1 files changed, 10 insertions, 38 deletions
diff --git a/plugins/afm-main-plugin/utils-jbus.h b/plugins/afm-main-plugin/utils-jbus.h
index 10690984..d85b8aff 100644
--- a/plugins/afm-main-plugin/utils-jbus.h
+++ b/plugins/afm-main-plugin/utils-jbus.h
@@ -16,44 +16,16 @@
limitations under the License.
*/
-struct jreq;
+#pragma once
+
+struct sbusmsg;
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 sbus *sbus, 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 +89,31 @@ extern int jbus_on_signal_j(
/* verbs for servers */
extern int jbus_reply_s(
- struct jreq *jreq,
+ struct sbusmsg *smsg,
const char *reply);
extern int jbus_reply_j(
- struct jreq *jreq,
+ struct sbusmsg *smsg,
struct json_object *reply);
extern int jbus_reply_error_s(
- struct jreq *jreq,
+ struct sbusmsg *smsg,
const char *reply);
extern int jbus_reply_error_j(
- struct jreq *jreq,
+ struct sbusmsg *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 sbusmsg *, 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 sbusmsg *, struct json_object *, void *),
void *data);
extern int jbus_start_serving(