ril.h revision 74fa38884320698c1623764850e3131b9769dff0
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 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or 1037 * NULL if not.Valid LAC are 0x0000 - 0xffff 1038 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or 1039 * NULL if not. 1040 * Valid CID are 0x00000000 - 0xffffffff 1041 * In GSM, CID is Cell ID (see TS 27.007) 1042 * in 16 bits 1043 * In UMTS, CID is UMTS Cell Identity 1044 * (see TS 25.331) in 28 bits 1045 * ((const char **)response)[3] indicates the available radio technology 0-7, 1046 * 0 - Unknown, 1 - GPRS, 2 - EDGE, 3 - UMTS, 1047 * 4 - IS95A, 5 - IS95B, 6 - 1xRTT, 1048 * 7 - EvDo Rev. 0, 8 - EvDo Rev. A, 1049 * 9 - HSDPA, 10 - HSUPA, 11 - HSPA 1050 * ((const char **)response)[4] is Base Station ID if registered on a CDMA 1051 * system or NULL if not. Base Station ID in 1052 * decimal format 1053 * ((const char **)response)[5] is Base Station latitude if registered on a 1054 * CDMA system or NULL if not. Base Station 1055 * latitude is a decimal number as specified in 1056 * 3GPP2 C.S0005-A v6.0. It is represented in 1057 * units of 0.25 seconds and ranges from -1296000 1058 * to 1296000, both values inclusive (corresponding 1059 * to a range of -90� to +90�). 1060 * ((const char **)response)[6] is Base Station longitude if registered on a 1061 * CDMA system or NULL if not. Base Station 1062 * longitude is a decimal number as specified in 1063 * 3GPP2 C.S0005-A v6.0. It is represented in 1064 * units of 0.25 seconds and ranges from -2592000 1065 * to 2592000, both values inclusive (corresponding 1066 * to a range of -180� to +180�). 1067 * ((const char **)response)[7] is concurrent services support indicator if 1068 * registered on a CDMA system 0-1. 1069 * 0 - Concurrent services not supported, 1070 * 1 - Concurrent services supported 1071 * ((const char **)response)[8] is System ID if registered on a CDMA system or 1072 * NULL if not. Valid System ID are 0 - 32767 1073 * ((const char **)response)[9] is Network ID if registered on a CDMA system or 1074 * NULL if not. Valid System ID are 0 - 65535 1075 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered 1076 * on a CDMA or EVDO system or NULL if not. Valid values 1077 * are 0-255. 1078 * ((const char **)response)[11] indicates whether the current system is in the 1079 * PRL if registered on a CDMA or EVDO system or NULL if 1080 * not. 0=not in the PRL, 1=in the PRL 1081 * ((const char **)response)[12] is the default Roaming Indicator from the PRL, 1082 * if registered on a CDMA or EVDO system or NULL if not. 1083 * Valid values are 0-255. 1084 * ((const char **)response)[13] if registration state is 3 (Registration 1085 * denied) this is an enumerated reason why 1086 * registration was denied. See 3GPP TS 24.008, 1087 * 10.5.3.6 and Annex G. 1088 * 0 - General 1089 * 1 - Authentication Failure 1090 * 2 - IMSI unknown in HLR 1091 * 3 - Illegal MS 1092 * 4 - Illegal ME 1093 * 5 - PLMN not allowed 1094 * 6 - Location area not allowed 1095 * 7 - Roaming not allowed 1096 * 8 - No Suitable Cells in this Location Area 1097 * 9 - Network failure 1098 * 10 - Persistent location update reject 1099 * 1100 * Please note that registration state 4 ("unknown") is treated 1101 * as "out of service" in the Android telephony system 1102 * 1103 * Registration state 3 can be returned if Location Update Reject 1104 * (with cause 17 - Network Failure) is received repeatedly from the network, 1105 * to facilitate "managed roaming" 1106 * 1107 * Valid errors: 1108 * SUCCESS 1109 * RADIO_NOT_AVAILABLE 1110 * GENERIC_FAILURE 1111 */ 1112#define RIL_REQUEST_REGISTRATION_STATE 20 1113 1114/** 1115 * RIL_REQUEST_GPRS_REGISTRATION_STATE 1116 * 1117 * Request current GPRS registration state 1118 * 1119 * "data" is NULL 1120 * "response" is a "char **" 1121 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG 1122 * ((const char **)response)[1] is LAC if registered or NULL if not 1123 * ((const char **)response)[2] is CID if registered or NULL if not 1124 * ((const char **)response)[3] indicates the available radio technology, where: 1125 * 0 == unknown 1126 * 1 == GPRS only 1127 * 2 == EDGE 1128 * 3 == UMTS 1129 * 9 == HSDPA 1130 * 10 == HSUPA 1131 * 11 == HSPA 1132 * 1133 * LAC and CID are in hexadecimal format. 1134 * valid LAC are 0x0000 - 0xffff 1135 * valid CID are 0x00000000 - 0x0fffffff 1136 * 1137 * Please note that registration state 4 ("unknown") is treated 1138 * as "out of service" in the Android telephony system 1139 * 1140 * Valid errors: 1141 * SUCCESS 1142 * RADIO_NOT_AVAILABLE 1143 * GENERIC_FAILURE 1144 */ 1145#define RIL_REQUEST_GPRS_REGISTRATION_STATE 21 1146 1147/** 1148 * RIL_REQUEST_OPERATOR 1149 * 1150 * Request current operator ONS or EONS 1151 * 1152 * "data" is NULL 1153 * "response" is a "const char **" 1154 * ((const char **)response)[0] is long alpha ONS or EONS 1155 * or NULL if unregistered 1156 * 1157 * ((const char **)response)[1] is short alpha ONS or EONS 1158 * or NULL if unregistered 1159 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC) 1160 * or NULL if unregistered 1161 * 1162 * Valid errors: 1163 * SUCCESS 1164 * RADIO_NOT_AVAILABLE 1165 * GENERIC_FAILURE 1166 */ 1167#define RIL_REQUEST_OPERATOR 22 1168 1169/** 1170 * RIL_REQUEST_RADIO_POWER 1171 * 1172 * Toggle radio on and off (for "airplane" mode) 1173 * "data" is int * 1174 * ((int *)data)[0] is > 0 for "Radio On" 1175 * ((int *)data)[0] is == 0 for "Radio Off" 1176 * 1177 * "response" is NULL 1178 * 1179 * Turn radio on if "on" > 0 1180 * Turn radio off if "on" == 0 1181 * 1182 * Valid errors: 1183 * SUCCESS 1184 * RADIO_NOT_AVAILABLE 1185 * GENERIC_FAILURE 1186 */ 1187#define RIL_REQUEST_RADIO_POWER 23 1188 1189/** 1190 * RIL_REQUEST_DTMF 1191 * 1192 * Send a DTMF tone 1193 * 1194 * If the implementation is currently playing a tone requested via 1195 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone 1196 * should be played instead 1197 * 1198 * "data" is a char * containing a single character with one of 12 values: 0-9,*,# 1199 * "response" is NULL 1200 * 1201 * FIXME should this block/mute microphone? 1202 * How does this interact with local DTMF feedback? 1203 * 1204 * Valid errors: 1205 * SUCCESS 1206 * RADIO_NOT_AVAILABLE 1207 * GENERIC_FAILURE 1208 * 1209 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START 1210 * 1211 */ 1212#define RIL_REQUEST_DTMF 24 1213 1214/** 1215 * RIL_REQUEST_SEND_SMS 1216 * 1217 * Send an SMS message 1218 * 1219 * "data" is const char ** 1220 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed 1221 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 1222 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string 1223 * less the SMSC address 1224 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" 1225 * 1226 * "response" is a const RIL_SMS_Response * 1227 * 1228 * Based on the return error, caller decides to resend if sending sms 1229 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) 1230 * and GENERIC_FAILURE means no retry (i.e. error cause is 500) 1231 * 1232 * Valid errors: 1233 * SUCCESS 1234 * RADIO_NOT_AVAILABLE 1235 * SMS_SEND_FAIL_RETRY 1236 * FDN_CHECK_FAILURE 1237 * GENERIC_FAILURE 1238 * 1239 * FIXME how do we specify TP-Message-Reference if we need to resend? 1240 */ 1241#define RIL_REQUEST_SEND_SMS 25 1242 1243 1244/** 1245 * RIL_REQUEST_SEND_SMS_EXPECT_MORE 1246 * 1247 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS, 1248 * except that more messages are expected to be sent soon. If possible, 1249 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command) 1250 * 1251 * "data" is const char ** 1252 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed 1253 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 1254 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string 1255 * less the SMSC address 1256 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" 1257 * 1258 * "response" is a const RIL_SMS_Response * 1259 * 1260 * Based on the return error, caller decides to resend if sending sms 1261 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) 1262 * and GENERIC_FAILURE means no retry (i.e. error cause is 500) 1263 * 1264 * Valid errors: 1265 * SUCCESS 1266 * RADIO_NOT_AVAILABLE 1267 * SMS_SEND_FAIL_RETRY 1268 * GENERIC_FAILURE 1269 * 1270 */ 1271#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26 1272 1273 1274/** 1275 * RIL_REQUEST_SETUP_DATA_CALL 1276 * 1277 * Setup a packet data connection 1278 * 1279 * "data" is a const char ** 1280 * ((const char **)data)[0] indicates whether to setup connection on radio technology CDMA 1281 * or GSM/UMTS, 0-1. 0 - CDMA, 1-GSM/UMTS 1282 * 1283 * ((const char **)data)[1] is a RIL_DataProfile (support is optional) 1284 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will 1285 * override the one in the profile. NULL indicates no APN overrride. 1286 * ((const char **)data)[3] is the username for APN, or NULL 1287 * ((const char **)data)[4] is the password for APN, or NULL 1288 * ((const char **)data)[5] is the PAP / CHAP auth type. Values: 1289 * 0 => PAP and CHAP is never performed. 1290 * 1 => PAP may be performed; CHAP is never performed. 1291 * 2 => CHAP may be performed; PAP is never performed. 1292 * 3 => PAP / CHAP may be performed - baseband dependent. 1293 * 1294 * "response" is a char ** 1295 * ((char **)response)[0] indicating PDP CID, which is generated by RIL. This Connection ID is 1296 * used in GSM/UMTS and CDMA 1297 * ((char **)response)[1] indicating the network interface name for GSM/UMTS or CDMA 1298 * ((char **)response)[2] indicating the IP address for this interface for GSM/UMTS 1299 * and NULL for CDMA 1300 * 1301 * FIXME may need way to configure QoS settings 1302 * 1303 * replaces RIL_REQUEST_SETUP_DEFAULT_PDP 1304 * 1305 * Valid errors: 1306 * SUCCESS 1307 * RADIO_NOT_AVAILABLE 1308 * GENERIC_FAILURE 1309 * 1310 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL 1311 */ 1312#define RIL_REQUEST_SETUP_DATA_CALL 27 1313 1314 1315 1316/** 1317 * RIL_REQUEST_SIM_IO 1318 * 1319 * Request SIM I/O operation. 1320 * This is similar to the TS 27.007 "restricted SIM" operation 1321 * where it assumes all of the EF selection will be done by the 1322 * callee. 1323 * 1324 * "data" is a const RIL_SIM_IO * 1325 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL, 1326 * or may specify a PIN2 for operations that require a PIN2 (eg 1327 * updating FDN records) 1328 * 1329 * "response" is a const RIL_SIM_IO_Response * 1330 * 1331 * Arguments and responses that are unused for certain 1332 * values of "command" should be ignored or set to NULL 1333 * 1334 * Valid errors: 1335 * SUCCESS 1336 * RADIO_NOT_AVAILABLE 1337 * GENERIC_FAILURE 1338 * SIM_PIN2 1339 * SIM_PUK2 1340 */ 1341#define RIL_REQUEST_SIM_IO 28 1342 1343/** 1344 * RIL_REQUEST_SEND_USSD 1345 * 1346 * Send a USSD message 1347 * 1348 * If a USSD session already exists, the message should be sent in the 1349 * context of that session. Otherwise, a new session should be created. 1350 * 1351 * The network reply should be reported via RIL_UNSOL_ON_USSD 1352 * 1353 * Only one USSD session may exist at a time, and the session is assumed 1354 * to exist until: 1355 * a) The android system invokes RIL_REQUEST_CANCEL_USSD 1356 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code 1357 * of "0" (USSD-Notify/no further action) or "2" (session terminated) 1358 * 1359 * "data" is a const char * containing the USSD request in UTF-8 format 1360 * "response" is NULL 1361 * 1362 * Valid errors: 1363 * SUCCESS 1364 * RADIO_NOT_AVAILABLE 1365 * FDN_CHECK_FAILURE 1366 * GENERIC_FAILURE 1367 * 1368 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD 1369 */ 1370 1371#define RIL_REQUEST_SEND_USSD 29 1372 1373/** 1374 * RIL_REQUEST_CANCEL_USSD 1375 * 1376 * Cancel the current USSD session if one exists 1377 * 1378 * "data" is null 1379 * "response" is NULL 1380 * 1381 * Valid errors: 1382 * SUCCESS 1383 * RADIO_NOT_AVAILABLE 1384 * GENERIC_FAILURE 1385 */ 1386 1387#define RIL_REQUEST_CANCEL_USSD 30 1388 1389/** 1390 * RIL_REQUEST_GET_CLIR 1391 * 1392 * Gets current CLIR status 1393 * "data" is NULL 1394 * "response" is int * 1395 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 1396 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7 1397 * 1398 * Valid errors: 1399 * SUCCESS 1400 * RADIO_NOT_AVAILABLE 1401 * GENERIC_FAILURE 1402 */ 1403#define RIL_REQUEST_GET_CLIR 31 1404 1405/** 1406 * RIL_REQUEST_SET_CLIR 1407 * 1408 * "data" is int * 1409 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 1410 * 1411 * "response" is NULL 1412 * 1413 * Valid errors: 1414 * SUCCESS 1415 * RADIO_NOT_AVAILABLE 1416 * GENERIC_FAILURE 1417 */ 1418#define RIL_REQUEST_SET_CLIR 32 1419 1420/** 1421 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 1422 * 1423 * "data" is const RIL_CallForwardInfo * 1424 * 1425 * "response" is const RIL_CallForwardInfo ** 1426 * "response" points to an array of RIL_CallForwardInfo *'s, one for 1427 * each distinct registered phone number. 1428 * 1429 * For example, if data is forwarded to +18005551212 and voice is forwarded 1430 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned 1431 * 1432 * If, however, both data and voice are forwarded to +18005551212, then 1433 * a single RIL_CallForwardInfo can be returned with the service class 1434 * set to "data + voice = 3") 1435 * 1436 * Valid errors: 1437 * SUCCESS 1438 * RADIO_NOT_AVAILABLE 1439 * GENERIC_FAILURE 1440 */ 1441#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33 1442 1443 1444/** 1445 * RIL_REQUEST_SET_CALL_FORWARD 1446 * 1447 * Configure call forward rule 1448 * 1449 * "data" is const RIL_CallForwardInfo * 1450 * "response" is NULL 1451 * 1452 * Valid errors: 1453 * SUCCESS 1454 * RADIO_NOT_AVAILABLE 1455 * GENERIC_FAILURE 1456 */ 1457#define RIL_REQUEST_SET_CALL_FORWARD 34 1458 1459 1460/** 1461 * RIL_REQUEST_QUERY_CALL_WAITING 1462 * 1463 * Query current call waiting state 1464 * 1465 * "data" is const int * 1466 * ((const int *)data)[0] is the TS 27.007 service class to query. 1467 * "response" is a const int * 1468 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled" 1469 * 1470 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1] 1471 * must follow, with the TS 27.007 service class bit vector of services 1472 * for which call waiting is enabled. 1473 * 1474 * For example, if ((const int *)response)[0] is 1 and 1475 * ((const int *)response)[1] is 3, then call waiting is enabled for data 1476 * and voice and disabled for everything else 1477 * 1478 * Valid errors: 1479 * SUCCESS 1480 * RADIO_NOT_AVAILABLE 1481 * GENERIC_FAILURE 1482 */ 1483#define RIL_REQUEST_QUERY_CALL_WAITING 35 1484 1485 1486/** 1487 * RIL_REQUEST_SET_CALL_WAITING 1488 * 1489 * Configure current call waiting state 1490 * 1491 * "data" is const int * 1492 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled" 1493 * ((const int *)data)[1] is the TS 27.007 service class bit vector of 1494 * services to modify 1495 * "response" is NULL 1496 * 1497 * Valid errors: 1498 * SUCCESS 1499 * RADIO_NOT_AVAILABLE 1500 * GENERIC_FAILURE 1501 */ 1502#define RIL_REQUEST_SET_CALL_WAITING 36 1503 1504/** 1505 * RIL_REQUEST_SMS_ACKNOWLEDGE 1506 * 1507 * Acknowledge successful or failed receipt of SMS previously indicated 1508 * via RIL_UNSOL_RESPONSE_NEW_SMS 1509 * 1510 * "data" is int * 1511 * ((int *)data)[0] is 1 on successful receipt 1512 * (basically, AT+CNMA=1 from TS 27.005 1513 * is 0 on failed receipt 1514 * (basically, AT+CNMA=2 from TS 27.005) 1515 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined 1516 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory 1517 * capacity exceeded) and 0xFF (unspecified error) are 1518 * reported. 1519 * 1520 * "response" is NULL 1521 * 1522 * FIXME would like request that specified RP-ACK/RP-ERROR PDU 1523 * 1524 * Valid errors: 1525 * SUCCESS 1526 * RADIO_NOT_AVAILABLE 1527 * GENERIC_FAILURE 1528 */ 1529#define RIL_REQUEST_SMS_ACKNOWLEDGE 37 1530 1531/** 1532 * RIL_REQUEST_GET_IMEI - DEPRECATED 1533 * 1534 * Get the device IMEI, including check digit 1535 * 1536 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY 1537 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE 1538 * 1539 * "data" is NULL 1540 * "response" is a const char * containing the IMEI 1541 * 1542 * Valid errors: 1543 * SUCCESS 1544 * RADIO_NOT_AVAILABLE (radio resetting) 1545 * GENERIC_FAILURE 1546 */ 1547 1548#define RIL_REQUEST_GET_IMEI 38 1549 1550/** 1551 * RIL_REQUEST_GET_IMEISV - DEPRECATED 1552 * 1553 * Get the device IMEISV, which should be two decimal digits 1554 * 1555 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY 1556 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE 1557 * 1558 * "data" is NULL 1559 * "response" is a const char * containing the IMEISV 1560 * 1561 * Valid errors: 1562 * SUCCESS 1563 * RADIO_NOT_AVAILABLE (radio resetting) 1564 * GENERIC_FAILURE 1565 */ 1566 1567#define RIL_REQUEST_GET_IMEISV 39 1568 1569 1570/** 1571 * RIL_REQUEST_ANSWER 1572 * 1573 * Answer incoming call 1574 * 1575 * Will not be called for WAITING calls. 1576 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case 1577 * instead 1578 * 1579 * "data" is NULL 1580 * "response" is NULL 1581 * 1582 * Valid errors: 1583 * SUCCESS 1584 * RADIO_NOT_AVAILABLE (radio resetting) 1585 * GENERIC_FAILURE 1586 */ 1587 1588#define RIL_REQUEST_ANSWER 40 1589 1590/** 1591 * RIL_REQUEST_DEACTIVATE_DATA_CALL 1592 * 1593 * Deactivate packet data connection 1594 * replaces RIL_REQUEST_DEACTIVATE_DEFAULT_PDP 1595 * 1596 * "data" is const char ** 1597 * ((char**)data)[0] indicating CID 1598 * 1599 * "response" is NULL 1600 * 1601 * Valid errors: 1602 * SUCCESS 1603 * RADIO_NOT_AVAILABLE 1604 * GENERIC_FAILURE 1605 * 1606 * See also: RIL_REQUEST_SETUP_DATA_CALL 1607 */ 1608#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41 1609 1610/** 1611 * RIL_REQUEST_QUERY_FACILITY_LOCK 1612 * 1613 * Query the status of a facility lock state 1614 * 1615 * "data" is const char ** 1616 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4 1617 * (eg "AO" for BAOC, "SC" for SIM lock) 1618 * ((const char **)data)[1] is the password, or "" if not required 1619 * ((const char **)data)[2] is the TS 27.007 service class bit vector of 1620 * services to query 1621 * 1622 * "response" is an int * 1623 * ((const int *)response) 0 is the TS 27.007 service class bit vector of 1624 * services for which the specified barring facility 1625 * is active. "0" means "disabled for all" 1626 * 1627 * 1628 * Valid errors: 1629 * SUCCESS 1630 * RADIO_NOT_AVAILABLE 1631 * GENERIC_FAILURE 1632 * 1633 */ 1634#define RIL_REQUEST_QUERY_FACILITY_LOCK 42 1635 1636/** 1637 * RIL_REQUEST_SET_FACILITY_LOCK 1638 * 1639 * Enable/disable one facility lock 1640 * 1641 * "data" is const char ** 1642 * 1643 * ((const char **)data)[0] = facility string code from TS 27.007 7.4 1644 * (eg "AO" for BAOC) 1645 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock" 1646 * ((const char **)data)[2] = password 1647 * ((const char **)data)[3] = string representation of decimal TS 27.007 1648 * service class bit vector. Eg, the string 1649 * "1" means "set this facility for voice services" 1650 * 1651 * "response" is int * 1652 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1653 * 1654 * Valid errors: 1655 * SUCCESS 1656 * RADIO_NOT_AVAILABLE 1657 * GENERIC_FAILURE 1658 * 1659 */ 1660#define RIL_REQUEST_SET_FACILITY_LOCK 43 1661 1662/** 1663 * RIL_REQUEST_CHANGE_BARRING_PASSWORD 1664 * 1665 * Change call barring facility password 1666 * 1667 * "data" is const char ** 1668 * 1669 * ((const char **)data)[0] = facility string code from TS 27.007 7.4 1670 * (eg "AO" for BAOC) 1671 * ((const char **)data)[1] = old password 1672 * ((const char **)data)[2] = new password 1673 * 1674 * "response" is NULL 1675 * 1676 * Valid errors: 1677 * SUCCESS 1678 * RADIO_NOT_AVAILABLE 1679 * GENERIC_FAILURE 1680 * 1681 */ 1682#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44 1683 1684/** 1685 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 1686 * 1687 * Query current network selectin mode 1688 * 1689 * "data" is NULL 1690 * 1691 * "response" is int * 1692 * ((const int *)response)[0] is 1693 * 0 for automatic selection 1694 * 1 for manual selection 1695 * 1696 * Valid errors: 1697 * SUCCESS 1698 * RADIO_NOT_AVAILABLE 1699 * GENERIC_FAILURE 1700 * 1701 */ 1702#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45 1703 1704/** 1705 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 1706 * 1707 * Specify that the network should be selected automatically 1708 * 1709 * "data" is NULL 1710 * "response" is NULL 1711 * 1712 * This request must not respond until the new operator is selected 1713 * and registered 1714 * 1715 * Valid errors: 1716 * SUCCESS 1717 * RADIO_NOT_AVAILABLE 1718 * GENERIC_FAILURE 1719 * 1720 */ 1721#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46 1722 1723/** 1724 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 1725 * 1726 * Manually select a specified network. 1727 * 1728 * "data" is const char * specifying MCCMNC of network to select (eg "310170") 1729 * "response" is NULL 1730 * 1731 * This request must not respond until the new operator is selected 1732 * and registered 1733 * 1734 * Valid errors: 1735 * SUCCESS 1736 * RADIO_NOT_AVAILABLE 1737 * GENERIC_FAILURE 1738 * 1739 */ 1740#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47 1741 1742/** 1743 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 1744 * 1745 * Scans for available networks 1746 * 1747 * "data" is NULL 1748 * "response" is const char ** that should be an array of n*4 strings, where 1749 * n is the number of available networks 1750 * For each available network: 1751 * 1752 * ((const char **)response)[n+0] is long alpha ONS or EONS 1753 * ((const char **)response)[n+1] is short alpha ONS or EONS 1754 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC) 1755 * ((const char **)response)[n+3] is a string value of the status: 1756 * "unknown" 1757 * "available" 1758 * "current" 1759 * "forbidden" 1760 * 1761 * This request must not respond until the new operator is selected 1762 * and registered 1763 * 1764 * Valid errors: 1765 * SUCCESS 1766 * RADIO_NOT_AVAILABLE 1767 * GENERIC_FAILURE 1768 * 1769 */ 1770#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48 1771 1772/** 1773 * RIL_REQUEST_DTMF_START 1774 * 1775 * Start playing a DTMF tone. Continue playing DTMF tone until 1776 * RIL_REQUEST_DTMF_STOP is received 1777 * 1778 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing, 1779 * it should cancel the previous tone and play the new one. 1780 * 1781 * "data" is a char * 1782 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,# 1783 * "response" is NULL 1784 * 1785 * Valid errors: 1786 * SUCCESS 1787 * RADIO_NOT_AVAILABLE 1788 * GENERIC_FAILURE 1789 * 1790 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP 1791 */ 1792#define RIL_REQUEST_DTMF_START 49 1793 1794/** 1795 * RIL_REQUEST_DTMF_STOP 1796 * 1797 * Stop playing a currently playing DTMF tone. 1798 * 1799 * "data" is NULL 1800 * "response" is NULL 1801 * 1802 * Valid errors: 1803 * SUCCESS 1804 * RADIO_NOT_AVAILABLE 1805 * GENERIC_FAILURE 1806 * 1807 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START 1808 */ 1809#define RIL_REQUEST_DTMF_STOP 50 1810 1811/** 1812 * RIL_REQUEST_BASEBAND_VERSION 1813 * 1814 * Return string value indicating baseband version, eg 1815 * response from AT+CGMR 1816 * 1817 * "data" is NULL 1818 * "response" is const char * containing version string for log reporting 1819 * 1820 * Valid errors: 1821 * SUCCESS 1822 * RADIO_NOT_AVAILABLE 1823 * GENERIC_FAILURE 1824 * 1825 */ 1826#define RIL_REQUEST_BASEBAND_VERSION 51 1827 1828/** 1829 * RIL_REQUEST_SEPARATE_CONNECTION 1830 * 1831 * Separate a party from a multiparty call placing the multiparty call 1832 * (less the specified party) on hold and leaving the specified party 1833 * as the only other member of the current (active) call 1834 * 1835 * Like AT+CHLD=2x 1836 * 1837 * See TS 22.084 1.3.8.2 (iii) 1838 * TS 22.030 6.5.5 "Entering "2X followed by send" 1839 * TS 27.007 "AT+CHLD=2x" 1840 * 1841 * "data" is an int * 1842 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL 1843 * 1844 * "response" is NULL 1845 * 1846 * Valid errors: 1847 * SUCCESS 1848 * RADIO_NOT_AVAILABLE (radio resetting) 1849 * GENERIC_FAILURE 1850 */ 1851#define RIL_REQUEST_SEPARATE_CONNECTION 52 1852 1853 1854/** 1855 * RIL_REQUEST_SET_MUTE 1856 * 1857 * Turn on or off uplink (microphone) mute. 1858 * 1859 * Will only be sent while voice call is active. 1860 * Will always be reset to "disable mute" when a new voice call is initiated 1861 * 1862 * "data" is an int * 1863 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute" 1864 * 1865 * "response" is NULL 1866 * 1867 * Valid errors: 1868 * SUCCESS 1869 * RADIO_NOT_AVAILABLE (radio resetting) 1870 * GENERIC_FAILURE 1871 */ 1872 1873#define RIL_REQUEST_SET_MUTE 53 1874 1875/** 1876 * RIL_REQUEST_GET_MUTE 1877 * 1878 * Queries the current state of the uplink mute setting 1879 * 1880 * "data" is NULL 1881 * "response" is an int * 1882 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled" 1883 * 1884 * Valid errors: 1885 * SUCCESS 1886 * RADIO_NOT_AVAILABLE (radio resetting) 1887 * GENERIC_FAILURE 1888 */ 1889 1890#define RIL_REQUEST_GET_MUTE 54 1891 1892/** 1893 * RIL_REQUEST_QUERY_CLIP 1894 * 1895 * Queries the status of the CLIP supplementary service 1896 * 1897 * (for MMI code "*#30#") 1898 * 1899 * "data" is NULL 1900 * "response" is an int * 1901 * (int *)response)[0] is 1 for "CLIP provisioned" 1902 * and 0 for "CLIP not provisioned" 1903 * and 2 for "unknown, e.g. no network etc" 1904 * 1905 * Valid errors: 1906 * SUCCESS 1907 * RADIO_NOT_AVAILABLE (radio resetting) 1908 * GENERIC_FAILURE 1909 */ 1910 1911#define RIL_REQUEST_QUERY_CLIP 55 1912 1913/** 1914 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 1915 * 1916 * Requests the failure cause code for the most recently failed PDP 1917 * context or CDMA data connection active 1918 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE 1919 * 1920 * "data" is NULL 1921 * 1922 * "response" is a "int *" 1923 * ((int *)response)[0] is an integer cause code defined in TS 24.008 1924 * section 6.1.3.1.3 or close approximation 1925 * 1926 * If the implementation does not have access to the exact cause codes, 1927 * then it should return one of the values listed in 1928 * RIL_LastDataCallActivateFailCause, as the UI layer needs to distinguish these 1929 * cases for error notification 1930 * and potential retries. 1931 * 1932 * Valid errors: 1933 * SUCCESS 1934 * RADIO_NOT_AVAILABLE 1935 * GENERIC_FAILURE 1936 * 1937 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE 1938 * 1939 */ 1940 1941#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56 1942 1943/** 1944 * RIL_REQUEST_DATA_CALL_LIST 1945 * 1946 * Queries the status of PDP contexts, returning for each 1947 * its CID, whether or not it is active, and its PDP type, 1948 * APN, and PDP adddress. 1949 * replaces RIL_REQUEST_PDP_CONTEXT_LIST 1950 * 1951 * "data" is NULL 1952 * "response" is an array of RIL_Data_Call_Response 1953 * 1954 * Valid errors: 1955 * SUCCESS 1956 * RADIO_NOT_AVAILABLE (radio resetting) 1957 * GENERIC_FAILURE 1958 */ 1959 1960#define RIL_REQUEST_DATA_CALL_LIST 57 1961 1962/** 1963 * RIL_REQUEST_RESET_RADIO - DEPRECATED 1964 * 1965 * Request a radio reset. The RIL implementation may postpone 1966 * the reset until after this request is responded to if the baseband 1967 * is presently busy. 1968 * 1969 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER 1970 * 1971 * "data" is NULL 1972 * "response" is NULL 1973 * 1974 * Valid errors: 1975 * SUCCESS 1976 * RADIO_NOT_AVAILABLE (radio resetting) 1977 * GENERIC_FAILURE 1978 * REQUEST_NOT_SUPPORTED 1979 */ 1980 1981#define RIL_REQUEST_RESET_RADIO 58 1982 1983/** 1984 * RIL_REQUEST_OEM_HOOK_RAW 1985 * 1986 * This request reserved for OEM-specific uses. It passes raw byte arrays 1987 * back and forth. 1988 * 1989 * It can be invoked on the Java side from 1990 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw() 1991 * 1992 * "data" is a char * of bytes copied from the byte[] data argument in java 1993 * "response" is a char * of bytes that will returned via the 1994 * caller's "response" Message here: 1995 * (byte[])(((AsyncResult)response.obj).result) 1996 * 1997 * An error response here will result in 1998 * (((AsyncResult)response.obj).result) == null and 1999 * (((AsyncResult)response.obj).exception) being an instance of 2000 * com.android.internal.telephony.gsm.CommandException 2001 * 2002 * Valid errors: 2003 * All 2004 */ 2005 2006#define RIL_REQUEST_OEM_HOOK_RAW 59 2007 2008/** 2009 * RIL_REQUEST_OEM_HOOK_STRINGS 2010 * 2011 * This request reserved for OEM-specific uses. It passes strings 2012 * back and forth. 2013 * 2014 * It can be invoked on the Java side from 2015 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings() 2016 * 2017 * "data" is a const char **, representing an array of null-terminated UTF-8 2018 * strings copied from the "String[] strings" argument to 2019 * invokeOemRilRequestStrings() 2020 * 2021 * "response" is a const char **, representing an array of null-terminated UTF-8 2022 * stings that will be returned via the caller's response message here: 2023 * 2024 * (String[])(((AsyncResult)response.obj).result) 2025 * 2026 * An error response here will result in 2027 * (((AsyncResult)response.obj).result) == null and 2028 * (((AsyncResult)response.obj).exception) being an instance of 2029 * com.android.internal.telephony.gsm.CommandException 2030 * 2031 * Valid errors: 2032 * All 2033 */ 2034 2035#define RIL_REQUEST_OEM_HOOK_STRINGS 60 2036 2037/** 2038 * RIL_REQUEST_SCREEN_STATE 2039 * 2040 * Indicates the current state of the screen. When the screen is off, the 2041 * RIL should notify the baseband to suppress certain notifications (eg, 2042 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude) 2043 * in an effort to conserve power. These notifications should resume when the 2044 * screen is on. 2045 * 2046 * "data" is int * 2047 * ((int *)data)[0] is == 1 for "Screen On" 2048 * ((int *)data)[0] is == 0 for "Screen Off" 2049 * 2050 * "response" is NULL 2051 * 2052 * Valid errors: 2053 * SUCCESS 2054 * GENERIC_FAILURE 2055 */ 2056#define RIL_REQUEST_SCREEN_STATE 61 2057 2058 2059/** 2060 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 2061 * 2062 * Enables/disables supplementary service related notifications 2063 * from the network. 2064 * 2065 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION. 2066 * 2067 * "data" is int * 2068 * ((int *)data)[0] is == 1 for notifications enabled 2069 * ((int *)data)[0] is == 0 for notifications disabled 2070 * 2071 * "response" is NULL 2072 * 2073 * Valid errors: 2074 * SUCCESS 2075 * RADIO_NOT_AVAILABLE 2076 * GENERIC_FAILURE 2077 * 2078 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION. 2079 */ 2080#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62 2081 2082/** 2083 * RIL_REQUEST_WRITE_SMS_TO_SIM 2084 * 2085 * Stores a SMS message to SIM memory. 2086 * 2087 * "data" is RIL_SMS_WriteArgs * 2088 * 2089 * "response" is int * 2090 * ((const int *)response)[0] is the record index where the message is stored. 2091 * 2092 * Valid errors: 2093 * SUCCESS 2094 * GENERIC_FAILURE 2095 * 2096 */ 2097#define RIL_REQUEST_WRITE_SMS_TO_SIM 63 2098 2099/** 2100 * RIL_REQUEST_DELETE_SMS_ON_SIM 2101 * 2102 * Deletes a SMS message from SIM memory. 2103 * 2104 * "data" is int * 2105 * ((int *)data)[0] is the record index of the message to delete. 2106 * 2107 * "response" is NULL 2108 * 2109 * Valid errors: 2110 * SUCCESS 2111 * GENERIC_FAILURE 2112 * 2113 */ 2114#define RIL_REQUEST_DELETE_SMS_ON_SIM 64 2115 2116/** 2117 * RIL_REQUEST_SET_BAND_MODE 2118 * 2119 * Assign a specified band for RF configuration. 2120 * 2121 * "data" is int * 2122 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically) 2123 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000) 2124 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900) 2125 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000) 2126 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000) 2127 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850) 2128 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)" 2129 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)" 2130 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)" 2131 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)" 2132 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)" 2133 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)" 2134 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)" 2135 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)" 2136 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)" 2137 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)" 2138 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)" 2139 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)" 2140 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)" 2141 * 2142 * "response" is NULL 2143 * 2144 * Valid errors: 2145 * SUCCESS 2146 * RADIO_NOT_AVAILABLE 2147 * GENERIC_FAILURE 2148 */ 2149#define RIL_REQUEST_SET_BAND_MODE 65 2150 2151/** 2152 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 2153 * 2154 * Query the list of band mode supported by RF. 2155 * 2156 * "data" is NULL 2157 * 2158 * "response" is int * 2159 * "response" points to an array of int's, the int[0] is the size of array, reset is one for 2160 * each available band mode. 2161 * 2162 * 0 for "unspecified" (selected by baseband automatically) 2163 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000) 2164 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900) 2165 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000) 2166 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000) 2167 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850) 2168 * 6 for "Cellular (800-MHz Band)" 2169 * 7 for "PCS (1900-MHz Band)" 2170 * 8 for "Band Class 3 (JTACS Band)" 2171 * 9 for "Band Class 4 (Korean PCS Band)" 2172 * 10 for "Band Class 5 (450-MHz Band)" 2173 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)" 2174 * 12 for "Band Class 7 (Upper 700-MHz Band)" 2175 * 13 for "Band Class 8 (1800-MHz Band)" 2176 * 14 for "Band Class 9 (900-MHz Band)" 2177 * 15 for "Band Class 10 (Secondary 800-MHz Band)" 2178 * 16 for "Band Class 11 (400-MHz European PAMR Band)" 2179 * 17 for "Band Class 15 (AWS Band)" 2180 * 18 for "Band Class 16 (US 2.5-GHz Band)" 2181 * 2182 * Valid errors: 2183 * SUCCESS 2184 * RADIO_NOT_AVAILABLE 2185 * GENERIC_FAILURE 2186 * 2187 * See also: RIL_REQUEST_SET_BAND_MODE 2188 */ 2189#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66 2190 2191/** 2192 * RIL_REQUEST_STK_GET_PROFILE 2193 * 2194 * Requests the profile of SIM tool kit. 2195 * The profile indicates the SAT/USAT features supported by ME. 2196 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111 2197 * 2198 * "data" is NULL 2199 * 2200 * "response" is a const char * containing SAT/USAT profile 2201 * in hexadecimal format string starting with first byte of terminal profile 2202 * 2203 * Valid errors: 2204 * RIL_E_SUCCESS 2205 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 2206 * RIL_E_GENERIC_FAILURE 2207 */ 2208#define RIL_REQUEST_STK_GET_PROFILE 67 2209 2210/** 2211 * RIL_REQUEST_STK_SET_PROFILE 2212 * 2213 * Download the STK terminal profile as part of SIM initialization 2214 * procedure 2215 * 2216 * "data" is a const char * containing SAT/USAT profile 2217 * in hexadecimal format string starting with first byte of terminal profile 2218 * 2219 * "response" is NULL 2220 * 2221 * Valid errors: 2222 * RIL_E_SUCCESS 2223 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 2224 * RIL_E_GENERIC_FAILURE 2225 */ 2226#define RIL_REQUEST_STK_SET_PROFILE 68 2227 2228/** 2229 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 2230 * 2231 * Requests to send a SAT/USAT envelope command to SIM. 2232 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111 2233 * 2234 * "data" is a const char * containing SAT/USAT command 2235 * in hexadecimal format string starting with command tag 2236 * 2237 * "response" is a const char * containing SAT/USAT response 2238 * in hexadecimal format string starting with first byte of response 2239 * (May be NULL) 2240 * 2241 * Valid errors: 2242 * RIL_E_SUCCESS 2243 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 2244 * RIL_E_GENERIC_FAILURE 2245 */ 2246#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69 2247 2248/** 2249 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 2250 * 2251 * Requests to send a terminal response to SIM for a received 2252 * proactive command 2253 * 2254 * "data" is a const char * containing SAT/USAT response 2255 * in hexadecimal format string starting with first byte of response data 2256 * 2257 * "response" is NULL 2258 * 2259 * Valid errors: 2260 * RIL_E_SUCCESS 2261 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 2262 * RIL_E_GENERIC_FAILURE 2263 */ 2264#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70 2265 2266/** 2267 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 2268 * 2269 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has 2270 * been initialized by ME already. (We could see the call has been in the 'call 2271 * list') So, STK application needs to accept/reject the call according as user 2272 * operations. 2273 * 2274 * "data" is int * 2275 * ((int *)data)[0] is > 0 for "accept" the call setup 2276 * ((int *)data)[0] is == 0 for "reject" the call setup 2277 * 2278 * "response" is NULL 2279 * 2280 * Valid errors: 2281 * RIL_E_SUCCESS 2282 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 2283 * RIL_E_GENERIC_FAILURE 2284 */ 2285#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71 2286 2287/** 2288 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER 2289 * 2290 * Connects the two calls and disconnects the subscriber from both calls. 2291 * 2292 * "data" is NULL 2293 * "response" is NULL 2294 * 2295 * Valid errors: 2296 * SUCCESS 2297 * RADIO_NOT_AVAILABLE (radio resetting) 2298 * GENERIC_FAILURE 2299 */ 2300#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72 2301 2302/** 2303 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 2304 * 2305 * Requests to set the preferred network type for searching and registering 2306 * (CS/PS domain, RAT, and operation mode) 2307 * 2308 * "data" is int * 2309 * 2310 * ((int *)data)[0] is == 0 for GSM/WCDMA (WCDMA preferred) 2311 * ((int *)data)[0] is == 1 for GSM only 2312 * ((int *)data)[0] is == 2 for WCDMA only 2313 * ((int *)data)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL) 2314 * ((int *)data)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL) 2315 * ((int *)data)[0] is == 5 for CDMA only 2316 * ((int *)data)[0] is == 6 for EvDo only 2317 * ((int *)data)[0] is == 7 for GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) 2318 * 2319 * "response" is NULL 2320 * 2321 * Valid errors: 2322 * SUCCESS 2323 * RADIO_NOT_AVAILABLE (radio resetting) 2324 * GENERIC_FAILURE 2325 * MODE_NOT_SUPPORTED 2326 */ 2327#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73 2328 2329/** 2330 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 2331 * 2332 * Query the preferred network type (CS/PS domain, RAT, and operation mode) 2333 * for searching and registering 2334 * 2335 * "data" is NULL 2336 * 2337 * "response" is int * 2338 * ((int *)response)[0] is == 0 for GSM/WCDMA (WCDMA preferred) 2339 * ((int *)response)[0] is == 1 for GSM only 2340 * ((int *)response)[0] is == 2 for WCDMA only 2341 * ((int *)response)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL) 2342 * ((int *)response)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL) 2343 * ((int *)response)[0] is == 5 for CDMA only 2344 * ((int *)response)[0] is == 6 for EvDo only 2345 * ((int *)response)[0] is == 7 for GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) 2346 * 2347 * Valid errors: 2348 * SUCCESS 2349 * RADIO_NOT_AVAILABLE 2350 * GENERIC_FAILURE 2351 * 2352 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 2353 */ 2354#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74 2355 2356/** 2357 * RIL_REQUEST_NEIGHBORING_CELL_IDS 2358 * 2359 * Request neighboring cell id in GSM network 2360 * 2361 * "data" is NULL 2362 * "response" must be a " const RIL_NeighboringCell** " 2363 * 2364 * Valid errors: 2365 * SUCCESS 2366 * RADIO_NOT_AVAILABLE 2367 * GENERIC_FAILURE 2368 */ 2369#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75 2370 2371/** 2372 * RIL_REQUEST_SET_LOCATION_UPDATES 2373 * 2374 * Enables/disables network state change notifications due to changes in 2375 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA). 2376 * Basically +CREG=2 vs. +CREG=1 (TS 27.007). 2377 * 2378 * Note: The RIL implementation should default to "updates enabled" 2379 * when the screen is on and "updates disabled" when the screen is off. 2380 * 2381 * "data" is int * 2382 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2) 2383 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1) 2384 * 2385 * "response" is NULL 2386 * 2387 * Valid errors: 2388 * SUCCESS 2389 * RADIO_NOT_AVAILABLE 2390 * GENERIC_FAILURE 2391 * 2392 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 2393 */ 2394#define RIL_REQUEST_SET_LOCATION_UPDATES 76 2395 2396/** 2397 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION 2398 * 2399 * Request to set the location where the CDMA subscription shall 2400 * be retrieved 2401 * 2402 * "data" is int * 2403 * ((int *)data)[0] is == 0 from RUIM/SIM (default) 2404 * ((int *)data)[0] is == 1 from NV 2405 * 2406 * "response" is NULL 2407 * 2408 * Valid errors: 2409 * SUCCESS 2410 * RADIO_NOT_AVAILABLE 2411 * GENERIC_FAILURE 2412 * SIM_ABSENT 2413 * SUBSCRIPTION_NOT_AVAILABLE 2414 */ 2415#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION 77 2416 2417/** 2418 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 2419 * 2420 * Request to set the roaming preferences in CDMA 2421 * 2422 * "data" is int * 2423 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL 2424 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL 2425 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL 2426 * 2427 * "response" is NULL 2428 * 2429 * Valid errors: 2430 * SUCCESS 2431 * RADIO_NOT_AVAILABLE 2432 * GENERIC_FAILURE 2433 */ 2434#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78 2435 2436/** 2437 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 2438 * 2439 * Request the actual setting of the roaming preferences in CDMA in the modem 2440 * 2441 * "data" is NULL 2442 * 2443 * "response" is int * 2444 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL 2445 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL 2446 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL 2447 * 2448 * "response" is NULL 2449 * 2450 * Valid errors: 2451 * SUCCESS 2452 * RADIO_NOT_AVAILABLE 2453 * GENERIC_FAILURE 2454 */ 2455#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79 2456 2457/** 2458 * RIL_REQUEST_SET_TTY_MODE 2459 * 2460 * Request to set the TTY mode 2461 * 2462 * "data" is int * 2463 * ((int *)data)[0] is == 0 for TTY off 2464 * ((int *)data)[0] is == 1 for TTY Full 2465 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover) 2466 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover) 2467 * 2468 * "response" is NULL 2469 * 2470 * Valid errors: 2471 * SUCCESS 2472 * RADIO_NOT_AVAILABLE 2473 * GENERIC_FAILURE 2474 */ 2475#define RIL_REQUEST_SET_TTY_MODE 80 2476 2477/** 2478 * RIL_REQUEST_QUERY_TTY_MODE 2479 * 2480 * Request the setting of TTY mode 2481 * 2482 * "data" is NULL 2483 * 2484 * "response" is int * 2485 * ((int *)response)[0] is == 0 for TTY off 2486 * ((int *)response)[0] is == 1 for TTY Full 2487 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover) 2488 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover) 2489 * 2490 * "response" is NULL 2491 * 2492 * Valid errors: 2493 * SUCCESS 2494 * RADIO_NOT_AVAILABLE 2495 * GENERIC_FAILURE 2496 */ 2497#define RIL_REQUEST_QUERY_TTY_MODE 81 2498 2499/** 2500 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 2501 * 2502 * Request to set the preferred voice privacy mode used in voice 2503 * scrambling 2504 * 2505 * "data" is int * 2506 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) 2507 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) 2508 * 2509 * "response" is NULL 2510 * 2511 * Valid errors: 2512 * SUCCESS 2513 * RADIO_NOT_AVAILABLE 2514 * GENERIC_FAILURE 2515 */ 2516#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82 2517 2518/** 2519 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 2520 * 2521 * Request the setting of preferred voice privacy mode 2522 * 2523 * "data" is NULL 2524 * 2525 * "response" is int * 2526 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) 2527 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) 2528 * 2529 * "response" is NULL 2530 * 2531 * Valid errors: 2532 * SUCCESS 2533 * RADIO_NOT_AVAILABLE 2534 * GENERIC_FAILURE 2535 */ 2536#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83 2537 2538/** 2539 * RIL_REQUEST_CDMA_FLASH 2540 * 2541 * Send FLASH 2542 * 2543 * "data" is const char * 2544 * ((const char *)data)[0] is a FLASH string 2545 * 2546 * "response" is NULL 2547 * 2548 * Valid errors: 2549 * SUCCESS 2550 * RADIO_NOT_AVAILABLE 2551 * GENERIC_FAILURE 2552 * 2553 */ 2554#define RIL_REQUEST_CDMA_FLASH 84 2555 2556/** 2557 * RIL_REQUEST_CDMA_BURST_DTMF 2558 * 2559 * Send DTMF string 2560 * 2561 * "data" is const char ** 2562 * ((const char **)data)[0] is a DTMF string 2563 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use 2564 * default 2565 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use 2566 * default 2567 * 2568 * "response" is NULL 2569 * 2570 * Valid errors: 2571 * SUCCESS 2572 * RADIO_NOT_AVAILABLE 2573 * GENERIC_FAILURE 2574 * 2575 */ 2576#define RIL_REQUEST_CDMA_BURST_DTMF 85 2577 2578/** 2579 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 2580 * 2581 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum). 2582 * If the checksum is valid the 20 digit AKEY is written to NV, 2583 * replacing the existing AKEY no matter what it was before. 2584 * 2585 * "data" is const char * 2586 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9') 2587 * where the last 6 digits are a checksum of the 2588 * first 20, as specified in TR45.AHAG 2589 * "Common Cryptographic Algorithms, Revision D.1 2590 * Section 2.2" 2591 * 2592 * "response" is NULL 2593 * 2594 * Valid errors: 2595 * SUCCESS 2596 * RADIO_NOT_AVAILABLE 2597 * GENERIC_FAILURE 2598 * 2599 */ 2600#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86 2601 2602/** 2603 * RIL_REQUEST_CDMA_SEND_SMS 2604 * 2605 * Send a CDMA SMS message 2606 * 2607 * "data" is const RIL_CDMA_SMS_Message * 2608 * 2609 * "response" is a const RIL_SMS_Response * 2610 * 2611 * Based on the return error, caller decides to resend if sending sms 2612 * fails. The CDMA error class is derived as follows, 2613 * SUCCESS is error class 0 (no error) 2614 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure) 2615 * and GENERIC_FAILURE is error class 3 (permanent and no retry) 2616 * 2617 * Valid errors: 2618 * SUCCESS 2619 * RADIO_NOT_AVAILABLE 2620 * SMS_SEND_FAIL_RETRY 2621 * GENERIC_FAILURE 2622 * 2623 */ 2624#define RIL_REQUEST_CDMA_SEND_SMS 87 2625 2626/** 2627 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 2628 * 2629 * Acknowledge the success or failure in the receipt of SMS 2630 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 2631 * 2632 * "data" is const RIL_CDMA_SMS_Ack * 2633 * 2634 * "response" is NULL 2635 * 2636 * Valid errors: 2637 * SUCCESS 2638 * RADIO_NOT_AVAILABLE 2639 * GENERIC_FAILURE 2640 * 2641 */ 2642#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88 2643 2644/** 2645 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 2646 * 2647 * Request the setting of GSM/WCDMA Cell Broadcast SMS config. 2648 * 2649 * "data" is NULL 2650 * 2651 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo ** 2652 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *) 2653 * 2654 * Valid errors: 2655 * SUCCESS 2656 * RADIO_NOT_AVAILABLE 2657 * GENERIC_FAILURE 2658 * 2659 */ 2660#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89 2661 2662/** 2663 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 2664 * 2665 * Set GSM/WCDMA Cell Broadcast SMS config 2666 * 2667 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo ** 2668 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *) 2669 * 2670 * "response" is NULL 2671 * 2672 * Valid errors: 2673 * SUCCESS 2674 * RADIO_NOT_AVAILABLE 2675 * GENERIC_FAILURE 2676 * 2677 */ 2678#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90 2679 2680/** 2681 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 2682 * 2683* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS 2684 * 2685 * "data" is const int * 2686 * (const int *)data[0] indicates to activate or turn off the 2687 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1, 2688 * 0 - Activate, 1 - Turn off 2689 * 2690 * "response" is NULL 2691 * 2692 * Valid errors: 2693 * SUCCESS 2694 * RADIO_NOT_AVAILABLE 2695 * GENERIC_FAILURE 2696 * 2697 */ 2698#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91 2699 2700/** 2701 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 2702 * 2703 * Request the setting of CDMA Broadcast SMS config 2704 * 2705 * "data" is NULL 2706 * 2707 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo ** 2708 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *) 2709 * 2710 * Valid errors: 2711 * SUCCESS 2712 * RADIO_NOT_AVAILABLE 2713 * GENERIC_FAILURE 2714 * 2715 */ 2716#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92 2717 2718/** 2719 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 2720 * 2721 * Set CDMA Broadcast SMS config 2722 * 2723 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo ** 2724 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *) 2725 * 2726 * "response" is NULL 2727 * 2728 * Valid errors: 2729 * SUCCESS 2730 * RADIO_NOT_AVAILABLE 2731 * GENERIC_FAILURE 2732 * 2733 */ 2734#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93 2735 2736/** 2737 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 2738 * 2739 * Enable or disable the reception of CDMA Broadcast SMS 2740 * 2741 * "data" is const int * 2742 * (const int *)data[0] indicates to activate or turn off the 2743 * reception of CDMA Broadcast SMS, 0-1, 2744 * 0 - Activate, 1 - Turn off 2745 * 2746 * "response" is NULL 2747 * 2748 * Valid errors: 2749 * SUCCESS 2750 * RADIO_NOT_AVAILABLE 2751 * GENERIC_FAILURE 2752 * 2753 */ 2754#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94 2755 2756/** 2757 * RIL_REQUEST_CDMA_SUBSCRIPTION 2758 * 2759 * Request the device MDN / H_SID / H_NID. 2760 * 2761 * The request is only allowed when CDMA subscription is available. When CDMA 2762 * subscription is changed, application layer should re-issue the request to 2763 * update the subscription information. 2764 * 2765 * If a NULL value is returned for any of the device id, it means that error 2766 * accessing the device. 2767 * 2768 * "response" is const char ** 2769 * ((const char **)response)[0] is MDN if CDMA subscription is available 2770 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if 2771 * CDMA subscription is available, in decimal format 2772 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if 2773 * CDMA subscription is available, in decimal format 2774 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available 2775 * ((const char **)response)[4] is PRL version if CDMA subscription is available 2776 * 2777 * Valid errors: 2778 * SUCCESS 2779 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE 2780 */ 2781 2782#define RIL_REQUEST_CDMA_SUBSCRIPTION 95 2783 2784/** 2785 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 2786 * 2787 * Stores a CDMA SMS message to RUIM memory. 2788 * 2789 * "data" is RIL_CDMA_SMS_WriteArgs * 2790 * 2791 * "response" is int * 2792 * ((const int *)response)[0] is the record index where the message is stored. 2793 * 2794 * Valid errors: 2795 * SUCCESS 2796 * RADIO_NOT_AVAILABLE 2797 * GENERIC_FAILURE 2798 * 2799 */ 2800#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96 2801 2802/** 2803 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 2804 * 2805 * Deletes a CDMA SMS message from RUIM memory. 2806 * 2807 * "data" is int * 2808 * ((int *)data)[0] is the record index of the message to delete. 2809 * 2810 * "response" is NULL 2811 * 2812 * Valid errors: 2813 * SUCCESS 2814 * RADIO_NOT_AVAILABLE 2815 * GENERIC_FAILURE 2816 * 2817 */ 2818#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97 2819 2820/** 2821 * RIL_REQUEST_DEVICE_IDENTITY 2822 * 2823 * Request the device ESN / MEID / IMEI / IMEISV. 2824 * 2825 * The request is always allowed and contains GSM and CDMA device identity; 2826 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and 2827 * RIL_REQUEST_GET_IMEISV. 2828 * 2829 * If a NULL value is returned for any of the device id, it means that error 2830 * accessing the device. 2831 * 2832 * When CDMA subscription is changed the ESN/MEID may change. The application 2833 * layer should re-issue the request to update the device identity in this case. 2834 * 2835 * "response" is const char ** 2836 * ((const char **)response)[0] is IMEI if GSM subscription is available 2837 * ((const char **)response)[1] is IMEISV if GSM subscription is available 2838 * ((const char **)response)[2] is ESN if CDMA subscription is available 2839 * ((const char **)response)[3] is MEID if CDMA subscription is available 2840 * 2841 * Valid errors: 2842 * SUCCESS 2843 * RADIO_NOT_AVAILABLE 2844 * GENERIC_FAILURE 2845 */ 2846#define RIL_REQUEST_DEVICE_IDENTITY 98 2847 2848/** 2849 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 2850 * 2851 * Request the radio's system selection module to exit emergency 2852 * callback mode. RIL will not respond with SUCCESS until the modem has 2853 * completely exited from Emergency Callback Mode. 2854 * 2855 * "data" is NULL 2856 * 2857 * "response" is NULL 2858 * 2859 * Valid errors: 2860 * SUCCESS 2861 * RADIO_NOT_AVAILABLE 2862 * GENERIC_FAILURE 2863 * 2864 */ 2865#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99 2866 2867/** 2868 * RIL_REQUEST_GET_SMSC_ADDRESS 2869 * 2870 * Queries the default Short Message Service Center address on the device. 2871 * 2872 * "data" is NULL 2873 * 2874 * "response" is const char * containing the SMSC address. 2875 * 2876 * Valid errors: 2877 * SUCCESS 2878 * RADIO_NOT_AVAILABLE 2879 * GENERIC_FAILURE 2880 * 2881 */ 2882#define RIL_REQUEST_GET_SMSC_ADDRESS 100 2883 2884/** 2885 * RIL_REQUEST_SET_SMSC_ADDRESS 2886 * 2887 * Sets the default Short Message Service Center address on the device. 2888 * 2889 * "data" is const char * containing the SMSC address. 2890 * 2891 * "response" is NULL 2892 * 2893 * Valid errors: 2894 * SUCCESS 2895 * RADIO_NOT_AVAILABLE 2896 * GENERIC_FAILURE 2897 * 2898 */ 2899#define RIL_REQUEST_SET_SMSC_ADDRESS 101 2900 2901/** 2902 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 2903 * 2904 * Indicates whether there is storage available for new SMS messages. 2905 * 2906 * "data" is int * 2907 * ((int *)data)[0] is 1 if memory is available for storing new messages 2908 * is 0 if memory capacity is exceeded 2909 * 2910 * "response" is NULL 2911 * 2912 * Valid errors: 2913 * SUCCESS 2914 * RADIO_NOT_AVAILABLE 2915 * GENERIC_FAILURE 2916 * 2917 */ 2918#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102 2919 2920/** 2921 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 2922 * 2923 * Indicates that the StkSerivce is running and is 2924 * ready to receive RIL_UNSOL_STK_XXXXX commands. 2925 * 2926 * "data" is NULL 2927 * "response" is NULL 2928 * 2929 * Valid errors: 2930 * SUCCESS 2931 * RADIO_NOT_AVAILABLE 2932 * GENERIC_FAILURE 2933 * 2934 */ 2935#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103 2936 2937 2938/***********************************************************************/ 2939 2940 2941#define RIL_UNSOL_RESPONSE_BASE 1000 2942 2943/** 2944 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 2945 * 2946 * Indicate when value of RIL_RadioState has changed. 2947 * 2948 * Callee will invoke RIL_RadioStateRequest method on main thread 2949 * 2950 * "data" is NULL 2951 */ 2952 2953#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000 2954 2955 2956/** 2957 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 2958 * 2959 * Indicate when call state has changed 2960 * 2961 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread 2962 * 2963 * "data" is NULL 2964 * 2965 * Response should be invoked on, for example, 2966 * "RING", "BUSY", "NO CARRIER", and also call state 2967 * transitions (DIALING->ALERTING ALERTING->ACTIVE) 2968 * 2969 * Redundent or extraneous invocations are tolerated 2970 */ 2971#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001 2972 2973 2974/** 2975 * RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 2976 * 2977 * Called when network state, operator name, or GPRS state has changed 2978 * Basically on, +CREG and +CGREG 2979 * 2980 * Callee will invoke the following requests on main thread: 2981 * 2982 * RIL_REQUEST_REGISTRATION_STATE 2983 * RIL_REQUEST_GPRS_REGISTRATION_STATE 2984 * RIL_REQUEST_OPERATOR 2985 * 2986 * "data" is NULL 2987 * 2988 * FIXME should this happen when SIM records are loaded? (eg, for 2989 * EONS) 2990 */ 2991#define RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 1002 2992 2993/** 2994 * RIL_UNSOL_RESPONSE_NEW_SMS 2995 * 2996 * Called when new SMS is received. 2997 * 2998 * "data" is const char * 2999 * This is a pointer to a string containing the PDU of an SMS-DELIVER 3000 * as an ascii string of hex digits. The PDU starts with the SMSC address 3001 * per TS 27.005 (+CMT:) 3002 * 3003 * Callee will subsequently confirm the receipt of thei SMS with a 3004 * RIL_REQUEST_SMS_ACKNOWLEDGE 3005 * 3006 * No new RIL_UNSOL_RESPONSE_NEW_SMS 3007 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a 3008 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received 3009 */ 3010 3011#define RIL_UNSOL_RESPONSE_NEW_SMS 1003 3012 3013/** 3014 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 3015 * 3016 * Called when new SMS Status Report is received. 3017 * 3018 * "data" is const char * 3019 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT 3020 * as an ascii string of hex digits. The PDU starts with the SMSC address 3021 * per TS 27.005 (+CDS:). 3022 * 3023 * Callee will subsequently confirm the receipt of the SMS with a 3024 * RIL_REQUEST_SMS_ACKNOWLEDGE 3025 * 3026 * No new RIL_UNSOL_RESPONSE_NEW_SMS 3027 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a 3028 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received 3029 */ 3030 3031#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004 3032 3033/** 3034 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 3035 * 3036 * Called when new SMS has been stored on SIM card 3037 * 3038 * "data" is const int * 3039 * ((const int *)data)[0] contains the slot index on the SIM that contains 3040 * the new message 3041 */ 3042 3043#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005 3044 3045/** 3046 * RIL_UNSOL_ON_USSD 3047 * 3048 * Called when a new USSD message is received. 3049 * 3050 * "data" is const char ** 3051 * ((const char **)data)[0] points to a type code, which is 3052 * one of these string values: 3053 * "0" USSD-Notify -- text in ((const char **)data)[1] 3054 * "1" USSD-Request -- text in ((const char **)data)[1] 3055 * "2" Session terminated by network 3056 * "3" other local client (eg, SIM Toolkit) has responded 3057 * "4" Operation not supported 3058 * "5" Network timeout 3059 * 3060 * The USSD session is assumed to persist if the type code is "1", otherwise 3061 * the current session (if any) is assumed to have terminated. 3062 * 3063 * ((const char **)data)[1] points to a message string if applicable, which 3064 * should always be in UTF-8. 3065 */ 3066#define RIL_UNSOL_ON_USSD 1006 3067/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */ 3068 3069/** 3070 * RIL_UNSOL_ON_USSD_REQUEST 3071 * 3072 * Obsolete. Send via RIL_UNSOL_ON_USSD 3073 */ 3074#define RIL_UNSOL_ON_USSD_REQUEST 1007 3075 3076 3077/** 3078 * RIL_UNSOL_NITZ_TIME_RECEIVED 3079 * 3080 * Called when radio has received a NITZ time message 3081 * 3082 * "data" is const char * pointing to NITZ time string 3083 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt" 3084 */ 3085#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008 3086 3087/** 3088 * RIL_UNSOL_SIGNAL_STRENGTH 3089 * 3090 * Radio may report signal strength rather han have it polled. 3091 * 3092 * "data" is a const RIL_SignalStrength * 3093 */ 3094#define RIL_UNSOL_SIGNAL_STRENGTH 1009 3095 3096 3097/** 3098 * RIL_UNSOL_DATA_CALL_LIST_CHANGED 3099 * 3100 * Indicate a PDP context state has changed, or a new context 3101 * has been activated or deactivated 3102 * replaces RIL_UNSOL_PDP_CONTEXT_LIST_CHANGED 3103 * 3104 * "data" is an array of RIL_Data_Call_Response identical to that 3105 * returned by RIL_REQUEST_DATA_CALL_LIST 3106 * 3107 * See also: RIL_REQUEST_DATA_CALL_LIST 3108 */ 3109 3110#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010 3111 3112/** 3113 * RIL_UNSOL_SUPP_SVC_NOTIFICATION 3114 * 3115 * Reports supplementary service related notification from the network. 3116 * 3117 * "data" is a const RIL_SuppSvcNotification * 3118 * 3119 */ 3120 3121#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011 3122 3123/** 3124 * RIL_UNSOL_STK_SESSION_END 3125 * 3126 * Indicate when STK session is terminated by SIM. 3127 * 3128 * "data" is NULL 3129 */ 3130#define RIL_UNSOL_STK_SESSION_END 1012 3131 3132/** 3133 * RIL_UNSOL_STK_PROACTIVE_COMMAND 3134 * 3135 * Indicate when SIM issue a STK proactive command to applications 3136 * 3137 * "data" is a const char * containing SAT/USAT proactive command 3138 * in hexadecimal format string starting with command tag 3139 * 3140 */ 3141#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013 3142 3143/** 3144 * RIL_UNSOL_STK_EVENT_NOTIFY 3145 * 3146 * Indicate when SIM notifies applcations some event happens. 3147 * Generally, application does not need to have any feedback to 3148 * SIM but shall be able to indicate appropriate messages to users. 3149 * 3150 * "data" is a const char * containing SAT/USAT commands or responses 3151 * sent by ME to SIM or commands handled by ME, in hexadecimal format string 3152 * starting with first byte of response data or command tag 3153 * 3154 */ 3155#define RIL_UNSOL_STK_EVENT_NOTIFY 1014 3156 3157/** 3158 * RIL_UNSOL_STK_CALL_SETUP 3159 * 3160 * Indicate when SIM wants application to setup a voice call. 3161 * 3162 * "data" is const int * 3163 * ((const int *)data)[0] contains timeout value (in milliseconds) 3164 */ 3165#define RIL_UNSOL_STK_CALL_SETUP 1015 3166 3167/** 3168 * RIL_UNSOL_SIM_SMS_STORAGE_FULL 3169 * 3170 * Indicates that SMS storage on the SIM is full. Sent when the network 3171 * attempts to deliver a new SMS message. Messages cannot be saved on the 3172 * SIM until space is freed. In particular, incoming Class 2 messages 3173 * cannot be stored. 3174 * 3175 * "data" is null 3176 * 3177 */ 3178#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016 3179 3180/** 3181 * RIL_UNSOL_SIM_REFRESH 3182 * 3183 * Indicates that file(s) on the SIM have been updated, or the SIM 3184 * has been reinitialized. 3185 * 3186 * "data" is an int * 3187 * ((int *)data)[0] is a RIL_SimRefreshResult. 3188 * ((int *)data)[1] is the EFID of the updated file if the result is 3189 * SIM_FILE_UPDATE or NULL for any other result. 3190 * 3191 * Note: If the radio state changes as a result of the SIM refresh (eg, 3192 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 3193 * should be sent. 3194 */ 3195#define RIL_UNSOL_SIM_REFRESH 1017 3196 3197/** 3198 * RIL_UNSOL_CALL_RING 3199 * 3200 * Ring indication for an incoming call (eg, RING or CRING event). 3201 * There must be at least one RIL_UNSOL_CALL_RING at the beginning 3202 * of a call and sending multiple is optional. If the system property 3203 * ro.telephony.call_ring.multiple is false then the upper layers 3204 * will generate the multiple events internally. Otherwise the vendor 3205 * ril must generate multiple RIL_UNSOL_CALL_RING if 3206 * ro.telephony.call_ring.multiple is true or if it is absent. 3207 * 3208 * The rate of these events is controlled by ro.telephony.call_ring.delay 3209 * and has a default value of 3000 (3 seconds) if absent. 3210 * 3211 * "data" is null for GSM 3212 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA 3213 */ 3214#define RIL_UNSOL_CALL_RING 1018 3215 3216/** 3217 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 3218 * 3219 * Indicates that SIM state changes. 3220 * 3221 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread 3222 3223 * "data" is null 3224 */ 3225#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019 3226 3227/** 3228 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 3229 * 3230 * Called when new CDMA SMS is received 3231 * 3232 * "data" is const RIL_CDMA_SMS_Message * 3233 * 3234 * Callee will subsequently confirm the receipt of the SMS with 3235 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 3236 * 3237 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until 3238 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received 3239 * 3240 */ 3241#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020 3242 3243/** 3244 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 3245 * 3246 * Called when new Broadcast SMS is received 3247 * 3248 * "data" is const char * of 88 bytes which indicates each page 3249 * of a CBS Message sent to the MS by the BTS as coded in 3GPP 3250 * 23.041 Section 9.4.1.1 3251 * 3252 */ 3253#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021 3254 3255/** 3256 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 3257 * 3258 * Indicates that SMS storage on the RUIM is full. Messages 3259 * cannot be saved on the RUIM until space is freed. 3260 * 3261 * "data" is null 3262 * 3263 */ 3264#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022 3265 3266/** 3267 * RIL_UNSOL_RESTRICTED_STATE_CHANGED 3268 * 3269 * Indicates a restricted state change (eg, for Domain Specific Access Control). 3270 * 3271 * Radio need send this msg after radio off/on cycle no matter it is changed or not. 3272 * 3273 * "data" is an int * 3274 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values. 3275 */ 3276#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023 3277 3278/** 3279 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 3280 * 3281 * Indicates that the radio system selection module has 3282 * autonomously entered emergency callback mode. 3283 * 3284 * "data" is null 3285 * 3286 */ 3287#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024 3288 3289/** 3290 * RIL_UNSOL_CDMA_CALL_WAITING 3291 * 3292 * Called when CDMA radio receives a call waiting indication. 3293 * 3294 * "data" is const RIL_CDMA_CallWaiting * 3295 * 3296 */ 3297#define RIL_UNSOL_CDMA_CALL_WAITING 1025 3298 3299/** 3300 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 3301 * 3302 * Called when CDMA radio receives an update of the progress of an 3303 * OTASP/OTAPA call. 3304 * 3305 * "data" is const int * 3306 * For CDMA this is an integer OTASP/OTAPA status listed in 3307 * RIL_CDMA_OTA_ProvisionStatus. 3308 * 3309 */ 3310#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026 3311 3312/** 3313 * RIL_UNSOL_CDMA_INFO_REC 3314 * 3315 * Called when CDMA radio receives one or more info recs. 3316 * 3317 * "data" is const RIL_CDMA_InformationRecords * 3318 * 3319 */ 3320#define RIL_UNSOL_CDMA_INFO_REC 1027 3321 3322/** 3323 * RIL_UNSOL_OEM_HOOK_RAW 3324 * 3325 * This is for OEM specific use. 3326 * 3327 * "data" is a byte[] 3328 */ 3329#define RIL_UNSOL_OEM_HOOK_RAW 1028 3330 3331/** 3332 * RIL_UNSOL_RINGBACK_TONE 3333 * 3334 * Indicates that nework doesn't have in-band information, need to 3335 * play out-band tone. 3336 * 3337 * "data" is an int * 3338 * ((int *)data)[0] == 0 for stop play ringback tone. 3339 * ((int *)data)[0] == 1 for start play ringback tone. 3340 */ 3341#define RIL_UNSOL_RINGBACK_TONE 1029 3342 3343/***********************************************************************/ 3344 3345 3346/** 3347 * RIL_Request Function pointer 3348 * 3349 * @param request is one of RIL_REQUEST_* 3350 * @param data is pointer to data defined for that RIL_REQUEST_* 3351 * data is owned by caller, and should not be modified or freed by callee 3352 * @param t should be used in subsequent call to RIL_onResponse 3353 * @param datalen the length of data 3354 * 3355 */ 3356typedef void (*RIL_RequestFunc) (int request, void *data, 3357 size_t datalen, RIL_Token t); 3358 3359/** 3360 * This function should return the current radio state synchronously 3361 */ 3362typedef RIL_RadioState (*RIL_RadioStateRequest)(); 3363 3364/** 3365 * This function returns "1" if the specified RIL_REQUEST code is 3366 * supported and 0 if it is not 3367 * 3368 * @param requestCode is one of RIL_REQUEST codes 3369 */ 3370 3371typedef int (*RIL_Supports)(int requestCode); 3372 3373/** 3374 * This function is called from a separate thread--not the 3375 * thread that calls RIL_RequestFunc--and indicates that a pending 3376 * request should be cancelled. 3377 * 3378 * On cancel, the callee should do its best to abandon the request and 3379 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point. 3380 * 3381 * Subsequent calls to RIL_onRequestComplete for this request with 3382 * other results will be tolerated but ignored. (That is, it is valid 3383 * to ignore the cancellation request) 3384 * 3385 * RIL_Cancel calls should return immediately, and not wait for cancellation 3386 * 3387 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007 3388 * interface 3389 * 3390 * @param t token wants to be canceled 3391 */ 3392 3393typedef void (*RIL_Cancel)(RIL_Token t); 3394 3395typedef void (*RIL_TimedCallback) (void *param); 3396 3397/** 3398 * Return a version string for your RIL implementation 3399 */ 3400typedef const char * (*RIL_GetVersion) (void); 3401 3402typedef struct { 3403 int version; /* set to RIL_VERSION */ 3404 RIL_RequestFunc onRequest; 3405 RIL_RadioStateRequest onStateRequest; 3406 RIL_Supports supports; 3407 RIL_Cancel onCancel; 3408 RIL_GetVersion getVersion; 3409} RIL_RadioFunctions; 3410 3411#ifdef RIL_SHLIB 3412struct RIL_Env { 3413 /** 3414 * "t" is parameter passed in on previous call to RIL_Notification 3415 * routine. 3416 * 3417 * If "e" != SUCCESS, then response can be null/is ignored 3418 * 3419 * "response" is owned by caller, and should not be modified or 3420 * freed by callee 3421 * 3422 * RIL_onRequestComplete will return as soon as possible 3423 */ 3424 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e, 3425 void *response, size_t responselen); 3426 3427 /** 3428 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_* 3429 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_* 3430 * 3431 * "data" is owned by caller, and should not be modified or freed by callee 3432 */ 3433 3434 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, 3435 size_t datalen); 3436 3437 /** 3438 * Call user-specifed "callback" function on on the same thread that 3439 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies 3440 * a relative time value at which the callback is invoked. If relativeTime is 3441 * NULL or points to a 0-filled structure, the callback will be invoked as 3442 * soon as possible 3443 */ 3444 3445 void (*RequestTimedCallback) (RIL_TimedCallback callback, 3446 void *param, const struct timeval *relativeTime); 3447}; 3448 3449 3450/** 3451 * RIL implementations must defined RIL_Init 3452 * argc and argv will be command line arguments intended for the RIL implementation 3453 * Return NULL on error 3454 * 3455 * @param env is environment point defined as RIL_Env 3456 * @param argc number of arguments 3457 * @param argv list fo arguments 3458 * 3459 */ 3460const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv); 3461 3462#else /* RIL_SHLIB */ 3463 3464/** 3465 * Call this once at startup to register notification routine 3466 * 3467 * @param callbacks user-specifed callback function 3468 */ 3469void RIL_register (const RIL_RadioFunctions *callbacks); 3470 3471 3472/** 3473 * 3474 * RIL_onRequestComplete will return as soon as possible 3475 * 3476 * @param t is parameter passed in on previous call to RIL_Notification 3477 * routine. 3478 * @param e error code 3479 * if "e" != SUCCESS, then response can be null/is ignored 3480 * @param response is owned by caller, and should not be modified or 3481 * freed by callee 3482 * @param responselen the length of response in byte 3483 */ 3484void RIL_onRequestComplete(RIL_Token t, RIL_Errno e, 3485 void *response, size_t responselen); 3486 3487/** 3488 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_* 3489 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_* 3490 * "data" is owned by caller, and should not be modified or freed by callee 3491 * @param datalen the length of data in byte 3492 */ 3493 3494void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, 3495 size_t datalen); 3496 3497 3498/** 3499 * Call user-specifed "callback" function on on the same thread that 3500 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies 3501 * a relative time value at which the callback is invoked. If relativeTime is 3502 * NULL or points to a 0-filled structure, the callback will be invoked as 3503 * soon as possible 3504 * 3505 * @param callback user-specifed callback function 3506 * @param param parameter list 3507 * @param relativeTime a relative time value at which the callback is invoked 3508 */ 3509 3510void RIL_requestTimedCallback (RIL_TimedCallback callback, 3511 void *param, const struct timeval *relativeTime); 3512 3513 3514#endif /* RIL_SHLIB */ 3515 3516#ifdef __cplusplus 3517} 3518#endif 3519 3520#endif /*ANDROID_RIL_H*/ 3521