#endif
struct _GWeb;
+struct _GWebResult;
typedef struct _GWeb GWeb;
+typedef struct _GWebResult GWebResult;
typedef enum {
G_WEB_METHOD_GET,
} GWebMethod;
-typedef void (*GWebResultFunc)(uint16_t status, gpointer user_data);
+typedef void (*GWebResultFunc)(guint16 status, GWebResult *result,
+ gpointer user_data);
typedef void (*GWebDebugFunc)(const char *str, gpointer user_data);
void g_web_set_debug(GWeb *web, GWebDebugFunc func, gpointer user_data);
+gboolean g_web_add_nameserver(GWeb *web, const char *address);
+
+gboolean g_web_set_accept(GWeb *web, const char *format, ...)
+ __attribute__((format(printf, 2, 3)));
+gboolean g_web_set_user_agent(GWeb *web, const char *format, ...)
+ __attribute__((format(printf, 2, 3)));
+
+void g_web_set_close_connection(GWeb *web, gboolean enabled);
+gboolean g_web_get_close_connection(GWeb *web);
+
guint g_web_request(GWeb *web, GWebMethod method, const char *url,
GWebResultFunc func, gpointer user_data);
gboolean g_web_cancel(GWeb *web, guint id);
+guint16 g_web_result_get_status(GWebResult *result);
+
+gboolean g_web_result_get_chunk(GWebResult *result,
+ const guint8 **chunk, gsize *length);
+
#ifdef __cplusplus
}
#endif