libzypp 17.31.23
zyppng::Provide Class Reference

#include </home/abuild/rpmbuild/BUILD/libzypp-17.31.23/zypp-media/ng/provide.h>

Inheritance diagram for zyppng::Provide:

Public Types

enum  Action { ABORT , RETRY , SKIP }
 
using MediaHandle = ProvideMediaHandle
 
using MediaChangeAction = std::optional< Action >
 

Public Member Functions

AsyncOpRef< expected< MediaHandle > > attachMedia (const std::vector< zypp::Url > &urls, const ProvideMediaSpec &request)
 
AsyncOpRef< expected< MediaHandle > > attachMedia (const zypp::Url &url, const ProvideMediaSpec &request)
 
AsyncOpRef< expected< ProvideRes > > provide (const std::vector< zypp::Url > &urls, const ProvideFileSpec &request)
 
AsyncOpRef< expected< ProvideRes > > provide (const zypp::Url &url, const ProvideFileSpec &request)
 
AsyncOpRef< expected< ProvideRes > > provide (const MediaHandle &attachHandle, const zypp::Pathname &fileName, const ProvideFileSpec &request)
 
AsyncOpRef< expected< std::string > > checksumForFile (const zypp::Pathname &p, const std::string &algorithm)
 
AsyncOpRef< expected< zypp::ManagedFile > > copyFile (const zypp::Pathname &source, const zypp::Pathname &target)
 
void start ()
 
void setWorkerPath (const zypp::Pathname &path)
 
bool isRunning () const
 
bool ejectDevice (const std::string &queueRef, const std::string &device)
 
void setStatusTracker (ProvideStatusRef tracker)
 
const zypp::PathnameproviderWorkdir () const
 
const zypp::media::CredManagerOptionscredManangerOptions () const
 
void setCredManagerOptions (const zypp::media::CredManagerOptions &opt)
 
SignalProxy< void()> sigIdle ()
 
SignalProxy< MediaChangeAction(const std::string &queueRef, const std::string &label, const int32_t mediaNr, const std::vector< std::string > &devices, const std::optional< std::string > &desc)> sigMediaChangeRequested ()
 
SignalProxy< std::optional< zypp::media::AuthData >(const zypp::Url &reqUrl, const std::string &triedUsername, const std::map< std::string, std::string > &extraValues) > sigAuthRequired ()
 

Static Public Member Functions

static ProvideRef create (const zypp::Pathname &workDir="")
 

Private Member Functions

 ZYPP_DECLARE_PRIVATE (Provide)
 
 Provide (const zypp::Pathname &workDir)
 
void releaseMedia (const std::string &mediaRef)
 

Friends

template<class T >
class ProvidePromise
 
class ProvideItem
 
class ProvideMediaHandle
 
class ProvideStatus
 

Detailed Description

Definition at line 100 of file provide.h.

Member Typedef Documentation

◆ MediaHandle

Definition at line 109 of file provide.h.

◆ MediaChangeAction

Definition at line 149 of file provide.h.

Member Enumeration Documentation

◆ Action

Enumerator
ABORT 
RETRY 
SKIP 

Definition at line 144 of file provide.h.

Constructor & Destructor Documentation

◆ Provide()

zyppng::Provide::Provide ( const zypp::Pathname workDir)
private

Definition at line 957 of file provide.cc.

Member Function Documentation

◆ ZYPP_DECLARE_PRIVATE()

zyppng::Provide::ZYPP_DECLARE_PRIVATE ( Provide  )
private

◆ create()

ProvideRef zyppng::Provide::create ( const zypp::Pathname workDir = "")
static

Definition at line 963 of file provide.cc.

◆ attachMedia() [1/2]

AsyncOpRef< expected< Provide::MediaHandle > > zyppng::Provide::attachMedia ( const std::vector< zypp::Url > &  urls,
const ProvideMediaSpec request 
)

Definition at line 973 of file provide.cc.

◆ attachMedia() [2/2]

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

Definition at line 968 of file provide.cc.

◆ provide() [1/3]

AsyncOpRef< expected< ProvideRes > > zyppng::Provide::provide ( const std::vector< zypp::Url > &  urls,
const ProvideFileSpec request 
)

Definition at line 1038 of file provide.cc.

◆ provide() [2/3]

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

Definition at line 1046 of file provide.cc.

◆ provide() [3/3]

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

Definition at line 1051 of file provide.cc.

◆ checksumForFile()

AsyncOpRef< expected< std::string > > 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 1082 of file provide.cc.

◆ copyFile()

AsyncOpRef< 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 1097 of file provide.cc.

◆ start()

void zyppng::Provide::start ( )

Definition at line 1110 of file provide.cc.

◆ setWorkerPath()

void zyppng::Provide::setWorkerPath ( const zypp::Pathname path)

Definition at line 1119 of file provide.cc.

◆ isRunning()

bool zyppng::Provide::isRunning ( ) const

◆ ejectDevice()

bool zyppng::Provide::ejectDevice ( const std::string &  queueRef,
const std::string &  device 
)

Definition at line 1124 of file provide.cc.

◆ setStatusTracker()

void zyppng::Provide::setStatusTracker ( ProvideStatusRef  tracker)

Definition at line 1132 of file provide.cc.

◆ providerWorkdir()

const zypp::Pathname & zyppng::Provide::providerWorkdir ( ) const

Definition at line 1137 of file provide.cc.

◆ credManangerOptions()

const zypp::media::CredManagerOptions & zyppng::Provide::credManangerOptions ( ) const

Definition at line 1142 of file provide.cc.

◆ setCredManagerOptions()

void zyppng::Provide::setCredManagerOptions ( const zypp::media::CredManagerOptions opt)

Definition at line 1148 of file provide.cc.

◆ sigIdle()

SignalProxy< void()> zyppng::Provide::sigIdle ( )

Definition at line 1153 of file provide.cc.

◆ sigMediaChangeRequested()

SignalProxy< Provide::MediaChangeAction(const std::string &queueRef, const std::string &, const int32_t, const std::vector< std::string > &, const std::optional< std::string > &)> zyppng::Provide::sigMediaChangeRequested ( )

Connect to this signal to handle media change requests

Note
It is NOT supported to shutdown the provider or cancel items when in this callback Returning Abort here will effectively cancel the current item anyway.

Definition at line 1158 of file provide.cc.

◆ sigAuthRequired()

SignalProxy< std::optional< zypp::media::AuthData >(const zypp::Url &reqUrl, const std::string &triedUsername, const std::map< std::string, std::string > &extraValues) > zyppng::Provide::sigAuthRequired ( )

This signal is emitted in case a request signaled a need to get Auth Info and nothing was found in the zypp::media::CredentialManager.

Definition at line 1163 of file provide.cc.

◆ releaseMedia()

void zyppng::Provide::releaseMedia ( const std::string &  mediaRef)
private

Definition at line 1021 of file provide.cc.

Friends And Related Function Documentation

◆ ProvidePromise

template<class T >
friend class ProvidePromise
friend

Definition at line 103 of file provide.h.

◆ ProvideItem

friend class ProvideItem
friend

Definition at line 104 of file provide.h.

◆ ProvideMediaHandle

friend class ProvideMediaHandle
friend

Definition at line 105 of file provide.h.

◆ ProvideStatus

friend class ProvideStatus
friend

Definition at line 106 of file provide.h.


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