1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-17 16:05:36 +00:00

account: Add API to query account state

This commit is contained in:
Evangelos Ribeiro Tzaras 2021-07-04 00:24:00 +02:00 committed by Evangelos Ribeiro Tzaras
parent 82ff6d0ac5
commit dd3fbf646e
2 changed files with 19 additions and 0 deletions

View file

@ -70,3 +70,21 @@ calls_account_go_online (CallsAccount *self,
return iface->go_online (self, online); return iface->go_online (self, online);
} }
/**
* calls_account_get_state:
* @self: A #CallsAccount
*
* Returns: The current #CallsAccountState of this account
*/
CallsAccountState
calls_account_get_state (CallsAccount *self)
{
CallsAccountState state;
g_return_val_if_fail (CALLS_IS_ACCOUNT (self), CALLS_ACCOUNT_NULL);
g_object_get (self, "account-state", &state, NULL);
return state;
}

View file

@ -69,5 +69,6 @@ typedef enum {
void calls_account_go_online (CallsAccount *self, void calls_account_go_online (CallsAccount *self,
gboolean online); gboolean online);
CallsAccountState calls_account_get_state (CallsAccount *self);
G_END_DECLS G_END_DECLS