4 * Thomas Leonard, <tal197@users.sourceforge.net>
16 #include <glib-object.h>
18 typedef GObject
*(*GFSLoadFunc
)(const char *pathname
, gpointer user_data
);
19 typedef void (*GFSUpdateFunc
)(gpointer object
,
23 FSCACHE_LOOKUP_CREATE
, /* Load if missing. Update as needed. */
24 FSCACHE_LOOKUP_ONLY_NEW
,/* Return NULL if not present AND uptodate */
25 FSCACHE_LOOKUP_PEEK
, /* Lookup; don't load or update */
26 FSCACHE_LOOKUP_INIT
, /* Internal use */
27 FSCACHE_LOOKUP_INSERT
, /* Internal use */
30 GFSCache
*g_fscache_new(GFSLoadFunc load
,
33 void g_fscache_destroy(GFSCache
*cache
);
34 gpointer
g_fscache_lookup(GFSCache
*cache
, const char *pathname
);
35 gpointer
g_fscache_lookup_full(GFSCache
*cache
, const char *pathname
,
36 FSCacheLookup lookup_type
,
38 void g_fscache_may_update(GFSCache
*cache
, const char *pathname
);
39 void g_fscache_update(GFSCache
*cache
, const char *pathname
);
40 void g_fscache_purge(GFSCache
*cache
, gint age
);
42 void g_fscache_insert(GFSCache
*cache
, const char *pathname
, gpointer obj
,
43 gboolean update_details
);
45 #endif /* _FSCACHE_H */