mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 793192 - MMI Codes: support call forwarding. Part 1 - RIL; r=marshall_law sr=sicking
This commit is contained in:
parent
a80995f067
commit
c3eae14aa5
@ -13,9 +13,18 @@ interface nsIDOMMozMobileCellInfo;
|
||||
interface nsIDOMMozIccManager;
|
||||
interface nsIDOMMozMobileCFInfo;
|
||||
|
||||
[scriptable, builtinclass, uuid(0540db59-8b4f-41c2-a1b8-4097780558b7)]
|
||||
[scriptable, builtinclass, uuid(cc4947eb-aa39-4c25-878d-618dc4d4d2bc)]
|
||||
interface nsIDOMMozMobileConnection : nsIDOMEventTarget
|
||||
{
|
||||
const long ICC_SERVICE_CLASS_VOICE = (1 << 0);
|
||||
const long ICC_SERVICE_CLASS_DATA = (1 << 1);
|
||||
const long ICC_SERVICE_CLASS_FAX = (1 << 2);
|
||||
const long ICC_SERVICE_CLASS_SMS = (1 << 3);
|
||||
const long ICC_SERVICE_CLASS_DATA_SYNC = (1 << 4);
|
||||
const long ICC_SERVICE_CLASS_DATA_ASYNC = (1 << 5);
|
||||
const long ICC_SERVICE_CLASS_PACKET = (1 << 6);
|
||||
const long ICC_SERVICE_CLASS_PAD = (1 << 7);
|
||||
|
||||
/**
|
||||
* Indicates the state of the device's ICC card.
|
||||
*
|
||||
|
@ -1901,6 +1901,21 @@ this.GECKO_RADIO_TECH = [
|
||||
|
||||
this.GECKO_VOICEMAIL_MESSAGE_COUNT_UNKNOWN = -1;
|
||||
|
||||
// Call forwarding action. Must be in sync with nsIDOMMozMobileCFInfo interface
|
||||
this.CALL_FORWARD_ACTION_DISABLE = 0;
|
||||
this.CALL_FORWARD_ACTION_ENABLE = 1;
|
||||
this.CALL_FORWARD_ACTION_QUERY_STATUS = 2;
|
||||
this.CALL_FORWARD_ACTION_REGISTRATION = 3;
|
||||
this.CALL_FORWARD_ACTION_ERASURE = 4;
|
||||
|
||||
// Call forwarding reason. Must be in sync with nsIDOMMozMobileCFInfo interface
|
||||
this.CALL_FORWARD_REASON_UNCONDITIONAL = 0;
|
||||
this.CALL_FORWARD_REASON_MOBILE_BUSY = 1;
|
||||
this.CALL_FORWARD_REASON_NO_REPLY = 2;
|
||||
this.CALL_FORWARD_REASON_NOT_REACHABLE = 3;
|
||||
this.CALL_FORWARD_REASON_ALL_CALL_FORWARDING = 4;
|
||||
this.CALL_FORWARD_REASON_ALL_CONDITIONAL_CALL_FORWARDING = 5;
|
||||
|
||||
// MMI procedure as defined in TS.22.030 6.5.2
|
||||
this.MMI_PROCEDURE_ACTIVATION = "*";
|
||||
this.MMI_PROCEDURE_DEACTIVATION = "#";
|
||||
@ -1908,6 +1923,13 @@ this.MMI_PROCEDURE_INTERROGATION = "*#";
|
||||
this.MMI_PROCEDURE_REGISTRATION = "**";
|
||||
this.MMI_PROCEDURE_ERASURE = "##";
|
||||
|
||||
this.MMI_PROC_TO_CF_ACTION = {};
|
||||
MMI_PROC_TO_CF_ACTION[MMI_PROCEDURE_ACTIVATION] = CALL_FORWARD_ACTION_ENABLE;
|
||||
MMI_PROC_TO_CF_ACTION[MMI_PROCEDURE_DEACTIVATION] = CALL_FORWARD_ACTION_DISABLE;
|
||||
MMI_PROC_TO_CF_ACTION[MMI_PROCEDURE_INTERROGATION] = CALL_FORWARD_ACTION_QUERY_STATUS;
|
||||
MMI_PROC_TO_CF_ACTION[MMI_PROCEDURE_REGISTRATION] = CALL_FORWARD_ACTION_REGISTRATION;
|
||||
MMI_PROC_TO_CF_ACTION[MMI_PROCEDURE_ERASURE] = CALL_FORWARD_ACTION_ERASURE;
|
||||
|
||||
// MMI call forwarding service codes as defined in TS.22.030 Annex B
|
||||
this.MMI_SC_CFU = "21";
|
||||
this.MMI_SC_CF_BUSY = "67";
|
||||
@ -1916,6 +1938,13 @@ this.MMI_SC_CF_NOT_REACHABLE = "62";
|
||||
this.MMI_SC_CF_ALL = "002";
|
||||
this.MMI_SC_CF_ALL_CONDITIONAL = "004";
|
||||
|
||||
this.MMI_SC_TO_CF_REASON = {};
|
||||
MMI_SC_TO_CF_REASON[MMI_SC_CFU] = CALL_FORWARD_REASON_UNCONDITIONAL;
|
||||
MMI_SC_TO_CF_REASON[MMI_SC_CF_BUSY] = CALL_FORWARD_REASON_MOBILE_BUSY;
|
||||
MMI_SC_TO_CF_REASON[MMI_SC_CF_NOT_REACHABLE] = CALL_FORWARD_REASON_NOT_REACHABLE;
|
||||
MMI_SC_TO_CF_REASON[MMI_SC_CF_ALL] = CALL_FORWARD_REASON_ALL_CALL_FORWARDING;
|
||||
MMI_SC_TO_CF_REASON[MMI_SC_CF_ALL_CONDITIONAL] = CALL_FORWARD_REASON_ALL_CONDITIONAL_CALL_FORWARDING;
|
||||
|
||||
// MMI service codes for PIN/PIN2/PUK/PUK2 management as defined in TS.22.030
|
||||
// sec 6.6
|
||||
this.MMI_SC_PIN = "04";
|
||||
|
@ -2376,8 +2376,22 @@ let RIL = {
|
||||
case MMI_SC_CF_NOT_REACHABLE:
|
||||
case MMI_SC_CF_ALL:
|
||||
case MMI_SC_CF_ALL_CONDITIONAL:
|
||||
// TODO: Bug 793192 - MMI Codes: support call forwarding.
|
||||
_sendMMIError("CALL_FORWARDING_NOT_SUPPORTED_VIA_MMI");
|
||||
// Call forwarding requires at least an action, given by the MMI
|
||||
// procedure, and a reason, given by the MMI service code, but there
|
||||
// is no way that we get this far without a valid procedure or service
|
||||
// code.
|
||||
options.action = MMI_PROC_TO_CF_ACTION[mmi.procedure];
|
||||
options.rilMessageType = "sendMMI";
|
||||
options.reason = MMI_SC_TO_CF_REASON[sc];
|
||||
options.number = mmi.sia;
|
||||
options.serviceClass = mmi.sib;
|
||||
if (options.action == CALL_FORWARD_ACTION_QUERY_STATUS) {
|
||||
_sendMMIError("CF_QUERY_STATUS_NOT_SUPPORTED");
|
||||
return;
|
||||
}
|
||||
|
||||
options.timeSeconds = mmi.sic;
|
||||
this.setCallForward(options);
|
||||
return;
|
||||
|
||||
// Change the current ICC PIN number.
|
||||
|
Loading…
Reference in New Issue
Block a user