diff options
Diffstat (limited to 'src/include/gnunet_curl_lib.h')
-rw-r--r-- | src/include/gnunet_curl_lib.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/include/gnunet_curl_lib.h b/src/include/gnunet_curl_lib.h index 38acecc48..967170085 100644 --- a/src/include/gnunet_curl_lib.h +++ b/src/include/gnunet_curl_lib.h | |||
@@ -18,6 +18,9 @@ | |||
18 | SPDX-License-Identifier: AGPL3.0-or-later | 18 | SPDX-License-Identifier: AGPL3.0-or-later |
19 | */ | 19 | */ |
20 | /** | 20 | /** |
21 | * @addtogroup lib_extra Additional libraries | ||
22 | * @{ | ||
23 | * | ||
21 | * @file src/include/gnunet_curl_lib.h | 24 | * @file src/include/gnunet_curl_lib.h |
22 | * @brief library to make it easy to download JSON replies over HTTP | 25 | * @brief library to make it easy to download JSON replies over HTTP |
23 | * @author Sree Harsha Totakura <sreeharsha@totakura.in> | 26 | * @author Sree Harsha Totakura <sreeharsha@totakura.in> |
@@ -29,13 +32,8 @@ | |||
29 | */ | 32 | */ |
30 | #ifndef GNUNET_CURL_LIB_H | 33 | #ifndef GNUNET_CURL_LIB_H |
31 | #define GNUNET_CURL_LIB_H | 34 | #define GNUNET_CURL_LIB_H |
32 | #if HAVE_LIBCURL | 35 | |
33 | #include <curl/curl.h> | 36 | #include <curl/curl.h> |
34 | #elif HAVE_LIBGNURL | ||
35 | #include <gnurl/curl.h> | ||
36 | #else | ||
37 | #error "needs curl or gnurl" | ||
38 | #endif | ||
39 | #include "gnunet_util_lib.h" | 37 | #include "gnunet_util_lib.h" |
40 | 38 | ||
41 | 39 | ||
@@ -230,7 +228,7 @@ typedef void | |||
230 | * be executed AND cleaned up | 228 | * be executed AND cleaned up |
231 | * @param jcc callback to invoke upon completion | 229 | * @param jcc callback to invoke upon completion |
232 | * @param jcc_cls closure for @a jcc | 230 | * @param jcc_cls closure for @a jcc |
233 | * @return NULL on error (in this case, @eh is still released!) | 231 | * @return NULL on error (in this case, @a eh is still released!) |
234 | */ | 232 | */ |
235 | struct GNUNET_CURL_Job * | 233 | struct GNUNET_CURL_Job * |
236 | GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx, | 234 | GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx, |
@@ -252,7 +250,7 @@ GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx, | |||
252 | * be executed AND cleaned up | 250 | * be executed AND cleaned up |
253 | * @param jcc callback to invoke upon completion | 251 | * @param jcc callback to invoke upon completion |
254 | * @param jcc_cls closure for @a jcc | 252 | * @param jcc_cls closure for @a jcc |
255 | * @return NULL on error (in this case, @eh is still released!) | 253 | * @return NULL on error (in this case, @a eh is still released!) |
256 | */ | 254 | */ |
257 | struct GNUNET_CURL_Job * | 255 | struct GNUNET_CURL_Job * |
258 | GNUNET_CURL_job_add_with_ct_json (struct GNUNET_CURL_Context *ctx, | 256 | GNUNET_CURL_job_add_with_ct_json (struct GNUNET_CURL_Context *ctx, |
@@ -310,7 +308,7 @@ GNUNET_CURL_set_tlscert (struct GNUNET_CURL_Context *ctx, | |||
310 | * @param job_headers extra headers to add for this request | 308 | * @param job_headers extra headers to add for this request |
311 | * @param jcc callback to invoke upon completion | 309 | * @param jcc callback to invoke upon completion |
312 | * @param jcc_cls closure for @a jcc | 310 | * @param jcc_cls closure for @a jcc |
313 | * @return NULL on error (in this case, @eh is still released!) | 311 | * @return NULL on error (in this case, @a eh is still released!) |
314 | */ | 312 | */ |
315 | struct GNUNET_CURL_Job * | 313 | struct GNUNET_CURL_Job * |
316 | GNUNET_CURL_job_add2 (struct GNUNET_CURL_Context *ctx, | 314 | GNUNET_CURL_job_add2 (struct GNUNET_CURL_Context *ctx, |
@@ -330,10 +328,9 @@ GNUNET_CURL_job_add2 (struct GNUNET_CURL_Context *ctx, | |||
330 | * @param eh curl easy handle for the request, will | 328 | * @param eh curl easy handle for the request, will |
331 | * be executed AND cleaned up | 329 | * be executed AND cleaned up |
332 | * @param job_headers extra headers to add for this request | 330 | * @param job_headers extra headers to add for this request |
333 | * @param max_reply_size largest acceptable response body | ||
334 | * @param jcc callback to invoke upon completion | 331 | * @param jcc callback to invoke upon completion |
335 | * @param jcc_cls closure for @a jcc | 332 | * @param jcc_cls closure for @a jcc |
336 | * @return NULL on error (in this case, @eh is still released!) | 333 | * @return NULL on error (in this case, @a eh is still released!) |
337 | */ | 334 | */ |
338 | struct GNUNET_CURL_Job * | 335 | struct GNUNET_CURL_Job * |
339 | GNUNET_CURL_job_add_raw (struct GNUNET_CURL_Context *ctx, | 336 | GNUNET_CURL_job_add_raw (struct GNUNET_CURL_Context *ctx, |
@@ -436,11 +433,13 @@ GNUNET_CURL_enable_async_scope_header (struct GNUNET_CURL_Context *ctx, | |||
436 | * | 433 | * |
437 | * @returns #GNUNET_YES iff given a valid scope ID | 434 | * @returns #GNUNET_YES iff given a valid scope ID |
438 | */ | 435 | */ |
439 | int | 436 | enum GNUNET_GenericReturnValue |
440 | GNUNET_CURL_is_valid_scope_id (const char *scope_id); | 437 | GNUNET_CURL_is_valid_scope_id (const char *scope_id); |
441 | 438 | ||
442 | 439 | ||
443 | #endif | 440 | #endif |
444 | /** @} */ /* end of group */ | 441 | /** @} */ /* end of group */ |
445 | 442 | ||
443 | /** @} */ /* end of group addition to lib_extra */ | ||
444 | |||
446 | /* end of gnunet_curl_lib.h */ | 445 | /* end of gnunet_curl_lib.h */ |