From f73bcf4934be89f83e86459bc695b7d28348565c Mon Sep 17 00:00:00 2001 From: Ross Lagerwall Date: Wed, 27 May 2015 23:13:15 +0100 Subject: s3: libsmbclient: Add server-side copy support Introduce a new operation, splice, which copies data from one SMBCFILE to another. Implement this operation using FSCTL_SRV_COPYCHUNK_WRITE for SMB2+ protocols and using read+write for older protocols. Since the operation may be long running, it takes a callback which gets called periodically to indicate progress to the application and given an opportunity to stop it. Signed-off-by: Ross Lagerwall Reviewed-by: David Disseldorp Reviewed-by: Jeremy Allison --- source3/include/libsmbclient.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3/include/libsmbclient.h') diff --git a/source3/include/libsmbclient.h b/source3/include/libsmbclient.h index 42e41f79ef4..faaab2e3688 100644 --- a/source3/include/libsmbclient.h +++ b/source3/include/libsmbclient.h @@ -872,6 +872,15 @@ typedef ssize_t (*smbc_write_fn)(SMBCCTX *c, smbc_write_fn smbc_getFunctionWrite(SMBCCTX *c); void smbc_setFunctionWrite(SMBCCTX *c, smbc_write_fn fn); +typedef off_t (*smbc_splice_fn)(SMBCCTX *c, + SMBCFILE *srcfile, + SMBCFILE *dstfile, + off_t count, + int (*splice_cb)(off_t n, void *priv), + void *priv); +smbc_splice_fn smbc_getFunctionSplice(SMBCCTX *c); +void smbc_setFunctionSplice(SMBCCTX *c, smbc_splice_fn fn); + typedef int (*smbc_unlink_fn)(SMBCCTX *c, const char *fname); smbc_unlink_fn smbc_getFunctionUnlink(SMBCCTX *c); -- cgit v1.2.1