PulseAudio Qt Bindings

streamrestore.h
1/*
2 SPDX-FileCopyrightText: 2016 David Rosca <nowrep@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef STREAMRESTORE_H
8#define STREAMRESTORE_H
9
10#include "pulseobject.h"
11
12struct pa_ext_stream_restore_info;
13
14namespace PulseAudioQt
15{
16class PULSEAUDIOQT_EXPORT StreamRestore : public PulseObject
17{
18 Q_OBJECT
19 Q_PROPERTY(QString device READ device WRITE setDevice NOTIFY deviceChanged)
20 Q_PROPERTY(qint64 volume READ volume WRITE setVolume NOTIFY volumeChanged)
21 Q_PROPERTY(bool muted READ isMuted WRITE setMuted NOTIFY mutedChanged)
22 Q_PROPERTY(bool hasVolume READ hasVolume CONSTANT)
23 Q_PROPERTY(bool volumeWritable READ isVolumeWritable CONSTANT)
24 Q_PROPERTY(QVector<QString> channels READ channels NOTIFY channelsChanged)
25 Q_PROPERTY(QVector<qreal> channelVolumes READ channelVolumes NOTIFY channelVolumesChanged)
26 Q_PROPERTY(quint32 deviceIndex READ deviceIndex WRITE setDeviceIndex NOTIFY deviceIndexChanged)
27 // Not a IndexedPulseObject since pa_ext_stream_restore_info does not have an index member
28 Q_PROPERTY(quint32 index READ index CONSTANT)
29
30public:
31 ~StreamRestore();
32
33 QString device() const;
34 void setDevice(const QString &device);
35
36 qint64 volume() const;
37 void setVolume(qint64 volume);
38
39 bool isMuted() const;
40 void setMuted(bool muted);
41
42 bool hasVolume() const;
43 bool isVolumeWritable() const;
44
45 QVector<QString> channels() const;
46
47 QVector<qreal> channelVolumes() const;
48
49 quint32 index() const;
50
51 quint32 deviceIndex() const;
52 void setDeviceIndex(quint32 deviceIndex);
53
54 void setChannelVolume(int channel, qint64 volume);
55
56Q_SIGNALS:
57 void deviceChanged();
58 void volumeChanged();
59 void mutedChanged();
60 void channelsChanged();
61 void channelVolumesChanged();
62 void deviceIndexChanged();
63
64private:
65 explicit StreamRestore(quint32 index, const QVariantMap &properties, QObject *parent);
66
67 class StreamRestorePrivate *const d;
68 friend class MapBase<StreamRestore, pa_ext_stream_restore_info>;
69 friend class ContextPrivate;
70};
71
72} // PulseAudioQt
73
74#endif // STREAMRESTORE_H
void setVolume(qreal volume)
The primary namespace of PulseAudioQt.
Definition card.cpp:17
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:07 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.