aboutsummaryrefslogtreecommitdiff
path: root/cli/mmcli-sms.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-04-03 16:30:48 +0200
committerAleksander Morgado <aleksander@lanedo.com>2013-04-05 17:48:51 +0200
commitf9105bff875ae0e7263718a317e156948957a6d0 (patch)
tree417299f51a7d17d7d5bd30692fd7b5ffd98092de /cli/mmcli-sms.c
parent372a49bbf661c95110852c86df54008a7bad2774 (diff)
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).
Diffstat (limited to 'cli/mmcli-sms.c')
-rw-r--r--cli/mmcli-sms.c17
1 files changed, 9 insertions, 8 deletions
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)));