25 , _blockList(
std::move(blockList) )
27 MIL <<
"About to enter DlMetalinkState for url " <<
parent._spec.url() << std::endl;
33 const auto &spec =
sm._spec;
38 if ( !spec.deltaFile().empty() ) {
41 FILE *
f =
fopen( spec.targetPath().asString().c_str(),
"w+b" );
53 DBG <<
"Delta XFER: Delta file: " << spec.deltaFile() <<
" does not exist or is not readable." << std::endl;
56 DBG <<
"Delta XFER: No delta file given, can not reuse blocks." << std::endl;
83 const auto maxConns =
sm._requestDispatcher->maximumConcurrentConnections();
84 if (
sm._spec.preferredChunkSize() == 0 ) {
115 .chksumCompareLen =
blockSum.size( ),
116 .chksumPad = chksumPad > 0 ? chksumPad : std::optional<size_t>()
140 std::ifstream
istrm(
stateMachine()._spec.targetPath().asString(), std::ios::binary);
141 if ( !
istrm.is_open() ) {
142 setFailed(
"Failed to verify file digest (Could not open target file)." );
146 setFailed(
"Failed to verify file digest (Could not read target file)." );
152 setFailed(
"Failed to verify file digest (Checksum did not match)." );
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Store and operate with byte count.
static const Unit M
1024^2 Byte
Compute Message Digests (MD5, SHA1 etc)
Wrapper class for stat/lstat.
DownloadPrivate & stateMachine()
static zyppng::NetworkRequestError customError(NetworkRequestError::Type t, std::string &&errorMsg="", std::map< std::string, boost::any > &&extraInfo={})
The NetworkRequestError class Represents a error that occured in.
NetworkRequestError _error
off_t _downloadedMultiByteCount
zypp::ByteCount _preferredChunkSize
virtual void setFinished()
std::list< Block > _ranges
std::list< Block > _failedRanges
static zypp::ByteCount makeBlksize(size_t filesize)
void cancelAll(const NetworkRequestError &err)
void setFailed(NetworkRequestError &&err)
void ensureDownloadsRunning()