diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-06-27 16:15:33 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-06-27 16:15:33 +0000 |
commit | f27f46409ec33cef42379006d561d33a2ae44682 (patch) | |
tree | 0d32d879b31feb0d9aa0d19e44b41a2146cb1973 /src/testbed/testbed_api_hosts.h | |
parent | 3a4870624812ac4286624d3946981cac6aef4e67 (diff) | |
download | gnunet-f27f46409ec33cef42379006d561d33a2ae44682.tar.gz gnunet-f27f46409ec33cef42379006d561d33a2ae44682.zip |
convert testbed_api to MQ (not perfect, but working)
Diffstat (limited to 'src/testbed/testbed_api_hosts.h')
-rw-r--r-- | src/testbed/testbed_api_hosts.h | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/src/testbed/testbed_api_hosts.h b/src/testbed/testbed_api_hosts.h index e58da1961..2e53e1c64 100644 --- a/src/testbed/testbed_api_hosts.h +++ b/src/testbed/testbed_api_hosts.h | |||
@@ -24,8 +24,8 @@ | |||
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #ifndef NEW_TESTING_API_HOSTS_H | 27 | #ifndef TESTBED_API_HOSTS_H |
28 | #define NEW_TESTING_API_HOSTS_H | 28 | #define TESTBED_API_HOSTS_H |
29 | 29 | ||
30 | //#include "gnunet_testbed_service.h" | 30 | //#include "gnunet_testbed_service.h" |
31 | //#include "testbed_helper.h" | 31 | //#include "testbed_helper.h" |
@@ -33,6 +33,33 @@ | |||
33 | 33 | ||
34 | 34 | ||
35 | /** | 35 | /** |
36 | * handle for host registration | ||
37 | */ | ||
38 | struct GNUNET_TESTBED_HostRegistrationHandle | ||
39 | { | ||
40 | /** | ||
41 | * The host being registered | ||
42 | */ | ||
43 | struct GNUNET_TESTBED_Host *host; | ||
44 | |||
45 | /** | ||
46 | * The controller at which this host is being registered | ||
47 | */ | ||
48 | struct GNUNET_TESTBED_Controller *c; | ||
49 | |||
50 | /** | ||
51 | * The Registartion completion callback | ||
52 | */ | ||
53 | GNUNET_TESTBED_HostRegistrationCompletion cc; | ||
54 | |||
55 | /** | ||
56 | * The closure for above callback | ||
57 | */ | ||
58 | void *cc_cls; | ||
59 | }; | ||
60 | |||
61 | |||
62 | /** | ||
36 | * Lookup a host by ID. | 63 | * Lookup a host by ID. |
37 | * | 64 | * |
38 | * @param id global host ID assigned to the host; 0 is | 65 | * @param id global host ID assigned to the host; 0 is |
@@ -164,22 +191,6 @@ GNUNET_TESTBED_host_queue_oc_ (struct GNUNET_TESTBED_Host *h, | |||
164 | 191 | ||
165 | 192 | ||
166 | /** | 193 | /** |
167 | * Handler for GNUNET_MESSAGE_TYPE_TESTBED_ADDHOSTCONFIRM message from | ||
168 | * controller (testbed service) | ||
169 | * | ||
170 | * @param c the controller handler | ||
171 | * @param msg message received | ||
172 | * @return GNUNET_YES if we can continue receiving from service; GNUNET_NO if | ||
173 | * not | ||
174 | */ | ||
175 | int | ||
176 | GNUNET_TESTBED_host_handle_addhostconfirm_ (struct GNUNET_TESTBED_Controller *c, | ||
177 | const struct | ||
178 | GNUNET_TESTBED_HostConfirmedMessage | ||
179 | *msg); | ||
180 | |||
181 | |||
182 | /** | ||
183 | * Sends termination signal to the controller's helper process | 194 | * Sends termination signal to the controller's helper process |
184 | * | 195 | * |
185 | * @param cproc the handle to the controller's helper process | 196 | * @param cproc the handle to the controller's helper process |