11
#include <curl/curl.h>
13
enum fcurl_type_e { CFTYPE_NONE=0, CFTYPE_FILE=1, CFTYPE_CURL=2 };
17
enum fcurl_type_e type; /* type of handle */
21
} handle; /* handle */
23
char *buffer; /* buffer to store cached data*/
24
int buffer_len; /* currently allocated buffers length */
25
int buffer_pos; /* end of data in buffer*/
26
int still_running; /* Is background url fetch still in progress */
29
typedef struct fcurl_data URL_FILE;
31
/* exported functions */
32
URL_FILE *url_fopen(char *url,const char *operation);
33
int url_fclose(URL_FILE *file);
34
int url_feof(URL_FILE *file);
35
size_t url_fread(void *ptr, size_t size, size_t nmemb, URL_FILE *file);
36
char * url_fgets(char *ptr, int size, URL_FILE *file);
37
void url_rewind(URL_FILE *file);