diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:12:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:12:14 +0000 |
commit | 982972c2aada53f83389987317fb6cbee9ce5a91 (patch) | |
tree | 25420c3b905b2e00f02a895d877fd0669025ee35 /src/LYCookie.h | |
parent | Initial commit. (diff) | |
download | lynx-982972c2aada53f83389987317fb6cbee9ce5a91.tar.xz lynx-982972c2aada53f83389987317fb6cbee9ce5a91.zip |
Adding upstream version 2.8.9rel.1.upstream/2.8.9rel.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/LYCookie.h')
-rw-r--r-- | src/LYCookie.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/LYCookie.h b/src/LYCookie.h new file mode 100644 index 0000000..ecbf930 --- /dev/null +++ b/src/LYCookie.h @@ -0,0 +1,59 @@ +/* $LynxId: LYCookie.h,v 1.20 2011/06/07 08:29:39 tom Exp $ */ +#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 */ + char *ddomain; /* Domain without leading "." */ + 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, + int secure); + extern void LYStoreCookies(char *cookie_file); + extern void LYLoadCookies(char *cookie_file); + extern void LYConfigCookies(void); + +#ifdef __cplusplus +} +#endif +#endif /* LYCOOKIES_H */ |