7#include "iokitopticaldisc.h"
9#include <CoreFoundation/CoreFoundation.h>
11using namespace Solid::Backends::IOKit;
13IOKitOpticalDisc::IOKitOpticalDisc(IOKitDevice *device)
18IOKitOpticalDisc::IOKitOpticalDisc(
const IOKitDevice *device)
23IOKitOpticalDisc::~IOKitOpticalDisc()
27QString IOKitOpticalDisc::device()
const
31 return QStringLiteral(
"/dev/") + devName;
33 return QStringLiteral(
"/dev/r") + devName;
39 if (fsType() == QStringLiteral(
"cddafs")) {
40 return Solid::OpticalDisc::Audio;
42 return Solid::OpticalDisc::Data;
50 return Solid::OpticalDisc::CdRom;
52 return Solid::OpticalDisc::CdRecordable;
54 return Solid::OpticalDisc::CdRewritable;
56 return Solid::OpticalDisc::DvdRom;
58 return Solid::OpticalDisc::DvdRam;
60 return Solid::OpticalDisc::DvdRecordable;
62 return Solid::OpticalDisc::DvdRewritable;
64 return Solid::OpticalDisc::DvdPlusRecordable;
66 return Solid::OpticalDisc::DvdPlusRewritable;
68 return Solid::OpticalDisc::BluRayRom;
70 return Solid::OpticalDisc::BluRayRecordable;
72 return Solid::OpticalDisc::BluRayRewritable;
74 return Solid::OpticalDisc::HdDvdRom;
76 return Solid::OpticalDisc::HdDvdRecordable;
78 return Solid::OpticalDisc::HdDvdRewritable;
80 return Solid::OpticalDisc::UnknownDiscType;
84bool IOKitOpticalDisc::isAppendable()
const
87 return isRewritable();
90bool IOKitOpticalDisc::isBlank()
const
93 return isRewritable();
96bool IOKitOpticalDisc::isRewritable()
const
98 return m_device->property(QStringLiteral(
"Writable")).
toBool();
101qulonglong IOKitOpticalDisc::capacity()
const
106#include "moc_iokitopticaldisc.cpp"
DiscType
This enum type defines the type of optical disc it can be.
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
bool toBool() const const
QString toString() const const