38 #include <curl/curl.h>
39 #include <curl/curlver.h>
111 #if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
113 #include <CoreServices/CoreServices.h>
114 #include <SystemConfiguration/SystemConfiguration.h>
115 char* CFStringToCString(CFStringRef,
char*);
126 #define INTERNET_OPEN_TYPE_DIRECT 0
127 #define INTERNET_OPEN_TYPE_PRECONFIG 1
128 #define INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY 2
129 #define INTERNET_OPEN_TYPE_PROXY 3
142 #define INTERNET_FLAG_EXISTING_CONNECT 0
143 #define INTERNET_FLAG_HYPERLINK 1
144 #define INTERNET_FLAG_IGNORE_CERT_CN_INVALID 2
145 #define INTERNET_FLAG_IGNORE_CERT_DATE_INVALID 3
146 #define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP 4
147 #define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS 5
148 #define INTERNET_FLAG_KEEP_CONNECTION 6
149 #define INTERNET_FLAG_NEED_FILE 7
150 #define INTERNET_FLAG_NO_AUTH 8
151 #define INTERNET_FLAG_NO_AUTO_REDIRECT 9
152 #define INTERNET_FLAG_NO_CACHE_WRITE 10
164 # define CHECK_INET_HANDLE(h) (h.handle != 0)
int setProxiesForProtcol(CURL *, const char *)
MACOSX.
Definition: ulinet.c:218
size_t nDataAlloc
Definition: ulinet.h:80
char * mimeType
the mimeType returned by the server
Definition: ulinet.h:87
Individual CURL handler.
Definition: ulinet.h:75
HINTERNET InternetOpen(char *, int, char *, char *, int)
Create a HINTERNET.
Definition: ulinet.c:237
int processDownloads(HINTERNET *)
Download all opened urls in the queue.
Definition: ulinet.c:581
HINTERNET InternetOpenUrl(HINTERNET *, LPCTSTR, LPCTSTR, size_t, size_t, size_t, const maps *)
Create a new element in the download queue.
Definition: ulinet.c:468
CURLM * handle
the CURLM handler
Definition: ulinet.h:97
void InternetCloseHandle(HINTERNET *)
Close a HINTERNET connection and free allocated resources.
Definition: ulinet.c:408
char * post
the potential POST XML content
Definition: ulinet.h:88
char * agent
The User-Agent to use for HTTP request.
Definition: ulinet.h:100
int hasCacheFile
1 if we used a cache file
Definition: ulinet.h:77
unsigned char * pabyData
the downloaded content
Definition: ulinet.h:85
int nb
number of element in the queue
Definition: ulinet.h:96
int freeCookieList(HINTERNET)
Initialize the cookie for a specific index (hInternet.nb)
Definition: ulinet.c:645
char * filename
the cached file name
Definition: ulinet.h:83
int isProtectedHost(const char *, const char *)
Verify if a host is protected (appear in [security] > hosts)
Definition: ulinet.c:325
size_t * LPDWORD
Definition: ulinet.h:157
long code
the last received response code
Definition: ulinet.h:76
size_t write_data_into(void *, size_t, size_t, void *)
Write the downloaded content to a _HINTERNET structure.
Definition: ulinet.c:44
int InternetReadFile(_HINTERNET, LPVOID, int, size_t *)
Copy a downloaded content.
Definition: ulinet.c:662
size_t write_data_into_file(void *, size_t, size_t, void *)
Write the downloaded content in the file pouted by the _HINTERNET structure.
Definition: ulinet.c:80
linked list of map pointer
Definition: main_conf_read.y:292
size_t header_write_data(void *, size_t, size_t, void *)
In case of presence of "Set-Cookie" in the headers red, store the cookie identifier in cookie...
Definition: ulinet.c:110
int setBasicAuth(HINTERNET, char *, char *)
Use basic authentication for accessing a resource.
Definition: ulinet.c:713
#define MAX_REQ
Definition: ulinet.h:57
int id
The position of the element in the queue.
Definition: ulinet.h:78
size_t nDataLen
the length of the downloaded content
Definition: ulinet.h:79
CURL * handle
the CURL handler
Definition: ulinet.h:81
int AddMissingHeaderEntry(_HINTERNET *, const char *, const char *)
Add missing headers to an existing _HINTERNET.
Definition: ulinet.c:307
char * cookie
The potential Cookie returned by the server.
Definition: ulinet.h:89
struct curl_slist * header
the headers to send
Definition: ulinet.h:82
char * url
the url used to access the server
Definition: ulinet.h:86
char * LPCTSTR
Definition: ulinet.h:131
char * memory
the memory space to store data
Definition: ulinet.h:68
void setProxy(CURL *, char *, long)
Define the proxy to use for a CURL handler.
Definition: ulinet.c:138
Headers storage.
Definition: ulinet.h:67
void * LPVOID
Definition: ulinet.h:155
void * LPTSTR
Definition: ulinet.h:156
void AddHeaderEntries(HINTERNET *, maps *)
Add headers defined in [security] > attributes to an existing HINTERNET.
Definition: ulinet.c:362
Multiple CURL handlers.
Definition: ulinet.h:95
FILE * file
the file pointer
Definition: ulinet.h:84
char * getProvenance(maps *, const char *)
Verify if the URL should use a shared cache or not.
Definition: ulinet.c:269
size_t size
size of the memory space
Definition: ulinet.h:69