#include <zypp-curl/ng/network/curlmultiparthandler.h>
Data receiver interface for the CurlMultiPartHandler class.
Definition at line 19 of file curlmultiparthandler.h.
◆ ~CurlMultiPartDataReceiver()
virtual zyppng::CurlMultiPartDataReceiver::~CurlMultiPartDataReceiver |
( |
| ) |
|
|
virtualdefault |
◆ headerfunction()
virtual size_t zyppng::CurlMultiPartDataReceiver::headerfunction |
( |
char * | ptr, |
|
|
size_t | bytes ) |
|
pure virtual |
◆ writefunction()
virtual size_t zyppng::CurlMultiPartDataReceiver::writefunction |
( |
char * | ptr, |
|
|
std::optional< off_t > | offset, |
|
|
size_t | bytes ) |
|
pure virtual |
Data callback func, this is called whenever there is actual data to be written to the file. If offset is set, usually when starting to write a new range, it means to continue to write on the current file pointer position, otherwise seek to the given one.
Implemented in zyppng::NetworkRequestPrivate.
◆ beginRange()
virtual bool zyppng::CurlMultiPartDataReceiver::beginRange |
( |
off_t | range, |
|
|
std::string & | cancelReason ) |
|
inlinevirtual |
Called everytime a new range is about to be written, returning false from the function will immediately cancel the request and not write anything to the file.
- Parameters
-
range | The index of the range that is to be started |
cancelReason | Set to indicate why the request was cancelled. |
Definition at line 42 of file curlmultiparthandler.h.
◆ finishedRange()
virtual bool zyppng::CurlMultiPartDataReceiver::finishedRange |
( |
off_t | range, |
|
|
bool | validated, |
|
|
std::string & | cancelReason ) |
|
inlinevirtual |
Called everytime a range was finished, returning false from the function will cancel the request.
- Note
- Normally CurlMultiPartHandler will try to finish all ranges before failing even if one of them can not be validated. If the code should cancel early do it via returning false here.
- Parameters
-
range | The index of the range that was finished |
validated | Indicates of the range data could be validated against its given checksum |
cancelReason | Set to indicate why the request was cancelled. |
Definition at line 54 of file curlmultiparthandler.h.
◆ notifyErrorCodeChanged()
virtual void zyppng::CurlMultiPartDataReceiver::notifyErrorCodeChanged |
( |
| ) |
|
|
inlinevirtual |
The documentation for this class was generated from the following file: