summaryrefslogtreecommitdiff
path: root/src/model/pulsemodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/pulsemodel.h')
-rw-r--r--src/model/pulsemodel.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/model/pulsemodel.h b/src/model/pulsemodel.h
index c1d4561..d0e93b4 100644
--- a/src/model/pulsemodel.h
+++ b/src/model/pulsemodel.h
@@ -11,6 +11,13 @@
class PulseDevice;
+// ---- shared port struct -----------------------------------------------------
+
+struct PulseDevicePort {
+ TQString name;
+ TQString description;
+};
+
// ---- card data structures ---------------------------------------------------
struct PulseCardProfile {
@@ -66,6 +73,17 @@ public:
const PulseCardInfo *card( uint32_t index ) const;
void setCardProfile( uint32_t cardIndex, const TQString &profileName );
+ struct DevicePortInfo {
+ uint32_t paIndex;
+ TQString description;
+ TQString activePort;
+ TQValueList<PulseDevicePort> ports;
+ };
+ TQValueList<DevicePortInfo> sinksForCard( uint32_t cardIndex ) const;
+ TQValueList<DevicePortInfo> sourcesForCard( uint32_t cardIndex ) const;
+ void setSinkPort( uint32_t sinkPaIndex, const TQString &portName );
+ void setSourcePort( uint32_t sourcePaIndex, const TQString &portName );
+
protected:
void customEvent( TQCustomEvent *e );
@@ -80,6 +98,9 @@ signals:
void cardRemoved( uint32_t index );
void cardUpdated( uint32_t index );
+ void sinkUpdated( uint32_t paIndex );
+ void sourceUpdated( uint32_t paIndex );
+
private slots:
void reconnect();
@@ -116,6 +137,13 @@ private:
TQValueList<PulseCardInfo> m_cards;
+ TQMap<uint32_t, uint32_t> m_sinkCard;
+ TQMap<uint32_t, TQString> m_sinkActivePort;
+ TQMap<uint32_t, TQValueList<PulseDevicePort>> m_sinkPorts;
+ TQMap<uint32_t, uint32_t> m_sourceCard;
+ TQMap<uint32_t, TQString> m_sourceActivePort;
+ TQMap<uint32_t, TQValueList<PulseDevicePort>> m_sourcePorts;
+
PulseDevice *findDevice( TQPtrList<PulseDevice> &list, uint32_t paIndex );
PulseCardInfo *findCard( uint32_t index );
};