libzypp 17.31.23
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{
22 {
23 public:
24 MountingWorker( std::string_view workerName, DeviceDriverRef driver );
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< zyppng::worker::WorkerCaps > initialize(const zyppng::worker::Configuration &conf) override
void cancel(const std::deque< zyppng::worker::ProvideWorkerItemRef >::iterator &i) override
zypp::proto::Configuration Configuration
Definition: provideworker.h:33