summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--afb-source/CMakeLists.txt49
-rw-r--r--ctl-binding/ctl-apidef.h (renamed from afb-source/ctl-apidef.h)44
-rw-r--r--ctl-binding/ctl-apidef.json (renamed from afb-source/ctl-apidef.json)0
-rw-r--r--ctl-binding/ctl-binding.c (renamed from afb-source/ctl-binding.c)0
-rw-r--r--ctl-binding/ctl-binding.h (renamed from afb-source/ctl-binding.h)0
-rw-r--r--ctl-binding/ctl-dispatch.c (renamed from afb-source/ctl-dispatch.c)0
-rw-r--r--ctl-binding/ctl-lua.c (renamed from afb-source/ctl-lua.c)0
-rw-r--r--ctl-binding/ctl-policy.c (renamed from afb-source/ctl-policy.c)0
-rw-r--r--ctl-binding/ctl-timer.c (renamed from afb-source/ctl-timer.c)0
-rw-r--r--ctl-plugin/CMakeLists.txt1
-rw-r--r--nbproject/configurations.xml20
11 files changed, 23 insertions, 91 deletions
diff --git a/afb-source/CMakeLists.txt b/afb-source/CMakeLists.txt
deleted file mode 100644
index f557619..0000000
--- a/afb-source/CMakeLists.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-###########################################################################
-# Copyright 2015, 2016, 2017 IoT.bzh
-#
-# author: Fulup Ar Foll <fulup@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.
-###########################################################################
-
-# Include LUA only when requested
-if(CONTROL_SUPPORT_LUA)
- message(STATUS "Notice: LUA Controler Support Selected")
- set(CTL_LUA_SOURCE ctl-lua.c)
- ADD_COMPILE_OPTIONS(-DCONTROL_SUPPORT_LUA)
- ADD_COMPILE_OPTIONS(-DCONTROL_LUA_EVENT="luaevt")
- ADD_COMPILE_OPTIONS(-DCONTROL_LUA_PATH="${CMAKE_SOURCE_DIR}/conf.d/project/lua.d:${CMAKE_INSTALL_PREFIX}/controller-plugins/ctl-lua.d")
-else(CONTROL_SUPPORT_LUA)
- message(STATUS "Warning: LUA Without Support ")
-endif(CONTROL_SUPPORT_LUA)
-
-# Add target to project dependency list
-PROJECT_TARGET_ADD(controller)
-
- # Define project Targets
- ADD_LIBRARY(${TARGET_NAME} MODULE ctl-binding.c ctl-timer.c ctl-dispatch.c ${CTL_LUA_SOURCE})
-
- SET_OPENAPI_FILENAME("ctl-apidef")
- # Binder exposes a unique public entry point
- SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
- PREFIX "afb-"
- LABELS "BINDINGV2"
- LINK_FLAGS ${BINDINGS_LINK_FLAG}
- OUTPUT_NAME ${TARGET_NAME}
- )
-
- TARGET_LINK_LIBRARIES(${TARGET_NAME}
- afb-utilities
- ${link_libraries}
- )
-
diff --git a/afb-source/ctl-apidef.h b/ctl-binding/ctl-apidef.h
index 5738f64..c408d5e 100644
--- a/afb-source/ctl-apidef.h
+++ b/ctl-binding/ctl-apidef.h
@@ -1,18 +1,18 @@
-static const char _afb_description_v2_aaaa[] =
+static const char _afb_description_v2_control[] =
"{\"openapi\":\"3.0.0\",\"$schema\":\"http:iot.bzh/download/openapi/schem"
"a-3.0/default-schema.json\",\"info\":{\"description\":\"\",\"title\":\"c"
- "ontroler\",\"version\":\"1.0\",\"x-binding-c-generator\":{\"api\":\"aaaa"
- "\",\"version\":2,\"prefix\":\"ctlapi_\",\"postfix\":\"\",\"start\":null,"
- "\"onevent\":\"DispatchOneEvent\",\"init\":\"CtlBindingInit\",\"scope\":\""
- "\",\"private\":false}},\"servers\":[{\"url\":\"ws://{host}:{port}/api/po"
- "lctl\",\"description\":\"Unicens2 API.\",\"variables\":{\"host\":{\"defa"
- "ult\":\"localhost\"},\"port\":{\"default\":\"1234\"}},\"x-afb-events\":["
- "{\"$ref\":\"#/components/schemas/afb-event\"}]}],\"components\":{\"schem"
- "as\":{\"afb-reply\":{\"$ref\":\"#/components/schemas/afb-reply-v2\"},\"a"
- "fb-event\":{\"$ref\":\"#/components/schemas/afb-event-v2\"},\"afb-reply-"
- "v2\":{\"title\":\"Generic response.\",\"type\":\"object\",\"required\":["
- "\"jtype\",\"request\"],\"properties\":{\"jtype\":{\"type\":\"string\",\""
+ "ontroler\",\"version\":\"1.0\",\"x-binding-c-generator\":{\"api\":\"cont"
+ "rol\",\"version\":2,\"prefix\":\"ctlapi_\",\"postfix\":\"\",\"start\":nu"
+ "ll,\"onevent\":\"DispatchOneEvent\",\"init\":\"CtlBindingInit\",\"scope\""
+ ":\"\",\"private\":false}},\"servers\":[{\"url\":\"ws://{host}:{port}/api"
+ "/polctl\",\"description\":\"Unicens2 API.\",\"variables\":{\"host\":{\"d"
+ "efault\":\"localhost\"},\"port\":{\"default\":\"1234\"}},\"x-afb-events\""
+ ":[{\"$ref\":\"#/components/schemas/afb-event\"}]}],\"components\":{\"sch"
+ "emas\":{\"afb-reply\":{\"$ref\":\"#/components/schemas/afb-reply-v2\"},\""
+ "afb-event\":{\"$ref\":\"#/components/schemas/afb-event-v2\"},\"afb-reply"
+ "-v2\":{\"title\":\"Generic response.\",\"type\":\"object\",\"required\":"
+ "[\"jtype\",\"request\"],\"properties\":{\"jtype\":{\"type\":\"string\",\""
"const\":\"afb-reply\"},\"request\":{\"type\":\"object\",\"required\":[\""
"status\"],\"properties\":{\"status\":{\"type\":\"string\"},\"info\":{\"t"
"ype\":\"string\"},\"token\":{\"type\":\"string\"},\"uuid\":{\"type\":\"s"
@@ -53,7 +53,7 @@ static const char _afb_description_v2_aaaa[] =
"}}}}}"
;
-static const struct afb_auth _afb_auths_v2_aaaa[] = {
+static const struct afb_auth _afb_auths_v2_control[] = {
{ .type = afb_auth_Permission, .text = "urn:AGL:permission:audio:public:control" },
{ .type = afb_auth_Permission, .text = "urn:AGL:permission:audio:public:dispatch" },
{ .type = afb_auth_Permission, .text = "urn:AGL:permission:audio:public:request" },
@@ -66,39 +66,39 @@ static const struct afb_auth _afb_auths_v2_aaaa[] = {
void ctlapi_request(struct afb_req req);
void ctlapi_debuglua(struct afb_req req);
-static const struct afb_verb_v2 _afb_verbs_v2_aaaa[] = {
+static const struct afb_verb_v2 _afb_verbs_v2_control[] = {
{
.verb = "ping",
.callback = ctlapi_ping,
- .auth = &_afb_auths_v2_aaaa[0],
+ .auth = &_afb_auths_v2_control[0],
.info = NULL,
.session = AFB_SESSION_NONE_V2
},
{
.verb = "subscribe",
.callback = ctlapi_subscribe,
- .auth = &_afb_auths_v2_aaaa[0],
+ .auth = &_afb_auths_v2_control[0],
.info = NULL,
.session = AFB_SESSION_NONE_V2
},
{
.verb = "dispatch",
.callback = ctlapi_dispatch,
- .auth = &_afb_auths_v2_aaaa[1],
+ .auth = &_afb_auths_v2_control[1],
.info = NULL,
.session = AFB_SESSION_NONE_V2
},
{
.verb = "request",
.callback = ctlapi_request,
- .auth = &_afb_auths_v2_aaaa[2],
+ .auth = &_afb_auths_v2_control[2],
.info = NULL,
.session = AFB_SESSION_NONE_V2
},
{
.verb = "debuglua",
.callback = ctlapi_debuglua,
- .auth = &_afb_auths_v2_aaaa[3],
+ .auth = &_afb_auths_v2_control[3],
.info = NULL,
.session = AFB_SESSION_NONE_V2
},
@@ -106,10 +106,10 @@ static const struct afb_verb_v2 _afb_verbs_v2_aaaa[] = {
};
const struct afb_binding_v2 afbBindingV2 = {
- .api = "aaaa",
- .specification = _afb_description_v2_aaaa,
+ .api = "control",
+ .specification = _afb_description_v2_control,
.info = NULL,
- .verbs = _afb_verbs_v2_aaaa,
+ .verbs = _afb_verbs_v2_control,
.preinit = NULL,
.init = CtlBindingInit,
.onevent = DispatchOneEvent,
diff --git a/afb-source/ctl-apidef.json b/ctl-binding/ctl-apidef.json
index a8b433e..a8b433e 100644
--- a/afb-source/ctl-apidef.json
+++ b/ctl-binding/ctl-apidef.json
diff --git a/afb-source/ctl-binding.c b/ctl-binding/ctl-binding.c
index 6840b5c..6840b5c 100644
--- a/afb-source/ctl-binding.c
+++ b/ctl-binding/ctl-binding.c
diff --git a/afb-source/ctl-binding.h b/ctl-binding/ctl-binding.h
index f159440..f159440 100644
--- a/afb-source/ctl-binding.h
+++ b/ctl-binding/ctl-binding.h
diff --git a/afb-source/ctl-dispatch.c b/ctl-binding/ctl-dispatch.c
index bbc15ad..bbc15ad 100644
--- a/afb-source/ctl-dispatch.c
+++ b/ctl-binding/ctl-dispatch.c
diff --git a/afb-source/ctl-lua.c b/ctl-binding/ctl-lua.c
index 8d5a87e..8d5a87e 100644
--- a/afb-source/ctl-lua.c
+++ b/ctl-binding/ctl-lua.c
diff --git a/afb-source/ctl-policy.c b/ctl-binding/ctl-policy.c
index 9fe220c..9fe220c 100644
--- a/afb-source/ctl-policy.c
+++ b/ctl-binding/ctl-policy.c
diff --git a/afb-source/ctl-timer.c b/ctl-binding/ctl-timer.c
index 50e181b..50e181b 100644
--- a/afb-source/ctl-timer.c
+++ b/ctl-binding/ctl-timer.c
diff --git a/ctl-plugin/CMakeLists.txt b/ctl-plugin/CMakeLists.txt
index c745cef..070a1d3 100644
--- a/ctl-plugin/CMakeLists.txt
+++ b/ctl-plugin/CMakeLists.txt
@@ -43,6 +43,7 @@ PROJECT_TARGET_ADD(audio-plugin-sample)
# Library dependencies (include updates automatically)
TARGET_LINK_LIBRARIES(${TARGET_NAME}
afb-utilities
+ afb-controller
${link_libraries}
)
diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml
index 71d6f6a..c894fc0 100644
--- a/nbproject/configurations.xml
+++ b/nbproject/configurations.xml
@@ -30,9 +30,6 @@
<in>feature_tests.cxx</in>
</df>
</df>
- <df name="ctl-plugin">
- <in>ctl-plugin-sample.c</in>
- </df>
</df>
<logicalFolder name="ExternalFiles"
displayName="Important Files"
@@ -102,7 +99,6 @@
<Elem>CONTROL_PLUGIN_PATH="/home/fulup/Workspace/AGL-AppFW/afb-controller/build:/home/fulup/opt/Controller-binding/lib/controller-plugins:/usr/lib/afb/controller-plugins/ctlplug"</Elem>
<Elem>CONTROL_SUPPORT_LUA</Elem>
<Elem>CTL_PLUGIN_MAGIC=2468013579</Elem>
- <Elem>NATIVE_LINUX</Elem>
<Elem>control_afb_EXPORTS</Elem>
</preprocessorList>
</cTool>
@@ -208,10 +204,6 @@
</item>
<item path="build/CMakeFiles/feature_tests.cxx" ex="false" tool="1" flavor2="4">
</item>
- <item path="ctl-plugin/ctl-plugin-sample.c" ex="false" tool="0" flavor2="3">
- <cTool flags="1">
- </cTool>
- </item>
<folder path="0/build">
<cTool>
<incDir>
@@ -219,18 +211,6 @@
</incDir>
</cTool>
</folder>
- <folder path="0/ctl-plugin">
- <cTool>
- <incDir>
- <pElem>../../../opt/include/afb</pElem>
- <pElem>ctl-plugin</pElem>
- <pElem>/usr/include/json-c</pElem>
- <pElem>/usr/include/lua5.3</pElem>
- <pElem>afb-source</pElem>
- <pElem>build/ctl-plugin</pElem>
- </incDir>
- </cTool>
- </folder>
</conf>
</confs>
</configurationDescriptor>