diff options
Diffstat (limited to 'include/proto-def.h')
-rw-r--r-- | include/proto-def.h | 23 |
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); |