mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-11 23:27:35 +00:00
account: Add API to query account state
This commit is contained in:
parent
82ff6d0ac5
commit
dd3fbf646e
2 changed files with 19 additions and 0 deletions
|
@ -70,3 +70,21 @@ calls_account_go_online (CallsAccount *self,
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -69,5 +69,6 @@ typedef enum {
|
|||
|
||||
void calls_account_go_online (CallsAccount *self,
|
||||
gboolean online);
|
||||
CallsAccountState calls_account_get_state (CallsAccount *self);
|
||||
|
||||
G_END_DECLS
|
||||
|
|
Loading…
Reference in a new issue