Solid

frontend/storagevolume.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_STORAGEVOLUME_H
8 #define SOLID_STORAGEVOLUME_H
9 
10 #include <solid/solid_export.h>
11 
12 #include <solid/deviceinterface.h>
13 
14 namespace Solid
15 {
16 class StorageVolumePrivate;
17 class Device;
18 
25 class SOLID_EXPORT StorageVolume : public DeviceInterface
26 {
27  Q_OBJECT
28  Q_PROPERTY(bool ignored READ isIgnored)
29  Q_PROPERTY(UsageType usage READ usage)
30  Q_PROPERTY(QString fsType READ fsType)
31  Q_PROPERTY(QString label READ label)
32  Q_PROPERTY(QString uuid READ uuid)
33  Q_PROPERTY(qulonglong size READ size)
34  Q_DECLARE_PRIVATE(StorageVolume)
35  friend class Device;
36 
37 public:
47  enum UsageType { Other = 0, Unused = 1, FileSystem = 2, PartitionTable = 3, Raid = 4, Encrypted = 5 };
48  Q_ENUM(UsageType)
49 
50 private:
59  explicit StorageVolume(QObject *backendObject);
60 
61 public:
65  virtual ~StorageVolume();
66 
74  {
75  return DeviceInterface::StorageVolume;
76  }
77 
87  bool isIgnored() const;
88 
95  UsageType usage() const;
96 
105  QString fsType() const;
106 
112  QString label() const;
113 
124  QString uuid() const;
125 
131  qulonglong size() const;
132 
139  Device encryptedContainer() const;
140 
141 protected:
145  StorageVolume(StorageVolumePrivate &dd, QObject *backendObject);
146 };
147 }
148 
149 #endif // SOLID_STORAGEVOLUME_H
UsageType
This enum type defines the how a volume is used.
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.
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 StorageVolume device interface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Sep 23 2020 22:50:20 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.