diff options
Diffstat (limited to 'src/include/gnunet_transport_communication_service.h')
-rw-r--r-- | src/include/gnunet_transport_communication_service.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/include/gnunet_transport_communication_service.h b/src/include/gnunet_transport_communication_service.h index f4dfc8745..ea6b95e2d 100644 --- a/src/include/gnunet_transport_communication_service.h +++ b/src/include/gnunet_transport_communication_service.h | |||
@@ -50,6 +50,10 @@ extern "C" { | |||
50 | */ | 50 | */ |
51 | #define GNUNET_TRANSPORT_COMMUNICATION_VERSION 0x00000000 | 51 | #define GNUNET_TRANSPORT_COMMUNICATION_VERSION 0x00000000 |
52 | 52 | ||
53 | /** | ||
54 | * Queue length | ||
55 | */ | ||
56 | #define GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED UINT64_MAX | ||
53 | 57 | ||
54 | /** | 58 | /** |
55 | * Function called by the transport service to initialize a | 59 | * Function called by the transport service to initialize a |
@@ -176,8 +180,9 @@ GNUNET_TRANSPORT_communicator_disconnect ( | |||
176 | * @param success #GNUNET_SYSERR on failure (try to disconnect/reset connection) | 180 | * @param success #GNUNET_SYSERR on failure (try to disconnect/reset connection) |
177 | * #GNUNET_OK on success | 181 | * #GNUNET_OK on success |
178 | */ | 182 | */ |
179 | typedef void (*GNUNET_TRANSPORT_MessageCompletedCallback) (void *cls, | 183 | typedef void |
180 | int success); | 184 | (*GNUNET_TRANSPORT_MessageCompletedCallback) (void *cls, |
185 | int success); | ||
181 | 186 | ||
182 | 187 | ||
183 | /** | 188 | /** |
@@ -251,6 +256,9 @@ enum GNUNET_TRANSPORT_ConnectionStatus | |||
251 | * @param address address in human-readable format, 0-terminated, UTF-8 | 256 | * @param address address in human-readable format, 0-terminated, UTF-8 |
252 | * @param mtu maximum message size supported by queue, 0 if | 257 | * @param mtu maximum message size supported by queue, 0 if |
253 | * sending is not supported, SIZE_MAX for no MTU | 258 | * sending is not supported, SIZE_MAX for no MTU |
259 | * @param q_len number of messages that can be send through this queue | ||
260 | * @param priority queue priority. Queues with highest priority should be | ||
261 | * used | ||
254 | * @param nt which network type does the @a address belong to? | 262 | * @param nt which network type does the @a address belong to? |
255 | * @param cs what is the connection status of the queue? | 263 | * @param cs what is the connection status of the queue? |
256 | * @param mq message queue of the @a peer | 264 | * @param mq message queue of the @a peer |
@@ -262,10 +270,27 @@ GNUNET_TRANSPORT_communicator_mq_add ( | |||
262 | const struct GNUNET_PeerIdentity *peer, | 270 | const struct GNUNET_PeerIdentity *peer, |
263 | const char *address, | 271 | const char *address, |
264 | uint32_t mtu, | 272 | uint32_t mtu, |
273 | uint64_t q_len, | ||
274 | uint32_t priority, | ||
265 | enum GNUNET_NetworkType nt, | 275 | enum GNUNET_NetworkType nt, |
266 | enum GNUNET_TRANSPORT_ConnectionStatus cs, | 276 | enum GNUNET_TRANSPORT_ConnectionStatus cs, |
267 | struct GNUNET_MQ_Handle *mq); | 277 | struct GNUNET_MQ_Handle *mq); |
268 | 278 | ||
279 | /** | ||
280 | * Notify transport service that an MQ was updated | ||
281 | * | ||
282 | * @param ch connection to transport service | ||
283 | * @param qh the queue to update | ||
284 | * @param q_len number of messages that can be send through this queue | ||
285 | * @param priority queue priority. Queues with highest priority should be | ||
286 | * used | ||
287 | */ | ||
288 | void | ||
289 | GNUNET_TRANSPORT_communicator_mq_update ( | ||
290 | struct GNUNET_TRANSPORT_CommunicatorHandle *ch, | ||
291 | const struct GNUNET_TRANSPORT_QueueHandle *u_qh, | ||
292 | uint64_t q_len, | ||
293 | uint32_t priority); | ||
269 | 294 | ||
270 | /** | 295 | /** |
271 | * Notify transport service that an MQ became unavailable due to a | 296 | * Notify transport service that an MQ became unavailable due to a |