7#include "fakeopticaldisc.h"
12using namespace Solid::Backends::Fake;
14FakeOpticalDisc::FakeOpticalDisc(FakeDevice *device)
19FakeOpticalDisc::~FakeOpticalDisc()
28 {QStringLiteral(
"audio"), Solid::OpticalDisc::Audio},
29 {QStringLiteral(
"data"), Solid::OpticalDisc::Data},
30 {QStringLiteral(
"vcd"), Solid::OpticalDisc::VideoCd},
31 {QStringLiteral(
"svcd"), Solid::OpticalDisc::SuperVideoCd},
32 {QStringLiteral(
"videodvd"), Solid::OpticalDisc::VideoDvd},
37 for (
const QString &type : content_typelist) {
38 content |=
map.value(type, Solid::OpticalDisc::NoContent);
49 return Solid::OpticalDisc::CdRom;
51 return Solid::OpticalDisc::CdRecordable;
53 return Solid::OpticalDisc::CdRewritable;
55 return Solid::OpticalDisc::DvdRom;
57 return Solid::OpticalDisc::DvdRam;
59 return Solid::OpticalDisc::DvdRecordable;
61 return Solid::OpticalDisc::DvdRewritable;
63 return Solid::OpticalDisc::DvdPlusRecordable;
65 return Solid::OpticalDisc::DvdPlusRewritable;
67 return Solid::OpticalDisc::DvdPlusRecordableDuallayer;
69 return Solid::OpticalDisc::DvdPlusRewritableDuallayer;
71 return Solid::OpticalDisc::BluRayRom;
73 return Solid::OpticalDisc::BluRayRecordable;
75 return Solid::OpticalDisc::BluRayRewritable;
77 return Solid::OpticalDisc::HdDvdRom;
79 return Solid::OpticalDisc::HdDvdRecordable;
81 return Solid::OpticalDisc::HdDvdRewritable;
83 return Solid::OpticalDisc::UnknownDiscType;
87bool FakeOpticalDisc::isAppendable()
const
89 return fakeDevice()->property(QStringLiteral(
"isAppendable")).
toBool();
92bool FakeOpticalDisc::isBlank()
const
94 return fakeDevice()->property(QStringLiteral(
"isBlank")).
toBool();
97bool FakeOpticalDisc::isRewritable()
const
99 return fakeDevice()->property(QStringLiteral(
"isRewritable")).
toBool();
102qulonglong FakeOpticalDisc::capacity()
const
104 return fakeDevice()->property(QStringLiteral(
"capacity")).
toULongLong();
107#include "moc_fakeopticaldisc.cpp"
DiscType
This enum type defines the type of optical disc it can be.
Type type(const QSqlDatabase &db)
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
QFuture< void > map(Iterator begin, Iterator end, MapFunctor &&function)
bool toBool() const const
QString toString() const const
qulonglong toULongLong(bool *ok) const const