fix related to #4909/12605: force desirability of path if path is in use
[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 (void);
44
45
46 /**
47  * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT messages.
48  *
49  * @param cls identification of the client
50  * @param msg the actual message
51  * @return #GNUNET_OK if @a msg is well-formed
52  */
53 int
54 check_barrier_init (void *cls,
55                     const struct GNUNET_TESTBED_BarrierInit *msg);
56
57
58 /**
59  * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT messages.  This
60  * message should always come from a parent controller or the testbed API if we
61  * are the root controller.
62  *
63  * This handler is queued in the main service and will handle the messages sent
64  * either from the testbed driver or from a high level controller
65  *
66  * @param cls identification of the client
67  * @param msg the actual message
68  */
69 void
70 handle_barrier_init (void *cls,
71                      const struct GNUNET_TESTBED_BarrierInit *msg);
72
73
74 /**
75  * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL messages.
76  *
77  * @param cls identification of the client
78  * @param msg the actual message
79  * @return #GNUNET_OK if @a msg is well-formed
80  */
81 int
82 check_barrier_cancel (void *cls,
83                       const struct GNUNET_TESTBED_BarrierCancel *msg);
84
85
86 /**
87  * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL messages.  This
88  * message should always come from a parent controller or the testbed API if we
89  * are the root controller.
90  *
91  * This handler is queued in the main service and will handle the messages sent
92  * either from the testbed driver or from a high level controller
93  *
94  * @param cls identification of the client
95  * @param msg the actual message
96  */
97 void
98 handle_barrier_cancel (void *cls,
99                        const struct GNUNET_TESTBED_BarrierCancel *msg);
100
101
102 /**
103  * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages.
104  *
105  * @param cls identification of the client
106  * @param msg the actual message
107  * @return #GNUNET_OK if @a msg is well-formed
108  */
109 int
110 check_barrier_status (void *cls,
111                       const struct GNUNET_TESTBED_BarrierStatusMsg *msg);
112
113
114 /**
115  * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages.
116  * This handler is queued in the main service and will handle the messages sent
117  * either from the testbed driver or from a high level controller
118  *
119  * @param cls identification of the client
120  * @param msg the actual message
121  */
122 void
123 handle_barrier_status (void *cls,
124                        const struct GNUNET_TESTBED_BarrierStatusMsg *msg);
125
126 #endif  /* GNUNET_SERVER_TESTBED_BARRIERS_H_ */
127
128 /* end of gnunet-service-testbed_barriers.h */