summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/fetch.h5
-rw-r--r--content/fetchers/curl.c4
-rw-r--r--content/fetchers/file.c8
-rw-r--r--content/fetchers/resource.c2
4 files changed, 7 insertions, 12 deletions
diff --git a/content/fetch.h b/content/fetch.h
index 09b7c8d44..f20b4f2d2 100644
--- a/content/fetch.h
+++ b/content/fetch.h
@@ -99,11 +99,6 @@ extern bool fetch_active;
typedef void (*fetch_callback)(const fetch_msg *msg, void *p);
-/** @todo these calls should be in a file_table in gui_factory */
-const char *fetch_filetype(const char *unix_path);
-char *fetch_mimetype(const char *ro_path);
-
-
/**
* Initialise the fetcher.
*
diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c
index bc6b2c338..f3a8385a1 100644
--- a/content/fetchers/curl.c
+++ b/content/fetchers/curl.c
@@ -1267,7 +1267,7 @@ fetch_curl_post_convert(const struct fetch_multipart_data *control)
if (control->file) {
char *leafname = 0;
- leafname = guit->browser->filename_from_path(control->value);
+ leafname = guit->fetch->filename_from_path(control->value);
if (leafname == NULL)
continue;
@@ -1297,7 +1297,7 @@ fetch_curl_post_convert(const struct fetch_multipart_data *control)
LOG(("curl_formadd: %d (%s)",
code, control->name));
} else {
- char *mimetype = fetch_mimetype(control->value);
+ char *mimetype = guit->fetch->mimetype(control->value);
code = curl_formadd(&post, &last,
CURLFORM_COPYNAME, control->name,
CURLFORM_FILE, control->rawfile,
diff --git a/content/fetchers/file.c b/content/fetchers/file.c
index 26ef9069b..83c408e5a 100644
--- a/content/fetchers/file.c
+++ b/content/fetchers/file.c
@@ -305,7 +305,7 @@ static void fetch_file_process_plain(struct fetch_file_context *ctx,
/* content type */
if (fetch_file_send_header(ctx, "Content-Type: %s",
- fetch_filetype(ctx->path)))
+ guit->fetch->filetype(ctx->path)))
goto fetch_file_process_aborted;
/* content length */
@@ -385,7 +385,7 @@ fetch_file_process_aborted:
/* content type */
if (fetch_file_send_header(ctx, "Content-Type: %s",
- fetch_filetype(ctx->path)))
+ guit->fetch->filetype(ctx->path)))
goto fetch_file_process_aborted;
/* content length */
@@ -575,7 +575,7 @@ static void fetch_file_process_dir(struct fetch_file_context *ctx,
continue;
strncpy(urlpath, ctx->path, sizeof urlpath);
- if (guit->browser->path_add_part(urlpath, sizeof urlpath,
+ if (guit->fetch->path_add_part(urlpath, sizeof urlpath,
ent->d_name) == false)
continue;
@@ -608,7 +608,7 @@ static void fetch_file_process_dir(struct fetch_file_context *ctx,
false,
path,
ent->d_name,
- fetch_filetype(urlpath),
+ guit->fetch->filetype(urlpath),
ent_stat.st_size,
datebuf, timebuf,
buffer, sizeof(buffer));
diff --git a/content/fetchers/resource.c b/content/fetchers/resource.c
index d1b21b741..cce816aa5 100644
--- a/content/fetchers/resource.c
+++ b/content/fetchers/resource.c
@@ -207,7 +207,7 @@ static bool fetch_resource_initialise(lwc_string *scheme)
}
}
- e->url = guit->browser->get_resource_url(fetch_resource_paths[i]);
+ e->url = guit->fetch->get_resource_url(fetch_resource_paths[i]);
if (e->url == NULL) {
lwc_string_unref(e->path);
} else {