| 1 |
/* This file is part of the KDE project |
| 2 |
Copyright (C) 2005-2006 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_BACKENDCAPABILITIES_H |
| 24 |
#define Phonon_BACKENDCAPABILITIES_H |
| 25 |
|
| 26 |
#include "phonon_export.h" |
| 27 |
#include "objectdescription.h" |
| 28 |
|
| 29 |
#include <QtCore/QObject> |
| 30 |
|
| 31 |
QT_BEGIN_HEADER |
| 32 |
QT_BEGIN_NAMESPACE |
| 33 |
|
| 34 |
#ifdef __QT_SYNCQT__ |
| 35 |
// Tell syncqt that the BackendCapabilities namespace should be treated like a class |
| 36 |
#pragma qt_class(Phonon::BackendCapabilities) |
| 37 |
#pragma qt_sync_stop_processing |
| 38 |
#endif |
| 39 |
|
| 40 |
template<class T> class QList; |
| 41 |
class QStringList; |
| 42 |
|
| 43 |
namespace Phonon |
| 44 |
{ |
| 45 |
|
| 46 |
/** |
| 47 |
* Collection of functions describing the capabilities of the Backend. |
| 48 |
* |
| 49 |
* \ingroup BackendInformation |
| 50 |
* \author Matthias Kretz <kretz@kde.org> |
| 51 |
*/ |
| 52 |
namespace BackendCapabilities |
| 53 |
{ |
| 54 |
/** \class Notifier backendcapabilities.h Phonon/BackendCapabilities |
| 55 |
* Notifications about backend capabilities. |
| 56 |
* |
| 57 |
* \ingroup BackendInformation |
| 58 |
*/ |
| 59 |
class Notifier : public QObject |
| 60 |
{ |
| 61 |
Q_OBJECT |
| 62 |
Q_SIGNALS: |
| 63 |
/** |
| 64 |
* This signal is emitted if the capabilities have changed. This can |
| 65 |
* happen if the user has requested a backend change. |
| 66 |
*/ |
| 67 |
void capabilitiesChanged(); |
| 68 |
|
| 69 |
/** |
| 70 |
* This signal is emitted when audio output devices were plugged or |
| 71 |
* unplugged. |
| 72 |
* |
| 73 |
* Check BackendCapabilities::availableAudioOutputDevices to get the |
| 74 |
* current list of available devices. |
| 75 |
*/ |
| 76 |
void availableAudioOutputDevicesChanged(); |
| 77 |
|
| 78 |
/** |
| 79 |
* This signal is emitted when audio capture devices were plugged or |
| 80 |
* unplugged. |
| 81 |
* |
| 82 |
* Check BackendCapabilities::availableAudioCaptureDevices to get the |
| 83 |
* current list of available devices. |
| 84 |
*/ |
| 85 |
#ifndef QT_NO_PHONON_AUDIOCAPTURE |
| 86 |
void availableAudioCaptureDevicesChanged(); |
| 87 |
#endif //QT_NO_PHONON_AUDIOCAPTURE |
| 88 |
}; |
| 89 |
|
| 90 |
/** |
| 91 |
* Use this function to get a QObject pointer to connect to one of the Notifier signals. |
| 92 |
* |
| 93 |
* \return a pointer to a QObject. |
| 94 |
* |
| 95 |
* To connect to the signal do the following: |
| 96 |
* \code |
| 97 |
* QObject::connect(BackendCapabilities::notifier(), SIGNAL(capabilitiesChanged()), ... |
| 98 |
* \endcode |
| 99 |
* |
| 100 |
* \see Notifier::capabilitiesChanged() |
| 101 |
* \see Notifier::availableAudioOutputDevicesChanged() |
| 102 |
* \see Notifier::availableAudioCaptureDevicesChanged() |
| 103 |
*/ |
| 104 |
PHONON_EXPORT Notifier *notifier(); |
| 105 |
|
| 106 |
/** |
| 107 |
* Returns a list of mime types that the Backend can decode. |
| 108 |
* |
| 109 |
* \see isMimeTypeAvailable() |
| 110 |
*/ |
| 111 |
PHONON_EXPORT QStringList availableMimeTypes(); |
| 112 |
|
| 113 |
/** |
| 114 |
* Often all you want to know is whether one given MIME type can be |
| 115 |
* decoded by the backend. Use this method in favor of availableMimeTypes() |
| 116 |
* as it can give you a negative answer without having a backend loaded. |
| 117 |
* |
| 118 |
* \see availableMimeTypes(); |
| 119 |
*/ |
| 120 |
PHONON_EXPORT bool isMimeTypeAvailable(const QString &mimeType); |
| 121 |
|
| 122 |
/** |
| 123 |
* Returns the audio output devices the backend supports. |
| 124 |
* |
| 125 |
* \return A list of AudioOutputDevice objects that give a name and |
| 126 |
* description for every supported audio output device. |
| 127 |
*/ |
| 128 |
PHONON_EXPORT QList<AudioOutputDevice> availableAudioOutputDevices(); |
| 129 |
|
| 130 |
/** |
| 131 |
* Returns the audio capture devices the backend supports. |
| 132 |
* |
| 133 |
* \return A list of AudioCaptureDevice objects that give a name and |
| 134 |
* description for every supported audio capture device. |
| 135 |
*/ |
| 136 |
#ifndef QT_NO_PHONON_AUDIOCAPTURE |
| 137 |
PHONON_EXPORT QList<AudioCaptureDevice> availableAudioCaptureDevices(); |
| 138 |
#endif //QT_NO_PHONON_AUDIOCAPTURE |
| 139 |
|
| 140 |
/** |
| 141 |
* Returns the video output devices the backend supports. |
| 142 |
* |
| 143 |
* \return A list of VideoOutputDevice objects that give a name and |
| 144 |
* description for every supported video output device. |
| 145 |
*/ |
| 146 |
// PHONON_EXPORT QList<VideoOutputDevice> availableVideoOutputDevices(); |
| 147 |
|
| 148 |
/** |
| 149 |
* Returns the video capture devices the backend supports. |
| 150 |
* |
| 151 |
* \return A list of VideoCaptureDevice objects that give a name and |
| 152 |
* description for every supported video capture device. |
| 153 |
*/ |
| 154 |
// PHONON_EXPORT QList<VideoCaptureDevice> availableVideoCaptureDevices(); |
| 155 |
|
| 156 |
/** |
| 157 |
* Returns the visualization effects the backend supports. |
| 158 |
* |
| 159 |
* \return A list of VisualizationEffect objects that give a name and |
| 160 |
* description for every supported visualization effect. |
| 161 |
*/ |
| 162 |
// PHONON_EXPORT QList<VisualizationDescription> availableVisualizations(); |
| 163 |
|
| 164 |
/** |
| 165 |
* Returns descriptions for the audio effects the backend supports. |
| 166 |
* |
| 167 |
* \return A list of AudioEffectDescription objects that give a name and |
| 168 |
* description for every supported audio effect. |
| 169 |
*/ |
| 170 |
#ifndef QT_NO_PHONON_EFFECT |
| 171 |
PHONON_EXPORT QList<EffectDescription> availableAudioEffects(); |
| 172 |
#endif //QT_NO_PHONON_EFFECT |
| 173 |
|
| 174 |
//X /** |
| 175 |
//X * Returns descriptions for the video effects the backend supports. |
| 176 |
//X * |
| 177 |
//X * \return A list of VideoEffectDescription objects that give a name and |
| 178 |
//X * description for every supported video effect. |
| 179 |
//X */ |
| 180 |
//X PHONON_EXPORT QList<EffectDescription> availableVideoEffects(); |
| 181 |
|
| 182 |
/** |
| 183 |
* Returns descriptions for the audio codecs the backend supports. |
| 184 |
* |
| 185 |
* \return A list of AudioCodec objects that give a name and |
| 186 |
* description for every supported audio codec. |
| 187 |
*/ |
| 188 |
// PHONON_EXPORT QList<AudioCodecDescription> availableAudioCodecs(); |
| 189 |
|
| 190 |
/** |
| 191 |
* Returns descriptions for the video codecs the backend supports. |
| 192 |
* |
| 193 |
* \return A list of VideoCodec objects that give a name and |
| 194 |
* description for every supported video codec. |
| 195 |
*/ |
| 196 |
// PHONON_EXPORT QList<VideoCodecDescription> availableVideoCodecs(); |
| 197 |
|
| 198 |
/** |
| 199 |
* Returns descriptions for the container formats the backend supports. |
| 200 |
* |
| 201 |
* \return A list of ContainerFormat objects that give a name and |
| 202 |
* description for every supported container format. |
| 203 |
*/ |
| 204 |
// PHONON_EXPORT QList<ContainerFormatDescription> availableContainerFormats(); |
| 205 |
} // namespace BackendCapabilities |
| 206 |
} // namespace Phonon |
| 207 |
|
| 208 |
QT_END_NAMESPACE |
| 209 |
QT_END_HEADER |
| 210 |
|
| 211 |
#endif // Phonon_BACKENDCAPABILITIES_H |
| 212 |
// vim: sw=4 ts=4 tw=80 |