summaryrefslogtreecommitdiffstats
path: root/Shared-Interface
diff options
context:
space:
mode:
authorfulup <fulup.arfoll@iot.bzh>2017-07-25 11:37:10 +0200
committerfulup <fulup.arfoll@iot.bzh>2017-07-25 11:37:10 +0200
commit593ed6dc72274f86046aae3dc6b264c568241917 (patch)
tree32615a58bedbc0b2fcdf05db4a66d15ceafd763a /Shared-Interface
parenta7a6ae4be87ee9178905ab784d84a4c0a8303f9b (diff)
Initial version of HAL with Set/Get operation
Diffstat (limited to 'Shared-Interface')
-rw-r--r--Shared-Interface/audio-interface.c28
-rw-r--r--Shared-Interface/audio-interface.h15
2 files changed, 7 insertions, 36 deletions
diff --git a/Shared-Interface/audio-interface.c b/Shared-Interface/audio-interface.c
index edaaf7f..b4750ae 100644
--- a/Shared-Interface/audio-interface.c
+++ b/Shared-Interface/audio-interface.c
@@ -23,34 +23,6 @@
#include "audio-interface.h"
-typedef struct {
- int index;
- int numid;
-} shareHallMap_T;
-
-
-PUBLIC int cbCheckResponse(struct afb_req request, int iserror, struct json_object *result) {
- struct json_object *response, *status, *info;
-
- if (iserror) { // on error proxy information we got from lower layer
- if (result) {
- if (json_object_object_get_ex(result, "request", &response)) {
- json_object_object_get_ex(response, "info", &info);
- json_object_object_get_ex(response, "status", &status);
- afb_req_fail(request, json_object_get_string(status), json_object_get_string(info));
- goto OnErrorExit;
- }
- } else {
- afb_req_fail(request, "cbCheckFail", "No Result inside API response");
- }
- goto OnErrorExit;
- }
- return (0);
-
-OnErrorExit:
- return (-1);
-}
-
PUBLIC void pingtest(struct afb_req request) {
json_object *query = afb_req_json(request);
diff --git a/Shared-Interface/audio-interface.h b/Shared-Interface/audio-interface.h
index 09cb6c2..01c71cd 100644
--- a/Shared-Interface/audio-interface.h
+++ b/Shared-Interface/audio-interface.h
@@ -62,19 +62,18 @@ typedef enum {
typedef enum {
StartHalCrlTag=0,
- // HighLevel Audio Control List
- Master_Playback_Volume,
- Master_OnOff_Switch,
- Master_Playback_Ramp,
- PCM_Playback_Volume,
- PCM_Playback_Switch,
- Capture_Volume,
+ // HighLevel Audio Control List,
+ Master_Playback_Volume =1,
+ Master_Playback_Ramp =2,
+ PCM_Playback_Volume =3,
+ PCM_Playback_Switch =4,
+ Capture_Volume =5,
+ Master_OnOff_Switch =6,
EndHalCrlTag // used to compute number of ctls
} halCtlsEnumT;
-PUBLIC int cbCheckResponse(struct afb_req request, int iserror, struct json_object *result) ;
PUBLIC void pingtest(struct afb_req request);
#endif /* AUDIO_INTERF_H */