9 #if LIBCURL_VERSION_NUM >= 0x070908
10 #define USE_CURL_MULTI
11 #define DEFAULT_MAX_REQUESTS 5
14 #if LIBCURL_VERSION_NUM < 0x070704
15 #define curl_global_cleanup() do { /* nothing */ } while(0)
17 #if LIBCURL_VERSION_NUM < 0x070800
18 #define curl_global_init(a) do { /* nothing */ } while(0)
21 #if LIBCURL_VERSION_NUM < 0x070c04
22 #define NO_CURL_EASY_DUPHANDLE
25 struct active_request_slot
33 void (*callback_func)(void *data);
34 struct active_request_slot *next;
44 /* Curl request read/write callbacks */
45 extern size_t fread_buffer(void *ptr, size_t eltsize, size_t nmemb,
46 struct buffer *buffer);
47 extern size_t fwrite_buffer(const void *ptr, size_t eltsize,
48 size_t nmemb, struct buffer *buffer);
49 extern size_t fwrite_null(const void *ptr, size_t eltsize,
50 size_t nmemb, struct buffer *buffer);
52 /* Slot lifecycle functions */
53 extern struct active_request_slot *get_active_slot(void);
54 extern int start_active_slot(struct active_request_slot *slot);
55 extern void run_active_slot(struct active_request_slot *slot);
56 extern void finish_all_active_slots(void);
59 extern void fill_active_slots(void);
60 extern void step_active_slots(void);
63 extern void http_init(void);
64 extern void http_cleanup(void);
66 extern int data_received;
67 extern int active_requests;
70 extern int max_requests;
73 #ifndef NO_CURL_EASY_DUPHANDLE
74 extern CURL *curl_default;
76 extern char curl_errorstr[CURL_ERROR_SIZE];
78 extern int curl_ssl_verify;
79 extern char *ssl_cert;
80 #if LIBCURL_VERSION_NUM >= 0x070902
83 #if LIBCURL_VERSION_NUM >= 0x070908
84 extern char *ssl_capath;
86 extern char *ssl_cainfo;
87 extern long curl_low_speed_limit;
88 extern long curl_low_speed_time;
90 extern struct curl_slist *pragma_header;
91 extern struct curl_slist *no_range_header;
93 extern struct active_request_slot *active_queue_head;