summaryrefslogtreecommitdiffstats
path: root/4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-06-01 21:56:45 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-10-08 15:52:51 +0200
commitb62ab4c3fa9595715538dda7dfa330dcb77b0778 (patch)
tree4b0ae68e77eb7e192fd0900ff2ca03e8db00663c /4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c
parentd7496f864274e75f0635a0c20b93175d00a26114 (diff)
Include afb-definitions when using application framework
Include <afb-definitions.h> from 'app-controller' instead of <afb/afb-binding.h> and use its definitions. It allows to migrate from an application framework version to another with less impact on the code. Change-Id: I22359cd3fe22145b3d6c551f227be2ba7e1b65d5 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to '4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c')
-rw-r--r--4a-hal/4a-hal-controllers/4a-hal-controllers-alsacore-link.c10
1 files changed, 5 insertions, 5 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;