37
|
1 /*
|
|
2 * GQview
|
|
3 * (C) 2005 John Ellis
|
|
4 *
|
|
5 * Author: John Ellis
|
|
6 *
|
|
7 * This software is released under the GNU General Public License (GNU GPL).
|
|
8 * Please read the included file COPYING for more information.
|
|
9 * This software comes with no warranty of any kind, use at your own risk!
|
|
10 */
|
|
11
|
|
12
|
|
13 #ifndef CACHE_LOADER_H
|
|
14 #define CACHE_LOADER_H
|
|
15
|
|
16
|
|
17 #include "cache.h"
|
|
18 #include "image-load.h"
|
|
19
|
|
20
|
|
21 typedef struct _CacheLoader CacheLoader;
|
|
22
|
|
23 typedef void (* CacheLoaderDoneFunc)(CacheLoader *cl, gint error, gpointer data);
|
|
24
|
|
25
|
|
26 typedef enum {
|
|
27 CACHE_LOADER_NONE = 0,
|
|
28 CACHE_LOADER_DIMENSIONS = 1 << 0,
|
|
29 CACHE_LOADER_DATE = 1 << 1,
|
|
30 CACHE_LOADER_MD5SUM = 1 << 2,
|
|
31 CACHE_LOADER_SIMILARITY = 1 << 3
|
|
32 } CacheDataType;
|
|
33
|
|
34 struct _CacheLoader {
|
138
|
35 FileData *fd;
|
37
|
36 CacheData *cd;
|
|
37
|
|
38 CacheDataType todo_mask;
|
|
39 CacheDataType done_mask;
|
|
40
|
|
41 CacheLoaderDoneFunc done_func;
|
|
42 gpointer done_data;
|
|
43
|
|
44 gint error;
|
|
45
|
|
46 ImageLoader *il;
|
|
47 gint idle_id;
|
|
48 };
|
|
49
|
|
50
|
138
|
51 CacheLoader *cache_loader_new(FileData *fd, CacheDataType load_mask,
|
37
|
52 CacheLoaderDoneFunc done_func, gpointer done_data);
|
|
53
|
|
54 void cache_loader_free(CacheLoader *cl);
|
|
55
|
|
56
|
|
57 #endif
|
|
58
|
|
59
|