Changeset View
Changeset View
Standalone View
Standalone View
src/solid/devices/backends/iokit/iokitopticaldisc.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | Copyright 2017 René J.V. Bertin <rjvbertin@gmail.com> | ||||
3 | | ||||
4 | This library is free software; you can redistribute it and/or | ||||
5 | modify it under the terms of the GNU Lesser General Public | ||||
6 | License as published by the Free Software Foundation; either | ||||
7 | version 2.1 of the License, or (at your option) version 3, or any | ||||
8 | later version accepted by the membership of KDE e.V. (or its | ||||
9 | successor approved by the membership of KDE e.V.), which shall | ||||
10 | act as a proxy defined in Section 6 of version 3 of the license. | ||||
11 | | ||||
12 | This library is distributed in the hope that it will be useful, | ||||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
15 | Lesser General Public License for more details. | ||||
16 | | ||||
17 | You should have received a copy of the GNU Lesser General Public | ||||
18 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||||
19 | */ | ||||
20 | | ||||
21 | #ifndef SOLID_BACKENDS_IOKIT_OPTICALDISC_H | ||||
22 | #define SOLID_BACKENDS_IOKIT_OPTICALDISC_H | ||||
23 | | ||||
24 | #include <solid/devices/ifaces/opticaldisc.h> | ||||
25 | #include "iokitvolume.h" | ||||
26 | | ||||
27 | namespace Solid | ||||
28 | { | ||||
29 | namespace Backends | ||||
30 | { | ||||
31 | namespace IOKit | ||||
32 | { | ||||
33 | class IOKitOpticalDisc : public IOKitVolume, virtual public Solid::Ifaces::OpticalDisc | ||||
34 | { | ||||
35 | Q_OBJECT | ||||
36 | Q_INTERFACES(Solid::Ifaces::OpticalDisc) | ||||
37 | | ||||
38 | public: | ||||
39 | IOKitOpticalDisc(IOKitDevice *device); | ||||
40 | IOKitOpticalDisc(const IOKitDevice *device); | ||||
41 | virtual ~IOKitOpticalDisc(); | ||||
42 | | ||||
43 | // overriden from IOKit::Block because optical discs must | ||||
44 | // be accessed through the raw device. | ||||
45 | virtual QString device() const Q_DECL_OVERRIDE; | ||||
46 | | ||||
47 | virtual Solid::OpticalDisc::ContentTypes availableContent() const Q_DECL_OVERRIDE; | ||||
48 | virtual Solid::OpticalDisc::DiscType discType() const Q_DECL_OVERRIDE; | ||||
49 | virtual bool isAppendable() const Q_DECL_OVERRIDE; | ||||
50 | virtual bool isBlank() const Q_DECL_OVERRIDE; | ||||
51 | virtual bool isRewritable() const Q_DECL_OVERRIDE; | ||||
52 | virtual qulonglong capacity() const Q_DECL_OVERRIDE; | ||||
53 | }; | ||||
54 | } | ||||
55 | } | ||||
56 | } | ||||
57 | | ||||
58 | #endif // SOLID_BACKENDS_IOKIT_OPTICALDISC_H |