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