summaryrefslogtreecommitdiffstats
path: root/mixer-binding
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-01-23 16:46:45 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2019-01-24 11:45:09 +0100
commitd5cc09d1ef5c58bb8d34e3a47c391a10d8b48181 (patch)
tree36b65c43fb60ae0ac22b09c832677be2f5fada1e /mixer-binding
parent17ad00443eecdb2ed7b92da01c7be6f316e04b64 (diff)
Git submodule migration to separated libraries
- Replace controller binder functions definition with the binder ones. and remove the last used submodules to use the separated libraries. - Add liburcu as a project dependency in addition to the others ones. Bug-AGL: SPEC-2139 Change-Id: If46eed24018e28e58d1e62397f4355d2aa46a58e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'mixer-binding')
-rw-r--r--mixer-binding/CMakeLists.txt8
-rw-r--r--mixer-binding/mixer-binding.c24
2 files changed, 13 insertions, 19 deletions
diff --git a/mixer-binding/CMakeLists.txt b/mixer-binding/CMakeLists.txt
index 9e79a21..c15c0b6 100644
--- a/mixer-binding/CMakeLists.txt
+++ b/mixer-binding/CMakeLists.txt
@@ -29,12 +29,6 @@ PROJECT_TARGET_ADD(softmixer-binding)
OUTPUT_NAME ${TARGET_NAME}
)
- TARGET_LINK_LIBRARIES(${TARGET_NAME}
- afb-helpers
- ctl-utilities
- ${link_libraries}
- )
-
# Define target includes for this target client
TARGET_INCLUDE_DIRECTORIES(${TARGET_NAME}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
@@ -46,4 +40,4 @@ PROJECT_TARGET_ADD(softmixer-binding)
)
# make sure config is copied before starting
- add_dependencies(${TARGET_NAME} softmixer-config softmixer-lua softmixer-html5) \ No newline at end of file
+ add_dependencies(${TARGET_NAME} softmixer-config softmixer-lua softmixer-html5)
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);