diff --git a/src/calls-manager.c b/src/calls-manager.c index 9e50016..1e82995 100644 --- a/src/calls-manager.c +++ b/src/calls-manager.c @@ -949,3 +949,20 @@ calls_manager_get_provider_names (CallsManager *self, return (const char **) g_hash_table_get_keys_as_array (self->providers, length); } + +/** + * calls_manager_get_providers: + * @self: A #CallsManager + * + * Get the currently loaded providers + * + * Returns: (transfer container): A #GList of #CallsProvider. + * Use g_list_free() when done using the list. + */ +GList * +calls_manager_get_providers (CallsManager *self) +{ + g_return_val_if_fail (CALLS_IS_MANAGER (self), NULL); + + return g_hash_table_get_values (self->providers); +} diff --git a/src/calls-manager.h b/src/calls-manager.h index d7f6261..b80f853 100644 --- a/src/calls-manager.h +++ b/src/calls-manager.h @@ -72,5 +72,6 @@ void calls_manager_hang_up_all_calls (CallsManager *sel gboolean calls_manager_has_any_provider (CallsManager *self); const char **calls_manager_get_provider_names (CallsManager *self, guint *length); +GList *calls_manager_get_providers (CallsManager *self); G_END_DECLS