diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/astal/wireplumber/audio.h | 3 | ||||
-rw-r--r-- | include/astal/wireplumber/device.h | 24 | ||||
-rw-r--r-- | include/astal/wireplumber/meson.build | 2 | ||||
-rw-r--r-- | include/astal/wireplumber/profile.h | 17 | ||||
-rw-r--r-- | include/astal/wireplumber/wp.h | 3 | ||||
-rw-r--r-- | include/meson.build | 2 | ||||
-rw-r--r-- | include/private/device-private.h | 15 | ||||
-rw-r--r-- | include/private/endpoint-private.h (renamed from include/endpoint-private.h) | 0 |
8 files changed, 65 insertions, 1 deletions
diff --git a/include/astal/wireplumber/audio.h b/include/astal/wireplumber/audio.h index 5cfa27e..2d54727 100644 --- a/include/astal/wireplumber/audio.h +++ b/include/astal/wireplumber/audio.h @@ -3,6 +3,7 @@ #include <glib-object.h> +#include "device.h" #include "endpoint.h" G_BEGIN_DECLS @@ -16,6 +17,7 @@ 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); @@ -24,6 +26,7 @@ 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); AstalWpAudio *astal_wp_audio_get_default(); AstalWpAudio *astal_wp_get_default_audio(); diff --git a/include/astal/wireplumber/device.h b/include/astal/wireplumber/device.h new file mode 100644 index 0000000..6e5f6d4 --- /dev/null +++ b/include/astal/wireplumber/device.h @@ -0,0 +1,24 @@ +#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) + +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); + +G_END_DECLS + +#endif // !ASTAL_WP_DEVICE_H diff --git a/include/astal/wireplumber/meson.build b/include/astal/wireplumber/meson.build index 525b380..6cd0147 100644 --- a/include/astal/wireplumber/meson.build +++ b/include/astal/wireplumber/meson.build @@ -1,7 +1,9 @@ astal_wireplumber_subheaders = files( 'wp.h', 'endpoint.h', + 'device.h', 'audio.h', + 'profile.h', ) install_headers(astal_wireplumber_subheaders, subdir : 'astal/wireplumber') diff --git a/include/astal/wireplumber/profile.h b/include/astal/wireplumber/profile.h new file mode 100644 index 0000000..2ec768e --- /dev/null +++ b/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/include/astal/wireplumber/wp.h b/include/astal/wireplumber/wp.h index 94e68cc..3b4b5e5 100644 --- a/include/astal/wireplumber/wp.h +++ b/include/astal/wireplumber/wp.h @@ -4,6 +4,7 @@ #include <glib-object.h> #include "audio.h" +#include "device.h" #include "endpoint.h" G_BEGIN_DECLS @@ -20,6 +21,8 @@ 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); +AstalWpDevice* astal_wp_wp_get_device(AstalWpWp* self, guint id); +GList* astal_wp_wp_get_devices(AstalWpWp* self); G_END_DECLS diff --git a/include/meson.build b/include/meson.build index 9d32288..441097c 100644 --- a/include/meson.build +++ b/include/meson.build @@ -1,4 +1,4 @@ -astal_wireplumber_inc = include_directories('.', 'astal/wireplumber') +astal_wireplumber_inc = include_directories('.', 'astal/wireplumber', 'private') astal_wireplumber_headers = files( 'astal-wp.h', ) diff --git a/include/private/device-private.h b/include/private/device-private.h new file mode 100644 index 0000000..e98a7f7 --- /dev/null +++ b/include/private/device-private.h @@ -0,0 +1,15 @@ +#ifndef ASTAL_WP_DEVICE_PRIVATE_H +#define ASTAL_WP_DEVICE_PRIVATE_H + +#include <glib-object.h> +#include <wp/wp.h> + +#include "device.h" + +G_BEGIN_DECLS + +AstalWpDevice *astal_wp_device_create(WpDevice *device); + +G_END_DECLS + +#endif // !ASTAL_WP_DEVICE_PRIATE_H diff --git a/include/endpoint-private.h b/include/private/endpoint-private.h index 765f4b8..765f4b8 100644 --- a/include/endpoint-private.h +++ b/include/private/endpoint-private.h |