aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/radio
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2015-12-29 02:15:07 +0100
committerManuel Bachmann <manuel.bachmann@iot.bzh>2015-12-29 02:15:26 +0100
commitda9b5d47f01f786f3170c80724a1a6d8f9b94ebb (patch)
treee5183502c07df8a8597a9f13a3d06c6190371147 /plugins/radio
parent07c775201fbd9477bd4a69cee3d48a95eb612bc6 (diff)
Switch to unique token model
Token/Session Plugin is now able to issue a globally-valid token (re-useable with all Plugins, so that an application using multiple plugins is not forced to manage multiple tokens anymore). Adapt Audio & Radio Plugins to this model (init functions do not create a token anymore, check for a prior existing one). Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh> Author: Fulup Ar Foll <fulup@iot.bzh> Author: Manuel Bachmann <manuel.bachmann@iot.bzh>
Diffstat (limited to 'plugins/radio')
-rw-r--r--plugins/radio/radio-api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/radio/radio-api.c b/plugins/radio/radio-api.c
index 1cbf3149..b09cea86 100644
--- a/plugins/radio/radio-api.c
+++ b/plugins/radio/radio-api.c
@@ -126,7 +126,7 @@ STATIC void freeRadio (void *context, void *handle) {
/* ------ PUBLIC PLUGIN FUNCTIONS --------- */
-STATIC json_object* init (AFB_request *request) { /* AFB_SESSION_CREATE */
+STATIC json_object* init (AFB_request *request) { /* AFB_SESSION_CHECK */
json_object *jresp;
@@ -306,7 +306,7 @@ STATIC json_object* ping (AFB_request *request) { /* AFB_SESSION_NONE */
STATIC AFB_restapi pluginApis[]= {
- {"init" , AFB_SESSION_CREATE, (AFB_apiCB)init , "Radio API - init"},
+ {"init" , AFB_SESSION_CHECK, (AFB_apiCB)init , "Radio API - init"},
{"power" , AFB_SESSION_CHECK, (AFB_apiCB)power , "Radio API - power"},
{"mode" , AFB_SESSION_CHECK, (AFB_apiCB)mode , "Radio API - mode"},
{"freq" , AFB_SESSION_CHECK, (AFB_apiCB)freq , "Radio API - freq"},