summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-08-25 15:58:56 -0700
committerVincent Sanders <vince@kyllikki.org>2014-08-25 15:59:52 -0700
commit37755fb135f9e582bd35ef6d282515ee71d619f2 (patch)
tree05f74bda80ba63bde9c97948879ae1ab83585316 /content
parent5b815861f36700548c124102eb9f0e986dac8a20 (diff)
downloadnetsurf-37755fb135f9e582bd35ef6d282515ee71d619f2.tar.gz
netsurf-37755fb135f9e582bd35ef6d282515ee71d619f2.tar.bz2
add incomplete scheme fetcher for javascript urls
Diffstat (limited to 'content')
-rw-r--r--content/fetch.c2
-rw-r--r--content/fetchers.h21
2 files changed, 18 insertions, 5 deletions
diff --git a/content/fetch.c b/content/fetch.c
index 6948fcbea..e10f0abcb 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -57,6 +57,7 @@
#include "content/fetchers/curl.h"
#include "content/fetchers/data.h"
#include "content/fetchers/file.h"
+#include "javascript/fetcher.h"
#include "content/urldb.h"
/* Define this to turn on verbose fetch logging */
@@ -291,6 +292,7 @@ nserror fetcher_init(void)
fetch_file_register();
fetch_resource_register();
fetch_about_register();
+ fetch_javascript_register();
return NSERROR_OK;
}
diff --git a/content/fetchers.h b/content/fetchers.h
index d123de986..95034bbff 100644
--- a/content/fetchers.h
+++ b/content/fetchers.h
@@ -16,7 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file content/fetchers.h
+/**
+ * \file content/fetchers.h
+ *
* Interface for fetchers factory.
*/
@@ -34,6 +36,15 @@ struct fetch;
* 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 teh first poll
+ * after completion or abort it is freed
+ *
*/
struct fetcher_operation_table {
/**
@@ -44,7 +55,7 @@ struct fetcher_operation_table {
bool (*initialise)(lwc_string *scheme);
/**
- * can this fetcher accept a url.
+ * Can this fetcher accept a url.
*
* \param url the URL to check
* \return true if the fetcher can handle the url else false.
@@ -80,7 +91,7 @@ struct fetcher_operation_table {
void (*poll)(lwc_string *scheme);
/**
- * finalise the fetcher.
+ * Finalise the fetcher.
*/
void (*finalise)(lwc_string *scheme);
};
@@ -97,9 +108,9 @@ nserror fetcher_add(lwc_string *scheme, const struct fetcher_operation_table *op
/**
- * Initialise the fetchers.
+ * Initialise all registered fetchers.
*
- * @return NSERROR_OK or error code
+ * \return NSERROR_OK or error code
*/
nserror fetcher_init(void);