/* ARISA - Pack Cache Structure and Function Definitions */ /* Copyright (C) 2004 Carl Ritson */ #define _ARISA_PACK_CACHE_H typedef struct pack_cache_t { lock_t lock; pack_t **table; unsigned int size; unsigned int no_packs; } pack_cache_t; enum { PACK_CACHE_CREATE = 0x1 } pack_cache_flags_t; /* Functions */ pack_cache_t *pack_cache_init(void); void pack_cache_free(pack_cache_t *pc); pack_t *pack_cache_get(pack_cache_t *pc, const char *path, int flags); int pack_cache_present(pack_cache_t *pc, pack_t *p); int pack_cache_deref(pack_cache_t *pc, pack_t *p); void pack_cache_fill(void);