gnunet-service-testbed_barriers.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /*
  2. This file is part of GNUnet.
  3. Copyright (C) 2008--2013 GNUnet e.V.
  4. GNUnet is free software: you can redistribute it and/or modify it
  5. under the terms of the GNU Affero General Public License as published
  6. by the Free Software Foundation, either version 3 of the License,
  7. or (at your option) any later version.
  8. GNUnet is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Affero General Public License for more details.
  12. You should have received a copy of the GNU Affero General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. SPDX-License-Identifier: AGPL3.0-or-later
  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. #ifndef GNUNET_SERVER_TESTBED_BARRIERS_H_
  22. #define GNUNET_SERVER_TESTBED_BARRIERS_H_
  23. /**
  24. * Function to initialise barrriers component
  25. *
  26. * @param cfg the configuration to use for initialisation
  27. */
  28. void
  29. GST_barriers_init (struct GNUNET_CONFIGURATION_Handle *cfg);
  30. /**
  31. * Function to stop the barrier service
  32. */
  33. void
  34. GST_barriers_destroy (void);
  35. /**
  36. * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT messages.
  37. *
  38. * @param cls identification of the client
  39. * @param msg the actual message
  40. * @return #GNUNET_OK if @a msg is well-formed
  41. */
  42. int
  43. check_barrier_init (void *cls,
  44. const struct GNUNET_TESTBED_BarrierInit *msg);
  45. /**
  46. * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT messages. This
  47. * message should always come from a parent controller or the testbed API if we
  48. * are the root controller.
  49. *
  50. * This handler is queued in the main service and will handle the messages sent
  51. * either from the testbed driver or from a high level controller
  52. *
  53. * @param cls identification of the client
  54. * @param msg the actual message
  55. */
  56. void
  57. handle_barrier_init (void *cls,
  58. const struct GNUNET_TESTBED_BarrierInit *msg);
  59. /**
  60. * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL messages.
  61. *
  62. * @param cls identification of the client
  63. * @param msg the actual message
  64. * @return #GNUNET_OK if @a msg is well-formed
  65. */
  66. int
  67. check_barrier_cancel (void *cls,
  68. const struct GNUNET_TESTBED_BarrierCancel *msg);
  69. /**
  70. * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL messages. This
  71. * message should always come from a parent controller or the testbed API if we
  72. * are the root controller.
  73. *
  74. * This handler is queued in the main service and will handle the messages sent
  75. * either from the testbed driver or from a high level controller
  76. *
  77. * @param cls identification of the client
  78. * @param msg the actual message
  79. */
  80. void
  81. handle_barrier_cancel (void *cls,
  82. const struct GNUNET_TESTBED_BarrierCancel *msg);
  83. /**
  84. * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages.
  85. *
  86. * @param cls identification of the client
  87. * @param msg the actual message
  88. * @return #GNUNET_OK if @a msg is well-formed
  89. */
  90. int
  91. check_barrier_status (void *cls,
  92. const struct GNUNET_TESTBED_BarrierStatusMsg *msg);
  93. /**
  94. * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages.
  95. * This handler is queued in the main service and will handle the messages sent
  96. * either from the testbed driver or from a high level controller
  97. *
  98. * @param cls identification of the client
  99. * @param msg the actual message
  100. */
  101. void
  102. handle_barrier_status (void *cls,
  103. const struct GNUNET_TESTBED_BarrierStatusMsg *msg);
  104. #endif /* GNUNET_SERVER_TESTBED_BARRIERS_H_ */
  105. /* end of gnunet-service-testbed_barriers.h */