* @param cfg configuration to use
* @return NULL on error (service unknown to configuration)
*/
-struct GNUNET_CLIENT_Connection *GNUNET_CLIENT_connect (const char
- *service_name,
- const struct
- GNUNET_CONFIGURATION_Handle
- *cfg);
-
-
-/**
- * Configure this connection to ignore shutdown signals.
- *
- * @param h client handle
- * @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default
- */
-void
-GNUNET_CLIENT_ignore_shutdown (struct GNUNET_CLIENT_Connection *h,
- int do_ignore);
-
+struct GNUNET_CLIENT_Connection *
+GNUNET_CLIENT_connect (const char *service_name,
+ const struct GNUNET_CONFIGURATION_Handle *cfg);
/**
* @param finish_pending_write should a transmission already passed to the
* handle be completed?
*/
-void GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock,
- int finish_pending_write);
+void
+GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock,
+ int finish_pending_write);
+
/**
* Type of a function to call when we receive a message
* @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);
+
/**
* Type of a function to call when we have finished shutting
* GNUNET_YES on running
* GNUNET_SYSERR on failure to transmit message
*/
-typedef void (*GNUNET_CLIENT_ShutdownTask) (void *cls,
- int reason);
+typedef void (*GNUNET_CLIENT_ShutdownTask) (void *cls, int reason);
+
/**
* Read from the service.
* @param handler_cls closure for handler
* @param timeout how long to wait until timing out
*/
-void GNUNET_CLIENT_receive (struct GNUNET_CLIENT_Connection *sock,
- GNUNET_CLIENT_MessageHandler handler,
- void *handler_cls,
- struct GNUNET_TIME_Relative timeout);
+void
+GNUNET_CLIENT_receive (struct GNUNET_CLIENT_Connection *sock,
+ GNUNET_CLIENT_MessageHandler handler, void *handler_cls,
+ struct GNUNET_TIME_Relative timeout);
/**
* non-NULL if the notify callback was queued (can be used to cancel
* using GNUNET_CONNECTION_notify_transmit_ready_cancel)
*/
-struct GNUNET_CLIENT_TransmitHandle
- *GNUNET_CLIENT_notify_transmit_ready (struct GNUNET_CLIENT_Connection *sock,
- size_t size,
- struct GNUNET_TIME_Relative timeout,
- int auto_retry,
- GNUNET_CONNECTION_TransmitReadyNotify
- notify,
- void *notify_cls);
+struct GNUNET_CLIENT_TransmitHandle *
+GNUNET_CLIENT_notify_transmit_ready (struct GNUNET_CLIENT_Connection *sock,
+ size_t size,
+ struct GNUNET_TIME_Relative timeout,
+ int auto_retry,
+ GNUNET_CONNECTION_TransmitReadyNotify
+ notify, void *notify_cls);
/**
* Cancel a request for notification.
- *
+ *
* @param th handle from the original request.
*/
void
-GNUNET_CLIENT_notify_transmit_ready_cancel (struct GNUNET_CLIENT_TransmitHandle *th);
+GNUNET_CLIENT_notify_transmit_ready_cancel (struct GNUNET_CLIENT_TransmitHandle
+ *th);
/**
* if the caller does not care about temporary connection errors,
* for example because the protocol is stateless
* @param rn function to call with the response
- * @param rn_cls closure for rn
+ * @param rn_cls closure for rn
* @return GNUNET_OK on success, GNUNET_SYSERR if a request
* is already pending
*/
int
GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection *sock,
- const struct GNUNET_MessageHeader *hdr,
- struct GNUNET_TIME_Relative timeout,
- int auto_retry,
- GNUNET_CLIENT_MessageHandler rn,
- void *rn_cls);
+ const struct GNUNET_MessageHeader *hdr,
+ struct GNUNET_TIME_Relative timeout,
+ int auto_retry,
+ GNUNET_CLIENT_MessageHandler rn,
+ void *rn_cls);
/**
* or "TIMEOUT" (service not known to be running))
* @param task_cls closure for task
*/
-void GNUNET_CLIENT_service_test (const char *service,
- const struct GNUNET_CONFIGURATION_Handle *cfg,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_SCHEDULER_Task task, void *task_cls);
+void
+GNUNET_CLIENT_service_test (const char *service,
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_SCHEDULER_Task task, void *task_cls);
#if 0 /* keep Emacsens' auto-indent happy */