PulseAudio Qt Bindings

server.h
1 /*
2  SPDX-FileCopyrightText: 2016 David Rosca <[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 SERVER_H
8 #define SERVER_H
9 
10 #include "pulseaudioqt_export.h"
11 #include <QObject>
12 
13 namespace PulseAudioQt
14 {
15 class Sink;
16 class Source;
17 class Context;
18 
19 class PULSEAUDIOQT_EXPORT Server : public QObject
20 {
21  Q_OBJECT
22 
23 public:
24  ~Server();
25 
26  Sink *defaultSink() const;
27  void setDefaultSink(Sink *sink);
28 
29  Source *defaultSource() const;
30  void setDefaultSource(Source *source);
31 
32  /**
33  * Whether PulseAudio is provided via pipewire-pulse.
34  */
35  bool isPipeWire() const;
36 
37 Q_SIGNALS:
38  void defaultSinkChanged(PulseAudioQt::Sink *sink);
39  void defaultSourceChanged(PulseAudioQt::Source *source);
40  void isPipeWireChanged();
41 
42 private:
43  explicit Server(Context *context);
44 
45  void reset();
46  void updateDefaultDevices();
47 
48  class ServerPrivate *const d;
49 
50  friend class ServerPrivate;
51  friend class Context;
52  friend class ContextPrivate;
53 };
54 
55 } // PulseAudioQt
56 
57 #endif // CONTEXT_H
KGuiItem reset()
The primary namespace of PulseAudioQt.
Definition: card.cpp:16
A PulseAudio source.
Definition: source.h:19
A PulseAudio sink.
Definition: sink.h:19
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jun 25 2022 06:12:40 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.