diff options
author | Jose Bollo <jose.bollo@iot.bzh> | 2019-12-17 08:22:00 +0100 |
---|---|---|
committer | Jose Bollo <jose.bollo@iot.bzh> | 2020-01-03 16:53:38 +0100 |
commit | f40979c718fa6fe6b571e133e1bf19fc90957298 (patch) | |
tree | c54c20daa5652d431254a90e67ada7e5cae97aa3 /src/afb-proto-ws.h | |
parent | ca0f859d96599c8ae295c85f825030c891969de1 (diff) |
afb-proto-ws: Add message for unexpected event
This new message allows to revoke an event no more
expected or listened.
Bug-AGL: SPEC-3069
Change-Id: I71945e322276f29b01b628bdf43d75599b521fc3
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-proto-ws.h')
-rw-r--r-- | src/afb-proto-ws.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/afb-proto-ws.h b/src/afb-proto-ws.h index 2dcb142b..204bdb83 100644 --- a/src/afb-proto-ws.h +++ b/src/afb-proto-ws.h @@ -57,6 +57,7 @@ struct afb_proto_ws_server_itf void (*on_token_remove)(void *closure, uint16_t tokenid); void (*on_call)(void *closure, struct afb_proto_ws_call *call, const char *verb, struct json_object *args, uint16_t sessionid, uint16_t tokenid, const char *user_creds); void (*on_describe)(void *closure, struct afb_proto_ws_describe *describe); + void (*on_event_unexpected)(void *closure, uint16_t eventid); }; extern struct afb_proto_ws *afb_proto_ws_create_client(struct fdev *fdev, const struct afb_proto_ws_client_itf *itf, void *closure); @@ -80,6 +81,7 @@ extern int afb_proto_ws_client_token_create(struct afb_proto_ws *protows, uint16 extern int afb_proto_ws_client_token_remove(struct afb_proto_ws *protows, uint16_t tokenid); extern int afb_proto_ws_client_call(struct afb_proto_ws *protows, const char *verb, struct json_object *args, uint16_t sessionid, uint16_t tokenid, void *request, const char *user_creds); extern int afb_proto_ws_client_describe(struct afb_proto_ws *protows, void (*callback)(void*, struct json_object*), void *closure); +extern int afb_proto_ws_client_event_unexpected(struct afb_proto_ws *protows, uint16_t eventid); extern int afb_proto_ws_server_event_create(struct afb_proto_ws *protows, uint16_t event_id, const char *event_name); extern int afb_proto_ws_server_event_remove(struct afb_proto_ws *protows, uint16_t event_id); |