Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / mbk / mbk_cache.h
1 typedef struct {
2 int IFILE ;
3 FILE *PFILE ;
4 char *BASENAME ;
5 char *EXTENSION ;
6 char SIZE ;
7 } cache_file ;
8
9 char mbk_cache_call_iscative( mbkcache *cache, void *root, void *elem );
10 unsigned long int mbk_cache_call_load( mbkcache *cache, void *root, void *elem );
11 unsigned long int mbk_cache_call_release( mbkcache *cache, void *root, void *elem );
12
13 void mbk_cache_makeitfirst( mbkcache *cache, mbkcachelist *incache );
14 void mbk_cache_remove( mbkcache *cache, mbkcachelist *incache, void *root );
15 void mbk_cache_add( mbkcache *cache, void *root, void *elem );
16
17 void mbk_cache_update_memory( mbkcache *cache, void *root );
18
19 mbkcachelist* mbk_cache_getmbkcachelist( mbkcache *cache, void *data );
20 void mbk_cache_setmbkcachelist( mbkcache *cache, void *data, mbkcachelist *cachelist );
21 void mbk_cache_delmbkcachelist( mbkcache *cache, void *data );
22
23 mbkcache* mbk_cache_alloc( void );
24 void mbk_cache_free( mbkcache *cache );
25 mbkcachelist* mbk_cache_alloccachelist( mbkcache *cache );
26 void mbk_cache_freecachelist( mbkcache *cache, mbkcachelist *incache );
27
28 unsigned long int mbk_cache_file_close( void *root, cache_file *elem );
29 unsigned long int mbk_cache_file_open( void *root, cache_file *elem );
30
31 #define CACHE_ALLOC_BLOCLIST 128