diff options
Diffstat (limited to 'src/testbed/testbed_api_barriers.h')
-rw-r--r-- | src/testbed/testbed_api_barriers.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/testbed/testbed_api_barriers.h b/src/testbed/testbed_api_barriers.h new file mode 100644 index 000000000..89aa56ca5 --- /dev/null +++ b/src/testbed/testbed_api_barriers.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | (C) 2008--2013 Christian Grothoff (and other contributing authors) | ||
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., 59 Temple Place - Suite 330, | ||
18 | Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | /** | ||
22 | * @file testbed/testbed_api_barriers.h | ||
23 | * @brief interface for barriers API function that are used internally (not | ||
24 | * exposed as user API) | ||
25 | * @author Sree Harsha Totakura <sreeharsha@totakura.in> | ||
26 | */ | ||
27 | |||
28 | #include "gnunet_testbed_service.h" | ||
29 | |||
30 | |||
31 | /** | ||
32 | * Initialise a barrier and call the given callback when the required percentage | ||
33 | * of peers (quorum) reach the barrier OR upon error. | ||
34 | * | ||
35 | * @param controller the handle to the controller | ||
36 | * @param name identification name of the barrier | ||
37 | * @param quorum the percentage of peers that is required to reach the barrier. | ||
38 | * Peers signal reaching a barrier by calling | ||
39 | * GNUNET_TESTBED_barrier_reached(). | ||
40 | * @param cb the callback to call when the barrier is reached or upon error. | ||
41 | * Cannot be NULL. | ||
42 | * @param cls closure for the above callback | ||
43 | * @param echo GNUNET_YES to echo the barrier crossed status message back to the | ||
44 | * controller | ||
45 | * @return barrier handle; NULL upon error | ||
46 | */ | ||
47 | struct GNUNET_TESTBED_Barrier * | ||
48 | GNUNET_TESTBED_barrier_init_ (struct GNUNET_TESTBED_Controller *controller, | ||
49 | const char *name, | ||
50 | unsigned int quorum, | ||
51 | GNUNET_TESTBED_barrier_status_cb cb, void *cls, | ||
52 | int echo); | ||