| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2006-2007 Kevin Ottens <ervin@kde.org> |
| 3 | |
| 4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 5 | */ |
| 6 | |
| 7 | #include "opticaldisc.h" |
| 8 | #include "opticaldisc_p.h" |
| 9 | |
| 10 | #include "soliddefs_p.h" |
| 11 | #include <solid/devices/ifaces/opticaldisc.h> |
| 12 | |
| 13 | Solid::OpticalDisc::OpticalDisc(QObject *backendObject) |
| 14 | : StorageVolume(*new OpticalDiscPrivate(), backendObject) |
| 15 | { |
| 16 | } |
| 17 | |
| 18 | Solid::OpticalDisc::~OpticalDisc() |
| 19 | { |
| 20 | } |
| 21 | |
| 22 | Solid::OpticalDisc::ContentTypes Solid::OpticalDisc::availableContent() const |
| 23 | { |
| 24 | Q_D(const OpticalDisc); |
| 25 | return_SOLID_CALL(Ifaces::OpticalDisc *, d->backendObject(), ContentTypes(), availableContent()); |
| 26 | } |
| 27 | |
| 28 | Solid::OpticalDisc::DiscType Solid::OpticalDisc::discType() const |
| 29 | { |
| 30 | Q_D(const OpticalDisc); |
| 31 | return_SOLID_CALL(Ifaces::OpticalDisc *, d->backendObject(), UnknownDiscType, discType()); |
| 32 | } |
| 33 | |
| 34 | bool Solid::OpticalDisc::isAppendable() const |
| 35 | { |
| 36 | Q_D(const OpticalDisc); |
| 37 | return_SOLID_CALL(Ifaces::OpticalDisc *, d->backendObject(), false, isAppendable()); |
| 38 | } |
| 39 | |
| 40 | bool Solid::OpticalDisc::isBlank() const |
| 41 | { |
| 42 | Q_D(const OpticalDisc); |
| 43 | return_SOLID_CALL(Ifaces::OpticalDisc *, d->backendObject(), false, isBlank()); |
| 44 | } |
| 45 | |
| 46 | bool Solid::OpticalDisc::isRewritable() const |
| 47 | { |
| 48 | Q_D(const OpticalDisc); |
| 49 | return_SOLID_CALL(Ifaces::OpticalDisc *, d->backendObject(), false, isRewritable()); |
| 50 | } |
| 51 | |
| 52 | qulonglong Solid::OpticalDisc::capacity() const |
| 53 | { |
| 54 | Q_D(const OpticalDisc); |
| 55 | return_SOLID_CALL(Ifaces::OpticalDisc *, d->backendObject(), 0, capacity()); |
| 56 | } |
| 57 | |
| 58 | #include "moc_opticaldisc.cpp" |
| 59 | |