glitch in the license text detected by hyazinthe, thank you!
[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 it
6   under the terms of the GNU Affero General Public License as published
7   by the Free Software Foundation, either version 3 of the License,
8   or (at your 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   Affero General Public License for more details.
14 */
15
16 /**
17  * @file testbed/gnunet-service-testbed_barriers.h
18  * @brief Interface for the barrier initialisation handler routine
19  * @author Sree Harsha Totakura <sreeharsha@totakura.in>
20  */
21
22 #ifndef GNUNET_SERVER_TESTBED_BARRIERS_H_
23 #define GNUNET_SERVER_TESTBED_BARRIERS_H_
24
25 /**
26  * Function to initialise barrriers component
27  *
28  * @param cfg the configuration to use for initialisation
29  */
30 void
31 GST_barriers_init (struct GNUNET_CONFIGURATION_Handle *cfg);
32
33
34 /**
35  * Function to stop the barrier service
36  */
37 void
38 GST_barriers_destroy (void);
39
40
41 /**
42  * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT messages.
43  *
44  * @param cls identification of the client
45  * @param msg the actual message
46  * @return #GNUNET_OK if @a msg is well-formed
47  */
48 int
49 check_barrier_init (void *cls,
50                     const struct GNUNET_TESTBED_BarrierInit *msg);
51
52
53 /**
54  * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT messages.  This
55  * message should always come from a parent controller or the testbed API if we
56  * are the root controller.
57  *
58  * This handler is queued in the main service and will handle the messages sent
59  * either from the testbed driver or from a high level controller
60  *
61  * @param cls identification of the client
62  * @param msg the actual message
63  */
64 void
65 handle_barrier_init (void *cls,
66                      const struct GNUNET_TESTBED_BarrierInit *msg);
67
68
69 /**
70  * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL messages.
71  *
72  * @param cls identification of the client
73  * @param msg the actual message
74  * @return #GNUNET_OK if @a msg is well-formed
75  */
76 int
77 check_barrier_cancel (void *cls,
78                       const struct GNUNET_TESTBED_BarrierCancel *msg);
79
80
81 /**
82  * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL messages.  This
83  * message should always come from a parent controller or the testbed API if we
84  * are the root controller.
85  *
86  * This handler is queued in the main service and will handle the messages sent
87  * either from the testbed driver or from a high level controller
88  *
89  * @param cls identification of the client
90  * @param msg the actual message
91  */
92 void
93 handle_barrier_cancel (void *cls,
94                        const struct GNUNET_TESTBED_BarrierCancel *msg);
95
96
97 /**
98  * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages.
99  *
100  * @param cls identification of the client
101  * @param msg the actual message
102  * @return #GNUNET_OK if @a msg is well-formed
103  */
104 int
105 check_barrier_status (void *cls,
106                       const struct GNUNET_TESTBED_BarrierStatusMsg *msg);
107
108
109 /**
110  * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages.
111  * This handler is queued in the main service and will handle the messages sent
112  * either from the testbed driver or from a high level controller
113  *
114  * @param cls identification of the client
115  * @param msg the actual message
116  */
117 void
118 handle_barrier_status (void *cls,
119                        const struct GNUNET_TESTBED_BarrierStatusMsg *msg);
120
121 #endif  /* GNUNET_SERVER_TESTBED_BARRIERS_H_ */
122
123 /* end of gnunet-service-testbed_barriers.h */