annotate src/cache-loader.h @ 959:9791230f83d3

fixed crash in geeqie --blank
author nadvornik
date Mon, 11 Aug 2008 18:53:19 +0000
parents 48c8e49b571c
children 1646720364cf
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 /*
196
f6e307c7bad6 rename GQview -> Geeqie over the code
nadvornik
parents: 138
diff changeset
2 * Geeqie
37
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
3 * (C) 2005 John Ellis
475
48c8e49b571c updated copyright in source files
nadvornik
parents: 446
diff changeset
4 * Copyright (C) 2008 The Geeqie Team
37
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
5 *
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
6 * Author: John Ellis
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
7 *
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
8 * 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
9 * 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
10 * 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
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
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
14 #ifndef CACHE_LOADER_H
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
15 #define CACHE_LOADER_H
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
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
18 #include "cache.h"
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
19 #include "image-load.h"
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
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
22 typedef struct _CacheLoader CacheLoader;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
23
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
24 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
25
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
26
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
27 typedef enum {
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
28 CACHE_LOADER_NONE = 0,
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
29 CACHE_LOADER_DIMENSIONS = 1 << 0,
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
30 CACHE_LOADER_DATE = 1 << 1,
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
31 CACHE_LOADER_MD5SUM = 1 << 2,
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
32 CACHE_LOADER_SIMILARITY = 1 << 3
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
33 } CacheDataType;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
34
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
35 struct _CacheLoader {
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 37
diff changeset
36 FileData *fd;
37
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
37 CacheData *cd;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
38
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
39 CacheDataType todo_mask;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
40 CacheDataType done_mask;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
41
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
42 CacheLoaderDoneFunc done_func;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
43 gpointer done_data;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
44
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
45 gint error;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
46
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
47 ImageLoader *il;
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
48 gint idle_id;
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
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
51
138
71e1ebee420e replaced gchar* path with FileData *fd
nadvornik
parents: 37
diff changeset
52 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
53 CacheLoaderDoneFunc done_func, gpointer done_data);
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
54
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
55 void cache_loader_free(CacheLoader *cl);
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
67ba4381497e Wed Apr 13 18:16:14 2005 John Ellis <johne@verizon.net>
gqview
parents:
diff changeset
58 #endif