aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_arm_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-12-08 15:45:10 +0000
committerChristian Grothoff <christian@grothoff.org>2011-12-08 15:45:10 +0000
commitcbd09ba94fde1331cb4fe6ea29f5f164adc8db25 (patch)
tree7d6d205b2f0fbaf894770334733c589c34fb4864 /src/include/gnunet_arm_service.h
parent7ecae6c47bc658cce69de75c1addb0c6db75ced9 (diff)
downloadgnunet-cbd09ba94fde1331cb4fe6ea29f5f164adc8db25.tar.gz
gnunet-cbd09ba94fde1331cb4fe6ea29f5f164adc8db25.zip
major rewrite of ARM service and a bit of the ARM IPC to take advantage of the simplifications possible now that we no longer intercept traffic; the new code in particular is better at communicating what exactly ARM was doing in response to requests. A major change is that gnunet-arm -i/-k now only impacts if a service is running by-default, on-demand starting is no longer impacted, option -t from gnunet-arm was removed
Diffstat (limited to 'src/include/gnunet_arm_service.h')
-rw-r--r--src/include/gnunet_arm_service.h67
1 files changed, 61 insertions, 6 deletions
diff --git a/src/include/gnunet_arm_service.h b/src/include/gnunet_arm_service.h
index 6d52773de..af1c8cd94 100644
--- a/src/include/gnunet_arm_service.h
+++ b/src/include/gnunet_arm_service.h
@@ -42,19 +42,74 @@ extern "C"
42/** 42/**
43 * Version of the arm API. 43 * Version of the arm API.
44 */ 44 */
45#define GNUNET_ARM_VERSION 0x00000000 45#define GNUNET_ARM_VERSION 0x00000001
46
47
48/**
49 * Values characterizing GNUnet process states.
50 */
51enum GNUNET_ARM_ProcessStatus
52{
53 /**
54 * Service name is unknown to ARM.
55 */
56 GNUNET_ARM_PROCESS_UNKNOWN = -1,
57
58 /**
59 * Service is now down (due to client request).
60 */
61 GNUNET_ARM_PROCESS_DOWN = 0,
62
63 /**
64 * Service is already running.
65 */
66 GNUNET_ARM_PROCESS_ALREADY_RUNNING = 1,
67
68 /**
69 * Service is currently being started (due to client request).
70 */
71 GNUNET_ARM_PROCESS_STARTING = 2,
72
73 /**
74 * Service is already being stopped by some other client.
75 */
76 GNUNET_ARM_PROCESS_ALREADY_STOPPING = 3,
77
78 /**
79 * Service is already down (no action taken)
80 */
81 GNUNET_ARM_PROCESS_ALREADY_DOWN = 4,
82
83 /**
84 * ARM is currently being shut down (no more process starts)
85 */
86 GNUNET_ARM_PROCESS_SHUTDOWN = 5,
87
88 /**
89 * Error in communication with ARM
90 */
91 GNUNET_ARM_PROCESS_COMMUNICATION_ERROR = 6,
92
93 /**
94 * Timeout in communication with ARM
95 */
96 GNUNET_ARM_PROCESS_COMMUNICATION_TIMEOUT = 7,
97
98 /**
99 * Failure to perform operation
100 */
101 GNUNET_ARM_PROCESS_FAILURE = 8
102};
46 103
47 104
48/** 105/**
49 * Callback function invoked when operation is complete. 106 * Callback function invoked when operation is complete.
50 * 107 *
51 * @param cls closure 108 * @param cls closure
52 * @param success GNUNET_YES if we think the service is running 109 * @param result outcome of the operation
53 * GNUNET_NO if we think the service is stopped
54 * GNUNET_SYSERR if we think ARM was not running or
55 * if the service status is unknown
56 */ 110 */
57typedef void (*GNUNET_ARM_Callback) (void *cls, int success); 111typedef void (*GNUNET_ARM_Callback) (void *cls,
112 enum GNUNET_ARM_ProcessStatus result);
58 113
59 114
60/** 115/**