Added --token=xxxxx for initial shared secret
[src/app-framework-binder.git] / src / alsa-api.c
index 18529d9..61c7953 100644 (file)
@@ -39,7 +39,7 @@ STATIC json_object* pingSample (AFB_request *request, void* handle) {
     if (request->post == NULL)  request->post="NoData";  
         
     // return response to caller
-    response = jsonNewMessage(AFB_SUCCESS, "Ping Binder Daemon %d query={%s} PostData: \'%s\' ", pingcount++, query, request->post);
+    response = jsonNewMessage(AFB_SUCCESS, "Ping Binder Daemon %d query={%s} handle=[%s] PostData: \'%s\' ", pingcount++, query, handle, request->post);
     
     if (verbose) fprintf(stderr, "%d: \n", pingcount);
     return (response);
@@ -52,19 +52,19 @@ STATIC struct {
 
 
 STATIC  AFB_restapi pluginApis[]= {
-  {"ping"     , (AFB_apiCB)pingSample , "Ping Application Framework",NULL},
-  {"error"    , (AFB_apiCB)wrongApi   , "Ping Application Framework",NULL},
-  {"ctx-store", (AFB_apiCB)pingSample , "Verbose Mode",NULL},
-  {"ctx-load" , (AFB_apiCB)pingSample , "Verbose Mode",NULL},
-  {0,0,0,0}
+  {"ping"     , (AFB_apiCB)pingSample , "Ping Application Framework"},
+  {"error"    , (AFB_apiCB)wrongApi   , "Ping Application Framework"},
+  {"ctx-store", (AFB_apiCB)pingSample , "Verbose Mode"},
+  {"ctx-load" , (AFB_apiCB)pingSample , "Verbose Mode"},
+  {NULL}
 };
 
 PUBLIC AFB_plugin *alsaRegister () {
     AFB_plugin *plugin = malloc (sizeof (AFB_plugin));
-    plugin->type  = AFB_PLUGIN;
+    plugin->type  = AFB_PLUGIN_JSON;
     plugin->info  = "Application Framework Binder Service";
     plugin->prefix= "alsa";        
     plugin->apis  = pluginApis;
-    
+    plugin->handle= "bla bla bla";
     return (plugin);
 };
\ No newline at end of file