1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-12 07:37:35 +00:00

manager: Add API to query loaded providers

This commit is contained in:
Evangelos Ribeiro Tzaras 2021-07-04 01:41:35 +02:00 committed by Evangelos Ribeiro Tzaras
parent a638b64402
commit cc3a562f03
2 changed files with 18 additions and 0 deletions

View file

@ -949,3 +949,20 @@ calls_manager_get_provider_names (CallsManager *self,
return (const char **) g_hash_table_get_keys_as_array (self->providers, length); 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);
}

View file

@ -72,5 +72,6 @@ void calls_manager_hang_up_all_calls (CallsManager *sel
gboolean calls_manager_has_any_provider (CallsManager *self); gboolean calls_manager_has_any_provider (CallsManager *self);
const char **calls_manager_get_provider_names (CallsManager *self, const char **calls_manager_get_provider_names (CallsManager *self,
guint *length); guint *length);
GList *calls_manager_get_providers (CallsManager *self);
G_END_DECLS G_END_DECLS