Rejigger lib path
[WebThing.git] / SoupSettings.c
1 #include <stdio.h>
2 #include <glib.h>
3 #include <webkit/webkit.h>
4 #include <libsoup/soup.h>
5
6 void soup_settings() {
7         SoupSession *soup_session = webkit_get_default_session();
8
9         /* Set up persistent cookies */
10         SoupCookieJar *jar = (SoupCookieJar *) soup_cookie_jar_text_new("cookies.txt", FALSE);
11         soup_session_add_feature(soup_session, SOUP_SESSION_FEATURE(jar));
12
13         GValue user_agent = {0,};
14         g_value_init(&user_agent, G_TYPE_STRING);
15         g_value_set_string(&user_agent, "WebThing 0.1");
16         g_object_set_property(G_OBJECT(soup_session), SOUP_SESSION_USER_AGENT, &user_agent);
17 }