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