Solid

ifaces/storageaccess.h
1 /*
2  SPDX-FileCopyrightText: 2007 Kevin Ottens <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 
7 #ifndef SOLID_IFACES_STORAGEACCESS_H
8 #define SOLID_IFACES_STORAGEACCESS_H
9 
10 #include <solid/devices/ifaces/deviceinterface.h>
11 #include <solid/storageaccess.h>
12 
13 namespace Solid
14 {
15 namespace Ifaces
16 {
23 class StorageAccess : virtual public DeviceInterface
24 {
25 public:
29  virtual ~StorageAccess();
30 
36  virtual bool isAccessible() const = 0;
37 
44  virtual QString filePath() const = 0;
45 
55  virtual bool isIgnored() const = 0;
56 
62  virtual bool setup() = 0;
63 
69  virtual bool teardown() = 0;
70 
71 protected:
72  //Q_SIGNALS:
80  virtual void accessibilityChanged(bool accessible, const QString &udi) = 0;
81 
89  virtual void setupDone(Solid::ErrorType error, QVariant resultData, const QString &udi) = 0;
90 
98  virtual void teardownDone(Solid::ErrorType error, QVariant resultData, const QString &udi) = 0;
99 
107  virtual void setupRequested(const QString &udi) = 0;
108 
116  virtual void teardownRequested(const QString &udi) = 0;
117 };
118 }
119 }
120 
121 Q_DECLARE_INTERFACE(Solid::Ifaces::StorageAccess, "org.kde.Solid.Ifaces.StorageAccess/0.1")
122 
123 #endif
virtual void setupRequested(const QString &udi)=0
This signal is emitted when a setup of this device is requested.
virtual QString filePath() const =0
Retrieves the absolute path of this volume mountpoint.
virtual bool isIgnored() const =0
Indicates if this volume should be ignored by applications.
Base interface of all the device interfaces.
virtual bool teardown()=0
Unmounts the volume.
virtual void teardownDone(Solid::ErrorType error, QVariant resultData, const QString &udi)=0
This signal is emitted when the mount state of this device has changed.
virtual void setupDone(Solid::ErrorType error, QVariant resultData, const QString &udi)=0
This signal is emitted when the mount state of this device has changed.
virtual bool setup()=0
Mounts the volume.
The single responsibility of this class is to create arguments valid for logind Inhibit call...
This device interface is available on volume devices.
virtual bool isAccessible() const =0
Indicates if this volume is mounted.
virtual void accessibilityChanged(bool accessible, const QString &udi)=0
This signal is emitted when the mount state of this device has changed.
virtual ~StorageAccess()
Destroys a StorageVolume object.
virtual void teardownRequested(const QString &udi)=0
This signal is emitted when a teardown of this device is requested.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Sep 22 2020 22:50:18 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.