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 #ifndef FEATURE_UNIT_TEST 22 #include <sys/time.h> 23 #endif /* !FEATURE_UNIT_TEST */ 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 #define RIL_VERSION 7 /* Current version */ 30 #define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */ 31 32 #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64 33 #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81 34 35 typedef void * RIL_Token; 36 37 typedef enum { 38 RIL_E_SUCCESS = 0, 39 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */ 40 RIL_E_GENERIC_FAILURE = 2, 41 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */ 42 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */ 43 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */ 44 RIL_E_REQUEST_NOT_SUPPORTED = 6, 45 RIL_E_CANCELLED = 7, 46 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice 47 call on a Class C GPRS device */ 48 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device 49 registers in network */ 50 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */ 51 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription 52 shall be retrieved because of SIM or RUIM 53 card absent */ 54 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified 55 location */ 56 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */ 57 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */ 58 RIL_E_ILLEGAL_SIM_OR_ME = 15 /* network selection failed due to 59 illegal SIM or ME */ 60 } RIL_Errno; 61 62 typedef enum { 63 RIL_CALL_ACTIVE = 0, 64 RIL_CALL_HOLDING = 1, 65 RIL_CALL_DIALING = 2, /* MO call only */ 66 RIL_CALL_ALERTING = 3, /* MO call only */ 67 RIL_CALL_INCOMING = 4, /* MT call only */ 68 RIL_CALL_WAITING = 5 /* MT call only */ 69 } RIL_CallState; 70 71 typedef enum { 72 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */ 73 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */ 74 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */ 75 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */ 76 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network 77 personalization locked, or SIM absent */ 78 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */ 79 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */ 80 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */ 81 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network 82 personalization locked, or RUIM absent */ 83 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */ 84 RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */ 85 RADIO_STATE_ON = 10 /* Radio is on */ 86 } RIL_RadioState; 87 88 typedef enum { 89 RADIO_TECH_UNKNOWN = 0, 90 RADIO_TECH_GPRS = 1, 91 RADIO_TECH_EDGE = 2, 92 RADIO_TECH_UMTS = 3, 93 RADIO_TECH_IS95A = 4, 94 RADIO_TECH_IS95B = 5, 95 RADIO_TECH_1xRTT = 6, 96 RADIO_TECH_EVDO_0 = 7, 97 RADIO_TECH_EVDO_A = 8, 98 RADIO_TECH_HSDPA = 9, 99 RADIO_TECH_HSUPA = 10, 100 RADIO_TECH_HSPA = 11, 101 RADIO_TECH_EVDO_B = 12, 102 RADIO_TECH_EHRPD = 13, 103 RADIO_TECH_LTE = 14, 104 RADIO_TECH_HSPAP = 15, // HSPA+ 105 RADIO_TECH_GSM = 16 // Only supports voice 106 } RIL_RadioTechnology; 107 108 // Do we want to split Data from Voice and the use 109 // RIL_RadioTechnology for get/setPreferredVoice/Data ? 110 typedef enum { 111 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */ 112 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */ 113 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */ 114 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */ 115 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */ 116 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */ 117 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */ 118 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */ 119 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */ 120 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */ 121 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */ 122 PREF_NET_TYPE_LTE_ONLY = 11 /* LTE only */ 123 } RIL_PreferredNetworkType; 124 125 /* Source for cdma subscription */ 126 typedef enum { 127 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0, 128 CDMA_SUBSCRIPTION_SOURCE_NV = 1 129 } RIL_CdmaSubscriptionSource; 130 131 /* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */ 132 typedef enum { 133 RIL_UUS_TYPE1_IMPLICIT = 0, 134 RIL_UUS_TYPE1_REQUIRED = 1, 135 RIL_UUS_TYPE1_NOT_REQUIRED = 2, 136 RIL_UUS_TYPE2_REQUIRED = 3, 137 RIL_UUS_TYPE2_NOT_REQUIRED = 4, 138 RIL_UUS_TYPE3_REQUIRED = 5, 139 RIL_UUS_TYPE3_NOT_REQUIRED = 6 140 } RIL_UUS_Type; 141 142 /* User-to-User Signaling Information data coding schemes. Possible values for 143 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been 144 * specified in section 10.5.4.25 of 3GPP TS 24.008 */ 145 typedef enum { 146 RIL_UUS_DCS_USP = 0, /* User specified protocol */ 147 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */ 148 RIL_UUS_DCS_X244 = 2, /* X.244 */ 149 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement 150 convergence function */ 151 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */ 152 } RIL_UUS_DCS; 153 154 /* User-to-User Signaling Information defined in 3GPP 23.087 v8.0 155 * This data is passed in RIL_ExtensionRecord and rec contains this 156 * structure when type is RIL_UUS_INFO_EXT_REC */ 157 typedef struct { 158 RIL_UUS_Type uusType; /* UUS Type */ 159 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */ 160 int uusLength; /* Length of UUS Data */ 161 char * uusData; /* UUS Data */ 162 } RIL_UUS_Info; 163 164 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */ 165 typedef struct { 166 char isPresent; /* non-zero if signal information record is present */ 167 char signalType; /* as defined 3.7.5.5-1 */ 168 char alertPitch; /* as defined 3.7.5.5-2 */ 169 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */ 170 } RIL_CDMA_SignalInfoRecord; 171 172 typedef struct { 173 RIL_CallState state; 174 int index; /* Connection Index for use with, eg, AT+CHLD */ 175 int toa; /* type of address, eg 145 = intl */ 176 char isMpty; /* nonzero if is mpty call */ 177 char isMT; /* nonzero if call is mobile terminated */ 178 char als; /* ALS line indicator if available 179 (0 = line 1) */ 180 char isVoice; /* nonzero if this is is a voice call */ 181 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */ 182 char * number; /* Remote party number */ 183 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ 184 char * name; /* Remote party name */ 185 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ 186 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */ 187 } RIL_Call; 188 189 /* Deprecated, use RIL_Data_Call_Response_v6 */ 190 typedef struct { 191 int cid; /* Context ID, uniquely identifies this call */ 192 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 193 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 194 For example, "IP", "IPV6", "IPV4V6", or "PPP". */ 195 char * apn; /* ignored */ 196 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */ 197 } RIL_Data_Call_Response_v4; 198 199 /* 200 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST 201 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0. 202 */ 203 typedef struct { 204 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ 205 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry 206 back-off timer value RIL wants to override the one 207 pre-configured in FW. 208 The unit is miliseconds. 209 The value < 0 means no value is suggested. 210 The value 0 means retry should be done ASAP. 211 The value of MAX_INT(0x7fffffff) means no retry. */ 212 int cid; /* Context ID, uniquely identifies this call */ 213 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 214 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 215 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is 216 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported 217 such as "IP" or "IPV6" */ 218 char * ifname; /* The network interface name */ 219 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, 220 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". 221 May not be empty, typically 1 IPv4 or 1 IPv6 or 222 one of each. If the prefix length is absent the addresses 223 are assumed to be point to point with IPv4 having a prefix 224 length of 32 and IPv6 128. */ 225 char * dnses; /* A space-delimited list of DNS server addresses, 226 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 227 May be empty. */ 228 char * gateways; /* A space-delimited list of default gateway addresses, 229 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 230 May be empty in which case the addresses represent point 231 to point connections. */ 232 } RIL_Data_Call_Response_v6; 233 234 typedef struct { 235 int messageRef; /* TP-Message-Reference for GSM, 236 and BearerData MessageId for CDMA 237 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */ 238 char *ackPDU; /* or NULL if n/a */ 239 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS, 240 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA, 241 -1 if unknown or not applicable*/ 242 } RIL_SMS_Response; 243 244 /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */ 245 typedef struct { 246 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */ 247 /* 0 = "REC UNREAD" */ 248 /* 1 = "REC READ" */ 249 /* 2 = "STO UNSENT" */ 250 /* 3 = "STO SENT" */ 251 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address, 252 the TP-layer length is "strlen(pdu)/2". */ 253 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte 254 (as expected by TS 27.005) or NULL for default SMSC */ 255 } RIL_SMS_WriteArgs; 256 257 /** Used by RIL_REQUEST_DIAL */ 258 typedef struct { 259 char * address; 260 int clir; 261 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR" 262 * clir == 0 on "use subscription default value" 263 * clir == 1 on "CLIR invocation" (restrict CLI presentation) 264 * clir == 2 on "CLIR suppression" (allow CLI presentation) 265 */ 266 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */ 267 } RIL_Dial; 268 269 typedef struct { 270 int command; /* one of the commands listed for TS 27.007 +CRSM*/ 271 int fileid; /* EF id */ 272 char *path; /* "pathid" from TS 27.007 +CRSM command. 273 Path is in hex asciii format eg "7f205f70" 274 Path must always be provided. 275 */ 276 int p1; 277 int p2; 278 int p3; 279 char *data; /* May be NULL*/ 280 char *pin2; /* May be NULL*/ 281 } RIL_SIM_IO_v5; 282 283 typedef struct { 284 int command; /* one of the commands listed for TS 27.007 +CRSM*/ 285 int fileid; /* EF id */ 286 char *path; /* "pathid" from TS 27.007 +CRSM command. 287 Path is in hex asciii format eg "7f205f70" 288 Path must always be provided. 289 */ 290 int p1; 291 int p2; 292 int p3; 293 char *data; /* May be NULL*/ 294 char *pin2; /* May be NULL*/ 295 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */ 296 } RIL_SIM_IO_v6; 297 298 typedef struct { 299 int sw1; 300 int sw2; 301 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */ 302 } RIL_SIM_IO_Response; 303 304 /* See also com.android.internal.telephony.gsm.CallForwardInfo */ 305 306 typedef struct { 307 int status; /* 308 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 309 * status 1 = active, 0 = not active 310 * 311 * For RIL_REQUEST_SET_CALL_FORWARD: 312 * status is: 313 * 0 = disable 314 * 1 = enable 315 * 2 = interrogate 316 * 3 = registeration 317 * 4 = erasure 318 */ 319 320 int reason; /* from TS 27.007 7.11 "reason" */ 321 int serviceClass;/* From 27.007 +CCFC/+CLCK "class" 322 See table for Android mapping from 323 MMI service code 324 0 means user doesn't input class */ 325 int toa; /* "type" from TS 27.007 7.11 */ 326 char * number; /* "number" from TS 27.007 7.11. May be NULL */ 327 int timeSeconds; /* for CF no reply only */ 328 }RIL_CallForwardInfo; 329 330 typedef struct { 331 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM. 332 * Upper 16 bits is LAC and lower 16 bits 333 * is CID (as described in TS 27.005) 334 * Primary Scrambling Code (as described in TS 25.331) 335 * in 9 bits in UMTS 336 * Valid values are hexadecimal 0x0000 - 0xffffffff. 337 */ 338 int rssi; /* Received RSSI in GSM, 339 * Level index of CPICH Received Signal Code Power in UMTS 340 */ 341 } RIL_NeighboringCell; 342 343 /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */ 344 typedef enum { 345 CALL_FAIL_UNOBTAINABLE_NUMBER = 1, 346 CALL_FAIL_NORMAL = 16, 347 CALL_FAIL_BUSY = 17, 348 CALL_FAIL_CONGESTION = 34, 349 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68, 350 CALL_FAIL_CALL_BARRED = 240, 351 CALL_FAIL_FDN_BLOCKED = 241, 352 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242, 353 CALL_FAIL_IMEI_NOT_ACCEPTED = 243, 354 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000, 355 CALL_FAIL_CDMA_DROP = 1001, 356 CALL_FAIL_CDMA_INTERCEPT = 1002, 357 CALL_FAIL_CDMA_REORDER = 1003, 358 CALL_FAIL_CDMA_SO_REJECT = 1004, 359 CALL_FAIL_CDMA_RETRY_ORDER = 1005, 360 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006, 361 CALL_FAIL_CDMA_PREEMPTED = 1007, 362 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed 363 during emergency callback mode */ 364 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */ 365 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff 366 } RIL_LastCallFailCause; 367 368 /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */ 369 typedef enum { 370 PDP_FAIL_NONE = 0, /* No error, connection ok */ 371 372 /* an integer cause code defined in TS 24.008 373 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B. 374 If the implementation does not have access to the exact cause codes, 375 then it should return one of the following values, 376 as the UI layer needs to distinguish these 377 cases for error notification and potential retries. */ 378 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */ 379 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A, 380 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */ 381 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */ 382 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */ 383 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */ 384 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F, 385 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */ 386 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */ 387 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22, 388 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */ 389 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */ 390 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */ 391 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34, 392 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */ 393 394 /* Not mentioned in the specification */ 395 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1, 396 PDP_FAIL_DATA_REGISTRATION_FAIL = -2, 397 398 /* reasons for data call drop - network/modem disconnect */ 399 PDP_FAIL_SIGNAL_LOST = -3, /* no retry */ 400 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry 401 with parameters appropriate for new technology */ 402 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting, 403 powered off - no retry */ 404 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered 405 mode was up on same APN/data profile - no retry until 406 tethered call is off */ 407 408 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */ 409 } RIL_DataCallFailCause; 410 411 /* See RIL_REQUEST_SETUP_DATA_CALL */ 412 typedef enum { 413 RIL_DATA_PROFILE_DEFAULT = 0, 414 RIL_DATA_PROFILE_TETHERED = 1, 415 RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */ 416 } RIL_DataProfile; 417 418 /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */ 419 typedef struct { 420 int notificationType; /* 421 * 0 = MO intermediate result code 422 * 1 = MT unsolicited result code 423 */ 424 int code; /* See 27.007 7.17 425 "code1" for MO 426 "code2" for MT. */ 427 int index; /* CUG index. See 27.007 7.17. */ 428 int type; /* "type" from 27.007 7.17 (MT only). */ 429 char * number; /* "number" from 27.007 7.17 430 (MT only, may be NULL). */ 431 } RIL_SuppSvcNotification; 432 433 #define RIL_CARD_MAX_APPS 8 434 435 typedef enum { 436 RIL_CARDSTATE_ABSENT = 0, 437 RIL_CARDSTATE_PRESENT = 1, 438 RIL_CARDSTATE_ERROR = 2 439 } RIL_CardState; 440 441 typedef enum { 442 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */ 443 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */ 444 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished 445 since each app can only have 1 active perso 446 involved */ 447 RIL_PERSOSUBSTATE_SIM_NETWORK = 3, 448 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4, 449 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5, 450 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6, 451 RIL_PERSOSUBSTATE_SIM_SIM = 7, 452 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */ 453 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9, 454 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10, 455 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11, 456 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12, 457 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13, 458 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14, 459 RIL_PERSOSUBSTATE_RUIM_HRPD = 15, 460 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16, 461 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17, 462 RIL_PERSOSUBSTATE_RUIM_RUIM = 18, 463 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */ 464 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20, 465 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21, 466 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22, 467 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23, 468 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24 469 } RIL_PersoSubstate; 470 471 typedef enum { 472 RIL_APPSTATE_UNKNOWN = 0, 473 RIL_APPSTATE_DETECTED = 1, 474 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */ 475 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */ 476 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at 477 when app_state is assigned to this value */ 478 RIL_APPSTATE_READY = 5 479 } RIL_AppState; 480 481 typedef enum { 482 RIL_PINSTATE_UNKNOWN = 0, 483 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1, 484 RIL_PINSTATE_ENABLED_VERIFIED = 2, 485 RIL_PINSTATE_DISABLED = 3, 486 RIL_PINSTATE_ENABLED_BLOCKED = 4, 487 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5 488 } RIL_PinState; 489 490 typedef enum { 491 RIL_APPTYPE_UNKNOWN = 0, 492 RIL_APPTYPE_SIM = 1, 493 RIL_APPTYPE_USIM = 2, 494 RIL_APPTYPE_RUIM = 3, 495 RIL_APPTYPE_CSIM = 4, 496 RIL_APPTYPE_ISIM = 5 497 } RIL_AppType; 498 499 typedef struct 500 { 501 RIL_AppType app_type; 502 RIL_AppState app_state; 503 RIL_PersoSubstate perso_substate; /* applicable only if app_state == 504 RIL_APPSTATE_SUBSCRIPTION_PERSO */ 505 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41, 506 0x30, 0x30, 0x30 */ 507 char *app_label_ptr; /* null terminated string */ 508 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */ 509 RIL_PinState pin1; 510 RIL_PinState pin2; 511 } RIL_AppStatus; 512 513 /* Deprecated, use RIL_CardStatus_v6 */ 514 typedef struct 515 { 516 RIL_CardState card_state; 517 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ 518 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 519 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 520 int num_applications; /* value <= RIL_CARD_MAX_APPS */ 521 RIL_AppStatus applications[RIL_CARD_MAX_APPS]; 522 } RIL_CardStatus_v5; 523 524 typedef struct 525 { 526 RIL_CardState card_state; 527 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ 528 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 529 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 530 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 531 int num_applications; /* value <= RIL_CARD_MAX_APPS */ 532 RIL_AppStatus applications[RIL_CARD_MAX_APPS]; 533 } RIL_CardStatus_v6; 534 535 /** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH 536 * or as part of RIL_SimRefreshResponse_v7 537 */ 538 typedef enum { 539 /* A file on SIM has been updated. data[1] contains the EFID. */ 540 SIM_FILE_UPDATE = 0, 541 /* SIM initialized. All files should be re-read. */ 542 SIM_INIT = 1, 543 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */ 544 SIM_RESET = 2 545 } RIL_SimRefreshResult; 546 547 typedef struct { 548 RIL_SimRefreshResult result; 549 int ef_id; /* is the EFID of the updated file if the result is */ 550 /* SIM_FILE_UPDATE or 0 for any other result. */ 551 char * aid; /* is AID(application ID) of the card application */ 552 /* See ETSI 102.221 8.1 and 101.220 4 */ 553 /* For SIM_FILE_UPDATE result it can be set to AID of */ 554 /* application in which updated EF resides or it can be */ 555 /* NULL if EF is outside of an application. */ 556 /* For SIM_INIT result this field is set to AID of */ 557 /* application that caused REFRESH */ 558 /* For SIM_RESET result it is NULL. */ 559 } RIL_SimRefreshResponse_v7; 560 561 /* Deprecated, use RIL_CDMA_CallWaiting_v6 */ 562 typedef struct { 563 char * number; /* Remote party number */ 564 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ 565 char * name; /* Remote party name */ 566 RIL_CDMA_SignalInfoRecord signalInfoRecord; 567 } RIL_CDMA_CallWaiting_v5; 568 569 typedef struct { 570 char * number; /* Remote party number */ 571 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ 572 char * name; /* Remote party name */ 573 RIL_CDMA_SignalInfoRecord signalInfoRecord; 574 /* Number type/Number plan required to support International Call Waiting */ 575 int number_type; /* 0=Unknown, 1=International, 2=National, 576 3=Network specific, 4=subscriber */ 577 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */ 578 } RIL_CDMA_CallWaiting_v6; 579 580 /** 581 * Which types of Cell Broadcast Message (CBM) are to be received by the ME 582 * 583 * uFromServiceID - uToServiceID defines a range of CBM message identifiers 584 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS 585 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty 586 * CBM message ID. 587 * 588 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes 589 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS 590 * and 9.4.4.2.3 for UMTS. 591 * All other values can be treated as empty CBM data coding scheme. 592 * 593 * selected 0 means message types specified in <fromServiceId, toServiceId> 594 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted. 595 * 596 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and 597 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG. 598 */ 599 typedef struct { 600 int fromServiceId; 601 int toServiceId; 602 int fromCodeScheme; 603 int toCodeScheme; 604 unsigned char selected; 605 } RIL_GSM_BroadcastSmsConfigInfo; 606 607 /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */ 608 #define RIL_RESTRICTED_STATE_NONE 0x00 609 /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */ 610 #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01 611 /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */ 612 #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02 613 /* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/ 614 #define RIL_RESTRICTED_STATE_CS_ALL 0x04 615 /* Block packet data access due to restriction. */ 616 #define RIL_RESTRICTED_STATE_PS_ALL 0x10 617 618 /* The status for an OTASP/OTAPA session */ 619 typedef enum { 620 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED, 621 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED, 622 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED, 623 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED, 624 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED, 625 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED, 626 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED, 627 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED, 628 CDMA_OTA_PROVISION_STATUS_COMMITTED, 629 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED, 630 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED, 631 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED 632 } RIL_CDMA_OTA_ProvisionStatus; 633 634 typedef struct { 635 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 636 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ 637 } RIL_GW_SignalStrength; 638 639 640 typedef struct { 641 int dbm; /* Valid values are positive integers. This value is the actual RSSI value 642 * multiplied by -1. Example: If the actual RSSI is -75, then this response 643 * value will be 75. 644 */ 645 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied 646 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value 647 * will be 125. 648 */ 649 } RIL_CDMA_SignalStrength; 650 651 652 typedef struct { 653 int dbm; /* Valid values are positive integers. This value is the actual RSSI value 654 * multiplied by -1. Example: If the actual RSSI is -75, then this response 655 * value will be 75. 656 */ 657 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied 658 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value 659 * will be 125. 660 */ 661 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */ 662 } RIL_EVDO_SignalStrength; 663 664 typedef struct { 665 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 666 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1. 667 * Range: 44 to 140 dBm 668 * INT_MAX: 0x7FFFFFFF denotes invalid value. 669 * Reference: 3GPP TS 36.133 9.1.4 */ 670 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1. 671 * Range: 20 to 3 dB. 672 * INT_MAX: 0x7FFFFFFF denotes invalid value. 673 * Reference: 3GPP TS 36.133 9.1.7 */ 674 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units. 675 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). 676 * INT_MAX : 0x7FFFFFFF denotes invalid value. 677 * Reference: 3GPP TS 36.101 8.1.1 */ 678 int cqi; /* The current Channel Quality Indicator. 679 * Range: 0 to 15. 680 * INT_MAX : 0x7FFFFFFF denotes invalid value. 681 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */ 682 } RIL_LTE_SignalStrength; 683 684 /* Deprecated, use RIL_SignalStrength_v6 */ 685 typedef struct { 686 RIL_GW_SignalStrength GW_SignalStrength; 687 RIL_CDMA_SignalStrength CDMA_SignalStrength; 688 RIL_EVDO_SignalStrength EVDO_SignalStrength; 689 } RIL_SignalStrength_v5; 690 691 typedef struct { 692 RIL_GW_SignalStrength GW_SignalStrength; 693 RIL_CDMA_SignalStrength CDMA_SignalStrength; 694 RIL_EVDO_SignalStrength EVDO_SignalStrength; 695 RIL_LTE_SignalStrength LTE_SignalStrength; 696 } RIL_SignalStrength_v6; 697 698 /* Names of the CDMA info records (C.S0005 section 3.7.5) */ 699 typedef enum { 700 RIL_CDMA_DISPLAY_INFO_REC, 701 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC, 702 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC, 703 RIL_CDMA_CONNECTED_NUMBER_INFO_REC, 704 RIL_CDMA_SIGNAL_INFO_REC, 705 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC, 706 RIL_CDMA_LINE_CONTROL_INFO_REC, 707 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC, 708 RIL_CDMA_T53_CLIR_INFO_REC, 709 RIL_CDMA_T53_RELEASE_INFO_REC, 710 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC 711 } RIL_CDMA_InfoRecName; 712 713 /* Display Info Rec as defined in C.S0005 section 3.7.5.1 714 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16 715 Note: the Extended Display info rec contains multiple records of the 716 form: display_tag, display_len, and display_len occurrences of the 717 chari field if the display_tag is not 10000000 or 10000001. 718 To save space, the records are stored consecutively in a byte buffer. 719 The display_tag, display_len and chari fields are all 1 byte. 720 */ 721 722 typedef struct { 723 char alpha_len; 724 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH]; 725 } RIL_CDMA_DisplayInfoRecord; 726 727 /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2 728 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3 729 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4 730 */ 731 732 typedef struct { 733 char len; 734 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH]; 735 char number_type; 736 char number_plan; 737 char pi; 738 char si; 739 } RIL_CDMA_NumberInfoRecord; 740 741 /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */ 742 typedef enum { 743 RIL_REDIRECTING_REASON_UNKNOWN = 0, 744 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1, 745 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2, 746 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9, 747 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10, 748 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15, 749 RIL_REDIRECTING_REASON_RESERVED 750 } RIL_CDMA_RedirectingReason; 751 752 typedef struct { 753 RIL_CDMA_NumberInfoRecord redirectingNumber; 754 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */ 755 RIL_CDMA_RedirectingReason redirectingReason; 756 } RIL_CDMA_RedirectingNumberInfoRecord; 757 758 /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */ 759 typedef struct { 760 char lineCtrlPolarityIncluded; 761 char lineCtrlToggle; 762 char lineCtrlReverse; 763 char lineCtrlPowerDenial; 764 } RIL_CDMA_LineControlInfoRecord; 765 766 /* T53 CLIR Information Record */ 767 typedef struct { 768 char cause; 769 } RIL_CDMA_T53_CLIRInfoRecord; 770 771 /* T53 Audio Control Information Record */ 772 typedef struct { 773 char upLink; 774 char downLink; 775 } RIL_CDMA_T53_AudioControlInfoRecord; 776 777 typedef struct { 778 779 RIL_CDMA_InfoRecName name; 780 781 union { 782 /* Display and Extended Display Info Rec */ 783 RIL_CDMA_DisplayInfoRecord display; 784 785 /* Called Party Number, Calling Party Number, Connected Number Info Rec */ 786 RIL_CDMA_NumberInfoRecord number; 787 788 /* Signal Info Rec */ 789 RIL_CDMA_SignalInfoRecord signal; 790 791 /* Redirecting Number Info Rec */ 792 RIL_CDMA_RedirectingNumberInfoRecord redir; 793 794 /* Line Control Info Rec */ 795 RIL_CDMA_LineControlInfoRecord lineCtrl; 796 797 /* T53 CLIR Info Rec */ 798 RIL_CDMA_T53_CLIRInfoRecord clir; 799 800 /* T53 Audio Control Info Rec */ 801 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl; 802 } rec; 803 } RIL_CDMA_InformationRecord; 804 805 #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10 806 807 typedef struct { 808 char numberOfInfoRecs; 809 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS]; 810 } RIL_CDMA_InformationRecords; 811 812 /** 813 * RIL_REQUEST_GET_SIM_STATUS 814 * 815 * Requests status of the SIM interface and the SIM card 816 * 817 * "data" is NULL 818 * 819 * "response" is const RIL_CardStatus_v6 * 820 * 821 * Valid errors: 822 * Must never fail 823 */ 824 #define RIL_REQUEST_GET_SIM_STATUS 1 825 826 /** 827 * RIL_REQUEST_ENTER_SIM_PIN 828 * 829 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state 830 * 831 * "data" is const char ** 832 * ((const char **)data)[0] is PIN value 833 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 834 * 835 * "response" is int * 836 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 837 * 838 * Valid errors: 839 * 840 * SUCCESS 841 * RADIO_NOT_AVAILABLE (radio resetting) 842 * GENERIC_FAILURE 843 * PASSWORD_INCORRECT 844 */ 845 846 #define RIL_REQUEST_ENTER_SIM_PIN 2 847 848 849 /** 850 * RIL_REQUEST_ENTER_SIM_PUK 851 * 852 * Supplies SIM PUK and new PIN. 853 * 854 * "data" is const char ** 855 * ((const char **)data)[0] is PUK value 856 * ((const char **)data)[1] is new PIN value 857 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 858 * 859 * "response" is int * 860 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 861 * 862 * Valid errors: 863 * 864 * SUCCESS 865 * RADIO_NOT_AVAILABLE (radio resetting) 866 * GENERIC_FAILURE 867 * PASSWORD_INCORRECT 868 * (PUK is invalid) 869 */ 870 871 #define RIL_REQUEST_ENTER_SIM_PUK 3 872 873 /** 874 * RIL_REQUEST_ENTER_SIM_PIN2 875 * 876 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was 877 * returned as a a failure from a previous operation. 878 * 879 * "data" is const char ** 880 * ((const char **)data)[0] is PIN2 value 881 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 882 * 883 * "response" is int * 884 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 885 * 886 * Valid errors: 887 * 888 * SUCCESS 889 * RADIO_NOT_AVAILABLE (radio resetting) 890 * GENERIC_FAILURE 891 * PASSWORD_INCORRECT 892 */ 893 894 #define RIL_REQUEST_ENTER_SIM_PIN2 4 895 896 /** 897 * RIL_REQUEST_ENTER_SIM_PUK2 898 * 899 * Supplies SIM PUK2 and new PIN2. 900 * 901 * "data" is const char ** 902 * ((const char **)data)[0] is PUK2 value 903 * ((const char **)data)[1] is new PIN2 value 904 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 905 * 906 * "response" is int * 907 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 908 * 909 * Valid errors: 910 * 911 * SUCCESS 912 * RADIO_NOT_AVAILABLE (radio resetting) 913 * GENERIC_FAILURE 914 * PASSWORD_INCORRECT 915 * (PUK2 is invalid) 916 */ 917 918 #define RIL_REQUEST_ENTER_SIM_PUK2 5 919 920 /** 921 * RIL_REQUEST_CHANGE_SIM_PIN 922 * 923 * Supplies old SIM PIN and new PIN. 924 * 925 * "data" is const char ** 926 * ((const char **)data)[0] is old PIN value 927 * ((const char **)data)[1] is new PIN value 928 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 929 * 930 * "response" is int * 931 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 932 * 933 * Valid errors: 934 * 935 * SUCCESS 936 * RADIO_NOT_AVAILABLE (radio resetting) 937 * GENERIC_FAILURE 938 * PASSWORD_INCORRECT 939 * (old PIN is invalid) 940 * 941 */ 942 943 #define RIL_REQUEST_CHANGE_SIM_PIN 6 944 945 946 /** 947 * RIL_REQUEST_CHANGE_SIM_PIN2 948 * 949 * Supplies old SIM PIN2 and new PIN2. 950 * 951 * "data" is const char ** 952 * ((const char **)data)[0] is old PIN2 value 953 * ((const char **)data)[1] is new PIN2 value 954 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 955 * 956 * "response" is int * 957 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 958 * 959 * Valid errors: 960 * 961 * SUCCESS 962 * RADIO_NOT_AVAILABLE (radio resetting) 963 * GENERIC_FAILURE 964 * PASSWORD_INCORRECT 965 * (old PIN2 is invalid) 966 * 967 */ 968 969 #define RIL_REQUEST_CHANGE_SIM_PIN2 7 970 971 /** 972 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 973 * 974 * Requests that network personlization be deactivated 975 * 976 * "data" is const char ** 977 * ((const char **)(data))[0]] is network depersonlization code 978 * 979 * "response" is int * 980 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 981 * 982 * Valid errors: 983 * 984 * SUCCESS 985 * RADIO_NOT_AVAILABLE (radio resetting) 986 * GENERIC_FAILURE 987 * PASSWORD_INCORRECT 988 * (code is invalid) 989 */ 990 991 #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8 992 993 /** 994 * RIL_REQUEST_GET_CURRENT_CALLS 995 * 996 * Requests current call list 997 * 998 * "data" is NULL 999 * 1000 * "response" must be a "const RIL_Call **" 1001 * 1002 * Valid errors: 1003 * 1004 * SUCCESS 1005 * RADIO_NOT_AVAILABLE (radio resetting) 1006 * GENERIC_FAILURE 1007 * (request will be made again in a few hundred msec) 1008 */ 1009 1010 #define RIL_REQUEST_GET_CURRENT_CALLS 9 1011 1012 1013 /** 1014 * RIL_REQUEST_DIAL 1015 * 1016 * Initiate voice call 1017 * 1018 * "data" is const RIL_Dial * 1019 * "response" is NULL 1020 * 1021 * This method is never used for supplementary service codes 1022 * 1023 * Valid errors: 1024 * SUCCESS 1025 * RADIO_NOT_AVAILABLE (radio resetting) 1026 * GENERIC_FAILURE 1027 */ 1028 #define RIL_REQUEST_DIAL 10 1029 1030 /** 1031 * RIL_REQUEST_GET_IMSI 1032 * 1033 * Get the SIM IMSI 1034 * 1035 * Only valid when radio state is "RADIO_STATE_ON" 1036 * 1037 * "data" is const char ** 1038 * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1039 * "response" is a const char * containing the IMSI 1040 * 1041 * Valid errors: 1042 * SUCCESS 1043 * RADIO_NOT_AVAILABLE (radio resetting) 1044 * GENERIC_FAILURE 1045 */ 1046 1047 #define RIL_REQUEST_GET_IMSI 11 1048 1049 /** 1050 * RIL_REQUEST_HANGUP 1051 * 1052 * Hang up a specific line (like AT+CHLD=1x) 1053 * 1054 * After this HANGUP request returns, RIL should show the connection is NOT 1055 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. 1056 * 1057 * "data" is an int * 1058 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) 1059 * 1060 * "response" is NULL 1061 * 1062 * Valid errors: 1063 * SUCCESS 1064 * RADIO_NOT_AVAILABLE (radio resetting) 1065 * GENERIC_FAILURE 1066 */ 1067 1068 #define RIL_REQUEST_HANGUP 12 1069 1070 /** 1071 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 1072 * 1073 * Hang up waiting or held (like AT+CHLD=0) 1074 * 1075 * After this HANGUP request returns, RIL should show the connection is NOT 1076 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. 1077 * 1078 * "data" is NULL 1079 * "response" is NULL 1080 * 1081 * Valid errors: 1082 * SUCCESS 1083 * RADIO_NOT_AVAILABLE (radio resetting) 1084 * GENERIC_FAILURE 1085 */ 1086 1087 #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13 1088 1089 /** 1090 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 1091 * 1092 * Hang up waiting or held (like AT+CHLD=1) 1093 * 1094 * After this HANGUP request returns, RIL should show the connection is NOT 1095 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. 1096 * 1097 * "data" is NULL 1098 * "response" is NULL 1099 * 1100 * Valid errors: 1101 * SUCCESS 1102 * RADIO_NOT_AVAILABLE (radio resetting) 1103 * GENERIC_FAILURE 1104 */ 1105 1106 #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14 1107 1108 /** 1109 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 1110 * 1111 * Switch waiting or holding call and active call (like AT+CHLD=2) 1112 * 1113 * State transitions should be is follows: 1114 * 1115 * If call 1 is waiting and call 2 is active, then if this re 1116 * 1117 * BEFORE AFTER 1118 * Call 1 Call 2 Call 1 Call 2 1119 * ACTIVE HOLDING HOLDING ACTIVE 1120 * ACTIVE WAITING HOLDING ACTIVE 1121 * HOLDING WAITING HOLDING ACTIVE 1122 * ACTIVE IDLE HOLDING IDLE 1123 * IDLE IDLE IDLE IDLE 1124 * 1125 * "data" is NULL 1126 * "response" is NULL 1127 * 1128 * Valid errors: 1129 * SUCCESS 1130 * RADIO_NOT_AVAILABLE (radio resetting) 1131 * GENERIC_FAILURE 1132 */ 1133 1134 #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15 1135 #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15 1136 1137 /** 1138 * RIL_REQUEST_CONFERENCE 1139 * 1140 * Conference holding and active (like AT+CHLD=3) 1141 1142 * "data" is NULL 1143 * "response" is NULL 1144 * 1145 * Valid errors: 1146 * SUCCESS 1147 * RADIO_NOT_AVAILABLE (radio resetting) 1148 * GENERIC_FAILURE 1149 */ 1150 #define RIL_REQUEST_CONFERENCE 16 1151 1152 /** 1153 * RIL_REQUEST_UDUB 1154 * 1155 * Send UDUB (user determined used busy) to ringing or 1156 * waiting call answer)(RIL_BasicRequest r); 1157 * 1158 * "data" is NULL 1159 * "response" is NULL 1160 * 1161 * Valid errors: 1162 * SUCCESS 1163 * RADIO_NOT_AVAILABLE (radio resetting) 1164 * GENERIC_FAILURE 1165 */ 1166 #define RIL_REQUEST_UDUB 17 1167 1168 /** 1169 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE 1170 * 1171 * Requests the failure cause code for the most recently terminated call 1172 * 1173 * "data" is NULL 1174 * "response" is a "int *" 1175 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are 1176 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA 1177 * failure reasons are derived from the possible call failure scenarios 1178 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard. 1179 * 1180 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked 1181 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED) 1182 * 1183 * If the implementation does not have access to the exact cause codes, 1184 * then it should return one of the values listed in RIL_LastCallFailCause, 1185 * as the UI layer needs to distinguish these cases for tone generation or 1186 * error notification. 1187 * 1188 * Valid errors: 1189 * SUCCESS 1190 * RADIO_NOT_AVAILABLE 1191 * GENERIC_FAILURE 1192 * 1193 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 1194 */ 1195 #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18 1196 1197 /** 1198 * RIL_REQUEST_SIGNAL_STRENGTH 1199 * 1200 * Requests current signal strength and associated information 1201 * 1202 * Must succeed if radio is on. 1203 * 1204 * "data" is NULL 1205 * 1206 * "response" is a const RIL_SignalStrength * 1207 * 1208 * Valid errors: 1209 * SUCCESS 1210 * RADIO_NOT_AVAILABLE 1211 */ 1212 #define RIL_REQUEST_SIGNAL_STRENGTH 19 1213 1214 /** 1215 * RIL_REQUEST_VOICE_REGISTRATION_STATE 1216 * 1217 * Request current registration state 1218 * 1219 * "data" is NULL 1220 * "response" is a "char **" 1221 * ((const char **)response)[0] is registration state 0-6, 1222 * 0 - Not registered, MT is not currently searching 1223 * a new operator to register 1224 * 1 - Registered, home network 1225 * 2 - Not registered, but MT is currently searching 1226 * a new operator to register 1227 * 3 - Registration denied 1228 * 4 - Unknown 1229 * 5 - Registered, roaming 1230 * 10 - Same as 0, but indicates that emergency calls 1231 * are enabled. 1232 * 12 - Same as 2, but indicates that emergency calls 1233 * are enabled. 1234 * 13 - Same as 3, but indicates that emergency calls 1235 * are enabled. 1236 * 14 - Same as 4, but indicates that emergency calls 1237 * are enabled. 1238 * 1239 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or 1240 * NULL if not.Valid LAC are 0x0000 - 0xffff 1241 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or 1242 * NULL if not. 1243 * Valid CID are 0x00000000 - 0xffffffff 1244 * In GSM, CID is Cell ID (see TS 27.007) 1245 * in 16 bits 1246 * In UMTS, CID is UMTS Cell Identity 1247 * (see TS 25.331) in 28 bits 1248 * ((const char **)response)[3] indicates the available voice radio technology, 1249 * valid values as defined by RIL_RadioTechnology. 1250 * ((const char **)response)[4] is Base Station ID if registered on a CDMA 1251 * system or NULL if not. Base Station ID in 1252 * decimal format 1253 * ((const char **)response)[5] is Base Station latitude if registered on a 1254 * CDMA system or NULL if not. Base Station 1255 * latitude is a decimal number as specified in 1256 * 3GPP2 C.S0005-A v6.0. It is represented in 1257 * units of 0.25 seconds and ranges from -1296000 1258 * to 1296000, both values inclusive (corresponding 1259 * to a range of -90 to +90 degrees). 1260 * ((const char **)response)[6] is Base Station longitude if registered on a 1261 * CDMA system or NULL if not. Base Station 1262 * longitude is a decimal number as specified in 1263 * 3GPP2 C.S0005-A v6.0. It is represented in 1264 * units of 0.25 seconds and ranges from -2592000 1265 * to 2592000, both values inclusive (corresponding 1266 * to a range of -180 to +180 degrees). 1267 * ((const char **)response)[7] is concurrent services support indicator if 1268 * registered on a CDMA system 0-1. 1269 * 0 - Concurrent services not supported, 1270 * 1 - Concurrent services supported 1271 * ((const char **)response)[8] is System ID if registered on a CDMA system or 1272 * NULL if not. Valid System ID are 0 - 32767 1273 * ((const char **)response)[9] is Network ID if registered on a CDMA system or 1274 * NULL if not. Valid System ID are 0 - 65535 1275 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered 1276 * on a CDMA or EVDO system or NULL if not. Valid values 1277 * are 0-255. 1278 * ((const char **)response)[11] indicates whether the current system is in the 1279 * PRL if registered on a CDMA or EVDO system or NULL if 1280 * not. 0=not in the PRL, 1=in the PRL 1281 * ((const char **)response)[12] is the default Roaming Indicator from the PRL, 1282 * if registered on a CDMA or EVDO system or NULL if not. 1283 * Valid values are 0-255. 1284 * ((const char **)response)[13] if registration state is 3 (Registration 1285 * denied) this is an enumerated reason why 1286 * registration was denied. See 3GPP TS 24.008, 1287 * 10.5.3.6 and Annex G. 1288 * 0 - General 1289 * 1 - Authentication Failure 1290 * 2 - IMSI unknown in HLR 1291 * 3 - Illegal MS 1292 * 4 - Illegal ME 1293 * 5 - PLMN not allowed 1294 * 6 - Location area not allowed 1295 * 7 - Roaming not allowed 1296 * 8 - No Suitable Cells in this Location Area 1297 * 9 - Network failure 1298 * 10 - Persistent location update reject 1299 * 11 - PLMN not allowed 1300 * 12 - Location area not allowed 1301 * 13 - Roaming not allowed in this Location Area 1302 * 15 - No Suitable Cells in this Location Area 1303 * 17 - Network Failure 1304 * 20 - MAC Failure 1305 * 21 - Sync Failure 1306 * 22 - Congestion 1307 * 23 - GSM Authentication unacceptable 1308 * 25 - Not Authorized for this CSG 1309 * 32 - Service option not supported 1310 * 33 - Requested service option not subscribed 1311 * 34 - Service option temporarily out of order 1312 * 38 - Call cannot be identified 1313 * 48-63 - Retry upon entry into a new cell 1314 * 95 - Semantically incorrect message 1315 * 96 - Invalid mandatory information 1316 * 97 - Message type non-existent or not implemented 1317 * 98 - Message not compatible with protocol state 1318 * 99 - Information element non-existent or not implemented 1319 * 100 - Conditional IE error 1320 * 101 - Message not compatible with protocol state 1321 * 111 - Protocol error, unspecified 1322 * ((const char **)response)[14] is the Primary Scrambling Code of the current 1323 * cell as described in TS 25.331, in hexadecimal 1324 * format, or NULL if unknown or not registered 1325 * to a UMTS network. 1326 * 1327 * Please note that registration state 4 ("unknown") is treated 1328 * as "out of service" in the Android telephony system 1329 * 1330 * Registration state 3 can be returned if Location Update Reject 1331 * (with cause 17 - Network Failure) is received repeatedly from the network, 1332 * to facilitate "managed roaming" 1333 * 1334 * Valid errors: 1335 * SUCCESS 1336 * RADIO_NOT_AVAILABLE 1337 * GENERIC_FAILURE 1338 */ 1339 #define RIL_REQUEST_VOICE_REGISTRATION_STATE 20 1340 1341 /** 1342 * RIL_REQUEST_DATA_REGISTRATION_STATE 1343 * 1344 * Request current DATA registration state 1345 * 1346 * "data" is NULL 1347 * "response" is a "char **" 1348 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG 1349 * ((const char **)response)[1] is LAC if registered or NULL if not 1350 * ((const char **)response)[2] is CID if registered or NULL if not 1351 * ((const char **)response)[3] indicates the available data radio technology, 1352 * valid values as defined by RIL_RadioTechnology. 1353 * ((const char **)response)[4] if registration state is 3 (Registration 1354 * denied) this is an enumerated reason why 1355 * registration was denied. See 3GPP TS 24.008, 1356 * Annex G.6 "Additonal cause codes for GMM". 1357 * 7 == GPRS services not allowed 1358 * 8 == GPRS services and non-GPRS services not allowed 1359 * 9 == MS identity cannot be derived by the network 1360 * 10 == Implicitly detached 1361 * 14 == GPRS services not allowed in this PLMN 1362 * 16 == MSC temporarily not reachable 1363 * 40 == No PDP context activated 1364 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be 1365 * established using RIL_REQUEST_SETUP_DATA_CALL. 1366 * 1367 * The values at offsets 6..10 are optional LTE location information. If a value 1368 * is unknown that value is NULL. If all values are NULL, none need to be present. 1369 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code. 1370 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier. 1371 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier. 1372 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity. 1373 * ((const char **)response)[10] is TADV, a 6-bit timing advance value. 1374 * 1375 * LAC and CID are in hexadecimal format. 1376 * valid LAC are 0x0000 - 0xffff 1377 * valid CID are 0x00000000 - 0x0fffffff 1378 * 1379 * Please note that registration state 4 ("unknown") is treated 1380 * as "out of service" in the Android telephony system 1381 * 1382 * Valid errors: 1383 * SUCCESS 1384 * RADIO_NOT_AVAILABLE 1385 * GENERIC_FAILURE 1386 */ 1387 #define RIL_REQUEST_DATA_REGISTRATION_STATE 21 1388 1389 /** 1390 * RIL_REQUEST_OPERATOR 1391 * 1392 * Request current operator ONS or EONS 1393 * 1394 * "data" is NULL 1395 * "response" is a "const char **" 1396 * ((const char **)response)[0] is long alpha ONS or EONS 1397 * or NULL if unregistered 1398 * 1399 * ((const char **)response)[1] is short alpha ONS or EONS 1400 * or NULL if unregistered 1401 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC) 1402 * or NULL if unregistered 1403 * 1404 * Valid errors: 1405 * SUCCESS 1406 * RADIO_NOT_AVAILABLE 1407 * GENERIC_FAILURE 1408 */ 1409 #define RIL_REQUEST_OPERATOR 22 1410 1411 /** 1412 * RIL_REQUEST_RADIO_POWER 1413 * 1414 * Toggle radio on and off (for "airplane" mode) 1415 * If the radio is is turned off/on the radio modem subsystem 1416 * is expected return to an initialized state. For instance, 1417 * any voice and data calls will be terminated and all associated 1418 * lists emptied. 1419 * 1420 * "data" is int * 1421 * ((int *)data)[0] is > 0 for "Radio On" 1422 * ((int *)data)[0] is == 0 for "Radio Off" 1423 * 1424 * "response" is NULL 1425 * 1426 * Turn radio on if "on" > 0 1427 * Turn radio off if "on" == 0 1428 * 1429 * Valid errors: 1430 * SUCCESS 1431 * RADIO_NOT_AVAILABLE 1432 * GENERIC_FAILURE 1433 */ 1434 #define RIL_REQUEST_RADIO_POWER 23 1435 1436 /** 1437 * RIL_REQUEST_DTMF 1438 * 1439 * Send a DTMF tone 1440 * 1441 * If the implementation is currently playing a tone requested via 1442 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone 1443 * should be played instead 1444 * 1445 * "data" is a char * containing a single character with one of 12 values: 0-9,*,# 1446 * "response" is NULL 1447 * 1448 * FIXME should this block/mute microphone? 1449 * How does this interact with local DTMF feedback? 1450 * 1451 * Valid errors: 1452 * SUCCESS 1453 * RADIO_NOT_AVAILABLE 1454 * GENERIC_FAILURE 1455 * 1456 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START 1457 * 1458 */ 1459 #define RIL_REQUEST_DTMF 24 1460 1461 /** 1462 * RIL_REQUEST_SEND_SMS 1463 * 1464 * Send an SMS message 1465 * 1466 * "data" is const char ** 1467 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed 1468 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 1469 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string 1470 * less the SMSC address 1471 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" 1472 * 1473 * "response" is a const RIL_SMS_Response * 1474 * 1475 * Based on the return error, caller decides to resend if sending sms 1476 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) 1477 * and GENERIC_FAILURE means no retry (i.e. error cause is 500) 1478 * 1479 * Valid errors: 1480 * SUCCESS 1481 * RADIO_NOT_AVAILABLE 1482 * SMS_SEND_FAIL_RETRY 1483 * FDN_CHECK_FAILURE 1484 * GENERIC_FAILURE 1485 * 1486 * FIXME how do we specify TP-Message-Reference if we need to resend? 1487 */ 1488 #define RIL_REQUEST_SEND_SMS 25 1489 1490 1491 /** 1492 * RIL_REQUEST_SEND_SMS_EXPECT_MORE 1493 * 1494 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS, 1495 * except that more messages are expected to be sent soon. If possible, 1496 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command) 1497 * 1498 * "data" is const char ** 1499 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed 1500 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 1501 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string 1502 * less the SMSC address 1503 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" 1504 * 1505 * "response" is a const RIL_SMS_Response * 1506 * 1507 * Based on the return error, caller decides to resend if sending sms 1508 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) 1509 * and GENERIC_FAILURE means no retry (i.e. error cause is 500) 1510 * 1511 * Valid errors: 1512 * SUCCESS 1513 * RADIO_NOT_AVAILABLE 1514 * SMS_SEND_FAIL_RETRY 1515 * GENERIC_FAILURE 1516 * 1517 */ 1518 #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26 1519 1520 1521 /** 1522 * RIL_REQUEST_SETUP_DATA_CALL 1523 * 1524 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status 1525 * return success it is added to the list of data calls and a 1526 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the 1527 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the 1528 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST 1529 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED. 1530 * 1531 * The RIL is expected to: 1532 * - Create one data call context. 1533 * - Create and configure a dedicated interface for the context 1534 * - The interface must be point to point. 1535 * - The interface is configured with one or more addresses and 1536 * is capable of sending and receiving packets. The prefix length 1537 * of the addresses must be /32 for IPv4 and /128 for IPv6. 1538 * - Must NOT change the linux routing table. 1539 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5] 1540 * number of simultaneous data call contexts. 1541 * 1542 * "data" is a const char ** 1543 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2... 1544 * for values above 2 this is RIL_RadioTechnology + 2. 1545 * ((const char **)data)[1] is a RIL_DataProfile (support is optional) 1546 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will 1547 * override the one in the profile. NULL indicates no APN overrride. 1548 * ((const char **)data)[3] is the username for APN, or NULL 1549 * ((const char **)data)[4] is the password for APN, or NULL 1550 * ((const char **)data)[5] is the PAP / CHAP auth type. Values: 1551 * 0 => PAP and CHAP is never performed. 1552 * 1 => PAP may be performed; CHAP is never performed. 1553 * 2 => CHAP may be performed; PAP is never performed. 1554 * 3 => PAP / CHAP may be performed - baseband dependent. 1555 * ((const char **)data)[6] is the connection type to request must be one of the 1556 * PDP_type values in TS 27.007 section 10.1.1. 1557 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 1558 * ((const char **)data)[7] Optional connection property parameters, format to be defined. 1559 * 1560 * "response" is a RIL_Data_Call_Response_v6 1561 * 1562 * FIXME may need way to configure QoS settings 1563 * 1564 * Valid errors: 1565 * SUCCESS should be returned on both success and failure of setup with 1566 * the RIL_Data_Call_Response_v6.status containing the actual status. 1567 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored. 1568 * 1569 * Other errors could include: 1570 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW, 1571 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED. 1572 * 1573 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL 1574 */ 1575 #define RIL_REQUEST_SETUP_DATA_CALL 27 1576 1577 1578 /** 1579 * RIL_REQUEST_SIM_IO 1580 * 1581 * Request SIM I/O operation. 1582 * This is similar to the TS 27.007 "restricted SIM" operation 1583 * where it assumes all of the EF selection will be done by the 1584 * callee. 1585 * 1586 * "data" is a const RIL_SIM_IO_v6 * 1587 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL, 1588 * or may specify a PIN2 for operations that require a PIN2 (eg 1589 * updating FDN records) 1590 * 1591 * "response" is a const RIL_SIM_IO_Response * 1592 * 1593 * Arguments and responses that are unused for certain 1594 * values of "command" should be ignored or set to NULL 1595 * 1596 * Valid errors: 1597 * SUCCESS 1598 * RADIO_NOT_AVAILABLE 1599 * GENERIC_FAILURE 1600 * SIM_PIN2 1601 * SIM_PUK2 1602 */ 1603 #define RIL_REQUEST_SIM_IO 28 1604 1605 /** 1606 * RIL_REQUEST_SEND_USSD 1607 * 1608 * Send a USSD message 1609 * 1610 * If a USSD session already exists, the message should be sent in the 1611 * context of that session. Otherwise, a new session should be created. 1612 * 1613 * The network reply should be reported via RIL_UNSOL_ON_USSD 1614 * 1615 * Only one USSD session may exist at a time, and the session is assumed 1616 * to exist until: 1617 * a) The android system invokes RIL_REQUEST_CANCEL_USSD 1618 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code 1619 * of "0" (USSD-Notify/no further action) or "2" (session terminated) 1620 * 1621 * "data" is a const char * containing the USSD request in UTF-8 format 1622 * "response" is NULL 1623 * 1624 * Valid errors: 1625 * SUCCESS 1626 * RADIO_NOT_AVAILABLE 1627 * FDN_CHECK_FAILURE 1628 * GENERIC_FAILURE 1629 * 1630 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD 1631 */ 1632 1633 #define RIL_REQUEST_SEND_USSD 29 1634 1635 /** 1636 * RIL_REQUEST_CANCEL_USSD 1637 * 1638 * Cancel the current USSD session if one exists 1639 * 1640 * "data" is null 1641 * "response" is NULL 1642 * 1643 * Valid errors: 1644 * SUCCESS 1645 * RADIO_NOT_AVAILABLE 1646 * GENERIC_FAILURE 1647 */ 1648 1649 #define RIL_REQUEST_CANCEL_USSD 30 1650 1651 /** 1652 * RIL_REQUEST_GET_CLIR 1653 * 1654 * Gets current CLIR status 1655 * "data" is NULL 1656 * "response" is int * 1657 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 1658 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7 1659 * 1660 * Valid errors: 1661 * SUCCESS 1662 * RADIO_NOT_AVAILABLE 1663 * GENERIC_FAILURE 1664 */ 1665 #define RIL_REQUEST_GET_CLIR 31 1666 1667 /** 1668 * RIL_REQUEST_SET_CLIR 1669 * 1670 * "data" is int * 1671 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 1672 * 1673 * "response" is NULL 1674 * 1675 * Valid errors: 1676 * SUCCESS 1677 * RADIO_NOT_AVAILABLE 1678 * GENERIC_FAILURE 1679 */ 1680 #define RIL_REQUEST_SET_CLIR 32 1681 1682 /** 1683 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 1684 * 1685 * "data" is const RIL_CallForwardInfo * 1686 * 1687 * "response" is const RIL_CallForwardInfo ** 1688 * "response" points to an array of RIL_CallForwardInfo *'s, one for 1689 * each distinct registered phone number. 1690 * 1691 * For example, if data is forwarded to +18005551212 and voice is forwarded 1692 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned 1693 * 1694 * If, however, both data and voice are forwarded to +18005551212, then 1695 * a single RIL_CallForwardInfo can be returned with the service class 1696 * set to "data + voice = 3") 1697 * 1698 * Valid errors: 1699 * SUCCESS 1700 * RADIO_NOT_AVAILABLE 1701 * GENERIC_FAILURE 1702 */ 1703 #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33 1704 1705 1706 /** 1707 * RIL_REQUEST_SET_CALL_FORWARD 1708 * 1709 * Configure call forward rule 1710 * 1711 * "data" is const RIL_CallForwardInfo * 1712 * "response" is NULL 1713 * 1714 * Valid errors: 1715 * SUCCESS 1716 * RADIO_NOT_AVAILABLE 1717 * GENERIC_FAILURE 1718 */ 1719 #define RIL_REQUEST_SET_CALL_FORWARD 34 1720 1721 1722 /** 1723 * RIL_REQUEST_QUERY_CALL_WAITING 1724 * 1725 * Query current call waiting state 1726 * 1727 * "data" is const int * 1728 * ((const int *)data)[0] is the TS 27.007 service class to query. 1729 * "response" is a const int * 1730 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled" 1731 * 1732 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1] 1733 * must follow, with the TS 27.007 service class bit vector of services 1734 * for which call waiting is enabled. 1735 * 1736 * For example, if ((const int *)response)[0] is 1 and 1737 * ((const int *)response)[1] is 3, then call waiting is enabled for data 1738 * and voice and disabled for everything else 1739 * 1740 * Valid errors: 1741 * SUCCESS 1742 * RADIO_NOT_AVAILABLE 1743 * GENERIC_FAILURE 1744 */ 1745 #define RIL_REQUEST_QUERY_CALL_WAITING 35 1746 1747 1748 /** 1749 * RIL_REQUEST_SET_CALL_WAITING 1750 * 1751 * Configure current call waiting state 1752 * 1753 * "data" is const int * 1754 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled" 1755 * ((const int *)data)[1] is the TS 27.007 service class bit vector of 1756 * services to modify 1757 * "response" is NULL 1758 * 1759 * Valid errors: 1760 * SUCCESS 1761 * RADIO_NOT_AVAILABLE 1762 * GENERIC_FAILURE 1763 */ 1764 #define RIL_REQUEST_SET_CALL_WAITING 36 1765 1766 /** 1767 * RIL_REQUEST_SMS_ACKNOWLEDGE 1768 * 1769 * Acknowledge successful or failed receipt of SMS previously indicated 1770 * via RIL_UNSOL_RESPONSE_NEW_SMS 1771 * 1772 * "data" is int * 1773 * ((int *)data)[0] is 1 on successful receipt 1774 * (basically, AT+CNMA=1 from TS 27.005 1775 * is 0 on failed receipt 1776 * (basically, AT+CNMA=2 from TS 27.005) 1777 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined 1778 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory 1779 * capacity exceeded) and 0xFF (unspecified error) are 1780 * reported. 1781 * 1782 * "response" is NULL 1783 * 1784 * FIXME would like request that specified RP-ACK/RP-ERROR PDU 1785 * 1786 * Valid errors: 1787 * SUCCESS 1788 * RADIO_NOT_AVAILABLE 1789 * GENERIC_FAILURE 1790 */ 1791 #define RIL_REQUEST_SMS_ACKNOWLEDGE 37 1792 1793 /** 1794 * RIL_REQUEST_GET_IMEI - DEPRECATED 1795 * 1796 * Get the device IMEI, including check digit 1797 * 1798 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY 1799 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE 1800 * 1801 * "data" is NULL 1802 * "response" is a const char * containing the IMEI 1803 * 1804 * Valid errors: 1805 * SUCCESS 1806 * RADIO_NOT_AVAILABLE (radio resetting) 1807 * GENERIC_FAILURE 1808 */ 1809 1810 #define RIL_REQUEST_GET_IMEI 38 1811 1812 /** 1813 * RIL_REQUEST_GET_IMEISV - DEPRECATED 1814 * 1815 * Get the device IMEISV, which should be two decimal digits 1816 * 1817 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY 1818 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE 1819 * 1820 * "data" is NULL 1821 * "response" is a const char * containing the IMEISV 1822 * 1823 * Valid errors: 1824 * SUCCESS 1825 * RADIO_NOT_AVAILABLE (radio resetting) 1826 * GENERIC_FAILURE 1827 */ 1828 1829 #define RIL_REQUEST_GET_IMEISV 39 1830 1831 1832 /** 1833 * RIL_REQUEST_ANSWER 1834 * 1835 * Answer incoming call 1836 * 1837 * Will not be called for WAITING calls. 1838 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case 1839 * instead 1840 * 1841 * "data" is NULL 1842 * "response" is NULL 1843 * 1844 * Valid errors: 1845 * SUCCESS 1846 * RADIO_NOT_AVAILABLE (radio resetting) 1847 * GENERIC_FAILURE 1848 */ 1849 1850 #define RIL_REQUEST_ANSWER 40 1851 1852 /** 1853 * RIL_REQUEST_DEACTIVATE_DATA_CALL 1854 * 1855 * Deactivate packet data connection and remove from the 1856 * data call list if SUCCESS is returned. Any other return 1857 * values should also try to remove the call from the list, 1858 * but that may not be possible. In any event a 1859 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An 1860 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be 1861 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL. 1862 * 1863 * "data" is const char ** 1864 * ((char**)data)[0] indicating CID 1865 * ((char**)data)[1] indicating Disconnect Reason 1866 * 0 => No specific reason specified 1867 * 1 => Radio shutdown requested 1868 * 1869 * "response" is NULL 1870 * 1871 * Valid errors: 1872 * SUCCESS 1873 * RADIO_NOT_AVAILABLE 1874 * GENERIC_FAILURE 1875 * 1876 * See also: RIL_REQUEST_SETUP_DATA_CALL 1877 */ 1878 #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41 1879 1880 /** 1881 * RIL_REQUEST_QUERY_FACILITY_LOCK 1882 * 1883 * Query the status of a facility lock state 1884 * 1885 * "data" is const char ** 1886 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4 1887 * (eg "AO" for BAOC, "SC" for SIM lock) 1888 * ((const char **)data)[1] is the password, or "" if not required 1889 * ((const char **)data)[2] is the TS 27.007 service class bit vector of 1890 * services to query 1891 * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1892 * This is only applicable in the case of Fixed Dialing Numbers 1893 * (FDN) requests. 1894 * 1895 * "response" is an int * 1896 * ((const int *)response) 0 is the TS 27.007 service class bit vector of 1897 * services for which the specified barring facility 1898 * is active. "0" means "disabled for all" 1899 * 1900 * 1901 * Valid errors: 1902 * SUCCESS 1903 * RADIO_NOT_AVAILABLE 1904 * GENERIC_FAILURE 1905 * 1906 */ 1907 #define RIL_REQUEST_QUERY_FACILITY_LOCK 42 1908 1909 /** 1910 * RIL_REQUEST_SET_FACILITY_LOCK 1911 * 1912 * Enable/disable one facility lock 1913 * 1914 * "data" is const char ** 1915 * 1916 * ((const char **)data)[0] = facility string code from TS 27.007 7.4 1917 * (eg "AO" for BAOC) 1918 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock" 1919 * ((const char **)data)[2] = password 1920 * ((const char **)data)[3] = string representation of decimal TS 27.007 1921 * service class bit vector. Eg, the string 1922 * "1" means "set this facility for voice services" 1923 * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1924 * This is only applicable in the case of Fixed Dialing Numbers 1925 * (FDN) requests. 1926 * 1927 * "response" is int * 1928 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1929 * 1930 * Valid errors: 1931 * SUCCESS 1932 * RADIO_NOT_AVAILABLE 1933 * GENERIC_FAILURE 1934 * 1935 */ 1936 #define RIL_REQUEST_SET_FACILITY_LOCK 43 1937 1938 /** 1939 * RIL_REQUEST_CHANGE_BARRING_PASSWORD 1940 * 1941 * Change call barring facility password 1942 * 1943 * "data" is const char ** 1944 * 1945 * ((const char **)data)[0] = facility string code from TS 27.007 7.4 1946 * (eg "AO" for BAOC) 1947 * ((const char **)data)[1] = old password 1948 * ((const char **)data)[2] = new password 1949 * 1950 * "response" is NULL 1951 * 1952 * Valid errors: 1953 * SUCCESS 1954 * RADIO_NOT_AVAILABLE 1955 * GENERIC_FAILURE 1956 * 1957 */ 1958 #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44 1959 1960 /** 1961 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 1962 * 1963 * Query current network selectin mode 1964 * 1965 * "data" is NULL 1966 * 1967 * "response" is int * 1968 * ((const int *)response)[0] is 1969 * 0 for automatic selection 1970 * 1 for manual selection 1971 * 1972 * Valid errors: 1973 * SUCCESS 1974 * RADIO_NOT_AVAILABLE 1975 * GENERIC_FAILURE 1976 * 1977 */ 1978 #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45 1979 1980 /** 1981 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 1982 * 1983 * Specify that the network should be selected automatically 1984 * 1985 * "data" is NULL 1986 * "response" is NULL 1987 * 1988 * This request must not respond until the new operator is selected 1989 * and registered 1990 * 1991 * Valid errors: 1992 * SUCCESS 1993 * RADIO_NOT_AVAILABLE 1994 * ILLEGAL_SIM_OR_ME 1995 * GENERIC_FAILURE 1996 * 1997 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and 1998 * no retries needed, such as illegal SIM or ME. 1999 * Returns GENERIC_FAILURE for all other causes that might be 2000 * fixed by retries. 2001 * 2002 */ 2003 #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46 2004 2005 /** 2006 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 2007 * 2008 * Manually select a specified network. 2009 * 2010 * "data" is const char * specifying MCCMNC of network to select (eg "310170") 2011 * "response" is NULL 2012 * 2013 * This request must not respond until the new operator is selected 2014 * and registered 2015 * 2016 * Valid errors: 2017 * SUCCESS 2018 * RADIO_NOT_AVAILABLE 2019 * ILLEGAL_SIM_OR_ME 2020 * GENERIC_FAILURE 2021 * 2022 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and 2023 * no retries needed, such as illegal SIM or ME. 2024 * Returns GENERIC_FAILURE for all other causes that might be 2025 * fixed by retries. 2026 * 2027 */ 2028 #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47 2029 2030 /** 2031 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 2032 * 2033 * Scans for available networks 2034 * 2035 * "data" is NULL 2036 * "response" is const char ** that should be an array of n*4 strings, where 2037 * n is the number of available networks 2038 * For each available network: 2039 * 2040 * ((const char **)response)[n+0] is long alpha ONS or EONS 2041 * ((const char **)response)[n+1] is short alpha ONS or EONS 2042 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC) 2043 * ((const char **)response)[n+3] is a string value of the status: 2044 * "unknown" 2045 * "available" 2046 * "current" 2047 * "forbidden" 2048 * 2049 * This request must not respond until the new operator is selected 2050 * and registered 2051 * 2052 * Valid errors: 2053 * SUCCESS 2054 * RADIO_NOT_AVAILABLE 2055 * GENERIC_FAILURE 2056 * 2057 */ 2058 #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48 2059 2060 /** 2061 * RIL_REQUEST_DTMF_START 2062 * 2063 * Start playing a DTMF tone. Continue playing DTMF tone until 2064 * RIL_REQUEST_DTMF_STOP is received 2065 * 2066 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing, 2067 * it should cancel the previous tone and play the new one. 2068 * 2069 * "data" is a char * 2070 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,# 2071 * "response" is NULL 2072 * 2073 * Valid errors: 2074 * SUCCESS 2075 * RADIO_NOT_AVAILABLE 2076 * GENERIC_FAILURE 2077 * 2078 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP 2079 */ 2080 #define RIL_REQUEST_DTMF_START 49 2081 2082 /** 2083 * RIL_REQUEST_DTMF_STOP 2084 * 2085 * Stop playing a currently playing DTMF tone. 2086 * 2087 * "data" is NULL 2088 * "response" is NULL 2089 * 2090 * Valid errors: 2091 * SUCCESS 2092 * RADIO_NOT_AVAILABLE 2093 * GENERIC_FAILURE 2094 * 2095 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START 2096 */ 2097 #define RIL_REQUEST_DTMF_STOP 50 2098 2099 /** 2100 * RIL_REQUEST_BASEBAND_VERSION 2101 * 2102 * Return string value indicating baseband version, eg 2103 * response from AT+CGMR 2104 * 2105 * "data" is NULL 2106 * "response" is const char * containing version string for log reporting 2107 * 2108 * Valid errors: 2109 * SUCCESS 2110 * RADIO_NOT_AVAILABLE 2111 * GENERIC_FAILURE 2112 * 2113 */ 2114 #define RIL_REQUEST_BASEBAND_VERSION 51 2115 2116 /** 2117 * RIL_REQUEST_SEPARATE_CONNECTION 2118 * 2119 * Separate a party from a multiparty call placing the multiparty call 2120 * (less the specified party) on hold and leaving the specified party 2121 * as the only other member of the current (active) call 2122 * 2123 * Like AT+CHLD=2x 2124 * 2125 * See TS 22.084 1.3.8.2 (iii) 2126 * TS 22.030 6.5.5 "Entering "2X followed by send" 2127 * TS 27.007 "AT+CHLD=2x" 2128 * 2129 * "data" is an int * 2130 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL 2131 * 2132 * "response" is NULL 2133 * 2134 * Valid errors: 2135 * SUCCESS 2136 * RADIO_NOT_AVAILABLE (radio resetting) 2137 * GENERIC_FAILURE 2138 */ 2139 #define RIL_REQUEST_SEPARATE_CONNECTION 52 2140 2141 2142 /** 2143 * RIL_REQUEST_SET_MUTE 2144 * 2145 * Turn on or off uplink (microphone) mute. 2146 * 2147 * Will only be sent while voice call is active. 2148 * Will always be reset to "disable mute" when a new voice call is initiated 2149 * 2150 * "data" is an int * 2151 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute" 2152 * 2153 * "response" is NULL 2154 * 2155 * Valid errors: 2156 * SUCCESS 2157 * RADIO_NOT_AVAILABLE (radio resetting) 2158 * GENERIC_FAILURE 2159 */ 2160 2161 #define RIL_REQUEST_SET_MUTE 53 2162 2163 /** 2164 * RIL_REQUEST_GET_MUTE 2165 * 2166 * Queries the current state of the uplink mute setting 2167 * 2168 * "data" is NULL 2169 * "response" is an int * 2170 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled" 2171 * 2172 * Valid errors: 2173 * SUCCESS 2174 * RADIO_NOT_AVAILABLE (radio resetting) 2175 * GENERIC_FAILURE 2176 */ 2177 2178 #define RIL_REQUEST_GET_MUTE 54 2179 2180 /** 2181 * RIL_REQUEST_QUERY_CLIP 2182 * 2183 * Queries the status of the CLIP supplementary service 2184 * 2185 * (for MMI code "*#30#") 2186 * 2187 * "data" is NULL 2188 * "response" is an int * 2189 * (int *)response)[0] is 1 for "CLIP provisioned" 2190 * and 0 for "CLIP not provisioned" 2191 * and 2 for "unknown, e.g. no network etc" 2192 * 2193 * Valid errors: 2194 * SUCCESS 2195 * RADIO_NOT_AVAILABLE (radio resetting) 2196 * GENERIC_FAILURE 2197 */ 2198 2199 #define RIL_REQUEST_QUERY_CLIP 55 2200 2201 /** 2202 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status 2203 * field in RIL_Data_Call_Response_v6. 2204 * 2205 * Requests the failure cause code for the most recently failed PDP 2206 * context or CDMA data connection active 2207 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE 2208 * 2209 * "data" is NULL 2210 * 2211 * "response" is a "int *" 2212 * ((int *)response)[0] is an integer cause code defined in TS 24.008 2213 * section 6.1.3.1.3 or close approximation 2214 * 2215 * If the implementation does not have access to the exact cause codes, 2216 * then it should return one of the values listed in 2217 * RIL_DataCallFailCause, as the UI layer needs to distinguish these 2218 * cases for error notification 2219 * and potential retries. 2220 * 2221 * Valid errors: 2222 * SUCCESS 2223 * RADIO_NOT_AVAILABLE 2224 * GENERIC_FAILURE 2225 * 2226 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE 2227 * 2228 * Deprecated use the status field in RIL_Data_Call_Response_v6. 2229 */ 2230 2231 #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56 2232 2233 /** 2234 * RIL_REQUEST_DATA_CALL_LIST 2235 * 2236 * Returns the data call list. An entry is added when a 2237 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a 2238 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied 2239 * when RIL_REQUEST_RADIO_POWER off/on is issued. 2240 * 2241 * "data" is NULL 2242 * "response" is an array of RIL_Data_Call_Response_v6 2243 * 2244 * Valid errors: 2245 * SUCCESS 2246 * RADIO_NOT_AVAILABLE (radio resetting) 2247 * GENERIC_FAILURE 2248 * 2249 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED 2250 */ 2251 2252 #define RIL_REQUEST_DATA_CALL_LIST 57 2253 2254 /** 2255 * RIL_REQUEST_RESET_RADIO - DEPRECATED 2256 * 2257 * Request a radio reset. The RIL implementation may postpone 2258 * the reset until after this request is responded to if the baseband 2259 * is presently busy. 2260 * 2261 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER 2262 * 2263 * "data" is NULL 2264 * "response" is NULL 2265 * 2266 * Valid errors: 2267 * SUCCESS 2268 * RADIO_NOT_AVAILABLE (radio resetting) 2269 * GENERIC_FAILURE 2270 * REQUEST_NOT_SUPPORTED 2271 */ 2272 2273 #define RIL_REQUEST_RESET_RADIO 58 2274 2275 /** 2276 * RIL_REQUEST_OEM_HOOK_RAW 2277 * 2278 * This request reserved for OEM-specific uses. It passes raw byte arrays 2279 * back and forth. 2280 * 2281 * It can be invoked on the Java side from 2282 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw() 2283 * 2284 * "data" is a char * of bytes copied from the byte[] data argument in java 2285 * "response" is a char * of bytes that will returned via the 2286 * caller's "response" Message here: 2287 * (byte[])(((AsyncResult)response.obj).result) 2288 * 2289 * An error response here will result in 2290 * (((AsyncResult)response.obj).result) == null and 2291 * (((AsyncResult)response.obj).exception) being an instance of 2292 * com.android.internal.telephony.gsm.CommandException 2293 * 2294 * Valid errors: 2295 * All 2296 */ 2297 2298 #define RIL_REQUEST_OEM_HOOK_RAW 59 2299 2300 /** 2301 * RIL_REQUEST_OEM_HOOK_STRINGS 2302 * 2303 * This request reserved for OEM-specific uses. It passes strings 2304 * back and forth. 2305 * 2306 * It can be invoked on the Java side from 2307 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings() 2308 * 2309 * "data" is a const char **, representing an array of null-terminated UTF-8 2310 * strings copied from the "String[] strings" argument to 2311 * invokeOemRilRequestStrings() 2312 * 2313 * "response" is a const char **, representing an array of null-terminated UTF-8 2314 * stings that will be returned via the caller's response message here: 2315 * 2316 * (String[])(((AsyncResult)response.obj).result) 2317 * 2318 * An error response here will result in 2319 * (((AsyncResult)response.obj).result) == null and 2320 * (((AsyncResult)response.obj).exception) being an instance of 2321 * com.android.internal.telephony.gsm.CommandException 2322 * 2323 * Valid errors: 2324 * All 2325 */ 2326 2327 #define RIL_REQUEST_OEM_HOOK_STRINGS 60 2328 2329 /** 2330 * RIL_REQUEST_SCREEN_STATE 2331 * 2332 * Indicates the current state of the screen. When the screen is off, the 2333 * RIL should notify the baseband to suppress certain notifications (eg, 2334 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude) 2335 * in an effort to conserve power. These notifications should resume when the 2336 * screen is on. 2337 * 2338 * "data" is int * 2339 * ((int *)data)[0] is == 1 for "Screen On" 2340 * ((int *)data)[0] is == 0 for "Screen Off" 2341 * 2342 * "response" is NULL 2343 * 2344 * Valid errors: 2345 * SUCCESS 2346 * GENERIC_FAILURE 2347 */ 2348 #define RIL_REQUEST_SCREEN_STATE 61 2349 2350 2351 /** 2352 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 2353 * 2354 * Enables/disables supplementary service related notifications 2355 * from the network. 2356 * 2357 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION. 2358 * 2359 * "data" is int * 2360 * ((int *)data)[0] is == 1 for notifications enabled 2361 * ((int *)data)[0] is == 0 for notifications disabled 2362 * 2363 * "response" is NULL 2364 * 2365 * Valid errors: 2366 * SUCCESS 2367 * RADIO_NOT_AVAILABLE 2368 * GENERIC_FAILURE 2369 * 2370 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION. 2371 */ 2372 #define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62 2373 2374 /** 2375 * RIL_REQUEST_WRITE_SMS_TO_SIM 2376 * 2377 * Stores a SMS message to SIM memory. 2378 * 2379 * "data" is RIL_SMS_WriteArgs * 2380 * 2381 * "response" is int * 2382 * ((const int *)response)[0] is the record index where the message is stored. 2383 * 2384 * Valid errors: 2385 * SUCCESS 2386 * GENERIC_FAILURE 2387 * 2388 */ 2389 #define RIL_REQUEST_WRITE_SMS_TO_SIM 63 2390 2391 /** 2392 * RIL_REQUEST_DELETE_SMS_ON_SIM 2393 * 2394 * Deletes a SMS message from SIM memory. 2395 * 2396 * "data" is int * 2397 * ((int *)data)[0] is the record index of the message to delete. 2398 * 2399 * "response" is NULL 2400 * 2401 * Valid errors: 2402 * SUCCESS 2403 * GENERIC_FAILURE 2404 * 2405 */ 2406 #define RIL_REQUEST_DELETE_SMS_ON_SIM 64 2407 2408 /** 2409 * RIL_REQUEST_SET_BAND_MODE 2410 * 2411 * Assign a specified band for RF configuration. 2412 * 2413 * "data" is int * 2414 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically) 2415 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000) 2416 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900) 2417 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000) 2418 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000) 2419 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850) 2420 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)" 2421 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)" 2422 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)" 2423 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)" 2424 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)" 2425 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)" 2426 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)" 2427 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)" 2428 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)" 2429 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)" 2430 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)" 2431 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)" 2432 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)" 2433 * 2434 * "response" is NULL 2435 * 2436 * Valid errors: 2437 * SUCCESS 2438 * RADIO_NOT_AVAILABLE 2439 * GENERIC_FAILURE 2440 */ 2441 #define RIL_REQUEST_SET_BAND_MODE 65 2442 2443 /** 2444 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 2445 * 2446 * Query the list of band mode supported by RF. 2447 * 2448 * "data" is NULL 2449 * 2450 * "response" is int * 2451 * "response" points to an array of int's, the int[0] is the size of array, reset is one for 2452 * each available band mode. 2453 * 2454 * 0 for "unspecified" (selected by baseband automatically) 2455 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000) 2456 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900) 2457 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000) 2458 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000) 2459 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850) 2460 * 6 for "Cellular (800-MHz Band)" 2461 * 7 for "PCS (1900-MHz Band)" 2462 * 8 for "Band Class 3 (JTACS Band)" 2463 * 9 for "Band Class 4 (Korean PCS Band)" 2464 * 10 for "Band Class 5 (450-MHz Band)" 2465 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)" 2466 * 12 for "Band Class 7 (Upper 700-MHz Band)" 2467 * 13 for "Band Class 8 (1800-MHz Band)" 2468 * 14 for "Band Class 9 (900-MHz Band)" 2469 * 15 for "Band Class 10 (Secondary 800-MHz Band)" 2470 * 16 for "Band Class 11 (400-MHz European PAMR Band)" 2471 * 17 for "Band Class 15 (AWS Band)" 2472 * 18 for "Band Class 16 (US 2.5-GHz Band)" 2473 * 2474 * Valid errors: 2475 * SUCCESS 2476 * RADIO_NOT_AVAILABLE 2477 * GENERIC_FAILURE 2478 * 2479 * See also: RIL_REQUEST_SET_BAND_MODE 2480 */ 2481 #define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66 2482 2483 /** 2484 * RIL_REQUEST_STK_GET_PROFILE 2485 * 2486 * Requests the profile of SIM tool kit. 2487 * The profile indicates the SAT/USAT features supported by ME. 2488 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111 2489 * 2490 * "data" is NULL 2491 * 2492 * "response" is a const char * containing SAT/USAT profile 2493 * in hexadecimal format string starting with first byte of terminal profile 2494 * 2495 * Valid errors: 2496 * RIL_E_SUCCESS 2497 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 2498 * RIL_E_GENERIC_FAILURE 2499 */ 2500 #define RIL_REQUEST_STK_GET_PROFILE 67 2501 2502 /** 2503 * RIL_REQUEST_STK_SET_PROFILE 2504 * 2505 * Download the STK terminal profile as part of SIM initialization 2506 * procedure 2507 * 2508 * "data" is a const char * containing SAT/USAT profile 2509 * in hexadecimal format string starting with first byte of terminal profile 2510 * 2511 * "response" is NULL 2512 * 2513 * Valid errors: 2514 * RIL_E_SUCCESS 2515 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 2516 * RIL_E_GENERIC_FAILURE 2517 */ 2518 #define RIL_REQUEST_STK_SET_PROFILE 68 2519 2520 /** 2521 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 2522 * 2523 * Requests to send a SAT/USAT envelope command to SIM. 2524 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111 2525 * 2526 * "data" is a const char * containing SAT/USAT command 2527 * in hexadecimal format string starting with command tag 2528 * 2529 * "response" is a const char * containing SAT/USAT response 2530 * in hexadecimal format string starting with first byte of response 2531 * (May be NULL) 2532 * 2533 * Valid errors: 2534 * RIL_E_SUCCESS 2535 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 2536 * RIL_E_GENERIC_FAILURE 2537 */ 2538 #define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69 2539 2540 /** 2541 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 2542 * 2543 * Requests to send a terminal response to SIM for a received 2544 * proactive command 2545 * 2546 * "data" is a const char * containing SAT/USAT response 2547 * in hexadecimal format string starting with first byte of response data 2548 * 2549 * "response" is NULL 2550 * 2551 * Valid errors: 2552 * RIL_E_SUCCESS 2553 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 2554 * RIL_E_GENERIC_FAILURE 2555 */ 2556 #define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70 2557 2558 /** 2559 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 2560 * 2561 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has 2562 * been initialized by ME already. (We could see the call has been in the 'call 2563 * list') So, STK application needs to accept/reject the call according as user 2564 * operations. 2565 * 2566 * "data" is int * 2567 * ((int *)data)[0] is > 0 for "accept" the call setup 2568 * ((int *)data)[0] is == 0 for "reject" the call setup 2569 * 2570 * "response" is NULL 2571 * 2572 * Valid errors: 2573 * RIL_E_SUCCESS 2574 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 2575 * RIL_E_GENERIC_FAILURE 2576 */ 2577 #define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71 2578 2579 /** 2580 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER 2581 * 2582 * Connects the two calls and disconnects the subscriber from both calls. 2583 * 2584 * "data" is NULL 2585 * "response" is NULL 2586 * 2587 * Valid errors: 2588 * SUCCESS 2589 * RADIO_NOT_AVAILABLE (radio resetting) 2590 * GENERIC_FAILURE 2591 */ 2592 #define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72 2593 2594 /** 2595 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 2596 * 2597 * Requests to set the preferred network type for searching and registering 2598 * (CS/PS domain, RAT, and operation mode) 2599 * 2600 * "data" is int * which is RIL_PreferredNetworkType 2601 * 2602 * "response" is NULL 2603 * 2604 * Valid errors: 2605 * SUCCESS 2606 * RADIO_NOT_AVAILABLE (radio resetting) 2607 * GENERIC_FAILURE 2608 * MODE_NOT_SUPPORTED 2609 */ 2610 #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73 2611 2612 /** 2613 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 2614 * 2615 * Query the preferred network type (CS/PS domain, RAT, and operation mode) 2616 * for searching and registering 2617 * 2618 * "data" is NULL 2619 * 2620 * "response" is int * 2621 * ((int *)reponse)[0] is == RIL_PreferredNetworkType 2622 * 2623 * Valid errors: 2624 * SUCCESS 2625 * RADIO_NOT_AVAILABLE 2626 * GENERIC_FAILURE 2627 * 2628 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 2629 */ 2630 #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74 2631 2632 /** 2633 * RIL_REQUEST_NEIGHBORING_CELL_IDS 2634 * 2635 * Request neighboring cell id in GSM network 2636 * 2637 * "data" is NULL 2638 * "response" must be a " const RIL_NeighboringCell** " 2639 * 2640 * Valid errors: 2641 * SUCCESS 2642 * RADIO_NOT_AVAILABLE 2643 * GENERIC_FAILURE 2644 */ 2645 #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75 2646 2647 /** 2648 * RIL_REQUEST_SET_LOCATION_UPDATES 2649 * 2650 * Enables/disables network state change notifications due to changes in 2651 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA). 2652 * Basically +CREG=2 vs. +CREG=1 (TS 27.007). 2653 * 2654 * Note: The RIL implementation should default to "updates enabled" 2655 * when the screen is on and "updates disabled" when the screen is off. 2656 * 2657 * "data" is int * 2658 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2) 2659 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1) 2660 * 2661 * "response" is NULL 2662 * 2663 * Valid errors: 2664 * SUCCESS 2665 * RADIO_NOT_AVAILABLE 2666 * GENERIC_FAILURE 2667 * 2668 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 2669 */ 2670 #define RIL_REQUEST_SET_LOCATION_UPDATES 76 2671 2672 /** 2673 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 2674 * 2675 * Request to set the location where the CDMA subscription shall 2676 * be retrieved 2677 * 2678 * "data" is int * 2679 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource 2680 * 2681 * "response" is NULL 2682 * 2683 * Valid errors: 2684 * SUCCESS 2685 * RADIO_NOT_AVAILABLE 2686 * GENERIC_FAILURE 2687 * SIM_ABSENT 2688 * SUBSCRIPTION_NOT_AVAILABLE 2689 * 2690 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 2691 */ 2692 #define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77 2693 2694 /** 2695 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 2696 * 2697 * Request to set the roaming preferences in CDMA 2698 * 2699 * "data" is int * 2700 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL 2701 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL 2702 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL 2703 * 2704 * "response" is NULL 2705 * 2706 * Valid errors: 2707 * SUCCESS 2708 * RADIO_NOT_AVAILABLE 2709 * GENERIC_FAILURE 2710 */ 2711 #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78 2712 2713 /** 2714 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 2715 * 2716 * Request the actual setting of the roaming preferences in CDMA in the modem 2717 * 2718 * "data" is NULL 2719 * 2720 * "response" is int * 2721 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL 2722 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL 2723 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL 2724 * 2725 * "response" is NULL 2726 * 2727 * Valid errors: 2728 * SUCCESS 2729 * RADIO_NOT_AVAILABLE 2730 * GENERIC_FAILURE 2731 */ 2732 #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79 2733 2734 /** 2735 * RIL_REQUEST_SET_TTY_MODE 2736 * 2737 * Request to set the TTY mode 2738 * 2739 * "data" is int * 2740 * ((int *)data)[0] is == 0 for TTY off 2741 * ((int *)data)[0] is == 1 for TTY Full 2742 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover) 2743 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover) 2744 * 2745 * "response" is NULL 2746 * 2747 * Valid errors: 2748 * SUCCESS 2749 * RADIO_NOT_AVAILABLE 2750 * GENERIC_FAILURE 2751 */ 2752 #define RIL_REQUEST_SET_TTY_MODE 80 2753 2754 /** 2755 * RIL_REQUEST_QUERY_TTY_MODE 2756 * 2757 * Request the setting of TTY mode 2758 * 2759 * "data" is NULL 2760 * 2761 * "response" is int * 2762 * ((int *)response)[0] is == 0 for TTY off 2763 * ((int *)response)[0] is == 1 for TTY Full 2764 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover) 2765 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover) 2766 * 2767 * "response" is NULL 2768 * 2769 * Valid errors: 2770 * SUCCESS 2771 * RADIO_NOT_AVAILABLE 2772 * GENERIC_FAILURE 2773 */ 2774 #define RIL_REQUEST_QUERY_TTY_MODE 81 2775 2776 /** 2777 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 2778 * 2779 * Request to set the preferred voice privacy mode used in voice 2780 * scrambling 2781 * 2782 * "data" is int * 2783 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) 2784 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) 2785 * 2786 * "response" is NULL 2787 * 2788 * Valid errors: 2789 * SUCCESS 2790 * RADIO_NOT_AVAILABLE 2791 * GENERIC_FAILURE 2792 */ 2793 #define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82 2794 2795 /** 2796 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 2797 * 2798 * Request the setting of preferred voice privacy mode 2799 * 2800 * "data" is NULL 2801 * 2802 * "response" is int * 2803 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) 2804 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) 2805 * 2806 * "response" is NULL 2807 * 2808 * Valid errors: 2809 * SUCCESS 2810 * RADIO_NOT_AVAILABLE 2811 * GENERIC_FAILURE 2812 */ 2813 #define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83 2814 2815 /** 2816 * RIL_REQUEST_CDMA_FLASH 2817 * 2818 * Send FLASH 2819 * 2820 * "data" is const char * 2821 * ((const char *)data)[0] is a FLASH string 2822 * 2823 * "response" is NULL 2824 * 2825 * Valid errors: 2826 * SUCCESS 2827 * RADIO_NOT_AVAILABLE 2828 * GENERIC_FAILURE 2829 * 2830 */ 2831 #define RIL_REQUEST_CDMA_FLASH 84 2832 2833 /** 2834 * RIL_REQUEST_CDMA_BURST_DTMF 2835 * 2836 * Send DTMF string 2837 * 2838 * "data" is const char ** 2839 * ((const char **)data)[0] is a DTMF string 2840 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use 2841 * default 2842 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use 2843 * default 2844 * 2845 * "response" is NULL 2846 * 2847 * Valid errors: 2848 * SUCCESS 2849 * RADIO_NOT_AVAILABLE 2850 * GENERIC_FAILURE 2851 * 2852 */ 2853 #define RIL_REQUEST_CDMA_BURST_DTMF 85 2854 2855 /** 2856 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 2857 * 2858 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum). 2859 * If the checksum is valid the 20 digit AKEY is written to NV, 2860 * replacing the existing AKEY no matter what it was before. 2861 * 2862 * "data" is const char * 2863 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9') 2864 * where the last 6 digits are a checksum of the 2865 * first 20, as specified in TR45.AHAG 2866 * "Common Cryptographic Algorithms, Revision D.1 2867 * Section 2.2" 2868 * 2869 * "response" is NULL 2870 * 2871 * Valid errors: 2872 * SUCCESS 2873 * RADIO_NOT_AVAILABLE 2874 * GENERIC_FAILURE 2875 * 2876 */ 2877 #define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86 2878 2879 /** 2880 * RIL_REQUEST_CDMA_SEND_SMS 2881 * 2882 * Send a CDMA SMS message 2883 * 2884 * "data" is const RIL_CDMA_SMS_Message * 2885 * 2886 * "response" is a const RIL_SMS_Response * 2887 * 2888 * Based on the return error, caller decides to resend if sending sms 2889 * fails. The CDMA error class is derived as follows, 2890 * SUCCESS is error class 0 (no error) 2891 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure) 2892 * and GENERIC_FAILURE is error class 3 (permanent and no retry) 2893 * 2894 * Valid errors: 2895 * SUCCESS 2896 * RADIO_NOT_AVAILABLE 2897 * SMS_SEND_FAIL_RETRY 2898 * GENERIC_FAILURE 2899 * 2900 */ 2901 #define RIL_REQUEST_CDMA_SEND_SMS 87 2902 2903 /** 2904 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 2905 * 2906 * Acknowledge the success or failure in the receipt of SMS 2907 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 2908 * 2909 * "data" is const RIL_CDMA_SMS_Ack * 2910 * 2911 * "response" is NULL 2912 * 2913 * Valid errors: 2914 * SUCCESS 2915 * RADIO_NOT_AVAILABLE 2916 * GENERIC_FAILURE 2917 * 2918 */ 2919 #define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88 2920 2921 /** 2922 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 2923 * 2924 * Request the setting of GSM/WCDMA Cell Broadcast SMS config. 2925 * 2926 * "data" is NULL 2927 * 2928 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo ** 2929 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *) 2930 * 2931 * Valid errors: 2932 * SUCCESS 2933 * RADIO_NOT_AVAILABLE 2934 * GENERIC_FAILURE 2935 * 2936 */ 2937 #define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89 2938 2939 /** 2940 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 2941 * 2942 * Set GSM/WCDMA Cell Broadcast SMS config 2943 * 2944 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo ** 2945 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *) 2946 * 2947 * "response" is NULL 2948 * 2949 * Valid errors: 2950 * SUCCESS 2951 * RADIO_NOT_AVAILABLE 2952 * GENERIC_FAILURE 2953 * 2954 */ 2955 #define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90 2956 2957 /** 2958 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 2959 * 2960 * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS 2961 * 2962 * "data" is const int * 2963 * (const int *)data[0] indicates to activate or turn off the 2964 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1, 2965 * 0 - Activate, 1 - Turn off 2966 * 2967 * "response" is NULL 2968 * 2969 * Valid errors: 2970 * SUCCESS 2971 * RADIO_NOT_AVAILABLE 2972 * GENERIC_FAILURE 2973 * 2974 */ 2975 #define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91 2976 2977 /** 2978 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 2979 * 2980 * Request the setting of CDMA Broadcast SMS config 2981 * 2982 * "data" is NULL 2983 * 2984 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo ** 2985 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *) 2986 * 2987 * Valid errors: 2988 * SUCCESS 2989 * RADIO_NOT_AVAILABLE 2990 * GENERIC_FAILURE 2991 * 2992 */ 2993 #define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92 2994 2995 /** 2996 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 2997 * 2998 * Set CDMA Broadcast SMS config 2999 * 3000 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo ** 3001 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *) 3002 * 3003 * "response" is NULL 3004 * 3005 * Valid errors: 3006 * SUCCESS 3007 * RADIO_NOT_AVAILABLE 3008 * GENERIC_FAILURE 3009 * 3010 */ 3011 #define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93 3012 3013 /** 3014 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 3015 * 3016 * Enable or disable the reception of CDMA Broadcast SMS 3017 * 3018 * "data" is const int * 3019 * (const int *)data[0] indicates to activate or turn off the 3020 * reception of CDMA Broadcast SMS, 0-1, 3021 * 0 - Activate, 1 - Turn off 3022 * 3023 * "response" is NULL 3024 * 3025 * Valid errors: 3026 * SUCCESS 3027 * RADIO_NOT_AVAILABLE 3028 * GENERIC_FAILURE 3029 * 3030 */ 3031 #define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94 3032 3033 /** 3034 * RIL_REQUEST_CDMA_SUBSCRIPTION 3035 * 3036 * Request the device MDN / H_SID / H_NID. 3037 * 3038 * The request is only allowed when CDMA subscription is available. When CDMA 3039 * subscription is changed, application layer should re-issue the request to 3040 * update the subscription information. 3041 * 3042 * If a NULL value is returned for any of the device id, it means that error 3043 * accessing the device. 3044 * 3045 * "response" is const char ** 3046 * ((const char **)response)[0] is MDN if CDMA subscription is available 3047 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if 3048 * CDMA subscription is available, in decimal format 3049 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if 3050 * CDMA subscription is available, in decimal format 3051 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available 3052 * ((const char **)response)[4] is PRL version if CDMA subscription is available 3053 * 3054 * Valid errors: 3055 * SUCCESS 3056 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE 3057 */ 3058 3059 #define RIL_REQUEST_CDMA_SUBSCRIPTION 95 3060 3061 /** 3062 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 3063 * 3064 * Stores a CDMA SMS message to RUIM memory. 3065 * 3066 * "data" is RIL_CDMA_SMS_WriteArgs * 3067 * 3068 * "response" is int * 3069 * ((const int *)response)[0] is the record index where the message is stored. 3070 * 3071 * Valid errors: 3072 * SUCCESS 3073 * RADIO_NOT_AVAILABLE 3074 * GENERIC_FAILURE 3075 * 3076 */ 3077 #define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96 3078 3079 /** 3080 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 3081 * 3082 * Deletes a CDMA SMS message from RUIM memory. 3083 * 3084 * "data" is int * 3085 * ((int *)data)[0] is the record index of the message to delete. 3086 * 3087 * "response" is NULL 3088 * 3089 * Valid errors: 3090 * SUCCESS 3091 * RADIO_NOT_AVAILABLE 3092 * GENERIC_FAILURE 3093 * 3094 */ 3095 #define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97 3096 3097 /** 3098 * RIL_REQUEST_DEVICE_IDENTITY 3099 * 3100 * Request the device ESN / MEID / IMEI / IMEISV. 3101 * 3102 * The request is always allowed and contains GSM and CDMA device identity; 3103 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and 3104 * RIL_REQUEST_GET_IMEISV. 3105 * 3106 * If a NULL value is returned for any of the device id, it means that error 3107 * accessing the device. 3108 * 3109 * When CDMA subscription is changed the ESN/MEID may change. The application 3110 * layer should re-issue the request to update the device identity in this case. 3111 * 3112 * "response" is const char ** 3113 * ((const char **)response)[0] is IMEI if GSM subscription is available 3114 * ((const char **)response)[1] is IMEISV if GSM subscription is available 3115 * ((const char **)response)[2] is ESN if CDMA subscription is available 3116 * ((const char **)response)[3] is MEID if CDMA subscription is available 3117 * 3118 * Valid errors: 3119 * SUCCESS 3120 * RADIO_NOT_AVAILABLE 3121 * GENERIC_FAILURE 3122 */ 3123 #define RIL_REQUEST_DEVICE_IDENTITY 98 3124 3125 /** 3126 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 3127 * 3128 * Request the radio's system selection module to exit emergency 3129 * callback mode. RIL will not respond with SUCCESS until the modem has 3130 * completely exited from Emergency Callback Mode. 3131 * 3132 * "data" is NULL 3133 * 3134 * "response" is NULL 3135 * 3136 * Valid errors: 3137 * SUCCESS 3138 * RADIO_NOT_AVAILABLE 3139 * GENERIC_FAILURE 3140 * 3141 */ 3142 #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99 3143 3144 /** 3145 * RIL_REQUEST_GET_SMSC_ADDRESS 3146 * 3147 * Queries the default Short Message Service Center address on the device. 3148 * 3149 * "data" is NULL 3150 * 3151 * "response" is const char * containing the SMSC address. 3152 * 3153 * Valid errors: 3154 * SUCCESS 3155 * RADIO_NOT_AVAILABLE 3156 * GENERIC_FAILURE 3157 * 3158 */ 3159 #define RIL_REQUEST_GET_SMSC_ADDRESS 100 3160 3161 /** 3162 * RIL_REQUEST_SET_SMSC_ADDRESS 3163 * 3164 * Sets the default Short Message Service Center address on the device. 3165 * 3166 * "data" is const char * containing the SMSC address. 3167 * 3168 * "response" is NULL 3169 * 3170 * Valid errors: 3171 * SUCCESS 3172 * RADIO_NOT_AVAILABLE 3173 * GENERIC_FAILURE 3174 * 3175 */ 3176 #define RIL_REQUEST_SET_SMSC_ADDRESS 101 3177 3178 /** 3179 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 3180 * 3181 * Indicates whether there is storage available for new SMS messages. 3182 * 3183 * "data" is int * 3184 * ((int *)data)[0] is 1 if memory is available for storing new messages 3185 * is 0 if memory capacity is exceeded 3186 * 3187 * "response" is NULL 3188 * 3189 * Valid errors: 3190 * SUCCESS 3191 * RADIO_NOT_AVAILABLE 3192 * GENERIC_FAILURE 3193 * 3194 */ 3195 #define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102 3196 3197 /** 3198 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 3199 * 3200 * Indicates that the StkSerivce is running and is 3201 * ready to receive RIL_UNSOL_STK_XXXXX commands. 3202 * 3203 * "data" is NULL 3204 * "response" is NULL 3205 * 3206 * Valid errors: 3207 * SUCCESS 3208 * RADIO_NOT_AVAILABLE 3209 * GENERIC_FAILURE 3210 * 3211 */ 3212 #define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103 3213 3214 /** 3215 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 3216 * 3217 * Request to query the location where the CDMA subscription shall 3218 * be retrieved 3219 * 3220 * "data" is NULL 3221 * 3222 * "response" is int * 3223 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource 3224 * 3225 * Valid errors: 3226 * SUCCESS 3227 * RADIO_NOT_AVAILABLE 3228 * GENERIC_FAILURE 3229 * SUBSCRIPTION_NOT_AVAILABLE 3230 * 3231 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 3232 */ 3233 #define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104 3234 3235 /** 3236 * RIL_REQUEST_ISIM_AUTHENTICATION 3237 * 3238 * Request the ISIM application on the UICC to perform AKA 3239 * challenge/response algorithm for IMS authentication 3240 * 3241 * "data" is a const char * containing the challenge string in Base64 format 3242 * "response" is a const char * containing the response in Base64 format 3243 * 3244 * Valid errors: 3245 * SUCCESS 3246 * RADIO_NOT_AVAILABLE 3247 * GENERIC_FAILURE 3248 */ 3249 #define RIL_REQUEST_ISIM_AUTHENTICATION 105 3250 3251 /** 3252 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 3253 * 3254 * Acknowledge successful or failed receipt of SMS previously indicated 3255 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send 3256 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU. 3257 * 3258 * "data" is const char ** 3259 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK) 3260 * is "0" on failed receipt (send RP-ERROR) 3261 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format 3262 * 3263 * "response" is NULL 3264 * 3265 * Valid errors: 3266 * SUCCESS 3267 * RADIO_NOT_AVAILABLE 3268 * GENERIC_FAILURE 3269 */ 3270 #define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106 3271 3272 /** 3273 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 3274 * 3275 * Requests to send a SAT/USAT envelope command to SIM. 3276 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111. 3277 * 3278 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND: 3279 * the SW1 and SW2 status bytes from the UICC response are returned along with 3280 * the response data, using the same structure as RIL_REQUEST_SIM_IO. 3281 * 3282 * The RIL implementation shall perform the normal processing of a '91XX' 3283 * response in SW1/SW2 to retrieve the pending proactive command and send it 3284 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does. 3285 * 3286 * "data" is a const char * containing the SAT/USAT command 3287 * in hexadecimal format starting with command tag 3288 * 3289 * "response" is a const RIL_SIM_IO_Response * 3290 * 3291 * Valid errors: 3292 * RIL_E_SUCCESS 3293 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 3294 * RIL_E_GENERIC_FAILURE 3295 */ 3296 #define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107 3297 3298 /** 3299 * RIL_REQUEST_VOICE_RADIO_TECH 3300 * 3301 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only 3302 * when radio state is RADIO_STATE_ON 3303 * 3304 * "data" is NULL 3305 * "response" is int * 3306 * ((int *) response)[0] is of type const RIL_RadioTechnology 3307 * 3308 * Valid errors: 3309 * SUCCESS 3310 * RADIO_NOT_AVAILABLE 3311 * GENERIC_FAILURE 3312 */ 3313 #define RIL_REQUEST_VOICE_RADIO_TECH 108 3314 3315 3316 /***********************************************************************/ 3317 3318 3319 #define RIL_UNSOL_RESPONSE_BASE 1000 3320 3321 /** 3322 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 3323 * 3324 * Indicate when value of RIL_RadioState has changed. 3325 * 3326 * Callee will invoke RIL_RadioStateRequest method on main thread 3327 * 3328 * "data" is NULL 3329 */ 3330 3331 #define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000 3332 3333 3334 /** 3335 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 3336 * 3337 * Indicate when call state has changed 3338 * 3339 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread 3340 * 3341 * "data" is NULL 3342 * 3343 * Response should be invoked on, for example, 3344 * "RING", "BUSY", "NO CARRIER", and also call state 3345 * transitions (DIALING->ALERTING ALERTING->ACTIVE) 3346 * 3347 * Redundent or extraneous invocations are tolerated 3348 */ 3349 #define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001 3350 3351 3352 /** 3353 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 3354 * 3355 * Called when the voice network state changed 3356 * 3357 * Callee will invoke the following requests on main thread: 3358 * 3359 * RIL_REQUEST_VOICE_REGISTRATION_STATE 3360 * RIL_REQUEST_OPERATOR 3361 * 3362 * "data" is NULL 3363 * 3364 * FIXME should this happen when SIM records are loaded? (eg, for 3365 * EONS) 3366 */ 3367 #define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002 3368 3369 /** 3370 * RIL_UNSOL_RESPONSE_NEW_SMS 3371 * 3372 * Called when new SMS is received. 3373 * 3374 * "data" is const char * 3375 * This is a pointer to a string containing the PDU of an SMS-DELIVER 3376 * as an ascii string of hex digits. The PDU starts with the SMSC address 3377 * per TS 27.005 (+CMT:) 3378 * 3379 * Callee will subsequently confirm the receipt of thei SMS with a 3380 * RIL_REQUEST_SMS_ACKNOWLEDGE 3381 * 3382 * No new RIL_UNSOL_RESPONSE_NEW_SMS 3383 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a 3384 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received 3385 */ 3386 3387 #define RIL_UNSOL_RESPONSE_NEW_SMS 1003 3388 3389 /** 3390 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 3391 * 3392 * Called when new SMS Status Report is received. 3393 * 3394 * "data" is const char * 3395 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT 3396 * as an ascii string of hex digits. The PDU starts with the SMSC address 3397 * per TS 27.005 (+CDS:). 3398 * 3399 * Callee will subsequently confirm the receipt of the SMS with a 3400 * RIL_REQUEST_SMS_ACKNOWLEDGE 3401 * 3402 * No new RIL_UNSOL_RESPONSE_NEW_SMS 3403 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a 3404 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received 3405 */ 3406 3407 #define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004 3408 3409 /** 3410 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 3411 * 3412 * Called when new SMS has been stored on SIM card 3413 * 3414 * "data" is const int * 3415 * ((const int *)data)[0] contains the slot index on the SIM that contains 3416 * the new message 3417 */ 3418 3419 #define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005 3420 3421 /** 3422 * RIL_UNSOL_ON_USSD 3423 * 3424 * Called when a new USSD message is received. 3425 * 3426 * "data" is const char ** 3427 * ((const char **)data)[0] points to a type code, which is 3428 * one of these string values: 3429 * "0" USSD-Notify -- text in ((const char **)data)[1] 3430 * "1" USSD-Request -- text in ((const char **)data)[1] 3431 * "2" Session terminated by network 3432 * "3" other local client (eg, SIM Toolkit) has responded 3433 * "4" Operation not supported 3434 * "5" Network timeout 3435 * 3436 * The USSD session is assumed to persist if the type code is "1", otherwise 3437 * the current session (if any) is assumed to have terminated. 3438 * 3439 * ((const char **)data)[1] points to a message string if applicable, which 3440 * should always be in UTF-8. 3441 */ 3442 #define RIL_UNSOL_ON_USSD 1006 3443 /* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */ 3444 3445 /** 3446 * RIL_UNSOL_ON_USSD_REQUEST 3447 * 3448 * Obsolete. Send via RIL_UNSOL_ON_USSD 3449 */ 3450 #define RIL_UNSOL_ON_USSD_REQUEST 1007 3451 3452 3453 /** 3454 * RIL_UNSOL_NITZ_TIME_RECEIVED 3455 * 3456 * Called when radio has received a NITZ time message 3457 * 3458 * "data" is const char * pointing to NITZ time string 3459 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt" 3460 */ 3461 #define RIL_UNSOL_NITZ_TIME_RECEIVED 1008 3462 3463 /** 3464 * RIL_UNSOL_SIGNAL_STRENGTH 3465 * 3466 * Radio may report signal strength rather han have it polled. 3467 * 3468 * "data" is a const RIL_SignalStrength * 3469 */ 3470 #define RIL_UNSOL_SIGNAL_STRENGTH 1009 3471 3472 3473 /** 3474 * RIL_UNSOL_DATA_CALL_LIST_CHANGED 3475 * 3476 * "data" is an array of RIL_Data_Call_Response_v6 identical to that 3477 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list 3478 * of current data contexts including new contexts that have been 3479 * activated. A data call is only removed from this list when the 3480 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio 3481 * is powered off/on. 3482 * 3483 * See also: RIL_REQUEST_DATA_CALL_LIST 3484 */ 3485 3486 #define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010 3487 3488 /** 3489 * RIL_UNSOL_SUPP_SVC_NOTIFICATION 3490 * 3491 * Reports supplementary service related notification from the network. 3492 * 3493 * "data" is a const RIL_SuppSvcNotification * 3494 * 3495 */ 3496 3497 #define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011 3498 3499 /** 3500 * RIL_UNSOL_STK_SESSION_END 3501 * 3502 * Indicate when STK session is terminated by SIM. 3503 * 3504 * "data" is NULL 3505 */ 3506 #define RIL_UNSOL_STK_SESSION_END 1012 3507 3508 /** 3509 * RIL_UNSOL_STK_PROACTIVE_COMMAND 3510 * 3511 * Indicate when SIM issue a STK proactive command to applications 3512 * 3513 * "data" is a const char * containing SAT/USAT proactive command 3514 * in hexadecimal format string starting with command tag 3515 * 3516 */ 3517 #define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013 3518 3519 /** 3520 * RIL_UNSOL_STK_EVENT_NOTIFY 3521 * 3522 * Indicate when SIM notifies applcations some event happens. 3523 * Generally, application does not need to have any feedback to 3524 * SIM but shall be able to indicate appropriate messages to users. 3525 * 3526 * "data" is a const char * containing SAT/USAT commands or responses 3527 * sent by ME to SIM or commands handled by ME, in hexadecimal format string 3528 * starting with first byte of response data or command tag 3529 * 3530 */ 3531 #define RIL_UNSOL_STK_EVENT_NOTIFY 1014 3532 3533 /** 3534 * RIL_UNSOL_STK_CALL_SETUP 3535 * 3536 * Indicate when SIM wants application to setup a voice call. 3537 * 3538 * "data" is const int * 3539 * ((const int *)data)[0] contains timeout value (in milliseconds) 3540 */ 3541 #define RIL_UNSOL_STK_CALL_SETUP 1015 3542 3543 /** 3544 * RIL_UNSOL_SIM_SMS_STORAGE_FULL 3545 * 3546 * Indicates that SMS storage on the SIM is full. Sent when the network 3547 * attempts to deliver a new SMS message. Messages cannot be saved on the 3548 * SIM until space is freed. In particular, incoming Class 2 messages 3549 * cannot be stored. 3550 * 3551 * "data" is null 3552 * 3553 */ 3554 #define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016 3555 3556 /** 3557 * RIL_UNSOL_SIM_REFRESH 3558 * 3559 * Indicates that file(s) on the SIM have been updated, or the SIM 3560 * has been reinitialized. 3561 * 3562 * In the case where RIL is version 6 or older: 3563 * "data" is an int * 3564 * ((int *)data)[0] is a RIL_SimRefreshResult. 3565 * ((int *)data)[1] is the EFID of the updated file if the result is 3566 * SIM_FILE_UPDATE or NULL for any other result. 3567 * 3568 * In the case where RIL is version 7: 3569 * "data" is a RIL_SimRefreshResponse_v7 * 3570 * 3571 * Note: If the SIM state changes as a result of the SIM refresh (eg, 3572 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 3573 * should be sent. 3574 */ 3575 #define RIL_UNSOL_SIM_REFRESH 1017 3576 3577 /** 3578 * RIL_UNSOL_CALL_RING 3579 * 3580 * Ring indication for an incoming call (eg, RING or CRING event). 3581 * There must be at least one RIL_UNSOL_CALL_RING at the beginning 3582 * of a call and sending multiple is optional. If the system property 3583 * ro.telephony.call_ring.multiple is false then the upper layers 3584 * will generate the multiple events internally. Otherwise the vendor 3585 * ril must generate multiple RIL_UNSOL_CALL_RING if 3586 * ro.telephony.call_ring.multiple is true or if it is absent. 3587 * 3588 * The rate of these events is controlled by ro.telephony.call_ring.delay 3589 * and has a default value of 3000 (3 seconds) if absent. 3590 * 3591 * "data" is null for GSM 3592 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA 3593 */ 3594 #define RIL_UNSOL_CALL_RING 1018 3595 3596 /** 3597 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 3598 * 3599 * Indicates that SIM state changes. 3600 * 3601 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread 3602 3603 * "data" is null 3604 */ 3605 #define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019 3606 3607 /** 3608 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 3609 * 3610 * Called when new CDMA SMS is received 3611 * 3612 * "data" is const RIL_CDMA_SMS_Message * 3613 * 3614 * Callee will subsequently confirm the receipt of the SMS with 3615 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 3616 * 3617 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until 3618 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received 3619 * 3620 */ 3621 #define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020 3622 3623 /** 3624 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 3625 * 3626 * Called when new Broadcast SMS is received 3627 * 3628 * "data" can be one of the following: 3629 * If received from GSM network, "data" is const char of 88 bytes 3630 * which indicates each page of a CBS Message sent to the MS by the 3631 * BTS as coded in 3GPP 23.041 Section 9.4.1.2. 3632 * If received from UMTS network, "data" is const char of 90 up to 1252 3633 * bytes which contain between 1 and 15 CBS Message pages sent as one 3634 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2. 3635 * 3636 */ 3637 #define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021 3638 3639 /** 3640 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 3641 * 3642 * Indicates that SMS storage on the RUIM is full. Messages 3643 * cannot be saved on the RUIM until space is freed. 3644 * 3645 * "data" is null 3646 * 3647 */ 3648 #define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022 3649 3650 /** 3651 * RIL_UNSOL_RESTRICTED_STATE_CHANGED 3652 * 3653 * Indicates a restricted state change (eg, for Domain Specific Access Control). 3654 * 3655 * Radio need send this msg after radio off/on cycle no matter it is changed or not. 3656 * 3657 * "data" is an int * 3658 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values. 3659 */ 3660 #define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023 3661 3662 /** 3663 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 3664 * 3665 * Indicates that the radio system selection module has 3666 * autonomously entered emergency callback mode. 3667 * 3668 * "data" is null 3669 * 3670 */ 3671 #define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024 3672 3673 /** 3674 * RIL_UNSOL_CDMA_CALL_WAITING 3675 * 3676 * Called when CDMA radio receives a call waiting indication. 3677 * 3678 * "data" is const RIL_CDMA_CallWaiting * 3679 * 3680 */ 3681 #define RIL_UNSOL_CDMA_CALL_WAITING 1025 3682 3683 /** 3684 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 3685 * 3686 * Called when CDMA radio receives an update of the progress of an 3687 * OTASP/OTAPA call. 3688 * 3689 * "data" is const int * 3690 * For CDMA this is an integer OTASP/OTAPA status listed in 3691 * RIL_CDMA_OTA_ProvisionStatus. 3692 * 3693 */ 3694 #define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026 3695 3696 /** 3697 * RIL_UNSOL_CDMA_INFO_REC 3698 * 3699 * Called when CDMA radio receives one or more info recs. 3700 * 3701 * "data" is const RIL_CDMA_InformationRecords * 3702 * 3703 */ 3704 #define RIL_UNSOL_CDMA_INFO_REC 1027 3705 3706 /** 3707 * RIL_UNSOL_OEM_HOOK_RAW 3708 * 3709 * This is for OEM specific use. 3710 * 3711 * "data" is a byte[] 3712 */ 3713 #define RIL_UNSOL_OEM_HOOK_RAW 1028 3714 3715 /** 3716 * RIL_UNSOL_RINGBACK_TONE 3717 * 3718 * Indicates that nework doesn't have in-band information, need to 3719 * play out-band tone. 3720 * 3721 * "data" is an int * 3722 * ((int *)data)[0] == 0 for stop play ringback tone. 3723 * ((int *)data)[0] == 1 for start play ringback tone. 3724 */ 3725 #define RIL_UNSOL_RINGBACK_TONE 1029 3726 3727 /** 3728 * RIL_UNSOL_RESEND_INCALL_MUTE 3729 * 3730 * Indicates that framework/application need reset the uplink mute state. 3731 * 3732 * There may be situations where the mute state becomes out of sync 3733 * between the application and device in some GSM infrastructures. 3734 * 3735 * "data" is null 3736 */ 3737 #define RIL_UNSOL_RESEND_INCALL_MUTE 1030 3738 3739 /** 3740 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 3741 * 3742 * Called when CDMA subscription source changed. 3743 * 3744 * "data" is int * 3745 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource 3746 */ 3747 #define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031 3748 3749 /** 3750 * RIL_UNSOL_CDMA_PRL_CHANGED 3751 * 3752 * Called when PRL (preferred roaming list) changes. 3753 * 3754 * "data" is int * 3755 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION 3756 */ 3757 #define RIL_UNSOL_CDMA_PRL_CHANGED 1032 3758 3759 /** 3760 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 3761 * 3762 * Called when Emergency Callback Mode Ends 3763 * 3764 * Indicates that the radio system selection module has 3765 * proactively exited emergency callback mode. 3766 * 3767 * "data" is NULL 3768 * 3769 */ 3770 #define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033 3771 3772 /** 3773 * RIL_UNSOL_RIL_CONNECTED 3774 * 3775 * Called the ril connects and returns the version 3776 * 3777 * "data" is int * 3778 * ((int *)data)[0] is RIL_VERSION 3779 */ 3780 #define RIL_UNSOL_RIL_CONNECTED 1034 3781 3782 /** 3783 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 3784 * 3785 * Indicates that voice technology has changed. Contains new radio technology 3786 * as a data in the message. 3787 * 3788 * "data" is int * 3789 * ((int *)data)[0] is of type const RIL_RadioTechnology 3790 * 3791 */ 3792 #define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035 3793 3794 3795 /***********************************************************************/ 3796 3797 3798 /** 3799 * RIL_Request Function pointer 3800 * 3801 * @param request is one of RIL_REQUEST_* 3802 * @param data is pointer to data defined for that RIL_REQUEST_* 3803 * data is owned by caller, and should not be modified or freed by callee 3804 * @param t should be used in subsequent call to RIL_onResponse 3805 * @param datalen the length of data 3806 * 3807 */ 3808 typedef void (*RIL_RequestFunc) (int request, void *data, 3809 size_t datalen, RIL_Token t); 3810 3811 /** 3812 * This function should return the current radio state synchronously 3813 */ 3814 typedef RIL_RadioState (*RIL_RadioStateRequest)(); 3815 3816 /** 3817 * This function returns "1" if the specified RIL_REQUEST code is 3818 * supported and 0 if it is not 3819 * 3820 * @param requestCode is one of RIL_REQUEST codes 3821 */ 3822 3823 typedef int (*RIL_Supports)(int requestCode); 3824 3825 /** 3826 * This function is called from a separate thread--not the 3827 * thread that calls RIL_RequestFunc--and indicates that a pending 3828 * request should be cancelled. 3829 * 3830 * On cancel, the callee should do its best to abandon the request and 3831 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point. 3832 * 3833 * Subsequent calls to RIL_onRequestComplete for this request with 3834 * other results will be tolerated but ignored. (That is, it is valid 3835 * to ignore the cancellation request) 3836 * 3837 * RIL_Cancel calls should return immediately, and not wait for cancellation 3838 * 3839 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007 3840 * interface 3841 * 3842 * @param t token wants to be canceled 3843 */ 3844 3845 typedef void (*RIL_Cancel)(RIL_Token t); 3846 3847 typedef void (*RIL_TimedCallback) (void *param); 3848 3849 /** 3850 * Return a version string for your RIL implementation 3851 */ 3852 typedef const char * (*RIL_GetVersion) (void); 3853 3854 typedef struct { 3855 int version; /* set to RIL_VERSION */ 3856 RIL_RequestFunc onRequest; 3857 RIL_RadioStateRequest onStateRequest; 3858 RIL_Supports supports; 3859 RIL_Cancel onCancel; 3860 RIL_GetVersion getVersion; 3861 } RIL_RadioFunctions; 3862 3863 #ifdef RIL_SHLIB 3864 struct RIL_Env { 3865 /** 3866 * "t" is parameter passed in on previous call to RIL_Notification 3867 * routine. 3868 * 3869 * If "e" != SUCCESS, then response can be null/is ignored 3870 * 3871 * "response" is owned by caller, and should not be modified or 3872 * freed by callee 3873 * 3874 * RIL_onRequestComplete will return as soon as possible 3875 */ 3876 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e, 3877 void *response, size_t responselen); 3878 3879 /** 3880 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_* 3881 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_* 3882 * 3883 * "data" is owned by caller, and should not be modified or freed by callee 3884 */ 3885 3886 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, 3887 size_t datalen); 3888 3889 /** 3890 * Call user-specifed "callback" function on on the same thread that 3891 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies 3892 * a relative time value at which the callback is invoked. If relativeTime is 3893 * NULL or points to a 0-filled structure, the callback will be invoked as 3894 * soon as possible 3895 */ 3896 3897 void (*RequestTimedCallback) (RIL_TimedCallback callback, 3898 void *param, const struct timeval *relativeTime); 3899 }; 3900 3901 3902 /** 3903 * RIL implementations must defined RIL_Init 3904 * argc and argv will be command line arguments intended for the RIL implementation 3905 * Return NULL on error 3906 * 3907 * @param env is environment point defined as RIL_Env 3908 * @param argc number of arguments 3909 * @param argv list fo arguments 3910 * 3911 */ 3912 const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv); 3913 3914 #else /* RIL_SHLIB */ 3915 3916 /** 3917 * Call this once at startup to register notification routine 3918 * 3919 * @param callbacks user-specifed callback function 3920 */ 3921 void RIL_register (const RIL_RadioFunctions *callbacks); 3922 3923 3924 /** 3925 * 3926 * RIL_onRequestComplete will return as soon as possible 3927 * 3928 * @param t is parameter passed in on previous call to RIL_Notification 3929 * routine. 3930 * @param e error code 3931 * if "e" != SUCCESS, then response can be null/is ignored 3932 * @param response is owned by caller, and should not be modified or 3933 * freed by callee 3934 * @param responselen the length of response in byte 3935 */ 3936 void RIL_onRequestComplete(RIL_Token t, RIL_Errno e, 3937 void *response, size_t responselen); 3938 3939 /** 3940 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_* 3941 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_* 3942 * "data" is owned by caller, and should not be modified or freed by callee 3943 * @param datalen the length of data in byte 3944 */ 3945 3946 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, 3947 size_t datalen); 3948 3949 3950 /** 3951 * Call user-specifed "callback" function on on the same thread that 3952 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies 3953 * a relative time value at which the callback is invoked. If relativeTime is 3954 * NULL or points to a 0-filled structure, the callback will be invoked as 3955 * soon as possible 3956 * 3957 * @param callback user-specifed callback function 3958 * @param param parameter list 3959 * @param relativeTime a relative time value at which the callback is invoked 3960 */ 3961 3962 void RIL_requestTimedCallback (RIL_TimedCallback callback, 3963 void *param, const struct timeval *relativeTime); 3964 3965 3966 #endif /* RIL_SHLIB */ 3967 3968 #ifdef __cplusplus 3969 } 3970 #endif 3971 3972 #endif /*ANDROID_RIL_H*/ 3973