cli: print Rm protocol in bearer info

This commit is contained in:
Aleksander Morgado
2012-01-08 16:15:39 +01:00
parent 014a9eddab
commit ad95567e88
3 changed files with 21 additions and 3 deletions

View File

@@ -169,13 +169,16 @@ print_bearer_info (MMBearer *bearer)
" | IP type: '%s'\n"
" | user: '%s'\n"
" | password: '%s'\n"
" | number: '%s'\n",
" | number: '%s'\n"
" | Rm protocol: '%s'\n",
VALIDATE_NONE (mm_bearer_properties_get_apn (properties)),
mm_bearer_properties_get_allow_roaming (properties) ? "allowed" : "forbidden",
VALIDATE_NONE (mm_bearer_properties_get_ip_type (properties)),
VALIDATE_NONE (mm_bearer_properties_get_user (properties)),
VALIDATE_NONE (mm_bearer_properties_get_password (properties)),
VALIDATE_NONE (mm_bearer_properties_get_number (properties)));
VALIDATE_NONE (mm_bearer_properties_get_number (properties)),
VALIDATE_UNKNOWN (mmcli_get_cdma_rm_protocol_string (
mm_bearer_properties_get_rm_protocol (properties))));
g_object_unref (properties);
}

View File

@@ -774,6 +774,19 @@ mmcli_get_3gpp_registration_state_string (MMModem3gppRegistrationState state)
return value->value_nick;
}
const gchar *
mmcli_get_cdma_rm_protocol_string (MMModemCdmaRmProtocol protocol)
{
static GEnumClass *enum_class = NULL;
GEnumValue *value;
if (!enum_class)
enum_class = G_ENUM_CLASS (g_type_class_ref (MM_TYPE_MODEM_CDMA_RM_PROTOCOL));
value = g_enum_get_value (enum_class, protocol);
return value->value_nick;
}
/* Common options */
static gchar *modem_str;
static gchar *bearer_str;

View File

@@ -70,6 +70,8 @@ const gchar *mmcli_get_state_reason_string (MMModemStateChangeReaso
const gchar *mmcli_get_lock_string (MMModemLock lock);
const gchar *mmcli_get_3gpp_network_availability_string (MMModem3gppNetworkAvailability availability);
const gchar *mmcli_get_3gpp_registration_state_string (MMModem3gppRegistrationState state);
const gchar *mmcli_get_cdma_rm_protocol_string (MMModemCdmaRmProtocol protocol);
GOptionGroup *mmcli_get_common_option_group (void);
const gchar *mmcli_get_common_modem_string (void);