Cleaner code a fix memory leak
[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
15 public:
16     http();
17     ~http();
18
19     GInputStream *load_url(const gchar *url, GError **error);
20
21 private:
22     static size_t curl_write_data(char* ptr, size_t size, size_t nmemb, void* data_ptr);
23     static void destroy_giostream(gpointer data);
24 };
25
26