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
31 struct active_request_slot
39 struct slot_results
*results
;
41 void (*callback_func
)(void *data
);
42 struct active_request_slot
*next
;
52 /* Curl request read/write callbacks */
53 extern size_t fread_buffer(void *ptr
, size_t eltsize
, size_t nmemb
,
54 struct buffer
*buffer
);
55 extern size_t fwrite_buffer(const void *ptr
, size_t eltsize
,
56 size_t nmemb
, struct buffer
*buffer
);
57 extern size_t fwrite_null(const void *ptr
, size_t eltsize
,
58 size_t nmemb
, struct buffer
*buffer
);
60 /* Slot lifecycle functions */
61 extern struct active_request_slot
*get_active_slot(void);
62 extern int start_active_slot(struct active_request_slot
*slot
);
63 extern void run_active_slot(struct active_request_slot
*slot
);
64 extern void finish_all_active_slots(void);
65 extern void release_active_slot(struct active_request_slot
*slot
);
68 extern void fill_active_slots(void);
69 extern void step_active_slots(void);
72 extern void http_init(void);
73 extern void http_cleanup(void);
75 extern int data_received
;
76 extern int active_requests
;
79 extern int max_requests
;
82 #ifndef NO_CURL_EASY_DUPHANDLE
83 extern CURL
*curl_default
;
85 extern char curl_errorstr
[CURL_ERROR_SIZE
];
87 extern int curl_ssl_verify
;
88 extern char *ssl_cert
;
89 #if LIBCURL_VERSION_NUM >= 0x070902
92 #if LIBCURL_VERSION_NUM >= 0x070908
93 extern char *ssl_capath
;
95 extern char *ssl_cainfo
;
96 extern long curl_low_speed_limit
;
97 extern long curl_low_speed_time
;
99 extern struct curl_slist
*pragma_header
;
100 extern struct curl_slist
*no_range_header
;
102 extern struct active_request_slot
*active_queue_head
;