Using regex for exit/vpn
[oweals/gnunet.git] / src / include / gnunet_arm_service.h
index af1c8cd9441601a9898adf8742daf777845c90ee..0aa916bd46f3597acb801c5c6b03155293809725 100644 (file)
@@ -37,6 +37,7 @@ extern "C"
 
 #include "gnunet_configuration_lib.h"
 #include "gnunet_scheduler_lib.h"
+#include "gnunet_os_lib.h"
 #include "gnunet_time_lib.h"
 
 /**
@@ -111,6 +112,19 @@ enum GNUNET_ARM_ProcessStatus
 typedef void (*GNUNET_ARM_Callback) (void *cls, 
                                     enum GNUNET_ARM_ProcessStatus result);
 
+/**
+ * Callback function invoked when list operation is complete.
+ *
+ * @param cls closure
+ * @param result outcome of the operation (GNUNET_YES if successful)
+ * @param count number of strings in the list
+ * @param list list of running services
+ */
+typedef void (*GNUNET_ARM_List_Callback) (void *cls, 
+                                          int result,
+                                          unsigned int count,
+                                          const char *const *list);
+
 
 /**
  * Handle for interacting with ARM.
@@ -156,12 +170,14 @@ GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h);
  *
  * @param h handle to ARM
  * @param service_name name of the service
+ * @param std_inheritance flags controlling std descriptors inheritance
  * @param timeout how long to wait before failing for good
  * @param cb callback to invoke when service is ready
  * @param cb_cls closure for callback
  */
 void
 GNUNET_ARM_start_service (struct GNUNET_ARM_Handle *h, const char *service_name,
+                          enum GNUNET_OS_InheritStdioFlags std_inheritance,
                           struct GNUNET_TIME_Relative timeout,
                           GNUNET_ARM_Callback cb, void *cb_cls);
 
@@ -183,6 +199,18 @@ GNUNET_ARM_stop_service (struct GNUNET_ARM_Handle *h, const char *service_name,
                          GNUNET_ARM_Callback cb, void *cb_cls);
 
 
+/**
+ * List all running services.
+ * 
+ * @param h handle to ARM
+ * @param timeout how long to wait before failing for good
+ * @param cb callback to invoke when service is ready
+ * @param cb_cls closure for callback
+ */
+void
+GNUNET_ARM_list_running_services (struct GNUNET_ARM_Handle *h,
+                                  struct GNUNET_TIME_Relative timeout,
+                                  GNUNET_ARM_List_Callback cb, void *cb_cls);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {