diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-05-12 21:16:56 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-05-12 21:29:51 +0200 |
commit | d22f368443dabdca0de859f8e87b2be41d75ab1b (patch) | |
tree | 17b15a2097f9840917cb597001ff1ce0f0b0ab65 /src/include/gnunet_curl_lib.h | |
parent | d11bcece8423f034ae262c7c7cffc83ada39473a (diff) | |
download | gnunet-d22f368443dabdca0de859f8e87b2be41d75ab1b.tar.gz gnunet-d22f368443dabdca0de859f8e87b2be41d75ab1b.zip |
curl: add GNUNET_CURL_job_add2
Diffstat (limited to 'src/include/gnunet_curl_lib.h')
-rw-r--r-- | src/include/gnunet_curl_lib.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/include/gnunet_curl_lib.h b/src/include/gnunet_curl_lib.h index 84c8d59f8..0dbbc1741 100644 --- a/src/include/gnunet_curl_lib.h +++ b/src/include/gnunet_curl_lib.h | |||
@@ -233,6 +233,30 @@ GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx, | |||
233 | 233 | ||
234 | 234 | ||
235 | /** | 235 | /** |
236 | * Schedule a CURL request to be executed and call the given @a jcc | ||
237 | * upon its completion. Note that the context will make use of the | ||
238 | * CURLOPT_PRIVATE facility of the CURL @a eh. | ||
239 | * | ||
240 | * This function modifies the CURL handle to add the | ||
241 | * "Content-Type: application/json" header if @a add_json is set. | ||
242 | * | ||
243 | * @param ctx context to execute the job in | ||
244 | * @param eh curl easy handle for the request, will | ||
245 | * be executed AND cleaned up | ||
246 | * @param job_headers extra headers to add for this request | ||
247 | * @param jcc callback to invoke upon completion | ||
248 | * @param jcc_cls closure for @a jcc | ||
249 | * @return NULL on error (in this case, @eh is still released!) | ||
250 | */ | ||
251 | struct GNUNET_CURL_Job * | ||
252 | GNUNET_CURL_job_add2 (struct GNUNET_CURL_Context *ctx, | ||
253 | CURL *eh, | ||
254 | const struct curl_slist *job_headers, | ||
255 | GNUNET_CURL_JobCompletionCallback jcc, | ||
256 | void *jcc_cls); | ||
257 | |||
258 | |||
259 | /** | ||
236 | * Cancel a job. Must only be called before the job completion | 260 | * Cancel a job. Must only be called before the job completion |
237 | * callback is called for the respective job. | 261 | * callback is called for the respective job. |
238 | * | 262 | * |