summaryrefslogtreecommitdiff
path: root/gtk/llcache.c
blob: 56d6d12ab244bfdd6c86b2bf6c7ed483765b7bff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
 * Copyright 2014 Vincent Sanders <vince@netsurf-browser.org>
 *
 * 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/>.
 */

#include "utils/nsurl.h"
#include "utils/log.h"
#include "desktop/gui.h"

#include "gtk/llcache.h"

static nserror
persist(nsurl *url, int remaining, const uint8_t *data, size_t datalen)
{
	LOG(("Writing cache file for url:%s", nsurl_access(url)));
	return NSERROR_OK;
}

static nserror
retrieve(nsurl *url, int *remaining_out, const uint8_t **data_out, size_t *datalen_out)
{
	return NSERROR_NOT_FOUND;
}

static struct gui_llcache_table llcache_table = {
	.persist = persist,
	.retrieve = retrieve,
};

struct gui_llcache_table *nsgtk_llcache_table = &llcache_table;