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);
48 if (type ==
"cd_rom") {
49 return Solid::OpticalDisc::CdRom;
50 }
else if (type ==
"cd_r") {
51 return Solid::OpticalDisc::CdRecordable;
52 }
else if (type ==
"cd_rw") {
53 return Solid::OpticalDisc::CdRewritable;
54 }
else if (type ==
"dvd_rom") {
55 return Solid::OpticalDisc::DvdRom;
56 }
else if (type ==
"dvd_ram") {
57 return Solid::OpticalDisc::DvdRam;
58 }
else if (type ==
"dvd_r") {
59 return Solid::OpticalDisc::DvdRecordable;
60 }
else if (type ==
"dvd_rw") {
61 return Solid::OpticalDisc::DvdRewritable;
62 }
else if (type ==
"dvd_plus_r") {
63 return Solid::OpticalDisc::DvdPlusRecordable;
64 }
else if (type ==
"dvd_plus_rw") {
65 return Solid::OpticalDisc::DvdPlusRewritable;
66 }
else if (type ==
"dvd_plus_r_dl") {
67 return Solid::OpticalDisc::DvdPlusRecordableDuallayer;
68 }
else if (type ==
"dvd_plus_rw_dl") {
69 return Solid::OpticalDisc::DvdPlusRewritableDuallayer;
70 }
else if (type ==
"bd_rom") {
71 return Solid::OpticalDisc::BluRayRom;
72 }
else if (type ==
"bd_r") {
73 return Solid::OpticalDisc::BluRayRecordable;
74 }
else if (type ==
"bd_re") {
75 return Solid::OpticalDisc::BluRayRewritable;
76 }
else if (type ==
"hddvd_rom") {
77 return Solid::OpticalDisc::HdDvdRom;
78 }
else if (type ==
"hddvd_r") {
79 return Solid::OpticalDisc::HdDvdRecordable;
80 }
else if (type ==
"hddvd_rw") {
81 return Solid::OpticalDisc::HdDvdRewritable;
83 return Solid::OpticalDisc::UnknownDiscType;
87bool FakeOpticalDisc::isAppendable()
const
89 return fakeDevice()->property(
"isAppendable").
toBool();
92bool FakeOpticalDisc::isBlank()
const
94 return fakeDevice()->property(
"isBlank").
toBool();
97bool FakeOpticalDisc::isRewritable()
const
99 return fakeDevice()->property(
"isRewritable").
toBool();
102qulonglong FakeOpticalDisc::capacity()
const
104 return fakeDevice()->property(
"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