From a790a10fbdd69c161d95b6f18fd0fecc61b76537 Mon Sep 17 00:00:00 2001 From: Edgar Chen Date: Fri, 23 Nov 2012 10:18:52 +0800 Subject: [PATCH] Bug 804671 - Part 1: IDL for PROVIDE_LOCAL_INFO. r=allstars.chh. sr=jonas --- dom/icc/interfaces/SimToolKit.idl | 53 +++++++++++++++++++++++++ dom/icc/interfaces/nsIDOMIccManager.idl | 11 +++++ 2 files changed, 64 insertions(+) diff --git a/dom/icc/interfaces/SimToolKit.idl b/dom/icc/interfaces/SimToolKit.idl index 2e57b7f1099..b015176388c 100644 --- a/dom/icc/interfaces/SimToolKit.idl +++ b/dom/icc/interfaces/SimToolKit.idl @@ -318,6 +318,19 @@ dictionary MozStkPlayTone boolean isVibrate; }; +dictionary MozStkProvideLocalInfo +{ + /** + * Indicate which local information is required. + * It shall be one of following: + * - nsIDOMMozIccManager.STK_LOCAL_INFO_LOCATION_INFO + * - nsIDOMMozIccManager.STK_LOCAL_INFO_IMEI + * - nsIDOMMozIccManager.STK_LOCAL_INFO_DATE_TIME_ZONE + * - nsIDOMMozIccManager.STK_LOCAL_INFO_LANGUAGE + */ + unsigned short localInfoType; +}; + dictionary MozStkLocationEvent { /** @@ -403,6 +416,10 @@ dictionary MozStkCommand * options is MozStkDuration. * * When typeOfCommand is + * - STK_CMD_PROVIDE_LOCAL_INFO + * options is MozStkProvideLocalInfo. + * + * When typeOfCommand is * - STK_CMD_POLL_OFF * options is null. * @@ -458,6 +475,13 @@ dictionary MozStkResponse * false: Rejected by User. */ boolean hasConfirmed; + + /** + * The response for STK_CMD_PROVIDE_LOCAL_INFO + * + * @see MozStkLocalInfo + */ + jsval localInfo; }; dictionary MozStkCallEvent @@ -493,3 +517,32 @@ dictionary MozStkCallEvent */ DOMString error; }; + +dictionary MozStkLocalInfo +{ + /** + * IMEI information + */ + DOMString imei; + + /** + * Location Information + * + * @see MozStkLocationInfo. + */ + jsval locationInfo; + + /** + * Date information + * + * @see Date + */ + jsval date; + + /** + * Language Information + * + * @see ISO 639-1, Alpha-2 code + */ + DOMString language; +}; diff --git a/dom/icc/interfaces/nsIDOMIccManager.idl b/dom/icc/interfaces/nsIDOMIccManager.idl index 9fce8794526..7cb9202fa36 100644 --- a/dom/icc/interfaces/nsIDOMIccManager.idl +++ b/dom/icc/interfaces/nsIDOMIccManager.idl @@ -45,6 +45,7 @@ interface nsIDOMMozIccManager : nsIDOMEventTarget const unsigned short STK_CMD_GET_INPUT = 0x23; const unsigned short STK_CMD_SELECT_ITEM = 0x24; const unsigned short STK_CMD_SET_UP_MENU = 0x25; + const unsigned short STK_CMD_PROVIDE_LOCAL_INFO = 0x26; const unsigned short STK_CMD_SET_UP_IDLE_MODE_TEXT = 0x28; /** @@ -194,6 +195,16 @@ interface nsIDOMMozIccManager : nsIDOMEventTarget const unsigned short STK_TIME_UNIT_SECOND = 0x01; const unsigned short STK_TIME_UNIT_TENTH_SECOND = 0x02; + /** + * Local Information list + * + * @see TS 102.223, clause 8.6 + */ + const unsigned short STK_LOCAL_INFO_LOCATION_INFO = 0x00; + const unsigned short STK_LOCAL_INFO_IMEI = 0x01; + const unsigned short STK_LOCAL_INFO_DATE_TIME_ZONE = 0x03; + const unsigned short STK_LOCAL_INFO_LANGUAGE = 0x04; + /** * Send the response back to ICC after an attempt to execute STK Proactive * Command.