4c4b03f725171387d94003bc274b3e0204bcc4c3
[claws.git] / src / plugins / litehtml_viewer / http.h
1 #include <glib.h>
2 #include <glib/gstdio.h>
3 #include <fcntl.h>
4 #include <sys/types.h>
5 #include <sys/stat.h>
6 #include <curl/curl.h>
7 #include <gio/gio.h>
8
9 #define HTTP_GET_TIMEOUT 5L
10
11 class http
12 {
13     CURL*           curl;
14     static gchar*   response_data;
15     static size_t   response_size;
16
17 public:
18     http();
19     ~http();
20
21     GInputStream *load_url(const gchar *url, GError **error);
22
23 private:
24     static size_t curl_write_data(char* ptr, size_t size, size_t nmemb, void* data);
25     static void destroy_giostream(gpointer data);
26 };
27
28