summaryrefslogtreecommitdiff
path: root/gweb
diff options
context:
space:
mode:
Diffstat (limited to 'gweb')
-rw-r--r--gweb/gweb.c15
-rw-r--r--gweb/gweb.h2
2 files changed, 17 insertions, 0 deletions
diff --git a/gweb/gweb.c b/gweb/gweb.c
index b0bad593..7b520986 100644
--- a/gweb/gweb.c
+++ b/gweb/gweb.c
@@ -99,6 +99,7 @@ struct _GWeb {
GList *session_list;
GResolv *resolv;
+ char *proxy;
char *accept_option;
char *user_agent;
gboolean close_connection;
@@ -219,8 +220,11 @@ void g_web_unref(GWeb *web)
g_resolv_unref(web->resolv);
+ g_free(web->proxy);
+
g_free(web->accept_option);
g_free(web->user_agent);
+
g_free(web);
}
@@ -235,6 +239,17 @@ void g_web_set_debug(GWeb *web, GWebDebugFunc func, gpointer user_data)
g_resolv_set_debug(web->resolv, func, user_data);
}
+gboolean g_web_set_proxy(GWeb *web, const char *proxy)
+{
+ if (web == NULL)
+ return FALSE;
+
+ g_free(web->proxy);
+ web->proxy = g_strdup(proxy);
+
+ return TRUE;
+}
+
gboolean g_web_add_nameserver(GWeb *web, const char *address)
{
if (web == NULL)
diff --git a/gweb/gweb.h b/gweb/gweb.h
index fa6a8972..bf05fa58 100644
--- a/gweb/gweb.h
+++ b/gweb/gweb.h
@@ -52,6 +52,8 @@ void g_web_unref(GWeb *web);
void g_web_set_debug(GWeb *web, GWebDebugFunc func, gpointer user_data);
+gboolean g_web_set_proxy(GWeb *web, const char *proxy);
+
gboolean g_web_add_nameserver(GWeb *web, const char *address);
gboolean g_web_set_accept(GWeb *web, const char *format, ...)