From f9105bff875ae0e7263718a317e156948957a6d0 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 3 Apr 2013 16:30:48 +0200 Subject: api,introspection: update 'Validity' property in the SMS interface We don't want to support only 'relative' validity, so don't assume that the Validity property will always be a uint32 value. Instead, we define the Validity propery as '(uv)' tuple, where the first value (a MMSmsValidityType) specifies the type of validity, and the second value is a variant formatted accordingly to what the validity type specifies (e.g. a uint32 value if the type is MM_SMS_VALIDITY_TYPE_RELATIVE). --- cli/mmcli-sms.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'cli/mmcli-sms.c') 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))); -- cgit v1.2.3-70-g09d2