aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_arm_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_arm_service.h')
-rw-r--r--src/include/gnunet_arm_service.h82
1 files changed, 46 insertions, 36 deletions
diff --git a/src/include/gnunet_arm_service.h b/src/include/gnunet_arm_service.h
index 639e723c5..ef860bff4 100644
--- a/src/include/gnunet_arm_service.h
+++ b/src/include/gnunet_arm_service.h
@@ -244,8 +244,9 @@ struct GNUNET_ARM_Operation;
244 * #GNUNET_SYSERR if there was an error. 244 * #GNUNET_SYSERR if there was an error.
245 */ 245 */
246typedef void 246typedef void
247(*GNUNET_ARM_ConnectionStatusCallback) (void *cls, 247(*GNUNET_ARM_ConnectionStatusCallback) (
248 int connected); 248 void *cls,
249 enum GNUNET_GenericReturnValue connected);
249 250
250 251
251/** 252/**
@@ -259,9 +260,10 @@ typedef void
259 * @param result result of the operation 260 * @param result result of the operation
260 */ 261 */
261typedef void 262typedef void
262(*GNUNET_ARM_ResultCallback) (void *cls, 263(*GNUNET_ARM_ResultCallback) (
263 enum GNUNET_ARM_RequestStatus rs, 264 void *cls,
264 enum GNUNET_ARM_Result result); 265 enum GNUNET_ARM_RequestStatus rs,
266 enum GNUNET_ARM_Result result);
265 267
266 268
267/** 269/**
@@ -276,10 +278,11 @@ typedef void
276 * @param list list of services managed by arm 278 * @param list list of services managed by arm
277 */ 279 */
278typedef void 280typedef void
279(*GNUNET_ARM_ServiceListCallback) (void *cls, 281(*GNUNET_ARM_ServiceListCallback) (
280 enum GNUNET_ARM_RequestStatus rs, 282 void *cls,
281 unsigned int count, 283 enum GNUNET_ARM_RequestStatus rs,
282 const struct GNUNET_ARM_ServiceInfo *list); 284 unsigned int count,
285 const struct GNUNET_ARM_ServiceInfo *list);
283 286
284 287
285/** 288/**
@@ -294,18 +297,20 @@ typedef void
294 * @return context to use for further ARM operations, NULL on error. 297 * @return context to use for further ARM operations, NULL on error.
295 */ 298 */
296struct GNUNET_ARM_Handle * 299struct GNUNET_ARM_Handle *
297GNUNET_ARM_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, 300GNUNET_ARM_connect (
298 GNUNET_ARM_ConnectionStatusCallback conn_status, 301 const struct GNUNET_CONFIGURATION_Handle *cfg,
299 void *conn_status_cls); 302 GNUNET_ARM_ConnectionStatusCallback conn_status,
303 void *conn_status_cls);
300 304
301 305
302/** 306/**
303 * Disconnect from the ARM service and destroy the handle. 307 * Disconnect from the ARM service and destroy the handle.
304 * 308 *
305 * @param h the handle that was being used 309 * @param[in] h the handle that was being used
306 */ 310 */
307void 311void
308GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h); 312GNUNET_ARM_disconnect (
313 struct GNUNET_ARM_Handle *h);
309 314
310 315
311/** 316/**
@@ -315,7 +320,8 @@ GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h);
315 * @param op operation to cancel 320 * @param op operation to cancel
316 */ 321 */
317void 322void
318GNUNET_ARM_operation_cancel (struct GNUNET_ARM_Operation *op); 323GNUNET_ARM_operation_cancel (
324 struct GNUNET_ARM_Operation *op);
319 325
320 326
321/** 327/**
@@ -327,9 +333,10 @@ GNUNET_ARM_operation_cancel (struct GNUNET_ARM_Operation *op);
327 * @return handle for the operation, NULL on error 333 * @return handle for the operation, NULL on error
328 */ 334 */
329struct GNUNET_ARM_Operation * 335struct GNUNET_ARM_Operation *
330GNUNET_ARM_request_service_list (struct GNUNET_ARM_Handle *h, 336GNUNET_ARM_request_service_list (
331 GNUNET_ARM_ServiceListCallback cont, 337 struct GNUNET_ARM_Handle *h,
332 void *cont_cls); 338 GNUNET_ARM_ServiceListCallback cont,
339 void *cont_cls);
333 340
334 341
335/** 342/**
@@ -347,10 +354,11 @@ GNUNET_ARM_request_service_list (struct GNUNET_ARM_Handle *h,
347 * @return handle for the operation, NULL on error 354 * @return handle for the operation, NULL on error
348 */ 355 */
349struct GNUNET_ARM_Operation * 356struct GNUNET_ARM_Operation *
350GNUNET_ARM_request_service_stop (struct GNUNET_ARM_Handle *h, 357GNUNET_ARM_request_service_stop (
351 const char *service_name, 358 struct GNUNET_ARM_Handle *h,
352 GNUNET_ARM_ResultCallback cont, 359 const char *service_name,
353 void *cont_cls); 360 GNUNET_ARM_ResultCallback cont,
361 void *cont_cls);
354 362
355 363
356/** 364/**
@@ -364,12 +372,12 @@ GNUNET_ARM_request_service_stop (struct GNUNET_ARM_Handle *h,
364 * @return handle for the operation, NULL on error 372 * @return handle for the operation, NULL on error
365 */ 373 */
366struct GNUNET_ARM_Operation * 374struct GNUNET_ARM_Operation *
367GNUNET_ARM_request_service_start (struct GNUNET_ARM_Handle *h, 375GNUNET_ARM_request_service_start (
368 const char *service_name, 376 struct GNUNET_ARM_Handle *h,
369 enum GNUNET_OS_InheritStdioFlags 377 const char *service_name,
370 std_inheritance, 378 enum GNUNET_OS_InheritStdioFlags std_inheritance,
371 GNUNET_ARM_ResultCallback cont, 379 GNUNET_ARM_ResultCallback cont,
372 void *cont_cls); 380 void *cont_cls);
373 381
374 382
375/** 383/**
@@ -386,10 +394,10 @@ struct GNUNET_ARM_MonitorHandle;
386 * @param status status of the service 394 * @param status status of the service
387 */ 395 */
388typedef void 396typedef void
389(*GNUNET_ARM_ServiceMonitorCallback) (void *cls, 397(*GNUNET_ARM_ServiceMonitorCallback) (
390 const char *service, 398 void *cls,
391 enum GNUNET_ARM_ServiceMonitorStatus 399 const char *service,
392 status); 400 enum GNUNET_ARM_ServiceMonitorStatus status);
393 401
394 402
395/** 403/**
@@ -404,9 +412,10 @@ typedef void
404 * @return context to use for further ARM monitor operations, NULL on error. 412 * @return context to use for further ARM monitor operations, NULL on error.
405 */ 413 */
406struct GNUNET_ARM_MonitorHandle * 414struct GNUNET_ARM_MonitorHandle *
407GNUNET_ARM_monitor_start (const struct GNUNET_CONFIGURATION_Handle *cfg, 415GNUNET_ARM_monitor_start (
408 GNUNET_ARM_ServiceMonitorCallback cont, 416 const struct GNUNET_CONFIGURATION_Handle *cfg,
409 void *cont_cls); 417 GNUNET_ARM_ServiceMonitorCallback cont,
418 void *cont_cls);
410 419
411 420
412/** 421/**
@@ -415,7 +424,8 @@ GNUNET_ARM_monitor_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
415 * @param h the handle that was being used 424 * @param h the handle that was being used
416 */ 425 */
417void 426void
418GNUNET_ARM_monitor_stop (struct GNUNET_ARM_MonitorHandle *h); 427GNUNET_ARM_monitor_stop (
428 struct GNUNET_ARM_MonitorHandle *h);
419 429
420#if 0 /* keep Emacsens' auto-indent happy */ 430#if 0 /* keep Emacsens' auto-indent happy */
421{ 431{