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).
This commit is contained in:
@@ -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)));
|
||||
|
||||
|
Reference in New Issue
Block a user