381e0a8cffc81eec4f4e1d5f2c856e87808dc649
[udpgate.git] / src / bundle-util.h
1 /* $Id$
2  * Include file for UDP Gateway single-file bundle utility functions
3  * Copyright (C) 2004 Jan Kratochvil <project-udpgate@jankratochvil.net>
4  * 
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; exactly version 2 of June 1991 is required
8  * 
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  * 
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19
20 #ifndef _UDPGATE_BUNDLE_UTIL_H
21 #define _UDPGATE_BUNDLE_UTIL_H 1
22
23
24 #include <glib/gtypes.h>
25
26
27 G_BEGIN_DECLS
28
29 enum bundle_util_flags {
30         BUNDLE_UTIL_BACKUP_BIT,
31 #define BUNDLE_UTIL_BACKUP_MASK    (1<<BUNDLE_UTIL_BACKUP_BIT)
32         BUNDLE_UTIL_MKDIRS_BIT,
33 #define BUNDLE_UTIL_MKDIRS_MASK    (1<<BUNDLE_UTIL_MKDIRS_BIT)
34         BUNDLE_UTIL_TEMPORARY_BIT,
35 #define BUNDLE_UTIL_TEMPORARY_MASK (1<<BUNDLE_UTIL_TEMPORARY_BIT)
36         };
37
38 gboolean bundle_util_file_remove(const gchar *pathname,const gchar *basename);
39 gboolean bundle_util_file_write(const gchar *pathname,const gchar *basename,mode_t pathname_mode,
40                 enum bundle_util_flags flags);
41
42 G_END_DECLS
43
44
45 #endif /* _UDPGATE_BUNDLE_UTIL_H */