config-endpoint-context: add _get_length API

This commit is contained in:
Julian Bouzas 2020-02-26 11:36:09 -05:00
parent 266b5422f2
commit fefa4b9191
2 changed files with 9 additions and 0 deletions

View file

@ -295,3 +295,10 @@ wp_config_endpoint_context_new (WpCore *core)
"core", core,
NULL);
}
guint
wp_config_endpoint_context_get_length (WpConfigEndpointContext *self)
{
g_return_val_if_fail (WP_IS_CONFIG_ENDPOINT_CONTEXT (self), 0);
return g_hash_table_size (self->registered_endpoints);
}

View file

@ -19,6 +19,8 @@ G_DECLARE_FINAL_TYPE (WpConfigEndpointContext, wp_config_endpoint_context,
WpConfigEndpointContext * wp_config_endpoint_context_new (WpCore *core);
guint wp_config_endpoint_context_get_length (WpConfigEndpointContext *self);
G_END_DECLS
#endif