• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Solid

opticaldrive.h

Go to the documentation of this file.
00001 /*  This file is part of the KDE project
00002     Copyright (C) 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 Library General Public
00006     License version 2 as published by the Free Software Foundation.
00007 
00008     This library is distributed in the hope that it will be useful,
00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011     Library General Public License for more details.
00012 
00013     You should have received a copy of the GNU Library General Public License
00014     along with this library; see the file COPYING.LIB.  If not, write to
00015     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016     Boston, MA 02110-1301, USA.
00017 
00018 */
00019 
00020 #ifndef SOLID_OPTICALDRIVE_H
00021 #define SOLID_OPTICALDRIVE_H
00022 
00023 #include <QtCore/QList>
00024 #include <QtCore/QVariant>
00025 
00026 #include <solid/solid_export.h>
00027 #include <solid/solidnamespace.h>
00028 
00029 #include <solid/storagedrive.h>
00030 
00031 namespace Solid
00032 {
00033     class OpticalDrivePrivate;
00034     class Device;
00035 
00041     class SOLID_EXPORT OpticalDrive : public StorageDrive
00042     {
00043         Q_OBJECT
00044         Q_ENUMS(MediumType)
00045         Q_FLAGS(MediumTypes)
00046         Q_PROPERTY(MediumTypes supportedMedia READ supportedMedia)
00047         Q_PROPERTY(int readSpeed READ readSpeed)
00048         Q_PROPERTY(int writeSpeed READ writeSpeed)
00049         Q_PROPERTY(QList<int> writeSpeeds READ writeSpeeds)
00050         Q_DECLARE_PRIVATE(OpticalDrive)
00051         friend class Device;
00052 
00053     public:
00074         enum MediumType { Cdr=0x00001, Cdrw=0x00002, Dvd=0x00004, Dvdr=0x00008,
00075                           Dvdrw=0x00010, Dvdram=0x00020, Dvdplusr=0x00040,
00076                           Dvdplusrw=0x00080, Dvdplusdl=0x00100, Dvdplusdlrw=0x00200,
00077                           Bd=0x00400, Bdr=0x00800, Bdre=0x01000,
00078                           HdDvd=0x02000, HdDvdr=0x04000, HdDvdrw=0x08000 };
00079 
00083         Q_DECLARE_FLAGS(MediumTypes, MediumType)
00084 
00085 
00086     private:
00095         explicit OpticalDrive(QObject *backendObject);
00096 
00097     public:
00101         virtual ~OpticalDrive();
00102 
00103 
00110         static Type deviceInterfaceType() { return DeviceInterface::OpticalDrive; }
00111 
00112 
00118         MediumTypes supportedMedia() const;
00119 
00125         int readSpeed() const;
00126 
00132         int writeSpeed() const;
00133 
00140         QList<int> writeSpeeds() const;
00141 
00148         bool eject();
00149 
00150     Q_SIGNALS:
00158         void ejectPressed(const QString &udi);
00159 
00160         void ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi);
00161 
00162     };
00163 }
00164 
00165 Q_DECLARE_OPERATORS_FOR_FLAGS(Solid::OpticalDrive::MediumTypes)
00166 
00167 #endif // SOLID_OPTICALDRIVE_H

Solid

Skip menu "Solid"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal