diff options
author | Florian Dold <florian.dold@gmail.com> | 2013-04-17 10:47:02 +0000 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2013-04-17 10:47:02 +0000 |
commit | 415075ccc35339d8e2174f651e1c4195428023c2 (patch) | |
tree | 46f8b67420b19bd04b381893c179081e0864d3d1 | |
parent | e071735ab46784b7d0791b86a61388ef158efb64 (diff) | |
download | gnunet-415075ccc35339d8e2174f651e1c4195428023c2.tar.gz gnunet-415075ccc35339d8e2174f651e1c4195428023c2.zip |
partial docs
-rw-r--r-- | src/set/mq.h | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/src/set/mq.h b/src/set/mq.h index 3a189b14c..25288350c 100644 --- a/src/set/mq.h +++ b/src/set/mq.h | |||
@@ -50,6 +50,21 @@ struct GNUNET_MQ_Handler | |||
50 | uint16_t type; | 50 | uint16_t type; |
51 | }; | 51 | }; |
52 | 52 | ||
53 | /** | ||
54 | * Callback used for notifications | ||
55 | * | ||
56 | * @param cls closure | ||
57 | */ | ||
58 | typedef void (*GNUNET_MQ_NotifyCallback) (void *cls); | ||
59 | |||
60 | /** | ||
61 | * Create a new message for MQ. | ||
62 | * | ||
63 | * @param mhp message header to store the allocated message header in, can be NULL | ||
64 | * @param size size of the message to allocate | ||
65 | * @param type type of the message, will be set in the allocated message | ||
66 | * @param return the allocated MQ message | ||
67 | */ | ||
53 | struct GNUNET_MQ_Message * | 68 | struct GNUNET_MQ_Message * |
54 | GNUNET_MQ_msg_ (struct GNUNET_MessageHeader **mhp, uint16_t size, uint16_t type); | 69 | GNUNET_MQ_msg_ (struct GNUNET_MessageHeader **mhp, uint16_t size, uint16_t type); |
55 | 70 | ||
@@ -57,16 +72,24 @@ void | |||
57 | GNUNET_MQ_send (struct GNUNET_MQ_MessageQueue *mq, struct GNUNET_MQ_Message *mqm); | 72 | GNUNET_MQ_send (struct GNUNET_MQ_MessageQueue *mq, struct GNUNET_MQ_Message *mqm); |
58 | 73 | ||
59 | 74 | ||
75 | /** | ||
76 | * Associate the assoc_data in mq with a unique request id. | ||
77 | * | ||
78 | * @param mq message queue, id will be unique for the queue | ||
79 | * @param mqm message to associate | ||
80 | * @param data to associate | ||
81 | */ | ||
82 | uint32_t | ||
83 | GNUNET_MQ_assoc_add (struct GNUNET_MQ_MessageQueue *mq, | ||
84 | struct GNUNET_MQ_Message *mqm, | ||
85 | void *assoc_data); | ||
86 | |||
60 | void * | 87 | void * |
61 | GNUNET_MQ_assoc_get (struct GNUNET_MQ_MessageQueue *mq, uint32_t request_id); | 88 | GNUNET_MQ_assoc_get (struct GNUNET_MQ_MessageQueue *mq, uint32_t request_id); |
62 | 89 | ||
63 | void * | 90 | void * |
64 | GNUNET_MQ_assoc_remove (struct GNUNET_MQ_MessageQueue *mq, uint32_t request_id); | 91 | GNUNET_MQ_assoc_remove (struct GNUNET_MQ_MessageQueue *mq, uint32_t request_id); |
65 | 92 | ||
66 | uint32_t | ||
67 | GNUNET_MQ_assoc_add (struct GNUNET_MQ_MessageQueue *mq, | ||
68 | struct GNUNET_MQ_Message *mqm, | ||
69 | void *assoc_data); | ||
70 | 93 | ||
71 | 94 | ||
72 | struct GNUNET_MQ_MessageQueue * | 95 | struct GNUNET_MQ_MessageQueue * |