void session_init(void)
{
/* init soup session */
- vb.soup_session = webkit_get_default_session();
- g_object_set(vb.soup_session, "max-conns", SETTING_MAX_CONNS , NULL);
- g_object_set(vb.soup_session, "max-conns-per-host", SETTING_MAX_CONNS_PER_HOST, NULL);
+ vb.session = webkit_get_default_session();
+ g_object_set(vb.session, "max-conns", SETTING_MAX_CONNS , NULL);
+ g_object_set(vb.session, "max-conns-per-host", SETTING_MAX_CONNS_PER_HOST, NULL);
#ifdef FEATURE_COOKIE
soup_session_add_feature(
- vb.soup_session,
+ vb.session,
SOUP_SESSION_FEATURE(cookiejar_new(vb.files[FILES_COOKIE], false))
);
#endif
{
gboolean value;
if (type != SETTING_SET) {
- g_object_get(vb.soup_session, "ssl-strict", &value, NULL);
+ g_object_get(vb.session, "ssl-strict", &value, NULL);
if (type == SETTING_GET) {
print_value(s, &value);
value = type == SETTING_TOGGLE ? !value : (s->arg.i ? true : false);
- g_object_set(vb.soup_session, "ssl-strict", value, NULL);
+ g_object_set(vb.session, "ssl-strict", value, NULL);
return true;
}
{
char *value;
if (type == SETTING_GET) {
- g_object_get(vb.soup_session, "ssl-ca-file", &value, NULL);
+ g_object_get(vb.session, "ssl-ca-file", &value, NULL);
print_value(s, value);
g_free(value);
} else {
- g_object_set(vb.soup_session, "ssl-ca-file", s->arg.s, NULL);
+ g_object_set(vb.session, "ssl-ca-file", s->arg.s, NULL);
}
return true;
/* get the current status */
if (type != SETTING_SET) {
- g_object_get(vb.soup_session, "proxy-uri", &proxy_uri, NULL);
+ g_object_get(vb.session, "proxy-uri", &proxy_uri, NULL);
enabled = (proxy_uri != NULL);
if (type == SETTING_GET) {
: g_strdup_printf("http://%s", proxy);
proxy_uri = soup_uri_new(proxy_new);
- g_object_set(vb.soup_session, "proxy-uri", proxy_uri, NULL);
+ g_object_set(vb.session, "proxy-uri", proxy_uri, NULL);
soup_uri_free(proxy_uri);
g_free(proxy_new);
}
} else {
- g_object_set(vb.soup_session, "proxy-uri", NULL, NULL);
+ g_object_set(vb.session, "proxy-uri", NULL, NULL);
}
return true;