NetSurf
|
implementation for javascript scheme fetcher More...
#include <stdbool.h>
#include <stdlib.h>
#include <libwapcaplet/libwapcaplet.h>
#include "utils/nsurl.h"
#include "utils/corestrings.h"
#include "utils/ring.h"
#include "content/fetch.h"
#include "content/fetchers.h"
#include "javascript/fetcher.h"
Go to the source code of this file.
Data Structures | |
struct | fetch_javascript_context |
Context for an resource fetch. More... | |
Functions | |
static bool | fetch_javascript_send_callback (const fetch_msg *msg, struct fetch_javascript_context *ctx) |
issue fetch callbacks with locking More... | |
static bool | fetch_javascript_handler (struct fetch_javascript_context *ctx) |
called from poll to progress fetch. More... | |
static bool | fetch_javascript_initialise (lwc_string *scheme) |
callback to initialise the resource fetcher. More... | |
static void | fetch_javascript_finalise (lwc_string *scheme) |
callback to finalise the resource fetcher. More... | |
static bool | fetch_javascript_can_fetch (const nsurl *url) |
static void * | fetch_javascript_setup (struct fetch *fetchh, nsurl *url, bool only_2xx, bool downgrade_tls, const char *post_urlenc, const struct fetch_multipart_data *post_multipart, const char **headers) |
callback to set up a resource fetch context. More... | |
static void | fetch_javascript_free (void *ctx) |
callback to free a resource fetch More... | |
static bool | fetch_javascript_start (void *ctx) |
callback to start a resource fetch More... | |
static void | fetch_javascript_abort (void *ctx) |
callback to abort a resource fetch More... | |
static void | fetch_javascript_poll (lwc_string *scheme) |
callback to poll for additional resource fetch contents More... | |
nserror | fetch_javascript_register (void) |
Register javascript scheme fetcher with fetcher factory. More... | |
Variables | |
static struct fetch_javascript_context * | ring = NULL |
implementation for javascript scheme fetcher
This fetcher implements http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#javascript-protocol
Definition in file fetcher.c.
|
static |
callback to abort a resource fetch
Definition at line 144 of file fetcher.c.
References fetch_javascript_context::aborted.
Referenced by fetch_javascript_register().
|
static |
Definition at line 96 of file fetcher.c.
Referenced by fetch_javascript_register().
|
static |
callback to finalise the resource fetcher.
Definition at line 92 of file fetcher.c.
Referenced by fetch_javascript_register().
|
static |
callback to free a resource fetch
Definition at line 127 of file fetcher.c.
References nsurl_unref(), ring, RING_REMOVE, and fetch_javascript_context::url.
Referenced by fetch_javascript_register().
|
static |
called from poll to progress fetch.
Definition at line 69 of file fetcher.c.
References FETCH_FINISHED, fetch_javascript_send_callback(), fetch_set_http_code(), fetch_javascript_context::fetchh, and fetch_msg::type.
Referenced by fetch_javascript_poll().
|
static |
callback to initialise the resource fetcher.
Definition at line 86 of file fetcher.c.
Referenced by fetch_javascript_register().
|
static |
callback to poll for additional resource fetch contents
Definition at line 157 of file fetcher.c.
References fetch_javascript_context::aborted, fetch_free(), fetch_javascript_handler(), fetch_remove_from_queues(), fetch_javascript_context::fetchh, fetch_javascript_context::locked, fetch_javascript_context::r_next, and ring.
Referenced by fetch_javascript_register().
nserror fetch_javascript_register | ( | void | ) |
Register javascript scheme fetcher with fetcher factory.
Definition at line 202 of file fetcher.c.
References fetch_javascript_abort(), fetch_javascript_can_fetch(), fetch_javascript_finalise(), fetch_javascript_free(), fetch_javascript_initialise(), fetch_javascript_poll(), fetch_javascript_setup(), fetch_javascript_start(), fetcher_add(), and fetcher_operation_table::initialise.
Referenced by fetcher_init().
|
inlinestatic |
issue fetch callbacks with locking
Definition at line 53 of file fetcher.c.
References fetch_javascript_context::aborted, fetch_send_callback(), fetch_javascript_context::fetchh, and fetch_javascript_context::locked.
Referenced by fetch_javascript_handler().
|
static |
callback to set up a resource fetch context.
Definition at line 103 of file fetcher.c.
References fetch_javascript_context::fetchh, nsurl_ref(), ring, RING_INSERT, and fetch_javascript_context::url.
Referenced by fetch_javascript_register().
|
static |
callback to start a resource fetch
Definition at line 138 of file fetcher.c.
Referenced by fetch_javascript_register().
|
static |
Definition at line 49 of file fetcher.c.
Referenced by fetch_javascript_free(), fetch_javascript_poll(), and fetch_javascript_setup().