File indexing completed on 2025-02-09 05:31:48
0001 /* This file is part of the KDE project 0002 Copyright (C) 2006-2008 Matthias Kretz <kretz@kde.org> 0003 0004 This library is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU Lesser General Public 0006 License as published by the Free Software Foundation; either 0007 version 2.1 of the License, or (at your option) version 3, or any 0008 later version accepted by the membership of KDE e.V. (or its 0009 successor approved by the membership of KDE e.V.), Nokia Corporation 0010 (or its successors, if any) and the KDE Free Qt Foundation, which shall 0011 act as a proxy defined in Section 6 of version 3 of the license. 0012 0013 This library is distributed in the hope that it will be useful, 0014 but WITHOUT ANY WARRANTY; without even the implied warranty of 0015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0016 Lesser General Public License for more details. 0017 0018 You should have received a copy of the GNU Lesser General Public 0019 License along with this library. If not, see <http://www.gnu.org/licenses/>. 0020 0021 */ 0022 0023 #ifndef PHONON_GLOBALCONFIG_H 0024 #define PHONON_GLOBALCONFIG_H 0025 0026 #include "phonon_export.h" 0027 #include "phononnamespace.h" 0028 #include "phonondefs.h" 0029 #include "objectdescription.h" 0030 0031 0032 namespace Phonon 0033 { 0034 class GlobalConfigPrivate; 0035 0036 class PHONON_EXPORT GlobalConfig 0037 { 0038 P_DECLARE_PRIVATE(GlobalConfig) 0039 public: 0040 GlobalConfig(); 0041 virtual ~GlobalConfig(); 0042 0043 enum DevicesToHideFlag { 0044 ShowUnavailableDevices = 0, 0045 ShowAdvancedDevices = 0, 0046 HideAdvancedDevices = 1, 0047 AdvancedDevicesFromSettings = 2, 0048 HideUnavailableDevices = 4 0049 }; 0050 bool hideAdvancedDevices() const; 0051 void setHideAdvancedDevices(bool hide = true); 0052 0053 QHash<QByteArray, QVariant> deviceProperties(ObjectDescriptionType deviceType, int index) const; 0054 0055 void setAudioOutputDeviceListFor(Category category, QList<int> order); 0056 QList<int> audioOutputDeviceListFor(Category category, int override = AdvancedDevicesFromSettings) const; 0057 int audioOutputDeviceFor(Category category, int override = AdvancedDevicesFromSettings) const; 0058 QHash<QByteArray, QVariant> audioOutputDeviceProperties(int index) const; 0059 0060 #ifndef PHONON_NO_VIDEOCAPTURE 0061 void setVideoCaptureDeviceListFor(CaptureCategory category, QList<int> order); 0062 QList<int> videoCaptureDeviceListFor(CaptureCategory category, int override = AdvancedDevicesFromSettings) const; 0063 int videoCaptureDeviceFor(CaptureCategory category, int override = AdvancedDevicesFromSettings) const; 0064 QHash<QByteArray, QVariant> videoCaptureDeviceProperties(int index) const; 0065 0066 PHONON_DEPRECATED void setVideoCaptureDeviceListFor(Category category, QList<int> order); 0067 PHONON_DEPRECATED QList<int> videoCaptureDeviceListFor(Category category, int override = AdvancedDevicesFromSettings) const; 0068 PHONON_DEPRECATED int videoCaptureDeviceFor(Category category, int override = AdvancedDevicesFromSettings) const; 0069 #endif //PHONON_NO_VIDEOCAPTURE 0070 0071 #ifndef PHONON_NO_AUDIOCAPTURE 0072 void setAudioCaptureDeviceListFor(CaptureCategory category, QList<int> order); 0073 QList<int> audioCaptureDeviceListFor(CaptureCategory category, int override = AdvancedDevicesFromSettings) const; 0074 int audioCaptureDeviceFor(CaptureCategory category, int override = AdvancedDevicesFromSettings) const; 0075 QHash<QByteArray, QVariant> audioCaptureDeviceProperties(int index) const; 0076 0077 PHONON_DEPRECATED void setAudioCaptureDeviceListFor(Category category, QList<int> order); 0078 PHONON_DEPRECATED QList<int> audioCaptureDeviceListFor(Category category, int override = AdvancedDevicesFromSettings) const; 0079 PHONON_DEPRECATED int audioCaptureDeviceFor(Category category, int override = AdvancedDevicesFromSettings) const; 0080 #endif //PHONON_NO_AUDIOCAPTURE 0081 0082 protected: 0083 GlobalConfigPrivate *const k_ptr; 0084 }; 0085 } // namespace Phonon 0086 0087 0088 #endif // PHONON_GLOBALCONFIG_H