aboutsummaryrefslogtreecommitdiffstats
path: root/mixer-binding/mixer-binding.c
diff options
context:
space:
mode:
Diffstat (limited to 'mixer-binding/mixer-binding.c')
-rw-r--r--mixer-binding/mixer-binding.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/mixer-binding/mixer-binding.c b/mixer-binding/mixer-binding.c
index ed5b5a8..64a7f05 100644
--- a/mixer-binding/mixer-binding.c
+++ b/mixer-binding/mixer-binding.c
@@ -35,24 +35,24 @@ static CtlSectionT ctrlSections[]= {
{.key=NULL}
};
-STATIC void ctrlapi_ping (AFB_ReqT request) {
+STATIC void ctrlapi_ping (afb_req_t request) {
static int count=0;
count++;
- AFB_ReqNotice (request, "Controller:ping count=%d", count);
- AFB_ReqSuccess(request,json_object_new_int(count), NULL);
+ AFB_REQ_NOTICE (request, "Controller:ping count=%d", count);
+ afb_req_success(request,json_object_new_int(count), NULL);
return;
}
// Every HAL export the same API & Interface Mapping from SndCard to AudioLogic is done through alsaHalSndCardT
-STATIC AFB_ApiVerbs CtrlApiVerbs[] = {
+STATIC afb_verb_t CtrlApiVerbs[] = {
/* VERB'S NAME FUNCTION TO CALL SHORT DESCRIPTION */
{ .verb = "ping", .callback = ctrlapi_ping , .info = "ping test for API"},
{ .verb = NULL} /* marker for end of the array */
};
-STATIC int CtrlLoadStaticVerbs (afb_api_t apiHandle, AFB_ApiVerbs *verbs) {
+STATIC int CtrlLoadStaticVerbs (afb_api_t apiHandle, afb_verb_t *verbs) {
int errcount=0;
for (int idx=0; verbs[idx].verb; idx++) {
@@ -71,7 +71,7 @@ STATIC int CtrlLoadStaticVerbs (afb_api_t apiHandle, AFB_ApiVerbs *verbs) {
#include <signal.h>
-STATIC int CtrlLoadOneApi (void *cbdata, AFB_ApiT apiHandle) {
+STATIC int CtrlLoadOneApi (void *cbdata, afb_api_t apiHandle) {
CtlConfigT *ctrlConfig = (CtlConfigT*) cbdata;
// save closure as api's data context
@@ -80,7 +80,7 @@ STATIC int CtrlLoadOneApi (void *cbdata, AFB_ApiT apiHandle) {
// add static controls verbs
int error = CtrlLoadStaticVerbs (apiHandle, CtrlApiVerbs);
if (error) {
- AFB_ApiError(apiHandle, "CtrlLoadSection fail to Registry static V2 verbs");
+ AFB_API_ERROR(apiHandle, "CtrlLoadSection fail to Registry static V2 verbs");
goto OnErrorExit;
}
@@ -102,30 +102,30 @@ PUBLIC int afbBindingEntry(afb_api_t apiHandle) {
AFB_default = apiHandle;
- AFB_ApiNotice (apiHandle, "Controller in afbBindingEntry");
+ AFB_API_NOTICE (apiHandle, "Controller in afbBindingEntry");
const char *dirList= getenv("CONTROL_CONFIG_PATH");
if (!dirList) dirList=CONTROL_CONFIG_PATH;
const char *configPath = CtlConfigSearch(apiHandle, dirList, "smixer");
if (!configPath) {
- AFB_ApiError(apiHandle, "CtlPreInit: No smixer-%s-* config found in %s ", GetBinderName(), dirList);
+ AFB_API_ERROR(apiHandle, "CtlPreInit: No smixer-%s-* config found in %s ", GetBinderName(), dirList);
goto OnErrorExit;
}
// load config file and create API
CtlConfigT *ctrlConfig = CtlLoadMetaData (apiHandle, configPath);
if (!ctrlConfig) {
- AFB_ApiError(apiHandle, "CtrlBindingDyn No valid control config file in:\n-- %s", configPath);
+ AFB_API_ERROR(apiHandle, "CtrlBindingDyn No valid control config file in:\n-- %s", configPath);
goto OnErrorExit;
}
if (!ctrlConfig->api) {
- AFB_ApiError(apiHandle, "CtrlBindingDyn API Missing from metadata in:\n-- %s", configPath);
+ AFB_API_ERROR(apiHandle, "CtrlBindingDyn API Missing from metadata in:\n-- %s", configPath);
goto OnErrorExit;
}
- AFB_ApiNotice (apiHandle, "Controller API='%s' info='%s'", ctrlConfig->api, ctrlConfig->info);
+ AFB_API_NOTICE (apiHandle, "Controller API='%s' info='%s'", ctrlConfig->api, ctrlConfig->info);
// create one API per config file (Pre-V3 return code ToBeChanged)
afb_api_t handle = afb_api_new_api(apiHandle, ctrlConfig->api, ctrlConfig->info, 1, CtrlLoadOneApi, ctrlConfig);