2 * Copyright (C) 2004 John Ellis
3 * Copyright (C) 2008 - 2016 The Geeqie Team
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29 #define GQ_CACHE_THUMB "thumbnails"
30 #define GQ_CACHE_METADATA "metadata"
32 #define GQ_CACHE_LOCAL_THUMB ".thumbnails"
33 #define GQ_CACHE_LOCAL_METADATA ".metadata"
35 #define GQ_CACHE_EXT_THUMB ".png"
36 #define GQ_CACHE_EXT_SIM ".sim"
37 #define GQ_CACHE_EXT_METADATA ".meta"
38 #define GQ_CACHE_EXT_XMP_METADATA ".gq.xmp"
45 CACHE_TYPE_XMP_METADATA
55 ImageSimilarityData *sim;
63 gboolean cache_time_valid(const gchar *cache, const gchar *path);
66 CacheData *cache_sim_data_new();
67 void cache_sim_data_free(CacheData *cd);
69 gboolean cache_sim_data_save(CacheData *cd);
70 CacheData *cache_sim_data_load(const gchar *path);
72 void cache_sim_data_set_dimensions(CacheData *cd, gint w, gint h);
73 void cache_sim_data_set_md5sum(CacheData *cd, const guchar digest[16]);
74 void cache_sim_data_set_similarity(CacheData *cd, ImageSimilarityData *sd);
75 gint cache_sim_data_filled(ImageSimilarityData *sd);
77 gchar *cache_get_location(CacheType type, const gchar *source, gint include_name, mode_t *mode);
78 gchar *cache_find_location(CacheType type, const gchar *source);
80 const gchar *get_thumbnails_cache_dir();
81 const gchar *get_thumbnails_standard_cache_dir();
82 const gchar *get_metadata_cache_dir();
85 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */