From a1d73ecd110f6cc252f6146672802f87cc45723d Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sun, 27 Jun 2004 23:24:11 +0000 Subject: [project @ 2004-06-27 23:24:11 by bursa] Rewritten download window. Now downloads direct to file. New download window gui. svn path=/import/netsurf/; revision=1020 --- content/fetch.c | 15 +++++++++++++++ content/fetch.h | 4 ++++ 2 files changed, 19 insertions(+) (limited to 'content') diff --git a/content/fetch.c b/content/fetch.c index 5e27add95..184d78bcb 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -824,6 +824,21 @@ bool fetch_can_fetch(const char *url) } +/** + * Change the callback function for a fetch. + */ + +void fetch_change_callback(struct fetch *fetch, + void (*callback)(fetch_msg msg, void *p, const char *data, + unsigned long size), + void *p) +{ + assert(fetch); + fetch->callback = callback; + fetch->p = p; +} + + /** * testing framework */ diff --git a/content/fetch.h b/content/fetch.h index df2fd65c6..59767d255 100644 --- a/content/fetch.h +++ b/content/fetch.h @@ -53,5 +53,9 @@ void fetch_quit(void); const char *fetch_filetype(const char *unix_path); char *fetch_mimetype(const char *ro_path); bool fetch_can_fetch(const char *url); +void fetch_change_callback(struct fetch *fetch, + void (*callback)(fetch_msg msg, void *p, const char *data, + unsigned long size), + void *p); #endif -- cgit v1.2.3