4 * Thomas Leonard, <tal197@ecs.soton.ac.uk>
18 typedef struct _GFSCache GFSCache
;
19 typedef struct _GFSCacheKey GFSCacheKey
;
20 typedef struct _GFSCacheData GFSCacheData
;
21 typedef gpointer (*GFSLoadFunc
)(char *pathname
, gpointer user_data
);
22 typedef void (*GFSRefFunc
)(gpointer object
, gpointer user_data
);
23 typedef int (*GFSGetRefFunc
)(gpointer object
, gpointer user_data
);
24 typedef void (*GFSUpdateFunc
)(gpointer object
,
31 GHashTable
*inode_to_stats
;
48 gpointer data
; /* The object from the file */
51 /* Details of the file last time we checked it */
57 GFSCache
*g_fscache_new(GFSLoadFunc load
,
63 void g_fscache_destroy(GFSCache
*cache
);
64 gpointer
g_fscache_lookup(GFSCache
*cache
, char *pathname
);
65 void g_fscache_may_update(GFSCache
*cache
, char *pathname
);
66 void g_fscache_update(GFSCache
*cache
, char *pathname
);
67 void g_fscache_purge(GFSCache
*cache
, gint age
);
69 void g_fscache_data_ref(GFSCache
*cache
, gpointer data
);
70 void g_fscache_data_unref(GFSCache
*cache
, gpointer data
);
72 #endif /* _FSCACHE_H */