aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-03-29 17:44:48 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2019-04-02 09:07:20 +0200
commit0083a4b55b009b08d9c50c699878dcc7b8a0f0f5 (patch)
treed8bc4a4d47ee90a7c4e7a3dddf2967433fb28b6a
parentfe311f49703e9691fa7d515ed84a70b996f7f3e8 (diff)
Git submodule migration to separated librariessandbox/claneys/submigration
- Replace controller binder functions definition with the binder ones. and remove the last used submodules to use the separated libraries. Bug-AGL: SPEC-2139 Change-Id: I06e5e7a03a918bf0ce139636104e1a73d2442a09 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--.gitmodules6
m---------afb-helpers0
-rwxr-xr-xconf.d/autobuild/agl/autobuild67
-rwxr-xr-xconf.d/autobuild/linux/autobuild67
-rw-r--r--conf.d/cmake/01-debian-config.cmake2
-rw-r--r--conf.d/cmake/config.cmake2
m---------ctl-utilities0
-rw-r--r--plugins/CMakeLists.txt18
-rw-r--r--plugins/builtin.cpp1
-rw-r--r--signal-composer-binding/CMakeLists.txt6
-rw-r--r--signal-composer-binding/clientApp.cpp4
-rw-r--r--signal-composer-binding/clientApp.hpp6
-rw-r--r--signal-composer-binding/signal-composer-binding.cpp22
-rw-r--r--signal-composer-binding/signal-composer.cpp16
-rw-r--r--signal-composer-binding/signal-composer.hpp16
-rw-r--r--signal-composer-binding/source.cpp8
-rw-r--r--signal-composer-binding/source.hpp6
-rw-r--r--test/afb-test/fixtures/txc-binding/CMakeLists.txt5
18 files changed, 44 insertions, 208 deletions
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 596e1b1..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,6 +0,0 @@
-[submodule "ctl-utilities"]
- path = ctl-utilities
- url = https://gerrit.automotivelinux.org/gerrit/apps/app-controller-submodule
-[submodule "afb-helpers"]
- path = afb-helpers
- url = https://gerrit.automotivelinux.org/gerrit/apps/app-afb-helpers-submodule
diff --git a/afb-helpers b/afb-helpers
deleted file mode 160000
-Subproject f0ce5b665dd33b285d723720c16ac0542cde4e6
diff --git a/conf.d/autobuild/agl/autobuild b/conf.d/autobuild/agl/autobuild
deleted file mode 100755
index 83097ab..0000000
--- a/conf.d/autobuild/agl/autobuild
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/make -f
-# Copyright (C) 2015, 2016 "IoT.bzh"
-# Author "Romain Forlot" <romain.forlot@iot.bzh>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-THISFILE := $(lastword $(MAKEFILE_LIST))
-BUILD_DIR := $(abspath $(dir $(THISFILE)/../../../../..)/build)
-DEST := ${BUILD_DIR}/target
-
-.PHONY: all clean distclean configure build package help update
-
-all: help
-
-help:
- @echo "List of targets available:"
- @echo ""
- @echo "- all"
- @echo "- clean"
- @echo "- distclean"
- @echo "- configure"
- @echo "- build: compilation, link and prepare files for package into a widget"
- @echo "- package: output a widget file '*.wgt'"
- @echo "- install: install in your ${CMAKE_INSTALL_DIR} directory"
- @echo ""
- @echo "Usage: ./conf.d/autobuild/agl/autobuild package DEST=${HOME}/opt"
- @echo "Don't use your build dir as DEST as wgt file is generated at this location"
-
-update: configure
- @cmake --build ${BUILD_DIR} --target autobuild
-
-clean:
- @([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} clean) || echo Nothing to clean
-
-distclean:
- @rm -rf ${BUILD_DIR}
-
-configure: ${BUILD_DIR}/Makefile
-
-build: configure
- @cmake --build ${BUILD_DIR} ${BUILD_ARGS} --target all
-
-package: build
- @mkdir -p ${BUILD_DIR}/$@/bin
- @mkdir -p ${BUILD_DIR}/$@/etc
- @mkdir -p ${BUILD_DIR}/$@/lib
- @mkdir -p ${BUILD_DIR}/$@/htdocs
- @mkdir -p ${BUILD_DIR}/$@/var
- @cmake --build ${BUILD_DIR} --target widget
- @mkdir -p ${DEST} && cp ${BUILD_DIR}/*wgt ${DEST}
-
-install: build
- @cmake --build ${BUILD_DIR} --target install
-
-${BUILD_DIR}/Makefile:
- @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
- @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake ${CONFIGURE_ARGS} ..)
diff --git a/conf.d/autobuild/linux/autobuild b/conf.d/autobuild/linux/autobuild
deleted file mode 100755
index 83097ab..0000000
--- a/conf.d/autobuild/linux/autobuild
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/make -f
-# Copyright (C) 2015, 2016 "IoT.bzh"
-# Author "Romain Forlot" <romain.forlot@iot.bzh>
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-THISFILE := $(lastword $(MAKEFILE_LIST))
-BUILD_DIR := $(abspath $(dir $(THISFILE)/../../../../..)/build)
-DEST := ${BUILD_DIR}/target
-
-.PHONY: all clean distclean configure build package help update
-
-all: help
-
-help:
- @echo "List of targets available:"
- @echo ""
- @echo "- all"
- @echo "- clean"
- @echo "- distclean"
- @echo "- configure"
- @echo "- build: compilation, link and prepare files for package into a widget"
- @echo "- package: output a widget file '*.wgt'"
- @echo "- install: install in your ${CMAKE_INSTALL_DIR} directory"
- @echo ""
- @echo "Usage: ./conf.d/autobuild/agl/autobuild package DEST=${HOME}/opt"
- @echo "Don't use your build dir as DEST as wgt file is generated at this location"
-
-update: configure
- @cmake --build ${BUILD_DIR} --target autobuild
-
-clean:
- @([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} clean) || echo Nothing to clean
-
-distclean:
- @rm -rf ${BUILD_DIR}
-
-configure: ${BUILD_DIR}/Makefile
-
-build: configure
- @cmake --build ${BUILD_DIR} ${BUILD_ARGS} --target all
-
-package: build
- @mkdir -p ${BUILD_DIR}/$@/bin
- @mkdir -p ${BUILD_DIR}/$@/etc
- @mkdir -p ${BUILD_DIR}/$@/lib
- @mkdir -p ${BUILD_DIR}/$@/htdocs
- @mkdir -p ${BUILD_DIR}/$@/var
- @cmake --build ${BUILD_DIR} --target widget
- @mkdir -p ${DEST} && cp ${BUILD_DIR}/*wgt ${DEST}
-
-install: build
- @cmake --build ${BUILD_DIR} --target install
-
-${BUILD_DIR}/Makefile:
- @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
- @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake ${CONFIGURE_ARGS} ..)
diff --git a/conf.d/cmake/01-debian-config.cmake b/conf.d/cmake/01-debian-config.cmake
index 6291a0d..0e5a695 100644
--- a/conf.d/cmake/01-debian-config.cmake
+++ b/conf.d/cmake/01-debian-config.cmake
@@ -1 +1 @@
-list(APPEND PKG_REQUIRED_LIST lua53>=5.3)
+list(APPEND PKG_REQUIRED_LIST lua53-c++>=5.3)
diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake
index 7ebb402..380132b 100644
--- a/conf.d/cmake/config.cmake
+++ b/conf.d/cmake/config.cmake
@@ -72,6 +72,8 @@ set (PKG_REQUIRED_LIST
libsystemd>=222
afb-daemon>=4.0
uuid
+ afb-helpers
+ appcontroller
)
# Prefix path where will be installed the files
diff --git a/ctl-utilities b/ctl-utilities
deleted file mode 160000
-Subproject 33abde52666af1335571252143d21de5d305ca9
diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt
index c8ec93c..7fe36ff 100644
--- a/plugins/CMakeLists.txt
+++ b/plugins/CMakeLists.txt
@@ -29,13 +29,7 @@ PROJECT_TARGET_ADD(builtin)
OUTPUT_NAME ${TARGET_NAME}
)
- # Library dependencies (include updates automatically)
- TARGET_LINK_LIBRARIES(${TARGET_NAME}
- ${link_libraries}
- )
-
target_include_directories(${TARGET_NAME}
- PRIVATE "../ctl-utilities/ctl-lib"
PRIVATE "../signal-composer-binding")
PROJECT_TARGET_ADD(low-can)
@@ -51,13 +45,7 @@ PROJECT_TARGET_ADD(low-can)
OUTPUT_NAME ${TARGET_NAME}
)
- # Library dependencies (include updates automatically)
- TARGET_LINK_LIBRARIES(${TARGET_NAME}
- ${link_libraries}
- )
-
target_include_directories(${TARGET_NAME}
- PRIVATE "../ctl-utilities/ctl-lib"
PRIVATE "../signal-composer-binding")
PROJECT_TARGET_ADD(gps)
@@ -73,11 +61,5 @@ PROJECT_TARGET_ADD(gps)
OUTPUT_NAME ${TARGET_NAME}
)
- # Library dependencies (include updates automatically)
- TARGET_LINK_LIBRARIES(${TARGET_NAME}
- ${link_libraries}
- )
-
target_include_directories(${TARGET_NAME}
- PRIVATE "../ctl-utilities/ctl-lib"
PRIVATE "../signal-composer-binding")
diff --git a/plugins/builtin.cpp b/plugins/builtin.cpp
index 28bcba7..45604fc 100644
--- a/plugins/builtin.cpp
+++ b/plugins/builtin.cpp
@@ -15,6 +15,7 @@
* limitations under the License.
*
*/
+#define CTL_PLUGIN_MAGIC 1286576532
#include <afb/afb-binding.h>
#include <systemd/sd-event.h>
diff --git a/signal-composer-binding/CMakeLists.txt b/signal-composer-binding/CMakeLists.txt
index 2f99203..bbb6330 100644
--- a/signal-composer-binding/CMakeLists.txt
+++ b/signal-composer-binding/CMakeLists.txt
@@ -34,9 +34,3 @@ PROJECT_TARGET_ADD(signal-composer)
TARGET_INCLUDE_DIRECTORIES(${TARGET_NAME}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
)
-
- # Library dependencies (include updates automatically)
- TARGET_LINK_LIBRARIES(${TARGET_NAME}
- ctl-utilities
- ${link_libraries}
- )
diff --git a/signal-composer-binding/clientApp.cpp b/signal-composer-binding/clientApp.cpp
index 7ead993..f41086c 100644
--- a/signal-composer-binding/clientApp.cpp
+++ b/signal-composer-binding/clientApp.cpp
@@ -79,14 +79,14 @@ void clientAppCtx::subtractSignals(std::vector<std::shared_ptr<Signal>>& sigV)
}
}
-int clientAppCtx::makeSubscription(AFB_ReqT request)
+int clientAppCtx::makeSubscription(afb_req_t request)
{
event_ = afb_event_is_valid(event_) ?
event_ : afb_daemon_make_event(uuid_.c_str());
return afb_req_subscribe(request, event_);
}
-int clientAppCtx::makeUnsubscription(AFB_ReqT request)
+int clientAppCtx::makeUnsubscription(afb_req_t request)
{
if(subscribedSignals_.empty())
{
diff --git a/signal-composer-binding/clientApp.hpp b/signal-composer-binding/clientApp.hpp
index 84746fa..a9c9636 100644
--- a/signal-composer-binding/clientApp.hpp
+++ b/signal-composer-binding/clientApp.hpp
@@ -23,13 +23,13 @@ class clientAppCtx: public Observer<Signal>
private:
std::string uuid_;
std::vector<std::shared_ptr<Signal>> subscribedSignals_;
- AFB_EventT event_;
+ afb_event_t event_;
public:
explicit clientAppCtx(const char* uuid);
void update(Signal* sig);
void appendSignals(std::vector<std::shared_ptr<Signal>>& sigV);
void subtractSignals(std::vector<std::shared_ptr<Signal>>& sigV);
- int makeSubscription(AFB_ReqT request);
- int makeUnsubscription(AFB_ReqT request);
+ int makeSubscription(afb_req_t request);
+ int makeUnsubscription(afb_req_t request);
};
diff --git a/signal-composer-binding/signal-composer-binding.cpp b/signal-composer-binding/signal-composer-binding.cpp
index 15b9c93..fb97c71 100644
--- a/signal-composer-binding/signal-composer-binding.cpp
+++ b/signal-composer-binding/signal-composer-binding.cpp
@@ -25,7 +25,7 @@
#include "signal-composer-apidef.h"
#include "clientApp.hpp"
-static int one_subscribe_unsubscribe(AFB_ReqT request,
+static int one_subscribe_unsubscribe(afb_req_t request,
bool subscribe,
const std::string& event,
json_object* args,
@@ -55,7 +55,7 @@ static int one_subscribe_unsubscribe(AFB_ReqT request,
return err;
}
-static int subscribe_unsubscribe(AFB_ReqT request,
+static int subscribe_unsubscribe(afb_req_t request,
bool subscribe,
json_object* args,
clientAppCtx* cContext)
@@ -84,7 +84,7 @@ static int subscribe_unsubscribe(AFB_ReqT request,
}
/// @brief entry point for client subscription request.
-static void do_subscribe_unsubscribe(AFB_ReqT request, bool subscribe, clientAppCtx* cContext)
+static void do_subscribe_unsubscribe(afb_req_t request, bool subscribe, clientAppCtx* cContext)
{
int rc = 0;
json_object *oneArg = nullptr, *args = afb_req_json(request);
@@ -108,7 +108,7 @@ static void do_subscribe_unsubscribe(AFB_ReqT request, bool subscribe, clientApp
}
/// @brief entry point for client un-subscription request.
-void subscribe(AFB_ReqT request)
+void subscribe(afb_req_t request)
{
clientAppCtx *cContext = reinterpret_cast<clientAppCtx*>(afb_req_context(request, 0, Composer::createContext, Composer::destroyContext, nullptr));
@@ -116,7 +116,7 @@ void subscribe(AFB_ReqT request)
}
/// @brief entry point for client un-subscription request.
-void unsubscribe(AFB_ReqT request)
+void unsubscribe(afb_req_t request)
{
clientAppCtx *cContext = reinterpret_cast<clientAppCtx*>(afb_req_context(request, 0, Composer::createContext, Composer::destroyContext, nullptr));
@@ -125,7 +125,7 @@ void unsubscribe(AFB_ReqT request)
/// @brief verb that loads JSON configuration (old SigComp.json file now)
-void addObjects(AFB_ReqT request)
+void addObjects(afb_req_t request)
{
Composer& composer = Composer::instance();
json_object *sourcesJ = nullptr,
@@ -195,7 +195,7 @@ void addObjects(AFB_ReqT request)
}
/// @brief entry point to list available signals
-void list(AFB_ReqT request)
+void list(afb_req_t request)
{
struct json_object *allSignalsJ = json_object_new_array();
@@ -210,7 +210,7 @@ void list(AFB_ReqT request)
}
/// @brief entry point for get requests.
-void get(AFB_ReqT request)
+void get(afb_req_t request)
{
int err = 0, i = 0;
size_t l = 0;
@@ -246,10 +246,10 @@ void get(AFB_ReqT request)
}
-int loadConf(AFB_ApiT api)
+int loadConf(afb_api_t api)
{
int err = 0;
- std::string bindingDirPath = GetBindingDirPath();
+ std::string bindingDirPath = GetBindingDirPath(api);
std::string rootdir = bindingDirPath + "/etc";
err = Composer::instance().loadConfig(api, rootdir);
@@ -257,7 +257,7 @@ int loadConf(AFB_ApiT api)
return err;
}
-int execConf(AFB_ApiT api)
+int execConf(afb_api_t api)
{
Composer& composer = Composer::instance();
int err = 0;
diff --git a/signal-composer-binding/signal-composer.cpp b/signal-composer-binding/signal-composer.cpp
index 324d96e..9abe54e 100644
--- a/signal-composer-binding/signal-composer.cpp
+++ b/signal-composer-binding/signal-composer.cpp
@@ -84,7 +84,7 @@ Composer::~Composer()
free(ctlConfig_);
}
-CtlActionT* Composer::convert2Action(AFB_ApiT apihandle, const std::string& name, json_object* actionJ)
+CtlActionT* Composer::convert2Action(afb_api_t apihandle, const std::string& name, json_object* actionJ)
{
CtlActionT *ctlAction = new CtlActionT;
@@ -96,7 +96,7 @@ CtlActionT* Composer::convert2Action(AFB_ApiT apihandle, const std::string& name
return nullptr;
}
-int Composer::loadOneSourceAPI(AFB_ApiT apihandle, json_object* sourceJ)
+int Composer::loadOneSourceAPI(afb_api_t apihandle, json_object* sourceJ)
{
json_object *initJ = nullptr,
*getSignalsJ = nullptr,
@@ -158,7 +158,7 @@ int Composer::loadOneSourceAPI(AFB_ApiT apihandle, json_object* sourceJ)
return err;
}
-int Composer::loadSourcesAPI(AFB_ApiT apihandle, CtlSectionT* section, json_object *sourcesJ)
+int Composer::loadSourcesAPI(afb_api_t apihandle, CtlSectionT* section, json_object *sourcesJ)
{
int err = 0;
Composer& composer = instance();
@@ -209,7 +209,7 @@ int Composer::loadSourcesAPI(AFB_ApiT apihandle, CtlSectionT* section, json_obje
return err;
}
-int Composer::loadOneSignal(AFB_ApiT apihandle, json_object* signalJ)
+int Composer::loadOneSignal(afb_api_t apihandle, json_object* signalJ)
{
json_object *onReceivedJ = nullptr,
*dependsJ = nullptr,
@@ -334,7 +334,7 @@ int Composer::loadOneSignal(AFB_ApiT apihandle, json_object* signalJ)
return err;
}
-int Composer::loadSignals(AFB_ApiT apihandle, CtlSectionT* section, json_object *signalsJ)
+int Composer::loadSignals(afb_api_t apihandle, CtlSectionT* section, json_object *signalsJ)
{
int err = 0;
Composer& composer = instance();
@@ -421,7 +421,7 @@ void Composer::destroyContext(void* ctx)
delete(reinterpret_cast<clientAppCtx*>(ctx));
}
-int Composer::loadConfig(AFB_ApiT api, std::string& filepath)
+int Composer::loadConfig(afb_api_t api, std::string& filepath)
{
const char *dirList= getenv("CONTROL_CONFIG_PATH");
if (!dirList) dirList=CONTROL_CONFIG_PATH;
@@ -482,7 +482,7 @@ void Composer::initSourcesAPI()
}
}
-int Composer::initSignals(AFB_ReqT request)
+int Composer::initSignals(afb_req_t request)
{
for(int i=0; i < sourcesListV_.size(); i++)
{
@@ -581,7 +581,7 @@ json_object* Composer::getsignalValue(const std::string& sig, json_object* optio
return finalResponse;
}
-int Composer::execSignalsSubscription(AFB_ReqT request)
+int Composer::execSignalsSubscription(afb_req_t request)
{
int err = 0;;
for(std::shared_ptr<SourceAPI> srcAPI: sourcesListV_)
diff --git a/signal-composer-binding/signal-composer.hpp b/signal-composer-binding/signal-composer.hpp
index f70e9ac..bef75ff 100644
--- a/signal-composer-binding/signal-composer.hpp
+++ b/signal-composer-binding/signal-composer.hpp
@@ -34,25 +34,25 @@ private:
Composer();
~Composer();
- CtlActionT* convert2Action(AFB_ApiT apihandle, const std::string& name, json_object* action);
+ CtlActionT* convert2Action(afb_api_t apihandle, const std::string& name, json_object* action);
- int loadOneSourceAPI(AFB_ApiT apihandle, json_object* sourcesJ);
- static int loadSourcesAPI(AFB_ApiT apihandle, CtlSectionT* section, json_object *signalsJ);
+ int loadOneSourceAPI(afb_api_t apihandle, json_object* sourcesJ);
+ static int loadSourcesAPI(afb_api_t apihandle, CtlSectionT* section, json_object *signalsJ);
- int loadOneSignal(AFB_ApiT apihandle, json_object* signalsJ);
- static int loadSignals(AFB_ApiT apihandle, CtlSectionT* section, json_object *signalsJ);
+ int loadOneSignal(afb_api_t apihandle, json_object* signalsJ);
+ static int loadSignals(afb_api_t apihandle, CtlSectionT* section, json_object *signalsJ);
- int execSignalsSubscription(AFB_ReqT request = nullptr);
+ int execSignalsSubscription(afb_req_t request = nullptr);
std::shared_ptr<SourceAPI> getSourceAPI(const std::string& api);
void processOptions(const std::map<std::string, int>& opts, std::shared_ptr<Signal> sig, json_object* response) const;
public:
static Composer& instance();
static void* createContext(void* ctx);
static void destroyContext(void* ctx);
- int loadConfig(AFB_ApiT api, std::string& filepath);
+ int loadConfig(afb_api_t api, std::string& filepath);
int loadSources(json_object* sourcesJ);
int loadSignals(json_object* signalsJ);
- int initSignals(AFB_ReqT request = nullptr);
+ int initSignals(afb_req_t request = nullptr);
void initSourcesAPI();
CtlConfigT* ctlConfig();
diff --git a/signal-composer-binding/source.cpp b/signal-composer-binding/source.cpp
index a33db22..6a06b55 100644
--- a/signal-composer-binding/source.cpp
+++ b/signal-composer-binding/source.cpp
@@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include <cstring>
#include "source.hpp"
#include "signal-composer.hpp"
@@ -47,6 +48,7 @@ void SourceAPI::init()
if(init_)
{
CtlSourceT source;
+ ::memset(&source, 0, sizeof(CtlSourceT));
source.uid = init_->uid;
ActionExecOne(&source, init_, json_object_new_object());
std::string sourceAPI_events = api_ + "/*";
@@ -72,7 +74,7 @@ std::string SourceAPI::api() const
/// @param[in] object - eventual data that comes with the event
/// @param[in] object - the api that subscribed the event
///
-void SourceAPI::onSourceEvents(void *closure, const char *event_name, json_object *event_obj, AFB_ApiT api)
+void SourceAPI::onSourceEvents(void *closure, const char *event_name, json_object *event_obj, afb_api_t api)
{
std::vector<std::shared_ptr<Signal>> signals { Composer::instance().searchSignals(event_name) };
@@ -129,7 +131,7 @@ void SourceAPI::onSourceEvents(void *closure, const char *event_name, json_objec
/// @param[in] object - eventual data that comes with the event
/// @param[in] object - the api that subscribed the event
///
-void SourceAPI::onSignalEvents(void *closure, const char *event_name, json_object *event_obj, AFB_ApiT api)
+void SourceAPI::onSignalEvents(void *closure, const char *event_name, json_object *event_obj, afb_api_t api)
{
Signal *sig = (Signal*) closure;
sig->onReceivedCB(event_obj);
@@ -234,7 +236,7 @@ int SourceAPI::cleanNotSubscribedSignals() {
return erased;
}
-int SourceAPI::makeSubscription(AFB_ReqT request)
+int SourceAPI::makeSubscription(afb_req_t request)
{
int err = 0;
if(getSignals_)
diff --git a/signal-composer-binding/source.hpp b/signal-composer-binding/source.hpp
index bc28b54..a14e925 100644
--- a/signal-composer-binding/source.hpp
+++ b/signal-composer-binding/source.hpp
@@ -47,8 +47,8 @@ public:
void init();
std::string api() const;
- static void onSourceEvents(void *closure, const char *event_name, json_object *event_obj, AFB_ApiT api);
- static void onSignalEvents(void *closure, const char *event_name, json_object *event_obj, AFB_ApiT api);
+ static void onSourceEvents(void *closure, const char *event_name, json_object *event_obj, afb_api_t api);
+ static void onSignalEvents(void *closure, const char *event_name, json_object *event_obj, afb_api_t api);
const struct signalsDefault& signalsDefault() const;
void addSignal(const std::string& id, const std::string& event, std::vector<std::string>& sources, int retention, const std::string& unit, json_object *metadata, double frequency, CtlActionT* onReceived, json_object* getSignalsArgs);
@@ -57,5 +57,5 @@ public:
std::vector<std::shared_ptr<Signal>> searchSignals(const std::string& name);
int cleanNotSubscribedSignals();
- int makeSubscription(AFB_ReqT request = nullptr);
+ int makeSubscription(afb_req_t request = nullptr);
};
diff --git a/test/afb-test/fixtures/txc-binding/CMakeLists.txt b/test/afb-test/fixtures/txc-binding/CMakeLists.txt
index 7278a3f..b65e529 100644
--- a/test/afb-test/fixtures/txc-binding/CMakeLists.txt
+++ b/test/afb-test/fixtures/txc-binding/CMakeLists.txt
@@ -29,8 +29,3 @@ PROJECT_TARGET_ADD(txc-binding)
LABELS "TEST-PLUGIN"
OUTPUT_NAME ${TARGET_NAME}
)
-
- # Library dependencies (include updates automatically)
- TARGET_LINK_LIBRARIES(${TARGET_NAME}
- ctl-utilities
- ${link_libraries})