PulseAudio Qt Bindings

profile.h
1 /*
2  SPDX-FileCopyrightText: 2014-2015 Harald Sitter <[email protected]>
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 
15 namespace PulseAudioQt
16 {
17 /**
18  * A PulseAudio profile.
19  */
20 class 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 
29 public:
30  enum Availability { Unknown, Available, Unavailable };
31  Q_ENUM(Availability)
32 
33  ~Profile();
34 
35  /**
36  * A human readable description.
37  */
38  QString description() const;
39 
40  /**
41  * This object's priority. A higher number means higher priority.
42  */
43  quint32 priority() const;
44 
45  /**
46  * Whether this object is available.
47  */
48  Availability availability() const;
49 
50  /**
51  * Number of sinks this profile would create.
52  */
53  quint32 sinkCount() const;
54 
55  /**
56  * Number of sources this profile would create.
57  */
58  quint32 sourceCount() const;
59 
60 Q_SIGNALS:
61  /**
62  * Emitted when the description changed.
63  */
64  void descriptionChanged();
65 
66  /**
67  * Emitted when the priority changed.
68  */
69  void priorityChanged();
70 
71  /**
72  * Emitted when the availability changed.
73  */
74  void availabilityChanged();
75 
76  /**
77  * Emitted when sink count is changed.
78  */
79  void sinkCountChanged();
80 
81  /**
82  * Emitted when source count is changed.
83  */
84  void sourceCountChanged();
85 
86 protected:
87  /** @private */
88  explicit Profile(QObject *parent);
89  /** @private */
90  class ProfilePrivate *const d;
91 
92  friend class Device;
93  friend class CardPrivate;
94  friend class PortPrivate;
95 };
96 
97 } // PulseAudioQt
98 
99 #endif // PROFILE_H
Base class for most PulseAudio objects.
Definition: pulseobject.h:24
A PulseAudio device.
Definition: device.h:23
A PulseAudio profile.
Definition: profile.h:20
The primary namespace of PulseAudioQt.
Definition: card.cpp:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 23 2023 04:12:56 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.