Fix #314: Remote commands for thumbnail maintenance
[geeqie.git] / src / cache.h
index d52d74d..83c094a 100644 (file)
@@ -1,16 +1,24 @@
 /*
- * Geeqie
- * (C) 2004 John Ellis
- * Copyright (C) 2008 The Geeqie Team
+ * Copyright (C) 2004 John Ellis
+ * Copyright (C) 2008 - 2016 The Geeqie Team
  *
  * Author: John Ellis
  *
- * This software is released under the GNU General Public License (GNU GPL).
- * Please read the included file COPYING for more information.
- * This software comes with no warranty of any kind, use at your own risk!
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-
 #ifndef CACHE_H
 #define CACHE_H
 
 #define GQ_CACHE_EXT_THUMB      ".png"
 #define GQ_CACHE_EXT_SIM        ".sim"
 #define GQ_CACHE_EXT_METADATA   ".meta"
+#define GQ_CACHE_EXT_XMP_METADATA   ".gq.xmp"
 
 
 typedef enum {
        CACHE_TYPE_THUMB,
        CACHE_TYPE_SIM,
-       CACHE_TYPE_METADATA
+       CACHE_TYPE_METADATA,
+       CACHE_TYPE_XMP_METADATA
 } CacheType;
 
 typedef struct _CacheData CacheData;
@@ -42,29 +52,26 @@ struct _CacheData
        gint width;
        gint height;
        time_t date;
-       glong checksum;
        guchar md5sum[16];
        ImageSimilarityData *sim;
 
-       gint dimensions;
-       gint have_date;
-       gint have_checksum;
-       gint have_md5sum;
-       gint similarity;
+       gboolean dimensions;
+       gboolean have_date;
+       gboolean have_md5sum;
+       gboolean similarity;
 };
 
-gint cache_time_valid(const gchar *cache, const gchar *path);
+gboolean cache_time_valid(const gchar *cache, const gchar *path);
 
 
 CacheData *cache_sim_data_new(void);
 void cache_sim_data_free(CacheData *cd);
 
-gint cache_sim_data_save(CacheData *cd);
+gboolean cache_sim_data_save(CacheData *cd);
 CacheData *cache_sim_data_load(const gchar *path);
 
 void cache_sim_data_set_dimensions(CacheData *cd, gint w, gint h);
 void cache_sim_data_set_date(CacheData *cd, time_t date);
-void cache_sim_data_set_checksum(CacheData *cd, glong checksum);
 void cache_sim_data_set_md5sum(CacheData *cd, guchar digest[16]);
 void cache_sim_data_set_similarity(CacheData *cd, ImageSimilarityData *sd);
 gint cache_sim_data_filled(ImageSimilarityData *sd);