Solid::OpticalDisc Class

class Solid::OpticalDisc

This device interface is available on optical discs. More...

Header: #include <Solid/OpticalDisc>
CMake: find_package(KF6 REQUIRED COMPONENTS Solid)
target_link_libraries(mytarget PRIVATE KF6::Solid)
Inherits: Solid::StorageVolume

Public Types

enum ContentType { NoContent, Audio, Data, VideoCd, SuperVideoCd, …, VideoBluRay }
flags ContentTypes
enum DiscType { UnknownDiscType, CdRom, CdRecordable, CdRewritable, DvdRom, …, HdDvdRewritable }

Properties

Public Functions

Solid::OpticalDisc::ContentTypes availableContent() const
qulonglong capacity() const
Solid::OpticalDisc::DiscType discType() const
bool isAppendable() const
bool isBlank() const
bool isRewritable() const

Static Public Members

Solid::DeviceInterface::Type deviceInterfaceType()

Detailed Description

An optical disc is a volume that can be inserted in CD-R*,DVD*,Blu-Ray,HD-DVD drives.

Member Type Documentation

enum OpticalDisc::ContentType
flags OpticalDisc::ContentTypes

This enum type defines the type of content available in an optical disc.

ConstantValueDescription
Solid::OpticalDisc::NoContent0x00 
Solid::OpticalDisc::Audio0x01A disc containing audio
Solid::OpticalDisc::Data0x02A disc containing data
Solid::OpticalDisc::VideoCd0x04A Video Compact Disc (VCD)
Solid::OpticalDisc::SuperVideoCd0x08A Super Video Compact Disc (SVCD)
Solid::OpticalDisc::VideoDvd0x10A Video Digital Versatile Disc (DVD-Video)
Solid::OpticalDisc::VideoBluRay0x20 

The ContentTypes type is a typedef for QFlags<ContentType>. It stores an OR combination of ContentType values.

enum OpticalDisc::DiscType

This enum type defines the type of optical disc it can be.

ConstantValueDescription
Solid::OpticalDisc::UnknownDiscType-1An undetermined disc type
Solid::OpticalDisc::CdRom0A Compact Disc Read-Only Memory (CD-ROM)
Solid::OpticalDisc::CdRecordable1A Compact Disc Recordable (CD-R)
Solid::OpticalDisc::CdRewritable2A Compact Disc ReWritable (CD-RW)
Solid::OpticalDisc::DvdRom3A Digital Versatile Disc Read-Only Memory (DVD-ROM)
Solid::OpticalDisc::DvdRam4A Digital Versatile Disc Random Access Memory (DVD-RAM)
Solid::OpticalDisc::DvdRecordable5A Digital Versatile Disc Recordable (DVD-R)
Solid::OpticalDisc::DvdRewritable6A Digital Versatile Disc ReWritable (DVD-RW)
Solid::OpticalDisc::DvdPlusRecordable7A Digital Versatile Disc Recordable (DVD+R)
Solid::OpticalDisc::DvdPlusRewritable8A Digital Versatile Disc ReWritable (DVD+RW)
Solid::OpticalDisc::DvdPlusRecordableDuallayer9A Digital Versatile Disc Recordable Dual-Layer (DVD+R DL)
Solid::OpticalDisc::DvdPlusRewritableDuallayer10A Digital Versatile Disc ReWritable Dual-Layer (DVD+RW DL)
Solid::OpticalDisc::BluRayRom11A Blu-ray Disc (BD)
Solid::OpticalDisc::BluRayRecordable12A Blu-ray Disc Recordable (BD-R)
Solid::OpticalDisc::BluRayRewritable13A Blu-ray Disc (BD-RE)
Solid::OpticalDisc::HdDvdRom14: A High Density Digital Versatile Disc (HD DVD)
Solid::OpticalDisc::HdDvdRecordable15A High Density Digital Versatile Disc Recordable (HD DVD-R)
Solid::OpticalDisc::HdDvdRewritable16A High Density Digital Versatile Disc ReWritable (HD DVD-RW)

Property Documentation

[read-only] appendable : const bool

Access functions:

bool isAppendable() const

[read-only] availableContent : const ContentTypes

Access functions:

Solid::OpticalDisc::ContentTypes availableContent() const

[read-only] blank : const bool

Access functions:

bool isBlank() const

[read-only] capacity : const qulonglong

Access functions:

qulonglong capacity() const

[read-only] discType : const DiscType

Access functions:

Solid::OpticalDisc::DiscType discType() const

[read-only] rewritable : const bool

Access functions:

bool isRewritable() const

Member Function Documentation

Solid::OpticalDisc::ContentTypes OpticalDisc::availableContent() const

Retrieves the content types this disc contains (audio, video, data...).

Returns the flag set indicating the available contents

Note: Getter function for property availableContent.

See also Solid::OpticalDisc::ContentType.

qulonglong OpticalDisc::capacity() const

Retrieves the disc capacity (that is the maximum size of a volume could have on this disc).

Returns the capacity of the disc in bytes

Note: Getter function for property capacity.

[static] Solid::DeviceInterface::Type OpticalDisc::deviceInterfaceType()

Get the Solid::DeviceInterface::Type of the OpticalDisc device interface.

Returns the OpticalDisc device interface type

See also Solid::Ifaces::Enums::DeviceInterface::Type.

Solid::OpticalDisc::DiscType OpticalDisc::discType() const

Retrieves the disc type (cdr, cdrw...).

Returns the disc type

Note: Getter function for property discType.

bool OpticalDisc::isAppendable() const

Indicates if it's possible to write additional data to the disc.

Returns true if the disc is appendable, false otherwise

Note: Getter function for property appendable.

bool OpticalDisc::isBlank() const

Indicates if the disc is blank.

Returns true if the disc is blank, false otherwise

Note: Getter function for property blank.

bool OpticalDisc::isRewritable() const

Indicates if the disc is rewritable.

A disc is rewritable if you can write on it several times.

Returns true if the disc is rewritable, false otherwise

Note: Getter function for property rewritable.