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