File indexing completed on 2024-06-16 03:54:31

0001 /*
0002     SPDX-FileCopyrightText: 2017 René J.V. Bertin <rjvbertin@gmail.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #ifndef SOLID_BACKENDS_IOKIT_OPTICALDISC_H
0008 #define SOLID_BACKENDS_IOKIT_OPTICALDISC_H
0009 
0010 #include "iokitvolume.h"
0011 #include <solid/devices/ifaces/opticaldisc.h>
0012 
0013 namespace Solid
0014 {
0015 namespace Backends
0016 {
0017 namespace IOKit
0018 {
0019 class IOKitOpticalDisc : public IOKitVolume, virtual public Solid::Ifaces::OpticalDisc
0020 {
0021     Q_OBJECT
0022     Q_INTERFACES(Solid::Ifaces::OpticalDisc)
0023 
0024 public:
0025     IOKitOpticalDisc(IOKitDevice *device);
0026     IOKitOpticalDisc(const IOKitDevice *device);
0027     virtual ~IOKitOpticalDisc();
0028 
0029     // overridden from IOKit::Block because optical discs must
0030     // be accessed through the raw device.
0031     QString device() const override;
0032 
0033     Solid::OpticalDisc::ContentTypes availableContent() const override;
0034     Solid::OpticalDisc::DiscType discType() const override;
0035     bool isAppendable() const override;
0036     bool isBlank() const override;
0037     bool isRewritable() const override;
0038     qulonglong capacity() const override;
0039 };
0040 }
0041 }
0042 }
0043 
0044 #endif // SOLID_BACKENDS_IOKIT_OPTICALDISC_H