account: Rework account states

Introduce a state-changed signal which also gives a reason for why the state
changed. This will allow the UI to give some meaningful feedback to the user.

Additionally we can get rid of a number of things that were not really states,
but rather reasons for why a state changed (f.e. authentication failures).
This commit is contained in:
Evangelos Ribeiro Tzaras
2021-12-21 08:20:56 +01:00
parent d5fd098479
commit cdb6f90acc
5 changed files with 164 additions and 66 deletions

View File

@@ -110,9 +110,9 @@ test_sip_origin_objects (SipFixture *fixture,
"account-state", &state_offline,
NULL);
g_assert_cmpint (state_alice, ==, CALLS_ACCOUNT_ONLINE);
g_assert_cmpint (state_bob, ==, CALLS_ACCOUNT_ONLINE);
g_assert_cmpint (state_offline, ==, CALLS_ACCOUNT_OFFLINE);
g_assert_cmpint (state_alice, ==, CALLS_ACCOUNT_STATE_ONLINE);
g_assert_cmpint (state_bob, ==, CALLS_ACCOUNT_STATE_ONLINE);
g_assert_cmpint (state_offline, ==, CALLS_ACCOUNT_STATE_OFFLINE);
}
static void