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 typedef void * RIL_Token;
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,
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
64 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
66 RIL_E_MODE_NOT_SUPPORTED = 13 /* HW does not support preferred network type */
72 RIL_CALL_DIALING = 2, /* MO call only */
73 RIL_CALL_ALERTING = 3, /* MO call only */
74 RIL_CALL_INCOMING = 4, /* MT call only */
75 RIL_CALL_WAITING = 5 /* MT call only */
79 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
80 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
81 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
82 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
83 personalization locked, or SIM absent */
84 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
85 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
86 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
87 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
88 personalization locked, or RUIM absent */
89 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
90 RADIO_STATE_NV_READY = 9 /* Radio is on and the NV interface is available */
93 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
95 char isPresent; /* non-zero if signal information record is present */
96 char signalType; /* as defined 3.7.5.5-1 */
97 char alertPitch; /* as defined 3.7.5.5-2 */
98 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
99 } RIL_CDMA_SignalInfoRecord;
101 // NEWRIL:TODO Remove #define NEWRIL and RIL_CallOld when we have the new ril
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 * number; /* Remote party number */
114 char numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
120 int index; /* Connection Index for use with, eg, AT+CHLD */
121 int toa; /* type of address, eg 145 = intl */
122 char isMpty; /* nonzero if is mpty call */
123 char isMT; /* nonzero if call is mobile terminated */
124 char als; /* ALS line indicator if available
126 char isVoice; /* nonzero if this is is a voice call */
127 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
128 char * number; /* Remote party number */
129 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
130 char * name; /* Remote party name */
131 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
135 int cid; /* Context ID */
136 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
137 char * type; /* X.25, IP, IPV6, etc. */
140 } RIL_Data_Call_Response;
143 int messageRef; /*TP-Message-Reference*/
144 char *ackPDU; /* or NULL if n/a */
147 /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
149 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
150 /* 0 = "REC UNREAD" */
152 /* 2 = "STO UNSENT" */
154 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
155 the TP-layer length is "strlen(pdu)/2". */
156 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
157 (as expected by TS 27.005) or NULL for default SMSC */
160 /** Used by RIL_REQUEST_DIAL */
164 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
165 * clir == 0 on "use subscription default value"
166 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
167 * clir == 2 on "CLIR suppression" (allow CLI presentation)
172 int command; /* one of the commands listed for TS 27.007 +CRSM*/
173 int fileid; /* EF id */
174 char *path; /* "pathid" from TS 27.007 +CRSM command.
175 Path is in hex asciii format eg "7f205f70"
176 Path must always be provided.
181 char *data; /* May be NULL*/
182 char *pin2; /* May be NULL*/
188 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
189 } RIL_SIM_IO_Response;
191 /* See also com.android.internal.telephony.gsm.CallForwardInfo */
195 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
196 * status 1 = active, 0 = not active
198 * For RIL_REQUEST_SET_CALL_FORWARD:
207 int reason; /* from TS 27.007 7.11 "reason" */
208 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
209 See table for Android mapping from
211 0 means user doesn't input class */
212 int toa; /* "type" from TS 27.007 7.11 */
213 char * number; /* "number" from TS 27.007 7.11. May be NULL */
214 int timeSeconds; /* for CF no reply only */
215 }RIL_CallForwardInfo;
218 char * cid; /* Cell Id (as described in TS 27.005) in 16 bits in GSM
219 * Primary Scrambling Code (as described in TS 25.331)
221 * Valid values are hexadecimal 0x0000 - 0xffff.
223 int rssi; /* Received RSSI in 2G,
224 * Level index of CPICH Received Signal Code Power in 3G
226 } RIL_NeighboringCell;
228 /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
230 CALL_FAIL_NORMAL = 16,
232 CALL_FAIL_CONGESTION = 34,
233 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
234 CALL_FAIL_CALL_BARRED = 240,
235 CALL_FAIL_FDN_BLOCKED = 241,
236 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
237 CALL_FAIL_CDMA_DROP = 1001,
238 CALL_FAIL_CDMA_INTERCEPT = 1002,
239 CALL_FAIL_CDMA_REORDER = 1003,
240 CALL_FAIL_CDMA_SO_REJECT = 1004,
241 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
242 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
243 CALL_FAIL_CDMA_PREEMPTED = 1007,
244 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
245 during emergency callback mode */
246 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
247 } RIL_LastCallFailCause;
249 /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
251 PDP_FAIL_BARRED = 8, /* no retry; prompt user */
252 PDP_FAIL_BAD_APN = 27, /* no retry; prompt user */
253 PDP_FAIL_USER_AUTHENTICATION = 29, /* no retry; prompt user */
254 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 32, /*no retry; prompt user */
255 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 33, /*no retry; prompt user */
256 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff /* This and all other cases: retry silently */
257 } RIL_LastDataCallActivateFailCause;
259 /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
261 int notificationType; /*
262 * 0 = MO intermediate result code
263 * 1 = MT unsolicited result code
265 int code; /* See 27.007 7.17
268 int index; /* CUG index. See 27.007 7.17. */
269 int type; /* "type" from 27.007 7.17 (MT only). */
270 char * number; /* "number" from 27.007 7.17
271 (MT only, may be NULL). */
272 } RIL_SuppSvcNotification;
274 #define RIL_SIM_ABSENT 0
275 #define RIL_SIM_NOT_READY 1
276 /* RIL_SIM_READY means that the radio state is RADIO_STATE_SIM_READY.
278 * than "+CPIN: READY". It also means the radio is ready for SIM I/O
280 #define RIL_SIM_READY 2
281 #define RIL_SIM_PIN 3
282 #define RIL_SIM_PUK 4
283 #define RIL_SIM_NETWORK_PERSONALIZATION 5
285 /* see RIL_REQUEST_GET_SIM_STATUS */
287 #define RIL_CARD_MAX_APPS 8
290 RIL_CARDSTATE_ABSENT = 0,
291 RIL_CARDSTATE_PRESENT = 1,
292 RIL_CARDSTATE_ERROR = 2
296 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
297 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
298 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
299 since each app can only have 1 active perso
301 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
302 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
303 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
304 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
305 RIL_PERSOSUBSTATE_SIM_SIM = 7,
306 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
307 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
308 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
309 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
310 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
311 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
312 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
313 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
314 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
315 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
316 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
317 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
318 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
319 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
320 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
321 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
322 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
326 RIL_APPSTATE_UNKNOWN = 0,
327 RIL_APPSTATE_DETECTED = 1,
328 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
329 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
330 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
331 when app_state is assigned to this value */
332 RIL_APPSTATE_READY = 5
336 RIL_PINSTATE_UNKNOWN = 0,
337 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
338 RIL_PINSTATE_ENABLED_VERIFIED = 2,
339 RIL_PINSTATE_DISABLED = 3,
340 RIL_PINSTATE_ENABLED_BLOCKED = 4,
341 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
345 RIL_APPTYPE_UNKNOWN = 0,
347 RIL_APPTYPE_USIM = 2,
348 RIL_APPTYPE_RUIM = 3,
354 RIL_AppType app_type;
355 RIL_AppState app_state;
356 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
357 RIL_APPSTATE_SUBSCRIPTION_PERSO */
358 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
360 char *app_label_ptr; /* null terminated string */
361 int pin1_replaced; /* applicable to USIM and CSIM */
368 RIL_CardState card_state;
369 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
370 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
371 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
372 int num_applications; /* value <= RIL_CARD_MAX_APPS */
373 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
376 /* The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH */
378 /* A file on SIM has been updated. data[1] contains the EFID. */
380 /* SIM initialized. All files should be re-read. */
382 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
384 } RIL_SimRefreshResult;
387 char * number; /* Remote party number */
388 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
389 char * name; /* Remote party name */
390 RIL_CDMA_SignalInfoRecord signalInfoRecord;
391 } RIL_CDMA_CallWaiting;
393 /* Used by RIL_REQUEST_GET_BROADCAST_CONFIG and RIL_REQUEST_SET_BROADCAST_CONFIG */
398 unsigned char bSelected;
399 } RIL_BroadcastServiceInfo;
403 RIL_BroadcastServiceInfo *entries;
404 } RIL_BroadcastSMSConfig;
406 /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
407 #define RIL_RESTRICTED_STATE_NONE 0x00
408 /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
409 #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
410 /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
411 #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
412 /* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
413 #define RIL_RESTRICTED_STATE_CS_ALL 0x04
414 /* Block packet data access due to restriction. */
415 #define RIL_RESTRICTED_STATE_PS_ALL 0x10
417 /* The status for an OTASP/OTAPA session */
419 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
420 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
421 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
422 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
423 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
424 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
425 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
426 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
427 CDMA_OTA_PROVISION_STATUS_COMMITTED,
428 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
429 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
430 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
431 } RIL_CDMA_OTA_ProvisionStatus;
434 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
435 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
436 } RIL_GW_SignalStrength;
440 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
441 * multiplied by -1. Example: If the actual RSSI is -75, then this response
444 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
445 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
448 } RIL_CDMA_SignalStrength;
452 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
453 * multiplied by -1. Example: If the actual RSSI is -75, then this response
456 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
457 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
460 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
461 } RIL_EVDO_SignalStrength;
465 RIL_GW_SignalStrength GW_SignalStrength;
466 RIL_CDMA_SignalStrength CDMA_SignalStrength;
467 RIL_EVDO_SignalStrength EVDO_SignalStrength;
468 } RIL_SignalStrength;
470 /* Names of the CDMA info records (C.S0005 section 3.7.5) */
472 RIL_CDMA_DISPLAY_INFO_REC,
473 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
474 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
475 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
476 RIL_CDMA_SIGNAL_INFO_REC,
477 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
478 RIL_CDMA_LINE_CONTROL_INFO_REC,
479 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
480 RIL_CDMA_T53_CLIR_INFO_REC,
481 RIL_CDMA_T53_RELEASE_INFO_REC,
482 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
483 } RIL_CDMA_InfoRecName;
485 /* Display Info Rec as defined in C.S0005 section 3.7.5.1
486 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
487 Note: the Extended Display info rec contains multiple records of the
488 form: display_tag, display_len, and display_len occurrences of the
489 chari field if the display_tag is not 10000000 or 10000001.
490 To save space, the records are stored consecutively in a byte buffer.
491 The display_tag, display_len and chari fields are all 1 byte.
497 } RIL_CDMA_DisplayInfoRecord;
499 /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
500 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
501 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
511 } RIL_CDMA_NumberInfoRecord;
513 /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
515 RIL_REDIRECTING_REASON_UNKNOWN = 0,
516 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
517 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
518 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
519 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
520 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
521 RIL_REDIRECTING_REASON_RESERVED
522 } RIL_CDMA_RedirectingReason;
525 RIL_CDMA_NumberInfoRecord redirectingNumber;
526 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
527 RIL_CDMA_RedirectingReason redirectingReason;
528 } RIL_CDMA_RedirectingNumberInfoRecord;
530 /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
532 char lineCtrlPolarityIncluded;
534 char lineCtrlReverse;
535 char lineCtrlPowerDenial;
536 } RIL_CDMA_LineControlInfoRecord;
538 /* T53 CLIR Information Record */
541 } RIL_CDMA_T53_CLIRInfoRecord;
543 /* T53 Audio Control Information Record */
547 } RIL_CDMA_T53_AudioControlInfoRecord;
551 RIL_CDMA_InfoRecName name;
554 /* Display and Extended Display Info Rec */
555 RIL_CDMA_DisplayInfoRecord display;
557 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
558 RIL_CDMA_NumberInfoRecord number;
560 /* Signal Info Rec */
561 RIL_CDMA_SignalInfoRecord signal;
563 /* Redirecting Number Info Rec */
564 RIL_CDMA_RedirectingNumberInfoRecord redir;
566 /* Line Control Info Rec */
567 RIL_CDMA_LineControlInfoRecord lineCtrl;
569 /* T53 CLIR Info Rec */
570 RIL_CDMA_T53_CLIRInfoRecord clir;
572 /* T53 Audio Control Info Rec */
573 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
575 } RIL_CDMA_InformationRecord;
577 #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
580 char numberOfInfoRecs;
581 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
582 } RIL_CDMA_InformationRecords;
585 * RIL_REQUEST_GET_SIM_STATUS
587 * Requests status of the SIM interface and the SIM card
591 * "response" is const RIL_CardStatus *
594 * If the radio is off or unavailable, return RIL_SIM_NOT_READY
596 * Please note: RIL_SIM_READY means that the radio state
597 * is RADIO_STATE_SIM_READY. This is more than "+CPIN: READY".
598 * It also means the radio is ready for SIM I/O
603 #define RIL_REQUEST_GET_SIM_STATUS 1
606 * RIL_REQUEST_ENTER_SIM_PIN
608 * Supplies SIM PIN. Only called if SIM status is RIL_SIM_PIN
610 * "data" is const char **
611 * ((const char **)data)[0] is PIN value
613 * "response" must be NULL
618 * RADIO_NOT_AVAILABLE (radio resetting)
623 #define RIL_REQUEST_ENTER_SIM_PIN 2
627 * RIL_REQUEST_ENTER_SIM_PUK
629 * Supplies SIM PUK and new PIN.
631 * "data" is const char **
632 * ((const char **)data)[0] is PUK value
633 * ((const char **)data)[1] is new PIN value
635 * "response" must be NULL
640 * RADIO_NOT_AVAILABLE (radio resetting)
646 #define RIL_REQUEST_ENTER_SIM_PUK 3
649 * RIL_REQUEST_ENTER_SIM_PIN2
651 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
652 * returned as a a failure from a previous operation.
654 * "data" is const char **
655 * ((const char **)data)[0] is PIN2 value
657 * "response" must be NULL
662 * RADIO_NOT_AVAILABLE (radio resetting)
667 #define RIL_REQUEST_ENTER_SIM_PIN2 4
670 * RIL_REQUEST_ENTER_SIM_PUK2
672 * Supplies SIM PUK2 and new PIN2.
674 * "data" is const char **
675 * ((const char **)data)[0] is PUK2 value
676 * ((const char **)data)[1] is new PIN2 value
678 * "response" must be NULL
683 * RADIO_NOT_AVAILABLE (radio resetting)
689 #define RIL_REQUEST_ENTER_SIM_PUK2 5
692 * RIL_REQUEST_CHANGE_SIM_PIN
694 * Supplies old SIM PIN and new PIN.
696 * "data" is const char **
697 * ((const char **)data)[0] is old PIN value
698 * ((const char **)data)[1] is new PIN value
700 * "response" must be NULL
705 * RADIO_NOT_AVAILABLE (radio resetting)
708 * (old PIN is invalid)
712 #define RIL_REQUEST_CHANGE_SIM_PIN 6
716 * RIL_REQUEST_CHANGE_SIM_PIN2
718 * Supplies old SIM PIN2 and new PIN2.
720 * "data" is const char **
721 * ((const char **)data)[0] is old PIN2 value
722 * ((const char **)data)[1] is new PIN2 value
724 * "response" must be NULL
729 * RADIO_NOT_AVAILABLE (radio resetting)
732 * (old PIN2 is invalid)
736 #define RIL_REQUEST_CHANGE_SIM_PIN2 7
739 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
741 * Requests that network personlization be deactivated
743 * "data" is const char **
744 * ((const char **)(data))[0]] is network depersonlization code
746 * "response" must be NULL
751 * RADIO_NOT_AVAILABLE (radio resetting)
757 #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
760 * RIL_REQUEST_GET_CURRENT_CALLS
762 * Requests current call list
766 * "response" must be a "const RIL_Call **"
771 * RADIO_NOT_AVAILABLE (radio resetting)
773 * (request will be made again in a few hundred msec)
776 #define RIL_REQUEST_GET_CURRENT_CALLS 9
782 * Initiate voice call
784 * "data" is const RIL_Dial *
787 * This method is never used for supplementary service codes
791 * RADIO_NOT_AVAILABLE (radio resetting)
794 #define RIL_REQUEST_DIAL 10
797 * RIL_REQUEST_GET_IMSI
801 * Only valid when radio state is "RADIO_STATE_SIM_READY"
804 * "response" is a const char * containing the IMSI
808 * RADIO_NOT_AVAILABLE (radio resetting)
812 #define RIL_REQUEST_GET_IMSI 11
817 * Hang up a specific line (like AT+CHLD=1x)
820 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
826 * RADIO_NOT_AVAILABLE (radio resetting)
830 #define RIL_REQUEST_HANGUP 12
833 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
835 * Hang up waiting or held (like AT+CHLD=0)
842 * RADIO_NOT_AVAILABLE (radio resetting)
846 #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
849 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
851 * Hang up waiting or held (like AT+CHLD=1)
858 * RADIO_NOT_AVAILABLE (radio resetting)
862 #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
865 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
867 * Switch waiting or holding call and active call (like AT+CHLD=2)
869 * State transitions should be is follows:
871 * If call 1 is waiting and call 2 is active, then if this re
874 * Call 1 Call 2 Call 1 Call 2
875 * ACTIVE HOLDING HOLDING ACTIVE
876 * ACTIVE WAITING HOLDING ACTIVE
877 * HOLDING WAITING HOLDING ACTIVE
878 * ACTIVE IDLE HOLDING IDLE
879 * IDLE IDLE IDLE IDLE
886 * RADIO_NOT_AVAILABLE (radio resetting)
890 #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
891 #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
894 * RIL_REQUEST_CONFERENCE
896 * Conference holding and active (like AT+CHLD=3)
903 * RADIO_NOT_AVAILABLE (radio resetting)
906 #define RIL_REQUEST_CONFERENCE 16
911 * Send UDUB (user determined used busy) to ringing or
912 * waiting call answer)(RIL_BasicRequest r);
919 * RADIO_NOT_AVAILABLE (radio resetting)
922 #define RIL_REQUEST_UDUB 17
925 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
927 * Requests the failure cause code for the most recently terminated call
930 * "response" is a "int *"
931 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
932 * mapped to cause codes defined in TS 24.008 Annex H where possible.
934 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
935 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
937 * If the implementation does not have access to the exact cause codes,
938 * then it should return one of the values listed in RIL_LastCallFailCause,
939 * as the UI layer needs to distinguish these cases for tone generation or
940 * error notification.
944 * RADIO_NOT_AVAILABLE
947 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
949 #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
952 * RIL_REQUEST_SIGNAL_STRENGTH
954 * Requests current signal strength and associated information
956 * Must succeed if radio is on.
960 * "response" is a const RIL_SignalStrength *
964 * RADIO_NOT_AVAILABLE
966 #define RIL_REQUEST_SIGNAL_STRENGTH 19
969 * RIL_REQUEST_REGISTRATION_STATE
971 * Request current registration state
974 * "response" is a "char **"
975 * ((const char **)response)[0] is registration state 0-6,
976 * 0 - Not registered, MT is not currently searching
977 * a new operator to register
978 * 1 - Registered, home network
979 * 2 - Not registered, but MT is currently searching
980 * a new operator to register
981 * 3 - Registration denied
983 * 5 - Registered, roaming
984 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
985 * NULL if not.Valid LAC are 0x0000 - 0xffff
986 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
988 * Valid CID are 0x00000000 - 0xffffffff
989 * In GSM, CID is Cell ID (see TS 27.007)
991 * In UMTS, CID is UMTS Cell Identity
992 * (see TS 25.331) in 28 bits
993 * ((const char **)response)[3] indicates the available radio technology 0-7,
994 * 0 - Unknown, 1 - GPRS, 2 - EDGE, 3 - UMTS,
995 * 4 - IS95A, 5 - IS95B, 6 - 1xRTT,
996 * 7 - EvDo Rev. 0, 8 - EvDo Rev. A
997 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
998 * system or NULL if not. Base Station ID in
1000 * ((const char **)response)[5] is Base Station latitude if registered on a
1001 * CDMA system or NULL if not. Base Station
1002 * latitude in hexadecimal format
1003 * ((const char **)response)[6] is Base Station longitude if registered on a
1004 * CDMA system or NULL if not. Base Station
1005 * longitude in hexadecimal format
1006 * ((const char **)response)[7] is concurrent services support indicator if
1007 * registered on a CDMA system 0-1.
1008 * 0 - Concurrent services not supported,
1009 * 1 - Concurrent services supported
1010 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1011 * NULL if not. Valid System ID are 0 - 32767
1012 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1013 * NULL if not. Valid System ID are 0 - 65535
1014 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
1015 * on a CDMA system or NULL if not. Valid values
1017 * ((const char **)response)[11] indicates whether the current system is in the
1018 * PRL if registered on a CDMA system or NULL if
1019 * not. 0=not in the PRL, 1=in the PRL
1020 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
1021 * if registered on a CDMA system or NULL if not.
1022 * Valid values are 0-255.
1023 * ((const char **)response)[13] if registration state is 3 (Registration
1024 * denied) this is an enumerated reason why
1025 * registration was denied.
1026 * 0-General, 1-Authentication Failure
1028 * Please note that registration state 4 ("unknown") is treated
1029 * as "out of service" in the Android telephony system
1031 * Registration state 3 can be returned if Location Update Reject
1032 * (with cause 17 - Network Failure) is received repeatedly from the network,
1033 * to facilitate "managed roaming"
1037 * RADIO_NOT_AVAILABLE
1040 #define RIL_REQUEST_REGISTRATION_STATE 20
1043 * RIL_REQUEST_GPRS_REGISTRATION_STATE
1045 * Request current GPRS registration state
1048 * "response" is a "char **"
1049 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 7.2
1050 * ((const char **)response)[1] is LAC if registered or NULL if not
1051 * ((const char **)response)[2] is CID if registered or NULL if not
1052 * ((const char **)response)[3] indicates the available radio technology, where:
1058 * LAC and CID are in hexadecimal format.
1059 * valid LAC are 0x0000 - 0xffff
1060 * valid CID are 0x00000000 - 0x0fffffff
1062 * Please note that registration state 4 ("unknown") is treated
1063 * as "out of service" in the Android telephony system
1067 * RADIO_NOT_AVAILABLE
1070 #define RIL_REQUEST_GPRS_REGISTRATION_STATE 21
1073 * RIL_REQUEST_OPERATOR
1075 * Request current operator ONS or EONS
1078 * "response" is a "const char **"
1079 * ((const char **)response)[0] is long alpha ONS or EONS
1080 * or NULL if unregistered
1082 * ((const char **)response)[1] is short alpha ONS or EONS
1083 * or NULL if unregistered
1084 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1085 * or NULL if unregistered
1089 * RADIO_NOT_AVAILABLE
1092 #define RIL_REQUEST_OPERATOR 22
1095 * RIL_REQUEST_RADIO_POWER
1097 * Toggle radio on and off (for "airplane" mode)
1099 * ((int *)data)[0] is > 0 for "Radio On"
1100 * ((int *)data)[0] is == 0 for "Radio Off"
1102 * "response" is NULL
1104 * Turn radio on if "on" > 0
1105 * Turn radio off if "on" == 0
1109 * RADIO_NOT_AVAILABLE
1112 #define RIL_REQUEST_RADIO_POWER 23
1119 * If the implementation is currently playing a tone requested via
1120 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1121 * should be played instead
1123 * "data" is a char *
1124 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
1125 * ((char *)data)[1] is a single character with one of 3 values:
1126 * 'S' -- tone should be played for a short time
1127 * 'L' -- tone should be played for a long time
1128 * "response" is NULL
1130 * FIXME should this block/mute microphone?
1131 * How does this interact with local DTMF feedback?
1135 * RADIO_NOT_AVAILABLE
1138 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1141 #define RIL_REQUEST_DTMF 24
1144 * RIL_REQUEST_SEND_SMS
1146 * Send an SMS message
1148 * "data" is const char **
1149 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1150 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1151 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1152 * less the SMSC address
1153 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1155 * "response" is a const RIL_SMS_Response *
1157 * Based on the return error, caller decides to resend if sending sms
1158 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1159 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1163 * RADIO_NOT_AVAILABLE
1164 * SMS_SEND_FAIL_RETRY
1167 * FIXME how do we specify TP-Message-Reference if we need to resend?
1169 #define RIL_REQUEST_SEND_SMS 25
1173 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
1175 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1176 * except that more messages are expected to be sent soon. If possible,
1177 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1179 * "data" is const char **
1180 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1181 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1182 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1183 * less the SMSC address
1184 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1186 * "response" is a const RIL_SMS_Response *
1188 * Based on the return error, caller decides to resend if sending sms
1189 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1190 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1194 * RADIO_NOT_AVAILABLE
1195 * SMS_SEND_FAIL_RETRY
1199 #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1203 * RIL_REQUEST_SETUP_DATA_CALL
1205 * Setup a packet data connection
1207 * "data" is a const char **
1208 * ((const char **)data)[0] indicates whether to setup connection on radio technology CDMA
1209 * or GSM/UMTS, 0-1. 0 - CDMA, 1-GSM/UMTS
1211 * ((const char **)data)[1] Profile Number or NULL to indicate default profile
1212 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
1213 * override the one in the profile. NULL indicates no APN overrride.
1214 * ((const char **)data)[3] is the username for APN, or NULL
1215 * ((const char **)data)[4] is the password for APN, or NULL
1217 * "response" is a char **
1218 * ((char **)response)[0] indicating PDP CID, which is generated by RIL. This Connection ID is
1219 * used in GSM/UMTS and CDMA
1220 * ((char **)response)[1] indicating the network interface name for GSM/UMTS or CDMA
1221 * ((char **)response)[2] indicating the IP address for this interface for GSM/UMTS
1224 * FIXME may need way to configure QoS settings
1226 * replaces RIL_REQUEST_SETUP_DEFAULT_PDP
1230 * RADIO_NOT_AVAILABLE
1233 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
1235 #define RIL_REQUEST_SETUP_DATA_CALL 27
1240 * RIL_REQUEST_SIM_IO
1242 * Request SIM I/O operation.
1243 * This is similar to the TS 27.007 "restricted SIM" operation
1244 * where it assumes all of the EF selection will be done by the
1247 * "data" is a const RIL_SIM_IO *
1248 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1249 * or may specify a PIN2 for operations that require a PIN2 (eg
1250 * updating FDN records)
1252 * "response" is a const RIL_SIM_IO_Response *
1254 * Arguments and responses that are unused for certain
1255 * values of "command" should be ignored or set to NULL
1259 * RADIO_NOT_AVAILABLE
1264 #define RIL_REQUEST_SIM_IO 28
1267 * RIL_REQUEST_SEND_USSD
1269 * Send a USSD message
1271 * If a USSD session already exists, the message should be sent in the
1272 * context of that session. Otherwise, a new session should be created.
1274 * The network reply should be reported via RIL_UNSOL_ON_USSD
1276 * Only one USSD session may exist at a time, and the session is assumed
1278 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1279 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1280 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1282 * "data" is a const char * containing the USSD request in UTF-8 format
1283 * "response" is NULL
1287 * RADIO_NOT_AVAILABLE
1290 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1293 #define RIL_REQUEST_SEND_USSD 29
1296 * RIL_REQUEST_CANCEL_USSD
1298 * Cancel the current USSD session if one exists
1301 * "response" is NULL
1305 * RADIO_NOT_AVAILABLE
1309 #define RIL_REQUEST_CANCEL_USSD 30
1312 * RIL_REQUEST_GET_CLIR
1314 * Gets current CLIR status
1316 * "response" is int *
1317 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1318 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
1322 * RADIO_NOT_AVAILABLE
1325 #define RIL_REQUEST_GET_CLIR 31
1328 * RIL_REQUEST_SET_CLIR
1331 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1333 * "response" is NULL
1337 * RADIO_NOT_AVAILABLE
1340 #define RIL_REQUEST_SET_CLIR 32
1343 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
1345 * "data" is const RIL_CallForwardInfo *
1347 * "response" is const RIL_CallForwardInfo **
1348 * "response" points to an array of RIL_CallForwardInfo *'s, one for
1349 * each distinct registered phone number.
1351 * For example, if data is forwarded to +18005551212 and voice is forwarded
1352 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
1354 * If, however, both data and voice are forwarded to +18005551212, then
1355 * a single RIL_CallForwardInfo can be returned with the service class
1356 * set to "data + voice = 3")
1360 * RADIO_NOT_AVAILABLE
1363 #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
1367 * RIL_REQUEST_SET_CALL_FORWARD
1369 * Configure call forward rule
1371 * "data" is const RIL_CallForwardInfo *
1372 * "response" is NULL
1376 * RADIO_NOT_AVAILABLE
1379 #define RIL_REQUEST_SET_CALL_FORWARD 34
1383 * RIL_REQUEST_QUERY_CALL_WAITING
1385 * Query current call waiting state
1387 * "data" is const int *
1388 * ((const int *)data)[0] is the TS 27.007 service class to query.
1389 * "response" is a const int *
1390 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
1392 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
1393 * must follow, with the TS 27.007 service class bit vector of services
1394 * for which call waiting is enabled.
1396 * For example, if ((const int *)response)[0] is 1 and
1397 * ((const int *)response)[1] is 3, then call waiting is enabled for data
1398 * and voice and disabled for everything else
1402 * RADIO_NOT_AVAILABLE
1405 #define RIL_REQUEST_QUERY_CALL_WAITING 35
1409 * RIL_REQUEST_SET_CALL_WAITING
1411 * Configure current call waiting state
1413 * "data" is const int *
1414 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
1415 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
1416 * services to modify
1417 * "response" is NULL
1421 * RADIO_NOT_AVAILABLE
1424 #define RIL_REQUEST_SET_CALL_WAITING 36
1427 * RIL_REQUEST_SMS_ACKNOWLEDGE
1429 * Acknowledge successful or failed receipt of SMS previously indicated
1430 * via RIL_UNSOL_RESPONSE_NEW_SMS
1433 * ((int *)data)[0] is "1" on successful receipt
1434 * (basically, AT+CNMA=1 from TS 27.005
1435 * ((int *)data)[0] is "0" on failed receipt
1436 * (basically, AT+CNMA=2 from TS 27.005)
1438 * "response" is NULL
1440 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
1444 * RADIO_NOT_AVAILABLE
1447 #define RIL_REQUEST_SMS_ACKNOWLEDGE 37
1450 * RIL_REQUEST_GET_IMEI - DEPRECATED
1452 * Get the device IMEI, including check digit
1454 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
1455 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1458 * "response" is a const char * containing the IMEI
1462 * RADIO_NOT_AVAILABLE (radio resetting)
1466 #define RIL_REQUEST_GET_IMEI 38
1469 * RIL_REQUEST_GET_IMEISV - DEPRECATED
1471 * Get the device IMEISV, which should be two decimal digits
1473 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
1474 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1477 * "response" is a const char * containing the IMEISV
1481 * RADIO_NOT_AVAILABLE (radio resetting)
1485 #define RIL_REQUEST_GET_IMEISV 39
1489 * RIL_REQUEST_ANSWER
1491 * Answer incoming call
1493 * Will not be called for WAITING calls.
1494 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
1498 * "response" is NULL
1502 * RADIO_NOT_AVAILABLE (radio resetting)
1506 #define RIL_REQUEST_ANSWER 40
1509 * RIL_REQUEST_DEACTIVATE_DATA_CALL
1511 * Deactivate packet data connection
1512 * replaces RIL_REQUEST_DEACTIVATE_DEFAULT_PDP
1514 * "data" is const char **
1515 * ((char**)data)[0] indicating CID
1517 * "response" is NULL
1521 * RADIO_NOT_AVAILABLE
1524 * See also: RIL_REQUEST_SETUP_DATA_CALL
1526 #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
1529 * RIL_REQUEST_QUERY_FACILITY_LOCK
1531 * Query the status of a facility lock state
1533 * "data" is const char **
1534 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
1535 * (eg "AO" for BAOC, "SC" for SIM lock)
1536 * ((const char **)data)[1] is the password, or "" if not required
1537 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
1540 * "response" is an int *
1541 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
1542 * services for which the specified barring facility
1543 * is active. "0" means "disabled for all"
1548 * RADIO_NOT_AVAILABLE
1552 #define RIL_REQUEST_QUERY_FACILITY_LOCK 42
1555 * RIL_REQUEST_SET_FACILITY_LOCK
1557 * Enable/disable one facility lock
1559 * "data" is const char **
1561 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1562 * (eg "AO" for BAOC)
1563 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
1564 * ((const char **)data)[2] = password
1565 * ((const char **)data)[3] = string representation of decimal TS 27.007
1566 * service class bit vector. Eg, the string
1567 * "1" means "set this facility for voice services"
1569 * "response" is NULL
1573 * RADIO_NOT_AVAILABLE
1577 #define RIL_REQUEST_SET_FACILITY_LOCK 43
1580 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
1582 * Change call barring facility password
1584 * "data" is const char **
1586 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1587 * (eg "AO" for BAOC)
1588 * ((const char **)data)[1] = old password
1589 * ((const char **)data)[2] = new password
1591 * "response" is NULL
1595 * RADIO_NOT_AVAILABLE
1599 #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
1602 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
1604 * Query current network selectin mode
1608 * "response" is int *
1609 * ((const int *)response)[0] is
1610 * 0 for automatic selection
1611 * 1 for manual selection
1615 * RADIO_NOT_AVAILABLE
1619 #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
1622 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
1624 * Specify that the network should be selected automatically
1627 * "response" is NULL
1629 * This request must not respond until the new operator is selected
1634 * RADIO_NOT_AVAILABLE
1638 #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
1641 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
1643 * Manually select a specified network.
1645 * The radio baseband/RIL implementation is expected to fall back to
1646 * automatic selection mode if the manually selected network should go
1647 * out of range in the future.
1649 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
1650 * "response" is NULL
1652 * This request must not respond until the new operator is selected
1657 * RADIO_NOT_AVAILABLE
1661 #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
1664 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
1666 * Scans for available networks
1669 * "response" is const char ** that should be an array of n*4 strings, where
1670 * n is the number of available networks
1671 * For each available network:
1673 * ((const char **)response)[n+0] is long alpha ONS or EONS
1674 * ((const char **)response)[n+1] is short alpha ONS or EONS
1675 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
1676 * ((const char **)response)[n+3] is a string value of the status:
1682 * This request must not respond until the new operator is selected
1687 * RADIO_NOT_AVAILABLE
1691 #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
1694 * RIL_REQUEST_DTMF_START
1696 * Start playing a DTMF tone. Continue playing DTMF tone until
1697 * RIL_REQUEST_DTMF_STOP is received
1699 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
1700 * it should cancel the previous tone and play the new one.
1702 * "data" is a char *
1703 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
1704 * "response" is NULL
1708 * RADIO_NOT_AVAILABLE
1711 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
1713 #define RIL_REQUEST_DTMF_START 49
1716 * RIL_REQUEST_DTMF_STOP
1718 * Stop playing a currently playing DTMF tone.
1721 * "response" is NULL
1725 * RADIO_NOT_AVAILABLE
1728 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
1730 #define RIL_REQUEST_DTMF_STOP 50
1733 * RIL_REQUEST_BASEBAND_VERSION
1735 * Return string value indicating baseband version, eg
1736 * response from AT+CGMR
1739 * "response" is const char * containing version string for log reporting
1743 * RADIO_NOT_AVAILABLE
1747 #define RIL_REQUEST_BASEBAND_VERSION 51
1750 * RIL_REQUEST_SEPARATE_CONNECTION
1752 * Separate a party from a multiparty call placing the multiparty call
1753 * (less the specified party) on hold and leaving the specified party
1754 * as the only other member of the current (active) call
1758 * See TS 22.084 1.3.8.2 (iii)
1759 * TS 22.030 6.5.5 "Entering "2X followed by send"
1760 * TS 27.007 "AT+CHLD=2x"
1762 * "data" is an int *
1763 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
1765 * "response" is NULL
1769 * RADIO_NOT_AVAILABLE (radio resetting)
1772 #define RIL_REQUEST_SEPARATE_CONNECTION 52
1776 * RIL_REQUEST_SET_MUTE
1778 * Turn on or off uplink (microphone) mute.
1780 * Will only be sent while voice call is active.
1781 * Will always be reset to "disable mute" when a new voice call is initiated
1783 * "data" is an int *
1784 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
1786 * "response" is NULL
1790 * RADIO_NOT_AVAILABLE (radio resetting)
1794 #define RIL_REQUEST_SET_MUTE 53
1797 * RIL_REQUEST_GET_MUTE
1799 * Queries the current state of the uplink mute setting
1802 * "response" is an int *
1803 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
1807 * RADIO_NOT_AVAILABLE (radio resetting)
1811 #define RIL_REQUEST_GET_MUTE 54
1814 * RIL_REQUEST_QUERY_CLIP
1816 * Queries the status of the CLIP supplementary service
1818 * (for MMI code "*#30#")
1821 * "response" is an int *
1822 * (int *)response)[0] is 1 for "CLIP provisioned"
1823 * and 0 for "CLIP not provisioned"
1824 * and 2 for "unknown, e.g. no network etc"
1828 * RADIO_NOT_AVAILABLE (radio resetting)
1832 #define RIL_REQUEST_QUERY_CLIP 55
1835 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
1837 * Requests the failure cause code for the most recently failed PDP
1838 * context or CDMA data connection active
1839 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
1843 * "response" is a "int *"
1844 * ((int *)response)[0] is an integer cause code defined in TS 24.008
1845 * section 6.1.3.1.3 or close approximation
1847 * If the implementation does not have access to the exact cause codes,
1848 * then it should return one of the values listed in
1849 * RIL_LastDataCallActivateFailCause, as the UI layer needs to distinguish these
1850 * cases for error notification
1851 * and potential retries.
1855 * RADIO_NOT_AVAILABLE
1858 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1862 #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
1865 * RIL_REQUEST_DATA_CALL_LIST
1867 * Queries the status of PDP contexts, returning for each
1868 * its CID, whether or not it is active, and its PDP type,
1869 * APN, and PDP adddress.
1870 * replaces RIL_REQUEST_PDP_CONTEXT_LIST
1873 * "response" is an array of RIL_Data_Call_Response
1877 * RADIO_NOT_AVAILABLE (radio resetting)
1881 #define RIL_REQUEST_DATA_CALL_LIST 57
1884 * RIL_REQUEST_RESET_RADIO - DEPRECATED
1886 * Request a radio reset. The RIL implementation may postpone
1887 * the reset until after this request is responded to if the baseband
1888 * is presently busy.
1890 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
1893 * "response" is NULL
1897 * RADIO_NOT_AVAILABLE (radio resetting)
1899 * REQUEST_NOT_SUPPORTED
1902 #define RIL_REQUEST_RESET_RADIO 58
1905 * RIL_REQUEST_OEM_HOOK_RAW
1907 * This request reserved for OEM-specific uses. It passes raw byte arrays
1910 * It can be invoked on the Java side from
1911 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
1913 * "data" is a char * of bytes copied from the byte[] data argument in java
1914 * "response" is a char * of bytes that will returned via the
1915 * caller's "response" Message here:
1916 * (byte[])(((AsyncResult)response.obj).result)
1918 * An error response here will result in
1919 * (((AsyncResult)response.obj).result) == null and
1920 * (((AsyncResult)response.obj).exception) being an instance of
1921 * com.android.internal.telephony.gsm.CommandException
1927 #define RIL_REQUEST_OEM_HOOK_RAW 59
1930 * RIL_REQUEST_OEM_HOOK_STRINGS
1932 * This request reserved for OEM-specific uses. It passes strings
1935 * It can be invoked on the Java side from
1936 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
1938 * "data" is a const char **, representing an array of null-terminated UTF-8
1939 * strings copied from the "String[] strings" argument to
1940 * invokeOemRilRequestStrings()
1942 * "response" is a const char **, representing an array of null-terminated UTF-8
1943 * stings that will be returned via the caller's response message here:
1945 * (String[])(((AsyncResult)response.obj).result)
1947 * An error response here will result in
1948 * (((AsyncResult)response.obj).result) == null and
1949 * (((AsyncResult)response.obj).exception) being an instance of
1950 * com.android.internal.telephony.gsm.CommandException
1956 #define RIL_REQUEST_OEM_HOOK_STRINGS 60
1959 * RIL_REQUEST_SCREEN_STATE
1961 * Indicates the current state of the screen. When the screen is off, the
1962 * RIL should notify the baseband to suppress certain notifications (eg,
1963 * signal strength and changes in LAC or CID) in an effort to conserve power.
1964 * These notifications should resume when the screen is on.
1967 * ((int *)data)[0] is == 1 for "Screen On"
1968 * ((int *)data)[0] is == 0 for "Screen Off"
1970 * "response" is NULL
1976 #define RIL_REQUEST_SCREEN_STATE 61
1980 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
1982 * Enables/disables supplementary service related notifications
1985 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
1988 * ((int *)data)[0] is == 1 for notifications enabled
1989 * ((int *)data)[0] is == 0 for notifications disabled
1991 * "response" is NULL
1995 * RADIO_NOT_AVAILABLE
1998 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2000 #define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2003 * RIL_REQUEST_WRITE_SMS_TO_SIM
2005 * Stores a SMS message to SIM memory.
2007 * "data" is RIL_SMS_WriteArgs *
2009 * "response" is int *
2010 * ((const int *)response)[0] is the record index where the message is stored.
2017 #define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2020 * RIL_REQUEST_DELETE_SMS_ON_SIM
2022 * Deletes a SMS message from SIM memory.
2025 * ((int *)data)[0] is the record index of the message to delete.
2027 * "response" is NULL
2034 #define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2037 * RIL_REQUEST_SET_BAND_MODE
2039 * Assign a specified band for RF configuration.
2042 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2043 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2044 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2045 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2046 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2047 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2048 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2049 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2050 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2051 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2052 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2053 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2054 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2055 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2056 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2057 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2058 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2059 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2060 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
2062 * "response" is NULL
2066 * RADIO_NOT_AVAILABLE
2069 #define RIL_REQUEST_SET_BAND_MODE 65
2072 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2074 * Query the list of band mode supported by RF.
2078 * "response" is int *
2079 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2080 * each available band mode.
2082 * 0 for "unspecified" (selected by baseband automatically)
2083 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2084 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2085 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2086 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2087 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2088 * 6 for "Cellular (800-MHz Band)"
2089 * 7 for "PCS (1900-MHz Band)"
2090 * 8 for "Band Class 3 (JTACS Band)"
2091 * 9 for "Band Class 4 (Korean PCS Band)"
2092 * 10 for "Band Class 5 (450-MHz Band)"
2093 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2094 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2095 * 13 for "Band Class 8 (1800-MHz Band)"
2096 * 14 for "Band Class 9 (900-MHz Band)"
2097 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2098 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2099 * 17 for "Band Class 15 (AWS Band)"
2100 * 18 for "Band Class 16 (US 2.5-GHz Band)"
2104 * RADIO_NOT_AVAILABLE
2107 * See also: RIL_REQUEST_SET_BAND_MODE
2109 #define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2112 * RIL_REQUEST_STK_GET_PROFILE
2114 * Requests the profile of SIM tool kit.
2115 * The profile indicates the SAT/USAT features supported by ME.
2116 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2120 * "response" is a const char * containing SAT/USAT profile
2121 * in hexadecimal format string starting with first byte of terminal profile
2125 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2126 * RIL_E_GENERIC_FAILURE
2128 #define RIL_REQUEST_STK_GET_PROFILE 67
2131 * RIL_REQUEST_STK_SET_PROFILE
2133 * Download the STK terminal profile as part of SIM initialization
2136 * "data" is a const char * containing SAT/USAT profile
2137 * in hexadecimal format string starting with first byte of terminal profile
2139 * "response" is NULL
2143 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2144 * RIL_E_GENERIC_FAILURE
2146 #define RIL_REQUEST_STK_SET_PROFILE 68
2149 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2151 * Requests to send a SAT/USAT envelope command to SIM.
2152 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2154 * "data" is a const char * containing SAT/USAT command
2155 * in hexadecimal format string starting with command tag
2157 * "response" is a const char * containing SAT/USAT response
2158 * in hexadecimal format string starting with first byte of response
2163 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2164 * RIL_E_GENERIC_FAILURE
2166 #define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2169 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2171 * Requests to send a terminal response to SIM for a received
2174 * "data" is a const char * containing SAT/USAT response
2175 * in hexadecimal format string starting with first byte of response data
2177 * "response" is NULL
2181 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2182 * RIL_E_GENERIC_FAILURE
2184 #define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
2187 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
2189 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
2190 * been initialized by ME already. (We could see the call has been in the 'call
2191 * list') So, STK application needs to accept/reject the call according as user
2195 * ((int *)data)[0] is > 0 for "accept" the call setup
2196 * ((int *)data)[0] is == 0 for "reject" the call setup
2198 * "response" is NULL
2202 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2203 * RIL_E_GENERIC_FAILURE
2205 #define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
2208 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
2210 * Connects the two calls and disconnects the subscriber from both calls.
2213 * "response" is NULL
2217 * RADIO_NOT_AVAILABLE (radio resetting)
2220 #define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
2223 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2225 * Requests to set the preferred network type for searching and registering
2226 * (CS/PS domain, RAT, and operation mode)
2230 * ((int *)data)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
2231 * ((int *)data)[0] is == 1 for GSM only
2232 * ((int *)data)[0] is == 2 for WCDMA only
2233 * ((int *)data)[0] is == 3 for GSM/WCDMA (auto mode)
2234 * ((int *)data)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2235 * ((int *)data)[0] is == 5 for CDMA only
2236 * ((int *)data)[0] is == 6 for EvDo only
2237 * ((int *)data)[0] is == 7 for GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
2239 * "response" is NULL
2243 * RADIO_NOT_AVAILABLE (radio resetting)
2245 * MODE_NOT_SUPPORTED
2247 #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2250 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2252 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2253 * for searching and registering
2257 * "response" is int *
2258 * ((int *)response)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
2259 * ((int *)response)[0] is == 1 for GSM only
2260 * ((int *)response)[0] is == 2 for WCDMA only
2261 * ((int *)response)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL)
2262 * ((int *)response)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2263 * ((int *)response)[0] is == 5 for CDMA only
2264 * ((int *)response)[0] is == 6 for EvDo only
2265 * ((int *)response)[0] is == 7 for GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
2269 * RADIO_NOT_AVAILABLE
2272 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2274 #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2277 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2279 * Request neighboring cell id in GSM network
2282 * "response" must be a " const RIL_NeighboringCell** "
2286 * RADIO_NOT_AVAILABLE
2289 #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
2292 * RIL_REQUEST_SET_LOCATION_UPDATES
2294 * Enables/disables network state change notifications due to changes in
2295 * LAC and/or CID (basically, +CREG=2 vs. +CREG=1).
2297 * Note: The RIL implementation should default to "updates enabled"
2298 * when the screen is on and "updates disabled" when the screen is off.
2301 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
2302 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
2304 * "response" is NULL
2308 * RADIO_NOT_AVAILABLE
2311 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2313 #define RIL_REQUEST_SET_LOCATION_UPDATES 76
2316 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION
2318 * Request to set the location where the CDMA subscription shall
2322 * ((int *)data)[0] is == 0 from RUIM/SIM (default)
2323 * ((int *)data)[0] is == 1 from NV
2325 * "response" is NULL
2329 * RADIO_NOT_AVAILABLE
2332 * SUBSCRIPTION_NOT_AVAILABLE
2334 #define RIL_REQUEST_CDMA_SET_SUBSCRIPTION 77
2337 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
2339 * Request to set the roaming preferences in CDMA
2342 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
2343 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2344 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
2346 * "response" is NULL
2350 * RADIO_NOT_AVAILABLE
2353 #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
2356 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
2358 * Request the actual setting of the roaming preferences in CDMA in the modem
2362 * "response" is int *
2363 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
2364 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2365 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
2367 * "response" is NULL
2371 * RADIO_NOT_AVAILABLE
2374 #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
2377 * RIL_REQUEST_SET_TTY_MODE
2379 * Request to set the TTY mode
2382 * ((int *)data)[0] is == 0 for TTY off
2383 * ((int *)data)[0] is == 1 for TTY Full
2384 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
2385 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
2387 * "response" is NULL
2391 * RADIO_NOT_AVAILABLE
2394 #define RIL_REQUEST_SET_TTY_MODE 80
2397 * RIL_REQUEST_QUERY_TTY_MODE
2399 * Request the setting of TTY mode
2403 * "response" is int *
2404 * ((int *)response)[0] is == 0 for TTY off
2405 * ((int *)response)[0] is == 1 for TTY Full
2406 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
2407 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
2409 * "response" is NULL
2413 * RADIO_NOT_AVAILABLE
2416 #define RIL_REQUEST_QUERY_TTY_MODE 81
2419 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
2421 * Request to set the preferred voice privacy mode used in voice
2425 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2426 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
2428 * "response" is NULL
2432 * RADIO_NOT_AVAILABLE
2435 #define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
2438 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
2440 * Request the setting of preferred voice privacy mode
2444 * "response" is int *
2445 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2446 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
2448 * "response" is NULL
2452 * RADIO_NOT_AVAILABLE
2455 #define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
2458 * RIL_REQUEST_CDMA_FLASH
2462 * "data" is const char *
2463 * ((const char *)data)[0] is a FLASH string
2465 * "response" is NULL
2469 * RADIO_NOT_AVAILABLE
2473 #define RIL_REQUEST_CDMA_FLASH 84
2476 * RIL_REQUEST_CDMA_BURST_DTMF
2480 * "data" is const char *
2481 * ((const char *)data)[0] is a DTMF string
2483 * "response" is NULL
2487 * RADIO_NOT_AVAILABLE
2491 #define RIL_REQUEST_CDMA_BURST_DTMF 85
2494 * RIL_REQUEST_CDMA_VALIDATE_AKEY
2498 * "data" is const char *
2499 * ((const char *)data)[0] is a AKey string
2501 * "response" is NULL
2505 * RADIO_NOT_AVAILABLE
2509 #define RIL_REQUEST_CDMA_VALIDATE_AKEY 86
2512 * RIL_REQUEST_CDMA_SEND_SMS
2514 * Send a CDMA SMS message
2516 * "data" is const RIL_CDMA_SMS_Message *
2518 * "response" is a const RIL_SMS_Response *
2522 * RADIO_NOT_AVAILABLE
2523 * SMS_SEND_FAIL_RETRY
2527 #define RIL_REQUEST_CDMA_SEND_SMS 87
2530 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
2532 * Acknowledge the success or failure in the receipt of SMS
2533 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
2535 * "data" is const RIL_CDMA_SMS_Ack *
2537 * "response" is NULL
2541 * RADIO_NOT_AVAILABLE
2545 #define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
2548 * RIL_REQUEST_GET_BROADCAST_CONFIG
2550 * Request the setting of GSM/WCDMA Cell Broadcast SMS config
2554 * "response" is const RIL_BroadcastSMSConfig *
2558 * RADIO_NOT_AVAILABLE
2562 #define RIL_REQUEST_GET_BROADCAST_CONFIG 89
2565 * RIL_REQUEST_SET_BROADCAST_CONFIG
2567 * Set GSM/WCDMA Cell Broadcast SMS config
2569 * "data" is const RIL_BroadcastSMSConfig *
2571 * "response" is NULL
2575 * RADIO_NOT_AVAILABLE
2579 #define RIL_REQUEST_SET_BROADCAST_CONFIG 90
2582 * RIL_REQUEST_BROADCAST_ACTIVATION
2584 * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
2586 * "data" is const int *
2587 * (const int *)data[0] indicates to activate or turn off the
2588 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
2589 * 0 - Activate, 1 - Turn off
2591 * "response" is NULL
2595 * RADIO_NOT_AVAILABLE
2599 #define RIL_REQUEST_BROADCAST_ACTIVATION 91
2602 * RIL_REQUEST_CDMA_GET_BROADCAST_CONFIG
2604 * Request the setting of CDMA Broadcast SMS config
2608 * "response" is const RIL_CDMA_BroadcastSMSConfig *
2612 * RADIO_NOT_AVAILABLE
2616 #define RIL_REQUEST_CDMA_GET_BROADCAST_CONFIG 92
2619 * RIL_REQUEST_CDMA_SET_BROADCAST_CONFIG
2621 * Set CDMA Broadcast SMS config
2623 * "data" is const RIL_CDMA_BroadcastSMSConfig *
2625 * "response" is NULL
2629 * RADIO_NOT_AVAILABLE
2633 #define RIL_REQUEST_CDMA_SET_BROADCAST_CONFIG 93
2636 * RIL_REQUEST_CDMA_BROADCAST_ACTIVATION
2638 * Enable or disable the reception of CDMA Broadcast SMS
2640 * "data" is const int *
2641 * (const int *)data[0] indicates to activate or turn off the
2642 * reception of CDMA Broadcast SMS, 0-1,
2643 * 0 - Activate, 1 - Turn off
2645 * "response" is NULL
2649 * RADIO_NOT_AVAILABLE
2653 #define RIL_REQUEST_CDMA_BROADCAST_ACTIVATION 94
2656 * RIL_REQUEST_CDMA_SUBSCRIPTION
2658 * Request the device MDN / H_SID / H_NID.
2660 * The request is only allowed when CDMA subscription is available. When CDMA
2661 * subscription is changed, application layer should re-issue the request to
2662 * update the subscription information.
2664 * If a NULL value is returned for any of the device id, it means that error
2665 * accessing the device.
2667 * "response" is const char **
2668 * ((const char **)response)[0] is MDN if CDMA subscription is available
2669 * ((const char **)response)[1] is H_SID (Home SID) if CDMA subscription is available
2670 * ((const char **)response)[2] is H_NID (Home NID) if CDMA subscription is available
2671 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
2675 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
2678 #define RIL_REQUEST_CDMA_SUBSCRIPTION 95
2681 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
2683 * Stores a CDMA SMS message to RUIM memory.
2685 * "data" is RIL_CDMA_SMS_WriteArgs *
2687 * "response" is int *
2688 * ((const int *)response)[0] is the record index where the message is stored.
2692 * RADIO_NOT_AVAILABLE
2696 #define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
2699 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
2701 * Deletes a CDMA SMS message from RUIM memory.
2704 * ((int *)data)[0] is the record index of the message to delete.
2706 * "response" is NULL
2710 * RADIO_NOT_AVAILABLE
2714 #define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
2717 * RIL_REQUEST_DEVICE_IDENTITY
2719 * Request the device ESN / MEID / IMEI / IMEISV.
2721 * The request is always allowed and contains GSM and CDMA device identity;
2722 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
2723 * RIL_REQUEST_GET_IMEISV.
2725 * If a NULL value is returned for any of the device id, it means that error
2726 * accessing the device.
2728 * When CDMA subscription is changed the ESN/MEID may change. The application
2729 * layer should re-issue the request to update the device identity in this case.
2731 * "response" is const char **
2732 * ((const char **)response)[0] is IMEI if GSM subscription is available
2733 * ((const char **)response)[1] is IMEISV if GSM subscription is available
2734 * ((const char **)response)[2] is ESN if CDMA subscription is available
2735 * ((const char **)response)[3] is MEID if CDMA subscription is available
2739 * RADIO_NOT_AVAILABLE
2742 #define RIL_REQUEST_DEVICE_IDENTITY 98
2745 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
2747 * Request the radio's system selection module to exit emergency
2748 * callback mode. RIL will not respond with SUCCESS until the modem has
2749 * completely exited from Emergency Callback Mode.
2753 * "response" is NULL
2757 * RADIO_NOT_AVAILABLE
2761 #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
2764 * RIL_REQUEST_GET_SMSC_ADDRESS
2766 * Queries the default Short Message Service Center address on the device.
2770 * "response" is const char * containing the SMSC address.
2774 * RADIO_NOT_AVAILABLE
2778 #define RIL_REQUEST_GET_SMSC_ADDRESS 100
2781 * RIL_REQUEST_SET_SMSC_ADDRESS
2783 * Sets the default Short Message Service Center address on the device.
2785 * "data" is const char * containing the SMSC address.
2787 * "response" is NULL
2791 * RADIO_NOT_AVAILABLE
2795 #define RIL_REQUEST_SET_SMSC_ADDRESS 101
2798 /***********************************************************************/
2801 #define RIL_UNSOL_RESPONSE_BASE 1000
2804 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
2806 * Indicate when value of RIL_RadioState has changed.
2808 * Callee will invoke RIL_RadioStateRequest method on main thread
2813 #define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
2817 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
2819 * Indicate when call state has changed
2821 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
2825 * Response should be invoked on, for example,
2826 * "RING", "BUSY", "NO CARRIER", and also call state
2827 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
2829 * Redundent or extraneous invocations are tolerated
2831 #define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
2835 * RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2837 * Called when network state, operator name, or GPRS state has changed
2838 * Basically on, +CREG and +CGREG
2840 * Callee will invoke the following requests on main thread:
2842 * RIL_REQUEST_REGISTRATION_STATE
2843 * RIL_REQUEST_GPRS_REGISTRATION_STATE
2844 * RIL_REQUEST_OPERATOR
2848 * FIXME should this happen when SIM records are loaded? (eg, for
2851 #define RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 1002
2854 * RIL_UNSOL_RESPONSE_NEW_SMS
2856 * Called when new SMS is received.
2858 * "data" is const char *
2859 * This is a pointer to a string containing the PDU of an SMS-DELIVER
2860 * as an ascii string of hex digits. The PDU starts with the SMSC address
2861 * per TS 27.005 (+CMT:)
2863 * Callee will subsequently confirm the receipt of thei SMS with a
2864 * RIL_REQUEST_SMS_ACKNOWLEDGE
2866 * No new RIL_UNSOL_RESPONSE_NEW_SMS
2867 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
2868 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
2871 #define RIL_UNSOL_RESPONSE_NEW_SMS 1003
2874 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
2876 * Called when new SMS Status Report is received.
2878 * "data" is const char *
2879 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
2880 * as an ascii string of hex digits. The PDU starts with the SMSC address
2881 * per TS 27.005 (+CDS:).
2883 * Callee will subsequently confirm the receipt of the SMS with a
2884 * RIL_REQUEST_SMS_ACKNOWLEDGE
2886 * No new RIL_UNSOL_RESPONSE_NEW_SMS
2887 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
2888 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
2891 #define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
2894 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
2896 * Called when new SMS has been stored on SIM card
2898 * "data" is const int *
2899 * ((const int *)data)[0] contains the slot index on the SIM that contains
2903 #define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
2908 * Called when a new USSD message is received.
2910 * "data" is const char **
2911 * ((const char **)data)[0] points to a type code, which is
2912 * one of these string values:
2913 * "0" USSD-Notify -- text in ((const char **)data)[1]
2914 * "1" USSD-Request -- text in ((const char **)data)[1]
2915 * "2" Session terminated by network
2916 * "3" other local client (eg, SIM Toolkit) has responded
2917 * "4" Operation not supported
2918 * "5" Network timeout
2920 * The USSD session is assumed to persist if the type code is "1", otherwise
2921 * the current session (if any) is assumed to have terminated.
2923 * ((const char **)data)[1] points to a message string if applicable, which
2924 * should always be in UTF-8.
2926 #define RIL_UNSOL_ON_USSD 1006
2927 /* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
2930 * RIL_UNSOL_ON_USSD_REQUEST
2932 * Obsolete. Send via RIL_UNSOL_ON_USSD
2934 #define RIL_UNSOL_ON_USSD_REQUEST 1007
2938 * RIL_UNSOL_NITZ_TIME_RECEIVED
2940 * Called when radio has received a NITZ time message
2942 * "data" is const char * pointing to NITZ time string
2943 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
2945 #define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
2948 * RIL_UNSOL_SIGNAL_STRENGTH
2950 * Radio may report signal strength rather han have it polled.
2952 * "data" is a const RIL_SignalStrength *
2954 #define RIL_UNSOL_SIGNAL_STRENGTH 1009
2958 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
2960 * Indicate a PDP context state has changed, or a new context
2961 * has been activated or deactivated
2962 * replaces RIL_UNSOL_PDP_CONTEXT_LIST_CHANGED
2964 * "data" is an array of RIL_Data_Call_Response identical to that
2965 * returned by RIL_REQUEST_DATA_CALL_LIST
2967 * See also: RIL_REQUEST_DATA_CALL_LIST
2970 #define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
2973 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
2975 * Reports supplementary service related notification from the network.
2977 * "data" is a const RIL_SuppSvcNotification *
2981 #define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
2984 * RIL_UNSOL_STK_SESSION_END
2986 * Indicate when STK session is terminated by SIM.
2990 #define RIL_UNSOL_STK_SESSION_END 1012
2993 * RIL_UNSOL_STK_PROACTIVE_COMMAND
2995 * Indicate when SIM issue a STK proactive command to applications
2997 * "data" is a const char * containing SAT/USAT proactive command
2998 * in hexadecimal format string starting with command tag
3001 #define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
3004 * RIL_UNSOL_STK_EVENT_NOTIFY
3006 * Indicate when SIM notifies applcations some event happens.
3007 * Generally, application does not need to have any feedback to
3008 * SIM but shall be able to indicate appropriate messages to users.
3010 * "data" is a const char * containing SAT/USAT commands or responses
3011 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
3012 * starting with first byte of response data or command tag
3015 #define RIL_UNSOL_STK_EVENT_NOTIFY 1014
3018 * RIL_UNSOL_STK_CALL_SETUP
3020 * Indicate when SIM wants application to setup a voice call.
3022 * "data" is const int *
3023 * ((const int *)data)[0] contains timeout value (in milliseconds)
3025 #define RIL_UNSOL_STK_CALL_SETUP 1015
3028 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
3030 * Indicates that SMS storage on the SIM is full. Sent when the network
3031 * attempts to deliver a new SMS message. Messages cannot be saved on the
3032 * SIM until space is freed. In particular, incoming Class 2 messages
3038 #define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
3041 * RIL_UNSOL_SIM_REFRESH
3043 * Indicates that file(s) on the SIM have been updated, or the SIM
3044 * has been reinitialized.
3046 * "data" is an int *
3047 * ((int *)data)[0] is a RIL_SimRefreshResult.
3048 * ((int *)data)[1] is the EFID of the updated file if the result is
3049 * SIM_FILE_UPDATE or NULL for any other result.
3051 * Note: If the radio state changes as a result of the SIM refresh (eg,
3052 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3055 #define RIL_UNSOL_SIM_REFRESH 1017
3058 * RIL_UNSOL_CALL_RING
3060 * Ring indication for an incoming call (eg, RING or CRING event).
3062 * "data" is null for GSM
3063 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
3065 #define RIL_UNSOL_CALL_RING 1018
3068 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
3070 * Indicates that SIM state changes.
3072 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
3076 #define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
3079 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3081 * Called when new CDMA SMS is received
3083 * "data" is const RIL_CDMA_SMS_Message *
3085 * Callee will subsequently confirm the receipt of the SMS with
3086 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
3088 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
3089 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
3092 #define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
3095 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
3097 * Called when new Broadcast SMS is received
3099 * "data" is const char * of 88 bytes which indicates each page
3100 * of a CBS Message sent to the MS by the BTS as coded in 3GPP
3101 * 23.041 Section 9.4.1.1
3104 #define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
3107 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
3109 * Indicates that SMS storage on the RUIM is full. Messages
3110 * cannot be saved on the RUIM until space is freed.
3115 #define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
3118 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
3120 * Indicates a restricted state change (eg, for Domain Specific Access Control).
3122 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
3124 * "data" is an int *
3125 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
3127 #define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
3130 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
3132 * Indicates that the radio system selection module has
3133 * autonomously entered emergency callback mode.
3138 #define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
3141 * RIL_UNSOL_CDMA_CALL_WAITING
3143 * Called when CDMA radio receives a call waiting indication.
3145 * "data" is const RIL_CDMA_CallWaiting *
3148 #define RIL_UNSOL_CDMA_CALL_WAITING 1025
3151 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
3153 * Called when CDMA radio receives an update of the progress of an
3156 * "data" is const int *
3157 * For CDMA this is an integer OTASP/OTAPA status listed in
3158 * RIL_CDMA_OTA_ProvisionStatus.
3161 #define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
3164 * RIL_UNSOL_CDMA_INFO_REC
3166 * Called when CDMA radio receives one or more info recs.
3168 * "data" is const RIL_CDMA_InformationRecords *
3171 #define RIL_UNSOL_CDMA_INFO_REC 1027
3174 * RIL_UNSOL_OEM_HOOK_RAW
3176 * This is for OEM specific use.
3178 * "data" is a byte[]
3180 #define RIL_UNSOL_OEM_HOOK_RAW 1028
3182 /***********************************************************************/
3186 * RIL_Request Function pointer
3188 * @param request is one of RIL_REQUEST_*
3189 * @param data is pointer to data defined for that RIL_REQUEST_*
3190 * data is owned by caller, and should not be modified or freed by callee
3191 * @param t should be used in subsequent call to RIL_onResponse
3192 * @param datalen the length of data
3195 typedef void (*RIL_RequestFunc) (int request, void *data,
3196 size_t datalen, RIL_Token t);
3199 * This function should return the current radio state synchronously
3201 typedef RIL_RadioState (*RIL_RadioStateRequest)();
3204 * This function returns "1" if the specified RIL_REQUEST code is
3205 * supported and 0 if it is not
3207 * @param requestCode is one of RIL_REQUEST codes
3210 typedef int (*RIL_Supports)(int requestCode);
3213 * This function is called from a separate thread--not the
3214 * thread that calls RIL_RequestFunc--and indicates that a pending
3215 * request should be cancelled.
3217 * On cancel, the callee should do its best to abandon the request and
3218 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
3220 * Subsequent calls to RIL_onRequestComplete for this request with
3221 * other results will be tolerated but ignored. (That is, it is valid
3222 * to ignore the cancellation request)
3224 * RIL_Cancel calls should return immediately, and not wait for cancellation
3226 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
3229 * @param t token wants to be canceled
3232 typedef void (*RIL_Cancel)(RIL_Token t);
3234 typedef void (*RIL_TimedCallback) (void *param);
3237 * Return a version string for your RIL implementation
3239 typedef const char * (*RIL_GetVersion) (void);
3242 int version; /* set to RIL_VERSION */
3243 RIL_RequestFunc onRequest;
3244 RIL_RadioStateRequest onStateRequest;
3245 RIL_Supports supports;
3246 RIL_Cancel onCancel;
3247 RIL_GetVersion getVersion;
3248 } RIL_RadioFunctions;
3253 * "t" is parameter passed in on previous call to RIL_Notification
3256 * If "e" != SUCCESS, then response can be null/is ignored
3258 * "response" is owned by caller, and should not be modified or
3261 * RIL_onRequestComplete will return as soon as possible
3263 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
3264 void *response, size_t responselen);
3267 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
3268 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3270 * "data" is owned by caller, and should not be modified or freed by callee
3273 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
3277 * Call user-specifed "callback" function on on the same thread that
3278 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3279 * a relative time value at which the callback is invoked. If relativeTime is
3280 * NULL or points to a 0-filled structure, the callback will be invoked as
3284 void (*RequestTimedCallback) (RIL_TimedCallback callback,
3285 void *param, const struct timeval *relativeTime);
3290 * RIL implementations must defined RIL_Init
3291 * argc and argv will be command line arguments intended for the RIL implementation
3292 * Return NULL on error
3294 * @param env is environment point defined as RIL_Env
3295 * @param argc number of arguments
3296 * @param argv list fo arguments
3299 const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
3301 #else /* RIL_SHLIB */
3304 * Call this once at startup to register notification routine
3306 * @param callbacks user-specifed callback function
3308 void RIL_register (const RIL_RadioFunctions *callbacks);
3313 * RIL_onRequestComplete will return as soon as possible
3315 * @param t is parameter passed in on previous call to RIL_Notification
3317 * @param e error code
3318 * if "e" != SUCCESS, then response can be null/is ignored
3319 * @param response is owned by caller, and should not be modified or
3321 * @param responselen the length of response in byte
3323 void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
3324 void *response, size_t responselen);
3327 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
3328 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3329 * "data" is owned by caller, and should not be modified or freed by callee
3330 * @param datalen the length of data in byte
3333 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
3338 * Call user-specifed "callback" function on on the same thread that
3339 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3340 * a relative time value at which the callback is invoked. If relativeTime is
3341 * NULL or points to a 0-filled structure, the callback will be invoked as
3344 * @param callback user-specifed callback function
3345 * @param param parameter list
3346 * @param relativeTime a relative time value at which the callback is invoked
3349 void RIL_requestTimedCallback (RIL_TimedCallback callback,
3350 void *param, const struct timeval *relativeTime);
3353 #endif /* RIL_SHLIB */
3359 #endif /*ANDROID_RIL_H*/