summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudiodeviceinfo.h
diff options
context:
space:
mode:
authorJustin McPherson <justin.mcpherson@nokia.com>2009-09-24 01:55:52 (GMT)
committerJustin McPherson <justin.mcpherson@nokia.com>2009-09-24 02:40:13 (GMT)
commitfb50411e4c0c132631f8237933fbb0972fa4c9aa (patch)
tree89aa19161710ccf0d2c0e11c0494ddef893eb19c /src/multimedia/audio/qaudiodeviceinfo.h
parent609dd32580b1e07213a2b2efdd4d854c34e8f6d7 (diff)
downloadQt-fb50411e4c0c132631f8237933fbb0972fa4c9aa.zip
Qt-fb50411e4c0c132631f8237933fbb0972fa4c9aa.tar.gz
Qt-fb50411e4c0c132631f8237933fbb0972fa4c9aa.tar.bz2
AudioService API changes; QString->const QString&, remove QAudioDeviceId use QAudioDeviceInfo.
Reviewed-by: Bill King
Diffstat (limited to 'src/multimedia/audio/qaudiodeviceinfo.h')
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo.h32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/multimedia/audio/qaudiodeviceinfo.h b/src/multimedia/audio/qaudiodeviceinfo.h
index b6adb85..53b9904 100644
--- a/src/multimedia/audio/qaudiodeviceinfo.h
+++ b/src/multimedia/audio/qaudiodeviceinfo.h
@@ -52,7 +52,7 @@
#include <QtMultimedia/qaudio.h>
#include <QtMultimedia/qaudioformat.h>
-#include <QtMultimedia/qaudiodeviceid.h>
+
QT_BEGIN_HEADER
@@ -60,17 +60,22 @@ QT_BEGIN_NAMESPACE
QT_MODULE(Multimedia)
+class QAudioDeviceFactory;
-class QAbstractAudioDeviceInfo;
-
-class Q_MULTIMEDIA_EXPORT QAudioDeviceInfo : public QObject
+class QAudioDeviceInfoPrivate;
+class Q_MULTIMEDIA_EXPORT QAudioDeviceInfo
{
- Q_OBJECT
+ friend class QAudioDeviceFactory;
public:
- explicit QAudioDeviceInfo(const QAudioDeviceId &id, QObject *parent = 0);
+ QAudioDeviceInfo();
+ QAudioDeviceInfo(const QAudioDeviceInfo& other);
~QAudioDeviceInfo();
+ QAudioDeviceInfo& operator=(const QAudioDeviceInfo& other);
+
+ bool isNull() const;
+
QString deviceName() const;
bool isFormatSupported(const QAudioFormat &format) const;
@@ -84,19 +89,24 @@ public:
QList<QAudioFormat::Endian> supportedByteOrders() const;
QList<QAudioFormat::SampleType> supportedSampleTypes() const;
- static QAudioDeviceId defaultInputDevice();
- static QAudioDeviceId defaultOutputDevice();
+ static QAudioDeviceInfo defaultInputDevice();
+ static QAudioDeviceInfo defaultOutputDevice();
- static QList<QAudioDeviceId> deviceList(QAudio::Mode mode);
+ static QList<QAudioDeviceInfo> deviceList(QAudio::Mode mode);
private:
- Q_DISABLE_COPY(QAudioDeviceInfo)
+ QAudioDeviceInfo(const QString &realm, const QByteArray &handle, QAudio::Mode mode);
+ QString realm() const;
+ QByteArray handle() const;
+ QAudio::Mode mode() const;
- QAbstractAudioDeviceInfo* d;
+ QSharedDataPointer<QAudioDeviceInfoPrivate> d;
};
QT_END_NAMESPACE
QT_END_HEADER
+Q_DECLARE_METATYPE(QAudioDeviceInfo)
+
#endif // QAUDIODEVICEINFO_H