diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-09-05 10:50:56 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-09-05 10:50:56 +0000 |
commit | 270a6392703fe1cb99f69ed8a35c1be0c864b11f (patch) | |
tree | 1c65d01fefab939684c58757880987d2a00fd060 /src/testbed/testbed_api_peers.h | |
parent | c09edda8e8071c6e5ca6b76e7c75a7b8402010ed (diff) | |
download | gnunet-270a6392703fe1cb99f69ed8a35c1be0c864b11f.tar.gz gnunet-270a6392703fe1cb99f69ed8a35c1be0c864b11f.zip |
changed testbed API to include convenience callbacks
Diffstat (limited to 'src/testbed/testbed_api_peers.h')
-rw-r--r-- | src/testbed/testbed_api_peers.h | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/src/testbed/testbed_api_peers.h b/src/testbed/testbed_api_peers.h index 21cae976b..16c4ea42f 100644 --- a/src/testbed/testbed_api_peers.h +++ b/src/testbed/testbed_api_peers.h | |||
@@ -146,37 +146,19 @@ struct PeerInfoData | |||
146 | struct GNUNET_TESTBED_Peer *peer; | 146 | struct GNUNET_TESTBED_Peer *peer; |
147 | 147 | ||
148 | /** | 148 | /** |
149 | * The type of peer information requested | 149 | * The Peer info callback to call when this operation has completed |
150 | */ | 150 | */ |
151 | enum GNUNET_TESTBED_PeerInformationType pit; | 151 | GNUNET_TESTBED_PeerInfoCallback cb; |
152 | }; | 152 | |
153 | |||
154 | |||
155 | /** | ||
156 | * Data for the OperationType OP_PEER_INFO | ||
157 | */ | ||
158 | struct PeerInfoData2 | ||
159 | { | ||
160 | /** | 153 | /** |
161 | * The type of peer information requested | 154 | * The closure for peer info callback |
162 | */ | 155 | */ |
163 | enum GNUNET_TESTBED_PeerInformationType pit; | 156 | void *cb_cls; |
164 | 157 | ||
165 | /** | 158 | /** |
166 | * The data from reply | 159 | * The type of peer information requested |
167 | */ | 160 | */ |
168 | union | 161 | enum GNUNET_TESTBED_PeerInformationType pit; |
169 | { | ||
170 | /** | ||
171 | * Configuration handle | ||
172 | */ | ||
173 | struct GNUNET_CONFIGURATION_Handle *cfg; | ||
174 | |||
175 | /** | ||
176 | * Peer Identity | ||
177 | */ | ||
178 | struct GNUNET_PeerIdentity *peer_identity; | ||
179 | } details; | ||
180 | }; | 162 | }; |
181 | 163 | ||
182 | 164 | ||
@@ -195,6 +177,16 @@ struct OverlayConnectData | |||
195 | */ | 177 | */ |
196 | struct GNUNET_TESTBED_Peer *p2; | 178 | struct GNUNET_TESTBED_Peer *p2; |
197 | 179 | ||
180 | /** | ||
181 | * The operation completion callback to call once this operation is done | ||
182 | */ | ||
183 | GNUNET_TESTBED_OperationCompletionCallback cb; | ||
184 | |||
185 | /** | ||
186 | * The closure for the above callback | ||
187 | */ | ||
188 | void *cb_cls; | ||
189 | |||
198 | }; | 190 | }; |
199 | 191 | ||
200 | 192 | ||