diff --git a/src/vio/csync_vio.h b/src/vio/csync_vio.h index 715ed626e..9c4ef2fc7 100644 --- a/src/vio/csync_vio.h +++ b/src/vio/csync_vio.h @@ -30,6 +30,10 @@ #include "vio/csync_vio_handle.h" #include "vio/csync_vio_file_stat.h" +typedef struct fhandle_s { + int fd; +} fhandle_t; + int csync_vio_init(CSYNC *ctx, const char *module, const char *args); void csync_vio_shutdown(CSYNC *ctx); @@ -38,6 +42,7 @@ 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); ssize_t csync_vio_read(CSYNC *ctx, csync_vio_handle_t *fhandle, void *buf, size_t count); ssize_t csync_vio_write(CSYNC *ctx, csync_vio_handle_t *fhandle, const void *buf, size_t count); +int csync_vio_sendfile(CSYNC *ctx, csync_vio_handle_t *sfp, csync_vio_handle_t *dst); off_t csync_vio_lseek(CSYNC *ctx, csync_vio_handle_t *fhandle, off_t offset, int whence); csync_vio_handle_t *csync_vio_opendir(CSYNC *ctx, const char *name); diff --git a/src/vio/csync_vio_local.c b/src/vio/csync_vio_local.c index 82e44556e..e9773704d 100644 --- a/src/vio/csync_vio_local.c +++ b/src/vio/csync_vio_local.c @@ -37,12 +37,10 @@ #include "c_string.h" #include "csync_util.h" #include "csync_log.h" +#include "csync_vio.h" #include "vio/csync_vio_local.h" -typedef struct fhandle_s { - int fd; -} fhandle_t; /* the url comes in as utf-8 and in windows, it needs to be multibyte. */