Solid

frontend/opticaldrive.cpp
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(backendObject, SIGNAL(ejectPressed(QString)), this, SIGNAL(ejectPressed(QString)));
17 connect(backendObject, SIGNAL(ejectDone(Solid::ErrorType, QVariant, QString)), this, SIGNAL(ejectDone(Solid::ErrorType, QVariant, QString)));
18 connect(backendObject, SIGNAL(ejectRequested(QString)), this, SIGNAL(ejectRequested(QString)));
19}
20
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
50{
52 return_SOLID_CALL(Ifaces::OpticalDrive *, d->backendObject(), false, eject());
53}
54
55#include "moc_opticaldrive.cpp"
This device interface is available on CD-ROM drives.
This device interface is available on CD-R*,DVD*,Blu-Ray,HD-DVD drives.
bool eject()
Ejects any disc that could be contained in this drive.
~OpticalDrive() override
Destroys an OpticalDrive object.
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:47:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.