diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-12-20 14:54:49 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-12-20 14:54:49 +0000 |
commit | 4c630a158187a48ba585167b0ede49bd524d6f8d (patch) | |
tree | ce1c39ef45e87f31ebb56d38c7d0e9038811e85b /src/include/gnunet_transport_service.h | |
parent | f71fb2816cee37e823abcaa9d79c149ba90ff4cd (diff) | |
download | gnunet-4c630a158187a48ba585167b0ede49bd524d6f8d.tar.gz gnunet-4c630a158187a48ba585167b0ede49bd524d6f8d.zip |
-use separate message types for TRY_CONNECT and TRY_DISCONNECT
Diffstat (limited to 'src/include/gnunet_transport_service.h')
-rw-r--r-- | src/include/gnunet_transport_service.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h index cfa5fdbe0..79fd88f44 100644 --- a/src/include/gnunet_transport_service.h +++ b/src/include/gnunet_transport_service.h | |||
@@ -209,6 +209,23 @@ GNUNET_TRANSPORT_try_connect_cancel (struct GNUNET_TRANSPORT_TryConnectHandle *t | |||
209 | 209 | ||
210 | 210 | ||
211 | /** | 211 | /** |
212 | * Opaque handle for a transmission-ready request. | ||
213 | */ | ||
214 | struct GNUNET_TRANSPORT_TryDisconnectHandle; | ||
215 | |||
216 | /** | ||
217 | * Function to call with result of the try connect request. | ||
218 | * | ||
219 | * @param cls closure | ||
220 | * @param result #GNUNET_OK if message was transmitted to transport service | ||
221 | * #GNUNET_SYSERR if message was not transmitted to transport service | ||
222 | */ | ||
223 | typedef void | ||
224 | (*GNUNET_TRANSPORT_TryDisconnectCallback) (void *cls, | ||
225 | int result); | ||
226 | |||
227 | |||
228 | /** | ||
212 | * Ask the transport service to disconnect from the given peer. | 229 | * Ask the transport service to disconnect from the given peer. |
213 | * | 230 | * |
214 | * @param handle connection to transport service | 231 | * @param handle connection to transport service |
@@ -219,10 +236,10 @@ GNUNET_TRANSPORT_try_connect_cancel (struct GNUNET_TRANSPORT_TryConnectHandle *t | |||
219 | * @return a `struct GNUNET_TRANSPORT_TryConnectHandle` handle or | 236 | * @return a `struct GNUNET_TRANSPORT_TryConnectHandle` handle or |
220 | * NULL on failure (@a cb will not be called) | 237 | * NULL on failure (@a cb will not be called) |
221 | */ | 238 | */ |
222 | struct GNUNET_TRANSPORT_TryConnectHandle * | 239 | struct GNUNET_TRANSPORT_TryDisconnectHandle * |
223 | GNUNET_TRANSPORT_try_disconnect (struct GNUNET_TRANSPORT_Handle *handle, | 240 | GNUNET_TRANSPORT_try_disconnect (struct GNUNET_TRANSPORT_Handle *handle, |
224 | const struct GNUNET_PeerIdentity *target, | 241 | const struct GNUNET_PeerIdentity *target, |
225 | GNUNET_TRANSPORT_TryConnectCallback cb, | 242 | GNUNET_TRANSPORT_TryDisconnectCallback cb, |
226 | void *cb_cls); | 243 | void *cb_cls); |
227 | 244 | ||
228 | 245 | ||
@@ -230,10 +247,10 @@ GNUNET_TRANSPORT_try_disconnect (struct GNUNET_TRANSPORT_Handle *handle, | |||
230 | * Cancel the request to transport to disconnect. | 247 | * Cancel the request to transport to disconnect. |
231 | * Callback will not be called anymore. | 248 | * Callback will not be called anymore. |
232 | * | 249 | * |
233 | * @param tch handle for operation to cancel | 250 | * @param tdh handle for operation to cancel |
234 | */ | 251 | */ |
235 | void | 252 | void |
236 | GNUNET_TRANSPORT_try_disconnect_cancel (struct GNUNET_TRANSPORT_TryConnectHandle *tch); | 253 | GNUNET_TRANSPORT_try_disconnect_cancel (struct GNUNET_TRANSPORT_TryDisconnectHandle *tdh); |
237 | 254 | ||
238 | 255 | ||
239 | /* ************************* Sending *************************** */ | 256 | /* ************************* Sending *************************** */ |