doc
csync_vio.h
Go to the documentation of this file.
1 /*
2  * libcsync -- a library to sync a directory with another
3  *
4  * Copyright (c) 2008-2013 by Andreas Schneider <asn@cryptomilk.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library 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 GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef _CSYNC_VIO_H
22 #define _CSYNC_VIO_H
23 
24 #include <sys/types.h>
25 #include <sys/stat.h>
26 #include <fcntl.h>
27 #include "c_private.h"
28 #include "vio/csync_vio_handle.h"
30 
31 int csync_vio_init(CSYNC *ctx, const char *module, const char *args);
32 void csync_vio_shutdown(CSYNC *ctx);
33 csync_vio_handle_t *csync_vio_open(CSYNC *ctx, const char *uri, int flags, mode_t mode);
34 csync_vio_handle_t *csync_vio_creat(CSYNC *ctx, const char *uri, mode_t mode);
35 int csync_vio_close(CSYNC *ctx, csync_vio_handle_t *handle);
36 ssize_t csync_vio_read(CSYNC *ctx, csync_vio_handle_t *fhandle, void *buf, size_t count);
37 ssize_t csync_vio_write(CSYNC *ctx, csync_vio_handle_t *fhandle, const void *buf, size_t count);
38 off_t csync_vio_lseek(CSYNC *ctx, csync_vio_handle_t *fhandle, off_t offset, int whence);
39 
42 
43 csync_vio_handle_t *csync_vio_opendir(CSYNC *ctx, const char *name);
44 int csync_vio_closedir(CSYNC *ctx, csync_vio_handle_t *dhandle);
46 
47 int csync_vio_mkdir(CSYNC *ctx, const char *uri, mode_t mode);
48 int csync_vio_mkdirs(CSYNC *ctx, const char *uri, mode_t mode);
49 int csync_vio_rmdir(CSYNC *ctx, const char *uri);
50 
51 int csync_vio_stat(CSYNC *ctx, const char *uri, csync_vio_file_stat_t *buf);
52 int csync_vio_rename(CSYNC *ctx, const char *olduri, const char *newuri);
53 int csync_vio_unlink(CSYNC *ctx, const char *uri);
54 
55 int csync_vio_chmod(CSYNC *ctx, const char *uri, mode_t mode);
56 int csync_vio_chown(CSYNC *ctx, const char *uri, uid_t owner, gid_t group);
57 
58 int csync_vio_utimes(CSYNC *ctx, const char *uri, const struct timeval *times);
59 
60 int csync_vio_set_property(CSYNC *ctx, const char *key, void *data);
61 
63 
64 int csync_vio_commit(CSYNC *ctx);
65 
67 
68 #endif /* _CSYNC_VIO_H */
void csync_vio_shutdown(CSYNC *ctx)
off_t csync_vio_lseek(CSYNC *ctx, csync_vio_handle_t *fhandle, off_t offset, int whence)
int csync_vio_commit(CSYNC *ctx)
int csync_vio_getfd(csync_vio_handle_t *fhandle)
int csync_vio_mkdirs(CSYNC *ctx, const char *uri, mode_t mode)
int csync_vio_mkdir(CSYNC *ctx, const char *uri, mode_t mode)
csync_vio_handle_t * csync_vio_open(CSYNC *ctx, const char *uri, int flags, mode_t mode)
ssize_t csync_vio_write(CSYNC *ctx, csync_vio_handle_t *fhandle, const void *buf, size_t count)
csync_vio_file_stat_t * csync_vio_readdir(CSYNC *ctx, csync_vio_handle_t *dhandle)
mode_t mode
Definition: csync_private.h:40
int csync_vio_init(CSYNC *ctx, const char *module, const char *args)
ssize_t csync_vio_read(CSYNC *ctx, csync_vio_handle_t *fhandle, void *buf, size_t count)
int csync_vio_unlink(CSYNC *ctx, const char *uri)
csync public structure
Definition: csync_private.h:89
int csync_vio_rename(CSYNC *ctx, const char *olduri, const char *newuri)
int csync_vio_stat(CSYNC *ctx, const char *uri, csync_vio_file_stat_t *buf)
csync_vio_handle_t * csync_vio_opendir(CSYNC *ctx, const char *name)
char * csync_vio_get_status_string(CSYNC *ctx)
int csync_vio_chown(CSYNC *ctx, const char *uri, uid_t owner, gid_t group)
int csync_vio_utimes(CSYNC *ctx, const char *uri, const struct timeval *times)
int csync_vio_set_property(CSYNC *ctx, const char *key, void *data)
int csync_vio_rmdir(CSYNC *ctx, const char *uri)
int csync_vio_closedir(CSYNC *ctx, csync_vio_handle_t *dhandle)
int csync_vio_get(CSYNC *ctx, csync_vio_handle_t *flocal, csync_vio_handle_t *fremote, csync_file_stat_t *st)
int csync_vio_put(CSYNC *ctx, csync_vio_handle_t *flocal, csync_vio_handle_t *fremote, csync_file_stat_t *st)
csync_vio_handle_t * csync_vio_creat(CSYNC *ctx, const char *uri, mode_t mode)
int csync_vio_close(CSYNC *ctx, csync_vio_handle_t *handle)
int csync_vio_chmod(CSYNC *ctx, const char *uri, mode_t mode)