aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-16 20:36:12 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-16 20:36:12 +0200
commitbbe0a0501959db1add350cae54b86cbd59d48c77 (patch)
tree7cc984130423428b38770f9da92c1daed2109f0d /src/include
parentee1fbffa1c42f7ac3fc897e73e90c525037dd915 (diff)
downloadgnunet-bbe0a0501959db1add350cae54b86cbd59d48c77.tar.gz
gnunet-bbe0a0501959db1add350cae54b86cbd59d48c77.zip
avoid boolean argument in GNUNET_CURL_job_add(), see #6188
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_curl_lib.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/include/gnunet_curl_lib.h b/src/include/gnunet_curl_lib.h
index 0bb337ee7..8f744512d 100644
--- a/src/include/gnunet_curl_lib.h
+++ b/src/include/gnunet_curl_lib.h
@@ -225,13 +225,9 @@ typedef void
225 * upon its completion. Note that the context will make use of the 225 * upon its completion. Note that the context will make use of the
226 * CURLOPT_PRIVATE facility of the CURL @a eh. 226 * CURLOPT_PRIVATE facility of the CURL @a eh.
227 * 227 *
228 * This function modifies the CURL handle to add the
229 * "Content-Type: application/json" header if @a add_json is set.
230 *
231 * @param ctx context to execute the job in 228 * @param ctx context to execute the job in
232 * @param eh curl easy handle for the request, will 229 * @param eh curl easy handle for the request, will
233 * be executed AND cleaned up 230 * be executed AND cleaned up
234 * @param add_json add "application/json" content type header
235 * @param jcc callback to invoke upon completion 231 * @param jcc callback to invoke upon completion
236 * @param jcc_cls closure for @a jcc 232 * @param jcc_cls closure for @a jcc
237 * @return NULL on error (in this case, @eh is still released!) 233 * @return NULL on error (in this case, @eh is still released!)
@@ -239,12 +235,33 @@ typedef void
239struct GNUNET_CURL_Job * 235struct GNUNET_CURL_Job *
240GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx, 236GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx,
241 CURL *eh, 237 CURL *eh,
242 int add_json,
243 GNUNET_CURL_JobCompletionCallback jcc, 238 GNUNET_CURL_JobCompletionCallback jcc,
244 void *jcc_cls); 239 void *jcc_cls);
245 240
246 241
247/** 242/**
243 * Schedule a CURL request to be executed and call the given @a jcc
244 * upon its completion. Note that the context will make use of the
245 * CURLOPT_PRIVATE facility of the CURL @a eh.
246 *
247 * This function modifies the CURL handle to add the
248 * "Content-Type: application/json" header.
249 *
250 * @param ctx context to execute the job in
251 * @param eh curl easy handle for the request, will
252 * be executed AND cleaned up
253 * @param jcc callback to invoke upon completion
254 * @param jcc_cls closure for @a jcc
255 * @return NULL on error (in this case, @eh is still released!)
256 */
257struct GNUNET_CURL_Job *
258GNUNET_CURL_job_add_with_ct_json (struct GNUNET_CURL_Context *ctx,
259 CURL *eh,
260 GNUNET_CURL_JobCompletionCallback jcc,
261 void *jcc_cls);
262
263
264/**
248 * Force use of the provided username and password 265 * Force use of the provided username and password
249 * for client authentication for all operations performed 266 * for client authentication for all operations performed
250 * with @a ctx. 267 * with @a ctx.