doc
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
src
vio
csync_vio_file_stat.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
* vim: ft=c.doxygen ts=2 sw=2 et cindent
21
*/
22
23
#ifndef _CSYNC_VIO_FILE_STAT_H
24
#define _CSYNC_VIO_FILE_STAT_H
25
26
/*
27
* cannot include csync_private here because
28
* that would cause circular inclusion
29
*/
30
#include "
c_private.h
"
31
32
#include <sys/types.h>
33
#include <sys/stat.h>
34
#include <unistd.h>
35
#include <stdint.h>
36
37
typedef
struct
csync_vio_file_stat_s
csync_vio_file_stat_t
;
38
39
enum
csync_vio_file_flags_e
{
40
CSYNC_VIO_FILE_FLAGS_NONE
= 0,
41
CSYNC_VIO_FILE_FLAGS_SYMLINK
= 1 << 0,
42
CSYNC_VIO_FILE_FLAGS_LOCAL
= 1 << 1
43
};
44
45
enum
csync_vio_file_type_e
{
46
CSYNC_VIO_FILE_TYPE_UNKNOWN
,
47
CSYNC_VIO_FILE_TYPE_REGULAR
,
48
CSYNC_VIO_FILE_TYPE_DIRECTORY
,
49
CSYNC_VIO_FILE_TYPE_FIFO
,
50
CSYNC_VIO_FILE_TYPE_SOCKET
,
51
CSYNC_VIO_FILE_TYPE_CHARACTER_DEVICE
,
52
CSYNC_VIO_FILE_TYPE_BLOCK_DEVICE
,
53
CSYNC_VIO_FILE_TYPE_SYMBOLIC_LINK
54
};
55
56
enum
csync_vio_file_stat_fields_e
{
57
CSYNC_VIO_FILE_STAT_FIELDS_NONE
= 0,
58
CSYNC_VIO_FILE_STAT_FIELDS_TYPE
= 1 << 0,
59
CSYNC_VIO_FILE_STAT_FIELDS_PERMISSIONS
= 1 << 1,
60
CSYNC_VIO_FILE_STAT_FIELDS_FLAGS
= 1 << 2,
61
CSYNC_VIO_FILE_STAT_FIELDS_DEVICE
= 1 << 3,
62
CSYNC_VIO_FILE_STAT_FIELDS_INODE
= 1 << 4,
63
CSYNC_VIO_FILE_STAT_FIELDS_LINK_COUNT
= 1 << 5,
64
CSYNC_VIO_FILE_STAT_FIELDS_SIZE
= 1 << 6,
65
CSYNC_VIO_FILE_STAT_FIELDS_BLOCK_COUNT
= 1 << 7,
66
CSYNC_VIO_FILE_STAT_FIELDS_BLOCK_SIZE
= 1 << 8,
67
CSYNC_VIO_FILE_STAT_FIELDS_ATIME
= 1 << 9,
68
CSYNC_VIO_FILE_STAT_FIELDS_MTIME
= 1 << 10,
69
CSYNC_VIO_FILE_STAT_FIELDS_CTIME
= 1 << 11,
70
CSYNC_VIO_FILE_STAT_FIELDS_SYMLINK_NAME
= 1 << 12,
71
CSYNC_VIO_FILE_STAT_FIELDS_CHECKSUM
= 1 << 13,
72
CSYNC_VIO_FILE_STAT_FIELDS_ACL
= 1 << 14,
73
CSYNC_VIO_FILE_STAT_FIELDS_UID
= 1 << 15,
74
CSYNC_VIO_FILE_STAT_FIELDS_GID
= 1 << 16,
75
};
76
77
78
struct
csync_vio_file_stat_s
{
79
union
{
80
char
*
symlink_name
;
81
char
*
checksum
;
82
}
u
;
83
84
void
*
acl
;
85
char
*
name
;
86
87
uid_t
uid
;
88
gid_t
gid
;
89
90
time_t
atime
;
91
time_t
mtime
;
92
time_t
ctime
;
93
94
off_t
size
;
95
off_t
blksize
;
96
unsigned
long
blkcount
;
97
98
mode_t
mode
;
99
100
dev_t
device
;
101
uint64_t
inode
;
102
nlink_t
nlink
;
103
104
enum
csync_vio_file_stat_fields_e
fields
;
105
enum
csync_vio_file_type_e
type
;
106
107
enum
csync_vio_file_flags_e
flags
;
108
109
void
*
reserved1
;
110
void
*
reserved2
;
111
void
*
reserved3
;
112
};
113
114
csync_vio_file_stat_t
*
csync_vio_file_stat_new
(
void
);
115
116
void
csync_vio_file_stat_destroy
(
csync_vio_file_stat_t
*fstat);
117
118
#endif
/* _CSYNC_VIO_METHOD_H */
Generated by
1.8.1