Improve documentation on mimetype fetcher table
This commit is contained in:
parent
f6867efcf8
commit
283cd05d01
|
@ -91,9 +91,3 @@ error:
|
|||
LOG(("mime type: %s", res ));
|
||||
return( res );
|
||||
}
|
||||
|
||||
|
||||
char *fetch_mimetype(const char *ro_path)
|
||||
{
|
||||
return strdup("text/plain");
|
||||
}
|
||||
|
|
|
@ -1,2 +1,24 @@
|
|||
char *fetch_mimetype(const char *ro_path);
|
||||
/*
|
||||
* Copyright 2010 Ole Loots <ole@monochrom.net>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef NS_ATARI_FILETYPE_H_
|
||||
#define NS_ATARI_FILETYPE_H_
|
||||
|
||||
const char *fetch_filetype(const char *unix_path);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1078,7 +1078,6 @@ static struct gui_fetch_table atari_fetch_table = {
|
|||
.url_to_path = url_to_path,
|
||||
|
||||
.get_resource_url = gui_get_resource_url,
|
||||
.mimetype = fetch_mimetype,
|
||||
};
|
||||
|
||||
static struct gui_browser_table atari_browser_table = {
|
||||
|
|
|
@ -387,7 +387,8 @@ struct gui_fetch_table {
|
|||
/**
|
||||
* Find a MIME type for a local file
|
||||
*
|
||||
* @note used in file fetcher
|
||||
* @note only used in curl fetcher on RISC OS otherwise its a
|
||||
* strdup of filetype.
|
||||
*
|
||||
* \param ro_path RISC OS style path to file on disk
|
||||
* \return MIME type string (on heap, caller should free), or NULL
|
||||
|
|
|
@ -181,12 +181,6 @@ static const char *fetch_filetype(const char *unix_path)
|
|||
return "text/html";
|
||||
}
|
||||
|
||||
|
||||
static char *fetch_mimetype(const char *ro_path)
|
||||
{
|
||||
return strdup("text/plain");
|
||||
}
|
||||
|
||||
/* table for fetch operations */
|
||||
static struct gui_fetch_table fetch_table = {
|
||||
.filename_from_path = filename_from_path,
|
||||
|
@ -196,7 +190,6 @@ static struct gui_fetch_table fetch_table = {
|
|||
.url_to_path = url_to_path,
|
||||
|
||||
.get_resource_url = get_resource_url,
|
||||
.mimetype = fetch_mimetype,
|
||||
};
|
||||
|
||||
struct gui_fetch_table *framebuffer_fetch_table = &fetch_table;
|
||||
|
|
|
@ -51,9 +51,3 @@ const char *fetch_filetype(const char *unix_path)
|
|||
return "image/x-ms-bmp";
|
||||
return "text/html";
|
||||
}
|
||||
|
||||
|
||||
char *fetch_mimetype(const char *ro_path)
|
||||
{
|
||||
return strdup("text/plain");
|
||||
}
|
||||
|
|
|
@ -20,6 +20,5 @@
|
|||
#define _NETSURF_WINDOWS_FILETYPE_H_
|
||||
|
||||
const char *fetch_filetype(const char *unix_path);
|
||||
char *fetch_mimetype(const char *ro_path);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1881,8 +1881,6 @@ static struct gui_fetch_table fetch_table = {
|
|||
.filetype = fetch_filetype,
|
||||
.path_to_url = path_to_url,
|
||||
.url_to_path = url_to_path,
|
||||
|
||||
.mimetype = fetch_mimetype,
|
||||
};
|
||||
struct gui_fetch_table *win32_fetch_table = &fetch_table;
|
||||
|
||||
|
|
Loading…
Reference in New Issue