Solid

winopticaldrive.h
1/*
2 SPDX-FileCopyrightText: 2013 Patrick von Reth <vonreth@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6#ifndef WINOPTICALDRIVE_H
7#define WINOPTICALDRIVE_H
8
9#include <solid/devices/ifaces/opticaldrive.h>
10
11#include "winstoragedrive.h"
12
13struct _FEATURE_DATA_PROFILE_LIST_EX;
14typedef _FEATURE_DATA_PROFILE_LIST_EX FEATURE_DATA_PROFILE_LIST_EX;
15
16namespace Solid
17{
18namespace Backends
19{
20namespace Win
21{
22class WinOpticalDrive : public WinStorageDrive, virtual public Solid::Ifaces::OpticalDrive
23{
26public:
27 WinOpticalDrive(WinDevice *device);
28 virtual ~WinOpticalDrive();
29
30 virtual Solid::OpticalDrive::MediumTypes supportedMedia() const;
31
32 virtual int readSpeed() const;
33
34 virtual int writeSpeed() const;
35
36 virtual QList<int> writeSpeeds() const;
37
38 virtual bool eject();
39
41 void ejectPressed(const QString &udi);
42
43 void ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
44
45private:
46 Solid::OpticalDrive::MediumTypes m_supportedTypes;
47};
48
49class MediaProfiles // TODO: cleanup
50{
51public:
52 MediaProfiles();
53 ulong profile;
55 QString name;
56 bool active;
57
58 static QMap<ulong, MediaProfiles> profiles(const QString &drive);
59
60private:
61 MediaProfiles(ulong profile, Solid::OpticalDrive::MediumTypes type, QString name = QString());
62
63 MediaProfiles(FEATURE_DATA_PROFILE_LIST_EX *feature);
64 bool isNull();
65
66 static const MediaProfiles getProfile(ulong id);
67};
68}
69}
70}
71
72#endif // WINOPTICALDRIVE_H
This device interface is available on CD-ROM drives.
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:01:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.