2 This file is part of GNUnet
3 (C) 2009 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file include/gnunet_arm_service.h
23 * @brief API to access gnunet-arm
24 * @author Christian Grothoff
27 #ifndef GNUNET_ARM_SERVICE_H
28 #define GNUNET_ARM_SERVICE_H
33 #if 0 /* keep Emacsens' auto-indent happy */
38 #include "gnunet_configuration_lib.h"
39 #include "gnunet_scheduler_lib.h"
40 #include "gnunet_time_lib.h"
43 * Version of the arm API.
45 #define GNUNET_ARM_VERSION 0x00000000
49 * Callback function invoked when operation is complete.
52 * @param success GNUNET_YES if we think the service is running
53 * GNUNET_NO if we think the service is stopped
54 * GNUNET_SYSERR if we think ARM was not running
56 typedef void (*GNUNET_ARM_Callback) (void *cls, int success);
62 * @param service_name name of the service
63 * @param cfg configuration to use (needed to contact ARM;
64 * the ARM service may internally use a different
65 * configuration to determine how to start the service).
66 * @param sched scheduler to use
67 * @param timeout how long to wait before failing for good
68 * @param cb callback to invoke when service is ready
69 * @param cb_cls closure for callback
72 GNUNET_ARM_start_service (const char *service_name,
73 struct GNUNET_CONFIGURATION_Handle *cfg,
74 struct GNUNET_SCHEDULER_Handle *sched,
75 struct GNUNET_TIME_Relative timeout,
76 GNUNET_ARM_Callback cb, void *cb_cls);
82 * @param service_name name of the service
83 * @param cfg configuration to use (needed to contact ARM;
84 * the ARM service may internally use a different
85 * configuration to determine how to start the service).
86 * @param sched scheduler to use
87 * @param timeout how long to wait before failing for good
88 * @param cb callback to invoke when service is ready
89 * @param cb_cls closure for callback
92 GNUNET_ARM_stop_service (const char *service_name,
93 struct GNUNET_CONFIGURATION_Handle *cfg,
94 struct GNUNET_SCHEDULER_Handle *sched,
95 struct GNUNET_TIME_Relative timeout,
96 GNUNET_ARM_Callback cb, void *cb_cls);
100 #if 0 /* keep Emacsens' auto-indent happy */