lib/download.c: add basic support for vcdiffs
This commit is contained in:
@@ -713,6 +713,22 @@ int xbps_fetch_file(struct xbps_handle *xhp, const char *uri,
|
||||
int xbps_fetch_file_dest(struct xbps_handle *xhp, const char *uri,
|
||||
const char *filename, const char *flags);
|
||||
|
||||
/**
|
||||
* Download a vcdiff from a remote URL to current working directory. And apply
|
||||
* it to a given file
|
||||
*
|
||||
* @param[in] xhp Pointer to an xbps_handle struct.
|
||||
* @param[in] uri Remote URI string.
|
||||
* @param[in] basefile Local basefile to apply the delta to.
|
||||
* @param[in] filename Local filename to safe the file.
|
||||
* @param[in] flags Flags passed to libfetch's fetchXget().
|
||||
*
|
||||
* @return -1 on error, 0 if not downloaded (because local/remote size/mtime
|
||||
* do not match) and 1 if downloaded successfully.
|
||||
**/
|
||||
int xbps_fetch_delta(struct xbps_handle *xhp, const char *basefile,
|
||||
const char *uri, const char *filename, const char *flags);
|
||||
|
||||
/**
|
||||
* Returns last error string reported by xbps_fetch_file().
|
||||
*
|
||||
|
Reference in New Issue
Block a user