diff --git a/cli/mmcli-sms.c b/cli/mmcli-sms.c index 214ba9d6..a9c2cb14 100644 --- a/cli/mmcli-sms.c +++ b/cli/mmcli-sms.c @@ -181,16 +181,17 @@ print_sms_info (MMSms *sms) g_print (" -----------------------------------\n" " Properties | PDU type: '%s'\n" " | state: '%s'\n" - " | smsc: '%s'\n" - " | validity: '%u'\n" - " | class: '%u'\n" - " | storage: '%s'\n", - - + " | smsc: '%s'\n", mm_sms_pdu_type_get_string (pdu_type), mm_sms_state_get_string (mm_sms_get_state (sms)), - VALIDATE (mm_sms_get_smsc (sms)), - mm_sms_get_validity (sms), + VALIDATE (mm_sms_get_smsc (sms))); + + if (mm_sms_get_validity_type (sms) == MM_SMS_VALIDITY_TYPE_RELATIVE) + g_print (" | validity (relative): '%u'\n", + mm_sms_get_validity_relative (sms)); + + g_print (" | class: '%u'\n" + " | storage: '%s'\n", mm_sms_get_class (sms), mm_sms_storage_get_string (mm_sms_get_storage (sms))); diff --git a/docs/reference/api/ModemManager-sections.txt b/docs/reference/api/ModemManager-sections.txt index 37309e9d..94cc0336 100644 --- a/docs/reference/api/ModemManager-sections.txt +++ b/docs/reference/api/ModemManager-sections.txt @@ -27,6 +27,7 @@ MMSmsPduType MMSmsState MMSmsDeliveryState MMSmsStorage +MMSmsValidityType
diff --git a/docs/reference/libmm-glib/libmm-glib-sections.txt b/docs/reference/libmm-glib/libmm-glib-sections.txt index 7fed42c1..d2626187 100644 --- a/docs/reference/libmm-glib/libmm-glib-sections.txt +++ b/docs/reference/libmm-glib/libmm-glib-sections.txt @@ -885,7 +885,8 @@ mm_sms_get_smsc mm_sms_dup_smsc mm_sms_get_message_reference mm_sms_get_class -mm_sms_get_validity +mm_sms_get_validity_type +mm_sms_get_validity_relative mm_sms_get_timestamp mm_sms_dup_timestamp mm_sms_get_discharge_timestamp @@ -979,6 +980,7 @@ mm_sms_pdu_type_get_string mm_sms_state_get_string mm_sms_delivery_state_get_string mm_sms_storage_get_string +mm_sms_validity_type_get_string mm_firmware_image_type_get_string mm_modem_capability_get_string @@ -994,6 +996,7 @@ mm_sms_pdu_type_build_string_from_mask mm_sms_state_build_string_from_mask mm_sms_delivery_state_build_string_from_mask mm_sms_storage_build_string_from_mask +mm_sms_validity_type_build_string_from_mask mm_modem_location_source_get_string mm_modem_contacts_storage_build_string_from_mask mm_bearer_ip_family_build_string_from_mask @@ -1034,6 +1037,7 @@ MM_TYPE_SMS_DELIVERY_STATE MM_TYPE_SMS_PDU_TYPE MM_TYPE_SMS_STATE MM_TYPE_SMS_STORAGE +MM_TYPE_SMS_VALIDITY_TYPE mm_bearer_ip_family_get_type mm_bearer_ip_method_get_type mm_bearer_allowed_auth_get_type @@ -1060,6 +1064,7 @@ mm_sms_delivery_state_get_type mm_sms_pdu_type_get_type mm_sms_state_get_type mm_sms_storage_get_type +mm_sms_validity_type_get_type
@@ -2317,6 +2322,7 @@ mm_gdbus_sms_dup_number mm_gdbus_sms_get_smsc mm_gdbus_sms_dup_smsc mm_gdbus_sms_get_validity +mm_gdbus_sms_dup_validity mm_gdbus_sms_get_class mm_gdbus_sms_get_timestamp mm_gdbus_sms_dup_timestamp diff --git a/include/ModemManager-enums.h b/include/ModemManager-enums.h index 6c121354..f297d1be 100644 --- a/include/ModemManager-enums.h +++ b/include/ModemManager-enums.h @@ -521,6 +521,22 @@ typedef enum { /*< underscore_name=mm_sms_storage >*/ MM_SMS_STORAGE_TA = 6, } MMSmsStorage; +/** + * MMSmsValidityType: + * @MM_SMS_VALIDITY_TYPE_UNKNOWN: Validity type unknown. + * @MM_SMS_VALIDITY_TYPE_RELATIVE: Relative validity. + * @MM_SMS_VALIDITY_TYPE_ABSOLUTE: Absolute validity. + * @MM_SMS_VALIDITY_TYPE_ENHANCED: Enhanced validity. + * + * Type of SMS validity value. + */ +typedef enum { /*< underscore_name=mm_sms_validity_type >*/ + MM_SMS_VALIDITY_TYPE_UNKNOWN = 0, + MM_SMS_VALIDITY_TYPE_RELATIVE = 1, + MM_SMS_VALIDITY_TYPE_ABSOLUTE = 2, + MM_SMS_VALIDITY_TYPE_ENHANCED = 3, +} MMSmsValidityType; + /** * MMModemLocationSource: * @MM_MODEM_LOCATION_SOURCE_NONE: None. diff --git a/introspection/org.freedesktop.ModemManager1.Sms.xml b/introspection/org.freedesktop.ModemManager1.Sms.xml index 858c9890..16e29d2f 100644 --- a/introspection/org.freedesktop.ModemManager1.Sms.xml +++ b/introspection/org.freedesktop.ModemManager1.Sms.xml @@ -99,11 +99,25 @@ - +