diff options
author | 2018-10-23 10:21:06 +0200 | |
---|---|---|
committer | 2018-11-02 16:12:26 +0100 | |
commit | be188c31f2528cdabfffd07ef1ec87ff6c23330a (patch) | |
tree | 9a9dded7fd8348ff2abb71ed046963a1f9a811b7 /4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c | |
parent | cabdc828ee3eb35d780f2145fdb37081a5f6d71d (diff) |
Use ctl defines to call afb functions
Use controller 'afb-defintions.h' defines to call application
framework functions.
Change-Id: If9599b0397a593440ce2e08f039dc279c63f7428
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c')
-rw-r--r-- | 4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c index 22783d5..9f074df 100644 --- a/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c +++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c @@ -34,7 +34,7 @@ * HAL controller event handler function * ******************************************************************************/ -void HalCtlsDispatchApiEvent(afb_dynapi *apiHandle, const char *evtLabel, json_object *eventJ) +void HalCtlsDispatchApiEvent(AFB_ApiT apiHandle, const char *evtLabel, json_object *eventJ) { int numid, idx = 0, cardidx; @@ -48,7 +48,7 @@ void HalCtlsDispatchApiEvent(afb_dynapi *apiHandle, const char *evtLabel, json_o AFB_ApiDebug(apiHandle, "Evtname=%s [msg=%s]", evtLabel, json_object_get_string(eventJ)); - ctrlConfig = (CtlConfigT *) afb_dynapi_get_userdata(apiHandle); + ctrlConfig = (CtlConfigT *) AFB_ApiGetUserData(apiHandle); if(! ctrlConfig) { AFB_ApiError(apiHandle, "Can't get current hal controller config"); return; @@ -124,7 +124,7 @@ int HalCtlsHalMixerConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object if(! apiHandle || ! section) return -1; - ctrlConfig = (CtlConfigT *) afb_dynapi_get_userdata(apiHandle); + ctrlConfig = (CtlConfigT *) AFB_ApiGetUserData(apiHandle); if(! ctrlConfig) return -2; @@ -275,7 +275,7 @@ int HalCtlsHandleOneHalMapObject(AFB_ApiT apiHandle, char *cardId, struct CtlHal } } - if(afb_dynapi_add_verb(apiHandle, alsaMap->uid, alsaMap->info, HalCtlsActionOnAlsaCtl, (void *) alsaMap, NULL, 0)) { + if(AFB_ApiAddVerb(apiHandle, alsaMap->uid, alsaMap->info, HalCtlsActionOnAlsaCtl, (void *) alsaMap, NULL, 0, 0)) { AFB_ApiError(apiHandle, "Didn't to create verb for current alsa control to load action using alsa object:\n-- %s", json_object_get_string(alsaMap->actionJ)); @@ -341,7 +341,7 @@ int HalCtlsHalMapConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *A CtlConfigT *ctrlConfig; struct SpecificHalData *currentHalData; - ctrlConfig = (CtlConfigT *) afb_dynapi_get_userdata(apiHandle); + ctrlConfig = (CtlConfigT *) AFB_ApiGetUserData(apiHandle); if(! ctrlConfig) return -1; @@ -397,19 +397,19 @@ void HalCtlsActionOnCall(AFB_ReqT request) json_object *requestJson, *returnJ = NULL, *toReturnJ; - apiHandle = (AFB_ApiT) afb_request_get_dynapi(request); + apiHandle = (AFB_ApiT) AFB_ReqGetApi(request); if(! apiHandle) { AFB_ReqFail(request, "api_handle", "Can't get current hal controller api handle"); return; } - ctrlConfig = (CtlConfigT *) afb_dynapi_get_userdata(apiHandle); + ctrlConfig = (CtlConfigT *) AFB_ApiGetUserData(apiHandle); if(! ctrlConfig) { AFB_ReqFail(request, "hal_controller_config", "Can't get current hal controller config"); return; } - currentMixerData = (struct CtlHalMixerData *) afb_request_get_vcbdata(request); + currentMixerData = (struct CtlHalMixerData *) AFB_ReqVCBData(request); if(! currentMixerData) { AFB_ReqFail(request, "hal_call_data", "Can't get current call data"); return; @@ -519,13 +519,13 @@ void HalCtlsInfo(AFB_ReqT request) json_object *requestJson, *toReturnJ = NULL, *requestAnswer, *streamsArray, *playbacksArray, *capturesArray; - apiHandle = (AFB_ApiT) afb_request_get_dynapi(request); + apiHandle = (AFB_ApiT) AFB_ReqGetApi(request); if(! apiHandle) { AFB_ReqFail(request, "api_handle", "Can't get current hal controller api handle"); return; } - ctrlConfig = (CtlConfigT *) afb_dynapi_get_userdata(apiHandle); + ctrlConfig = (CtlConfigT *) AFB_ApiGetUserData(apiHandle); if(! ctrlConfig) { AFB_ReqFail(request, "hal_controller_config", "Can't get current hal controller config"); return; |