annotate src/cache-loader.h @ 138:71e1ebee420e

replaced gchar* path with FileData *fd
author nadvornik
date Tue, 11 Sep 2007 20:06:29 +0000
parents 67ba4381497e
children f6e307c7bad6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
37
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
1 /*
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
2 * GQview
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
3 * (C) 2005 John Ellis
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
4 *
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
5 * Author: John Ellis
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
6 *
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
7 * This software is released under the GNU General Public License (GNU GPL).
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
8 * Please read the included file COPYING for more information.
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
9 * This software comes with no warranty of any kind, use at your own risk!
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
10 */
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
11
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
12
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
13 #ifndef CACHE_LOADER_H
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
14 #define CACHE_LOADER_H
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
15
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
16
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
17 #include "cache.h"
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
18 #include "image-load.h"
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
19
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
20
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
21 typedef struct _CacheLoader CacheLoader;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
22
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
23 typedef void (* CacheLoaderDoneFunc)(CacheLoader *cl, gint error, gpointer data);
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
24
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
25
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
26 typedef enum {
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
27 CACHE_LOADER_NONE = 0,
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
28 CACHE_LOADER_DIMENSIONS = 1 << 0,
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
29 CACHE_LOADER_DATE = 1 << 1,
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
30 CACHE_LOADER_MD5SUM = 1 << 2,
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
31 CACHE_LOADER_SIMILARITY = 1 << 3
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
32 } CacheDataType;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
33
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
34 struct _CacheLoader {
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 37
diff changeset
35 FileData *fd;
37
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
36 CacheData *cd;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
37
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
38 CacheDataType todo_mask;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
39 CacheDataType done_mask;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
40
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
41 CacheLoaderDoneFunc done_func;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
42 gpointer done_data;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
43
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
44 gint error;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
45
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
46 ImageLoader *il;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
47 gint idle_id;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
48 };
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
49
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
50
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 37
diff changeset
51 CacheLoader *cache_loader_new(FileData *fd, CacheDataType load_mask,
37
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
52 CacheLoaderDoneFunc done_func, gpointer done_data);
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
53
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
54 void cache_loader_free(CacheLoader *cl);
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
55
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
56
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
57 #endif
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
58
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
59