Solid
storagevolume.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "storagevolume.h"
00021 #include "storagevolume_p.h"
00022
00023 #include "soliddefs_p.h"
00024 #include <solid/ifaces/storagevolume.h>
00025 #include <solid/device.h>
00026
00027 Solid::StorageVolume::StorageVolume(QObject *backendObject)
00028 : DeviceInterface(*new StorageVolumePrivate(), backendObject)
00029 {
00030 }
00031
00032 Solid::StorageVolume::StorageVolume(StorageVolumePrivate &dd, QObject *backendObject)
00033 : DeviceInterface(dd, backendObject)
00034 {
00035 }
00036
00037 Solid::StorageVolume::~StorageVolume()
00038 {
00039
00040 }
00041
00042 bool Solid::StorageVolume::isIgnored() const
00043 {
00044 Q_D(const StorageVolume);
00045 return_SOLID_CALL(Ifaces::StorageVolume *, d->backendObject(), true, isIgnored());
00046 }
00047
00048 Solid::StorageVolume::UsageType Solid::StorageVolume::usage() const
00049 {
00050 Q_D(const StorageVolume);
00051 return_SOLID_CALL(Ifaces::StorageVolume *, d->backendObject(), Unused, usage());
00052 }
00053
00054 QString Solid::StorageVolume::fsType() const
00055 {
00056 Q_D(const StorageVolume);
00057 return_SOLID_CALL(Ifaces::StorageVolume *, d->backendObject(), QString(), fsType());
00058 }
00059
00060 QString Solid::StorageVolume::label() const
00061 {
00062 Q_D(const StorageVolume);
00063 return_SOLID_CALL(Ifaces::StorageVolume *, d->backendObject(), QString(), label());
00064 }
00065
00066 QString Solid::StorageVolume::uuid() const
00067 {
00068 Q_D(const StorageVolume);
00069 return_SOLID_CALL(Ifaces::StorageVolume *, d->backendObject(), QString(), uuid());
00070 }
00071
00072 qulonglong Solid::StorageVolume::size() const
00073 {
00074 Q_D(const StorageVolume);
00075 return_SOLID_CALL(Ifaces::StorageVolume *, d->backendObject(), 0, size());
00076 }
00077
00078 Solid::Device Solid::StorageVolume::encryptedContainer() const
00079 {
00080 Q_D(const StorageVolume);
00081
00082 Ifaces::StorageVolume *iface
00083 = qobject_cast<Ifaces::StorageVolume*>(d->backendObject());
00084
00085 if (iface!=0) {
00086 return Device(iface->encryptedContainerUdi());
00087 } else {
00088 return Device();
00089 }
00090 }
00091
00092 #include "storagevolume.moc"