23 #ifndef _CSYNC_VIO_METHOD_H
24 #define _CSYNC_VIO_METHOD_H
32 #define VIO_METHOD_HAS_FUNC(method,func) \
33 (method != NULL && method->func != NULL \
34 && ((size_t)(((char *)&((method)->func)) - ((char *)(method))) < (method)->method_table_size))
56 typedef const char* (*csync_method_get_file_id_fn)(
const char*
path);
83 typedef char* (*csync_method_get_error_string_fn)();
csync_method_creat_fn creat
Application developer interface for csync.
csync_vio_file_stat_t *(* csync_method_readdir_fn)(csync_vio_method_handle_t *dhandle)
csync_method_open_fn open
csync_method_get_error_string_fn get_error_string
int(* csync_method_close_fn)(csync_vio_method_handle_t *fhandle)
csync_method_chmod_fn chmod
csync_method_get_capabilities_fn get_capabilities
csync_method_unlink_fn unlink
csync_method_mkdir_fn mkdir
csync_method_closedir_fn closedir
void(* csync_method_commit_fn)()
bool use_send_file_to_propagate
csync_method_close_fn close
char *(* csync_method_get_error_string_fn)()
csync_method_readdir_fn readdir
int64_t(* csync_method_lseek_fn)(csync_vio_method_handle_t *fhandle, int64_t offset, int whence)
csync_method_read_fn read
csync_vio_method_handle_t *(* csync_method_opendir_fn)(const char *name)
csync_method_chown_fn chown
csync_method_opendir_fn opendir
int(* csync_method_chown_fn)(const char *uri, uid_t owner, gid_t group)
const char *(* csync_method_get_file_id_fn)(const char *path)
int(* csync_method_closedir_fn)(csync_vio_method_handle_t *dhandle)
csync_method_commit_fn commit
int(* csync_method_sendfile_fn)(csync_vio_method_handle_t *src, csync_vio_method_handle_t *dst)
int(* csync_method_stat_fn)(const char *uri, csync_vio_file_stat_t *buf)
csync_method_stat_fn stat
int(* csync_method_rename_fn)(const char *olduri, const char *newuri)
void(* csync_vio_method_finish_fn)(csync_vio_method_t *method)
int(* csync_method_chmod_fn)(const char *uri, mode_t mode)
csync_vio_method_handle_t *(* csync_method_creat_fn)(const char *durl, mode_t mode)
int(* csync_method_set_property_fn)(const char *key, void *data)
csync_vio_capabilities_t *(* csync_method_get_capabilities_fn)(void)
csync_method_get_file_id_fn get_file_id
csync_method_rename_fn rename
csync_method_write_fn write
int(* csync_auth_callback)(const char *prompt, char *buf, size_t len, int echo, int verify, void *userdata)
csync_method_set_property_fn set_property
csync_method_lseek_fn lseek
csync_vio_method_handle_t *(* csync_method_open_fn)(const char *durl, int flags, mode_t mode)
ssize_t(* csync_method_write_fn)(csync_vio_method_handle_t *fhandle, const void *buf, size_t count)
int(* csync_method_unlink_fn)(const char *uri)
int(* csync_method_rmdir_fn)(const char *uri)
csync_method_rmdir_fn rmdir
ssize_t(* csync_method_read_fn)(csync_vio_method_handle_t *fhandle, void *buf, size_t count)
csync_method_sendfile_fn sendfile
int(* csync_method_utimes_fn)(const char *uri, const struct timeval times[2])
csync_method_utimes_fn utimes
void csync_vio_method_handle_t
int(* csync_method_mkdir_fn)(const char *uri, mode_t mode)