about summary refs log tree commit diff stats
path: root/src/LYCookie.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/LYCookie.h')
-rw-r--r--src/LYCookie.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/LYCookie.h b/src/LYCookie.h
new file mode 100644
index 00000000..3b0e109b
--- /dev/null
+++ b/src/LYCookie.h
@@ -0,0 +1,57 @@
+#ifndef LYCOOKIES_H
+#define LYCOOKIES_H
+
+#ifndef HTUTILS_H
+#include <HTUtils.h>
+#endif
+
+#include <HTList.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+    typedef enum {
+	ACCEPT_ALWAYS = 0
+	,REJECT_ALWAYS
+	,QUERY_USER
+    } behaviour_t;
+
+    typedef enum {
+	INVCHECK_QUERY = 0
+	,INVCHECK_STRICT
+	,INVCHECK_LOOSE
+    } invcheck_behaviour_t;
+
+    typedef enum {
+	FLAG_ACCEPT_ALWAYS = 0
+	,FLAG_REJECT_ALWAYS
+	,FLAG_QUERY_USER
+	,FLAG_FROM_FILE
+	,FLAG_INVCHECK_QUERY
+	,FLAG_INVCHECK_STRICT
+	,FLAG_INVCHECK_LOOSE
+    } cookie_domain_flags;
+
+    struct _domain_entry {
+	char *domain;		/* Domain for which these cookies are valid */
+	behaviour_t bv;
+	invcheck_behaviour_t invcheck_bv;
+	HTList *cookie_list;
+    };
+    typedef struct _domain_entry domain_entry;
+
+    extern void LYSetCookie(const char *SetCookie,
+			    const char *SetCookie2,
+			    const char *address);
+    extern char *LYAddCookieHeader(char *hostname,
+				   char *partialpath,
+				   int port,
+				   BOOL secure);
+    extern void LYStoreCookies(char *cookie_file);
+    extern void LYLoadCookies(char *cookie_file);
+    extern void LYConfigCookies(void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif				/* LYCOOKIES_H */