client_manager: add API for async operations
[oweals/gnunet.git] / src / include / gnunet_client_lib.h
index d6eaca56a3ee77b0a2af718762c9f9c4c910123f..2c23aab2c4f23e71a8aa0c246e83468d9bb63e70 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2001-2013 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2001-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -37,11 +37,6 @@ extern "C"
 #endif
 #endif
 
-#include "gnunet_common.h"
-#include "gnunet_configuration_lib.h"
-#include "gnunet_connection_lib.h"
-#include "gnunet_scheduler_lib.h"
-#include "gnunet_time_lib.h"
 
 /**
  * Opaque handle for a connection to a service.
@@ -85,8 +80,7 @@ GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *client);
  * @param msg message received, NULL on timeout or fatal error
  */
 typedef void (*GNUNET_CLIENT_MessageHandler) (void *cls,
-                                              const struct GNUNET_MessageHeader
-                                              *msg);
+                                              const struct GNUNET_MessageHeader *msg);
 
 
 /**
@@ -111,8 +105,8 @@ struct GNUNET_CLIENT_TransmitHandle;
 
 /**
  * Ask the client to call us once the specified number of bytes
- * are free in the transmission buffer.  May call the notify
- * method immediately if enough space is available.
+ * are free in the transmission buffer.  Will never call the @a notify
+ * callback in this task, but always first go into the scheduler.
  *
  * @param client connection to the service
  * @param size number of bytes to send
@@ -134,8 +128,8 @@ GNUNET_CLIENT_notify_transmit_ready (struct GNUNET_CLIENT_Connection *client,
                                      size_t size,
                                      struct GNUNET_TIME_Relative timeout,
                                      int auto_retry,
-                                     GNUNET_CONNECTION_TransmitReadyNotify
-                                     notify, void *notify_cls);
+                                     GNUNET_CONNECTION_TransmitReadyNotify notify,
+                                     void *notify_cls);
 
 
 /**