File indexing completed on 2024-04-21 08:44:26

0001 /*
0002  *
0003  * Copyright (C) 2004-2007 Matthias Kretz <kretz@kde.org>
0004  * Copyright (C) by Alexander Kern <alex.kern@gmx.de>
0005  *
0006  * This library is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU Library General Public
0008  * License as published by the Free Software Foundation; either
0009  * version 2 of the License, or (at your option) any later version.
0010  *
0011  * This library is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0014  * Library General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Library General Public
0017  * License along with this library; if not, write to the Free
0018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
0019  *
0020  *
0021  * CDDA version taken from guitest in phonon test directory
0022  */
0023 
0024 #ifndef PHONON_INTERFACE_H
0025 #define PHONON_INTERFACE_H
0026 
0027 #include "kcompactdisc_p.h"
0028 #include <phonon/phononnamespace.h>
0029 
0030 class ProducerWidget;
0031 
0032 class KPhononCompactDiscPrivate : public KCompactDiscPrivate
0033 {
0034     Q_OBJECT
0035 
0036     public:
0037         KPhononCompactDiscPrivate(KCompactDisc *, const QString &);
0038         ~KPhononCompactDiscPrivate() override;
0039 
0040         bool createInterface() override;
0041     
0042         unsigned trackLength(unsigned) override;
0043         bool isTrackAudio(unsigned) override;
0044         void playTrackPosition(unsigned, unsigned) override;
0045         void pause() override;
0046         void stop() override;
0047         void eject() override;
0048         void closetray() override;
0049     
0050         void setVolume(unsigned) override;
0051         void setBalance(unsigned) override;
0052         unsigned volume() override;
0053         unsigned balance() override;
0054 
0055         void queryMetadata() override;
0056 
0057 
0058     private:
0059         ProducerWidget *m_producerWidget;
0060         ProducerWidget *producer();
0061         QString m_udi;
0062 
0063         KCompactDisc::DiscStatus discStatusTranslate(Phonon::State);
0064 
0065     public Q_SLOTS:
0066         void tick(qint64);
0067         void stateChanged(Phonon::State, Phonon::State);
0068 };
0069 
0070 #endif // PHONON_INTERFACE_H