comparison src/cache.h @ 1145:3a7af6a8cd5f

Use functions to return directories instead of constants. Following functions were added: get_collections_dir() get_metadata_cache_dir() get_rc_dir() get_thumbnails_cache_dir() get_trash_dir() They return the full directory path.
author zas_
date Sat, 15 Nov 2008 17:30:45 +0000
parents 1646720364cf
children 95860439070b
comparison
equal deleted inserted replaced
1144:5fe3b8b3a612 1145:3a7af6a8cd5f
16 16
17 17
18 #include "similar.h" 18 #include "similar.h"
19 19
20 20
21 #define GQ_CACHE_RC_THUMB GQ_RC_DIR G_DIR_SEPARATOR_S "thumbnails" 21 #define GQ_CACHE_THUMB "thumbnails"
22 #define GQ_CACHE_RC_METADATA GQ_RC_DIR G_DIR_SEPARATOR_S "metadata" 22 #define GQ_CACHE_METADATA "metadata"
23 23
24 #define GQ_CACHE_LOCAL_THUMB ".thumbnails" 24 #define GQ_CACHE_LOCAL_THUMB ".thumbnails"
25 #define GQ_CACHE_LOCAL_METADATA ".metadata" 25 #define GQ_CACHE_LOCAL_METADATA ".metadata"
26 26
27 #define GQ_CACHE_EXT_THUMB ".png" 27 #define GQ_CACHE_EXT_THUMB ".png"
72 72
73 gint cache_ensure_dir_exists(gchar *path, mode_t mode); 73 gint cache_ensure_dir_exists(gchar *path, mode_t mode);
74 gchar *cache_get_location(CacheType type, const gchar *source, gint include_name, mode_t *mode); 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); 75 gchar *cache_find_location(CacheType type, const gchar *source);
76 76
77 const gchar *get_thumbnails_cache_dir(void);
78 const gchar *get_metadata_cache_dir(void);
77 79
78 #endif 80 #endif
79 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ 81 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */