From c821ed2bbd91e1b4fe2b74c01cce1a4106f37655 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 30 May 2016 11:15:58 +0100 Subject: move download header into public API --- desktop/download.c | 2 +- desktop/gui_download.h | 44 ------------------------------ desktop/gui_factory.c | 2 +- frontends/amiga/download.c | 2 +- frontends/atari/download.c | 2 +- frontends/beos/download.cpp | 2 +- frontends/cocoa/DownloadWindowController.m | 2 +- frontends/gtk/download.c | 2 +- frontends/monkey/download.c | 2 +- frontends/riscos/download.c | 4 +-- frontends/windows/download.c | 2 +- include/netsurf/download.h | 44 ++++++++++++++++++++++++++++++ 12 files changed, 55 insertions(+), 55 deletions(-) delete mode 100644 desktop/gui_download.h create mode 100644 include/netsurf/download.h diff --git a/desktop/download.c b/desktop/download.c index 131bc806e..76c294977 100644 --- a/desktop/download.c +++ b/desktop/download.c @@ -30,7 +30,7 @@ #include "utils/http.h" #include "utils/utils.h" #include "desktop/download.h" -#include "desktop/gui_download.h" +#include "netsurf/download.h" #include "desktop/gui_internal.h" /** diff --git a/desktop/gui_download.h b/desktop/gui_download.h deleted file mode 100644 index 55e115d52..000000000 --- a/desktop/gui_download.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2014 Vincent Sanders - * - * This file is part of NetSurf, http://www.netsurf-browser.org/ - * - * NetSurf is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * NetSurf is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \file - * - * Interface to platform-specific download operations. - */ - -#ifndef _NETSURF_DESKTOP_GUI_DOWNLOAD_H_ -#define _NETSURF_DESKTOP_GUI_DOWNLOAD_H_ - -struct gui_window; -struct download_context; - -/** - * function table for download windows. - */ -struct gui_download_table { - struct gui_download_window *(*create)(struct download_context *ctx, struct gui_window *parent); - - nserror (*data)(struct gui_download_window *dw, const char *data, unsigned int size); - - void (*error)(struct gui_download_window *dw, const char *error_msg); - - void (*done)(struct gui_download_window *dw); -}; - -#endif diff --git a/desktop/gui_factory.c b/desktop/gui_factory.c index 65a3c584a..d917a3542 100644 --- a/desktop/gui_factory.c +++ b/desktop/gui_factory.c @@ -30,7 +30,7 @@ #include "desktop/save_pdf.h" #include "desktop/download.h" #include "desktop/searchweb.h" -#include "desktop/gui_download.h" +#include "netsurf/download.h" #include "desktop/gui_fetch.h" #include "desktop/gui_misc.h" #include "netsurf/window.h" diff --git a/frontends/amiga/download.c b/frontends/amiga/download.c index 2b7d0e3e7..8b122ecb3 100644 --- a/frontends/amiga/download.c +++ b/frontends/amiga/download.c @@ -53,7 +53,7 @@ #include "desktop/browser.h" #include "desktop/mouse.h" #include "netsurf/window.h" -#include "desktop/gui_download.h" +#include "netsurf/download.h" #include "content/handlers/image/ico.h" #include "amiga/gui.h" diff --git a/frontends/atari/download.c b/frontends/atari/download.c index 9ebe78751..c763ed2de 100644 --- a/frontends/atari/download.c +++ b/frontends/atari/download.c @@ -36,7 +36,7 @@ #include "desktop/textinput.h" #include "desktop/download.h" #include "desktop/browser.h" -#include "desktop/gui_download.h" +#include "netsurf/download.h" #include "atari/gui.h" #include "atari/misc.h" diff --git a/frontends/beos/download.cpp b/frontends/beos/download.cpp index ea0271e60..b64591c71 100644 --- a/frontends/beos/download.cpp +++ b/frontends/beos/download.cpp @@ -23,7 +23,7 @@ extern "C" { #include "desktop/download.h" -#include "desktop/gui_download.h" +#include "netsurf/download.h" #include "utils/utils.h" #include "utils/string.h" } diff --git a/frontends/cocoa/DownloadWindowController.m b/frontends/cocoa/DownloadWindowController.m index 0c9d869f8..b8cf09b18 100644 --- a/frontends/cocoa/DownloadWindowController.m +++ b/frontends/cocoa/DownloadWindowController.m @@ -19,7 +19,7 @@ #import "utils/log.h" #import "utils/nsurl.h" #import "desktop/download.h" -#import "desktop/gui_download.h" +#import "netsurf/download.h" #import "cocoa/DownloadWindowController.h" #import "cocoa/gui.h" diff --git a/frontends/gtk/download.c b/frontends/gtk/download.c index b7eea2584..8c8161459 100644 --- a/frontends/gtk/download.c +++ b/frontends/gtk/download.c @@ -30,7 +30,7 @@ #include "utils/nsoption.h" #include "utils/string.h" #include "desktop/download.h" -#include "desktop/gui_download.h" +#include "netsurf/download.h" #include "gtk/warn.h" #include "gtk/scaffolding.h" diff --git a/frontends/monkey/download.c b/frontends/monkey/download.c index 242136662..32241059a 100644 --- a/frontends/monkey/download.c +++ b/frontends/monkey/download.c @@ -22,7 +22,7 @@ #include "utils/errors.h" #include "utils/ring.h" -#include "desktop/gui_download.h" +#include "netsurf/download.h" #include "desktop/download.h" #include "content/hlcache.h" diff --git a/frontends/riscos/download.c b/frontends/riscos/download.c index cddb449de..7dd61b7b4 100644 --- a/frontends/riscos/download.c +++ b/frontends/riscos/download.c @@ -22,7 +22,7 @@ * \file * RISC OS download windows implementation. * - * This file implements the interface given by desktop/gui_download.h + * This file implements the interface given by netsurf/download.h * for download windows. Each download window has an associated * fetch. Downloads start by writing received data to a temporary * file. At some point the user chooses a destination (by drag & @@ -54,7 +54,7 @@ #include "utils/utils.h" #include "utils/string.h" #include "utils/corestrings.h" -#include "desktop/gui_download.h" +#include "netsurf/download.h" #include "desktop/download.h" #include "riscos/gui.h" diff --git a/frontends/windows/download.c b/frontends/windows/download.c index b281ea76a..f1a02870c 100644 --- a/frontends/windows/download.c +++ b/frontends/windows/download.c @@ -31,7 +31,7 @@ #include "utils/utils.h" #include "utils/string.h" #include "content/fetch.h" -#include "desktop/gui_download.h" +#include "netsurf/download.h" #include "desktop/download.h" #include "windows/download.h" diff --git a/include/netsurf/download.h b/include/netsurf/download.h new file mode 100644 index 000000000..55e115d52 --- /dev/null +++ b/include/netsurf/download.h @@ -0,0 +1,44 @@ +/* + * Copyright 2014 Vincent Sanders + * + * This file is part of NetSurf, http://www.netsurf-browser.org/ + * + * NetSurf is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * NetSurf is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file + * + * Interface to platform-specific download operations. + */ + +#ifndef _NETSURF_DESKTOP_GUI_DOWNLOAD_H_ +#define _NETSURF_DESKTOP_GUI_DOWNLOAD_H_ + +struct gui_window; +struct download_context; + +/** + * function table for download windows. + */ +struct gui_download_table { + struct gui_download_window *(*create)(struct download_context *ctx, struct gui_window *parent); + + nserror (*data)(struct gui_download_window *dw, const char *data, unsigned int size); + + void (*error)(struct gui_download_window *dw, const char *error_msg); + + void (*done)(struct gui_download_window *dw); +}; + +#endif -- cgit v1.2.3