mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
solid: implement optical disc capacity information
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
1fc9e7ab3a
commit
009921250e
1 changed files with 31 additions and 2 deletions
|
@ -48,9 +48,38 @@ OpticalDisc::~OpticalDisc()
|
|||
|
||||
qulonglong OpticalDisc::capacity() const
|
||||
{
|
||||
// TODO: implement
|
||||
switch (discType()) {
|
||||
case Solid::OpticalDisc::CdRom:
|
||||
case Solid::OpticalDisc::CdRecordable:
|
||||
case Solid::OpticalDisc::CdRewritable:
|
||||
return (qulonglong(700) * 1024 * 1024);
|
||||
// for reference:
|
||||
// https://www.blue-ray.com/aboutBlu-ray.html
|
||||
case Solid::OpticalDisc::DvdRom:
|
||||
case Solid::OpticalDisc::DvdRam:
|
||||
case Solid::OpticalDisc::DvdRecordable:
|
||||
case Solid::OpticalDisc::DvdRewritable:
|
||||
case Solid::OpticalDisc::DvdPlusRecordable:
|
||||
case Solid::OpticalDisc::DvdPlusRewritable:
|
||||
return (qulonglong(4700) * 1024 * 1024);
|
||||
case Solid::OpticalDisc::DvdPlusRecordableDuallayer:
|
||||
case Solid::OpticalDisc::DvdPlusRewritableDuallayer:
|
||||
return (qulonglong(9400) * 1024 * 1024);
|
||||
case Solid::OpticalDisc::HdDvdRom:
|
||||
case Solid::OpticalDisc::HdDvdRecordable:
|
||||
case Solid::OpticalDisc::HdDvdRewritable:
|
||||
return (qulonglong(15000) * 1024 * 1024);
|
||||
// no dual layer enums
|
||||
case Solid::OpticalDisc::BluRayRom:
|
||||
case Solid::OpticalDisc::BluRayRecordable:
|
||||
case Solid::OpticalDisc::BluRayRewritable:
|
||||
return (qulonglong(25000) * 1024 * 1024);
|
||||
// no dual/tripple/quadruple layer enums
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
|
||||
bool OpticalDisc::isRewritable() const
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue