summaryrefslogtreecommitdiff
path: root/lib/wireplumber/include/astal
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wireplumber/include/astal')
-rw-r--r--lib/wireplumber/include/astal/wireplumber/audio.h33
-rw-r--r--lib/wireplumber/include/astal/wireplumber/device.h29
-rw-r--r--lib/wireplumber/include/astal/wireplumber/endpoint.h43
-rw-r--r--lib/wireplumber/include/astal/wireplumber/meson.build10
-rw-r--r--lib/wireplumber/include/astal/wireplumber/profile.h17
-rw-r--r--lib/wireplumber/include/astal/wireplumber/video.h29
-rw-r--r--lib/wireplumber/include/astal/wireplumber/wp.h47
7 files changed, 208 insertions, 0 deletions
diff --git a/lib/wireplumber/include/astal/wireplumber/audio.h b/lib/wireplumber/include/astal/wireplumber/audio.h
new file mode 100644
index 0000000..c1176e2
--- /dev/null
+++ b/lib/wireplumber/include/astal/wireplumber/audio.h
@@ -0,0 +1,33 @@
+#ifndef ASTAL_WIREPLUMBER_AUDIO_H
+#define ASTAL_WIREPLUMBER_AUDIO_H
+
+#include <glib-object.h>
+
+#include "device.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);
+AstalWpDevice *astal_wp_audio_get_device(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);
+GList *astal_wp_audio_get_devices(AstalWpAudio *self);
+
+G_END_DECLS
+
+#endif // !ASTAL_WIREPLUMBER_AUDIO_H
diff --git a/lib/wireplumber/include/astal/wireplumber/device.h b/lib/wireplumber/include/astal/wireplumber/device.h
new file mode 100644
index 0000000..9f633e3
--- /dev/null
+++ b/lib/wireplumber/include/astal/wireplumber/device.h
@@ -0,0 +1,29 @@
+#ifndef ASTAL_WP_DEVICE_H
+#define ASTAL_WP_DEVICE_H
+
+#include <glib-object.h>
+
+#include "profile.h"
+
+G_BEGIN_DECLS
+
+#define ASTAL_WP_TYPE_DEVICE (astal_wp_device_get_type())
+
+G_DECLARE_FINAL_TYPE(AstalWpDevice, astal_wp_device, ASTAL_WP, DEVICE, GObject)
+
+#define ASTAL_WP_TYPE_DEVICE_TYPE (astal_wp_device_type_get_type())
+
+typedef enum { ASTAL_WP_DEVICE_TYPE_AUDIO, ASTAL_WP_DEVICE_TYPE_VIDEO } AstalWpDeviceType;
+
+guint astal_wp_device_get_id(AstalWpDevice *self);
+const gchar *astal_wp_device_get_description(AstalWpDevice *self);
+const gchar *astal_wp_device_get_icon(AstalWpDevice *self);
+AstalWpProfile *astal_wp_device_get_profile(AstalWpDevice *self, gint id);
+GList *astal_wp_device_get_profiles(AstalWpDevice *self);
+void astal_wp_device_set_active_profile(AstalWpDevice *self, int profile_id);
+gint astal_wp_device_get_active_profile(AstalWpDevice *self);
+AstalWpDeviceType astal_wp_device_get_device_type(AstalWpDevice *self);
+
+G_END_DECLS
+
+#endif // !ASTAL_WP_DEVICE_H
diff --git a/lib/wireplumber/include/astal/wireplumber/endpoint.h b/lib/wireplumber/include/astal/wireplumber/endpoint.h
new file mode 100644
index 0000000..6ef0329
--- /dev/null
+++ b/lib/wireplumber/include/astal/wireplumber/endpoint.h
@@ -0,0 +1,43 @@
+#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,
+ ASTAL_WP_MEDIA_CLASS_VIDEO_SOURCE,
+ ASTAL_WP_MEDIA_CLASS_VIDEO_SINK,
+ ASTAL_WP_MEDIA_CLASS_VIDEO_RECORDER,
+ ASTAL_WP_MEDIA_CLASS_VIDEO_STREAM,
+} AstalWpMediaClass;
+
+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);
+void astal_wp_endpoint_set_is_default(AstalWpEndpoint *self, gboolean is_default);
+gboolean astal_wp_endpoint_get_lock_channels(AstalWpEndpoint *self);
+void astal_wp_endpoint_set_lock_channels(AstalWpEndpoint *self, gboolean lock_channels);
+
+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);
+const gchar *astal_wp_endpoint_get_name(AstalWpEndpoint *self);
+const gchar *astal_wp_endpoint_get_icon(AstalWpEndpoint *self);
+const gchar *astal_wp_endpoint_get_volume_icon(AstalWpEndpoint *self);
+
+G_END_DECLS
+
+#endif // !ASTAL_WP_ENDPOINT_H
diff --git a/lib/wireplumber/include/astal/wireplumber/meson.build b/lib/wireplumber/include/astal/wireplumber/meson.build
new file mode 100644
index 0000000..c805ea2
--- /dev/null
+++ b/lib/wireplumber/include/astal/wireplumber/meson.build
@@ -0,0 +1,10 @@
+astal_wireplumber_subheaders = files(
+ 'audio.h',
+ 'device.h',
+ 'endpoint.h',
+ 'profile.h',
+ 'video.h',
+ 'wp.h',
+)
+
+install_headers(astal_wireplumber_subheaders, subdir: 'astal/wireplumber')
diff --git a/lib/wireplumber/include/astal/wireplumber/profile.h b/lib/wireplumber/include/astal/wireplumber/profile.h
new file mode 100644
index 0000000..2ec768e
--- /dev/null
+++ b/lib/wireplumber/include/astal/wireplumber/profile.h
@@ -0,0 +1,17 @@
+#ifndef ASTAL_WP_PROFILE_H
+#define ASTAL_WP_PROFILE_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define ASTAL_WP_TYPE_PROFILE (astal_wp_profile_get_type())
+
+G_DECLARE_FINAL_TYPE(AstalWpProfile, astal_wp_profile, ASTAL_WP, PROFILE, GObject)
+
+gint astal_wp_profile_get_index(AstalWpProfile *self);
+const gchar *astal_wp_profile_get_description(AstalWpProfile *self);
+
+G_END_DECLS
+
+#endif // !ASTAL_WP_PROFILE_H
diff --git a/lib/wireplumber/include/astal/wireplumber/video.h b/lib/wireplumber/include/astal/wireplumber/video.h
new file mode 100644
index 0000000..3c4ae74
--- /dev/null
+++ b/lib/wireplumber/include/astal/wireplumber/video.h
@@ -0,0 +1,29 @@
+#ifndef ASTAL_WIREPLUMBER_VIDEO_H
+#define ASTAL_WIREPLUMBER_VIDEO_H
+
+#include <glib-object.h>
+
+#include "device.h"
+#include "endpoint.h"
+
+G_BEGIN_DECLS
+
+#define ASTAL_WP_TYPE_VIDEO (astal_wp_video_get_type())
+
+G_DECLARE_FINAL_TYPE(AstalWpVideo, astal_wp_video, ASTAL_WP, VIDEO, GObject)
+
+AstalWpEndpoint *astal_wp_video_get_source(AstalWpVideo *self, guint id);
+AstalWpEndpoint *astal_wp_video_get_sink(AstalWpVideo *self, guint id);
+AstalWpEndpoint *astal_wp_video_get_recorder(AstalWpVideo *self, guint id);
+AstalWpEndpoint *astal_wp_video_get_stream(AstalWpVideo *self, guint id);
+AstalWpDevice *astal_wp_video_get_device(AstalWpVideo *self, guint id);
+
+GList *astal_wp_video_get_sources(AstalWpVideo *self);
+GList *astal_wp_video_get_sinks(AstalWpVideo *self);
+GList *astal_wp_video_get_recorders(AstalWpVideo *self);
+GList *astal_wp_video_get_streams(AstalWpVideo *self);
+GList *astal_wp_video_get_devices(AstalWpVideo *self);
+
+G_END_DECLS
+
+#endif // !ASTAL_WIREPLUMBER_VIDEO_H
diff --git a/lib/wireplumber/include/astal/wireplumber/wp.h b/lib/wireplumber/include/astal/wireplumber/wp.h
new file mode 100644
index 0000000..1ff341c
--- /dev/null
+++ b/lib/wireplumber/include/astal/wireplumber/wp.h
@@ -0,0 +1,47 @@
+#ifndef ASTAL_WIREPLUMBER_H
+#define ASTAL_WIREPLUMBER_H
+
+#include <glib-object.h>
+
+#include "audio.h"
+#include "device.h"
+#include "endpoint.h"
+#include "video.h"
+
+G_BEGIN_DECLS
+
+#define ASTAL_WP_TYPE_SCALE (astal_wp_scale_get_type())
+
+typedef enum {
+ ASTAL_WP_SCALE_LINEAR,
+ ASTAL_WP_SCALE_CUBIC,
+} AstalWpScale;
+
+#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(AstalWpWp* self);
+AstalWpVideo* astal_wp_wp_get_video(AstalWpWp* self);
+
+AstalWpEndpoint* astal_wp_wp_get_endpoint(AstalWpWp* self, guint id);
+GList* astal_wp_wp_get_endpoints(AstalWpWp* self);
+
+AstalWpDevice* astal_wp_wp_get_device(AstalWpWp* self, guint id);
+GList* astal_wp_wp_get_devices(AstalWpWp* self);
+
+AstalWpEndpoint* astal_wp_wp_get_default_speaker(AstalWpWp* self);
+AstalWpEndpoint* astal_wp_wp_get_default_microphone(AstalWpWp* self);
+
+AstalWpScale astal_wp_wp_get_scale(AstalWpWp* self);
+void astal_wp_wp_set_scale(AstalWpWp* self, AstalWpScale scale);
+
+AstalWpVideo* astal_wp_video_new(AstalWpWp* wp);
+AstalWpAudio* astal_wp_audio_new(AstalWpWp* wp);
+
+G_END_DECLS
+
+#endif // !ASTAL_WIREPLUMBER_H