api: notify in the interface about the reason why the modem is FAILED

We currently implement 'SIM missing' and 'SIM error', which are probably the
most common ones.
This commit is contained in:
Aleksander Morgado
2013-02-22 16:35:56 +01:00
parent a18140e8ed
commit 75d20c15d4
11 changed files with 115 additions and 15 deletions
+10 -5
View File
@@ -351,13 +351,18 @@ print_modem_info (void)
g_print (" -------------------------\n"
" Status | lock: '%s'\n"
" | unlock retries: '%s'\n"
" | state: '%s'\n"
" | power state: '%s'\n"
" | access tech: '%s'\n"
" | signal quality: '%u' (%s)\n",
" | state: '%s'\n",
mm_modem_lock_get_string (mm_modem_get_unlock_required (ctx->modem)),
VALIDATE_UNKNOWN (unlock_retries_string),
VALIDATE_UNKNOWN (mm_modem_state_get_string (mm_modem_get_state (ctx->modem))),
VALIDATE_UNKNOWN (mm_modem_state_get_string (mm_modem_get_state (ctx->modem))));
if (mm_modem_get_state (ctx->modem) == MM_MODEM_STATE_FAILED)
g_print (" | failed reason: '%s'\n",
VALIDATE_UNKNOWN (mm_modem_state_failed_reason_get_string (mm_modem_get_state_failed_reason (ctx->modem))));
g_print (" | power state: '%s'\n"
" | access tech: '%s'\n"
" | signal quality: '%u' (%s)\n",
VALIDATE_UNKNOWN (mm_modem_power_state_get_string (mm_modem_get_power_state (ctx->modem))),
VALIDATE_UNKNOWN (access_technologies_string),
signal_quality, signal_quality_recent ? "recent" : "cached");