mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-01-04 16:20:13 +01:00
object-manager: add _get_n_objects() method
This commit is contained in:
parent
69ea11ca61
commit
c06317ac3b
2 changed files with 16 additions and 0 deletions
|
|
@ -280,6 +280,19 @@ wp_object_manager_add_interest (WpObjectManager *self,
|
|||
i->constraints = constraints ? g_variant_ref_sink (constraints) : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* wp_object_manager_get_n_objects:
|
||||
* @self: the object manager
|
||||
*
|
||||
* Returns: the number of objects managed by this #WpObjectManager
|
||||
*/
|
||||
guint
|
||||
wp_object_manager_get_n_objects (WpObjectManager * self)
|
||||
{
|
||||
g_return_val_if_fail (WP_IS_OBJECT_MANAGER (self), 0);
|
||||
return self->objects->len;
|
||||
}
|
||||
|
||||
/**
|
||||
* wp_object_manager_get_objects:
|
||||
* @self: the object manager
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@ WP_API
|
|||
void wp_object_manager_add_interest (WpObjectManager *self,
|
||||
GType gtype, GVariant * constraints, WpProxyFeatures wanted_features);
|
||||
|
||||
WP_API
|
||||
guint wp_object_manager_get_n_objects (WpObjectManager * self);
|
||||
|
||||
WP_API
|
||||
GPtrArray * wp_object_manager_get_objects (WpObjectManager *self,
|
||||
GType type_filter);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue