aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_client_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-16 16:03:20 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-16 16:03:20 +0000
commit16a6919a9f98ee9fa1fee9dd262906c321004a19 (patch)
treee09d4fe5191dc329b3e1b667f2914f8313bcba59 /src/include/gnunet_client_lib.h
parent4d7904c62bb867c44e90b8e9f7cdbb4b283abc44 (diff)
downloadgnunet-16a6919a9f98ee9fa1fee9dd262906c321004a19.tar.gz
gnunet-16a6919a9f98ee9fa1fee9dd262906c321004a19.zip
even nicer indentation, thanks to LRN's indent patch
Diffstat (limited to 'src/include/gnunet_client_lib.h')
-rw-r--r--src/include/gnunet_client_lib.h77
1 files changed, 35 insertions, 42 deletions
diff --git a/src/include/gnunet_client_lib.h b/src/include/gnunet_client_lib.h
index 3fad01222..ed033d031 100644
--- a/src/include/gnunet_client_lib.h
+++ b/src/include/gnunet_client_lib.h
@@ -53,11 +53,9 @@ struct GNUNET_CLIENT_Connection;
53 * @param cfg configuration to use 53 * @param cfg configuration to use
54 * @return NULL on error (service unknown to configuration) 54 * @return NULL on error (service unknown to configuration)
55 */ 55 */
56struct GNUNET_CLIENT_Connection *GNUNET_CLIENT_connect (const char 56struct GNUNET_CLIENT_Connection *
57 *service_name, 57GNUNET_CLIENT_connect (const char *service_name,
58 const struct 58 const struct GNUNET_CONFIGURATION_Handle *cfg);
59 GNUNET_CONFIGURATION_Handle
60 *cfg);
61 59
62 60
63/** 61/**
@@ -66,8 +64,9 @@ struct GNUNET_CLIENT_Connection *GNUNET_CLIENT_connect (const char
66 * @param h client handle 64 * @param h client handle
67 * @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default 65 * @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default
68 */ 66 */
69void GNUNET_CLIENT_ignore_shutdown (struct GNUNET_CLIENT_Connection *h, 67void
70 int do_ignore); 68GNUNET_CLIENT_ignore_shutdown (struct GNUNET_CLIENT_Connection *h,
69 int do_ignore);
71 70
72 71
73 72
@@ -86,8 +85,9 @@ void GNUNET_CLIENT_ignore_shutdown (struct GNUNET_CLIENT_Connection *h,
86 * @param finish_pending_write should a transmission already passed to the 85 * @param finish_pending_write should a transmission already passed to the
87 * handle be completed? 86 * handle be completed?
88 */ 87 */
89void GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock, 88void
90 int finish_pending_write); 89GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock,
90 int finish_pending_write);
91 91
92/** 92/**
93 * Type of a function to call when we receive a message 93 * Type of a function to call when we receive a message
@@ -120,10 +120,10 @@ typedef void (*GNUNET_CLIENT_ShutdownTask) (void *cls, int reason);
120 * @param handler_cls closure for handler 120 * @param handler_cls closure for handler
121 * @param timeout how long to wait until timing out 121 * @param timeout how long to wait until timing out
122 */ 122 */
123void GNUNET_CLIENT_receive (struct GNUNET_CLIENT_Connection *sock, 123void
124 GNUNET_CLIENT_MessageHandler handler, 124GNUNET_CLIENT_receive (struct GNUNET_CLIENT_Connection *sock,
125 void *handler_cls, 125 GNUNET_CLIENT_MessageHandler handler, void *handler_cls,
126 struct GNUNET_TIME_Relative timeout); 126 struct GNUNET_TIME_Relative timeout);
127 127
128 128
129/** 129/**
@@ -152,20 +152,13 @@ struct GNUNET_CLIENT_TransmitHandle;
152 * non-NULL if the notify callback was queued (can be used to cancel 152 * non-NULL if the notify callback was queued (can be used to cancel
153 * using GNUNET_CONNECTION_notify_transmit_ready_cancel) 153 * using GNUNET_CONNECTION_notify_transmit_ready_cancel)
154 */ 154 */
155struct GNUNET_CLIENT_TransmitHandle *GNUNET_CLIENT_notify_transmit_ready (struct 155struct GNUNET_CLIENT_TransmitHandle *
156 GNUNET_CLIENT_Connection 156GNUNET_CLIENT_notify_transmit_ready (struct GNUNET_CLIENT_Connection *sock,
157 *sock, 157 size_t size,
158 size_t 158 struct GNUNET_TIME_Relative timeout,
159 size, 159 int auto_retry,
160 struct 160 GNUNET_CONNECTION_TransmitReadyNotify
161 GNUNET_TIME_Relative 161 notify, void *notify_cls);
162 timeout,
163 int
164 auto_retry,
165 GNUNET_CONNECTION_TransmitReadyNotify
166 notify,
167 void
168 *notify_cls);
169 162
170 163
171/** 164/**
@@ -173,9 +166,9 @@ struct GNUNET_CLIENT_TransmitHandle *GNUNET_CLIENT_notify_transmit_ready (struct
173 * 166 *
174 * @param th handle from the original request. 167 * @param th handle from the original request.
175 */ 168 */
176void GNUNET_CLIENT_notify_transmit_ready_cancel (struct 169void
177 GNUNET_CLIENT_TransmitHandle 170GNUNET_CLIENT_notify_transmit_ready_cancel (struct GNUNET_CLIENT_TransmitHandle
178 *th); 171 *th);
179 172
180 173
181/** 174/**
@@ -199,14 +192,13 @@ void GNUNET_CLIENT_notify_transmit_ready_cancel (struct
199 * @return GNUNET_OK on success, GNUNET_SYSERR if a request 192 * @return GNUNET_OK on success, GNUNET_SYSERR if a request
200 * is already pending 193 * is already pending
201 */ 194 */
202int GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection 195int
203 *sock, 196GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection *sock,
204 const struct GNUNET_MessageHeader 197 const struct GNUNET_MessageHeader *hdr,
205 *hdr, 198 struct GNUNET_TIME_Relative timeout,
206 struct GNUNET_TIME_Relative 199 int auto_retry,
207 timeout, int auto_retry, 200 GNUNET_CLIENT_MessageHandler rn,
208 GNUNET_CLIENT_MessageHandler rn, 201 void *rn_cls);
209 void *rn_cls);
210 202
211 203
212/** 204/**
@@ -220,10 +212,11 @@ int GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection
220 * or "TIMEOUT" (service not known to be running)) 212 * or "TIMEOUT" (service not known to be running))
221 * @param task_cls closure for task 213 * @param task_cls closure for task
222 */ 214 */
223void GNUNET_CLIENT_service_test (const char *service, 215void
224 const struct GNUNET_CONFIGURATION_Handle *cfg, 216GNUNET_CLIENT_service_test (const char *service,
225 struct GNUNET_TIME_Relative timeout, 217 const struct GNUNET_CONFIGURATION_Handle *cfg,
226 GNUNET_SCHEDULER_Task task, void *task_cls); 218 struct GNUNET_TIME_Relative timeout,
219 GNUNET_SCHEDULER_Task task, void *task_cls);
227 220
228 221
229#if 0 /* keep Emacsens' auto-indent happy */ 222#if 0 /* keep Emacsens' auto-indent happy */