En court
authorFulup Ar Foll <fulup@iot.bzh>
Wed, 16 Dec 2015 14:38:27 +0000 (15:38 +0100)
committerFulup Ar Foll <fulup@iot.bzh>
Wed, 16 Dec 2015 14:38:27 +0000 (15:38 +0100)
nbproject/configurations.xml
plugins/radio/radio-api.c
plugins/session/token-api.c

index 6b0679d..23e0191 100644 (file)
@@ -48,7 +48,8 @@
       </toolsSet>
       <flagsDictionary>
         <element flagsID="0" commonFlags="-fPIE"/>
-        <element flagsID="1" commonFlags="-mtune=generic -march=x86-64 -fPIE"/>
+        <element flagsID="1" commonFlags="-mtune=generic -march=x86-64 -fPIC"/>
+        <element flagsID="2" commonFlags="-mtune=generic -march=x86-64 -fPIE"/>
       </flagsDictionary>
       <codeAssistance>
       </codeAssistance>
           <preBuildFirst>true</preBuildFirst>
         </preBuild>
       </makefileType>
-      <item path="src/afbs-api.c" ex="false" tool="0" flavor2="2">
+      <item path="plugins/audio/audio-api.c" ex="false" tool="0" flavor2="2">
         <cTool flags="1">
           <incDir>
-            <pElem>src</pElem>
+            <pElem>plugins/audio</pElem>
             <pElem>/usr/include/json-c</pElem>
             <pElem>include</pElem>
             <pElem>/usr/include/uuid</pElem>
-            <pElem>build/src</pElem>
+            <pElem>build/plugins</pElem>
           </incDir>
-          <preprocessorList>
-            <Elem>__PIC__=2</Elem>
-            <Elem>__PIE__=2</Elem>
-            <Elem>__REGISTER_PREFIX__=</Elem>
-            <Elem>__USER_LABEL_PREFIX__=</Elem>
-            <Elem>__pic__=2</Elem>
-            <Elem>__pie__=2</Elem>
-          </preprocessorList>
         </cTool>
       </item>
-      <item path="src/alsa-api.c" ex="false" tool="0" flavor2="2">
+      <item path="plugins/samples/HelloWorld.c" ex="false" tool="0" flavor2="2">
         <cTool flags="1">
           <incDir>
-            <pElem>src</pElem>
+            <pElem>plugins/samples</pElem>
             <pElem>/usr/include/json-c</pElem>
             <pElem>include</pElem>
             <pElem>/usr/include/uuid</pElem>
-            <pElem>build/src</pElem>
+            <pElem>build/plugins</pElem>
           </incDir>
-          <preprocessorList>
-            <Elem>__PIC__=2</Elem>
-            <Elem>__PIE__=2</Elem>
-            <Elem>__REGISTER_PREFIX__=</Elem>
-            <Elem>__USER_LABEL_PREFIX__=</Elem>
-            <Elem>__pic__=2</Elem>
-            <Elem>__pie__=2</Elem>
-          </preprocessorList>
         </cTool>
       </item>
-      <item path="src/config.c" ex="false" tool="0" flavor2="2">
+      <item path="plugins/session/token-api.c" ex="false" tool="0" flavor2="2">
         <cTool flags="1">
           <incDir>
-            <pElem>src</pElem>
+            <pElem>plugins/session</pElem>
             <pElem>/usr/include/json-c</pElem>
             <pElem>include</pElem>
             <pElem>/usr/include/uuid</pElem>
+            <pElem>build/plugins</pElem>
+          </incDir>
+        </cTool>
+      </item>
+      <item path="src/afbs-api.c" ex="false" tool="0" flavor2="2">
+        <cTool flags="0">
+          <incDir>
+            <pElem>include</pElem>
+            <pElem>/usr/include/json-c</pElem>
             <pElem>build/src</pElem>
           </incDir>
-          <preprocessorList>
-            <Elem>__PIC__=2</Elem>
-            <Elem>__PIE__=2</Elem>
-            <Elem>__REGISTER_PREFIX__=</Elem>
-            <Elem>__USER_LABEL_PREFIX__=</Elem>
-            <Elem>__pic__=2</Elem>
-            <Elem>__pie__=2</Elem>
-          </preprocessorList>
         </cTool>
       </item>
-      <item path="src/dbus-api.c" ex="false" tool="0" flavor2="2">
-        <cTool flags="1">
+      <item path="src/alsa-api.c" ex="false" tool="0" flavor2="2">
+        <cTool flags="0">
+          <incDir>
+            <pElem>include</pElem>
+            <pElem>/usr/include/json-c</pElem>
+            <pElem>build/src</pElem>
+          </incDir>
+        </cTool>
+      </item>
+      <item path="src/config.c" ex="false" tool="0" flavor2="2">
+        <cTool flags="2">
           <incDir>
             <pElem>src</pElem>
             <pElem>/usr/include/json-c</pElem>
           </preprocessorList>
         </cTool>
       </item>
+      <item path="src/dbus-api.c" ex="false" tool="0" flavor2="2">
+        <cTool flags="0">
+          <incDir>
+            <pElem>include</pElem>
+            <pElem>/usr/include/json-c</pElem>
+            <pElem>build/src</pElem>
+          </incDir>
+        </cTool>
+      </item>
       <item path="src/http-svc.c" ex="false" tool="0" flavor2="2">
         <cTool flags="1">
           <incDir>
             <pElem>/usr/include/uuid</pElem>
             <pElem>build/src</pElem>
           </incDir>
-          <preprocessorList>
-            <Elem>__PIC__=2</Elem>
-            <Elem>__PIE__=2</Elem>
-            <Elem>__REGISTER_PREFIX__=</Elem>
-            <Elem>__USER_LABEL_PREFIX__=</Elem>
-            <Elem>__pic__=2</Elem>
-            <Elem>__pie__=2</Elem>
-          </preprocessorList>
         </cTool>
       </item>
       <item path="src/main.c" ex="false" tool="0" flavor2="2">
-        <cTool flags="1">
+        <cTool flags="2">
           <incDir>
             <pElem>src</pElem>
             <pElem>/usr/include/json-c</pElem>
         </cTool>
       </item>
       <item path="src/rest-api.c" ex="false" tool="0" flavor2="2">
-        <cTool flags="1">
+        <cTool flags="2">
           <incDir>
             <pElem>src</pElem>
             <pElem>/usr/include/json-c</pElem>
             <pElem>/usr/include/uuid</pElem>
             <pElem>build/src</pElem>
           </incDir>
+        </cTool>
+      </item>
+      <item path="src/session.c" ex="false" tool="0" flavor2="2">
+        <cTool flags="2">
+          <incDir>
+            <pElem>src</pElem>
+            <pElem>/usr/include/json-c</pElem>
+            <pElem>/usr/include/uuid</pElem>
+            <pElem>include</pElem>
+            <pElem>build/src</pElem>
+          </incDir>
           <preprocessorList>
             <Elem>__PIC__=2</Elem>
             <Elem>__PIE__=2</Elem>
           </preprocessorList>
         </cTool>
       </item>
-      <item path="src/session.c" ex="false" tool="0" flavor2="2">
-        <cTool flags="0">
-          <incDir>
-            <pElem>include</pElem>
-            <pElem>/usr/include/json-c</pElem>
-            <pElem>build/src</pElem>
-          </incDir>
-        </cTool>
-      </item>
     </conf>
   </confs>
 </configurationDescriptor>
index af8d480..57e3872 100644 (file)
@@ -601,7 +601,7 @@ STATIC json_object* freeRadio () {
 
 STATIC json_object* power (AFB_request *request) {      /* AFB_SESSION_CREATE */
     
-    pluginHandleT *handle = request->client->plugin->handle;
+    pluginHandleT *handle = request->client->plugin->handle; 
     radioCtxHandleT *ctx = (radioCtxHandleT*)request->client->ctx;
     const char *value = getQueryValue (request, "value");
     json_object *jresp;
index 9e1c766..75883d3 100644 (file)
@@ -173,10 +173,10 @@ STATIC void clientContextFree(AFB_clientCtx *client) {
 
 STATIC  AFB_restapi pluginApis[]= {
   {"ping"          , AFB_SESSION_NONE  , (AFB_apiCB)apiPingTest         ,"Ping Rest Test Service"},
-  {"token-create"  , AFB_SESSION_CREATE, (AFB_apiCB)clientContextCreate ,"Request Client Context Creation"},
-  {"token-refresh" , AFB_SESSION_RENEW , (AFB_apiCB)clientContextRefresh,"Refresh Client Context Token"},
-  {"token-check"   , AFB_SESSION_CHECK , (AFB_apiCB)clientContextCheck  ,"Check Client Context Token"},
-  {"token-reset"   , AFB_SESSION_CLOSE , (AFB_apiCB)clientContextReset  ,"Close Client Context and Free resources"},
+  {"create"  , AFB_SESSION_CREATE, (AFB_apiCB)clientContextCreate ,"Request Client Context Creation"},
+  {"refresh" , AFB_SESSION_RENEW , (AFB_apiCB)clientContextRefresh,"Refresh Client Context Token"},
+  {"check"   , AFB_SESSION_CHECK , (AFB_apiCB)clientContextCheck  ,"Check Client Context Token"},
+  {"reset"   , AFB_SESSION_CLOSE , (AFB_apiCB)clientContextReset  ,"Close Client Context and Free resources"},
   {"file-upload"   , AFB_SESSION_NONE  , (AFB_apiCB)ProcessPostForm     ,"Demo for file upload"},
   {NULL}
 };
@@ -185,7 +185,7 @@ PUBLIC AFB_plugin *afsvRegister () {
     AFB_plugin *plugin = malloc (sizeof (AFB_plugin));
     plugin->type  = AFB_PLUGIN_JSON; 
     plugin->info  = "Application Framework Binder Service";
-    plugin->prefix= "afbs";  // url base
+    plugin->prefix= "token";  // url base
     plugin->apis  = pluginApis;
     plugin->handle= (void*) "What ever you want";
     plugin->freeCtxCB= (void*) clientContextFree;