mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-02 03:58:00 +02:00
session: add a _get_name() method
This commit is contained in:
parent
27064d78f8
commit
49c6d00e07
2 changed files with 20 additions and 0 deletions
|
|
@ -401,6 +401,23 @@ wp_session_class_init (WpSessionClass * klass)
|
|||
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* wp_session_get_name:
|
||||
* @self: the session
|
||||
*
|
||||
* Returns: (transfer none): the (unique) name of the session
|
||||
*/
|
||||
const gchar *
|
||||
wp_session_get_name (WpSession * self)
|
||||
{
|
||||
g_return_val_if_fail (WP_IS_SESSION (self), NULL);
|
||||
g_return_val_if_fail (wp_proxy_get_features (WP_PROXY (self)) &
|
||||
WP_PROXY_FEATURE_INFO, NULL);
|
||||
|
||||
WpSessionPrivate *priv = wp_session_get_instance_private (self);
|
||||
return wp_properties_get (priv->properties, "session.name");
|
||||
}
|
||||
|
||||
/**
|
||||
* wp_session_get_default_endpoint:
|
||||
* @self: the session
|
||||
|
|
|
|||
|
|
@ -61,6 +61,9 @@ struct _WpSessionClass
|
|||
guint32 id);
|
||||
};
|
||||
|
||||
WP_API
|
||||
const gchar * wp_session_get_name (WpSession * self);
|
||||
|
||||
WP_API
|
||||
guint32 wp_session_get_default_endpoint (WpSession * self,
|
||||
const gchar * id_name);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue