Solid

ifaces/opticaldisc.h
1 /*
2  SPDX-FileCopyrightText: 2006 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_IFACES_OPTICALDISC_H
8 #define SOLID_IFACES_OPTICALDISC_H
9 
10 #include <solid/devices/ifaces/storagevolume.h>
11 #include <solid/opticaldisc.h>
12 
13 namespace Solid
14 {
15 namespace Ifaces
16 {
17 /**
18  * This device interface is available on optical discs.
19  *
20  * An optical disc is a volume that can be inserted in a cdrom drive.
21  */
22 class OpticalDisc : virtual public StorageVolume
23 {
24 public:
25  /**
26  * Destroys an OpticalDisc object.
27  */
28  virtual ~OpticalDisc();
29 
30  /**
31  * Retrieves the content types this disc contains (audio, video,
32  * data...).
33  *
34  * @return the flag set indicating the available contents
35  */
37 
38  /**
39  * Retrieves the disc type (cdr, cdrw...).
40  *
41  * @return the disc type
42  */
43  virtual Solid::OpticalDisc::DiscType discType() const = 0;
44 
45  /**
46  * Indicates if it's possible to write additional data to the disc.
47  *
48  * @return true if the disc is appendable, false otherwise
49  */
50  virtual bool isAppendable() const = 0;
51 
52  /**
53  * Indicates if the disc is blank.
54  *
55  * @return true if the disc is blank, false otherwise
56  */
57  virtual bool isBlank() const = 0;
58 
59  /**
60  * Indicates if the disc is rewritable.
61  *
62  * A disc is rewritable if you can write on it several times.
63  *
64  * @return true if the disc is rewritable, false otherwise
65  */
66  virtual bool isRewritable() const = 0;
67 
68  /**
69  * Retrieves the disc capacity (that is the maximum size of a
70  * volume could have on this disc).
71  *
72  * @return the capacity of the disc in bytes
73  */
74  virtual qulonglong capacity() const = 0;
75 };
76 }
77 }
78 
79 Q_DECLARE_INTERFACE(Solid::Ifaces::OpticalDisc, "org.kde.Solid.Ifaces.OpticalDisc/0.1")
80 
81 #endif
This device interface is available on optical discs.
virtual ~OpticalDisc()
Destroys an OpticalDisc object.
virtual Solid::OpticalDisc::DiscType discType() const =0
Retrieves the disc type (cdr, cdrw...).
virtual bool isRewritable() const =0
Indicates if the disc is rewritable.
virtual bool isBlank() const =0
Indicates if the disc is blank.
This device interface is available on volume devices.
virtual Solid::OpticalDisc::ContentTypes availableContent() const =0
Retrieves the content types this disc contains (audio, video, data...).
The single responsibility of this class is to create arguments valid for logind Inhibit call...
virtual qulonglong capacity() const =0
Retrieves the disc capacity (that is the maximum size of a volume could have on this disc)...
DiscType
This enum type defines the type of optical disc it can be.
virtual bool isAppendable() const =0
Indicates if it&#39;s possible to write additional data to the disc.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Jun 17 2021 22:49:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.