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
48 typedef struct _CacheData CacheData;
56 ImageSimilarityData *sim;
64 gboolean cache_time_valid(const gchar *cache, const gchar *path);
67 CacheData *cache_sim_data_new(void);
68 void cache_sim_data_free(CacheData *cd);
70 gboolean cache_sim_data_save(CacheData *cd);
71 CacheData *cache_sim_data_load(const gchar *path);
73 void cache_sim_data_set_dimensions(CacheData *cd, gint w, gint h);
74 void cache_sim_data_set_date(CacheData *cd, time_t date);
75 void cache_sim_data_set_md5sum(CacheData *cd, guchar digest[16]);
76 void cache_sim_data_set_similarity(CacheData *cd, ImageSimilarityData *sd);
77 gint cache_sim_data_filled(ImageSimilarityData *sd);
79 gchar *cache_get_location(CacheType type, const gchar *source, gint include_name, mode_t *mode);
80 gchar *cache_find_location(CacheType type, const gchar *source);
82 const gchar *get_thumbnails_cache_dir(void);
83 const gchar *get_metadata_cache_dir(void);
86 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */