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