doc
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
src
csync_misc.h
Go to the documentation of this file.
1
/*
2
* libcsync -- a library to sync a directory with another
3
*
4
* Copyright (c) 2012 by Andreas Schneider <asn@cryptomilk.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_MISC_H
22
#define _CSYNC_MISC_H
23
24
#include "config.h"
25
#include "
csync.h
"
26
27
#ifdef HAVE_FNMATCH
28
#include <fnmatch.h>
29
#else
30
/* Steal this define to make csync_exclude compile. Note that if fnmatch
31
* is not defined it's probably Win32 which uses a different implementation
32
* than fmmatch anyway, which does not care for flags.
33
**/
34
#define FNM_PATHNAME (1 << 0)
/* No wildcard can ever match `/'. */
35
#endif
36
37
char
*
csync_get_user_home_dir
(
void
);
38
char
*
csync_get_local_username
(
void
);
39
40
int
csync_fnmatch
(__const
char
*__pattern, __const
char
*__name,
int
__flags);
41
42
/**
43
* @brief csync_errno_to_csync_error - errno to csync error code
44
*
45
* This function tries to convert the value of the current set errno
46
* to a csync error code.
47
*
48
* @return the corresponding csync error code.
49
*/
50
CSYNC_ERROR_CODE
csync_errno_to_csync_error
(
CSYNC_ERROR_CODE
default_err);
51
52
struct
csync_hbf_info_s
{
53
int
start_id
;
54
int
transfer_id
;
55
};
56
typedef
struct
csync_hbf_info_s
csync_hbf_info_t
;
57
58
typedef
struct
{
59
int64_t
file_count
;
60
int64_t
current_file_no
;
61
int64_t
byte_sum
;
62
int64_t
byte_current
;
63
}
csync_overall_progress_t
;
64
65
#endif
/* _CSYNC_MISC_H */
Generated by
1.8.1