@@ -857,12 +857,12 @@ <h2><a>MmsManager</a> Interface</h2>
857
857
</ dl >
858
858
</ dd >
859
859
860
- < dt > MessagingRequest send ()</ dt >
860
+ < dt > Future send ()</ dt >
861
861
< dd > This method issues a request to the messaging system to send an MMS
862
862
message with the content and recipients included in the
863
863
< code > mmsContent</ code > parameter.
864
- A < code > MessagingRequest </ code > object will be returned in order to notify
865
- the result of the request.
864
+ A < code > Future </ code > object will be returned in order to notify the result
865
+ of the request.
866
866
< dl class ='parameters '>
867
867
< dt > MmsContent mmsContent</ dt >
868
868
< dd >
@@ -876,12 +876,12 @@ <h2><a>MmsManager</a> Interface</h2>
876
876
</ dl >
877
877
</ dd >
878
878
879
- < dt > MessagingRequest fetch ()</ dt >
879
+ < dt > Future fetch ()</ dt >
880
880
< dd > This method requests to fetch an MMS message with identifier equal to
881
881
the indicated in the < code > messageID</ code > parameter from the URL indicated in the
882
- MMS notification. The method returns a new < code > MessagingRequest </ code >
883
- that will allow the caller to be notified about the result (success, error)
884
- of the operation.
882
+ MMS notification. The method returns a new < code > Future </ code > that will
883
+ allow the caller to be notified about the result (success, error) of the
884
+ operation.
885
885
< dl class ='parameters '>
886
886
< dt > DOMString messageID</ dt >
887
887
< dd >
@@ -890,7 +890,7 @@ <h2><a>MmsManager</a> Interface</h2>
890
890
</ dl >
891
891
</ dd >
892
892
893
- < dt > MessagingRequest clear ()</ dt >
893
+ < dt > Future clear ()</ dt >
894
894
< dd > This method makes a request to delete all the messages associated to the
895
895
messaging service passed as parameter.
896
896
< dl class ='parameters '>
@@ -955,8 +955,7 @@ <h3>Steps</h3>
955
955
< p > The < dfn > < code > send</ code > </ dfn > method when invoked MUST run the
956
956
following steps:
957
957
< ol >
958
- < li > Create a new instance of < code > MmsMessage</ code > and a new instance
959
- of < code > MessagingRequest</ code > and:
958
+ < li > Create a new instance of < code > MmsMessage</ code > and:
960
959
< ol >
961
960
< li > Generate a identifier for this message that is globally unique within
962
961
the implementation, i.e. there cannot be any other message with the same
@@ -996,35 +995,28 @@ <h3>Steps</h3>
996
995
passed in the < code > content</ code > parameter to the number(s) of indicated
997
996
in the < code > to</ code > parameter, using the proper service as described
998
997
above.
999
- < li > Set < code > readyState</ code > of the < code > MessagingRequest</ code >
1000
- object to 'processing'.
1001
- < li > Return the < code > MessagingRequest</ code > to the caller and < a > queue a
1002
- task</ a > to monitor MMS sending progress.
998
+ < li > < a > Queue a task</ a > to monitor MMS sending progress.
1003
999
</ ol >
1004
- < li > If there is an error
1000
+ < li > Let < var > future</ var > be a new < code > Future</ code > object and
1001
+ < var > resolver</ var > its associated < code > resolver</ code >
1002
+ < li > Return < var > future</ var > to the caller.
1003
+ < li > If an < var > error</ var > occurs run these substeps and terminate these
1004
+ steps
1005
1005
< ol >
1006
- < li > Set the < code > state</ code > of the < code > MmsMessage</ code > to
1007
- 'error'.
1008
1006
< li > If a delivery report had been requested set the different elements
1009
1007
in the < code > deliveryStatus</ code > array of the < code > MmsMessage</ code >
1010
1008
to 'error'.
1011
- < li > Invoke the < code > onerror</ code > < a class ="internalDFN "
1012
- href ="#dfn-eventhandler "> event handlers</ a > of the
1013
- < code > MessagingRequest</ code > object.
1009
+ < li > call < var > resolver</ var > 's < code > reject(value)</ code > method with
1010
+ < var > error</ var > as < code > value</ code > argument.
1014
1011
</ ol >
1015
- < li > When the requests has been completed:
1012
+ < li > When the request has been successfully completed:
1016
1013
< ol >
1017
1014
< li > Set the < code > state</ code > of the < code > MmsMessage</ code > to 'sent'.
1018
1015
< li > Set the < code > timestamp</ code > of the < code > MmsMessage</ code > to the
1019
1016
timestamp when the MMS message was sent, i.e. the date when the M-Send.req
1020
1017
Protocol Data Unit was send from the MMS Client to the MMS Server.
1021
- < li > Set the < code > readyState</ code > of the < code > MessagingRequest</ code >
1022
- object to 'done'.
1023
- < li > Set the < code > result</ code > of the < code > MessagingRequest</ code >
1024
- object to the < code > MmsMessage</ code > that has been sent.
1025
- < li > Invoke the < code > onsuccess</ code > < a class ="internalDFN "
1026
- href ="#dfn-eventhandler "> event handlers</ a > of the
1027
- < code > MessagingRequest</ code > .
1018
+ < li > Call < var > resolver</ var > 's < code > accept(value)</ code > method with
1019
+ the sent < code > MmsMessage</ code > as < code > value</ code > argument.
1028
1020
< li > < a > Queue a task</ a > to < a > fire an event</ a > named
1029
1021
< code > sent</ code > with the < code > message</ code > attribute set to the sent
1030
1022
< code > MmsMessage</ code > .
@@ -1132,26 +1124,25 @@ <h3>Steps</h3>
1132
1124
corresponding MMS notification due to the fetch mode being manual. When this
1133
1125
method is invoked the User Agent MUST run the following steps:
1134
1126
< ol >
1135
- < li > Create a new < code > MessagingRequest</ code > object
1136
- < li > If the < code > messageID</ code > parameter passed in the request matches with an
1137
- MMS message that has already been fetched, or to an SMS message go to step
1138
- 5.1, otherwise make a request to the system to fetch the MMS message.
1139
- < li > Set the < code > readyState</ code > of the < code > MessagingRequest</ code >
1140
- object to 'processing' and return the < code > MessagingRequest</ code > to the
1141
- caller.
1142
- < li > If there is an error invoke the < code > onerror</ code > < a > event
1143
- handler</ a > of the < code > MessagingRequest</ code > object.
1144
- < li > When the request has been completed:
1127
+ < li > If the < code > messageID</ code > parameter passed in the request matches
1128
+ with an MMS message that has already been fetched, or to an SMS message go
1129
+ to next step, otherwise make a request to the system to fetch the MMS
1130
+ message.
1131
+ < li > Let < var > future</ var > be a new < code > Future</ code > object and
1132
+ < var > resolver</ var > its associated < code > resolver</ code >
1133
+ < li > Return < var > future</ var > to the caller.
1134
+ < li > If an < var > error</ var > occurs call < var > resolver</ var > 's
1135
+ < code > reject(value)</ code > method with < var > error</ var > as
1136
+ < code > value</ code > argument.
1137
+ < li > When the request has been successfully completed:
1145
1138
< ol >
1146
- < li > Run the < a class ="internalDFN " href ="#dfn-fill-mms-message "> steps for filling the
1147
- MmsMessage object with the data contained in the MMS message</ a > .
1148
- < li > Set the < code > readyState</ code > of the
1149
- < code > MessagingRequest</ code > object to 'done'.
1150
- < li > Set the < code > result</ code > of the < code > MessagingRequest</ code >
1151
- object to 'true'.
1152
- < li > Invoke the < code > onsuccess</ code > < a class ="internalDFN "
1153
- href ="#dfn-eventhandler "> event handlers</ a > of the
1154
- < code > MessagingRequest</ code > .
1139
+ < li > Run the < a class ="internalDFN " href ="#dfn-fill-mms-message "> steps for
1140
+ filling the MmsMessage object with the data contained in the MMS
1141
+ message</ a > .
1142
+ < li > Let < var > message</ var > be the < code > MmsMessage</ code > that has been
1143
+ fetched.
1144
+ < li > Call < var > resolver</ var > 's < code > accept(value)</ code > method with
1145
+ < var > message</ var > as < code > value</ code > argument.
1155
1146
</ ol >
1156
1147
</ ol >
1157
1148
@@ -1175,11 +1166,10 @@ <h3>Steps</h3>
1175
1166
}
1176
1167
</ pre >
1177
1168
1178
-
1179
- < p > The User Agent MAY fire additional < code > ProgressEvents</ code >
1180
- [[!PROGRESS-EVENTS]] on the < code > MessagingRequest</ code > object associated to
1181
- the sending and fetching of an MMS message, in order to report on the progress
1182
- of such operations.
1169
+ < div class ='note '>
1170
+ It is FFS how to report the progress of the sending and fetching of an MMS
1171
+ message.
1172
+ </ div >
1183
1173
1184
1174
< p > Upon a delivery report of a previously sent MMS message being received, the
1185
1175
< a > user agent</ a > MUST
@@ -1207,23 +1197,21 @@ <h3>Steps</h3>
1207
1197
< li > Make a request to the system to delete all the messages associated to
1208
1198
the messaging service with identifier equal to the < code > serviceID</ code >
1209
1199
parameter.
1210
- < li > Create a new < code > MessagingRequest</ code > object and set
1211
- < code > readyState</ code > of the < code > MessagingRequest</ code > object to
1212
- 'processing' and return the < code > MessagingRequest</ code > to the caller.
1213
- < li > If there is an error invoke the < code > onerror</ code > < a > event
1214
- handler</ a > of the < code > MessagingRequest</ code > object.
1215
- < li > When the request has been completed:
1200
+ < li > Let < var > future</ var > be a new < code > Future</ code > object and
1201
+ < var > resolver</ var > its associated < code > resolver</ code >
1202
+ < li > Return < var > future</ var > to the caller.
1203
+ < li > If an < var > error</ var > occurs call < var > resolver</ var > 's
1204
+ < code > reject(value)</ code > method with < var > error</ var > as
1205
+ < code > value</ code > argument.
1206
+ < li > When the request has been successfully completed:
1216
1207
< ol >
1217
- < li > Set the < code > readyState</ code > of the
1218
- < code > MessagingRequest</ code > object to 'done'.
1219
- < li > Set the < code > result</ code > of the < code > MessagingRequest</ code >
1220
- object to 'true'.
1221
- < li > Invoke the < code > onsuccess</ code > < a class ="internalDFN "
1222
- href ="#dfn-eventhandler "> event handlers</ a > of the
1223
- < code > MessagingRequest</ code > .
1208
+ < li > Let < var > serviceID</ var > be the < code > serviceID</ code > parameter
1209
+ passed in the request
1210
+ < li > Call < var > resolver</ var > 's < code > accept(value)</ code > method with
1211
+ < var > serviceID</ var > as < code > value</ code > argument.
1224
1212
</ ol >
1225
1213
</ ol >
1226
- </ section >
1214
+ </ section >
1227
1215
1228
1216
< section >
1229
1217
< h2 > Event handlers</ h2 >
0 commit comments