NetSurf
Data Fields
fetcher_operation_table Struct Reference

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...
 

Detailed Description

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.

Field Documentation

◆ abort

void(* fetcher_operation_table::abort) (void *fetch)

abort a fetch.

Definition at line 81 of file fetchers.h.

Referenced by fetch_abort().

◆ acceptable

bool(* fetcher_operation_table::acceptable) (const struct nsurl *url)

Can this fetcher accept a url.

Parameters
urlthe URL to check
Returns
true if the fetcher can handle the url else false.

Definition at line 63 of file fetchers.h.

Referenced by fetch_can_fetch().

◆ fdset

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().

◆ finalise

void(* fetcher_operation_table::finalise) (lwc_string *scheme)

Finalise the fetcher.

Definition at line 102 of file fetchers.h.

Referenced by fetch_unref_fetcher().

◆ free

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().

◆ initialise

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().

◆ poll

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().

◆ setup

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)

Setup a fetch.

Definition at line 68 of file fetchers.h.

Referenced by fetch_start().

◆ start

bool(* fetcher_operation_table::start) (void *fetch)

start a fetch.

Definition at line 76 of file fetchers.h.

Referenced by fetch_dispatch_job().


The documentation for this struct was generated from the following file: