NetSurf
|
Fetcher operations API. More...
#include <fetchers.h>
Data Fields | |
bool(* | initialise )(lwc_string *scheme) |
The initialiser for the fetcher. More... | |
bool(* | acceptable )(const struct nsurl *url) |
Can this fetcher accept a url. More... | |
void *(* | setup )(struct fetch *parent_fetch, struct nsurl *url, bool only_2xx, bool downgrade_tls, const char *post_urlenc, const struct fetch_multipart_data *post_multipart, const char **headers) |
Setup a fetch. More... | |
bool(* | start )(void *fetch) |
start a fetch. More... | |
void(* | abort )(void *fetch) |
abort a fetch. More... | |
void(* | free )(void *fetch) |
free a fetch allocated through the setup method. More... | |
void(* | poll )(lwc_string *scheme) |
poll a fetcher to let it make progress. More... | |
int(* | fdset )(lwc_string *scheme, fd_set *read_set, fd_set *write_set, fd_set *error_set) |
update an fdset with the FDs needed to poll cleanly More... | |
void(* | finalise )(lwc_string *scheme) |
Finalise the fetcher. More... | |
Fetcher operations API.
These are the operations a fetcher must implement.
Each fetcher is called once for initialisaion and finalisation. The poll entry point will be called to allow all active fetches to progress. The flow of a fetch operation is: URL is checked for aceptability. setup with all applicable data. start is called before the first poll after completion or abort it is freed
Definition at line 49 of file fetchers.h.
void(* fetcher_operation_table::abort) (void *fetch) |
bool(* fetcher_operation_table::acceptable) (const struct nsurl *url) |
Can this fetcher accept a url.
url | the URL to check |
Definition at line 63 of file fetchers.h.
Referenced by fetch_can_fetch().
int(* fetcher_operation_table::fdset) (lwc_string *scheme, fd_set *read_set, fd_set *write_set, fd_set *error_set) |
update an fdset with the FDs needed to poll cleanly
Definition at line 96 of file fetchers.h.
Referenced by fetch_fdset().
void(* fetcher_operation_table::finalise) (lwc_string *scheme) |
Finalise the fetcher.
Definition at line 102 of file fetchers.h.
Referenced by fetch_unref_fetcher().
void(* fetcher_operation_table::free) (void *fetch) |
free a fetch allocated through the setup method.
Definition at line 86 of file fetchers.h.
Referenced by fetch_free().
bool(* fetcher_operation_table::initialise) (lwc_string *scheme) |
The initialiser for the fetcher.
Called once to initialise the fetcher.
Definition at line 55 of file fetchers.h.
Referenced by fetch_curl_register(), fetch_data_register(), fetch_file_register(), fetch_javascript_register(), fetch_resource_register(), fetcher_add(), and html_css_fetcher_register().
void(* fetcher_operation_table::poll) (lwc_string *scheme) |
poll a fetcher to let it make progress.
Definition at line 91 of file fetchers.h.
Referenced by fetch_fdset(), and fetcher_poll().
void *(* fetcher_operation_table::setup) (struct fetch *parent_fetch, struct nsurl *url, bool only_2xx, bool downgrade_tls, const char *post_urlenc, const struct fetch_multipart_data *post_multipart, const char **headers) |
bool(* fetcher_operation_table::start) (void *fetch) |