dom/system/gonk/ril_consts.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/system/gonk/ril_consts.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,3065 @@
     1.4 +/* Copyright 2012 Mozilla Foundation and Mozilla contributors
     1.5 + *
     1.6 + * Licensed under the Apache License, Version 2.0 (the "License");
     1.7 + * you may not use this file except in compliance with the License.
     1.8 + * You may obtain a copy of the License at
     1.9 + *
    1.10 + *     http://www.apache.org/licenses/LICENSE-2.0
    1.11 + *
    1.12 + * Unless required by applicable law or agreed to in writing, software
    1.13 + * distributed under the License is distributed on an "AS IS" BASIS,
    1.14 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    1.15 + * See the License for the specific language governing permissions and
    1.16 + * limitations under the License.
    1.17 + */
    1.18 +
    1.19 +// Set to true to debug all RIL layers
    1.20 +this.DEBUG_ALL = false;
    1.21 +
    1.22 +// Set individually to debug specific layers
    1.23 +this.DEBUG_WORKER = false || DEBUG_ALL;
    1.24 +this.DEBUG_CONTENT_HELPER = false || DEBUG_ALL;
    1.25 +this.DEBUG_RIL = false || DEBUG_ALL;
    1.26 +
    1.27 +this.REQUEST_GET_SIM_STATUS = 1;
    1.28 +this.REQUEST_ENTER_SIM_PIN = 2;
    1.29 +this.REQUEST_ENTER_SIM_PUK = 3;
    1.30 +this.REQUEST_ENTER_SIM_PIN2 = 4;
    1.31 +this.REQUEST_ENTER_SIM_PUK2 = 5;
    1.32 +this.REQUEST_CHANGE_SIM_PIN = 6;
    1.33 +this.REQUEST_CHANGE_SIM_PIN2 = 7;
    1.34 +this.REQUEST_ENTER_NETWORK_DEPERSONALIZATION_CODE = 8;
    1.35 +this.REQUEST_GET_CURRENT_CALLS = 9;
    1.36 +this.REQUEST_DIAL = 10;
    1.37 +this.REQUEST_GET_IMSI = 11;
    1.38 +this.REQUEST_HANGUP = 12;
    1.39 +this.REQUEST_HANGUP_WAITING_OR_BACKGROUND = 13;
    1.40 +this.REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND = 14;
    1.41 +this.REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE = 15;
    1.42 +this.REQUEST_CONFERENCE = 16;
    1.43 +this.REQUEST_UDUB = 17;
    1.44 +this.REQUEST_LAST_CALL_FAIL_CAUSE = 18;
    1.45 +this.REQUEST_SIGNAL_STRENGTH = 19;
    1.46 +this.REQUEST_VOICE_REGISTRATION_STATE = 20;
    1.47 +this.REQUEST_DATA_REGISTRATION_STATE = 21;
    1.48 +this.REQUEST_OPERATOR = 22;
    1.49 +this.REQUEST_RADIO_POWER = 23;
    1.50 +this.REQUEST_DTMF = 24;
    1.51 +this.REQUEST_SEND_SMS = 25;
    1.52 +this.REQUEST_SEND_SMS_EXPECT_MORE = 26;
    1.53 +this.REQUEST_SETUP_DATA_CALL = 27;
    1.54 +this.REQUEST_SIM_IO = 28;
    1.55 +this.REQUEST_SEND_USSD = 29;
    1.56 +this.REQUEST_CANCEL_USSD = 30;
    1.57 +this.REQUEST_GET_CLIR = 31;
    1.58 +this.REQUEST_SET_CLIR = 32;
    1.59 +this.REQUEST_QUERY_CALL_FORWARD_STATUS = 33;
    1.60 +this.REQUEST_SET_CALL_FORWARD = 34;
    1.61 +this.REQUEST_QUERY_CALL_WAITING = 35;
    1.62 +this.REQUEST_SET_CALL_WAITING = 36;
    1.63 +this.REQUEST_SMS_ACKNOWLEDGE = 37;
    1.64 +this.REQUEST_GET_IMEI = 38;
    1.65 +this.REQUEST_GET_IMEISV = 39;
    1.66 +this.REQUEST_ANSWER = 40;
    1.67 +this.REQUEST_DEACTIVATE_DATA_CALL = 41;
    1.68 +this.REQUEST_QUERY_FACILITY_LOCK = 42;
    1.69 +this.REQUEST_SET_FACILITY_LOCK = 43;
    1.70 +this.REQUEST_CHANGE_BARRING_PASSWORD = 44;
    1.71 +this.REQUEST_QUERY_NETWORK_SELECTION_MODE = 45;
    1.72 +this.REQUEST_SET_NETWORK_SELECTION_AUTOMATIC = 46;
    1.73 +this.REQUEST_SET_NETWORK_SELECTION_MANUAL = 47;
    1.74 +this.REQUEST_QUERY_AVAILABLE_NETWORKS = 48;
    1.75 +this.REQUEST_DTMF_START = 49;
    1.76 +this.REQUEST_DTMF_STOP = 50;
    1.77 +this.REQUEST_BASEBAND_VERSION = 51;
    1.78 +this.REQUEST_SEPARATE_CONNECTION = 52;
    1.79 +this.REQUEST_SET_MUTE = 53;
    1.80 +this.REQUEST_GET_MUTE = 54;
    1.81 +this.REQUEST_QUERY_CLIP = 55;
    1.82 +this.REQUEST_LAST_DATA_CALL_FAIL_CAUSE = 56;
    1.83 +this.REQUEST_DATA_CALL_LIST = 57;
    1.84 +this.REQUEST_RESET_RADIO = 58;
    1.85 +this.REQUEST_OEM_HOOK_RAW = 59;
    1.86 +this.REQUEST_OEM_HOOK_STRINGS = 60;
    1.87 +this.REQUEST_SCREEN_STATE = 61;
    1.88 +this.REQUEST_SET_SUPP_SVC_NOTIFICATION = 62;
    1.89 +this.REQUEST_WRITE_SMS_TO_SIM = 63;
    1.90 +this.REQUEST_DELETE_SMS_ON_SIM = 64;
    1.91 +this.REQUEST_SET_BAND_MODE = 65;
    1.92 +this.REQUEST_QUERY_AVAILABLE_BAND_MODE = 66;
    1.93 +this.REQUEST_STK_GET_PROFILE = 67;
    1.94 +this.REQUEST_STK_SET_PROFILE = 68;
    1.95 +this.REQUEST_STK_SEND_ENVELOPE_COMMAND = 69;
    1.96 +this.REQUEST_STK_SEND_TERMINAL_RESPONSE = 70;
    1.97 +this.REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM = 71;
    1.98 +this.REQUEST_EXPLICIT_CALL_TRANSFER = 72;
    1.99 +this.REQUEST_SET_PREFERRED_NETWORK_TYPE = 73;
   1.100 +this.REQUEST_GET_PREFERRED_NETWORK_TYPE = 74;
   1.101 +this.REQUEST_GET_NEIGHBORING_CELL_IDS = 75;
   1.102 +this.REQUEST_SET_LOCATION_UPDATES = 76;
   1.103 +this.REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE = 77;
   1.104 +this.REQUEST_CDMA_SET_ROAMING_PREFERENCE = 78;
   1.105 +this.REQUEST_CDMA_QUERY_ROAMING_PREFERENCE = 79;
   1.106 +this.REQUEST_SET_TTY_MODE = 80;
   1.107 +this.REQUEST_QUERY_TTY_MODE = 81;
   1.108 +this.REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE = 82;
   1.109 +this.REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE = 83;
   1.110 +this.REQUEST_CDMA_FLASH = 84;
   1.111 +this.REQUEST_CDMA_BURST_DTMF = 85;
   1.112 +this.REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY = 86;
   1.113 +this.REQUEST_CDMA_SEND_SMS = 87;
   1.114 +this.REQUEST_CDMA_SMS_ACKNOWLEDGE = 88;
   1.115 +this.REQUEST_GSM_GET_BROADCAST_SMS_CONFIG = 89;
   1.116 +this.REQUEST_GSM_SET_BROADCAST_SMS_CONFIG = 90;
   1.117 +this.REQUEST_GSM_SMS_BROADCAST_ACTIVATION = 91;
   1.118 +this.REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG = 92;
   1.119 +this.REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG = 93;
   1.120 +this.REQUEST_CDMA_SMS_BROADCAST_ACTIVATION = 94;
   1.121 +this.REQUEST_CDMA_SUBSCRIPTION = 95;
   1.122 +this.REQUEST_CDMA_WRITE_SMS_TO_RUIM = 96;
   1.123 +this.REQUEST_CDMA_DELETE_SMS_ON_RUIM = 97;
   1.124 +this.REQUEST_DEVICE_IDENTITY = 98;
   1.125 +this.REQUEST_EXIT_EMERGENCY_CALLBACK_MODE = 99;
   1.126 +this.REQUEST_GET_SMSC_ADDRESS = 100;
   1.127 +this.REQUEST_SET_SMSC_ADDRESS = 101;
   1.128 +this.REQUEST_REPORT_SMS_MEMORY_STATUS = 102;
   1.129 +this.REQUEST_REPORT_STK_SERVICE_IS_RUNNING = 103;
   1.130 +this.REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE = 104;
   1.131 +this.REQUEST_ISIM_AUTHENTICATION = 105;
   1.132 +this.REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU = 106;
   1.133 +this.REQUEST_STK_SEND_ENVELOPE_WITH_STATUS = 107;
   1.134 +this.REQUEST_VOICE_RADIO_TECH = 108;
   1.135 +this.REQUEST_DIAL_EMERGENCY_CALL = 10016;
   1.136 +
   1.137 +// Mozilla-specific request codes
   1.138 +this.REQUEST_GET_UNLOCK_RETRY_COUNT = 150;
   1.139 +
   1.140 +// Akami/Maguro specific parcel types.
   1.141 +this.REQUEST_IMS_REGISTRATION_STATE = 106;
   1.142 +this.REQUEST_IMS_SEND_SMS = 107;
   1.143 +this.REQUEST_GET_DATA_CALL_PROFILE = 108;
   1.144 +this.REQUEST_SET_UICC_SUBSCRIPTION = 109;
   1.145 +this.REQUEST_SET_DATA_SUBSCRIPTION = 110;
   1.146 +this.REQUEST_GET_UICC_SUBSCRIPTION = 111;
   1.147 +this.REQUEST_GET_DATA_SUBSCRIPTION = 112;
   1.148 +this.REQUEST_SET_SUBSCRIPTION_MODE = 113;
   1.149 +this.REQUEST_SET_TRANSMIT_POWER = 114;
   1.150 +this.REQUEST_SETUP_QOS = 115;
   1.151 +this.REQUEST_RELEASE_QOS = 116;
   1.152 +this.REQUEST_GET_QOS_STATUS = 117;
   1.153 +this.REQUEST_MODIFY_QOS = 118;
   1.154 +this.REQUEST_SUSPEND_QOS = 119;
   1.155 +this.REQUEST_RESUME_QOS = 120;
   1.156 +
   1.157 +// Fugu specific parcel types.
   1.158 +this.RIL_REQUEST_GPRS_ATTACH = 5018;
   1.159 +this.RIL_REQUEST_GPRS_DETACH = 5019;
   1.160 +
   1.161 +// UICC Secure Access
   1.162 +this.REQUEST_SIM_OPEN_CHANNEL = 121;
   1.163 +this.REQUEST_SIM_CLOSE_CHANNEL = 122;
   1.164 +this.REQUEST_SIM_ACCESS_CHANNEL = 123;
   1.165 +
   1.166 +this.RESPONSE_TYPE_SOLICITED = 0;
   1.167 +this.RESPONSE_TYPE_UNSOLICITED = 1;
   1.168 +
   1.169 +this.UNSOLICITED_RESPONSE_BASE = 1000;
   1.170 +this.UNSOLICITED_RESPONSE_RADIO_STATE_CHANGED = 1000;
   1.171 +this.UNSOLICITED_RESPONSE_CALL_STATE_CHANGED = 1001;
   1.172 +this.UNSOLICITED_RESPONSE_VOICE_NETWORK_STATE_CHANGED = 1002;
   1.173 +this.UNSOLICITED_RESPONSE_NEW_SMS = 1003;
   1.174 +this.UNSOLICITED_RESPONSE_NEW_SMS_STATUS_REPORT = 1004;
   1.175 +this.UNSOLICITED_RESPONSE_NEW_SMS_ON_SIM = 1005;
   1.176 +this.UNSOLICITED_ON_USSD = 1006;
   1.177 +this.UNSOLICITED_ON_USSD_REQUEST = 1007;
   1.178 +this.UNSOLICITED_NITZ_TIME_RECEIVED = 1008;
   1.179 +this.UNSOLICITED_SIGNAL_STRENGTH = 1009;
   1.180 +this.UNSOLICITED_DATA_CALL_LIST_CHANGED = 1010;
   1.181 +this.UNSOLICITED_SUPP_SVC_NOTIFICATION = 1011;
   1.182 +this.UNSOLICITED_STK_SESSION_END = 1012;
   1.183 +this.UNSOLICITED_STK_PROACTIVE_COMMAND = 1013;
   1.184 +this.UNSOLICITED_STK_EVENT_NOTIFY = 1014;
   1.185 +this.UNSOLICITED_STK_CALL_SETUP = 1015;
   1.186 +this.UNSOLICITED_SIM_SMS_STORAGE_FULL = 1016;
   1.187 +this.UNSOLICITED_SIM_REFRESH = 1017;
   1.188 +this.UNSOLICITED_CALL_RING = 1018;
   1.189 +this.UNSOLICITED_RESPONSE_SIM_STATUS_CHANGED = 1019;
   1.190 +this.UNSOLICITED_RESPONSE_CDMA_NEW_SMS = 1020;
   1.191 +this.UNSOLICITED_RESPONSE_NEW_BROADCAST_SMS = 1021;
   1.192 +this.UNSOLICITED_CDMA_RUIM_SMS_STORAGE_FULL = 1022;
   1.193 +this.UNSOLICITED_RESTRICTED_STATE_CHANGED = 1023;
   1.194 +this.UNSOLICITED_ENTER_EMERGENCY_CALLBACK_MODE = 1024;
   1.195 +this.UNSOLICITED_CDMA_CALL_WAITING = 1025;
   1.196 +this.UNSOLICITED_CDMA_OTA_PROVISION_STATUS = 1026;
   1.197 +this.UNSOLICITED_CDMA_INFO_REC = 1027;
   1.198 +this.UNSOLICITED_OEM_HOOK_RAW = 1028;
   1.199 +this.UNSOLICITED_RINGBACK_TONE = 1029;
   1.200 +this.UNSOLICITED_RESEND_INCALL_MUTE = 1030;
   1.201 +this.UNSOLICITED_CDMA_SUBSCRIPTION_SOURCE_CHANGED = 1031;
   1.202 +this.UNSOLICITED_CDMA_PRL_CHANGED = 1032;
   1.203 +this.UNSOLICITED_EXIT_EMERGENCY_CALLBACK_MODE = 1033;
   1.204 +this.UNSOLICITED_RIL_CONNECTED = 1034;
   1.205 +
   1.206 +// Akami/Maguro specific parcels.
   1.207 +this.UNSOLICITED_VOICE_RADIO_TECH_CHANGED = 1034;
   1.208 +this.UNSOLICITED_RESPONSE_IMS_NETWORK_STATE_CHANGED = 1035;
   1.209 +this.UNSOLICITED_RESPONSE_TETHERED_MODE_STATE_CHANGED = 1036;
   1.210 +this.UNSOLICITED_RESPONSE_DATA_NETWORK_STATE_CHANGED = 1037;
   1.211 +this.UNSOLICITED_ON_SS = 1038;
   1.212 +this.UNSOLICITED_STK_CC_ALPHA_NOTIFY = 1039;
   1.213 +this.UNSOLICITED_UICC_SUBSCRIPTION_STATUS_CHANGED = 1040;
   1.214 +this.UNSOLICITED_QOS_STATE_CHANGED_IND = 1041;
   1.215 +
   1.216 +this.ERROR_SUCCESS = 0;
   1.217 +this.ERROR_RADIO_NOT_AVAILABLE = 1;
   1.218 +this.ERROR_GENERIC_FAILURE = 2;
   1.219 +this.ERROR_PASSWORD_INCORRECT = 3;
   1.220 +this.ERROR_SIM_PIN2 = 4;
   1.221 +this.ERROR_SIM_PUK2 = 5;
   1.222 +this.ERROR_REQUEST_NOT_SUPPORTED = 6;
   1.223 +this.ERROR_CANCELLED = 7;
   1.224 +this.ERROR_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8;
   1.225 +this.ERROR_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9;
   1.226 +this.ERROR_SMS_SEND_FAIL_RETRY = 10;
   1.227 +this.ERROR_SIM_ABSENT = 11;
   1.228 +this.ERROR_SUBSCRIPTION_NOT_AVAILABLE = 12;
   1.229 +this.ERROR_MODE_NOT_SUPPORTED = 13;
   1.230 +this.ERROR_FDN_CHECK_FAILURE = 14;
   1.231 +this.ERROR_ILLEGAL_SIM_OR_ME = 15;
   1.232 +this.ERROR_DIAL_MODIFIED_TO_USSD = 17;
   1.233 +this.ERROR_DIAL_MODIFIED_TO_SS = 18;
   1.234 +this.ERROR_DIAL_MODIFIED_TO_DIAL = 19;
   1.235 +this.ERROR_USSD_MODIFIED_TO_DIAL = 20;
   1.236 +this.ERROR_USSD_MODIFIED_TO_SS = 21;
   1.237 +this.ERROR_USSD_MODIFIED_TO_USSD = 22;
   1.238 +this.ERROR_SS_MODIFIED_TO_DIAL = 23;
   1.239 +this.ERROR_SS_MODIFIED_TO_USSD = 24;
   1.240 +this.ERROR_SS_MODIFIED_TO_SS = 25;
   1.241 +this.ERROR_SUBSCRIPTION_NOT_SUPPORTED = 26;
   1.242 +this.ERROR_INVALID_PARAMETER = 27;
   1.243 +this.ERROR_REJECTED_BY_REMOTE = 28;
   1.244 +
   1.245 +this.GECKO_ERROR_SUCCESS = null;
   1.246 +this.GECKO_ERROR_RADIO_NOT_AVAILABLE = "RadioNotAvailable";
   1.247 +this.GECKO_ERROR_GENERIC_FAILURE = "GenericFailure";
   1.248 +this.GECKO_ERROR_PASSWORD_INCORRECT = "IncorrectPassword";
   1.249 +this.GECKO_ERROR_SIM_PIN2 = "SimPin2";
   1.250 +this.GECKO_ERROR_SIM_PUK2 = "SimPuk2";
   1.251 +this.GECKO_ERROR_REQUEST_NOT_SUPPORTED = "RequestNotSupported";
   1.252 +this.GECKO_ERROR_CANCELLED = "Cancelled";
   1.253 +this.GECKO_ERROR_ILLEGAL_SIM_OR_ME = "IllegalSIMorME";
   1.254 +this.GECKO_ERROR_OP_NOT_ALLOWED_DURING_VOICE_CALL = "OpNotAllowedDuringVoiceCall";
   1.255 +this.GECKO_ERROR_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = "OpNotAllowedBeforeRegToNw";
   1.256 +this.GECKO_ERROR_SMS_SEND_FAIL_RETRY = "SmsSendFailRetry";
   1.257 +this.GECKO_ERROR_SIM_ABSENT = "SimAbsent";
   1.258 +this.GECKO_ERROR_SUBSCRIPTION_NOT_AVAILABLE = "SubscriptionNotAvailable";
   1.259 +this.GECKO_ERROR_MODE_NOT_SUPPORTED = "ModeNotSupported";
   1.260 +this.GECKO_ERROR_FDN_CHECK_FAILURE = "FdnCheckFailure";
   1.261 +this.GECKO_ERROR_DIAL_MODIFIED_TO_USSD = "DialModifiedToUssd";
   1.262 +this.GECKO_ERROR_DIAL_MODIFIED_TO_SS = "DialModifiedToSs";
   1.263 +this.GECKO_ERROR_DIAL_MODIFIED_TO_DIAL = "DialModifiedToDial";
   1.264 +this.GECKO_ERROR_USSD_MODIFIED_TO_DIAL = "UssdModifiedToDial";
   1.265 +this.GECKO_ERROR_USSD_MODIFIED_TO_SS = "UssdModifiedToSs";
   1.266 +this.GECKO_ERROR_USSD_MODIFIED_TO_USSD = "UssdModifiedToUssd";
   1.267 +this.GECKO_ERROR_SS_MODIFIED_TO_DIAL = "SsModifiedToDial";
   1.268 +this.GECKO_ERROR_SS_MODIFIED_TO_USSD = "SsModifiedToUssd";
   1.269 +this.GECKO_ERROR_SS_MODIFIED_TO_SS = "SsModifiedToSs";
   1.270 +this.GECKO_ERROR_SUBSCRIPTION_NOT_SUPPORTED = "SubscriptionNotSupported";
   1.271 +this.GECKO_ERROR_INVALID_PARAMETER = "InvalidParameter";
   1.272 +this.GECKO_ERROR_REJECTED_BY_REMOTE = "RejectedByRemote";
   1.273 +
   1.274 +this.RIL_ERROR_TO_GECKO_ERROR = {};
   1.275 +RIL_ERROR_TO_GECKO_ERROR[ERROR_SUCCESS] = GECKO_ERROR_SUCCESS;
   1.276 +RIL_ERROR_TO_GECKO_ERROR[ERROR_RADIO_NOT_AVAILABLE] = GECKO_ERROR_RADIO_NOT_AVAILABLE;
   1.277 +RIL_ERROR_TO_GECKO_ERROR[ERROR_GENERIC_FAILURE] = GECKO_ERROR_GENERIC_FAILURE;
   1.278 +RIL_ERROR_TO_GECKO_ERROR[ERROR_PASSWORD_INCORRECT] = GECKO_ERROR_PASSWORD_INCORRECT;
   1.279 +RIL_ERROR_TO_GECKO_ERROR[ERROR_SIM_PIN2] = GECKO_ERROR_SIM_PIN2;
   1.280 +RIL_ERROR_TO_GECKO_ERROR[ERROR_SIM_PUK2] = GECKO_ERROR_SIM_PUK2;
   1.281 +RIL_ERROR_TO_GECKO_ERROR[ERROR_REQUEST_NOT_SUPPORTED] = GECKO_ERROR_REQUEST_NOT_SUPPORTED;
   1.282 +RIL_ERROR_TO_GECKO_ERROR[ERROR_CANCELLED] = GECKO_ERROR_CANCELLED;
   1.283 +RIL_ERROR_TO_GECKO_ERROR[ERROR_OP_NOT_ALLOWED_DURING_VOICE_CALL] = GECKO_ERROR_OP_NOT_ALLOWED_DURING_VOICE_CALL;
   1.284 +RIL_ERROR_TO_GECKO_ERROR[ERROR_OP_NOT_ALLOWED_BEFORE_REG_TO_NW] = GECKO_ERROR_OP_NOT_ALLOWED_BEFORE_REG_TO_NW;
   1.285 +RIL_ERROR_TO_GECKO_ERROR[ERROR_SMS_SEND_FAIL_RETRY] = GECKO_ERROR_SMS_SEND_FAIL_RETRY;
   1.286 +RIL_ERROR_TO_GECKO_ERROR[ERROR_SIM_ABSENT] = GECKO_ERROR_SIM_ABSENT;
   1.287 +RIL_ERROR_TO_GECKO_ERROR[ERROR_SUBSCRIPTION_NOT_AVAILABLE] = GECKO_ERROR_SUBSCRIPTION_NOT_AVAILABLE;
   1.288 +RIL_ERROR_TO_GECKO_ERROR[ERROR_MODE_NOT_SUPPORTED] = GECKO_ERROR_MODE_NOT_SUPPORTED;
   1.289 +RIL_ERROR_TO_GECKO_ERROR[ERROR_FDN_CHECK_FAILURE] = GECKO_ERROR_FDN_CHECK_FAILURE;
   1.290 +RIL_ERROR_TO_GECKO_ERROR[ERROR_ILLEGAL_SIM_OR_ME] = GECKO_ERROR_ILLEGAL_SIM_OR_ME;
   1.291 +RIL_ERROR_TO_GECKO_ERROR[ERROR_DIAL_MODIFIED_TO_USSD] = GECKO_ERROR_DIAL_MODIFIED_TO_USSD;
   1.292 +RIL_ERROR_TO_GECKO_ERROR[ERROR_DIAL_MODIFIED_TO_SS] = GECKO_ERROR_DIAL_MODIFIED_TO_SS;
   1.293 +RIL_ERROR_TO_GECKO_ERROR[ERROR_DIAL_MODIFIED_TO_DIAL] = GECKO_ERROR_DIAL_MODIFIED_TO_DIAL;
   1.294 +RIL_ERROR_TO_GECKO_ERROR[ERROR_USSD_MODIFIED_TO_DIAL] = GECKO_ERROR_USSD_MODIFIED_TO_DIAL;
   1.295 +RIL_ERROR_TO_GECKO_ERROR[ERROR_USSD_MODIFIED_TO_SS] = GECKO_ERROR_USSD_MODIFIED_TO_SS;
   1.296 +RIL_ERROR_TO_GECKO_ERROR[ERROR_USSD_MODIFIED_TO_USSD] = GECKO_ERROR_USSD_MODIFIED_TO_USSD;
   1.297 +RIL_ERROR_TO_GECKO_ERROR[ERROR_SS_MODIFIED_TO_DIAL] = GECKO_ERROR_SS_MODIFIED_TO_DIAL;
   1.298 +RIL_ERROR_TO_GECKO_ERROR[ERROR_SS_MODIFIED_TO_USSD] = GECKO_ERROR_SS_MODIFIED_TO_USSD;
   1.299 +RIL_ERROR_TO_GECKO_ERROR[ERROR_SS_MODIFIED_TO_SS] = GECKO_ERROR_SS_MODIFIED_TO_SS;
   1.300 +RIL_ERROR_TO_GECKO_ERROR[ERROR_SUBSCRIPTION_NOT_SUPPORTED] = GECKO_ERROR_SUBSCRIPTION_NOT_SUPPORTED;
   1.301 +RIL_ERROR_TO_GECKO_ERROR[ERROR_INVALID_PARAMETER] = GECKO_ERROR_INVALID_PARAMETER;
   1.302 +RIL_ERROR_TO_GECKO_ERROR[ERROR_REJECTED_BY_REMOTE] = GECKO_ERROR_REJECTED_BY_REMOTE;
   1.303 +
   1.304 +// 3GPP 23.040 clause 9.2.3.6 TP-Message-Reference(TP-MR):
   1.305 +// The number of times the MS automatically repeats the SMS-SUBMIT shall be in
   1.306 +// the range 1 to 3 but the precise number is an implementation matter.
   1.307 +this.SMS_RETRY_MAX = 3;
   1.308 +
   1.309 +this.RADIO_STATE_OFF = 0;
   1.310 +this.RADIO_STATE_UNAVAILABLE = 1;
   1.311 +this.RADIO_STATE_ON = 10; // RIL v7
   1.312 +
   1.313 +// RIL v5 legacy constants:
   1.314 +this.RADIO_STATE_SIM_NOT_READY = 2;
   1.315 +this.RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3;
   1.316 +this.RADIO_STATE_SIM_READY = 4;
   1.317 +this.RADIO_STATE_RUIM_NOT_READY = 5;
   1.318 +this.RADIO_STATE_RUIM_READY = 6;
   1.319 +this.RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7;
   1.320 +this.RADIO_STATE_NV_NOT_READY = 8;
   1.321 +this.RADIO_STATE_NV_READY = 9;
   1.322 +
   1.323 +this.CARD_STATE_ABSENT = 0;
   1.324 +this.CARD_STATE_PRESENT = 1;
   1.325 +this.CARD_STATE_ERROR = 2;
   1.326 +
   1.327 +this.CARD_PERSOSUBSTATE_UNKNOWN = 0;
   1.328 +this.CARD_PERSOSUBSTATE_IN_PROGRESS = 1;
   1.329 +this.CARD_PERSOSUBSTATE_READY = 2;
   1.330 +this.CARD_PERSOSUBSTATE_SIM_NETWORK = 3;
   1.331 +this.CARD_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4;
   1.332 +this.CARD_PERSOSUBSTATE_SIM_CORPORATE = 5;
   1.333 +this.CARD_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6;
   1.334 +this.CARD_PERSOSUBSTATE_SIM_SIM = 7;
   1.335 +this.CARD_PERSOSUBSTATE_SIM_NETWORK_PUK = 8;
   1.336 +this.CARD_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9;
   1.337 +this.CARD_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10;
   1.338 +this.CARD_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11;
   1.339 +this.CARD_PERSOSUBSTATE_SIM_SIM_PUK = 12;
   1.340 +this.CARD_PERSOSUBSTATE_RUIM_NETWORK1 = 13;
   1.341 +this.CARD_PERSOSUBSTATE_RUIM_NETWORK2 = 14;
   1.342 +this.CARD_PERSOSUBSTATE_RUIM_HRPD = 15;
   1.343 +this.CARD_PERSOSUBSTATE_RUIM_CORPORATE = 16;
   1.344 +this.CARD_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17;
   1.345 +this.CARD_PERSOSUBSTATE_RUIM_RUIM = 18;
   1.346 +this.CARD_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19;
   1.347 +this.CARD_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20;
   1.348 +this.CARD_PERSOSUBSTATE_RUIM_HRPD_PUK = 21;
   1.349 +this.CARD_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22;
   1.350 +this.CARD_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23;
   1.351 +this.CARD_PERSOSUBSTATE_RUIM_RUIM_PUK = 24;
   1.352 +
   1.353 +this.CARD_APPSTATE_ILLEGAL = -1;
   1.354 +this.CARD_APPSTATE_UNKNOWN = 0;
   1.355 +this.CARD_APPSTATE_DETECTED = 1;
   1.356 +this.CARD_APPSTATE_PIN = 2; // If PIN1 or UPin is required.
   1.357 +this.CARD_APPSTATE_PUK = 3; // If PUK1 or Puk for UPin is required.
   1.358 +this.CARD_APPSTATE_SUBSCRIPTION_PERSO = 4; // perso_substate should be looked
   1.359 +                                            // at when app_state is assigned
   1.360 +                                            // to this value.
   1.361 +this.CARD_APPSTATE_READY = 5;
   1.362 +
   1.363 +this.CARD_PINSTATE_UNKNOWN = 0;
   1.364 +this.CARD_PINSTATE_ENABLED_NOT_VERIFIED = 1;
   1.365 +this.CARD_PINSTATE_ENABLED_VERIFIED = 2;
   1.366 +this.CARD_PINSTATE_DISABLED = 3;
   1.367 +this.CARD_PINSTATE_ENABLED_BLOCKED = 4;
   1.368 +this.CARD_PINSTATE_ENABLED_PERM_BLOCKED = 5;
   1.369 +
   1.370 +this.CARD_APPTYPE_UNKNOWN = 0;
   1.371 +this.CARD_APPTYPE_SIM = 1;
   1.372 +this.CARD_APPTYPE_USIM = 2;
   1.373 +this.CARD_APPTYPE_RUIM = 3;
   1.374 +this.CARD_APPTYPE_CSIM = 4;
   1.375 +this.CARD_APPTYPE_ISIM = 5;
   1.376 +
   1.377 +this.CARD_MAX_APPS = 8;
   1.378 +
   1.379 +this.GECKO_CARD_TYPE = [
   1.380 +  null,
   1.381 +  "sim",
   1.382 +  "usim",
   1.383 +  "ruim",
   1.384 +  "csim",
   1.385 +  "isim"
   1.386 +];
   1.387 +
   1.388 +this.NETWORK_STATE_UNKNOWN = "unknown";
   1.389 +this.NETWORK_STATE_AVAILABLE = "available";
   1.390 +this.NETWORK_STATE_CONNECTED = "connected";
   1.391 +this.NETWORK_STATE_FORBIDDEN = "forbidden";
   1.392 +
   1.393 +this.NETWORK_SELECTION_MODE_AUTOMATIC = 0;
   1.394 +this.NETWORK_SELECTION_MODE_MANUAL = 1;
   1.395 +
   1.396 +this.NETWORK_INFO_VOICE_REGISTRATION_STATE = "voiceRegistrationState";
   1.397 +this.NETWORK_INFO_DATA_REGISTRATION_STATE = "dataRegistrationState";
   1.398 +this.NETWORK_INFO_OPERATOR = "operator";
   1.399 +this.NETWORK_INFO_NETWORK_SELECTION_MODE = "networkSelectionMode";
   1.400 +this.NETWORK_INFO_SIGNAL = "signal";
   1.401 +this.NETWORK_INFO_MESSAGE_TYPES = [
   1.402 +  NETWORK_INFO_VOICE_REGISTRATION_STATE,
   1.403 +  NETWORK_INFO_DATA_REGISTRATION_STATE,
   1.404 +  NETWORK_INFO_OPERATOR,
   1.405 +  NETWORK_INFO_NETWORK_SELECTION_MODE,
   1.406 +  NETWORK_INFO_SIGNAL
   1.407 +];
   1.408 +
   1.409 +this.GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM = "wcdma/gsm";
   1.410 +this.GECKO_PREFERRED_NETWORK_TYPE_GSM_ONLY = "gsm";
   1.411 +this.GECKO_PREFERRED_NETWORK_TYPE_WCDMA_ONLY = "wcdma";
   1.412 +this.GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM_AUTO = "wcdma/gsm-auto";
   1.413 +this.GECKO_PREFERRED_NETWORK_TYPE_CDMA_EVDO = "cdma/evdo";
   1.414 +this.GECKO_PREFERRED_NETWORK_TYPE_CDMA_ONLY = "cdma";
   1.415 +this.GECKO_PREFERRED_NETWORK_TYPE_EVDO_ONLY = "evdo";
   1.416 +this.GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM_CDMA_EVDO = "wcdma/gsm/cdma/evdo";
   1.417 +this.GECKO_PREFERRED_NETWORK_TYPE_LTE_CDMA_EVDO = "lte/cdma/evdo";
   1.418 +this.GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM = "lte/wcdma/gsm";
   1.419 +this.GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM_CDMA_EVDO = "lte/wcdma/gsm/cdma/evdo";
   1.420 +this.GECKO_PREFERRED_NETWORK_TYPE_LTE_ONLY = "lte";
   1.421 +this.RIL_PREFERRED_NETWORK_TYPE_TO_GECKO = [
   1.422 +  GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM,
   1.423 +  GECKO_PREFERRED_NETWORK_TYPE_GSM_ONLY,
   1.424 +  GECKO_PREFERRED_NETWORK_TYPE_WCDMA_ONLY,
   1.425 +  GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM_AUTO,
   1.426 +  GECKO_PREFERRED_NETWORK_TYPE_CDMA_EVDO,
   1.427 +  GECKO_PREFERRED_NETWORK_TYPE_CDMA_ONLY,
   1.428 +  GECKO_PREFERRED_NETWORK_TYPE_EVDO_ONLY,
   1.429 +  GECKO_PREFERRED_NETWORK_TYPE_WCDMA_GSM_CDMA_EVDO,
   1.430 +  GECKO_PREFERRED_NETWORK_TYPE_LTE_CDMA_EVDO,
   1.431 +  GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM,
   1.432 +  GECKO_PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM_CDMA_EVDO,
   1.433 +  GECKO_PREFERRED_NETWORK_TYPE_LTE_ONLY
   1.434 +];
   1.435 +
   1.436 +this.GECKO_SUPPORTED_NETWORK_TYPES_DEFAULT = "gsm,wcdma";
   1.437 +this.GECKO_SUPPORTED_NETWORK_TYPES = [
   1.438 +  "gsm",
   1.439 +  "wcdma",
   1.440 +  "cdma",
   1.441 +  "evdo",
   1.442 +  "lte"
   1.443 +];
   1.444 +
   1.445 +// Network registration states. See TS 27.007 7.2
   1.446 +this.NETWORK_CREG_STATE_NOT_SEARCHING = 0;
   1.447 +this.NETWORK_CREG_STATE_REGISTERED_HOME = 1;
   1.448 +this.NETWORK_CREG_STATE_SEARCHING = 2;
   1.449 +this.NETWORK_CREG_STATE_DENIED = 3;
   1.450 +this.NETWORK_CREG_STATE_UNKNOWN = 4;
   1.451 +this.NETWORK_CREG_STATE_REGISTERED_ROAMING = 5;
   1.452 +this.NETWORK_CREG_STATE_NOT_SEARCHING_EMERGENCY_CALLS = 10;
   1.453 +this.NETWORK_CREG_STATE_SEARCHING_EMERGENCY_CALLS = 12;
   1.454 +this.NETWORK_CREG_STATE_DENIED_EMERGENCY_CALLS = 13;
   1.455 +this.NETWORK_CREG_STATE_UNKNOWN_EMERGENCY_CALLS = 14;
   1.456 +
   1.457 +this.NETWORK_CREG_TECH_UNKNOWN = 0;
   1.458 +this.NETWORK_CREG_TECH_GPRS = 1;
   1.459 +this.NETWORK_CREG_TECH_EDGE = 2;
   1.460 +this.NETWORK_CREG_TECH_UMTS = 3;
   1.461 +this.NETWORK_CREG_TECH_IS95A = 4;
   1.462 +this.NETWORK_CREG_TECH_IS95B = 5;
   1.463 +this.NETWORK_CREG_TECH_1XRTT = 6;
   1.464 +this.NETWORK_CREG_TECH_EVDO0 = 7;
   1.465 +this.NETWORK_CREG_TECH_EVDOA = 8;
   1.466 +this.NETWORK_CREG_TECH_HSDPA = 9;
   1.467 +this.NETWORK_CREG_TECH_HSUPA = 10;
   1.468 +this.NETWORK_CREG_TECH_HSPA = 11;
   1.469 +this.NETWORK_CREG_TECH_EVDOB = 12;
   1.470 +this.NETWORK_CREG_TECH_EHRPD = 13;
   1.471 +this.NETWORK_CREG_TECH_LTE = 14;
   1.472 +this.NETWORK_CREG_TECH_HSPAP = 15;
   1.473 +this.NETWORK_CREG_TECH_GSM = 16;
   1.474 +
   1.475 +this.CALL_STATE_UNKNOWN = -1;
   1.476 +this.CALL_STATE_ACTIVE = 0;
   1.477 +this.CALL_STATE_HOLDING = 1;
   1.478 +this.CALL_STATE_DIALING = 2;
   1.479 +this.CALL_STATE_ALERTING = 3;
   1.480 +this.CALL_STATE_INCOMING = 4;
   1.481 +this.CALL_STATE_WAITING = 5;
   1.482 +
   1.483 +this.TOA_INTERNATIONAL = 0x91;
   1.484 +this.TOA_UNKNOWN = 0x81;
   1.485 +
   1.486 +this.CALL_PRESENTATION_ALLOWED = 0;
   1.487 +this.CALL_PRESENTATION_RESTRICTED = 1;
   1.488 +this.CALL_PRESENTATION_UNKNOWN = 2;
   1.489 +this.CALL_PRESENTATION_PAYPHONE = 3;
   1.490 +
   1.491 +// Call forwarding actions, see TS 27.007 7.11 "mode"
   1.492 +this.CALL_FORWARD_ACTION_QUERY_STATUS = 2;
   1.493 +
   1.494 +// ICC commands, see TS 27.007 +CRSM commands
   1.495 +this.ICC_COMMAND_SEEK = 0xa2;
   1.496 +this.ICC_COMMAND_READ_BINARY = 0xb0;
   1.497 +this.ICC_COMMAND_READ_RECORD = 0xb2;
   1.498 +this.ICC_COMMAND_GET_RESPONSE = 0xc0;
   1.499 +this.ICC_COMMAND_UPDATE_BINARY = 0xd6;
   1.500 +this.ICC_COMMAND_UPDATE_RECORD = 0xdc;
   1.501 +
   1.502 +// ICC constants, GSM SIM file ids from TS 51.011
   1.503 +this.ICC_EF_ICCID  = 0x2fe2;
   1.504 +this.ICC_EF_IMG    = 0x4f20;
   1.505 +this.ICC_EF_PBR    = 0x4f30;
   1.506 +this.ICC_EF_PLMNsel = 0x6f30; // PLMN for SIM
   1.507 +this.ICC_EF_SST    = 0x6f38;
   1.508 +this.ICC_EF_UST    = 0x6f38; // For USIM
   1.509 +this.ICC_EF_ADN    = 0x6f3a;
   1.510 +this.ICC_EF_FDN    = 0x6f3b;
   1.511 +this.ICC_EF_SMS    = 0x6f3c;
   1.512 +this.ICC_EF_MSISDN = 0x6f40;
   1.513 +this.ICC_EF_CBMI   = 0x6f45;
   1.514 +this.ICC_EF_SPN    = 0x6f46;
   1.515 +this.ICC_EF_CBMID  = 0x6f48;
   1.516 +this.ICC_EF_SDN    = 0x6f49;
   1.517 +this.ICC_EF_EXT1   = 0x6f4a;
   1.518 +this.ICC_EF_EXT2   = 0x6f4b;
   1.519 +this.ICC_EF_EXT3   = 0x6f4c;
   1.520 +this.ICC_EF_CBMIR  = 0x6f50;
   1.521 +this.ICC_EF_AD     = 0x6fad;
   1.522 +this.ICC_EF_PHASE  = 0x6fae;
   1.523 +this.ICC_EF_PNN    = 0x6fc5;
   1.524 +this.ICC_EF_OPL    = 0x6fc6;
   1.525 +this.ICC_EF_MBDN   = 0x6fc7;
   1.526 +this.ICC_EF_EXT6   = 0x6fc8;   // Ext record for EF[MBDN]
   1.527 +this.ICC_EF_MBI    = 0x6fc9;
   1.528 +this.ICC_EF_MWIS   = 0x6fca;
   1.529 +this.ICC_EF_CFIS   = 0x6fcb;
   1.530 +this.ICC_EF_SPDI   = 0x6fcd;
   1.531 +
   1.532 +// CSIM files
   1.533 +this.ICC_EF_CSIM_IMSI_M   = 0x6f22;
   1.534 +this.ICC_EF_CSIM_CDMAHOME = 0x6f28;
   1.535 +this.ICC_EF_CSIM_CST      = 0x6f32; // CDMA Service table
   1.536 +this.ICC_EF_CSIM_SPN      = 0x6f41;
   1.537 +
   1.538 +this.ICC_PHASE_1 = 0x00;
   1.539 +this.ICC_PHASE_2 = 0x02;
   1.540 +this.ICC_PHASE_2_PROFILE_DOWNLOAD_REQUIRED = 0x03;
   1.541 +
   1.542 +// Types of files  TS 11.11 9.3
   1.543 +this.TYPE_RFU = 0;
   1.544 +this.TYPE_MF  = 1;
   1.545 +this.TYPE_DF  = 2;
   1.546 +this.TYPE_EF  = 4;
   1.547 +
   1.548 +this.RESPONSE_DATA_FILE_SIZE = 2;
   1.549 +this.RESPONSE_DATA_FILE_ID_1 = 4;
   1.550 +this.RESPONSE_DATA_FILE_ID_2 = 5;
   1.551 +this.RESPONSE_DATA_FILE_TYPE = 6;
   1.552 +this.RESPONSE_DATA_RFU_3 = 7;
   1.553 +this.RESPONSE_DATA_ACCESS_CONDITION_1 = 8;
   1.554 +this.RESPONSE_DATA_ACCESS_CONDITION_2 = 9;
   1.555 +this.RESPONSE_DATA_ACCESS_CONDITION_3 = 10;
   1.556 +this.RESPONSE_DATA_FILE_STATUS = 11;
   1.557 +this.RESPONSE_DATA_LENGTH = 12;
   1.558 +this.RESPONSE_DATA_STRUCTURE = 13;
   1.559 +this.RESPONSE_DATA_RECORD_LENGTH = 14;
   1.560 +
   1.561 +// Types of files  TS 11.11 9.3
   1.562 +this.EF_TYPE_TRANSPARENT = 0;
   1.563 +this.EF_TYPE_LINEAR_FIXED = 1;
   1.564 +this.EF_TYPE_CYCLIC = 3;
   1.565 +
   1.566 +// TS 102.221 11.1.1.4.3 Table 11.5: File descriptor byte.
   1.567 +this.UICC_EF_STRUCTURE = {};
   1.568 +this.UICC_EF_STRUCTURE[this.EF_TYPE_TRANSPARENT]= 1;
   1.569 +this.UICC_EF_STRUCTURE[this.EF_TYPE_LINEAR_FIXED]= 2;
   1.570 +this.UICC_EF_STRUCTURE[this.EF_TYPE_CYCLIC]= 6;
   1.571 +
   1.572 +// Status code of EFsms
   1.573 +// see 3GPP TS 51.011 clause 10.5.3
   1.574 +this.EFSMS_STATUS_FREE       = 0x00;
   1.575 +this.EFSMS_STATUS_READ       = 0x01;
   1.576 +this.EFSMS_STATUS_TO_BE_READ = 0x03;
   1.577 +this.EFSMS_STATUS_TO_BE_SENT = 0x07;
   1.578 +
   1.579 +// Total size of ADN footer(the size of Alpha identifier excluded).
   1.580 +// See TS 151.011 clause 10.5.1 EF_ADN.
   1.581 +this.ADN_FOOTER_SIZE_BYTES = 14;
   1.582 +// Maximum size of BCD numbers in ADN.
   1.583 +// See TS 151.011 clause 10.5.1 EF_ADN, 'Length of BCD number/SSC contents'.
   1.584 +this.ADN_MAX_BCD_NUMBER_BYTES = 11;
   1.585 +// Maximum digits of the Dialling Number in ADN.
   1.586 +// See TS 151.011 clause 10.5.1 EF_ADN, 'Dialling Number'.
   1.587 +this.ADN_MAX_NUMBER_DIGITS = 20;
   1.588 +
   1.589 +// READ_RECORD mode,  TS 102.221
   1.590 +this.READ_RECORD_ABSOLUTE_MODE = 4;
   1.591 +
   1.592 +// GET_RESPONSE mandatory response size for EF, see TS 51.011 clause 9,
   1.593 +// 'Response data in case of an EF.'
   1.594 +this.GET_RESPONSE_EF_SIZE_BYTES = 15;
   1.595 +
   1.596 +// EF path
   1.597 +this.EF_PATH_MF_SIM       = "3f00";
   1.598 +this.EF_PATH_DF_PHONEBOOK = "5f3a";
   1.599 +this.EF_PATH_DF_TELECOM   = "7f10";
   1.600 +this.EF_PATH_DF_GSM       = "7f20";
   1.601 +this.EF_PATH_DF_CDMA      = "7f25";
   1.602 +this.EF_PATH_ADF_USIM     = "7fff";
   1.603 +
   1.604 +// Status code of sw1 for ICC I/O,
   1.605 +// see GSM11.11 and TS 51.011 clause 9.4, and ISO 7816-4
   1.606 +this.ICC_STATUS_NORMAL_ENDING = 0x90;
   1.607 +this.ICC_STATUS_NORMAL_ENDING_WITH_EXTRA = 0x91;
   1.608 +this.ICC_STATUS_SAT_BUSY = 0x93;
   1.609 +this.ICC_STATUS_WITH_SIM_DATA = 0x9e;
   1.610 +this.ICC_STATUS_WITH_RESPONSE_DATA = 0x9f;
   1.611 +this.ICC_STATUS_ERROR_WRONG_LENGTH = 0x67;
   1.612 +this.ICC_STATUS_ERROR_COMMAND_NOT_ALLOWED = 0x69;
   1.613 +this.ICC_STATUS_ERROR_WRONG_PARAMETERS = 0x6a;
   1.614 +
   1.615 +// ICC call barring facility.
   1.616 +// TS 27.007, clause 7.4, +CLCK
   1.617 +this.ICC_CB_FACILITY_SIM = "SC";
   1.618 +this.ICC_CB_FACILITY_FDN = "FD";
   1.619 +this.ICC_CB_FACILITY_BAOC = "AO";
   1.620 +this.ICC_CB_FACILITY_BAOIC = "OI";
   1.621 +this.ICC_CB_FACILITY_BAOICxH = "OX";
   1.622 +this.ICC_CB_FACILITY_BAIC = "AI";
   1.623 +this.ICC_CB_FACILITY_BAICr = "IR";
   1.624 +this.ICC_CB_FACILITY_BA_ALL = "AB";
   1.625 +this.ICC_CB_FACILITY_BA_MO = "AG";
   1.626 +this.ICC_CB_FACILITY_BA_MT = "AC";
   1.627 +
   1.628 +// ICC service class
   1.629 +// TS 27.007, clause 7.4, +CLCK
   1.630 +this.ICC_SERVICE_CLASS_NONE = 0; // no user input
   1.631 +this.ICC_SERVICE_CLASS_VOICE = (1 << 0);
   1.632 +this.ICC_SERVICE_CLASS_DATA = (1 << 1);
   1.633 +this.ICC_SERVICE_CLASS_FAX = (1 << 2);
   1.634 +this.ICC_SERVICE_CLASS_SMS = (1 << 3);
   1.635 +this.ICC_SERVICE_CLASS_DATA_SYNC = (1 << 4);
   1.636 +this.ICC_SERVICE_CLASS_DATA_ASYNC = (1 << 5);
   1.637 +this.ICC_SERVICE_CLASS_PACKET = (1 << 6);
   1.638 +this.ICC_SERVICE_CLASS_PAD = (1 << 7);
   1.639 +this.ICC_SERVICE_CLASS_MAX = (1 << 7); // Max ICC_SERVICE_CLASS value
   1.640 +
   1.641 +// ICC lock-selection codes
   1.642 +// TS 27.007, clause 8.65, +CPINR
   1.643 +this.ICC_SEL_CODE_SIM_PIN = "SIM PIN";
   1.644 +this.ICC_SEL_CODE_SIM_PUK = "SIM PUK";
   1.645 +this.ICC_SEL_CODE_PH_SIM_PIN = "PH-SIM PIN";
   1.646 +this.ICC_SEL_CODE_PH_FSIM_PIN = "PH-FSIM PIN";
   1.647 +this.ICC_SEL_CODE_PH_FSIM_PUK = "PH-FSIM PUK";
   1.648 +this.ICC_SEL_CODE_SIM_PIN2 = "SIM PIN2";
   1.649 +this.ICC_SEL_CODE_SIM_PUK2 = "SIM PUK2";
   1.650 +this.ICC_SEL_CODE_PH_NET_PIN = "PH-NET PIN";
   1.651 +this.ICC_SEL_CODE_PH_NET_PUK = "PH-NET PUK";
   1.652 +this.ICC_SEL_CODE_PH_NETSUB_PIN = "PH-NETSUB PIN";
   1.653 +this.ICC_SEL_CODE_PH_NETSUB_PUK = "PH-NETSUB PUK";
   1.654 +this.ICC_SEL_CODE_PH_SP_PIN = "PH-SP PIN";
   1.655 +this.ICC_SEL_CODE_PH_SP_PUK = "PH-SP PUK";
   1.656 +this.ICC_SEL_CODE_PH_CORP_PIN = "PH-CORP PIN";
   1.657 +this.ICC_SEL_CODE_PH_CORP_PUK = "PH-CORP PUK";
   1.658 +
   1.659 +this.ICC_USIM_TYPE1_TAG   = 0xa8;
   1.660 +this.ICC_USIM_TYPE2_TAG   = 0xa9;
   1.661 +this.ICC_USIM_TYPE3_TAG   = 0xaa;
   1.662 +this.ICC_USIM_EFADN_TAG   = 0xc0;
   1.663 +this.ICC_USIM_EFIAP_TAG   = 0xc1;
   1.664 +this.ICC_USIM_EFEXT1_TAG  = 0xc2;
   1.665 +this.ICC_USIM_EFSNE_TAG   = 0xc3;
   1.666 +this.ICC_USIM_EFANR_TAG   = 0xc4;
   1.667 +this.ICC_USIM_EFPBC_TAG   = 0xc5;
   1.668 +this.ICC_USIM_EFGRP_TAG   = 0xc6;
   1.669 +this.ICC_USIM_EFAAS_TAG   = 0xc7;
   1.670 +this.ICC_USIM_EFGSD_TAG   = 0xc8;
   1.671 +this.ICC_USIM_EFUID_TAG   = 0xc9;
   1.672 +this.ICC_USIM_EFEMAIL_TAG = 0xca;
   1.673 +this.ICC_USIM_EFCCP1_TAG  = 0xcb;
   1.674 +
   1.675 +this.USIM_PBR_ANR = "anr";
   1.676 +this.USIM_PBR_ANR0 = "anr0";
   1.677 +this.USIM_PBR_EMAIL = "email";
   1.678 +
   1.679 +// Current supported fields. Adding more fields to read will increasing I/O
   1.680 +// time dramatically, do check the performance is acceptable when you add
   1.681 +// more fields.
   1.682 +this.USIM_PBR_FIELDS = [USIM_PBR_EMAIL, USIM_PBR_ANR0];
   1.683 +
   1.684 +this.USIM_TAG_NAME = {};
   1.685 +this.USIM_TAG_NAME[ICC_USIM_EFADN_TAG] = "adn";
   1.686 +this.USIM_TAG_NAME[ICC_USIM_EFIAP_TAG] ="iap";
   1.687 +this.USIM_TAG_NAME[ICC_USIM_EFEXT1_TAG] = "ext1";
   1.688 +this.USIM_TAG_NAME[ICC_USIM_EFSNE_TAG] = "sne";
   1.689 +this.USIM_TAG_NAME[ICC_USIM_EFANR_TAG] = "anr";
   1.690 +this.USIM_TAG_NAME[ICC_USIM_EFPBC_TAG] = "pbc";
   1.691 +this.USIM_TAG_NAME[ICC_USIM_EFGRP_TAG] = "grp";
   1.692 +this.USIM_TAG_NAME[ICC_USIM_EFAAS_TAG] = "aas";
   1.693 +this.USIM_TAG_NAME[ICC_USIM_EFGSD_TAG] = "gsd";
   1.694 +this.USIM_TAG_NAME[ICC_USIM_EFUID_TAG] = "uid";
   1.695 +this.USIM_TAG_NAME[ICC_USIM_EFEMAIL_TAG] = "email";
   1.696 +this.USIM_TAG_NAME[ICC_USIM_EFCCP1_TAG] = "ccp1";
   1.697 +
   1.698 +// Error message for ICC contact.
   1.699 +this.CONTACT_ERR_REQUEST_NOT_SUPPORTED = GECKO_ERROR_REQUEST_NOT_SUPPORTED;
   1.700 +this.CONTACT_ERR_CONTACT_TYPE_NOT_SUPPORTED = "ContactTypeNotSupported";
   1.701 +this.CONTACT_ERR_FIELD_NOT_SUPPORTED = "FieldNotSupported";
   1.702 +this.CONTACT_ERR_NO_FREE_RECORD_FOUND = "NoFreeRecordFound";
   1.703 +this.CONTACT_ERR_CANNOT_ACCESS_PHONEBOOK = "CannotAccessPhoneBook";
   1.704 +
   1.705 +// CDMA IMSI_M's byte const.
   1.706 +// 3GPP2 C.S0065 Sec. 5.2.2
   1.707 +this.CSIM_IMSI_M_MIN2_BYTE = 1;
   1.708 +this.CSIM_IMSI_M_MIN1_BYTE = 3;
   1.709 +this.CSIM_IMSI_M_MNC_BYTE = 6;
   1.710 +this.CSIM_IMSI_M_PROGRAMMED_BYTE = 7;
   1.711 +this.CSIM_IMSI_M_MCC_BYTE = 8;
   1.712 +
   1.713 +/**
   1.714 + * Tags for Ber Tlv.
   1.715 + * See 3GPP TS 101 220 clause 7.2 - Assigned TLV tag values.
   1.716 + */
   1.717 +this.BER_UNKNOWN_TAG = 0x00;
   1.718 +this.BER_FCP_TEMPLATE_TAG = 0x62;
   1.719 +this.BER_FCP_FILE_SIZE_DATA_TAG = 0x80;
   1.720 +this.BER_FCP_FILE_SIZE_TOTAL_TAG = 0x81;
   1.721 +this.BER_FCP_FILE_DESCRIPTOR_TAG = 0x82;
   1.722 +this.BER_FCP_FILE_IDENTIFIER_TAG = 0x83;
   1.723 +this.BER_FCP_DF_NAME_TAG = 0x84; // AID.
   1.724 +this.BER_FCP_PROPRIETARY_PRIMITIVE_TAG = 0x85;
   1.725 +this.BER_FCP_SFI_SUPPORT_TAG = 0x88;
   1.726 +this.BER_FCP_LIFE_CYCLE_STATUS_TAG = 0x8a;
   1.727 +this.BER_FCP_SA_REFERENCE_FORMAT_TAG = 0x8b; // Security Attribute - Reference Format.
   1.728 +this.BER_FCP_SA_COMPACT_FORMAT_TAG = 0x8c; // Security Attribute - Compact Format.
   1.729 +this.BER_FCP_SAT_EXPANDED_FORMAT_TAG = 0xab; // Security Attribute Template - Expanded Format.
   1.730 +this.BER_FCP_PROPRIETARY_TEMPLATE_TAG = 0xa5;
   1.731 +this.BER_FCP_PIN_STATUS_DATA_OBJECTS_TAG = 0xc6;
   1.732 +this.BER_PROACTIVE_COMMAND_TAG = 0xd0;
   1.733 +this.BER_SMS_PP_DOWNLOAD_TAG = 0xd1;
   1.734 +this.BER_MENU_SELECTION_TAG = 0xd3;
   1.735 +this.BER_EVENT_DOWNLOAD_TAG = 0xd6;
   1.736 +this.BER_TIMER_EXPIRATION_TAG = 0xd7;
   1.737 +
   1.738 +// Flags in Comprehension TLV.
   1.739 +this.COMPREHENSIONTLV_FLAG_CR = 0x80;  // Comprehension required.
   1.740 +
   1.741 +// Tags for Comprehension TLV.
   1.742 +this.COMPREHENSIONTLV_TAG_COMMAND_DETAILS = 0x01;
   1.743 +this.COMPREHENSIONTLV_TAG_DEVICE_ID = 0x02;
   1.744 +this.COMPREHENSIONTLV_TAG_RESULT = 0x03;
   1.745 +this.COMPREHENSIONTLV_TAG_DURATION = 0x04;
   1.746 +this.COMPREHENSIONTLV_TAG_ALPHA_ID = 0x05;
   1.747 +this.COMPREHENSIONTLV_TAG_ADDRESS = 0x06;
   1.748 +this.COMPREHENSIONTLV_TAG_SUBADDRESS = 0x08;
   1.749 +this.COMPREHENSIONTLV_TAG_SMS_TPDU = 0x0b;
   1.750 +this.COMPREHENSIONTLV_TAG_TEXT_STRING = 0x0d;
   1.751 +this.COMPREHENSIONTLV_TAG_TONE = 0x0e;
   1.752 +this.COMPREHENSIONTLV_TAG_ITEM = 0x0f;
   1.753 +this.COMPREHENSIONTLV_TAG_ITEM_ID = 0x10;
   1.754 +this.COMPREHENSIONTLV_TAG_RESPONSE_LENGTH = 0x11;
   1.755 +this.COMPREHENSIONTLV_TAG_FILE_LIST = 0x12;
   1.756 +this.COMPREHENSIONTLV_TAG_LOCATION_INFO = 0x13;
   1.757 +this.COMPREHENSIONTLV_TAG_IMEI = 0x14;
   1.758 +this.COMPREHENSIONTLV_TAG_HELP_REQUEST = 0x15;
   1.759 +this.COMPREHENSIONTLV_TAG_NMR = 0x16;
   1.760 +this.COMPREHENSIONTLV_TAG_DEFAULT_TEXT = 0x17;
   1.761 +this.COMPREHENSIONTLV_TAG_NEXT_ACTION_IND = 0x18;
   1.762 +this.COMPREHENSIONTLV_TAG_CAUSE = 0x1a;
   1.763 +this.COMPREHENSIONTLV_TAG_LOCATION_STATUS = 0x1b;
   1.764 +this.COMPREHENSIONTLV_TAG_TRANSACTION_ID = 0x1c;
   1.765 +this.COMPREHENSIONTLV_TAG_EVENT_LIST = 0x19;
   1.766 +this.COMPREHENSIONTLV_TAG_ICON_ID = 0x1e;
   1.767 +this.COMPREHENSIONTLV_TAG_ICON_ID_LIST = 0x1f;
   1.768 +this.COMPREHENSIONTLV_TAG_TIMER_IDENTIFIER = 0x24;
   1.769 +this.COMPREHENSIONTLV_TAG_TIMER_VALUE = 0x25;
   1.770 +this.COMPREHENSIONTLV_TAG_DATE_TIME_ZONE = 0x26;
   1.771 +this.COMPREHENSIONTLV_TAG_IMMEDIATE_RESPONSE = 0x2b;
   1.772 +this.COMPREHENSIONTLV_TAG_LANGUAGE = 0x2d;
   1.773 +this.COMPREHENSIONTLV_TAG_URL = 0x31;
   1.774 +this.COMPREHENSIONTLV_TAG_BROWSER_TERMINATION_CAUSE = 0x34;
   1.775 +this.COMPREHENSIONTLV_TAG_ACCESS_TECH = 0x3f;
   1.776 +this.COMPREHENSIONTLV_TAG_SERVICE_RECORD = 0x41;
   1.777 +this.COMPREHENSIONTLV_TAG_IMEISV = 0x62;
   1.778 +this.COMPREHENSIONTLV_TAG_BATTERY_STATE = 0x63;
   1.779 +this.COMPREHENSIONTLV_TAG_NETWORK_SEARCH_MODE = 0x65;
   1.780 +this.COMPREHENSIONTLV_TAG_MEID = 0x6d;
   1.781 +this.COMPREHENSIONTLV_TAG_BROADCAST_NETWORK_INFO = 0x7a;
   1.782 +
   1.783 +// Tags for Service Provider Display Information TLV
   1.784 +this.SPDI_TAG_SPDI = 0xa3;
   1.785 +this.SPDI_TAG_PLMN_LIST = 0x80;
   1.786 +
   1.787 +// MM INFORMATION message content IEIs
   1.788 +// See 3GPP TS 24.008 table 9.2.18
   1.789 +this.PNN_IEI_FULL_NETWORK_NAME = 0x43;
   1.790 +this.PNN_IEI_SHORT_NETWORK_NAME = 0x45;
   1.791 +
   1.792 +// Device identifiers, see TS 11.14, clause 12.7
   1.793 +this.STK_DEVICE_ID_KEYPAD = 0x01;
   1.794 +this.STK_DEVICE_ID_DISPLAY = 0x02;
   1.795 +this.STK_DEVICE_ID_EARPIECE = 0x03;
   1.796 +this.STK_DEVICE_ID_SIM = 0x81;
   1.797 +this.STK_DEVICE_ID_ME = 0x82;
   1.798 +this.STK_DEVICE_ID_NETWORK = 0x83;
   1.799 +
   1.800 +// STK Proactive commands.
   1.801 +this.STK_CMD_REFRESH = 0x01;
   1.802 +this.STK_CMD_MORE_TIME = 0x02;
   1.803 +this.STK_CMD_POLL_INTERVAL = 0x03;
   1.804 +this.STK_CMD_POLL_OFF = 0x04;
   1.805 +this.STK_CMD_SET_UP_EVENT_LIST = 0x05;
   1.806 +this.STK_CMD_SET_UP_CALL = 0x10;
   1.807 +this.STK_CMD_SEND_SS = 0x11;
   1.808 +this.STK_CMD_SEND_USSD = 0x12;
   1.809 +this.STK_CMD_SEND_SMS = 0x13;
   1.810 +this.STK_CMD_SEND_DTMF = 0x14;
   1.811 +this.STK_CMD_LAUNCH_BROWSER = 0x15;
   1.812 +this.STK_CMD_PLAY_TONE = 0x20;
   1.813 +this.STK_CMD_DISPLAY_TEXT = 0x21;
   1.814 +this.STK_CMD_GET_INKEY = 0x22;
   1.815 +this.STK_CMD_GET_INPUT = 0x23;
   1.816 +this.STK_CMD_SELECT_ITEM = 0x24;
   1.817 +this.STK_CMD_SET_UP_MENU = 0x25;
   1.818 +this.STK_CMD_PROVIDE_LOCAL_INFO = 0x26;
   1.819 +this.STK_CMD_TIMER_MANAGEMENT = 0x27;
   1.820 +this.STK_CMD_SET_UP_IDLE_MODE_TEXT = 0x28;
   1.821 +this.STK_CMD_OPEN_CHANNEL = 0x40;
   1.822 +this.STK_CMD_CLOSE_CHANNEL = 0x41;
   1.823 +this.STK_CMD_RECEIVE_DATA = 0x42;
   1.824 +this.STK_CMD_SEND_DATA = 0x43;
   1.825 +
   1.826 +// STK Result code.
   1.827 +// TS 11.14, clause 12.12
   1.828 +
   1.829 +// Results '0X' and '1X' indicate that the command has been performed.
   1.830 +
   1.831 +// Command performed successfully.
   1.832 +this.STK_RESULT_OK = 0x00;
   1.833 +
   1.834 +// Command performed with partial comprehension.
   1.835 +this.STK_RESULT_PRFRMD_WITH_PARTIAL_COMPREHENSION = 0x01;
   1.836 +
   1.837 +// Command performed, with missing information.
   1.838 +this.STK_RESULT_PRFRMD_WITH_MISSING_INFO = 0x02;
   1.839 +
   1.840 +// REFRESH performed with additional EFs read.
   1.841 +this.STK_RESULT_PRFRMD_WITH_ADDITIONAL_EFS_READ = 0x03;
   1.842 +
   1.843 +// Command performed successfully, but requested icon could not be
   1.844 +// displayed.
   1.845 +this.STK_RESULT_PRFRMD_ICON_NOT_DISPLAYED = 0x04;
   1.846 +
   1.847 +// Command performed, but modified by call control by NAA.
   1.848 +this.STK_RESULT_PRFRMD_MODIFIED_BY_NAA = 0x05;
   1.849 +
   1.850 +// Command performed successfully, limited service.
   1.851 +this.STK_RESULT_PRFRMD_LIMITED_SERVICE = 0x06;
   1.852 +
   1.853 +// Command performed with modification.
   1.854 +this.STK_RESULT_PRFRMD_WITH_MODIFICATION = 0x07;
   1.855 +
   1.856 +// REFRESH performed but indicated NAA was not active.
   1.857 +this.STK_RESULT_PRFRMD_NAA_NOT_ACTIVE = 0x08;
   1.858 +
   1.859 +// Command performed successfully; tone not played.
   1.860 +this.STK_RESULT_PRFRMD_TONE_NOT_PLAYED = 0x09;
   1.861 +
   1.862 +// Proactive UICC session terminated by the user.
   1.863 +this.STK_RESULT_UICC_SESSION_TERM_BY_USER = 0x10;
   1.864 +
   1.865 +// Backward move in the proactive UICC session requested by the user.
   1.866 +this.STK_RESULT_BACKWARD_MOVE_BY_USER = 0x11;
   1.867 +
   1.868 +// No response from user.
   1.869 +this.STK_RESULT_NO_RESPONSE_FROM_USER = 0x12;
   1.870 +
   1.871 +// Help information required by the user.
   1.872 +this.STK_RESULT_HELP_INFO_REQUIRED = 0x13;
   1.873 +
   1.874 +// USSD or SS transaction terminated by the user.
   1.875 +this.STK_RESULT_USSD_SS_SESSION_TERM_BY_USER = 0x14;
   1.876 +
   1.877 +// Results '2X' indicate to the UICC that it may be worth re-trying the
   1.878 +// command at a later opportunity.
   1.879 +
   1.880 +// Terminal currently unable to process command.
   1.881 +this.STK_RESULT_TERMINAL_CRNTLY_UNABLE_TO_PROCESS = 0x20;
   1.882 +
   1.883 +// Network currently unable to process command.
   1.884 +this.STK_RESULT_NETWORK_CRNTLY_UNABLE_TO_PROCESS = 0x21;
   1.885 +
   1.886 +// User did not accept the proactive command.
   1.887 +this.STK_RESULT_USER_NOT_ACCEPT = 0x22;
   1.888 +
   1.889 +// User cleared down call before connection or network release.
   1.890 +this.STK_RESULT_USER_CLEAR_DOWN_CALL = 0x23;
   1.891 +
   1.892 +// Action in contradiction with the current timer state.
   1.893 +this.STK_RESULT_CONTRADICTION_WITH_TIMER = 0x24;
   1.894 +
   1.895 +// Interaction with call control by NAA; temporary problem.
   1.896 +this.STK_RESULT_NAA_CALL_CONTROL_TEMPORARY = 0x25;
   1.897 +
   1.898 +// Launch browser generic error code.
   1.899 +this.STK_RESULT_LAUNCH_BROWSER_ERROR = 0x26;
   1.900 +
   1.901 +// MMS temporary problem.
   1.902 +this.STK_RESULT_MMS_TEMPORARY = 0x27;
   1.903 +
   1.904 +// Results '3X' indicate that it is not worth the UICC re-trying with an
   1.905 +// identical command; as it will only get the same response. However, the
   1.906 +// decision to retry lies with the application.
   1.907 +
   1.908 +// Command beyond terminal's capabilities.
   1.909 +this.STK_RESULT_BEYOND_TERMINAL_CAPABILITY = 0x30;
   1.910 +
   1.911 +// Command type not understood by terminal.
   1.912 +this.STK_RESULT_CMD_TYPE_NOT_UNDERSTOOD = 0x31;
   1.913 +
   1.914 +// Command data not understood by terminal.
   1.915 +this.STK_RESULT_CMD_DATA_NOT_UNDERSTOOD = 0x32;
   1.916 +
   1.917 +// Command number not known by terminal.
   1.918 +this.STK_RESULT_CMD_NUM_NOT_KNOWN = 0x33;
   1.919 +
   1.920 +// SS Return Error.
   1.921 +this.STK_RESULT_SS_RETURN_ERROR = 0x34;
   1.922 +
   1.923 +// SMS RP-ERROR.
   1.924 +this.STK_RESULT_SMS_RP_ERROR = 0x35;
   1.925 +
   1.926 +// Error, required values are missing.
   1.927 +this.STK_RESULT_REQUIRED_VALUES_MISSING = 0x36;
   1.928 +
   1.929 +// USSD Return Error.
   1.930 +this.STK_RESULT_USSD_RETURN_ERROR = 0x37;
   1.931 +
   1.932 +// MultipleCard commands error.
   1.933 +this.STK_RESULT_MULTI_CARDS_CMD_ERROR = 0x38;
   1.934 +
   1.935 +// Interaction with call control by USIM or MO short message control by
   1.936 +// USIM; permanent problem.
   1.937 +this.STK_RESULT_USIM_CALL_CONTROL_PERMANENT = 0x39;
   1.938 +
   1.939 +// Bearer Independent Protocol error.
   1.940 +this.STK_RESULT_BIP_ERROR = 0x3a;
   1.941 +
   1.942 +// Access Technology unable to process command.
   1.943 +this.STK_RESULT_ACCESS_TECH_UNABLE_TO_PROCESS = 0x3b;
   1.944 +
   1.945 +// Frames error.
   1.946 +this.STK_RESULT_FRAMES_ERROR = 0x3c;
   1.947 +
   1.948 +// MMS Error.
   1.949 +this.STK_RESULT_MMS_ERROR = 0x3d;
   1.950 +
   1.951 +// STK presentation types, TS 11.14, clause 12.6, Command Qualifier: Select Item
   1.952 +this.STK_PRESENTATION_TYPE_NOT_SPECIFIED = 0x00; // Bit 1 is 0.
   1.953 +this.STK_PRESENTATION_TYPE_DATA_VALUES = 0x01; // Bit 1 is 1, bit 2 is 0.
   1.954 +this.STK_PRESENTATION_TYPE_NAVIGATION_OPTIONS = 0x03; // Bit 1 is 1, bit 2 is 1.
   1.955 +
   1.956 +// STK Coding Scheme.
   1.957 +this.STK_TEXT_CODING_GSM_7BIT_PACKED = 0x00;
   1.958 +this.STK_TEXT_CODING_GSM_8BIT = 0x04;
   1.959 +this.STK_TEXT_CODING_UCS2 = 0x08;
   1.960 +
   1.961 +// STK Event List.
   1.962 +this.STK_EVENT_TYPE_MT_CALL = 0x00;
   1.963 +this.STK_EVENT_TYPE_CALL_CONNECTED = 0x01;
   1.964 +this.STK_EVENT_TYPE_CALL_DISCONNECTED = 0x02;
   1.965 +this.STK_EVENT_TYPE_LOCATION_STATUS = 0x03;
   1.966 +this.STK_EVENT_TYPE_USER_ACTIVITY = 0x04;
   1.967 +this.STK_EVENT_TYPE_IDLE_SCREEN_AVAILABLE = 0x05;
   1.968 +this.STK_EVENT_TYPE_CARD_READER_STATUS = 0x06;
   1.969 +this.STK_EVENT_TYPE_LANGUAGE_SELECTION = 0x07;
   1.970 +this.STK_EVENT_TYPE_BROWSER_TERMINATION = 0x08;
   1.971 +this.STK_EVENT_TYPE_DATA_AVAILABLE = 0x09;
   1.972 +this.STK_EVENT_TYPE_CHANNEL_STATUS = 0x0a;
   1.973 +this.STK_EVENT_TYPE_SINGLE_ACCESS_TECHNOLOGY_CHANGED = 0x0b;
   1.974 +this.STK_EVENT_TYPE_DISPLAY_PARAMETER_CHANGED = 0x0c;
   1.975 +this.STK_EVENT_TYPE_LOCAL_CONNECTION = 0x0d;
   1.976 +this.STK_EVENT_TYPE_NETWORK_SEARCH_MODE_CHANGED = 0x0e;
   1.977 +this.STK_EVENT_TYPE_BROWSING_STATUS = 0x0f;
   1.978 +
   1.979 +// STK Service state of Location Status.
   1.980 +this.STK_SERVICE_STATE_NORMAL      = 0x00;
   1.981 +this.STK_SERVICE_STATE_LIMITED     = 0x01;
   1.982 +this.STK_SERVICE_STATE_UNAVAILABLE = 0x02;
   1.983 +
   1.984 +// Refresh mode.
   1.985 +this.STK_REFRESH_NAA_INIT_AND_FULL_FILE_CHANGE = 0x00;
   1.986 +this.STK_REFRESH_FILE_CHANGE = 0x01;
   1.987 +this.STK_REFRESH_NAA_INIT_AND_FILE_CHANGE = 0x02;
   1.988 +this.STK_REFRESH_NAA_INIT = 0x03;
   1.989 +this.STK_REFRESH_UICC_RESET = 0x04;
   1.990 +
   1.991 +// Tone type.
   1.992 +this.STK_TONE_TYPE_DIAL_TONE                = 0x01;
   1.993 +this.STK_TONE_TYPE_CALLED_SUBSCRIBER_BUSY   = 0x02;
   1.994 +this.STK_TONE_TYPE_CONGESTION               = 0x03;
   1.995 +this.STK_TONE_TYPE_RADIO_PATH_ACK           = 0x04;
   1.996 +this.STK_TONE_TYPE_RADIO_PATH_NOT_AVAILABLE = 0x05;
   1.997 +this.STK_TONE_TYPE_ERROR                    = 0x06;
   1.998 +this.STK_TONE_TYPE_CALL_WAITING_TONE        = 0x07;
   1.999 +this.STK_TONE_TYPE_RINGING_TONE             = 0x08;
  1.1000 +this.STK_TONE_TYPE_GENERAL_BEEP             = 0x10;
  1.1001 +this.STK_TONE_TYPE_POSITIVE_ACK_TONE        = 0x11;
  1.1002 +this.STK_TONE_TYPE_NEGATIVE_ACK_TONE        = 0x12;
  1.1003 +
  1.1004 +// Time unit.
  1.1005 +this.STK_TIME_UNIT_MINUTE       = 0x00;
  1.1006 +this.STK_TIME_UNIT_SECOND       = 0x01;
  1.1007 +this.STK_TIME_UNIT_TENTH_SECOND = 0x02;
  1.1008 +
  1.1009 +// Local Information type.
  1.1010 +this.STK_LOCAL_INFO_NNA = 0x00;
  1.1011 +this.STK_LOCAL_INFO_IMEI = 0x01;
  1.1012 +this.STK_LOCAL_INFO_NMR_FOR_NNA = 0x02;
  1.1013 +this.STK_LOCAL_INFO_DATE_TIME_ZONE = 0x03;
  1.1014 +this.STK_LOCAL_INFO_LANGUAGE = 0x04;
  1.1015 +this.STK_LOCAL_INFO_ACCESS_TECH = 0x06;
  1.1016 +this.STK_LOCAL_INFO_ESN = 0x07;
  1.1017 +this.STK_LOCAL_INFO_IMEISV = 0x08;
  1.1018 +this.STK_LOCAL_INFO_SEARCH_MODE = 0x09;
  1.1019 +this.STK_LOCAL_INFO_CHARGE_STATE = 0x0A;
  1.1020 +this.STK_LOCAL_INFO_MEID = 0x0B;
  1.1021 +this.STK_LOCAL_INFO_BROADCAST_NETWORK_INFO = 0x0D;
  1.1022 +this.STK_LOCAL_INFO_MULTIPLE_ACCESS_TECH = 0x0E;
  1.1023 +this.STK_LOCAL_INFO_INFO_FOR_MULTIPLE_ACCESS_TECH = 0x0F;
  1.1024 +this.STK_LOCAL_INFO_NMR_FOR_MULTIPLE_ACCESS_TECH = 0x10;
  1.1025 +
  1.1026 +// Timer Management.
  1.1027 +this.STK_TIMER_START = 0x00;
  1.1028 +this.STK_TIMER_DEACTIVATE = 0x01;
  1.1029 +this.STK_TMIER_GET_CURRENT_VALUE = 0x02;
  1.1030 +
  1.1031 +// Browser Termination Cause.
  1.1032 +this.STK_BROWSER_TERMINATION_CAUSE_USER = 0x00;
  1.1033 +this.STK_BROWSER_TERMINATION_CAUSE_ERROR = 0x01;
  1.1034 +
  1.1035 +// Next Action Indicator.
  1.1036 +this.STK_NEXT_ACTION_NULL = 0x00;
  1.1037 +this.STK_NEXT_ACTION_END_PROACTIVE_SESSION = 0x81;
  1.1038 +
  1.1039 +/**
  1.1040 + * Supported Terminal Facilities.
  1.1041 + *
  1.1042 + * value = 1, supported.
  1.1043 + *         0, not supported.
  1.1044 + */
  1.1045 +this.STK_TERMINAL_SUPPORT_PROFILE_DOWNLOAD             = 1;
  1.1046 +this.STK_TERMINAL_SUPPORT_SMS_PP_DOWNLOAD              = 1;
  1.1047 +this.STK_TERMINAL_SUPPORT_CELL_BROADCAST_DATA_DOWNLOAD = 0;
  1.1048 +this.STK_TERMINAL_SUPPORT_MENU_SELECTION               = 1;
  1.1049 +this.STK_TERMINAL_SUPPORT_SIM_DATA_DOWNLOAD_ERROR      = 0;
  1.1050 +this.STK_TERMINAL_SUPPORT_TIMER_EXPIRATION             = 1;
  1.1051 +this.STK_TERMINAL_SUPPORT_USSD_IN_CALL_CONTROL         = 0;
  1.1052 +this.STK_TERMINAL_SUPPORT_CALL_CONTROL_IN_REDIAL       = 0;
  1.1053 +
  1.1054 +this.STK_TERMINAL_SUPPORT_COMMAND_RESULT               = 1;
  1.1055 +this.STK_TERMINAL_SUPPORT_CALL_CONTROL                 = 1;
  1.1056 +this.STK_TERMINAL_SUPPORT_CALL_ID_INCLUDED             = 0;
  1.1057 +this.STK_TERMINAL_SUPPORT_MO_SMS_CONTROL               = 0;
  1.1058 +this.STK_TERMINAL_SUPPORT_ALPHA_ID_INDICATION          = 0;
  1.1059 +this.STK_TERMINAL_SUPPORT_UCS2_ENTRY                   = 1;
  1.1060 +this.STK_TERMINAL_SUPPORT_UCS2_DISPLAY                 = 1;
  1.1061 +this.STK_TERMINAL_SUPPORT_EXTENSION_TEXT               = 1;
  1.1062 +
  1.1063 +this.STK_TERMINAL_SUPPORT_PROACTIVE_DISPLAY_TEXT       = 1;
  1.1064 +this.STK_TERMINAL_SUPPORT_PROACTIVE_GET_INKEY          = 1;
  1.1065 +this.STK_TERMINAL_SUPPORT_PROACTIVE_GET_INPUT          = 1;
  1.1066 +this.STK_TERMINAL_SUPPORT_PROACTIVE_MORE_TIME          = 1;
  1.1067 +this.STK_TERMINAL_SUPPORT_PROACTIVE_PLAY_TONE          = 1;
  1.1068 +this.STK_TERMINAL_SUPPORT_PROACTIVE_POLL_INTERVAL      = 1;
  1.1069 +this.STK_TERMINAL_SUPPORT_PROACTIVE_POLL_OFF           = 1;
  1.1070 +this.STK_TERMINAL_SUPPORT_PROACTIVE_REFRESH            = 1;
  1.1071 +
  1.1072 +this.STK_TERMINAL_SUPPORT_PROACTIVE_SELECT_ITEM        = 1;
  1.1073 +this.STK_TERMINAL_SUPPORT_PROACTIVE_SEND_SMS           = 1;
  1.1074 +this.STK_TERMINAL_SUPPORT_PROACTIVE_SEND_SS            = 1;
  1.1075 +this.STK_TERMINAL_SUPPORT_PROACTIVE_SEND_USSD          = 1;
  1.1076 +this.STK_TERMINAL_SUPPORT_PROACTIVE_SET_UP_CALL        = 1;
  1.1077 +this.STK_TERMINAL_SUPPORT_PROACTIVE_SET_UP_MENU        = 1;
  1.1078 +this.STK_TERMINAL_SUPPORT_PROACTIVE_LOCAL_INFO         = 1;
  1.1079 +this.STK_TERMINAL_SUPPORT_PROACTIVE_LOCAL_INFO_NMR     = 0;
  1.1080 +
  1.1081 +this.STK_TERMINAL_SUPPORT_PROACTIVE_SET_UP_EVENT_LIST  = 1;
  1.1082 +this.STK_TERMINAL_SUPPORT_EVENT_MT_CALL                = 1;
  1.1083 +this.STK_TERMINAL_SUPPORT_EVENT_CALL_CONNECTED         = 1;
  1.1084 +this.STK_TERMINAL_SUPPORT_EVENT_CALL_DISCONNECTED      = 1;
  1.1085 +this.STK_TERMINAL_SUPPORT_EVENT_LOCATION_STATUS        = 1;
  1.1086 +this.STK_TERMINAL_SUPPORT_EVENT_USER_ACTIVITY          = 1;
  1.1087 +this.STK_TERMINAL_SUPPORT_EVENT_IDLE_SCREEN_AVAILABLE  = 1;
  1.1088 +this.STK_TERMINAL_SUPPORT_EVENT_CARD_READER_STATUS     = 0;
  1.1089 +
  1.1090 +this.STK_TERMINAL_SUPPORT_EVENT_LANGUAGE_SELECTION     = 1;
  1.1091 +this.STK_TERMINAL_SUPPORT_EVENT_BROWSER_TERMINATION    = 1;
  1.1092 +this.STK_TERMINAL_SUPPORT_EVENT_DATA_AVAILABLE         = 0;
  1.1093 +this.STK_TERMINAL_SUPPORT_EVENT_CHANNEL_STATUS         = 0;
  1.1094 +
  1.1095 +this.STK_TERMINAL_SUPPORT_PROACTIVE_TIMER_START_STOP   = 1;
  1.1096 +this.STK_TERMINAL_SUPPORT_PROACTIVE_TIMER_GET_CURRENT  = 1;
  1.1097 +this.STK_TERMINAL_SUPPORT_PROACTIVE_LOCAL_INFO_DATE    = 1;
  1.1098 +this.STK_TERMINAL_SUPPORT_GET_INKEY                    = 1;
  1.1099 +this.STK_TERMINAL_SUPPORT_SET_UP_IDLE_MODE_TEXT        = 1;
  1.1100 +this.STK_TERMINAL_SUPPORT_RUN_AT_COMMAND               = 0;
  1.1101 +this.STK_TERMINAL_SUPPORT_SET_UP_CALL                  = 1;
  1.1102 +this.STK_TERMINAL_SUPPORT_CALL_CONTROL_BY_NNA          = 0;
  1.1103 +
  1.1104 +this.STK_TERMINAL_SUPPORT_DISPLAY_TEXT                      = 1;
  1.1105 +this.STK_TERMINAL_SUPPORT_SEND_DTMF_COMMAND                 = 1;
  1.1106 +this.STK_TERMINAL_SUPPORT_PROACTIVE_LOCAL_INFO_NMR          = 0;
  1.1107 +this.STK_TERMINAL_SUPPORT_PROACTIVE_LOCAL_INFO_LANGUAGE     = 1;
  1.1108 +this.STK_TERMINAL_SUPPORT_PROACTIVE_LOCAL_INFO_TIME_ADVANCE = 0;
  1.1109 +this.STK_TERMINAL_SUPPORT_PROACTIVE_LANGUAGE_NOTIFICATION   = 0;
  1.1110 +this.STK_TERMINAL_SUPPORT_PROACTIVE_LAUNCH_BROWSER          = 1;
  1.1111 +this.STK_TERMINAL_SUPPORT_PROACTIVE_LOCAL_INFO_ACCESS_TECH  = 0;
  1.1112 +
  1.1113 +this.STK_TERMINAL_SUPPORT_BIP_COMMAND_OPEN_CHANNEL       = 1;
  1.1114 +this.STK_TERMINAL_SUPPORT_BIP_COMMAND_CLOSE_CHANNEL      = 1;
  1.1115 +this.STK_TERMINAL_SUPPORT_BIP_COMMAND_RECEIVE_DATA       = 1;
  1.1116 +this.STK_TERMINAL_SUPPORT_BIP_COMMAND_SEND_DATA          = 1;
  1.1117 +this.STK_TERMINAL_SUPPORT_BIP_COMMAND_GET_CHANNEL_STATUS = 0;
  1.1118 +
  1.1119 +/**
  1.1120 + * SAT profile
  1.1121 + *
  1.1122 + * @see ETSI TS 101.267, section 5.2.
  1.1123 + */
  1.1124 +this.STK_TERMINAL_PROFILE_DOWNLOAD =
  1.1125 +  (STK_TERMINAL_SUPPORT_PROFILE_DOWNLOAD << 0) |
  1.1126 +  (STK_TERMINAL_SUPPORT_SMS_PP_DOWNLOAD  << 1) |
  1.1127 +  (STK_TERMINAL_SUPPORT_CELL_BROADCAST_DATA_DOWNLOAD  << 2) |
  1.1128 +  (STK_TERMINAL_SUPPORT_MENU_SELECTION << 3) |
  1.1129 +  (STK_TERMINAL_SUPPORT_SIM_DATA_DOWNLOAD_ERROR << 4) |
  1.1130 +  (STK_TERMINAL_SUPPORT_TIMER_EXPIRATION << 5) |
  1.1131 +  (STK_TERMINAL_SUPPORT_USSD_IN_CALL_CONTROL << 6) |
  1.1132 +  (STK_TERMINAL_SUPPORT_CALL_CONTROL_IN_REDIAL << 7);
  1.1133 +
  1.1134 +this.STK_TERMINAL_PROFILE_OTHER =
  1.1135 +  (STK_TERMINAL_SUPPORT_COMMAND_RESULT << 0) |
  1.1136 +  (STK_TERMINAL_SUPPORT_CALL_CONTROL << 1) |
  1.1137 +  (STK_TERMINAL_SUPPORT_CALL_ID_INCLUDED << 2) |
  1.1138 +  (STK_TERMINAL_SUPPORT_MO_SMS_CONTROL << 3) |
  1.1139 +  (STK_TERMINAL_SUPPORT_ALPHA_ID_INDICATION << 4) |
  1.1140 +  (STK_TERMINAL_SUPPORT_UCS2_ENTRY << 5) |
  1.1141 +  (STK_TERMINAL_SUPPORT_UCS2_DISPLAY << 6) |
  1.1142 +  (STK_TERMINAL_SUPPORT_EXTENSION_TEXT << 7);
  1.1143 +
  1.1144 +this.STK_TERMINAL_PROFILE_PROACTIVE_1 =
  1.1145 +  (STK_TERMINAL_SUPPORT_PROACTIVE_DISPLAY_TEXT << 0) |
  1.1146 +  (STK_TERMINAL_SUPPORT_PROACTIVE_GET_INKEY << 1) |
  1.1147 +  (STK_TERMINAL_SUPPORT_PROACTIVE_GET_INPUT << 2) |
  1.1148 +  (STK_TERMINAL_SUPPORT_PROACTIVE_MORE_TIME << 3) |
  1.1149 +  (STK_TERMINAL_SUPPORT_PROACTIVE_PLAY_TONE << 4) |
  1.1150 +  (STK_TERMINAL_SUPPORT_PROACTIVE_POLL_INTERVAL << 5) |
  1.1151 +  (STK_TERMINAL_SUPPORT_PROACTIVE_POLL_OFF << 6) |
  1.1152 +  (STK_TERMINAL_SUPPORT_PROACTIVE_REFRESH << 7);
  1.1153 +
  1.1154 +this.STK_TERMINAL_PROFILE_PROACTIVE_2 =
  1.1155 +  (STK_TERMINAL_SUPPORT_PROACTIVE_SELECT_ITEM << 0) |
  1.1156 +  (STK_TERMINAL_SUPPORT_PROACTIVE_SEND_SMS << 1) |
  1.1157 +  (STK_TERMINAL_SUPPORT_PROACTIVE_SEND_SS << 2) |
  1.1158 +  (STK_TERMINAL_SUPPORT_PROACTIVE_SEND_USSD << 3) |
  1.1159 +  (STK_TERMINAL_SUPPORT_PROACTIVE_SET_UP_CALL << 4) |
  1.1160 +  (STK_TERMINAL_SUPPORT_PROACTIVE_SET_UP_MENU << 5) |
  1.1161 +  (STK_TERMINAL_SUPPORT_PROACTIVE_LOCAL_INFO << 6) |
  1.1162 +  (STK_TERMINAL_SUPPORT_PROACTIVE_LOCAL_INFO_NMR << 7);
  1.1163 +
  1.1164 +this.STK_TERMINAL_PROFILE_EVENT =
  1.1165 +  (STK_TERMINAL_SUPPORT_PROACTIVE_SET_UP_EVENT_LIST << 0) |
  1.1166 +  (STK_TERMINAL_SUPPORT_EVENT_MT_CALL << 1) |
  1.1167 +  (STK_TERMINAL_SUPPORT_EVENT_CALL_CONNECTED << 2) |
  1.1168 +  (STK_TERMINAL_SUPPORT_EVENT_CALL_DISCONNECTED << 3) |
  1.1169 +  (STK_TERMINAL_SUPPORT_EVENT_LOCATION_STATUS << 4) |
  1.1170 +  (STK_TERMINAL_SUPPORT_EVENT_USER_ACTIVITY << 5) |
  1.1171 +  (STK_TERMINAL_SUPPORT_EVENT_IDLE_SCREEN_AVAILABLE << 6) |
  1.1172 +  (STK_TERMINAL_SUPPORT_EVENT_CARD_READER_STATUS << 7);
  1.1173 +
  1.1174 +this.STK_TERMINAL_PROFILE_EVENT_EXT =
  1.1175 +  (STK_TERMINAL_SUPPORT_EVENT_LANGUAGE_SELECTION << 0) |
  1.1176 +  (STK_TERMINAL_SUPPORT_EVENT_BROWSER_TERMINATION << 1) |
  1.1177 +  (STK_TERMINAL_SUPPORT_EVENT_DATA_AVAILABLE << 2) |
  1.1178 +  (STK_TERMINAL_SUPPORT_EVENT_CHANNEL_STATUS << 3);
  1.1179 +
  1.1180 +this.STK_TERMINAL_PROFILE_PROACTIVE_3 =
  1.1181 +  (STK_TERMINAL_SUPPORT_PROACTIVE_TIMER_START_STOP << 0) |
  1.1182 +  (STK_TERMINAL_SUPPORT_PROACTIVE_TIMER_GET_CURRENT << 1) |
  1.1183 +  (STK_TERMINAL_SUPPORT_PROACTIVE_LOCAL_INFO_DATE << 2) |
  1.1184 +  (STK_TERMINAL_SUPPORT_GET_INKEY << 3) |
  1.1185 +  (STK_TERMINAL_SUPPORT_SET_UP_IDLE_MODE_TEXT << 4) |
  1.1186 +  (STK_TERMINAL_SUPPORT_RUN_AT_COMMAND << 5) |
  1.1187 +  (STK_TERMINAL_SUPPORT_SET_UP_CALL << 6) |
  1.1188 +  (STK_TERMINAL_SUPPORT_CALL_CONTROL_BY_NNA << 7);
  1.1189 +
  1.1190 +this.STK_TERMINAL_PROFILE_PROACTIVE_4 =
  1.1191 +  (STK_TERMINAL_SUPPORT_DISPLAY_TEXT << 0) |
  1.1192 +  (STK_TERMINAL_SUPPORT_SEND_DTMF_COMMAND << 1) |
  1.1193 +  (STK_TERMINAL_SUPPORT_PROACTIVE_LOCAL_INFO_NMR << 2) |
  1.1194 +  (STK_TERMINAL_SUPPORT_PROACTIVE_LOCAL_INFO_LANGUAGE << 3) |
  1.1195 +  (STK_TERMINAL_SUPPORT_PROACTIVE_LOCAL_INFO_TIME_ADVANCE << 4) |
  1.1196 +  (STK_TERMINAL_SUPPORT_PROACTIVE_LANGUAGE_NOTIFICATION << 5) |
  1.1197 +  (STK_TERMINAL_SUPPORT_PROACTIVE_LAUNCH_BROWSER << 6) |
  1.1198 +  (STK_TERMINAL_SUPPORT_PROACTIVE_LOCAL_INFO_ACCESS_TECH << 7);
  1.1199 +
  1.1200 +this.STK_TERMINAL_PROFILE_BIP_COMMAND =
  1.1201 +  (STK_TERMINAL_SUPPORT_BIP_COMMAND_OPEN_CHANNEL << 0) |
  1.1202 +  (STK_TERMINAL_SUPPORT_BIP_COMMAND_CLOSE_CHANNEL << 1) |
  1.1203 +  (STK_TERMINAL_SUPPORT_BIP_COMMAND_RECEIVE_DATA << 2) |
  1.1204 +  (STK_TERMINAL_SUPPORT_BIP_COMMAND_SEND_DATA << 3) |
  1.1205 +  (STK_TERMINAL_SUPPORT_BIP_COMMAND_GET_CHANNEL_STATUS << 4);
  1.1206 +
  1.1207 +this.STK_SUPPORTED_TERMINAL_PROFILE = [
  1.1208 +  STK_TERMINAL_PROFILE_DOWNLOAD,
  1.1209 +  STK_TERMINAL_PROFILE_OTHER,
  1.1210 +  STK_TERMINAL_PROFILE_PROACTIVE_1,
  1.1211 +  STK_TERMINAL_PROFILE_PROACTIVE_2,
  1.1212 +  STK_TERMINAL_PROFILE_EVENT,
  1.1213 +  STK_TERMINAL_PROFILE_EVENT_EXT, // Event extension
  1.1214 +  0x00, // Multiple card proactive commands
  1.1215 +  STK_TERMINAL_PROFILE_PROACTIVE_3,
  1.1216 +  STK_TERMINAL_PROFILE_PROACTIVE_4,
  1.1217 +  0x00, // Softkey support
  1.1218 +  0x00, // Softkey information
  1.1219 +  STK_TERMINAL_PROFILE_BIP_COMMAND,
  1.1220 +  0x00, // BIP supported bearers
  1.1221 +  0x00, // Screen height
  1.1222 +  0x00, // Screen width
  1.1223 +  0x00, // 16, Screen effects
  1.1224 +  0x00, // 17, BIP supported transport interface
  1.1225 +  0x00, // 18, RFU
  1.1226 +  0x00, // 19, RFU
  1.1227 +  0x00, // 20, RFU
  1.1228 +];
  1.1229 +
  1.1230 +/**
  1.1231 + * (U)SIM Services.
  1.1232 + *
  1.1233 + * @see 3GPP TS 51.011 10.3.7 (SIM) and 3GPP TS 31.102 4.2.8 (USIM).
  1.1234 + */
  1.1235 +this.GECKO_ICC_SERVICES = {
  1.1236 +  sim: {
  1.1237 +    ADN: 2,
  1.1238 +    FDN: 3,
  1.1239 +    PLMNSEL: 7,
  1.1240 +    MSISDN: 9,
  1.1241 +    CBMI: 14,
  1.1242 +    SPN: 17,
  1.1243 +    SDN: 18,
  1.1244 +    DATA_DOWNLOAD_SMS_CB: 25,
  1.1245 +    DATA_DOWNLOAD_SMS_PP: 26,
  1.1246 +    CBMIR: 30,
  1.1247 +    BDN: 31,
  1.1248 +    PNN: 51,
  1.1249 +    OPL: 52,
  1.1250 +    MDN: 53,
  1.1251 +    MWIS: 54,
  1.1252 +    SPDI: 56
  1.1253 +  },
  1.1254 +  usim: {
  1.1255 +    FDN: 2,
  1.1256 +    SDN: 4,
  1.1257 +    BDN: 6,
  1.1258 +    CBMI: 15,
  1.1259 +    CBMIR: 16,
  1.1260 +    SPN: 19,
  1.1261 +    MSISDN: 21,
  1.1262 +    DATA_DOWNLOAD_SMS_PP: 28,
  1.1263 +    DATA_DOWNLOAD_SMS_CB: 29,
  1.1264 +    PNN: 45,
  1.1265 +    OPL: 46,
  1.1266 +    MDN: 47,
  1.1267 +    MWIS: 48,
  1.1268 +    SPDI: 51
  1.1269 +  },
  1.1270 +  ruim: {
  1.1271 +    ENHANCED_PHONEBOOK: 6,
  1.1272 +    SPN: 17
  1.1273 +  }
  1.1274 +};
  1.1275 +
  1.1276 +/**
  1.1277 + * Cell Broadcast constants
  1.1278 + */
  1.1279 +
  1.1280 +this.CB_FORMAT_GSM  = 0;
  1.1281 +this.CB_FORMAT_ETWS = 1;
  1.1282 +this.CB_FORMAT_CMAS = 2;
  1.1283 +this.CB_FORMAT_UMTS = 3;
  1.1284 +
  1.1285 +// CBS Data Coding Scheme: Language groups
  1.1286 +// see 3GPP TS 23.038 section 5
  1.1287 +this.CB_DCS_LANG_GROUP_1 = [
  1.1288 +  "de", "en", "it", "fr", "es", "nl", "sv", "da", "pt", "fi",
  1.1289 +  "no", "el", "tr", "hu", "pl", null
  1.1290 +];
  1.1291 +this.CB_DCS_LANG_GROUP_2 = [
  1.1292 +  "cs", "he", "ar", "ru", "is", null, null, null, null, null,
  1.1293 +  null, null, null, null, null, null
  1.1294 +];
  1.1295 +
  1.1296 +// See 3GPP TS 23.041 v11.2.0 section 9.4.1.2.2
  1.1297 +this.CB_NON_MMI_SETTABLE_RANGES = [
  1.1298 +  /*0x1000 - 0x107F*/4096,  4224,  /*0x1080 - 0x10FF*/4224,  4352,
  1.1299 +  /*0x1112 - 0x1112*/4370,  4371,  /*0x111F - 0x111F*/4383,  4384,
  1.1300 +  /*0xF000 - 0xFFFE*/61440, 65535, /*0xFFFF - 0xFFFF*/65535, 65536
  1.1301 +];
  1.1302 +
  1.1303 +// User Data max length in septets
  1.1304 +this.CB_MAX_CONTENT_7BIT = 93;
  1.1305 +// User Data max length in octets
  1.1306 +this.CB_MAX_CONTENT_8BIT = 82;
  1.1307 +// User Data max length in chars
  1.1308 +this.CB_MAX_CONTENT_UCS2 = 41;
  1.1309 +
  1.1310 +this.CB_MESSAGE_SIZE_ETWS = 56;
  1.1311 +this.CB_MESSAGE_SIZE_GSM  = 88;
  1.1312 +
  1.1313 +// GSM Cell Broadcast Geographical Scope
  1.1314 +// See 3GPP TS 23.041 clause 9.4.1.2.1
  1.1315 +this.CB_GSM_GEOGRAPHICAL_SCOPE_CELL_WIDE_IMMEDIATE = 0;
  1.1316 +this.CB_GSM_GEOGRAPHICAL_SCOPE_PLMN_WIDE           = 1;
  1.1317 +this.CB_GSM_GEOGRAPHICAL_SCOPE_LOCATION_AREA_WIDE  = 2;
  1.1318 +this.CB_GSM_GEOGRAPHICAL_SCOPE_CELL_WIDE           = 3;
  1.1319 +
  1.1320 +// GSM Cell Broadcast Geographical Scope
  1.1321 +// See 3GPP TS 23.041 clause 9.4.1.2.1
  1.1322 +this.CB_GSM_GEOGRAPHICAL_SCOPE_NAMES = [
  1.1323 +  "cell-immediate",
  1.1324 +  "plmn",
  1.1325 +  "location-area",
  1.1326 +  "cell"
  1.1327 +];
  1.1328 +
  1.1329 +// GSM Cell Broadcast Message Identifiers
  1.1330 +// see 3GPP TS 23.041 clause 9.4.1.2.2
  1.1331 +this.CB_GSM_MESSAGEID_ETWS_BEGIN = 0x1100;
  1.1332 +this.CB_GSM_MESSAGEID_ETWS_END   = 0x1107;
  1.1333 +
  1.1334 +// ETWS Warning-Type
  1.1335 +// see 3GPP TS 23.041 clause 9.3.24
  1.1336 +this.CB_ETWS_WARNING_TYPE_NAMES = [
  1.1337 +  "earthquake",
  1.1338 +  "tsunami",
  1.1339 +  "earthquake-tsunami",
  1.1340 +  "test",
  1.1341 +  "other"
  1.1342 +];
  1.1343 +
  1.1344 +/**
  1.1345 + * GSM PDU constants
  1.1346 + */
  1.1347 +
  1.1348 +// PDU TYPE-OF-ADDRESS
  1.1349 +this.PDU_TOA_UNKNOWN       = 0x80; // Unknown. This is used when the user or
  1.1350 +                                    // network has no a priori information
  1.1351 +                                    // about the numbering plan.
  1.1352 +this.PDU_TOA_ISDN          = 0x81; // ISDN/Telephone numbering
  1.1353 +this.PDU_TOA_DATA_NUM      = 0x83; // Data numbering plan
  1.1354 +this.PDU_TOA_TELEX_NUM     = 0x84; // Telex numbering plan
  1.1355 +this.PDU_TOA_NATIONAL_NUM  = 0x88; // National numbering plan
  1.1356 +this.PDU_TOA_PRIVATE_NUM   = 0x89; // Private numbering plan
  1.1357 +this.PDU_TOA_ERMES_NUM     = 0x8A; // Ermes numbering plan
  1.1358 +this.PDU_TOA_INTERNATIONAL = 0x90; // International number
  1.1359 +this.PDU_TOA_NATIONAL      = 0xA0; // National number. Prefix or escape digits
  1.1360 +                                    // shall not be included
  1.1361 +this.PDU_TOA_NETWORK_SPEC  = 0xB0; // Network specific number This is used to
  1.1362 +                                    // indicate administration/service number
  1.1363 +                                    // specific to the serving network
  1.1364 +this.PDU_TOA_SUBSCRIBER    = 0xC0; // Subscriber number. This is used when a
  1.1365 +                                    // specific short number representation is
  1.1366 +                                    // stored in one or more SCs as part of a
  1.1367 +                                    // higher layer application
  1.1368 +this.PDU_TOA_ALPHANUMERIC  = 0xD0; // Alphanumeric, (coded according to GSM TS
  1.1369 +                                    // 03.38 7-bit default alphabet)
  1.1370 +this.PDU_TOA_ABBREVIATED   = 0xE0; // Abbreviated number
  1.1371 +
  1.1372 +/**
  1.1373 + * First octet of the SMS-DELIVER PDU
  1.1374 + *
  1.1375 + * RP:     0   Reply Path parameter is not set in this PDU
  1.1376 + *         1   Reply Path parameter is set in this PDU
  1.1377 + *
  1.1378 + * UDHI:   0   The UD field contains only the short message
  1.1379 + *         1   The beginning of the UD field contains a header in addition of
  1.1380 + *             the short message
  1.1381 + *
  1.1382 + * SRI: (is only set by the SMSC)
  1.1383 + *         0    A status report will not be returned to the SME
  1.1384 + *         1    A status report will be returned to the SME
  1.1385 + *
  1.1386 + * MMS: (is only set by the SMSC)
  1.1387 + *         0    More messages are waiting for the MS in the SMSC
  1.1388 + *         1    No more messages are waiting for the MS in the SMSC
  1.1389 + *
  1.1390 + * MTI:   bit1    bit0    Message type
  1.1391 + *         0       0       SMS-DELIVER (SMSC ==> MS)
  1.1392 + *         0       0       SMS-DELIVER REPORT (MS ==> SMSC, is generated
  1.1393 + *                         automatically by the M20, after receiving a
  1.1394 + *                         SMS-DELIVER)
  1.1395 + *         0       1       SMS-SUBMIT (MS ==> SMSC)
  1.1396 + *         0       1       SMS-SUBMIT REPORT (SMSC ==> MS)
  1.1397 + *         1       0       SMS-STATUS REPORT (SMSC ==> MS)
  1.1398 + *         1       0       SMS-COMMAND (MS ==> SMSC)
  1.1399 + *         1       1       Reserved
  1.1400 + */
  1.1401 +this.PDU_RP    = 0x80;       // Reply path. Parameter indicating that
  1.1402 +                              // reply path exists.
  1.1403 +this.PDU_UDHI  = 0x40;       // User data header indicator. This bit is
  1.1404 +                              // set to 1 if the User Data field starts
  1.1405 +                              // with a header
  1.1406 +this.PDU_SRI_SRR = 0x20;     // Status report indication (SMS-DELIVER)
  1.1407 +                              // or request (SMS-SUBMIT)
  1.1408 +this.PDU_VPF_ABSOLUTE = 0x18;// Validity period aboslute format
  1.1409 +                              // (SMS-SUBMIT only)
  1.1410 +this.PDU_VPF_RELATIVE = 0x10;// Validity period relative format
  1.1411 +                              // (SMS-SUBMIT only)
  1.1412 +this.PDU_VPF_ENHANCED = 0x8; // Validity period enhance format
  1.1413 +                              // (SMS-SUBMIT only)
  1.1414 +this.PDU_MMS_RD       = 0x04;// More messages to send. (SMS-DELIVER only) or
  1.1415 +                              // Reject duplicates (SMS-SUBMIT only)
  1.1416 +
  1.1417 +// MTI - Message Type Indicator
  1.1418 +this.PDU_MTI_SMS_RESERVED        = 0x03;
  1.1419 +this.PDU_MTI_SMS_STATUS_REPORT   = 0x02;
  1.1420 +this.PDU_MTI_SMS_COMMAND         = 0x02;
  1.1421 +this.PDU_MTI_SMS_SUBMIT          = 0x01;
  1.1422 +this.PDU_MTI_SMS_DELIVER         = 0x00;
  1.1423 +
  1.1424 +// PI - Parameter Indicator
  1.1425 +this.PDU_PI_EXTENSION           = 0x80;
  1.1426 +this.PDU_PI_USER_DATA_LENGTH    = 0x04;
  1.1427 +this.PDU_PI_DATA_CODING_SCHEME  = 0x02;
  1.1428 +this.PDU_PI_PROTOCOL_IDENTIFIER = 0x01;
  1.1429 +this.PDU_PI_RESERVED            = 0x78;
  1.1430 +
  1.1431 +// FCS - Failure Cause
  1.1432 +// 0...127   see 3GPP TS 24.011 clause E.2
  1.1433 +// 128...255 see 3GPP TS 23.040 clause 9.2.3.22
  1.1434 +// others    see 3GPP TS 27.005 clause 3.2.5
  1.1435 +this.PDU_FCS_OK                       = 0x00;
  1.1436 +this.PDU_FCS_PROTOCOL_ERROR           = 0x6F;
  1.1437 +this.PDU_FCS_MEMORY_CAPACITY_EXCEEDED = 0XD3;
  1.1438 +this.PDU_FCS_USAT_BUSY                = 0XD4;
  1.1439 +this.PDU_FCS_USIM_DATA_DOWNLOAD_ERROR = 0xD5;
  1.1440 +this.PDU_FCS_RESERVED                 = 0xE0;
  1.1441 +this.PDU_FCS_UNSPECIFIED              = 0xFF;
  1.1442 +// Special internal value that means we should not acknowledge an
  1.1443 +// incoming text right away, but need to wait for other components
  1.1444 +// (e.g. storage) to complete. This can be any value, so long it
  1.1445 +// doesn't conflict with the PDU_FCS_* constants above.
  1.1446 +this.MOZ_FCS_WAIT_FOR_EXPLICIT_ACK    = 0x0F;
  1.1447 +
  1.1448 +// ST - Status
  1.1449 +// Bit 7..0 = 000xxxxx, short message transaction completed
  1.1450 +this.PDU_ST_0_RECEIVED             = 0x00;
  1.1451 +this.PDU_ST_0_FORWARDED_NO_CONFIRM = 0x01;
  1.1452 +this.PDU_ST_0_REPLACED_BY_SC       = 0x02;
  1.1453 +this.PDU_ST_0_RESERVED_BEGIN       = 0x03;
  1.1454 +this.PDU_ST_0_SC_SPECIFIC_BEGIN    = 0x10;
  1.1455 +this.PDU_ST_0_SC_SPECIFIC_END      = 0x1F;
  1.1456 +// Bit 7..0 = 001xxxxx, temporary error, SC still trying to transfer SM
  1.1457 +this.PDU_ST_1_CONGESTION        = 0x20;
  1.1458 +this.PDU_ST_1_SME_BUSY          = 0x21;
  1.1459 +this.PDU_ST_1_SME_NO_RESPONSE   = 0x22;
  1.1460 +this.PDU_ST_1_SERVICE_REJECTED  = 0x23;
  1.1461 +this.PDU_ST_1_QOS_UNAVAILABLE   = 0x24;
  1.1462 +this.PDU_ST_1_SME_ERROR         = 0x25;
  1.1463 +this.PDU_ST_1_RESERVED_BEGIN    = 0x26;
  1.1464 +this.PDU_ST_1_SC_SPECIFIC_BEGIN = 0x30;
  1.1465 +this.PDU_ST_1_SC_SPECIFIC_END   = 0x3F;
  1.1466 +// Bit 7..0 = 010xxxxx, permanent error, SC is not making any more transfer
  1.1467 +// attempts
  1.1468 +this.PDU_ST_2_RPC_ERROR                = 0x40;
  1.1469 +this.PDU_ST_2_DEST_INCOMPATIBLE        = 0x41;
  1.1470 +this.PDU_ST_2_CONNECTION_REJECTED      = 0x42;
  1.1471 +this.PDU_ST_2_NOT_OBTAINABLE           = 0x43;
  1.1472 +this.PDU_ST_2_QOS_UNAVAILABLE          = 0x44;
  1.1473 +this.PDU_ST_2_INTERWORKING_UNAVALIABLE = 0x45;
  1.1474 +this.PDU_ST_2_VALIDITY_EXPIRED         = 0x46;
  1.1475 +this.PDU_ST_2_DELETED_BY_SME           = 0x47;
  1.1476 +this.PDU_ST_2_DELETED_BY_SC            = 0x48;
  1.1477 +this.PDU_ST_2_SM_MISSING               = 0x49;
  1.1478 +this.PDU_ST_2_RESERVED_BEGIN           = 0x4A;
  1.1479 +this.PDU_ST_2_SC_SPECIFIC_BEGIN        = 0x50;
  1.1480 +this.PDU_ST_2_SC_SPECIFIC_END          = 0x5F;
  1.1481 +// Bit 7..0 = 011xxxxx, temporary error, SC is not making any more transfer
  1.1482 +// attempts
  1.1483 +this.PDU_ST_3_CONGESTION        = 0x60;
  1.1484 +this.PDU_ST_3_SME_BUSY          = 0x61;
  1.1485 +this.PDU_ST_3_SME_NO_RESPONSE   = 0x62;
  1.1486 +this.PDU_ST_3_SERVICE_REJECTED  = 0x63;
  1.1487 +this.PDU_ST_3_QOS_UNAVAILABLE   = 0x64;
  1.1488 +this.PDU_ST_3_SME_ERROR         = 0x65;
  1.1489 +this.PDU_ST_3_RESERVED_BEGIN    = 0x66;
  1.1490 +this.PDU_ST_3_SC_SPECIFIC_BEGIN = 0x70;
  1.1491 +this.PDU_ST_3_SC_SPECIFIC_END   = 0x7F;
  1.1492 +
  1.1493 +this.GECKO_SMS_DELIVERY_STATUS_NOT_APPLICABLE = "not-applicable";
  1.1494 +this.GECKO_SMS_DELIVERY_STATUS_SUCCESS        = "success";
  1.1495 +this.GECKO_SMS_DELIVERY_STATUS_PENDING        = "pending";
  1.1496 +this.GECKO_SMS_DELIVERY_STATUS_ERROR          = "error";
  1.1497 +
  1.1498 +// User Data max length in septets
  1.1499 +this.PDU_MAX_USER_DATA_7BIT = 160;
  1.1500 +// User Data max length in octets
  1.1501 +this.PDU_MAX_USER_DATA_8BIT = 140;
  1.1502 +// User Data max length in chars
  1.1503 +this.PDU_MAX_USER_DATA_UCS2 = 70;
  1.1504 +
  1.1505 +// PID - Protocol Indicator
  1.1506 +this.PDU_PID_DEFAULT                      = 0x00;
  1.1507 +this.PDU_PID_TELEMATIC_INTERWORKING       = 0x20;
  1.1508 +this.PDU_PID_SHORT_MESSAGE_TYPE_0         = 0x40;
  1.1509 +this.PDU_PID_REPLACE_SHORT_MESSAGE_TYPE_1 = 0x41;
  1.1510 +this.PDU_PID_REPLACE_SHORT_MESSAGE_TYPE_2 = 0x42;
  1.1511 +this.PDU_PID_REPLACE_SHORT_MESSAGE_TYPE_3 = 0x43;
  1.1512 +this.PDU_PID_REPLACE_SHORT_MESSAGE_TYPE_4 = 0x44;
  1.1513 +this.PDU_PID_REPLACE_SHORT_MESSAGE_TYPE_5 = 0x45;
  1.1514 +this.PDU_PID_REPLACE_SHORT_MESSAGE_TYPE_6 = 0x46;
  1.1515 +this.PDU_PID_REPLACE_SHORT_MESSAGE_TYPE_7 = 0x47;
  1.1516 +this.PDU_PID_ENHANDED_MESSAGE_SERVICE     = 0x5E;
  1.1517 +this.PDU_PID_RETURN_CALL_MESSAGE          = 0x5F;
  1.1518 +this.PDU_PID_ANSI_136_R_DATA              = 0x7C;
  1.1519 +this.PDU_PID_ME_DATA_DOWNLOAD             = 0x7D;
  1.1520 +this.PDU_PID_ME_DEPERSONALIZATION         = 0x7E;
  1.1521 +this.PDU_PID_USIM_DATA_DOWNLOAD           = 0x7F;
  1.1522 +
  1.1523 +// DCS - Data Coding Scheme
  1.1524 +this.PDU_DCS_MSG_CODING_7BITS_ALPHABET  = 0x00;
  1.1525 +this.PDU_DCS_MSG_CODING_8BITS_ALPHABET  = 0x04;
  1.1526 +this.PDU_DCS_MSG_CODING_16BITS_ALPHABET = 0x08;
  1.1527 +this.PDU_DCS_MSG_CLASS_NORMAL           = 0xFF;
  1.1528 +this.PDU_DCS_MSG_CLASS_0                = 0x00;
  1.1529 +this.PDU_DCS_MSG_CLASS_1                = 0x01;
  1.1530 +this.PDU_DCS_MSG_CLASS_2                = 0x02;
  1.1531 +this.PDU_DCS_MSG_CLASS_3                = 0x03;
  1.1532 +this.PDU_DCS_MSG_CLASS_USER_1           = 0x04;
  1.1533 +this.PDU_DCS_MSG_CLASS_USER_2           = 0x05;
  1.1534 +this.PDU_DCS_CODING_GROUP_BITS          = 0xF0;
  1.1535 +this.PDU_DCS_MSG_CLASS_BITS             = 0x03;
  1.1536 +this.PDU_DCS_MWI_ACTIVE_BITS            = 0x08;
  1.1537 +this.PDU_DCS_MWI_ACTIVE_VALUE           = 0x08;
  1.1538 +this.PDU_DCS_MWI_TYPE_BITS              = 0x03;
  1.1539 +this.PDU_DCS_MWI_TYPE_VOICEMAIL         = 0x00;
  1.1540 +this.PDU_DCS_MWI_TYPE_FAX               = 0x01;
  1.1541 +this.PDU_DCS_MWI_TYPE_EMAIL             = 0x02;
  1.1542 +this.PDU_DCS_MWI_TYPE_OTHER             = 0x03;
  1.1543 +
  1.1544 +this.GECKO_SMS_MESSAGE_CLASSES = {};
  1.1545 +GECKO_SMS_MESSAGE_CLASSES[PDU_DCS_MSG_CLASS_NORMAL] = "normal";
  1.1546 +GECKO_SMS_MESSAGE_CLASSES[PDU_DCS_MSG_CLASS_0]      = "class-0";
  1.1547 +GECKO_SMS_MESSAGE_CLASSES[PDU_DCS_MSG_CLASS_1]      = "class-1";
  1.1548 +GECKO_SMS_MESSAGE_CLASSES[PDU_DCS_MSG_CLASS_2]      = "class-2";
  1.1549 +GECKO_SMS_MESSAGE_CLASSES[PDU_DCS_MSG_CLASS_3]      = "class-3";
  1.1550 +GECKO_SMS_MESSAGE_CLASSES[PDU_DCS_MSG_CLASS_USER_1] = "user-1";
  1.1551 +GECKO_SMS_MESSAGE_CLASSES[PDU_DCS_MSG_CLASS_USER_2] = "user-2";
  1.1552 +
  1.1553 +// Because service center timestamp omit the century. Yay.
  1.1554 +this.PDU_TIMESTAMP_YEAR_OFFSET = 2000;
  1.1555 +
  1.1556 +// See 9.2.3.24 TP‑User Data (TP‑UD)
  1.1557 +this.PDU_IEI_CONCATENATED_SHORT_MESSAGES_8BIT         = 0x00;
  1.1558 +this.PDU_IEI_SPECIAL_SMS_MESSAGE_INDICATION           = 0x01;
  1.1559 +this.PDU_IEI_APPLICATION_PORT_ADDRESSING_SCHEME_8BIT  = 0x04;
  1.1560 +this.PDU_IEI_APPLICATION_PORT_ADDRESSING_SCHEME_16BIT = 0x05;
  1.1561 +this.PDU_IEI_SMSC_CONTROL_PARAMS                      = 0x06;
  1.1562 +this.PDU_IEI_UDH_SOURCE_INDICATOR                     = 0x07;
  1.1563 +this.PDU_IEI_CONCATENATED_SHORT_MESSAGES_16BIT        = 0x08;
  1.1564 +this.PDU_IEI_WIRELESS_CONTROL_MESSAGE_PROTOCOL        = 0x09;
  1.1565 +this.PDU_IEI_TEXT_FORMATING                           = 0x0A;
  1.1566 +this.PDU_IEI_PREDEFINED_SOUND                         = 0x0B;
  1.1567 +this.PDU_IEI_USER_DATA_SOUND                          = 0x0C;
  1.1568 +this.PDU_IEI_PREDEFINED_ANIMATION                     = 0x0D;
  1.1569 +this.PDU_IEI_LARGE_ANIMATION                          = 0x0E;
  1.1570 +this.PDU_IEI_SMALL_ANIMATION                          = 0x0F;
  1.1571 +this.PDU_IEI_LARGE_PICTURE                            = 0x10;
  1.1572 +this.PDU_IEI_SMALL_PICTURE                            = 0x11;
  1.1573 +this.PDU_IEI_VARIABLE_PICTURE                         = 0x12;
  1.1574 +this.PDU_IEI_USER_PROMPT_INDICATOR                    = 0x13;
  1.1575 +this.PDU_IEI_EXTENDED_OBJECT                          = 0x14;
  1.1576 +this.PDU_IEI_REUSED_EXTENDED_OBJECT                   = 0x15;
  1.1577 +this.PDU_IEI_COMPRESS_CONTROL                         = 0x16;
  1.1578 +this.PDU_IEI_OBJECT_DISTRIBUTION_INDICATOR            = 0x17;
  1.1579 +this.PDU_IEI_STANDARD_WVG_OBJECT                      = 0x18;
  1.1580 +this.PDU_IEI_CHARACTER_SIZE_WVG_OBJECT                = 0x19;
  1.1581 +this.PDU_IEI_EXTENDED_OBJECT_DATA_REQUEST_COMMAND     = 0x1A;
  1.1582 +this.PDU_IEI_RFC822_EMAIL_HEADER                      = 0x20;
  1.1583 +this.PDU_IEI_HYPERLINK_FORMAT_ELEMENT                 = 0x21;
  1.1584 +this.PDU_IEI_REPLY_ADDRESS_ELEMENT                    = 0x22;
  1.1585 +this.PDU_IEI_ENHANCED_VOICE_MAIL_INFORMATION          = 0x23;
  1.1586 +this.PDU_IEI_NATIONAL_LANGUAGE_SINGLE_SHIFT           = 0x24;
  1.1587 +this.PDU_IEI_NATIONAL_LANGUAGE_LOCKING_SHIFT          = 0x25;
  1.1588 +
  1.1589 +// Application Port Addressing, see 3GPP TS 23.040 9.2.3.24.3
  1.1590 +this.PDU_APA_RESERVED_8BIT_PORTS = 240;
  1.1591 +this.PDU_APA_VALID_16BIT_PORTS   = 49152;
  1.1592 +
  1.1593 +// 7bit alphabet escape character. The encoded value of this code point is left
  1.1594 +// undefined in official spec. Its code value is internally assigned to \uffff,
  1.1595 +// <noncharacter-FFFF> in Unicode basic multilingual plane.
  1.1596 +this.PDU_NL_EXTENDED_ESCAPE = 0x1B;
  1.1597 +
  1.1598 +// <SP>, <LF>, <CR> are only defined in locking shift tables.
  1.1599 +this.PDU_NL_SPACE = 0x20;
  1.1600 +this.PDU_NL_LINE_FEED = 0x0A;
  1.1601 +this.PDU_NL_CARRIAGE_RETURN = 0x0D;
  1.1602 +
  1.1603 +// 7bit alphabet page break character, only defined in single shift tables.
  1.1604 +// The encoded value of this code point is left undefined in official spec, but
  1.1605 +// the code point itself maybe be used for example in compressed CBS messages.
  1.1606 +// Its code value is internally assigned to \u000c, ASCII form feed, or new page.
  1.1607 +this.PDU_NL_PAGE_BREAK = 0x0A;
  1.1608 +// 7bit alphabet reserved control character, only defined in single shift
  1.1609 +// tables. The encoded value of this code point is left undefined in official
  1.1610 +// spec. Its code value is internally assigned to \ufffe, <noncharacter-FFFE>
  1.1611 +// in Unicode basic multilingual plane.
  1.1612 +this.PDU_NL_RESERVED_CONTROL = 0x0D;
  1.1613 +
  1.1614 +this.PDU_NL_IDENTIFIER_DEFAULT    = 0;
  1.1615 +this.PDU_NL_IDENTIFIER_TURKISH    = 1;
  1.1616 +this.PDU_NL_IDENTIFIER_SPANISH    = 2;
  1.1617 +this.PDU_NL_IDENTIFIER_PORTUGUESE = 3;
  1.1618 +this.PDU_NL_IDENTIFIER_BENGALI    = 4;
  1.1619 +this.PDU_NL_IDENTIFIER_GUJARATI   = 5;
  1.1620 +this.PDU_NL_IDENTIFIER_HINDI      = 6;
  1.1621 +this.PDU_NL_IDENTIFIER_KANNADA    = 7;
  1.1622 +this.PDU_NL_IDENTIFIER_MALAYALAM  = 8;
  1.1623 +this.PDU_NL_IDENTIFIER_ORIYA      = 9;
  1.1624 +this.PDU_NL_IDENTIFIER_PUNJABI    = 10;
  1.1625 +this.PDU_NL_IDENTIFIER_TAMIL      = 11;
  1.1626 +this.PDU_NL_IDENTIFIER_TELUGU     = 12;
  1.1627 +this.PDU_NL_IDENTIFIER_URDU       = 13;
  1.1628 +
  1.1629 +// National Language Locking Shift Tables, see 3GPP TS 23.038
  1.1630 +this.PDU_NL_LOCKING_SHIFT_TABLES = [
  1.1631 +  /**
  1.1632 +   * National Language Identifier: 0x00
  1.1633 +   * 6.2.1 GSM 7 bit Default Alphabet
  1.1634 +   */
  1.1635 +  // 01.....23.....4.....5.....6.....7.....8.....9.....A.B.....C.....D.E.....F.....
  1.1636 +    "@\u00a3$\u00a5\u00e8\u00e9\u00f9\u00ec\u00f2\u00c7\n\u00d8\u00f8\r\u00c5\u00e5"
  1.1637 +  // 0.....12.....3.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....E.....F.....
  1.1638 +  + "\u0394_\u03a6\u0393\u039b\u03a9\u03a0\u03a8\u03a3\u0398\u039e\uffff\u00c6\u00e6\u00df\u00c9"
  1.1639 +  // 012.34.....56789ABCDEF
  1.1640 +  + " !\"#\u00a4%&'()*+,-./"
  1.1641 +  // 0123456789ABCDEF
  1.1642 +  + "0123456789:;<=>?"
  1.1643 +  // 0.....123456789ABCDEF
  1.1644 +  + "\u00a1ABCDEFGHIJKLMNO"
  1.1645 +  // 0123456789AB.....C.....D.....E.....F.....
  1.1646 +  + "PQRSTUVWXYZ\u00c4\u00d6\u00d1\u00dc\u00a7"
  1.1647 +  // 0.....123456789ABCDEF
  1.1648 +  + "\u00bfabcdefghijklmno"
  1.1649 +  // 0123456789AB.....C.....D.....E.....F.....
  1.1650 +  + "pqrstuvwxyz\u00e4\u00f6\u00f1\u00fc\u00e0",
  1.1651 +
  1.1652 +  /**
  1.1653 +   * National Language Identifier: 0x01
  1.1654 +   * A.3.1 Turkish National Language Locking Shift Table
  1.1655 +   */
  1.1656 +  // 01.....23.....4.....5.....6.....7.....8.....9.....A.B.....C.....D.E.....F.....
  1.1657 +    "@\u00a3$\u00a5\u20ac\u00e9\u00f9\u0131\u00f2\u00c7\n\u011e\u011f\r\u00c5\u00e5"
  1.1658 +  // 0.....12.....3.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....E.....F.....
  1.1659 +  + "\u0394_\u03a6\u0393\u039b\u03a9\u03a0\u03a8\u03a3\u0398\u039e\uffff\u015e\u015f\u00df\u00c9"
  1.1660 +  // 012.34.....56789ABCDEF
  1.1661 +  + " !\"#\u00a4%&'()*+,-./"
  1.1662 +  // 0123456789ABCDEF
  1.1663 +  + "0123456789:;<=>?"
  1.1664 +  // 0.....123456789ABCDEF
  1.1665 +  + "\u0130ABCDEFGHIJKLMNO"
  1.1666 +  // 0123456789AB.....C.....D.....E.....F.....
  1.1667 +  + "PQRSTUVWXYZ\u00c4\u00d6\u00d1\u00dc\u00a7"
  1.1668 +  // 0.....123456789ABCDEF
  1.1669 +  + "\u00e7abcdefghijklmno"
  1.1670 +  // 0123456789AB.....C.....D.....E.....F.....
  1.1671 +  + "pqrstuvwxyz\u00e4\u00f6\u00f1\u00fc\u00e0",
  1.1672 +
  1.1673 +  /**
  1.1674 +   * National Language Identifier: 0x02
  1.1675 +   * A.3.2 Void
  1.1676 +   */
  1.1677 +  // 0123456789A.BCD.EF
  1.1678 +    "          \n  \r  "
  1.1679 +  // 0123456789AB.....CDEF
  1.1680 +  + "           \uffff    "
  1.1681 +  // 0123456789ABCDEF
  1.1682 +  + "                "
  1.1683 +  // 0123456789ABCDEF
  1.1684 +  + "                "
  1.1685 +  // 0123456789ABCDEF
  1.1686 +  + "                "
  1.1687 +  // 0123456789ABCDEF
  1.1688 +  + "                "
  1.1689 +  // 0123456789ABCDEF
  1.1690 +  + "                "
  1.1691 +  // 0123456789ABCDEF
  1.1692 +  + "                ",
  1.1693 +
  1.1694 +  /**
  1.1695 +   * National Language Identifier: 0x03
  1.1696 +   * A.3.3 Portuguese National Language Locking Shift Table
  1.1697 +   */
  1.1698 +  // 01.....23.....4.....5.....6.....7.....8.....9.....A.B.....C.....D.E.....F.....
  1.1699 +    "@\u00a3$\u00a5\u00ea\u00e9\u00fa\u00ed\u00f3\u00e7\n\u00d4\u00f4\r\u00c1\u00e1"
  1.1700 +  // 0.....12.....3.....4.....5.....67.8.....9.....AB.....C.....D.....E.....F.....
  1.1701 +  + "\u0394_\u00aa\u00c7\u00c0\u221e^\\\u20ac\u00d3|\uffff\u00c2\u00e2\u00ca\u00c9"
  1.1702 +  // 012.34.....56789ABCDEF
  1.1703 +  + " !\"#\u00ba%&'()*+,-./"
  1.1704 +  // 0123456789ABCDEF
  1.1705 +  + "0123456789:;<=>?"
  1.1706 +  // 0.....123456789ABCDEF
  1.1707 +  + "\u00cdABCDEFGHIJKLMNO"
  1.1708 +  // 0123456789AB.....C.....D.....E.....F.....
  1.1709 +  + "PQRSTUVWXYZ\u00c3\u00d5\u00da\u00dc\u00a7"
  1.1710 +  // 0123456789ABCDEF
  1.1711 +  + "~abcdefghijklmno"
  1.1712 +  // 0123456789AB.....C.....DE.....F.....
  1.1713 +  + "pqrstuvwxyz\u00e3\u00f5`\u00fc\u00e0",
  1.1714 +
  1.1715 +  /**
  1.1716 +   * National Language Identifier: 0x04
  1.1717 +   * A.3.4 Bengali National Language Locking Shift Table
  1.1718 +   */
  1.1719 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9.....A.B.....CD.EF.....
  1.1720 +    "\u0981\u0982\u0983\u0985\u0986\u0987\u0988\u0989\u098a\u098b\n\u098c \r \u098f"
  1.1721 +  // 0.....123.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....E.....F.....
  1.1722 +  + "\u0990  \u0993\u0994\u0995\u0996\u0997\u0998\u0999\u099a\uffff\u099b\u099c\u099d\u099e"
  1.1723 +  // 012.....3.....4.....5.....6.....7.....89A.....B.....CD.....EF.....
  1.1724 +  + " !\u099f\u09a0\u09a1\u09a2\u09a3\u09a4)(\u09a5\u09a6,\u09a7.\u09a8"
  1.1725 +  // 0123456789ABCD.....E.....F
  1.1726 +  + "0123456789:; \u09aa\u09ab?"
  1.1727 +  // 0.....1.....2.....3.....4.....56.....789A.....B.....C.....D.....E.....F.....
  1.1728 +  + "\u09ac\u09ad\u09ae\u09af\u09b0 \u09b2   \u09b6\u09b7\u09b8\u09b9\u09bc\u09bd"
  1.1729 +  // 0.....1.....2.....3.....4.....5.....6.....789.....A.....BCD.....E.....F.....
  1.1730 +  + "\u09be\u09bf\u09c0\u09c1\u09c2\u09c3\u09c4  \u09c7\u09c8  \u09cb\u09cc\u09cd"
  1.1731 +  // 0.....123456789ABCDEF
  1.1732 +  + "\u09ceabcdefghijklmno"
  1.1733 +  // 0123456789AB.....C.....D.....E.....F.....
  1.1734 +  + "pqrstuvwxyz\u09d7\u09dc\u09dd\u09f0\u09f1",
  1.1735 +
  1.1736 +  /**
  1.1737 +   * National Language Identifier: 0x05
  1.1738 +   * A.3.5 Gujarati National Language Locking Shift Table
  1.1739 +   */
  1.1740 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9.....A.B.....C.....D.EF.....
  1.1741 +    "\u0a81\u0a82\u0a83\u0a85\u0a86\u0a87\u0a88\u0a89\u0a8a\u0a8b\n\u0a8c\u0a8d\r \u0a8f"
  1.1742 +  // 0.....1.....23.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....E.....F.....
  1.1743 +  + "\u0a90\u0a91 \u0a93\u0a94\u0a95\u0a96\u0a97\u0a98\u0a99\u0a9a\uffff\u0a9b\u0a9c\u0a9d\u0a9e"
  1.1744 +  // 012.....3.....4.....5.....6.....7.....89A.....B.....CD.....EF.....
  1.1745 +  + " !\u0a9f\u0aa0\u0aa1\u0aa2\u0aa3\u0aa4)(\u0aa5\u0aa6,\u0aa7.\u0aa8"
  1.1746 +  // 0123456789ABCD.....E.....F
  1.1747 +  + "0123456789:; \u0aaa\u0aab?"
  1.1748 +  // 0.....1.....2.....3.....4.....56.....7.....89.....A.....B.....C.....D.....E.....F.....
  1.1749 +  + "\u0aac\u0aad\u0aae\u0aaf\u0ab0 \u0ab2\u0ab3 \u0ab5\u0ab6\u0ab7\u0ab8\u0ab9\u0abc\u0abd"
  1.1750 +  // 0.....1.....2.....3.....4.....5.....6.....7.....89.....A.....B.....CD.....E.....F.....
  1.1751 +  + "\u0abe\u0abf\u0ac0\u0ac1\u0ac2\u0ac3\u0ac4\u0ac5 \u0ac7\u0ac8\u0ac9 \u0acb\u0acc\u0acd"
  1.1752 +  // 0.....123456789ABCDEF
  1.1753 +  + "\u0ad0abcdefghijklmno"
  1.1754 +  // 0123456789AB.....C.....D.....E.....F.....
  1.1755 +  + "pqrstuvwxyz\u0ae0\u0ae1\u0ae2\u0ae3\u0af1",
  1.1756 +
  1.1757 +  /**
  1.1758 +   * National Language Identifier: 0x06
  1.1759 +   * A.3.6 Hindi National Language Locking Shift Table
  1.1760 +   */
  1.1761 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9.....A.B.....C.....D.E.....F.....
  1.1762 +    "\u0901\u0902\u0903\u0905\u0906\u0907\u0908\u0909\u090a\u090b\n\u090c\u090d\r\u090e\u090f"
  1.1763 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....E.....F.....
  1.1764 +  + "\u0910\u0911\u0912\u0913\u0914\u0915\u0916\u0917\u0918\u0919\u091a\uffff\u091b\u091c\u091d\u091e"
  1.1765 +  // 012.....3.....4.....5.....6.....7.....89A.....B.....CD.....EF.....
  1.1766 +  + " !\u091f\u0920\u0921\u0922\u0923\u0924)(\u0925\u0926,\u0927.\u0928"
  1.1767 +  // 0123456789ABC.....D.....E.....F
  1.1768 +  + "0123456789:;\u0929\u092a\u092b?"
  1.1769 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....E.....F.....
  1.1770 +  + "\u092c\u092d\u092e\u092f\u0930\u0931\u0932\u0933\u0934\u0935\u0936\u0937\u0938\u0939\u093c\u093d"
  1.1771 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....E.....F.....
  1.1772 +  + "\u093e\u093f\u0940\u0941\u0942\u0943\u0944\u0945\u0946\u0947\u0948\u0949\u094a\u094b\u094c\u094d"
  1.1773 +  // 0.....123456789ABCDEF
  1.1774 +  + "\u0950abcdefghijklmno"
  1.1775 +  // 0123456789AB.....C.....D.....E.....F.....
  1.1776 +  + "pqrstuvwxyz\u0972\u097b\u097c\u097e\u097f",
  1.1777 +
  1.1778 +  /**
  1.1779 +   * National Language Identifier: 0x07
  1.1780 +   * A.3.7 Kannada National Language Locking Shift Table
  1.1781 +   */
  1.1782 +  // 01.....2.....3.....4.....5.....6.....7.....8.....9.....A.B.....CD.E.....F.....
  1.1783 +    " \u0c82\u0c83\u0c85\u0c86\u0c87\u0c88\u0c89\u0c8a\u0c8b\n\u0c8c \r\u0c8e\u0c8f"
  1.1784 +  // 0.....12.....3.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....E.....F.....
  1.1785 +  + "\u0c90 \u0c92\u0c93\u0c94\u0c95\u0c96\u0c97\u0c98\u0c99\u0c9a\uffff\u0c9b\u0c9c\u0c9d\u0c9e"
  1.1786 +  // 012.....3.....4.....5.....6.....7.....89A.....B.....CD.....EF.....
  1.1787 +  + " !\u0c9f\u0ca0\u0ca1\u0ca2\u0ca3\u0ca4)(\u0ca5\u0ca6,\u0ca7.\u0ca8"
  1.1788 +  // 0123456789ABCD.....E.....F
  1.1789 +  + "0123456789:; \u0caa\u0cab?"
  1.1790 +  // 0.....1.....2.....3.....4.....5.....6.....7.....89.....A.....B.....C.....D.....E.....F.....
  1.1791 +  + "\u0cac\u0cad\u0cae\u0caf\u0cb0\u0cb1\u0cb2\u0cb3 \u0cb5\u0cb6\u0cb7\u0cb8\u0cb9\u0cbc\u0cbd"
  1.1792 +  // 0.....1.....2.....3.....4.....5.....6.....78.....9.....A.....BC.....D.....E.....F.....
  1.1793 +  + "\u0cbe\u0cbf\u0cc0\u0cc1\u0cc2\u0cc3\u0cc4 \u0cc6\u0cc7\u0cc8 \u0cca\u0ccb\u0ccc\u0ccd"
  1.1794 +  // 0.....123456789ABCDEF
  1.1795 +  + "\u0cd5abcdefghijklmno"
  1.1796 +  // 0123456789AB.....C.....D.....E.....F.....
  1.1797 +  + "pqrstuvwxyz\u0cd6\u0ce0\u0ce1\u0ce2\u0ce3",
  1.1798 +
  1.1799 +  /**
  1.1800 +   * National Language Identifier: 0x08
  1.1801 +   * A.3.8 Malayalam National Language Locking Shift Table
  1.1802 +   */
  1.1803 +  // 01.....2.....3.....4.....5.....6.....7.....8.....9.....A.B.....CD.E.....F.....
  1.1804 +    " \u0d02\u0d03\u0d05\u0d06\u0d07\u0d08\u0d09\u0d0a\u0d0b\n\u0d0c \r\u0d0e\u0d0f"
  1.1805 +  // 0.....12.....3.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....E.....F.....
  1.1806 +  + "\u0d10 \u0d12\u0d13\u0d14\u0d15\u0d16\u0d17\u0d18\u0d19\u0d1a\uffff\u0d1b\u0d1c\u0d1d\u0d1e"
  1.1807 +  // 012.....3.....4.....5.....6.....7.....89A.....B.....CD.....EF.....
  1.1808 +  + " !\u0d1f\u0d20\u0d21\u0d22\u0d23\u0d24)(\u0d25\u0d26,\u0d27.\u0d28"
  1.1809 +  // 0123456789ABCD.....E.....F
  1.1810 +  + "0123456789:; \u0d2a\u0d2b?"
  1.1811 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....EF.....
  1.1812 +  + "\u0d2c\u0d2d\u0d2e\u0d2f\u0d30\u0d31\u0d32\u0d33\u0d34\u0d35\u0d36\u0d37\u0d38\u0d39 \u0d3d"
  1.1813 +  // 0.....1.....2.....3.....4.....5.....6.....78.....9.....A.....BC.....D.....E.....F.....
  1.1814 +  + "\u0d3e\u0d3f\u0d40\u0d41\u0d42\u0d43\u0d44 \u0d46\u0d47\u0d48 \u0d4a\u0d4b\u0d4c\u0d4d"
  1.1815 +  // 0.....123456789ABCDEF
  1.1816 +  + "\u0d57abcdefghijklmno"
  1.1817 +  // 0123456789AB.....C.....D.....E.....F.....
  1.1818 +  + "pqrstuvwxyz\u0d60\u0d61\u0d62\u0d63\u0d79",
  1.1819 +
  1.1820 +  /**
  1.1821 +   * National Language Identifier: 0x09
  1.1822 +   * A.3.9 Oriya National Language Locking Shift Table
  1.1823 +   */
  1.1824 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9.....A.B.....CD.EF.....
  1.1825 +    "\u0b01\u0b02\u0b03\u0b05\u0b06\u0b07\u0b08\u0b09\u0b0a\u0b0b\n\u0b0c \r \u0b0f"
  1.1826 +  // 0.....123.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....E.....F.....
  1.1827 +  + "\u0b10  \u0b13\u0b14\u0b15\u0b16\u0b17\u0b18\u0b19\u0b1a\uffff\u0b1b\u0b1c\u0b1d\u0b1e"
  1.1828 +  // 012.....3.....4.....5.....6.....7.....89A.....B.....CD.....EF.....
  1.1829 +  + " !\u0b1f\u0b20\u0b21\u0b22\u0b23\u0b24)(\u0b25\u0b26,\u0b27.\u0b28"
  1.1830 +  // 0123456789ABCD.....E.....F
  1.1831 +  + "0123456789:; \u0b2a\u0b2b?"
  1.1832 +  // 0.....1.....2.....3.....4.....56.....7.....89.....A.....B.....C.....D.....E.....F.....
  1.1833 +  + "\u0b2c\u0b2d\u0b2e\u0b2f\u0b30 \u0b32\u0b33 \u0b35\u0b36\u0b37\u0b38\u0b39\u0b3c\u0b3d"
  1.1834 +  // 0.....1.....2.....3.....4.....5.....6.....789.....A.....BCD.....E.....F.....
  1.1835 +  + "\u0b3e\u0b3f\u0b40\u0b41\u0b42\u0b43\u0b44  \u0b47\u0b48  \u0b4b\u0b4c\u0b4d"
  1.1836 +  // 0.....123456789ABCDEF
  1.1837 +  + "\u0b56abcdefghijklmno"
  1.1838 +  // 0123456789AB.....C.....D.....E.....F.....
  1.1839 +  + "pqrstuvwxyz\u0b57\u0b60\u0b61\u0b62\u0b63",
  1.1840 +
  1.1841 +  /**
  1.1842 +   * National Language Identifier: 0x0A
  1.1843 +   * A.3.10 Punjabi National Language Locking Shift Table
  1.1844 +   */
  1.1845 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9A.BCD.EF.....
  1.1846 +    "\u0a01\u0a02\u0a03\u0a05\u0a06\u0a07\u0a08\u0a09\u0a0a \n  \r \u0a0f"
  1.1847 +  // 0.....123.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....E.....F.....
  1.1848 +  + "\u0a10  \u0a13\u0a14\u0a15\u0a16\u0a17\u0a18\u0a19\u0a1a\uffff\u0a1b\u0a1c\u0a1d\u0a1e"
  1.1849 +  // 012.....3.....4.....5.....6.....7.....89A.....B.....CD.....EF.....
  1.1850 +  + " !\u0a1f\u0a20\u0a21\u0a22\u0a23\u0a24)(\u0a25\u0a26,\u0a27.\u0a28"
  1.1851 +  // 0123456789ABCD.....E.....F
  1.1852 +  + "0123456789:; \u0a2a\u0a2b?"
  1.1853 +  // 0.....1.....2.....3.....4.....56.....7.....89.....A.....BC.....D.....E.....F
  1.1854 +  + "\u0a2c\u0a2d\u0a2e\u0a2f\u0a30 \u0a32\u0a33 \u0a35\u0a36 \u0a38\u0a39\u0a3c "
  1.1855 +  // 0.....1.....2.....3.....4.....56789.....A.....BCD.....E.....F.....
  1.1856 +  + "\u0a3e\u0a3f\u0a40\u0a41\u0a42    \u0a47\u0a48  \u0a4b\u0a4c\u0a4d"
  1.1857 +  // 0.....123456789ABCDEF
  1.1858 +  + "\u0a51abcdefghijklmno"
  1.1859 +  // 0123456789AB.....C.....D.....E.....F.....
  1.1860 +  + "pqrstuvwxyz\u0a70\u0a71\u0a72\u0a73\u0a74",
  1.1861 +
  1.1862 +  /**
  1.1863 +   * National Language Identifier: 0x0B
  1.1864 +   * A.3.11 Tamil National Language Locking Shift Table
  1.1865 +   */
  1.1866 +  // 01.....2.....3.....4.....5.....6.....7.....8.....9A.BCD.E.....F.....
  1.1867 +    " \u0b82\u0b83\u0b85\u0b86\u0b87\u0b88\u0b89\u0b8a \n  \r\u0b8e\u0b8f"
  1.1868 +  // 0.....12.....3.....4.....5.....6789.....A.....B.....CD.....EF.....
  1.1869 +  + "\u0b90 \u0b92\u0b93\u0b94\u0b95   \u0b99\u0b9a\uffff \u0b9c \u0b9e"
  1.1870 +  // 012.....3456.....7.....89ABCDEF.....
  1.1871 +  + " !\u0b9f   \u0ba3\u0ba4)(  , .\u0ba8"
  1.1872 +  // 0123456789ABC.....D.....EF
  1.1873 +  + "0123456789:;\u0ba9\u0baa ?"
  1.1874 +  // 012.....3.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....EF
  1.1875 +  + "  \u0bae\u0baf\u0bb0\u0bb1\u0bb2\u0bb3\u0bb4\u0bb5\u0bb6\u0bb7\u0bb8\u0bb9  "
  1.1876 +  // 0.....1.....2.....3.....4.....5678.....9.....A.....BC.....D.....E.....F.....
  1.1877 +  + "\u0bbe\u0bbf\u0bc0\u0bc1\u0bc2   \u0bc6\u0bc7\u0bc8 \u0bca\u0bcb\u0bcc\u0bcd"
  1.1878 +  // 0.....123456789ABCDEF
  1.1879 +  + "\u0bd0abcdefghijklmno"
  1.1880 +  // 0123456789AB.....C.....D.....E.....F.....
  1.1881 +  + "pqrstuvwxyz\u0bd7\u0bf0\u0bf1\u0bf2\u0bf9",
  1.1882 +
  1.1883 +  /**
  1.1884 +   * National Language Identifier: 0x0C
  1.1885 +   * A.3.12 Telugu National Language Locking Shift Table
  1.1886 +   */
  1.1887 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9.....A.B.....CD.E.....F.....
  1.1888 +    "\u0c01\u0c02\u0c03\u0c05\u0c06\u0c07\u0c08\u0c09\u0c0a\u0c0b\n\u0c0c \r\u0c0e\u0c0f"
  1.1889 +  // 0.....12.....3.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....E.....F.....
  1.1890 +  + "\u0c10 \u0c12\u0c13\u0c14\u0c15\u0c16\u0c17\u0c18\u0c19\u0c1a\uffff\u0c1b\u0c1c\u0c1d\u0c1e"
  1.1891 +  // 012.....3.....4.....5.....6.....7.....89A.....B.....CD.....EF.....
  1.1892 +  + " !\u0c1f\u0c20\u0c21\u0c22\u0c23\u0c24)(\u0c25\u0c26,\u0c27.\u0c28"
  1.1893 +  // 0123456789ABCD.....E.....F
  1.1894 +  + "0123456789:; \u0c2a\u0c2b?"
  1.1895 +  // 0.....1.....2.....3.....4.....5.....6.....7.....89.....A.....B.....C.....D.....EF.....
  1.1896 +  + "\u0c2c\u0c2d\u0c2e\u0c2f\u0c30\u0c31\u0c32\u0c33 \u0c35\u0c36\u0c37\u0c38\u0c39 \u0c3d"
  1.1897 +  // 0.....1.....2.....3.....4.....5.....6.....78.....9.....A.....BC.....D.....E.....F.....
  1.1898 +  + "\u0c3e\u0c3f\u0c40\u0c41\u0c42\u0c43\u0c44 \u0c46\u0c47\u0c48 \u0c4a\u0c4b\u0c4c\u0c4d"
  1.1899 +  // 0.....123456789ABCDEF
  1.1900 +  + "\u0c55abcdefghijklmno"
  1.1901 +  // 0123456789AB.....C.....D.....E.....F.....
  1.1902 +  + "pqrstuvwxyz\u0c56\u0c60\u0c61\u0c62\u0c63",
  1.1903 +
  1.1904 +  /**
  1.1905 +   * National Language Identifier: 0x0D
  1.1906 +   * A.3.13 Urdu National Language Locking Shift Table
  1.1907 +   */
  1.1908 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9.....A.B.....C.....D.E.....F.....
  1.1909 +    "\u0627\u0622\u0628\u067b\u0680\u067e\u06a6\u062a\u06c2\u067f\n\u0679\u067d\r\u067a\u067c"
  1.1910 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....E.....F.....
  1.1911 +  + "\u062b\u062c\u0681\u0684\u0683\u0685\u0686\u0687\u062d\u062e\u062f\uffff\u068c\u0688\u0689\u068a"
  1.1912 +  // 012.....3.....4.....5.....6.....7.....89A.....B.....CD.....EF.....
  1.1913 +  + " !\u068f\u068d\u0630\u0631\u0691\u0693)(\u0699\u0632,\u0696.\u0698"
  1.1914 +  // 0123456789ABC.....D.....E.....F
  1.1915 +  + "0123456789:;\u069a\u0633\u0634?"
  1.1916 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....E.....F.....
  1.1917 +  + "\u0635\u0636\u0637\u0638\u0639\u0641\u0642\u06a9\u06aa\u06ab\u06af\u06b3\u06b1\u0644\u0645\u0646"
  1.1918 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9.....A.....B.....C.....D.....E.....F.....
  1.1919 +  + "\u06ba\u06bb\u06bc\u0648\u06c4\u06d5\u06c1\u06be\u0621\u06cc\u06d0\u06d2\u064d\u0650\u064f\u0657"
  1.1920 +  // 0.....123456789ABCDEF
  1.1921 +  + "\u0654abcdefghijklmno"
  1.1922 +  // 0123456789AB.....C.....D.....E.....F.....
  1.1923 +  + "pqrstuvwxyz\u0655\u0651\u0653\u0656\u0670"
  1.1924 +];
  1.1925 +
  1.1926 +// National Language Single Shift Tables, see 3GPP TS 23.038
  1.1927 +this.PDU_NL_SINGLE_SHIFT_TABLES = [
  1.1928 +  /**
  1.1929 +   * National Language Identifier: 0x00
  1.1930 +   * 6.2.1.1 GSM 7 bit default alphabet extension table
  1.1931 +   */
  1.1932 +  // 0123456789A.....BCD.....EF
  1.1933 +    "          \u000c  \ufffe  "
  1.1934 +  // 0123456789AB.....CDEF
  1.1935 +  + "    ^      \uffff    "
  1.1936 +  // 0123456789ABCDEF.
  1.1937 +  + "        {}     \\"
  1.1938 +  // 0123456789ABCDEF
  1.1939 +  + "            [~] "
  1.1940 +  // 0123456789ABCDEF
  1.1941 +  + "|               "
  1.1942 +  // 0123456789ABCDEF
  1.1943 +  + "                "
  1.1944 +  // 012345.....6789ABCDEF
  1.1945 +  + "     \u20ac          "
  1.1946 +  // 0123456789ABCDEF
  1.1947 +  + "                ",
  1.1948 +
  1.1949 +  /**
  1.1950 +   * National Language Identifier: 0x01
  1.1951 +   * A.2.1 Turkish National Language Single Shift Table
  1.1952 +   */
  1.1953 +  // 0123456789A.....BCD.....EF
  1.1954 +    "          \u000c  \ufffe  "
  1.1955 +  // 0123456789AB.....CDEF
  1.1956 +  + "    ^      \uffff    "
  1.1957 +  // 0123456789ABCDEF.
  1.1958 +  + "        {}     \\"
  1.1959 +  // 0123456789ABCDEF
  1.1960 +  + "            [~] "
  1.1961 +  // 01234567.....89.....ABCDEF
  1.1962 +  + "|      \u011e \u0130      "
  1.1963 +  // 0123.....456789ABCDEF
  1.1964 +  + "   \u015e            "
  1.1965 +  // 0123.....45.....67.....89.....ABCDEF
  1.1966 +  + "   \u00e7 \u20ac \u011f \u0131      "
  1.1967 +  // 0123.....456789ABCDEF
  1.1968 +  + "   \u015f            ",
  1.1969 +
  1.1970 +  /**
  1.1971 +   * National Language Identifier: 0x02
  1.1972 +   * A.2.2 Spanish National Language Single Shift Table
  1.1973 +   */
  1.1974 +  // 0123456789.....A.....BCD.....EF
  1.1975 +    "         \u00e7\u000c  \ufffe  "
  1.1976 +  // 0123456789AB.....CDEF
  1.1977 +  + "    ^      \uffff    "
  1.1978 +  // 0123456789ABCDEF.
  1.1979 +  + "        {}     \\"
  1.1980 +  // 0123456789ABCDEF
  1.1981 +  + "            [~] "
  1.1982 +  // 01.....23456789.....ABCDEF.....
  1.1983 +  + "|\u00c1       \u00cd     \u00d3"
  1.1984 +  // 012345.....6789ABCDEF
  1.1985 +  + "     \u00da          "
  1.1986 +  // 01.....2345.....6789.....ABCDEF.....
  1.1987 +  + " \u00e1   \u20ac   \u00ed     \u00f3"
  1.1988 +  // 012345.....6789ABCDEF
  1.1989 +  + "     \u00fa          ",
  1.1990 +
  1.1991 +  /**
  1.1992 +   * National Language Identifier: 0x03
  1.1993 +   * A.2.3 Portuguese National Language Single Shift Table
  1.1994 +   */
  1.1995 +  // 012345.....6789.....A.....B.....C.....D.....E.....F.....
  1.1996 +    "     \u00ea   \u00e7\u000c\u00d4\u00f4\ufffe\u00c1\u00e1"
  1.1997 +  // 012.....3.....45.....6.....7.....8.....9.....AB.....CDEF.....
  1.1998 +  + "  \u03a6\u0393^\u03a9\u03a0\u03a8\u03a3\u0398 \uffff   \u00ca"
  1.1999 +  // 0123456789ABCDEF.
  1.2000 +  + "        {}     \\"
  1.2001 +  // 0123456789ABCDEF
  1.2002 +  + "            [~] "
  1.2003 +  // 01.....23456789.....ABCDEF.....
  1.2004 +  + "|\u00c0       \u00cd     \u00d3"
  1.2005 +  // 012345.....6789AB.....C.....DEF
  1.2006 +  + "     \u00da     \u00c3\u00d5   "
  1.2007 +  // 01.....2345.....6789.....ABCDEF.....
  1.2008 +  + " \u00c2   \u20ac   \u00ed     \u00f3"
  1.2009 +  // 012345.....6789AB.....C.....DEF.....
  1.2010 +  + "     \u00fa     \u00e3\u00f5  \u00e2",
  1.2011 +
  1.2012 +  /**
  1.2013 +   * National Language Identifier: 0x04
  1.2014 +   * A.2.4 Bengali National Language Single Shift Table
  1.2015 +   */
  1.2016 +  // 01.....23.....4.....5.6.....789A.....BCD.....EF
  1.2017 +    "@\u00a3$\u00a5\u00bf\"\u00a4%&'\u000c*+\ufffe-/"
  1.2018 +  // 0123.....45.....6789.....A.....B.....C.....D.....E.....F.....
  1.2019 +  + "<=>\u00a1^\u00a1_#*\u09e6\u09e7\uffff\u09e8\u09e9\u09ea\u09eb"
  1.2020 +  // 0.....1.....2.....3.....4.....5.....6.....7.....89A.....B.....C.....D.....E.....F.
  1.2021 +  + "\u09ec\u09ed\u09ee\u09ef\u09df\u09e0\u09e1\u09e2{}\u09e3\u09f2\u09f3\u09f4\u09f5\\"
  1.2022 +  // 0.....1.....2.....3.....4.....56789ABCDEF
  1.2023 +  + "\u09f6\u09f7\u09f8\u09f9\u09fa       [~] "
  1.2024 +  // 0123456789ABCDEF
  1.2025 +  + "|ABCDEFGHIJKLMNO"
  1.2026 +  // 0123456789ABCDEF
  1.2027 +  + "PQRSTUVWXYZ     "
  1.2028 +  // 012345.....6789ABCDEF
  1.2029 +  + "     \u20ac          "
  1.2030 +  // 0123456789ABCDEF
  1.2031 +  + "                ",
  1.2032 +
  1.2033 +  /**
  1.2034 +   * National Language Identifier: 0x05
  1.2035 +   * A.2.5 Gujarati National Language Single Shift Table
  1.2036 +   */
  1.2037 +  // 01.....23.....4.....5.6.....789A.....BCD.....EF
  1.2038 +    "@\u00a3$\u00a5\u00bf\"\u00a4%&'\u000c*+\ufffe-/"
  1.2039 +  // 0123.....45.....6789.....A.....B.....C.....D.....E.....F.....
  1.2040 +  + "<=>\u00a1^\u00a1_#*\u0964\u0965\uffff\u0ae6\u0ae7\u0ae8\u0ae9"
  1.2041 +  // 0.....1.....2.....3.....4.....5.....6789ABCDEF.
  1.2042 +  + "\u0aea\u0aeb\u0aec\u0aed\u0aee\u0aef  {}     \\"
  1.2043 +  // 0123456789ABCDEF
  1.2044 +  + "            [~] "
  1.2045 +  // 0123456789ABCDEF
  1.2046 +  + "|ABCDEFGHIJKLMNO"
  1.2047 +  // 0123456789ABCDEF
  1.2048 +  + "PQRSTUVWXYZ     "
  1.2049 +  // 012345.....6789ABCDEF
  1.2050 +  + "     \u20ac          "
  1.2051 +  // 0123456789ABCDEF
  1.2052 +  + "                ",
  1.2053 +
  1.2054 +  /**
  1.2055 +   * National Language Identifier: 0x06
  1.2056 +   * A.2.6 Hindi National Language Single Shift Table
  1.2057 +   */
  1.2058 +  // 01.....23.....4.....5.6.....789A.....BCD.....EF
  1.2059 +    "@\u00a3$\u00a5\u00bf\"\u00a4%&'\u000c*+\ufffe-/"
  1.2060 +  // 0123.....45.....6789.....A.....B.....C.....D.....E.....F.....
  1.2061 +  + "<=>\u00a1^\u00a1_#*\u0964\u0965\uffff\u0966\u0967\u0968\u0969"
  1.2062 +  // 0.....1.....2.....3.....4.....5.....6.....7.....89A.....B.....C.....D.....E.....F.
  1.2063 +  + "\u096a\u096b\u096c\u096d\u096e\u096f\u0951\u0952{}\u0953\u0954\u0958\u0959\u095a\\"
  1.2064 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9.....A.....BCDEF
  1.2065 +  + "\u095b\u095c\u095d\u095e\u095f\u0960\u0961\u0962\u0963\u0970\u0971 [~] "
  1.2066 +  // 0123456789ABCDEF
  1.2067 +  + "|ABCDEFGHIJKLMNO"
  1.2068 +  // 0123456789ABCDEF
  1.2069 +  + "PQRSTUVWXYZ     "
  1.2070 +  // 012345.....6789ABCDEF
  1.2071 +  + "     \u20ac          "
  1.2072 +  // 0123456789ABCDEF
  1.2073 +  + "                ",
  1.2074 +
  1.2075 +  /**
  1.2076 +   * National Language Identifier: 0x07
  1.2077 +   * A.2.7 Kannada National Language Single Shift Table
  1.2078 +   */
  1.2079 +  // 01.....23.....4.....5.6.....789A.....BCD.....EF
  1.2080 +    "@\u00a3$\u00a5\u00bf\"\u00a4%&'\u000c*+\ufffe-/"
  1.2081 +  // 0123.....45.....6789.....A.....B.....C.....D.....E.....F.....
  1.2082 +  + "<=>\u00a1^\u00a1_#*\u0964\u0965\uffff\u0ce6\u0ce7\u0ce8\u0ce9"
  1.2083 +  // 0.....1.....2.....3.....4.....5.....6.....7.....89A.....BCDEF.
  1.2084 +  + "\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef\u0cde\u0cf1{}\u0cf2    \\"
  1.2085 +  // 0123456789ABCDEF
  1.2086 +  + "            [~] "
  1.2087 +  // 0123456789ABCDEF
  1.2088 +  + "|ABCDEFGHIJKLMNO"
  1.2089 +  // 0123456789ABCDEF
  1.2090 +  + "PQRSTUVWXYZ     "
  1.2091 +  // 012345.....6789ABCDEF
  1.2092 +  + "     \u20ac          "
  1.2093 +  // 0123456789ABCDEF
  1.2094 +  + "                ",
  1.2095 +
  1.2096 +  /**
  1.2097 +   * National Language Identifier: 0x08
  1.2098 +   * A.2.8 Malayalam National Language Single Shift Table
  1.2099 +   */
  1.2100 +  // 01.....23.....4.....5.6.....789A.....BCD.....EF
  1.2101 +    "@\u00a3$\u00a5\u00bf\"\u00a4%&'\u000c*+\ufffe-/"
  1.2102 +  // 0123.....45.....6789.....A.....B.....C.....D.....E.....F.....
  1.2103 +  + "<=>\u00a1^\u00a1_#*\u0964\u0965\uffff\u0d66\u0d67\u0d68\u0d69"
  1.2104 +  // 0.....1.....2.....3.....4.....5.....6.....7.....89A.....B.....C.....D.....E.....F.
  1.2105 +  + "\u0d6a\u0d6b\u0d6c\u0d6d\u0d6e\u0d6f\u0d70\u0d71{}\u0d72\u0d73\u0d74\u0d75\u0d7a\\"
  1.2106 +  // 0.....1.....2.....3.....4.....56789ABCDEF
  1.2107 +  + "\u0d7b\u0d7c\u0d7d\u0d7e\u0d7f       [~] "
  1.2108 +  // 0123456789ABCDEF
  1.2109 +  + "|ABCDEFGHIJKLMNO"
  1.2110 +  // 0123456789ABCDEF
  1.2111 +  + "PQRSTUVWXYZ     "
  1.2112 +  // 012345.....6789ABCDEF
  1.2113 +  + "     \u20ac          "
  1.2114 +  // 0123456789ABCDEF
  1.2115 +  + "                ",
  1.2116 +
  1.2117 +  /**
  1.2118 +   * National Language Identifier: 0x09
  1.2119 +   * A.2.9 Oriya National Language Single Shift Table
  1.2120 +   */
  1.2121 +  // 01.....23.....4.....5.6.....789A.....BCD.....EF
  1.2122 +    "@\u00a3$\u00a5\u00bf\"\u00a4%&'\u000c*+\ufffe-/"
  1.2123 +  // 0123.....45.....6789.....A.....B.....C.....D.....E.....F.....
  1.2124 +  + "<=>\u00a1^\u00a1_#*\u0964\u0965\uffff\u0b66\u0b67\u0b68\u0b69"
  1.2125 +  // 0.....1.....2.....3.....4.....5.....6.....7.....89A.....B.....C.....DEF.
  1.2126 +  + "\u0b6a\u0b6b\u0b6c\u0b6d\u0b6e\u0b6f\u0b5c\u0b5d{}\u0b5f\u0b70\u0b71  \\"
  1.2127 +  // 0123456789ABCDEF
  1.2128 +  + "            [~] "
  1.2129 +  // 0123456789ABCDEF
  1.2130 +  + "|ABCDEFGHIJKLMNO"
  1.2131 +  // 0123456789ABCDEF
  1.2132 +  + "PQRSTUVWXYZ     "
  1.2133 +  // 012345.....6789ABCDEF
  1.2134 +  + "     \u20ac          "
  1.2135 +  // 0123456789ABCDEF
  1.2136 +  + "                ",
  1.2137 +
  1.2138 +  /**
  1.2139 +   * National Language Identifier: 0x0A
  1.2140 +   * A.2.10 Punjabi National Language Single Shift Table
  1.2141 +   */
  1.2142 +  // 01.....23.....4.....5.6.....789A.....BCD.....EF
  1.2143 +    "@\u00a3$\u00a5\u00bf\"\u00a4%&'\u000c*+\ufffe-/"
  1.2144 +  // 0123.....45.....6789.....A.....B.....C.....D.....E.....F.....
  1.2145 +  + "<=>\u00a1^\u00a1_#*\u0964\u0965\uffff\u0a66\u0a67\u0a68\u0a69"
  1.2146 +  // 0.....1.....2.....3.....4.....5.....6.....7.....89A.....B.....C.....D.....EF.
  1.2147 +  + "\u0a6a\u0a6b\u0a6c\u0a6d\u0a6e\u0a6f\u0a59\u0a5a{}\u0a5b\u0a5c\u0a5e\u0a75 \\"
  1.2148 +  // 0123456789ABCDEF
  1.2149 +  + "            [~] "
  1.2150 +  // 0123456789ABCDEF
  1.2151 +  + "|ABCDEFGHIJKLMNO"
  1.2152 +  // 0123456789ABCDEF
  1.2153 +  + "PQRSTUVWXYZ     "
  1.2154 +  // 012345.....6789ABCDEF
  1.2155 +  + "     \u20ac          "
  1.2156 +  // 0123456789ABCDEF
  1.2157 +  + "                ",
  1.2158 +
  1.2159 +  /**
  1.2160 +   * National Language Identifier: 0x0B
  1.2161 +   * A.2.11 Tamil National Language Single Shift Table
  1.2162 +   */
  1.2163 +  // 01.....23.....4.....5.6.....789A.....BCD.....EF
  1.2164 +    "@\u00a3$\u00a5\u00bf\"\u00a4%&'\u000c*+\ufffe-/"
  1.2165 +  // 0123.....45.....6789.....A.....B.....C.....D.....E.....F.....
  1.2166 +  + "<=>\u00a1^\u00a1_#*\u0964\u0965\uffff\u0be6\u0be7\u0be8\u0be9"
  1.2167 +  // 0.....1.....2.....3.....4.....5.....6.....7.....89A.....B.....C.....D.....E.....F.
  1.2168 +  + "\u0bea\u0beb\u0bec\u0bed\u0bee\u0bef\u0bf3\u0bf4{}\u0bf5\u0bf6\u0bf7\u0bf8\u0bfa\\"
  1.2169 +  // 0123456789ABCDEF
  1.2170 +  + "            [~] "
  1.2171 +  // 0123456789ABCDEF
  1.2172 +  + "|ABCDEFGHIJKLMNO"
  1.2173 +  // 0123456789ABCDEF
  1.2174 +  + "PQRSTUVWXYZ     "
  1.2175 +  // 012345.....6789ABCDEF
  1.2176 +  + "     \u20ac          "
  1.2177 +  // 0123456789ABCDEF
  1.2178 +  + "                ",
  1.2179 +
  1.2180 +  /**
  1.2181 +   * National Language Identifier: 0x0C
  1.2182 +   * A.2.12 Telugu National Language Single Shift Table
  1.2183 +   */
  1.2184 +  // 01.....23.....4.....5.6.....789A.....BCD.....EF
  1.2185 +    "@\u00a3$\u00a5\u00bf\"\u00a4%&'\u000c*+\ufffe-/"
  1.2186 +  // 0123.....45.....6789AB.....C.....D.....E.....F.....
  1.2187 +  + "<=>\u00a1^\u00a1_#*  \uffff\u0c66\u0c67\u0c68\u0c69"
  1.2188 +  // 0.....1.....2.....3.....4.....5.....6.....7.....89A.....B.....C.....D.....E.....F.
  1.2189 +  + "\u0c6a\u0c6b\u0c6c\u0c6d\u0c6e\u0c6f\u0c58\u0c59{}\u0c78\u0c79\u0c7a\u0c7b\u0c7c\\"
  1.2190 +  // 0.....1.....2.....3456789ABCDEF
  1.2191 +  + "\u0c7d\u0c7e\u0c7f         [~] "
  1.2192 +  // 0123456789ABCDEF
  1.2193 +  + "|ABCDEFGHIJKLMNO"
  1.2194 +  // 0123456789ABCDEF
  1.2195 +  + "PQRSTUVWXYZ     "
  1.2196 +  // 012345.....6789ABCDEF
  1.2197 +  + "     \u20ac          "
  1.2198 +  // 0123456789ABCDEF
  1.2199 +  + "                ",
  1.2200 +
  1.2201 +  /**
  1.2202 +   * National Language Identifier: 0x0D
  1.2203 +   * A.2.13 Urdu National Language Single Shift Table
  1.2204 +   */
  1.2205 +  // 01.....23.....4.....5.6.....789A.....BCD.....EF
  1.2206 +    "@\u00a3$\u00a5\u00bf\"\u00a4%&'\u000c*+\ufffe-/"
  1.2207 +  // 0123.....45.....6789.....A.....B.....C.....D.....E.....F.....
  1.2208 +  + "<=>\u00a1^\u00a1_#*\u0600\u0601\uffff\u06f0\u06f1\u06f2\u06f3"
  1.2209 +  // 0.....1.....2.....3.....4.....5.....6.....7.....89A.....B.....C.....D.....E.....F.
  1.2210 +  + "\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9\u060c\u060d{}\u060e\u060f\u0610\u0611\u0612\\"
  1.2211 +  // 0.....1.....2.....3.....4.....5.....6.....7.....8.....9.....A.....B.....CDEF.....
  1.2212 +  + "\u0613\u0614\u061b\u061f\u0640\u0652\u0658\u066b\u066c\u0672\u0673\u06cd[~]\u06d4"
  1.2213 +  // 0123456789ABCDEF
  1.2214 +  + "|ABCDEFGHIJKLMNO"
  1.2215 +  // 0123456789ABCDEF
  1.2216 +  + "PQRSTUVWXYZ     "
  1.2217 +  // 012345.....6789ABCDEF
  1.2218 +  + "     \u20ac          "
  1.2219 +  // 0123456789ABCDEF
  1.2220 +  + "                "
  1.2221 +];
  1.2222 +
  1.2223 +// Special SMS Message Indication constants
  1.2224 +this.PDU_MWI_STORE_TYPE_BIT     = 0x80;
  1.2225 +this.PDU_MWI_STORE_TYPE_DISCARD = 0x00;
  1.2226 +this.PDU_MWI_STORE_TYPE_STORE   = 0x80;
  1.2227 +
  1.2228 +this.GSM_SMS_STRICT_7BIT_CHARMAP = {
  1.2229 +//"\u0024": "\u0024", // "$" => "$", already in default alphabet
  1.2230 +//"\u00a5": "\u00a5", // "¥" => "¥", already in default alphabet
  1.2231 +  "\u00c0": "\u0041", // "À" => "A"
  1.2232 +  "\u00c1": "\u0041", // "Á" => "A"
  1.2233 +  "\u00c2": "\u0041", // "Â" => "A"
  1.2234 +  "\u00c3": "\u0041", // "Ã" => "A"
  1.2235 +//"\u00c4": "\u00c4", // "Ä" => "Ä", already in default alphabet
  1.2236 +//"\u00c5": "\u00c5", // "Å" => "Å", already in default alphabet
  1.2237 +//"\u00c6": "\u00c6", // "Æ" => "Æ", already in default alphabet
  1.2238 +//"\u00c7": "\u00c7", // "Ç" => "Ç", already in default alphabet
  1.2239 +  "\u00c8": "\u0045", // "È" => "E"
  1.2240 +//"\u00c9": "\u00c9", // "É" => "É", already in default alphabet
  1.2241 +  "\u00ca": "\u0045", // "Ê" => "E"
  1.2242 +  "\u00cb": "\u0045", // "Ë" => "E"
  1.2243 +  "\u00cc": "\u0049", // "Ì" => "I"
  1.2244 +  "\u00cd": "\u0049", // "Í" => "I"
  1.2245 +  "\u00ce": "\u0049", // "Î" => "I"
  1.2246 +  "\u00cf": "\u0049", // "Ï" => "I"
  1.2247 +//"\u00d1": "\u00d1", // "Ñ" => "Ñ", already in default alphabet
  1.2248 +  "\u00d2": "\u004f", // "Ò" => "O"
  1.2249 +  "\u00d3": "\u004f", // "Ó" => "O"
  1.2250 +  "\u00d4": "\u004f", // "Ô" => "O"
  1.2251 +  "\u00d5": "\u004f", // "Õ" => "O"
  1.2252 +//"\u00d6": "\u00d6", // "Ö" => "Ö", already in default alphabet
  1.2253 +  "\u00d9": "\u0055", // "Ù" => "U"
  1.2254 +  "\u00da": "\u0055", // "Ú" => "U"
  1.2255 +  "\u00db": "\u0055", // "Û" => "U"
  1.2256 +//"\u00dc": "\u00dc", // "Ü" => "Ü", already in default alphabet
  1.2257 +//"\u00df": "\u00df", // "ß" => "ß", already in default alphabet
  1.2258 +//"\u00e0": "\u00e0", // "à" => "à", already in default alphabet
  1.2259 +  "\u00e1": "\u0061", // "á" => "a"
  1.2260 +  "\u00e2": "\u0061", // "â" => "a"
  1.2261 +  "\u00e3": "\u0061", // "ã" => "a"
  1.2262 +//"\u00e4": "\u00e4", // "ä" => "ä", already in default alphabet
  1.2263 +//"\u00e5": "\u00e5", // "å" => "å", already in default alphabet
  1.2264 +//"\u00e6": "\u00e6", // "æ" => "æ", already in default alphabet
  1.2265 +  "\u00e7": "\u00c7", // "ç" => "Ç"
  1.2266 +//"\u00e8": "\u00e8", // "è" => "è", already in default alphabet
  1.2267 +//"\u00e9": "\u00e9", // "é" => "é", already in default alphabet
  1.2268 +  "\u00ea": "\u0065", // "ê" => "e"
  1.2269 +  "\u00eb": "\u0065", // "ë" => "e"
  1.2270 +//"\u00ec": "\u00ec", // "ì" => "ì", already in default alphabet
  1.2271 +  "\u00ed": "\u0069", // "í" => "i"
  1.2272 +  "\u00ee": "\u0069", // "î" => "i"
  1.2273 +  "\u00ef": "\u0069", // "ï" => "i"
  1.2274 +//"\u00f1": "\u00f1", // "ñ" => "ñ", already in default alphabet
  1.2275 +//"\u00f2": "\u00f2", // "ò" => "ò", already in default alphabet
  1.2276 +  "\u00f3": "\u006f", // "ó" => "o"
  1.2277 +  "\u00f4": "\u006f", // "ô" => "o"
  1.2278 +  "\u00f5": "\u006f", // "õ" => "o"
  1.2279 +//"\u00f6": "\u00f6", // "ö" => "ö", already in default alphabet
  1.2280 +//"\u00f8": "\u00f8", // "ø" => "ø", already in default alphabet
  1.2281 +//"\u00f9": "\u00f9", // "ù" => "ù", already in default alphabet
  1.2282 +  "\u00fa": "\u0075", // "ú" => "u"
  1.2283 +  "\u00fb": "\u0075", // "û" => "u"
  1.2284 +//"\u00fc": "\u00fc", // "ü" => "ü", already in default alphabet
  1.2285 +  "\u00fe": "\u0074", // "þ" => "t"
  1.2286 +  "\u0100": "\u0041", // "Ā" => "A"
  1.2287 +  "\u0101": "\u0061", // "ā" => "a"
  1.2288 +  "\u0106": "\u0043", // "Ć" => "C"
  1.2289 +  "\u0107": "\u0063", // "ć" => "c"
  1.2290 +  "\u010c": "\u0043", // "Č" => "C"
  1.2291 +  "\u010d": "\u0063", // "č" => "c"
  1.2292 +  "\u010f": "\u0064", // "ď" => "d"
  1.2293 +  "\u0110": "\u0044", // "Đ" => "D"
  1.2294 +  "\u0111": "\u0064", // "đ" => "d"
  1.2295 +  "\u0112": "\u0045", // "Ē" => "E"
  1.2296 +  "\u0113": "\u0065", // "ē" => "e"
  1.2297 +  "\u0118": "\u0045", // "Ę" => "E"
  1.2298 +  "\u0119": "\u0065", // "ę" => "e"
  1.2299 +  "\u0128": "\u0049", // "Ĩ" => "I"
  1.2300 +  "\u0129": "\u0069", // "ĩ" => "i"
  1.2301 +  "\u012a": "\u0049", // "Ī" => "I"
  1.2302 +  "\u012b": "\u0069", // "ī" => "i"
  1.2303 +  "\u012e": "\u0049", // "Į" => "I"
  1.2304 +  "\u012f": "\u0069", // "į" => "i"
  1.2305 +  "\u0141": "\u004c", // "Ł" => "L"
  1.2306 +  "\u0142": "\u006c", // "ł" => "l"
  1.2307 +  "\u0143": "\u004e", // "Ń" => "N"
  1.2308 +  "\u0144": "\u006e", // "ń" => "n"
  1.2309 +  "\u0147": "\u004e", // "Ň" => "N"
  1.2310 +  "\u0148": "\u006e", // "ň" => "n"
  1.2311 +  "\u014c": "\u004f", // "Ō" => "O"
  1.2312 +  "\u014d": "\u006f", // "ō" => "o"
  1.2313 +  "\u0152": "\u004f", // "Œ" => "O"
  1.2314 +  "\u0153": "\u006f", // "œ" => "o"
  1.2315 +  "\u0158": "\u0052", // "Ř" => "R"
  1.2316 +  "\u0159": "\u0072", // "ř" => "r"
  1.2317 +  "\u0160": "\u0053", // "Š" => "S"
  1.2318 +  "\u0161": "\u0073", // "š" => "s"
  1.2319 +  "\u0165": "\u0074", // "ť" => "t"
  1.2320 +  "\u0168": "\u0055", // "Ū" => "U"
  1.2321 +  "\u0169": "\u0075", // "ū" => "u"
  1.2322 +  "\u016a": "\u0055", // "Ū" => "U"
  1.2323 +  "\u016b": "\u0075", // "ū" => "u"
  1.2324 +  "\u0178": "\u0059", // "Ÿ" => "Y"
  1.2325 +  "\u0179": "\u005a", // "Ź" => "Z"
  1.2326 +  "\u017a": "\u007a", // "ź" => "z"
  1.2327 +  "\u017b": "\u005a", // "Ż" => "Z"
  1.2328 +  "\u017c": "\u007a", // "ż" => "z"
  1.2329 +  "\u017d": "\u005a", // "Ž" => "Z"
  1.2330 +  "\u017e": "\u007a", // "ž" => "z"
  1.2331 +  "\u025b": "\u0045", // "ɛ" => "E"
  1.2332 +//"\u0398": "\u0398", // "Θ" => "Θ", already in default alphabet
  1.2333 +  "\u1e7c": "\u0056", // "Ṽ" => "V"
  1.2334 +  "\u1e7d": "\u0076", // "ṽ" => "v"
  1.2335 +  "\u1ebc": "\u0045", // "Ẽ" => "E"
  1.2336 +  "\u1ebd": "\u0065", // "ẽ" => "e"
  1.2337 +  "\u1ef8": "\u0059", // "Ỹ" => "Y"
  1.2338 +  "\u1ef9": "\u0079", // "ỹ" => "y"
  1.2339 +  "\u20a4": "\u00a3", // "₤" => "£"
  1.2340 +//"\u20ac": "\u20ac", // "€" => "€", already in default alphabet
  1.2341 +};
  1.2342 +
  1.2343 +this.RADIOTECH_FAMILY_3GPP = 1;  // GSM, WCDMA, LTE
  1.2344 +this.RADIOTECH_FAMILY_3GPP2 = 2; // CDMA, EVDO
  1.2345 +
  1.2346 +this.DATACALL_RADIOTECHNOLOGY_CDMA = 0;
  1.2347 +this.DATACALL_RADIOTECHNOLOGY_GSM = 1;
  1.2348 +
  1.2349 +this.DATACALL_AUTH_NONE = 0;
  1.2350 +this.DATACALL_AUTH_PAP = 1;
  1.2351 +this.DATACALL_AUTH_CHAP = 2;
  1.2352 +this.DATACALL_AUTH_PAP_OR_CHAP = 3;
  1.2353 +
  1.2354 +this.GECKO_DATACALL_AUTH_NONE = "none";
  1.2355 +this.GECKO_DATACALL_AUTH_PAP = "pap";
  1.2356 +this.GECKO_DATACALL_AUTH_CHAP = "chap";
  1.2357 +this.GECKO_DATACALL_AUTH_PAP_OR_CHAP = "papOrChap";
  1.2358 +this.GECKO_DATACALL_AUTH_DEFAULT = GECKO_DATACALL_AUTH_PAP_OR_CHAP;
  1.2359 +this.RIL_DATACALL_AUTH_TO_GECKO = [
  1.2360 +  GECKO_DATACALL_AUTH_NONE,         // DATACALL_AUTH_NONE
  1.2361 +  GECKO_DATACALL_AUTH_PAP,          // DATACALL_AUTH_PAP
  1.2362 +  GECKO_DATACALL_AUTH_CHAP,         // DATACALL_AUTH_CHAP
  1.2363 +  GECKO_DATACALL_AUTH_PAP_OR_CHAP   // DATACALL_AUTH_PAP_OR_CHAP
  1.2364 +];
  1.2365 +
  1.2366 +this.GECKO_DATACALL_PDP_TYPE_IP = "IP";
  1.2367 +this.GECKO_DATACALL_PDP_TYPE_IPV4V6 = "IPV4V6";
  1.2368 +this.GECKO_DATACALL_PDP_TYPE_IPV6 = "IPV6";
  1.2369 +this.GECKO_DATACALL_PDP_TYPE_DEFAULT = GECKO_DATACALL_PDP_TYPE_IP;
  1.2370 +this.RIL_DATACALL_PDP_TYPES = [
  1.2371 +  GECKO_DATACALL_PDP_TYPE_IP,
  1.2372 +  GECKO_DATACALL_PDP_TYPE_IPV4V6,
  1.2373 +  GECKO_DATACALL_PDP_TYPE_IPV6,
  1.2374 +];
  1.2375 +
  1.2376 +this.DATACALL_PROFILE_DEFAULT = 0;
  1.2377 +this.DATACALL_PROFILE_TETHERED = 1;
  1.2378 +this.DATACALL_PROFILE_OEM_BASE = 1000;
  1.2379 +
  1.2380 +this.DATACALL_DEACTIVATE_NO_REASON = 0;
  1.2381 +this.DATACALL_DEACTIVATE_RADIO_SHUTDOWN = 1;
  1.2382 +
  1.2383 +this.DATACALL_ACTIVE_UNKNOWN = -1;
  1.2384 +this.DATACALL_INACTIVE = 0;
  1.2385 +this.DATACALL_ACTIVE_DOWN = 1;
  1.2386 +this.DATACALL_ACTIVE_UP = 2;
  1.2387 +
  1.2388 +this.DATACALL_FAIL_NONE = 0;
  1.2389 +this.DATACALL_FAIL_OPERATOR_BARRED = 0x08;
  1.2390 +this.DATACALL_FAIL_INSUFFICIENT_RESOURCES = 0x1A;
  1.2391 +this.DATACALL_FAIL_MISSING_UKNOWN_APN = 0x1B;
  1.2392 +this.DATACALL_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C;
  1.2393 +this.DATACALL_FAIL_USER_AUTHENTICATION = 0x1D;
  1.2394 +this.DATACALL_FAIL_ACTIVATION_REJECT_GGSN = 0x1E;
  1.2395 +this.DATACALL_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F;
  1.2396 +this.DATACALL_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20;
  1.2397 +this.DATACALL_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21;
  1.2398 +this.DATACALL_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22;
  1.2399 +this.DATACALL_FAIL_NSAPI_IN_USE = 0x23;
  1.2400 +this.DATACALL_FAIL_ONLY_IPV4_ALLOWED = 0x32;
  1.2401 +this.DATACALL_FAIL_ONLY_IPV6_ALLOWED = 0x33;
  1.2402 +this.DATACALL_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34;
  1.2403 +this.DATACALL_FAIL_PROTOCOL_ERRORS = 0x6F;
  1.2404 +this.DATACALL_FAIL_VOICE_REGISTRATION_FAIL = -1;
  1.2405 +this.DATACALL_FAIL_DATA_REGISTRATION_FAIL = -2;
  1.2406 +this.DATACALL_FAIL_SIGNAL_LOST = -3;
  1.2407 +this.DATACALL_FAIL_PREF_RADIO_TECH_CHANGED = -4;
  1.2408 +this.DATACALL_FAIL_RADIO_POWER_OFF = -5;
  1.2409 +this.DATACALL_FAIL_TETHERED_CALL_ACTIVE = -6;
  1.2410 +this.DATACALL_FAIL_ERROR_UNSPECIFIED = 0xffff;
  1.2411 +
  1.2412 +// Keep consistent with nsINetworkManager.NETWORK_STATE_*.
  1.2413 +this.GECKO_NETWORK_STATE_UNKNOWN = -1;
  1.2414 +this.GECKO_NETWORK_STATE_CONNECTING = 0;
  1.2415 +this.GECKO_NETWORK_STATE_CONNECTED = 1;
  1.2416 +this.GECKO_NETWORK_STATE_DISCONNECTING = 2;
  1.2417 +this.GECKO_NETWORK_STATE_DISCONNECTED = 3;
  1.2418 +
  1.2419 +// Used for QUERY_AVAILABLE_NETWORKS status of "unknown"
  1.2420 +this.GECKO_QAN_STATE_UNKNOWN = null;
  1.2421 +
  1.2422 +this.CALL_FAIL_UNOBTAINABLE_NUMBER = 1;
  1.2423 +this.CALL_FAIL_NORMAL = 16;
  1.2424 +this.CALL_FAIL_BUSY = 17;
  1.2425 +this.CALL_FAIL_NO_USER_RESPONDING = 18;
  1.2426 +this.CALL_FAIL_USER_ALERTING = 19;
  1.2427 +this.CALL_FAIL_CALL_REJECTED = 21;
  1.2428 +this.CALL_FAIL_NUMBER_CHANGED = 22;
  1.2429 +this.CALL_FAIL_CALL_PRE_EMPTION = 25;
  1.2430 +this.CALL_FAIL_DEST_OUT_OF_ORDER = 27;
  1.2431 +this.CALL_FAIL_INVALID_FORMAT = 28;
  1.2432 +this.CALL_FAIL_FACILITY_REJECTED = 29;
  1.2433 +this.CALL_FAIL_CONGESTION = 34;
  1.2434 +this.CALL_FAIL_NETWORK_OUT_OF_ORDER = 38;
  1.2435 +this.CALL_FAIL_NETWORK_TEMP_FAILURE = 41;
  1.2436 +this.CALL_FAIL_ACM_LIMIT_EXCEEDED = 68;
  1.2437 +this.CALL_FAIL_CALL_BARRED = 240;
  1.2438 +this.CALL_FAIL_FDN_BLOCKED = 241;
  1.2439 +this.CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242;
  1.2440 +this.CALL_FAIL_IMEI_NOT_ACCEPTED = 243;
  1.2441 +this.CALL_FAIL_ERROR_UNSPECIFIED = 0xffff;
  1.2442 +
  1.2443 +// Other Gecko-specific constants
  1.2444 +this.GECKO_RADIOSTATE_UNAVAILABLE   = null;
  1.2445 +this.GECKO_RADIOSTATE_OFF           = "off";
  1.2446 +this.GECKO_RADIOSTATE_READY         = "ready";
  1.2447 +
  1.2448 +this.GECKO_DETAILED_RADIOSTATE_UNKNOWN    = null;
  1.2449 +this.GECKO_DETAILED_RADIOSTATE_ENABLING   = "enabling";
  1.2450 +this.GECKO_DETAILED_RADIOSTATE_ENABLED    = "enabled";
  1.2451 +this.GECKO_DETAILED_RADIOSTATE_DISABLING  = "disabling";
  1.2452 +this.GECKO_DETAILED_RADIOSTATE_DISABLED   = "disabled";
  1.2453 +
  1.2454 +this.GECKO_CARDSTATE_UNINITIALIZED                 = "uninitialized";
  1.2455 +this.GECKO_CARDSTATE_UNDETECTED                    = null;
  1.2456 +this.GECKO_CARDSTATE_ILLEGAL                       = "illegal";
  1.2457 +this.GECKO_CARDSTATE_UNKNOWN                       = "unknown";
  1.2458 +this.GECKO_CARDSTATE_PIN_REQUIRED                  = "pinRequired";
  1.2459 +this.GECKO_CARDSTATE_PUK_REQUIRED                  = "pukRequired";
  1.2460 +this.GECKO_CARDSTATE_PERSONALIZATION_IN_PROGRESS   = "personalizationInProgress";
  1.2461 +this.GECKO_CARDSTATE_PERSONALIZATION_READY         = "personalizationReady";
  1.2462 +this.GECKO_CARDSTATE_NETWORK_LOCKED                = "networkLocked";
  1.2463 +this.GECKO_CARDSTATE_NETWORK_SUBSET_LOCKED         = "networkSubsetLocked";
  1.2464 +this.GECKO_CARDSTATE_NETWORK1_LOCKED               = "network1Locked";
  1.2465 +this.GECKO_CARDSTATE_NETWORK2_LOCKED               = "network2Locked";
  1.2466 +this.GECKO_CARDSTATE_HRPD_NETWORK_LOCKED           = "hrpdNetworkLocked";
  1.2467 +this.GECKO_CARDSTATE_CORPORATE_LOCKED              = "corporateLocked";
  1.2468 +this.GECKO_CARDSTATE_SERVICE_PROVIDER_LOCKED       = "serviceProviderLocked";
  1.2469 +this.GECKO_CARDSTATE_SIM_LOCKED                    = "simPersonalizationLock";
  1.2470 +this.GECKO_CARDSTATE_RUIM_CORPORATE_LOCKED         = "ruimCorporateLocked";
  1.2471 +this.GECKO_CARDSTATE_RUIM_SERVICE_PROVIDER_LOCKED  = "ruimServiceProviderLocked";
  1.2472 +this.GECKO_CARDSTATE_RUIM_LOCKED                   = "ruimPersonalizationLock";
  1.2473 +this.GECKO_CARDSTATE_NETWORK_PUK_REQUIRED          = "networkPukRequired";
  1.2474 +this.GECKO_CARDSTATE_NETWORK_SUBSET_PUK_REQUIRED   = "networkSubsetPukRequired";
  1.2475 +this.GECKO_CARDSTATE_NETWORK1_PUK_REQUIRED         = "network1PukRequired";
  1.2476 +this.GECKO_CARDSTATE_NETWORK2_PUK_REQUIRED         = "network2PukRequired";
  1.2477 +this.GECKO_CARDSTATE_HRPD_NETWORK_PUK_REQUIRED     = "hrpdNetworkPukRequired";
  1.2478 +this.GECKO_CARDSTATE_CORPORATE_PUK_REQUIRED        = "corporatePukRequired";
  1.2479 +this.GECKO_CARDSTATE_SERVICE_PROVIDER_PUK_REQUIRED = "serviceProviderPukRequired";
  1.2480 +this.GECKO_CARDSTATE_SIM_PUK_REQUIRED              = "simPersonalizationPukRequired";
  1.2481 +this.GECKO_CARDSTATE_RUIM_CORPORATE_PUK_REQUIRED   = "ruimCorporatePukRequired";
  1.2482 +this.GECKO_CARDSTATE_RUIM_SERVICE_PROVIDER_PUK_REQUIRED = "ruimServiceProviderPukRequired";
  1.2483 +this.GECKO_CARDSTATE_RUIM_PUK_REQUIRED             = "ruimPersonalizationPukRequired";
  1.2484 +this.GECKO_CARDSTATE_READY                         = "ready";
  1.2485 +this.GECKO_CARDSTATE_PERMANENT_BLOCKED             = "permanentBlocked";
  1.2486 +
  1.2487 +this.GECKO_CARDLOCK_PIN      = "pin";
  1.2488 +this.GECKO_CARDLOCK_PIN2     = "pin2";
  1.2489 +this.GECKO_CARDLOCK_PUK      = "puk";
  1.2490 +this.GECKO_CARDLOCK_PUK2     = "puk2";
  1.2491 +this.GECKO_CARDLOCK_FDN      = "fdn";
  1.2492 +this.GECKO_CARDLOCK_NCK      = "nck";
  1.2493 +this.GECKO_CARDLOCK_NCK1     = "nck1";
  1.2494 +this.GECKO_CARDLOCK_NCK2     = "nck2";
  1.2495 +this.GECKO_CARDLOCK_HNCK     = "hnck";
  1.2496 +this.GECKO_CARDLOCK_CCK      = "cck";
  1.2497 +this.GECKO_CARDLOCK_SPCK     = "spck";
  1.2498 +this.GECKO_CARDLOCK_RCCK     = "rcck";
  1.2499 +this.GECKO_CARDLOCK_RSPCK    = "rspck";
  1.2500 +this.GECKO_CARDLOCK_NCK_PUK  = "nckPuk";
  1.2501 +this.GECKO_CARDLOCK_NCK1_PUK = "nck1Puk";
  1.2502 +this.GECKO_CARDLOCK_NCK2_PUK = "nck2Puk";
  1.2503 +this.GECKO_CARDLOCK_HNCK_PUK = "hnckPuk";
  1.2504 +this.GECKO_CARDLOCK_CCK_PUK  = "cckPuk";
  1.2505 +this.GECKO_CARDLOCK_SPCK_PUK = "spckPuk";
  1.2506 +this.GECKO_CARDLOCK_RCCK_PUK = "rcckPuk";
  1.2507 +this.GECKO_CARDLOCK_RSPCK_PUK = "rspckPuk";
  1.2508 +
  1.2509 +// See ril.h RIL_PersoSubstate
  1.2510 +this.PERSONSUBSTATE = {};
  1.2511 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_UNKNOWN] = GECKO_CARDSTATE_UNKNOWN;
  1.2512 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_IN_PROGRESS] = GECKO_CARDSTATE_PERSONALIZATION_IN_PROGRESS;
  1.2513 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_READY] = GECKO_CARDSTATE_PERSONALIZATION_READY;
  1.2514 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_SIM_NETWORK] = GECKO_CARDSTATE_NETWORK_LOCKED;
  1.2515 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_SIM_NETWORK_SUBSET] = GECKO_CARDSTATE_NETWORK_SUBSET_LOCKED;
  1.2516 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_SIM_CORPORATE] = GECKO_CARDSTATE_CORPORATE_LOCKED;
  1.2517 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_SIM_SERVICE_PROVIDER] = GECKO_CARDSTATE_SERVICE_PROVIDER_LOCKED;
  1.2518 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_SIM_SIM] = GECKO_CARDSTATE_SIM_LOCKED;
  1.2519 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_SIM_NETWORK_PUK] = GECKO_CARDSTATE_NETWORK_PUK_REQUIRED;
  1.2520 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK] = GECKO_CARDSTATE_NETWORK_SUBSET_PUK_REQUIRED;
  1.2521 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_SIM_CORPORATE_PUK] = GECKO_CARDSTATE_CORPORATE_PUK_REQUIRED;
  1.2522 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK] = GECKO_CARDSTATE_SERVICE_PROVIDER_PUK_REQUIRED;
  1.2523 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_RUIM_NETWORK1] = GECKO_CARDSTATE_NETWORK1_LOCKED;
  1.2524 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_RUIM_NETWORK2] = GECKO_CARDSTATE_NETWORK2_LOCKED;
  1.2525 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_RUIM_HRPD] = GECKO_CARDSTATE_HRPD_NETWORK_LOCKED;
  1.2526 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_RUIM_CORPORATE] = GECKO_CARDSTATE_RUIM_CORPORATE_LOCKED;
  1.2527 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER] = GECKO_CARDSTATE_RUIM_SERVICE_PROVIDER_LOCKED;
  1.2528 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_RUIM_RUIM] = GECKO_CARDSTATE_RUIM_LOCKED;
  1.2529 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_RUIM_NETWORK1_PUK] = GECKO_CARDSTATE_NETWORK1_PUK_REQUIRED;
  1.2530 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_RUIM_NETWORK2_PUK] = GECKO_CARDSTATE_NETWORK2_PUK_REQUIRED;
  1.2531 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_RUIM_HRPD_PUK] = GECKO_CARDSTATE_HRPD_NETWORK_PUK_REQUIRED;
  1.2532 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_RUIM_CORPORATE_PUK] = GECKO_CARDSTATE_RUIM_CORPORATE_PUK_REQUIRED;
  1.2533 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK] = GECKO_CARDSTATE_RUIM_SERVICE_PROVIDER_PUK_REQUIRED;
  1.2534 +PERSONSUBSTATE[CARD_PERSOSUBSTATE_RUIM_RUIM_PUK] = GECKO_CARDSTATE_RUIM_PUK_REQUIRED;
  1.2535 +
  1.2536 +this.GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK = {};
  1.2537 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_NCK] = CARD_PERSOSUBSTATE_SIM_NETWORK;
  1.2538 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_NCK1] = CARD_PERSOSUBSTATE_RUIM_NETWORK1;
  1.2539 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_NCK2] = CARD_PERSOSUBSTATE_RUIM_NETWORK2;
  1.2540 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_HNCK] = CARD_PERSOSUBSTATE_RUIM_HRPD;
  1.2541 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_CCK] = CARD_PERSOSUBSTATE_SIM_CORPORATE;
  1.2542 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_SPCK] = CARD_PERSOSUBSTATE_SIM_SERVICE_PROVIDER;
  1.2543 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_RCCK] = CARD_PERSOSUBSTATE_RUIM_CORPORATE;
  1.2544 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_RSPCK] = CARD_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER;
  1.2545 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_NCK_PUK] = CARD_PERSOSUBSTATE_SIM_NETWORK_PUK;
  1.2546 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_NCK1_PUK] = CARD_PERSOSUBSTATE_RUIM_NETWORK1_PUK;
  1.2547 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_NCK2_PUK] = CARD_PERSOSUBSTATE_RUIM_NETWORK2_PUK;
  1.2548 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_HNCK_PUK] = CARD_PERSOSUBSTATE_RUIM_HRPD_PUK;
  1.2549 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_CCK_PUK] = CARD_PERSOSUBSTATE_SIM_CORPORATE_PUK;
  1.2550 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_SPCK_PUK] = CARD_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK;
  1.2551 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_RCCK_PUK] = CARD_PERSOSUBSTATE_RUIM_CORPORATE_PUK;
  1.2552 +GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_RSPCK_PUK] = CARD_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK;
  1.2553 +
  1.2554 +this.GECKO_NETWORK_SELECTION_UNKNOWN   = null;
  1.2555 +this.GECKO_NETWORK_SELECTION_AUTOMATIC = "automatic";
  1.2556 +this.GECKO_NETWORK_SELECTION_MANUAL    = "manual";
  1.2557 +
  1.2558 +this.GECKO_MOBILE_CONNECTION_STATE_UNKNOWN = null;
  1.2559 +this.GECKO_MOBILE_CONNECTION_STATE_NOTSEARCHING = "notSearching";
  1.2560 +this.GECKO_MOBILE_CONNECTION_STATE_SEARCHING = "searching";
  1.2561 +this.GECKO_MOBILE_CONNECTION_STATE_REGISTERED = "registered";
  1.2562 +this.GECKO_MOBILE_CONNECTION_STATE_DENIED = "denied";
  1.2563 +
  1.2564 +this.NETWORK_CREG_TO_GECKO_MOBILE_CONNECTION_STATE = {};
  1.2565 +NETWORK_CREG_TO_GECKO_MOBILE_CONNECTION_STATE[NETWORK_CREG_STATE_NOT_SEARCHING] = GECKO_MOBILE_CONNECTION_STATE_NOTSEARCHING;
  1.2566 +NETWORK_CREG_TO_GECKO_MOBILE_CONNECTION_STATE[NETWORK_CREG_STATE_REGISTERED_HOME] = GECKO_MOBILE_CONNECTION_STATE_REGISTERED;
  1.2567 +NETWORK_CREG_TO_GECKO_MOBILE_CONNECTION_STATE[NETWORK_CREG_STATE_SEARCHING] = GECKO_MOBILE_CONNECTION_STATE_SEARCHING;
  1.2568 +NETWORK_CREG_TO_GECKO_MOBILE_CONNECTION_STATE[NETWORK_CREG_STATE_DENIED] = GECKO_MOBILE_CONNECTION_STATE_DENIED;
  1.2569 +NETWORK_CREG_TO_GECKO_MOBILE_CONNECTION_STATE[NETWORK_CREG_STATE_UNKNOWN] = GECKO_MOBILE_CONNECTION_STATE_UNKNOWN;
  1.2570 +NETWORK_CREG_TO_GECKO_MOBILE_CONNECTION_STATE[NETWORK_CREG_STATE_REGISTERED_ROAMING] = GECKO_MOBILE_CONNECTION_STATE_REGISTERED;
  1.2571 +NETWORK_CREG_TO_GECKO_MOBILE_CONNECTION_STATE[NETWORK_CREG_STATE_NOT_SEARCHING_EMERGENCY_CALLS] = GECKO_MOBILE_CONNECTION_STATE_NOTSEARCHING;
  1.2572 +NETWORK_CREG_TO_GECKO_MOBILE_CONNECTION_STATE[NETWORK_CREG_STATE_SEARCHING_EMERGENCY_CALLS] = GECKO_MOBILE_CONNECTION_STATE_SEARCHING;
  1.2573 +NETWORK_CREG_TO_GECKO_MOBILE_CONNECTION_STATE[NETWORK_CREG_STATE_DENIED_EMERGENCY_CALLS] = GECKO_MOBILE_CONNECTION_STATE_DENIED;
  1.2574 +NETWORK_CREG_TO_GECKO_MOBILE_CONNECTION_STATE[NETWORK_CREG_STATE_UNKNOWN_EMERGENCY_CALLS] = GECKO_MOBILE_CONNECTION_STATE_UNKNOWN;
  1.2575 +
  1.2576 +
  1.2577 +this.GECKO_CALL_ERROR_BAD_NUMBER             = "BadNumberError";
  1.2578 +this.GECKO_CALL_ERROR_NORMAL_CALL_CLEARING   = "NormalCallClearingError";
  1.2579 +this.GECKO_CALL_ERROR_BUSY                   = "BusyError";
  1.2580 +this.GECKO_CALL_ERROR_NO_USER_RESPONDING     = "NoUserRespondingError";
  1.2581 +this.GECKO_CALL_ERROR_USER_ALERTING          = "UserAlertingNoAnswerError";
  1.2582 +this.GECKO_CALL_ERROR_REJECTED               = "CallRejectedError";
  1.2583 +this.GECKO_CALL_ERROR_NUMBER_CHANGED         = "NumberChangedError";
  1.2584 +this.GECKO_CALL_ERROR_PRE_EMPTION            = "PreEmptionError";
  1.2585 +this.GECKO_CALL_ERROR_DEST_OUT_OF_ORDER      = "DestinationOutOfOrderError";
  1.2586 +this.GECKO_CALL_ERROR_INVALID_NUMBER_FORMAT  = "InvalidNumberFormatError";
  1.2587 +this.GECKO_CALL_ERROR_FACILITY_REJECTED      = "FacilityRejectedError";
  1.2588 +this.GECKO_CALL_ERROR_CONGESTION             = "CongestionError";
  1.2589 +this.GECKO_CALL_ERROR_NETWORK_OUT_OF_ORDER   = "NetworkOutOfOrderError";
  1.2590 +this.GECKO_CALL_ERROR_NETWORK_TEMP_FAILURE   = "NetworkTempFailureError";
  1.2591 +this.GECKO_CALL_ERROR_INCOMING_CALL_EXCEEDED = "IncomingCallExceededError";
  1.2592 +this.GECKO_CALL_ERROR_BARRED                 = "BarredError";
  1.2593 +this.GECKO_CALL_ERROR_FDN_BLOCKED            = "FDNBlockedError";
  1.2594 +this.GECKO_CALL_ERROR_SUBSCRIBER_UNKNOWN     = "SubscriberUnknownError";
  1.2595 +this.GECKO_CALL_ERROR_DEVICE_NOT_ACCEPTED    = "DeviceNotAcceptedError";
  1.2596 +this.GECKO_CALL_ERROR_UNSPECIFIED            = "UnspecifiedError";
  1.2597 +
  1.2598 +this.RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR = {};
  1.2599 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_UNOBTAINABLE_NUMBER] = GECKO_CALL_ERROR_BAD_NUMBER;
  1.2600 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_NORMAL]              = GECKO_CALL_ERROR_NORMAL_CALL_CLEARING;
  1.2601 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_BUSY]                = GECKO_CALL_ERROR_BUSY;
  1.2602 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_NO_USER_RESPONDING]  = GECKO_CALL_ERROR_NO_USER_RESPONDING;
  1.2603 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_USER_ALERTING]       = GECKO_CALL_ERROR_USER_ALERTING;
  1.2604 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_CALL_REJECTED]       = GECKO_CALL_ERROR_REJECTED;
  1.2605 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_NUMBER_CHANGED]      = GECKO_CALL_ERROR_NUMBER_CHANGED;
  1.2606 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_CALL_PRE_EMPTION]    = GECKO_CALL_ERROR_PRE_EMPTION;
  1.2607 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_DEST_OUT_OF_ORDER]   = GECKO_CALL_ERROR_DEST_OUT_OF_ORDER;
  1.2608 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_INVALID_FORMAT]      = GECKO_CALL_ERROR_INVALID_NUMBER_FORMAT;
  1.2609 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_FACILITY_REJECTED]   = GECKO_CALL_ERROR_FACILITY_REJECTED;
  1.2610 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_CONGESTION]          = GECKO_CALL_ERROR_CONGESTION;
  1.2611 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_NETWORK_OUT_OF_ORDER]= GECKO_CALL_ERROR_NETWORK_OUT_OF_ORDER;
  1.2612 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_NETWORK_TEMP_FAILURE]= GECKO_CALL_ERROR_NETWORK_TEMP_FAILURE;
  1.2613 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_ACM_LIMIT_EXCEEDED]  = GECKO_CALL_ERROR_INCOMING_CALL_EXCEEDED;
  1.2614 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_CALL_BARRED]         = GECKO_CALL_ERROR_BARRED;
  1.2615 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_FDN_BLOCKED]         = GECKO_CALL_ERROR_FDN_BLOCKED;
  1.2616 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_IMSI_UNKNOWN_IN_VLR] = GECKO_CALL_ERROR_SUBSCRIBER_UNKNOWN;
  1.2617 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_IMEI_NOT_ACCEPTED]   = GECKO_CALL_ERROR_DEVICE_NOT_ACCEPTED;
  1.2618 +RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_ERROR_UNSPECIFIED]   = GECKO_CALL_ERROR_UNSPECIFIED;
  1.2619 +
  1.2620 +this.GECKO_DATACALL_ERROR_OPERATOR_BARRED               = "OperatorBarredError";
  1.2621 +this.GECKO_DATACALL_ERROR_INSUFFICIENT_RESOURCES        = "InsufficientResourcesError";
  1.2622 +this.GECKO_DATACALL_ERROR_MISSING_UKNOWN_APN            = "MissingUnknownAPNError";
  1.2623 +this.GECKO_DATACALL_ERROR_UNKNOWN_PDP_ADDRESS_TYPE      = "UnknownPDPAddressTypeError";
  1.2624 +this.GECKO_DATACALL_ERROR_USER_AUTHENTICATION           = "UserAuthenticationError";
  1.2625 +this.GECKO_DATACALL_ERROR_ACTIVATION_REJECT_GGSN        = "ActivationRejectGGSNError";
  1.2626 +this.GECKO_DATACALL_ERROR_ACTIVATION_REJECT_UNSPECIFIED = "ActivationRejectUnspecifiedError";
  1.2627 +this.GECKO_DATACALL_ERROR_SERVICE_OPTION_NOT_SUPPORTED  = "ServiceOptionNotSupportedError";
  1.2628 +this.GECKO_DATACALL_ERROR_SERVICE_OPTION_NOT_SUBSCRIBED = "ServiceOptionNotSubscribedError";
  1.2629 +this.GECKO_DATACALL_ERROR_SERVICE_OPTION_OUT_OF_ORDER   = "ServiceOptionOutOfOrderError";
  1.2630 +this.GECKO_DATACALL_ERROR_NSAPI_IN_USE                  = "NSAPIInUseError";
  1.2631 +this.GECKO_DATACALL_ERROR_ONLY_IPV4_ALLOWED             = "OnlyIPv4Error";
  1.2632 +this.GECKO_DATACALL_ERROR_ONLY_IPV6_ALLOWED             = "OnlyIPv6Error";
  1.2633 +this.GECKO_DATACALL_ERROR_ONLY_SINGLE_BEARER_ALLOWED    = "OnlySingleBearerAllowedError";
  1.2634 +this.GECKO_DATACALL_ERROR_PROTOCOL_ERRORS               = "ProtocolErrorsError";
  1.2635 +this.GECKO_DATACALL_ERROR_VOICE_REGISTRATION_FAIL       = "VoiceRegistrationFailError";
  1.2636 +this.GECKO_DATACALL_ERROR_DATA_REGISTRATION_FAIL        = "DataRegistrationFailError";
  1.2637 +this.GECKO_DATACALL_ERROR_SIGNAL_LOST                   = "SignalLostError";
  1.2638 +this.GECKO_DATACALL_ERROR_PREF_RADIO_TECH_CHANGED       = "PrefRadioTechChangedError";
  1.2639 +this.GECKO_DATACALL_ERROR_RADIO_POWER_OFF               = "RadioPowerOffError";
  1.2640 +this.GECKO_DATACALL_ERROR_TETHERED_CALL_ACTIVE          = "TetheredCallActiveError";
  1.2641 +this.GECKO_DATACALL_ERROR_UNSPECIFIED                   = "UnspecifiedError";
  1.2642 +
  1.2643 +this.RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR = {};
  1.2644 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_OPERATOR_BARRED]               = GECKO_DATACALL_ERROR_OPERATOR_BARRED;
  1.2645 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_INSUFFICIENT_RESOURCES]        = GECKO_DATACALL_ERROR_INSUFFICIENT_RESOURCES;
  1.2646 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_MISSING_UKNOWN_APN]            = GECKO_DATACALL_ERROR_MISSING_UKNOWN_APN;
  1.2647 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_UNKNOWN_PDP_ADDRESS_TYPE]      = GECKO_DATACALL_ERROR_UNKNOWN_PDP_ADDRESS_TYPE;
  1.2648 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_USER_AUTHENTICATION]           = GECKO_DATACALL_ERROR_USER_AUTHENTICATION;
  1.2649 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_ACTIVATION_REJECT_GGSN]        = GECKO_DATACALL_ERROR_ACTIVATION_REJECT_GGSN;
  1.2650 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_ACTIVATION_REJECT_UNSPECIFIED] = GECKO_DATACALL_ERROR_ACTIVATION_REJECT_UNSPECIFIED;
  1.2651 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_SERVICE_OPTION_NOT_SUPPORTED]  = GECKO_DATACALL_ERROR_SERVICE_OPTION_NOT_SUPPORTED;
  1.2652 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED] = GECKO_DATACALL_ERROR_SERVICE_OPTION_NOT_SUBSCRIBED;
  1.2653 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_SERVICE_OPTION_OUT_OF_ORDER]   = GECKO_DATACALL_ERROR_SERVICE_OPTION_OUT_OF_ORDER;
  1.2654 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_NSAPI_IN_USE]                  = GECKO_DATACALL_ERROR_NSAPI_IN_USE;
  1.2655 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_ONLY_IPV4_ALLOWED]             = GECKO_DATACALL_ERROR_ONLY_IPV4_ALLOWED;
  1.2656 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_ONLY_IPV6_ALLOWED]             = GECKO_DATACALL_ERROR_ONLY_IPV6_ALLOWED;
  1.2657 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_ONLY_SINGLE_BEARER_ALLOWED]    = GECKO_DATACALL_ERROR_ONLY_SINGLE_BEARER_ALLOWED;
  1.2658 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_PROTOCOL_ERRORS]               = GECKO_DATACALL_ERROR_PROTOCOL_ERRORS;
  1.2659 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_VOICE_REGISTRATION_FAIL]       = GECKO_DATACALL_ERROR_VOICE_REGISTRATION_FAIL;
  1.2660 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_DATA_REGISTRATION_FAIL]        = GECKO_DATACALL_ERROR_DATA_REGISTRATION_FAIL;
  1.2661 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_SIGNAL_LOST]                   = GECKO_DATACALL_ERROR_SIGNAL_LOST;
  1.2662 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_PREF_RADIO_TECH_CHANGED]       = GECKO_DATACALL_ERROR_PREF_RADIO_TECH_CHANGED;
  1.2663 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_RADIO_POWER_OFF]               = GECKO_DATACALL_ERROR_RADIO_POWER_OFF;
  1.2664 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_TETHERED_CALL_ACTIVE]          = GECKO_DATACALL_ERROR_TETHERED_CALL_ACTIVE;
  1.2665 +RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_ERROR_UNSPECIFIED]             = GECKO_DATACALL_ERROR_UNSPECIFIED;
  1.2666 +
  1.2667 +this.GECKO_RADIO_TECH = [
  1.2668 +  null,
  1.2669 +  "gprs",
  1.2670 +  "edge",
  1.2671 +  "umts",
  1.2672 +  "is95a",
  1.2673 +  "is95b",
  1.2674 +  "1xrtt",
  1.2675 +  "evdo0",
  1.2676 +  "evdoa",
  1.2677 +  "hsdpa",
  1.2678 +  "hsupa",
  1.2679 +  "hspa",
  1.2680 +  "evdob",
  1.2681 +  "ehrpd",
  1.2682 +  "lte",
  1.2683 +  "hspa+",
  1.2684 +  "gsm"
  1.2685 +];
  1.2686 +
  1.2687 +this.GECKO_VOICEMAIL_MESSAGE_COUNT_UNKNOWN = -1;
  1.2688 +
  1.2689 +// Call forwarding action. Must be in sync with nsIDOMMozMobileCFInfo interface
  1.2690 +this.CALL_FORWARD_ACTION_DISABLE = 0;
  1.2691 +this.CALL_FORWARD_ACTION_ENABLE = 1;
  1.2692 +this.CALL_FORWARD_ACTION_QUERY_STATUS = 2;
  1.2693 +this.CALL_FORWARD_ACTION_REGISTRATION = 3;
  1.2694 +this.CALL_FORWARD_ACTION_ERASURE = 4;
  1.2695 +
  1.2696 +// Call forwarding reason. Must be in sync with nsIDOMMozMobileCFInfo interface
  1.2697 +this.CALL_FORWARD_REASON_UNCONDITIONAL = 0;
  1.2698 +this.CALL_FORWARD_REASON_MOBILE_BUSY = 1;
  1.2699 +this.CALL_FORWARD_REASON_NO_REPLY = 2;
  1.2700 +this.CALL_FORWARD_REASON_NOT_REACHABLE = 3;
  1.2701 +this.CALL_FORWARD_REASON_ALL_CALL_FORWARDING = 4;
  1.2702 +this.CALL_FORWARD_REASON_ALL_CONDITIONAL_CALL_FORWARDING = 5;
  1.2703 +
  1.2704 +// Call barring program. Must be in sync with nsIDOMMozMobileConnection interface
  1.2705 +this.CALL_BARRING_PROGRAM_ALL_OUTGOING = 0;
  1.2706 +this.CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL = 1;
  1.2707 +this.CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL_EXCEPT_HOME = 2;
  1.2708 +this.CALL_BARRING_PROGRAM_ALL_INCOMING = 3;
  1.2709 +this.CALL_BARRING_PROGRAM_INCOMING_ROAMING = 4;
  1.2710 +
  1.2711 +this.CALL_BARRING_PROGRAM_TO_FACILITY = {};
  1.2712 +CALL_BARRING_PROGRAM_TO_FACILITY[CALL_BARRING_PROGRAM_ALL_OUTGOING] = ICC_CB_FACILITY_BAOC;
  1.2713 +CALL_BARRING_PROGRAM_TO_FACILITY[CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL] = ICC_CB_FACILITY_BAOIC;
  1.2714 +CALL_BARRING_PROGRAM_TO_FACILITY[CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL_EXCEPT_HOME] = ICC_CB_FACILITY_BAOICxH;
  1.2715 +CALL_BARRING_PROGRAM_TO_FACILITY[CALL_BARRING_PROGRAM_ALL_INCOMING] = ICC_CB_FACILITY_BAIC;
  1.2716 +CALL_BARRING_PROGRAM_TO_FACILITY[CALL_BARRING_PROGRAM_INCOMING_ROAMING] = ICC_CB_FACILITY_BAICr;
  1.2717 +
  1.2718 +// CLIR constants. Must be in sync with nsIDOMMozMobileConnection interface
  1.2719 +this.CLIR_DEFAULT = 0;
  1.2720 +this.CLIR_INVOCATION  = 1;
  1.2721 +this.CLIR_SUPPRESSION = 2;
  1.2722 +
  1.2723 +// MMI procedure as defined in TS.22.030 6.5.2
  1.2724 +this.MMI_PROCEDURE_ACTIVATION = "*";
  1.2725 +this.MMI_PROCEDURE_DEACTIVATION = "#";
  1.2726 +this.MMI_PROCEDURE_INTERROGATION = "*#";
  1.2727 +this.MMI_PROCEDURE_REGISTRATION = "**";
  1.2728 +this.MMI_PROCEDURE_ERASURE = "##";
  1.2729 +
  1.2730 +this.MMI_PROC_TO_CF_ACTION = {};
  1.2731 +MMI_PROC_TO_CF_ACTION[MMI_PROCEDURE_ACTIVATION] = CALL_FORWARD_ACTION_ENABLE;
  1.2732 +MMI_PROC_TO_CF_ACTION[MMI_PROCEDURE_DEACTIVATION] = CALL_FORWARD_ACTION_DISABLE;
  1.2733 +MMI_PROC_TO_CF_ACTION[MMI_PROCEDURE_INTERROGATION] = CALL_FORWARD_ACTION_QUERY_STATUS;
  1.2734 +MMI_PROC_TO_CF_ACTION[MMI_PROCEDURE_REGISTRATION] = CALL_FORWARD_ACTION_REGISTRATION;
  1.2735 +MMI_PROC_TO_CF_ACTION[MMI_PROCEDURE_ERASURE] = CALL_FORWARD_ACTION_ERASURE;
  1.2736 +
  1.2737 +// MMI call forwarding service codes as defined in TS.22.030 Annex B
  1.2738 +this.MMI_SC_CFU = "21";
  1.2739 +this.MMI_SC_CF_BUSY = "67";
  1.2740 +this.MMI_SC_CF_NO_REPLY = "61";
  1.2741 +this.MMI_SC_CF_NOT_REACHABLE = "62";
  1.2742 +this.MMI_SC_CF_ALL = "002";
  1.2743 +this.MMI_SC_CF_ALL_CONDITIONAL = "004";
  1.2744 +
  1.2745 +this.MMI_SC_TO_CF_REASON = {};
  1.2746 +MMI_SC_TO_CF_REASON[MMI_SC_CFU] = CALL_FORWARD_REASON_UNCONDITIONAL;
  1.2747 +MMI_SC_TO_CF_REASON[MMI_SC_CF_BUSY] = CALL_FORWARD_REASON_MOBILE_BUSY;
  1.2748 +MMI_SC_TO_CF_REASON[MMI_SC_CF_NO_REPLY] = CALL_FORWARD_REASON_NO_REPLY;
  1.2749 +MMI_SC_TO_CF_REASON[MMI_SC_CF_NOT_REACHABLE] = CALL_FORWARD_REASON_NOT_REACHABLE;
  1.2750 +MMI_SC_TO_CF_REASON[MMI_SC_CF_ALL] = CALL_FORWARD_REASON_ALL_CALL_FORWARDING;
  1.2751 +MMI_SC_TO_CF_REASON[MMI_SC_CF_ALL_CONDITIONAL] = CALL_FORWARD_REASON_ALL_CONDITIONAL_CALL_FORWARDING;
  1.2752 +
  1.2753 +// MMI service codes for PIN/PIN2/PUK/PUK2 management as defined in TS.22.030
  1.2754 +// sec 6.6
  1.2755 +this.MMI_SC_PIN = "04";
  1.2756 +this.MMI_SC_PIN2 = "042";
  1.2757 +this.MMI_SC_PUK = "05";
  1.2758 +this.MMI_SC_PUK2 = "052";
  1.2759 +
  1.2760 +// MMI service code for IMEI presentation as defined in TS.22.030 sec 6.7
  1.2761 +this.MMI_SC_IMEI = "06";
  1.2762 +
  1.2763 +// MMI called line presentation service codes
  1.2764 +this.MMI_SC_CLIP = "30";
  1.2765 +this.MMI_SC_CLIR = "31";
  1.2766 +
  1.2767 +// MMI call waiting service code
  1.2768 +this.MMI_SC_CALL_WAITING = "43";
  1.2769 +
  1.2770 +// MMI call barring service codes
  1.2771 +this.MMI_SC_BAOC = "33";
  1.2772 +this.MMI_SC_BAOIC = "331";
  1.2773 +this.MMI_SC_BAOICxH = "332";
  1.2774 +this.MMI_SC_BAIC = "35";
  1.2775 +this.MMI_SC_BAICr = "351";
  1.2776 +this.MMI_SC_BA_ALL = "330";
  1.2777 +this.MMI_SC_BA_MO = "333";
  1.2778 +this.MMI_SC_BA_MT = "353";
  1.2779 +
  1.2780 +this.MMI_SC_TO_CB_FACILITY = {};
  1.2781 +
  1.2782 +MMI_SC_TO_CB_FACILITY[MMI_SC_BAOC] = ICC_CB_FACILITY_BAOC;
  1.2783 +MMI_SC_TO_CB_FACILITY[MMI_SC_BAOIC] = ICC_CB_FACILITY_BAOIC;
  1.2784 +MMI_SC_TO_CB_FACILITY[MMI_SC_BAOICxH] = ICC_CB_FACILITY_BAOICxH;
  1.2785 +MMI_SC_TO_CB_FACILITY[MMI_SC_BAIC] = ICC_CB_FACILITY_BAIC;
  1.2786 +MMI_SC_TO_CB_FACILITY[MMI_SC_BAICr] = ICC_CB_FACILITY_BAICr;
  1.2787 +MMI_SC_TO_CB_FACILITY[MMI_SC_BA_ALL] = ICC_CB_FACILITY_BA_ALL;
  1.2788 +MMI_SC_TO_CB_FACILITY[MMI_SC_BA_MO] = ICC_CB_FACILITY_BA_MO;
  1.2789 +MMI_SC_TO_CB_FACILITY[MMI_SC_BA_MT] = ICC_CB_FACILITY_BA_MT;
  1.2790 +
  1.2791 +// MMI service code key strings.
  1.2792 +this.MMI_KS_SC_CALL_BARRING = "scCallBarring";
  1.2793 +this.MMI_KS_SC_CALL_FORWARDING = "scCallForwarding";
  1.2794 +this.MMI_KS_SC_CLIP = "scClip";
  1.2795 +this.MMI_KS_SC_CLIR = "scClir";
  1.2796 +this.MMI_KS_SC_PWD = "scPwd";
  1.2797 +this.MMI_KS_SC_CALL_WAITING = "scCallWaiting";
  1.2798 +this.MMI_KS_SC_PIN = "scPin";
  1.2799 +this.MMI_KS_SC_PIN2 = "scPin2";
  1.2800 +this.MMI_KS_SC_PUK = "scPuk";
  1.2801 +this.MMI_KS_SC_PUK2 = "scPuk2";
  1.2802 +this.MMI_KS_SC_IMEI = "scImei";
  1.2803 +this.MMI_KS_SC_USSD = "scUssd";
  1.2804 +
  1.2805 +// MMI error messages key strings.
  1.2806 +this.MMI_ERROR_KS_ERROR = "emMmiError";
  1.2807 +this.MMI_ERROR_KS_NOT_SUPPORTED = "emMmiErrorNotSupported";
  1.2808 +this.MMI_ERROR_KS_INVALID_ACTION = "emMmiErrorInvalidAction";
  1.2809 +this.MMI_ERROR_KS_MISMATCH_PIN = "emMmiErrorMismatchPin";
  1.2810 +this.MMI_ERROR_KS_BAD_PIN = "emMmiErrorBadPin";
  1.2811 +this.MMI_ERROR_KS_BAD_PUK = "emMmiErrorBadPuk";
  1.2812 +this.MMI_ERROR_KS_INVALID_PIN = "emMmiErrorInvalidPin";
  1.2813 +this.MMI_ERROR_KS_NEEDS_PUK = "emMmiErrorNeedsPuk";
  1.2814 +this.MMI_ERROR_KS_SIM_BLOCKED = "emMmiErrorSimBlocked";
  1.2815 +
  1.2816 +// MMI status message.
  1.2817 +this.MMI_SM_KS_PIN_CHANGED = "smPinChanged";
  1.2818 +this.MMI_SM_KS_PIN2_CHANGED = "smPin2Changed";
  1.2819 +this.MMI_SM_KS_PIN_UNBLOCKED = "smPinUnblocked";
  1.2820 +this.MMI_SM_KS_PIN2_UNBLOCKED = "smPin2Unblocked";
  1.2821 +this.MMI_SM_KS_SERVICE_ENABLED = "smServiceEnabled";
  1.2822 +this.MMI_SM_KS_SERVICE_ENABLED_FOR = "smServiceEnabledFor";
  1.2823 +this.MMI_SM_KS_SERVICE_DISABLED = "smServiceDisabled";
  1.2824 +this.MMI_SM_KS_SERVICE_REGISTERED = "smServiceRegistered";
  1.2825 +this.MMI_SM_KS_SERVICE_ERASED = "smServiceErased";
  1.2826 +this.MMI_SM_KS_SERVICE_INTERROGATED = "smServiceInterrogated";
  1.2827 +this.MMI_SM_KS_SERVICE_NOT_PROVISIONED = "smServiceNotProvisioned";
  1.2828 +this.MMI_SM_KS_CLIR_PERMANENT = "smClirPermanent";
  1.2829 +this.MMI_SM_KS_CLIR_DEFAULT_ON_NEXT_CALL_ON = "smClirDefaultOnNextCallOn";
  1.2830 +this.MMI_SM_KS_CLIR_DEFAULT_ON_NEXT_CALL_OFF = "smClirDefaultOnNextCallOff";
  1.2831 +this.MMI_SM_KS_CLIR_DEFAULT_OFF_NEXT_CALL_ON = "smClirDefaultOffNextCallOn";
  1.2832 +this.MMI_SM_KS_CLIR_DEFAULT_OFF_NEXT_CALL_OFF = "smClirDefaultOffNextCallOff";
  1.2833 +
  1.2834 +// MMI Service class
  1.2835 +this.MMI_KS_SERVICE_CLASS_VOICE = "serviceClassVoice";
  1.2836 +this.MMI_KS_SERVICE_CLASS_DATA = "serviceClassData";
  1.2837 +this.MMI_KS_SERVICE_CLASS_FAX = "serviceClassFax";
  1.2838 +this.MMI_KS_SERVICE_CLASS_SMS = "serviceClassSms";
  1.2839 +this.MMI_KS_SERVICE_CLASS_DATA_SYNC = "serviceClassDataSync";
  1.2840 +this.MMI_KS_SERVICE_CLASS_DATA_ASYNC = "serviceClassDataAsync";
  1.2841 +this.MMI_KS_SERVICE_CLASS_PACKET = "serviceClassPacket";
  1.2842 +this.MMI_KS_SERVICE_CLASS_PAD = "serviceClassPad";
  1.2843 +
  1.2844 +this.MMI_KS_SERVICE_CLASS_MAPPING = {};
  1.2845 +MMI_KS_SERVICE_CLASS_MAPPING[ICC_SERVICE_CLASS_VOICE] = MMI_KS_SERVICE_CLASS_VOICE;
  1.2846 +MMI_KS_SERVICE_CLASS_MAPPING[ICC_SERVICE_CLASS_DATA] = MMI_KS_SERVICE_CLASS_DATA;
  1.2847 +MMI_KS_SERVICE_CLASS_MAPPING[ICC_SERVICE_CLASS_FAX] = MMI_KS_SERVICE_CLASS_FAX;
  1.2848 +MMI_KS_SERVICE_CLASS_MAPPING[ICC_SERVICE_CLASS_SMS] = MMI_KS_SERVICE_CLASS_SMS;
  1.2849 +MMI_KS_SERVICE_CLASS_MAPPING[ICC_SERVICE_CLASS_DATA_SYNC] = MMI_KS_SERVICE_CLASS_DATA_SYNC;
  1.2850 +MMI_KS_SERVICE_CLASS_MAPPING[ICC_SERVICE_CLASS_DATA_ASYNC] = MMI_KS_SERVICE_CLASS_DATA_ASYNC;
  1.2851 +MMI_KS_SERVICE_CLASS_MAPPING[ICC_SERVICE_CLASS_PACKET] = MMI_KS_SERVICE_CLASS_PACKET;
  1.2852 +MMI_KS_SERVICE_CLASS_MAPPING[ICC_SERVICE_CLASS_PAD] = MMI_KS_SERVICE_CLASS_PAD;
  1.2853 +/**
  1.2854 + * CDMA PDU constants
  1.2855 + */
  1.2856 +
  1.2857 +// SMS Message Type, as defined in 3GPP2 C.S0015-A v2.0, Table 3.4-1
  1.2858 +this.PDU_CDMA_MSG_TYPE_P2P = 0x00;        // Point-to-Point
  1.2859 +this.PDU_CDMA_MSG_TYPE_BROADCAST = 0x01;  // Broadcast
  1.2860 +this.PDU_CDMA_MSG_TYPE_ACK = 0x02;        // Acknowledge
  1.2861 +
  1.2862 +// SMS Teleservice Identitifier, as defined in 3GPP2 N.S0005, Table 175
  1.2863 +this.PDU_CDMA_MSG_TELESERIVCIE_ID_SMS  = 0x1002;   // SMS
  1.2864 +this.PDU_CDMA_MSG_TELESERIVCIE_ID_WAP  = 0x1004;   // WAP
  1.2865 +this.PDU_CDMA_MSG_TELESERIVCIE_ID_WEMT = 0x1005;   // Wireless Enhanced Messaging Teleservice
  1.2866 +                                                   // required for fragmented SMS
  1.2867 +
  1.2868 +// SMS Service Category, as defined in 3GPP2 C.R1001-D, Table 9.3.1-1
  1.2869 +this.PDU_CDMA_MSG_CATEGORY_UNSPEC = 0x00; // Unknown/Unspecified
  1.2870 +
  1.2871 +// Address Information, Digit Mode, as defined in 3GPP2 C.S0015-A v2.0, sec 3.4.3.3
  1.2872 +this.PDU_CDMA_MSG_ADDR_DIGIT_MODE_DTMF = 0x00;      // Digit Mode : DTMF
  1.2873 +this.PDU_CDMA_MSG_ADDR_DIGIT_MODE_ASCII = 0x01;     // Digit Mode : 8-bit ASCII with MSB = 0
  1.2874 +
  1.2875 +// Address Information, Number Mode, as defined in 3GPP2 C.S0015-A v2.0, sec 3.4.3.3
  1.2876 +this.PDU_CDMA_MSG_ADDR_NUMBER_MODE_ANSI = 0x00;     // Number Mode : ANSI T1.607-2000(R2004)
  1.2877 +this.PDU_CDMA_MSG_ADDR_NUMBER_MODE_ASCII = 0x01;    // Number Mode : Data network address format
  1.2878 +
  1.2879 +// Address Information, Number Type, as defined in 3GPP2 C.S0015-A v2.0, Table 3.4.3.3-1
  1.2880 +this.PDU_CDMA_MSG_ADDR_NUMBER_TYPE_UNKNOWN = 0x00;        // Number Type : Unknown
  1.2881 +this.PDU_CDMA_MSG_ADDR_NUMBER_TYPE_INTERNATIONAL = 0x01;  // Number Type : Internaltional number(+XXXXX)
  1.2882 +this.PDU_CDMA_MSG_ADDR_NUMBER_TYPE_NATIONAL = 0x02;       // Number Type : National number
  1.2883 +
  1.2884 +// Address Information, Number Plan, as defined in 3GPP2 C.S0005-D v2.0, Table 2.7.1.3.2.4-3
  1.2885 +this.PDU_CDMA_MSG_ADDR_NUMBER_PLAN_UNKNOWN = 0x00;  // Number Plan : Unknown
  1.2886 +this.PDU_CDMA_MSG_ADDR_NUMBER_PLAN_ISDN = 0x01;     // Number Plan : ISDN/Telephony numbering plan
  1.2887 +
  1.2888 +// SMS Encoding, as defined in 3GPP2 C.R1001-D, Table 9.1-1
  1.2889 +this.PDU_CDMA_MSG_CODING_OCTET = 0x00;        // octet(8-bit), Not tested
  1.2890 +this.PDU_CDMA_MSG_CODING_IS_91 = 0x01;        // IS-91 Extended Protocol Message(variable), Not tested
  1.2891 +this.PDU_CDMA_MSG_CODING_7BITS_ASCII = 0x02;  // 7-bit ASCII(7-bit)
  1.2892 +this.PDU_CDMA_MSG_CODING_IA5 = 0x03;          // IA5(7-bit), Not tested
  1.2893 +this.PDU_CDMA_MSG_CODING_UNICODE = 0x04;      // Unicode(16-bit)
  1.2894 +this.PDU_CDMA_MSG_CODING_SHIFT_JIS = 0x05;    // Shift-6 JIS(8/16-bit variable), Not supported
  1.2895 +this.PDU_CDMA_MSG_CODING_KOREAN = 0x06;       // Korean(8/16-bit variable), Not supported
  1.2896 +this.PDU_CDMA_MSG_CODING_LATIN_HEBREW = 0x07; // Latin/ Hebrew(8-bit), ISO/IEC 8859-8, Not supported
  1.2897 +this.PDU_CDMA_MSG_CODING_LATIN = 0x08;        // Latin(8-bit), ISO/IEC 8859-1, Not tested
  1.2898 +this.PDU_CDMA_MSG_CODING_7BITS_GSM = 0x09;    // GSM 7-bit default alphabet(7-bit), Not tested
  1.2899 +this.PDU_CDMA_MSG_CODING_GSM_DCS = 0x0A;      // GSM Data-Coding-Scheme, Not supported
  1.2900 +
  1.2901 +// SMS Message Type, as defined in 3GPP2 C.S0015-A v2.0, Table 4.5.1-1
  1.2902 +this.PDU_CDMA_MSG_TYPE_DELIVER     = 0x01;         // Deliver
  1.2903 +this.PDU_CDMA_MSG_TYPE_SUBMIT      = 0x02;         // Submit
  1.2904 +this.PDU_CDMA_MSG_TYPE_DELIVER_ACK = 0x04;         // Delivery Acknowledgment
  1.2905 +
  1.2906 +// SMS User Data Subparameters, as defined in 3GPP2 C.S0015-A v2.0, Table 4.5-1
  1.2907 +this.PDU_CDMA_MSG_USERDATA_MSG_ID          = 0x00;  // Message Identifier
  1.2908 +this.PDU_CDMA_MSG_USERDATA_BODY            = 0x01;  // User Data Body
  1.2909 +this.PDU_CDMA_MSG_USERDATA_TIMESTAMP       = 0x03;  // Message Center Time Stamp
  1.2910 +this.PDU_CDMA_MSG_USERDATA_REPLY_OPTION    = 0x0A;  // Reply Option
  1.2911 +this.PDU_CDMA_LANGUAGE_INDICATOR           = 0x0D;  // Language Indicator
  1.2912 +this.PDU_CDMA_MSG_USERDATA_CALLBACK_NUMBER = 0x0E;  // Callback Number
  1.2913 +this.PDU_CDMA_MSG_USER_DATA_MSG_STATUS     = 0x14;  // Message Status
  1.2914 +
  1.2915 +// CDMA Language Indicator: Language groups
  1.2916 +// see 3GPP2 C.R1001-F table 9.2-1
  1.2917 +this.CB_CDMA_LANG_GROUP = [
  1.2918 +  null, "en", "fr", "es", "ja", "ko", "zh", "he"
  1.2919 +];
  1.2920 +
  1.2921 +// IS-91 Message Type, as defined in TIA/EIA/IS-91-A, Table 9
  1.2922 +this.PDU_CDMA_MSG_CODING_IS_91_TYPE_VOICEMAIL_STATUS = 0x82;
  1.2923 +this.PDU_CDMA_MSG_CODING_IS_91_TYPE_SMS_FULL = 0x83;
  1.2924 +this.PDU_CDMA_MSG_CODING_IS_91_TYPE_CLI = 0x84;
  1.2925 +this.PDU_CDMA_MSG_CODING_IS_91_TYPE_SMS = 0x85;
  1.2926 +
  1.2927 +// CDMA roaming preference mode
  1.2928 +this.CDMA_ROAMING_PREFERENCE_HOME = 0;
  1.2929 +this.CDMA_ROAMING_PREFERENCE_AFFILIATED = 1;
  1.2930 +this.CDMA_ROAMING_PREFERENCE_ANY = 2;
  1.2931 +
  1.2932 +this.GECKO_CDMA_ROAMING_PREFERENCE_HOME = "home";
  1.2933 +this.GECKO_CDMA_ROAMING_PREFERENCE_AFFILIATED = "affiliated";
  1.2934 +this.GECKO_CDMA_ROAMING_PREFERENCE_ANY = "any";
  1.2935 +
  1.2936 +this.CDMA_ROAMING_PREFERENCE_TO_GECKO = [
  1.2937 +  GECKO_CDMA_ROAMING_PREFERENCE_HOME,       // CDMA_ROAMING_PREFERENCE_HOME
  1.2938 +  GECKO_CDMA_ROAMING_PREFERENCE_AFFILIATED, // CDMA_ROAMING_PREFERENCE_AFFILIATED
  1.2939 +  GECKO_CDMA_ROAMING_PREFERENCE_ANY         // CDMA_ROAMING_PREFERENCE_ANY
  1.2940 +];
  1.2941 +
  1.2942 +// Information Record Type, reference from ril.h
  1.2943 +this.PDU_CDMA_INFO_REC_TYPE_DISPLAY = 0;
  1.2944 +this.PDU_CDMA_INFO_REC_TYPE_CALLED_PARTY_NUMBER = 1;
  1.2945 +this.PDU_CDMA_INFO_REC_TYPE_CALLING_PARTY_NUMBER = 2;
  1.2946 +this.PDU_CDMA_INFO_REC_TYPE_CONNECTED_NUMBER =3;
  1.2947 +this.PDU_CDMA_INFO_REC_TYPE_SIGNAL = 4;
  1.2948 +this.PDU_CDMA_INFO_REC_TYPE_REDIRECTING_NUMBER = 5;
  1.2949 +this.PDU_CDMA_INFO_REC_TYPE_LINE_CONTROL = 6;
  1.2950 +this.PDU_CDMA_INFO_REC_TYPE_EXTENDED_DISPLAY = 7;
  1.2951 +this.PDU_CDMA_INFO_REC_TYPE_T53_CLIR = 8;
  1.2952 +this.PDU_CDMA_INFO_REC_TYPE_T53_RELEASE = 9;
  1.2953 +this.PDU_CDMA_INFO_REC_TYPE_T53_AUDIO_CONTROL = 10;
  1.2954 +
  1.2955 +// Display type of extended display of information record,
  1.2956 +// as defined in C.S0005-F v1.0, Table 3.7.5.16-2
  1.2957 +this.INFO_REC_EXTENDED_DISPLAY_BLANK = 0x80;
  1.2958 +this.INFO_REC_EXTENDED_DISPLAY_SKIP = 0x81;
  1.2959 +this.INFO_REC_EXTENDED_DISPLAY_CONTINATION = 0x82;
  1.2960 +this.INFO_REC_EXTENDED_DISPLAY_CALLED_ADDRESS = 0x83;
  1.2961 +this.INFO_REC_EXTENDED_DISPLAY_CAUSE = 0x84;
  1.2962 +this.INFO_REC_EXTENDED_DISPLAY_PROGRESS_INDICATOR = 0x85;
  1.2963 +this.INFO_REC_EXTENDED_DISPLAY_NOTIFICATION_INDICATOR = 0x86;
  1.2964 +this.INFO_REC_EXTENDED_DISPLAY_PROMPT = 0x87;
  1.2965 +this.INFO_REC_EXTENDED_DISPLAY_ACCUMULATED_DIGITS = 0x88;
  1.2966 +this.INFO_REC_EXTENDED_DISPLAY_STATUS = 0x89;
  1.2967 +this.INFO_REC_EXTENDED_DISPLAY_INBAND = 0x8A;
  1.2968 +this.INFO_REC_EXTENDED_DISPLAY_CALLING_ADDRESS = 0x8B;
  1.2969 +this.INFO_REC_EXTENDED_DISPLAY_REASON = 0x8C;
  1.2970 +this.INFO_REC_EXTENDED_DISPLAY_CALLING_PARTY_NAME = 0x8D;
  1.2971 +this.INFO_REC_EXTENDED_DISPLAY_CALLED_PARTY_NAME = 0x8E;
  1.2972 +this.INFO_REC_EXTENDED_DISPLAY_ORIGINAL_CALLED_NAME = 0x8F;
  1.2973 +this.INFO_REC_EXTENDED_DISPLAY_REDIRECT_NAME = 0x90;
  1.2974 +this.INFO_REC_EXTENDED_DISPLAY_CONNECTED_NAME = 0x91;
  1.2975 +this.INFO_REC_EXTENDED_DISPLAY_ORIGINATING_RESTRICTIONS = 0x92;
  1.2976 +this.INFO_REC_EXTENDED_DISPLAY_DATE_TIME_OF_DAY = 0x93;
  1.2977 +this.INFO_REC_EXTENDED_DISPLAY_CALL_APPEARANCE_ID = 0x94;
  1.2978 +this.INFO_REC_EXTENDED_DISPLAY_FEATURE_ADDRESS = 0x95;
  1.2979 +this.INFO_REC_EXTENDED_DISPLAY_REDIRECTION_NAME = 0x96;
  1.2980 +this.INFO_REC_EXTENDED_DISPLAY_REDIRECTION_NUMBER = 0x97;
  1.2981 +this.INFO_REC_EXTENDED_DISPLAY_REDIRECTING_NUMBER = 0x98;
  1.2982 +this.INFO_REC_EXTENDED_DISPLAY_ORIGINAL_CALLED_NUMBER = 0x99;
  1.2983 +this.INFO_REC_EXTENDED_DISPLAY_CONNECTED_NUMBER = 0x9A;
  1.2984 +this.INFO_REC_EXTENDED_DISPLAY_TEXT = 0x9B;
  1.2985 +
  1.2986 +/**
  1.2987 + * The table for MCC which the length of MNC is 3
  1.2988 + *
  1.2989 + * This table is built from below links.
  1.2990 + * - http://www.itu.int/pub/T-SP-E.212B-2013
  1.2991 + * - http://en.wikipedia.org/wiki/Mobile_Network_Code
  1.2992 + */
  1.2993 +this.MCC_TABLE_FOR_MNC_LENGTH_IS_3 = [
  1.2994 +  "302",  // Canada
  1.2995 +  "310",  // United States of America
  1.2996 +  "311",  // United States of America
  1.2997 +  "312",  // United States of America
  1.2998 +  "313",  // United States of America
  1.2999 +  "316",  // United States of America
  1.3000 +  "330",  // Puerto Rico
  1.3001 +  "334",  // Mexico
  1.3002 +  "338",  // Jamaica
  1.3003 +  "342",  // Barbados
  1.3004 +  "344",  // Antigua and Barbuda
  1.3005 +  "346",  // Cayman Islands
  1.3006 +  "348",  // British Virgin Islands
  1.3007 +  "350",  // Bermuda
  1.3008 +  "352",  // Grenada
  1.3009 +  "354",  // Montserrat
  1.3010 +  "356",  // Saint Kitts and Nevis
  1.3011 +  "358",  // Saint Lucia
  1.3012 +  "360",  // Saint Vincent and the Grenadines
  1.3013 +  "365",  // Anguilla
  1.3014 +  "366",  // Dominica
  1.3015 +  "376",  // Turks and Caicos Islands
  1.3016 +  "405",  // India
  1.3017 +  "708",  // Honduras
  1.3018 +  "722",  // Argentina
  1.3019 +  "732",  // Colombia
  1.3020 +  "750"   // Falkland Islands (Malvinas)
  1.3021 +];
  1.3022 +
  1.3023 +// Supplementary service notifications, code2, as defined in 3GPP 27.007 7.17
  1.3024 +this.SUPP_SVC_NOTIFICATION_CODE2_PUT_ON_HOLD = 2;
  1.3025 +this.SUPP_SVC_NOTIFICATION_CODE2_RETRIEVED = 3;
  1.3026 +
  1.3027 +this.GECKO_SUPP_SVC_NOTIFICATION_REMOTE_HELD    = "RemoteHeld";
  1.3028 +this.GECKO_SUPP_SVC_NOTIFICATION_REMOTE_RESUMED = "RemoteResumed";
  1.3029 +
  1.3030 +this.GECKO_SUPP_SVC_NOTIFICATION_FROM_CODE2 = {};
  1.3031 +GECKO_SUPP_SVC_NOTIFICATION_FROM_CODE2[SUPP_SVC_NOTIFICATION_CODE2_PUT_ON_HOLD] = GECKO_SUPP_SVC_NOTIFICATION_REMOTE_HELD;
  1.3032 +GECKO_SUPP_SVC_NOTIFICATION_FROM_CODE2[SUPP_SVC_NOTIFICATION_CODE2_RETRIEVED]   = GECKO_SUPP_SVC_NOTIFICATION_REMOTE_RESUMED;
  1.3033 +
  1.3034 +/**
  1.3035 + * The status for an Over-the-Air Service Provisioning / Over-the-Air
  1.3036 + * Parameter Administration (OTASP/OTAPA) session.
  1.3037 + *
  1.3038 + * @see 3GPP2 C.S0016
  1.3039 + */
  1.3040 +this.GECKO_OTA_STATUS_SPL_UNLOCKED          = "spl_unlocked";
  1.3041 +this.GECKO_OTA_STATUS_SPC_RETRIES_EXCEEDED  = "spc_retries_exceeded";
  1.3042 +this.GECKO_OTA_STATUS_A_KEY_EXCHANGED       = "a_key_exchanged";
  1.3043 +this.GECKO_OTA_STATUS_SSD_UPDATED           = "ssd_updated";
  1.3044 +this.GECKO_OTA_STATUS_NAM_DOWNLOADED        = "nam_downloaded";
  1.3045 +this.GECKO_OTA_STATUS_MDN_DOWNLOADED        = "mdn_downloaded";
  1.3046 +this.GECKO_OTA_STATUS_IMSI_DOWNLOADED       = "imsi_downloaded";
  1.3047 +this.GECKO_OTA_STATUS_PRL_DOWNLOADED        = "prl_downloaded";
  1.3048 +this.GECKO_OTA_STATUS_COMMITTED             = "committed";
  1.3049 +this.GECKO_OTA_STATUS_OTAPA_STARTED         = "otapa_started";
  1.3050 +this.GECKO_OTA_STATUS_OTAPA_STOPPED         = "otapa_stopped";
  1.3051 +this.GECKO_OTA_STATUS_OTAPA_ABORTED         = "otapa_aborted";
  1.3052 +this.CDMA_OTA_PROVISION_STATUS_TO_GECKO = [
  1.3053 +  GECKO_OTA_STATUS_SPL_UNLOCKED,
  1.3054 +  GECKO_OTA_STATUS_SPC_RETRIES_EXCEEDED,
  1.3055 +  GECKO_OTA_STATUS_A_KEY_EXCHANGED,
  1.3056 +  GECKO_OTA_STATUS_SSD_UPDATED,
  1.3057 +  GECKO_OTA_STATUS_NAM_DOWNLOADED,
  1.3058 +  GECKO_OTA_STATUS_MDN_DOWNLOADED,
  1.3059 +  GECKO_OTA_STATUS_IMSI_DOWNLOADED,
  1.3060 +  GECKO_OTA_STATUS_PRL_DOWNLOADED,
  1.3061 +  GECKO_OTA_STATUS_COMMITTED,
  1.3062 +  GECKO_OTA_STATUS_OTAPA_STARTED,
  1.3063 +  GECKO_OTA_STATUS_OTAPA_STOPPED,
  1.3064 +  GECKO_OTA_STATUS_OTAPA_ABORTED
  1.3065 +];
  1.3066 +
  1.3067 +// Allow this file to be imported via Components.utils.import().
  1.3068 +this.EXPORTED_SYMBOLS = Object.keys(this);

mercurial