aboutsummaryrefslogtreecommitdiffstats
path: root/alsa-binding/Alsa-ApiHat.h
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2019-09-19 17:21:04 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2019-10-01 10:57:28 +0200
commitce13200ec80d667418b796afbb7d55a5f66d1c76 (patch)
tree183d63a3c856be6ac53e41538d5b2c200a7d4615 /alsa-binding/Alsa-ApiHat.h
parentf51db7cc6a8aed530ca24adda4be279b5b4d6a84 (diff)
Add possibility to unsubscribe from events
Add possibility to unsubscribe from events using 'unsubscribe' verb with the same json payload used for subscribe. BUG-AGL: SPEC-2833 Change-Id: Ie01f36b2bf0a446cc80b09d79417a301ce9ecfff Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'alsa-binding/Alsa-ApiHat.h')
-rw-r--r--alsa-binding/Alsa-ApiHat.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/alsa-binding/Alsa-ApiHat.h b/alsa-binding/Alsa-ApiHat.h
index 209c65b..21aaa61 100644
--- a/alsa-binding/Alsa-ApiHat.h
+++ b/alsa-binding/Alsa-ApiHat.h
@@ -44,10 +44,10 @@
#define NO_SUBDEVICE_SELECTED -1
typedef enum {
- QUERY_QUIET =0,
- QUERY_COMPACT =1,
- QUERY_VERBOSE =2,
- QUERY_FULL =3,
+ QUERY_QUIET = 0,
+ QUERY_COMPACT = 1,
+ QUERY_VERBOSE = 2,
+ QUERY_FULL = 3,
} queryModeE;
typedef enum {
@@ -60,6 +60,11 @@ typedef enum {
CONTROL_REMOVE
} ControlAddRemoveT;
+typedef enum {
+ EVENT_SUBSCRIBE,
+ EVENT_UNSUBSCRIBE
+} EventSubscribeUnsubscribeT;
+
// structure to store card
typedef struct {
int cardNb;
@@ -77,8 +82,8 @@ typedef struct {
// generic structure to pass parsed query values
typedef struct {
- json_object *numidsJ;
- int count;
+ json_object *numidsJ;
+ int count;
} controlQueryValuesT;
// use to store crl numid user request
@@ -114,7 +119,8 @@ PUBLIC void alsaAddCustomCtls(afb_req_t request);
PUBLIC void alsaRemoveCustomCtls(afb_req_t request);
// AlsaRegEvt
-PUBLIC void alsaEvtSubcribe (afb_req_t request);
+PUBLIC void alsaEvtSubscribe (afb_req_t request);
+PUBLIC void alsaEvtUnsubscribe (afb_req_t request);
PUBLIC void alsaGetCardId (afb_req_t request);
PUBLIC void alsaRegisterHal (afb_req_t request);
PUBLIC void alsaActiveHal (afb_req_t request);