csync_vio_file_stat.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _CSYNC_VIO_FILE_STAT_H
00024 #define _CSYNC_VIO_FILE_STAT_H
00025
00026 #include <sys/types.h>
00027 #include <sys/stat.h>
00028 #include <unistd.h>
00029
00030 typedef struct csync_vio_file_stat_s csync_vio_file_stat_t;
00031
00032 enum csync_vio_file_flags_e {
00033 CSYNC_VIO_FILE_FLAGS_NONE = 0,
00034 CSYNC_VIO_FILE_FLAGS_SYMLINK = 1 << 0,
00035 CSYNC_VIO_FILE_FLAGS_LOCAL = 1 << 1
00036 };
00037
00038 enum csync_vio_file_type_e {
00039 CSYNC_VIO_FILE_TYPE_UNKNOWN,
00040 CSYNC_VIO_FILE_TYPE_REGULAR,
00041 CSYNC_VIO_FILE_TYPE_DIRECTORY,
00042 CSYNC_VIO_FILE_TYPE_FIFO,
00043 CSYNC_VIO_FILE_TYPE_SOCKET,
00044 CSYNC_VIO_FILE_TYPE_CHARACTER_DEVICE,
00045 CSYNC_VIO_FILE_TYPE_BLOCK_DEVICE,
00046 CSYNC_VIO_FILE_TYPE_SYMBOLIC_LINK
00047 };
00048
00049 enum csync_vio_file_stat_fields_e {
00050 CSYNC_VIO_FILE_STAT_FIELDS_NONE = 0,
00051 CSYNC_VIO_FILE_STAT_FIELDS_TYPE = 1 << 0,
00052 CSYNC_VIO_FILE_STAT_FIELDS_PERMISSIONS = 1 << 1,
00053 CSYNC_VIO_FILE_STAT_FIELDS_FLAGS = 1 << 2,
00054 CSYNC_VIO_FILE_STAT_FIELDS_DEVICE = 1 << 3,
00055 CSYNC_VIO_FILE_STAT_FIELDS_INODE = 1 << 4,
00056 CSYNC_VIO_FILE_STAT_FIELDS_LINK_COUNT = 1 << 5,
00057 CSYNC_VIO_FILE_STAT_FIELDS_SIZE = 1 << 6,
00058 CSYNC_VIO_FILE_STAT_FIELDS_BLOCK_COUNT = 1 << 7,
00059 CSYNC_VIO_FILE_STAT_FIELDS_BLOCK_SIZE = 1 << 8,
00060 CSYNC_VIO_FILE_STAT_FIELDS_ATIME = 1 << 9,
00061 CSYNC_VIO_FILE_STAT_FIELDS_MTIME = 1 << 10,
00062 CSYNC_VIO_FILE_STAT_FIELDS_CTIME = 1 << 11,
00063 CSYNC_VIO_FILE_STAT_FIELDS_SYMLINK_NAME = 1 << 12,
00064 CSYNC_VIO_FILE_STAT_FIELDS_CHECKSUM = 1 << 13,
00065 CSYNC_VIO_FILE_STAT_FIELDS_ACL = 1 << 14,
00066 CSYNC_VIO_FILE_STAT_FIELDS_UID = 1 << 15,
00067 CSYNC_VIO_FILE_STAT_FIELDS_GID = 1 << 16,
00068 };
00069
00070
00071 struct csync_vio_file_stat_s {
00072 union {
00073 char *symlink_name;
00074 char *checksum;
00075 } u;
00076
00077 void *acl;
00078 char *name;
00079
00080 uid_t uid;
00081 gid_t gid;
00082
00083 time_t atime;
00084 time_t mtime;
00085 time_t ctime;
00086
00087 off_t size;
00088 off_t blksize;
00089 unsigned long blkcount;
00090
00091 mode_t mode;
00092
00093 dev_t device;
00094 ino_t inode;
00095 nlink_t nlink;
00096
00097 enum csync_vio_file_stat_fields_e fields;
00098 enum csync_vio_file_type_e type;
00099
00100 enum csync_vio_file_flags_e flags;
00101
00102 void *reserved1;
00103 void *reserved2;
00104 void *reserved3;
00105 };
00106
00107 csync_vio_file_stat_t *csync_vio_file_stat_new(void);
00108
00109 void csync_vio_file_stat_destroy(csync_vio_file_stat_t *fstat);
00110
00111 #endif