Fix untranslated text
[geeqie.git] / src / cache-loader.h
1 /*
2  * Copyright (C) 2004 John Ellis
3  * Copyright (C) 2008 - 2016 The Geeqie Team
4  *
5  * Author: John Ellis
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21
22 #ifndef CACHE_LOADER_H
23 #define CACHE_LOADER_H
24
25 #include <glib.h>
26
27 struct CacheData;
28 struct FileData;
29 struct ImageLoader;
30
31 enum CacheDataType {
32         CACHE_LOADER_NONE       = 0,
33         CACHE_LOADER_DIMENSIONS = 1 << 0,
34         CACHE_LOADER_DATE       = 1 << 1,
35         CACHE_LOADER_MD5SUM     = 1 << 2,
36         CACHE_LOADER_SIMILARITY = 1 << 3
37 };
38
39 struct CacheLoader {
40         FileData *fd;
41         CacheData *cd;
42
43         CacheDataType todo_mask;
44         CacheDataType done_mask;
45
46         using DoneFunc = void (*)(CacheLoader *, gint, gpointer);
47         DoneFunc done_func;
48         gpointer done_data;
49
50         gboolean error;
51
52         ImageLoader *il;
53         guint idle_id; /**< event source id */
54 };
55
56
57 CacheLoader *cache_loader_new(FileData *fd, CacheDataType load_mask,
58                               CacheLoader::DoneFunc done_func, gpointer done_data);
59
60 void cache_loader_free(CacheLoader *cl);
61
62
63 #endif
64 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */