#include <zypp-curl/ng/network/zckhelper.h>
|
expected< void > | buildZchunkFile (const zypp::Pathname &target, const zypp::Pathname &delta, const std::optional< zypp::ByteCount > &expectedFileSize, const std::optional< zypp::ByteCount > &zcKHeaderSize) |
expected< void > | cont () |
void | setFailed (const std::string &msg) |
SignalProxy< void(const std::vector< Block > &)> | sigBlocksRequired () |
| Signal to notify the caller about required blocks, once the blocks are downloaded call cont to continue with the process.
|
SignalProxy< void(PrepareResult)> | sigFinished () |
| Called once the zchunk build process is finished, either with error or success.
|
| Base () |
virtual | ~Base () |
WeakPtr | parent () const |
void | addChild (const Base::Ptr &child) |
void | removeChild (const Ptr &child) |
const std::unordered_set< Ptr > & | children () const |
std::thread::id | threadId () const |
template<typename T> |
std::vector< std::weak_ptr< T > > | findChildren () const |
template<typename T> |
std::shared_ptr< T > | shared_this () const |
template<typename T> |
std::shared_ptr< T > | shared_this () |
template<typename T> |
std::weak_ptr< T > | weak_this () const |
template<typename T> |
std::weak_ptr< T > | weak_this () |
template<typename SenderFunc, typename ReceiverFunc> |
auto | connect (SenderFunc &&sFun, typename internal::MemberFunction< ReceiverFunc >::ClassType &recv, ReceiverFunc &&rFunc) |
template<typename SenderFunc, typename ReceiverFunc, typename ... Tracker> |
std::enable_if_t< std::is_member_function_pointer_v< SenderFunc >, connection > | connectFunc (SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers) |
|
static zypp::ByteCount | minZchunkDownloadSize () |
| The minimum size to download to have enough data to know the full header size.
|
static bool | isZchunkFile (const zypp::Pathname &file) |
static PrepareResult | prepareZck (const zypp::Pathname &delta, const zypp::Pathname &target, const zypp::ByteCount &expectedFileSize) |
static bool | validateZckFile (const zypp::Pathname &file, std::string &error) |
template<typename Obj, typename Functor> |
static decltype(auto) | make_base_slot (Obj *o, Functor &&f) |
template<typename SenderFunc, typename ReceiverFunc> |
static auto | connect (typename internal::MemberFunction< SenderFunc >::ClassType &s, SenderFunc &&sFun, typename internal::MemberFunction< ReceiverFunc >::ClassType &recv, ReceiverFunc &&rFunc) |
template<typename SenderFunc, typename ReceiverFunc, typename ... Tracker> |
static auto | connectFunc (typename internal::MemberFunction< SenderFunc >::ClassType &s, SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers) |
Definition at line 36 of file zckhelper.h.
◆ Block
◆ State
Enumerator |
---|
Initial | |
DownloadLead | |
DownloadHeader | |
DownloadChunks | |
Finished | |
Definition at line 39 of file zckhelper.h.
◆ buildZchunkFile()
This function kickstarts the build process. The sigBlocksRequired and sigFinished signals need to be connected in order to download required blocks or get the finished event.
Definition at line 27 of file zckhelper.cc.
◆ cont()
expected< void > zyppng::ZckLoader::cont |
( |
| ) |
|
Advances the statemachine after sigBlocksRequired was triggered and blocks have been downloaded into the targetFile
Definition at line 69 of file zckhelper.cc.
◆ setFailed()
void zyppng::ZckLoader::setFailed |
( |
const std::string & | msg | ) |
|
Advances the statemanchine into the failed state and emits sigFinished
Definition at line 279 of file zckhelper.cc.
◆ sigBlocksRequired()
Signal to notify the caller about required blocks, once the blocks are downloaded call cont to continue with the process.
Definition at line 294 of file zckhelper.cc.
◆ sigFinished()
Called once the zchunk build process is finished, either with error or success.
Definition at line 299 of file zckhelper.cc.
◆ minZchunkDownloadSize()
The minimum size to download to have enough data to know the full header size.
Definition at line 304 of file zckhelper.cc.
◆ isZchunkFile()
Checks if a given file is a zck file
Definition at line 309 of file zckhelper.cc.
◆ prepareZck()
Prepares the file in target with already existing chunks in delta. The target file must already contain the zck header data of the to be downloaded file.
Definition at line 322 of file zckhelper.cc.
◆ validateZckFile()
bool zyppng::ZckLoader::validateZckFile |
( |
const zypp::Pathname & | file, |
|
|
std::string & | error ) |
|
static |
Checks if a given zck file is internally valid
Definition at line 457 of file zckhelper.cc.
◆ _state
◆ _zchunkContext
◆ _targetFd
◆ _bytesReused
◆ _target
◆ _delta
◆ _expectedFileSize
◆ _zcKHeaderSize
◆ _sigBlocksRequired
Signal<void(const std::vector<Block> &)> zyppng::ZckLoader::_sigBlocksRequired |
|
private |
◆ _sigFinished
The documentation for this class was generated from the following files: