-migrating ATS tests to new transport (and core) API; core tests disabled as new...
[oweals/gnunet.git] / src / include / gnunet_mq_lib.h
index 08e09d5b51c76c6f18cbdb3fbd7120e38d600300..43cefca9f1a17ef7b4232a2384ffd1d4b48197b3 100644 (file)
@@ -117,6 +117,12 @@ GNUNET_MQ_extract_nested_mh_ (const struct GNUNET_MessageHeader *mh,
                               uint16_t base_size);
 
 
+/**
+ * Opaque handle to an envelope.
+ */
+struct GNUNET_MQ_Envelope;
+
+
 /**
  * Implementation of the #GNUNET_MQ_msg_nested_mh macro.
  *
@@ -138,11 +144,6 @@ GNUNET_MQ_msg_nested_mh_ (struct GNUNET_MessageHeader **mhp,
  */
 struct GNUNET_MQ_Handle;
 
-/**
- * Opaque handle to an envelope.
- */
-struct GNUNET_MQ_Envelope;
-
 
 /**
  * Error codes for the queue.
@@ -443,7 +444,7 @@ GNUNET_MQ_get_length (struct GNUNET_MQ_Handle *mq);
 
 
 /**
- * Send a message with the give message queue.
+ * Send a message with the given message queue.
  * May only be called once per message.
  *
  * @param mq message queue
@@ -455,7 +456,7 @@ GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq,
 
 
 /**
- * Send a copy of a message with the give message queue.
+ * Send a copy of a message with the given message queue.
  * Can be called repeatedly on the same envelope.
  *
  * @param mq message queue
@@ -534,6 +535,18 @@ GNUNET_MQ_queue_for_callbacks (GNUNET_MQ_SendImpl send,
                                void *cls);
 
 
+/**
+ * Change the closure argument in all of the `handlers` of the
+ * @a mq.
+ *
+ * @param mq to modify
+ * @param handlers_cls new closure to use
+ */
+void
+GNUNET_MQ_set_handlers_closure (struct GNUNET_MQ_Handle *mq,
+                                void *handlers_cls);
+
+
 /**
  * Call a callback once the envelope has been sent, that is,
  * sending it can not be canceled anymore.