diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-01-22 23:19:57 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-01-23 00:00:18 +0000 |
commit | 047569339406f2be1637ae4cee5dd0c9a9c2328f (patch) | |
tree | 3d3909b4bc3d27cd7a9e146d32539ce752b33310 /atari | |
parent | 4684e9665d2ddff50f4a8e9a16d73224d2617180 (diff) | |
download | netsurf-047569339406f2be1637ae4cee5dd0c9a9c2328f.tar.gz netsurf-047569339406f2be1637ae4cee5dd0c9a9c2328f.tar.bz2 |
create table for fetcher operations and move all operations into it
Diffstat (limited to 'atari')
-rwxr-xr-x | atari/filetype.c | 2 | ||||
-rw-r--r-- | atari/filetype.h | 2 | ||||
-rw-r--r-- | atari/gui.c | 15 |
3 files changed, 16 insertions, 3 deletions
diff --git a/atari/filetype.c b/atari/filetype.c index 99daf470c..9b73a0508 100755 --- a/atari/filetype.c +++ b/atari/filetype.c @@ -26,6 +26,8 @@ #include "utils/url.h"
#include "utils/log.h"
#include "content/fetch.h"
+ +#include "atari/filetype.h" /**
* filetype -- determine the MIME type of a local file
diff --git a/atari/filetype.h b/atari/filetype.h new file mode 100644 index 000000000..54d915bf5 --- /dev/null +++ b/atari/filetype.h @@ -0,0 +1,2 @@ +char *fetch_mimetype(const char *ro_path); +const char *fetch_filetype(const char *unix_path); diff --git a/atari/gui.c b/atari/gui.c index b2ac6f715..0267148d2 100644 --- a/atari/gui.c +++ b/atari/gui.c @@ -74,6 +74,7 @@ #include "atari/search.h" #include "atari/deskmenu.h" #include "atari/download.h" +#include "atari/filetype.h" #include "cflib.h" #define TODO() (0)/*printf("%s Unimplemented!\n", __FUNCTION__)*/ @@ -1072,13 +1073,20 @@ static struct gui_clipboard_table atari_clipboard_table = { .set = gui_set_clipboard, }; +static struct gui_fetch_table atari_fetch_table = { + .filename_from_path = filename_from_path, + .path_add_part = path_add_part, + .filetype = fetch_filetype, + + .get_resource_url = gui_get_resource_url, + .mimetype = fetch_mimetype, +}; + static struct gui_browser_table atari_browser_table = { .poll = gui_poll, + .quit = gui_quit, - .get_resource_url = gui_get_resource_url, .cert_verify = gui_cert_verify, - .filename_from_path = filename_from_path, - .path_add_part = path_add_part, .login = gui_401login_open, }; @@ -1102,6 +1110,7 @@ int main(int argc, char** argv) .window = &atari_window_table, .clipboard = &atari_clipboard_table, .download = atari_download_table, + .fetch = &atari_fetch_table, }; /* @todo logging file descriptor update belongs in a nslog_init callback */ |