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