Effectively drop empty newlines at end of files (missing from rev 535)
[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         COLLECTION_LOAD_GEOMETRY= 1 << 2,
21 } CollectionLoadFlags;
22
23 gint collection_load(CollectionData *cd, const gchar *path, CollectionLoadFlags flags);
24
25 gint collection_load_begin(CollectionData *cd, const gchar *path, CollectionLoadFlags flags);
26 void collection_load_stop(CollectionData *cd);
27
28 void collection_load_thumb_idle(CollectionData *cd);
29
30 gint collection_save(CollectionData *cd, const gchar *path);
31
32 gint collection_load_only_geometry(CollectionData *cd, const gchar *path);
33
34
35 /* these are used to update collections contained in user's collection
36  * folder when moving or renaming files.
37  * also handles:
38  *   deletes file when newpath == NULL
39  *   adds file when oldpath == NULL
40  */
41 void collect_manager_moved(FileData *fd);
42
43 /* add or removing from a specific collection */
44 void collect_manager_add(FileData *fd, const gchar *collection);
45 void collect_manager_remove(FileData *fd, const gchar *collection);
46
47 /* commit pending operations to disk */
48 void collect_manager_flush(void);
49
50
51
52 #endif