Mercurial > geeqie
annotate src/cache.h @ 1805:fccac8fde6c0
Little macro correction
| author | mow |
|---|---|
| date | Sat, 27 Feb 2010 20:35:09 +0000 |
| parents | 956aab097ea7 |
| children |
| rev | line source |
|---|---|
| 9 | 1 /* |
| 196 | 2 * Geeqie |
| 9 | 3 * (C) 2004 John Ellis |
| 1802 | 4 * Copyright (C) 2008 - 2010 The Geeqie Team |
| 9 | 5 * |
| 6 * Author: John Ellis | |
| 7 * | |
| 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! | |
| 11 */ | |
| 12 | |
| 13 | |
| 14 #ifndef CACHE_H | |
| 15 #define CACHE_H | |
| 16 | |
| 17 | |
| 18 #include "similar.h" | |
| 19 | |
| 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 | 23 |
| 283 | 24 #define GQ_CACHE_LOCAL_THUMB ".thumbnails" |
| 25 #define GQ_CACHE_LOCAL_METADATA ".metadata" | |
| 9 | 26 |
| 283 | 27 #define GQ_CACHE_EXT_THUMB ".png" |
| 28 #define GQ_CACHE_EXT_SIM ".sim" | |
| 29 #define GQ_CACHE_EXT_METADATA ".meta" | |
| 1224 | 30 #define GQ_CACHE_EXT_XMP_METADATA ".gq.xmp" |
| 9 | 31 |
| 32 | |
| 33 typedef enum { | |
| 34 CACHE_TYPE_THUMB, | |
| 35 CACHE_TYPE_SIM, | |
| 1224 | 36 CACHE_TYPE_METADATA, |
| 37 CACHE_TYPE_XMP_METADATA | |
| 9 | 38 } CacheType; |
| 39 | |
| 40 typedef struct _CacheData CacheData; | |
| 41 struct _CacheData | |
| 42 { | |
| 43 gchar *path; | |
| 44 gint width; | |
| 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 | 48 guchar md5sum[16]; |
| 49 ImageSimilarityData *sim; | |
| 50 | |
|
1420
3a9fb1b52559
Use gboolean where applicable, for the sake of consistency.
zas_
parents:
1284
diff
changeset
|
51 gboolean dimensions; |
|
3a9fb1b52559
Use gboolean where applicable, for the sake of consistency.
zas_
parents:
1284
diff
changeset
|
52 gboolean have_date; |
|
3a9fb1b52559
Use gboolean where applicable, for the sake of consistency.
zas_
parents:
1284
diff
changeset
|
53 gboolean have_checksum; |
|
3a9fb1b52559
Use gboolean where applicable, for the sake of consistency.
zas_
parents:
1284
diff
changeset
|
54 gboolean have_md5sum; |
|
3a9fb1b52559
Use gboolean where applicable, for the sake of consistency.
zas_
parents:
1284
diff
changeset
|
55 gboolean similarity; |
| 9 | 56 }; |
| 57 | |
|
1420
3a9fb1b52559
Use gboolean where applicable, for the sake of consistency.
zas_
parents:
1284
diff
changeset
|
58 gboolean cache_time_valid(const gchar *cache, const gchar *path); |
| 9 | 59 |
| 60 | |
| 61 CacheData *cache_sim_data_new(void); | |
| 62 void cache_sim_data_free(CacheData *cd); | |
| 63 | |
|
1420
3a9fb1b52559
Use gboolean where applicable, for the sake of consistency.
zas_
parents:
1284
diff
changeset
|
64 gboolean cache_sim_data_save(CacheData *cd); |
| 9 | 65 CacheData *cache_sim_data_load(const gchar *path); |
| 66 | |
| 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 | 70 void cache_sim_data_set_md5sum(CacheData *cd, guchar digest[16]); |
| 71 void cache_sim_data_set_similarity(CacheData *cd, ImageSimilarityData *sd); | |
| 72 gint cache_sim_data_filled(ImageSimilarityData *sd); | |
| 73 | |
| 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); | |
| 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 | 79 |
| 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: */ |
