summaryrefslogtreecommitdiffstats
path: root/src/PulseAudioQt/server.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/PulseAudioQt/server.h')
-rw-r--r--src/PulseAudioQt/server.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/PulseAudioQt/server.h b/src/PulseAudioQt/server.h
new file mode 100644
index 0000000..f388f5c
--- /dev/null
+++ b/src/PulseAudioQt/server.h
@@ -0,0 +1,57 @@
+/*
+ SPDX-FileCopyrightText: 2016 David Rosca <nowrep@gmail.com>
+
+ SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
+*/
+
+#ifndef SERVER_H
+#define SERVER_H
+
+#include "pulseaudioqt_export.h"
+#include <QObject>
+
+namespace PulseAudioQt
+{
+class Sink;
+class Source;
+class Context;
+
+class PULSEAUDIOQT_EXPORT Server : public QObject
+{
+ Q_OBJECT
+
+public:
+ ~Server();
+
+ Sink *defaultSink() const;
+ void setDefaultSink(Sink *sink);
+
+ Source *defaultSource() const;
+ void setDefaultSource(Source *source);
+
+ /**
+ * Whether PulseAudio is provided via pipewire-pulse.
+ */
+ bool isPipeWire() const;
+
+Q_SIGNALS:
+ void defaultSinkChanged(PulseAudioQt::Sink *sink);
+ void defaultSourceChanged(PulseAudioQt::Source *source);
+ void isPipeWireChanged();
+
+private:
+ explicit Server(Context *context);
+
+ void reset();
+ void updateDefaultDevices();
+
+ class ServerPrivate *const d;
+
+ friend class ServerPrivate;
+ friend class Context;
+ friend class ContextPrivate;
+};
+
+} // PulseAudioQt
+
+#endif // CONTEXT_H