summaryrefslogtreecommitdiff
path: root/beos
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-06-19 18:27:24 +0100
committerVincent Sanders <vince@kyllikki.org>2014-06-19 18:27:24 +0100
commit4b2101ba6ab62ae26d82cc8b86e0e61e9c007156 (patch)
treee46413e8f7a99d68f26f4b6e4f898b8400758933 /beos
parent904cefd388aa613126b69c858e489c5867163a87 (diff)
downloadnetsurf-4b2101ba6ab62ae26d82cc8b86e0e61e9c007156.tar.gz
netsurf-4b2101ba6ab62ae26d82cc8b86e0e61e9c007156.tar.bz2
clean up the fetcher factory and improve its API
Diffstat (limited to 'beos')
-rw-r--r--beos/fetch_rsrc.cpp21
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)