account: Add API to query account state
This commit is contained in:
committed by
Evangelos Ribeiro Tzaras
parent
82ff6d0ac5
commit
dd3fbf646e
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user