nas: consolidate preference duration values

This commit is contained in:
Aleksander Morgado 2012-07-31 09:50:34 +02:00
parent 2ea1993e7a
commit 46c70e0e56
3 changed files with 22 additions and 34 deletions

View File

@ -451,7 +451,7 @@ get_technology_preference_ready (QmiClientNas *client,
QmiMessageNasGetTechnologyPreferenceOutput *output;
GError *error = NULL;
QmiNasRadioTechnologyPreference preference;
QmiNasRadioTechnologyPreferenceDuration duration;
QmiNasPreferenceDuration duration;
gchar *preference_string;
output = qmi_client_nas_get_technology_preference_finish (client, res, &error);
@ -481,7 +481,7 @@ get_technology_preference_ready (QmiClientNas *client,
"\tActive: '%s', duration: '%s'\n",
qmi_device_get_path_display (ctx->device),
preference_string,
qmi_nas_radio_technology_preference_duration_get_string (duration));
qmi_nas_preference_duration_get_string (duration));
g_free (preference_string);
if (qmi_message_nas_get_technology_preference_output_get_persistent (

View File

@ -528,7 +528,7 @@
"public-format" : "QmiNasRadioTechnologyPreference" },
{ "name" : "Technology Preference Duration",
"format" : "guint8",
"public-format" : "QmiNasRadioTechnologyPreferenceDuration" } ] },
"public-format" : "QmiNasPreferenceDuration" } ] },
{ "name" : "Persistent",
"id" : "0x10",
"mandatory" : "no",
@ -590,12 +590,12 @@
"format" : "guint16" },
{ "name" : "MNC",
"format" : "guint16" } ] },
{ "name" : "Change Duration",
{ "name" : "Preference Duration",
"id" : "0x17",
"mandatory" : "no",
"type" : "TLV",
"format" : "guint8",
"public-format" : "QmiNasChangeDuration" },
"public-format" : "QmiNasPreferenceDuration" },
{ "name" : "Service Domain Preference",
"id" : "0x18",
"mandatory" : "no",

View File

@ -350,26 +350,26 @@ typedef enum {
} QmiNasRadioTechnologyPreference;
/**
* QmiNasRadioTechnologyPreferenceDuration:
* @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_PERMANENT: Permanent.
* @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_POWER_CYCLE: Until the next power cycle.
* @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_ONE_CALL: Until end of call.
* @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_ONE_CALL_OR_TIME: Until end of call or a specified time.
* @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_INTERNAL_ONE_CALL_1: Internal reason 1, one call.
* @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_INTERNAL_ONE_CALL_2: Internal reason 2, one call.
* @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_INTERNAL_ONE_CALL_3: Internal reason 3, one call.
* QmiNasPreferenceDuration:
* @QMI_NAS_PREFERENCE_DURATION_PERMANENT: Permanent.
* @QMI_NAS_PREFERENCE_DURATION_POWER_CYCLE: Until the next power cycle.
* @QMI_NAS_PREFERENCE_DURATION_ONE_CALL: Until end of call.
* @QMI_NAS_PREFERENCE_DURATION_ONE_CALL_OR_TIME: Until end of call or a specified time.
* @QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_1: Internal reason 1, one call.
* @QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_2: Internal reason 2, one call.
* @QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_3: Internal reason 3, one call.
*
* Duration of the Radio Technology Preference.
* Duration of the preference setting.
*/
typedef enum {
QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_PERMANENT = 0x00,
QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_POWER_CYCLE = 0x01,
QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_ONE_CALL = 0x02,
QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_ONE_CALL_OR_TIME = 0x03,
QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_INTERNAL_ONE_CALL_1 = 0x04,
QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_INTERNAL_ONE_CALL_2 = 0x05,
QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_INTERNAL_ONE_CALL_3 = 0x06
} QmiNasRadioTechnologyPreferenceDuration;
QMI_NAS_PREFERENCE_DURATION_PERMANENT = 0x00,
QMI_NAS_PREFERENCE_DURATION_POWER_CYCLE = 0x01,
QMI_NAS_PREFERENCE_DURATION_ONE_CALL = 0x02,
QMI_NAS_PREFERENCE_DURATION_ONE_CALL_OR_TIME = 0x03,
QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_1 = 0x04,
QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_2 = 0x05,
QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_3 = 0x06
} QmiNasPreferenceDuration;
/*****************************************************************************/
/* Helper enums for the 'QMI NAS Get/Set System Selection Preference'
@ -437,18 +437,6 @@ typedef enum {
QMI_NAS_NETWORK_SELECTION_PREFERENCE_MANUAL = 0x01
} QmiNasNetworkSelectionPreference;
/**
* QmiNasChangeDuration:
* @QMI_NAS_CHANGE_DURATION_POWER_CYCLE: Change active until device is power-cycled.
* @QMI_NAS_CHANGE_DURATION_PERMANENT: Change is permanent.
*
* Duration of the change requested.
*/
typedef enum {
QMI_NAS_CHANGE_DURATION_POWER_CYCLE = 0x00,
QMI_NAS_CHANGE_DURATION_PERMANENT = 0x01
} QmiNasChangeDuration;
/**
* QmiNasServiceDomainPreference:
* @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_CS_ONLY: Circuit-switched only.