Changeset View
Changeset View
Standalone View
Standalone View
src/stream.h
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
46 | public: | 46 | public: | ||
47 | template <typename PAInfo> | 47 | template <typename PAInfo> | ||
48 | void updateStream(const PAInfo *info) | 48 | void updateStream(const PAInfo *info) | ||
49 | { | 49 | { | ||
50 | updateVolumeObject(info); | 50 | updateVolumeObject(info); | ||
51 | 51 | | |||
52 | if (m_name != QString::fromUtf8(info->name)) { | 52 | if (m_name != QString::fromUtf8(info->name)) { | ||
53 | m_name = QString::fromUtf8(info->name); | 53 | m_name = QString::fromUtf8(info->name); | ||
54 | emit nameChanged(); | 54 | Q_EMIT nameChanged(); | ||
55 | } | 55 | } | ||
56 | if (m_hasVolume != info->has_volume) { | 56 | if (m_hasVolume != info->has_volume) { | ||
57 | m_hasVolume = info->has_volume; | 57 | m_hasVolume = info->has_volume; | ||
58 | emit hasVolumeChanged(); | 58 | Q_EMIT hasVolumeChanged(); | ||
59 | } | 59 | } | ||
60 | if (m_volumeWritable != info->volume_writable) { | 60 | if (m_volumeWritable != info->volume_writable) { | ||
61 | m_volumeWritable = info->volume_writable; | 61 | m_volumeWritable = info->volume_writable; | ||
62 | emit isVolumeWritableChanged(); | 62 | Q_EMIT isVolumeWritableChanged(); | ||
63 | } | 63 | } | ||
64 | if (m_clientIndex != info->client) { | 64 | if (m_clientIndex != info->client) { | ||
65 | m_clientIndex = info->client; | 65 | m_clientIndex = info->client; | ||
66 | emit clientChanged(); | 66 | Q_EMIT clientChanged(); | ||
67 | } | 67 | } | ||
68 | if (m_virtualStream != (info->client == PA_INVALID_INDEX)) { | 68 | if (m_virtualStream != (info->client == PA_INVALID_INDEX)) { | ||
69 | m_virtualStream = info->client == PA_INVALID_INDEX; | 69 | m_virtualStream = info->client == PA_INVALID_INDEX; | ||
70 | emit virtualStreamChanged(); | 70 | Q_EMIT virtualStreamChanged(); | ||
71 | } | 71 | } | ||
72 | if (m_corked != info->corked) { | 72 | if (m_corked != info->corked) { | ||
73 | m_corked = info->corked; | 73 | m_corked = info->corked; | ||
74 | emit corkedChanged(); | 74 | Q_EMIT corkedChanged(); | ||
75 | } | 75 | } | ||
76 | } | 76 | } | ||
77 | 77 | | |||
78 | QString name() const; | 78 | QString name() const; | ||
79 | Client *client() const; | 79 | Client *client() const; | ||
80 | bool isVirtualStream() const; | 80 | bool isVirtualStream() const; | ||
81 | quint32 deviceIndex() const; | 81 | quint32 deviceIndex() const; | ||
82 | bool isCorked() const; | 82 | bool isCorked() const; | ||
83 | 83 | | |||
84 | virtual void setDeviceIndex(quint32 deviceIndex) = 0; | 84 | virtual void setDeviceIndex(quint32 deviceIndex) = 0; | ||
85 | 85 | | |||
86 | signals: | 86 | Q_SIGNALS: | ||
87 | void nameChanged(); | 87 | void nameChanged(); | ||
88 | void clientChanged(); | 88 | void clientChanged(); | ||
89 | void virtualStreamChanged(); | 89 | void virtualStreamChanged(); | ||
90 | void deviceIndexChanged(); | 90 | void deviceIndexChanged(); | ||
91 | void corkedChanged(); | 91 | void corkedChanged(); | ||
92 | 92 | | |||
93 | protected: | 93 | protected: | ||
94 | explicit Stream(QObject *parent); | 94 | explicit Stream(QObject *parent); | ||
Show All 14 Lines |