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