4 * Copyright (C) 2008 The Geeqie Team
8 * This software is released under the GNU General Public License (GNU GPL).
9 * Please read the included file COPYING for more information.
10 * This software comes with no warranty of any kind, use at your own risk!
21 #define GQ_CACHE_RC_THUMB GQ_RC_DIR G_DIR_SEPARATOR_S "thumbnails"
22 #define GQ_CACHE_RC_METADATA GQ_RC_DIR G_DIR_SEPARATOR_S "metadata"
24 #define GQ_CACHE_LOCAL_THUMB ".thumbnails"
25 #define GQ_CACHE_LOCAL_METADATA ".metadata"
27 #define GQ_CACHE_EXT_THUMB ".png"
28 #define GQ_CACHE_EXT_SIM ".sim"
29 #define GQ_CACHE_EXT_METADATA ".meta"
38 typedef struct _CacheData CacheData;
47 ImageSimilarityData *sim;
56 gint cache_time_valid(const gchar *cache, const gchar *path);
59 CacheData *cache_sim_data_new(void);
60 void cache_sim_data_free(CacheData *cd);
62 gint cache_sim_data_save(CacheData *cd);
63 CacheData *cache_sim_data_load(const gchar *path);
65 void cache_sim_data_set_dimensions(CacheData *cd, gint w, gint h);
66 void cache_sim_data_set_date(CacheData *cd, time_t date);
67 void cache_sim_data_set_checksum(CacheData *cd, glong checksum);
68 void cache_sim_data_set_md5sum(CacheData *cd, guchar digest[16]);
69 void cache_sim_data_set_similarity(CacheData *cd, ImageSimilarityData *sd);
70 gint cache_sim_data_filled(ImageSimilarityData *sd);
73 gint cache_ensure_dir_exists(gchar *path, mode_t mode);
74 gchar *cache_get_location(CacheType type, const gchar *source, gint include_name, mode_t *mode);
75 gchar *cache_find_location(CacheType type, const gchar *source);