1 /* 2 * Copyright (C) 2006 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 #ifndef ANDROID_RIL_H 18 #define ANDROID_RIL_H 1 19 20 #include <stdlib.h> 21 #include <stdint.h> 22 #include <telephony/ril_cdma_sms.h> 23 #include <telephony/ril_nv_items.h> 24 #include <telephony/ril_msim.h> 25 26 #ifndef FEATURE_UNIT_TEST 27 #include <sys/time.h> 28 #endif /* !FEATURE_UNIT_TEST */ 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 #ifndef SIM_COUNT 35 #if defined(ANDROID_SIM_COUNT_2) 36 #define SIM_COUNT 2 37 #elif defined(ANDROID_SIM_COUNT_3) 38 #define SIM_COUNT 3 39 #elif defined(ANDROID_SIM_COUNT_4) 40 #define SIM_COUNT 4 41 #else 42 #define SIM_COUNT 1 43 #endif 44 45 #ifndef ANDROID_MULTI_SIM 46 #define SIM_COUNT 1 47 #endif 48 #endif 49 50 /* 51 * RIL version. 52 * Value of RIL_VERSION should not be changed in future. Here onwards, 53 * when a new change is supposed to be introduced which could involve new 54 * schemes added like Wakelocks, data structures added/updated, etc, we would 55 * just document RIL version associated with that change below. When OEM updates its 56 * RIL with those changes, they would return that new RIL version during RIL_REGISTER. 57 * We should make use of the returned version by vendor to identify appropriate scheme 58 * or data structure version to use. 59 * 60 * Documentation of RIL version and associated changes 61 * RIL_VERSION = 12 : This version corresponds to updated data structures namely 62 * RIL_Data_Call_Response_v11, RIL_SIM_IO_v6, RIL_CardStatus_v6, 63 * RIL_SimRefreshResponse_v7, RIL_CDMA_CallWaiting_v6, 64 * RIL_LTE_SignalStrength_v8, RIL_SignalStrength_v10, RIL_CellIdentityGsm_v12 65 * RIL_CellIdentityWcdma_v12, RIL_CellIdentityLte_v12,RIL_CellInfoGsm_v12, 66 * RIL_CellInfoWcdma_v12, RIL_CellInfoLte_v12, RIL_CellInfo_v12. 67 * 68 * RIL_VERSION = 13 : This version includes new wakelock semantics and as the first 69 * strongly versioned version it enforces structure use. 70 * 71 * RIL_VERSION = 14 : New data structures are added, namely RIL_CarrierMatchType, 72 * RIL_Carrier, RIL_CarrierRestrictions and RIL_PCO_Data. 73 * New commands added: RIL_REQUEST_SET_CARRIER_RESTRICTIONS, 74 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS and RIL_UNSOL_PCO_DATA. 75 * 76 * RIL_VERSION = 15 : New commands added: 77 * RIL_UNSOL_MODEM_RESTART, 78 * RIL_REQUEST_SEND_DEVICE_STATE, 79 * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER, 80 * RIL_REQUEST_SET_SIM_CARD_POWER, 81 * RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION, 82 * RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION 83 * The new parameters for RIL_REQUEST_SETUP_DATA_CALL, 84 * Updated data structures: RIL_DataProfileInfo_v15, RIL_InitialAttachApn_v15 85 * New data structure RIL_DataRegistrationStateResponse, 86 * RIL_VoiceRegistrationStateResponse same is 87 * used in RIL_REQUEST_DATA_REGISTRATION_STATE and 88 * RIL_REQUEST_VOICE_REGISTRATION_STATE respectively. 89 * New data structure RIL_OpenChannelParams. 90 * RIL_REQUEST_START_NETWORK_SCAN 91 * RIL_REQUEST_STOP_NETWORK_SCAN 92 * RIL_UNSOL_NETWORK_SCAN_RESULT 93 */ 94 #define RIL_VERSION 12 95 #define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name 96 #define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */ 97 98 #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64 99 #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81 100 101 #define MAX_RILDS 3 102 #define MAX_SERVICE_NAME_LENGTH 6 103 #define MAX_CLIENT_ID_LENGTH 2 104 #define MAX_DEBUG_SOCKET_NAME_LENGTH 12 105 #define MAX_QEMU_PIPE_NAME_LENGTH 11 106 #define MAX_UUID_LENGTH 64 107 #define MAX_BANDS 8 108 #define MAX_CHANNELS 32 109 #define MAX_RADIO_ACCESS_NETWORKS 8 110 #define MAX_BROADCAST_SMS_CONFIG_INFO 25 111 112 113 typedef void * RIL_Token; 114 115 typedef enum { 116 RIL_SOCKET_1, 117 #if (SIM_COUNT >= 2) 118 RIL_SOCKET_2, 119 #if (SIM_COUNT >= 3) 120 RIL_SOCKET_3, 121 #endif 122 #if (SIM_COUNT >= 4) 123 RIL_SOCKET_4, 124 #endif 125 #endif 126 RIL_SOCKET_NUM 127 } RIL_SOCKET_ID; 128 129 130 typedef enum { 131 RIL_E_SUCCESS = 0, 132 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */ 133 RIL_E_GENERIC_FAILURE = 2, 134 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */ 135 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */ 136 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */ 137 RIL_E_REQUEST_NOT_SUPPORTED = 6, 138 RIL_E_CANCELLED = 7, 139 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice 140 call on a Class C GPRS device */ 141 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device 142 registers in network */ 143 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */ 144 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription 145 shall be retrieved because of SIM or RUIM 146 card absent */ 147 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified 148 location */ 149 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */ 150 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */ 151 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to 152 illegal SIM or ME */ 153 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */ 154 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */ 155 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */ 156 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */ 157 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different 158 data */ 159 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */ 160 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */ 161 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD 162 request */ 163 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */ 164 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */ 165 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */ 166 RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */ 167 RIL_E_LCE_NOT_SUPPORTED = 36, /* LCE service not supported(36 in RILConstants.java) */ 168 RIL_E_NO_MEMORY = 37, /* Not sufficient memory to process the request */ 169 RIL_E_INTERNAL_ERR = 38, /* Modem hit unexpected error scenario while handling 170 this request */ 171 RIL_E_SYSTEM_ERR = 39, /* Hit platform or system error */ 172 RIL_E_MODEM_ERR = 40, /* Vendor RIL got unexpected or incorrect response 173 from modem for this request */ 174 RIL_E_INVALID_STATE = 41, /* Unexpected request for the current state */ 175 RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */ 176 RIL_E_SIM_ERR = 43, /* Received error from SIM card */ 177 RIL_E_INVALID_ARGUMENTS = 44, /* Received invalid arguments in request */ 178 RIL_E_INVALID_SIM_STATE = 45, /* Can not process the request in current SIM state */ 179 RIL_E_INVALID_MODEM_STATE = 46, /* Can not process the request in current Modem state */ 180 RIL_E_INVALID_CALL_ID = 47, /* Received invalid call id in request */ 181 RIL_E_NO_SMS_TO_ACK = 48, /* ACK received when there is no SMS to ack */ 182 RIL_E_NETWORK_ERR = 49, /* Received error from network */ 183 RIL_E_REQUEST_RATE_LIMITED = 50, /* Operation denied due to overly-frequent requests */ 184 RIL_E_SIM_BUSY = 51, /* SIM is busy */ 185 RIL_E_SIM_FULL = 52, /* The target EF is full */ 186 RIL_E_NETWORK_REJECT = 53, /* Request is rejected by network */ 187 RIL_E_OPERATION_NOT_ALLOWED = 54, /* Not allowed the request now */ 188 RIL_E_EMPTY_RECORD = 55, /* The request record is empty */ 189 RIL_E_INVALID_SMS_FORMAT = 56, /* Invalid sms format */ 190 RIL_E_ENCODING_ERR = 57, /* Message not encoded properly */ 191 RIL_E_INVALID_SMSC_ADDRESS = 58, /* SMSC address specified is invalid */ 192 RIL_E_NO_SUCH_ENTRY = 59, /* No such entry present to perform the request */ 193 RIL_E_NETWORK_NOT_READY = 60, /* Network is not ready to perform the request */ 194 RIL_E_NOT_PROVISIONED = 61, /* Device doesnot have this value provisioned */ 195 RIL_E_NO_SUBSCRIPTION = 62, /* Device doesnot have subscription */ 196 RIL_E_NO_NETWORK_FOUND = 63, /* Network cannot be found */ 197 RIL_E_DEVICE_IN_USE = 64, /* Operation cannot be performed because the device 198 is currently in use */ 199 RIL_E_ABORTED = 65, /* Operation aborted */ 200 RIL_E_INVALID_RESPONSE = 66, /* Invalid response sent by vendor code */ 201 // OEM specific error codes. To be used by OEM when they don't want to reveal 202 // specific error codes which would be replaced by Generic failure. 203 RIL_E_OEM_ERROR_1 = 501, 204 RIL_E_OEM_ERROR_2 = 502, 205 RIL_E_OEM_ERROR_3 = 503, 206 RIL_E_OEM_ERROR_4 = 504, 207 RIL_E_OEM_ERROR_5 = 505, 208 RIL_E_OEM_ERROR_6 = 506, 209 RIL_E_OEM_ERROR_7 = 507, 210 RIL_E_OEM_ERROR_8 = 508, 211 RIL_E_OEM_ERROR_9 = 509, 212 RIL_E_OEM_ERROR_10 = 510, 213 RIL_E_OEM_ERROR_11 = 511, 214 RIL_E_OEM_ERROR_12 = 512, 215 RIL_E_OEM_ERROR_13 = 513, 216 RIL_E_OEM_ERROR_14 = 514, 217 RIL_E_OEM_ERROR_15 = 515, 218 RIL_E_OEM_ERROR_16 = 516, 219 RIL_E_OEM_ERROR_17 = 517, 220 RIL_E_OEM_ERROR_18 = 518, 221 RIL_E_OEM_ERROR_19 = 519, 222 RIL_E_OEM_ERROR_20 = 520, 223 RIL_E_OEM_ERROR_21 = 521, 224 RIL_E_OEM_ERROR_22 = 522, 225 RIL_E_OEM_ERROR_23 = 523, 226 RIL_E_OEM_ERROR_24 = 524, 227 RIL_E_OEM_ERROR_25 = 525 228 } RIL_Errno; 229 230 typedef enum { 231 RIL_CALL_ACTIVE = 0, 232 RIL_CALL_HOLDING = 1, 233 RIL_CALL_DIALING = 2, /* MO call only */ 234 RIL_CALL_ALERTING = 3, /* MO call only */ 235 RIL_CALL_INCOMING = 4, /* MT call only */ 236 RIL_CALL_WAITING = 5 /* MT call only */ 237 } RIL_CallState; 238 239 typedef enum { 240 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */ 241 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */ 242 RADIO_STATE_ON = 10 /* Radio is on */ 243 } RIL_RadioState; 244 245 typedef enum { 246 RADIO_TECH_UNKNOWN = 0, 247 RADIO_TECH_GPRS = 1, 248 RADIO_TECH_EDGE = 2, 249 RADIO_TECH_UMTS = 3, 250 RADIO_TECH_IS95A = 4, 251 RADIO_TECH_IS95B = 5, 252 RADIO_TECH_1xRTT = 6, 253 RADIO_TECH_EVDO_0 = 7, 254 RADIO_TECH_EVDO_A = 8, 255 RADIO_TECH_HSDPA = 9, 256 RADIO_TECH_HSUPA = 10, 257 RADIO_TECH_HSPA = 11, 258 RADIO_TECH_EVDO_B = 12, 259 RADIO_TECH_EHRPD = 13, 260 RADIO_TECH_LTE = 14, 261 RADIO_TECH_HSPAP = 15, // HSPA+ 262 RADIO_TECH_GSM = 16, // Only supports voice 263 RADIO_TECH_TD_SCDMA = 17, 264 RADIO_TECH_IWLAN = 18, 265 RADIO_TECH_LTE_CA = 19 266 } RIL_RadioTechnology; 267 268 typedef enum { 269 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN), 270 RAF_GPRS = (1 << RADIO_TECH_GPRS), 271 RAF_EDGE = (1 << RADIO_TECH_EDGE), 272 RAF_UMTS = (1 << RADIO_TECH_UMTS), 273 RAF_IS95A = (1 << RADIO_TECH_IS95A), 274 RAF_IS95B = (1 << RADIO_TECH_IS95B), 275 RAF_1xRTT = (1 << RADIO_TECH_1xRTT), 276 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0), 277 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A), 278 RAF_HSDPA = (1 << RADIO_TECH_HSDPA), 279 RAF_HSUPA = (1 << RADIO_TECH_HSUPA), 280 RAF_HSPA = (1 << RADIO_TECH_HSPA), 281 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B), 282 RAF_EHRPD = (1 << RADIO_TECH_EHRPD), 283 RAF_LTE = (1 << RADIO_TECH_LTE), 284 RAF_HSPAP = (1 << RADIO_TECH_HSPAP), 285 RAF_GSM = (1 << RADIO_TECH_GSM), 286 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA), 287 RAF_LTE_CA = (1 << RADIO_TECH_LTE_CA) 288 } RIL_RadioAccessFamily; 289 290 typedef enum { 291 BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically) 292 BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000) 293 BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900) 294 BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000) 295 BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000) 296 BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850) 297 BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band) 298 BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band) 299 BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band) 300 BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band) 301 BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band) 302 BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band) 303 BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band) 304 BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band) 305 BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band) 306 BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band) 307 BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band) 308 BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band) 309 BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band) 310 } RIL_RadioBandMode; 311 312 typedef enum { 313 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes 314 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be 315 // forthcoming with these same parameters 316 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned 317 // RIL_RadioCapability.status = 0, if any START's fail no 318 // APPLY will be sent 319 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY 320 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error 321 // occurs in any previous command the RIL_RadioAccessesFamily and 322 // logicalModemUuid fields will be the prior configuration thus 323 // restoring the configuration to the previous value. An error 324 // returned by this command will generally be ignored or may 325 // cause that logical modem to be removed from service. 326 } RadioCapabilityPhase; 327 328 typedef enum { 329 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START, 330 // RC_PHASE_APPLY 331 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio 332 // capability was success with RC_PHASE_FINISH 333 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio 334 // capability is fail with RC_PHASE_FINISH. 335 } RadioCapabilityStatus; 336 337 #define RIL_RADIO_CAPABILITY_VERSION 1 338 typedef struct { 339 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION 340 int session; // Unique session value defined by framework returned in all "responses/unsol" 341 int phase; // CONFIGURED, START, APPLY, FINISH 342 int rat; // RIL_RadioAccessFamily for the radio 343 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem. 344 int status; // Return status and an input parameter for RC_PHASE_FINISH 345 } RIL_RadioCapability; 346 347 // Do we want to split Data from Voice and the use 348 // RIL_RadioTechnology for get/setPreferredVoice/Data ? 349 typedef enum { 350 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */ 351 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */ 352 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */ 353 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */ 354 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */ 355 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */ 356 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */ 357 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */ 358 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */ 359 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */ 360 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */ 361 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */ 362 PREF_NET_TYPE_LTE_WCDMA = 12, /* LTE/WCDMA */ 363 PREF_NET_TYPE_TD_SCDMA_ONLY = 13, /* TD-SCDMA only */ 364 PREF_NET_TYPE_TD_SCDMA_WCDMA = 14, /* TD-SCDMA and WCDMA */ 365 PREF_NET_TYPE_TD_SCDMA_LTE = 15, /* TD-SCDMA and LTE */ 366 PREF_NET_TYPE_TD_SCDMA_GSM = 16, /* TD-SCDMA and GSM */ 367 PREF_NET_TYPE_TD_SCDMA_GSM_LTE = 17, /* TD-SCDMA,GSM and LTE */ 368 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA = 18, /* TD-SCDMA, GSM/WCDMA */ 369 PREF_NET_TYPE_TD_SCDMA_WCDMA_LTE = 19, /* TD-SCDMA, WCDMA and LTE */ 370 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_LTE = 20, /* TD-SCDMA, GSM/WCDMA and LTE */ 371 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_CDMA_EVDO_AUTO = 21, /* TD-SCDMA, GSM/WCDMA, CDMA and EvDo */ 372 PREF_NET_TYPE_TD_SCDMA_LTE_CDMA_EVDO_GSM_WCDMA = 22 /* TD-SCDMA, LTE, CDMA, EvDo GSM/WCDMA */ 373 } RIL_PreferredNetworkType; 374 375 /* Source for cdma subscription */ 376 typedef enum { 377 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0, 378 CDMA_SUBSCRIPTION_SOURCE_NV = 1 379 } RIL_CdmaSubscriptionSource; 380 381 /* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */ 382 typedef enum { 383 RIL_UUS_TYPE1_IMPLICIT = 0, 384 RIL_UUS_TYPE1_REQUIRED = 1, 385 RIL_UUS_TYPE1_NOT_REQUIRED = 2, 386 RIL_UUS_TYPE2_REQUIRED = 3, 387 RIL_UUS_TYPE2_NOT_REQUIRED = 4, 388 RIL_UUS_TYPE3_REQUIRED = 5, 389 RIL_UUS_TYPE3_NOT_REQUIRED = 6 390 } RIL_UUS_Type; 391 392 /* User-to-User Signaling Information data coding schemes. Possible values for 393 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been 394 * specified in section 10.5.4.25 of 3GPP TS 24.008 */ 395 typedef enum { 396 RIL_UUS_DCS_USP = 0, /* User specified protocol */ 397 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */ 398 RIL_UUS_DCS_X244 = 2, /* X.244 */ 399 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement 400 convergence function */ 401 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */ 402 } RIL_UUS_DCS; 403 404 /* User-to-User Signaling Information defined in 3GPP 23.087 v8.0 405 * This data is passed in RIL_ExtensionRecord and rec contains this 406 * structure when type is RIL_UUS_INFO_EXT_REC */ 407 typedef struct { 408 RIL_UUS_Type uusType; /* UUS Type */ 409 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */ 410 int uusLength; /* Length of UUS Data */ 411 char * uusData; /* UUS Data */ 412 } RIL_UUS_Info; 413 414 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */ 415 typedef struct { 416 char isPresent; /* non-zero if signal information record is present */ 417 char signalType; /* as defined 3.7.5.5-1 */ 418 char alertPitch; /* as defined 3.7.5.5-2 */ 419 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */ 420 } RIL_CDMA_SignalInfoRecord; 421 422 typedef struct { 423 RIL_CallState state; 424 int index; /* Connection Index for use with, eg, AT+CHLD */ 425 int toa; /* type of address, eg 145 = intl */ 426 char isMpty; /* nonzero if is mpty call */ 427 char isMT; /* nonzero if call is mobile terminated */ 428 char als; /* ALS line indicator if available 429 (0 = line 1) */ 430 char isVoice; /* nonzero if this is is a voice call */ 431 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */ 432 char * number; /* Remote party number */ 433 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ 434 char * name; /* Remote party name */ 435 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ 436 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */ 437 } RIL_Call; 438 439 /* Deprecated, use RIL_Data_Call_Response_v6 */ 440 typedef struct { 441 int cid; /* Context ID, uniquely identifies this call */ 442 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 443 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 444 For example, "IP", "IPV6", "IPV4V6", or "PPP". */ 445 char * apn; /* ignored */ 446 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */ 447 } RIL_Data_Call_Response_v4; 448 449 /* 450 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST 451 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0. 452 */ 453 typedef struct { 454 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ 455 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry 456 back-off timer value RIL wants to override the one 457 pre-configured in FW. 458 The unit is miliseconds. 459 The value < 0 means no value is suggested. 460 The value 0 means retry should be done ASAP. 461 The value of INT_MAX(0x7fffffff) means no retry. */ 462 int cid; /* Context ID, uniquely identifies this call */ 463 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 464 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 465 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is 466 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported 467 such as "IP" or "IPV6" */ 468 char * ifname; /* The network interface name */ 469 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, 470 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". 471 May not be empty, typically 1 IPv4 or 1 IPv6 or 472 one of each. If the prefix length is absent the addresses 473 are assumed to be point to point with IPv4 having a prefix 474 length of 32 and IPv6 128. */ 475 char * dnses; /* A space-delimited list of DNS server addresses, 476 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 477 May be empty. */ 478 char * gateways; /* A space-delimited list of default gateway addresses, 479 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 480 May be empty in which case the addresses represent point 481 to point connections. */ 482 } RIL_Data_Call_Response_v6; 483 484 typedef struct { 485 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ 486 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry 487 back-off timer value RIL wants to override the one 488 pre-configured in FW. 489 The unit is miliseconds. 490 The value < 0 means no value is suggested. 491 The value 0 means retry should be done ASAP. 492 The value of INT_MAX(0x7fffffff) means no retry. */ 493 int cid; /* Context ID, uniquely identifies this call */ 494 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 495 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 496 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is 497 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported 498 such as "IP" or "IPV6" */ 499 char * ifname; /* The network interface name */ 500 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, 501 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". 502 May not be empty, typically 1 IPv4 or 1 IPv6 or 503 one of each. If the prefix length is absent the addresses 504 are assumed to be point to point with IPv4 having a prefix 505 length of 32 and IPv6 128. */ 506 char * dnses; /* A space-delimited list of DNS server addresses, 507 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 508 May be empty. */ 509 char * gateways; /* A space-delimited list of default gateway addresses, 510 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 511 May be empty in which case the addresses represent point 512 to point connections. */ 513 char * pcscf; /* the Proxy Call State Control Function address 514 via PCO(Protocol Configuration Option) for IMS client. */ 515 } RIL_Data_Call_Response_v9; 516 517 typedef struct { 518 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ 519 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry 520 back-off timer value RIL wants to override the one 521 pre-configured in FW. 522 The unit is miliseconds. 523 The value < 0 means no value is suggested. 524 The value 0 means retry should be done ASAP. 525 The value of INT_MAX(0x7fffffff) means no retry. */ 526 int cid; /* Context ID, uniquely identifies this call */ 527 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 528 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 529 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is 530 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported 531 such as "IP" or "IPV6" */ 532 char * ifname; /* The network interface name */ 533 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, 534 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". 535 May not be empty, typically 1 IPv4 or 1 IPv6 or 536 one of each. If the prefix length is absent the addresses 537 are assumed to be point to point with IPv4 having a prefix 538 length of 32 and IPv6 128. */ 539 char * dnses; /* A space-delimited list of DNS server addresses, 540 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 541 May be empty. */ 542 char * gateways; /* A space-delimited list of default gateway addresses, 543 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 544 May be empty in which case the addresses represent point 545 to point connections. */ 546 char * pcscf; /* the Proxy Call State Control Function address 547 via PCO(Protocol Configuration Option) for IMS client. */ 548 int mtu; /* MTU received from network 549 Value <= 0 means network has either not sent a value or 550 sent an invalid value */ 551 } RIL_Data_Call_Response_v11; 552 553 typedef enum { 554 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */ 555 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */ 556 } RIL_RadioTechnologyFamily; 557 558 typedef struct { 559 RIL_RadioTechnologyFamily tech; 560 unsigned char retry; /* 0 == not retry, nonzero == retry */ 561 int messageRef; /* Valid field if retry is set to nonzero. 562 Contains messageRef from RIL_SMS_Response 563 corresponding to failed MO SMS. 564 */ 565 566 union { 567 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */ 568 RIL_CDMA_SMS_Message* cdmaMessage; 569 570 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */ 571 char** gsmMessage; /* This is an array of pointers where pointers 572 are contiguous but elements pointed by those pointers 573 are not contiguous 574 */ 575 } message; 576 } RIL_IMS_SMS_Message; 577 578 typedef struct { 579 int messageRef; /* TP-Message-Reference for GSM, 580 and BearerData MessageId for CDMA 581 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */ 582 char *ackPDU; /* or NULL if n/a */ 583 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS, 584 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA, 585 -1 if unknown or not applicable*/ 586 } RIL_SMS_Response; 587 588 /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */ 589 typedef struct { 590 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */ 591 /* 0 = "REC UNREAD" */ 592 /* 1 = "REC READ" */ 593 /* 2 = "STO UNSENT" */ 594 /* 3 = "STO SENT" */ 595 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address, 596 the TP-layer length is "strlen(pdu)/2". */ 597 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte 598 (as expected by TS 27.005) or NULL for default SMSC */ 599 } RIL_SMS_WriteArgs; 600 601 /** Used by RIL_REQUEST_DIAL */ 602 typedef struct { 603 char * address; 604 int clir; 605 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR" 606 * clir == 0 on "use subscription default value" 607 * clir == 1 on "CLIR invocation" (restrict CLI presentation) 608 * clir == 2 on "CLIR suppression" (allow CLI presentation) 609 */ 610 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */ 611 } RIL_Dial; 612 613 typedef struct { 614 int command; /* one of the commands listed for TS 27.007 +CRSM*/ 615 int fileid; /* EF id */ 616 char *path; /* "pathid" from TS 27.007 +CRSM command. 617 Path is in hex asciii format eg "7f205f70" 618 Path must always be provided. 619 */ 620 int p1; 621 int p2; 622 int p3; 623 char *data; /* May be NULL*/ 624 char *pin2; /* May be NULL*/ 625 } RIL_SIM_IO_v5; 626 627 typedef struct { 628 int command; /* one of the commands listed for TS 27.007 +CRSM*/ 629 int fileid; /* EF id */ 630 char *path; /* "pathid" from TS 27.007 +CRSM command. 631 Path is in hex asciii format eg "7f205f70" 632 Path must always be provided. 633 */ 634 int p1; 635 int p2; 636 int p3; 637 char *data; /* May be NULL*/ 638 char *pin2; /* May be NULL*/ 639 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */ 640 } RIL_SIM_IO_v6; 641 642 /* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and 643 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */ 644 typedef struct { 645 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be 646 ignored for +CSIM command. */ 647 648 /* Following fields are used to derive the APDU ("command" and "length" 649 values in TS 27.007 +CSIM and +CGLA commands). */ 650 int cla; 651 int instruction; 652 int p1; 653 int p2; 654 int p3; /* A negative P3 implies a 4 byte APDU. */ 655 char *data; /* May be NULL. In hex string format. */ 656 } RIL_SIM_APDU; 657 658 typedef struct { 659 int sw1; 660 int sw2; 661 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION 662 response for which it is in Base64 format, see 3GPP TS 31.102 7.1.2 */ 663 } RIL_SIM_IO_Response; 664 665 /* See also com.android.internal.telephony.gsm.CallForwardInfo */ 666 667 typedef struct { 668 int status; /* 669 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 670 * status 1 = active, 0 = not active 671 * 672 * For RIL_REQUEST_SET_CALL_FORWARD: 673 * status is: 674 * 0 = disable 675 * 1 = enable 676 * 2 = interrogate 677 * 3 = registeration 678 * 4 = erasure 679 */ 680 681 int reason; /* from TS 27.007 7.11 "reason" */ 682 int serviceClass;/* From 27.007 +CCFC/+CLCK "class" 683 See table for Android mapping from 684 MMI service code 685 0 means user doesn't input class */ 686 int toa; /* "type" from TS 27.007 7.11 */ 687 char * number; /* "number" from TS 27.007 7.11. May be NULL */ 688 int timeSeconds; /* for CF no reply only */ 689 }RIL_CallForwardInfo; 690 691 typedef struct { 692 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM. 693 * Upper 16 bits is LAC and lower 16 bits 694 * is CID (as described in TS 27.005) 695 * Primary Scrambling Code (as described in TS 25.331) 696 * in 9 bits in UMTS 697 * Valid values are hexadecimal 0x0000 - 0xffffffff. 698 */ 699 int rssi; /* Received RSSI in GSM, 700 * Level index of CPICH Received Signal Code Power in UMTS 701 */ 702 } RIL_NeighboringCell; 703 704 typedef struct { 705 char lce_status; /* LCE service status: 706 * -1 = not supported; 707 * 0 = stopped; 708 * 1 = active. 709 */ 710 unsigned int actual_interval_ms; /* actual LCE reporting interval, 711 * meaningful only if LCEStatus = 1. 712 */ 713 } RIL_LceStatusInfo; 714 715 typedef struct { 716 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */ 717 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */ 718 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio 719 * moves to inactive state or network type change) 720 * 1 = suspended; 721 * 0 = not suspended. 722 */ 723 } RIL_LceDataInfo; 724 725 typedef enum { 726 RIL_MATCH_ALL = 0, /* Apply to all carriers with the same mcc/mnc */ 727 RIL_MATCH_SPN = 1, /* Use SPN and mcc/mnc to identify the carrier */ 728 RIL_MATCH_IMSI_PREFIX = 2, /* Use IMSI prefix and mcc/mnc to identify the carrier */ 729 RIL_MATCH_GID1 = 3, /* Use GID1 and mcc/mnc to identify the carrier */ 730 RIL_MATCH_GID2 = 4, /* Use GID2 and mcc/mnc to identify the carrier */ 731 } RIL_CarrierMatchType; 732 733 typedef struct { 734 const char * mcc; 735 const char * mnc; 736 RIL_CarrierMatchType match_type; /* Specify match type for the carrier. 737 * If it’s RIL_MATCH_ALL, match_data is null; 738 * otherwise, match_data is the value for the match type. 739 */ 740 const char * match_data; 741 } RIL_Carrier; 742 743 typedef struct { 744 int32_t len_allowed_carriers; /* length of array allowed_carriers */ 745 int32_t len_excluded_carriers; /* length of array excluded_carriers */ 746 RIL_Carrier * allowed_carriers; /* list of allowed carriers */ 747 RIL_Carrier * excluded_carriers; /* list of explicitly excluded carriers 748 * which match allowed_carriers. Eg. allowed_carriers match 749 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1 750 * is ABCD. It means except the carrier whose gid1 is ABCD, 751 * all carriers with the same mcc/mnc are allowed. 752 */ 753 } RIL_CarrierRestrictions; 754 755 typedef struct { 756 char * mcc; /* MCC of the Carrier. */ 757 char * mnc ; /* MNC of the Carrier. */ 758 uint8_t * carrierKey; /* Public Key from the Carrier used to encrypt the 759 * IMSI/IMPI. 760 */ 761 int32_t carrierKeyLength; /* Length of the Public Key. */ 762 char * keyIdentifier; /* The keyIdentifier Attribute value pair that helps 763 * a server locate the private key to decrypt the 764 * permanent identity. 765 */ 766 int64_t expirationTime; /* Date-Time (in UTC) when the key will expire. */ 767 768 } RIL_CarrierInfoForImsiEncryption; 769 770 /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */ 771 typedef enum { 772 CALL_FAIL_UNOBTAINABLE_NUMBER = 1, 773 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3, 774 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6, 775 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8, 776 CALL_FAIL_NORMAL = 16, 777 CALL_FAIL_BUSY = 17, 778 CALL_FAIL_NO_USER_RESPONDING = 18, 779 CALL_FAIL_NO_ANSWER_FROM_USER = 19, 780 CALL_FAIL_CALL_REJECTED = 21, 781 CALL_FAIL_NUMBER_CHANGED = 22, 782 CALL_FAIL_PREEMPTION = 25, 783 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27, 784 CALL_FAIL_INVALID_NUMBER_FORMAT = 28, 785 CALL_FAIL_FACILITY_REJECTED = 29, 786 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30, 787 CALL_FAIL_NORMAL_UNSPECIFIED = 31, 788 CALL_FAIL_CONGESTION = 34, 789 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38, 790 CALL_FAIL_TEMPORARY_FAILURE = 41, 791 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42, 792 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43, 793 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44, 794 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47, 795 CALL_FAIL_QOS_UNAVAILABLE = 49, 796 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50, 797 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55, 798 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57, 799 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58, 800 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63, 801 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65, 802 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68, 803 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69, 804 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70, 805 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79, 806 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81, 807 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87, 808 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88, 809 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91, 810 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95, 811 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96, 812 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97, 813 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98, 814 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99, 815 CALL_FAIL_CONDITIONAL_IE_ERROR = 100, 816 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101, 817 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102, 818 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111, 819 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127, 820 CALL_FAIL_CALL_BARRED = 240, 821 CALL_FAIL_FDN_BLOCKED = 241, 822 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242, 823 CALL_FAIL_IMEI_NOT_ACCEPTED = 243, 824 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */ 825 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245, 826 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246, 827 CALL_FAIL_RADIO_OFF = 247, /* Radio is OFF */ 828 CALL_FAIL_OUT_OF_SERVICE = 248, /* No cellular coverage */ 829 CALL_FAIL_NO_VALID_SIM = 249, /* No valid SIM is present */ 830 CALL_FAIL_RADIO_INTERNAL_ERROR = 250, /* Internal error at Modem */ 831 CALL_FAIL_NETWORK_RESP_TIMEOUT = 251, /* No response from network */ 832 CALL_FAIL_NETWORK_REJECT = 252, /* Explicit network reject */ 833 CALL_FAIL_RADIO_ACCESS_FAILURE = 253, /* RRC connection failure. Eg.RACH */ 834 CALL_FAIL_RADIO_LINK_FAILURE = 254, /* Radio Link Failure */ 835 CALL_FAIL_RADIO_LINK_LOST = 255, /* Radio link lost due to poor coverage */ 836 CALL_FAIL_RADIO_UPLINK_FAILURE = 256, /* Radio uplink failure */ 837 CALL_FAIL_RADIO_SETUP_FAILURE = 257, /* RRC connection setup failure */ 838 CALL_FAIL_RADIO_RELEASE_NORMAL = 258, /* RRC connection release, normal */ 839 CALL_FAIL_RADIO_RELEASE_ABNORMAL = 259, /* RRC connection release, abnormal */ 840 CALL_FAIL_ACCESS_CLASS_BLOCKED = 260, /* Access class barring */ 841 CALL_FAIL_NETWORK_DETACH = 261, /* Explicit network detach */ 842 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000, 843 CALL_FAIL_CDMA_DROP = 1001, 844 CALL_FAIL_CDMA_INTERCEPT = 1002, 845 CALL_FAIL_CDMA_REORDER = 1003, 846 CALL_FAIL_CDMA_SO_REJECT = 1004, 847 CALL_FAIL_CDMA_RETRY_ORDER = 1005, 848 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006, 849 CALL_FAIL_CDMA_PREEMPTED = 1007, 850 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed 851 during emergency callback mode */ 852 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */ 853 854 /* OEM specific error codes. Used to distinguish error from 855 * CALL_FAIL_ERROR_UNSPECIFIED and help assist debugging */ 856 CALL_FAIL_OEM_CAUSE_1 = 0xf001, 857 CALL_FAIL_OEM_CAUSE_2 = 0xf002, 858 CALL_FAIL_OEM_CAUSE_3 = 0xf003, 859 CALL_FAIL_OEM_CAUSE_4 = 0xf004, 860 CALL_FAIL_OEM_CAUSE_5 = 0xf005, 861 CALL_FAIL_OEM_CAUSE_6 = 0xf006, 862 CALL_FAIL_OEM_CAUSE_7 = 0xf007, 863 CALL_FAIL_OEM_CAUSE_8 = 0xf008, 864 CALL_FAIL_OEM_CAUSE_9 = 0xf009, 865 CALL_FAIL_OEM_CAUSE_10 = 0xf00a, 866 CALL_FAIL_OEM_CAUSE_11 = 0xf00b, 867 CALL_FAIL_OEM_CAUSE_12 = 0xf00c, 868 CALL_FAIL_OEM_CAUSE_13 = 0xf00d, 869 CALL_FAIL_OEM_CAUSE_14 = 0xf00e, 870 CALL_FAIL_OEM_CAUSE_15 = 0xf00f, 871 872 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon, 873 vendor code should make sure to map error 874 code to specific error */ 875 } RIL_LastCallFailCause; 876 877 typedef struct { 878 RIL_LastCallFailCause cause_code; 879 char * vendor_cause; 880 } RIL_LastCallFailCauseInfo; 881 882 /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */ 883 typedef enum { 884 PDP_FAIL_NONE = 0, /* No error, connection ok */ 885 886 /* an integer cause code defined in TS 24.008 887 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B. 888 If the implementation does not have access to the exact cause codes, 889 then it should return one of the following values, 890 as the UI layer needs to distinguish these 891 cases for error notification and potential retries. */ 892 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */ 893 PDP_FAIL_NAS_SIGNALLING = 0x0E, 894 PDP_FAIL_LLC_SNDCP = 0x19, 895 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A, 896 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */ 897 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */ 898 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */ 899 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */ 900 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F, 901 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */ 902 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */ 903 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22, 904 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */ 905 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio, 906 based on framework config */ 907 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25, 908 PDP_FAIL_NETWORK_FAILURE = 0x26, 909 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27, 910 PDP_FAIL_FEATURE_NOT_SUPP = 0x28, 911 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29, 912 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A, 913 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B, 914 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C, 915 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D, 916 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E, 917 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */ 918 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */ 919 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34, 920 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35, 921 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36, 922 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37, 923 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41, 924 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42, 925 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51, 926 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F, 927 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60, 928 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61, 929 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62, 930 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63, 931 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64, 932 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65, 933 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */ 934 PDP_FAIL_APN_TYPE_CONFLICT = 0x70, 935 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71, 936 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72, 937 PDP_FAIL_EMM_ACCESS_BARRED = 0x73, 938 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74, 939 PDP_FAIL_IFACE_MISMATCH = 0x75, 940 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76, 941 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77, 942 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78, 943 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79, 944 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A, 945 946 // OEM specific error codes. To be used by OEMs when they don't want to 947 // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED 948 PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001, 949 PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002, 950 PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003, 951 PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004, 952 PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005, 953 PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006, 954 PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007, 955 PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008, 956 PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009, 957 PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A, 958 PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B, 959 PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C, 960 PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D, 961 PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E, 962 PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F, 963 964 /* Not mentioned in the specification */ 965 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1, 966 PDP_FAIL_DATA_REGISTRATION_FAIL = -2, 967 968 /* reasons for data call drop - network/modem disconnect */ 969 PDP_FAIL_SIGNAL_LOST = -3, 970 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry 971 with parameters appropriate for new technology */ 972 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting, 973 powered off - no retry */ 974 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered 975 mode was up on same APN/data profile - no retry until 976 tethered call is off */ 977 978 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as 979 new error codes are added making this unnecessary */ 980 } RIL_DataCallFailCause; 981 982 /* See RIL_REQUEST_SETUP_DATA_CALL */ 983 typedef enum { 984 RIL_DATA_PROFILE_DEFAULT = 0, 985 RIL_DATA_PROFILE_TETHERED = 1, 986 RIL_DATA_PROFILE_IMS = 2, 987 RIL_DATA_PROFILE_FOTA = 3, 988 RIL_DATA_PROFILE_CBS = 4, 989 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */ 990 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF 991 } RIL_DataProfile; 992 993 /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */ 994 typedef struct { 995 int notificationType; /* 996 * 0 = MO intermediate result code 997 * 1 = MT unsolicited result code 998 */ 999 int code; /* See 27.007 7.17 1000 "code1" for MO 1001 "code2" for MT. */ 1002 int index; /* CUG index. See 27.007 7.17. */ 1003 int type; /* "type" from 27.007 7.17 (MT only). */ 1004 char * number; /* "number" from 27.007 7.17 1005 (MT only, may be NULL). */ 1006 } RIL_SuppSvcNotification; 1007 1008 #define RIL_CARD_MAX_APPS 8 1009 1010 typedef enum { 1011 RIL_CARDSTATE_ABSENT = 0, 1012 RIL_CARDSTATE_PRESENT = 1, 1013 RIL_CARDSTATE_ERROR = 2, 1014 RIL_CARDSTATE_RESTRICTED = 3 /* card is present but not usable due to carrier restrictions.*/ 1015 } RIL_CardState; 1016 1017 typedef enum { 1018 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */ 1019 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */ 1020 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished 1021 since each app can only have 1 active perso 1022 involved */ 1023 RIL_PERSOSUBSTATE_SIM_NETWORK = 3, 1024 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4, 1025 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5, 1026 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6, 1027 RIL_PERSOSUBSTATE_SIM_SIM = 7, 1028 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */ 1029 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9, 1030 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10, 1031 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11, 1032 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12, 1033 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13, 1034 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14, 1035 RIL_PERSOSUBSTATE_RUIM_HRPD = 15, 1036 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16, 1037 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17, 1038 RIL_PERSOSUBSTATE_RUIM_RUIM = 18, 1039 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */ 1040 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20, 1041 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21, 1042 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22, 1043 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23, 1044 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24 1045 } RIL_PersoSubstate; 1046 1047 typedef enum { 1048 RIL_APPSTATE_UNKNOWN = 0, 1049 RIL_APPSTATE_DETECTED = 1, 1050 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */ 1051 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */ 1052 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at 1053 when app_state is assigned to this value */ 1054 RIL_APPSTATE_READY = 5 1055 } RIL_AppState; 1056 1057 typedef enum { 1058 RIL_PINSTATE_UNKNOWN = 0, 1059 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1, 1060 RIL_PINSTATE_ENABLED_VERIFIED = 2, 1061 RIL_PINSTATE_DISABLED = 3, 1062 RIL_PINSTATE_ENABLED_BLOCKED = 4, 1063 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5 1064 } RIL_PinState; 1065 1066 typedef enum { 1067 RIL_APPTYPE_UNKNOWN = 0, 1068 RIL_APPTYPE_SIM = 1, 1069 RIL_APPTYPE_USIM = 2, 1070 RIL_APPTYPE_RUIM = 3, 1071 RIL_APPTYPE_CSIM = 4, 1072 RIL_APPTYPE_ISIM = 5 1073 } RIL_AppType; 1074 1075 /* 1076 * Please note that registration state UNKNOWN is 1077 * treated as "out of service" in the Android telephony. 1078 * Registration state REG_DENIED must be returned if Location Update 1079 * Reject (with cause 17 - Network Failure) is received 1080 * repeatedly from the network, to facilitate 1081 * "managed roaming" 1082 */ 1083 typedef enum { 1084 RIL_NOT_REG_AND_NOT_SEARCHING = 0, // Not registered, MT is not currently searching 1085 // a new operator to register 1086 RIL_REG_HOME = 1, // Registered, home network 1087 RIL_NOT_REG_AND_SEARCHING = 2, // Not registered, but MT is currently searching 1088 // a new operator to register 1089 RIL_REG_DENIED = 3, // Registration denied 1090 RIL_UNKNOWN = 4, // Unknown 1091 RIL_REG_ROAMING = 5, // Registered, roaming 1092 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_NOT_SEARCHING = 10, // Same as 1093 // RIL_NOT_REG_AND_NOT_SEARCHING but indicates that 1094 // emergency calls are enabled. 1095 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_SEARCHING = 12, // Same as RIL_NOT_REG_AND_SEARCHING 1096 // but indicates that 1097 // emergency calls are enabled. 1098 RIL_REG_DENIED_AND_EMERGENCY_AVAILABLE = 13, // Same as REG_DENIED but indicates that 1099 // emergency calls are enabled. 1100 RIL_UNKNOWN_AND_EMERGENCY_AVAILABLE = 14, // Same as UNKNOWN but indicates that 1101 // emergency calls are enabled. 1102 } RIL_RegState; 1103 1104 typedef struct 1105 { 1106 RIL_AppType app_type; 1107 RIL_AppState app_state; 1108 RIL_PersoSubstate perso_substate; /* applicable only if app_state == 1109 RIL_APPSTATE_SUBSCRIPTION_PERSO */ 1110 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41, 1111 0x30, 0x30, 0x30 */ 1112 char *app_label_ptr; /* null terminated string */ 1113 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */ 1114 RIL_PinState pin1; 1115 RIL_PinState pin2; 1116 } RIL_AppStatus; 1117 1118 /* Deprecated, use RIL_CardStatus_v6 */ 1119 typedef struct 1120 { 1121 RIL_CardState card_state; 1122 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ 1123 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 1124 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 1125 int num_applications; /* value <= RIL_CARD_MAX_APPS */ 1126 RIL_AppStatus applications[RIL_CARD_MAX_APPS]; 1127 } RIL_CardStatus_v5; 1128 1129 typedef struct 1130 { 1131 RIL_CardState card_state; 1132 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ 1133 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 1134 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 1135 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 1136 int num_applications; /* value <= RIL_CARD_MAX_APPS */ 1137 RIL_AppStatus applications[RIL_CARD_MAX_APPS]; 1138 } RIL_CardStatus_v6; 1139 1140 /** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH 1141 * or as part of RIL_SimRefreshResponse_v7 1142 */ 1143 typedef enum { 1144 /* A file on SIM has been updated. data[1] contains the EFID. */ 1145 SIM_FILE_UPDATE = 0, 1146 /* SIM initialized. All files should be re-read. */ 1147 SIM_INIT = 1, 1148 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */ 1149 SIM_RESET = 2 1150 } RIL_SimRefreshResult; 1151 1152 typedef struct { 1153 RIL_SimRefreshResult result; 1154 int ef_id; /* is the EFID of the updated file if the result is */ 1155 /* SIM_FILE_UPDATE or 0 for any other result. */ 1156 char * aid; /* is AID(application ID) of the card application */ 1157 /* See ETSI 102.221 8.1 and 101.220 4 */ 1158 /* For SIM_FILE_UPDATE result it can be set to AID of */ 1159 /* application in which updated EF resides or it can be */ 1160 /* NULL if EF is outside of an application. */ 1161 /* For SIM_INIT result this field is set to AID of */ 1162 /* application that caused REFRESH */ 1163 /* For SIM_RESET result it is NULL. */ 1164 } RIL_SimRefreshResponse_v7; 1165 1166 /* Deprecated, use RIL_CDMA_CallWaiting_v6 */ 1167 typedef struct { 1168 char * number; /* Remote party number */ 1169 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ 1170 char * name; /* Remote party name */ 1171 RIL_CDMA_SignalInfoRecord signalInfoRecord; 1172 } RIL_CDMA_CallWaiting_v5; 1173 1174 typedef struct { 1175 char * number; /* Remote party number */ 1176 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ 1177 char * name; /* Remote party name */ 1178 RIL_CDMA_SignalInfoRecord signalInfoRecord; 1179 /* Number type/Number plan required to support International Call Waiting */ 1180 int number_type; /* 0=Unknown, 1=International, 2=National, 1181 3=Network specific, 4=subscriber */ 1182 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */ 1183 } RIL_CDMA_CallWaiting_v6; 1184 1185 /** 1186 * Which types of Cell Broadcast Message (CBM) are to be received by the ME 1187 * 1188 * uFromServiceID - uToServiceID defines a range of CBM message identifiers 1189 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS 1190 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty 1191 * CBM message ID. 1192 * 1193 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes 1194 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS 1195 * and 9.4.4.2.3 for UMTS. 1196 * All other values can be treated as empty CBM data coding scheme. 1197 * 1198 * selected 0 means message types specified in <fromServiceId, toServiceId> 1199 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted. 1200 * 1201 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and 1202 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG. 1203 */ 1204 typedef struct { 1205 int fromServiceId; 1206 int toServiceId; 1207 int fromCodeScheme; 1208 int toCodeScheme; 1209 unsigned char selected; 1210 } RIL_GSM_BroadcastSmsConfigInfo; 1211 1212 /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */ 1213 #define RIL_RESTRICTED_STATE_NONE 0x00 1214 /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */ 1215 #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01 1216 /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */ 1217 #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02 1218 /* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/ 1219 #define RIL_RESTRICTED_STATE_CS_ALL 0x04 1220 /* Block packet data access due to restriction. */ 1221 #define RIL_RESTRICTED_STATE_PS_ALL 0x10 1222 1223 /* The status for an OTASP/OTAPA session */ 1224 typedef enum { 1225 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED, 1226 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED, 1227 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED, 1228 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED, 1229 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED, 1230 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED, 1231 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED, 1232 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED, 1233 CDMA_OTA_PROVISION_STATUS_COMMITTED, 1234 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED, 1235 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED, 1236 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED 1237 } RIL_CDMA_OTA_ProvisionStatus; 1238 1239 typedef struct { 1240 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 1241 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ 1242 } RIL_GW_SignalStrength; 1243 1244 typedef struct { 1245 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 1246 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ 1247 int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us. 1248 * INT_MAX denotes invalid value */ 1249 } RIL_GSM_SignalStrength_v12; 1250 1251 typedef struct { 1252 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 1253 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ 1254 } RIL_SignalStrengthWcdma; 1255 1256 typedef struct { 1257 int dbm; /* Valid values are positive integers. This value is the actual RSSI value 1258 * multiplied by -1. Example: If the actual RSSI is -75, then this response 1259 * value will be 75. 1260 */ 1261 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied 1262 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value 1263 * will be 125. 1264 */ 1265 } RIL_CDMA_SignalStrength; 1266 1267 1268 typedef struct { 1269 int dbm; /* Valid values are positive integers. This value is the actual RSSI value 1270 * multiplied by -1. Example: If the actual RSSI is -75, then this response 1271 * value will be 75. 1272 */ 1273 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied 1274 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value 1275 * will be 125. 1276 */ 1277 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */ 1278 } RIL_EVDO_SignalStrength; 1279 1280 typedef struct { 1281 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 1282 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1. 1283 * Range: 44 to 140 dBm 1284 * INT_MAX: 0x7FFFFFFF denotes invalid value. 1285 * Reference: 3GPP TS 36.133 9.1.4 */ 1286 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1. 1287 * Range: 20 to 3 dB. 1288 * INT_MAX: 0x7FFFFFFF denotes invalid value. 1289 * Reference: 3GPP TS 36.133 9.1.7 */ 1290 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units. 1291 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). 1292 * INT_MAX : 0x7FFFFFFF denotes invalid value. 1293 * Reference: 3GPP TS 36.101 8.1.1 */ 1294 int cqi; /* The current Channel Quality Indicator. 1295 * Range: 0 to 15. 1296 * INT_MAX : 0x7FFFFFFF denotes invalid value. 1297 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */ 1298 } RIL_LTE_SignalStrength; 1299 1300 typedef struct { 1301 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 1302 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1. 1303 * Range: 44 to 140 dBm 1304 * INT_MAX: 0x7FFFFFFF denotes invalid value. 1305 * Reference: 3GPP TS 36.133 9.1.4 */ 1306 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1. 1307 * Range: 20 to 3 dB. 1308 * INT_MAX: 0x7FFFFFFF denotes invalid value. 1309 * Reference: 3GPP TS 36.133 9.1.7 */ 1310 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units. 1311 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). 1312 * INT_MAX : 0x7FFFFFFF denotes invalid value. 1313 * Reference: 3GPP TS 36.101 8.1.1 */ 1314 int cqi; /* The current Channel Quality Indicator. 1315 * Range: 0 to 15. 1316 * INT_MAX : 0x7FFFFFFF denotes invalid value. 1317 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */ 1318 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device. 1319 * Approximate distance can be calculated using 300m/us * timingAdvance. 1320 * Range: 0 to 0x7FFFFFFE 1321 * INT_MAX : 0x7FFFFFFF denotes invalid value. 1322 * Reference: 3GPP 36.321 section 6.1.3.5 1323 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */ 1324 } RIL_LTE_SignalStrength_v8; 1325 1326 typedef struct { 1327 int rscp; /* The Received Signal Code Power in dBm multipled by -1. 1328 * Range : 25 to 120 1329 * INT_MAX: 0x7FFFFFFF denotes invalid value. 1330 * Reference: 3GPP TS 25.123, section 9.1.1.1 */ 1331 } RIL_TD_SCDMA_SignalStrength; 1332 1333 /* Deprecated, use RIL_SignalStrength_v6 */ 1334 typedef struct { 1335 RIL_GW_SignalStrength GW_SignalStrength; 1336 RIL_CDMA_SignalStrength CDMA_SignalStrength; 1337 RIL_EVDO_SignalStrength EVDO_SignalStrength; 1338 } RIL_SignalStrength_v5; 1339 1340 typedef struct { 1341 RIL_GW_SignalStrength GW_SignalStrength; 1342 RIL_CDMA_SignalStrength CDMA_SignalStrength; 1343 RIL_EVDO_SignalStrength EVDO_SignalStrength; 1344 RIL_LTE_SignalStrength LTE_SignalStrength; 1345 } RIL_SignalStrength_v6; 1346 1347 typedef struct { 1348 RIL_GW_SignalStrength GW_SignalStrength; 1349 RIL_CDMA_SignalStrength CDMA_SignalStrength; 1350 RIL_EVDO_SignalStrength EVDO_SignalStrength; 1351 RIL_LTE_SignalStrength_v8 LTE_SignalStrength; 1352 } RIL_SignalStrength_v8; 1353 1354 typedef struct { 1355 RIL_GW_SignalStrength GW_SignalStrength; 1356 RIL_CDMA_SignalStrength CDMA_SignalStrength; 1357 RIL_EVDO_SignalStrength EVDO_SignalStrength; 1358 RIL_LTE_SignalStrength_v8 LTE_SignalStrength; 1359 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength; 1360 } RIL_SignalStrength_v10; 1361 1362 typedef struct { 1363 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1364 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999; 1365 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)}; 1366 INT_MAX if unknown */ 1367 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 1368 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */ 1369 } RIL_CellIdentityGsm; 1370 1371 typedef struct { 1372 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1373 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999; 1374 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)}; 1375 INT_MAX if unknown */ 1376 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 1377 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */ 1378 int arfcn; /* 16-bit GSM Absolute RF channel number; this value must be reported */ 1379 uint8_t bsic; /* 6-bit Base Station Identity Code; 0xFF if unknown */ 1380 } RIL_CellIdentityGsm_v12; 1381 1382 typedef struct { 1383 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1384 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999; 1385 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)}; 1386 INT_MAX if unknown */ 1387 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 1388 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ 1389 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */ 1390 } RIL_CellIdentityWcdma; 1391 1392 typedef struct { 1393 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1394 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999; 1395 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)}; 1396 INT_MAX if unknown */ 1397 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 1398 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ 1399 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511; this value must be reported */ 1400 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number; this value must be reported */ 1401 } RIL_CellIdentityWcdma_v12; 1402 1403 typedef struct { 1404 int networkId; /* Network Id 0..65535, INT_MAX if unknown */ 1405 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */ 1406 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */ 1407 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. 1408 * It is represented in units of 0.25 seconds and ranges from -2592000 1409 * to 2592000, both values inclusive (corresponding to a range of -180 1410 * to +180 degrees). INT_MAX if unknown */ 1411 1412 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. 1413 * It is represented in units of 0.25 seconds and ranges from -1296000 1414 * to 1296000, both values inclusive (corresponding to a range of -90 1415 * to +90 degrees). INT_MAX if unknown */ 1416 } RIL_CellIdentityCdma; 1417 1418 typedef struct { 1419 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1420 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999; 1421 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)}; 1422 INT_MAX if unknown */ 1423 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */ 1424 int pci; /* physical cell id 0..503, INT_MAX if unknown */ 1425 int tac; /* 16-bit tracking area code, INT_MAX if unknown */ 1426 } RIL_CellIdentityLte; 1427 1428 typedef struct { 1429 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1430 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999; 1431 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)}; 1432 INT_MAX if unknown */ 1433 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */ 1434 int pci; /* physical cell id 0..503; this value must be reported */ 1435 int tac; /* 16-bit tracking area code, INT_MAX if unknown */ 1436 int earfcn; /* 18-bit LTE Absolute RF Channel Number; this value must be reported */ 1437 } RIL_CellIdentityLte_v12; 1438 1439 typedef struct { 1440 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1441 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999; 1442 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)}; 1443 INT_MAX if unknown */ 1444 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 1445 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ 1446 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */ 1447 } RIL_CellIdentityTdscdma; 1448 1449 typedef struct { 1450 RIL_CellIdentityGsm cellIdentityGsm; 1451 RIL_GW_SignalStrength signalStrengthGsm; 1452 } RIL_CellInfoGsm; 1453 1454 typedef struct { 1455 RIL_CellIdentityGsm_v12 cellIdentityGsm; 1456 RIL_GSM_SignalStrength_v12 signalStrengthGsm; 1457 } RIL_CellInfoGsm_v12; 1458 1459 typedef struct { 1460 RIL_CellIdentityWcdma cellIdentityWcdma; 1461 RIL_SignalStrengthWcdma signalStrengthWcdma; 1462 } RIL_CellInfoWcdma; 1463 1464 typedef struct { 1465 RIL_CellIdentityWcdma_v12 cellIdentityWcdma; 1466 RIL_SignalStrengthWcdma signalStrengthWcdma; 1467 } RIL_CellInfoWcdma_v12; 1468 1469 typedef struct { 1470 RIL_CellIdentityCdma cellIdentityCdma; 1471 RIL_CDMA_SignalStrength signalStrengthCdma; 1472 RIL_EVDO_SignalStrength signalStrengthEvdo; 1473 } RIL_CellInfoCdma; 1474 1475 typedef struct { 1476 RIL_CellIdentityLte cellIdentityLte; 1477 RIL_LTE_SignalStrength_v8 signalStrengthLte; 1478 } RIL_CellInfoLte; 1479 1480 typedef struct { 1481 RIL_CellIdentityLte_v12 cellIdentityLte; 1482 RIL_LTE_SignalStrength_v8 signalStrengthLte; 1483 } RIL_CellInfoLte_v12; 1484 1485 typedef struct { 1486 RIL_CellIdentityTdscdma cellIdentityTdscdma; 1487 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma; 1488 } RIL_CellInfoTdscdma; 1489 1490 // Must be the same as CellInfo.TYPE_XXX 1491 typedef enum { 1492 RIL_CELL_INFO_TYPE_NONE = 0, /* indicates no cell information */ 1493 RIL_CELL_INFO_TYPE_GSM = 1, 1494 RIL_CELL_INFO_TYPE_CDMA = 2, 1495 RIL_CELL_INFO_TYPE_LTE = 3, 1496 RIL_CELL_INFO_TYPE_WCDMA = 4, 1497 RIL_CELL_INFO_TYPE_TD_SCDMA = 5 1498 } RIL_CellInfoType; 1499 1500 // Must be the same as CellInfo.TIMESTAMP_TYPE_XXX 1501 typedef enum { 1502 RIL_TIMESTAMP_TYPE_UNKNOWN = 0, 1503 RIL_TIMESTAMP_TYPE_ANTENNA = 1, 1504 RIL_TIMESTAMP_TYPE_MODEM = 2, 1505 RIL_TIMESTAMP_TYPE_OEM_RIL = 3, 1506 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4, 1507 } RIL_TimeStampType; 1508 1509 typedef struct { 1510 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */ 1511 int registered; /* !0 if this cell is registered 0 if not registered */ 1512 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */ 1513 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */ 1514 union { 1515 RIL_CellInfoGsm gsm; 1516 RIL_CellInfoCdma cdma; 1517 RIL_CellInfoLte lte; 1518 RIL_CellInfoWcdma wcdma; 1519 RIL_CellInfoTdscdma tdscdma; 1520 } CellInfo; 1521 } RIL_CellInfo; 1522 1523 typedef struct { 1524 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */ 1525 int registered; /* !0 if this cell is registered 0 if not registered */ 1526 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */ 1527 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */ 1528 union { 1529 RIL_CellInfoGsm_v12 gsm; 1530 RIL_CellInfoCdma cdma; 1531 RIL_CellInfoLte_v12 lte; 1532 RIL_CellInfoWcdma_v12 wcdma; 1533 RIL_CellInfoTdscdma tdscdma; 1534 } CellInfo; 1535 } RIL_CellInfo_v12; 1536 1537 typedef struct { 1538 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */ 1539 union { 1540 RIL_CellIdentityGsm_v12 cellIdentityGsm; 1541 RIL_CellIdentityWcdma_v12 cellIdentityWcdma; 1542 RIL_CellIdentityLte_v12 cellIdentityLte; 1543 RIL_CellIdentityTdscdma cellIdentityTdscdma; 1544 RIL_CellIdentityCdma cellIdentityCdma; 1545 }; 1546 }RIL_CellIdentity_v16; 1547 1548 typedef struct { 1549 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING, 1550 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED, 1551 // UNKNOWN, REG_ROAMING defined in RegState 1552 RIL_RadioTechnology rat; // indicates the available voice radio technology, 1553 // valid values as defined by RadioTechnology. 1554 int32_t cssSupported; // concurrent services support indicator. if 1555 // registered on a CDMA system. 1556 // 0 - Concurrent services not supported, 1557 // 1 - Concurrent services supported 1558 int32_t roamingIndicator; // TSB-58 Roaming Indicator if registered 1559 // on a CDMA or EVDO system or -1 if not. 1560 // Valid values are 0-255. 1561 int32_t systemIsInPrl; // indicates whether the current system is in the 1562 // PRL if registered on a CDMA or EVDO system or -1 if 1563 // not. 0=not in the PRL, 1=in the PRL 1564 int32_t defaultRoamingIndicator; // default Roaming Indicator from the PRL, 1565 // if registered on a CDMA or EVDO system or -1 if not. 1566 // Valid values are 0-255. 1567 int32_t reasonForDenial; // reasonForDenial if registration state is 3 1568 // (Registration denied) this is an enumerated reason why 1569 // registration was denied. See 3GPP TS 24.008, 1570 // 10.5.3.6 and Annex G. 1571 // 0 - General 1572 // 1 - Authentication Failure 1573 // 2 - IMSI unknown in HLR 1574 // 3 - Illegal MS 1575 // 4 - Illegal ME 1576 // 5 - PLMN not allowed 1577 // 6 - Location area not allowed 1578 // 7 - Roaming not allowed 1579 // 8 - No Suitable Cells in this Location Area 1580 // 9 - Network failure 1581 // 10 - Persistent location update reject 1582 // 11 - PLMN not allowed 1583 // 12 - Location area not allowed 1584 // 13 - Roaming not allowed in this Location Area 1585 // 15 - No Suitable Cells in this Location Area 1586 // 17 - Network Failure 1587 // 20 - MAC Failure 1588 // 21 - Sync Failure 1589 // 22 - Congestion 1590 // 23 - GSM Authentication unacceptable 1591 // 25 - Not Authorized for this CSG 1592 // 32 - Service option not supported 1593 // 33 - Requested service option not subscribed 1594 // 34 - Service option temporarily out of order 1595 // 38 - Call cannot be identified 1596 // 48-63 - Retry upon entry into a new cell 1597 // 95 - Semantically incorrect message 1598 // 96 - Invalid mandatory information 1599 // 97 - Message type non-existent or not implemented 1600 // 98 - Message type not compatible with protocol state 1601 // 99 - Information element non-existent or 1602 // not implemented 1603 // 100 - Conditional IE error 1604 // 101 - Message not compatible with protocol state; 1605 RIL_CellIdentity_v16 cellIdentity; // current cell information 1606 }RIL_VoiceRegistrationStateResponse; 1607 1608 1609 typedef struct { 1610 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING, 1611 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED, 1612 // UNKNOWN, REG_ROAMING defined in RegState 1613 RIL_RadioTechnology rat; // indicates the available data radio technology, 1614 // valid values as defined by RadioTechnology. 1615 int32_t reasonDataDenied; // if registration state is 3 (Registration 1616 // denied) this is an enumerated reason why 1617 // registration was denied. See 3GPP TS 24.008, 1618 // Annex G.6 "Additional cause codes for GMM". 1619 // 7 == GPRS services not allowed 1620 // 8 == GPRS services and non-GPRS services not allowed 1621 // 9 == MS identity cannot be derived by the network 1622 // 10 == Implicitly detached 1623 // 14 == GPRS services not allowed in this PLMN 1624 // 16 == MSC temporarily not reachable 1625 // 40 == No PDP context activated 1626 int32_t maxDataCalls; // The maximum number of simultaneous Data Calls that 1627 // must be established using setupDataCall(). 1628 RIL_CellIdentity_v16 cellIdentity; // Current cell information 1629 }RIL_DataRegistrationStateResponse; 1630 1631 /* Names of the CDMA info records (C.S0005 section 3.7.5) */ 1632 typedef enum { 1633 RIL_CDMA_DISPLAY_INFO_REC, 1634 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC, 1635 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC, 1636 RIL_CDMA_CONNECTED_NUMBER_INFO_REC, 1637 RIL_CDMA_SIGNAL_INFO_REC, 1638 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC, 1639 RIL_CDMA_LINE_CONTROL_INFO_REC, 1640 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC, 1641 RIL_CDMA_T53_CLIR_INFO_REC, 1642 RIL_CDMA_T53_RELEASE_INFO_REC, 1643 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC 1644 } RIL_CDMA_InfoRecName; 1645 1646 /* Display Info Rec as defined in C.S0005 section 3.7.5.1 1647 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16 1648 Note: the Extended Display info rec contains multiple records of the 1649 form: display_tag, display_len, and display_len occurrences of the 1650 chari field if the display_tag is not 10000000 or 10000001. 1651 To save space, the records are stored consecutively in a byte buffer. 1652 The display_tag, display_len and chari fields are all 1 byte. 1653 */ 1654 1655 typedef struct { 1656 char alpha_len; 1657 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH]; 1658 } RIL_CDMA_DisplayInfoRecord; 1659 1660 /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2 1661 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3 1662 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4 1663 */ 1664 1665 typedef struct { 1666 char len; 1667 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH]; 1668 char number_type; 1669 char number_plan; 1670 char pi; 1671 char si; 1672 } RIL_CDMA_NumberInfoRecord; 1673 1674 /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */ 1675 typedef enum { 1676 RIL_REDIRECTING_REASON_UNKNOWN = 0, 1677 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1, 1678 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2, 1679 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9, 1680 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10, 1681 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15, 1682 RIL_REDIRECTING_REASON_RESERVED 1683 } RIL_CDMA_RedirectingReason; 1684 1685 typedef struct { 1686 RIL_CDMA_NumberInfoRecord redirectingNumber; 1687 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */ 1688 RIL_CDMA_RedirectingReason redirectingReason; 1689 } RIL_CDMA_RedirectingNumberInfoRecord; 1690 1691 /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */ 1692 typedef struct { 1693 char lineCtrlPolarityIncluded; 1694 char lineCtrlToggle; 1695 char lineCtrlReverse; 1696 char lineCtrlPowerDenial; 1697 } RIL_CDMA_LineControlInfoRecord; 1698 1699 /* T53 CLIR Information Record */ 1700 typedef struct { 1701 char cause; 1702 } RIL_CDMA_T53_CLIRInfoRecord; 1703 1704 /* T53 Audio Control Information Record */ 1705 typedef struct { 1706 char upLink; 1707 char downLink; 1708 } RIL_CDMA_T53_AudioControlInfoRecord; 1709 1710 typedef struct { 1711 1712 RIL_CDMA_InfoRecName name; 1713 1714 union { 1715 /* Display and Extended Display Info Rec */ 1716 RIL_CDMA_DisplayInfoRecord display; 1717 1718 /* Called Party Number, Calling Party Number, Connected Number Info Rec */ 1719 RIL_CDMA_NumberInfoRecord number; 1720 1721 /* Signal Info Rec */ 1722 RIL_CDMA_SignalInfoRecord signal; 1723 1724 /* Redirecting Number Info Rec */ 1725 RIL_CDMA_RedirectingNumberInfoRecord redir; 1726 1727 /* Line Control Info Rec */ 1728 RIL_CDMA_LineControlInfoRecord lineCtrl; 1729 1730 /* T53 CLIR Info Rec */ 1731 RIL_CDMA_T53_CLIRInfoRecord clir; 1732 1733 /* T53 Audio Control Info Rec */ 1734 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl; 1735 } rec; 1736 } RIL_CDMA_InformationRecord; 1737 1738 #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10 1739 1740 typedef struct { 1741 char numberOfInfoRecs; 1742 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS]; 1743 } RIL_CDMA_InformationRecords; 1744 1745 /* See RIL_REQUEST_NV_READ_ITEM */ 1746 typedef struct { 1747 RIL_NV_Item itemID; 1748 } RIL_NV_ReadItem; 1749 1750 /* See RIL_REQUEST_NV_WRITE_ITEM */ 1751 typedef struct { 1752 RIL_NV_Item itemID; 1753 char * value; 1754 } RIL_NV_WriteItem; 1755 1756 typedef enum { 1757 HANDOVER_STARTED = 0, 1758 HANDOVER_COMPLETED = 1, 1759 HANDOVER_FAILED = 2, 1760 HANDOVER_CANCELED = 3 1761 } RIL_SrvccState; 1762 1763 /* hardware configuration reported to RILJ. */ 1764 typedef enum { 1765 RIL_HARDWARE_CONFIG_MODEM = 0, 1766 RIL_HARDWARE_CONFIG_SIM = 1, 1767 } RIL_HardwareConfig_Type; 1768 1769 typedef enum { 1770 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0, 1771 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1, 1772 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2, 1773 } RIL_HardwareConfig_State; 1774 1775 typedef struct { 1776 int rilModel; 1777 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */ 1778 int maxVoice; 1779 int maxData; 1780 int maxStandby; 1781 } RIL_HardwareConfig_Modem; 1782 1783 typedef struct { 1784 char modemUuid[MAX_UUID_LENGTH]; 1785 } RIL_HardwareConfig_Sim; 1786 1787 typedef struct { 1788 RIL_HardwareConfig_Type type; 1789 char uuid[MAX_UUID_LENGTH]; 1790 RIL_HardwareConfig_State state; 1791 union { 1792 RIL_HardwareConfig_Modem modem; 1793 RIL_HardwareConfig_Sim sim; 1794 } cfg; 1795 } RIL_HardwareConfig; 1796 1797 typedef enum { 1798 SS_CFU, 1799 SS_CF_BUSY, 1800 SS_CF_NO_REPLY, 1801 SS_CF_NOT_REACHABLE, 1802 SS_CF_ALL, 1803 SS_CF_ALL_CONDITIONAL, 1804 SS_CLIP, 1805 SS_CLIR, 1806 SS_COLP, 1807 SS_COLR, 1808 SS_WAIT, 1809 SS_BAOC, 1810 SS_BAOIC, 1811 SS_BAOIC_EXC_HOME, 1812 SS_BAIC, 1813 SS_BAIC_ROAMING, 1814 SS_ALL_BARRING, 1815 SS_OUTGOING_BARRING, 1816 SS_INCOMING_BARRING 1817 } RIL_SsServiceType; 1818 1819 typedef enum { 1820 SS_ACTIVATION, 1821 SS_DEACTIVATION, 1822 SS_INTERROGATION, 1823 SS_REGISTRATION, 1824 SS_ERASURE 1825 } RIL_SsRequestType; 1826 1827 typedef enum { 1828 SS_ALL_TELE_AND_BEARER_SERVICES, 1829 SS_ALL_TELESEVICES, 1830 SS_TELEPHONY, 1831 SS_ALL_DATA_TELESERVICES, 1832 SS_SMS_SERVICES, 1833 SS_ALL_TELESERVICES_EXCEPT_SMS 1834 } RIL_SsTeleserviceType; 1835 1836 #define SS_INFO_MAX 4 1837 #define NUM_SERVICE_CLASSES 7 1838 1839 typedef struct { 1840 int numValidIndexes; /* This gives the number of valid values in cfInfo. 1841 For example if voice is forwarded to one number and data 1842 is forwarded to a different one then numValidIndexes will be 1843 2 indicating total number of valid values in cfInfo. 1844 Similarly if all the services are forwarded to the same 1845 number then the value of numValidIndexes will be 1. */ 1846 1847 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data 1848 for SS request to query call 1849 forward status. see 1850 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */ 1851 } RIL_CfData; 1852 1853 typedef struct { 1854 RIL_SsServiceType serviceType; 1855 RIL_SsRequestType requestType; 1856 RIL_SsTeleserviceType teleserviceType; 1857 int serviceClass; 1858 RIL_Errno result; 1859 1860 union { 1861 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET 1862 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns 1863 two ints, so first two values of ssInfo[] will be 1864 used for response if serviceType is SS_CLIR and 1865 requestType is SS_INTERROGATION */ 1866 1867 RIL_CfData cfData; 1868 }; 1869 } RIL_StkCcUnsolSsResponse; 1870 1871 /** 1872 * Data connection power state 1873 */ 1874 typedef enum { 1875 RIL_DC_POWER_STATE_LOW = 1, // Low power state 1876 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state 1877 RIL_DC_POWER_STATE_HIGH = 3, // High power state 1878 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state 1879 } RIL_DcPowerStates; 1880 1881 /** 1882 * Data connection real time info 1883 */ 1884 typedef struct { 1885 uint64_t time; // Time in nanos as returned by ril_nano_time 1886 RIL_DcPowerStates powerState; // Current power state 1887 } RIL_DcRtInfo; 1888 1889 /** 1890 * Data profile to modem 1891 */ 1892 typedef struct { 1893 /* id of the data profile */ 1894 int profileId; 1895 /* the APN to connect to */ 1896 char* apn; 1897 /** one of the PDP_type values in TS 27.007 section 10.1.1. 1898 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 1899 */ 1900 char* protocol; 1901 /** authentication protocol used for this PDP context 1902 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) 1903 */ 1904 int authType; 1905 /* the username for APN, or NULL */ 1906 char* user; 1907 /* the password for APN, or NULL */ 1908 char* password; 1909 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */ 1910 int type; 1911 /* the period in seconds to limit the maximum connections */ 1912 int maxConnsTime; 1913 /* the maximum connections during maxConnsTime */ 1914 int maxConns; 1915 /** the required wait time in seconds after a successful UE initiated 1916 * disconnect of a given PDN connection before the device can send 1917 * a new PDN connection request for that given PDN 1918 */ 1919 int waitTime; 1920 /* true to enable the profile, 0 to disable, 1 to enable */ 1921 int enabled; 1922 } RIL_DataProfileInfo; 1923 1924 typedef struct { 1925 /* id of the data profile */ 1926 int profileId; 1927 /* the APN to connect to */ 1928 char* apn; 1929 /** one of the PDP_type values in TS 27.007 section 10.1.1. 1930 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 1931 */ 1932 char* protocol; 1933 /** one of the PDP_type values in TS 27.007 section 10.1.1 used on roaming network. 1934 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 1935 */ 1936 char *roamingProtocol; 1937 /** authentication protocol used for this PDP context 1938 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) 1939 */ 1940 int authType; 1941 /* the username for APN, or NULL */ 1942 char* user; 1943 /* the password for APN, or NULL */ 1944 char* password; 1945 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */ 1946 int type; 1947 /* the period in seconds to limit the maximum connections */ 1948 int maxConnsTime; 1949 /* the maximum connections during maxConnsTime */ 1950 int maxConns; 1951 /** the required wait time in seconds after a successful UE initiated 1952 * disconnect of a given PDN connection before the device can send 1953 * a new PDN connection request for that given PDN 1954 */ 1955 int waitTime; 1956 /* true to enable the profile, 0 to disable, 1 to enable */ 1957 int enabled; 1958 /* supported APN types bitmask. See RIL_ApnTypes for the value of each bit. */ 1959 int supportedTypesBitmask; 1960 /** the bearer bitmask. See RIL_RadioAccessFamily for the value of each bit. */ 1961 int bearerBitmask; 1962 /** maximum transmission unit (MTU) size in bytes */ 1963 int mtu; 1964 /** the MVNO type: possible values are "imsi", "gid", "spn" */ 1965 char *mvnoType; 1966 /** MVNO match data. Can be anything defined by the carrier. For example, 1967 * SPN like: "A MOBILE", "BEN NL", etc... 1968 * IMSI like: "302720x94", "2060188", etc... 1969 * GID like: "4E", "33", etc... 1970 */ 1971 char *mvnoMatchData; 1972 } RIL_DataProfileInfo_v15; 1973 1974 /* Tx Power Levels */ 1975 #define RIL_NUM_TX_POWER_LEVELS 5 1976 1977 /** 1978 * Aggregate modem activity information 1979 */ 1980 typedef struct { 1981 1982 /* total time (in ms) when modem is in a low power or 1983 * sleep state 1984 */ 1985 uint32_t sleep_mode_time_ms; 1986 1987 /* total time (in ms) when modem is awake but neither 1988 * the transmitter nor receiver are active/awake */ 1989 uint32_t idle_mode_time_ms; 1990 1991 /* total time (in ms) during which the transmitter is active/awake, 1992 * subdivided by manufacturer-defined device-specific 1993 * contiguous increasing ranges of transmit power between 1994 * 0 and the transmitter's maximum transmit power. 1995 */ 1996 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS]; 1997 1998 /* total time (in ms) for which receiver is active/awake and 1999 * the transmitter is inactive */ 2000 uint32_t rx_mode_time_ms; 2001 } RIL_ActivityStatsInfo; 2002 2003 typedef enum { 2004 RIL_APN_TYPE_UNKNOWN = 0x0, // Unknown 2005 RIL_APN_TYPE_DEFAULT = 0x1, // APN type for default data traffic 2006 RIL_APN_TYPE_MMS = 0x2, // APN type for MMS traffic 2007 RIL_APN_TYPE_SUPL = 0x4, // APN type for SUPL assisted GPS 2008 RIL_APN_TYPE_DUN = 0x8, // APN type for DUN traffic 2009 RIL_APN_TYPE_HIPRI = 0x10, // APN type for HiPri traffic 2010 RIL_APN_TYPE_FOTA = 0x20, // APN type for FOTA 2011 RIL_APN_TYPE_IMS = 0x40, // APN type for IMS 2012 RIL_APN_TYPE_CBS = 0x80, // APN type for CBS 2013 RIL_APN_TYPE_IA = 0x100, // APN type for IA Initial Attach APN 2014 RIL_APN_TYPE_EMERGENCY = 0x200, // APN type for Emergency PDN. This is not an IA apn, 2015 // but is used for access to carrier services in an 2016 // emergency call situation. 2017 RIL_APN_TYPE_ALL = 0xFFFFFFFF // All APN types 2018 } RIL_ApnTypes; 2019 2020 typedef enum { 2021 RIL_DST_POWER_SAVE_MODE, // Device power save mode (provided by PowerManager) 2022 // True indicates the device is in power save mode. 2023 RIL_DST_CHARGING_STATE, // Device charging state (provided by BatteryManager) 2024 // True indicates the device is charging. 2025 RIL_DST_LOW_DATA_EXPECTED // Low data expected mode. True indicates low data traffic 2026 // is expected, for example, when the device is idle 2027 // (e.g. not doing tethering in the background). Note 2028 // this doesn't mean no data is expected. 2029 } RIL_DeviceStateType; 2030 2031 typedef enum { 2032 RIL_UR_SIGNAL_STRENGTH = 0x01, // When this bit is set, modem should always send the 2033 // signal strength update through 2034 // RIL_UNSOL_SIGNAL_STRENGTH, otherwise suppress it. 2035 RIL_UR_FULL_NETWORK_STATE = 0x02, // When this bit is set, modem should always send 2036 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 2037 // when any field in 2038 // RIL_REQUEST_VOICE_REGISTRATION_STATE or 2039 // RIL_REQUEST_DATA_REGISTRATION_STATE changes. When 2040 // this bit is not set, modem should suppress 2041 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 2042 // only when insignificant fields change 2043 // (e.g. cell info). 2044 // Modem should continue sending 2045 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 2046 // when significant fields are updated even when this 2047 // bit is not set. The following fields are 2048 // considered significant, registration state and 2049 // radio technology. 2050 RIL_UR_DATA_CALL_DORMANCY_CHANGED = 0x04 // When this bit is set, modem should send the data 2051 // call list changed unsolicited response 2052 // RIL_UNSOL_DATA_CALL_LIST_CHANGED whenever any 2053 // field in RIL_Data_Call_Response changes. 2054 // Otherwise modem should suppress the unsolicited 2055 // response when the only changed field is 'active' 2056 // (for data dormancy). For all other fields change, 2057 // modem should continue sending 2058 // RIL_UNSOL_DATA_CALL_LIST_CHANGED regardless this 2059 // bit is set or not. 2060 } RIL_UnsolicitedResponseFilter; 2061 2062 typedef struct { 2063 char * aidPtr; /* AID value, See ETSI 102.221 and 101.220*/ 2064 int p2; /* P2 parameter (described in ISO 7816-4) 2065 P2Constants:NO_P2 if to be ignored */ 2066 } RIL_OpenChannelParams; 2067 2068 typedef enum { 2069 RIL_ONE_SHOT = 0x01, // Performs the scan only once 2070 RIL_PERIODIC = 0x02 // Performs the scan periodically until cancelled 2071 } RIL_ScanType; 2072 2073 typedef enum { 2074 GERAN = 0x01, // GSM EDGE Radio Access Network 2075 UTRAN = 0x02, // Universal Terrestrial Radio Access Network 2076 EUTRAN = 0x03, // Evolved Universal Terrestrial Radio Access Network 2077 } RIL_RadioAccessNetworks; 2078 2079 typedef enum { 2080 GERAN_BAND_T380 = 1, 2081 GERAN_BAND_T410 = 2, 2082 GERAN_BAND_450 = 3, 2083 GERAN_BAND_480 = 4, 2084 GERAN_BAND_710 = 5, 2085 GERAN_BAND_750 = 6, 2086 GERAN_BAND_T810 = 7, 2087 GERAN_BAND_850 = 8, 2088 GERAN_BAND_P900 = 9, 2089 GERAN_BAND_E900 = 10, 2090 GERAN_BAND_R900 = 11, 2091 GERAN_BAND_DCS1800 = 12, 2092 GERAN_BAND_PCS1900 = 13, 2093 GERAN_BAND_ER900 = 14, 2094 } RIL_GeranBands; 2095 2096 typedef enum { 2097 UTRAN_BAND_1 = 1, 2098 UTRAN_BAND_2 = 2, 2099 UTRAN_BAND_3 = 3, 2100 UTRAN_BAND_4 = 4, 2101 UTRAN_BAND_5 = 5, 2102 UTRAN_BAND_6 = 6, 2103 UTRAN_BAND_7 = 7, 2104 UTRAN_BAND_8 = 8, 2105 UTRAN_BAND_9 = 9, 2106 UTRAN_BAND_10 = 10, 2107 UTRAN_BAND_11 = 11, 2108 UTRAN_BAND_12 = 12, 2109 UTRAN_BAND_13 = 13, 2110 UTRAN_BAND_14 = 14, 2111 UTRAN_BAND_19 = 19, 2112 UTRAN_BAND_20 = 20, 2113 UTRAN_BAND_21 = 21, 2114 UTRAN_BAND_22 = 22, 2115 UTRAN_BAND_25 = 25, 2116 UTRAN_BAND_26 = 26, 2117 } RIL_UtranBands; 2118 2119 typedef enum { 2120 EUTRAN_BAND_1 = 1, 2121 EUTRAN_BAND_2 = 2, 2122 EUTRAN_BAND_3 = 3, 2123 EUTRAN_BAND_4 = 4, 2124 EUTRAN_BAND_5 = 5, 2125 EUTRAN_BAND_6 = 6, 2126 EUTRAN_BAND_7 = 7, 2127 EUTRAN_BAND_8 = 8, 2128 EUTRAN_BAND_9 = 9, 2129 EUTRAN_BAND_10 = 10, 2130 EUTRAN_BAND_11 = 11, 2131 EUTRAN_BAND_12 = 12, 2132 EUTRAN_BAND_13 = 13, 2133 EUTRAN_BAND_14 = 14, 2134 EUTRAN_BAND_17 = 17, 2135 EUTRAN_BAND_18 = 18, 2136 EUTRAN_BAND_19 = 19, 2137 EUTRAN_BAND_20 = 20, 2138 EUTRAN_BAND_21 = 21, 2139 EUTRAN_BAND_22 = 22, 2140 EUTRAN_BAND_23 = 23, 2141 EUTRAN_BAND_24 = 24, 2142 EUTRAN_BAND_25 = 25, 2143 EUTRAN_BAND_26 = 26, 2144 EUTRAN_BAND_27 = 27, 2145 EUTRAN_BAND_28 = 28, 2146 EUTRAN_BAND_30 = 30, 2147 EUTRAN_BAND_31 = 31, 2148 EUTRAN_BAND_33 = 33, 2149 EUTRAN_BAND_34 = 34, 2150 EUTRAN_BAND_35 = 35, 2151 EUTRAN_BAND_36 = 36, 2152 EUTRAN_BAND_37 = 37, 2153 EUTRAN_BAND_38 = 38, 2154 EUTRAN_BAND_39 = 39, 2155 EUTRAN_BAND_40 = 40, 2156 EUTRAN_BAND_41 = 41, 2157 EUTRAN_BAND_42 = 42, 2158 EUTRAN_BAND_43 = 43, 2159 EUTRAN_BAND_44 = 44, 2160 EUTRAN_BAND_45 = 45, 2161 EUTRAN_BAND_46 = 46, 2162 EUTRAN_BAND_47 = 47, 2163 EUTRAN_BAND_48 = 48, 2164 EUTRAN_BAND_65 = 65, 2165 EUTRAN_BAND_66 = 66, 2166 EUTRAN_BAND_68 = 68, 2167 EUTRAN_BAND_70 = 70, 2168 } RIL_EutranBands; 2169 2170 typedef struct { 2171 RIL_RadioAccessNetworks radio_access_network; // The type of network to scan. 2172 uint32_t bands_length; // Length of bands 2173 union { 2174 RIL_GeranBands geran_bands[MAX_BANDS]; 2175 RIL_UtranBands utran_bands[MAX_BANDS]; 2176 RIL_EutranBands eutran_bands[MAX_BANDS]; 2177 } bands; 2178 uint32_t channels_length; // Length of channels 2179 uint32_t channels[MAX_CHANNELS]; // Frequency channels to scan 2180 } RIL_RadioAccessSpecifier; 2181 2182 typedef struct { 2183 RIL_ScanType type; // Type of the scan 2184 int32_t interval; // Time interval in seconds 2185 // between periodic scans, only 2186 // valid when type=RIL_PERIODIC 2187 uint32_t specifiers_length; // Length of specifiers 2188 RIL_RadioAccessSpecifier specifiers[MAX_RADIO_ACCESS_NETWORKS]; // Radio access networks 2189 // with bands/channels. 2190 } RIL_NetworkScanRequest; 2191 2192 typedef enum { 2193 PARTIAL = 0x01, // The result contains a part of the scan results 2194 COMPLETE = 0x02, // The result contains the last part of the scan results 2195 } RIL_ScanStatus; 2196 2197 typedef struct { 2198 RIL_ScanStatus status; // The status of the scan 2199 uint32_t network_infos_length; // Total length of RIL_CellInfo 2200 RIL_CellInfo_v12* network_infos; // List of network information 2201 RIL_Errno error; 2202 } RIL_NetworkScanResult; 2203 2204 /** 2205 * RIL_REQUEST_GET_SIM_STATUS 2206 * 2207 * Requests status of the SIM interface and the SIM card 2208 * 2209 * "data" is NULL 2210 * 2211 * "response" is const RIL_CardStatus_v6 * 2212 * 2213 * Valid errors: 2214 * 2215 * SUCCESS 2216 * RADIO_NOT_AVAILABLE 2217 * INTERNAL_ERR 2218 * NO_MEMORY 2219 * NO_RESOURCES 2220 * CANCELLED 2221 * REQUEST_NOT_SUPPORTED 2222 */ 2223 #define RIL_REQUEST_GET_SIM_STATUS 1 2224 2225 /** 2226 * RIL_REQUEST_ENTER_SIM_PIN 2227 * 2228 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state 2229 * 2230 * "data" is const char ** 2231 * ((const char **)data)[0] is PIN value 2232 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 2233 * 2234 * "response" is int * 2235 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 2236 * 2237 * Valid errors: 2238 * 2239 * SUCCESS 2240 * RADIO_NOT_AVAILABLE (radio resetting) 2241 * PASSWORD_INCORRECT 2242 * INTERNAL_ERR 2243 * NO_MEMORY 2244 * NO_RESOURCES 2245 * CANCELLED 2246 * INVALID_ARGUMENTS 2247 * INVALID_SIM_STATE 2248 * REQUEST_NOT_SUPPORTED 2249 */ 2250 2251 #define RIL_REQUEST_ENTER_SIM_PIN 2 2252 2253 /** 2254 * RIL_REQUEST_ENTER_SIM_PUK 2255 * 2256 * Supplies SIM PUK and new PIN. 2257 * 2258 * "data" is const char ** 2259 * ((const char **)data)[0] is PUK value 2260 * ((const char **)data)[1] is new PIN value 2261 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 2262 * 2263 * "response" is int * 2264 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 2265 * 2266 * Valid errors: 2267 * 2268 * SUCCESS 2269 * RADIO_NOT_AVAILABLE (radio resetting) 2270 * PASSWORD_INCORRECT 2271 * (PUK is invalid) 2272 * INTERNAL_ERR 2273 * NO_MEMORY 2274 * NO_RESOURCES 2275 * CANCELLED 2276 * INVALID_ARGUMENTS 2277 * INVALID_SIM_STATE 2278 * REQUEST_NOT_SUPPORTED 2279 */ 2280 2281 #define RIL_REQUEST_ENTER_SIM_PUK 3 2282 2283 /** 2284 * RIL_REQUEST_ENTER_SIM_PIN2 2285 * 2286 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was 2287 * returned as a a failure from a previous operation. 2288 * 2289 * "data" is const char ** 2290 * ((const char **)data)[0] is PIN2 value 2291 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 2292 * 2293 * "response" is int * 2294 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 2295 * 2296 * Valid errors: 2297 * 2298 * SUCCESS 2299 * RADIO_NOT_AVAILABLE (radio resetting) 2300 * PASSWORD_INCORRECT 2301 * INTERNAL_ERR 2302 * NO_MEMORY 2303 * NO_RESOURCES 2304 * CANCELLED 2305 * INVALID_ARGUMENTS 2306 * INVALID_SIM_STATE 2307 * REQUEST_NOT_SUPPORTED 2308 */ 2309 2310 #define RIL_REQUEST_ENTER_SIM_PIN2 4 2311 2312 /** 2313 * RIL_REQUEST_ENTER_SIM_PUK2 2314 * 2315 * Supplies SIM PUK2 and new PIN2. 2316 * 2317 * "data" is const char ** 2318 * ((const char **)data)[0] is PUK2 value 2319 * ((const char **)data)[1] is new PIN2 value 2320 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 2321 * 2322 * "response" is int * 2323 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 2324 * 2325 * Valid errors: 2326 * 2327 * SUCCESS 2328 * RADIO_NOT_AVAILABLE (radio resetting) 2329 * PASSWORD_INCORRECT 2330 * (PUK2 is invalid) 2331 * INTERNAL_ERR 2332 * NO_MEMORY 2333 * NO_RESOURCES 2334 * CANCELLED 2335 * INVALID_ARGUMENTS 2336 * INVALID_SIM_STATE 2337 * REQUEST_NOT_SUPPORTED 2338 */ 2339 2340 #define RIL_REQUEST_ENTER_SIM_PUK2 5 2341 2342 /** 2343 * RIL_REQUEST_CHANGE_SIM_PIN 2344 * 2345 * Supplies old SIM PIN and new PIN. 2346 * 2347 * "data" is const char ** 2348 * ((const char **)data)[0] is old PIN value 2349 * ((const char **)data)[1] is new PIN value 2350 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 2351 * 2352 * "response" is int * 2353 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 2354 * 2355 * Valid errors: 2356 * 2357 * SUCCESS 2358 * RADIO_NOT_AVAILABLE (radio resetting) 2359 * PASSWORD_INCORRECT 2360 * (old PIN is invalid) 2361 * INTERNAL_ERR 2362 * NO_MEMORY 2363 * NO_RESOURCES 2364 * CANCELLED 2365 * INVALID_ARGUMENTS 2366 * INVALID_SIM_STATE 2367 * REQUEST_NOT_SUPPORTED 2368 */ 2369 2370 #define RIL_REQUEST_CHANGE_SIM_PIN 6 2371 2372 2373 /** 2374 * RIL_REQUEST_CHANGE_SIM_PIN2 2375 * 2376 * Supplies old SIM PIN2 and new PIN2. 2377 * 2378 * "data" is const char ** 2379 * ((const char **)data)[0] is old PIN2 value 2380 * ((const char **)data)[1] is new PIN2 value 2381 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 2382 * 2383 * "response" is int * 2384 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 2385 * 2386 * Valid errors: 2387 * 2388 * SUCCESS 2389 * RADIO_NOT_AVAILABLE (radio resetting) 2390 * PASSWORD_INCORRECT 2391 * (old PIN2 is invalid) 2392 * INTERNAL_ERR 2393 * NO_MEMORY 2394 * NO_RESOURCES 2395 * CANCELLED 2396 * INVALID_ARGUMENTS 2397 * INVALID_SIM_STATE 2398 * REQUEST_NOT_SUPPORTED 2399 * 2400 */ 2401 2402 #define RIL_REQUEST_CHANGE_SIM_PIN2 7 2403 2404 /** 2405 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 2406 * 2407 * Requests that network personlization be deactivated 2408 * 2409 * "data" is const char ** 2410 * ((const char **)(data))[0]] is network depersonlization code 2411 * 2412 * "response" is int * 2413 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 2414 * 2415 * Valid errors: 2416 * 2417 * SUCCESS 2418 * RADIO_NOT_AVAILABLE (radio resetting) 2419 * PASSWORD_INCORRECT 2420 * SIM_ABSENT 2421 * (code is invalid) 2422 * INTERNAL_ERR 2423 * NO_MEMORY 2424 * NO_RESOURCES 2425 * CANCELLED 2426 * REQUEST_NOT_SUPPORTED 2427 */ 2428 2429 #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8 2430 2431 /** 2432 * RIL_REQUEST_GET_CURRENT_CALLS 2433 * 2434 * Requests current call list 2435 * 2436 * "data" is NULL 2437 * 2438 * "response" must be a "const RIL_Call **" 2439 * 2440 * Valid errors: 2441 * 2442 * SUCCESS 2443 * RADIO_NOT_AVAILABLE (radio resetting) 2444 * NO_MEMORY 2445 * (request will be made again in a few hundred msec) 2446 * INTERNAL_ERR 2447 * NO_RESOURCES 2448 * CANCELLED 2449 * REQUEST_NOT_SUPPORTED 2450 */ 2451 2452 #define RIL_REQUEST_GET_CURRENT_CALLS 9 2453 2454 2455 /** 2456 * RIL_REQUEST_DIAL 2457 * 2458 * Initiate voice call 2459 * 2460 * "data" is const RIL_Dial * 2461 * "response" is NULL 2462 * 2463 * This method is never used for supplementary service codes 2464 * 2465 * Valid errors: 2466 * SUCCESS 2467 * RADIO_NOT_AVAILABLE (radio resetting) 2468 * DIAL_MODIFIED_TO_USSD 2469 * DIAL_MODIFIED_TO_SS 2470 * DIAL_MODIFIED_TO_DIAL 2471 * INVALID_ARGUMENTS 2472 * NO_MEMORY 2473 * INVALID_STATE 2474 * NO_RESOURCES 2475 * INTERNAL_ERR 2476 * FDN_CHECK_FAILURE 2477 * MODEM_ERR 2478 * NO_SUBSCRIPTION 2479 * NO_NETWORK_FOUND 2480 * INVALID_CALL_ID 2481 * DEVICE_IN_USE 2482 * OPERATION_NOT_ALLOWED 2483 * ABORTED 2484 * CANCELLED 2485 * REQUEST_NOT_SUPPORTED 2486 */ 2487 #define RIL_REQUEST_DIAL 10 2488 2489 /** 2490 * RIL_REQUEST_GET_IMSI 2491 * 2492 * Get the SIM IMSI 2493 * 2494 * Only valid when radio state is "RADIO_STATE_ON" 2495 * 2496 * "data" is const char ** 2497 * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 2498 * "response" is a const char * containing the IMSI 2499 * 2500 * Valid errors: 2501 * SUCCESS 2502 * RADIO_NOT_AVAILABLE (radio resetting) 2503 * INTERNAL_ERR 2504 * NO_MEMORY 2505 * NO_RESOURCES 2506 * CANCELLED 2507 * INVALID_SIM_STATE 2508 * REQUEST_NOT_SUPPORTED 2509 */ 2510 2511 #define RIL_REQUEST_GET_IMSI 11 2512 2513 /** 2514 * RIL_REQUEST_HANGUP 2515 * 2516 * Hang up a specific line (like AT+CHLD=1x) 2517 * 2518 * After this HANGUP request returns, RIL should show the connection is NOT 2519 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. 2520 * 2521 * "data" is an int * 2522 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) 2523 * 2524 * "response" is NULL 2525 * 2526 * Valid errors: 2527 * SUCCESS 2528 * RADIO_NOT_AVAILABLE (radio resetting) 2529 * INVALID_ARGUMENTS 2530 * NO_MEMORY 2531 * INVALID_STATE 2532 * MODEM_ERR 2533 * INTERNAL_ERR 2534 * NO_MEMORY 2535 * INVALID_CALL_ID 2536 * INVALID_ARGUMENTS 2537 * NO_RESOURCES 2538 * CANCELLED 2539 * REQUEST_NOT_SUPPORTED 2540 */ 2541 2542 #define RIL_REQUEST_HANGUP 12 2543 2544 /** 2545 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 2546 * 2547 * Hang up waiting or held (like AT+CHLD=0) 2548 * 2549 * After this HANGUP request returns, RIL should show the connection is NOT 2550 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. 2551 * 2552 * "data" is NULL 2553 * "response" is NULL 2554 * 2555 * Valid errors: 2556 * SUCCESS 2557 * RADIO_NOT_AVAILABLE (radio resetting) 2558 * INVALID_STATE 2559 * NO_MEMORY 2560 * MODEM_ERR 2561 * INTERNAL_ERR 2562 * NO_MEMORY 2563 * INVALID_CALL_ID 2564 * NO_RESOURCES 2565 * OPERATION_NOT_ALLOWED 2566 * INVALID_ARGUMENTS 2567 * NO_RESOURCES 2568 * CANCELLED 2569 * REQUEST_NOT_SUPPORTED 2570 */ 2571 2572 #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13 2573 2574 /** 2575 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 2576 * 2577 * Hang up waiting or held (like AT+CHLD=1) 2578 * 2579 * After this HANGUP request returns, RIL should show the connection is NOT 2580 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. 2581 * 2582 * "data" is NULL 2583 * "response" is NULL 2584 * 2585 * Valid errors: 2586 * SUCCESS 2587 * RADIO_NOT_AVAILABLE (radio resetting) 2588 * INVALID_STATE 2589 * NO_MEMORY 2590 * MODEM_ERR 2591 * INTERNAL_ERR 2592 * INVALID_CALL_ID 2593 * OPERATION_NOT_ALLOWED 2594 * INVALID_ARGUMENTS 2595 * NO_RESOURCES 2596 * CANCELLED 2597 * REQUEST_NOT_SUPPORTED 2598 */ 2599 2600 #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14 2601 2602 /** 2603 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 2604 * 2605 * Switch waiting or holding call and active call (like AT+CHLD=2) 2606 * 2607 * State transitions should be is follows: 2608 * 2609 * If call 1 is waiting and call 2 is active, then if this re 2610 * 2611 * BEFORE AFTER 2612 * Call 1 Call 2 Call 1 Call 2 2613 * ACTIVE HOLDING HOLDING ACTIVE 2614 * ACTIVE WAITING HOLDING ACTIVE 2615 * HOLDING WAITING HOLDING ACTIVE 2616 * ACTIVE IDLE HOLDING IDLE 2617 * IDLE IDLE IDLE IDLE 2618 * 2619 * "data" is NULL 2620 * "response" is NULL 2621 * 2622 * Valid errors: 2623 * SUCCESS 2624 * RADIO_NOT_AVAILABLE (radio resetting) 2625 * INVALID_STATE 2626 * NO_MEMORY 2627 * MODEM_ERR 2628 * INTERNAL_ERR 2629 * INVALID_STATE 2630 * INVALID_ARGUMENTS 2631 * INVALID_CALL_ID 2632 * OPERATION_NOT_ALLOWED 2633 * NO_RESOURCES 2634 * CANCELLED 2635 * REQUEST_NOT_SUPPORTED 2636 */ 2637 2638 #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15 2639 #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15 2640 2641 /** 2642 * RIL_REQUEST_CONFERENCE 2643 * 2644 * Conference holding and active (like AT+CHLD=3) 2645 2646 * "data" is NULL 2647 * "response" is NULL 2648 * 2649 * Valid errors: 2650 * SUCCESS 2651 * RADIO_NOT_AVAILABLE (radio resetting) 2652 * NO_MEMORY 2653 * MODEM_ERR 2654 * INTERNAL_ERR 2655 * INVALID_STATE 2656 * INVALID_CALL_ID 2657 * INVALID_ARGUMENTS 2658 * OPERATION_NOT_ALLOWED 2659 * NO_RESOURCES 2660 * CANCELLED 2661 * REQUEST_NOT_SUPPORTED 2662 */ 2663 #define RIL_REQUEST_CONFERENCE 16 2664 2665 /** 2666 * RIL_REQUEST_UDUB 2667 * 2668 * Send UDUB (user determined used busy) to ringing or 2669 * waiting call answer)(RIL_BasicRequest r); 2670 * 2671 * "data" is NULL 2672 * "response" is NULL 2673 * 2674 * Valid errors: 2675 * SUCCESS 2676 * RADIO_NOT_AVAILABLE (radio resetting) 2677 * INVALID_STATE 2678 * NO_RESOURCES 2679 * NO_MEMORY 2680 * MODEM_ERR 2681 * INTERNAL_ERR 2682 * INVALID_CALL_ID 2683 * OPERATION_NOT_ALLOWED 2684 * INVALID_ARGUMENTS 2685 * CANCELLED 2686 * REQUEST_NOT_SUPPORTED 2687 */ 2688 #define RIL_REQUEST_UDUB 17 2689 2690 /** 2691 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE 2692 * 2693 * Requests the failure cause code for the most recently terminated call 2694 * 2695 * "data" is NULL 2696 * "response" is a const RIL_LastCallFailCauseInfo * 2697 * RIL_LastCallFailCauseInfo contains LastCallFailCause and vendor cause. 2698 * The vendor cause code must be used for debugging purpose only. 2699 * The implementation must return one of the values of LastCallFailCause 2700 * as mentioned below. 2701 * 2702 * GSM failure reasons codes for the cause codes defined in TS 24.008 Annex H 2703 * where possible. 2704 * CDMA failure reasons codes for the possible call failure scenarios 2705 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard. 2706 * Any of the following reason codes if the call is failed or dropped due to reason 2707 * mentioned with in the braces. 2708 * 2709 * CALL_FAIL_RADIO_OFF (Radio is OFF) 2710 * CALL_FAIL_OUT_OF_SERVICE (No cell coverage) 2711 * CALL_FAIL_NO_VALID_SIM (No valid SIM) 2712 * CALL_FAIL_RADIO_INTERNAL_ERROR (Modem hit unexpected error scenario) 2713 * CALL_FAIL_NETWORK_RESP_TIMEOUT (No response from network) 2714 * CALL_FAIL_NETWORK_REJECT (Explicit network reject) 2715 * CALL_FAIL_RADIO_ACCESS_FAILURE (RRC connection failure. Eg.RACH) 2716 * CALL_FAIL_RADIO_LINK_FAILURE (Radio Link Failure) 2717 * CALL_FAIL_RADIO_LINK_LOST (Radio link lost due to poor coverage) 2718 * CALL_FAIL_RADIO_UPLINK_FAILURE (Radio uplink failure) 2719 * CALL_FAIL_RADIO_SETUP_FAILURE (RRC connection setup failure) 2720 * CALL_FAIL_RADIO_RELEASE_NORMAL (RRC connection release, normal) 2721 * CALL_FAIL_RADIO_RELEASE_ABNORMAL (RRC connection release, abnormal) 2722 * CALL_FAIL_ACCESS_CLASS_BLOCKED (Access class barring) 2723 * CALL_FAIL_NETWORK_DETACH (Explicit network detach) 2724 * 2725 * OEM causes (CALL_FAIL_OEM_CAUSE_XX) must be used for debug purpose only 2726 * 2727 * If the implementation does not have access to the exact cause codes, 2728 * then it should return one of the values listed in RIL_LastCallFailCause, 2729 * as the UI layer needs to distinguish these cases for tone generation or 2730 * error notification. 2731 * 2732 * Valid errors: 2733 * SUCCESS 2734 * RADIO_NOT_AVAILABLE 2735 * NO_MEMORY 2736 * INTERNAL_ERR 2737 * NO_RESOURCES 2738 * CANCELLED 2739 * REQUEST_NOT_SUPPORTED 2740 * 2741 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 2742 */ 2743 #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18 2744 2745 /** 2746 * RIL_REQUEST_SIGNAL_STRENGTH 2747 * 2748 * Requests current signal strength and associated information 2749 * 2750 * Must succeed if radio is on. 2751 * 2752 * "data" is NULL 2753 * 2754 * "response" is a const RIL_SignalStrength * 2755 * 2756 * Valid errors: 2757 * SUCCESS 2758 * RADIO_NOT_AVAILABLE 2759 * NO_MEMORY 2760 * INTERNAL_ERR 2761 * SYSTEM_ERR 2762 * MODEM_ERR 2763 * NOT_PROVISIONED 2764 * REQUEST_NOT_SUPPORTED 2765 * NO_RESOURCES 2766 * CANCELLED 2767 */ 2768 #define RIL_REQUEST_SIGNAL_STRENGTH 19 2769 2770 /** 2771 * RIL_REQUEST_VOICE_REGISTRATION_STATE 2772 * 2773 * Request current registration state 2774 * 2775 * "data" is NULL 2776 * "response" is a const RIL_VoiceRegistrationStateResponse * 2777 * 2778 * Valid errors: 2779 * SUCCESS 2780 * RADIO_NOT_AVAILABLE 2781 * INTERNAL_ERR 2782 * NO_MEMORY 2783 * NO_RESOURCES 2784 * CANCELLED 2785 * REQUEST_NOT_SUPPORTED 2786 */ 2787 #define RIL_REQUEST_VOICE_REGISTRATION_STATE 20 2788 2789 /** 2790 * RIL_REQUEST_DATA_REGISTRATION_STATE 2791 * 2792 * Request current DATA registration state 2793 * 2794 * "data" is NULL 2795 * "response" is a const RIL_DataRegistrationStateResponse * 2796 * 2797 * Valid errors: 2798 * SUCCESS 2799 * RADIO_NOT_AVAILABLE 2800 * NO_MEMORY 2801 * INTERNAL_ERR 2802 * SYSTEM_ERR 2803 * MODEM_ERR 2804 * NOT_PROVISIONED 2805 * REQUEST_NOT_SUPPORTED 2806 * NO_RESOURCES 2807 * CANCELLED 2808 */ 2809 #define RIL_REQUEST_DATA_REGISTRATION_STATE 21 2810 2811 /** 2812 * RIL_REQUEST_OPERATOR 2813 * 2814 * Request current operator ONS or EONS 2815 * 2816 * "data" is NULL 2817 * "response" is a "const char **" 2818 * ((const char **)response)[0] is long alpha ONS or EONS 2819 * or NULL if unregistered 2820 * 2821 * ((const char **)response)[1] is short alpha ONS or EONS 2822 * or NULL if unregistered 2823 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC) 2824 * or NULL if unregistered 2825 * 2826 * Valid errors: 2827 * SUCCESS 2828 * RADIO_NOT_AVAILABLE 2829 * NO_MEMORY 2830 * INTERNAL_ERR 2831 * SYSTEM_ERR 2832 * REQUEST_NOT_SUPPORTED 2833 * NO_RESOURCES 2834 * CANCELLED 2835 */ 2836 #define RIL_REQUEST_OPERATOR 22 2837 2838 /** 2839 * RIL_REQUEST_RADIO_POWER 2840 * 2841 * Toggle radio on and off (for "airplane" mode) 2842 * If the radio is is turned off/on the radio modem subsystem 2843 * is expected return to an initialized state. For instance, 2844 * any voice and data calls will be terminated and all associated 2845 * lists emptied. 2846 * 2847 * "data" is int * 2848 * ((int *)data)[0] is > 0 for "Radio On" 2849 * ((int *)data)[0] is == 0 for "Radio Off" 2850 * 2851 * "response" is NULL 2852 * 2853 * Turn radio on if "on" > 0 2854 * Turn radio off if "on" == 0 2855 * 2856 * Valid errors: 2857 * SUCCESS 2858 * RADIO_NOT_AVAILABLE 2859 * OPERATION_NOT_ALLOWED 2860 * INVALID_STATE 2861 * NO_MEMORY 2862 * INTERNAL_ERR 2863 * SYSTEM_ERR 2864 * INVALID_ARGUMENTS 2865 * MODEM_ERR 2866 * DEVICE_IN_USE 2867 * OPERATION_NOT_ALLOWED 2868 * INVALID_MODEM_STATE 2869 * REQUEST_NOT_SUPPORTED 2870 * NO_RESOURCES 2871 * CANCELLED 2872 */ 2873 #define RIL_REQUEST_RADIO_POWER 23 2874 2875 /** 2876 * RIL_REQUEST_DTMF 2877 * 2878 * Send a DTMF tone 2879 * 2880 * If the implementation is currently playing a tone requested via 2881 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone 2882 * should be played instead 2883 * 2884 * "data" is a char * containing a single character with one of 12 values: 0-9,*,# 2885 * "response" is NULL 2886 * 2887 * FIXME should this block/mute microphone? 2888 * How does this interact with local DTMF feedback? 2889 * 2890 * Valid errors: 2891 * SUCCESS 2892 * RADIO_NOT_AVAILABLE 2893 * INVALID_ARGUMENTS 2894 * NO_RESOURCES 2895 * NO_MEMORY 2896 * MODEM_ERR 2897 * INTERNAL_ERR 2898 * INVALID_CALL_ID 2899 * NO_RESOURCES 2900 * CANCELLED 2901 * INVALID_MODEM_STATE 2902 * REQUEST_NOT_SUPPORTED 2903 * 2904 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START 2905 * 2906 */ 2907 #define RIL_REQUEST_DTMF 24 2908 2909 /** 2910 * RIL_REQUEST_SEND_SMS 2911 * 2912 * Send an SMS message 2913 * 2914 * "data" is const char ** 2915 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed 2916 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 2917 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string 2918 * less the SMSC address 2919 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" 2920 * 2921 * "response" is a const RIL_SMS_Response * 2922 * 2923 * Based on the return error, caller decides to resend if sending sms 2924 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) 2925 * 2926 * Valid errors: 2927 * SUCCESS 2928 * RADIO_NOT_AVAILABLE 2929 * SMS_SEND_FAIL_RETRY 2930 * FDN_CHECK_FAILURE 2931 * NETWORK_REJECT 2932 * INVALID_STATE 2933 * INVALID_ARGUMENTS 2934 * NO_MEMORY 2935 * REQUEST_RATE_LIMITED 2936 * INVALID_SMS_FORMAT 2937 * SYSTEM_ERR 2938 * ENCODING_ERR 2939 * INVALID_SMSC_ADDRESS 2940 * MODEM_ERR 2941 * NETWORK_ERR 2942 * OPERATION_NOT_ALLOWED 2943 * NO_MEMORY 2944 * NO_RESOURCES 2945 * CANCELLED 2946 * REQUEST_NOT_SUPPORTED 2947 * MODE_NOT_SUPPORTED 2948 * SIM_ABSENT 2949 * 2950 * FIXME how do we specify TP-Message-Reference if we need to resend? 2951 */ 2952 #define RIL_REQUEST_SEND_SMS 25 2953 2954 2955 /** 2956 * RIL_REQUEST_SEND_SMS_EXPECT_MORE 2957 * 2958 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS, 2959 * except that more messages are expected to be sent soon. If possible, 2960 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command) 2961 * 2962 * "data" is const char ** 2963 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed 2964 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 2965 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string 2966 * less the SMSC address 2967 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" 2968 * 2969 * "response" is a const RIL_SMS_Response * 2970 * 2971 * Based on the return error, caller decides to resend if sending sms 2972 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) 2973 * 2974 * Valid errors: 2975 * SUCCESS 2976 * RADIO_NOT_AVAILABLE 2977 * SMS_SEND_FAIL_RETRY 2978 * NETWORK_REJECT 2979 * INVALID_STATE 2980 * INVALID_ARGUMENTS 2981 * NO_MEMORY 2982 * INVALID_SMS_FORMAT 2983 * SYSTEM_ERR 2984 * REQUEST_RATE_LIMITED 2985 * FDN_CHECK_FAILURE 2986 * MODEM_ERR 2987 * NETWORK_ERR 2988 * ENCODING_ERR 2989 * INVALID_SMSC_ADDRESS 2990 * OPERATION_NOT_ALLOWED 2991 * INTERNAL_ERR 2992 * NO_RESOURCES 2993 * CANCELLED 2994 * REQUEST_NOT_SUPPORTED 2995 * MODE_NOT_SUPPORTED 2996 * SIM_ABSENT 2997 * 2998 */ 2999 #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26 3000 3001 3002 /** 3003 * RIL_REQUEST_SETUP_DATA_CALL 3004 * 3005 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status 3006 * return success it is added to the list of data calls and a 3007 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the 3008 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the 3009 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST 3010 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED. 3011 * 3012 * The RIL is expected to: 3013 * - Create one data call context. 3014 * - Create and configure a dedicated interface for the context 3015 * - The interface must be point to point. 3016 * - The interface is configured with one or more addresses and 3017 * is capable of sending and receiving packets. The prefix length 3018 * of the addresses must be /32 for IPv4 and /128 for IPv6. 3019 * - Must NOT change the linux routing table. 3020 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5] 3021 * number of simultaneous data call contexts. 3022 * 3023 * "data" is a const char ** 3024 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2... 3025 * for values above 2 this is RIL_RadioTechnology + 2. 3026 * ((const char **)data)[1] is a RIL_DataProfile (support is optional) 3027 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will 3028 * override the one in the profile. NULL indicates no APN overrride. 3029 * ((const char **)data)[3] is the username for APN, or NULL 3030 * ((const char **)data)[4] is the password for APN, or NULL 3031 * ((const char **)data)[5] is the PAP / CHAP auth type. Values: 3032 * 0 => PAP and CHAP is never performed. 3033 * 1 => PAP may be performed; CHAP is never performed. 3034 * 2 => CHAP may be performed; PAP is never performed. 3035 * 3 => PAP / CHAP may be performed - baseband dependent. 3036 * ((const char **)data)[6] is the non-roaming/home connection type to request. Must be one of the 3037 * PDP_type values in TS 27.007 section 10.1.1. 3038 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 3039 * ((const char **)data)[7] is the roaming connection type to request. Must be one of the 3040 * PDP_type values in TS 27.007 section 10.1.1. 3041 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 3042 * ((const char **)data)[8] is the bitmask of APN type in decimal string format. The 3043 * bitmask will encapsulate the following values: 3044 * ia,mms,agps,supl,hipri,fota,dun,ims,default. 3045 * ((const char **)data)[9] is the bearer bitmask in decimal string format. Each bit is a 3046 * RIL_RadioAccessFamily. "0" or NULL indicates all RATs. 3047 * ((const char **)data)[10] is the boolean in string format indicating the APN setting was 3048 * sent to the modem through RIL_REQUEST_SET_DATA_PROFILE earlier. 3049 * ((const char **)data)[11] is the mtu size in bytes of the mobile interface to which 3050 * the apn is connected. 3051 * ((const char **)data)[12] is the MVNO type: 3052 * possible values are "imsi", "gid", "spn". 3053 * ((const char **)data)[13] is MVNO match data in string. Can be anything defined by the carrier. 3054 * For example, 3055 * SPN like: "A MOBILE", "BEN NL", etc... 3056 * IMSI like: "302720x94", "2060188", etc... 3057 * GID like: "4E", "33", etc... 3058 * ((const char **)data)[14] is the boolean string indicating data roaming is allowed or not. "1" 3059 * indicates data roaming is enabled by the user, "0" indicates disabled. 3060 * 3061 * "response" is a RIL_Data_Call_Response_v11 3062 * 3063 * FIXME may need way to configure QoS settings 3064 * 3065 * Valid errors: 3066 * SUCCESS should be returned on both success and failure of setup with 3067 * the RIL_Data_Call_Response_v6.status containing the actual status. 3068 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored. 3069 * 3070 * Other errors could include: 3071 * RADIO_NOT_AVAILABLE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW, 3072 * OP_NOT_ALLOWED_DURING_VOICE_CALL, REQUEST_NOT_SUPPORTED, 3073 * INVALID_ARGUMENTS, INTERNAL_ERR, NO_MEMORY, NO_RESOURCES, 3074 * CANCELLED and SIM_ABSENT 3075 * 3076 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL 3077 */ 3078 #define RIL_REQUEST_SETUP_DATA_CALL 27 3079 3080 3081 /** 3082 * RIL_REQUEST_SIM_IO 3083 * 3084 * Request SIM I/O operation. 3085 * This is similar to the TS 27.007 "restricted SIM" operation 3086 * where it assumes all of the EF selection will be done by the 3087 * callee. 3088 * 3089 * "data" is a const RIL_SIM_IO_v6 * 3090 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL, 3091 * or may specify a PIN2 for operations that require a PIN2 (eg 3092 * updating FDN records) 3093 * 3094 * "response" is a const RIL_SIM_IO_Response * 3095 * 3096 * Arguments and responses that are unused for certain 3097 * values of "command" should be ignored or set to NULL 3098 * 3099 * Valid errors: 3100 * SUCCESS 3101 * RADIO_NOT_AVAILABLE 3102 * SIM_PIN2 3103 * SIM_PUK2 3104 * INVALID_SIM_STATE 3105 * SIM_ERR 3106 * REQUEST_NOT_SUPPORTED 3107 */ 3108 #define RIL_REQUEST_SIM_IO 28 3109 3110 /** 3111 * RIL_REQUEST_SEND_USSD 3112 * 3113 * Send a USSD message 3114 * 3115 * If a USSD session already exists, the message should be sent in the 3116 * context of that session. Otherwise, a new session should be created. 3117 * 3118 * The network reply should be reported via RIL_UNSOL_ON_USSD 3119 * 3120 * Only one USSD session may exist at a time, and the session is assumed 3121 * to exist until: 3122 * a) The android system invokes RIL_REQUEST_CANCEL_USSD 3123 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code 3124 * of "0" (USSD-Notify/no further action) or "2" (session terminated) 3125 * 3126 * "data" is a const char * containing the USSD request in UTF-8 format 3127 * "response" is NULL 3128 * 3129 * Valid errors: 3130 * SUCCESS 3131 * RADIO_NOT_AVAILABLE 3132 * FDN_CHECK_FAILURE 3133 * USSD_MODIFIED_TO_DIAL 3134 * USSD_MODIFIED_TO_SS 3135 * USSD_MODIFIED_TO_USSD 3136 * SIM_BUSY 3137 * OPERATION_NOT_ALLOWED 3138 * INVALID_ARGUMENTS 3139 * NO_MEMORY 3140 * MODEM_ERR 3141 * INTERNAL_ERR 3142 * ABORTED 3143 * SYSTEM_ERR 3144 * INVALID_STATE 3145 * NO_RESOURCES 3146 * CANCELLED 3147 * REQUEST_NOT_SUPPORTED 3148 * 3149 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD 3150 */ 3151 3152 #define RIL_REQUEST_SEND_USSD 29 3153 3154 /** 3155 * RIL_REQUEST_CANCEL_USSD 3156 * 3157 * Cancel the current USSD session if one exists 3158 * 3159 * "data" is null 3160 * "response" is NULL 3161 * 3162 * Valid errors: 3163 * SUCCESS 3164 * RADIO_NOT_AVAILABLE 3165 * SIM_BUSY 3166 * OPERATION_NOT_ALLOWED 3167 * MODEM_ERR 3168 * INTERNAL_ERR 3169 * NO_MEMORY 3170 * INVALID_STATE 3171 * NO_RESOURCES 3172 * CANCELLED 3173 * REQUEST_NOT_SUPPORTED 3174 */ 3175 3176 #define RIL_REQUEST_CANCEL_USSD 30 3177 3178 /** 3179 * RIL_REQUEST_GET_CLIR 3180 * 3181 * Gets current CLIR status 3182 * "data" is NULL 3183 * "response" is int * 3184 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 3185 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7 3186 * 3187 * Valid errors: 3188 * SUCCESS 3189 * RADIO_NOT_AVAILABLE 3190 * SS_MODIFIED_TO_DIAL 3191 * SS_MODIFIED_TO_USSD 3192 * SS_MODIFIED_TO_SS 3193 * NO_MEMORY 3194 * MODEM_ERR 3195 * INTERNAL_ERR 3196 * FDN_CHECK_FAILURE 3197 * SYSTEM_ERR 3198 * NO_RESOURCES 3199 * CANCELLED 3200 * REQUEST_NOT_SUPPORTED 3201 */ 3202 #define RIL_REQUEST_GET_CLIR 31 3203 3204 /** 3205 * RIL_REQUEST_SET_CLIR 3206 * 3207 * "data" is int * 3208 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 3209 * 3210 * "response" is NULL 3211 * 3212 * Valid errors: 3213 * SUCCESS 3214 * RADIO_NOT_AVAILABLE 3215 * SS_MODIFIED_TO_DIAL 3216 * SS_MODIFIED_TO_USSD 3217 * SS_MODIFIED_TO_SS 3218 * INVALID_ARGUMENTS 3219 * SYSTEM_ERR 3220 * INTERNAL_ERR 3221 * NO_MEMORY 3222 * NO_RESOURCES 3223 * CANCELLED 3224 * REQUEST_NOT_SUPPORTED 3225 */ 3226 #define RIL_REQUEST_SET_CLIR 32 3227 3228 /** 3229 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 3230 * 3231 * "data" is const RIL_CallForwardInfo * 3232 * 3233 * "response" is const RIL_CallForwardInfo ** 3234 * "response" points to an array of RIL_CallForwardInfo *'s, one for 3235 * each distinct registered phone number. 3236 * 3237 * For example, if data is forwarded to +18005551212 and voice is forwarded 3238 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned 3239 * 3240 * If, however, both data and voice are forwarded to +18005551212, then 3241 * a single RIL_CallForwardInfo can be returned with the service class 3242 * set to "data + voice = 3") 3243 * 3244 * Valid errors: 3245 * SUCCESS 3246 * RADIO_NOT_AVAILABLE 3247 * SS_MODIFIED_TO_DIAL 3248 * SS_MODIFIED_TO_USSD 3249 * SS_MODIFIED_TO_SS 3250 * INVALID_ARGUMENTS 3251 * NO_MEMORY 3252 * SYSTEM_ERR 3253 * MODEM_ERR 3254 * INTERNAL_ERR 3255 * NO_MEMORY 3256 * FDN_CHECK_FAILURE 3257 * NO_RESOURCES 3258 * CANCELLED 3259 * REQUEST_NOT_SUPPORTED 3260 */ 3261 #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33 3262 3263 3264 /** 3265 * RIL_REQUEST_SET_CALL_FORWARD 3266 * 3267 * Configure call forward rule 3268 * 3269 * "data" is const RIL_CallForwardInfo * 3270 * "response" is NULL 3271 * 3272 * Valid errors: 3273 * SUCCESS 3274 * RADIO_NOT_AVAILABLE 3275 * SS_MODIFIED_TO_DIAL 3276 * SS_MODIFIED_TO_USSD 3277 * SS_MODIFIED_TO_SS 3278 * INVALID_ARGUMENTS 3279 * NO_MEMORY 3280 * SYSTEM_ERR 3281 * MODEM_ERR 3282 * INTERNAL_ERR 3283 * INVALID_STATE 3284 * FDN_CHECK_FAILURE 3285 * NO_RESOURCES 3286 * CANCELLED 3287 * REQUEST_NOT_SUPPORTED 3288 */ 3289 #define RIL_REQUEST_SET_CALL_FORWARD 34 3290 3291 3292 /** 3293 * RIL_REQUEST_QUERY_CALL_WAITING 3294 * 3295 * Query current call waiting state 3296 * 3297 * "data" is const int * 3298 * ((const int *)data)[0] is the TS 27.007 service class to query. 3299 * "response" is a const int * 3300 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled" 3301 * 3302 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1] 3303 * must follow, with the TS 27.007 service class bit vector of services 3304 * for which call waiting is enabled. 3305 * 3306 * For example, if ((const int *)response)[0] is 1 and 3307 * ((const int *)response)[1] is 3, then call waiting is enabled for data 3308 * and voice and disabled for everything else 3309 * 3310 * Valid errors: 3311 * SUCCESS 3312 * RADIO_NOT_AVAILABLE 3313 * SS_MODIFIED_TO_DIAL 3314 * SS_MODIFIED_TO_USSD 3315 * SS_MODIFIED_TO_SS 3316 * NO_MEMORY 3317 * MODEM_ERR 3318 * INTERNAL_ERR 3319 * NO_MEMORY 3320 * FDN_CHECK_FAILURE 3321 * INVALID_ARGUMENTS 3322 * NO_RESOURCES 3323 * CANCELLED 3324 * REQUEST_NOT_SUPPORTED 3325 */ 3326 #define RIL_REQUEST_QUERY_CALL_WAITING 35 3327 3328 3329 /** 3330 * RIL_REQUEST_SET_CALL_WAITING 3331 * 3332 * Configure current call waiting state 3333 * 3334 * "data" is const int * 3335 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled" 3336 * ((const int *)data)[1] is the TS 27.007 service class bit vector of 3337 * services to modify 3338 * "response" is NULL 3339 * 3340 * Valid errors: 3341 * SUCCESS 3342 * RADIO_NOT_AVAILABLE 3343 * SS_MODIFIED_TO_DIAL 3344 * SS_MODIFIED_TO_USSD 3345 * SS_MODIFIED_TO_SS 3346 * INVALID_ARGUMENTS 3347 * NO_MEMORY 3348 * MODEM_ERR 3349 * INTERNAL_ERR 3350 * INVALID_STATE 3351 * FDN_CHECK_FAILURE 3352 * NO_RESOURCES 3353 * CANCELLED 3354 * REQUEST_NOT_SUPPORTED 3355 */ 3356 #define RIL_REQUEST_SET_CALL_WAITING 36 3357 3358 /** 3359 * RIL_REQUEST_SMS_ACKNOWLEDGE 3360 * 3361 * Acknowledge successful or failed receipt of SMS previously indicated 3362 * via RIL_UNSOL_RESPONSE_NEW_SMS 3363 * 3364 * "data" is int * 3365 * ((int *)data)[0] is 1 on successful receipt 3366 * (basically, AT+CNMA=1 from TS 27.005 3367 * is 0 on failed receipt 3368 * (basically, AT+CNMA=2 from TS 27.005) 3369 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined 3370 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory 3371 * capacity exceeded) and 0xFF (unspecified error) are 3372 * reported. 3373 * 3374 * "response" is NULL 3375 * 3376 * FIXME would like request that specified RP-ACK/RP-ERROR PDU 3377 * 3378 * Valid errors: 3379 * SUCCESS 3380 * RADIO_NOT_AVAILABLE 3381 * INTERNAL_ERR 3382 * NO_MEMORY 3383 * NO_RESOURCES 3384 * CANCELLED 3385 * REQUEST_NOT_SUPPORTED 3386 */ 3387 #define RIL_REQUEST_SMS_ACKNOWLEDGE 37 3388 3389 /** 3390 * RIL_REQUEST_GET_IMEI - DEPRECATED 3391 * 3392 * Get the device IMEI, including check digit 3393 * 3394 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY 3395 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE 3396 * 3397 * "data" is NULL 3398 * "response" is a const char * containing the IMEI 3399 * 3400 * Valid errors: 3401 * SUCCESS 3402 * RADIO_NOT_AVAILABLE (radio resetting) 3403 * NO_MEMORY 3404 * INTERNAL_ERR 3405 * SYSTEM_ERR 3406 * MODEM_ERR 3407 * NOT_PROVISIONED 3408 * REQUEST_NOT_SUPPORTED 3409 * NO_RESOURCES 3410 * CANCELLED 3411 */ 3412 3413 #define RIL_REQUEST_GET_IMEI 38 3414 3415 /** 3416 * RIL_REQUEST_GET_IMEISV - DEPRECATED 3417 * 3418 * Get the device IMEISV, which should be two decimal digits 3419 * 3420 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY 3421 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE 3422 * 3423 * "data" is NULL 3424 * "response" is a const char * containing the IMEISV 3425 * 3426 * Valid errors: 3427 * SUCCESS 3428 * RADIO_NOT_AVAILABLE (radio resetting) 3429 * NO_MEMORY 3430 * INTERNAL_ERR 3431 * SYSTEM_ERR 3432 * MODEM_ERR 3433 * NOT_PROVISIONED 3434 * REQUEST_NOT_SUPPORTED 3435 * NO_RESOURCES 3436 * CANCELLED 3437 */ 3438 3439 #define RIL_REQUEST_GET_IMEISV 39 3440 3441 3442 /** 3443 * RIL_REQUEST_ANSWER 3444 * 3445 * Answer incoming call 3446 * 3447 * Will not be called for WAITING calls. 3448 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case 3449 * instead 3450 * 3451 * "data" is NULL 3452 * "response" is NULL 3453 * 3454 * Valid errors: 3455 * SUCCESS 3456 * RADIO_NOT_AVAILABLE (radio resetting) 3457 * INVALID_STATE 3458 * NO_MEMORY 3459 * SYSTEM_ERR 3460 * MODEM_ERR 3461 * INTERNAL_ERR 3462 * INVALID_CALL_ID 3463 * NO_RESOURCES 3464 * CANCELLED 3465 * REQUEST_NOT_SUPPORTED 3466 */ 3467 3468 #define RIL_REQUEST_ANSWER 40 3469 3470 /** 3471 * RIL_REQUEST_DEACTIVATE_DATA_CALL 3472 * 3473 * Deactivate packet data connection and remove from the 3474 * data call list if SUCCESS is returned. Any other return 3475 * values should also try to remove the call from the list, 3476 * but that may not be possible. In any event a 3477 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An 3478 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be 3479 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL. 3480 * 3481 * "data" is const char ** 3482 * ((char**)data)[0] indicating CID 3483 * ((char**)data)[1] indicating Disconnect Reason 3484 * 0 => No specific reason specified 3485 * 1 => Radio shutdown requested 3486 * 3487 * "response" is NULL 3488 * 3489 * Valid errors: 3490 * SUCCESS 3491 * RADIO_NOT_AVAILABLE 3492 * INVALID_CALL_ID 3493 * INVALID_STATE 3494 * INVALID_ARGUMENTS 3495 * REQUEST_NOT_SUPPORTED 3496 * INTERNAL_ERR 3497 * NO_MEMORY 3498 * NO_RESOURCES 3499 * CANCELLED 3500 * SIM_ABSENT 3501 * 3502 * See also: RIL_REQUEST_SETUP_DATA_CALL 3503 */ 3504 #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41 3505 3506 /** 3507 * RIL_REQUEST_QUERY_FACILITY_LOCK 3508 * 3509 * Query the status of a facility lock state 3510 * 3511 * "data" is const char ** 3512 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4 3513 * (eg "AO" for BAOC, "SC" for SIM lock) 3514 * ((const char **)data)[1] is the password, or "" if not required 3515 * ((const char **)data)[2] is the TS 27.007 service class bit vector of 3516 * services to query 3517 * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 3518 * This is only applicable in the case of Fixed Dialing Numbers 3519 * (FDN) requests. 3520 * 3521 * "response" is an int * 3522 * ((const int *)response) 0 is the TS 27.007 service class bit vector of 3523 * services for which the specified barring facility 3524 * is active. "0" means "disabled for all" 3525 * 3526 * 3527 * Valid errors: 3528 * SUCCESS 3529 * RADIO_NOT_AVAILABLE 3530 * SS_MODIFIED_TO_DIAL 3531 * SS_MODIFIED_TO_USSD 3532 * SS_MODIFIED_TO_SS 3533 * INVALID_ARGUMENTS 3534 * NO_MEMORY 3535 * INTERNAL_ERR 3536 * SYSTEM_ERR 3537 * MODEM_ERR 3538 * FDN_CHECK_FAILURE 3539 * NO_RESOURCES 3540 * CANCELLED 3541 * REQUEST_NOT_SUPPORTED 3542 * 3543 */ 3544 #define RIL_REQUEST_QUERY_FACILITY_LOCK 42 3545 3546 /** 3547 * RIL_REQUEST_SET_FACILITY_LOCK 3548 * 3549 * Enable/disable one facility lock 3550 * 3551 * "data" is const char ** 3552 * 3553 * ((const char **)data)[0] = facility string code from TS 27.007 7.4 3554 * (eg "AO" for BAOC) 3555 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock" 3556 * ((const char **)data)[2] = password 3557 * ((const char **)data)[3] = string representation of decimal TS 27.007 3558 * service class bit vector. Eg, the string 3559 * "1" means "set this facility for voice services" 3560 * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 3561 * This is only applicable in the case of Fixed Dialing Numbers 3562 * (FDN) requests. 3563 * 3564 * "response" is int * 3565 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 3566 * 3567 * Valid errors: 3568 * SUCCESS 3569 * RADIO_NOT_AVAILABLE 3570 * SS_MODIFIED_TO_DIAL 3571 * SS_MODIFIED_TO_USSD 3572 * SS_MODIFIED_TO_SS 3573 * INVALID_ARGUMENTS 3574 * INTERNAL_ERR 3575 * NO_MEMORY 3576 * MODEM_ERR 3577 * INVALID_STATE 3578 * FDN_CHECK_FAILURE 3579 * NO_RESOURCES 3580 * CANCELLED 3581 * REQUEST_NOT_SUPPORTED 3582 * 3583 */ 3584 #define RIL_REQUEST_SET_FACILITY_LOCK 43 3585 3586 /** 3587 * RIL_REQUEST_CHANGE_BARRING_PASSWORD 3588 * 3589 * Change call barring facility password 3590 * 3591 * "data" is const char ** 3592 * 3593 * ((const char **)data)[0] = facility string code from TS 27.007 7.4 3594 * (eg "AO" for BAOC) 3595 * ((const char **)data)[1] = old password 3596 * ((const char **)data)[2] = new password 3597 * 3598 * "response" is NULL 3599 * 3600 * Valid errors: 3601 * SUCCESS 3602 * RADIO_NOT_AVAILABLE 3603 * SS_MODIFIED_TO_DIAL 3604 * SS_MODIFIED_TO_USSD 3605 * SS_MODIFIED_TO_SS 3606 * INVALID_ARGUMENTS 3607 * NO_MEMORY 3608 * MODEM_ERR 3609 * INTERNAL_ERR 3610 * SYSTEM_ERR 3611 * FDN_CHECK_FAILURE 3612 * NO_RESOURCES 3613 * CANCELLED 3614 * REQUEST_NOT_SUPPORTED 3615 * 3616 */ 3617 #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44 3618 3619 /** 3620 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 3621 * 3622 * Query current network selectin mode 3623 * 3624 * "data" is NULL 3625 * 3626 * "response" is int * 3627 * ((const int *)response)[0] is 3628 * 0 for automatic selection 3629 * 1 for manual selection 3630 * 3631 * Valid errors: 3632 * SUCCESS 3633 * RADIO_NOT_AVAILABLE 3634 * NO_MEMORY 3635 * INTERNAL_ERR 3636 * SYSTEM_ERR 3637 * INVALID_ARGUMENTS 3638 * MODEM_ERR 3639 * REQUEST_NOT_SUPPORTED 3640 * NO_RESOURCES 3641 * CANCELLED 3642 * 3643 */ 3644 #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45 3645 3646 /** 3647 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 3648 * 3649 * Specify that the network should be selected automatically 3650 * 3651 * "data" is NULL 3652 * "response" is NULL 3653 * 3654 * This request must not respond until the new operator is selected 3655 * and registered 3656 * 3657 * Valid errors: 3658 * SUCCESS 3659 * RADIO_NOT_AVAILABLE 3660 * ILLEGAL_SIM_OR_ME 3661 * OPERATION_NOT_ALLOWED 3662 * NO_MEMORY 3663 * INTERNAL_ERR 3664 * SYSTEM_ERR 3665 * INVALID_ARGUMENTS 3666 * MODEM_ERR 3667 * REQUEST_NOT_SUPPORTED 3668 * NO_RESOURCES 3669 * CANCELLED 3670 * 3671 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and 3672 * no retries needed, such as illegal SIM or ME. 3673 * 3674 */ 3675 #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46 3676 3677 /** 3678 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 3679 * 3680 * Manually select a specified network. 3681 * 3682 * "data" is const char * specifying MCCMNC of network to select (eg "310170") 3683 * "response" is NULL 3684 * 3685 * This request must not respond until the new operator is selected 3686 * and registered 3687 * 3688 * Valid errors: 3689 * SUCCESS 3690 * RADIO_NOT_AVAILABLE 3691 * ILLEGAL_SIM_OR_ME 3692 * OPERATION_NOT_ALLOWED 3693 * INVALID_STATE 3694 * NO_MEMORY 3695 * INTERNAL_ERR 3696 * SYSTEM_ERR 3697 * INVALID_ARGUMENTS 3698 * MODEM_ERR 3699 * REQUEST_NOT_SUPPORTED 3700 * NO_RESOURCES 3701 * CANCELLED 3702 * 3703 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and 3704 * no retries needed, such as illegal SIM or ME. 3705 * 3706 */ 3707 #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47 3708 3709 /** 3710 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 3711 * 3712 * Scans for available networks 3713 * 3714 * "data" is NULL 3715 * "response" is const char ** that should be an array of n*4 strings, where 3716 * n is the number of available networks 3717 * For each available network: 3718 * 3719 * ((const char **)response)[n+0] is long alpha ONS or EONS 3720 * ((const char **)response)[n+1] is short alpha ONS or EONS 3721 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC) 3722 * ((const char **)response)[n+3] is a string value of the status: 3723 * "unknown" 3724 * "available" 3725 * "current" 3726 * "forbidden" 3727 * 3728 * Valid errors: 3729 * SUCCESS 3730 * RADIO_NOT_AVAILABLE 3731 * OPERATION_NOT_ALLOWED 3732 * ABORTED 3733 * DEVICE_IN_USE 3734 * INTERNAL_ERR 3735 * NO_MEMORY 3736 * MODEM_ERR 3737 * REQUEST_NOT_SUPPORTED 3738 * CANCELLED 3739 * OPERATION_NOT_ALLOWED 3740 * NO_RESOURCES 3741 * CANCELLED 3742 * 3743 */ 3744 #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48 3745 3746 /** 3747 * RIL_REQUEST_DTMF_START 3748 * 3749 * Start playing a DTMF tone. Continue playing DTMF tone until 3750 * RIL_REQUEST_DTMF_STOP is received 3751 * 3752 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing, 3753 * it should cancel the previous tone and play the new one. 3754 * 3755 * "data" is a char * 3756 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,# 3757 * "response" is NULL 3758 * 3759 * Valid errors: 3760 * SUCCESS 3761 * RADIO_NOT_AVAILABLE 3762 * INVALID_ARGUMENTS 3763 * NO_RESOURCES 3764 * NO_MEMORY 3765 * SYSTEM_ERR 3766 * MODEM_ERR 3767 * INTERNAL_ERR 3768 * INVALID_CALL_ID 3769 * CANCELLED 3770 * INVALID_MODEM_STATE 3771 * REQUEST_NOT_SUPPORTED 3772 * 3773 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP 3774 */ 3775 #define RIL_REQUEST_DTMF_START 49 3776 3777 /** 3778 * RIL_REQUEST_DTMF_STOP 3779 * 3780 * Stop playing a currently playing DTMF tone. 3781 * 3782 * "data" is NULL 3783 * "response" is NULL 3784 * 3785 * Valid errors: 3786 * SUCCESS 3787 * RADIO_NOT_AVAILABLE 3788 * OPERATION_NOT_ALLOWED 3789 * NO_RESOURCES 3790 * NO_MEMORY 3791 * INVALID_ARGUMENTS 3792 * SYSTEM_ERR 3793 * MODEM_ERR 3794 * INTERNAL_ERR 3795 * INVALID_CALL_ID 3796 * CANCELLED 3797 * INVALID_MODEM_STATE 3798 * REQUEST_NOT_SUPPORTED 3799 * 3800 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START 3801 */ 3802 #define RIL_REQUEST_DTMF_STOP 50 3803 3804 /** 3805 * RIL_REQUEST_BASEBAND_VERSION 3806 * 3807 * Return string value indicating baseband version, eg 3808 * response from AT+CGMR 3809 * 3810 * "data" is NULL 3811 * "response" is const char * containing version string for log reporting 3812 * 3813 * Valid errors: 3814 * SUCCESS 3815 * RADIO_NOT_AVAILABLE 3816 * EMPTY_RECORD 3817 * NO_MEMORY 3818 * INTERNAL_ERR 3819 * SYSTEM_ERR 3820 * MODEM_ERR 3821 * NOT_PROVISIONED 3822 * REQUEST_NOT_SUPPORTED 3823 * NO_RESOURCES 3824 * CANCELLED 3825 * 3826 */ 3827 #define RIL_REQUEST_BASEBAND_VERSION 51 3828 3829 /** 3830 * RIL_REQUEST_SEPARATE_CONNECTION 3831 * 3832 * Separate a party from a multiparty call placing the multiparty call 3833 * (less the specified party) on hold and leaving the specified party 3834 * as the only other member of the current (active) call 3835 * 3836 * Like AT+CHLD=2x 3837 * 3838 * See TS 22.084 1.3.8.2 (iii) 3839 * TS 22.030 6.5.5 "Entering "2X followed by send" 3840 * TS 27.007 "AT+CHLD=2x" 3841 * 3842 * "data" is an int * 3843 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL 3844 * 3845 * "response" is NULL 3846 * 3847 * Valid errors: 3848 * SUCCESS 3849 * RADIO_NOT_AVAILABLE (radio resetting) 3850 * INVALID_ARGUMENTS 3851 * INVALID_STATE 3852 * NO_RESOURCES 3853 * NO_MEMORY 3854 * SYSTEM_ERR 3855 * MODEM_ERR 3856 * INTERNAL_ERR 3857 * INVALID_CALL_ID 3858 * INVALID_STATE 3859 * OPERATION_NOT_ALLOWED 3860 * CANCELLED 3861 * REQUEST_NOT_SUPPORTED 3862 */ 3863 #define RIL_REQUEST_SEPARATE_CONNECTION 52 3864 3865 3866 /** 3867 * RIL_REQUEST_SET_MUTE 3868 * 3869 * Turn on or off uplink (microphone) mute. 3870 * 3871 * Will only be sent while voice call is active. 3872 * Will always be reset to "disable mute" when a new voice call is initiated 3873 * 3874 * "data" is an int * 3875 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute" 3876 * 3877 * "response" is NULL 3878 * 3879 * Valid errors: 3880 * SUCCESS 3881 * RADIO_NOT_AVAILABLE (radio resetting) 3882 * INVALID_ARGUMENTS 3883 * NO_MEMORY 3884 * REQUEST_RATE_LIMITED 3885 * INTERNAL_ERR 3886 * NO_RESOURCES 3887 * CANCELLED 3888 * REQUEST_NOT_SUPPORTED 3889 */ 3890 3891 #define RIL_REQUEST_SET_MUTE 53 3892 3893 /** 3894 * RIL_REQUEST_GET_MUTE 3895 * 3896 * Queries the current state of the uplink mute setting 3897 * 3898 * "data" is NULL 3899 * "response" is an int * 3900 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled" 3901 * 3902 * Valid errors: 3903 * SUCCESS 3904 * RADIO_NOT_AVAILABLE (radio resetting) 3905 * SS_MODIFIED_TO_DIAL 3906 * SS_MODIFIED_TO_USSD 3907 * SS_MODIFIED_TO_SS 3908 * NO_MEMORY 3909 * REQUEST_RATE_LIMITED 3910 * INTERNAL_ERR 3911 * NO_RESOURCES 3912 * CANCELLED 3913 * REQUEST_NOT_SUPPORTED 3914 */ 3915 3916 #define RIL_REQUEST_GET_MUTE 54 3917 3918 /** 3919 * RIL_REQUEST_QUERY_CLIP 3920 * 3921 * Queries the status of the CLIP supplementary service 3922 * 3923 * (for MMI code "*#30#") 3924 * 3925 * "data" is NULL 3926 * "response" is an int * 3927 * (int *)response)[0] is 1 for "CLIP provisioned" 3928 * and 0 for "CLIP not provisioned" 3929 * and 2 for "unknown, e.g. no network etc" 3930 * 3931 * Valid errors: 3932 * SUCCESS 3933 * RADIO_NOT_AVAILABLE (radio resetting) 3934 * NO_MEMORY 3935 * SYSTEM_ERR 3936 * MODEM_ERR 3937 * INTERNAL_ERR 3938 * FDN_CHECK_FAILURE 3939 * NO_RESOURCES 3940 * CANCELLED 3941 * REQUEST_NOT_SUPPORTED 3942 */ 3943 3944 #define RIL_REQUEST_QUERY_CLIP 55 3945 3946 /** 3947 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status 3948 * field in RIL_Data_Call_Response_v6. 3949 * 3950 * Requests the failure cause code for the most recently failed PDP 3951 * context or CDMA data connection active 3952 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE 3953 * 3954 * "data" is NULL 3955 * 3956 * "response" is a "int *" 3957 * ((int *)response)[0] is an integer cause code defined in TS 24.008 3958 * section 6.1.3.1.3 or close approximation 3959 * 3960 * If the implementation does not have access to the exact cause codes, 3961 * then it should return one of the values listed in 3962 * RIL_DataCallFailCause, as the UI layer needs to distinguish these 3963 * cases for error notification 3964 * and potential retries. 3965 * 3966 * Valid errors: 3967 * SUCCESS 3968 * RADIO_NOT_AVAILABLE 3969 * INTERNAL_ERR 3970 * NO_MEMORY 3971 * NO_RESOURCES 3972 * CANCELLED 3973 * REQUEST_NOT_SUPPORTED 3974 * 3975 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE 3976 * 3977 * Deprecated use the status field in RIL_Data_Call_Response_v6. 3978 */ 3979 3980 #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56 3981 3982 /** 3983 * RIL_REQUEST_DATA_CALL_LIST 3984 * 3985 * Returns the data call list. An entry is added when a 3986 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a 3987 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied 3988 * when RIL_REQUEST_RADIO_POWER off/on is issued. 3989 * 3990 * "data" is NULL 3991 * "response" is an array of RIL_Data_Call_Response_v6 3992 * 3993 * Valid errors: 3994 * SUCCESS 3995 * RADIO_NOT_AVAILABLE (radio resetting) 3996 * INTERNAL_ERR 3997 * NO_MEMORY 3998 * NO_RESOURCES 3999 * CANCELLED 4000 * REQUEST_NOT_SUPPORTED 4001 * SIM_ABSENT 4002 * 4003 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED 4004 */ 4005 4006 #define RIL_REQUEST_DATA_CALL_LIST 57 4007 4008 /** 4009 * RIL_REQUEST_RESET_RADIO - DEPRECATED 4010 * 4011 * Request a radio reset. The RIL implementation may postpone 4012 * the reset until after this request is responded to if the baseband 4013 * is presently busy. 4014 * 4015 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER 4016 * 4017 * "data" is NULL 4018 * "response" is NULL 4019 * 4020 * Valid errors: 4021 * SUCCESS 4022 * RADIO_NOT_AVAILABLE (radio resetting) 4023 * REQUEST_NOT_SUPPORTED 4024 */ 4025 4026 #define RIL_REQUEST_RESET_RADIO 58 4027 4028 /** 4029 * RIL_REQUEST_OEM_HOOK_RAW 4030 * 4031 * This request reserved for OEM-specific uses. It passes raw byte arrays 4032 * back and forth. 4033 * 4034 * It can be invoked on the Java side from 4035 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw() 4036 * 4037 * "data" is a char * of bytes copied from the byte[] data argument in java 4038 * "response" is a char * of bytes that will returned via the 4039 * caller's "response" Message here: 4040 * (byte[])(((AsyncResult)response.obj).result) 4041 * 4042 * An error response here will result in 4043 * (((AsyncResult)response.obj).result) == null and 4044 * (((AsyncResult)response.obj).exception) being an instance of 4045 * com.android.internal.telephony.gsm.CommandException 4046 * 4047 * Valid errors: 4048 * All 4049 */ 4050 4051 #define RIL_REQUEST_OEM_HOOK_RAW 59 4052 4053 /** 4054 * RIL_REQUEST_OEM_HOOK_STRINGS 4055 * 4056 * This request reserved for OEM-specific uses. It passes strings 4057 * back and forth. 4058 * 4059 * It can be invoked on the Java side from 4060 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings() 4061 * 4062 * "data" is a const char **, representing an array of null-terminated UTF-8 4063 * strings copied from the "String[] strings" argument to 4064 * invokeOemRilRequestStrings() 4065 * 4066 * "response" is a const char **, representing an array of null-terminated UTF-8 4067 * stings that will be returned via the caller's response message here: 4068 * 4069 * (String[])(((AsyncResult)response.obj).result) 4070 * 4071 * An error response here will result in 4072 * (((AsyncResult)response.obj).result) == null and 4073 * (((AsyncResult)response.obj).exception) being an instance of 4074 * com.android.internal.telephony.gsm.CommandException 4075 * 4076 * Valid errors: 4077 * All 4078 */ 4079 4080 #define RIL_REQUEST_OEM_HOOK_STRINGS 60 4081 4082 /** 4083 * RIL_REQUEST_SCREEN_STATE - DEPRECATED 4084 * 4085 * Indicates the current state of the screen. When the screen is off, the 4086 * RIL should notify the baseband to suppress certain notifications (eg, 4087 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude) 4088 * in an effort to conserve power. These notifications should resume when the 4089 * screen is on. 4090 * 4091 * Note this request is deprecated. Use RIL_REQUEST_SEND_DEVICE_STATE to report the device state 4092 * to the modem and use RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER to turn on/off unsolicited 4093 * response from the modem in different scenarios. 4094 * 4095 * "data" is int * 4096 * ((int *)data)[0] is == 1 for "Screen On" 4097 * ((int *)data)[0] is == 0 for "Screen Off" 4098 * 4099 * "response" is NULL 4100 * 4101 * Valid errors: 4102 * SUCCESS 4103 * NO_MEMORY 4104 * INTERNAL_ERR 4105 * SYSTEM_ERR 4106 * INVALID_ARGUMENTS 4107 * NO_RESOURCES 4108 * CANCELLED 4109 * REQUEST_NOT_SUPPORTED 4110 */ 4111 #define RIL_REQUEST_SCREEN_STATE 61 4112 4113 4114 /** 4115 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 4116 * 4117 * Enables/disables supplementary service related notifications 4118 * from the network. 4119 * 4120 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION. 4121 * 4122 * "data" is int * 4123 * ((int *)data)[0] is == 1 for notifications enabled 4124 * ((int *)data)[0] is == 0 for notifications disabled 4125 * 4126 * "response" is NULL 4127 * 4128 * Valid errors: 4129 * SUCCESS 4130 * RADIO_NOT_AVAILABLE 4131 * SIM_BUSY 4132 * INVALID_ARGUMENTS 4133 * NO_MEMORY 4134 * SYSTEM_ERR 4135 * MODEM_ERR 4136 * INTERNAL_ERR 4137 * NO_RESOURCES 4138 * CANCELLED 4139 * REQUEST_NOT_SUPPORTED 4140 * 4141 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION. 4142 */ 4143 #define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62 4144 4145 /** 4146 * RIL_REQUEST_WRITE_SMS_TO_SIM 4147 * 4148 * Stores a SMS message to SIM memory. 4149 * 4150 * "data" is RIL_SMS_WriteArgs * 4151 * 4152 * "response" is int * 4153 * ((const int *)response)[0] is the record index where the message is stored. 4154 * 4155 * Valid errors: 4156 * SUCCESS 4157 * SIM_FULL 4158 * INVALID_ARGUMENTS 4159 * INVALID_SMS_FORMAT 4160 * INTERNAL_ERR 4161 * MODEM_ERR 4162 * ENCODING_ERR 4163 * NO_MEMORY 4164 * NO_RESOURCES 4165 * INVALID_MODEM_STATE 4166 * OPERATION_NOT_ALLOWED 4167 * INVALID_SMSC_ADDRESS 4168 * CANCELLED 4169 * INVALID_MODEM_STATE 4170 * REQUEST_NOT_SUPPORTED 4171 * SIM_ABSENT 4172 * 4173 */ 4174 #define RIL_REQUEST_WRITE_SMS_TO_SIM 63 4175 4176 /** 4177 * RIL_REQUEST_DELETE_SMS_ON_SIM 4178 * 4179 * Deletes a SMS message from SIM memory. 4180 * 4181 * "data" is int * 4182 * ((int *)data)[0] is the record index of the message to delete. 4183 * 4184 * "response" is NULL 4185 * 4186 * Valid errors: 4187 * SUCCESS 4188 * SIM_FULL 4189 * INVALID_ARGUMENTS 4190 * NO_MEMORY 4191 * REQUEST_RATE_LIMITED 4192 * SYSTEM_ERR 4193 * MODEM_ERR 4194 * NO_SUCH_ENTRY 4195 * INTERNAL_ERR 4196 * NO_RESOURCES 4197 * CANCELLED 4198 * INVALID_MODEM_STATE 4199 * REQUEST_NOT_SUPPORTED 4200 * SIM_ABSENT 4201 * 4202 */ 4203 #define RIL_REQUEST_DELETE_SMS_ON_SIM 64 4204 4205 /** 4206 * RIL_REQUEST_SET_BAND_MODE 4207 * 4208 * Assign a specified band for RF configuration. 4209 * 4210 * "data" is int * 4211 * ((int *)data)[0] is a RIL_RadioBandMode 4212 * 4213 * "response" is NULL 4214 * 4215 * Valid errors: 4216 * SUCCESS 4217 * RADIO_NOT_AVAILABLE 4218 * OPERATION_NOT_ALLOWED 4219 * NO_MEMORY 4220 * INTERNAL_ERR 4221 * SYSTEM_ERR 4222 * INVALID_ARGUMENTS 4223 * MODEM_ERR 4224 * REQUEST_NOT_SUPPORTED 4225 * NO_RESOURCES 4226 * CANCELLED 4227 * 4228 * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 4229 */ 4230 #define RIL_REQUEST_SET_BAND_MODE 65 4231 4232 /** 4233 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 4234 * 4235 * Query the list of band mode supported by RF. 4236 * 4237 * "data" is NULL 4238 * 4239 * "response" is int * 4240 * "response" points to an array of int's, the int[0] is the size of array; 4241 * subsequent values are a list of RIL_RadioBandMode listing supported modes. 4242 * 4243 * Valid errors: 4244 * SUCCESS 4245 * RADIO_NOT_AVAILABLE 4246 * NO_MEMORY 4247 * INTERNAL_ERR 4248 * SYSTEM_ERR 4249 * MODEM_ERR 4250 * REQUEST_NOT_SUPPORTED 4251 * NO_RESOURCES 4252 * CANCELLED 4253 * 4254 * See also: RIL_REQUEST_SET_BAND_MODE 4255 */ 4256 #define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66 4257 4258 /** 4259 * RIL_REQUEST_STK_GET_PROFILE 4260 * 4261 * Requests the profile of SIM tool kit. 4262 * The profile indicates the SAT/USAT features supported by ME. 4263 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111 4264 * 4265 * "data" is NULL 4266 * 4267 * "response" is a const char * containing SAT/USAT profile 4268 * in hexadecimal format string starting with first byte of terminal profile 4269 * 4270 * Valid errors: 4271 * RIL_E_SUCCESS 4272 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 4273 * INTERNAL_ERR 4274 * NO_MEMORY 4275 * NO_RESOURCES 4276 * CANCELLED 4277 * REQUEST_NOT_SUPPORTED 4278 */ 4279 #define RIL_REQUEST_STK_GET_PROFILE 67 4280 4281 /** 4282 * RIL_REQUEST_STK_SET_PROFILE 4283 * 4284 * Download the STK terminal profile as part of SIM initialization 4285 * procedure 4286 * 4287 * "data" is a const char * containing SAT/USAT profile 4288 * in hexadecimal format string starting with first byte of terminal profile 4289 * 4290 * "response" is NULL 4291 * 4292 * Valid errors: 4293 * RIL_E_SUCCESS 4294 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 4295 * INTERNAL_ERR 4296 * NO_MEMORY 4297 * NO_RESOURCES 4298 * CANCELLED 4299 * REQUEST_NOT_SUPPORTED 4300 */ 4301 #define RIL_REQUEST_STK_SET_PROFILE 68 4302 4303 /** 4304 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 4305 * 4306 * Requests to send a SAT/USAT envelope command to SIM. 4307 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111 4308 * 4309 * "data" is a const char * containing SAT/USAT command 4310 * in hexadecimal format string starting with command tag 4311 * 4312 * "response" is a const char * containing SAT/USAT response 4313 * in hexadecimal format string starting with first byte of response 4314 * (May be NULL) 4315 * 4316 * Valid errors: 4317 * RIL_E_SUCCESS 4318 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 4319 * SIM_BUSY 4320 * OPERATION_NOT_ALLOWED 4321 * INTERNAL_ERR 4322 * NO_MEMORY 4323 * NO_RESOURCES 4324 * CANCELLED 4325 * INVALID_ARGUMENTS 4326 * MODEM_ERR 4327 * REQUEST_NOT_SUPPORTED 4328 */ 4329 #define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69 4330 4331 /** 4332 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 4333 * 4334 * Requests to send a terminal response to SIM for a received 4335 * proactive command 4336 * 4337 * "data" is a const char * containing SAT/USAT response 4338 * in hexadecimal format string starting with first byte of response data 4339 * 4340 * "response" is NULL 4341 * 4342 * Valid errors: 4343 * RIL_E_SUCCESS 4344 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 4345 * RIL_E_OPERATION_NOT_ALLOWED 4346 * INTERNAL_ERR 4347 * NO_MEMORY 4348 * NO_RESOURCES 4349 * CANCELLED 4350 * INVALID_MODEM_STATE 4351 * REQUEST_NOT_SUPPORTED 4352 */ 4353 #define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70 4354 4355 /** 4356 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 4357 * 4358 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has 4359 * been initialized by ME already. (We could see the call has been in the 'call 4360 * list') So, STK application needs to accept/reject the call according as user 4361 * operations. 4362 * 4363 * "data" is int * 4364 * ((int *)data)[0] is > 0 for "accept" the call setup 4365 * ((int *)data)[0] is == 0 for "reject" the call setup 4366 * 4367 * "response" is NULL 4368 * 4369 * Valid errors: 4370 * RIL_E_SUCCESS 4371 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 4372 * RIL_E_OPERATION_NOT_ALLOWED 4373 * INTERNAL_ERR 4374 * NO_MEMORY 4375 * NO_RESOURCES 4376 * CANCELLED 4377 * REQUEST_NOT_SUPPORTED 4378 */ 4379 #define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71 4380 4381 /** 4382 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER 4383 * 4384 * Connects the two calls and disconnects the subscriber from both calls. 4385 * 4386 * "data" is NULL 4387 * "response" is NULL 4388 * 4389 * Valid errors: 4390 * SUCCESS 4391 * RADIO_NOT_AVAILABLE (radio resetting) 4392 * INVALID_STATE 4393 * NO_RESOURCES 4394 * NO_MEMORY 4395 * INVALID_ARGUMENTS 4396 * SYSTEM_ERR 4397 * MODEM_ERR 4398 * INTERNAL_ERR 4399 * INVALID_CALL_ID 4400 * INVALID_STATE 4401 * OPERATION_NOT_ALLOWED 4402 * NO_RESOURCES 4403 * CANCELLED 4404 * REQUEST_NOT_SUPPORTED 4405 */ 4406 #define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72 4407 4408 /** 4409 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 4410 * 4411 * Requests to set the preferred network type for searching and registering 4412 * (CS/PS domain, RAT, and operation mode) 4413 * 4414 * "data" is int * which is RIL_PreferredNetworkType 4415 * 4416 * "response" is NULL 4417 * 4418 * Valid errors: 4419 * SUCCESS 4420 * RADIO_NOT_AVAILABLE (radio resetting) 4421 * OPERATION_NOT_ALLOWED 4422 * MODE_NOT_SUPPORTED 4423 * NO_MEMORY 4424 * INTERNAL_ERR 4425 * SYSTEM_ERR 4426 * INVALID_ARGUMENTS 4427 * MODEM_ERR 4428 * REQUEST_NOT_SUPPORTED 4429 * NO_RESOURCES 4430 * CANCELLED 4431 */ 4432 #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73 4433 4434 /** 4435 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 4436 * 4437 * Query the preferred network type (CS/PS domain, RAT, and operation mode) 4438 * for searching and registering 4439 * 4440 * "data" is NULL 4441 * 4442 * "response" is int * 4443 * ((int *)reponse)[0] is == RIL_PreferredNetworkType 4444 * 4445 * Valid errors: 4446 * SUCCESS 4447 * RADIO_NOT_AVAILABLE 4448 * NO_MEMORY 4449 * INTERNAL_ERR 4450 * SYSTEM_ERR 4451 * INVALID_ARGUMENTS 4452 * MODEM_ERR 4453 * REQUEST_NOT_SUPPORTED 4454 * NO_RESOURCES 4455 * CANCELLED 4456 * 4457 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 4458 */ 4459 #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74 4460 4461 /** 4462 * RIL_REQUEST_NEIGHBORING_CELL_IDS 4463 * 4464 * Request neighboring cell id in GSM network 4465 * 4466 * "data" is NULL 4467 * "response" must be a " const RIL_NeighboringCell** " 4468 * 4469 * Valid errors: 4470 * SUCCESS 4471 * RADIO_NOT_AVAILABLE 4472 * NO_MEMORY 4473 * INTERNAL_ERR 4474 * SYSTEM_ERR 4475 * MODEM_ERR 4476 * NO_NETWORK_FOUND 4477 * REQUEST_NOT_SUPPORTED 4478 * NO_RESOURCES 4479 * CANCELLED 4480 */ 4481 #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75 4482 4483 /** 4484 * RIL_REQUEST_SET_LOCATION_UPDATES 4485 * 4486 * Enables/disables network state change notifications due to changes in 4487 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA). 4488 * Basically +CREG=2 vs. +CREG=1 (TS 27.007). 4489 * 4490 * Note: The RIL implementation should default to "updates enabled" 4491 * when the screen is on and "updates disabled" when the screen is off. 4492 * 4493 * "data" is int * 4494 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2) 4495 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1) 4496 * 4497 * "response" is NULL 4498 * 4499 * Valid errors: 4500 * SUCCESS 4501 * RADIO_NOT_AVAILABLE 4502 * NO_MEMORY 4503 * INTERNAL_ERR 4504 * SYSTEM_ERR 4505 * INVALID_ARGUMENTS 4506 * MODEM_ERR 4507 * REQUEST_NOT_SUPPORTED 4508 * NO_RESOURCES 4509 * CANCELLED 4510 * 4511 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 4512 */ 4513 #define RIL_REQUEST_SET_LOCATION_UPDATES 76 4514 4515 /** 4516 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 4517 * 4518 * Request to set the location where the CDMA subscription shall 4519 * be retrieved 4520 * 4521 * "data" is int * 4522 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource 4523 * 4524 * "response" is NULL 4525 * 4526 * Valid errors: 4527 * SUCCESS 4528 * RADIO_NOT_AVAILABLE 4529 * SIM_ABSENT 4530 * SUBSCRIPTION_NOT_AVAILABLE 4531 * INTERNAL_ERR 4532 * NO_MEMORY 4533 * NO_RESOURCES 4534 * CANCELLED 4535 * REQUEST_NOT_SUPPORTED 4536 * 4537 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 4538 */ 4539 #define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77 4540 4541 /** 4542 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 4543 * 4544 * Request to set the roaming preferences in CDMA 4545 * 4546 * "data" is int * 4547 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL 4548 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL 4549 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL 4550 * 4551 * "response" is NULL 4552 * 4553 * Valid errors: 4554 * SUCCESS 4555 * RADIO_NOT_AVAILABLE 4556 * NO_MEMORY 4557 * INTERNAL_ERR 4558 * SYSTEM_ERR 4559 * INVALID_ARGUMENTS 4560 * MODEM_ERR 4561 * REQUEST_NOT_SUPPORTED 4562 * OPERATION_NOT_ALLOWED 4563 * NO_RESOURCES 4564 * CANCELLED 4565 */ 4566 #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78 4567 4568 /** 4569 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 4570 * 4571 * Request the actual setting of the roaming preferences in CDMA in the modem 4572 * 4573 * "data" is NULL 4574 * 4575 * "response" is int * 4576 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL 4577 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL 4578 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL 4579 * 4580 * "response" is NULL 4581 * 4582 * Valid errors: 4583 * SUCCESS 4584 * RADIO_NOT_AVAILABLE 4585 * NO_MEMORY 4586 * INTERNAL_ERR 4587 * SYSTEM_ERR 4588 * INVALID_ARGUMENTS 4589 * MODEM_ERR 4590 * REQUEST_NOT_SUPPORTED 4591 * NO_RESOURCES 4592 * CANCELLED 4593 */ 4594 #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79 4595 4596 /** 4597 * RIL_REQUEST_SET_TTY_MODE 4598 * 4599 * Request to set the TTY mode 4600 * 4601 * "data" is int * 4602 * ((int *)data)[0] is == 0 for TTY off 4603 * ((int *)data)[0] is == 1 for TTY Full 4604 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover) 4605 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover) 4606 * 4607 * "response" is NULL 4608 * 4609 * Valid errors: 4610 * SUCCESS 4611 * RADIO_NOT_AVAILABLE 4612 * INVALID_ARGUMENTS 4613 * MODEM_ERR 4614 * INTERNAL_ERR 4615 * NO_MEMORY 4616 * INVALID_ARGUMENTS 4617 * MODEM_ERR 4618 * INTERNAL_ERR 4619 * NO_MEMORY 4620 * NO_RESOURCES 4621 * CANCELLED 4622 * REQUEST_NOT_SUPPORTED 4623 */ 4624 #define RIL_REQUEST_SET_TTY_MODE 80 4625 4626 /** 4627 * RIL_REQUEST_QUERY_TTY_MODE 4628 * 4629 * Request the setting of TTY mode 4630 * 4631 * "data" is NULL 4632 * 4633 * "response" is int * 4634 * ((int *)response)[0] is == 0 for TTY off 4635 * ((int *)response)[0] is == 1 for TTY Full 4636 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover) 4637 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover) 4638 * 4639 * "response" is NULL 4640 * 4641 * Valid errors: 4642 * SUCCESS 4643 * RADIO_NOT_AVAILABLE 4644 * MODEM_ERR 4645 * INTERNAL_ERR 4646 * NO_MEMORY 4647 * INVALID_ARGUMENTS 4648 * NO_RESOURCES 4649 * CANCELLED 4650 * REQUEST_NOT_SUPPORTED 4651 */ 4652 #define RIL_REQUEST_QUERY_TTY_MODE 81 4653 4654 /** 4655 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 4656 * 4657 * Request to set the preferred voice privacy mode used in voice 4658 * scrambling 4659 * 4660 * "data" is int * 4661 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) 4662 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) 4663 * 4664 * "response" is NULL 4665 * 4666 * Valid errors: 4667 * SUCCESS 4668 * RADIO_NOT_AVAILABLE 4669 * INVALID_ARGUMENTS 4670 * SYSTEM_ERR 4671 * MODEM_ERR 4672 * INTERNAL_ERR 4673 * NO_MEMORY 4674 * INVALID_CALL_ID 4675 * NO_RESOURCES 4676 * CANCELLED 4677 * REQUEST_NOT_SUPPORTED 4678 */ 4679 #define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82 4680 4681 /** 4682 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 4683 * 4684 * Request the setting of preferred voice privacy mode 4685 * 4686 * "data" is NULL 4687 * 4688 * "response" is int * 4689 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) 4690 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) 4691 * 4692 * "response" is NULL 4693 * 4694 * Valid errors: 4695 * SUCCESS 4696 * RADIO_NOT_AVAILABLE 4697 * MODEM_ERR 4698 * INTERNAL_ERR 4699 * NO_MEMORY 4700 * INVALID_ARGUMENTS 4701 * NO_RESOURCES 4702 * CANCELLED 4703 * REQUEST_NOT_SUPPORTED 4704 */ 4705 #define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83 4706 4707 /** 4708 * RIL_REQUEST_CDMA_FLASH 4709 * 4710 * Send FLASH 4711 * 4712 * "data" is const char * 4713 * ((const char *)data)[0] is a FLASH string 4714 * 4715 * "response" is NULL 4716 * 4717 * Valid errors: 4718 * SUCCESS 4719 * RADIO_NOT_AVAILABLE 4720 * INVALID_ARGUMENTS 4721 * NO_MEMORY 4722 * SYSTEM_ERR 4723 * MODEM_ERR 4724 * INTERNAL_ERR 4725 * INVALID_CALL_ID 4726 * INVALID_STATE 4727 * NO_RESOURCES 4728 * CANCELLED 4729 * REQUEST_NOT_SUPPORTED 4730 * 4731 */ 4732 #define RIL_REQUEST_CDMA_FLASH 84 4733 4734 /** 4735 * RIL_REQUEST_CDMA_BURST_DTMF 4736 * 4737 * Send DTMF string 4738 * 4739 * "data" is const char ** 4740 * ((const char **)data)[0] is a DTMF string 4741 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use 4742 * default 4743 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use 4744 * default 4745 * 4746 * "response" is NULL 4747 * 4748 * Valid errors: 4749 * SUCCESS 4750 * RADIO_NOT_AVAILABLE 4751 * INVALID_ARGUMENTS 4752 * NO_MEMORY 4753 * SYSTEM_ERR 4754 * MODEM_ERR 4755 * INTERNAL_ERR 4756 * INVALID_CALL_ID 4757 * NO_RESOURCES 4758 * CANCELLED 4759 * OPERATION_NOT_ALLOWED 4760 * REQUEST_NOT_SUPPORTED 4761 * 4762 */ 4763 #define RIL_REQUEST_CDMA_BURST_DTMF 85 4764 4765 /** 4766 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 4767 * 4768 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum). 4769 * If the checksum is valid the 20 digit AKEY is written to NV, 4770 * replacing the existing AKEY no matter what it was before. 4771 * 4772 * "data" is const char * 4773 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9') 4774 * where the last 6 digits are a checksum of the 4775 * first 20, as specified in TR45.AHAG 4776 * "Common Cryptographic Algorithms, Revision D.1 4777 * Section 2.2" 4778 * 4779 * "response" is NULL 4780 * 4781 * Valid errors: 4782 * SUCCESS 4783 * RADIO_NOT_AVAILABLE 4784 * NO_MEMORY 4785 * INTERNAL_ERR 4786 * SYSTEM_ERR 4787 * INVALID_ARGUMENTS 4788 * MODEM_ERR 4789 * REQUEST_NOT_SUPPORTED 4790 * NO_RESOURCES 4791 * CANCELLED 4792 * 4793 */ 4794 #define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86 4795 4796 /** 4797 * RIL_REQUEST_CDMA_SEND_SMS 4798 * 4799 * Send a CDMA SMS message 4800 * 4801 * "data" is const RIL_CDMA_SMS_Message * 4802 * 4803 * "response" is a const RIL_SMS_Response * 4804 * 4805 * Based on the return error, caller decides to resend if sending sms 4806 * fails. The CDMA error class is derived as follows, 4807 * SUCCESS is error class 0 (no error) 4808 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure) 4809 * 4810 * Valid errors: 4811 * SUCCESS 4812 * RADIO_NOT_AVAILABLE 4813 * SMS_SEND_FAIL_RETRY 4814 * NETWORK_REJECT 4815 * INVALID_STATE 4816 * INVALID_ARGUMENTS 4817 * NO_MEMORY 4818 * REQUEST_RATE_LIMITED 4819 * INVALID_SMS_FORMAT 4820 * SYSTEM_ERR 4821 * FDN_CHECK_FAILURE 4822 * MODEM_ERR 4823 * NETWORK_ERR 4824 * ENCODING_ERR 4825 * INVALID_SMSC_ADDRESS 4826 * OPERATION_NOT_ALLOWED 4827 * NO_RESOURCES 4828 * CANCELLED 4829 * REQUEST_NOT_SUPPORTED 4830 * MODE_NOT_SUPPORTED 4831 * SIM_ABSENT 4832 * 4833 */ 4834 #define RIL_REQUEST_CDMA_SEND_SMS 87 4835 4836 /** 4837 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 4838 * 4839 * Acknowledge the success or failure in the receipt of SMS 4840 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 4841 * 4842 * "data" is const RIL_CDMA_SMS_Ack * 4843 * 4844 * "response" is NULL 4845 * 4846 * Valid errors: 4847 * SUCCESS 4848 * RADIO_NOT_AVAILABLE 4849 * INVALID_ARGUMENTS 4850 * NO_SMS_TO_ACK 4851 * INVALID_STATE 4852 * NO_MEMORY 4853 * REQUEST_RATE_LIMITED 4854 * SYSTEM_ERR 4855 * MODEM_ERR 4856 * INVALID_STATE 4857 * OPERATION_NOT_ALLOWED 4858 * NETWORK_NOT_READY 4859 * INVALID_MODEM_STATE 4860 * REQUEST_NOT_SUPPORTED 4861 * 4862 */ 4863 #define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88 4864 4865 /** 4866 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 4867 * 4868 * Request the setting of GSM/WCDMA Cell Broadcast SMS config. 4869 * 4870 * "data" is NULL 4871 * 4872 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo ** 4873 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *) 4874 * 4875 * Valid errors: 4876 * SUCCESS 4877 * RADIO_NOT_AVAILABLE 4878 * INVALID_STATE 4879 * NO_MEMORY 4880 * REQUEST_RATE_LIMITED 4881 * SYSTEM_ERR 4882 * NO_RESOURCES 4883 * MODEM_ERR 4884 * SYSTEM_ERR 4885 * INTERNAL_ERR 4886 * NO_RESOURCES 4887 * CANCELLED 4888 * INVALID_MODEM_STATE 4889 * REQUEST_NOT_SUPPORTED 4890 */ 4891 #define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89 4892 4893 /** 4894 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 4895 * 4896 * Set GSM/WCDMA Cell Broadcast SMS config 4897 * 4898 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo ** 4899 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *) 4900 * 4901 * "response" is NULL 4902 * 4903 * Valid errors: 4904 * SUCCESS 4905 * RADIO_NOT_AVAILABLE 4906 * INVALID_STATE 4907 * INVALID_ARGUMENTS 4908 * NO_MEMORY 4909 * SYSTEM_ERR 4910 * REQUEST_RATE_LIMITED 4911 * MODEM_ERR 4912 * SYSTEM_ERR 4913 * INTERNAL_ERR 4914 * NO_RESOURCES 4915 * CANCELLED 4916 * INVALID_MODEM_STATE 4917 * REQUEST_NOT_SUPPORTED 4918 * 4919 */ 4920 #define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90 4921 4922 /** 4923 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 4924 * 4925 * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS 4926 * 4927 * "data" is const int * 4928 * (const int *)data[0] indicates to activate or turn off the 4929 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1, 4930 * 0 - Activate, 1 - Turn off 4931 * 4932 * "response" is NULL 4933 * 4934 * Valid errors: 4935 * SUCCESS 4936 * RADIO_NOT_AVAILABLE 4937 * INVALID_STATE 4938 * INVALID_ARGUMENTS 4939 * NO_MEMORY 4940 * SYSTEM_ERR 4941 * REQUEST_RATE_LIMITED 4942 * MODEM_ERR 4943 * INTERNAL_ERR 4944 * NO_RESOURCES 4945 * CANCELLED 4946 * INVALID_MODEM_STATE 4947 * REQUEST_NOT_SUPPORTED 4948 * 4949 */ 4950 #define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91 4951 4952 /** 4953 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 4954 * 4955 * Request the setting of CDMA Broadcast SMS config 4956 * 4957 * "data" is NULL 4958 * 4959 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo ** 4960 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *) 4961 * 4962 * Valid errors: 4963 * SUCCESS 4964 * RADIO_NOT_AVAILABLE 4965 * INVALID_STATE 4966 * NO_MEMORY 4967 * REQUEST_RATE_LIMITED 4968 * SYSTEM_ERR 4969 * NO_RESOURCES 4970 * MODEM_ERR 4971 * SYSTEM_ERR 4972 * INTERNAL_ERR 4973 * NO_RESOURCES 4974 * CANCELLED 4975 * INVALID_MODEM_STATE 4976 * REQUEST_NOT_SUPPORTED 4977 * 4978 */ 4979 #define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92 4980 4981 /** 4982 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 4983 * 4984 * Set CDMA Broadcast SMS config 4985 * 4986 * "data" is a const RIL_CDMA_BroadcastSmsConfigInfo ** 4987 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *) 4988 * 4989 * "response" is NULL 4990 * 4991 * Valid errors: 4992 * SUCCESS 4993 * RADIO_NOT_AVAILABLE 4994 * INVALID_STATE 4995 * INVALID_ARGUMENTS 4996 * NO_MEMORY 4997 * SYSTEM_ERR 4998 * REQUEST_RATE_LIMITED 4999 * MODEM_ERR 5000 * SYSTEM_ERR 5001 * INTERNAL_ERR 5002 * NO_RESOURCES 5003 * CANCELLED 5004 * INVALID_MODEM_STATE 5005 * REQUEST_NOT_SUPPORTED 5006 * 5007 */ 5008 #define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93 5009 5010 /** 5011 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 5012 * 5013 * Enable or disable the reception of CDMA Broadcast SMS 5014 * 5015 * "data" is const int * 5016 * (const int *)data[0] indicates to activate or turn off the 5017 * reception of CDMA Broadcast SMS, 0-1, 5018 * 0 - Activate, 1 - Turn off 5019 * 5020 * "response" is NULL 5021 * 5022 * Valid errors: 5023 * SUCCESS 5024 * RADIO_NOT_AVAILABLE 5025 * INVALID_STATE 5026 * INVALID_ARGUMENTS 5027 * NO_MEMORY 5028 * SYSTEM_ERR 5029 * REQUEST_RATE_LIMITED 5030 * MODEM_ERR 5031 * INTERNAL_ERR 5032 * NO_RESOURCES 5033 * CANCELLED 5034 * INVALID_MODEM_STATE 5035 * REQUEST_NOT_SUPPORTED 5036 * 5037 */ 5038 #define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94 5039 5040 /** 5041 * RIL_REQUEST_CDMA_SUBSCRIPTION 5042 * 5043 * Request the device MDN / H_SID / H_NID. 5044 * 5045 * The request is only allowed when CDMA subscription is available. When CDMA 5046 * subscription is changed, application layer should re-issue the request to 5047 * update the subscription information. 5048 * 5049 * If a NULL value is returned for any of the device id, it means that error 5050 * accessing the device. 5051 * 5052 * "response" is const char ** 5053 * ((const char **)response)[0] is MDN if CDMA subscription is available 5054 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if 5055 * CDMA subscription is available, in decimal format 5056 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if 5057 * CDMA subscription is available, in decimal format 5058 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available 5059 * ((const char **)response)[4] is PRL version if CDMA subscription is available 5060 * 5061 * Valid errors: 5062 * SUCCESS 5063 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE 5064 * NO_MEMORY 5065 * INTERNAL_ERR 5066 * SYSTEM_ERR 5067 * INVALID_ARGUMENTS 5068 * MODEM_ERR 5069 * NOT_PROVISIONED 5070 * REQUEST_NOT_SUPPORTED 5071 * INTERNAL_ERR 5072 * NO_RESOURCES 5073 * CANCELLED 5074 * 5075 */ 5076 5077 #define RIL_REQUEST_CDMA_SUBSCRIPTION 95 5078 5079 /** 5080 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 5081 * 5082 * Stores a CDMA SMS message to RUIM memory. 5083 * 5084 * "data" is RIL_CDMA_SMS_WriteArgs * 5085 * 5086 * "response" is int * 5087 * ((const int *)response)[0] is the record index where the message is stored. 5088 * 5089 * Valid errors: 5090 * SUCCESS 5091 * RADIO_NOT_AVAILABLE 5092 * SIM_FULL 5093 * INVALID_ARGUMENTS 5094 * INVALID_SMS_FORMAT 5095 * INTERNAL_ERR 5096 * MODEM_ERR 5097 * ENCODING_ERR 5098 * NO_MEMORY 5099 * NO_RESOURCES 5100 * INVALID_MODEM_STATE 5101 * OPERATION_NOT_ALLOWED 5102 * INVALID_SMSC_ADDRESS 5103 * CANCELLED 5104 * INVALID_MODEM_STATE 5105 * REQUEST_NOT_SUPPORTED 5106 * SIM_ABSENT 5107 * 5108 */ 5109 #define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96 5110 5111 /** 5112 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 5113 * 5114 * Deletes a CDMA SMS message from RUIM memory. 5115 * 5116 * "data" is int * 5117 * ((int *)data)[0] is the record index of the message to delete. 5118 * 5119 * "response" is NULL 5120 * 5121 * Valid errors: 5122 * SUCCESS 5123 * RADIO_NOT_AVAILABLE 5124 * INVALID_ARGUMENTS 5125 * NO_MEMORY 5126 * REQUEST_RATE_LIMITED 5127 * SYSTEM_ERR 5128 * MODEM_ERR 5129 * NO_SUCH_ENTRY 5130 * INTERNAL_ERR 5131 * NO_RESOURCES 5132 * CANCELLED 5133 * INVALID_MODEM_STATE 5134 * REQUEST_NOT_SUPPORTED 5135 * SIM_ABSENT 5136 */ 5137 #define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97 5138 5139 /** 5140 * RIL_REQUEST_DEVICE_IDENTITY 5141 * 5142 * Request the device ESN / MEID / IMEI / IMEISV. 5143 * 5144 * The request is always allowed and contains GSM and CDMA device identity; 5145 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and 5146 * RIL_REQUEST_GET_IMEISV. 5147 * 5148 * If a NULL value is returned for any of the device id, it means that error 5149 * accessing the device. 5150 * 5151 * When CDMA subscription is changed the ESN/MEID may change. The application 5152 * layer should re-issue the request to update the device identity in this case. 5153 * 5154 * "response" is const char ** 5155 * ((const char **)response)[0] is IMEI if GSM subscription is available 5156 * ((const char **)response)[1] is IMEISV if GSM subscription is available 5157 * ((const char **)response)[2] is ESN if CDMA subscription is available 5158 * ((const char **)response)[3] is MEID if CDMA subscription is available 5159 * 5160 * Valid errors: 5161 * SUCCESS 5162 * RADIO_NOT_AVAILABLE 5163 * NO_MEMORY 5164 * INTERNAL_ERR 5165 * SYSTEM_ERR 5166 * INVALID_ARGUMENTS 5167 * MODEM_ERR 5168 * NOT_PROVISIONED 5169 * REQUEST_NOT_SUPPORTED 5170 * NO_RESOURCES 5171 * CANCELLED 5172 * 5173 */ 5174 #define RIL_REQUEST_DEVICE_IDENTITY 98 5175 5176 /** 5177 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 5178 * 5179 * Request the radio's system selection module to exit emergency 5180 * callback mode. RIL will not respond with SUCCESS until the modem has 5181 * completely exited from Emergency Callback Mode. 5182 * 5183 * "data" is NULL 5184 * 5185 * "response" is NULL 5186 * 5187 * Valid errors: 5188 * SUCCESS 5189 * RADIO_NOT_AVAILABLE 5190 * OPERATION_NOT_ALLOWED 5191 * NO_MEMORY 5192 * INTERNAL_ERR 5193 * SYSTEM_ERR 5194 * INVALID_ARGUMENTS 5195 * MODEM_ERR 5196 * REQUEST_NOT_SUPPORTED 5197 * NO_RESOURCES 5198 * CANCELLED 5199 * 5200 */ 5201 #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99 5202 5203 /** 5204 * RIL_REQUEST_GET_SMSC_ADDRESS 5205 * 5206 * Queries the default Short Message Service Center address on the device. 5207 * 5208 * "data" is NULL 5209 * 5210 * "response" is const char * containing the SMSC address. 5211 * 5212 * Valid errors: 5213 * SUCCESS 5214 * RADIO_NOT_AVAILABLE 5215 * NO_MEMORY 5216 * REQUEST_RATE_LIMITED 5217 * SYSTEM_ERR 5218 * INTERNAL_ERR 5219 * MODEM_ERR 5220 * INVALID_ARGUMENTS 5221 * INVALID_MODEM_STATE 5222 * NOT_PROVISIONED 5223 * NO_RESOURCES 5224 * CANCELLED 5225 * REQUEST_NOT_SUPPORTED 5226 * SIM_ABSENT 5227 * 5228 */ 5229 #define RIL_REQUEST_GET_SMSC_ADDRESS 100 5230 5231 /** 5232 * RIL_REQUEST_SET_SMSC_ADDRESS 5233 * 5234 * Sets the default Short Message Service Center address on the device. 5235 * 5236 * "data" is const char * containing the SMSC address. 5237 * 5238 * "response" is NULL 5239 * 5240 * Valid errors: 5241 * SUCCESS 5242 * RADIO_NOT_AVAILABLE 5243 * INVALID_ARGUMENTS 5244 * INVALID_SMS_FORMAT 5245 * NO_MEMORY 5246 * SYSTEM_ERR 5247 * REQUEST_RATE_LIMITED 5248 * MODEM_ERR 5249 * NO_RESOURCES 5250 * INTERNAL_ERR 5251 * CANCELLED 5252 * REQUEST_NOT_SUPPORTED 5253 * SIM_ABSENT 5254 */ 5255 #define RIL_REQUEST_SET_SMSC_ADDRESS 101 5256 5257 /** 5258 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 5259 * 5260 * Indicates whether there is storage available for new SMS messages. 5261 * 5262 * "data" is int * 5263 * ((int *)data)[0] is 1 if memory is available for storing new messages 5264 * is 0 if memory capacity is exceeded 5265 * 5266 * "response" is NULL 5267 * 5268 * Valid errors: 5269 * SUCCESS 5270 * RADIO_NOT_AVAILABLE 5271 * INVALID_ARGUMENTS 5272 * NO_MEMORY 5273 * INVALID_STATE 5274 * SYSTEM_ERR 5275 * REQUEST_RATE_LIMITED 5276 * MODEM_ERR 5277 * INTERNAL_ERR 5278 * NO_RESOURCES 5279 * CANCELLED 5280 * REQUEST_NOT_SUPPORTED 5281 * 5282 */ 5283 #define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102 5284 5285 /** 5286 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 5287 * 5288 * Indicates that the StkSerivce is running and is 5289 * ready to receive RIL_UNSOL_STK_XXXXX commands. 5290 * 5291 * "data" is NULL 5292 * "response" is NULL 5293 * 5294 * Valid errors: 5295 * SUCCESS 5296 * RADIO_NOT_AVAILABLE 5297 * INTERNAL_ERR 5298 * NO_MEMORY 5299 * NO_RESOURCES 5300 * CANCELLED 5301 * REQUEST_NOT_SUPPORTED 5302 * 5303 */ 5304 #define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103 5305 5306 /** 5307 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 5308 * 5309 * Request to query the location where the CDMA subscription shall 5310 * be retrieved 5311 * 5312 * "data" is NULL 5313 * 5314 * "response" is int * 5315 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource 5316 * 5317 * Valid errors: 5318 * SUCCESS 5319 * RADIO_NOT_AVAILABLE 5320 * SUBSCRIPTION_NOT_AVAILABLE 5321 * INTERNAL_ERR 5322 * NO_MEMORY 5323 * NO_RESOURCES 5324 * CANCELLED 5325 * REQUEST_NOT_SUPPORTED 5326 * 5327 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 5328 */ 5329 #define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104 5330 5331 /** 5332 * RIL_REQUEST_ISIM_AUTHENTICATION 5333 * 5334 * Request the ISIM application on the UICC to perform AKA 5335 * challenge/response algorithm for IMS authentication 5336 * 5337 * "data" is a const char * containing the challenge string in Base64 format 5338 * "response" is a const char * containing the response in Base64 format 5339 * 5340 * Valid errors: 5341 * SUCCESS 5342 * RADIO_NOT_AVAILABLE 5343 * INTERNAL_ERR 5344 * NO_MEMORY 5345 * NO_RESOURCES 5346 * CANCELLED 5347 * REQUEST_NOT_SUPPORTED 5348 */ 5349 #define RIL_REQUEST_ISIM_AUTHENTICATION 105 5350 5351 /** 5352 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 5353 * 5354 * Acknowledge successful or failed receipt of SMS previously indicated 5355 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send 5356 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU. 5357 * 5358 * "data" is const char ** 5359 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK) 5360 * is "0" on failed receipt (send RP-ERROR) 5361 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format 5362 * 5363 * "response" is NULL 5364 * 5365 * Valid errors: 5366 * SUCCESS 5367 * RADIO_NOT_AVAILABLE 5368 * INTERNAL_ERR 5369 * NO_MEMORY 5370 * NO_RESOURCES 5371 * CANCELLED 5372 * REQUEST_NOT_SUPPORTED 5373 */ 5374 #define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106 5375 5376 /** 5377 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 5378 * 5379 * Requests to send a SAT/USAT envelope command to SIM. 5380 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111. 5381 * 5382 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND: 5383 * the SW1 and SW2 status bytes from the UICC response are returned along with 5384 * the response data, using the same structure as RIL_REQUEST_SIM_IO. 5385 * 5386 * The RIL implementation shall perform the normal processing of a '91XX' 5387 * response in SW1/SW2 to retrieve the pending proactive command and send it 5388 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does. 5389 * 5390 * "data" is a const char * containing the SAT/USAT command 5391 * in hexadecimal format starting with command tag 5392 * 5393 * "response" is a const RIL_SIM_IO_Response * 5394 * 5395 * Valid errors: 5396 * RIL_E_SUCCESS 5397 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 5398 * SIM_BUSY 5399 * OPERATION_NOT_ALLOWED 5400 * INTERNAL_ERR 5401 * NO_MEMORY 5402 * NO_RESOURCES 5403 * CANCELLED 5404 * REQUEST_NOT_SUPPORTED 5405 * SIM_ABSENT 5406 */ 5407 #define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107 5408 5409 /** 5410 * RIL_REQUEST_VOICE_RADIO_TECH 5411 * 5412 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only 5413 * when radio state is not RADIO_STATE_UNAVAILABLE 5414 * 5415 * "data" is NULL 5416 * "response" is int * 5417 * ((int *) response)[0] is of type const RIL_RadioTechnology 5418 * 5419 * Valid errors: 5420 * SUCCESS 5421 * RADIO_NOT_AVAILABLE 5422 * INTERNAL_ERR 5423 * NO_MEMORY 5424 * NO_RESOURCES 5425 * CANCELLED 5426 * REQUEST_NOT_SUPPORTED 5427 */ 5428 #define RIL_REQUEST_VOICE_RADIO_TECH 108 5429 5430 /** 5431 * RIL_REQUEST_GET_CELL_INFO_LIST 5432 * 5433 * Request all of the current cell information known to the radio. The radio 5434 * must a list of all current cells, including the neighboring cells. If for a particular 5435 * cell information isn't known then the appropriate unknown value will be returned. 5436 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST. 5437 * 5438 * "data" is NULL 5439 * 5440 * "response" is an array of RIL_CellInfo_v12. 5441 * 5442 * Valid errors: 5443 * SUCCESS 5444 * RADIO_NOT_AVAILABLE 5445 * NO_MEMORY 5446 * INTERNAL_ERR 5447 * SYSTEM_ERR 5448 * MODEM_ERR 5449 * NO_NETWORK_FOUND 5450 * REQUEST_NOT_SUPPORTED 5451 * NO_RESOURCES 5452 * CANCELLED 5453 * 5454 */ 5455 #define RIL_REQUEST_GET_CELL_INFO_LIST 109 5456 5457 /** 5458 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 5459 * 5460 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked. 5461 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported 5462 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue 5463 * a RIL_UNSOL_CELL_INFO_LIST. 5464 * 5465 * "data" is int * 5466 * ((int *)data)[0] is minimum time in milliseconds 5467 * 5468 * "response" is NULL 5469 * 5470 * Valid errors: 5471 * SUCCESS 5472 * RADIO_NOT_AVAILABLE 5473 * NO_MEMORY 5474 * INTERNAL_ERR 5475 * SYSTEM_ERR 5476 * INVALID_ARGUMENTS 5477 * REQUEST_NOT_SUPPORTED 5478 * NO_RESOURCES 5479 * CANCELLED 5480 */ 5481 #define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110 5482 5483 /** 5484 * RIL_REQUEST_SET_INITIAL_ATTACH_APN 5485 * 5486 * Set an apn to initial attach network 5487 * 5488 * "data" is a const char ** 5489 * ((const char **)data)[0] is the APN to connect if radio technology is LTE 5490 * ((const char **)data)[1] is the connection type to request must be one of the 5491 * PDP_type values in TS 27.007 section 10.1.1. 5492 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 5493 * ((const char **)data)[2] is the PAP / CHAP auth type. Values: 5494 * 0 => PAP and CHAP is never performed. 5495 * 1 => PAP may be performed; CHAP is never performed. 5496 * 2 => CHAP may be performed; PAP is never performed. 5497 * 3 => PAP / CHAP may be performed - baseband dependent. 5498 * ((const char **)data)[3] is the username for APN, or NULL 5499 * ((const char **)data)[4] is the password for APN, or NULL 5500 * 5501 * "response" is NULL 5502 * 5503 * Valid errors: 5504 * SUCCESS 5505 * RADIO_NOT_AVAILABLE (radio resetting) 5506 * SUBSCRIPTION_NOT_AVAILABLE 5507 * NO_MEMORY 5508 * INTERNAL_ERR 5509 * SYSTEM_ERR 5510 * INVALID_ARGUMENTS 5511 * MODEM_ERR 5512 * NOT_PROVISIONED 5513 * REQUEST_NOT_SUPPORTED 5514 * NO_RESOURCES 5515 * CANCELLED 5516 * 5517 */ 5518 #define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111 5519 5520 /** 5521 * RIL_REQUEST_IMS_REGISTRATION_STATE 5522 * 5523 * This message is DEPRECATED and shall be removed in a future release (target: 2018); 5524 * instead, provide IMS registration status via an IMS Service. 5525 * 5526 * Request current IMS registration state 5527 * 5528 * "data" is NULL 5529 * 5530 * "response" is int * 5531 * ((int *)response)[0] is registration state: 5532 * 0 - Not registered 5533 * 1 - Registered 5534 * 5535 * If ((int*)response)[0] is = 1, then ((int *) response)[1] 5536 * must follow with IMS SMS format: 5537 * 5538 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily 5539 * 5540 * Valid errors: 5541 * SUCCESS 5542 * RADIO_NOT_AVAILABLE 5543 * INTERNAL_ERR 5544 * NO_MEMORY 5545 * NO_RESOURCES 5546 * CANCELLED 5547 * INVALID_MODEM_STATE 5548 * REQUEST_NOT_SUPPORTED 5549 */ 5550 #define RIL_REQUEST_IMS_REGISTRATION_STATE 112 5551 5552 /** 5553 * RIL_REQUEST_IMS_SEND_SMS 5554 * 5555 * Send a SMS message over IMS 5556 * 5557 * "data" is const RIL_IMS_SMS_Message * 5558 * 5559 * "response" is a const RIL_SMS_Response * 5560 * 5561 * Based on the return error, caller decides to resend if sending sms 5562 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry. 5563 * In case of retry, data is encoded based on Voice Technology available. 5564 * 5565 * Valid errors: 5566 * SUCCESS 5567 * RADIO_NOT_AVAILABLE 5568 * SMS_SEND_FAIL_RETRY 5569 * FDN_CHECK_FAILURE 5570 * NETWORK_REJECT 5571 * INVALID_ARGUMENTS 5572 * INVALID_STATE 5573 * NO_MEMORY 5574 * INVALID_SMS_FORMAT 5575 * SYSTEM_ERR 5576 * REQUEST_RATE_LIMITED 5577 * MODEM_ERR 5578 * NETWORK_ERR 5579 * ENCODING_ERR 5580 * INVALID_SMSC_ADDRESS 5581 * OPERATION_NOT_ALLOWED 5582 * INTERNAL_ERR 5583 * NO_RESOURCES 5584 * CANCELLED 5585 * REQUEST_NOT_SUPPORTED 5586 * 5587 */ 5588 #define RIL_REQUEST_IMS_SEND_SMS 113 5589 5590 /** 5591 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 5592 * 5593 * Request APDU exchange on the basic channel. This command reflects TS 27.007 5594 * "generic SIM access" operation (+CSIM). The modem must ensure proper function 5595 * of GSM/CDMA, and filter commands appropriately. It should filter 5596 * channel management and SELECT by DF name commands. 5597 * 5598 * "data" is a const RIL_SIM_APDU * 5599 * "sessionid" field should be ignored. 5600 * 5601 * "response" is a const RIL_SIM_IO_Response * 5602 * 5603 * Valid errors: 5604 * SUCCESS 5605 * RADIO_NOT_AVAILABLE 5606 * INTERNAL_ERR 5607 * NO_MEMORY 5608 * NO_RESOURCES 5609 * CANCELLED 5610 * REQUEST_NOT_SUPPORTED 5611 */ 5612 #define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114 5613 5614 /** 5615 * RIL_REQUEST_SIM_OPEN_CHANNEL 5616 * 5617 * Open a new logical channel and select the given application. This command 5618 * reflects TS 27.007 "open logical channel" operation (+CCHO). This request 5619 * also specifies the P2 parameter (described in ISO 7816-4). 5620 * 5621 * "data" is a const RIL_OpenChannelParam * 5622 * 5623 * "response" is int * 5624 * ((int *)data)[0] contains the session id of the logical channel. 5625 * ((int *)data)[1] onwards may optionally contain the select response for the 5626 * open channel command with one byte per integer. 5627 * 5628 * Valid errors: 5629 * SUCCESS 5630 * RADIO_NOT_AVAILABLE 5631 * MISSING_RESOURCE 5632 * NO_SUCH_ELEMENT 5633 * INTERNAL_ERR 5634 * NO_MEMORY 5635 * NO_RESOURCES 5636 * CANCELLED 5637 * SIM_ERR 5638 * INVALID_SIM_STATE 5639 * MISSING_RESOURCE 5640 * REQUEST_NOT_SUPPORTED 5641 */ 5642 #define RIL_REQUEST_SIM_OPEN_CHANNEL 115 5643 5644 /** 5645 * RIL_REQUEST_SIM_CLOSE_CHANNEL 5646 * 5647 * Close a previously opened logical channel. This command reflects TS 27.007 5648 * "close logical channel" operation (+CCHC). 5649 * 5650 * "data" is int * 5651 * ((int *)data)[0] is the session id of logical the channel to close. 5652 * 5653 * "response" is NULL 5654 * 5655 * Valid errors: 5656 * SUCCESS 5657 * RADIO_NOT_AVAILABLE 5658 * INTERNAL_ERR 5659 * NO_MEMORY 5660 * NO_RESOURCES 5661 * CANCELLED 5662 * REQUEST_NOT_SUPPORTED 5663 */ 5664 #define RIL_REQUEST_SIM_CLOSE_CHANNEL 116 5665 5666 /** 5667 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 5668 * 5669 * Exchange APDUs with a UICC over a previously opened logical channel. This 5670 * command reflects TS 27.007 "generic logical channel access" operation 5671 * (+CGLA). The modem should filter channel management and SELECT by DF name 5672 * commands. 5673 * 5674 * "data" is a const RIL_SIM_APDU* 5675 * 5676 * "response" is a const RIL_SIM_IO_Response * 5677 * 5678 * Valid errors: 5679 * SUCCESS 5680 * RADIO_NOT_AVAILABLE 5681 * INTERNAL_ERR 5682 * NO_MEMORY 5683 * NO_RESOURCES 5684 * CANCELLED 5685 * REQUEST_NOT_SUPPORTED 5686 */ 5687 #define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117 5688 5689 /** 5690 * RIL_REQUEST_NV_READ_ITEM 5691 * 5692 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h. 5693 * This is used for device configuration by some CDMA operators. 5694 * 5695 * "data" is a const RIL_NV_ReadItem * 5696 * 5697 * "response" is const char * containing the contents of the NV item 5698 * 5699 * Valid errors: 5700 * SUCCESS 5701 * RADIO_NOT_AVAILABLE 5702 * REQUEST_NOT_SUPPORTED 5703 */ 5704 #define RIL_REQUEST_NV_READ_ITEM 118 5705 5706 /** 5707 * RIL_REQUEST_NV_WRITE_ITEM 5708 * 5709 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h. 5710 * This is used for device configuration by some CDMA operators. 5711 * 5712 * "data" is a const RIL_NV_WriteItem * 5713 * 5714 * "response" is NULL 5715 * 5716 * Valid errors: 5717 * SUCCESS 5718 * RADIO_NOT_AVAILABLE 5719 * REQUEST_NOT_SUPPORTED 5720 */ 5721 #define RIL_REQUEST_NV_WRITE_ITEM 119 5722 5723 /** 5724 * RIL_REQUEST_NV_WRITE_CDMA_PRL 5725 * 5726 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage. 5727 * This is used for device configuration by some CDMA operators. 5728 * 5729 * "data" is a const char * containing the PRL as a byte array 5730 * 5731 * "response" is NULL 5732 * 5733 * Valid errors: 5734 * SUCCESS 5735 * RADIO_NOT_AVAILABLE 5736 * REQUEST_NOT_SUPPORTED 5737 */ 5738 #define RIL_REQUEST_NV_WRITE_CDMA_PRL 120 5739 5740 /** 5741 * RIL_REQUEST_NV_RESET_CONFIG 5742 * 5743 * Reset the radio NV configuration to the factory state. 5744 * This is used for device configuration by some CDMA operators. 5745 * 5746 * "data" is int * 5747 * ((int *)data)[0] is 1 to reload all NV items 5748 * ((int *)data)[0] is 2 for erase NV reset (SCRTN) 5749 * ((int *)data)[0] is 3 for factory reset (RTN) 5750 * 5751 * "response" is NULL 5752 * 5753 * Valid errors: 5754 * SUCCESS 5755 * RADIO_NOT_AVAILABLE 5756 * REQUEST_NOT_SUPPORTED 5757 */ 5758 #define RIL_REQUEST_NV_RESET_CONFIG 121 5759 5760 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION 5761 * FIXME This API needs to have more documentation. 5762 * 5763 * Selection/de-selection of a subscription from a SIM card 5764 * "data" is const RIL_SelectUiccSub* 5765 5766 * 5767 * "response" is NULL 5768 * 5769 * Valid errors: 5770 * SUCCESS 5771 * RADIO_NOT_AVAILABLE (radio resetting) 5772 * SUBSCRIPTION_NOT_SUPPORTED 5773 * NO_MEMORY 5774 * INTERNAL_ERR 5775 * SYSTEM_ERR 5776 * INVALID_ARGUMENTS 5777 * MODEM_ERR 5778 * REQUEST_NOT_SUPPORTED 5779 * NO_RESOURCES 5780 * CANCELLED 5781 * 5782 */ 5783 #define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122 5784 5785 /** 5786 * RIL_REQUEST_ALLOW_DATA 5787 * 5788 * Tells the modem whether data calls are allowed or not 5789 * 5790 * "data" is int * 5791 * FIXME slotId and aid will be added. 5792 * ((int *)data)[0] is == 0 to allow data calls 5793 * ((int *)data)[0] is == 1 to disallow data calls 5794 * 5795 * "response" is NULL 5796 * 5797 * Valid errors: 5798 * 5799 * SUCCESS 5800 * RADIO_NOT_AVAILABLE (radio resetting) 5801 * NO_MEMORY 5802 * INTERNAL_ERR 5803 * SYSTEM_ERR 5804 * MODEM_ERR 5805 * INVALID_ARGUMENTS 5806 * DEVICE_IN_USE 5807 * INVALID_MODEM_STATE 5808 * REQUEST_NOT_SUPPORTED 5809 * NO_RESOURCES 5810 * CANCELLED 5811 * 5812 */ 5813 #define RIL_REQUEST_ALLOW_DATA 123 5814 5815 /** 5816 * RIL_REQUEST_GET_HARDWARE_CONFIG 5817 * 5818 * Request all of the current hardware (modem and sim) associated 5819 * with the RIL. 5820 * 5821 * "data" is NULL 5822 * 5823 * "response" is an array of RIL_HardwareConfig. 5824 * 5825 * Valid errors: 5826 * RADIO_NOT_AVAILABLE 5827 * REQUEST_NOT_SUPPORTED 5828 */ 5829 #define RIL_REQUEST_GET_HARDWARE_CONFIG 124 5830 5831 /** 5832 * RIL_REQUEST_SIM_AUTHENTICATION 5833 * 5834 * Returns the response of SIM Authentication through RIL to a 5835 * challenge request. 5836 * 5837 * "data" Base64 encoded string containing challenge: 5838 * int authContext; P2 value of authentication command, see P2 parameter in 5839 * 3GPP TS 31.102 7.1.2 5840 * char *authData; the challenge string in Base64 format, see 3GPP 5841 * TS 31.102 7.1.2 5842 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4, 5843 * NULL if no value 5844 * 5845 * "response" Base64 encoded strings containing response: 5846 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3 5847 * int sw2; 5848 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2 5849 * 5850 * Valid errors: 5851 * RADIO_NOT_AVAILABLE 5852 * INTERNAL_ERR 5853 * NO_MEMORY 5854 * NO_RESOURCES 5855 * CANCELLED 5856 * INVALID_MODEM_STATE 5857 * INVALID_ARGUMENTS 5858 * SIM_ERR 5859 * REQUEST_NOT_SUPPORTED 5860 */ 5861 #define RIL_REQUEST_SIM_AUTHENTICATION 125 5862 5863 /** 5864 * RIL_REQUEST_GET_DC_RT_INFO 5865 * 5866 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO 5867 * Requests the Data Connection Real Time Info 5868 * 5869 * "data" is NULL 5870 * 5871 * "response" is the most recent RIL_DcRtInfo 5872 * 5873 * Valid errors: 5874 * SUCCESS 5875 * RADIO_NOT_AVAILABLE 5876 * REQUEST_NOT_SUPPORTED 5877 * INTERNAL_ERR 5878 * NO_MEMORY 5879 * NO_RESOURCES 5880 * CANCELLED 5881 * 5882 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED 5883 */ 5884 #define RIL_REQUEST_GET_DC_RT_INFO 126 5885 5886 /** 5887 * RIL_REQUEST_SET_DC_RT_INFO_RATE 5888 * 5889 * The request is DEPRECATED 5890 * This is the minimum number of milliseconds between successive 5891 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate 5892 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of 5893 * 0 means send as fast as possible. 5894 * 5895 * "data" The number of milliseconds as an int 5896 * 5897 * "response" is null 5898 * 5899 * Valid errors: 5900 * SUCCESS must not fail 5901 */ 5902 #define RIL_REQUEST_SET_DC_RT_INFO_RATE 127 5903 5904 /** 5905 * RIL_REQUEST_SET_DATA_PROFILE 5906 * 5907 * Set data profile in modem 5908 * Modem should erase existed profiles from framework, and apply new profiles 5909 * "data" is a const RIL_DataProfileInfo ** 5910 * "datalen" is count * sizeof(const RIL_DataProfileInfo *) 5911 * "response" is NULL 5912 * 5913 * Valid errors: 5914 * SUCCESS 5915 * RADIO_NOT_AVAILABLE (radio resetting) 5916 * SUBSCRIPTION_NOT_AVAILABLE 5917 * INTERNAL_ERR 5918 * NO_MEMORY 5919 * NO_RESOURCES 5920 * CANCELLED 5921 * REQUEST_NOT_SUPPORTED 5922 * SIM_ABSENT 5923 */ 5924 #define RIL_REQUEST_SET_DATA_PROFILE 128 5925 5926 /** 5927 * RIL_REQUEST_SHUTDOWN 5928 * 5929 * Device is shutting down. All further commands are ignored 5930 * and RADIO_NOT_AVAILABLE must be returned. 5931 * 5932 * "data" is null 5933 * "response" is NULL 5934 * 5935 * Valid errors: 5936 * SUCCESS 5937 * RADIO_NOT_AVAILABLE 5938 * OPERATION_NOT_ALLOWED 5939 * NO_MEMORY 5940 * INTERNAL_ERR 5941 * SYSTEM_ERR 5942 * REQUEST_NOT_SUPPORTED 5943 * NO_RESOURCES 5944 * CANCELLED 5945 */ 5946 #define RIL_REQUEST_SHUTDOWN 129 5947 5948 /** 5949 * RIL_REQUEST_GET_RADIO_CAPABILITY 5950 * 5951 * Used to get phone radio capablility. 5952 * 5953 * "data" is the RIL_RadioCapability structure 5954 * 5955 * Valid errors: 5956 * SUCCESS 5957 * RADIO_NOT_AVAILABLE 5958 * OPERATION_NOT_ALLOWED 5959 * INVALID_STATE 5960 * REQUEST_NOT_SUPPORTED 5961 * INTERNAL_ERR 5962 * NO_MEMORY 5963 * NO_RESOURCES 5964 * CANCELLED 5965 */ 5966 #define RIL_REQUEST_GET_RADIO_CAPABILITY 130 5967 5968 /** 5969 * RIL_REQUEST_SET_RADIO_CAPABILITY 5970 * 5971 * Used to set the phones radio capability. Be VERY careful 5972 * using this request as it may cause some vendor modems to reset. Because 5973 * of the possible modem reset any RIL commands after this one may not be 5974 * processed. 5975 * 5976 * "data" is the RIL_RadioCapability structure 5977 * 5978 * "response" is the RIL_RadioCapability structure, used to feedback return status 5979 * 5980 * Valid errors: 5981 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds. 5982 * RADIO_NOT_AVAILABLE 5983 * OPERATION_NOT_ALLOWED 5984 * NO_MEMORY 5985 * INTERNAL_ERR 5986 * SYSTEM_ERR 5987 * INVALID_ARGUMENTS 5988 * MODEM_ERR 5989 * INVALID_STATE 5990 * REQUEST_NOT_SUPPORTED 5991 * NO_RESOURCES 5992 * CANCELLED 5993 */ 5994 #define RIL_REQUEST_SET_RADIO_CAPABILITY 131 5995 5996 /** 5997 * RIL_REQUEST_START_LCE 5998 * 5999 * Start Link Capacity Estimate (LCE) service if supported by the radio. 6000 * 6001 * "data" is const int * 6002 * ((const int*)data)[0] specifies the desired reporting interval (ms). 6003 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH. 6004 * 6005 * "response" is the RIL_LceStatusInfo. 6006 * 6007 * Valid errors: 6008 * SUCCESS 6009 * RADIO_NOT_AVAILABLE 6010 * LCE_NOT_SUPPORTED 6011 * INTERNAL_ERR 6012 * REQUEST_NOT_SUPPORTED 6013 * NO_MEMORY 6014 * NO_RESOURCES 6015 * CANCELLED 6016 * SIM_ABSENT 6017 */ 6018 #define RIL_REQUEST_START_LCE 132 6019 6020 /** 6021 * RIL_REQUEST_STOP_LCE 6022 * 6023 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be 6024 * idempotent for the radio modem. 6025 * 6026 * "response" is the RIL_LceStatusInfo. 6027 * 6028 * Valid errors: 6029 * SUCCESS 6030 * RADIO_NOT_AVAILABLE 6031 * LCE_NOT_SUPPORTED 6032 * INTERNAL_ERR 6033 * NO_MEMORY 6034 * NO_RESOURCES 6035 * CANCELLED 6036 * REQUEST_NOT_SUPPORTED 6037 * SIM_ABSENT 6038 */ 6039 #define RIL_REQUEST_STOP_LCE 133 6040 6041 /** 6042 * RIL_REQUEST_PULL_LCEDATA 6043 * 6044 * Pull LCE service for capacity information. 6045 * 6046 * "response" is the RIL_LceDataInfo. 6047 * 6048 * Valid errors: 6049 * SUCCESS 6050 * RADIO_NOT_AVAILABLE 6051 * LCE_NOT_SUPPORTED 6052 * INTERNAL_ERR 6053 * NO_MEMORY 6054 * NO_RESOURCES 6055 * CANCELLED 6056 * REQUEST_NOT_SUPPORTED 6057 * SIM_ABSENT 6058 */ 6059 #define RIL_REQUEST_PULL_LCEDATA 134 6060 6061 /** 6062 * RIL_REQUEST_GET_ACTIVITY_INFO 6063 * 6064 * Get modem activity information for power consumption estimation. 6065 * 6066 * Request clear-on-read statistics information that is used for 6067 * estimating the per-millisecond power consumption of the cellular 6068 * modem. 6069 * 6070 * "data" is null 6071 * "response" is const RIL_ActivityStatsInfo * 6072 * 6073 * Valid errors: 6074 * 6075 * SUCCESS 6076 * RADIO_NOT_AVAILABLE (radio resetting) 6077 * NO_MEMORY 6078 * INTERNAL_ERR 6079 * SYSTEM_ERR 6080 * MODEM_ERR 6081 * NOT_PROVISIONED 6082 * REQUEST_NOT_SUPPORTED 6083 * NO_RESOURCES CANCELLED 6084 */ 6085 #define RIL_REQUEST_GET_ACTIVITY_INFO 135 6086 6087 /** 6088 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS 6089 * 6090 * Set carrier restrictions for this sim slot. Expected modem behavior: 6091 * If never receives this command 6092 * - Must allow all carriers 6093 * Receives this command with data being NULL 6094 * - Must allow all carriers. If a previously allowed SIM is present, modem must not reload 6095 * the SIM. If a previously disallowed SIM is present, reload the SIM and notify Android. 6096 * Receives this command with a list of carriers 6097 * - Only allow specified carriers, persist across power cycles and FDR. If a present SIM 6098 * is in the allowed list, modem must not reload the SIM. If a present SIM is *not* in 6099 * the allowed list, modem must detach from the registered network and only keep emergency 6100 * service, and notify Android SIM refresh reset with new SIM state being 6101 * RIL_CARDSTATE_RESTRICTED. Emergency service must be enabled. 6102 * 6103 * "data" is const RIL_CarrierRestrictions * 6104 * A list of allowed carriers and possibly a list of excluded carriers. 6105 * If data is NULL, means to clear previous carrier restrictions and allow all carriers 6106 * 6107 * "response" is int * 6108 * ((int *)data)[0] contains the number of allowed carriers which have been set correctly. 6109 * On success, it should match the length of list data->allowed_carriers. 6110 * If data is NULL, the value must be 0. 6111 * 6112 * Valid errors: 6113 * RIL_E_SUCCESS 6114 * RIL_E_INVALID_ARGUMENTS 6115 * RIL_E_RADIO_NOT_AVAILABLE 6116 * RIL_E_REQUEST_NOT_SUPPORTED 6117 * INTERNAL_ERR 6118 * NO_MEMORY 6119 * NO_RESOURCES 6120 * CANCELLED 6121 */ 6122 #define RIL_REQUEST_SET_CARRIER_RESTRICTIONS 136 6123 6124 /** 6125 * RIL_REQUEST_GET_CARRIER_RESTRICTIONS 6126 * 6127 * Get carrier restrictions for this sim slot. Expected modem behavior: 6128 * Return list of allowed carriers, or null if all carriers are allowed. 6129 * 6130 * "data" is NULL 6131 * 6132 * "response" is const RIL_CarrierRestrictions *. 6133 * If response is NULL, it means all carriers are allowed. 6134 * 6135 * Valid errors: 6136 * RIL_E_SUCCESS 6137 * RIL_E_RADIO_NOT_AVAILABLE 6138 * RIL_E_REQUEST_NOT_SUPPORTED 6139 * INTERNAL_ERR 6140 * NO_MEMORY 6141 * NO_RESOURCES 6142 * CANCELLED 6143 */ 6144 #define RIL_REQUEST_GET_CARRIER_RESTRICTIONS 137 6145 6146 /** 6147 * RIL_REQUEST_SEND_DEVICE_STATE 6148 * 6149 * Send the updated device state. 6150 * Modem can perform power saving based on the provided device state. 6151 * "data" is const int * 6152 * ((const int*)data)[0] A RIL_DeviceStateType that specifies the device state type. 6153 * ((const int*)data)[1] Specifies the state. See RIL_DeviceStateType for the definition of each 6154 * type. 6155 * 6156 * "datalen" is count * sizeof(const RIL_DeviceState *) 6157 * "response" is NULL 6158 * 6159 * Valid errors: 6160 * SUCCESS 6161 * RADIO_NOT_AVAILABLE (radio resetting) 6162 * NO_MEMORY 6163 * INTERNAL_ERR 6164 * SYSTEM_ERR 6165 * INVALID_ARGUMENTS 6166 * REQUEST_NOT_SUPPORTED 6167 * NO_RESOURCES 6168 * CANCELLED 6169 */ 6170 #define RIL_REQUEST_SEND_DEVICE_STATE 138 6171 6172 /** 6173 * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER 6174 * 6175 * Set the unsolicited response filter 6176 * This is used to prevent unnecessary application processor 6177 * wake up for power saving purposes by suppressing the 6178 * unsolicited responses in certain scenarios. 6179 * 6180 * "data" is an int * 6181 * 6182 * ((int *)data)[0] is a 32-bit bitmask of RIL_UnsolicitedResponseFilter 6183 * 6184 * "response" is NULL 6185 * 6186 * Valid errors: 6187 * SUCCESS 6188 * INVALID_ARGUMENTS (e.g. the requested filter doesn't exist) 6189 * RADIO_NOT_AVAILABLE (radio resetting) 6190 * NO_MEMORY 6191 * INTERNAL_ERR 6192 * SYSTEM_ERR 6193 * REQUEST_NOT_SUPPORTED 6194 * NO_RESOURCES 6195 * CANCELLED 6196 */ 6197 #define RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER 139 6198 6199 /** 6200 * RIL_REQUEST_SET_SIM_CARD_POWER 6201 * 6202 * Set SIM card power up or down 6203 * 6204 * Request is equivalent to inserting and removing the card, with 6205 * an additional effect where the ability to detect card removal/insertion 6206 * is disabled when the SIM card is powered down. 6207 * 6208 * This will generate RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 6209 * as if the SIM had been inserted or removed. 6210 * 6211 * "data" is int * 6212 * ((int *)data)[0] is 1 for "SIM POWER UP" 6213 * ((int *)data)[0] is 0 for "SIM POWER DOWN" 6214 * 6215 * "response" is NULL 6216 * 6217 * Valid errors: 6218 * SUCCESS 6219 * RADIO_NOT_AVAILABLE 6220 * REQUEST_NOT_SUPPORTED 6221 * SIM_ABSENT 6222 * INVALID_ARGUMENTS 6223 * INTERNAL_ERR 6224 * NO_MEMORY 6225 * NO_RESOURCES 6226 * CANCELLED 6227 */ 6228 #define RIL_REQUEST_SET_SIM_CARD_POWER 140 6229 6230 /** 6231 * RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION 6232 * 6233 * Provide Carrier specific information to the modem that will be used to 6234 * encrypt the IMSI and IMPI. Sent by the framework during boot, carrier 6235 * switch and everytime we receive a new certificate. 6236 * 6237 * "data" is the RIL_CarrierInfoForImsiEncryption * structure. 6238 * 6239 * "response" is NULL 6240 * 6241 * Valid errors: 6242 * RIL_E_SUCCESS 6243 * RIL_E_RADIO_NOT_AVAILABLE 6244 * SIM_ABSENT 6245 * RIL_E_REQUEST_NOT_SUPPORTED 6246 * INVALID_ARGUMENTS 6247 * MODEM_INTERNAL_FAILURE 6248 * INTERNAL_ERR 6249 * NO_MEMORY 6250 * NO_RESOURCES 6251 * CANCELLED 6252 */ 6253 #define RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION 141 6254 6255 /** 6256 * RIL_REQUEST_START_NETWORK_SCAN 6257 * 6258 * Starts a new network scan 6259 * 6260 * Request to start a network scan with specified radio access networks with frequency bands and/or 6261 * channels. 6262 * 6263 * "data" is a const RIL_NetworkScanRequest *. 6264 * "response" is NULL 6265 * 6266 * Valid errors: 6267 * SUCCESS 6268 * RADIO_NOT_AVAILABLE 6269 * OPERATION_NOT_ALLOWED 6270 * DEVICE_IN_USE 6271 * INTERNAL_ERR 6272 * NO_MEMORY 6273 * MODEM_ERR 6274 * INVALID_ARGUMENTS 6275 * REQUEST_NOT_SUPPORTED 6276 * NO_RESOURCES 6277 * CANCELLED 6278 * 6279 */ 6280 #define RIL_REQUEST_START_NETWORK_SCAN 142 6281 6282 /** 6283 * RIL_REQUEST_STOP_NETWORK_SCAN 6284 * 6285 * Stops an ongoing network scan 6286 * 6287 * Request to stop the ongoing network scan. Since the modem can only perform one scan at a time, 6288 * there is no parameter for this request. 6289 * 6290 * "data" is NULL 6291 * "response" is NULL 6292 * 6293 * Valid errors: 6294 * SUCCESS 6295 * INTERNAL_ERR 6296 * MODEM_ERR 6297 * NO_MEMORY 6298 * NO_RESOURCES 6299 * CANCELLED 6300 * REQUEST_NOT_SUPPORTED 6301 * 6302 */ 6303 #define RIL_REQUEST_STOP_NETWORK_SCAN 143 6304 6305 /** 6306 * RIL_REQUEST_START_KEEPALIVE 6307 * 6308 * Start a keepalive session 6309 * 6310 * Request that the modem begin sending keepalive packets on a particular 6311 * data call, with a specified source, destination, and format. 6312 * 6313 * "data" is a const RIL_RequestKeepalive 6314 * "response" is RIL_KeepaliveStatus with a valid "handle" 6315 * 6316 * Valid errors: 6317 * SUCCESS 6318 * NO_RESOURCES 6319 * INVALID_ARGUMENTS 6320 * 6321 */ 6322 #define RIL_REQUEST_START_KEEPALIVE 144 6323 6324 /** 6325 * RIL_REQUEST_STOP_KEEPALIVE 6326 * 6327 * Stops an ongoing keepalive session 6328 * 6329 * Requests that a keepalive session with the given handle be stopped. 6330 * there is no parameter for this request. 6331 * 6332 * "data" is an integer handle 6333 * "response" is NULL 6334 * 6335 * Valid errors: 6336 * SUCCESS 6337 * INVALID_ARGUMENTS 6338 * 6339 */ 6340 #define RIL_REQUEST_STOP_KEEPALIVE 145 6341 6342 /***********************************************************************/ 6343 6344 /** 6345 * RIL_RESPONSE_ACKNOWLEDGEMENT 6346 * 6347 * This is used by Asynchronous solicited messages and Unsolicited messages 6348 * to acknowledge the receipt of those messages in RIL.java so that the ack 6349 * can be used to let ril.cpp to release wakelock. 6350 * 6351 * Valid errors 6352 * SUCCESS 6353 * RADIO_NOT_AVAILABLE 6354 */ 6355 6356 #define RIL_RESPONSE_ACKNOWLEDGEMENT 800 6357 6358 /***********************************************************************/ 6359 6360 6361 #define RIL_UNSOL_RESPONSE_BASE 1000 6362 6363 /** 6364 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 6365 * 6366 * Indicate when value of RIL_RadioState has changed. 6367 * 6368 * Callee will invoke RIL_RadioStateRequest method on main thread 6369 * 6370 * "data" is NULL 6371 */ 6372 6373 #define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000 6374 6375 6376 /** 6377 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 6378 * 6379 * Indicate when call state has changed 6380 * 6381 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread 6382 * 6383 * "data" is NULL 6384 * 6385 * Response should be invoked on, for example, 6386 * "RING", "BUSY", "NO CARRIER", and also call state 6387 * transitions (DIALING->ALERTING ALERTING->ACTIVE) 6388 * 6389 * Redundent or extraneous invocations are tolerated 6390 */ 6391 #define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001 6392 6393 6394 /** 6395 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 6396 * 6397 * Called when the voice network state changed 6398 * 6399 * Callee will invoke the following requests on main thread: 6400 * 6401 * RIL_REQUEST_VOICE_REGISTRATION_STATE 6402 * RIL_REQUEST_OPERATOR 6403 * 6404 * "data" is NULL 6405 * 6406 * FIXME should this happen when SIM records are loaded? (eg, for 6407 * EONS) 6408 */ 6409 #define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002 6410 6411 /** 6412 * RIL_UNSOL_RESPONSE_NEW_SMS 6413 * 6414 * Called when new SMS is received. 6415 * 6416 * "data" is const char * 6417 * This is a pointer to a string containing the PDU of an SMS-DELIVER 6418 * as an ascii string of hex digits. The PDU starts with the SMSC address 6419 * per TS 27.005 (+CMT:) 6420 * 6421 * Callee will subsequently confirm the receipt of thei SMS with a 6422 * RIL_REQUEST_SMS_ACKNOWLEDGE 6423 * 6424 * No new RIL_UNSOL_RESPONSE_NEW_SMS 6425 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a 6426 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received 6427 */ 6428 6429 #define RIL_UNSOL_RESPONSE_NEW_SMS 1003 6430 6431 /** 6432 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 6433 * 6434 * Called when new SMS Status Report is received. 6435 * 6436 * "data" is const char * 6437 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT 6438 * as an ascii string of hex digits. The PDU starts with the SMSC address 6439 * per TS 27.005 (+CDS:). 6440 * 6441 * Callee will subsequently confirm the receipt of the SMS with a 6442 * RIL_REQUEST_SMS_ACKNOWLEDGE 6443 * 6444 * No new RIL_UNSOL_RESPONSE_NEW_SMS 6445 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a 6446 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received 6447 */ 6448 6449 #define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004 6450 6451 /** 6452 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 6453 * 6454 * Called when new SMS has been stored on SIM card 6455 * 6456 * "data" is const int * 6457 * ((const int *)data)[0] contains the slot index on the SIM that contains 6458 * the new message 6459 */ 6460 6461 #define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005 6462 6463 /** 6464 * RIL_UNSOL_ON_USSD 6465 * 6466 * Called when a new USSD message is received. 6467 * 6468 * "data" is const char ** 6469 * ((const char **)data)[0] points to a type code, which is 6470 * one of these string values: 6471 * "0" USSD-Notify -- text in ((const char **)data)[1] 6472 * "1" USSD-Request -- text in ((const char **)data)[1] 6473 * "2" Session terminated by network 6474 * "3" other local client (eg, SIM Toolkit) has responded 6475 * "4" Operation not supported 6476 * "5" Network timeout 6477 * 6478 * The USSD session is assumed to persist if the type code is "1", otherwise 6479 * the current session (if any) is assumed to have terminated. 6480 * 6481 * ((const char **)data)[1] points to a message string if applicable, which 6482 * should always be in UTF-8. 6483 */ 6484 #define RIL_UNSOL_ON_USSD 1006 6485 /* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */ 6486 6487 /** 6488 * RIL_UNSOL_ON_USSD_REQUEST 6489 * 6490 * Obsolete. Send via RIL_UNSOL_ON_USSD 6491 */ 6492 #define RIL_UNSOL_ON_USSD_REQUEST 1007 6493 6494 /** 6495 * RIL_UNSOL_NITZ_TIME_RECEIVED 6496 * 6497 * Called when radio has received a NITZ time message 6498 * 6499 * "data" is const char * pointing to NITZ time string 6500 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt" 6501 */ 6502 #define RIL_UNSOL_NITZ_TIME_RECEIVED 1008 6503 6504 /** 6505 * RIL_UNSOL_SIGNAL_STRENGTH 6506 * 6507 * Radio may report signal strength rather han have it polled. 6508 * 6509 * "data" is a const RIL_SignalStrength * 6510 */ 6511 #define RIL_UNSOL_SIGNAL_STRENGTH 1009 6512 6513 6514 /** 6515 * RIL_UNSOL_DATA_CALL_LIST_CHANGED 6516 * 6517 * "data" is an array of RIL_Data_Call_Response_v6 identical to that 6518 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list 6519 * of current data contexts including new contexts that have been 6520 * activated. A data call is only removed from this list when the 6521 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio 6522 * is powered off/on. 6523 * 6524 * See also: RIL_REQUEST_DATA_CALL_LIST 6525 */ 6526 6527 #define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010 6528 6529 /** 6530 * RIL_UNSOL_SUPP_SVC_NOTIFICATION 6531 * 6532 * Reports supplementary service related notification from the network. 6533 * 6534 * "data" is a const RIL_SuppSvcNotification * 6535 * 6536 */ 6537 6538 #define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011 6539 6540 /** 6541 * RIL_UNSOL_STK_SESSION_END 6542 * 6543 * Indicate when STK session is terminated by SIM. 6544 * 6545 * "data" is NULL 6546 */ 6547 #define RIL_UNSOL_STK_SESSION_END 1012 6548 6549 /** 6550 * RIL_UNSOL_STK_PROACTIVE_COMMAND 6551 * 6552 * Indicate when SIM issue a STK proactive command to applications 6553 * 6554 * "data" is a const char * containing SAT/USAT proactive command 6555 * in hexadecimal format string starting with command tag 6556 * 6557 */ 6558 #define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013 6559 6560 /** 6561 * RIL_UNSOL_STK_EVENT_NOTIFY 6562 * 6563 * Indicate when SIM notifies applcations some event happens. 6564 * Generally, application does not need to have any feedback to 6565 * SIM but shall be able to indicate appropriate messages to users. 6566 * 6567 * "data" is a const char * containing SAT/USAT commands or responses 6568 * sent by ME to SIM or commands handled by ME, in hexadecimal format string 6569 * starting with first byte of response data or command tag 6570 * 6571 */ 6572 #define RIL_UNSOL_STK_EVENT_NOTIFY 1014 6573 6574 /** 6575 * RIL_UNSOL_STK_CALL_SETUP 6576 * 6577 * Indicate when SIM wants application to setup a voice call. 6578 * 6579 * "data" is const int * 6580 * ((const int *)data)[0] contains timeout value (in milliseconds) 6581 */ 6582 #define RIL_UNSOL_STK_CALL_SETUP 1015 6583 6584 /** 6585 * RIL_UNSOL_SIM_SMS_STORAGE_FULL 6586 * 6587 * Indicates that SMS storage on the SIM is full. Sent when the network 6588 * attempts to deliver a new SMS message. Messages cannot be saved on the 6589 * SIM until space is freed. In particular, incoming Class 2 messages 6590 * cannot be stored. 6591 * 6592 * "data" is null 6593 * 6594 */ 6595 #define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016 6596 6597 /** 6598 * RIL_UNSOL_SIM_REFRESH 6599 * 6600 * Indicates that file(s) on the SIM have been updated, or the SIM 6601 * has been reinitialized. 6602 * 6603 * In the case where RIL is version 6 or older: 6604 * "data" is an int * 6605 * ((int *)data)[0] is a RIL_SimRefreshResult. 6606 * ((int *)data)[1] is the EFID of the updated file if the result is 6607 * SIM_FILE_UPDATE or NULL for any other result. 6608 * 6609 * In the case where RIL is version 7: 6610 * "data" is a RIL_SimRefreshResponse_v7 * 6611 * 6612 * Note: If the SIM state changes as a result of the SIM refresh (eg, 6613 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 6614 * should be sent. 6615 */ 6616 #define RIL_UNSOL_SIM_REFRESH 1017 6617 6618 /** 6619 * RIL_UNSOL_CALL_RING 6620 * 6621 * Ring indication for an incoming call (eg, RING or CRING event). 6622 * There must be at least one RIL_UNSOL_CALL_RING at the beginning 6623 * of a call and sending multiple is optional. If the system property 6624 * ro.telephony.call_ring.multiple is false then the upper layers 6625 * will generate the multiple events internally. Otherwise the vendor 6626 * ril must generate multiple RIL_UNSOL_CALL_RING if 6627 * ro.telephony.call_ring.multiple is true or if it is absent. 6628 * 6629 * The rate of these events is controlled by ro.telephony.call_ring.delay 6630 * and has a default value of 3000 (3 seconds) if absent. 6631 * 6632 * "data" is null for GSM 6633 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA 6634 */ 6635 #define RIL_UNSOL_CALL_RING 1018 6636 6637 /** 6638 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 6639 * 6640 * Indicates that SIM state changes. 6641 * 6642 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread 6643 6644 * "data" is null 6645 */ 6646 #define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019 6647 6648 /** 6649 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 6650 * 6651 * Called when new CDMA SMS is received 6652 * 6653 * "data" is const RIL_CDMA_SMS_Message * 6654 * 6655 * Callee will subsequently confirm the receipt of the SMS with 6656 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 6657 * 6658 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until 6659 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received 6660 * 6661 */ 6662 #define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020 6663 6664 /** 6665 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 6666 * 6667 * Called when new Broadcast SMS is received 6668 * 6669 * "data" can be one of the following: 6670 * If received from GSM network, "data" is const char of 88 bytes 6671 * which indicates each page of a CBS Message sent to the MS by the 6672 * BTS as coded in 3GPP 23.041 Section 9.4.1.2. 6673 * If received from UMTS network, "data" is const char of 90 up to 1252 6674 * bytes which contain between 1 and 15 CBS Message pages sent as one 6675 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2. 6676 * 6677 */ 6678 #define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021 6679 6680 /** 6681 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 6682 * 6683 * Indicates that SMS storage on the RUIM is full. Messages 6684 * cannot be saved on the RUIM until space is freed. 6685 * 6686 * "data" is null 6687 * 6688 */ 6689 #define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022 6690 6691 /** 6692 * RIL_UNSOL_RESTRICTED_STATE_CHANGED 6693 * 6694 * Indicates a restricted state change (eg, for Domain Specific Access Control). 6695 * 6696 * Radio need send this msg after radio off/on cycle no matter it is changed or not. 6697 * 6698 * "data" is an int * 6699 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values. 6700 */ 6701 #define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023 6702 6703 /** 6704 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 6705 * 6706 * Indicates that the radio system selection module has 6707 * autonomously entered emergency callback mode. 6708 * 6709 * "data" is null 6710 * 6711 */ 6712 #define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024 6713 6714 /** 6715 * RIL_UNSOL_CDMA_CALL_WAITING 6716 * 6717 * Called when CDMA radio receives a call waiting indication. 6718 * 6719 * "data" is const RIL_CDMA_CallWaiting * 6720 * 6721 */ 6722 #define RIL_UNSOL_CDMA_CALL_WAITING 1025 6723 6724 /** 6725 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 6726 * 6727 * Called when CDMA radio receives an update of the progress of an 6728 * OTASP/OTAPA call. 6729 * 6730 * "data" is const int * 6731 * For CDMA this is an integer OTASP/OTAPA status listed in 6732 * RIL_CDMA_OTA_ProvisionStatus. 6733 * 6734 */ 6735 #define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026 6736 6737 /** 6738 * RIL_UNSOL_CDMA_INFO_REC 6739 * 6740 * Called when CDMA radio receives one or more info recs. 6741 * 6742 * "data" is const RIL_CDMA_InformationRecords * 6743 * 6744 */ 6745 #define RIL_UNSOL_CDMA_INFO_REC 1027 6746 6747 /** 6748 * RIL_UNSOL_OEM_HOOK_RAW 6749 * 6750 * This is for OEM specific use. 6751 * 6752 * "data" is a byte[] 6753 */ 6754 #define RIL_UNSOL_OEM_HOOK_RAW 1028 6755 6756 /** 6757 * RIL_UNSOL_RINGBACK_TONE 6758 * 6759 * Indicates that nework doesn't have in-band information, need to 6760 * play out-band tone. 6761 * 6762 * "data" is an int * 6763 * ((int *)data)[0] == 0 for stop play ringback tone. 6764 * ((int *)data)[0] == 1 for start play ringback tone. 6765 */ 6766 #define RIL_UNSOL_RINGBACK_TONE 1029 6767 6768 /** 6769 * RIL_UNSOL_RESEND_INCALL_MUTE 6770 * 6771 * Indicates that framework/application need reset the uplink mute state. 6772 * 6773 * There may be situations where the mute state becomes out of sync 6774 * between the application and device in some GSM infrastructures. 6775 * 6776 * "data" is null 6777 */ 6778 #define RIL_UNSOL_RESEND_INCALL_MUTE 1030 6779 6780 /** 6781 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 6782 * 6783 * Called when CDMA subscription source changed. 6784 * 6785 * "data" is int * 6786 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource 6787 */ 6788 #define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031 6789 6790 /** 6791 * RIL_UNSOL_CDMA_PRL_CHANGED 6792 * 6793 * Called when PRL (preferred roaming list) changes. 6794 * 6795 * "data" is int * 6796 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION 6797 */ 6798 #define RIL_UNSOL_CDMA_PRL_CHANGED 1032 6799 6800 /** 6801 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 6802 * 6803 * Called when Emergency Callback Mode Ends 6804 * 6805 * Indicates that the radio system selection module has 6806 * proactively exited emergency callback mode. 6807 * 6808 * "data" is NULL 6809 * 6810 */ 6811 #define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033 6812 6813 /** 6814 * RIL_UNSOL_RIL_CONNECTED 6815 * 6816 * Called the ril connects and returns the version 6817 * 6818 * "data" is int * 6819 * ((int *)data)[0] is RIL_VERSION 6820 */ 6821 #define RIL_UNSOL_RIL_CONNECTED 1034 6822 6823 /** 6824 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 6825 * 6826 * Indicates that voice technology has changed. Contains new radio technology 6827 * as a data in the message. 6828 * 6829 * "data" is int * 6830 * ((int *)data)[0] is of type const RIL_RadioTechnology 6831 * 6832 */ 6833 #define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035 6834 6835 /** 6836 * RIL_UNSOL_CELL_INFO_LIST 6837 * 6838 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned 6839 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE. 6840 * 6841 * "data" is NULL 6842 * 6843 * "response" is an array of RIL_CellInfo_v12. 6844 */ 6845 #define RIL_UNSOL_CELL_INFO_LIST 1036 6846 6847 /** 6848 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 6849 * 6850 * This message is DEPRECATED and shall be removed in a future release (target: 2018); 6851 * instead, provide IMS registration status via an IMS Service. 6852 * 6853 * Called when IMS registration state has changed 6854 * 6855 * To get IMS registration state and IMS SMS format, callee needs to invoke the 6856 * following request on main thread: 6857 * 6858 * RIL_REQUEST_IMS_REGISTRATION_STATE 6859 * 6860 * "data" is NULL 6861 * 6862 */ 6863 #define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037 6864 6865 /** 6866 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 6867 * 6868 * Indicated when there is a change in subscription status. 6869 * This event will be sent in the following scenarios 6870 * - subscription readiness at modem, which was selected by telephony layer 6871 * - when subscription is deactivated by modem due to UICC card removal 6872 * - When network invalidates the subscription i.e. attach reject due to authentication reject 6873 * 6874 * "data" is const int * 6875 * ((const int *)data)[0] == 0 for Subscription Deactivated 6876 * ((const int *)data)[0] == 1 for Subscription Activated 6877 * 6878 */ 6879 #define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038 6880 6881 /** 6882 * RIL_UNSOL_SRVCC_STATE_NOTIFY 6883 * 6884 * Called when Single Radio Voice Call Continuity(SRVCC) 6885 * progress state has changed 6886 * 6887 * "data" is int * 6888 * ((int *)data)[0] is of type const RIL_SrvccState 6889 * 6890 */ 6891 6892 #define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039 6893 6894 /** 6895 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED 6896 * 6897 * Called when the hardware configuration associated with the RILd changes 6898 * 6899 * "data" is an array of RIL_HardwareConfig 6900 * 6901 */ 6902 #define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040 6903 6904 /** 6905 * RIL_UNSOL_DC_RT_INFO_CHANGED 6906 * 6907 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO 6908 * Sent when the DC_RT_STATE changes but the time 6909 * between these messages must not be less than the 6910 * value set by RIL_REQUEST_SET_DC_RT_RATE. 6911 * 6912 * "data" is the most recent RIL_DcRtInfo 6913 * 6914 */ 6915 #define RIL_UNSOL_DC_RT_INFO_CHANGED 1041 6916 6917 /** 6918 * RIL_UNSOL_RADIO_CAPABILITY 6919 * 6920 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes. 6921 * Returns the phone radio capability exactly as 6922 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the 6923 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY. 6924 * 6925 * "data" is the RIL_RadioCapability structure 6926 */ 6927 #define RIL_UNSOL_RADIO_CAPABILITY 1042 6928 6929 /* 6930 * RIL_UNSOL_ON_SS 6931 * 6932 * Called when SS response is received when DIAL/USSD/SS is changed to SS by 6933 * call control. 6934 * 6935 * "data" is const RIL_StkCcUnsolSsResponse * 6936 * 6937 */ 6938 #define RIL_UNSOL_ON_SS 1043 6939 6940 /** 6941 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY 6942 * 6943 * Called when there is an ALPHA from UICC during Call Control. 6944 * 6945 * "data" is const char * containing ALPHA string from UICC in UTF-8 format. 6946 * 6947 */ 6948 #define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044 6949 6950 /** 6951 * RIL_UNSOL_LCEDATA_RECV 6952 * 6953 * Called when there is an incoming Link Capacity Estimate (LCE) info report. 6954 * 6955 * "data" is the RIL_LceDataInfo structure. 6956 * 6957 */ 6958 #define RIL_UNSOL_LCEDATA_RECV 1045 6959 6960 /** 6961 * RIL_UNSOL_PCO_DATA 6962 * 6963 * Called when there is new Carrier PCO data received for a data call. Ideally 6964 * only new data will be forwarded, though this is not required. Multiple 6965 * boxes of carrier PCO data for a given call should result in a series of 6966 * RIL_UNSOL_PCO_DATA calls. 6967 * 6968 * "data" is the RIL_PCO_Data structure. 6969 * 6970 */ 6971 #define RIL_UNSOL_PCO_DATA 1046 6972 6973 /** 6974 * RIL_UNSOL_MODEM_RESTART 6975 * 6976 * Called when there is a modem reset. 6977 * 6978 * "reason" is "const char *" containing the reason for the reset. It 6979 * could be a crash signature if the restart was due to a crash or some 6980 * string such as "user-initiated restart" or "AT command initiated 6981 * restart" that explains the cause of the modem restart. 6982 * 6983 * When modem restarts, one of the following radio state transitions will happen 6984 * 1) RADIO_STATE_ON->RADIO_STATE_UNAVAILABLE->RADIO_STATE_ON or 6985 * 2) RADIO_STATE_OFF->RADIO_STATE_UNAVAILABLE->RADIO_STATE_OFF 6986 * This message can be sent either just before the RADIO_STATE changes to RADIO_STATE_UNAVAILABLE 6987 * or just after but should never be sent after the RADIO_STATE changes from UNAVAILABLE to 6988 * AVAILABLE(RADIO_STATE_ON/RADIO_STATE_OFF) again. 6989 * 6990 * It should NOT be sent after the RADIO_STATE changes to AVAILABLE after the 6991 * modem restart as that could be interpreted as a second modem reset by the 6992 * framework. 6993 */ 6994 #define RIL_UNSOL_MODEM_RESTART 1047 6995 6996 /** 6997 * RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION 6998 * 6999 * Called when the modem needs Carrier specific information that will 7000 * be used to encrypt IMSI and IMPI. 7001 * 7002 * "data" is NULL 7003 * 7004 */ 7005 #define RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION 1048 7006 7007 /** 7008 * RIL_UNSOL_NETWORK_SCAN_RESULT 7009 * 7010 * Returns incremental result for the network scan which is started by 7011 * RIL_REQUEST_START_NETWORK_SCAN, sent to report results, status, or errors. 7012 * 7013 * "data" is NULL 7014 * "response" is a const RIL_NetworkScanResult * 7015 */ 7016 #define RIL_UNSOL_NETWORK_SCAN_RESULT 1049 7017 7018 /** 7019 * RIL_UNSOL_KEEPALIVE_STATUS 7020 * 7021 * "data" is NULL 7022 * "response" is a const RIL_KeepaliveStatus * 7023 */ 7024 #define RIL_UNSOL_KEEPALIVE_STATUS 1050 7025 7026 /***********************************************************************/ 7027 7028 7029 #if defined(ANDROID_MULTI_SIM) 7030 /** 7031 * RIL_Request Function pointer 7032 * 7033 * @param request is one of RIL_REQUEST_* 7034 * @param data is pointer to data defined for that RIL_REQUEST_* 7035 * data is owned by caller, and should not be modified or freed by callee 7036 * structures passed as data may contain pointers to non-contiguous memory 7037 * @param t should be used in subsequent call to RIL_onResponse 7038 * @param datalen is the length of "data" which is defined as other argument. It may or may 7039 * not be equal to sizeof(data). Refer to the documentation of individual structures 7040 * to find if pointers listed in the structure are contiguous and counted in the datalen 7041 * length or not. 7042 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data)) 7043 * 7044 */ 7045 typedef void (*RIL_RequestFunc) (int request, void *data, 7046 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id); 7047 7048 /** 7049 * This function should return the current radio state synchronously 7050 */ 7051 typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id); 7052 7053 #else 7054 /* Backward compatible */ 7055 7056 /** 7057 * RIL_Request Function pointer 7058 * 7059 * @param request is one of RIL_REQUEST_* 7060 * @param data is pointer to data defined for that RIL_REQUEST_* 7061 * data is owned by caller, and should not be modified or freed by callee 7062 * structures passed as data may contain pointers to non-contiguous memory 7063 * @param t should be used in subsequent call to RIL_onResponse 7064 * @param datalen is the length of "data" which is defined as other argument. It may or may 7065 * not be equal to sizeof(data). Refer to the documentation of individual structures 7066 * to find if pointers listed in the structure are contiguous and counted in the datalen 7067 * length or not. 7068 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data)) 7069 * 7070 */ 7071 typedef void (*RIL_RequestFunc) (int request, void *data, 7072 size_t datalen, RIL_Token t); 7073 7074 /** 7075 * This function should return the current radio state synchronously 7076 */ 7077 typedef RIL_RadioState (*RIL_RadioStateRequest)(); 7078 7079 #endif 7080 7081 7082 /** 7083 * This function returns "1" if the specified RIL_REQUEST code is 7084 * supported and 0 if it is not 7085 * 7086 * @param requestCode is one of RIL_REQUEST codes 7087 */ 7088 7089 typedef int (*RIL_Supports)(int requestCode); 7090 7091 /** 7092 * This function is called from a separate thread--not the 7093 * thread that calls RIL_RequestFunc--and indicates that a pending 7094 * request should be cancelled. 7095 * 7096 * On cancel, the callee should do its best to abandon the request and 7097 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point. 7098 * 7099 * Subsequent calls to RIL_onRequestComplete for this request with 7100 * other results will be tolerated but ignored. (That is, it is valid 7101 * to ignore the cancellation request) 7102 * 7103 * RIL_Cancel calls should return immediately, and not wait for cancellation 7104 * 7105 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007 7106 * interface 7107 * 7108 * @param t token wants to be canceled 7109 */ 7110 7111 typedef void (*RIL_Cancel)(RIL_Token t); 7112 7113 typedef void (*RIL_TimedCallback) (void *param); 7114 7115 /** 7116 * Return a version string for your RIL implementation 7117 */ 7118 typedef const char * (*RIL_GetVersion) (void); 7119 7120 typedef struct { 7121 int version; /* set to RIL_VERSION */ 7122 RIL_RequestFunc onRequest; 7123 RIL_RadioStateRequest onStateRequest; 7124 RIL_Supports supports; 7125 RIL_Cancel onCancel; 7126 RIL_GetVersion getVersion; 7127 } RIL_RadioFunctions; 7128 7129 typedef struct { 7130 char *apn; /* the APN to connect to */ 7131 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on 7132 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/ 7133 int authtype; /* authentication protocol used for this PDP context 7134 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */ 7135 char *username; /* the username for APN, or NULL */ 7136 char *password; /* the password for APN, or NULL */ 7137 } RIL_InitialAttachApn; 7138 7139 typedef struct { 7140 char *apn; /* the APN to connect to */ 7141 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on 7142 home network. For example, "IP", "IPV6", "IPV4V6", or "PPP". */ 7143 char *roamingProtocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on 7144 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/ 7145 int authtype; /* authentication protocol used for this PDP context 7146 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */ 7147 char *username; /* the username for APN, or NULL */ 7148 char *password; /* the password for APN, or NULL */ 7149 int supportedTypesBitmask; /* supported APN types bitmask. See RIL_ApnTypes for the value of 7150 each bit. */ 7151 int bearerBitmask; /* the bearer bitmask. See RIL_RadioAccessFamily for the value of 7152 each bit. */ 7153 int modemCognitive; /* indicating the APN setting was sent to the modem through 7154 setDataProfile earlier. */ 7155 int mtu; /* maximum transmission unit (MTU) size in bytes */ 7156 char *mvnoType; /* the MVNO type: possible values are "imsi", "gid", "spn" */ 7157 char *mvnoMatchData; /* MVNO match data. Can be anything defined by the carrier. 7158 For example, 7159 SPN like: "A MOBILE", "BEN NL", etc... 7160 IMSI like: "302720x94", "2060188", etc... 7161 GID like: "4E", "33", etc... */ 7162 } RIL_InitialAttachApn_v15; 7163 7164 typedef struct { 7165 int authContext; /* P2 value of authentication command, see P2 parameter in 7166 3GPP TS 31.102 7.1.2 */ 7167 char *authData; /* the challenge string in Base64 format, see 3GPP 7168 TS 31.102 7.1.2 */ 7169 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4, 7170 NULL if no value. */ 7171 } RIL_SimAuthentication; 7172 7173 typedef struct { 7174 int cid; /* Context ID, uniquely identifies this call */ 7175 char *bearer_proto; /* One of the PDP_type values in TS 27.007 section 10.1.1. 7176 For example, "IP", "IPV6", "IPV4V6". */ 7177 int pco_id; /* The protocol ID for this box. Note that only IDs from 7178 FF00H - FFFFH are accepted. If more than one is included 7179 from the network, multiple calls should be made to send all 7180 of them. */ 7181 int contents_length; /* The number of octets in the contents. */ 7182 char *contents; /* Carrier-defined content. It is binary, opaque and 7183 loosely defined in LTE Layer 3 spec 24.008 */ 7184 } RIL_PCO_Data; 7185 7186 typedef enum { 7187 NATT_IPV4 = 0, /* Keepalive specified by RFC 3948 Sec. 2.3 using IPv4 */ 7188 NATT_IPV6 = 1 /* Keepalive specified by RFC 3948 Sec. 2.3 using IPv6 */ 7189 } RIL_KeepaliveType; 7190 7191 #define MAX_INADDR_LEN 16 7192 typedef struct { 7193 RIL_KeepaliveType type; /* Type of keepalive packet */ 7194 char sourceAddress[MAX_INADDR_LEN]; /* Source address in network-byte order */ 7195 int sourcePort; /* Source port if applicable, or 0x7FFFFFFF; 7196 the maximum value is 65535 */ 7197 char destinationAddress[MAX_INADDR_LEN]; /* Destination address in network-byte order */ 7198 int destinationPort; /* Destination port if applicable or 0x7FFFFFFF; 7199 the maximum value is 65535 */ 7200 int maxKeepaliveIntervalMillis; /* Maximum milliseconds between two packets */ 7201 int cid; /* Context ID, uniquely identifies this call */ 7202 } RIL_KeepaliveRequest; 7203 7204 typedef enum { 7205 KEEPALIVE_ACTIVE, /* Keepalive session is active */ 7206 KEEPALIVE_INACTIVE, /* Keepalive session is inactive */ 7207 KEEPALIVE_PENDING /* Keepalive session status not available */ 7208 } RIL_KeepaliveStatusCode; 7209 7210 typedef struct { 7211 uint32_t sessionHandle; 7212 RIL_KeepaliveStatusCode code; 7213 } RIL_KeepaliveStatus; 7214 7215 #ifdef RIL_SHLIB 7216 struct RIL_Env { 7217 /** 7218 * "t" is parameter passed in on previous call to RIL_Notification 7219 * routine. 7220 * 7221 * If "e" != SUCCESS, then response can be null/is ignored 7222 * 7223 * "response" is owned by caller, and should not be modified or 7224 * freed by callee 7225 * 7226 * RIL_onRequestComplete will return as soon as possible 7227 */ 7228 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e, 7229 void *response, size_t responselen); 7230 7231 #if defined(ANDROID_MULTI_SIM) 7232 /** 7233 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_* 7234 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_* 7235 * 7236 * "data" is owned by caller, and should not be modified or freed by callee 7237 */ 7238 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id); 7239 #else 7240 /** 7241 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_* 7242 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_* 7243 * 7244 * "data" is owned by caller, and should not be modified or freed by callee 7245 */ 7246 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen); 7247 #endif 7248 /** 7249 * Call user-specifed "callback" function on on the same thread that 7250 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies 7251 * a relative time value at which the callback is invoked. If relativeTime is 7252 * NULL or points to a 0-filled structure, the callback will be invoked as 7253 * soon as possible 7254 */ 7255 7256 void (*RequestTimedCallback) (RIL_TimedCallback callback, 7257 void *param, const struct timeval *relativeTime); 7258 /** 7259 * "t" is parameter passed in on previous call RIL_Notification routine 7260 * 7261 * RIL_onRequestAck will be called by vendor when an Async RIL request was received 7262 * by them and an ack needs to be sent back to java ril. 7263 */ 7264 void (*OnRequestAck) (RIL_Token t); 7265 }; 7266 7267 7268 /** 7269 * RIL implementations must defined RIL_Init 7270 * argc and argv will be command line arguments intended for the RIL implementation 7271 * Return NULL on error 7272 * 7273 * @param env is environment point defined as RIL_Env 7274 * @param argc number of arguments 7275 * @param argv list fo arguments 7276 * 7277 */ 7278 const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv); 7279 7280 /** 7281 * If BT SAP(SIM Access Profile) is supported, then RIL implementations must define RIL_SAP_Init 7282 * for initializing RIL_RadioFunctions used for BT SAP communcations. It is called whenever RILD 7283 * starts or modem restarts. Returns handlers for SAP related request that are made on SAP 7284 * sepecific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init 7285 * and used on the general RIL socket. 7286 * argc and argv will be command line arguments intended for the RIL implementation 7287 * Return NULL on error. 7288 * 7289 * @param env is environment point defined as RIL_Env 7290 * @param argc number of arguments 7291 * @param argv list fo arguments 7292 * 7293 */ 7294 const RIL_RadioFunctions *RIL_SAP_Init(const struct RIL_Env *env, int argc, char **argv); 7295 7296 #else /* RIL_SHLIB */ 7297 7298 /** 7299 * Call this once at startup to register notification routine 7300 * 7301 * @param callbacks user-specifed callback function 7302 */ 7303 void RIL_register (const RIL_RadioFunctions *callbacks); 7304 7305 void rilc_thread_pool(); 7306 7307 7308 /** 7309 * 7310 * RIL_onRequestComplete will return as soon as possible 7311 * 7312 * @param t is parameter passed in on previous call to RIL_Notification 7313 * routine. 7314 * @param e error code 7315 * if "e" != SUCCESS, then response can be null/is ignored 7316 * @param response is owned by caller, and should not be modified or 7317 * freed by callee 7318 * @param responselen the length of response in byte 7319 */ 7320 void RIL_onRequestComplete(RIL_Token t, RIL_Errno e, 7321 void *response, size_t responselen); 7322 7323 /** 7324 * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and 7325 * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's 7326 * results, just that the command was received and will take a while. After sending this Ack 7327 * its vendor's responsibility to make sure that AP is up whenever needed while command is 7328 * being processed. 7329 * 7330 * @param t is parameter passed in on previous call to RIL_Notification 7331 * routine. 7332 */ 7333 void RIL_onRequestAck(RIL_Token t); 7334 7335 #if defined(ANDROID_MULTI_SIM) 7336 /** 7337 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_* 7338 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_* 7339 * "data" is owned by caller, and should not be modified or freed by callee 7340 * @param datalen the length of data in byte 7341 */ 7342 7343 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, 7344 size_t datalen, RIL_SOCKET_ID socket_id); 7345 #else 7346 /** 7347 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_* 7348 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_* 7349 * "data" is owned by caller, and should not be modified or freed by callee 7350 * @param datalen the length of data in byte 7351 */ 7352 7353 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, 7354 size_t datalen); 7355 #endif 7356 7357 /** 7358 * Call user-specifed "callback" function on on the same thread that 7359 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies 7360 * a relative time value at which the callback is invoked. If relativeTime is 7361 * NULL or points to a 0-filled structure, the callback will be invoked as 7362 * soon as possible 7363 * 7364 * @param callback user-specifed callback function 7365 * @param param parameter list 7366 * @param relativeTime a relative time value at which the callback is invoked 7367 */ 7368 7369 void RIL_requestTimedCallback (RIL_TimedCallback callback, 7370 void *param, const struct timeval *relativeTime); 7371 7372 #endif /* RIL_SHLIB */ 7373 7374 #ifdef __cplusplus 7375 } 7376 #endif 7377 7378 #endif /*ANDROID_RIL_H*/ 7379