summaryrefslogtreecommitdiff
path: root/include/astal
diff options
context:
space:
mode:
Diffstat (limited to 'include/astal')
-rw-r--r--include/astal/wireplumber/audio.h33
-rw-r--r--include/astal/wireplumber/endpoint.h35
-rw-r--r--include/astal/wireplumber/meson.build7
-rw-r--r--include/astal/wireplumber/wp.h26
4 files changed, 101 insertions, 0 deletions
diff --git a/include/astal/wireplumber/audio.h b/include/astal/wireplumber/audio.h
new file mode 100644
index 0000000..5cfa27e
--- /dev/null
+++ b/include/astal/wireplumber/audio.h
@@ -0,0 +1,33 @@
+#ifndef ASTAL_WIREPLUMBER_AUDIO_H
+#define ASTAL_WIREPLUMBER_AUDIO_H
+
+#include <glib-object.h>
+
+#include "endpoint.h"
+
+G_BEGIN_DECLS
+
+#define ASTAL_WP_TYPE_AUDIO (astal_wp_audio_get_type())
+
+G_DECLARE_FINAL_TYPE(AstalWpAudio, astal_wp_audio, ASTAL_WP, AUDIO, GObject)
+
+AstalWpEndpoint *astal_wp_audio_get_speaker(AstalWpAudio *self, guint id);
+AstalWpEndpoint *astal_wp_audio_get_microphone(AstalWpAudio *self, guint id);
+AstalWpEndpoint *astal_wp_audio_get_recorder(AstalWpAudio *self, guint id);
+AstalWpEndpoint *astal_wp_audio_get_stream(AstalWpAudio *self, guint id);
+AstalWpEndpoint *astal_wp_audio_get_endpoint(AstalWpAudio *self, guint id);
+
+AstalWpEndpoint *astal_wp_audio_get_default_speaker(AstalWpAudio *self);
+AstalWpEndpoint *astal_wp_audio_get_default_microphone(AstalWpAudio *self);
+
+GList *astal_wp_audio_get_microphones(AstalWpAudio *self);
+GList *astal_wp_audio_get_speakers(AstalWpAudio *self);
+GList *astal_wp_audio_get_recorders(AstalWpAudio *self);
+GList *astal_wp_audio_get_streams(AstalWpAudio *self);
+
+AstalWpAudio *astal_wp_audio_get_default();
+AstalWpAudio *astal_wp_get_default_audio();
+
+G_END_DECLS
+
+#endif // !ASTAL_WIREPLUMBER_AUDIO_H
diff --git a/include/astal/wireplumber/endpoint.h b/include/astal/wireplumber/endpoint.h
new file mode 100644
index 0000000..269551b
--- /dev/null
+++ b/include/astal/wireplumber/endpoint.h
@@ -0,0 +1,35 @@
+#ifndef ASTAL_WP_ENDPOINT_H
+#define ASTAL_WP_ENDPOINT_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define ASTAL_WP_TYPE_ENDPOINT (astal_wp_endpoint_get_type())
+
+G_DECLARE_FINAL_TYPE(AstalWpEndpoint, astal_wp_endpoint, ASTAL_WP, ENDPOINT, GObject)
+
+#define ASTAL_WP_TYPE_MEDIA_CLASS (astal_wp_media_class_get_type())
+
+typedef enum {
+ ASTAL_WP_MEDIA_CLASS_AUDIO_MICROPHONE,
+ ASTAL_WP_MEDIA_CLASS_AUDIO_SPEAKER,
+ ASTAL_WP_MEDIA_CLASS_AUDIO_RECORDER,
+ ASTAL_WP_MEDIA_CLASS_AUDIO_STREAM,
+} AstalWpMediaClass;
+
+void astal_wp_endpoint_update_volume(AstalWpEndpoint *self);
+void astal_wp_endpoint_set_volume(AstalWpEndpoint *self, gdouble volume);
+void astal_wp_endpoint_set_mute(AstalWpEndpoint *self, gboolean mute);
+gboolean astal_wp_endpoint_get_is_default(AstalWpEndpoint *self);
+
+AstalWpMediaClass astal_wp_endpoint_get_media_class(AstalWpEndpoint *self);
+guint astal_wp_endpoint_get_id(AstalWpEndpoint *self);
+gboolean astal_wp_endpoint_get_mute(AstalWpEndpoint *self);
+gdouble astal_wp_endpoint_get_volume(AstalWpEndpoint *self);
+const gchar *astal_wp_endpoint_get_description(AstalWpEndpoint *self);
+void astal_wp_endpoint_set_is_default(AstalWpEndpoint *self, gboolean is_default);
+
+G_END_DECLS
+
+#endif // !ASTAL_WP_ENDPOINT_H
diff --git a/include/astal/wireplumber/meson.build b/include/astal/wireplumber/meson.build
new file mode 100644
index 0000000..525b380
--- /dev/null
+++ b/include/astal/wireplumber/meson.build
@@ -0,0 +1,7 @@
+astal_wireplumber_subheaders = files(
+ 'wp.h',
+ 'endpoint.h',
+ 'audio.h',
+)
+
+install_headers(astal_wireplumber_subheaders, subdir : 'astal/wireplumber')
diff --git a/include/astal/wireplumber/wp.h b/include/astal/wireplumber/wp.h
new file mode 100644
index 0000000..94e68cc
--- /dev/null
+++ b/include/astal/wireplumber/wp.h
@@ -0,0 +1,26 @@
+#ifndef ASTAL_WIREPLUMBER_H
+#define ASTAL_WIREPLUMBER_H
+
+#include <glib-object.h>
+
+#include "audio.h"
+#include "endpoint.h"
+
+G_BEGIN_DECLS
+
+#define ASTAL_WP_TYPE_WP (astal_wp_wp_get_type())
+
+G_DECLARE_FINAL_TYPE(AstalWpWp, astal_wp_wp, ASTAL_WP, WP, GObject)
+
+AstalWpWp* astal_wp_wp_get_default();
+AstalWpWp* astal_wp_get_default_wp();
+
+AstalWpAudio* astal_wp_wp_get_audio();
+AstalWpEndpoint* astal_wp_wp_get_endpoint(AstalWpWp* self, guint id);
+GList* astal_wp_wp_get_endpoints(AstalWpWp* self);
+AstalWpEndpoint* astal_wp_wp_get_default_speaker(AstalWpWp* self);
+AstalWpEndpoint* astal_wp_wp_get_default_microphone(AstalWpWp* self);
+
+G_END_DECLS
+
+#endif // !ASTAL_WIREPLUMBER_H