X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Finclude%2Fgnunet_arm_service.h;h=e1f44620f611803fe6f64fcbf612a479ff9de8c7;hb=27c12911f4f2aba2d90099270d70de846e83854f;hp=f5fec6adb397f183231fa2e48a67c66c6407cda8;hpb=122dbcd5b6ac9e0b855cb01f873b62ad35ca39ae;p=oweals%2Fgnunet.git diff --git a/src/include/gnunet_arm_service.h b/src/include/gnunet_arm_service.h index f5fec6adb..e1f44620f 100644 --- a/src/include/gnunet_arm_service.h +++ b/src/include/gnunet_arm_service.h @@ -35,10 +35,7 @@ extern "C" #endif #endif -#include "gnunet_configuration_lib.h" -#include "gnunet_scheduler_lib.h" -#include "gnunet_os_lib.h" -#include "gnunet_time_lib.h" +#include "gnunet_util_lib.h" /** * Version of the arm API. @@ -112,6 +109,7 @@ enum GNUNET_ARM_ServiceStatus GNUNET_ARM_SERVICE_STOPPING = 3 }; + /** * Replies to ARM requests */ @@ -181,11 +179,8 @@ struct GNUNET_ARM_Handle; * @param cls closure * @param connected GNUNET_YES if connected, GNUNET_NO if disconnected, * GNUNET_SYSERR if there was an error. - * @param error GNUNET_YES if we encountered a permanent error, and there - * will be no re-connection. */ -typedef void (*GNUNET_ARM_ConnectionStatusCallback) (void *cls, - struct GNUNET_ARM_Handle *arm, +typedef void (*GNUNET_ARM_ConnectionStatusCallback) (void *cls, int connected); @@ -196,12 +191,14 @@ typedef void (*GNUNET_ARM_ConnectionStatusCallback) (void *cls, * 'rs' will indicate that, and 'service' and 'result' will be undefined. * * @param cls closure - * @param arm handle to the arm connection * @param rs status of the request * @param service service name * @param result result of the operation */ -typedef void (*GNUNET_ARM_ResultCallback) (void *cls, struct GNUNET_ARM_Handle *arm, enum GNUNET_ARM_RequestStatus rs, const char *service, enum GNUNET_ARM_Result result); +typedef void (*GNUNET_ARM_ResultCallback) (void *cls, + enum GNUNET_ARM_RequestStatus rs, + const char *service, + enum GNUNET_ARM_Result result); /** @@ -211,12 +208,14 @@ typedef void (*GNUNET_ARM_ResultCallback) (void *cls, struct GNUNET_ARM_Handle * * 'rs' will indicate that, and 'count' and 'list' will be undefined. * * @param cls closure - * @param arm handle to the arm connection * @param rs status of the request * @param count number of strings in the list * @param list list of running services */ -typedef void (*GNUNET_ARM_ServiceListCallback) (void *cls, struct GNUNET_ARM_Handle *arm, enum GNUNET_ARM_RequestStatus rs, unsigned int count, const char *const*list); +typedef void (*GNUNET_ARM_ServiceListCallback) (void *cls, + enum GNUNET_ARM_RequestStatus rs, + unsigned int count, + const char *const*list); /** @@ -232,7 +231,8 @@ typedef void (*GNUNET_ARM_ServiceListCallback) (void *cls, struct GNUNET_ARM_Han */ struct GNUNET_ARM_Handle * GNUNET_ARM_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, - GNUNET_ARM_ConnectionStatusCallback conn_status, void *cls); + GNUNET_ARM_ConnectionStatusCallback conn_status, + void *cls); /** @@ -254,8 +254,8 @@ GNUNET_ARM_disconnect_and_free (struct GNUNET_ARM_Handle *h); */ void GNUNET_ARM_request_service_list (struct GNUNET_ARM_Handle *h, - struct GNUNET_TIME_Relative timeout, - GNUNET_ARM_ServiceListCallback cont, void *cont_cls); + struct GNUNET_TIME_Relative timeout, + GNUNET_ARM_ServiceListCallback cont, void *cont_cls); /** @@ -274,8 +274,9 @@ GNUNET_ARM_request_service_list (struct GNUNET_ARM_Handle *h, */ void GNUNET_ARM_request_service_stop (struct GNUNET_ARM_Handle *h, - const char *service_name, struct GNUNET_TIME_Relative timeout, - GNUNET_ARM_ResultCallback cont, void *cont_cls); + const char *service_name, + struct GNUNET_TIME_Relative timeout, + GNUNET_ARM_ResultCallback cont, void *cont_cls); /** @@ -290,9 +291,11 @@ GNUNET_ARM_request_service_stop (struct GNUNET_ARM_Handle *h, */ void GNUNET_ARM_request_service_start (struct GNUNET_ARM_Handle *h, - const char *service_name, enum GNUNET_OS_InheritStdioFlags std_inheritance, - struct GNUNET_TIME_Relative timeout, GNUNET_ARM_ResultCallback cont, - void *cont_cls); + const char *service_name, + enum GNUNET_OS_InheritStdioFlags std_inheritance, + struct GNUNET_TIME_Relative timeout, + GNUNET_ARM_ResultCallback cont, + void *cont_cls); /** @@ -309,7 +312,9 @@ struct GNUNET_ARM_MonitorHandle; * @param service service name * @param status status of the service */ -typedef void (*GNUNET_ARM_ServiceStatusCallback) (void *cls, struct GNUNET_ARM_MonitorHandle *arm, const char *service, enum GNUNET_ARM_ServiceStatus status); +typedef void (*GNUNET_ARM_ServiceStatusCallback) (void *cls, + const char *service, + enum GNUNET_ARM_ServiceStatus status); /** @@ -325,7 +330,8 @@ typedef void (*GNUNET_ARM_ServiceStatusCallback) (void *cls, struct GNUNET_ARM_M */ struct GNUNET_ARM_MonitorHandle * GNUNET_ARM_monitor (const struct GNUNET_CONFIGURATION_Handle *cfg, - GNUNET_ARM_ServiceStatusCallback cont, void *cont_cls); + GNUNET_ARM_ServiceStatusCallback cont, + void *cont_cls); /**