Solid

frontend/storageaccess.h
1 /*
2  SPDX-FileCopyrightText: 2006-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_STORAGEACCESS_H
8 #define SOLID_STORAGEACCESS_H
9 
10 #include <solid/solid_export.h>
11 
12 #include <solid/solidnamespace.h>
13 #include <solid/deviceinterface.h>
14 #include <QVariant>
15 
16 namespace Solid
17 {
18 class StorageAccessPrivate;
19 class Device;
20 
28 class SOLID_EXPORT StorageAccess : public DeviceInterface
29 {
30  Q_OBJECT
31  Q_PROPERTY(bool accessible READ isAccessible)
32  Q_PROPERTY(QString filePath READ filePath)
33  Q_PROPERTY(bool ignored READ isIgnored)
34  Q_DECLARE_PRIVATE(StorageAccess)
35  friend class Device;
36 
37 private:
46  explicit StorageAccess(QObject *backendObject);
47 
48 public:
52  virtual ~StorageAccess();
53 
61  {
62  return DeviceInterface::StorageAccess;
63  }
64 
70  bool isAccessible() const;
71 
78  QString filePath() const;
79 
89  bool isIgnored() const;
90 
97  bool setup();
98 
105  bool teardown();
106 
107 Q_SIGNALS:
115  void accessibilityChanged(bool accessible, const QString &udi);
116 
126  void setupDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
127 
137  void teardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
138 
146  void setupRequested(const QString &udi);
147 
155  void teardownRequested(const QString &udi);
156 
157 protected:
161  StorageAccess(StorageAccessPrivate &dd, QObject *backendObject);
162 };
163 }
164 
165 #endif
This class allows applications to deal with devices available in the underlying system.
Base class of all the device interfaces.
Type
This enum type defines the type of device interface that a Device can have.
This device interface is available on volume devices to access them (i.e.
The single responsibility of this class is to create arguments valid for logind Inhibit call...
static Type deviceInterfaceType()
Get the Solid::DeviceInterface::Type of the StorageAccess device interface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Nov 21 2020 22:50:18 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.