libzypp: zypp-media/ng/worker/mountingworker.h Source File

libzypp 17.36.6

mountingworker.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
9
10#ifndef ZYPP_MEDIA_NG_WORKER_MOUNTINGWORKER_H_INCLUDED
11#define ZYPP_MEDIA_NG_WORKER_MOUNTINGWORKER_H_INCLUDED
12
13#include <zypp-media/ng/worker/ProvideWorker>
14#include <zypp-media/ng/worker/DeviceDriver>
15#include <zypp-core/zyppng/base/Signals>
16#include <any>
17#include <unordered_map>
18
19namespace zyppng::worker
20{
21 class MountingWorker : public zyppng::worker::ProvideWorker
22 {
23 public:
24 MountingWorker( std::string_view workerName, DeviceDriverRef driver );
25 ~MountingWorker();
26
27 void immediateShutdown() override;
28
29 protected:
30 // ProvideWorker interface
31 zyppng::expected<zyppng::worker::WorkerCaps> initialize(const zyppng::worker::Configuration &conf) override;
32 void provide() override;
33 void cancel( const std::deque<zyppng::worker::ProvideWorkerItemRef>::iterator &i ) override;
34
35 private:
36 DeviceDriverRef _driver;
37 bool _devicesDetected = false; //< We delay device detection to the first attach request, to avoid doing it without needing it
38 };
39}
40
41#endif
zyppng::expected
Definition expected.h:27
zyppng::worker::MountingWorker::MountingWorker
MountingWorker(std::string_view workerName, DeviceDriverRef driver)
Definition mountingworker.cc:20
zyppng::worker::MountingWorker::_driver
DeviceDriverRef _driver
Definition mountingworker.h:36
zyppng::worker::MountingWorker::initialize
zyppng::expected< zyppng::worker::WorkerCaps > initialize(const zyppng::worker::Configuration &conf) override
Definition mountingworker.cc:30
zyppng::worker::MountingWorker::~MountingWorker
~MountingWorker()
Definition mountingworker.cc:25
zyppng::worker::MountingWorker::provide
void provide() override
Definition mountingworker.cc:35
zyppng::worker::MountingWorker::cancel
void cancel(const std::deque< zyppng::worker::ProvideWorkerItemRef >::iterator &i) override
Definition mountingworker.cc:182
zyppng::worker::MountingWorker::_devicesDetected
bool _devicesDetected
Definition mountingworker.h:37
zyppng::worker::MountingWorker::immediateShutdown
void immediateShutdown() override
Definition mountingworker.cc:187
zyppng::worker::ProvideWorker
Definition provideworker.h:66
zyppng::worker
Definition devicedriver.cc:23
zyppng::worker::Configuration
zyppng::ProviderConfiguration Configuration
Definition provideworker.h:31