File indexing completed on 2024-12-08 12:46:54
0001 /* 0002 SPDX-FileCopyrightText: 2014-2015 Harald Sitter <sitter@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef CARD_H 0008 #define CARD_H 0009 0010 #include "cardport.h" 0011 #include "indexedpulseobject.h" 0012 #include "profile.h" 0013 #include "sink.h" 0014 #include "source.h" 0015 0016 struct pa_card_info; 0017 0018 namespace PulseAudioQt 0019 { 0020 class CardPort; 0021 class Profile; 0022 0023 class PULSEAUDIOQT_EXPORT Card : public IndexedPulseObject 0024 { 0025 Q_OBJECT 0026 Q_PROPERTY(QList<Profile *> profiles READ profiles NOTIFY profilesChanged) 0027 Q_PROPERTY(quint32 activeProfileIndex READ activeProfileIndex WRITE setActiveProfileIndex NOTIFY activeProfileIndexChanged) 0028 Q_PROPERTY(QList<CardPort *> ports READ ports NOTIFY portsChanged) 0029 Q_PROPERTY(QList<Sink *> sinks READ sinks NOTIFY sinksChanged) 0030 Q_PROPERTY(QList<Source *> sources READ sources NOTIFY sourcesChanged) 0031 0032 public: 0033 ~Card(); 0034 0035 QList<Profile *> profiles() const; 0036 quint32 activeProfileIndex() const; 0037 void setActiveProfileIndex(quint32 profileIndex); 0038 QList<CardPort *> ports() const; 0039 QList<Sink *> sinks() const; 0040 QList<Source *> sources() const; 0041 0042 Q_SIGNALS: 0043 void profilesChanged(); 0044 void activeProfileIndexChanged(); 0045 void portsChanged(); 0046 void sinksChanged(); 0047 void sourcesChanged(); 0048 0049 private: 0050 explicit Card(QObject *parent); 0051 0052 class CardPrivate *const d; 0053 friend class MapBase<Card, pa_card_info>; 0054 }; 0055 0056 } // PulseAudioQt 0057 0058 #endif // CARD_H