Solid
opticaldrive.cpp
Go to the documentation of this file.
00001 /* 00002 Copyright 2006-2007 Kevin Ottens <ervin@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Lesser General Public 00006 License as published by the Free Software Foundation; either 00007 version 2.1 of the License, or (at your option) version 3, or any 00008 later version accepted by the membership of KDE e.V. (or its 00009 successor approved by the membership of KDE e.V.), which shall 00010 act as a proxy defined in Section 6 of version 3 of the license. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public 00018 License along with this library. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 #include "opticaldrive.h" 00022 #include "opticaldrive_p.h" 00023 00024 #include "soliddefs_p.h" 00025 #include <solid/ifaces/opticaldrive.h> 00026 00027 Solid::OpticalDrive::OpticalDrive(QObject *backendObject) 00028 : StorageDrive(*new OpticalDrivePrivate(), backendObject) 00029 { 00030 connect(backendObject, SIGNAL(ejectPressed(const QString &)), 00031 this, SIGNAL(ejectPressed(const QString &))); 00032 connect(backendObject, SIGNAL(ejectDone(Solid::ErrorType, QVariant, const QString &)), 00033 this, SIGNAL(ejectDone(Solid::ErrorType, QVariant, const QString &))); 00034 connect(backendObject, SIGNAL(ejectRequested(const QString &)), 00035 this, SIGNAL(ejectRequested(const QString &))); 00036 } 00037 00038 Solid::OpticalDrive::~OpticalDrive() 00039 { 00040 00041 } 00042 00043 Solid::OpticalDrive::MediumTypes Solid::OpticalDrive::supportedMedia() const 00044 { 00045 Q_D(const OpticalDrive); 00046 return_SOLID_CALL(Ifaces::OpticalDrive *, d->backendObject(), MediumTypes(), supportedMedia()); 00047 } 00048 00049 int Solid::OpticalDrive::readSpeed() const 00050 { 00051 Q_D(const OpticalDrive); 00052 return_SOLID_CALL(Ifaces::OpticalDrive *, d->backendObject(), 0, readSpeed()); 00053 } 00054 00055 int Solid::OpticalDrive::writeSpeed() const 00056 { 00057 Q_D(const OpticalDrive); 00058 return_SOLID_CALL(Ifaces::OpticalDrive *, d->backendObject(), 0, writeSpeed()); 00059 } 00060 00061 QList<int> Solid::OpticalDrive::writeSpeeds() const 00062 { 00063 Q_D(const OpticalDrive); 00064 return_SOLID_CALL(Ifaces::OpticalDrive *, d->backendObject(), QList<int>(), writeSpeeds()); 00065 } 00066 00067 bool Solid::OpticalDrive::eject() 00068 { 00069 Q_D(OpticalDrive); 00070 return_SOLID_CALL(Ifaces::OpticalDrive *, d->backendObject(), false, eject()); 00071 } 00072 00073 #include "opticaldrive.moc"
KDE 4.6 API Reference