NetSurf
|
Unified cookie database public interface. More...
Go to the source code of this file.
Data Structures | |
struct | cookie_data |
Enumerations | |
enum | cookie_version { COOKIE_NETSCAPE = 0 , COOKIE_RFC2109 = 1 , COOKIE_RFC2965 = 2 } |
Version of cookie. More... | |
Functions | |
void | urldb_iterate_cookies (bool(*callback)(const struct cookie_data *cookie)) |
Iterate over all cookies in database. More... | |
void | urldb_delete_cookie (const char *domain, const char *path, const char *name) |
Delete a cookie. More... | |
void | urldb_load_cookies (const char *filename) |
Load a cookie file into the database. More... | |
void | urldb_save_cookies (const char *filename) |
Save persistent cookies to file. More... | |
Unified cookie database public interface.
Definition in file cookie_db.h.
enum cookie_version |
Version of cookie.
RFC2109 and RFC2965 "HTTP State Management Mechanism" defined alternative versions of cookies. Nothing used them and these RFC are now obsoleted by RFC6265 which completely removes the alternative versions.
Enumerator | |
---|---|
COOKIE_NETSCAPE | |
COOKIE_RFC2109 | |
COOKIE_RFC2965 |
Definition at line 38 of file cookie_db.h.
void urldb_delete_cookie | ( | const char * | domain, |
const char * | path, | ||
const char * | name | ||
) |
Delete a cookie.
domain | The cookie's domain |
path | The cookie's path |
name | The cookie's name |
Definition at line 4273 of file urldb.c.
References db_root, cookie_internal_data::domain, cookie_internal_data::name, path(), and urldb_delete_cookie_hosts().
Referenced by CookieWindow::_DeleteCookies(), and cookie_manager_delete_entry().
void urldb_iterate_cookies | ( | bool(*)(const struct cookie_data *cookie) | callback | ) |
Iterate over all cookies in database.
callback | Function to callback for each entry |
Referenced by CookieWindow::_DeleteCookies(), cookie_manager_init(), and nsbeos_cookies_init().
void urldb_load_cookies | ( | const char * | filename | ) |
Load a cookie file into the database.
filename | File to load |
Definition at line 4281 of file urldb.c.
References cookie_internal_data::comment, cookie_internal_data::domain, cookie_internal_data::domain_from_set, cookie_internal_data::expires, FIND_T, cookie_internal_data::http_only, cookie_internal_data::last_used, loaded_cookie_file_version, MIN_COOKIE_FILE_VERSION, cookie_internal_data::name, cookie_internal_data::no_destroy, NSERROR_OK, NSLOG, nsurl_create(), nsurl_get_component(), NSURL_SCHEME, nsurl_unref(), cookie_internal_data::path, path(), cookie_internal_data::path_from_set, cookie_internal_data::secure, SKIP_T, urldb_free_cookie(), urldb_insert_cookie(), cookie_internal_data::value, cookie_internal_data::value_was_quoted, cookie_internal_data::version, and version.
Referenced by gui_init(), main(), nsgtk_setup(), and WinMain().
void urldb_save_cookies | ( | const char * | filename | ) |
Save persistent cookies to file.
filename | Path to save to |
Definition at line 4448 of file urldb.c.
References COOKIE_FILE_VERSION, db_root, loaded_cookie_file_version, max, and urldb_save_cookie_hosts().
Referenced by gui_quit(), monkey_quit(), nsgtk_finalise(), and WinMain().