1 | /* This file is part of the KDE project |
2 | Copyright (C) 2009 Colin Guthrie <cguthrie@mandriva.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_PULSESUPPORT_H |
24 | #define PHONON_PULSESUPPORT_H |
25 | |
26 | #include "phonon_export.h" |
27 | #include "phononnamespace.h" |
28 | #include "objectdescription.h" |
29 | |
30 | #include <QtCore/QtGlobal> |
31 | #include <QtCore/QSet> |
32 | |
33 | QT_BEGIN_HEADER |
34 | QT_BEGIN_NAMESPACE |
35 | |
36 | namespace Phonon |
37 | { |
38 | class PHONON_EXPORT PulseSupport : public QObject |
39 | { |
40 | Q_OBJECT |
41 | public: |
42 | static PulseSupport* getInstance(); |
43 | static void shutdown(); |
44 | |
45 | bool isActive(); |
46 | void enable(bool enabled = true); |
47 | |
48 | QList<int> objectDescriptionIndexes(ObjectDescriptionType type) const; |
49 | QHash<QByteArray, QVariant> objectDescriptionProperties(ObjectDescriptionType type, int index) const; |
50 | QList<int> objectIndexesByCategory(ObjectDescriptionType type, Category category) const; |
51 | |
52 | void setOutputDevicePriorityForCategory(Category category, QList<int> order); |
53 | void setCaptureDevicePriorityForCategory(Category category, QList<int> order); |
54 | |
55 | void setStreamPropList(Category category, QString streamUuid); |
56 | void emitObjectDescriptionChanged(ObjectDescriptionType); |
57 | void emitUsingDevice(QString streamUuid, int device); |
58 | |
59 | bool setOutputDevice(QString streamUuid, int device); |
60 | bool setCaptureDevice(QString streamUuid, int device); |
61 | void clearStreamCache(QString streamUuid); |
62 | |
63 | signals: |
64 | void objectDescriptionChanged(ObjectDescriptionType); |
65 | void usingDevice(QString streamUuid, int device); |
66 | |
67 | private: |
68 | PulseSupport(); |
69 | ~PulseSupport(); |
70 | |
71 | bool mEnabled; |
72 | }; |
73 | } // namespace Phonon |
74 | |
75 | QT_END_NAMESPACE |
76 | QT_END_HEADER |
77 | |
78 | #endif // PHONON_PULSESUPPORT_H |
79 | |