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