diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-06-19 18:27:24 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-06-19 18:27:24 +0100 |
commit | 4b2101ba6ab62ae26d82cc8b86e0e61e9c007156 (patch) | |
tree | e46413e8f7a99d68f26f4b6e4f898b8400758933 /beos/fetch_rsrc.cpp | |
parent | 904cefd388aa613126b69c858e489c5867163a87 (diff) | |
download | netsurf-4b2101ba6ab62ae26d82cc8b86e0e61e9c007156.tar.gz netsurf-4b2101ba6ab62ae26d82cc8b86e0e61e9c007156.tar.bz2 |
clean up the fetcher factory and improve its API
Diffstat (limited to 'beos/fetch_rsrc.cpp')
-rw-r--r-- | beos/fetch_rsrc.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/beos/fetch_rsrc.cpp b/beos/fetch_rsrc.cpp index 887be7960..9461f5c79 100644 --- a/beos/fetch_rsrc.cpp +++ b/beos/fetch_rsrc.cpp @@ -33,6 +33,7 @@ extern "C" { #include "utils/config.h" #include "content/fetch.h" +#include "content/fetchers.h" #include "content/urldb.h" #include "desktop/netsurf.h" #include "utils/nsoption.h" @@ -358,6 +359,16 @@ void fetch_rsrc_register(void) { lwc_string *scheme; int err; + const struct fetcher_operation_table fetcher_ops_rsrc = { + fetch_rsrc_initialise, + fetch_rsrc_can_fetch, + fetch_rsrc_setup, + fetch_rsrc_start, + fetch_rsrc_abort, + fetch_rsrc_free, + fetch_rsrc_poll, + fetch_rsrc_finalise + }; err = find_app_resources(); @@ -371,15 +382,7 @@ void fetch_rsrc_register(void) "(couldn't intern \"rsrc\")."); } - fetch_add_fetcher(scheme, - fetch_rsrc_initialise, - fetch_rsrc_can_fetch, - fetch_rsrc_setup, - fetch_rsrc_start, - fetch_rsrc_abort, - fetch_rsrc_free, - fetch_rsrc_poll, - fetch_rsrc_finalise); + fetcher_add(scheme, &fetcher_ops_rsrc); } void fetch_rsrc_unregister(void) |