libzypp: zyppng::Provide Class Reference

libzypp 17.38.6

zyppng::Provide Class Reference

`#include <zypp/ng/media/provide.h>`

Inheritance diagram for zyppng::Provide:

## Public Types
using | MediaHandle = ProvideMediaHandle
using | LazyMediaHandle = ::zyppng::LazyMediaHandle<Provide>
using | Res = ProvideRes
Public Types inherited from zyppng::Base
using | Ptr = std::shared_ptr<Base>
using | WeakPtr = std::weak_ptr<Base>

## Public Member Functions
| ZYPP_DECL_PRIVATE_CONSTR (Provide)
| ~Provide () override
expected< LazyMediaHandle > | prepareMedia (const zypp::MirroredOrigin &origin, const ProvideMediaSpec &request)
expected< LazyMediaHandle > | prepareMedia (const zypp::Url &url, const ProvideMediaSpec &request)
expected< MediaHandle > | attachMediaIfNeeded (LazyMediaHandle lazyHandle)
expected< MediaHandle > | attachMedia (const zypp::MirroredOrigin &origin, const ProvideMediaSpec &request)
expected< MediaHandle > | attachMedia (const zypp::Url &url, const ProvideMediaSpec &request)
expected< Res > | provide (const zypp::MirroredOrigin &origin, const ProvideFileSpec &request)
expected< Res > | provide (const zypp::Url &url, const ProvideFileSpec &request)
expected< Res > | provide (const MediaHandle &attachHandle, const zypp::Pathname &fileName, const ProvideFileSpec &request)
expected< Res > | provide (const LazyMediaHandle &attachHandle, const zypp::Pathname &fileName, const ProvideFileSpec &request)
expected< zypp::CheckSum > | checksumForFile (const zypp::Pathname &p, const std::string &algorithm)
expected< zypp::ManagedFile > | copyFile (const zypp::Pathname &source, const zypp::Pathname &target)
expected< zypp::ManagedFile > | copyFile (Res source, const zypp::Pathname &target)
Public Member Functions inherited from zyppng::Base
| 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)
void | setData (uint32_t quark, zypp::AutoDispose< void * > data)
void * | data (uint32_t quark)
void | clearData (uint32_t quark)

## Static Public Member Functions
static auto | copyResultToDest (ProvideRef provider, const zypp::Pathname &targetPath)
Static Public Member Functions inherited from zyppng::Base
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)

## Protected Member Functions
void | releaseMedium (const AttachedMediaInfo *ptr)
Protected Member Functions inherited from zyppng::Base
| Base (BasePrivate &dd)

## Private Member Functions
zypp::MirroredOrigin | sanitizeUrls (const zypp::MirroredOrigin &origin) const

## Private Attributes
std::vector< AttachedMediaInfo_Ptr > | _attachedMedia

## Friends
class | AttachedMediaInfo

## Additional Inherited Members
Protected Attributes inherited from zyppng::Base
std::unique_ptr< BasePrivate > | d_ptr

## Detailed Description

A Facade class that mimics the behavior of the Provide class just in a sync way. Meaning every operation will finish immediately instead of returning a AsyncOp.

Definition at line 102 of file provide.h.

## Member Typedef Documentation

## ◆ MediaHandle

using zyppng::Provide::MediaHandle = ProvideMediaHandle

Definition at line 109 of file provide.h.

## ◆ LazyMediaHandle

using zyppng::Provide::LazyMediaHandle = ::zyppng::LazyMediaHandle<Provide>

Definition at line 110 of file provide.h.

## ◆ Res

using zyppng::Provide::Res = ProvideRes

Definition at line 111 of file provide.h.

## Constructor & Destructor Documentation

## ◆ ~Provide()

zyppng::Provide::~Provide | ( |  | ) |
| override

Definition at line 382 of file provide.cc.

## Member Function Documentation

## ◆ ZYPP_DECL_PRIVATE_CONSTR()

zyppng::Provide::ZYPP_DECL_PRIVATE_CONSTR | ( | Provide |  | ) |

## ◆ prepareMedia() [1/2]

expected< Provide::LazyMediaHandle > zyppng::Provide::prepareMedia | ( | const zypp::MirroredOrigin & | origin,
|  | const ProvideMediaSpec & | request )

Definition at line 391 of file provide.cc.

## ◆ prepareMedia() [2/2]

expected< Provide::LazyMediaHandle > zyppng::Provide::prepareMedia | ( | const zypp::Url & | url,
|  | const ProvideMediaSpec & | request )

Definition at line 399 of file provide.cc.

## ◆ attachMediaIfNeeded()

expected< Provide::MediaHandle > zyppng::Provide::attachMediaIfNeeded | ( | LazyMediaHandle | lazyHandle | ) |

Definition at line 404 of file provide.cc.

## ◆ attachMedia() [1/2]

expected< Provide::MediaHandle > zyppng::Provide::attachMedia | ( | const zypp::MirroredOrigin & | origin,
|  | const ProvideMediaSpec & | request )

Definition at line 188 of file provide.cc.

## ◆ attachMedia() [2/2]

expected< Provide::MediaHandle > zyppng::Provide::attachMedia | ( | const zypp::Url & | url,
|  | const ProvideMediaSpec & | request )

Definition at line 183 of file provide.cc.

## ◆ provide() [1/4]

expected< ProvideRes > zyppng::Provide::provide | ( | const zypp::MirroredOrigin & | origin,
|  | const ProvideFileSpec & | request )

Definition at line 419 of file provide.cc.

## ◆ provide() [2/4]

expected< ProvideRes > zyppng::Provide::provide | ( | const zypp::Url & | url,
|  | const ProvideFileSpec & | request )

Definition at line 456 of file provide.cc.

## ◆ provide() [3/4]

expected< ProvideRes > zyppng::Provide::provide | ( | const MediaHandle & | attachHandle,
|  | const zypp::Pathname & | fileName,
|  | const ProvideFileSpec & | request )

Definition at line 461 of file provide.cc.

## ◆ provide() [4/4]

expected< ProvideRes > zyppng::Provide::provide | ( | const LazyMediaHandle & | attachHandle,
|  | const zypp::Pathname & | fileName,
|  | const ProvideFileSpec & | request )

Definition at line 497 of file provide.cc.

## ◆ checksumForFile()

zyppng::expected< zypp::CheckSum > zyppng::Provide::checksumForFile | ( | const zypp::Pathname & | p,
|  | const std::string & | algorithm )

Schedules a job to calculate the checksum for the given file

Definition at line 509 of file provide.cc.

## ◆ copyFile() [1/2]

expected< zypp::ManagedFile > zyppng::Provide::copyFile | ( | const zypp::Pathname & | source,
|  | const zypp::Pathname & | target )

Schedules a copy job to copy a file from source to target

Definition at line 518 of file provide.cc.

## ◆ copyFile() [2/2]

expected< zypp::ManagedFile > zyppng::Provide::copyFile | ( | Res | source,
|  | const zypp::Pathname & | target )

Definition at line 543 of file provide.cc.

## ◆ copyResultToDest()

auto zyppng::Provide::copyResultToDest | ( | ProvideRef | provider,
|  | const zypp::Pathname & | targetPath )
| inlinestatic

Definition at line 139 of file provide.h.

## ◆ releaseMedium()

void zyppng::Provide::releaseMedium | ( | const AttachedMediaInfo * | ptr | ) |
| protected

Definition at line 549 of file provide.cc.

## ◆ sanitizeUrls()

zypp::MirroredOrigin zyppng::Provide::sanitizeUrls | ( | const zypp::MirroredOrigin & | origin | ) | const
| private

Definition at line 158 of file provide.cc.

## Friends And Related Symbol Documentation

## ◆ AttachedMediaInfo

friend class AttachedMediaInfo
| friend

Definition at line 107 of file provide.h.

## Member Data Documentation

## ◆ _attachedMedia

std::vector<AttachedMediaInfo_Ptr> zyppng::Provide::_attachedMedia
| private

Definition at line 151 of file provide.h.

The documentation for this class was generated from the following files:

- zypp/ng/media/provide.h
- zypp/ng/media/provide.cc