File indexing completed on 2024-05-12 04:01:52
0001 /* 0002 SPDX-FileCopyrightText: 2006 Kevin Ottens <ervin@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef SOLID_IFACES_OPTICALDISC_H 0008 #define SOLID_IFACES_OPTICALDISC_H 0009 0010 #include <solid/devices/ifaces/storagevolume.h> 0011 #include <solid/opticaldisc.h> 0012 0013 namespace Solid 0014 { 0015 namespace Ifaces 0016 { 0017 /** 0018 * This device interface is available on optical discs. 0019 * 0020 * An optical disc is a volume that can be inserted in a cdrom drive. 0021 */ 0022 class OpticalDisc : virtual public StorageVolume 0023 { 0024 public: 0025 /** 0026 * Destroys an OpticalDisc object. 0027 */ 0028 ~OpticalDisc() override; 0029 0030 /** 0031 * Retrieves the content types this disc contains (audio, video, 0032 * data...). 0033 * 0034 * @return the flag set indicating the available contents 0035 */ 0036 virtual Solid::OpticalDisc::ContentTypes availableContent() const = 0; 0037 0038 /** 0039 * Retrieves the disc type (cdr, cdrw...). 0040 * 0041 * @return the disc type 0042 */ 0043 virtual Solid::OpticalDisc::DiscType discType() const = 0; 0044 0045 /** 0046 * Indicates if it's possible to write additional data to the disc. 0047 * 0048 * @return true if the disc is appendable, false otherwise 0049 */ 0050 virtual bool isAppendable() const = 0; 0051 0052 /** 0053 * Indicates if the disc is blank. 0054 * 0055 * @return true if the disc is blank, false otherwise 0056 */ 0057 virtual bool isBlank() const = 0; 0058 0059 /** 0060 * Indicates if the disc is rewritable. 0061 * 0062 * A disc is rewritable if you can write on it several times. 0063 * 0064 * @return true if the disc is rewritable, false otherwise 0065 */ 0066 virtual bool isRewritable() const = 0; 0067 0068 /** 0069 * Retrieves the disc capacity (that is the maximum size of a 0070 * volume could have on this disc). 0071 * 0072 * @return the capacity of the disc in bytes 0073 */ 0074 virtual qulonglong capacity() const = 0; 0075 }; 0076 } 0077 } 0078 0079 Q_DECLARE_INTERFACE(Solid::Ifaces::OpticalDisc, "org.kde.Solid.Ifaces.OpticalDisc/0.1") 0080 0081 #endif