From 46c70e0e56eb0d32b5be3c60ad24809b03531ffd Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Tue, 31 Jul 2012 09:50:34 +0200 Subject: [PATCH] nas: consolidate preference duration values --- cli/qmicli-nas.c | 4 ++-- data/qmi-service-nas.json | 6 ++--- libqmi-glib/qmi-enums-nas.h | 46 ++++++++++++++----------------------- 3 files changed, 22 insertions(+), 34 deletions(-) diff --git a/cli/qmicli-nas.c b/cli/qmicli-nas.c index 88ba49f..fc3601a 100644 --- a/cli/qmicli-nas.c +++ b/cli/qmicli-nas.c @@ -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 ( diff --git a/data/qmi-service-nas.json b/data/qmi-service-nas.json index 114864d..e5cddc6 100644 --- a/data/qmi-service-nas.json +++ b/data/qmi-service-nas.json @@ -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", diff --git a/libqmi-glib/qmi-enums-nas.h b/libqmi-glib/qmi-enums-nas.h index 534001c..d95746e 100644 --- a/libqmi-glib/qmi-enums-nas.h +++ b/libqmi-glib/qmi-enums-nas.h @@ -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.