[including dev-webapi and dev-b2g]

Hi all,

Here is a revision of the proposal for multi-SIMs WebTelephony API and RIL implementation. This revision adds the possible RIL implementation [1].

Below is the main idea. With various hardware design, there might be multiple ril-daemon (rild), one rild taking care of one SIM, while it is also possible that a single rild manipulates all the SIMs. To make our architecture flexible enough, we are planning to have 'rilproxy' in charge of sending RIL parcels to the correct rild, no matter how many there are.

Also, we are proposing to add a new object called 'MSimRadioInterfaceLayer', which takes responsibility of creating RadioInterfaceLayer instances for every SIM, getting worker of each instance and receiving IPC messages. Once it receives the IPC messages, it dispatches the messages to the right RadioInterfaceLayer instance according to the 'subscriptionId' property. Then that instance should handle those messages. It is also each instance's job to send messages to content.

You can refer to the wiki [1] for more details.

Your comments are very welcome. Thanks :)

[1] https://wiki.mozilla.org/WebAPI/WebTelephony/Multi-SIM#RIL_Implementation

Best,
Hsinyi

On 2012年10月23日 17:06, Hsin-Yi Tsai wrote:
Dear all,

Currently B2G supports a single SIM architecture. I would like to initiate the discussion about multi-SIMs support.

This draft proposal extend the current WebTelephony API for multi-SIMs. It introduces a central 'nsIDOMTelephonyManager' to manage several DOMTelephony objects. One DOMTelephony object is binded to a physical SIM slot. User can get all the phones (DOMTelephony), the default phone and all the calls through nsIDOMTelephonyManager. User can also get calls of a specific SIM through this API, of course.

Proposed APIs are listed below. You can also refer to the wiki [1] to get more details, including usecase, possible implementation and potential issues.

interface nsIDOMTelephonyManager : nsIDOMEventTarget
{
attribute boolean muted; /* Moved from the original nsIDOMTelephony */
attribute boolean speakerEnabled; /* Moved from the original nsIDOMTelephony */

readonly attribute jsval active;
readonly attribute jsval calls;
readonly attribute phoneState;  /* Ringing, Offhook, Idle */
readonly attribute jsval phones;
readonly attribute nsIDOMTelephony defaultPhone;

[implicit_jscontext] attribute jsval onincoming;
[implicit_jscontext] attribute jsval oncallschanged;
};

interface nsIDOMTelephony: nsIDOMEventTarget
{
nsIDOMTelephonyCall dial(in DOMString number);

// The call that is "active", i.e. receives microphone input and tones
// generated via startTone.
readonly attribute jsval active;

// Array of all calls that are currently connected.
readonly attribute jsval calls;

void startTone(in DOMString tone);
void stopTone();

attribute nsIDOMEventListener onincoming;
attribute nsIDOMEventListener oncallschanged;
};

interface nsIDOMTelephonyCall: nsIDOMEventTarget
{
readonly attribute DOMString number;

// "dialing", "alerting", "busy", "connecting", "connected", "disconnecting",
// "disconnected", "incoming", "holding", "held", "resuming"
readonly attribute DOMString state;

readonly attribute nsIDOMDOMError error;
readonly attribute nsIDOMTelephony phone; /* New attribute */

// functions to mediate a call.
void answer();
void hangUp();
void hold();
void resume();

attribute nsIDOMEventListener onstatechange;

attribute nsIDOMEventListener ondialing;
attribute nsIDOMEventListener onalerting;
attribute nsIDOMEventListener onbusy;
attribute nsIDOMEventListener onconnecting;
attribute nsIDOMEventListener onconnected;
attribute nsIDOMEventListener ondisconnecting;
attribute nsIDOMEventListener ondisconnected;
attribute nsIDOMEventListener onincoming;
attribute nsIDOMEventListener onholding;
attribute nsIDOMEventListener onheld;
attribute nsIDOMEventListener onresuming;
};


Your comments and suggestions are always welcome. :)

[1] https://wiki.mozilla.org/WebAPI/WebTelephony/Multi-SIM

Thanks,
Hsinyi






--
Hsin-Yi Tsai 蔡欣宜
Mozilla Taiwan
T: +886-2-87861100 ext:312
[email protected]

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to