aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cookie-jar.h
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2010-09-27 10:41:13 -0600
committerGravatar Brendan Taylor <whateley@gmail.com>2010-09-30 09:50:04 -0600
commit5510abf69022d8393e6c5fc3d1456cc47f96fa4a (patch)
tree123d142c2c40b8cdb49946ff94fddc616b89f923 /src/cookie-jar.h
parent4c63d4620266ca5914587737e2af6e1b749b23f5 (diff)
move cookie handling into a subclass of SoupCookieJar
this cleans up the code and slightly improves efficiency.
Diffstat (limited to 'src/cookie-jar.h')
-rw-r--r--src/cookie-jar.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/cookie-jar.h b/src/cookie-jar.h
new file mode 100644
index 0000000..80af00e
--- /dev/null
+++ b/src/cookie-jar.h
@@ -0,0 +1,33 @@
+#ifndef UZBL_COOKIE_JAR_H
+#define UZBL_COOKIE_JAR_H
+
+#include <libsoup/soup-cookie-jar.h>
+
+#define UZBL_TYPE_COOKIE_JAR (soup_cookie_jar_socket_get_type ())
+#define UZBL_COOKIE_JAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UZBL_TYPE_COOKIE_JAR, UzblCookieJar))
+#define UZBL_COOKIE_JAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UZBL_TYPE_COOKIE_JAR, UzblCookieJarClass))
+
+typedef struct {
+ SoupCookieJar parent;
+
+ const gchar *handler;
+
+ const gchar *socket_path;
+ int connection_fd;
+
+ gboolean in_get_callback;
+} UzblCookieJar;
+
+typedef struct {
+ SoupCookieJarClass parent_class;
+} UzblCookieJarClass;
+
+UzblCookieJar *uzbl_cookie_jar_new();
+
+void
+uzbl_cookie_jar_set_handler(UzblCookieJar *jar, const gchar *handler);
+
+char
+*get_cookies(UzblCookieJar *jar, SoupURI *uri);
+
+#endif