summaryrefslogtreecommitdiff
path: root/monkey/download.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2014-01-14 16:04:02 +0000
committerVincent Sanders <vince@netsurf-browser.org>2014-01-14 16:04:02 +0000
commit8dfe22515312a8ecf4da974feb31b0f5e7f317e5 (patch)
tree163091cfeda5c4cb644e08e7649f70788070a560 /monkey/download.c
parentd18c8ed4521714c3fff3cca64685b8192ca0e075 (diff)
downloadnetsurf-8dfe22515312a8ecf4da974feb31b0f5e7f317e5.tar.gz
netsurf-8dfe22515312a8ecf4da974feb31b0f5e7f317e5.tar.bz2
move download operations to download table
Diffstat (limited to 'monkey/download.c')
-rw-r--r--monkey/download.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/monkey/download.c b/monkey/download.c
index d706dd6e0..46d54dc0c 100644
--- a/monkey/download.c
+++ b/monkey/download.c
@@ -34,7 +34,7 @@ struct gui_download_window {
static struct gui_download_window *dw_ring = NULL;
-struct gui_download_window *
+static struct gui_download_window *
gui_download_window_create(download_context *ctx,
struct gui_window *parent)
{
@@ -52,7 +52,7 @@ gui_download_window_create(download_context *ctx,
return ret;
}
-nserror
+static nserror
gui_download_window_data(struct gui_download_window *dw,
const char *data, unsigned int size)
{
@@ -61,7 +61,7 @@ gui_download_window_data(struct gui_download_window *dw,
return NSERROR_OK;
}
-void
+static void
gui_download_window_error(struct gui_download_window *dw,
const char *error_msg)
{
@@ -69,7 +69,7 @@ gui_download_window_error(struct gui_download_window *dw,
dw->dwin_num, error_msg);
}
-void
+static void
gui_download_window_done(struct gui_download_window *dw)
{
fprintf(stdout, "DOWNLOAD_WINDOW DONE DWIN %u\n",
@@ -77,3 +77,12 @@ gui_download_window_done(struct gui_download_window *dw)
RING_REMOVE(dw_ring, dw);
free(dw);
}
+
+static struct gui_download_table gui_download_table = {
+ .create = gui_download_window_create,
+ .data = gui_download_window_data,
+ .error = gui_download_window_error,
+ .done = gui_download_window_done,
+};
+
+struct gui_download_table *monkey_gui_download_table = &gui_download_table;