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