summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-01-22 23:19:57 +0000
committerVincent Sanders <vince@kyllikki.org>2014-01-23 00:00:18 +0000
commit047569339406f2be1637ae4cee5dd0c9a9c2328f (patch)
tree3d3909b4bc3d27cd7a9e146d32539ce752b33310 /amiga
parent4684e9665d2ddff50f4a8e9a16d73224d2617180 (diff)
downloadnetsurf-047569339406f2be1637ae4cee5dd0c9a9c2328f.tar.gz
netsurf-047569339406f2be1637ae4cee5dd0c9a9c2328f.tar.bz2
create table for fetcher operations and move all operations into it
Diffstat (limited to 'amiga')
-rw-r--r--amiga/filetype.c6
-rw-r--r--amiga/filetype.h3
-rw-r--r--amiga/gui.c12
3 files changed, 12 insertions, 9 deletions
diff --git a/amiga/filetype.c b/amiga/filetype.c
index 39e874ab0..0cb4ac454 100644
--- a/amiga/filetype.c
+++ b/amiga/filetype.c
@@ -144,12 +144,6 @@ const char *fetch_filetype(const char *unix_path)
return mimetype;
}
-
-char *fetch_mimetype(const char *ro_path)
-{
- return strdup(fetch_filetype(ro_path));
-}
-
const char *ami_content_type_to_file_type(content_type type)
{
switch(type)
diff --git a/amiga/filetype.h b/amiga/filetype.h
index 851dddf36..e99f5950c 100644
--- a/amiga/filetype.h
+++ b/amiga/filetype.h
@@ -27,6 +27,8 @@
struct hlcache_handle;
struct ami_mime_entry;
+const char *fetch_filetype(const char *unix_path);
+
nserror ami_mime_init(const char *mimefile);
void ami_mime_free(void);
void ami_mime_entry_free(struct ami_mime_entry *mimeentry);
@@ -46,4 +48,5 @@ bool ami_mime_compare(struct hlcache_handle *c, const char *type);
/* deprecated */
const char *ami_content_type_to_file_type(content_type type);
+
#endif
diff --git a/amiga/gui.c b/amiga/gui.c
index b7ee133fa..6bad1dbee 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -5181,17 +5181,22 @@ static struct gui_window_table amiga_window_table = {
.save_link = gui_window_save_link,
};
+static struct gui_fetch_table amiga_fetch_table = {
+ .filename_from_path = filename_from_path,
+ .path_add_part = path_add_part,
+ .filetype = fetch_filetype,
+
+ .get_resource_url = gui_get_resource_url,
+};
static struct gui_browser_table amiga_browser_table = {
.poll = gui_poll,
+
.quit = gui_quit,
.set_search_ico = gui_set_search_ico,
- .get_resource_url = gui_get_resource_url,
.launch_url = gui_launch_url,
.create_form_select_menu = gui_create_form_select_menu,
.cert_verify = gui_cert_verify,
- .filename_from_path = filename_from_path,
- .path_add_part = path_add_part,
.login = gui_401login_open,
};
@@ -5211,6 +5216,7 @@ int main(int argc, char** argv)
.window = &amiga_window_table,
.clipboard = amiga_clipboard_table,
.download = amiga_download_table,
+ .fetch = &amiga_fetch_table,
};
/* Open popupmenu.library just to check the version.