account: Add message emission API

This can be used when wanting to show a human readable description in the UI
for example when the account state changes.
This commit is contained in:
Evangelos Ribeiro Tzaras
2021-12-21 09:07:47 +01:00
parent cdb6f90acc
commit 4cd3a0dcc3
2 changed files with 189 additions and 6 deletions

View File

@@ -101,11 +101,14 @@ struct _CallsAccountInterface
};
void calls_account_go_online (CallsAccount *self,
gboolean online);
const char *calls_account_get_address (CallsAccount *self);
CallsAccountState calls_account_get_state (CallsAccount *self);
const char *calls_account_state_to_string (CallsAccountState *state);
const char *calls_account_state_reason_to_string (CallsAccountStateReason *reason);
void calls_account_go_online (CallsAccount *self,
gboolean online);
const char *calls_account_get_address (CallsAccount *self);
CallsAccountState calls_account_get_state (CallsAccount *self);
const char *calls_account_state_to_string (CallsAccountState state);
const char *calls_account_state_reason_to_string (CallsAccountStateReason reason);
void calls_account_emit_message_for_state_change (CallsAccount *account,
CallsAccountState new_state,
CallsAccountStateReason reason);
G_END_DECLS