PulseAudio Qt Bindings

profile.h
1/*
2 SPDX-FileCopyrightText: 2014-2015 Harald Sitter <sitter@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef PROFILE_H
8#define PROFILE_H
9
10#include "pulseaudioqt_export.h"
11#include "pulseobject.h"
12#include <QObject>
13#include <QString>
14
15namespace PulseAudioQt
16{
17/**
18 * A PulseAudio profile.
19 */
20class PULSEAUDIOQT_EXPORT Profile : public PulseObject
21{
22 Q_OBJECT
23 Q_PROPERTY(QString description READ description NOTIFY descriptionChanged)
24 Q_PROPERTY(quint32 priority READ priority NOTIFY priorityChanged)
25 Q_PROPERTY(Availability availability READ availability NOTIFY availabilityChanged)
26 Q_PROPERTY(quint32 sinkCount READ sinkCount NOTIFY sinkCountChanged)
27 Q_PROPERTY(quint32 sourceCount READ sourceCount NOTIFY sourceCountChanged)
28
29public:
30 enum Availability {
31 Unknown,
32 Available,
33 Unavailable
34 };
35 Q_ENUM(Availability)
36
37 ~Profile() override;
38
39 /**
40 * A human readable description.
41 */
42 QString description() const;
43
44 /**
45 * This object's priority. A higher number means higher priority.
46 */
47 quint32 priority() const;
48
49 /**
50 * Whether this object is available.
51 */
52 Availability availability() const;
53
54 /**
55 * Number of sinks this profile would create.
56 */
57 quint32 sinkCount() const;
58
59 /**
60 * Number of sources this profile would create.
61 */
62 quint32 sourceCount() const;
63
64Q_SIGNALS:
65 /**
66 * Emitted when the description changed.
67 */
69
70 /**
71 * Emitted when the priority changed.
72 */
74
75 /**
76 * Emitted when the availability changed.
77 */
79
80 /**
81 * Emitted when sink count is changed.
82 */
84
85 /**
86 * Emitted when source count is changed.
87 */
89
90protected:
91 /** @private */
92 explicit Profile(QObject *parent);
93 /** @private */
94 std::unique_ptr<class ProfilePrivate> d;
95
96 friend class Device;
97 friend class CardPrivate;
98 friend class PortPrivate;
99};
100
101} // PulseAudioQt
102
103#endif // PROFILE_H
A PulseAudio device.
Definition device.h:25
A PulseAudio profile.
Definition profile.h:21
void priorityChanged()
Emitted when the priority changed.
void sinkCountChanged()
Emitted when sink count is changed.
void sourceCountChanged()
Emitted when source count is changed.
void availabilityChanged()
Emitted when the availability changed.
void descriptionChanged()
Emitted when the description changed.
Base class for most PulseAudio objects.
Definition pulseobject.h:25
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 Sat Dec 21 2024 16:57:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.