diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-05-02 06:11:57 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-05-02 06:11:57 +0000 |
commit | bc1676b599937cd37d5fd625362ceea6f78fa42a (patch) | |
tree | f138a1e0fcd2b23a7711d13d7ef0499292210729 /src/include/gnunet_curl_lib.h | |
parent | 450bdaeaf612aa7717c23390239804bb28b7870f (diff) | |
download | gnunet-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.h | 40 |
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, | |||
170 | void | 170 | void |
171 | GNUNET_CURL_job_cancel (struct GNUNET_CURL_Job *job); | 171 | GNUNET_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 | */ | ||
180 | struct 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 | */ | ||
189 | struct GNUNET_CURL_RescheduleContext * | ||
190 | GNUNET_CURL_gnunet_rc_create (struct GNUNET_CURL_Context *ctx); | ||
191 | |||
192 | /** | ||
193 | * Destroy reschedule context. | ||
194 | * | ||
195 | * @param rc context to destroy | ||
196 | */ | ||
197 | void | ||
198 | GNUNET_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 | */ | ||
209 | void | ||
210 | GNUNET_CURL_gnunet_scheduler_reschedule (void *cls); | ||
211 | |||
212 | |||
173 | #endif | 213 | #endif |
174 | /** @} */ /* end of group */ | 214 | /** @} */ /* end of group */ |
175 | 215 | ||