NetSurf
fetch.c
Go to the documentation of this file.
1/*
2 * Copyright 2014 Vincent Sanders <vince@netsurf-browser.org>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#include <stdlib.h>
20#include <stdio.h>
21#include <string.h>
22#include <stdbool.h>
23#include <limits.h>
24
25#include "utils/errors.h"
26#include "utils/file.h"
27#include "utils/nsurl.h"
28#include "utils/filepath.h"
29#include "netsurf/fetch.h"
30
31#include "monkey/filetype.h"
32#include "monkey/fetch.h"
33
34extern char **respaths;
35
36
37static nsurl *gui_get_resource_url(const char *path)
38{
39 char buf[PATH_MAX];
40 nsurl *url = NULL;
41
43
44 return url;
45}
46
49
50 .get_resource_url = gui_get_resource_url,
51};
52
#define PATH_MAX
Definition: gui.h:31
Error codes.
char * filepath_sfind(char **respathv, char *filepath, const char *filename)
Searches an array of resource paths for a file.
Definition: filepath.c:109
Utility routines to obtain paths to file resources.
char ** respaths
resource search path vector
Definition: findfile.c:28
static struct gui_fetch_table fetch_table
Definition: fetch.c:47
struct gui_fetch_table * monkey_fetch_table
Definition: fetch.c:53
static nsurl * gui_get_resource_url(const char *path)
Definition: fetch.c:37
Interface to platform-specific fetcher operations.
const char * monkey_fetch_filetype(const char *unix_path)
Determine the MIME type of a local file.
Definition: filetype.c:182
NetSurf URL handling (interface).
struct nsurl nsurl
NetSurf URL object.
Definition: nsurl.h:31
Interface to utility string handling.
function table for fetcher operations.
Definition: fetch.h:33
const char *(* filetype)(const char *unix_path)
Determine the MIME type of a local file.
Definition: fetch.h:45
nserror netsurf_path_to_nsurl(const char *path, struct nsurl **url)
Create a nsurl from a path.
Definition: file.c:307
Default operations table for files.
static nserror path(const struct redraw_context *ctx, const plot_style_t *pstyle, const float *p, unsigned int n, const float transform[6])
Plots a path.
Definition: plot.c:821