Link namesotre to libgnunetgnsrecord too
[oweals/gnunet.git] / src / include / gnunet_server_lib.h
index 31a9e4a15c5db360a5e980b0744397600ca8399f..e29be0d56cf0802d68e25d7285dc26d4e7bd3ad2 100644 (file)
@@ -140,8 +140,8 @@ GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access,
  *
  * @param access function for access control
  * @param access_cls closure for @a access
- * @param serverAddr address toes listen on (including port), NULL terminated array
- * @param socklen lengths of respective @a serverAddr
+ * @param server_addr address toes listen on (including port), NULL terminated array
+ * @param socklen lengths of respective @a server_addr
  * @param idle_timeout after how long should we timeout idle connections?
  * @param require_found if #GNUNET_YES, connections sending messages of unknown type
  *        will be closed
@@ -150,7 +150,7 @@ GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access,
  */
 struct GNUNET_SERVER_Handle *
 GNUNET_SERVER_create (GNUNET_CONNECTION_AccessCheck access, void *access_cls,
-                      struct sockaddr *const *serverAddr,
+                      struct sockaddr *const *server_addr,
                       const socklen_t * socklen,
                       struct GNUNET_TIME_Relative idle_timeout,
                       int require_found);
@@ -288,7 +288,7 @@ GNUNET_SERVER_client_persist_ (struct GNUNET_SERVER_Client *client);
  *                          serious error)
  */
 void
-GNUNET_SERVER_receive_done (struct GNUNET_SERVER_Client *client, 
+GNUNET_SERVER_receive_done (struct GNUNET_SERVER_Client *client,
                            int success);
 
 
@@ -326,7 +326,7 @@ GNUNET_SERVER_client_get_user_context_ (struct GNUNET_SERVER_Client *client,
  * @param ptr pointer to user context
  * @param size number of bytes in user context struct (for verification only)
  */
-void 
+void
 GNUNET_SERVER_client_set_user_context_ (struct GNUNET_SERVER_Client *client,
                                        void *ptr,
                                        size_t size);
@@ -339,7 +339,8 @@ GNUNET_SERVER_client_set_user_context_ (struct GNUNET_SERVER_Client *client,
  * @param type expected return type (i.e. 'struct Foo')
  * @return pointer to user context of type 'type *'.
  */
-#define GNUNET_SERVER_client_get_user_context(client,type) (type *) GNUNET_SERVER_client_get_user_context_ (client, sizeof (type))
+#define GNUNET_SERVER_client_get_user_context(client,type)              \
+  (type *) GNUNET_SERVER_client_get_user_context_ (client, sizeof (type))
 
 /**
  * Set user context to be associated with the given client.
@@ -347,7 +348,8 @@ GNUNET_SERVER_client_set_user_context_ (struct GNUNET_SERVER_Client *client,
  * @param client client to query
  * @param value pointer to user context
  */
-#define GNUNET_SERVER_client_set_user_context(client,value) GNUNET_SERVER_client_set_user_context_ (client, value, sizeof (*value))
+#define GNUNET_SERVER_client_set_user_context(client,value)             \
+  GNUNET_SERVER_client_set_user_context_ (client, value, sizeof (*value))
 
 
 /**
@@ -500,7 +502,7 @@ GNUNET_SERVER_connect_notify (struct GNUNET_SERVER_Handle *server,
 
 /**
  * Ask the server to stop notifying us whenever a client disconnects.
- * Arguments must match exactly those given to 
+ * Arguments must match exactly those given to
  * #GNUNET_SERVER_disconnect_notify.  It is not necessary to call this
  * function during shutdown of the server; in fact, most applications
  * will never use this function.
@@ -517,7 +519,7 @@ GNUNET_SERVER_disconnect_notify_cancel (struct GNUNET_SERVER_Handle *server,
 
 /**
  * Ask the server to stop notifying us whenever a client connects.
- * Arguments must match exactly those given to 
+ * Arguments must match exactly those given to
  * #GNUNET_SERVER_connect_notify.  It is not necessary to call this
  * function during shutdown of the server; in fact, most applications
  * will never use this function.
@@ -667,9 +669,7 @@ GNUNET_SERVER_notification_context_create (struct GNUNET_SERVER_Handle *server,
  * @param nc context to destroy.
  */
 void
-GNUNET_SERVER_notification_context_destroy (struct
-                                            GNUNET_SERVER_NotificationContext
-                                            *nc);
+GNUNET_SERVER_notification_context_destroy (struct GNUNET_SERVER_NotificationContext *nc);
 
 
 /**
@@ -679,8 +679,7 @@ GNUNET_SERVER_notification_context_destroy (struct
  * @param client client to add
  */
 void
-GNUNET_SERVER_notification_context_add (struct GNUNET_SERVER_NotificationContext
-                                        *nc,
+GNUNET_SERVER_notification_context_add (struct GNUNET_SERVER_NotificationContext *nc,
                                         struct GNUNET_SERVER_Client *client);
 
 
@@ -694,12 +693,10 @@ GNUNET_SERVER_notification_context_add (struct GNUNET_SERVER_NotificationContext
  * @param can_drop can this message be dropped due to queue length limitations
  */
 void
-GNUNET_SERVER_notification_context_unicast (struct
-                                            GNUNET_SERVER_NotificationContext
-                                            *nc,
+GNUNET_SERVER_notification_context_unicast (struct GNUNET_SERVER_NotificationContext *nc,
                                             struct GNUNET_SERVER_Client *client,
-                                            const struct GNUNET_MessageHeader
-                                            *msg, int can_drop);
+                                            const struct GNUNET_MessageHeader *msg,
+                                            int can_drop);
 
 
 /**
@@ -710,11 +707,9 @@ GNUNET_SERVER_notification_context_unicast (struct
  * @param can_drop can this message be dropped due to queue length limitations
  */
 void
-GNUNET_SERVER_notification_context_broadcast (struct
-                                              GNUNET_SERVER_NotificationContext
-                                              *nc,
-                                              const struct GNUNET_MessageHeader
-                                              *msg, int can_drop);
+GNUNET_SERVER_notification_context_broadcast (struct GNUNET_SERVER_NotificationContext *nc,
+                                              const struct GNUNET_MessageHeader *msg,
+                                              int can_drop);
 
 
 /**
@@ -818,7 +813,7 @@ typedef void (*GNUNET_SERVER_MstDestroyCallback) (void *cls, void *mst);
  * @param one_shot only call callback once, keep rest of message in buffer
  * @return #GNUNET_OK if we are done processing (need more data)
  *         #GNUNET_NO if one_shot was set and we have another message ready
- *         #GNUNET_SYSERR if the data stream is corrupt 
+ *         #GNUNET_SYSERR if the data stream is corrupt
  */
 typedef int (*GNUNET_SERVER_MstReceiveCallback) (void *cls, void *mst,
                                                  struct GNUNET_SERVER_Client *client,