summaryrefslogtreecommitdiff
path: root/content/fetchers/data.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-07-01 09:03:47 +0100
committerVincent Sanders <vince@kyllikki.org>2014-07-01 09:03:47 +0100
commit233050353385b6917d6a5369914d1e6186701fe7 (patch)
tree3b2c4dcd6c9284e39c69ad5c19279b07cf0efc57 /content/fetchers/data.c
parent01088bb63b1ab1ff7453c199a1c875483b1e5084 (diff)
parent8944edd649e74e4864f36d7293921385ba5ca2c7 (diff)
downloadnetsurf-233050353385b6917d6a5369914d1e6186701fe7.tar.gz
netsurf-233050353385b6917d6a5369914d1e6186701fe7.tar.bz2
Merge branch 'vince/fetchschedule'
Diffstat (limited to 'content/fetchers/data.c')
-rw-r--r--content/fetchers/data.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/content/fetchers/data.c b/content/fetchers/data.c
index f7ae17150..94ba63827 100644
--- a/content/fetchers/data.c
+++ b/content/fetchers/data.c
@@ -31,6 +31,7 @@
#include "utils/config.h"
#include "content/fetch.h"
+#include "content/fetchers.h"
#include "content/fetchers/data.h"
#include "content/urldb.h"
#include "desktop/netsurf.h"
@@ -324,17 +325,19 @@ static void fetch_data_poll(lwc_string *scheme)
} while ( (c = next) != ring && ring != NULL);
}
-void fetch_data_register(void)
+nserror fetch_data_register(void)
{
lwc_string *scheme = lwc_string_ref(corestring_lwc_data);
-
- fetch_add_fetcher(scheme,
- fetch_data_initialise,
- fetch_data_can_fetch,
- fetch_data_setup,
- fetch_data_start,
- fetch_data_abort,
- fetch_data_free,
- fetch_data_poll,
- fetch_data_finalise);
+ const struct fetcher_operation_table fetcher_ops = {
+ .initialise = fetch_data_initialise,
+ .acceptable = fetch_data_can_fetch,
+ .setup = fetch_data_setup,
+ .start = fetch_data_start,
+ .abort = fetch_data_abort,
+ .free = fetch_data_free,
+ .poll = fetch_data_poll,
+ .finalise = fetch_data_finalise
+ };
+
+ return fetcher_add(scheme, &fetcher_ops);
}