2 * Copyright (C) 2006 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 * - SMS retransmit (specifying TP-Message-ID)
25 * Supp Service Notification (+CSSN)
26 * GPRS PDP context deactivate notification
32 #define ANDROID_RIL_H 1
35 #ifndef FEATURE_UNIT_TEST
37 #endif /* !FEATURE_UNIT_TEST */
45 #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
46 #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
48 typedef void * RIL_Token;
52 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
53 RIL_E_GENERIC_FAILURE = 2,
54 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
55 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
56 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
57 RIL_E_REQUEST_NOT_SUPPORTED = 6,
59 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
60 call on a Class C GPRS device */
61 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
62 registers in network */
63 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
64 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
65 shall be retrieved because of SIM or RUIM
67 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
69 RIL_E_MODE_NOT_SUPPORTED = 13 /* HW does not support preferred network type */
75 RIL_CALL_DIALING = 2, /* MO call only */
76 RIL_CALL_ALERTING = 3, /* MO call only */
77 RIL_CALL_INCOMING = 4, /* MT call only */
78 RIL_CALL_WAITING = 5 /* MT call only */
82 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
83 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
84 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
85 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
86 personalization locked, or SIM absent */
87 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
88 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
89 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
90 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
91 personalization locked, or RUIM absent */
92 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
93 RADIO_STATE_NV_READY = 9 /* Radio is on and the NV interface is available */
96 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
98 char isPresent; /* non-zero if signal information record is present */
99 char signalType; /* as defined 3.7.5.5-1 */
100 char alertPitch; /* as defined 3.7.5.5-2 */
101 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
102 } RIL_CDMA_SignalInfoRecord;
106 int index; /* Connection Index for use with, eg, AT+CHLD */
107 int toa; /* type of address, eg 145 = intl */
108 char isMpty; /* nonzero if is mpty call */
109 char isMT; /* nonzero if call is mobile terminated */
110 char als; /* ALS line indicator if available
112 char isVoice; /* nonzero if this is is a voice call */
113 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
114 char * number; /* Remote party number */
115 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
116 char * name; /* Remote party name */
117 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
121 int cid; /* Context ID */
122 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
123 char * type; /* X.25, IP, IPV6, etc. */
126 } RIL_Data_Call_Response;
129 int messageRef; /*TP-Message-Reference*/
130 char *ackPDU; /* or NULL if n/a */
131 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
132 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
133 -1 if unknown or not applicable*/
136 /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
138 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
139 /* 0 = "REC UNREAD" */
141 /* 2 = "STO UNSENT" */
143 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
144 the TP-layer length is "strlen(pdu)/2". */
145 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
146 (as expected by TS 27.005) or NULL for default SMSC */
149 /** Used by RIL_REQUEST_DIAL */
153 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
154 * clir == 0 on "use subscription default value"
155 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
156 * clir == 2 on "CLIR suppression" (allow CLI presentation)
161 int command; /* one of the commands listed for TS 27.007 +CRSM*/
162 int fileid; /* EF id */
163 char *path; /* "pathid" from TS 27.007 +CRSM command.
164 Path is in hex asciii format eg "7f205f70"
165 Path must always be provided.
170 char *data; /* May be NULL*/
171 char *pin2; /* May be NULL*/
177 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
178 } RIL_SIM_IO_Response;
180 /* See also com.android.internal.telephony.gsm.CallForwardInfo */
184 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
185 * status 1 = active, 0 = not active
187 * For RIL_REQUEST_SET_CALL_FORWARD:
196 int reason; /* from TS 27.007 7.11 "reason" */
197 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
198 See table for Android mapping from
200 0 means user doesn't input class */
201 int toa; /* "type" from TS 27.007 7.11 */
202 char * number; /* "number" from TS 27.007 7.11. May be NULL */
203 int timeSeconds; /* for CF no reply only */
204 }RIL_CallForwardInfo;
207 char * cid; /* Cell Id (as described in TS 27.005) in 16 bits in GSM
208 * Primary Scrambling Code (as described in TS 25.331)
210 * Valid values are hexadecimal 0x0000 - 0xffff.
212 int rssi; /* Received RSSI in 2G,
213 * Level index of CPICH Received Signal Code Power in 3G
215 } RIL_NeighboringCell;
217 /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
219 CALL_FAIL_NORMAL = 16,
221 CALL_FAIL_CONGESTION = 34,
222 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
223 CALL_FAIL_CALL_BARRED = 240,
224 CALL_FAIL_FDN_BLOCKED = 241,
225 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
226 CALL_FAIL_CDMA_DROP = 1001,
227 CALL_FAIL_CDMA_INTERCEPT = 1002,
228 CALL_FAIL_CDMA_REORDER = 1003,
229 CALL_FAIL_CDMA_SO_REJECT = 1004,
230 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
231 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
232 CALL_FAIL_CDMA_PREEMPTED = 1007,
233 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
234 during emergency callback mode */
235 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
236 } RIL_LastCallFailCause;
238 /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
240 PDP_FAIL_BARRED = 8, /* no retry; prompt user */
241 PDP_FAIL_BAD_APN = 27, /* no retry; prompt user */
242 PDP_FAIL_USER_AUTHENTICATION = 29, /* no retry; prompt user */
243 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 32, /*no retry; prompt user */
244 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 33, /*no retry; prompt user */
245 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff /* This and all other cases: retry silently */
246 } RIL_LastDataCallActivateFailCause;
248 /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
250 int notificationType; /*
251 * 0 = MO intermediate result code
252 * 1 = MT unsolicited result code
254 int code; /* See 27.007 7.17
257 int index; /* CUG index. See 27.007 7.17. */
258 int type; /* "type" from 27.007 7.17 (MT only). */
259 char * number; /* "number" from 27.007 7.17
260 (MT only, may be NULL). */
261 } RIL_SuppSvcNotification;
263 #define RIL_SIM_ABSENT 0
264 #define RIL_SIM_NOT_READY 1
265 /* RIL_SIM_READY means that the radio state is RADIO_STATE_SIM_READY.
267 * than "+CPIN: READY". It also means the radio is ready for SIM I/O
269 #define RIL_SIM_READY 2
270 #define RIL_SIM_PIN 3
271 #define RIL_SIM_PUK 4
272 #define RIL_SIM_NETWORK_PERSONALIZATION 5
274 /* see RIL_REQUEST_GET_SIM_STATUS */
276 #define RIL_CARD_MAX_APPS 8
279 RIL_CARDSTATE_ABSENT = 0,
280 RIL_CARDSTATE_PRESENT = 1,
281 RIL_CARDSTATE_ERROR = 2
285 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
286 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
287 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
288 since each app can only have 1 active perso
290 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
291 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
292 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
293 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
294 RIL_PERSOSUBSTATE_SIM_SIM = 7,
295 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
296 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
297 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
298 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
299 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
300 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
301 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
302 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
303 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
304 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
305 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
306 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
307 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
308 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
309 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
310 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
311 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
315 RIL_APPSTATE_UNKNOWN = 0,
316 RIL_APPSTATE_DETECTED = 1,
317 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
318 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
319 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
320 when app_state is assigned to this value */
321 RIL_APPSTATE_READY = 5
325 RIL_PINSTATE_UNKNOWN = 0,
326 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
327 RIL_PINSTATE_ENABLED_VERIFIED = 2,
328 RIL_PINSTATE_DISABLED = 3,
329 RIL_PINSTATE_ENABLED_BLOCKED = 4,
330 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
334 RIL_APPTYPE_UNKNOWN = 0,
336 RIL_APPTYPE_USIM = 2,
337 RIL_APPTYPE_RUIM = 3,
343 RIL_AppType app_type;
344 RIL_AppState app_state;
345 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
346 RIL_APPSTATE_SUBSCRIPTION_PERSO */
347 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
349 char *app_label_ptr; /* null terminated string */
350 int pin1_replaced; /* applicable to USIM and CSIM */
357 RIL_CardState card_state;
358 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
359 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
360 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
361 int num_applications; /* value <= RIL_CARD_MAX_APPS */
362 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
365 /* The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH */
367 /* A file on SIM has been updated. data[1] contains the EFID. */
369 /* SIM initialized. All files should be re-read. */
371 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
373 } RIL_SimRefreshResult;
376 char * number; /* Remote party number */
377 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
378 char * name; /* Remote party name */
379 RIL_CDMA_SignalInfoRecord signalInfoRecord;
380 } RIL_CDMA_CallWaiting;
383 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
385 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
386 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
387 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
390 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
391 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
392 * and 9.4.4.2.3 for UMTS.
393 * All other values can be treated as empty CBM data coding scheme.
395 * selected 0 means message types specified in <fromServiceId, toServiceId>
396 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
398 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
399 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
406 unsigned char selected;
407 } RIL_GSM_BroadcastSmsConfigInfo;
409 /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
410 #define RIL_RESTRICTED_STATE_NONE 0x00
411 /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
412 #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
413 /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
414 #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
415 /* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
416 #define RIL_RESTRICTED_STATE_CS_ALL 0x04
417 /* Block packet data access due to restriction. */
418 #define RIL_RESTRICTED_STATE_PS_ALL 0x10
420 /* The status for an OTASP/OTAPA session */
422 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
423 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
424 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
425 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
426 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
427 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
428 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
429 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
430 CDMA_OTA_PROVISION_STATUS_COMMITTED,
431 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
432 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
433 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
434 } RIL_CDMA_OTA_ProvisionStatus;
437 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
438 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
439 } RIL_GW_SignalStrength;
443 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
444 * multiplied by -1. Example: If the actual RSSI is -75, then this response
447 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
448 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
451 } RIL_CDMA_SignalStrength;
455 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
456 * multiplied by -1. Example: If the actual RSSI is -75, then this response
459 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
460 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
463 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
464 } RIL_EVDO_SignalStrength;
468 RIL_GW_SignalStrength GW_SignalStrength;
469 RIL_CDMA_SignalStrength CDMA_SignalStrength;
470 RIL_EVDO_SignalStrength EVDO_SignalStrength;
471 } RIL_SignalStrength;
473 /* Names of the CDMA info records (C.S0005 section 3.7.5) */
475 RIL_CDMA_DISPLAY_INFO_REC,
476 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
477 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
478 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
479 RIL_CDMA_SIGNAL_INFO_REC,
480 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
481 RIL_CDMA_LINE_CONTROL_INFO_REC,
482 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
483 RIL_CDMA_T53_CLIR_INFO_REC,
484 RIL_CDMA_T53_RELEASE_INFO_REC,
485 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
486 } RIL_CDMA_InfoRecName;
488 /* Display Info Rec as defined in C.S0005 section 3.7.5.1
489 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
490 Note: the Extended Display info rec contains multiple records of the
491 form: display_tag, display_len, and display_len occurrences of the
492 chari field if the display_tag is not 10000000 or 10000001.
493 To save space, the records are stored consecutively in a byte buffer.
494 The display_tag, display_len and chari fields are all 1 byte.
499 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
500 } RIL_CDMA_DisplayInfoRecord;
502 /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
503 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
504 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
509 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
514 } RIL_CDMA_NumberInfoRecord;
516 /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
518 RIL_REDIRECTING_REASON_UNKNOWN = 0,
519 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
520 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
521 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
522 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
523 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
524 RIL_REDIRECTING_REASON_RESERVED
525 } RIL_CDMA_RedirectingReason;
528 RIL_CDMA_NumberInfoRecord redirectingNumber;
529 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
530 RIL_CDMA_RedirectingReason redirectingReason;
531 } RIL_CDMA_RedirectingNumberInfoRecord;
533 /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
535 char lineCtrlPolarityIncluded;
537 char lineCtrlReverse;
538 char lineCtrlPowerDenial;
539 } RIL_CDMA_LineControlInfoRecord;
541 /* T53 CLIR Information Record */
544 } RIL_CDMA_T53_CLIRInfoRecord;
546 /* T53 Audio Control Information Record */
550 } RIL_CDMA_T53_AudioControlInfoRecord;
554 RIL_CDMA_InfoRecName name;
557 /* Display and Extended Display Info Rec */
558 RIL_CDMA_DisplayInfoRecord display;
560 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
561 RIL_CDMA_NumberInfoRecord number;
563 /* Signal Info Rec */
564 RIL_CDMA_SignalInfoRecord signal;
566 /* Redirecting Number Info Rec */
567 RIL_CDMA_RedirectingNumberInfoRecord redir;
569 /* Line Control Info Rec */
570 RIL_CDMA_LineControlInfoRecord lineCtrl;
572 /* T53 CLIR Info Rec */
573 RIL_CDMA_T53_CLIRInfoRecord clir;
575 /* T53 Audio Control Info Rec */
576 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
578 } RIL_CDMA_InformationRecord;
580 #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
583 char numberOfInfoRecs;
584 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
585 } RIL_CDMA_InformationRecords;
588 * RIL_REQUEST_GET_SIM_STATUS
590 * Requests status of the SIM interface and the SIM card
594 * "response" is const RIL_CardStatus *
597 * If the radio is off or unavailable, return RIL_SIM_NOT_READY
599 * Please note: RIL_SIM_READY means that the radio state
600 * is RADIO_STATE_SIM_READY. This is more than "+CPIN: READY".
601 * It also means the radio is ready for SIM I/O
606 #define RIL_REQUEST_GET_SIM_STATUS 1
609 * RIL_REQUEST_ENTER_SIM_PIN
611 * Supplies SIM PIN. Only called if SIM status is RIL_SIM_PIN
613 * "data" is const char **
614 * ((const char **)data)[0] is PIN value
616 * "response" must be NULL
621 * RADIO_NOT_AVAILABLE (radio resetting)
626 #define RIL_REQUEST_ENTER_SIM_PIN 2
630 * RIL_REQUEST_ENTER_SIM_PUK
632 * Supplies SIM PUK and new PIN.
634 * "data" is const char **
635 * ((const char **)data)[0] is PUK value
636 * ((const char **)data)[1] is new PIN value
638 * "response" must be NULL
643 * RADIO_NOT_AVAILABLE (radio resetting)
649 #define RIL_REQUEST_ENTER_SIM_PUK 3
652 * RIL_REQUEST_ENTER_SIM_PIN2
654 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
655 * returned as a a failure from a previous operation.
657 * "data" is const char **
658 * ((const char **)data)[0] is PIN2 value
660 * "response" must be NULL
665 * RADIO_NOT_AVAILABLE (radio resetting)
670 #define RIL_REQUEST_ENTER_SIM_PIN2 4
673 * RIL_REQUEST_ENTER_SIM_PUK2
675 * Supplies SIM PUK2 and new PIN2.
677 * "data" is const char **
678 * ((const char **)data)[0] is PUK2 value
679 * ((const char **)data)[1] is new PIN2 value
681 * "response" must be NULL
686 * RADIO_NOT_AVAILABLE (radio resetting)
692 #define RIL_REQUEST_ENTER_SIM_PUK2 5
695 * RIL_REQUEST_CHANGE_SIM_PIN
697 * Supplies old SIM PIN and new PIN.
699 * "data" is const char **
700 * ((const char **)data)[0] is old PIN value
701 * ((const char **)data)[1] is new PIN value
703 * "response" must be NULL
708 * RADIO_NOT_AVAILABLE (radio resetting)
711 * (old PIN is invalid)
715 #define RIL_REQUEST_CHANGE_SIM_PIN 6
719 * RIL_REQUEST_CHANGE_SIM_PIN2
721 * Supplies old SIM PIN2 and new PIN2.
723 * "data" is const char **
724 * ((const char **)data)[0] is old PIN2 value
725 * ((const char **)data)[1] is new PIN2 value
727 * "response" must be NULL
732 * RADIO_NOT_AVAILABLE (radio resetting)
735 * (old PIN2 is invalid)
739 #define RIL_REQUEST_CHANGE_SIM_PIN2 7
742 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
744 * Requests that network personlization be deactivated
746 * "data" is const char **
747 * ((const char **)(data))[0]] is network depersonlization code
749 * "response" must be NULL
754 * RADIO_NOT_AVAILABLE (radio resetting)
760 #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
763 * RIL_REQUEST_GET_CURRENT_CALLS
765 * Requests current call list
769 * "response" must be a "const RIL_Call **"
774 * RADIO_NOT_AVAILABLE (radio resetting)
776 * (request will be made again in a few hundred msec)
779 #define RIL_REQUEST_GET_CURRENT_CALLS 9
785 * Initiate voice call
787 * "data" is const RIL_Dial *
790 * This method is never used for supplementary service codes
794 * RADIO_NOT_AVAILABLE (radio resetting)
797 #define RIL_REQUEST_DIAL 10
800 * RIL_REQUEST_GET_IMSI
804 * Only valid when radio state is "RADIO_STATE_SIM_READY"
807 * "response" is a const char * containing the IMSI
811 * RADIO_NOT_AVAILABLE (radio resetting)
815 #define RIL_REQUEST_GET_IMSI 11
820 * Hang up a specific line (like AT+CHLD=1x)
823 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
829 * RADIO_NOT_AVAILABLE (radio resetting)
833 #define RIL_REQUEST_HANGUP 12
836 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
838 * Hang up waiting or held (like AT+CHLD=0)
845 * RADIO_NOT_AVAILABLE (radio resetting)
849 #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
852 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
854 * Hang up waiting or held (like AT+CHLD=1)
861 * RADIO_NOT_AVAILABLE (radio resetting)
865 #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
868 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
870 * Switch waiting or holding call and active call (like AT+CHLD=2)
872 * State transitions should be is follows:
874 * If call 1 is waiting and call 2 is active, then if this re
877 * Call 1 Call 2 Call 1 Call 2
878 * ACTIVE HOLDING HOLDING ACTIVE
879 * ACTIVE WAITING HOLDING ACTIVE
880 * HOLDING WAITING HOLDING ACTIVE
881 * ACTIVE IDLE HOLDING IDLE
882 * IDLE IDLE IDLE IDLE
889 * RADIO_NOT_AVAILABLE (radio resetting)
893 #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
894 #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
897 * RIL_REQUEST_CONFERENCE
899 * Conference holding and active (like AT+CHLD=3)
906 * RADIO_NOT_AVAILABLE (radio resetting)
909 #define RIL_REQUEST_CONFERENCE 16
914 * Send UDUB (user determined used busy) to ringing or
915 * waiting call answer)(RIL_BasicRequest r);
922 * RADIO_NOT_AVAILABLE (radio resetting)
925 #define RIL_REQUEST_UDUB 17
928 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
930 * Requests the failure cause code for the most recently terminated call
933 * "response" is a "int *"
934 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
935 * mapped to cause codes defined in TS 24.008 Annex H where possible.
937 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
938 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
940 * If the implementation does not have access to the exact cause codes,
941 * then it should return one of the values listed in RIL_LastCallFailCause,
942 * as the UI layer needs to distinguish these cases for tone generation or
943 * error notification.
947 * RADIO_NOT_AVAILABLE
950 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
952 #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
955 * RIL_REQUEST_SIGNAL_STRENGTH
957 * Requests current signal strength and associated information
959 * Must succeed if radio is on.
963 * "response" is a const RIL_SignalStrength *
967 * RADIO_NOT_AVAILABLE
969 #define RIL_REQUEST_SIGNAL_STRENGTH 19
972 * RIL_REQUEST_REGISTRATION_STATE
974 * Request current registration state
977 * "response" is a "char **"
978 * ((const char **)response)[0] is registration state 0-6,
979 * 0 - Not registered, MT is not currently searching
980 * a new operator to register
981 * 1 - Registered, home network
982 * 2 - Not registered, but MT is currently searching
983 * a new operator to register
984 * 3 - Registration denied
986 * 5 - Registered, roaming
987 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
988 * NULL if not.Valid LAC are 0x0000 - 0xffff
989 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
991 * Valid CID are 0x00000000 - 0xffffffff
992 * In GSM, CID is Cell ID (see TS 27.007)
994 * In UMTS, CID is UMTS Cell Identity
995 * (see TS 25.331) in 28 bits
996 * ((const char **)response)[3] indicates the available radio technology 0-7,
997 * 0 - Unknown, 1 - GPRS, 2 - EDGE, 3 - UMTS,
998 * 4 - IS95A, 5 - IS95B, 6 - 1xRTT,
999 * 7 - EvDo Rev. 0, 8 - EvDo Rev. A
1000 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1001 * system or NULL if not. Base Station ID in
1002 * hexadecimal format
1003 * ((const char **)response)[5] is Base Station latitude if registered on a
1004 * CDMA system or NULL if not. Base Station
1005 * latitude in hexadecimal format
1006 * ((const char **)response)[6] is Base Station longitude if registered on a
1007 * CDMA system or NULL if not. Base Station
1008 * longitude in hexadecimal format
1009 * ((const char **)response)[7] is concurrent services support indicator if
1010 * registered on a CDMA system 0-1.
1011 * 0 - Concurrent services not supported,
1012 * 1 - Concurrent services supported
1013 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1014 * NULL if not. Valid System ID are 0 - 32767
1015 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1016 * NULL if not. Valid System ID are 0 - 65535
1017 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
1018 * on a CDMA system or NULL if not. Valid values
1020 * ((const char **)response)[11] indicates whether the current system is in the
1021 * PRL if registered on a CDMA system or NULL if
1022 * not. 0=not in the PRL, 1=in the PRL
1023 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
1024 * if registered on a CDMA system or NULL if not.
1025 * Valid values are 0-255.
1026 * ((const char **)response)[13] if registration state is 3 (Registration
1027 * denied) this is an enumerated reason why
1028 * registration was denied.
1029 * 0-General, 1-Authentication Failure
1031 * Please note that registration state 4 ("unknown") is treated
1032 * as "out of service" in the Android telephony system
1034 * Registration state 3 can be returned if Location Update Reject
1035 * (with cause 17 - Network Failure) is received repeatedly from the network,
1036 * to facilitate "managed roaming"
1040 * RADIO_NOT_AVAILABLE
1043 #define RIL_REQUEST_REGISTRATION_STATE 20
1046 * RIL_REQUEST_GPRS_REGISTRATION_STATE
1048 * Request current GPRS registration state
1051 * "response" is a "char **"
1052 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 7.2
1053 * ((const char **)response)[1] is LAC if registered or NULL if not
1054 * ((const char **)response)[2] is CID if registered or NULL if not
1055 * ((const char **)response)[3] indicates the available radio technology, where:
1061 * LAC and CID are in hexadecimal format.
1062 * valid LAC are 0x0000 - 0xffff
1063 * valid CID are 0x00000000 - 0x0fffffff
1065 * Please note that registration state 4 ("unknown") is treated
1066 * as "out of service" in the Android telephony system
1070 * RADIO_NOT_AVAILABLE
1073 #define RIL_REQUEST_GPRS_REGISTRATION_STATE 21
1076 * RIL_REQUEST_OPERATOR
1078 * Request current operator ONS or EONS
1081 * "response" is a "const char **"
1082 * ((const char **)response)[0] is long alpha ONS or EONS
1083 * or NULL if unregistered
1085 * ((const char **)response)[1] is short alpha ONS or EONS
1086 * or NULL if unregistered
1087 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1088 * or NULL if unregistered
1092 * RADIO_NOT_AVAILABLE
1095 #define RIL_REQUEST_OPERATOR 22
1098 * RIL_REQUEST_RADIO_POWER
1100 * Toggle radio on and off (for "airplane" mode)
1102 * ((int *)data)[0] is > 0 for "Radio On"
1103 * ((int *)data)[0] is == 0 for "Radio Off"
1105 * "response" is NULL
1107 * Turn radio on if "on" > 0
1108 * Turn radio off if "on" == 0
1112 * RADIO_NOT_AVAILABLE
1115 #define RIL_REQUEST_RADIO_POWER 23
1122 * If the implementation is currently playing a tone requested via
1123 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1124 * should be played instead
1126 * "data" is a char *
1127 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
1128 * ((char *)data)[1] is a single character with one of 3 values:
1129 * 'S' -- tone should be played for a short time
1130 * 'L' -- tone should be played for a long time
1131 * "response" is NULL
1133 * FIXME should this block/mute microphone?
1134 * How does this interact with local DTMF feedback?
1138 * RADIO_NOT_AVAILABLE
1141 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1144 #define RIL_REQUEST_DTMF 24
1147 * RIL_REQUEST_SEND_SMS
1149 * Send an SMS message
1151 * "data" is const char **
1152 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1153 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1154 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1155 * less the SMSC address
1156 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1158 * "response" is a const RIL_SMS_Response *
1160 * Based on the return error, caller decides to resend if sending sms
1161 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1162 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1166 * RADIO_NOT_AVAILABLE
1167 * SMS_SEND_FAIL_RETRY
1170 * FIXME how do we specify TP-Message-Reference if we need to resend?
1172 #define RIL_REQUEST_SEND_SMS 25
1176 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
1178 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1179 * except that more messages are expected to be sent soon. If possible,
1180 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1182 * "data" is const char **
1183 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1184 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1185 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1186 * less the SMSC address
1187 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1189 * "response" is a const RIL_SMS_Response *
1191 * Based on the return error, caller decides to resend if sending sms
1192 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1193 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1197 * RADIO_NOT_AVAILABLE
1198 * SMS_SEND_FAIL_RETRY
1202 #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1206 * RIL_REQUEST_SETUP_DATA_CALL
1208 * Setup a packet data connection
1210 * "data" is a const char **
1211 * ((const char **)data)[0] indicates whether to setup connection on radio technology CDMA
1212 * or GSM/UMTS, 0-1. 0 - CDMA, 1-GSM/UMTS
1214 * ((const char **)data)[1] Profile Number or NULL to indicate default profile
1215 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
1216 * override the one in the profile. NULL indicates no APN overrride.
1217 * ((const char **)data)[3] is the username for APN, or NULL
1218 * ((const char **)data)[4] is the password for APN, or NULL
1219 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
1220 * 0 => PAP and CHAP is never performed.
1221 * 1 => PAP may be performed; CHAP is never performed.
1222 * 2 => CHAP may be performed; PAP is never performed.
1223 * 3 => PAP / CHAP may be performed - baseband dependent.
1225 * "response" is a char **
1226 * ((char **)response)[0] indicating PDP CID, which is generated by RIL. This Connection ID is
1227 * used in GSM/UMTS and CDMA
1228 * ((char **)response)[1] indicating the network interface name for GSM/UMTS or CDMA
1229 * ((char **)response)[2] indicating the IP address for this interface for GSM/UMTS
1232 * FIXME may need way to configure QoS settings
1234 * replaces RIL_REQUEST_SETUP_DEFAULT_PDP
1238 * RADIO_NOT_AVAILABLE
1241 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
1243 #define RIL_REQUEST_SETUP_DATA_CALL 27
1248 * RIL_REQUEST_SIM_IO
1250 * Request SIM I/O operation.
1251 * This is similar to the TS 27.007 "restricted SIM" operation
1252 * where it assumes all of the EF selection will be done by the
1255 * "data" is a const RIL_SIM_IO *
1256 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1257 * or may specify a PIN2 for operations that require a PIN2 (eg
1258 * updating FDN records)
1260 * "response" is a const RIL_SIM_IO_Response *
1262 * Arguments and responses that are unused for certain
1263 * values of "command" should be ignored or set to NULL
1267 * RADIO_NOT_AVAILABLE
1272 #define RIL_REQUEST_SIM_IO 28
1275 * RIL_REQUEST_SEND_USSD
1277 * Send a USSD message
1279 * If a USSD session already exists, the message should be sent in the
1280 * context of that session. Otherwise, a new session should be created.
1282 * The network reply should be reported via RIL_UNSOL_ON_USSD
1284 * Only one USSD session may exist at a time, and the session is assumed
1286 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1287 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1288 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1290 * "data" is a const char * containing the USSD request in UTF-8 format
1291 * "response" is NULL
1295 * RADIO_NOT_AVAILABLE
1298 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1301 #define RIL_REQUEST_SEND_USSD 29
1304 * RIL_REQUEST_CANCEL_USSD
1306 * Cancel the current USSD session if one exists
1309 * "response" is NULL
1313 * RADIO_NOT_AVAILABLE
1317 #define RIL_REQUEST_CANCEL_USSD 30
1320 * RIL_REQUEST_GET_CLIR
1322 * Gets current CLIR status
1324 * "response" is int *
1325 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1326 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
1330 * RADIO_NOT_AVAILABLE
1333 #define RIL_REQUEST_GET_CLIR 31
1336 * RIL_REQUEST_SET_CLIR
1339 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1341 * "response" is NULL
1345 * RADIO_NOT_AVAILABLE
1348 #define RIL_REQUEST_SET_CLIR 32
1351 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
1353 * "data" is const RIL_CallForwardInfo *
1355 * "response" is const RIL_CallForwardInfo **
1356 * "response" points to an array of RIL_CallForwardInfo *'s, one for
1357 * each distinct registered phone number.
1359 * For example, if data is forwarded to +18005551212 and voice is forwarded
1360 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
1362 * If, however, both data and voice are forwarded to +18005551212, then
1363 * a single RIL_CallForwardInfo can be returned with the service class
1364 * set to "data + voice = 3")
1368 * RADIO_NOT_AVAILABLE
1371 #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
1375 * RIL_REQUEST_SET_CALL_FORWARD
1377 * Configure call forward rule
1379 * "data" is const RIL_CallForwardInfo *
1380 * "response" is NULL
1384 * RADIO_NOT_AVAILABLE
1387 #define RIL_REQUEST_SET_CALL_FORWARD 34
1391 * RIL_REQUEST_QUERY_CALL_WAITING
1393 * Query current call waiting state
1395 * "data" is const int *
1396 * ((const int *)data)[0] is the TS 27.007 service class to query.
1397 * "response" is a const int *
1398 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
1400 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
1401 * must follow, with the TS 27.007 service class bit vector of services
1402 * for which call waiting is enabled.
1404 * For example, if ((const int *)response)[0] is 1 and
1405 * ((const int *)response)[1] is 3, then call waiting is enabled for data
1406 * and voice and disabled for everything else
1410 * RADIO_NOT_AVAILABLE
1413 #define RIL_REQUEST_QUERY_CALL_WAITING 35
1417 * RIL_REQUEST_SET_CALL_WAITING
1419 * Configure current call waiting state
1421 * "data" is const int *
1422 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
1423 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
1424 * services to modify
1425 * "response" is NULL
1429 * RADIO_NOT_AVAILABLE
1432 #define RIL_REQUEST_SET_CALL_WAITING 36
1435 * RIL_REQUEST_SMS_ACKNOWLEDGE
1437 * Acknowledge successful or failed receipt of SMS previously indicated
1438 * via RIL_UNSOL_RESPONSE_NEW_SMS
1441 * ((int *)data)[0] is 1 on successful receipt
1442 * (basically, AT+CNMA=1 from TS 27.005
1443 * is 0 on failed receipt
1444 * (basically, AT+CNMA=2 from TS 27.005)
1445 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
1446 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
1447 * capacity exceeded) and 0xFF (unspecified error) are
1450 * "response" is NULL
1452 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
1456 * RADIO_NOT_AVAILABLE
1459 #define RIL_REQUEST_SMS_ACKNOWLEDGE 37
1462 * RIL_REQUEST_GET_IMEI - DEPRECATED
1464 * Get the device IMEI, including check digit
1466 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
1467 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1470 * "response" is a const char * containing the IMEI
1474 * RADIO_NOT_AVAILABLE (radio resetting)
1478 #define RIL_REQUEST_GET_IMEI 38
1481 * RIL_REQUEST_GET_IMEISV - DEPRECATED
1483 * Get the device IMEISV, which should be two decimal digits
1485 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
1486 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1489 * "response" is a const char * containing the IMEISV
1493 * RADIO_NOT_AVAILABLE (radio resetting)
1497 #define RIL_REQUEST_GET_IMEISV 39
1501 * RIL_REQUEST_ANSWER
1503 * Answer incoming call
1505 * Will not be called for WAITING calls.
1506 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
1510 * "response" is NULL
1514 * RADIO_NOT_AVAILABLE (radio resetting)
1518 #define RIL_REQUEST_ANSWER 40
1521 * RIL_REQUEST_DEACTIVATE_DATA_CALL
1523 * Deactivate packet data connection
1524 * replaces RIL_REQUEST_DEACTIVATE_DEFAULT_PDP
1526 * "data" is const char **
1527 * ((char**)data)[0] indicating CID
1529 * "response" is NULL
1533 * RADIO_NOT_AVAILABLE
1536 * See also: RIL_REQUEST_SETUP_DATA_CALL
1538 #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
1541 * RIL_REQUEST_QUERY_FACILITY_LOCK
1543 * Query the status of a facility lock state
1545 * "data" is const char **
1546 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
1547 * (eg "AO" for BAOC, "SC" for SIM lock)
1548 * ((const char **)data)[1] is the password, or "" if not required
1549 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
1552 * "response" is an int *
1553 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
1554 * services for which the specified barring facility
1555 * is active. "0" means "disabled for all"
1560 * RADIO_NOT_AVAILABLE
1564 #define RIL_REQUEST_QUERY_FACILITY_LOCK 42
1567 * RIL_REQUEST_SET_FACILITY_LOCK
1569 * Enable/disable one facility lock
1571 * "data" is const char **
1573 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1574 * (eg "AO" for BAOC)
1575 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
1576 * ((const char **)data)[2] = password
1577 * ((const char **)data)[3] = string representation of decimal TS 27.007
1578 * service class bit vector. Eg, the string
1579 * "1" means "set this facility for voice services"
1581 * "response" is NULL
1585 * RADIO_NOT_AVAILABLE
1589 #define RIL_REQUEST_SET_FACILITY_LOCK 43
1592 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
1594 * Change call barring facility password
1596 * "data" is const char **
1598 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1599 * (eg "AO" for BAOC)
1600 * ((const char **)data)[1] = old password
1601 * ((const char **)data)[2] = new password
1603 * "response" is NULL
1607 * RADIO_NOT_AVAILABLE
1611 #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
1614 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
1616 * Query current network selectin mode
1620 * "response" is int *
1621 * ((const int *)response)[0] is
1622 * 0 for automatic selection
1623 * 1 for manual selection
1627 * RADIO_NOT_AVAILABLE
1631 #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
1634 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
1636 * Specify that the network should be selected automatically
1639 * "response" is NULL
1641 * This request must not respond until the new operator is selected
1646 * RADIO_NOT_AVAILABLE
1650 #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
1653 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
1655 * Manually select a specified network.
1657 * The radio baseband/RIL implementation is expected to fall back to
1658 * automatic selection mode if the manually selected network should go
1659 * out of range in the future.
1661 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
1662 * "response" is NULL
1664 * This request must not respond until the new operator is selected
1669 * RADIO_NOT_AVAILABLE
1673 #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
1676 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
1678 * Scans for available networks
1681 * "response" is const char ** that should be an array of n*4 strings, where
1682 * n is the number of available networks
1683 * For each available network:
1685 * ((const char **)response)[n+0] is long alpha ONS or EONS
1686 * ((const char **)response)[n+1] is short alpha ONS or EONS
1687 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
1688 * ((const char **)response)[n+3] is a string value of the status:
1694 * This request must not respond until the new operator is selected
1699 * RADIO_NOT_AVAILABLE
1703 #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
1706 * RIL_REQUEST_DTMF_START
1708 * Start playing a DTMF tone. Continue playing DTMF tone until
1709 * RIL_REQUEST_DTMF_STOP is received
1711 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
1712 * it should cancel the previous tone and play the new one.
1714 * "data" is a char *
1715 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
1716 * "response" is NULL
1720 * RADIO_NOT_AVAILABLE
1723 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
1725 #define RIL_REQUEST_DTMF_START 49
1728 * RIL_REQUEST_DTMF_STOP
1730 * Stop playing a currently playing DTMF tone.
1733 * "response" is NULL
1737 * RADIO_NOT_AVAILABLE
1740 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
1742 #define RIL_REQUEST_DTMF_STOP 50
1745 * RIL_REQUEST_BASEBAND_VERSION
1747 * Return string value indicating baseband version, eg
1748 * response from AT+CGMR
1751 * "response" is const char * containing version string for log reporting
1755 * RADIO_NOT_AVAILABLE
1759 #define RIL_REQUEST_BASEBAND_VERSION 51
1762 * RIL_REQUEST_SEPARATE_CONNECTION
1764 * Separate a party from a multiparty call placing the multiparty call
1765 * (less the specified party) on hold and leaving the specified party
1766 * as the only other member of the current (active) call
1770 * See TS 22.084 1.3.8.2 (iii)
1771 * TS 22.030 6.5.5 "Entering "2X followed by send"
1772 * TS 27.007 "AT+CHLD=2x"
1774 * "data" is an int *
1775 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
1777 * "response" is NULL
1781 * RADIO_NOT_AVAILABLE (radio resetting)
1784 #define RIL_REQUEST_SEPARATE_CONNECTION 52
1788 * RIL_REQUEST_SET_MUTE
1790 * Turn on or off uplink (microphone) mute.
1792 * Will only be sent while voice call is active.
1793 * Will always be reset to "disable mute" when a new voice call is initiated
1795 * "data" is an int *
1796 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
1798 * "response" is NULL
1802 * RADIO_NOT_AVAILABLE (radio resetting)
1806 #define RIL_REQUEST_SET_MUTE 53
1809 * RIL_REQUEST_GET_MUTE
1811 * Queries the current state of the uplink mute setting
1814 * "response" is an int *
1815 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
1819 * RADIO_NOT_AVAILABLE (radio resetting)
1823 #define RIL_REQUEST_GET_MUTE 54
1826 * RIL_REQUEST_QUERY_CLIP
1828 * Queries the status of the CLIP supplementary service
1830 * (for MMI code "*#30#")
1833 * "response" is an int *
1834 * (int *)response)[0] is 1 for "CLIP provisioned"
1835 * and 0 for "CLIP not provisioned"
1836 * and 2 for "unknown, e.g. no network etc"
1840 * RADIO_NOT_AVAILABLE (radio resetting)
1844 #define RIL_REQUEST_QUERY_CLIP 55
1847 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
1849 * Requests the failure cause code for the most recently failed PDP
1850 * context or CDMA data connection active
1851 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
1855 * "response" is a "int *"
1856 * ((int *)response)[0] is an integer cause code defined in TS 24.008
1857 * section 6.1.3.1.3 or close approximation
1859 * If the implementation does not have access to the exact cause codes,
1860 * then it should return one of the values listed in
1861 * RIL_LastDataCallActivateFailCause, as the UI layer needs to distinguish these
1862 * cases for error notification
1863 * and potential retries.
1867 * RADIO_NOT_AVAILABLE
1870 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1874 #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
1877 * RIL_REQUEST_DATA_CALL_LIST
1879 * Queries the status of PDP contexts, returning for each
1880 * its CID, whether or not it is active, and its PDP type,
1881 * APN, and PDP adddress.
1882 * replaces RIL_REQUEST_PDP_CONTEXT_LIST
1885 * "response" is an array of RIL_Data_Call_Response
1889 * RADIO_NOT_AVAILABLE (radio resetting)
1893 #define RIL_REQUEST_DATA_CALL_LIST 57
1896 * RIL_REQUEST_RESET_RADIO - DEPRECATED
1898 * Request a radio reset. The RIL implementation may postpone
1899 * the reset until after this request is responded to if the baseband
1900 * is presently busy.
1902 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
1905 * "response" is NULL
1909 * RADIO_NOT_AVAILABLE (radio resetting)
1911 * REQUEST_NOT_SUPPORTED
1914 #define RIL_REQUEST_RESET_RADIO 58
1917 * RIL_REQUEST_OEM_HOOK_RAW
1919 * This request reserved for OEM-specific uses. It passes raw byte arrays
1922 * It can be invoked on the Java side from
1923 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
1925 * "data" is a char * of bytes copied from the byte[] data argument in java
1926 * "response" is a char * of bytes that will returned via the
1927 * caller's "response" Message here:
1928 * (byte[])(((AsyncResult)response.obj).result)
1930 * An error response here will result in
1931 * (((AsyncResult)response.obj).result) == null and
1932 * (((AsyncResult)response.obj).exception) being an instance of
1933 * com.android.internal.telephony.gsm.CommandException
1939 #define RIL_REQUEST_OEM_HOOK_RAW 59
1942 * RIL_REQUEST_OEM_HOOK_STRINGS
1944 * This request reserved for OEM-specific uses. It passes strings
1947 * It can be invoked on the Java side from
1948 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
1950 * "data" is a const char **, representing an array of null-terminated UTF-8
1951 * strings copied from the "String[] strings" argument to
1952 * invokeOemRilRequestStrings()
1954 * "response" is a const char **, representing an array of null-terminated UTF-8
1955 * stings that will be returned via the caller's response message here:
1957 * (String[])(((AsyncResult)response.obj).result)
1959 * An error response here will result in
1960 * (((AsyncResult)response.obj).result) == null and
1961 * (((AsyncResult)response.obj).exception) being an instance of
1962 * com.android.internal.telephony.gsm.CommandException
1968 #define RIL_REQUEST_OEM_HOOK_STRINGS 60
1971 * RIL_REQUEST_SCREEN_STATE
1973 * Indicates the current state of the screen. When the screen is off, the
1974 * RIL should notify the baseband to suppress certain notifications (eg,
1975 * signal strength and changes in LAC or CID) in an effort to conserve power.
1976 * These notifications should resume when the screen is on.
1979 * ((int *)data)[0] is == 1 for "Screen On"
1980 * ((int *)data)[0] is == 0 for "Screen Off"
1982 * "response" is NULL
1988 #define RIL_REQUEST_SCREEN_STATE 61
1992 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
1994 * Enables/disables supplementary service related notifications
1997 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2000 * ((int *)data)[0] is == 1 for notifications enabled
2001 * ((int *)data)[0] is == 0 for notifications disabled
2003 * "response" is NULL
2007 * RADIO_NOT_AVAILABLE
2010 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2012 #define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2015 * RIL_REQUEST_WRITE_SMS_TO_SIM
2017 * Stores a SMS message to SIM memory.
2019 * "data" is RIL_SMS_WriteArgs *
2021 * "response" is int *
2022 * ((const int *)response)[0] is the record index where the message is stored.
2029 #define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2032 * RIL_REQUEST_DELETE_SMS_ON_SIM
2034 * Deletes a SMS message from SIM memory.
2037 * ((int *)data)[0] is the record index of the message to delete.
2039 * "response" is NULL
2046 #define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2049 * RIL_REQUEST_SET_BAND_MODE
2051 * Assign a specified band for RF configuration.
2054 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2055 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2056 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2057 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2058 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2059 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2060 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2061 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2062 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2063 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2064 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2065 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2066 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2067 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2068 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2069 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2070 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2071 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2072 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
2074 * "response" is NULL
2078 * RADIO_NOT_AVAILABLE
2081 #define RIL_REQUEST_SET_BAND_MODE 65
2084 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2086 * Query the list of band mode supported by RF.
2090 * "response" is int *
2091 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2092 * each available band mode.
2094 * 0 for "unspecified" (selected by baseband automatically)
2095 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2096 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2097 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2098 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2099 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2100 * 6 for "Cellular (800-MHz Band)"
2101 * 7 for "PCS (1900-MHz Band)"
2102 * 8 for "Band Class 3 (JTACS Band)"
2103 * 9 for "Band Class 4 (Korean PCS Band)"
2104 * 10 for "Band Class 5 (450-MHz Band)"
2105 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2106 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2107 * 13 for "Band Class 8 (1800-MHz Band)"
2108 * 14 for "Band Class 9 (900-MHz Band)"
2109 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2110 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2111 * 17 for "Band Class 15 (AWS Band)"
2112 * 18 for "Band Class 16 (US 2.5-GHz Band)"
2116 * RADIO_NOT_AVAILABLE
2119 * See also: RIL_REQUEST_SET_BAND_MODE
2121 #define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2124 * RIL_REQUEST_STK_GET_PROFILE
2126 * Requests the profile of SIM tool kit.
2127 * The profile indicates the SAT/USAT features supported by ME.
2128 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2132 * "response" is a const char * containing SAT/USAT profile
2133 * in hexadecimal format string starting with first byte of terminal profile
2137 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2138 * RIL_E_GENERIC_FAILURE
2140 #define RIL_REQUEST_STK_GET_PROFILE 67
2143 * RIL_REQUEST_STK_SET_PROFILE
2145 * Download the STK terminal profile as part of SIM initialization
2148 * "data" is a const char * containing SAT/USAT profile
2149 * in hexadecimal format string starting with first byte of terminal profile
2151 * "response" is NULL
2155 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2156 * RIL_E_GENERIC_FAILURE
2158 #define RIL_REQUEST_STK_SET_PROFILE 68
2161 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2163 * Requests to send a SAT/USAT envelope command to SIM.
2164 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2166 * "data" is a const char * containing SAT/USAT command
2167 * in hexadecimal format string starting with command tag
2169 * "response" is a const char * containing SAT/USAT response
2170 * in hexadecimal format string starting with first byte of response
2175 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2176 * RIL_E_GENERIC_FAILURE
2178 #define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2181 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2183 * Requests to send a terminal response to SIM for a received
2186 * "data" is a const char * containing SAT/USAT response
2187 * in hexadecimal format string starting with first byte of response data
2189 * "response" is NULL
2193 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2194 * RIL_E_GENERIC_FAILURE
2196 #define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
2199 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
2201 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
2202 * been initialized by ME already. (We could see the call has been in the 'call
2203 * list') So, STK application needs to accept/reject the call according as user
2207 * ((int *)data)[0] is > 0 for "accept" the call setup
2208 * ((int *)data)[0] is == 0 for "reject" the call setup
2210 * "response" is NULL
2214 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2215 * RIL_E_GENERIC_FAILURE
2217 #define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
2220 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
2222 * Connects the two calls and disconnects the subscriber from both calls.
2225 * "response" is NULL
2229 * RADIO_NOT_AVAILABLE (radio resetting)
2232 #define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
2235 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2237 * Requests to set the preferred network type for searching and registering
2238 * (CS/PS domain, RAT, and operation mode)
2242 * ((int *)data)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
2243 * ((int *)data)[0] is == 1 for GSM only
2244 * ((int *)data)[0] is == 2 for WCDMA only
2245 * ((int *)data)[0] is == 3 for GSM/WCDMA (auto mode)
2246 * ((int *)data)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2247 * ((int *)data)[0] is == 5 for CDMA only
2248 * ((int *)data)[0] is == 6 for EvDo only
2249 * ((int *)data)[0] is == 7 for GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
2251 * "response" is NULL
2255 * RADIO_NOT_AVAILABLE (radio resetting)
2257 * MODE_NOT_SUPPORTED
2259 #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2262 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2264 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2265 * for searching and registering
2269 * "response" is int *
2270 * ((int *)response)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
2271 * ((int *)response)[0] is == 1 for GSM only
2272 * ((int *)response)[0] is == 2 for WCDMA only
2273 * ((int *)response)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL)
2274 * ((int *)response)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2275 * ((int *)response)[0] is == 5 for CDMA only
2276 * ((int *)response)[0] is == 6 for EvDo only
2277 * ((int *)response)[0] is == 7 for GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
2281 * RADIO_NOT_AVAILABLE
2284 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2286 #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2289 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2291 * Request neighboring cell id in GSM network
2294 * "response" must be a " const RIL_NeighboringCell** "
2298 * RADIO_NOT_AVAILABLE
2301 #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
2304 * RIL_REQUEST_SET_LOCATION_UPDATES
2306 * Enables/disables network state change notifications due to changes in
2307 * LAC and/or CID (basically, +CREG=2 vs. +CREG=1).
2309 * Note: The RIL implementation should default to "updates enabled"
2310 * when the screen is on and "updates disabled" when the screen is off.
2313 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
2314 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
2316 * "response" is NULL
2320 * RADIO_NOT_AVAILABLE
2323 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2325 #define RIL_REQUEST_SET_LOCATION_UPDATES 76
2328 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION
2330 * Request to set the location where the CDMA subscription shall
2334 * ((int *)data)[0] is == 0 from RUIM/SIM (default)
2335 * ((int *)data)[0] is == 1 from NV
2337 * "response" is NULL
2341 * RADIO_NOT_AVAILABLE
2344 * SUBSCRIPTION_NOT_AVAILABLE
2346 #define RIL_REQUEST_CDMA_SET_SUBSCRIPTION 77
2349 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
2351 * Request to set the roaming preferences in CDMA
2354 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
2355 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2356 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
2358 * "response" is NULL
2362 * RADIO_NOT_AVAILABLE
2365 #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
2368 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
2370 * Request the actual setting of the roaming preferences in CDMA in the modem
2374 * "response" is int *
2375 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
2376 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2377 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
2379 * "response" is NULL
2383 * RADIO_NOT_AVAILABLE
2386 #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
2389 * RIL_REQUEST_SET_TTY_MODE
2391 * Request to set the TTY mode
2394 * ((int *)data)[0] is == 0 for TTY off
2395 * ((int *)data)[0] is == 1 for TTY Full
2396 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
2397 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
2399 * "response" is NULL
2403 * RADIO_NOT_AVAILABLE
2406 #define RIL_REQUEST_SET_TTY_MODE 80
2409 * RIL_REQUEST_QUERY_TTY_MODE
2411 * Request the setting of TTY mode
2415 * "response" is int *
2416 * ((int *)response)[0] is == 0 for TTY off
2417 * ((int *)response)[0] is == 1 for TTY Full
2418 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
2419 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
2421 * "response" is NULL
2425 * RADIO_NOT_AVAILABLE
2428 #define RIL_REQUEST_QUERY_TTY_MODE 81
2431 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
2433 * Request to set the preferred voice privacy mode used in voice
2437 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2438 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
2440 * "response" is NULL
2444 * RADIO_NOT_AVAILABLE
2447 #define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
2450 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
2452 * Request the setting of preferred voice privacy mode
2456 * "response" is int *
2457 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2458 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
2460 * "response" is NULL
2464 * RADIO_NOT_AVAILABLE
2467 #define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
2470 * RIL_REQUEST_CDMA_FLASH
2474 * "data" is const char *
2475 * ((const char *)data)[0] is a FLASH string
2477 * "response" is NULL
2481 * RADIO_NOT_AVAILABLE
2485 #define RIL_REQUEST_CDMA_FLASH 84
2488 * RIL_REQUEST_CDMA_BURST_DTMF
2492 * "data" is const char *
2493 * ((const char *)data)[0] is a DTMF string
2495 * "response" is NULL
2499 * RADIO_NOT_AVAILABLE
2503 #define RIL_REQUEST_CDMA_BURST_DTMF 85
2506 * RIL_REQUEST_CDMA_VALIDATE_AKEY
2510 * "data" is const char *
2511 * ((const char *)data)[0] is a AKey string
2513 * "response" is NULL
2517 * RADIO_NOT_AVAILABLE
2521 #define RIL_REQUEST_CDMA_VALIDATE_AKEY 86
2524 * RIL_REQUEST_CDMA_SEND_SMS
2526 * Send a CDMA SMS message
2528 * "data" is const RIL_CDMA_SMS_Message *
2530 * "response" is a const RIL_SMS_Response *
2534 * RADIO_NOT_AVAILABLE
2535 * SMS_SEND_FAIL_RETRY
2539 #define RIL_REQUEST_CDMA_SEND_SMS 87
2542 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
2544 * Acknowledge the success or failure in the receipt of SMS
2545 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
2547 * "data" is const RIL_CDMA_SMS_Ack *
2549 * "response" is NULL
2553 * RADIO_NOT_AVAILABLE
2557 #define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
2560 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
2562 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
2566 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
2567 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
2571 * RADIO_NOT_AVAILABLE
2575 #define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
2578 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
2580 * Set GSM/WCDMA Cell Broadcast SMS config
2582 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
2583 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
2585 * "response" is NULL
2589 * RADIO_NOT_AVAILABLE
2593 #define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
2596 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
2598 * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
2600 * "data" is const int *
2601 * (const int *)data[0] indicates to activate or turn off the
2602 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
2603 * 0 - Activate, 1 - Turn off
2605 * "response" is NULL
2609 * RADIO_NOT_AVAILABLE
2613 #define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
2616 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
2618 * Request the setting of CDMA Broadcast SMS config
2622 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
2623 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
2627 * RADIO_NOT_AVAILABLE
2631 #define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
2634 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
2636 * Set CDMA Broadcast SMS config
2638 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
2639 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
2641 * "response" is NULL
2645 * RADIO_NOT_AVAILABLE
2649 #define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
2652 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
2654 * Enable or disable the reception of CDMA Broadcast SMS
2656 * "data" is const int *
2657 * (const int *)data[0] indicates to activate or turn off the
2658 * reception of CDMA Broadcast SMS, 0-1,
2659 * 0 - Activate, 1 - Turn off
2661 * "response" is NULL
2665 * RADIO_NOT_AVAILABLE
2669 #define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
2672 * RIL_REQUEST_CDMA_SUBSCRIPTION
2674 * Request the device MDN / H_SID / H_NID.
2676 * The request is only allowed when CDMA subscription is available. When CDMA
2677 * subscription is changed, application layer should re-issue the request to
2678 * update the subscription information.
2680 * If a NULL value is returned for any of the device id, it means that error
2681 * accessing the device.
2683 * "response" is const char **
2684 * ((const char **)response)[0] is MDN if CDMA subscription is available
2685 * ((const char **)response)[1] is H_SID (Home SID) if CDMA subscription is available
2686 * ((const char **)response)[2] is H_NID (Home NID) if CDMA subscription is available
2687 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
2688 * ((const char **)response)[4] is PRL version if CDMA subscription is available
2692 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
2695 #define RIL_REQUEST_CDMA_SUBSCRIPTION 95
2698 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
2700 * Stores a CDMA SMS message to RUIM memory.
2702 * "data" is RIL_CDMA_SMS_WriteArgs *
2704 * "response" is int *
2705 * ((const int *)response)[0] is the record index where the message is stored.
2709 * RADIO_NOT_AVAILABLE
2713 #define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
2716 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
2718 * Deletes a CDMA SMS message from RUIM memory.
2721 * ((int *)data)[0] is the record index of the message to delete.
2723 * "response" is NULL
2727 * RADIO_NOT_AVAILABLE
2731 #define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
2734 * RIL_REQUEST_DEVICE_IDENTITY
2736 * Request the device ESN / MEID / IMEI / IMEISV.
2738 * The request is always allowed and contains GSM and CDMA device identity;
2739 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
2740 * RIL_REQUEST_GET_IMEISV.
2742 * If a NULL value is returned for any of the device id, it means that error
2743 * accessing the device.
2745 * When CDMA subscription is changed the ESN/MEID may change. The application
2746 * layer should re-issue the request to update the device identity in this case.
2748 * "response" is const char **
2749 * ((const char **)response)[0] is IMEI if GSM subscription is available
2750 * ((const char **)response)[1] is IMEISV if GSM subscription is available
2751 * ((const char **)response)[2] is ESN if CDMA subscription is available
2752 * ((const char **)response)[3] is MEID if CDMA subscription is available
2756 * RADIO_NOT_AVAILABLE
2759 #define RIL_REQUEST_DEVICE_IDENTITY 98
2762 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
2764 * Request the radio's system selection module to exit emergency
2765 * callback mode. RIL will not respond with SUCCESS until the modem has
2766 * completely exited from Emergency Callback Mode.
2770 * "response" is NULL
2774 * RADIO_NOT_AVAILABLE
2778 #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
2781 * RIL_REQUEST_GET_SMSC_ADDRESS
2783 * Queries the default Short Message Service Center address on the device.
2787 * "response" is const char * containing the SMSC address.
2791 * RADIO_NOT_AVAILABLE
2795 #define RIL_REQUEST_GET_SMSC_ADDRESS 100
2798 * RIL_REQUEST_SET_SMSC_ADDRESS
2800 * Sets the default Short Message Service Center address on the device.
2802 * "data" is const char * containing the SMSC address.
2804 * "response" is NULL
2808 * RADIO_NOT_AVAILABLE
2812 #define RIL_REQUEST_SET_SMSC_ADDRESS 101
2815 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
2817 * Indicates whether there is storage available for new SMS messages.
2820 * ((int *)data)[0] is 1 if memory is available for storing new messages
2821 * is 0 if memory capacity is exceeded
2823 * "response" is NULL
2827 * RADIO_NOT_AVAILABLE
2831 #define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
2834 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
2836 * Indicates that the StkSerivce is running and is
2837 * ready to receive RIL_UNSOL_STK_XXXXX commands.
2840 * "response" is NULL
2844 * RADIO_NOT_AVAILABLE
2848 #define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
2851 /***********************************************************************/
2854 #define RIL_UNSOL_RESPONSE_BASE 1000
2857 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
2859 * Indicate when value of RIL_RadioState has changed.
2861 * Callee will invoke RIL_RadioStateRequest method on main thread
2866 #define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
2870 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
2872 * Indicate when call state has changed
2874 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
2878 * Response should be invoked on, for example,
2879 * "RING", "BUSY", "NO CARRIER", and also call state
2880 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
2882 * Redundent or extraneous invocations are tolerated
2884 #define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
2888 * RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2890 * Called when network state, operator name, or GPRS state has changed
2891 * Basically on, +CREG and +CGREG
2893 * Callee will invoke the following requests on main thread:
2895 * RIL_REQUEST_REGISTRATION_STATE
2896 * RIL_REQUEST_GPRS_REGISTRATION_STATE
2897 * RIL_REQUEST_OPERATOR
2901 * FIXME should this happen when SIM records are loaded? (eg, for
2904 #define RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 1002
2907 * RIL_UNSOL_RESPONSE_NEW_SMS
2909 * Called when new SMS is received.
2911 * "data" is const char *
2912 * This is a pointer to a string containing the PDU of an SMS-DELIVER
2913 * as an ascii string of hex digits. The PDU starts with the SMSC address
2914 * per TS 27.005 (+CMT:)
2916 * Callee will subsequently confirm the receipt of thei SMS with a
2917 * RIL_REQUEST_SMS_ACKNOWLEDGE
2919 * No new RIL_UNSOL_RESPONSE_NEW_SMS
2920 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
2921 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
2924 #define RIL_UNSOL_RESPONSE_NEW_SMS 1003
2927 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
2929 * Called when new SMS Status Report is received.
2931 * "data" is const char *
2932 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
2933 * as an ascii string of hex digits. The PDU starts with the SMSC address
2934 * per TS 27.005 (+CDS:).
2936 * Callee will subsequently confirm the receipt of the SMS with a
2937 * RIL_REQUEST_SMS_ACKNOWLEDGE
2939 * No new RIL_UNSOL_RESPONSE_NEW_SMS
2940 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
2941 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
2944 #define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
2947 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
2949 * Called when new SMS has been stored on SIM card
2951 * "data" is const int *
2952 * ((const int *)data)[0] contains the slot index on the SIM that contains
2956 #define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
2961 * Called when a new USSD message is received.
2963 * "data" is const char **
2964 * ((const char **)data)[0] points to a type code, which is
2965 * one of these string values:
2966 * "0" USSD-Notify -- text in ((const char **)data)[1]
2967 * "1" USSD-Request -- text in ((const char **)data)[1]
2968 * "2" Session terminated by network
2969 * "3" other local client (eg, SIM Toolkit) has responded
2970 * "4" Operation not supported
2971 * "5" Network timeout
2973 * The USSD session is assumed to persist if the type code is "1", otherwise
2974 * the current session (if any) is assumed to have terminated.
2976 * ((const char **)data)[1] points to a message string if applicable, which
2977 * should always be in UTF-8.
2979 #define RIL_UNSOL_ON_USSD 1006
2980 /* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
2983 * RIL_UNSOL_ON_USSD_REQUEST
2985 * Obsolete. Send via RIL_UNSOL_ON_USSD
2987 #define RIL_UNSOL_ON_USSD_REQUEST 1007
2991 * RIL_UNSOL_NITZ_TIME_RECEIVED
2993 * Called when radio has received a NITZ time message
2995 * "data" is const char * pointing to NITZ time string
2996 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
2998 #define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
3001 * RIL_UNSOL_SIGNAL_STRENGTH
3003 * Radio may report signal strength rather han have it polled.
3005 * "data" is a const RIL_SignalStrength *
3007 #define RIL_UNSOL_SIGNAL_STRENGTH 1009
3011 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
3013 * Indicate a PDP context state has changed, or a new context
3014 * has been activated or deactivated
3015 * replaces RIL_UNSOL_PDP_CONTEXT_LIST_CHANGED
3017 * "data" is an array of RIL_Data_Call_Response identical to that
3018 * returned by RIL_REQUEST_DATA_CALL_LIST
3020 * See also: RIL_REQUEST_DATA_CALL_LIST
3023 #define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
3026 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
3028 * Reports supplementary service related notification from the network.
3030 * "data" is a const RIL_SuppSvcNotification *
3034 #define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
3037 * RIL_UNSOL_STK_SESSION_END
3039 * Indicate when STK session is terminated by SIM.
3043 #define RIL_UNSOL_STK_SESSION_END 1012
3046 * RIL_UNSOL_STK_PROACTIVE_COMMAND
3048 * Indicate when SIM issue a STK proactive command to applications
3050 * "data" is a const char * containing SAT/USAT proactive command
3051 * in hexadecimal format string starting with command tag
3054 #define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
3057 * RIL_UNSOL_STK_EVENT_NOTIFY
3059 * Indicate when SIM notifies applcations some event happens.
3060 * Generally, application does not need to have any feedback to
3061 * SIM but shall be able to indicate appropriate messages to users.
3063 * "data" is a const char * containing SAT/USAT commands or responses
3064 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
3065 * starting with first byte of response data or command tag
3068 #define RIL_UNSOL_STK_EVENT_NOTIFY 1014
3071 * RIL_UNSOL_STK_CALL_SETUP
3073 * Indicate when SIM wants application to setup a voice call.
3075 * "data" is const int *
3076 * ((const int *)data)[0] contains timeout value (in milliseconds)
3078 #define RIL_UNSOL_STK_CALL_SETUP 1015
3081 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
3083 * Indicates that SMS storage on the SIM is full. Sent when the network
3084 * attempts to deliver a new SMS message. Messages cannot be saved on the
3085 * SIM until space is freed. In particular, incoming Class 2 messages
3091 #define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
3094 * RIL_UNSOL_SIM_REFRESH
3096 * Indicates that file(s) on the SIM have been updated, or the SIM
3097 * has been reinitialized.
3099 * "data" is an int *
3100 * ((int *)data)[0] is a RIL_SimRefreshResult.
3101 * ((int *)data)[1] is the EFID of the updated file if the result is
3102 * SIM_FILE_UPDATE or NULL for any other result.
3104 * Note: If the radio state changes as a result of the SIM refresh (eg,
3105 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3108 #define RIL_UNSOL_SIM_REFRESH 1017
3111 * RIL_UNSOL_CALL_RING
3113 * Ring indication for an incoming call (eg, RING or CRING event).
3115 * "data" is null for GSM
3116 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
3118 #define RIL_UNSOL_CALL_RING 1018
3121 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
3123 * Indicates that SIM state changes.
3125 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
3129 #define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
3132 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3134 * Called when new CDMA SMS is received
3136 * "data" is const RIL_CDMA_SMS_Message *
3138 * Callee will subsequently confirm the receipt of the SMS with
3139 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
3141 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
3142 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
3145 #define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
3148 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
3150 * Called when new Broadcast SMS is received
3152 * "data" is const char * of 88 bytes which indicates each page
3153 * of a CBS Message sent to the MS by the BTS as coded in 3GPP
3154 * 23.041 Section 9.4.1.1
3157 #define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
3160 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
3162 * Indicates that SMS storage on the RUIM is full. Messages
3163 * cannot be saved on the RUIM until space is freed.
3168 #define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
3171 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
3173 * Indicates a restricted state change (eg, for Domain Specific Access Control).
3175 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
3177 * "data" is an int *
3178 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
3180 #define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
3183 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
3185 * Indicates that the radio system selection module has
3186 * autonomously entered emergency callback mode.
3191 #define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
3194 * RIL_UNSOL_CDMA_CALL_WAITING
3196 * Called when CDMA radio receives a call waiting indication.
3198 * "data" is const RIL_CDMA_CallWaiting *
3201 #define RIL_UNSOL_CDMA_CALL_WAITING 1025
3204 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
3206 * Called when CDMA radio receives an update of the progress of an
3209 * "data" is const int *
3210 * For CDMA this is an integer OTASP/OTAPA status listed in
3211 * RIL_CDMA_OTA_ProvisionStatus.
3214 #define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
3217 * RIL_UNSOL_CDMA_INFO_REC
3219 * Called when CDMA radio receives one or more info recs.
3221 * "data" is const RIL_CDMA_InformationRecords *
3224 #define RIL_UNSOL_CDMA_INFO_REC 1027
3227 * RIL_UNSOL_OEM_HOOK_RAW
3229 * This is for OEM specific use.
3231 * "data" is a byte[]
3233 #define RIL_UNSOL_OEM_HOOK_RAW 1028
3235 /***********************************************************************/
3239 * RIL_Request Function pointer
3241 * @param request is one of RIL_REQUEST_*
3242 * @param data is pointer to data defined for that RIL_REQUEST_*
3243 * data is owned by caller, and should not be modified or freed by callee
3244 * @param t should be used in subsequent call to RIL_onResponse
3245 * @param datalen the length of data
3248 typedef void (*RIL_RequestFunc) (int request, void *data,
3249 size_t datalen, RIL_Token t);
3252 * This function should return the current radio state synchronously
3254 typedef RIL_RadioState (*RIL_RadioStateRequest)();
3257 * This function returns "1" if the specified RIL_REQUEST code is
3258 * supported and 0 if it is not
3260 * @param requestCode is one of RIL_REQUEST codes
3263 typedef int (*RIL_Supports)(int requestCode);
3266 * This function is called from a separate thread--not the
3267 * thread that calls RIL_RequestFunc--and indicates that a pending
3268 * request should be cancelled.
3270 * On cancel, the callee should do its best to abandon the request and
3271 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
3273 * Subsequent calls to RIL_onRequestComplete for this request with
3274 * other results will be tolerated but ignored. (That is, it is valid
3275 * to ignore the cancellation request)
3277 * RIL_Cancel calls should return immediately, and not wait for cancellation
3279 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
3282 * @param t token wants to be canceled
3285 typedef void (*RIL_Cancel)(RIL_Token t);
3287 typedef void (*RIL_TimedCallback) (void *param);
3290 * Return a version string for your RIL implementation
3292 typedef const char * (*RIL_GetVersion) (void);
3295 int version; /* set to RIL_VERSION */
3296 RIL_RequestFunc onRequest;
3297 RIL_RadioStateRequest onStateRequest;
3298 RIL_Supports supports;
3299 RIL_Cancel onCancel;
3300 RIL_GetVersion getVersion;
3301 } RIL_RadioFunctions;
3306 * "t" is parameter passed in on previous call to RIL_Notification
3309 * If "e" != SUCCESS, then response can be null/is ignored
3311 * "response" is owned by caller, and should not be modified or
3314 * RIL_onRequestComplete will return as soon as possible
3316 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
3317 void *response, size_t responselen);
3320 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
3321 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3323 * "data" is owned by caller, and should not be modified or freed by callee
3326 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
3330 * Call user-specifed "callback" function on on the same thread that
3331 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3332 * a relative time value at which the callback is invoked. If relativeTime is
3333 * NULL or points to a 0-filled structure, the callback will be invoked as
3337 void (*RequestTimedCallback) (RIL_TimedCallback callback,
3338 void *param, const struct timeval *relativeTime);
3343 * RIL implementations must defined RIL_Init
3344 * argc and argv will be command line arguments intended for the RIL implementation
3345 * Return NULL on error
3347 * @param env is environment point defined as RIL_Env
3348 * @param argc number of arguments
3349 * @param argv list fo arguments
3352 const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
3354 #else /* RIL_SHLIB */
3357 * Call this once at startup to register notification routine
3359 * @param callbacks user-specifed callback function
3361 void RIL_register (const RIL_RadioFunctions *callbacks);
3366 * RIL_onRequestComplete will return as soon as possible
3368 * @param t is parameter passed in on previous call to RIL_Notification
3370 * @param e error code
3371 * if "e" != SUCCESS, then response can be null/is ignored
3372 * @param response is owned by caller, and should not be modified or
3374 * @param responselen the length of response in byte
3376 void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
3377 void *response, size_t responselen);
3380 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
3381 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3382 * "data" is owned by caller, and should not be modified or freed by callee
3383 * @param datalen the length of data in byte
3386 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
3391 * Call user-specifed "callback" function on on the same thread that
3392 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3393 * a relative time value at which the callback is invoked. If relativeTime is
3394 * NULL or points to a 0-filled structure, the callback will be invoked as
3397 * @param callback user-specifed callback function
3398 * @param param parameter list
3399 * @param relativeTime a relative time value at which the callback is invoked
3402 void RIL_requestTimedCallback (RIL_TimedCallback callback,
3403 void *param, const struct timeval *relativeTime);
3406 #endif /* RIL_SHLIB */
3412 #endif /*ANDROID_RIL_H*/