diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-10-10 15:47:00 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-10-10 15:47:00 +0000 |
commit | 93085e8a2991fde229400b588a5930e9fcca0d75 (patch) | |
tree | 0384246adbd96fa0138a46ad5fecb777aa40e789 /src/testbed/gnunet-service-testbed_barriers.h | |
parent | 2bf962c76bb82c1f38acea42c7bdfb241e2582e7 (diff) | |
download | gnunet-93085e8a2991fde229400b588a5930e9fcca0d75.tar.gz gnunet-93085e8a2991fde229400b588a5930e9fcca0d75.zip |
migrating testbed to new service API
Diffstat (limited to 'src/testbed/gnunet-service-testbed_barriers.h')
-rw-r--r-- | src/testbed/gnunet-service-testbed_barriers.h | 71 |
1 files changed, 52 insertions, 19 deletions
diff --git a/src/testbed/gnunet-service-testbed_barriers.h b/src/testbed/gnunet-service-testbed_barriers.h index ed5ba309b..2fc3222f8 100644 --- a/src/testbed/gnunet-service-testbed_barriers.h +++ b/src/testbed/gnunet-service-testbed_barriers.h | |||
@@ -40,55 +40,88 @@ GST_barriers_init (struct GNUNET_CONFIGURATION_Handle *cfg); | |||
40 | * Function to stop the barrier service | 40 | * Function to stop the barrier service |
41 | */ | 41 | */ |
42 | void | 42 | void |
43 | GST_barriers_destroy (); | 43 | GST_barriers_destroy (void); |
44 | 44 | ||
45 | 45 | ||
46 | /** | 46 | /** |
47 | * Message handler for GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT messages. This | 47 | * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT messages. |
48 | * | ||
49 | * @param cls identification of the client | ||
50 | * @param msg the actual message | ||
51 | * @return #GNUNET_OK if @a msg is well-formed | ||
52 | */ | ||
53 | int | ||
54 | check_barrier_init (void *cls, | ||
55 | const struct GNUNET_TESTBED_BarrierInit *msg); | ||
56 | |||
57 | |||
58 | /** | ||
59 | * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_INIT messages. This | ||
48 | * message should always come from a parent controller or the testbed API if we | 60 | * message should always come from a parent controller or the testbed API if we |
49 | * are the root controller. | 61 | * are the root controller. |
50 | * | 62 | * |
51 | * This handler is queued in the main service and will handle the messages sent | 63 | * This handler is queued in the main service and will handle the messages sent |
52 | * either from the testbed driver or from a high level controller | 64 | * either from the testbed driver or from a high level controller |
53 | * | 65 | * |
54 | * @param cls NULL | 66 | * @param cls identification of the client |
55 | * @param client identification of the client | 67 | * @param msg the actual message |
56 | * @param message the actual message | ||
57 | */ | 68 | */ |
58 | void | 69 | void |
59 | GST_handle_barrier_init (void *cls, struct GNUNET_SERVER_Client *client, | 70 | handle_barrier_init (void *cls, |
60 | const struct GNUNET_MessageHeader *message); | 71 | const struct GNUNET_TESTBED_BarrierInit *msg); |
61 | 72 | ||
62 | 73 | ||
63 | /** | 74 | /** |
64 | * Message handler for GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL messages. This | 75 | * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL messages. |
76 | * | ||
77 | * @param cls identification of the client | ||
78 | * @param msg the actual message | ||
79 | * @return #GNUNET_OK if @a msg is well-formed | ||
80 | */ | ||
81 | int | ||
82 | check_barrier_cancel (void *cls, | ||
83 | const struct GNUNET_TESTBED_BarrierCancel *msg); | ||
84 | |||
85 | |||
86 | /** | ||
87 | * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_CANCEL messages. This | ||
65 | * message should always come from a parent controller or the testbed API if we | 88 | * message should always come from a parent controller or the testbed API if we |
66 | * are the root controller. | 89 | * are the root controller. |
67 | * | 90 | * |
68 | * This handler is queued in the main service and will handle the messages sent | 91 | * This handler is queued in the main service and will handle the messages sent |
69 | * either from the testbed driver or from a high level controller | 92 | * either from the testbed driver or from a high level controller |
70 | * | 93 | * |
71 | * @param cls NULL | 94 | * @param cls identification of the client |
72 | * @param client identification of the client | 95 | * @param msg the actual message |
73 | * @param message the actual message | ||
74 | */ | 96 | */ |
75 | void | 97 | void |
76 | GST_handle_barrier_cancel (void *cls, struct GNUNET_SERVER_Client *client, | 98 | handle_barrier_cancel (void *cls, |
77 | const struct GNUNET_MessageHeader *message); | 99 | const struct GNUNET_TESTBED_BarrierCancel *msg); |
100 | |||
101 | |||
102 | /** | ||
103 | * Check #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages. | ||
104 | * | ||
105 | * @param cls identification of the client | ||
106 | * @param msg the actual message | ||
107 | * @return #GNUNET_OK if @a msg is well-formed | ||
108 | */ | ||
109 | int | ||
110 | check_barrier_status (void *cls, | ||
111 | const struct GNUNET_TESTBED_BarrierStatusMsg *msg); | ||
78 | 112 | ||
79 | 113 | ||
80 | /** | 114 | /** |
81 | * Message handler for GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages. | 115 | * Message handler for #GNUNET_MESSAGE_TYPE_TESTBED_BARRIER_STATUS messages. |
82 | * This handler is queued in the main service and will handle the messages sent | 116 | * This handler is queued in the main service and will handle the messages sent |
83 | * either from the testbed driver or from a high level controller | 117 | * either from the testbed driver or from a high level controller |
84 | * | 118 | * |
85 | * @param cls NULL | 119 | * @param cls identification of the client |
86 | * @param client identification of the client | 120 | * @param msg the actual message |
87 | * @param message the actual message | ||
88 | */ | 121 | */ |
89 | void | 122 | void |
90 | GST_handle_barrier_status (void *cls, struct GNUNET_SERVER_Client *client, | 123 | handle_barrier_status (void *cls, |
91 | const struct GNUNET_MessageHeader *message); | 124 | const struct GNUNET_TESTBED_BarrierStatusMsg *msg); |
92 | 125 | ||
93 | #endif /* GNUNET_SERVER_TESTBED_BARRIERS_H_ */ | 126 | #endif /* GNUNET_SERVER_TESTBED_BARRIERS_H_ */ |
94 | 127 | ||