mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-09 08:38:22 +02:00
endpoint: add wp_endpoint_unlink API
This commit is contained in:
parent
5d1397cf56
commit
27a31498c0
2 changed files with 21 additions and 0 deletions
|
|
@ -733,6 +733,26 @@ wp_endpoint_get_links (WpEndpoint * self)
|
|||
return priv->links;
|
||||
}
|
||||
|
||||
/**
|
||||
* wp_endpoint_unlink:
|
||||
* @self: the endpoint
|
||||
*
|
||||
* Unlinks all the endpoints linked to this endpoint
|
||||
*/
|
||||
void
|
||||
wp_endpoint_unlink (WpEndpoint * self)
|
||||
{
|
||||
WpEndpointPrivate *priv;
|
||||
gint i;
|
||||
|
||||
g_return_if_fail (WP_IS_ENDPOINT (self));
|
||||
|
||||
priv = wp_endpoint_get_instance_private (self);
|
||||
|
||||
for (i = priv->links->len - 1; i >= 0; i--)
|
||||
wp_endpoint_link_destroy (g_ptr_array_index (priv->links, i));
|
||||
}
|
||||
|
||||
|
||||
typedef struct _WpEndpointLinkPrivate WpEndpointLinkPrivate;
|
||||
struct _WpEndpointLinkPrivate
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ void wp_endpoint_notify_control_value (WpEndpoint * self, guint32 control_id);
|
|||
|
||||
gboolean wp_endpoint_is_linked (WpEndpoint * self);
|
||||
GPtrArray * wp_endpoint_get_links (WpEndpoint * self);
|
||||
void wp_endpoint_unlink (WpEndpoint * self);
|
||||
|
||||
struct _WpEndpointLinkClass
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue