aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-proto-ws.h
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-10-11 13:11:06 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2017-10-11 13:11:06 +0200
commitf11c11123f8cc43fc6e810b6c3dd911eb697826e (patch)
treeee9e3d1a737798327f71009835b5eb5962512db4 /src/afb-proto-ws.h
parent7832d70f259bbb1f40ca5164f2128000519a16fe (diff)
afb-proto-ws: remove dependencies
Remove dependencies to verbose and to afb-common. Change-Id: I140f2cd7c159e9be994ab7b786a164d605d1b1dc Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-proto-ws.h')
-rw-r--r--src/afb-proto-ws.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/afb-proto-ws.h b/src/afb-proto-ws.h
index a3d4a0dd..103e37ab 100644
--- a/src/afb-proto-ws.h
+++ b/src/afb-proto-ws.h
@@ -18,6 +18,7 @@
#pragma once
+struct sd_event;
struct afb_proto_ws;
struct afb_proto_ws_call;
struct afb_proto_ws_subcall;
@@ -25,9 +26,11 @@ struct afb_proto_ws_describe;
struct afb_proto_ws_client_itf
{
+ /* can't be NULL */
void (*on_reply_success)(void *closure, void *request, struct json_object *result, const char *info);
void (*on_reply_fail)(void *closure, void *request, const char *status, const char *info);
+ /* can be NULL */
void (*on_event_create)(void *closure, const char *event_name, int event_id);
void (*on_event_remove)(void *closure, const char *event_name, int event_id);
void (*on_event_subscribe)(void *closure, void *request, const char *event_name, int event_id);
@@ -44,8 +47,8 @@ struct afb_proto_ws_server_itf
void (*on_describe)(void *closure, struct afb_proto_ws_describe *describe);
};
-extern struct afb_proto_ws *afb_proto_ws_create_client(int fd, const struct afb_proto_ws_client_itf *itf, void *closure);
-extern struct afb_proto_ws *afb_proto_ws_create_server(int fd, const struct afb_proto_ws_server_itf *itf, void *closure);
+extern struct afb_proto_ws *afb_proto_ws_create_client(struct sd_event *eloop, int fd, const struct afb_proto_ws_client_itf *itf, void *closure);
+extern struct afb_proto_ws *afb_proto_ws_create_server(struct sd_event *eloop, int fd, const struct afb_proto_ws_server_itf *itf, void *closure);
extern void afb_proto_ws_unref(struct afb_proto_ws *protows);
extern void afb_proto_ws_addref(struct afb_proto_ws *protows);