Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 67af5c1

Browse files
author
Eduardo Fullea
committed
Merge pull request #64 from efullea/delivery
Enhancing MMS delivery reports. Closes #18
2 parents ab42fda + 81b9cbb commit 67af5c1

File tree

1 file changed

+66
-40
lines changed

1 file changed

+66
-40
lines changed

index.html

Lines changed: 66 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ <h3>Steps</h3>
579579
<li>Set the <code>serviceID</code> of the <code>SmsMessage</code> to the
580580
identifier of the service used to send the message, i.e. the one passed in
581581
the <code>serviceID</code> parameter, if provided, or otherwise to the
582-
first element in the <code>serviceIDs</code> attribute of the
582+
first item in the <code>serviceIDs</code> attribute of the
583583
<code>SmsManager</code>.
584584
<li>Set the <code>from</code> of the <code>SmsMessage</code> to the
585585
number of the mobile subscription used to send this SMS message.
@@ -634,7 +634,7 @@ <h3>Steps</h3>
634634
SMS segments needed to send the text passed in the <code>text</code>
635635
parameter using the service with identifier equal to the one passed in the
636636
<code>serviceID</code> parameter, if provided, or otherwise to the first
637-
element in the <code>serviceIDs</code> attribute of the
637+
item in the <code>serviceIDs</code> attribute of the
638638
<code>SmsManager</code>. Note that the application SHOULD NOT split the
639639
text in a set of strings that fit each into a single SMS segment as it
640640
would result in different independent SMS messages being sent, but SHOULD
@@ -857,7 +857,7 @@ <h2><a>MmsManager</a> Interface</h2>
857857
<dt>FetchMode getFetchMode ()</dt>
858858
<dd>This method requests to retrieve the fetch mode associated to a specific
859859
service (the one identified by the <code>serviceID</code> attribute, if
860-
provided, or the first element in the <code>serviceIDs</code> attribute of
860+
provided, or the first item in the <code>serviceIDs</code> attribute of
861861
the <code>MmsManager</code> otherwise).
862862
<dl class='parameters'>
863863
<dt>optional DOMString serviceID</dt>
@@ -995,7 +995,7 @@ <h3>Steps</h3>
995995
<li>Set the <code>serviceID</code> of the <code>MmsMessage</code> to the
996996
identifier of the service used to send the message, i.e. the one passed in
997997
the <code>serviceID</code> parameter, if provided, or otherwise to the
998-
first element in the <code>serviceIDs</code> attribute of the
998+
first item in the <code>serviceIDs</code> attribute of the
999999
<code>MmsManager</code>.
10001000
<li>Set the <code>from</code> of the <code>MmsMessage</code> to the
10011001
number of the mobile subscription used to send this MMS message.
@@ -1015,11 +1015,14 @@ <h3>Steps</h3>
10151015
parameter.
10161016
<li>Set the <code>state</code> of the <code>MmsMessage</code> to
10171017
'sending'.
1018-
<li>Add a new element in the <code>deliveryStatus</code> array of the
1019-
<code>MmsMessage</code> for each of the addresses included in the
1020-
<code>to</code>, <code>cc</code> and <code>bcc</code> parameters, with
1021-
value 'pending' if a delivery report has been requested or with value
1022-
'not-applicable' otherwise.
1018+
<li>Add a new item in the <code>deliveryStatusArray</code> of the
1019+
<code>MmsMessage</code> for each unique recipient included in the
1020+
<code>to</code>, <code>cc</code> and <code>bcc</code> parameters (i.e. a
1021+
single item if the same address has multiple ocurrences across these
1022+
parameters), with the <code>recipient</code> attribute set to this
1023+
recipient's address and the <code>deliveryStatus</code> attribute set to
1024+
'pending', if a delivery report has been requested, or 'not-applicable'
1025+
otherwise.
10231026
<li>Make a request to the system to send an MMS message with the content
10241027
passed in the <code>content</code> parameter to the number(s) of indicated
10251028
in the <code>to</code> parameter, using the proper service as described
@@ -1032,9 +1035,10 @@ <h3>Steps</h3>
10321035
<li>If an <var>error</var> occurs run these substeps and terminate these
10331036
steps
10341037
<ol>
1035-
<li>If a delivery report had been requested set the different elements
1036-
in the <code>deliveryStatus</code> array of the <code>MmsMessage</code>
1037-
to 'error'.
1038+
<li>If a delivery report had been requested set the
1039+
<code>deliveryStatus</code> attribute of the different items in the
1040+
<code>deliveryStatusArray</code> attribute of the
1041+
<code>MmsMessage</code> to 'error'.
10381042
<li>call <var>resolver</var>'s <code>reject(value)</code>method with
10391043
<var>error</var> as <code>value</code> argument.
10401044
</ol>
@@ -1085,16 +1089,16 @@ <h3>Steps</h3>
10851089
[[!GSM-SMS]].
10861090
<li>Set the <code>expiry</code> of the <code>MmsMessage</code> to the
10871091
value of the 'X-Mms-Expiry' field of the MMS notification.
1088-
<li>Add a new element in the <code>to</code> array of the
1092+
<li>Add a new item in the <code>to</code> array of the
10891093
<code>MmsMessage</code> for each of recipients in the 'To' field of the
10901094
MMS notification [[!MMS13]], if present.
1091-
<li>Add a new element in the <code>cc</code> array of the
1095+
<li>Add a new item in the <code>cc</code> array of the
10921096
<code>MmsMessage</code> for each of recipients in the 'Cc' field of the
10931097
MMS notification [[!MMS13]], if present.
1094-
<li>Add a new element in the <code>bcc</code> array of the
1098+
<li>Add a new item in the <code>bcc</code> array of the
10951099
<code>MmsMessage</code> for each of recipients in the 'Bcc' field of the
10961100
MMS notification [[!MMS13]], if present.
1097-
<li>Set the <code>subject</code> element to the value of the 'Subject'
1101+
<li>Set the <code>subject</code> attribute to the value of the 'Subject'
10981102
field of the MMS notification [[!MMS13]], if present.
10991103
<li>Set the <code>state</code> of the <code>MmsMessage</code> to
11001104
'not-downloaded'.
@@ -1113,37 +1117,40 @@ <h3>Steps</h3>
11131117
value of the 'From' field of the MMS message [[!MMS13]].
11141118
<li>Set the <code>timestamp</code> of the <code>MmsMessage</code> to
11151119
the value of the 'Date' field of the MMS message [[!MMS13]].
1116-
<li>Add a new element in the <code>to</code> array of the
1120+
<li>Add a new item in the <code>to</code> array of the
11171121
<code>MmsMessage</code> for each of recipients in the 'To' field of the
11181122
MMS message [[!MMS13]], if present.
1119-
<li>Add a new element in the <code>cc</code> array of the
1123+
<li>Add a new item in the <code>cc</code> array of the
11201124
<code>MmsMessage</code> for each of recipients in the 'Cc' field of the
11211125
MMS message [[!MMS13]], if present.
1122-
<li>Add a new element in the <code>bcc</code> array of the
1126+
<li>Add a new item in the <code>bcc</code> array of the
11231127
<code>MmsMessage</code> for each of recipients in the 'Bcc' field of the
11241128
MMS message [[!MMS13]], if present.
1125-
<li>Set the <code>subject</code> element to the value of the 'Subject'
1129+
<li>Set the <code>subject</code> attribute to the value of the 'Subject'
11261130
field of the MMS message [[!MMS13]], if present.
1127-
<li>Set the <code>smil</code> element to a <code>DOMString</code>
1131+
<li>Set the <code>smil</code> attribute to a <code>DOMString</code>
11281132
containing the SMIL object of the received MMS message [[!MMS13]], if present.
11291133
<li>For each of the media files attached to the received MMS message add a
1130-
new element to the <code>attachments</code> array with:
1134+
new item to the <code>attachments</code> array with:
11311135
<ol>
11321136
<li>A new <code>Blob</code> object including the media type and the
11331137
actual content of the attachment.
11341138
<li>The <code>contentID</code> attribute filled with the Content-ID used
1135-
to reference this element from the SMIL object in the incoming MMS
1139+
to reference this attachment from the SMIL object in the incoming MMS
11361140
message [[!MMS13]], if present.
11371141
<li>The <code>contentLocation</code> attribute filled with the
1138-
Content-Location used to reference this element from the SMIL object in
1142+
Content-Location used to reference this attachment from the SMIL object in
11391143
the incoming MMS message [[!MMS13]], if present.
11401144
</ol>
11411145
</ol>
11421146
<li>Set the <code>state</code> of the <code>MmsMessage</code> to
11431147
'received'.
1144-
<li>Add a new element in the <code>deliveryStatus</code> array of the
1145-
<code>MmsMessage</code> for each of recipients in the 'To', 'Cc' and 'Bcc'
1146-
fields with value 'not-applicable'.
1148+
<li>Add a new item in the <code>deliveryStatusArray</code> of the
1149+
<code>MmsMessage</code> for each unique recipient included in the
1150+
'To', 'Cc' and 'Bcc' fields (i.e. a single item if the same address
1151+
has multiple ocurrences across these parameters), with the
1152+
<code>recipient</code> attribute set to this recipient's address and
1153+
the <code>deliveryStatus</code> attribute set to 'not-applicable'.
11471154
</ol>
11481155
<li><a>Queue a task</a> to <a>fire an event</a> named
11491156
<code><a>received</a></code> with the <code>message</code> attribute set
@@ -1210,10 +1217,16 @@ <h3>Steps</h3>
12101217
<p>Upon a delivery report of a previously sent MMS message being received, the
12111218
<a>user agent</a> MUST
12121219
<ol>
1213-
<li>Set the elements of the <code>deliveryStatus</code> array of the
1214-
<code>MmsMessage</code> corresponding to the recipients to which the
1215-
delivery report refers to 'success' or 'error' depending on the reported
1216-
result.
1220+
<li>For each of the items in the <code>deliveryStatusArray</code>
1221+
attribute of the <code>MmsMessage</code> whose <code>recipient</code>
1222+
attribute matches one of the recipients of the MMS to which the delivery
1223+
report is related, set its <code>deliveryStatus</code> attribute
1224+
<ol>
1225+
<li>to 'success', if the value of the X-Mms-Status element [[!MMS13]]
1226+
in the delivery report is 'Retrieved', or
1227+
<li>to 'error', if the value of the X-Mms-Status element [[!MMS13]] in
1228+
the delivery report is 'Expired', 'Rejected' or 'Unreachable'
1229+
</ol>
12171230
<li><a>Queue a task</a> to <a>fire an event</a> named
12181231
<a>deliverysuccess</a> or <a>deliveryfailure</a> respectively if the
12191232
delivery was successfull or not, with
@@ -1437,17 +1450,15 @@ <h2><a>MmsMessage</a> Interface</h2>
14371450
DOMString, that the messaging client needs to use to determine the way the
14381451
content of the MMS message is displayed.</dd>
14391452

1440-
<dt>readonly attribute MmsAttachments[]? attachments</dt>
1453+
<dt>readonly attribute MmsAttachment[]? attachments</dt>
14411454
<dd>MUST return the set of attachments of the MMS message.</dd>
14421455

14431456
<dt>readonly attribute MmsState state</dt>
14441457
<dd>MUST return the status of the MMS message.</dd>
14451458

1446-
<dt>readonly attribute DeliveryStatus[] deliveryStatus</dt>
1447-
<dd>MUST return an array with each of the elements indicating the delivery
1448-
status to each of the recipients of the message, in order starting with the
1449-
recipients in the 'To' field, followed by those in 'Cc' and ending with
1450-
those in 'Bcc'.</dd>
1459+
<dt>readonly attribute MmsDeliveryStatus[] deliveryStatusArray</dt>
1460+
<dd>MUST return an array with each of the items indicating the delivery
1461+
status to each of the recipients of the message.</dd>
14511462

14521463
</dl>
14531464
</section>
@@ -1516,6 +1527,21 @@ <h2><a>MmsAttachment</a> Dictionary</h2>
15161527
</dl>
15171528
</section>
15181529

1530+
<!------------------------ Dictionary MmsDeliveryStatus -------------------->
1531+
<section>
1532+
<h2><a>MmsDeliveryStatus</a> Dictionary</h2>
1533+
<dl title="dictionary MmsDeliveryStatus" class="idl">
1534+
<dt>DeliveryStatus deliveryStatus</dt>
1535+
<dd>
1536+
The delivery status of the MMS message
1537+
</dd>
1538+
<dt>DOMString recipient</dt>
1539+
<dd>
1540+
The recipient of the MMS to which the delivery status is related.
1541+
</dd>
1542+
</dl>
1543+
</section>
1544+
15191545
<!------------------------ Interface Conversation ---------------------------->
15201546
<section>
15211547
<h2><a>Conversation</a> Interface</h2>
@@ -1538,7 +1564,7 @@ <h2><a>Conversation</a> Interface</h2>
15381564
<dt>readonly attribute DOMString[] participants</dt>
15391565
<dd>MUST return an array containing the participants in the conversation. In
15401566
case the conversation is of type 'subject' and there are messages in the
1541-
conversation with a different set of participants then this element MUST
1567+
conversation with a different set of participants then this attribute MUST
15421568
return the union of the participants of all the messages in the
15431569
conversation.</dd>
15441570

@@ -1655,7 +1681,7 @@ <h2><a>DeliveryReport</a> Interface</h2>
16551681
related. As delivery reports related to just part of the recipients of the
16561682
MMS message are possible, this array may not contain the full list of
16571683
recipients to which the MMS message was sent. If the delivery report is
1658-
related to an SMS message then the array will contain a single element
1684+
related to an SMS message then the array will contain a single item
16591685
corresponding to the single recipient of the SMS message.
16601686
</dd>
16611687
</dl>
@@ -1695,7 +1721,7 @@ <h2><a>DeliveryReportEvent</a> Interface</h2>
16951721
related. As delivery reports related to just part of the recipients of the
16961722
MMS message are possible, this array may not contain the full list of
16971723
recipients to which the MMS message was sent. If the delivery report is
1698-
related to an SMS message then the array will contain a single element
1724+
related to an SMS message then the array will contain a single item
16991725
corresponding to the single recipient of the SMS message.
17001726
</dd>
17011727
</dl>

0 commit comments

Comments
 (0)