aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_curl_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-02 06:11:57 +0000
committerChristian Grothoff <christian@grothoff.org>2016-05-02 06:11:57 +0000
commitbc1676b599937cd37d5fd625362ceea6f78fa42a (patch)
treef138a1e0fcd2b23a7711d13d7ef0499292210729 /src/include/gnunet_curl_lib.h
parent450bdaeaf612aa7717c23390239804bb28b7870f (diff)
downloadgnunet-bc1676b599937cd37d5fd625362ceea6f78fa42a.tar.gz
gnunet-bc1676b599937cd37d5fd625362ceea6f78fa42a.zip
add implementation of scheduler integration of curl context
Diffstat (limited to 'src/include/gnunet_curl_lib.h')
-rw-r--r--src/include/gnunet_curl_lib.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/include/gnunet_curl_lib.h b/src/include/gnunet_curl_lib.h
index c57b9ed3b..500434d82 100644
--- a/src/include/gnunet_curl_lib.h
+++ b/src/include/gnunet_curl_lib.h
@@ -170,6 +170,46 @@ GNUNET_CURL_job_add (struct GNUNET_CURL_Context *ctx,
170void 170void
171GNUNET_CURL_job_cancel (struct GNUNET_CURL_Job *job); 171GNUNET_CURL_job_cancel (struct GNUNET_CURL_Job *job);
172 172
173
174/* ******* GNUnet SCHEDULER integration ************ */
175
176
177/**
178 * Closure for #GNUNET_CURL_gnunet_scheduler_reschedule().
179 */
180struct GNUNET_CURL_RescheduleContext;
181
182
183/**
184 * Initialize reschedule context.
185 *
186 * @param ctx context to manage
187 * @return closure for #GNUNET_CURL_gnunet_scheduler_reschedule().
188 */
189struct GNUNET_CURL_RescheduleContext *
190GNUNET_CURL_gnunet_rc_create (struct GNUNET_CURL_Context *ctx);
191
192/**
193 * Destroy reschedule context.
194 *
195 * @param rc context to destroy
196 */
197void
198GNUNET_CURL_gnunet_rc_destroy (struct GNUNET_CURL_RescheduleContext *rc);
199
200
201/**
202 * Implementation of the #GNUNET_CURL_RescheduleCallback for GNUnet's
203 * scheduler. Will run the CURL context using GNUnet's scheduler.
204 * Note that you MUST immediately destroy the reschedule context after
205 * calling #GNUNET_CURL_fini().
206 *
207 * @param cls must point to a `struct GNUNET_CURL_RescheduleContext`
208 */
209void
210GNUNET_CURL_gnunet_scheduler_reschedule (void *cls);
211
212
173#endif 213#endif
174/** @} */ /* end of group */ 214/** @} */ /* end of group */
175 215