diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_mq_lib.h | 16 | ||||
-rw-r--r-- | src/include/gnunet_protocols.h | 7 | ||||
-rw-r--r-- | src/include/gnunet_transport_service.h | 25 |
3 files changed, 39 insertions, 9 deletions
diff --git a/src/include/gnunet_mq_lib.h b/src/include/gnunet_mq_lib.h index ca09e7196..412fde4e7 100644 --- a/src/include/gnunet_mq_lib.h +++ b/src/include/gnunet_mq_lib.h | |||
@@ -120,7 +120,9 @@ GNUNET_MQ_extract_nested_mh_ (const struct GNUNET_MessageHeader *mh, | |||
120 | * @param nested_mh the message to append to the message after base_size | 120 | * @param nested_mh the message to append to the message after base_size |
121 | */ | 121 | */ |
122 | struct GNUNET_MQ_Envelope * | 122 | struct GNUNET_MQ_Envelope * |
123 | GNUNET_MQ_msg_nested_mh_ (struct GNUNET_MessageHeader **mhp, uint16_t base_size, uint16_t type, | 123 | GNUNET_MQ_msg_nested_mh_ (struct GNUNET_MessageHeader **mhp, |
124 | uint16_t base_size, | ||
125 | uint16_t type, | ||
124 | const struct GNUNET_MessageHeader *nested_mh); | 126 | const struct GNUNET_MessageHeader *nested_mh); |
125 | 127 | ||
126 | 128 | ||
@@ -199,7 +201,8 @@ typedef void | |||
199 | * @param impl_state state of the implementation | 201 | * @param impl_state state of the implementation |
200 | */ | 202 | */ |
201 | typedef void | 203 | typedef void |
202 | (*GNUNET_MQ_DestroyImpl) (struct GNUNET_MQ_Handle *mq, void *impl_state); | 204 | (*GNUNET_MQ_DestroyImpl) (struct GNUNET_MQ_Handle *mq, |
205 | void *impl_state); | ||
203 | 206 | ||
204 | 207 | ||
205 | /** | 208 | /** |
@@ -209,7 +212,8 @@ typedef void | |||
209 | * @param impl_state state specific to the implementation | 212 | * @param impl_state state specific to the implementation |
210 | */ | 213 | */ |
211 | typedef void | 214 | typedef void |
212 | (*GNUNET_MQ_CancelImpl) (struct GNUNET_MQ_Handle *mq, void *impl_state); | 215 | (*GNUNET_MQ_CancelImpl) (struct GNUNET_MQ_Handle *mq, |
216 | void *impl_state); | ||
213 | 217 | ||
214 | 218 | ||
215 | /** | 219 | /** |
@@ -328,7 +332,8 @@ GNUNET_MQ_assoc_add (struct GNUNET_MQ_Handle *mq, void *assoc_data); | |||
328 | * @return the associated data | 332 | * @return the associated data |
329 | */ | 333 | */ |
330 | void * | 334 | void * |
331 | GNUNET_MQ_assoc_get (struct GNUNET_MQ_Handle *mq, uint32_t request_id); | 335 | GNUNET_MQ_assoc_get (struct GNUNET_MQ_Handle *mq, |
336 | uint32_t request_id); | ||
332 | 337 | ||
333 | 338 | ||
334 | /** | 339 | /** |
@@ -339,7 +344,8 @@ GNUNET_MQ_assoc_get (struct GNUNET_MQ_Handle *mq, uint32_t request_id); | |||
339 | * @return the associated data | 344 | * @return the associated data |
340 | */ | 345 | */ |
341 | void * | 346 | void * |
342 | GNUNET_MQ_assoc_remove (struct GNUNET_MQ_Handle *mq, uint32_t request_id); | 347 | GNUNET_MQ_assoc_remove (struct GNUNET_MQ_Handle *mq, |
348 | uint32_t request_id); | ||
343 | 349 | ||
344 | 350 | ||
345 | /** | 351 | /** |
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index 62f0331d1..5e7b357a6 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h | |||
@@ -1359,6 +1359,13 @@ extern "C" | |||
1359 | */ | 1359 | */ |
1360 | #define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_SYNC 390 | 1360 | #define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_SYNC 390 |
1361 | 1361 | ||
1362 | /** | ||
1363 | * Message for transport service from a client asking that a | ||
1364 | * connection with another peer be torn down. | ||
1365 | */ | ||
1366 | #define GNUNET_MESSAGE_TYPE_TRANSPORT_REQUEST_DISCONNECT 391 | ||
1367 | |||
1368 | |||
1362 | /******************************************************************************* | 1369 | /******************************************************************************* |
1363 | * FS-PUBLISH-HELPER IPC Messages | 1370 | * FS-PUBLISH-HELPER IPC Messages |
1364 | ******************************************************************************/ | 1371 | ******************************************************************************/ |
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 *************************** */ |