summaryrefslogtreecommitdiff
path: root/content/url_store.h
blob: b152508af1bb4d088891cb11c8196f10a145fd72 (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
/*
 * This file is part of NetSurf, http://netsurf.sourceforge.net/
 * Licensed under the GNU General Public License,
 *                http://www.opensource.org/licenses/gpl-license
 * Copyright 2005 Richard Wilson <info@tinct.net>
 */

/** \file
 * Central repository for URL data (interface).
 */

#ifndef _NETSURF_CONTENT_URLSTORE_H_
#define _NETSURF_CONTENT_URLSTORE_H_

struct url_content {
	int visits;			/** Number of times visited */
	int requests;			/** Number of times requested */
};

struct url_data {
  	struct url_content data;	/** Stored URL content data */
	char *url;			/** URL (including hostname) */
	int url_length;			/** Length of URL (including hostname) */
  	struct url_data *previous;	/** Previous URL */
  	struct url_data *next;		/** Next URL */
	struct hostname_data *parent;	/** Parent hostname data */
};


struct url_content *url_store_find(const char *url);
char *url_store_match(const char *url, struct url_data **reference);
char *url_store_match_string(const char *text);

void url_store_load(const char *file);
void url_store_save(const char *file);

void url_store_dump(void);

#endif