summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfulup <fulup.arfoll@iot.bzh>2017-08-24 13:38:06 +0200
committerfulup <fulup.arfoll@iot.bzh>2017-08-24 13:38:06 +0200
commit74f18989816c648f3c992566b90361bd467f58f1 (patch)
treea50d59f1785a38ba7d14e4bb5616425f1eb506ac
parent4f5e3cc6f42e0c476b44fd8979469d452de7e759 (diff)
Cleanup in reop names
-rw-r--r--ctl-binding/CMakeLists.txt (renamed from afb-source/CMakeLists.txt)9
-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, 30 insertions, 44 deletions
diff --git a/afb-source/CMakeLists.txt b/ctl-binding/CMakeLists.txt
index 40469dc..9000f25 100644
--- a/afb-source/CMakeLists.txt
+++ b/ctl-binding/CMakeLists.txt
@@ -28,7 +28,7 @@ else(CONTROL_SUPPORT_LUA)
endif(CONTROL_SUPPORT_LUA)
# Add target to project dependency list
-PROJECT_TARGET_ADD(controller)
+PROJECT_TARGET_ADD(afb-controller)
# Define project Targets
ADD_LIBRARY(${TARGET_NAME} MODULE ctl-binding.c ctl-timer.c ctl-dispatch.c ${CTL_LUA_SOURCE})
@@ -36,7 +36,7 @@ PROJECT_TARGET_ADD(controller)
SET_OPENAPI_FILENAME("ctl-apidef")
# Binder exposes a unique public entry point
SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
- PREFIX "afb-"
+ PREFIX ""
LABELS "BINDINGV2"
LINK_FLAGS ${BINDINGS_LINK_FLAG}
OUTPUT_NAME ${TARGET_NAME}
@@ -47,3 +47,8 @@ PROJECT_TARGET_ADD(controller)
${link_libraries}
)
+ # Define target includes for this target client
+ TARGET_INCLUDE_DIRECTORIES(${TARGET_NAME}
+ PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
+ )
+
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>