Solid
storagevolume.h
Go to the documentation of this file.
00001 /* 00002 Copyright 2006-2007 Kevin Ottens <ervin@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Lesser General Public 00006 License as published by the Free Software Foundation; either 00007 version 2.1 of the License, or (at your option) version 3, or any 00008 later version accepted by the membership of KDE e.V. (or its 00009 successor approved by the membership of KDE e.V.), which shall 00010 act as a proxy defined in Section 6 of version 3 of the license. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public 00018 License along with this library. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 #ifndef SOLID_STORAGEVOLUME_H 00022 #define SOLID_STORAGEVOLUME_H 00023 00024 #include <solid/solid_export.h> 00025 00026 #include <solid/deviceinterface.h> 00027 00028 namespace Solid 00029 { 00030 class StorageVolumePrivate; 00031 class Device; 00032 00039 class SOLID_EXPORT StorageVolume : public DeviceInterface 00040 { 00041 Q_OBJECT 00042 Q_ENUMS(UsageType) 00043 Q_PROPERTY(bool ignored READ isIgnored) 00044 Q_PROPERTY(UsageType usage READ usage) 00045 Q_PROPERTY(QString fsType READ fsType) 00046 Q_PROPERTY(QString label READ label) 00047 Q_PROPERTY(QString uuid READ uuid) 00048 Q_PROPERTY(qulonglong size READ size) 00049 Q_DECLARE_PRIVATE(StorageVolume) 00050 friend class Device; 00051 00052 public: 00062 enum UsageType { Other = 0, Unused = 1, FileSystem = 2, PartitionTable = 3, Raid = 4, Encrypted = 5 }; 00063 00064 00065 private: 00074 explicit StorageVolume(QObject *backendObject); 00075 00076 public: 00080 virtual ~StorageVolume(); 00081 00082 00089 static Type deviceInterfaceType() { return DeviceInterface::StorageVolume; } 00090 00091 00101 bool isIgnored() const; 00102 00109 UsageType usage() const; 00110 00119 QString fsType() const; 00120 00126 QString label() const; 00127 00138 QString uuid() const; 00139 00145 qulonglong size() const; 00146 00153 Device encryptedContainer() const; 00154 00155 protected: 00159 StorageVolume(StorageVolumePrivate &dd, QObject *backendObject); 00160 }; 00161 } 00162 00163 #endif // SOLID_STORAGEVOLUME_H
KDE 4.6 API Reference