refactoring ARM api to use new MQ
[oweals/gnunet.git] / src / testbed / gnunet-service-testbed_barriers.h
1 /*
2   This file is part of GNUnet.
3   Copyright (C) 2008--2013 GNUnet e.V.
4
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 3, or (at your
8   option) any later version.
9
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.
14
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., 51 Franklin Street, Fifth Floor,
18   Boston, MA 02110-1301, USA.
19 */
20
21 /**
22  * @file testbed/gnunet-service-testbed_barriers.h
23  * @brief Interface for the barrier initialisation handler routine
24  * @author Sree Harsha Totakura <sreeharsha@totakura.in>
25  */
26
27 #ifndef GNUNET_SERVER_TESTBED_BARRIERS_H_
28 #define GNUNET_SERVER_TESTBED_BARRIERS_H_
29
30 /**
31  * Function to initialise barrriers component
32  *
33  * @param cfg the configuration to use for initialisation
34  */
35 void
36 GST_barriers_init (struct GNUNET_CONFIGURATION_Handle *cfg);
37
38
39 /**
40  * Function to stop the barrier service
41  */
42 void
43 GST_barriers_destroy ();
44
45
46 /**
47  * Message handler for GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT messages.  This
48  * message should always come from a parent controller or the testbed API if we
49  * are the root controller.
50  *
51  * This handler is queued in the main service and will handle the messages sent
52  * either from the testbed driver or from a high level controller
53  *
54  * @param cls NULL
55  * @param client identification of the client
56  * @param message the actual message
57  */
58 void
59 GST_handle_barrier_init (void *cls, struct GNUNET_SERVER_Client *client,
60                          const struct GNUNET_MessageHeader *message);
61
62
63 /**
64  * Message handler for GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL messages.  This
65  * message should always come from a parent controller or the testbed API if we
66  * are the root controller.
67  *
68  * This handler is queued in the main service and will handle the messages sent
69  * either from the testbed driver or from a high level controller
70  *
71  * @param cls NULL
72  * @param client identification of the client
73  * @param message the actual message
74  */
75 void
76 GST_handle_barrier_cancel (void *cls, struct GNUNET_SERVER_Client *client,
77                            const struct GNUNET_MessageHeader *message);
78
79
80 /**
81  * Message handler for GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages.
82  * This handler is queued in the main service and will handle the messages sent
83  * either from the testbed driver or from a high level controller
84  *
85  * @param cls NULL
86  * @param client identification of the client
87  * @param message the actual message
88  */
89 void
90 GST_handle_barrier_status (void *cls, struct GNUNET_SERVER_Client *client,
91                            const struct GNUNET_MessageHeader *message);
92
93 #endif  /* GNUNET_SERVER_TESTBED_BARRIERS_H_ */
94
95 /* end of gnunet-service-testbed_barriers.h */