csync_vio.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_H
00024 #define _CSYNC_VIO_H
00025 
00026 #include <sys/types.h>
00027 #include <sys/stat.h>
00028 #include <fcntl.h>
00029 
00030 #include "vio/csync_vio_handle.h"
00031 #include "vio/csync_vio_file_stat.h"
00032 
00033 int csync_vio_init(CSYNC *ctx, const char *module, const char *args);
00034 void csync_vio_shutdown(CSYNC *ctx);
00035 
00036 csync_vio_handle_t *csync_vio_open(CSYNC *ctx, const char *uri, int flags, mode_t mode);
00037 csync_vio_handle_t *csync_vio_creat(CSYNC *ctx, const char *uri, mode_t mode);
00038 int csync_vio_close(CSYNC *ctx, csync_vio_handle_t *handle);
00039 ssize_t csync_vio_read(CSYNC *ctx, csync_vio_handle_t *fhandle, void *buf, size_t count);
00040 ssize_t csync_vio_write(CSYNC *ctx, csync_vio_handle_t *fhandle, const void *buf, size_t count);
00041 off_t csync_vio_lseek(CSYNC *ctx, csync_vio_handle_t *fhandle, off_t offset, int whence);
00042 
00043 csync_vio_handle_t *csync_vio_opendir(CSYNC *ctx, const char *name);
00044 int csync_vio_closedir(CSYNC *ctx, csync_vio_handle_t *dhandle);
00045 csync_vio_file_stat_t *csync_vio_readdir(CSYNC *ctx, csync_vio_handle_t *dhandle);
00046 
00047 int csync_vio_mkdir(CSYNC *ctx, const char *uri, mode_t mode);
00048 int csync_vio_mkdirs(CSYNC *ctx, const char *uri, mode_t mode);
00049 int csync_vio_rmdir(CSYNC *ctx, const char *uri);
00050 
00051 int csync_vio_stat(CSYNC *ctx, const char *uri, csync_vio_file_stat_t *buf);
00052 int csync_vio_rename(CSYNC *ctx, const char *olduri, const char *newuri);
00053 int csync_vio_unlink(CSYNC *ctx, const char *uri);
00054 
00055 int csync_vio_chmod(CSYNC *ctx, const char *uri, mode_t mode);
00056 int csync_vio_chown(CSYNC *ctx, const char *uri, uid_t owner, gid_t group);
00057 
00058 int csync_vio_utimes(CSYNC *ctx, const char *uri, const struct timeval *times);
00059 
00060 #endif