Solid

frontend/opticaldisc.h
1 /*
2  SPDX-FileCopyrightText: 2006-2007 Kevin Ottens <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 
7 #ifndef SOLID_OPTICALDISC_H
8 #define SOLID_OPTICALDISC_H
9 
10 #include <solid/solid_export.h>
11 
12 #include <solid/storagevolume.h>
13 
14 namespace Solid
15 {
16 class OpticalDiscPrivate;
17 class Device;
18 
24 class SOLID_EXPORT OpticalDisc : public StorageVolume
25 {
26  Q_OBJECT
27  Q_PROPERTY(ContentTypes availableContent READ availableContent)
28  Q_PROPERTY(DiscType discType READ discType)
29  Q_PROPERTY(bool appendable READ isAppendable)
30  Q_PROPERTY(bool blank READ isBlank)
31  Q_PROPERTY(bool rewritable READ isRewritable)
32  Q_PROPERTY(qulonglong capacity READ capacity)
33  Q_DECLARE_PRIVATE(OpticalDisc)
34  friend class Device;
35 
36 public:
48  enum ContentType {
49  NoContent = 0x00,
50  Audio = 0x01,
51  Data = 0x02,
52  VideoCd = 0x04,
53  SuperVideoCd = 0x08,
54  VideoDvd = 0x10,
55  VideoBluRay = 0x20
56  };
57  Q_ENUM(ContentType)
58 
59 
62  Q_DECLARE_FLAGS(ContentTypes, ContentType)
63  Q_FLAG(ContentTypes)
64 
87  enum DiscType { UnknownDiscType = -1,
88  CdRom, CdRecordable, CdRewritable, DvdRom, DvdRam,
89  DvdRecordable, DvdRewritable,
90  DvdPlusRecordable, DvdPlusRewritable,
91  DvdPlusRecordableDuallayer, DvdPlusRewritableDuallayer,
92  BluRayRom, BluRayRecordable, BluRayRewritable,
93  HdDvdRom, HdDvdRecordable, HdDvdRewritable
94  };
95  Q_ENUM(DiscType)
96 
97 private:
106  explicit OpticalDisc(QObject *backendObject);
107 
108 public:
112  virtual ~OpticalDisc();
113 
121  {
122  return DeviceInterface::OpticalDisc;
123  }
124 
132  ContentTypes availableContent() const;
133 
139  DiscType discType() const;
140 
146  bool isAppendable() const;
147 
153  bool isBlank() const;
154 
162  bool isRewritable() const;
163 
170  qulonglong capacity() const;
171 };
172 
173 Q_DECLARE_OPERATORS_FOR_FLAGS(OpticalDisc::ContentTypes)
174 
175 }
176 
177 #endif
static Type deviceInterfaceType()
Get the Solid::DeviceInterface::Type of the OpticalDisc device interface.
This class allows applications to deal with devices available in the underlying system.
ContentType
This enum type defines the type of content available in an optical disc.
Type
This enum type defines the type of device interface that a Device can have.
This device interface is available on optical discs.
This device interface is available on volume devices.
The single responsibility of this class is to create arguments valid for logind Inhibit call...
DiscType
This enum type defines the type of optical disc it can be.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Sep 23 2020 22:50:19 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.