diff options
author | kotontrion <[email protected]> | 2024-09-05 15:07:12 +0200 |
---|---|---|
committer | kotontrion <[email protected]> | 2024-09-05 15:07:12 +0200 |
commit | 67055f44ff9332c9a79434fac838041f7ff0f1f0 (patch) | |
tree | a5d0259fab10370a54375d4fd33c169ab7091559 /lib/wireplumber/src/wireplumber.c | |
parent | c097bd513928d4c8ef65543a99c32437c7ca16d6 (diff) |
wireplumber: improve docs
Diffstat (limited to 'lib/wireplumber/src/wireplumber.c')
-rw-r--r-- | lib/wireplumber/src/wireplumber.c | 50 |
1 files changed, 32 insertions, 18 deletions
diff --git a/lib/wireplumber/src/wireplumber.c b/lib/wireplumber/src/wireplumber.c index f1fa516..cc3aa82 100644 --- a/lib/wireplumber/src/wireplumber.c +++ b/lib/wireplumber/src/wireplumber.c @@ -66,10 +66,20 @@ static GParamSpec *astal_wp_wp_properties[ASTAL_WP_WP_N_PROPERTIES] = { }; /** + * AstalWpWp + * + * manages the connection to wireplumber. Usually you don't want to use this class directly, but use + * the [[email protected]] or [[email protected]] instead. + * + */ + +/** * astal_wp_wp_get_endpoint: * @self: the AstalWpWp object * @id: the id of the endpoint * + * the endpoint with the given id + * * Returns: (transfer none) (nullable): the endpoint with the given id */ AstalWpEndpoint *astal_wp_wp_get_endpoint(AstalWpWp *self, guint id) { @@ -83,6 +93,8 @@ AstalWpEndpoint *astal_wp_wp_get_endpoint(AstalWpWp *self, guint id) { * astal_wp_wp_get_endpoints: * @self: the AstalWpWp object * + * a GList containing all endpoints + * * Returns: (transfer container) (nullable) (type GList(AstalWpEndpoint)): a GList containing the * endpoints */ @@ -96,6 +108,8 @@ GList *astal_wp_wp_get_endpoints(AstalWpWp *self) { * @self: the AstalWpWp object * @id: the id of the device * + * the device with the given id + * * Returns: (transfer none) (nullable): the device with the given id */ AstalWpDevice *astal_wp_wp_get_device(AstalWpWp *self, guint id) { @@ -109,6 +123,8 @@ AstalWpDevice *astal_wp_wp_get_device(AstalWpWp *self, guint id) { * astal_wp_wp_get_devices: * @self: the AstalWpWp object * + * the GList containing the devices + * * Returns: (transfer container) (nullable) (type GList(AstalWpDevice)): a GList containing the * devices */ @@ -120,6 +136,8 @@ GList *astal_wp_wp_get_devices(AstalWpWp *self) { /** * astal_wp_wp_get_audio * + * gets the [[email protected]] object + * * Returns: (nullable) (transfer none): gets the audio object */ AstalWpAudio *astal_wp_wp_get_audio(AstalWpWp *self) { return self->audio; } @@ -127,6 +145,8 @@ AstalWpAudio *astal_wp_wp_get_audio(AstalWpWp *self) { return self->audio; } /** * astal_wp_wp_get_video * + * gets the video object + * * Returns: (nullable) (transfer none): gets the video object */ AstalWpVideo *astal_wp_wp_get_video(AstalWpWp *self) { return self->video; } @@ -134,6 +154,8 @@ AstalWpVideo *astal_wp_wp_get_video(AstalWpWp *self) { return self->video; } /** * astal_wp_wp_get_default_speaker * + * gets the default speaker object + * * Returns: (nullable) (transfer none): gets the default speaker object */ AstalWpEndpoint *astal_wp_wp_get_default_speaker(AstalWpWp *self) { return self->default_speaker; } @@ -141,6 +163,8 @@ AstalWpEndpoint *astal_wp_wp_get_default_speaker(AstalWpWp *self) { return self- /** * astal_wp_wp_get_default_microphone * + * gets the default microphone object + * * Returns: (nullable) (transfer none): gets the default microphone object */ AstalWpEndpoint *astal_wp_wp_get_default_microphone(AstalWpWp *self) { @@ -218,20 +242,6 @@ static void astal_wp_wp_set_property(GObject *object, guint property_id, const G } static void astal_wp_wp_object_added(AstalWpWp *self, gpointer object) { - // print pipewire properties - // WpIterator *iter = wp_pipewire_object_new_properties_iterator(WP_PIPEWIRE_OBJECT(object)); - // GValue item = G_VALUE_INIT; - // const gchar *key, *value; - // - // g_print("\n\n"); - // while (wp_iterator_next (iter, &item)) { - // WpPropertiesItem *pi = g_value_get_boxed (&item); - // key = wp_properties_item_get_key (pi); - // value = wp_properties_item_get_value (pi); - // g_print("%s: %s\n", key, value); - // g_value_unset(&item); - // } - AstalWpWpPrivate *priv = astal_wp_wp_get_instance_private(self); if (WP_IS_NODE(object)) { @@ -329,6 +339,8 @@ static void astal_wp_wp_plugin_loaded(WpObject *obj, GAsyncResult *result, Astal /** * astal_wp_wp_get_default * + * gets the default wireplumber object. + * * Returns: (nullable) (transfer none): gets the default wireplumber object. */ AstalWpWp *astal_wp_wp_get_default() { @@ -342,6 +354,8 @@ AstalWpWp *astal_wp_wp_get_default() { /** * astal_wp_get_default_wp * + * gets the default wireplumber object. + * * Returns: (nullable) (transfer none): gets the default wireplumber object. */ AstalWpWp *astal_wp_get_default_wp() { return astal_wp_wp_get_default(); } @@ -457,21 +471,21 @@ static void astal_wp_wp_class_init(AstalWpWpClass *class) { /** * AstalWpWp:endpoints: (type GList(AstalWpEndpoint)) (transfer container) * - * A list of AstalWpEndpoint objects + * A list of [[email protected]] objects */ astal_wp_wp_properties[ASTAL_WP_WP_PROP_ENDPOINTS] = g_param_spec_pointer("endpoints", "endpoints", "endpoints", G_PARAM_READABLE); /** * AstalWpWp:devices: (type GList(AstalWpDevice)) (transfer container) * - * A list of AstalWpDevice objects + * A list of [[email protected]] objects */ astal_wp_wp_properties[ASTAL_WP_WP_PROP_DEVICES] = g_param_spec_pointer("devices", "devices", "devices", G_PARAM_READABLE); /** * AstalWpWp:default-speaker: * - * The AstalWndpoint object representing the default speaker + * The [[email protected]] representing the default speaker */ astal_wp_wp_properties[ASTAL_WP_WP_PROP_DEFAULT_SPEAKER] = g_param_spec_object("default-speaker", "default-speaker", "default-speaker", @@ -479,7 +493,7 @@ static void astal_wp_wp_class_init(AstalWpWpClass *class) { /** * AstalWpWp:default-microphone: * - * The AstalWndpoint object representing the default speaker + * The [[email protected]] representing the default speaker */ astal_wp_wp_properties[ASTAL_WP_WP_PROP_DEFAULT_MICROPHONE] = g_param_spec_object("default-microphone", "default-microphone", "default-microphone", |