#pragma once #include "configuration.hpp" #include "resources.hpp" #include struct BasicState; namespace interfaces { struct MountPointStateMachine { struct Target { std::string imgUrl; bool rw; std::unique_ptr mountPoint; std::unique_ptr credentials; }; virtual ~MountPointStateMachine() = default; virtual void notify(const std::error_code& ec = {}) = 0; virtual void notificationStart() = 0; virtual void notificationInitialize(std::shared_ptr con, const std::string& svc, const std::string& iface, const std::string& name) = 0; virtual std::string_view getName() const = 0; virtual Configuration::MountPoint& getConfig() = 0; virtual std::optional& getTarget() = 0; virtual BasicState& getState() = 0; virtual int& getExitCode() = 0; virtual boost::asio::io_context& getIoc() = 0; virtual void emitRegisterDBusEvent( std::shared_ptr bus, std::shared_ptr objServer) = 0; virtual void emitMountEvent(std::optional) = 0; virtual void emitUnmountEvent() = 0; virtual void emitSubprocessStoppedEvent() = 0; virtual void emitUdevStateChangeEvent(const NBDDevice& dev, StateChange devState) = 0; }; } // namespace interfaces