aboutsummaryrefslogtreecommitdiffstats
path: root/include/proto-def.h
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2015-12-07 01:39:27 +0100
committerFulup Ar Foll <fulup@iot.bzh>2015-12-07 01:39:27 +0100
commitc2bda43c447016a20ed061078b0dff3e64d09940 (patch)
tree1c0bbb0f4a0b659703f66eeb90c02d998bc84e11 /include/proto-def.h
parentcd054544444e92e7695dd288f0c04b7af0f668e3 (diff)
Almost working
Diffstat (limited to 'include/proto-def.h')
-rw-r--r--include/proto-def.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/include/proto-def.h b/include/proto-def.h
index 934bf30f..d1b0c3fb 100644
--- a/include/proto-def.h
+++ b/include/proto-def.h
@@ -23,31 +23,38 @@
// Rest-api
PUBLIC json_object* pingSample (AFB_plugin *plugin, AFB_session *session, AFB_request *post);
PUBLIC const char* getQueryValue (AFB_request * request, char *name);
-PUBLIC AFB_plugin *afsvRegister (AFB_session *session);
PUBLIC int doRestApi(struct MHD_Connection *connection, AFB_session *session, const char *method, const char* url);
+void initPlugins (AFB_session *session);
+
+typedef AFB_plugin* (*AFB_pluginCB)(AFB_session *session);
+PUBLIC AFB_plugin* afsvRegister (AFB_session *session);
+PUBLIC AFB_plugin* dbusRegister (AFB_session *session);
+PUBLIC AFB_plugin* alsaRegister (AFB_session *session);
+
+
// Session handling
-PUBLIC AFB_ERROR sessionCheckdir (AFB_session *session);
+PUBLIC AFB_error sessionCheckdir (AFB_session *session);
PUBLIC json_object *sessionList (AFB_session *session, AFB_request *request);
PUBLIC json_object *sessionToDisk (AFB_session *session, AFB_request *request, char *name,json_object *jsonSession);
PUBLIC json_object *sessionFromDisk (AFB_session *session, AFB_request *request, char *name);
// Httpd server
-PUBLIC AFB_ERROR httpdStart (AFB_session *session);
-PUBLIC AFB_ERROR httpdLoop (AFB_session *session);
+PUBLIC AFB_error httpdStart (AFB_session *session);
+PUBLIC AFB_error httpdLoop (AFB_session *session);
PUBLIC void httpdStop (AFB_session *session);
// config management
PUBLIC char *configTime (void);
PUBLIC AFB_session *configInit (void);
-PUBLIC json_object *jsonNewMessage (AFB_ERROR level, char* format, ...);
-PUBLIC json_object *jsonNewStatus (AFB_ERROR level);
+PUBLIC json_object *jsonNewMessage (AFB_error level, char* format, ...);
+PUBLIC json_object *jsonNewStatus (AFB_error level);
PUBLIC json_object *jsonNewjtype (void);
-PUBLIC json_object *jsonNewMessage (AFB_ERROR level, char* format, ...);
+PUBLIC json_object *jsonNewMessage (AFB_error level, char* format, ...);
PUBLIC void jsonDumpObject (json_object * jObject);
-PUBLIC AFB_ERROR configLoadFile (AFB_session * session, AFB_config *cliconfig);
+PUBLIC AFB_error configLoadFile (AFB_session * session, AFB_config *cliconfig);
PUBLIC void configStoreFile (AFB_session * session);