2005-02-03 16:18:22 +03:00
|
|
|
/*
|
|
|
|
* 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_
|
|
|
|
|
2005-06-23 21:22:28 +04:00
|
|
|
#include "netsurf/image/bitmap.h"
|
|
|
|
|
|
|
|
|
2005-02-03 16:18:22 +03:00
|
|
|
struct url_content {
|
2005-06-23 21:22:28 +04:00
|
|
|
struct bitmap *thumbnail; /** Thumbnail, or NULL */
|
2005-02-07 17:28:43 +03:00
|
|
|
char *url; /** URL (including hostname) */
|
|
|
|
int url_length; /** Length of URL (including hostname) */
|
2005-02-03 16:18:22 +03:00
|
|
|
int visits; /** Number of times visited */
|
|
|
|
int requests; /** Number of times requested */
|
|
|
|
};
|
|
|
|
|
|
|
|
struct url_data {
|
|
|
|
struct url_content data; /** Stored URL content data */
|
|
|
|
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);
|
|
|
|
|
2005-06-23 21:22:28 +04:00
|
|
|
void url_store_add_thumbnail(const char *url, struct bitmap *bitmap);
|
|
|
|
struct bitmap *url_store_get_thumbnail(const char *url);
|
|
|
|
|
2005-02-03 16:18:22 +03:00
|
|
|
void url_store_load(const char *file);
|
|
|
|
void url_store_save(const char *file);
|
|
|
|
|
|
|
|
void url_store_dump(void);
|
|
|
|
|
|
|
|
#endif
|