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