7#include "fakestorage.h"
10using namespace Solid::Backends::Fake;
12FakeStorage::FakeStorage(FakeDevice *device)
17FakeStorage::~FakeStorage()
26 return Solid::StorageDrive::Ide;
28 return Solid::StorageDrive::Usb;
30 return Solid::StorageDrive::Ieee1394;
32 return Solid::StorageDrive::Scsi;
34 return Solid::StorageDrive::Sata;
36 return Solid::StorageDrive::Platform;
45 return Solid::StorageDrive::HardDisk;
47 return Solid::StorageDrive::CdromDrive;
49 return Solid::StorageDrive::Floppy;
51 return Solid::StorageDrive::Tape;
53 return Solid::StorageDrive::CompactFlash;
55 return Solid::StorageDrive::MemoryStick;
57 return Solid::StorageDrive::SmartMedia;
59 return Solid::StorageDrive::SdMmc;
61 return Solid::StorageDrive::HardDisk;
65bool FakeStorage::isRemovable()
const
67 return fakeDevice()->property(QStringLiteral(
"isRemovable")).
toBool();
70bool FakeStorage::isHotpluggable()
const
72 return fakeDevice()->property(QStringLiteral(
"isHotpluggable")).
toBool();
75qulonglong FakeStorage::size()
const
77 return fakeDevice()->property(QStringLiteral(
"size")).
toULongLong();
80QDateTime FakeStorage::timeDetected()
const
82 return fakeDevice()->property(QStringLiteral(
"timeDetected")).
toDateTime();
85QDateTime FakeStorage::timeMediaDetected()
const
87 return fakeDevice()->property(QStringLiteral(
"timeMediaDetected")).
toDateTime();
90#include "moc_fakestorage.cpp"
DriveType
This enum type defines the type of drive a storage device can be.
Bus
This enum type defines the type of bus a storage device is attached to.
Type type(const QSqlDatabase &db)
bool toBool() const const
QDateTime toDateTime() const const
QString toString() const const
qulonglong toULongLong(bool *ok) const const