HKDF (does not work yet)
[oweals/gnunet.git] / src / include / gnunet_client_lib.h
index 21487eb04d76dfa575d6b4fb65c7d00eb32df75d..49ccc6c6b11e9dacad3e403789363a71ccedaccd 100644 (file)
@@ -105,6 +105,19 @@ typedef void (*GNUNET_CLIENT_MessageHandler) (void *cls,
                                               const struct
                                               GNUNET_MessageHeader * msg);
 
+/**
+ * Type of a function to call when we have finished shutting
+ * down a service, or failed.
+ *
+ * @param cls closure
+ * @param reason what is the result of the shutdown
+ *        GNUNET_NO on shutdown (not running)
+ *        GNUNET_YES on running
+ *        GNUNET_SYSERR on failure to transmit message
+ */
+typedef void (*GNUNET_CLIENT_ShutdownTask) (void *cls,
+                                            int reason);
+
 /**
  * Read from the service.
  *
@@ -194,19 +207,6 @@ GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection *sock,
                                         void *rn_cls);
 
 
-
-/**
- * Request that the service should shutdown.
- * Afterwards, the connection will automatically be
- * disconnected.  Hence the "sock" shoud not
- * be used by the caller after this call
- * (calling this function frees "sock" after a while).
- *
- * @param sock the socket connected to the service
- */
-void GNUNET_CLIENT_service_shutdown (struct GNUNET_CLIENT_Connection *sock);
-
-
 /**
  * Wait until the service is running.
  *