api: new `DischargeTimestamp' property for Status Report SMS messages
This commit is contained in:
@@ -120,12 +120,28 @@
|
||||
<!--
|
||||
Timestamp:
|
||||
|
||||
Time message was received or was sent, in
|
||||
Time when the first PDU of the SMS message arrived the SMSC, in
|
||||
<ulink url="http://en.wikipedia.org/wiki/ISO_8601">ISO8601</ulink>
|
||||
format.
|
||||
This field is only applicable if the PDU type is
|
||||
<link linkend="MM-SMS-PDU-TYPE-DELIVER:CAPS"><constant>MM_SMS_PDU_TYPE_DELIVER</constant></link>.
|
||||
or
|
||||
<link linkend="MM-SMS-PDU-TYPE-STATUS-REPORT:CAPS"><constant>MM_SMS_PDU_TYPE_STATUS_REPORT</constant></link>.
|
||||
-->
|
||||
<property name="Timestamp" type="s" access="read" />
|
||||
|
||||
<!--
|
||||
DischargeTimestamp:
|
||||
|
||||
Time when the first PDU of the SMS message left the SMSC, in
|
||||
<ulink url="http://en.wikipedia.org/wiki/ISO_8601">ISO8601</ulink>
|
||||
format.
|
||||
|
||||
This field is only applicable if the PDU type is
|
||||
<link linkend="MM-SMS-PDU-TYPE-STATUS-REPORT:CAPS"><constant>MM_SMS_PDU_TYPE_STATUS_REPORT</constant></link>.
|
||||
-->
|
||||
<property name="DischargeTimestamp" type="s" access="read" />
|
||||
|
||||
<!--
|
||||
Storage:
|
||||
|
||||
|
@@ -321,6 +321,7 @@ struct _MMSmsPart {
|
||||
MMSmsPduType pdu_type;
|
||||
gchar *smsc;
|
||||
gchar *timestamp;
|
||||
gchar *discharge_timestamp;
|
||||
gchar *number;
|
||||
gchar *text;
|
||||
MMSmsEncoding encoding;
|
||||
@@ -339,6 +340,7 @@ struct _MMSmsPart {
|
||||
void
|
||||
mm_sms_part_free (MMSmsPart *self)
|
||||
{
|
||||
g_free (self->discharge_timestamp);
|
||||
g_free (self->timestamp);
|
||||
g_free (self->smsc);
|
||||
g_free (self->number);
|
||||
@@ -390,6 +392,8 @@ PART_GET_FUNC (const gchar *, number)
|
||||
PART_SET_TAKE_STR_FUNC (number)
|
||||
PART_GET_FUNC (const gchar *, timestamp)
|
||||
PART_SET_TAKE_STR_FUNC (timestamp)
|
||||
PART_GET_FUNC (const gchar *, discharge_timestamp)
|
||||
PART_SET_TAKE_STR_FUNC (discharge_timestamp)
|
||||
PART_GET_FUNC (guint, concat_max)
|
||||
PART_SET_FUNC (guint, concat_max)
|
||||
PART_GET_FUNC (guint, concat_sequence)
|
||||
@@ -680,8 +684,8 @@ mm_sms_part_new_from_binary_pdu (guint index,
|
||||
offset += 7;
|
||||
|
||||
/* ------ Discharge Timestamp (7 bytes) ------ */
|
||||
mm_sms_part_take_timestamp (sms_part,
|
||||
sms_decode_timestamp (&pdu[offset]));
|
||||
mm_sms_part_take_discharge_timestamp (sms_part,
|
||||
sms_decode_timestamp (&pdu[offset]));
|
||||
offset += 7;
|
||||
|
||||
/* ----- TP-STATUS (1 byte) ------ */
|
||||
|
@@ -74,6 +74,12 @@ void mm_sms_part_set_timestamp (MMSmsPart *part,
|
||||
void mm_sms_part_take_timestamp (MMSmsPart *part,
|
||||
gchar *timestamp);
|
||||
|
||||
const gchar *mm_sms_part_get_discharge_timestamp (MMSmsPart *part);
|
||||
void mm_sms_part_set_discharge_timestamp (MMSmsPart *part,
|
||||
const gchar *timestamp);
|
||||
void mm_sms_part_take_discharge_timestamp (MMSmsPart *part,
|
||||
gchar *timestamp);
|
||||
|
||||
const gchar *mm_sms_part_get_text (MMSmsPart *part);
|
||||
void mm_sms_part_set_text (MMSmsPart *part,
|
||||
const gchar *text);
|
||||
|
@@ -1182,8 +1182,9 @@ assemble_sms (MMSms *self,
|
||||
"smsc", mm_sms_part_get_smsc (sorted_parts[0]),
|
||||
"class", mm_sms_part_get_class (sorted_parts[0]),
|
||||
"number", mm_sms_part_get_number (sorted_parts[0]),
|
||||
"timestamp", mm_sms_part_get_timestamp (sorted_parts[0]),
|
||||
"validity", mm_sms_part_get_validity (sorted_parts[0]),
|
||||
"timestamp", mm_sms_part_get_timestamp (sorted_parts[0]),
|
||||
"discharge-timestamp", mm_sms_part_get_discharge_timestamp (sorted_parts[0]),
|
||||
/* delivery report request usually set in the last part only */
|
||||
"delivery-report-request", mm_sms_part_get_delivery_report_request (sorted_parts[self->priv->max_parts - 1]),
|
||||
NULL);
|
||||
|
Reference in New Issue
Block a user