Closed Bug 874734 Opened 11 years ago Closed 11 years ago

B2G SMS MMS: let SmsService::Send support array of aNumber for sending group sms.

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: ctai, Unassigned)

References

Details

Attachments

(1 file)

Make |SmsService::Send| can support array of aNumber for sending group sms.
Attachment #752567 - Flags: feedback?(vyang)
Comment on attachment 752567 [details] [diff] [review]
Part 1/2: Interface v1.0

Review of attachment 752567 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/mobilemessage/interfaces/nsISmsService.idl
@@ +27,5 @@
> +  /**
> +   * smsArray is an array of SMS entity. Each SMS entity has number, message and
> +   * nsIMobileMessageCallback.
> +   */
> +  void sendGroupSMS(in jsval smsArray);

I think we can rewrite send() as:

  void send([array, size_is(size)] in DOMString number,
            in DOMString message,
            [array, size_is(size)] in nsIMobileMessageCallback callback,
            in uint32_t size);

See also bug 771458.

::: dom/system/gonk/nsIRadioInterfaceLayer.idl
@@ +124,5 @@
> +  /**
> +   * smsArray is an array of SMS entity. Each SMS entity has number, message and
> +   * nsIMobileMessageCallback.
> +   */
> +  void sendGroupSMS(in jsval smsArray);

ditto.
Attachment #752567 - Flags: feedback?(vyang)
Comment on attachment 752567 [details] [diff] [review]
Part 1/2: Interface v1.0

Review of attachment 752567 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/mobilemessage/interfaces/nsISmsService.idl
@@ +27,5 @@
> +  /**
> +   * smsArray is an array of SMS entity. Each SMS entity has number, message and
> +   * nsIMobileMessageCallback.
> +   */
> +  void sendGroupSMS(in jsval smsArray);

We should rewrite as
  void send(in jsval number,
            in DOMString message,
            [array, size_is(size)] in nsIMobileMessageCallback callback,
            in uint32_t size);

idl generator change "[array, size_is(size)] in DOMString number" to const nsAString & *.
We can't declare a pointer to a reference in C++.
Comment on attachment 752567 [details] [diff] [review]
Part 1/2: Interface v1.0

Review of attachment 752567 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/mobilemessage/interfaces/nsISmsService.idl
@@ +27,5 @@
> +  /**
> +   * smsArray is an array of SMS entity. Each SMS entity has number, message and
> +   * nsIMobileMessageCallback.
> +   */
> +  void sendGroupSMS(in jsval smsArray);

Another solution is:
  void send([array, size_is(size)] in wstring number,
            in DOMString message,
            [array, size_is(size)] in nsIMobileMessageCallback callback,
            in uint32_t size);
Use wstring array. IDL generator will change this array to const PRUnichar * *.
After talk with Vicamo, I will take this solution.
Whiteboard: RN5/29
Whiteboard: RN5/29
After more talk with Vicamo, we don't to support other getThreads mechanism in Gecko. So don't need to do this bug.
Assignee: ctai → nobody
If we need other getThreads mechanism, Gaia developer should support it.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: