diff options
author | Ross Lagerwall <rosslagerwall@gmail.com> | 2015-05-27 23:13:15 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2015-05-29 02:37:18 +0200 |
commit | f73bcf4934be89f83e86459bc695b7d28348565c (patch) | |
tree | f5dcf383cb7aae7f642a8bbda44fcf8afe3e10e5 /source3/include/libsmbclient.h | |
parent | 2ffa939bbe2c02509e1790c8b3f6f9b6910e3cf6 (diff) | |
download | samba-f73bcf4934be89f83e86459bc695b7d28348565c.tar.gz |
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 <rosslagerwall@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/include/libsmbclient.h')
-rw-r--r-- | source3/include/libsmbclient.h | 9 |
1 files changed, 9 insertions, 0 deletions
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); |