1 /** 2 * Copyright (C) 2010 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /** 18 * variables from ril.h 19 */ 20 21 /** 22 * RIL Error codes 23 */ 24 var RIL_E_SUCCESS = 0; 25 var RIL_E_RADIO_NOT_AVAILABLE = 1; /* If radio did not start or is resetting */ 26 var RIL_E_GENERIC_FAILURE = 2; 27 var RIL_E_PASSWORD_INCORRECT = 3; /* for PIN/PIN2 methods only! */ 28 var RIL_E_SIM_PIN2 = 4; /* Operation requires SIM PIN2 to be entered */ 29 var RIL_E_SIM_PUK2 = 5; /* Operation requires SIM PIN2 to be entered */ 30 var RIL_E_REQUEST_NOT_SUPPORTED = 6; 31 var RIL_E_CANCELLED = 7; 32 var RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8; /* data ops are not allowed during voice 33 call on a Class C GPRS device */ 34 var RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9; /* data ops are not allowed before device 35 registers in network */ 36 var RIL_E_SMS_SEND_FAIL_RETRY = 10; /* fail to send sms and need retry */ 37 var RIL_E_SIM_ABSENT = 11; /* fail to set the location where CDMA subscription 38 shall be retrieved because of SIM or RUIM 39 card absent */ 40 var RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12; /* fail to find CDMA subscription from specified 41 location */ 42 var RIL_E_MODE_NOT_SUPPORTED = 13; /* HW does not support preferred network type */ 43 var RIL_E_FDN_CHECK_FAILURE = 14; /* command failed because recipient is not on FDN 44 list */ 45 var RIL_E_ILLEGAL_SIM_OR_ME = 15; /* network selection failed due to */ 46 47 var CARD_MAX_APPS = 8; 48 49 /** 50 * Icc card state 51 */ 52 var CARDSTATE_ABSENT = 0; 53 var CARDSTATE_PRESENT = 1; 54 var CARDSTATE_ERROR = 2; 55 56 /** 57 * RIL_PersoSubState 58 */ 59 var PERSOSUBSTATE_UNKNOWN = 0; /* initial state */ 60 var PERSOSUBSTATE_IN_PROGRESS = 1; /* in between each lock transition */ 61 var PERSOSUBSTATE_READY = 2; /* when either SIM or RUIM Perso is finished 62 since each app can only have 1 active perso 63 involved */ 64 var PERSOSUBSTATE_SIM_NETWORK = 3; 65 var PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4; 66 var PERSOSUBSTATE_SIM_CORPORATE = 5; 67 var PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6; 68 var PERSOSUBSTATE_SIM_SIM = 7; 69 var PERSOSUBSTATE_SIM_NETWORK_PUK = 8; /* The corresponding perso lock is blocked */ 70 var PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9; 71 var PERSOSUBSTATE_SIM_CORPORATE_PUK = 10; 72 var PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11; 73 var PERSOSUBSTATE_SIM_SIM_PUK = 12; 74 var PERSOSUBSTATE_RUIM_NETWORK1 = 13; 75 var PERSOSUBSTATE_RUIM_NETWORK2 = 14; 76 var PERSOSUBSTATE_RUIM_HRPD = 15; 77 var PERSOSUBSTATE_RUIM_CORPORATE = 16; 78 var PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17; 79 var PERSOSUBSTATE_RUIM_RUIM = 18; 80 var PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19; /* The corresponding perso lock is blocked */ 81 var PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20; 82 var PERSOSUBSTATE_RUIM_HRPD_PUK = 21; 83 var PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22; 84 var PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23; 85 var PERSOSUBSTATE_RUIM_RUIM_PUK = 24; 86 87 /** 88 * RIL_AppState 89 */ 90 var APPSTATE_UNKNOWN = 0; 91 var APPSTATE_DETECTED = 1; 92 var APPSTATE_PIN = 2; /* If PIN1 or UPin is required */ 93 var APPSTATE_PUK = 3; /* If PUK1 or Puk for UPin is required */ 94 var APPSTATE_SUBSCRIPTION_PERSO = 4; /* perso_substate should be look at 95 when app_state is assigned to this value */ 96 var APPSTATE_READY = 5; 97 98 /** 99 * RIL_PinState 100 */ 101 var PINSTATE_UNKNOWN = 0; 102 var PINSTATE_ENABLED_NOT_VERIFIED = 1; 103 var PINSTATE_ENABLED_VERIFIED = 2; 104 var PINSTATE_DISABLED = 3; 105 var PINSTATE_ENABLED_BLOCKED = 4; 106 var PINSTATE_ENABLED_PERM_BLOCKED = 5; 107 108 /** 109 * RIL_AppType 110 */ 111 var APPTYPE_UNKNOWN = 0; 112 var APPTYPE_SIM = 1; 113 var APPTYPE_USIM = 2; 114 var APPTYPE_RUIM = 3; 115 var APPTYPE_CSIM = 4; 116 117 /** 118 * RIL_CallState 119 */ 120 var CALLSTATE_ACTIVE = 0; 121 var CALLSTATE_HOLDING = 1; 122 var CALLSTATE_DIALING = 2; /* MO call only */ 123 var CALLSTATE_ALERTING = 3; /* MO call only */ 124 var CALLSTATE_INCOMING = 4; /* MT call only */ 125 var CALLSTATE_WAITING = 5; /* MT call only */ 126 127 /** 128 * RIL_RadioState 129 */ 130 var RADIOSTATE_OFF = 0; /* Radio explictly powered off (eg CFUN=0) */ 131 var RADIOSTATE_UNAVAILABLE = 1; /* Radio unavailable (eg, resetting or not booted) */ 132 var RADIOSTATE_SIM_NOT_READY = 2; /* Radio is on, but the SIM interface is not ready */ 133 var RADIOSTATE_SIM_LOCKED_OR_ABSENT = 3; /* SIM PIN locked, PUK required, network 134 personalization locked; or SIM absent */ 135 var RADIOSTATE_SIM_READY = 4; /* Radio is on and SIM interface is available */ 136 var RADIOSTATE_RUIM_NOT_READY = 5; /* Radio is on, but the RUIM interface is not ready */ 137 var RADIOSTATE_RUIM_READY = 6; /* Radio is on and the RUIM interface is available */ 138 var RADIOSTATE_RUIM_LOCKED_OR_ABSENT = 7; /* RUIM PIN locked, PUK required, network 139 personalization locked; or RUIM absent */ 140 var RADIOSTATE_NV_NOT_READY = 8; /* Radio is on, but the NV interface is not available */ 141 var RADIOSTATE_NV_READY = 9; /* Radio is on and the NV interface is available */ 142 143 /** 144 * Last call fail cause 145 */ 146 var CALL_FAIL_UNOBTAINABLE_NUMBER = 1; 147 var CALL_FAIL_NORMAL = 16; 148 var CALL_FAIL_BUSY = 17; 149 var CALL_FAIL_CONGESTION = 34; 150 var CALL_FAIL_ACM_LIMIT_EXCEEDED = 68; 151 var CALL_FAIL_CALL_BARRED = 240; 152 var CALL_FAIL_FDN_BLOCKED = 241; 153 var CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242; 154 var CALL_FAIL_IMEI_NOT_ACCEPTED = 243; 155 var CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000; 156 var CALL_FAIL_CDMA_DROP = 1001; 157 var CALL_FAIL_CDMA_INTERCEPT = 1002; 158 var CALL_FAIL_CDMA_REORDER = 1003; 159 var CALL_FAIL_CDMA_SO_REJECT = 1004; 160 var CALL_FAIL_CDMA_RETRY_ORDER = 1005; 161 var CALL_FAIL_CDMA_ACCESS_FAILURE = 1006; 162 var CALL_FAIL_CDMA_PREEMPTED = 1007; 163 var CALL_FAIL_CDMA_NOT_EMERGENCY = 1008; /* For non-emergency number dialed during emergency callback mode */ 164 var CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009; /* CDMA network access probes blocked */ 165 var CALL_FAIL_ERROR_UNSPECIFIED = 0xffff; 166 167 /** 168 * RIL requests 169 */ 170 var RIL_REQUEST_GET_SIM_STATUS = 1 171 var RIL_REQUEST_ENTER_SIM_PIN = 2 172 var RIL_REQUEST_ENTER_SIM_PUK = 3 173 var RIL_REQUEST_ENTER_SIM_PIN2 = 4 174 var RIL_REQUEST_ENTER_SIM_PUK2 = 5 175 var RIL_REQUEST_CHANGE_SIM_PIN = 6 176 var RIL_REQUEST_CHANGE_SIM_PIN2 = 7 177 var RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION = 8 178 var RIL_REQUEST_GET_CURRENT_CALLS = 9 179 var RIL_REQUEST_DIAL = 10 180 var RIL_REQUEST_GET_IMSI = 11 181 var RIL_REQUEST_HANGUP = 12 182 var RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND = 13 183 var RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND = 14 184 var RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE = 15 185 var RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE = 15 186 var RIL_REQUEST_CONFERENCE = 16 187 var RIL_REQUEST_UDUB = 17 188 var RIL_REQUEST_LAST_CALL_FAIL_CAUSE = 18 189 var RIL_REQUEST_SIGNAL_STRENGTH = 19 190 var RIL_REQUEST_VOICE_REGISTRATION_STATE = 20 191 var RIL_REQUEST_DATA_REGISTRATION_STATE = 21 192 var RIL_REQUEST_OPERATOR = 22 193 var RIL_REQUEST_RADIO_POWER = 23 194 var RIL_REQUEST_DTMF = 24 195 var RIL_REQUEST_SEND_SMS = 25 196 var RIL_REQUEST_SEND_SMS_EXPECT_MORE = 26 197 var RIL_REQUEST_SETUP_DATA_CALL = 27 198 var RIL_REQUEST_SIM_IO = 28 199 var RIL_REQUEST_SEND_USSD = 29 200 var RIL_REQUEST_CANCEL_USSD = 30 201 var RIL_REQUEST_GET_CLIR = 31 202 var RIL_REQUEST_SET_CLIR = 32 203 var RIL_REQUEST_QUERY_CALL_FORWARD_STATUS = 33 204 var RIL_REQUEST_SET_CALL_FORWARD = 34 205 var RIL_REQUEST_QUERY_CALL_WAITING = 35 206 var RIL_REQUEST_SET_CALL_WAITING = 36 207 var RIL_REQUEST_SMS_ACKNOWLEDGE = 37 208 var RIL_REQUEST_GET_IMEI = 38 209 var RIL_REQUEST_GET_IMEISV = 39 210 var RIL_REQUEST_ANSWER = 40 211 var RIL_REQUEST_DEACTIVATE_DATA_CALL = 41 212 var RIL_REQUEST_QUERY_FACILITY_LOCK = 42 213 var RIL_REQUEST_SET_FACILITY_LOCK = 43 214 var RIL_REQUEST_CHANGE_BARRING_PASSWORD = 44 215 var RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE = 45 216 var RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC = 46 217 var RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL = 47 218 var RIL_REQUEST_QUERY_AVAILABLE_NETWORKS = 48 219 var RIL_REQUEST_DTMF_START = 49 220 var RIL_REQUEST_DTMF_STOP = 50 221 var RIL_REQUEST_BASEBAND_VERSION = 51 222 var RIL_REQUEST_SEPARATE_CONNECTION = 52 223 var RIL_REQUEST_SET_MUTE = 53 224 var RIL_REQUEST_GET_MUTE = 54 225 var RIL_REQUEST_QUERY_CLIP = 55 226 var RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE = 56 227 var RIL_REQUEST_DATA_CALL_LIST = 57 228 var RIL_REQUEST_RESET_RADIO = 58 229 var RIL_REQUEST_OEM_HOOK_RAW = 59 230 var RIL_REQUEST_OEM_HOOK_STRINGS = 60 231 var RIL_REQUEST_SCREEN_STATE = 61 232 var RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION = 62 233 var RIL_REQUEST_WRITE_SMS_TO_SIM = 63 234 var RIL_REQUEST_DELETE_SMS_ON_SIM = 64 235 var RIL_REQUEST_SET_BAND_MODE = 65 236 var RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE = 66 237 var RIL_REQUEST_STK_GET_PROFILE = 67 238 var RIL_REQUEST_STK_SET_PROFILE = 68 239 var RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND = 69 240 var RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE = 70 241 var RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM = 71 242 var RIL_REQUEST_EXPLICIT_CALL_TRANSFER = 72 243 var RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE = 73 244 var RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE = 74 245 var RIL_REQUEST_GET_NEIGHBORING_CELL_IDS = 75 246 var RIL_REQUEST_SET_LOCATION_UPDATES = 76 247 var RIL_REQUEST_CDMA_SET_SUBSCRIPTION = 77 248 var RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE = 78 249 var RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE = 79 250 var RIL_REQUEST_SET_TTY_MODE = 80 251 var RIL_REQUEST_QUERY_TTY_MODE = 81 252 var RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE = 82 253 var RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE = 83 254 var RIL_REQUEST_CDMA_FLASH = 84 255 var RIL_REQUEST_CDMA_BURST_DTMF = 85 256 var RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY = 86 257 var RIL_REQUEST_CDMA_SEND_SMS = 87 258 var RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE = 88 259 var RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG = 89 260 var RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG = 90 261 var RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION = 91 262 var RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG = 92 263 var RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG = 93 264 var RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION = 94 265 var RIL_REQUEST_CDMA_SUBSCRIPTION = 95 266 var RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM = 96 267 var RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM = 97 268 var RIL_REQUEST_DEVICE_IDENTITY = 98 269 var RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE = 99 270 var RIL_REQUEST_GET_SMSC_ADDRESS = 100 271 var RIL_REQUEST_SET_SMSC_ADDRESS = 101 272 var RIL_REQUEST_REPORT_SMS_MEMORY_STATUS = 102 273 var RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING = 103 274 275 /** 276 * RIL unsolicited requests 277 */ 278 var RIL_UNSOL_RESPONSE_BASE = 1000 279 var RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED = 1000 280 var RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED = 1001 281 var RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED = 1002 282 var RIL_UNSOL_RESPONSE_NEW_SMS = 1003 283 var RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT = 1004 284 var RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM = 1005 285 var RIL_UNSOL_ON_USSD = 1006 286 var RIL_UNSOL_ON_USSD_REQUEST = 1007 287 var RIL_UNSOL_NITZ_TIME_RECEIVED = 1008 288 var RIL_UNSOL_SIGNAL_STRENGTH = 1009 289 var RIL_UNSOL_DATA_CALL_LIST_CHANGED = 1010 290 var RIL_UNSOL_SUPP_SVC_NOTIFICATION = 1011 291 var RIL_UNSOL_STK_SESSION_END = 1012 292 var RIL_UNSOL_STK_PROACTIVE_COMMAND = 1013 293 var RIL_UNSOL_STK_EVENT_NOTIFY = 1014 294 var RIL_UNSOL_STK_CALL_SETUP = 1015 295 var RIL_UNSOL_SIM_SMS_STORAGE_FULL = 1016 296 var RIL_UNSOL_SIM_REFRESH = 1017 297 var RIL_UNSOL_CALL_RING = 1018 298 var RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED = 1019 299 var RIL_UNSOL_RESPONSE_CDMA_NEW_SMS = 1020 300 var RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS = 1021 301 var RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL = 1022 302 var RIL_UNSOL_RESTRICTED_STATE_CHANGED = 1023 303 var RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE = 1024 304 var RIL_UNSOL_CDMA_CALL_WAITING = 1025 305 var RIL_UNSOL_CDMA_OTA_PROVISION_STATUS = 1026 306 var RIL_UNSOL_CDMA_INFO_REC = 1027 307 var RIL_UNSOL_OEM_HOOK_RAW = 1028 308 var RIL_UNSOL_RINGBACK_TONE = 1029 309 var RIL_UNSOL_RESEND_INCALL_MUTE = 1030 310 311 /** 312 * Control commands in ctrl.proto for control server 313 */ 314 var CTRL_CMD_GET_RADIO_STATE = 1 315 var CTRL_CMD_SET_RADIO_STATE = 2 316 317 /** 318 * Control commands in ctrl.proto that will be dispatched to 319 * simulatedRadio or simulatedIcc 320 */ 321 var CTRL_CMD_DISPATH_BASE = 1000 322 var CTRL_CMD_SET_MT_CALL = 1001 323 var CTRL_CMD_HANGUP_CONN_REMOTE = 1002 324 var CTRL_CMD_SET_CALL_TRANSITION_FLAG = 1003 325 var CTRL_CMD_SET_CALL_ALERT = 1004 326 var CTRL_CMD_SET_CALL_ACTIVE = 1005 327 var CTRL_CMD_ADD_DIALING_CALL = 1006 328 329 /* status for control commands, defined in ctrl.proto */ 330 var CTRL_STATUS_OK = 0 331 var CTRL_STATUS_ERR = 1 332 333 /** 334 * Local requests from simulated_radio or simulated_icc 335 */ 336 var CMD_DELAY_TEST = 2000 337 var CMD_UNSOL_SIGNAL_STRENGTH = 2001 338 var CMD_UNSOL_CALL_STATE_CHANGED = 2002 // Send RIL_UNSOL_CALL_STATE_CHANGED 339 var CMD_CALL_STATE_CHANGE = 2003 // call state change: dialing->alert->active 340 var CMD_UNSOL_CALL_RING = 2004 341 342 /** 343 * Other variables 344 */ 345 var OUTGOING = 0; /* outgoing call */ 346 var INCOMING = 1; /* incoming call */ 347