summaryrefslogtreecommitdiffstats
path: root/4a-hal/4a-hal-controllers
diff options
context:
space:
mode:
Diffstat (limited to '4a-hal/4a-hal-controllers')
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c10
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.h2
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c22
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.h7
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-cb.c102
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-cb.h13
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-handler.c14
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-handler.h2
8 files changed, 86 insertions, 86 deletions
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c
index 37d6447..366de0f 100644
--- a/4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c
+++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c
@@ -30,7 +30,7 @@
* HAL controllers alsacore calls funtions *
******************************************************************************/
-bool HalCtlsGetCardIdByCardPath(afb_dynapi *apiHandle, struct SpecificHalData *currentCtlHalData)
+bool HalCtlsGetCardIdByCardPath(AFB_ApiT apiHandle, struct SpecificHalData *currentCtlHalData)
{
int *cardId;
@@ -46,12 +46,12 @@ bool HalCtlsGetCardIdByCardPath(afb_dynapi *apiHandle, struct SpecificHalData *c
wrap_json_pack(&toSendJ, "{s:s}", "devpath", currentCtlHalData->sndCard);
- if(afb_dynapi_call_sync(apiHandle, ALSACORE_API, ALSACORE_GETINFO_VERB, toSendJ, &returnJ)) {
+ if(AFB_ServiceSync(apiHandle, ALSACORE_API, ALSACORE_GETINFO_VERB, toSendJ, &returnJ)) {
returnedStatus = alloca(sizeof(char *));
returnedInfo = alloca(sizeof(char *));
returnedError = HalUtlHandleAppFwCallError(apiHandle, ALSACORE_API, ALSACORE_GETINFO_VERB, returnJ, returnedStatus, returnedInfo);
- AFB_DYNAPI_WARNING(apiHandle,
+ AFB_ApiWarning(apiHandle,
"Error %i during call to verb %s of %s api",
(int) returnedError,
ALSACORE_GETINFO_VERB,
@@ -61,10 +61,10 @@ bool HalCtlsGetCardIdByCardPath(afb_dynapi *apiHandle, struct SpecificHalData *c
if(json_object_object_get_ex(responsJ, "devid", &devidJ) && json_object_is_type(devidJ, json_type_string)) {
cardIdString = (char *) json_object_get_string(devidJ);
if(sscanf(cardIdString, "hw:%i", cardId) <= 0)
- AFB_DYNAPI_WARNING(apiHandle, "Couldn't get valid devid from string: '%s'", cardIdString);
+ AFB_ApiWarning(apiHandle, "Couldn't get valid devid from string: '%s'", cardIdString);
}
else {
- AFB_DYNAPI_WARNING(apiHandle, "Response devid is not present/valid");
+ AFB_ApiWarning(apiHandle, "Response devid is not present/valid");
}
currentCtlHalData->sndCardId = *cardId;
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.h b/4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.h
index 19ff9e5..0c24e4f 100644
--- a/4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.h
+++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.h
@@ -25,6 +25,6 @@
#define ALSACORE_GETINFO_VERB "infoget"
// HAL controllers alsacore calls funtions
-bool HalCtlsGetCardIdByCardPath(afb_dynapi *apiHandle, struct SpecificHalData *currentCtlHalData);
+bool HalCtlsGetCardIdByCardPath(AFB_ApiT apiHandle, struct SpecificHalData *currentCtlHalData);
#endif /* HAL_CTLS_ALSACORE_LINK_INCLUDE_ */ \ No newline at end of file
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
index 8c4a85f..15077d8 100644
--- a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
+++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.c
@@ -33,7 +33,7 @@
#include "4a-hal-controllers-cb.h"
// Default api to print log when apihandle not available
-afb_dynapi *AFB_default;
+AFB_ApiT AFB_default;
/*******************************************************************************
* Json parsing functions using app controller *
@@ -69,7 +69,7 @@ static struct HalUtlApiVerb CtlHalDynApiStaticVerbs[] =
* TODO JAI : Use API-V3 instead of API-PRE-V3 *
******************************************************************************/
-static int HalCtlsInitOneApi(afb_dynapi *apiHandle)
+static int HalCtlsInitOneApi(AFB_ApiT apiHandle)
{
CtlConfigT *ctrlConfig;
struct SpecificHalData *currentCtlHalData;
@@ -115,7 +115,7 @@ static int HalCtlsInitOneApi(afb_dynapi *apiHandle)
return CtlConfigExec(apiHandle, ctrlConfig);
}
-static int HalCtlsLoadOneApi(void *cbdata, afb_dynapi *apiHandle)
+static int HalCtlsLoadOneApi(void *cbdata, AFB_ApiT apiHandle)
{
int err;
CtlConfigT *ctrlConfig;
@@ -130,7 +130,7 @@ static int HalCtlsLoadOneApi(void *cbdata, afb_dynapi *apiHandle)
// Add static controls verbs
if(HalUtlLoadVerbs(apiHandle, CtlHalDynApiStaticVerbs)) {
- AFB_DYNAPI_ERROR(apiHandle, "%s : load Section : fail to register static V2 verbs", __func__);
+ AFB_ApiError(apiHandle, "%s : load Section : fail to register static V2 verbs", __func__);
return 1;
}
@@ -146,7 +146,7 @@ static int HalCtlsLoadOneApi(void *cbdata, afb_dynapi *apiHandle)
return err;
}
-int HalCtlsCreateApi(afb_dynapi *apiHandle, char *path, struct HalMgrData *HalMgrGlobalData)
+int HalCtlsCreateApi(AFB_ApiT apiHandle, char *path, struct HalMgrData *HalMgrGlobalData)
{
CtlConfigT *ctrlConfig;
struct SpecificHalData *currentCtlHalData;
@@ -157,12 +157,12 @@ int HalCtlsCreateApi(afb_dynapi *apiHandle, char *path, struct HalMgrData *HalMg
// Create one Api per file
ctrlConfig = CtlLoadMetaData(apiHandle, path);
if(! ctrlConfig) {
- AFB_DYNAPI_ERROR(apiHandle, "%s: No valid control config file in:\n-- %s", __func__, path);
+ AFB_ApiError(apiHandle, "%s: No valid control config file in:\n-- %s", __func__, path);
return -2;
}
if(! ctrlConfig->api) {
- AFB_DYNAPI_ERROR(apiHandle, "%s: API Missing from metadata in:\n-- %s", __func__, path);
+ AFB_ApiError(apiHandle, "%s: API Missing from metadata in:\n-- %s", __func__, path);
return -3;
}
@@ -181,7 +181,7 @@ int HalCtlsCreateApi(afb_dynapi *apiHandle, char *path, struct HalMgrData *HalMg
return afb_dynapi_new_api(apiHandle, ctrlConfig->api, ctrlConfig->info, 1, HalCtlsLoadOneApi, ctrlConfig);
}
-int HalCtlsCreateAllApi(afb_dynapi *apiHandle, struct HalMgrData *HalMgrGlobalData)
+int HalCtlsCreateAllApi(AFB_ApiT apiHandle, struct HalMgrData *HalMgrGlobalData)
{
int index, err, status = 0;
char *dirList, *fileName, *fullPath;
@@ -197,7 +197,7 @@ int HalCtlsCreateAllApi(afb_dynapi *apiHandle, struct HalMgrData *HalMgrGlobalDa
// Hugely hack to make all V2 AFB_DEBUG to work in fileutils
AFB_default = apiHandle;
- AFB_DYNAPI_NOTICE(apiHandle, "In %s", __func__);
+ AFB_ApiNotice(apiHandle, "In %s", __func__);
dirList = getenv("CONTROL_CONFIG_PATH");
if(! dirList)
@@ -205,7 +205,7 @@ int HalCtlsCreateAllApi(afb_dynapi *apiHandle, struct HalMgrData *HalMgrGlobalDa
configJ = CtlConfigScan(dirList, "hal");
if(! configJ) {
- AFB_DYNAPI_ERROR(apiHandle, "%s: No hal-(binder-middle-name)*.json config file(s) found in %s ", __func__, dirList);
+ AFB_ApiError(apiHandle, "%s: No hal-(binder-middle-name)*.json config file(s) found in %s ", __func__, dirList);
return -2;
}
@@ -215,7 +215,7 @@ int HalCtlsCreateAllApi(afb_dynapi *apiHandle, struct HalMgrData *HalMgrGlobalDa
err = wrap_json_unpack(entryJ, "{s:s, s:s !}", "fullpath", &fullPath, "filename", &fileName);
if(err) {
- AFB_DYNAPI_ERROR(apiHandle, "%s: HOOPs invalid JSON entry = %s", __func__, json_object_get_string(entryJ));
+ AFB_ApiError(apiHandle, "%s: HOOPs invalid JSON entry = %s", __func__, json_object_get_string(entryJ));
return -1;
}
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.h b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.h
index 85d42bd..99b304e 100644
--- a/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.h
+++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-api-loader.h
@@ -20,13 +20,12 @@
#include <stdio.h>
-#define AFB_BINDING_VERSION dyn
-#include <afb/afb-binding.h>
+#include <afb-definitions.h>
#include "../4a-hal-utilities/4a-hal-utilities-data.h"
// Verbs that can be use to create api
-int HalCtlsCreateApi(afb_dynapi *apiHandle, char *path, struct HalMgrData *HalMgrGlobalData);
-int HalCtlsCreateAllApi(afb_dynapi *apiHandle, struct HalMgrData *HalMgrGlobalData);
+int HalCtlsCreateApi(AFB_ApiT apiHandle, char *path, struct HalMgrData *HalMgrGlobalData);
+int HalCtlsCreateAllApi(AFB_ApiT apiHandle, struct HalMgrData *HalMgrGlobalData);
#endif /* _HALMGR_HALCTL_DYNAPI_INCLUDE_ */ \ No newline at end of file
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 3586eca..0da335a 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 controllers sections parsing functions *
******************************************************************************/
-int HalCtlsHalMixerConfig(afb_dynapi *apiHandle, CtlSectionT *section, json_object *MixerJ)
+int HalCtlsHalMixerConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *MixerJ)
{
CtlConfigT *ctrlConfig;
struct SpecificHalData *currentHalData;
@@ -67,9 +67,9 @@ int HalCtlsHalMixerConfig(afb_dynapi *apiHandle, CtlSectionT *section, json_obje
}
// TODO JAI : to implement
-int HalCtlsHalMapConfig(afb_dynapi *apiHandle, CtlSectionT *section, json_object *StreamControlsJ)
+int HalCtlsHalMapConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *StreamControlsJ)
{
- AFB_DYNAPI_WARNING(apiHandle, "JAI :%s not implemented yet", __func__);
+ AFB_ApiWarning(apiHandle, "JAI :%s not implemented yet", __func__);
return 0;
}
@@ -78,57 +78,57 @@ int HalCtlsHalMapConfig(afb_dynapi *apiHandle, CtlSectionT *section, json_object
* HAL controllers verbs functions *
******************************************************************************/
-void HalCtlsActionOnStream(afb_request *request)
+void HalCtlsActionOnStream(AFB_ReqT request)
{
int verbToCallSize;
char *apiToCall, *mixerVerbName, *verbToCall;
- afb_dynapi *apiHandle;
+ AFB_ApiT apiHandle;
CtlConfigT *ctrlConfig;
struct SpecificHalData *currentCtlHalData;
json_object *requestJson, *returnJ, *toReturnJ;
- apiHandle = (afb_dynapi *) afb_request_get_dynapi(request);
+ apiHandle = (AFB_ApiT) afb_request_get_dynapi(request);
if(! apiHandle) {
- afb_request_fail(request, "api_handle", "Can't get current hal controller api handle");
+ AFB_ReqFail(request, "api_handle", "Can't get current hal controller api handle");
return;
}
ctrlConfig = (CtlConfigT *) afb_dynapi_get_userdata(apiHandle);
if(! ctrlConfig) {
- afb_request_fail(request, "hal_controller_config", "Can't get current hal controller config");
+ AFB_ReqFail(request, "hal_controller_config", "Can't get current hal controller config");
return;
}
currentCtlHalData = (struct SpecificHalData *) ctrlConfig->external;
if(! currentCtlHalData) {
- afb_request_fail(request, "hal_controller_data", "Can't get current hal controller data");
+ AFB_ReqFail(request, "hal_controller_data", "Can't get current hal controller data");
return;
}
- requestJson = afb_request_json(request);
+ requestJson = AFB_ReqJson(request);
if(! requestJson) {
- afb_request_fail(request, "request_json", "Can't get request json");
+ AFB_ReqFail(request, "request_json", "Can't get request json");
return;
}
apiToCall = currentCtlHalData->ctlHalSpecificData->mixerApiName;
if(! apiToCall) {
- afb_request_fail(request, "mixer_api", "Can't get mixer api");
+ AFB_ReqFail(request, "mixer_api", "Can't get mixer api");
return;
}
mixerVerbName = currentCtlHalData->ctlHalSpecificData->mixerVerbName;
if(! mixerVerbName) {
- afb_request_fail(request, "hal_softmixer_verb", "Can't get hal mixer verb prefix");
+ AFB_ReqFail(request, "hal_softmixer_verb", "Can't get hal mixer verb prefix");
return;
}
if(currentCtlHalData->status != HAL_STATUS_AVAILABLE) {
- afb_request_fail(request, "hal_unavailable", "Seems that hal is not available");
+ AFB_ReqFail(request, "hal_unavailable", "Seems that hal is not available");
return;
}
@@ -142,64 +142,66 @@ void HalCtlsActionOnStream(afb_request *request)
strcat(verbToCall, "/");
strcat(verbToCall, request->verb);
- if(afb_dynapi_call_sync(apiHandle, apiToCall, verbToCall, json_object_get(requestJson), &returnJ)) {
+ if(AFB_ServiceSync(apiHandle, apiToCall, verbToCall, json_object_get(requestJson), &returnJ)) {
HalUtlHandleAppFwCallErrorInRequest(request, apiToCall, verbToCall, returnJ, "stream_action");
}
else if(json_object_object_get_ex(returnJ, "response", &toReturnJ)){
- afb_request_success_f(request, toReturnJ, "Action %s correctly transfered to %s without any error raised",
- verbToCall,
- apiToCall);
+ AFB_ReqSucessF(request,
+ toReturnJ,
+ "Action %s correctly transfered to %s without any error raised",
+ verbToCall,
+ apiToCall);
}
else {
- afb_request_fail_f(request, "invalid_response", "Action %s correctly transfered to %s, but response is not valid",
+ AFB_ReqFailF(request, "invalid_response", "Action %s correctly transfered to %s, but response is not valid",
verbToCall,
apiToCall);
}
}
-void HalCtlsListVerbs(afb_request *request)
+void HalCtlsListVerbs(AFB_ReqT request)
{
unsigned int idx;
- afb_dynapi *apiHandle;
+ AFB_ApiT apiHandle;
CtlConfigT *ctrlConfig;
struct SpecificHalData *currentCtlHalData;
json_object *requestJson, *requestAnswer, *streamsArray, *currentStream;
- apiHandle = (afb_dynapi *) afb_request_get_dynapi(request);
+ apiHandle = (AFB_ApiT) afb_request_get_dynapi(request);
if(! apiHandle) {
- afb_request_fail(request, "api_handle", "Can't get current hal controller api handle");
+ AFB_ReqFail(request, "api_handle", "Can't get current hal controller api handle");
return;
}
ctrlConfig = (CtlConfigT *) afb_dynapi_get_userdata(apiHandle);
if(! ctrlConfig) {
- afb_request_fail(request, "hal_controller_config", "Can't get current hal controller config");
+ AFB_ReqFail(request, "hal_controller_config", "Can't get current hal controller config");
return;
}
currentCtlHalData = (struct SpecificHalData *) ctrlConfig->external;
if(! currentCtlHalData) {
- afb_request_fail(request, "hal_controller_data", "Can't get current hal controller data");
+ AFB_ReqFail(request, "hal_controller_data", "Can't get current hal controller data");
return;
}
if(! currentCtlHalData->ctlHalSpecificData->ctlHalStreamsData.count) {
- afb_request_success(request, NULL, "No data to answer, no streams found");
+ AFB_ReqSucess(request, NULL, "No data to answer, no streams found");
return;
}
- requestJson = afb_request_json(request);
+ requestJson = AFB_ReqJson(request);
if(! requestJson) {
- afb_request_fail(request, "request_json", "Can't get request json");
+ AFB_ReqFail(request, "request_json", "Can't get request json");
return;
}
streamsArray = json_object_new_array();
if(! streamsArray) {
- afb_request_fail(request, "json_answer", "Can't generate par of json answer");
+ AFB_ReqFail(request, "json_answer", "Can't generate par of json answer");
return;
}
@@ -215,82 +217,82 @@ void HalCtlsListVerbs(afb_request *request)
wrap_json_pack(&requestAnswer, "{s:o}", "streams", streamsArray);
- afb_request_success(request, requestAnswer, "Requested data");
+ AFB_ReqSucess(request, requestAnswer, "Requested data");
}
-void HalCtlsInitMixer(afb_request *request)
+void HalCtlsInitMixer(AFB_ReqT request)
{
unsigned int err;
char *apiToCall;
- afb_dynapi *apiHandle;
+ AFB_ApiT apiHandle;
CtlConfigT *ctrlConfig;
struct SpecificHalData *currentCtlHalData;
json_object *returnJ, *toReturnJ;
- apiHandle = (afb_dynapi *) afb_request_get_dynapi(request);
+ apiHandle = (AFB_ApiT ) afb_request_get_dynapi(request);
if(! apiHandle) {
- afb_request_fail(request, "api_handle", "Can't get hal manager api handle");
+ AFB_ReqFail(request, "api_handle", "Can't get current hal api handle");
return;
}
ctrlConfig = (CtlConfigT *) afb_dynapi_get_userdata(apiHandle);
if(! ctrlConfig) {
- afb_request_fail(request, "hal_controller_config", "Can't get current hal controller config");
+ AFB_ReqFail(request, "hal_controller_config", "Can't get current hal controller config");
return;
}
currentCtlHalData = (struct SpecificHalData *) ctrlConfig->external;
if(! currentCtlHalData) {
- afb_request_fail(request, "hal_controller_data", "Can't get current hal controller data");
+ AFB_ReqFail(request, "hal_controller_data", "Can't get current hal controller data");
return;
}
apiToCall = currentCtlHalData->ctlHalSpecificData->mixerApiName;
if(! apiToCall) {
- afb_request_fail(request, "mixer_api", "Can't get mixer api");
+ AFB_ReqFail(request, "mixer_api", "Can't get mixer api");
return;
}
switch(currentCtlHalData->status) {
case HAL_STATUS_UNAVAILABLE:
- afb_request_fail(request, "hal_unavailable", "Seems that the hal corresponding card was not found by alsacore at startup");
+ AFB_ReqFail(request, "hal_unavailable", "Seems that the hal corresponding card was not found by alsacore at startup");
return;
case HAL_STATUS_READY:
- afb_request_success(request, NULL, "Seems that the hal mixer is already initialized");
+ AFB_ReqSucess(request, NULL, "Seems that the hal mixer is already initialized");
return;
case HAL_STATUS_AVAILABLE:
break;
}
- if(afb_dynapi_call_sync(apiHandle, apiToCall, "create", json_object_get(currentCtlHalData->ctlHalSpecificData->halMixerJ), &returnJ)) {
+ if(AFB_ServiceSync(apiHandle, apiToCall, "create", json_object_get(currentCtlHalData->ctlHalSpecificData->halMixerJ), &returnJ)) {
HalUtlHandleAppFwCallErrorInRequest(request, apiToCall, "create", returnJ, "mixer_create");
}
else if(json_object_object_get_ex(returnJ, "response", &toReturnJ)) {
err = HalCtlsHandleMixerAttachResponse(request, &currentCtlHalData->ctlHalSpecificData->ctlHalStreamsData, toReturnJ);
if(err != (int) MIXER_NO_ERROR) {
- afb_request_success_f(request,
- toReturnJ,
- "Seems that create call to api %s succeed but this warning was risen by response decoder : %i",
- apiToCall,
- err);
+ AFB_ReqFailF(request,
+ "handler_mixer_response",
+ "Seems that create call to api %s succeed but this warning was risen by response decoder : %i",
+ apiToCall,
+ err);
return;
}
- afb_request_success_f(request,
- toReturnJ,
- "Seems that create call to api %s succeed with no warning raised",
- apiToCall);
+ AFB_ReqSucessF(request,
+ toReturnJ,
+ "Seems that create call to api %s succeed with no warning raised",
+ apiToCall);
currentCtlHalData->status = HAL_STATUS_READY;
}
else {
- afb_request_fail_f(request,
+ AFB_ReqFailF(request,
"invalid_response",
"Seems that mix_new call to api %s succeed, but response is not valid",
apiToCall);
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.h b/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.h
index 304546c..ba17997 100644
--- a/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.h
+++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-cb.h
@@ -20,18 +20,17 @@
#include <stdio.h>
-#define AFB_BINDING_VERSION dyn
-#include <afb/afb-binding.h>
+#include <afb-definitions.h>
#include <ctl-config.h>
// HAL controllers sections parsing functions
-int HalCtlsHalMixerConfig(afb_dynapi *apiHandle, CtlSectionT *section, json_object *MixerJ);
-int HalCtlsHalMapConfig(afb_dynapi *apiHandle, CtlSectionT *section, json_object *StreamControlsJ);
+int HalCtlsHalMixerConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *MixerJ);
+int HalCtlsHalMapConfig(AFB_ApiT apiHandle, CtlSectionT *section, json_object *StreamControlsJ);
// HAL controllers verbs functions
-void HalCtlsActionOnStream(afb_request *request);
-void HalCtlsListVerbs(afb_request *request);
-void HalCtlsInitMixer(afb_request *request);
+void HalCtlsActionOnStream(AFB_ReqT request);
+void HalCtlsListVerbs(AFB_ReqT request);
+void HalCtlsInitMixer(AFB_ReqT request);
#endif /* _HALMGR_CB_INCLUDE_ */ \ No newline at end of file
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-handler.c b/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-handler.c
index 789913d..56a50a8 100644
--- a/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-handler.c
+++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-handler.c
@@ -37,15 +37,15 @@ int HalCtlsHandleMixerAttachResponse(AFB_ReqT request, struct CtlHalStreamsDataT
char *currentStreamName, *currentStreamCardId;
- afb_dynapi *apiHandle;
+ AFB_ApiT apiHandle;
struct HalUtlApiVerb *CtlHalDynApiStreamVerbs;
json_object *currentStreamJ;
- apiHandle = (afb_dynapi *) afb_request_get_dynapi(request);
+ apiHandle = (AFB_ApiT) afb_request_get_dynapi(request);
if(! apiHandle) {
- AFB_REQUEST_WARNING(request, "%s: Can't get current hal api handle", __func__);
+ AFB_ReqWarning(request, "%s: Can't get current hal api handle", __func__);
return (int) MIXER_ERROR_API_UNAVAILABLE;
}
@@ -58,7 +58,7 @@ int HalCtlsHandleMixerAttachResponse(AFB_ReqT request, struct CtlHalStreamsDataT
break;
default:
currentHalStreamsData->count = 0;
- AFB_REQUEST_WARNING(request, "%s: no streams returned", __func__);
+ AFB_ReqWarning(request, "%s: no streams returned", __func__);
return (int) MIXER_ERROR_NO_STREAMS;
}
@@ -75,11 +75,11 @@ int HalCtlsHandleMixerAttachResponse(AFB_ReqT request, struct CtlHalStreamsDataT
currentStreamJ = mixerResponseJ;
if(wrap_json_unpack(currentStreamJ, "{s:s}", "uid", &currentStreamName)) {
- AFB_REQUEST_WARNING(request, "%s: can't find name in current stream object", __func__);
+ AFB_ReqWarning(request, "%s: can't find name in current stream object", __func__);
err += (int) MIXER_ERROR_STREAM_NAME_UNAVAILABLE;
}
else if(wrap_json_unpack(currentStreamJ, "{s:s}", "alsa", &currentStreamCardId)) {
- AFB_REQUEST_WARNING(request, "%s: can't find card id in current stream object", __func__);
+ AFB_ReqWarning(request, "%s: can't find card id in current stream object", __func__);
err += (int) MIXER_ERROR_STREAM_CARDID_UNAVAILABLE;
}
else {
@@ -93,7 +93,7 @@ int HalCtlsHandleMixerAttachResponse(AFB_ReqT request, struct CtlHalStreamsDataT
}
if(HalUtlLoadVerbs(apiHandle, CtlHalDynApiStreamVerbs)) {
- AFB_REQUEST_WARNING(request, "%s: error while creating verbs for streams", __func__);
+ AFB_ReqWarning(request, "%s: error while creating verbs for streams", __func__);
err += (int) MIXER_ERROR_COULDNT_ADD_STREAMS_AS_VERB;
}
diff --git a/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-handler.h b/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-handler.h
index b9c0ecd..09e0dc7 100644
--- a/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-handler.h
+++ b/4a-hal/4a-hal-controllers/4a-hal-controllers-mixer-handler.h
@@ -35,6 +35,6 @@ enum MixerStatus {
};
// HAL controllers handle mixer response function
-int HalCtlsHandleMixerAttachResponse(afb_request *request, struct CtlHalStreamsDataT *currentHalStreamsData, json_object *MixerResponseJ);
+int HalCtlsHandleMixerAttachResponse(AFB_ReqT request, struct CtlHalStreamsDataT *currentHalStreamsData, json_object *MixerResponseJ);
#endif /* _HAL_CTLS_SOFTMIXER_LINK_INCLUDE_ */ \ No newline at end of file