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.
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>
22 #ifndef GNUNET_SERVER_TESTBED_BARRIERS_H_
23 #define GNUNET_SERVER_TESTBED_BARRIERS_H_
26 * Function to initialise barrriers component
28 * @param cfg the configuration to use for initialisation
31 GST_barriers_init (struct GNUNET_CONFIGURATION_Handle *cfg);
35 * Function to stop the barrier service
38 GST_barriers_destroy (void);
42 * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT messages.
44 * @param cls identification of the client
45 * @param msg the actual message
46 * @return #GNUNET_OK if @a msg is well-formed
49 check_barrier_init (void *cls,
50 const struct GNUNET_TESTBED_BarrierInit *msg);
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.
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
61 * @param cls identification of the client
62 * @param msg the actual message
65 handle_barrier_init (void *cls,
66 const struct GNUNET_TESTBED_BarrierInit *msg);
70 * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL messages.
72 * @param cls identification of the client
73 * @param msg the actual message
74 * @return #GNUNET_OK if @a msg is well-formed
77 check_barrier_cancel (void *cls,
78 const struct GNUNET_TESTBED_BarrierCancel *msg);
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.
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
89 * @param cls identification of the client
90 * @param msg the actual message
93 handle_barrier_cancel (void *cls,
94 const struct GNUNET_TESTBED_BarrierCancel *msg);
98 * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages.
100 * @param cls identification of the client
101 * @param msg the actual message
102 * @return #GNUNET_OK if @a msg is well-formed
105 check_barrier_status (void *cls,
106 const struct GNUNET_TESTBED_BarrierStatusMsg *msg);
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
114 * @param cls identification of the client
115 * @param msg the actual message
118 handle_barrier_status (void *cls,
119 const struct GNUNET_TESTBED_BarrierStatusMsg *msg);
121 #endif /* GNUNET_SERVER_TESTBED_BARRIERS_H_ */
123 /* end of gnunet-service-testbed_barriers.h */