libzypp 17.37.17
zyppng::worker::MountingWorker Class Reference

#include <zypp-media/ng/worker/mountingworker.h>

Inheritance diagram for zyppng::worker::MountingWorker:

Public Member Functions

 MountingWorker (std::string_view workerName, DeviceDriverRef driver)
 ~MountingWorker ()
void immediateShutdown () override
Public Member Functions inherited from zyppng::worker::ProvideWorker
 ProvideWorker (std::string_view workerName)
virtual ~ProvideWorker ()
StompFrameStreamRef messageStream () const
expected< void > run (int recv=STDIN_FILENO, int send=STDOUT_FILENO)
std::deque< ProvideWorkerItemRef > & requestQueue ()
MediaChangeRes requestMediaChange (const uint32_t id, const std::string &label, const int32_t mediaNr, const std::vector< std::string > &devices, const std::optional< std::string > &desc={})
expected< AuthInforequireAuthorization (const uint32_t id, const zypp::Url &url, const std::string &lastTriedUsername="", const int64_t lastTimestamp=-1, const std::map< std::string, std::string > &extraFields={})
ProvideNotificatioMode provNotificationMode () const
void setProvNotificationMode (const ProvideNotificatioMode &provNotificationMode)
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 >, connectionconnectFunc (SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers)

Protected Member Functions

zyppng::expected< zyppng::worker::WorkerCapsinitialize (const zyppng::worker::Configuration &conf) override
void provide () override
void cancel (const std::deque< zyppng::worker::ProvideWorkerItemRef >::iterator &i) override
Protected Member Functions inherited from zyppng::worker::ProvideWorker
virtual void initLog ()
virtual void cancel (const std::deque< ProvideWorkerItemRef >::iterator &request)=0
virtual ProvideWorkerItemRef makeItem (ProvideMessage &&spec)
void provideStart (const uint32_t id, const zypp::Url &url, const zypp::Pathname &localFile, const zypp::Pathname &stagingFile={})
void provideSuccess (const uint32_t id, bool cacheHit, const zypp::Pathname &localFile, const HeaderValueMap extra={})
void provideFailed (const uint32_t id, const ProvideMessage::Code code, const std::string &reason, const bool transient, const HeaderValueMap extra={})
void provideFailed (const uint32_t id, const ProvideMessage::Code code, const bool transient, const zypp::Exception &e)
void attachSuccess (const uint32_t id, const std::optional< std::string > &localMountPoint={})
void detachSuccess (const uint32_t id)
void redirect (const uint32_t id, const zypp::Url &url, const zypp::Pathname &newPath)
AsyncDataSourcecontrolIO ()
Protected Member Functions inherited from zyppng::Base
 Base (BasePrivate &dd)

Private Attributes

DeviceDriverRef _driver
bool _devicesDetected = false

Additional Inherited Members

Public Types inherited from zyppng::worker::ProvideWorker
enum  ProvideNotificatioMode { ONLY_NEW_PROVIDES , QUEUE_NOT_EMTPY }
enum  MediaChangeRes { SUCCESS , ABORT , SKIP }
Public Types inherited from zyppng::Base
using Ptr = std::shared_ptr<Base>
using WeakPtr = std::weak_ptr<Base>
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 Attributes inherited from zyppng::Base
std::unique_ptr< BasePrivated_ptr

Detailed Description

Definition at line 21 of file mountingworker.h.

Constructor & Destructor Documentation

◆ MountingWorker()

zyppng::worker::MountingWorker::MountingWorker ( std::string_view workerName,
DeviceDriverRef driver )

Definition at line 20 of file mountingworker.cc.

◆ ~MountingWorker()

zyppng::worker::MountingWorker::~MountingWorker ( )

Definition at line 25 of file mountingworker.cc.

Member Function Documentation

◆ immediateShutdown()

void zyppng::worker::MountingWorker::immediateShutdown ( )
overridevirtual

Called when the worker process exits

Reimplemented from zyppng::worker::ProvideWorker.

Definition at line 187 of file mountingworker.cc.

◆ initialize()

zyppng::expected< zyppng::worker::WorkerCaps > zyppng::worker::MountingWorker::initialize ( const zyppng::worker::Configuration & conf)
overrideprotectedvirtual

Implements zyppng::worker::ProvideWorker.

Definition at line 30 of file mountingworker.cc.

◆ provide()

void zyppng::worker::MountingWorker::provide ( )
overrideprotectedvirtual

Automatically called whenever a new item is enqueued.

Implements zyppng::worker::ProvideWorker.

Definition at line 35 of file mountingworker.cc.

◆ cancel()

void zyppng::worker::MountingWorker::cancel ( const std::deque< zyppng::worker::ProvideWorkerItemRef >::iterator & i)
overrideprotected

Definition at line 182 of file mountingworker.cc.

Member Data Documentation

◆ _driver

DeviceDriverRef zyppng::worker::MountingWorker::_driver
private

Definition at line 36 of file mountingworker.h.

◆ _devicesDetected

bool zyppng::worker::MountingWorker::_devicesDetected = false
private

Definition at line 37 of file mountingworker.h.


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