2 This file is part of GNUnet.
3 Copyright (C) 2008--2013 GNUnet e.V.
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.
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.
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 * @file testbed/gnunet-service-testbed_barriers.h
21 * @brief Interface for the barrier initialisation handler routine
22 * @author Sree Harsha Totakura <sreeharsha@totakura.in>
25 #ifndef GNUNET_SERVER_TESTBED_BARRIERS_H_
26 #define GNUNET_SERVER_TESTBED_BARRIERS_H_
29 * Function to initialise barrriers component
31 * @param cfg the configuration to use for initialisation
34 GST_barriers_init (struct GNUNET_CONFIGURATION_Handle *cfg);
38 * Function to stop the barrier service
41 GST_barriers_destroy (void);
45 * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT messages.
47 * @param cls identification of the client
48 * @param msg the actual message
49 * @return #GNUNET_OK if @a msg is well-formed
52 check_barrier_init (void *cls,
53 const struct GNUNET_TESTBED_BarrierInit *msg);
57 * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT messages. This
58 * message should always come from a parent controller or the testbed API if we
59 * are the root controller.
61 * This handler is queued in the main service and will handle the messages sent
62 * either from the testbed driver or from a high level controller
64 * @param cls identification of the client
65 * @param msg the actual message
68 handle_barrier_init (void *cls,
69 const struct GNUNET_TESTBED_BarrierInit *msg);
73 * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL messages.
75 * @param cls identification of the client
76 * @param msg the actual message
77 * @return #GNUNET_OK if @a msg is well-formed
80 check_barrier_cancel (void *cls,
81 const struct GNUNET_TESTBED_BarrierCancel *msg);
85 * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL messages. This
86 * message should always come from a parent controller or the testbed API if we
87 * are the root controller.
89 * This handler is queued in the main service and will handle the messages sent
90 * either from the testbed driver or from a high level controller
92 * @param cls identification of the client
93 * @param msg the actual message
96 handle_barrier_cancel (void *cls,
97 const struct GNUNET_TESTBED_BarrierCancel *msg);
101 * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages.
103 * @param cls identification of the client
104 * @param msg the actual message
105 * @return #GNUNET_OK if @a msg is well-formed
108 check_barrier_status (void *cls,
109 const struct GNUNET_TESTBED_BarrierStatusMsg *msg);
113 * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages.
114 * This handler is queued in the main service and will handle the messages sent
115 * either from the testbed driver or from a high level controller
117 * @param cls identification of the client
118 * @param msg the actual message
121 handle_barrier_status (void *cls,
122 const struct GNUNET_TESTBED_BarrierStatusMsg *msg);
124 #endif /* GNUNET_SERVER_TESTBED_BARRIERS_H_ */
126 /* end of gnunet-service-testbed_barriers.h */