-skeletons for transport-ng
[oweals/gnunet.git] / src / include / gnunet_server_lib.h
index f70f28116640535b7a505c711ada0cb586778089..0ea9a18eba22e4f827b7c3a1045436789180fdd6 100644 (file)
@@ -453,8 +453,9 @@ GNUNET_SERVER_client_get_address (struct GNUNET_SERVER_Client *client,
  * @param client identification of the client; NULL
  *        for the last call when the server is destroyed
  */
-typedef void (*GNUNET_SERVER_DisconnectCallback) (void *cls,
-                                                  struct GNUNET_SERVER_Client *client);
+typedef void
+(*GNUNET_SERVER_DisconnectCallback) (void *cls,
+                                     struct GNUNET_SERVER_Client *client);
 
 
 /**
@@ -464,8 +465,9 @@ typedef void (*GNUNET_SERVER_DisconnectCallback) (void *cls,
  * @param cls closure
  * @param client identification of the client
  */
-typedef void (*GNUNET_SERVER_ConnectCallback) (void *cls,
-                                              struct GNUNET_SERVER_Client *client);
+typedef void
+(*GNUNET_SERVER_ConnectCallback) (void *cls,
+                                  struct GNUNET_SERVER_Client *client);
 
 
 /**
@@ -726,6 +728,16 @@ unsigned int
 GNUNET_SERVER_notification_context_get_size (struct GNUNET_SERVER_NotificationContext *nc);
 
 
+/**
+ * Create a message queue for a server's client.
+ *
+ * @param client the client
+ * @return the message queue
+ */
+struct GNUNET_MQ_Handle *
+GNUNET_MQ_queue_for_server_client (struct GNUNET_SERVER_Client *client);
+
+
 /**
  * Handle to a message stream tokenizer.
  */
@@ -799,8 +811,9 @@ GNUNET_SERVER_mst_destroy (struct GNUNET_SERVER_MessageStreamTokenizer *mst);
  * @param client handle to client the tokenzier will be used for
  * @return handle to custom tokenizer ('mst')
  */
-typedef void* (*GNUNET_SERVER_MstCreateCallback) (void *cls,
-                                                  struct GNUNET_SERVER_Client *client);
+typedef void*
+(*GNUNET_SERVER_MstCreateCallback) (void *cls,
+                                    struct GNUNET_SERVER_Client *client);
 
 
 /**
@@ -809,7 +822,9 @@ typedef void* (*GNUNET_SERVER_MstCreateCallback) (void *cls,
  * @param cls closure from #GNUNET_SERVER_set_callbacks
  * @param mst custom tokenizer handle
  */
-typedef void (*GNUNET_SERVER_MstDestroyCallback) (void *cls, void *mst);
+typedef void
+(*GNUNET_SERVER_MstDestroyCallback) (void *cls,
+                                     void *mst);
 
 
 /**
@@ -828,10 +843,13 @@ typedef void (*GNUNET_SERVER_MstDestroyCallback) (void *cls, void *mst);
  *         #GNUNET_NO if one_shot was set and we have another message ready
  *         #GNUNET_SYSERR if the data stream is corrupt
  */
-typedef int (*GNUNET_SERVER_MstReceiveCallback) (void *cls, void *mst,
-                                                 struct GNUNET_SERVER_Client *client,
-                                                 const char *buf, size_t size,
-                                                 int purge, int one_shot);
+typedef int
+(*GNUNET_SERVER_MstReceiveCallback) (void *cls, void *mst,
+                                     struct GNUNET_SERVER_Client *client,
+                                     const char *buf,
+                                     size_t size,
+                                     int purge,
+                                     int one_shot);
 
 
 /**