NetSurf
|
Unified URL information database public interface. More...
Go to the source code of this file.
Data Structures | |
struct | url_data |
Functions | |
nserror | urldb_load (const char *filename) |
Import an URL database from file, replacing any existing database. More... | |
nserror | urldb_save (const char *filename) |
Export the current database to file. More... | |
void | urldb_iterate_partial (const char *prefix, bool(*callback)(struct nsurl *url, const struct url_data *data)) |
Iterate over entries in the database which match the given prefix. More... | |
void | urldb_iterate_entries (bool(*callback)(struct nsurl *url, const struct url_data *data)) |
Iterate over all entries in database. More... | |
const struct url_data * | urldb_get_url_data (struct nsurl *url) |
Find data for an URL. More... | |
void | urldb_set_cert_permissions (struct nsurl *url, bool permit) |
Set certificate verification permissions. More... | |
void | urldb_dump (void) |
Dump URL database to stderr. More... | |
Unified URL information database public interface.
Definition in file url_db.h.
void urldb_dump | ( | void | ) |
Dump URL database to stderr.
Definition at line 4481 of file urldb.c.
References db_root, NUM_SEARCH_TREES, search_trees, urldb_dump_hosts(), and urldb_dump_search().
Referenced by ro_gui_window_handle_local_keypress().
Find data for an URL.
url | Absolute URL to look for |
Definition at line 3309 of file urldb.c.
References path_data::urld, and urldb_find_url().
Referenced by global_history_add(), hotlist_create_entry(), hotlist_update_url_walk_cb(), node_is_visited(), ro_gui_hotlist_add_page(), and ro_gui_url_complete_redraw().
Iterate over all entries in database.
callback | Function to callback for each entry |
Referenced by global_history_init(), ro_gui_url_complete_keypress(), and ro_gui_url_suggest_prepare_menu().
void urldb_iterate_partial | ( | const char * | prefix, |
bool(*)(struct nsurl *url, const struct url_data *data) | callback | ||
) |
Iterate over entries in the database which match the given prefix.
prefix | Prefix to match |
callback | Callback function |
Referenced by nsgtk_completion_update(), and ro_gui_url_complete_keypress().
nserror urldb_load | ( | const char * | filename | ) |
Import an URL database from file, replacing any existing database.
filename | Name of file containing data |
Definition at line 2876 of file urldb.c.
References bloom_create(), bloom_insert_hash(), BLOOM_SIZE, hsts_data::expires, host_part::hsts, hsts_data::include_sub_domains, url_internal_data::last_visit, MAXIMUM_URL_LENGTH, MIN_URL_FILE_VERSION, nsc_snptimet(), NSERROR_INVALID, NSERROR_NEED_DATA, NSERROR_NOMEM, NSERROR_NOT_FOUND, NSERROR_OK, NSLOG, nsurl_create(), NSURL_FRAGMENT, nsurl_get(), nsurl_get_component(), nsurl_hash(), NSURL_PATH, NSURL_QUERY, NSURL_SCHEME, nsurl_unref(), path_data::port, path_data::scheme, url_internal_data::title, url_internal_data::type, path_data::url, url_bloom, URL_FILE_VERSION, path_data::urld, urldb_add_host(), urldb_add_path(), version, and url_internal_data::visits.
Referenced by gui_init(), main(), nsgtk_setup(), and WinMain().
nserror urldb_save | ( | const char * | filename | ) |
Export the current database to file.
filename | Name of file to export to |
Definition at line 3094 of file urldb.c.
References NSERROR_OK, NSERROR_SAVE_FAILED, NSLOG, NUM_SEARCH_TREES, search_trees, URL_FILE_VERSION, and urldb_save_search_tree().
Referenced by gui_quit(), monkey_quit(), nsgtk_finalise(), and WinMain().
void urldb_set_cert_permissions | ( | struct nsurl * | url, |
bool | permit | ||
) |
Set certificate verification permissions.
url | URL to consider |
permit | Set to true to allow invalid certificates |
Definition at line 3455 of file urldb.c.
References path_data::parent, host_part::permit_invalid_certs, urldb_add_url(), and urldb_find_url().
Referenced by browser_window__handle_ssl_query_response().