| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2006 Kevin Ottens <ervin@kde.org> |
| 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 | ~OpticalDisc() override; |
| 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 | */ |
| 36 | virtual Solid::OpticalDisc::ContentTypes availableContent() const = 0; |
| 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 |
| 82 | |