diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/endpoint-private.h | 3 | ||||
-rw-r--r-- | include/wireplumber.h | 1 | ||||
-rw-r--r-- | include/wireplumber/audio.h | 30 | ||||
-rw-r--r-- | include/wireplumber/endpoint.h | 17 | ||||
-rw-r--r-- | include/wireplumber/meson.build | 3 | ||||
-rw-r--r-- | include/wireplumber/wp.h | 3 |
6 files changed, 55 insertions, 2 deletions
diff --git a/include/endpoint-private.h b/include/endpoint-private.h index 1ee4d8c..c83c76f 100644 --- a/include/endpoint-private.h +++ b/include/endpoint-private.h @@ -8,7 +8,8 @@ G_BEGIN_DECLS -AstalWpEndpoint *astal_wp_endpoint_create(WpNode *node, WpPlugin *mixer); +AstalWpEndpoint *astal_wp_endpoint_create(WpNode *node, WpPlugin *mixer, WpPlugin *defaults); +void astal_wp_endpoint_update_default(AstalWpEndpoint *self, gboolean is_default); G_END_DECLS diff --git a/include/wireplumber.h b/include/wireplumber.h index f6dc8fb..f8799c1 100644 --- a/include/wireplumber.h +++ b/include/wireplumber.h @@ -1,3 +1,4 @@ +#include "wireplumber/audio.h" #include "wireplumber/endpoint.h" #include "wireplumber/wp.h" diff --git a/include/wireplumber/audio.h b/include/wireplumber/audio.h new file mode 100644 index 0000000..0e59937 --- /dev/null +++ b/include/wireplumber/audio.h @@ -0,0 +1,30 @@ +#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); + +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/wireplumber/endpoint.h b/include/wireplumber/endpoint.h index 354244e..269551b 100644 --- a/include/wireplumber/endpoint.h +++ b/include/wireplumber/endpoint.h @@ -9,9 +9,26 @@ G_BEGIN_DECLS 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 diff --git a/include/wireplumber/meson.build b/include/wireplumber/meson.build index 319d8f5..525b380 100644 --- a/include/wireplumber/meson.build +++ b/include/wireplumber/meson.build @@ -1,6 +1,7 @@ astal_wireplumber_subheaders = files( 'wp.h', - 'endpoint.h' + 'endpoint.h', + 'audio.h', ) install_headers(astal_wireplumber_subheaders, subdir : 'astal/wireplumber') diff --git a/include/wireplumber/wp.h b/include/wireplumber/wp.h index 61c3d87..7950499 100644 --- a/include/wireplumber/wp.h +++ b/include/wireplumber/wp.h @@ -3,6 +3,7 @@ #include <glib-object.h> +#include "audio.h" #include "endpoint.h" G_BEGIN_DECLS @@ -14,7 +15,9 @@ 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); G_END_DECLS |