ELinks 0.18.0
|
#include <string.h>
#include "elinks.h"
#include "bfu/dialog.h"
#include "cache/cache.h"
#include "cache/dialogs.h"
#include "config/options.h"
#include "main/main.h"
#include "main/object.h"
#include "network/connection.h"
#include "protocol/protocol.h"
#include "protocol/proxy.h"
#include "protocol/uri.h"
#include "util/base64.h"
#include "util/error.h"
#include "util/memory.h"
#include "util/string.h"
#include "util/time.h"
Macros | |
#define | dump_frags(entry, comment) |
#define | CACHE_PAD(x) |
#define | FRAGSIZE(x) |
Functions | |
static void | truncate_entry (struct cache_entry *cached, off_t offset, int final) |
unsigned longlong | get_cache_size (void) |
int | get_cache_entry_count (void) |
int | get_cache_entry_used_count (void) |
int | get_cache_entry_loading_count (void) |
struct cache_entry * | find_in_cache (struct uri *uri) |
struct cache_entry * | get_cache_entry (struct uri *uri) |
static int | cache_entry_has_expired (struct cache_entry *cached) |
struct cache_entry * | get_validated_cache_entry (struct uri *uri, cache_mode_T cache_mode) |
int | cache_entry_is_valid (struct cache_entry *cached) |
struct cache_entry * | follow_cached_redirects (struct cache_entry *cached) |
struct cache_entry * | get_redirected_cache_entry (struct uri *uri) |
static void | enlarge_entry (struct cache_entry *cached, off_t size) |
static struct fragment * | frag_alloc (size_t size) |
static struct fragment * | frag_realloc (struct fragment *f, size_t size) |
static void | frag_free (struct fragment *f) |
static void | remove_overlaps (struct cache_entry *cached, struct fragment *f, int *trunc) |
int | add_fragment (struct cache_entry *cached, off_t offset, const char *data, ssize_t length) |
struct fragment * | get_cache_fragment (struct cache_entry *cached) |
static void | delete_fragment (struct cache_entry *cached, struct fragment *f) |
void | free_entry_to (struct cache_entry *cached, off_t offset) |
void | delete_entry_content (struct cache_entry *cached) |
static void | done_cache_entry (struct cache_entry *cached) |
void | delete_cache_entry (struct cache_entry *cached) |
void | normalize_cache_entry (struct cache_entry *cached, off_t truncate_length) |
struct uri * | redirect_cache (struct cache_entry *cached, const char *location, int get, int incomplete) |
void | garbage_collection (int whole) |
int | validate_cache_integrity (struct cache_entry *cached, const char *integrity) |
Variables | |
static struct cache_entry list | cache_entries = { D_LIST_HEAD_EL(cache_entries) } |
static unsigned longlong | cache_size |
static int | id_counter = 1 |
#define CACHE_PAD | ( | x | ) |
#define dump_frags | ( | entry, | |
comment ) |
int add_fragment | ( | struct cache_entry * | cached, |
off_t | offset, | ||
const char * | data, | ||
ssize_t | length ) |
|
static |
int cache_entry_is_valid | ( | struct cache_entry * | cached | ) |
void delete_cache_entry | ( | struct cache_entry * | cached | ) |
void delete_entry_content | ( | struct cache_entry * | cached | ) |
|
static |
|
static |
|
inlinestatic |
struct cache_entry * find_in_cache | ( | struct uri * | uri | ) |
struct cache_entry * follow_cached_redirects | ( | struct cache_entry * | cached | ) |
|
static |
|
static |
void free_entry_to | ( | struct cache_entry * | cached, |
off_t | offset ) |
void garbage_collection | ( | int | whole | ) |
struct cache_entry * get_cache_entry | ( | struct uri * | uri | ) |
int get_cache_entry_count | ( | void | ) |
int get_cache_entry_loading_count | ( | void | ) |
int get_cache_entry_used_count | ( | void | ) |
struct fragment * get_cache_fragment | ( | struct cache_entry * | cached | ) |
unsigned longlong get_cache_size | ( | void | ) |
struct cache_entry * get_redirected_cache_entry | ( | struct uri * | uri | ) |
struct cache_entry * get_validated_cache_entry | ( | struct uri * | uri, |
cache_mode_T | cache_mode ) |
void normalize_cache_entry | ( | struct cache_entry * | cached, |
off_t | truncate_length ) |
struct uri * redirect_cache | ( | struct cache_entry * | cached, |
const char * | location, | ||
int | get, | ||
int | incomplete ) |
|
static |
|
static |
int validate_cache_integrity | ( | struct cache_entry * | cached, |
const char * | integrity ) |
|
static |
|
static |
|
static |