Solid
storagevolume.cpp
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 #include "storagevolume.h" 00022 #include "storagevolume_p.h" 00023 00024 #include "soliddefs_p.h" 00025 #include <solid/ifaces/storagevolume.h> 00026 #include <solid/device.h> 00027 00028 Solid::StorageVolume::StorageVolume(QObject *backendObject) 00029 : DeviceInterface(*new StorageVolumePrivate(), backendObject) 00030 { 00031 } 00032 00033 Solid::StorageVolume::StorageVolume(StorageVolumePrivate &dd, QObject *backendObject) 00034 : DeviceInterface(dd, backendObject) 00035 { 00036 } 00037 00038 Solid::StorageVolume::~StorageVolume() 00039 { 00040 00041 } 00042 00043 bool Solid::StorageVolume::isIgnored() const 00044 { 00045 Q_D(const StorageVolume); 00046 return_SOLID_CALL(Ifaces::StorageVolume *, d->backendObject(), true, isIgnored()); 00047 } 00048 00049 Solid::StorageVolume::UsageType Solid::StorageVolume::usage() const 00050 { 00051 Q_D(const StorageVolume); 00052 return_SOLID_CALL(Ifaces::StorageVolume *, d->backendObject(), Unused, usage()); 00053 } 00054 00055 QString Solid::StorageVolume::fsType() const 00056 { 00057 Q_D(const StorageVolume); 00058 return_SOLID_CALL(Ifaces::StorageVolume *, d->backendObject(), QString(), fsType()); 00059 } 00060 00061 QString Solid::StorageVolume::label() const 00062 { 00063 Q_D(const StorageVolume); 00064 return_SOLID_CALL(Ifaces::StorageVolume *, d->backendObject(), QString(), label()); 00065 } 00066 00067 QString Solid::StorageVolume::uuid() const 00068 { 00069 Q_D(const StorageVolume); 00070 return_SOLID_CALL(Ifaces::StorageVolume *, d->backendObject(), QString(), uuid().toLower()); 00071 } 00072 00073 qulonglong Solid::StorageVolume::size() const 00074 { 00075 Q_D(const StorageVolume); 00076 return_SOLID_CALL(Ifaces::StorageVolume *, d->backendObject(), 0, size()); 00077 } 00078 00079 Solid::Device Solid::StorageVolume::encryptedContainer() const 00080 { 00081 Q_D(const StorageVolume); 00082 00083 Ifaces::StorageVolume *iface 00084 = qobject_cast<Ifaces::StorageVolume*>(d->backendObject()); 00085 00086 if (iface!=0) { 00087 return Device(iface->encryptedContainerUdi()); 00088 } else { 00089 return Device(); 00090 } 00091 } 00092 00093 #include "storagevolume.moc"
KDE 4.6 API Reference