File indexing completed on 2021-12-21 13:33:28
0001 /* 0002 * Kscd - A simple cd player for the KDE Project 0003 * 0004 * Copyright (c) 1997 Bernd Johannes wuebben@math.cornell.edu 0005 * Copyright (c) 2002-2003 Aaron J. Seigo <aseigo@kde.org> 0006 * Copyright (c) 2004 Alexander Kern <alex.kern@gmx.de> 0007 * Copyright (c) 2003-2006 Richard Lärkäng <nouseforaname@home.se> 0008 * 0009 * -------------- 0010 * ISI KsCD Team : 0011 * -------------- 0012 * Bouchikhi Mohamed-Amine <bouchikhi.amine@gmail.com> 0013 * Gastellu Sylvain 0014 * ----------------------------------------------------------------------------- 0015 * 0016 * This program is free software; you can redistribute it and/or modify 0017 * it under the terms of the GNU General Public License as published by 0018 * the Free Software Foundation; either version 2, or (at your option) 0019 * any later version. 0020 * 0021 * This program is distributed in the hope that it will be useful, 0022 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0024 * GNU General Public License for more details. 0025 * 0026 * You should have received a copy of the GNU General Public License 0027 * along with this program; if not, write to the Free Software 0028 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0029 * 0030 */ 0031 #ifndef AUDIOCD 0032 #define AUDIOCD 0033 0034 #include <solid/opticaldisc.h> 0035 #include <solid/device.h> 0036 #include <solid/opticaldrive.h> 0037 #include <solid/block.h> 0038 #include <solid/devicenotifier.h> 0039 #include <QString> 0040 #include <phonon/mediasource.h> 0041 #include <QObject> 0042 0043 0044 class AudioCD: public QObject 0045 { 0046 Q_OBJECT 0047 0048 private: 0049 Solid::DeviceNotifier * bell; 0050 Solid::Device odsign; 0051 Solid::OpticalDrive *cdDrive; 0052 Solid::OpticalDisc *cd; 0053 Solid::Block *block; 0054 Phonon::MediaSource *src; 0055 0056 public: 0057 AudioCD(); 0058 AudioCD(Solid::Device aCd); 0059 ~AudioCD(); 0060 Solid::OpticalDrive * getCdDrive() const; 0061 Solid::OpticalDisc * getCd() const; 0062 Phonon::MediaSource * getMediaSource() const; 0063 QString getCdPath() const; 0064 bool isCdInserted() const; 0065 QString signature() const; 0066 0067 public slots: 0068 void catchEjectPressed(); 0069 void reloadCD(); 0070 0071 signals: 0072 void discChanged (); 0073 }; 0074 0075 #endif