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 "opticaldrive.h"
8#include "opticaldrive_p.h"
9
10#include "soliddefs_p.h"
11#include <solid/devices/ifaces/opticaldrive.h>
12
13Solid::OpticalDrive::OpticalDrive(QObject *backendObject)
14 : StorageDrive(*new OpticalDrivePrivate(), backendObject)
15{
16 connect(sender: backendObject, SIGNAL(ejectPressed(QString)), receiver: this, SIGNAL(ejectPressed(QString)));
17 connect(sender: backendObject, SIGNAL(ejectDone(Solid::ErrorType, QVariant, QString)), receiver: this, SIGNAL(ejectDone(Solid::ErrorType, QVariant, QString)));
18 connect(sender: backendObject, SIGNAL(ejectRequested(QString)), receiver: this, SIGNAL(ejectRequested(QString)));
19}
20
21Solid::OpticalDrive::~OpticalDrive()
22{
23}
24
25Solid::OpticalDrive::MediumTypes Solid::OpticalDrive::supportedMedia() const
26{
27 Q_D(const OpticalDrive);
28 return_SOLID_CALL(Ifaces::OpticalDrive *, d->backendObject(), MediumTypes(), supportedMedia());
29}
30
31int Solid::OpticalDrive::readSpeed() const
32{
33 Q_D(const OpticalDrive);
34 return_SOLID_CALL(Ifaces::OpticalDrive *, d->backendObject(), 0, readSpeed());
35}
36
37int Solid::OpticalDrive::writeSpeed() const
38{
39 Q_D(const OpticalDrive);
40 return_SOLID_CALL(Ifaces::OpticalDrive *, d->backendObject(), 0, writeSpeed());
41}
42
43QList<int> Solid::OpticalDrive::writeSpeeds() const
44{
45 Q_D(const OpticalDrive);
46 return_SOLID_CALL(Ifaces::OpticalDrive *, d->backendObject(), QList<int>(), writeSpeeds());
47}
48
49bool Solid::OpticalDrive::eject()
50{
51 Q_D(OpticalDrive);
52 return_SOLID_CALL(Ifaces::OpticalDrive *, d->backendObject(), false, eject());
53}
54
55#include "moc_opticaldrive.cpp"
56

source code of solid/src/solid/devices/frontend/opticaldrive.cpp