Skip to content
Snippets Groups Projects
Commit c06317ac authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

object-manager: add _get_n_objects() method

parent 69ea11ca
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment