Solid

udisksopticaldisc.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 UDISKSOPTICALDISC_H
9#define UDISKSOPTICALDISC_H
10
11#include <solid/devices/ifaces/opticaldisc.h>
12
13#include "../shared/udevqt.h"
14#include <config-solid.h>
15
16#include "udisksdevice.h"
17#include "udisksstoragevolume.h"
18
19namespace Solid
20{
21namespace Backends
22{
23namespace UDisks2
24{
25class OpticalDisc : public StorageVolume, virtual public Solid::Ifaces::OpticalDisc
26{
29
30public:
31 OpticalDisc(Device *dev);
32 ~OpticalDisc() override;
33
34 qulonglong capacity() const override;
35 bool isRewritable() const override;
36 bool isBlank() const override;
37 bool isAppendable() const override;
38 Solid::OpticalDisc::DiscType discType() const override;
39 Solid::OpticalDisc::ContentTypes availableContent() const override;
40
41 class Identity
42 {
43 public:
44 Identity();
45 Identity(const Device &device, const Device &drive);
46 bool operator==(const Identity &) const;
47
48 private:
49 long long m_detectTime;
50 long long m_size;
51 uint m_labelHash;
52 };
53
54private:
55 mutable Identity m_identity;
56 QString media() const;
57 mutable Solid::OpticalDisc::ContentTypes m_cachedContent;
58 Device *m_drive;
59#if UDEV_FOUND
60 UdevQt::Device m_udevDevice;
61#endif
62};
63
64}
65}
66}
67#endif // UDISKSOPTICALDISC_H
This device interface is available on optical discs.
DiscType
This enum type defines the type of optical disc it can be.
The single responsibility of this class is to create arguments valid for logind Inhibit call.
Definition fakebattery.h:16
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 3 2024 11:47:59 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.