phonon/audiooutputinterface.h Source File

audiooutputinterface.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 2007-2008 Matthias Kretz <kretz@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) version 3, or any
8  later version accepted by the membership of KDE e.V. (or its
9  successor approved by the membership of KDE e.V.), Nokia Corporation
10  (or its successors, if any) and the KDE Free Qt Foundation, which shall
11  act as a proxy defined in Section 6 of version 3 of the license.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library. If not, see <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #ifndef PHONON_AUDIOOUTPUTINTERFACE_H
24 #define PHONON_AUDIOOUTPUTINTERFACE_H
25 
26 #include "phononnamespace.h"
27 #include "objectdescription.h"
28 #include "phonondefs.h"
29 #include <QtCore/QtGlobal>
30 
33 
34 namespace Phonon
35 {
50 {
51  public:
53 
60  virtual qreal volume() const = 0;
70  virtual void setVolume(qreal) = 0;
71 
76  virtual int outputDevice() const = 0;
88  virtual bool setOutputDevice(int) = 0;
89 };
90 
92 {
93  public:
100  virtual bool setOutputDevice(const Phonon::AudioOutputDevice &) = 0;
101 
103 
134 };
135 
136 } // namespace Phonon
137 
138 #ifdef PHONON_BACKEND_VERSION_4_2
139 namespace Phonon { typedef AudioOutputInterface42 AudioOutputInterface; }
140 Q_DECLARE_INTERFACE(Phonon::AudioOutputInterface40, "AudioOutputInterface2.phonon.kde.org")
141 Q_DECLARE_INTERFACE(Phonon::AudioOutputInterface, "3AudioOutputInterface.phonon.kde.org")
142 #else
144 Q_DECLARE_INTERFACE(Phonon::AudioOutputInterface, "AudioOutputInterface2.phonon.kde.org")
145 Q_DECLARE_INTERFACE(Phonon::AudioOutputInterface42, "3AudioOutputInterface.phonon.kde.org")
146 #endif
147 
150 
151 #endif // PHONON_AUDIOOUTPUTINTERFACE_H
#define QT_END_NAMESPACE
Definition: qglobal.h:128
#define QT_BEGIN_HEADER
Definition: qglobal.h:141
AudioOutputInterface40 AudioOutputInterface
virtual void setVolume(qreal)=0
Sets the new current software volume.
virtual bool setOutputDevice(const Phonon::AudioOutputDevice &)=0
Requests to change the current output device.
#define QT_BEGIN_NAMESPACE
Definition: qglobal.h:127
virtual bool setOutputDevice(int)=0
QT_BEGIN_NAMESPACE Q_DECLARE_INTERFACE(QWebKitPlatformPlugin,"com.nokia.Qt.WebKit.PlatformPlugin/1.7")
Provides a tuple of enduser visible name and description.
PHONON_EXPORT QList< QPair< QByteArray, QString > > deviceAccessListFor(const Phonon::AudioOutputDevice &) const
Helper function for backends to get a list of (driver, handle) pairs for AudioOutputDevice objects th...
virtual int outputDevice() const =0
Returns the index of the device that is used.
The KDE Multimedia classes.
Interface for AudioOutput objects.
#define PHONON_EXPORT
Definition: phonon_export.h:38
#define QT_END_HEADER
Definition: qglobal.h:142
virtual qreal volume() const =0
Returns the current software volume.