doc
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
src
csync_exclude.h
Go to the documentation of this file.
1
/*
2
* libcsync -- a library to sync a directory with another
3
*
4
* Copyright (c) 2008 by Andreas Schneider <mail@cynapses.org>
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software Foundation,
18
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
*/
20
21
#ifndef _CSYNC_EXCLUDE_H
22
#define _CSYNC_EXCLUDE_H
23
24
enum
csync_exclude_type_e
{
25
CSYNC_NOT_EXCLUDED
= 0,
26
CSYNC_FILE_SILENTLY_EXCLUDED
,
27
CSYNC_FILE_EXCLUDE_AND_REMOVE
,
28
CSYNC_FILE_EXCLUDE_LIST
,
29
CSYNC_FILE_EXCLUDE_INVALID_CHAR
30
};
31
typedef
enum
csync_exclude_type_e
CSYNC_EXCLUDE_TYPE
;
32
/**
33
* @brief Load exclude list
34
*
35
* @param ctx The context of the synchronizer.
36
* @param fname The filename to load.
37
*
38
* @return 0 on success, -1 if an error occured with errno set.
39
*/
40
int
csync_exclude_load
(
CSYNC
*ctx,
const
char
*fname);
41
42
/**
43
* @brief Clear the exclude list in memory.
44
*
45
* @param ctx The synchronizer context.
46
*/
47
void
csync_exclude_clear
(
CSYNC
*ctx);
48
49
/**
50
* @brief Destroy the exclude list in memory.
51
*
52
* @param ctx The synchronizer context.
53
*/
54
void
csync_exclude_destroy
(
CSYNC
*ctx);
55
56
/**
57
* @brief Check if the given path should be excluded.
58
*
59
* This excludes also paths which can't be used without unix extensions.
60
*
61
* @param ctx The synchronizer context.
62
* @param path The patch to check.
63
*
64
* @return 2 if excluded and needs cleanup, 1 if excluded, 0 if not.
65
*/
66
CSYNC_EXCLUDE_TYPE
csync_excluded
(
CSYNC
*ctx,
const
char
*
path
,
int
filetype);
67
68
#endif
/* _CSYNC_EXCLUDE_H */
69
70
/* vim: set ft=c.doxygen ts=8 sw=2 et cindent: */
Generated by
1.8.2