diff options
author | Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com> | 2022-03-15 00:20:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-15 00:20:54 +0300 |
commit | ed2aceab6ee059a40d939ea21364bc18ec80d94b (patch) | |
tree | 654bbae1b29b9dcdc6e4ed0036dc5d70ad0544a5 /src/interfaces | |
parent | 1fb7beae5e97aadf8471ae7b6e07f5c2e5f33c78 (diff) | |
download | virtual-media-ed2aceab6ee059a40d939ea21364bc18ec80d94b.tar.xz |
Make mount/unmount dbus calls asynchronous
Change the default behavior of mount/umount dbus calls from blocking to
unblocking ones.
Once mount/unmount is triggered, appropriate action is running in the
background moving handling of operation result to async event. At the
end of processing dbus completion signal is sent to client with uint
value of operation status (identical with errno code).
Tested:
Manual scheduling of mount and unmount operations with monitoring dbus
communication of virtual-media service - matching api calls with
completion signal.
Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/mount_point_state_machine.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/interfaces/mount_point_state_machine.hpp b/src/interfaces/mount_point_state_machine.hpp index db521fb..e6b175c 100644 --- a/src/interfaces/mount_point_state_machine.hpp +++ b/src/interfaces/mount_point_state_machine.hpp @@ -3,6 +3,8 @@ #include "configuration.hpp" #include "resources.hpp" +#include <system_error> + struct BasicState; namespace interfaces @@ -20,6 +22,13 @@ struct MountPointStateMachine virtual ~MountPointStateMachine() = default; + virtual void notify(const std::error_code& ec = {}) = 0; + virtual void notificationStart() = 0; + virtual void + notificationInitialize(std::shared_ptr<sdbusplus::asio::connection> 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<Target>& getTarget() = 0; |