Use flags for collection_load*().
[geeqie.git] / src / collect-io.h
1 /*
2  * Geeqie
3  * (C) 2004 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 COLLECT_IO_H
14 #define COLLECT_IO_H
15
16 typedef enum {
17         COLLECTION_LOAD_NONE    = 0,
18         COLLECTION_LOAD_APPEND  = 1 << 0,
19         COLLECTION_LOAD_FLUSH   = 1 << 1,
20 } CollectionLoadFlags;
21
22 gint collection_load(CollectionData *cd, const gchar *path, CollectionLoadFlags flags);
23
24 gint collection_load_begin(CollectionData *cd, const gchar *path, CollectionLoadFlags flags);
25 void collection_load_stop(CollectionData *cd);
26
27 void collection_load_thumb_idle(CollectionData *cd);
28
29 gint collection_save(CollectionData *cd, const gchar *path);
30
31 gint collection_load_only_geometry(CollectionData *cd, const gchar *path);
32
33
34 /* these are used to update collections contained in user's collection
35  * folder when moving or renaming files.
36  * also handles:
37  *   deletes file when newpath == NULL
38  *   adds file when oldpath == NULL
39  */
40 void collect_manager_moved(FileData *fd);
41
42 /* add or removing from a specific collection */
43 void collect_manager_add(FileData *fd, const gchar *collection);
44 void collect_manager_remove(FileData *fd, const gchar *collection);
45
46 /* commit pending operations to disk */
47 void collect_manager_flush(void);
48
49
50
51 #endif
52