Solid

udisksopticaldrive.h
1/*
2 SPDX-FileCopyrightText: 2010 Michael Zanetti <mzanetti@kde.org>
3 SPDX-FileCopyrightText: 2010-2012 Lukáš Tinkl <ltinkl@redhat.com>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#ifndef UDISKSOPTICALDRIVE_H
9#define UDISKSOPTICALDRIVE_H
10
11#include "udisksstoragedrive.h"
12#include <solid/devices/ifaces/opticaldrive.h>
13
14namespace Solid
15{
16namespace Backends
17{
18namespace UDisks2
19{
20class OpticalDrive : public StorageDrive, virtual public Solid::Ifaces::OpticalDrive
21{
24
25public:
26 OpticalDrive(Device *device);
27 ~OpticalDrive() override;
28
30 void ejectPressed(const QString &udi) override;
31 void ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi) override;
32 void ejectRequested(const QString &udi);
33
34public:
35 bool eject() override;
36 QList<int> writeSpeeds() const override;
37 int writeSpeed() const override;
38 int readSpeed() const override;
39 Solid::OpticalDrive::MediumTypes supportedMedia() const override;
40
41private Q_SLOTS:
42 void slotDBusReply(const QDBusMessage &reply);
43 void slotDBusError(const QDBusError &error);
44
45 void slotEjectRequested();
46 void slotEjectDone(int error, const QString &errorString);
47
48 void slotChanged();
49
50private:
51 void initReadWriteSpeeds() const;
52
53 bool m_ejectInProgress;
54
55 // read/write speeds
56 mutable int m_readSpeed;
57 mutable int m_writeSpeed;
58 mutable QList<int> m_writeSpeeds;
59 mutable bool m_speedsInit;
60};
61
62}
63}
64}
65
66#endif // UDISKSOPTICALDRIVE_H
This device interface is available on CD-ROM drives.
The single responsibility of this class is to create arguments valid for logind Inhibit call.
Definition fakebattery.h:16
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:56:28 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.