annotate src/cache.h @ 1369:dc1768a8af01

Align exif labels vertically (visually better since name is now smaller than value).
author zas_
date Sun, 01 Mar 2009 23:38:36 +0000
parents 8b89e3ff286b
children 3a9fb1b52559
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
1 /*
196
f6e307c7bad6 rename GQview -> Geeqie over the code
nadvornik
parents: 37
diff changeset
2 * Geeqie
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
3 * (C) 2004 John Ellis
1284
8b89e3ff286b Add year 2009 to copyright info everywhere.
zas_
parents: 1224
diff changeset
4 * Copyright (C) 2008 - 2009 The Geeqie Team
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
5 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
6 * Author: John Ellis
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
7 *
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
8 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
9 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
10 * This software comes with no warranty of any kind, use at your own risk!
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
11 */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
12
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
13
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
14 #ifndef CACHE_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
15 #define CACHE_H
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
16
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
17
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
18 #include "similar.h"
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
19
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
20
1145
3a7af6a8cd5f Use functions to return directories instead of constants.
zas_
parents: 1055
diff changeset
21 #define GQ_CACHE_THUMB "thumbnails"
3a7af6a8cd5f Use functions to return directories instead of constants.
zas_
parents: 1055
diff changeset
22 #define GQ_CACHE_METADATA "metadata"
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
23
283
e213fb025621 GQVIEW_* -> GQ_*
zas_
parents: 196
diff changeset
24 #define GQ_CACHE_LOCAL_THUMB ".thumbnails"
e213fb025621 GQVIEW_* -> GQ_*
zas_
parents: 196
diff changeset
25 #define GQ_CACHE_LOCAL_METADATA ".metadata"
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
26
283
e213fb025621 GQVIEW_* -> GQ_*
zas_
parents: 196
diff changeset
27 #define GQ_CACHE_EXT_THUMB ".png"
e213fb025621 GQVIEW_* -> GQ_*
zas_
parents: 196
diff changeset
28 #define GQ_CACHE_EXT_SIM ".sim"
e213fb025621 GQVIEW_* -> GQ_*
zas_
parents: 196
diff changeset
29 #define GQ_CACHE_EXT_METADATA ".meta"
1224
ebfd305d902e improved sidecar writting
nadvornik
parents: 1148
diff changeset
30 #define GQ_CACHE_EXT_XMP_METADATA ".gq.xmp"
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
31
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
32
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
33 typedef enum {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
34 CACHE_TYPE_THUMB,
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
35 CACHE_TYPE_SIM,
1224
ebfd305d902e improved sidecar writting
nadvornik
parents: 1148
diff changeset
36 CACHE_TYPE_METADATA,
ebfd305d902e improved sidecar writting
nadvornik
parents: 1148
diff changeset
37 CACHE_TYPE_XMP_METADATA
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
38 } CacheType;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
39
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
40 typedef struct _CacheData CacheData;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
41 struct _CacheData
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
42 {
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
43 gchar *path;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
44 gint width;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
45 gint height;
37
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
46 time_t date;
1000
4fe8f9656107 For the sake of consistency, use glib basic types everywhere.
zas_
parents: 708
diff changeset
47 glong checksum;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
48 guchar md5sum[16];
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
49 ImageSimilarityData *sim;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
50
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
51 gint dimensions;
37
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
52 gint have_date;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
53 gint have_checksum;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
54 gint have_md5sum;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
55 gint similarity;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
56 };
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
57
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
58 gint cache_time_valid(const gchar *cache, const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
59
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
60
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
61 CacheData *cache_sim_data_new(void);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
62 void cache_sim_data_free(CacheData *cd);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
63
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
64 gint cache_sim_data_save(CacheData *cd);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
65 CacheData *cache_sim_data_load(const gchar *path);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
66
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
67 void cache_sim_data_set_dimensions(CacheData *cd, gint w, gint h);
37
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents: 9
diff changeset
68 void cache_sim_data_set_date(CacheData *cd, time_t date);
1000
4fe8f9656107 For the sake of consistency, use glib basic types everywhere.
zas_
parents: 708
diff changeset
69 void cache_sim_data_set_checksum(CacheData *cd, glong checksum);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
70 void cache_sim_data_set_md5sum(CacheData *cd, guchar digest[16]);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
71 void cache_sim_data_set_similarity(CacheData *cd, ImageSimilarityData *sd);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
72 gint cache_sim_data_filled(ImageSimilarityData *sd);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
73
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
74 gchar *cache_get_location(CacheType type, const gchar *source, gint include_name, mode_t *mode);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
75 gchar *cache_find_location(CacheType type, const gchar *source);
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
76
1145
3a7af6a8cd5f Use functions to return directories instead of constants.
zas_
parents: 1055
diff changeset
77 const gchar *get_thumbnails_cache_dir(void);
3a7af6a8cd5f Use functions to return directories instead of constants.
zas_
parents: 1055
diff changeset
78 const gchar *get_metadata_cache_dir(void);
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
79
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents:
diff changeset
80 #endif
1055
1646720364cf Adding a vim modeline to all files - patch by Klaus Ethgen
nadvornik
parents: 1000
diff changeset
81 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */