NetSurf
Data Structures | Functions
fetchers.h File Reference

Interface for fetchers factory. More...

#include "utils/inet.h"
#include <libwapcaplet/libwapcaplet.h>
Include dependency graph for fetchers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  fetcher_operation_table
 Fetcher operations API. More...
 

Functions

nserror fetcher_add (lwc_string *scheme, const struct fetcher_operation_table *ops)
 Register a fetcher for a scheme. More...
 
nserror fetcher_init (void)
 Initialise all registered fetchers. More...
 
void fetcher_quit (void)
 Clean up for quit. More...
 

Detailed Description

Interface for fetchers factory.

Definition in file fetchers.h.

Function Documentation

◆ fetcher_add()

nserror fetcher_add ( lwc_string *  scheme,
const struct fetcher_operation_table ops 
)

Register a fetcher for a scheme.

Parameters
schemeThe scheme fetcher is for (caller relinquishes ownership)
opsThe operations for the fetcher.
Returns
NSERROR_OK or appropriate error code.

Definition at line 357 of file fetch.c.

References fetch_ref_fetcher(), fetch::fetcherd, fetchers, fetcher_operation_table::initialise, MAX_FETCHERS, NSERROR_INIT_FAILED, NSERROR_OK, scheme_fetcher_s::ops, and scheme_fetcher_s::scheme.

Referenced by fetch_curl_register(), fetch_data_register(), fetch_file_register(), fetch_javascript_register(), fetch_resource_register(), fetch_rsrc_register(), and html_css_fetcher_register().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fetcher_init()

nserror fetcher_init ( void  )

Initialise all registered fetchers.

Returns
NSERROR_OK or error code

Definition at line 285 of file fetch.c.

References fetch_curl_register(), fetch_data_register(), fetch_file_register(), fetch_javascript_register(), fetch_resource_register(), and NSERROR_OK.

Referenced by netsurf_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fetcher_quit()

void fetcher_quit ( void  )

Clean up for quit.

Must be called before exiting.

Definition at line 322 of file fetch.c.

References fetch_unref_fetcher(), fetch::fetcherd, fetchers, MAX_FETCHERS, NSLOG, and scheme_fetcher_s::refcount.

Referenced by netsurf_exit().

Here is the call graph for this function:
Here is the caller graph for this function: