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 */
70 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
71 RIL_E_ILLEGAL_SIM_OR_ME = 15 /* network selection failed due to
78 RIL_CALL_DIALING = 2, /* MO call only */
79 RIL_CALL_ALERTING = 3, /* MO call only */
80 RIL_CALL_INCOMING = 4, /* MT call only */
81 RIL_CALL_WAITING = 5 /* MT call only */
85 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
86 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
87 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
88 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
89 personalization locked, or SIM absent */
90 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
91 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
92 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
93 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
94 personalization locked, or RUIM absent */
95 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
96 RADIO_STATE_NV_READY = 9 /* Radio is on and the NV interface is available */
99 /* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
101 RIL_UUS_TYPE1_IMPLICIT = 0,
102 RIL_UUS_TYPE1_REQUIRED = 1,
103 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
104 RIL_UUS_TYPE2_REQUIRED = 3,
105 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
106 RIL_UUS_TYPE3_REQUIRED = 5,
107 RIL_UUS_TYPE3_NOT_REQUIRED = 6
110 /* User-to-User Signaling Information data coding schemes. Possible values for
111 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
112 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
114 RIL_UUS_DCS_USP = 0, /* User specified protocol */
115 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
116 RIL_UUS_DCS_X244 = 2, /* X.244 */
117 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
118 convergence function */
119 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
122 /* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
123 * This data is passed in RIL_ExtensionRecord and rec contains this
124 * structure when type is RIL_UUS_INFO_EXT_REC */
126 RIL_UUS_Type uusType; /* UUS Type */
127 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
128 int uusLength; /* Length of UUS Data */
129 char * uusData; /* UUS Data */
132 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
134 char isPresent; /* non-zero if signal information record is present */
135 char signalType; /* as defined 3.7.5.5-1 */
136 char alertPitch; /* as defined 3.7.5.5-2 */
137 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
138 } RIL_CDMA_SignalInfoRecord;
142 int index; /* Connection Index for use with, eg, AT+CHLD */
143 int toa; /* type of address, eg 145 = intl */
144 char isMpty; /* nonzero if is mpty call */
145 char isMT; /* nonzero if call is mobile terminated */
146 char als; /* ALS line indicator if available
148 char isVoice; /* nonzero if this is is a voice call */
149 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
150 char * number; /* Remote party number */
151 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
152 char * name; /* Remote party name */
153 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
154 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
158 int cid; /* Context ID */
159 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
160 char * type; /* X.25, IP, IPV6, etc. */
163 } RIL_Data_Call_Response;
166 int messageRef; /* TP-Message-Reference for GSM,
167 and BearerData MessageId for CDMA
168 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
169 char *ackPDU; /* or NULL if n/a */
170 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
171 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
172 -1 if unknown or not applicable*/
175 /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
177 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
178 /* 0 = "REC UNREAD" */
180 /* 2 = "STO UNSENT" */
182 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
183 the TP-layer length is "strlen(pdu)/2". */
184 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
185 (as expected by TS 27.005) or NULL for default SMSC */
188 /** Used by RIL_REQUEST_DIAL */
192 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
193 * clir == 0 on "use subscription default value"
194 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
195 * clir == 2 on "CLIR suppression" (allow CLI presentation)
197 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
201 int command; /* one of the commands listed for TS 27.007 +CRSM*/
202 int fileid; /* EF id */
203 char *path; /* "pathid" from TS 27.007 +CRSM command.
204 Path is in hex asciii format eg "7f205f70"
205 Path must always be provided.
210 char *data; /* May be NULL*/
211 char *pin2; /* May be NULL*/
217 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
218 } RIL_SIM_IO_Response;
220 /* See also com.android.internal.telephony.gsm.CallForwardInfo */
224 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
225 * status 1 = active, 0 = not active
227 * For RIL_REQUEST_SET_CALL_FORWARD:
236 int reason; /* from TS 27.007 7.11 "reason" */
237 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
238 See table for Android mapping from
240 0 means user doesn't input class */
241 int toa; /* "type" from TS 27.007 7.11 */
242 char * number; /* "number" from TS 27.007 7.11. May be NULL */
243 int timeSeconds; /* for CF no reply only */
244 }RIL_CallForwardInfo;
247 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
248 * Upper 16 bits is LAC and lower 16 bits
249 * is CID (as described in TS 27.005)
250 * Primary Scrambling Code (as described in TS 25.331)
252 * Valid values are hexadecimal 0x0000 - 0xffffffff.
254 int rssi; /* Received RSSI in GSM,
255 * Level index of CPICH Received Signal Code Power in UMTS
257 } RIL_NeighboringCell;
259 /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
261 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
262 CALL_FAIL_NORMAL = 16,
264 CALL_FAIL_CONGESTION = 34,
265 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
266 CALL_FAIL_CALL_BARRED = 240,
267 CALL_FAIL_FDN_BLOCKED = 241,
268 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
269 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
270 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
271 CALL_FAIL_CDMA_DROP = 1001,
272 CALL_FAIL_CDMA_INTERCEPT = 1002,
273 CALL_FAIL_CDMA_REORDER = 1003,
274 CALL_FAIL_CDMA_SO_REJECT = 1004,
275 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
276 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
277 CALL_FAIL_CDMA_PREEMPTED = 1007,
278 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
279 during emergency callback mode */
280 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
281 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
282 } RIL_LastCallFailCause;
284 /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
286 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
287 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
288 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
289 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
290 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
291 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
292 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
293 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
294 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
295 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
296 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
297 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
298 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* This and all other cases: retry silently */
299 /* Not mentioned in the specification */
300 PDP_FAIL_REGISTRATION_FAIL = -1,
301 PDP_FAIL_GPRS_REGISTRATION_FAIL = -2,
302 } RIL_LastDataCallActivateFailCause;
304 /* See RIL_REQUEST_SETUP_DATA_CALL */
306 RIL_DATA_PROFILE_DEFAULT = 0,
307 RIL_DATA_PROFILE_TETHERED = 1,
308 RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */
311 /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
313 int notificationType; /*
314 * 0 = MO intermediate result code
315 * 1 = MT unsolicited result code
317 int code; /* See 27.007 7.17
320 int index; /* CUG index. See 27.007 7.17. */
321 int type; /* "type" from 27.007 7.17 (MT only). */
322 char * number; /* "number" from 27.007 7.17
323 (MT only, may be NULL). */
324 } RIL_SuppSvcNotification;
326 #define RIL_CARD_MAX_APPS 8
329 RIL_CARDSTATE_ABSENT = 0,
330 RIL_CARDSTATE_PRESENT = 1,
331 RIL_CARDSTATE_ERROR = 2
335 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
336 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
337 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
338 since each app can only have 1 active perso
340 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
341 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
342 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
343 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
344 RIL_PERSOSUBSTATE_SIM_SIM = 7,
345 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
346 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
347 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
348 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
349 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
350 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
351 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
352 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
353 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
354 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
355 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
356 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
357 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
358 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
359 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
360 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
361 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
365 RIL_APPSTATE_UNKNOWN = 0,
366 RIL_APPSTATE_DETECTED = 1,
367 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
368 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
369 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
370 when app_state is assigned to this value */
371 RIL_APPSTATE_READY = 5
375 RIL_PINSTATE_UNKNOWN = 0,
376 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
377 RIL_PINSTATE_ENABLED_VERIFIED = 2,
378 RIL_PINSTATE_DISABLED = 3,
379 RIL_PINSTATE_ENABLED_BLOCKED = 4,
380 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
384 RIL_APPTYPE_UNKNOWN = 0,
386 RIL_APPTYPE_USIM = 2,
387 RIL_APPTYPE_RUIM = 3,
393 RIL_AppType app_type;
394 RIL_AppState app_state;
395 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
396 RIL_APPSTATE_SUBSCRIPTION_PERSO */
397 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
399 char *app_label_ptr; /* null terminated string */
400 int pin1_replaced; /* applicable to USIM and CSIM */
407 RIL_CardState card_state;
408 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
409 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
410 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
411 int num_applications; /* value <= RIL_CARD_MAX_APPS */
412 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
415 /* The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH */
417 /* A file on SIM has been updated. data[1] contains the EFID. */
419 /* SIM initialized. All files should be re-read. */
421 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
423 } RIL_SimRefreshResult;
426 char * number; /* Remote party number */
427 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
428 char * name; /* Remote party name */
429 RIL_CDMA_SignalInfoRecord signalInfoRecord;
430 } RIL_CDMA_CallWaiting;
433 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
435 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
436 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
437 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
440 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
441 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
442 * and 9.4.4.2.3 for UMTS.
443 * All other values can be treated as empty CBM data coding scheme.
445 * selected 0 means message types specified in <fromServiceId, toServiceId>
446 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
448 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
449 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
456 unsigned char selected;
457 } RIL_GSM_BroadcastSmsConfigInfo;
459 /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
460 #define RIL_RESTRICTED_STATE_NONE 0x00
461 /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
462 #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
463 /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
464 #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
465 /* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
466 #define RIL_RESTRICTED_STATE_CS_ALL 0x04
467 /* Block packet data access due to restriction. */
468 #define RIL_RESTRICTED_STATE_PS_ALL 0x10
470 /* The status for an OTASP/OTAPA session */
472 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
473 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
474 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
475 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
476 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
477 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
478 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
479 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
480 CDMA_OTA_PROVISION_STATUS_COMMITTED,
481 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
482 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
483 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
484 } RIL_CDMA_OTA_ProvisionStatus;
487 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
488 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
489 } RIL_GW_SignalStrength;
493 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
494 * multiplied by -1. Example: If the actual RSSI is -75, then this response
497 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
498 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
501 } RIL_CDMA_SignalStrength;
505 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
506 * multiplied by -1. Example: If the actual RSSI is -75, then this response
509 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
510 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
513 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
514 } RIL_EVDO_SignalStrength;
518 RIL_GW_SignalStrength GW_SignalStrength;
519 RIL_CDMA_SignalStrength CDMA_SignalStrength;
520 RIL_EVDO_SignalStrength EVDO_SignalStrength;
521 } RIL_SignalStrength;
523 /* Names of the CDMA info records (C.S0005 section 3.7.5) */
525 RIL_CDMA_DISPLAY_INFO_REC,
526 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
527 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
528 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
529 RIL_CDMA_SIGNAL_INFO_REC,
530 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
531 RIL_CDMA_LINE_CONTROL_INFO_REC,
532 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
533 RIL_CDMA_T53_CLIR_INFO_REC,
534 RIL_CDMA_T53_RELEASE_INFO_REC,
535 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
536 } RIL_CDMA_InfoRecName;
538 /* Display Info Rec as defined in C.S0005 section 3.7.5.1
539 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
540 Note: the Extended Display info rec contains multiple records of the
541 form: display_tag, display_len, and display_len occurrences of the
542 chari field if the display_tag is not 10000000 or 10000001.
543 To save space, the records are stored consecutively in a byte buffer.
544 The display_tag, display_len and chari fields are all 1 byte.
549 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
550 } RIL_CDMA_DisplayInfoRecord;
552 /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
553 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
554 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
559 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
564 } RIL_CDMA_NumberInfoRecord;
566 /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
568 RIL_REDIRECTING_REASON_UNKNOWN = 0,
569 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
570 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
571 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
572 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
573 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
574 RIL_REDIRECTING_REASON_RESERVED
575 } RIL_CDMA_RedirectingReason;
578 RIL_CDMA_NumberInfoRecord redirectingNumber;
579 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
580 RIL_CDMA_RedirectingReason redirectingReason;
581 } RIL_CDMA_RedirectingNumberInfoRecord;
583 /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
585 char lineCtrlPolarityIncluded;
587 char lineCtrlReverse;
588 char lineCtrlPowerDenial;
589 } RIL_CDMA_LineControlInfoRecord;
591 /* T53 CLIR Information Record */
594 } RIL_CDMA_T53_CLIRInfoRecord;
596 /* T53 Audio Control Information Record */
600 } RIL_CDMA_T53_AudioControlInfoRecord;
604 RIL_CDMA_InfoRecName name;
607 /* Display and Extended Display Info Rec */
608 RIL_CDMA_DisplayInfoRecord display;
610 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
611 RIL_CDMA_NumberInfoRecord number;
613 /* Signal Info Rec */
614 RIL_CDMA_SignalInfoRecord signal;
616 /* Redirecting Number Info Rec */
617 RIL_CDMA_RedirectingNumberInfoRecord redir;
619 /* Line Control Info Rec */
620 RIL_CDMA_LineControlInfoRecord lineCtrl;
622 /* T53 CLIR Info Rec */
623 RIL_CDMA_T53_CLIRInfoRecord clir;
625 /* T53 Audio Control Info Rec */
626 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
628 } RIL_CDMA_InformationRecord;
630 #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
633 char numberOfInfoRecs;
634 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
635 } RIL_CDMA_InformationRecords;
638 * RIL_REQUEST_GET_SIM_STATUS
640 * Requests status of the SIM interface and the SIM card
644 * "response" is const RIL_CardStatus *
649 #define RIL_REQUEST_GET_SIM_STATUS 1
652 * RIL_REQUEST_ENTER_SIM_PIN
654 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
656 * "data" is const char **
657 * ((const char **)data)[0] is PIN value
659 * "response" is int *
660 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
665 * RADIO_NOT_AVAILABLE (radio resetting)
670 #define RIL_REQUEST_ENTER_SIM_PIN 2
674 * RIL_REQUEST_ENTER_SIM_PUK
676 * Supplies SIM PUK and new PIN.
678 * "data" is const char **
679 * ((const char **)data)[0] is PUK value
680 * ((const char **)data)[1] is new PIN value
682 * "response" is int *
683 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
688 * RADIO_NOT_AVAILABLE (radio resetting)
694 #define RIL_REQUEST_ENTER_SIM_PUK 3
697 * RIL_REQUEST_ENTER_SIM_PIN2
699 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
700 * returned as a a failure from a previous operation.
702 * "data" is const char **
703 * ((const char **)data)[0] is PIN2 value
705 * "response" is int *
706 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
711 * RADIO_NOT_AVAILABLE (radio resetting)
716 #define RIL_REQUEST_ENTER_SIM_PIN2 4
719 * RIL_REQUEST_ENTER_SIM_PUK2
721 * Supplies SIM PUK2 and new PIN2.
723 * "data" is const char **
724 * ((const char **)data)[0] is PUK2 value
725 * ((const char **)data)[1] is new PIN2 value
727 * "response" is int *
728 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
733 * RADIO_NOT_AVAILABLE (radio resetting)
739 #define RIL_REQUEST_ENTER_SIM_PUK2 5
742 * RIL_REQUEST_CHANGE_SIM_PIN
744 * Supplies old SIM PIN and new PIN.
746 * "data" is const char **
747 * ((const char **)data)[0] is old PIN value
748 * ((const char **)data)[1] is new PIN value
750 * "response" is int *
751 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
756 * RADIO_NOT_AVAILABLE (radio resetting)
759 * (old PIN is invalid)
763 #define RIL_REQUEST_CHANGE_SIM_PIN 6
767 * RIL_REQUEST_CHANGE_SIM_PIN2
769 * Supplies old SIM PIN2 and new PIN2.
771 * "data" is const char **
772 * ((const char **)data)[0] is old PIN2 value
773 * ((const char **)data)[1] is new PIN2 value
775 * "response" is int *
776 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
781 * RADIO_NOT_AVAILABLE (radio resetting)
784 * (old PIN2 is invalid)
788 #define RIL_REQUEST_CHANGE_SIM_PIN2 7
791 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
793 * Requests that network personlization be deactivated
795 * "data" is const char **
796 * ((const char **)(data))[0]] is network depersonlization code
798 * "response" is int *
799 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
804 * RADIO_NOT_AVAILABLE (radio resetting)
810 #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
813 * RIL_REQUEST_GET_CURRENT_CALLS
815 * Requests current call list
819 * "response" must be a "const RIL_Call **"
824 * RADIO_NOT_AVAILABLE (radio resetting)
826 * (request will be made again in a few hundred msec)
829 #define RIL_REQUEST_GET_CURRENT_CALLS 9
835 * Initiate voice call
837 * "data" is const RIL_Dial *
840 * This method is never used for supplementary service codes
844 * RADIO_NOT_AVAILABLE (radio resetting)
847 #define RIL_REQUEST_DIAL 10
850 * RIL_REQUEST_GET_IMSI
854 * Only valid when radio state is "RADIO_STATE_SIM_READY"
857 * "response" is a const char * containing the IMSI
861 * RADIO_NOT_AVAILABLE (radio resetting)
865 #define RIL_REQUEST_GET_IMSI 11
870 * Hang up a specific line (like AT+CHLD=1x)
873 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
879 * RADIO_NOT_AVAILABLE (radio resetting)
883 #define RIL_REQUEST_HANGUP 12
886 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
888 * Hang up waiting or held (like AT+CHLD=0)
895 * RADIO_NOT_AVAILABLE (radio resetting)
899 #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
902 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
904 * Hang up waiting or held (like AT+CHLD=1)
911 * RADIO_NOT_AVAILABLE (radio resetting)
915 #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
918 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
920 * Switch waiting or holding call and active call (like AT+CHLD=2)
922 * State transitions should be is follows:
924 * If call 1 is waiting and call 2 is active, then if this re
927 * Call 1 Call 2 Call 1 Call 2
928 * ACTIVE HOLDING HOLDING ACTIVE
929 * ACTIVE WAITING HOLDING ACTIVE
930 * HOLDING WAITING HOLDING ACTIVE
931 * ACTIVE IDLE HOLDING IDLE
932 * IDLE IDLE IDLE IDLE
939 * RADIO_NOT_AVAILABLE (radio resetting)
943 #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
944 #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
947 * RIL_REQUEST_CONFERENCE
949 * Conference holding and active (like AT+CHLD=3)
956 * RADIO_NOT_AVAILABLE (radio resetting)
959 #define RIL_REQUEST_CONFERENCE 16
964 * Send UDUB (user determined used busy) to ringing or
965 * waiting call answer)(RIL_BasicRequest r);
972 * RADIO_NOT_AVAILABLE (radio resetting)
975 #define RIL_REQUEST_UDUB 17
978 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
980 * Requests the failure cause code for the most recently terminated call
983 * "response" is a "int *"
984 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
985 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
986 * failure reasons are derived from the possible call failure scenarios
987 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
989 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
990 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
992 * If the implementation does not have access to the exact cause codes,
993 * then it should return one of the values listed in RIL_LastCallFailCause,
994 * as the UI layer needs to distinguish these cases for tone generation or
995 * error notification.
999 * RADIO_NOT_AVAILABLE
1002 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
1004 #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
1007 * RIL_REQUEST_SIGNAL_STRENGTH
1009 * Requests current signal strength and associated information
1011 * Must succeed if radio is on.
1015 * "response" is a const RIL_SignalStrength *
1019 * RADIO_NOT_AVAILABLE
1021 #define RIL_REQUEST_SIGNAL_STRENGTH 19
1024 * RIL_REQUEST_REGISTRATION_STATE
1026 * Request current registration state
1029 * "response" is a "char **"
1030 * ((const char **)response)[0] is registration state 0-6,
1031 * 0 - Not registered, MT is not currently searching
1032 * a new operator to register
1033 * 1 - Registered, home network
1034 * 2 - Not registered, but MT is currently searching
1035 * a new operator to register
1036 * 3 - Registration denied
1038 * 5 - Registered, roaming
1039 * 10 - Same as 0, but indicates that emergency calls
1041 * 12 - Same as 2, but indicates that emergency calls
1043 * 13 - Same as 3, but indicates that emergency calls
1045 * 14 - Same as 4, but indicates that emergency calls
1048 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1049 * NULL if not.Valid LAC are 0x0000 - 0xffff
1050 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1052 * Valid CID are 0x00000000 - 0xffffffff
1053 * In GSM, CID is Cell ID (see TS 27.007)
1055 * In UMTS, CID is UMTS Cell Identity
1056 * (see TS 25.331) in 28 bits
1057 * ((const char **)response)[3] indicates the available radio technology 0-7,
1058 * 0 - Unknown, 1 - GPRS, 2 - EDGE, 3 - UMTS,
1059 * 4 - IS95A, 5 - IS95B, 6 - 1xRTT,
1060 * 7 - EvDo Rev. 0, 8 - EvDo Rev. A,
1061 * 9 - HSDPA, 10 - HSUPA, 11 - HSPA,
1063 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1064 * system or NULL if not. Base Station ID in
1066 * ((const char **)response)[5] is Base Station latitude if registered on a
1067 * CDMA system or NULL if not. Base Station
1068 * latitude is a decimal number as specified in
1069 * 3GPP2 C.S0005-A v6.0. It is represented in
1070 * units of 0.25 seconds and ranges from -1296000
1071 * to 1296000, both values inclusive (corresponding
1072 * to a range of -90° to +90°).
1073 * ((const char **)response)[6] is Base Station longitude if registered on a
1074 * CDMA system or NULL if not. Base Station
1075 * longitude is a decimal number as specified in
1076 * 3GPP2 C.S0005-A v6.0. It is represented in
1077 * units of 0.25 seconds and ranges from -2592000
1078 * to 2592000, both values inclusive (corresponding
1079 * to a range of -180° to +180°).
1080 * ((const char **)response)[7] is concurrent services support indicator if
1081 * registered on a CDMA system 0-1.
1082 * 0 - Concurrent services not supported,
1083 * 1 - Concurrent services supported
1084 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1085 * NULL if not. Valid System ID are 0 - 32767
1086 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1087 * NULL if not. Valid System ID are 0 - 65535
1088 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
1089 * on a CDMA or EVDO system or NULL if not. Valid values
1091 * ((const char **)response)[11] indicates whether the current system is in the
1092 * PRL if registered on a CDMA or EVDO system or NULL if
1093 * not. 0=not in the PRL, 1=in the PRL
1094 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
1095 * if registered on a CDMA or EVDO system or NULL if not.
1096 * Valid values are 0-255.
1097 * ((const char **)response)[13] if registration state is 3 (Registration
1098 * denied) this is an enumerated reason why
1099 * registration was denied. See 3GPP TS 24.008,
1100 * 10.5.3.6 and Annex G.
1102 * 1 - Authentication Failure
1103 * 2 - IMSI unknown in HLR
1106 * 5 - PLMN not allowed
1107 * 6 - Location area not allowed
1108 * 7 - Roaming not allowed
1109 * 8 - No Suitable Cells in this Location Area
1110 * 9 - Network failure
1111 * 10 - Persistent location update reject
1113 * Please note that registration state 4 ("unknown") is treated
1114 * as "out of service" in the Android telephony system
1116 * Registration state 3 can be returned if Location Update Reject
1117 * (with cause 17 - Network Failure) is received repeatedly from the network,
1118 * to facilitate "managed roaming"
1122 * RADIO_NOT_AVAILABLE
1125 #define RIL_REQUEST_REGISTRATION_STATE 20
1128 * RIL_REQUEST_GPRS_REGISTRATION_STATE
1130 * Request current GPRS registration state
1133 * "response" is a "char **"
1134 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG
1135 * ((const char **)response)[1] is LAC if registered or NULL if not
1136 * ((const char **)response)[2] is CID if registered or NULL if not
1137 * ((const char **)response)[3] indicates the available radio technology, where:
1146 * LAC and CID are in hexadecimal format.
1147 * valid LAC are 0x0000 - 0xffff
1148 * valid CID are 0x00000000 - 0x0fffffff
1150 * Please note that registration state 4 ("unknown") is treated
1151 * as "out of service" in the Android telephony system
1155 * RADIO_NOT_AVAILABLE
1158 #define RIL_REQUEST_GPRS_REGISTRATION_STATE 21
1161 * RIL_REQUEST_OPERATOR
1163 * Request current operator ONS or EONS
1166 * "response" is a "const char **"
1167 * ((const char **)response)[0] is long alpha ONS or EONS
1168 * or NULL if unregistered
1170 * ((const char **)response)[1] is short alpha ONS or EONS
1171 * or NULL if unregistered
1172 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1173 * or NULL if unregistered
1177 * RADIO_NOT_AVAILABLE
1180 #define RIL_REQUEST_OPERATOR 22
1183 * RIL_REQUEST_RADIO_POWER
1185 * Toggle radio on and off (for "airplane" mode)
1187 * ((int *)data)[0] is > 0 for "Radio On"
1188 * ((int *)data)[0] is == 0 for "Radio Off"
1190 * "response" is NULL
1192 * Turn radio on if "on" > 0
1193 * Turn radio off if "on" == 0
1197 * RADIO_NOT_AVAILABLE
1200 #define RIL_REQUEST_RADIO_POWER 23
1207 * If the implementation is currently playing a tone requested via
1208 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1209 * should be played instead
1211 * "data" is a char * containing a single character with one of 12 values: 0-9,*,#
1212 * "response" is NULL
1214 * FIXME should this block/mute microphone?
1215 * How does this interact with local DTMF feedback?
1219 * RADIO_NOT_AVAILABLE
1222 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1225 #define RIL_REQUEST_DTMF 24
1228 * RIL_REQUEST_SEND_SMS
1230 * Send an SMS message
1232 * "data" is const char **
1233 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1234 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1235 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1236 * less the SMSC address
1237 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1239 * "response" is a const RIL_SMS_Response *
1241 * Based on the return error, caller decides to resend if sending sms
1242 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1243 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1247 * RADIO_NOT_AVAILABLE
1248 * SMS_SEND_FAIL_RETRY
1252 * FIXME how do we specify TP-Message-Reference if we need to resend?
1254 #define RIL_REQUEST_SEND_SMS 25
1258 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
1260 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1261 * except that more messages are expected to be sent soon. If possible,
1262 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1264 * "data" is const char **
1265 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1266 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1267 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1268 * less the SMSC address
1269 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1271 * "response" is a const RIL_SMS_Response *
1273 * Based on the return error, caller decides to resend if sending sms
1274 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1275 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1279 * RADIO_NOT_AVAILABLE
1280 * SMS_SEND_FAIL_RETRY
1284 #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1288 * RIL_REQUEST_SETUP_DATA_CALL
1290 * Setup a packet data connection
1292 * "data" is a const char **
1293 * ((const char **)data)[0] indicates whether to setup connection on radio technology CDMA
1294 * or GSM/UMTS, 0-1. 0 - CDMA, 1-GSM/UMTS
1296 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
1297 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
1298 * override the one in the profile. NULL indicates no APN overrride.
1299 * ((const char **)data)[3] is the username for APN, or NULL
1300 * ((const char **)data)[4] is the password for APN, or NULL
1301 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
1302 * 0 => PAP and CHAP is never performed.
1303 * 1 => PAP may be performed; CHAP is never performed.
1304 * 2 => CHAP may be performed; PAP is never performed.
1305 * 3 => PAP / CHAP may be performed - baseband dependent.
1307 * "response" is a char **
1308 * ((char **)response)[0] indicating PDP CID, which is generated by RIL. This Connection ID is
1309 * used in GSM/UMTS and CDMA
1310 * ((char **)response)[1] indicating the network interface name for GSM/UMTS or CDMA
1311 * ((char **)response)[2] indicating the IP address for this interface for GSM/UMTS
1314 * FIXME may need way to configure QoS settings
1316 * replaces RIL_REQUEST_SETUP_DEFAULT_PDP
1320 * RADIO_NOT_AVAILABLE
1323 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
1325 #define RIL_REQUEST_SETUP_DATA_CALL 27
1330 * RIL_REQUEST_SIM_IO
1332 * Request SIM I/O operation.
1333 * This is similar to the TS 27.007 "restricted SIM" operation
1334 * where it assumes all of the EF selection will be done by the
1337 * "data" is a const RIL_SIM_IO *
1338 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1339 * or may specify a PIN2 for operations that require a PIN2 (eg
1340 * updating FDN records)
1342 * "response" is a const RIL_SIM_IO_Response *
1344 * Arguments and responses that are unused for certain
1345 * values of "command" should be ignored or set to NULL
1349 * RADIO_NOT_AVAILABLE
1354 #define RIL_REQUEST_SIM_IO 28
1357 * RIL_REQUEST_SEND_USSD
1359 * Send a USSD message
1361 * If a USSD session already exists, the message should be sent in the
1362 * context of that session. Otherwise, a new session should be created.
1364 * The network reply should be reported via RIL_UNSOL_ON_USSD
1366 * Only one USSD session may exist at a time, and the session is assumed
1368 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1369 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1370 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1372 * "data" is a const char * containing the USSD request in UTF-8 format
1373 * "response" is NULL
1377 * RADIO_NOT_AVAILABLE
1381 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1384 #define RIL_REQUEST_SEND_USSD 29
1387 * RIL_REQUEST_CANCEL_USSD
1389 * Cancel the current USSD session if one exists
1392 * "response" is NULL
1396 * RADIO_NOT_AVAILABLE
1400 #define RIL_REQUEST_CANCEL_USSD 30
1403 * RIL_REQUEST_GET_CLIR
1405 * Gets current CLIR status
1407 * "response" is int *
1408 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1409 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
1413 * RADIO_NOT_AVAILABLE
1416 #define RIL_REQUEST_GET_CLIR 31
1419 * RIL_REQUEST_SET_CLIR
1422 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1424 * "response" is NULL
1428 * RADIO_NOT_AVAILABLE
1431 #define RIL_REQUEST_SET_CLIR 32
1434 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
1436 * "data" is const RIL_CallForwardInfo *
1438 * "response" is const RIL_CallForwardInfo **
1439 * "response" points to an array of RIL_CallForwardInfo *'s, one for
1440 * each distinct registered phone number.
1442 * For example, if data is forwarded to +18005551212 and voice is forwarded
1443 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
1445 * If, however, both data and voice are forwarded to +18005551212, then
1446 * a single RIL_CallForwardInfo can be returned with the service class
1447 * set to "data + voice = 3")
1451 * RADIO_NOT_AVAILABLE
1454 #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
1458 * RIL_REQUEST_SET_CALL_FORWARD
1460 * Configure call forward rule
1462 * "data" is const RIL_CallForwardInfo *
1463 * "response" is NULL
1467 * RADIO_NOT_AVAILABLE
1470 #define RIL_REQUEST_SET_CALL_FORWARD 34
1474 * RIL_REQUEST_QUERY_CALL_WAITING
1476 * Query current call waiting state
1478 * "data" is const int *
1479 * ((const int *)data)[0] is the TS 27.007 service class to query.
1480 * "response" is a const int *
1481 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
1483 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
1484 * must follow, with the TS 27.007 service class bit vector of services
1485 * for which call waiting is enabled.
1487 * For example, if ((const int *)response)[0] is 1 and
1488 * ((const int *)response)[1] is 3, then call waiting is enabled for data
1489 * and voice and disabled for everything else
1493 * RADIO_NOT_AVAILABLE
1496 #define RIL_REQUEST_QUERY_CALL_WAITING 35
1500 * RIL_REQUEST_SET_CALL_WAITING
1502 * Configure current call waiting state
1504 * "data" is const int *
1505 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
1506 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
1507 * services to modify
1508 * "response" is NULL
1512 * RADIO_NOT_AVAILABLE
1515 #define RIL_REQUEST_SET_CALL_WAITING 36
1518 * RIL_REQUEST_SMS_ACKNOWLEDGE
1520 * Acknowledge successful or failed receipt of SMS previously indicated
1521 * via RIL_UNSOL_RESPONSE_NEW_SMS
1524 * ((int *)data)[0] is 1 on successful receipt
1525 * (basically, AT+CNMA=1 from TS 27.005
1526 * is 0 on failed receipt
1527 * (basically, AT+CNMA=2 from TS 27.005)
1528 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
1529 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
1530 * capacity exceeded) and 0xFF (unspecified error) are
1533 * "response" is NULL
1535 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
1539 * RADIO_NOT_AVAILABLE
1542 #define RIL_REQUEST_SMS_ACKNOWLEDGE 37
1545 * RIL_REQUEST_GET_IMEI - DEPRECATED
1547 * Get the device IMEI, including check digit
1549 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
1550 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1553 * "response" is a const char * containing the IMEI
1557 * RADIO_NOT_AVAILABLE (radio resetting)
1561 #define RIL_REQUEST_GET_IMEI 38
1564 * RIL_REQUEST_GET_IMEISV - DEPRECATED
1566 * Get the device IMEISV, which should be two decimal digits
1568 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
1569 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1572 * "response" is a const char * containing the IMEISV
1576 * RADIO_NOT_AVAILABLE (radio resetting)
1580 #define RIL_REQUEST_GET_IMEISV 39
1584 * RIL_REQUEST_ANSWER
1586 * Answer incoming call
1588 * Will not be called for WAITING calls.
1589 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
1593 * "response" is NULL
1597 * RADIO_NOT_AVAILABLE (radio resetting)
1601 #define RIL_REQUEST_ANSWER 40
1604 * RIL_REQUEST_DEACTIVATE_DATA_CALL
1606 * Deactivate packet data connection
1607 * replaces RIL_REQUEST_DEACTIVATE_DEFAULT_PDP
1609 * "data" is const char **
1610 * ((char**)data)[0] indicating CID
1612 * "response" is NULL
1616 * RADIO_NOT_AVAILABLE
1619 * See also: RIL_REQUEST_SETUP_DATA_CALL
1621 #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
1624 * RIL_REQUEST_QUERY_FACILITY_LOCK
1626 * Query the status of a facility lock state
1628 * "data" is const char **
1629 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
1630 * (eg "AO" for BAOC, "SC" for SIM lock)
1631 * ((const char **)data)[1] is the password, or "" if not required
1632 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
1635 * "response" is an int *
1636 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
1637 * services for which the specified barring facility
1638 * is active. "0" means "disabled for all"
1643 * RADIO_NOT_AVAILABLE
1647 #define RIL_REQUEST_QUERY_FACILITY_LOCK 42
1650 * RIL_REQUEST_SET_FACILITY_LOCK
1652 * Enable/disable one facility lock
1654 * "data" is const char **
1656 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1657 * (eg "AO" for BAOC)
1658 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
1659 * ((const char **)data)[2] = password
1660 * ((const char **)data)[3] = string representation of decimal TS 27.007
1661 * service class bit vector. Eg, the string
1662 * "1" means "set this facility for voice services"
1664 * "response" is int *
1665 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1669 * RADIO_NOT_AVAILABLE
1673 #define RIL_REQUEST_SET_FACILITY_LOCK 43
1676 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
1678 * Change call barring facility password
1680 * "data" is const char **
1682 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1683 * (eg "AO" for BAOC)
1684 * ((const char **)data)[1] = old password
1685 * ((const char **)data)[2] = new password
1687 * "response" is NULL
1691 * RADIO_NOT_AVAILABLE
1695 #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
1698 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
1700 * Query current network selectin mode
1704 * "response" is int *
1705 * ((const int *)response)[0] is
1706 * 0 for automatic selection
1707 * 1 for manual selection
1711 * RADIO_NOT_AVAILABLE
1715 #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
1718 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
1720 * Specify that the network should be selected automatically
1723 * "response" is NULL
1725 * This request must not respond until the new operator is selected
1730 * RADIO_NOT_AVAILABLE
1734 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
1735 * no retries needed, such as illegal SIM or ME.
1736 * Returns GENERIC_FAILURE for all other causes that might be
1740 #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
1743 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
1745 * Manually select a specified network.
1747 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
1748 * "response" is NULL
1750 * This request must not respond until the new operator is selected
1755 * RADIO_NOT_AVAILABLE
1759 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
1760 * no retries needed, such as illegal SIM or ME.
1761 * Returns GENERIC_FAILURE for all other causes that might be
1765 #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
1768 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
1770 * Scans for available networks
1773 * "response" is const char ** that should be an array of n*4 strings, where
1774 * n is the number of available networks
1775 * For each available network:
1777 * ((const char **)response)[n+0] is long alpha ONS or EONS
1778 * ((const char **)response)[n+1] is short alpha ONS or EONS
1779 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
1780 * ((const char **)response)[n+3] is a string value of the status:
1786 * This request must not respond until the new operator is selected
1791 * RADIO_NOT_AVAILABLE
1795 #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
1798 * RIL_REQUEST_DTMF_START
1800 * Start playing a DTMF tone. Continue playing DTMF tone until
1801 * RIL_REQUEST_DTMF_STOP is received
1803 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
1804 * it should cancel the previous tone and play the new one.
1806 * "data" is a char *
1807 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
1808 * "response" is NULL
1812 * RADIO_NOT_AVAILABLE
1815 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
1817 #define RIL_REQUEST_DTMF_START 49
1820 * RIL_REQUEST_DTMF_STOP
1822 * Stop playing a currently playing DTMF tone.
1825 * "response" is NULL
1829 * RADIO_NOT_AVAILABLE
1832 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
1834 #define RIL_REQUEST_DTMF_STOP 50
1837 * RIL_REQUEST_BASEBAND_VERSION
1839 * Return string value indicating baseband version, eg
1840 * response from AT+CGMR
1843 * "response" is const char * containing version string for log reporting
1847 * RADIO_NOT_AVAILABLE
1851 #define RIL_REQUEST_BASEBAND_VERSION 51
1854 * RIL_REQUEST_SEPARATE_CONNECTION
1856 * Separate a party from a multiparty call placing the multiparty call
1857 * (less the specified party) on hold and leaving the specified party
1858 * as the only other member of the current (active) call
1862 * See TS 22.084 1.3.8.2 (iii)
1863 * TS 22.030 6.5.5 "Entering "2X followed by send"
1864 * TS 27.007 "AT+CHLD=2x"
1866 * "data" is an int *
1867 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
1869 * "response" is NULL
1873 * RADIO_NOT_AVAILABLE (radio resetting)
1876 #define RIL_REQUEST_SEPARATE_CONNECTION 52
1880 * RIL_REQUEST_SET_MUTE
1882 * Turn on or off uplink (microphone) mute.
1884 * Will only be sent while voice call is active.
1885 * Will always be reset to "disable mute" when a new voice call is initiated
1887 * "data" is an int *
1888 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
1890 * "response" is NULL
1894 * RADIO_NOT_AVAILABLE (radio resetting)
1898 #define RIL_REQUEST_SET_MUTE 53
1901 * RIL_REQUEST_GET_MUTE
1903 * Queries the current state of the uplink mute setting
1906 * "response" is an int *
1907 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
1911 * RADIO_NOT_AVAILABLE (radio resetting)
1915 #define RIL_REQUEST_GET_MUTE 54
1918 * RIL_REQUEST_QUERY_CLIP
1920 * Queries the status of the CLIP supplementary service
1922 * (for MMI code "*#30#")
1925 * "response" is an int *
1926 * (int *)response)[0] is 1 for "CLIP provisioned"
1927 * and 0 for "CLIP not provisioned"
1928 * and 2 for "unknown, e.g. no network etc"
1932 * RADIO_NOT_AVAILABLE (radio resetting)
1936 #define RIL_REQUEST_QUERY_CLIP 55
1939 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
1941 * Requests the failure cause code for the most recently failed PDP
1942 * context or CDMA data connection active
1943 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
1947 * "response" is a "int *"
1948 * ((int *)response)[0] is an integer cause code defined in TS 24.008
1949 * section 6.1.3.1.3 or close approximation
1951 * If the implementation does not have access to the exact cause codes,
1952 * then it should return one of the values listed in
1953 * RIL_LastDataCallActivateFailCause, as the UI layer needs to distinguish these
1954 * cases for error notification
1955 * and potential retries.
1959 * RADIO_NOT_AVAILABLE
1962 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1966 #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
1969 * RIL_REQUEST_DATA_CALL_LIST
1971 * Queries the status of PDP contexts, returning for each
1972 * its CID, whether or not it is active, and its PDP type,
1973 * APN, and PDP adddress.
1974 * replaces RIL_REQUEST_PDP_CONTEXT_LIST
1977 * "response" is an array of RIL_Data_Call_Response
1981 * RADIO_NOT_AVAILABLE (radio resetting)
1985 #define RIL_REQUEST_DATA_CALL_LIST 57
1988 * RIL_REQUEST_RESET_RADIO - DEPRECATED
1990 * Request a radio reset. The RIL implementation may postpone
1991 * the reset until after this request is responded to if the baseband
1992 * is presently busy.
1994 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
1997 * "response" is NULL
2001 * RADIO_NOT_AVAILABLE (radio resetting)
2003 * REQUEST_NOT_SUPPORTED
2006 #define RIL_REQUEST_RESET_RADIO 58
2009 * RIL_REQUEST_OEM_HOOK_RAW
2011 * This request reserved for OEM-specific uses. It passes raw byte arrays
2014 * It can be invoked on the Java side from
2015 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
2017 * "data" is a char * of bytes copied from the byte[] data argument in java
2018 * "response" is a char * of bytes that will returned via the
2019 * caller's "response" Message here:
2020 * (byte[])(((AsyncResult)response.obj).result)
2022 * An error response here will result in
2023 * (((AsyncResult)response.obj).result) == null and
2024 * (((AsyncResult)response.obj).exception) being an instance of
2025 * com.android.internal.telephony.gsm.CommandException
2031 #define RIL_REQUEST_OEM_HOOK_RAW 59
2034 * RIL_REQUEST_OEM_HOOK_STRINGS
2036 * This request reserved for OEM-specific uses. It passes strings
2039 * It can be invoked on the Java side from
2040 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
2042 * "data" is a const char **, representing an array of null-terminated UTF-8
2043 * strings copied from the "String[] strings" argument to
2044 * invokeOemRilRequestStrings()
2046 * "response" is a const char **, representing an array of null-terminated UTF-8
2047 * stings that will be returned via the caller's response message here:
2049 * (String[])(((AsyncResult)response.obj).result)
2051 * An error response here will result in
2052 * (((AsyncResult)response.obj).result) == null and
2053 * (((AsyncResult)response.obj).exception) being an instance of
2054 * com.android.internal.telephony.gsm.CommandException
2060 #define RIL_REQUEST_OEM_HOOK_STRINGS 60
2063 * RIL_REQUEST_SCREEN_STATE
2065 * Indicates the current state of the screen. When the screen is off, the
2066 * RIL should notify the baseband to suppress certain notifications (eg,
2067 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
2068 * in an effort to conserve power. These notifications should resume when the
2072 * ((int *)data)[0] is == 1 for "Screen On"
2073 * ((int *)data)[0] is == 0 for "Screen Off"
2075 * "response" is NULL
2081 #define RIL_REQUEST_SCREEN_STATE 61
2085 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
2087 * Enables/disables supplementary service related notifications
2090 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2093 * ((int *)data)[0] is == 1 for notifications enabled
2094 * ((int *)data)[0] is == 0 for notifications disabled
2096 * "response" is NULL
2100 * RADIO_NOT_AVAILABLE
2103 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2105 #define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2108 * RIL_REQUEST_WRITE_SMS_TO_SIM
2110 * Stores a SMS message to SIM memory.
2112 * "data" is RIL_SMS_WriteArgs *
2114 * "response" is int *
2115 * ((const int *)response)[0] is the record index where the message is stored.
2122 #define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2125 * RIL_REQUEST_DELETE_SMS_ON_SIM
2127 * Deletes a SMS message from SIM memory.
2130 * ((int *)data)[0] is the record index of the message to delete.
2132 * "response" is NULL
2139 #define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2142 * RIL_REQUEST_SET_BAND_MODE
2144 * Assign a specified band for RF configuration.
2147 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2148 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2149 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2150 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2151 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2152 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2153 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2154 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2155 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2156 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2157 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2158 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2159 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2160 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2161 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2162 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2163 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2164 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2165 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
2167 * "response" is NULL
2171 * RADIO_NOT_AVAILABLE
2174 #define RIL_REQUEST_SET_BAND_MODE 65
2177 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2179 * Query the list of band mode supported by RF.
2183 * "response" is int *
2184 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2185 * each available band mode.
2187 * 0 for "unspecified" (selected by baseband automatically)
2188 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2189 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2190 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2191 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2192 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2193 * 6 for "Cellular (800-MHz Band)"
2194 * 7 for "PCS (1900-MHz Band)"
2195 * 8 for "Band Class 3 (JTACS Band)"
2196 * 9 for "Band Class 4 (Korean PCS Band)"
2197 * 10 for "Band Class 5 (450-MHz Band)"
2198 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2199 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2200 * 13 for "Band Class 8 (1800-MHz Band)"
2201 * 14 for "Band Class 9 (900-MHz Band)"
2202 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2203 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2204 * 17 for "Band Class 15 (AWS Band)"
2205 * 18 for "Band Class 16 (US 2.5-GHz Band)"
2209 * RADIO_NOT_AVAILABLE
2212 * See also: RIL_REQUEST_SET_BAND_MODE
2214 #define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2217 * RIL_REQUEST_STK_GET_PROFILE
2219 * Requests the profile of SIM tool kit.
2220 * The profile indicates the SAT/USAT features supported by ME.
2221 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2225 * "response" is a const char * containing SAT/USAT profile
2226 * in hexadecimal format string starting with first byte of terminal profile
2230 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2231 * RIL_E_GENERIC_FAILURE
2233 #define RIL_REQUEST_STK_GET_PROFILE 67
2236 * RIL_REQUEST_STK_SET_PROFILE
2238 * Download the STK terminal profile as part of SIM initialization
2241 * "data" is a const char * containing SAT/USAT profile
2242 * in hexadecimal format string starting with first byte of terminal profile
2244 * "response" is NULL
2248 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2249 * RIL_E_GENERIC_FAILURE
2251 #define RIL_REQUEST_STK_SET_PROFILE 68
2254 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2256 * Requests to send a SAT/USAT envelope command to SIM.
2257 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2259 * "data" is a const char * containing SAT/USAT command
2260 * in hexadecimal format string starting with command tag
2262 * "response" is a const char * containing SAT/USAT response
2263 * in hexadecimal format string starting with first byte of response
2268 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2269 * RIL_E_GENERIC_FAILURE
2271 #define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2274 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2276 * Requests to send a terminal response to SIM for a received
2279 * "data" is a const char * containing SAT/USAT response
2280 * in hexadecimal format string starting with first byte of response data
2282 * "response" is NULL
2286 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2287 * RIL_E_GENERIC_FAILURE
2289 #define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
2292 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
2294 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
2295 * been initialized by ME already. (We could see the call has been in the 'call
2296 * list') So, STK application needs to accept/reject the call according as user
2300 * ((int *)data)[0] is > 0 for "accept" the call setup
2301 * ((int *)data)[0] is == 0 for "reject" the call setup
2303 * "response" is NULL
2307 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2308 * RIL_E_GENERIC_FAILURE
2310 #define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
2313 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
2315 * Connects the two calls and disconnects the subscriber from both calls.
2318 * "response" is NULL
2322 * RADIO_NOT_AVAILABLE (radio resetting)
2325 #define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
2328 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2330 * Requests to set the preferred network type for searching and registering
2331 * (CS/PS domain, RAT, and operation mode)
2335 * ((int *)data)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
2336 * ((int *)data)[0] is == 1 for GSM only
2337 * ((int *)data)[0] is == 2 for WCDMA only
2338 * ((int *)data)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL)
2339 * ((int *)data)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2340 * ((int *)data)[0] is == 5 for CDMA only
2341 * ((int *)data)[0] is == 6 for EvDo only
2342 * ((int *)data)[0] is == 7 for GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
2344 * "response" is NULL
2348 * RADIO_NOT_AVAILABLE (radio resetting)
2350 * MODE_NOT_SUPPORTED
2352 #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2355 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2357 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2358 * for searching and registering
2362 * "response" is int *
2363 * ((int *)response)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
2364 * ((int *)response)[0] is == 1 for GSM only
2365 * ((int *)response)[0] is == 2 for WCDMA only
2366 * ((int *)response)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL)
2367 * ((int *)response)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2368 * ((int *)response)[0] is == 5 for CDMA only
2369 * ((int *)response)[0] is == 6 for EvDo only
2370 * ((int *)response)[0] is == 7 for GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
2374 * RADIO_NOT_AVAILABLE
2377 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2379 #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2382 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2384 * Request neighboring cell id in GSM network
2387 * "response" must be a " const RIL_NeighboringCell** "
2391 * RADIO_NOT_AVAILABLE
2394 #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
2397 * RIL_REQUEST_SET_LOCATION_UPDATES
2399 * Enables/disables network state change notifications due to changes in
2400 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
2401 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
2403 * Note: The RIL implementation should default to "updates enabled"
2404 * when the screen is on and "updates disabled" when the screen is off.
2407 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
2408 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
2410 * "response" is NULL
2414 * RADIO_NOT_AVAILABLE
2417 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2419 #define RIL_REQUEST_SET_LOCATION_UPDATES 76
2422 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION
2424 * Request to set the location where the CDMA subscription shall
2428 * ((int *)data)[0] is == 0 from RUIM/SIM (default)
2429 * ((int *)data)[0] is == 1 from NV
2431 * "response" is NULL
2435 * RADIO_NOT_AVAILABLE
2438 * SUBSCRIPTION_NOT_AVAILABLE
2440 #define RIL_REQUEST_CDMA_SET_SUBSCRIPTION 77
2443 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
2445 * Request to set the roaming preferences in CDMA
2448 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
2449 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2450 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
2452 * "response" is NULL
2456 * RADIO_NOT_AVAILABLE
2459 #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
2462 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
2464 * Request the actual setting of the roaming preferences in CDMA in the modem
2468 * "response" is int *
2469 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
2470 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2471 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
2473 * "response" is NULL
2477 * RADIO_NOT_AVAILABLE
2480 #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
2483 * RIL_REQUEST_SET_TTY_MODE
2485 * Request to set the TTY mode
2488 * ((int *)data)[0] is == 0 for TTY off
2489 * ((int *)data)[0] is == 1 for TTY Full
2490 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
2491 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
2493 * "response" is NULL
2497 * RADIO_NOT_AVAILABLE
2500 #define RIL_REQUEST_SET_TTY_MODE 80
2503 * RIL_REQUEST_QUERY_TTY_MODE
2505 * Request the setting of TTY mode
2509 * "response" is int *
2510 * ((int *)response)[0] is == 0 for TTY off
2511 * ((int *)response)[0] is == 1 for TTY Full
2512 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
2513 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
2515 * "response" is NULL
2519 * RADIO_NOT_AVAILABLE
2522 #define RIL_REQUEST_QUERY_TTY_MODE 81
2525 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
2527 * Request to set the preferred voice privacy mode used in voice
2531 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2532 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
2534 * "response" is NULL
2538 * RADIO_NOT_AVAILABLE
2541 #define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
2544 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
2546 * Request the setting of preferred voice privacy mode
2550 * "response" is int *
2551 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2552 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
2554 * "response" is NULL
2558 * RADIO_NOT_AVAILABLE
2561 #define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
2564 * RIL_REQUEST_CDMA_FLASH
2568 * "data" is const char *
2569 * ((const char *)data)[0] is a FLASH string
2571 * "response" is NULL
2575 * RADIO_NOT_AVAILABLE
2579 #define RIL_REQUEST_CDMA_FLASH 84
2582 * RIL_REQUEST_CDMA_BURST_DTMF
2586 * "data" is const char **
2587 * ((const char **)data)[0] is a DTMF string
2588 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
2590 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
2593 * "response" is NULL
2597 * RADIO_NOT_AVAILABLE
2601 #define RIL_REQUEST_CDMA_BURST_DTMF 85
2604 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
2606 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
2607 * If the checksum is valid the 20 digit AKEY is written to NV,
2608 * replacing the existing AKEY no matter what it was before.
2610 * "data" is const char *
2611 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
2612 * where the last 6 digits are a checksum of the
2613 * first 20, as specified in TR45.AHAG
2614 * "Common Cryptographic Algorithms, Revision D.1
2617 * "response" is NULL
2621 * RADIO_NOT_AVAILABLE
2625 #define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
2628 * RIL_REQUEST_CDMA_SEND_SMS
2630 * Send a CDMA SMS message
2632 * "data" is const RIL_CDMA_SMS_Message *
2634 * "response" is a const RIL_SMS_Response *
2636 * Based on the return error, caller decides to resend if sending sms
2637 * fails. The CDMA error class is derived as follows,
2638 * SUCCESS is error class 0 (no error)
2639 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
2640 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
2644 * RADIO_NOT_AVAILABLE
2645 * SMS_SEND_FAIL_RETRY
2649 #define RIL_REQUEST_CDMA_SEND_SMS 87
2652 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
2654 * Acknowledge the success or failure in the receipt of SMS
2655 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
2657 * "data" is const RIL_CDMA_SMS_Ack *
2659 * "response" is NULL
2663 * RADIO_NOT_AVAILABLE
2667 #define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
2670 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
2672 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
2676 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
2677 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
2681 * RADIO_NOT_AVAILABLE
2685 #define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
2688 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
2690 * Set GSM/WCDMA Cell Broadcast SMS config
2692 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
2693 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
2695 * "response" is NULL
2699 * RADIO_NOT_AVAILABLE
2703 #define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
2706 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
2708 * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
2710 * "data" is const int *
2711 * (const int *)data[0] indicates to activate or turn off the
2712 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
2713 * 0 - Activate, 1 - Turn off
2715 * "response" is NULL
2719 * RADIO_NOT_AVAILABLE
2723 #define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
2726 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
2728 * Request the setting of CDMA Broadcast SMS config
2732 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
2733 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
2737 * RADIO_NOT_AVAILABLE
2741 #define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
2744 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
2746 * Set CDMA Broadcast SMS config
2748 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
2749 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
2751 * "response" is NULL
2755 * RADIO_NOT_AVAILABLE
2759 #define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
2762 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
2764 * Enable or disable the reception of CDMA Broadcast SMS
2766 * "data" is const int *
2767 * (const int *)data[0] indicates to activate or turn off the
2768 * reception of CDMA Broadcast SMS, 0-1,
2769 * 0 - Activate, 1 - Turn off
2771 * "response" is NULL
2775 * RADIO_NOT_AVAILABLE
2779 #define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
2782 * RIL_REQUEST_CDMA_SUBSCRIPTION
2784 * Request the device MDN / H_SID / H_NID.
2786 * The request is only allowed when CDMA subscription is available. When CDMA
2787 * subscription is changed, application layer should re-issue the request to
2788 * update the subscription information.
2790 * If a NULL value is returned for any of the device id, it means that error
2791 * accessing the device.
2793 * "response" is const char **
2794 * ((const char **)response)[0] is MDN if CDMA subscription is available
2795 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
2796 * CDMA subscription is available, in decimal format
2797 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
2798 * CDMA subscription is available, in decimal format
2799 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
2800 * ((const char **)response)[4] is PRL version if CDMA subscription is available
2804 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
2807 #define RIL_REQUEST_CDMA_SUBSCRIPTION 95
2810 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
2812 * Stores a CDMA SMS message to RUIM memory.
2814 * "data" is RIL_CDMA_SMS_WriteArgs *
2816 * "response" is int *
2817 * ((const int *)response)[0] is the record index where the message is stored.
2821 * RADIO_NOT_AVAILABLE
2825 #define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
2828 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
2830 * Deletes a CDMA SMS message from RUIM memory.
2833 * ((int *)data)[0] is the record index of the message to delete.
2835 * "response" is NULL
2839 * RADIO_NOT_AVAILABLE
2843 #define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
2846 * RIL_REQUEST_DEVICE_IDENTITY
2848 * Request the device ESN / MEID / IMEI / IMEISV.
2850 * The request is always allowed and contains GSM and CDMA device identity;
2851 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
2852 * RIL_REQUEST_GET_IMEISV.
2854 * If a NULL value is returned for any of the device id, it means that error
2855 * accessing the device.
2857 * When CDMA subscription is changed the ESN/MEID may change. The application
2858 * layer should re-issue the request to update the device identity in this case.
2860 * "response" is const char **
2861 * ((const char **)response)[0] is IMEI if GSM subscription is available
2862 * ((const char **)response)[1] is IMEISV if GSM subscription is available
2863 * ((const char **)response)[2] is ESN if CDMA subscription is available
2864 * ((const char **)response)[3] is MEID if CDMA subscription is available
2868 * RADIO_NOT_AVAILABLE
2871 #define RIL_REQUEST_DEVICE_IDENTITY 98
2874 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
2876 * Request the radio's system selection module to exit emergency
2877 * callback mode. RIL will not respond with SUCCESS until the modem has
2878 * completely exited from Emergency Callback Mode.
2882 * "response" is NULL
2886 * RADIO_NOT_AVAILABLE
2890 #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
2893 * RIL_REQUEST_GET_SMSC_ADDRESS
2895 * Queries the default Short Message Service Center address on the device.
2899 * "response" is const char * containing the SMSC address.
2903 * RADIO_NOT_AVAILABLE
2907 #define RIL_REQUEST_GET_SMSC_ADDRESS 100
2910 * RIL_REQUEST_SET_SMSC_ADDRESS
2912 * Sets the default Short Message Service Center address on the device.
2914 * "data" is const char * containing the SMSC address.
2916 * "response" is NULL
2920 * RADIO_NOT_AVAILABLE
2924 #define RIL_REQUEST_SET_SMSC_ADDRESS 101
2927 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
2929 * Indicates whether there is storage available for new SMS messages.
2932 * ((int *)data)[0] is 1 if memory is available for storing new messages
2933 * is 0 if memory capacity is exceeded
2935 * "response" is NULL
2939 * RADIO_NOT_AVAILABLE
2943 #define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
2946 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
2948 * Indicates that the StkSerivce is running and is
2949 * ready to receive RIL_UNSOL_STK_XXXXX commands.
2952 * "response" is NULL
2956 * RADIO_NOT_AVAILABLE
2960 #define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
2963 /***********************************************************************/
2966 #define RIL_UNSOL_RESPONSE_BASE 1000
2969 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
2971 * Indicate when value of RIL_RadioState has changed.
2973 * Callee will invoke RIL_RadioStateRequest method on main thread
2978 #define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
2982 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
2984 * Indicate when call state has changed
2986 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
2990 * Response should be invoked on, for example,
2991 * "RING", "BUSY", "NO CARRIER", and also call state
2992 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
2994 * Redundent or extraneous invocations are tolerated
2996 #define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
3000 * RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3002 * Called when network state, operator name, or GPRS state has changed
3003 * Basically on, +CREG and +CGREG
3005 * Callee will invoke the following requests on main thread:
3007 * RIL_REQUEST_REGISTRATION_STATE
3008 * RIL_REQUEST_GPRS_REGISTRATION_STATE
3009 * RIL_REQUEST_OPERATOR
3013 * FIXME should this happen when SIM records are loaded? (eg, for
3016 #define RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 1002
3019 * RIL_UNSOL_RESPONSE_NEW_SMS
3021 * Called when new SMS is received.
3023 * "data" is const char *
3024 * This is a pointer to a string containing the PDU of an SMS-DELIVER
3025 * as an ascii string of hex digits. The PDU starts with the SMSC address
3026 * per TS 27.005 (+CMT:)
3028 * Callee will subsequently confirm the receipt of thei SMS with a
3029 * RIL_REQUEST_SMS_ACKNOWLEDGE
3031 * No new RIL_UNSOL_RESPONSE_NEW_SMS
3032 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3033 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3036 #define RIL_UNSOL_RESPONSE_NEW_SMS 1003
3039 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
3041 * Called when new SMS Status Report is received.
3043 * "data" is const char *
3044 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
3045 * as an ascii string of hex digits. The PDU starts with the SMSC address
3046 * per TS 27.005 (+CDS:).
3048 * Callee will subsequently confirm the receipt of the SMS with a
3049 * RIL_REQUEST_SMS_ACKNOWLEDGE
3051 * No new RIL_UNSOL_RESPONSE_NEW_SMS
3052 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3053 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3056 #define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
3059 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
3061 * Called when new SMS has been stored on SIM card
3063 * "data" is const int *
3064 * ((const int *)data)[0] contains the slot index on the SIM that contains
3068 #define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
3073 * Called when a new USSD message is received.
3075 * "data" is const char **
3076 * ((const char **)data)[0] points to a type code, which is
3077 * one of these string values:
3078 * "0" USSD-Notify -- text in ((const char **)data)[1]
3079 * "1" USSD-Request -- text in ((const char **)data)[1]
3080 * "2" Session terminated by network
3081 * "3" other local client (eg, SIM Toolkit) has responded
3082 * "4" Operation not supported
3083 * "5" Network timeout
3085 * The USSD session is assumed to persist if the type code is "1", otherwise
3086 * the current session (if any) is assumed to have terminated.
3088 * ((const char **)data)[1] points to a message string if applicable, which
3089 * should always be in UTF-8.
3091 #define RIL_UNSOL_ON_USSD 1006
3092 /* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
3095 * RIL_UNSOL_ON_USSD_REQUEST
3097 * Obsolete. Send via RIL_UNSOL_ON_USSD
3099 #define RIL_UNSOL_ON_USSD_REQUEST 1007
3103 * RIL_UNSOL_NITZ_TIME_RECEIVED
3105 * Called when radio has received a NITZ time message
3107 * "data" is const char * pointing to NITZ time string
3108 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
3110 #define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
3113 * RIL_UNSOL_SIGNAL_STRENGTH
3115 * Radio may report signal strength rather han have it polled.
3117 * "data" is a const RIL_SignalStrength *
3119 #define RIL_UNSOL_SIGNAL_STRENGTH 1009
3123 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
3125 * Indicate a PDP context state has changed, or a new context
3126 * has been activated or deactivated
3127 * replaces RIL_UNSOL_PDP_CONTEXT_LIST_CHANGED
3129 * "data" is an array of RIL_Data_Call_Response identical to that
3130 * returned by RIL_REQUEST_DATA_CALL_LIST
3132 * See also: RIL_REQUEST_DATA_CALL_LIST
3135 #define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
3138 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
3140 * Reports supplementary service related notification from the network.
3142 * "data" is a const RIL_SuppSvcNotification *
3146 #define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
3149 * RIL_UNSOL_STK_SESSION_END
3151 * Indicate when STK session is terminated by SIM.
3155 #define RIL_UNSOL_STK_SESSION_END 1012
3158 * RIL_UNSOL_STK_PROACTIVE_COMMAND
3160 * Indicate when SIM issue a STK proactive command to applications
3162 * "data" is a const char * containing SAT/USAT proactive command
3163 * in hexadecimal format string starting with command tag
3166 #define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
3169 * RIL_UNSOL_STK_EVENT_NOTIFY
3171 * Indicate when SIM notifies applcations some event happens.
3172 * Generally, application does not need to have any feedback to
3173 * SIM but shall be able to indicate appropriate messages to users.
3175 * "data" is a const char * containing SAT/USAT commands or responses
3176 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
3177 * starting with first byte of response data or command tag
3180 #define RIL_UNSOL_STK_EVENT_NOTIFY 1014
3183 * RIL_UNSOL_STK_CALL_SETUP
3185 * Indicate when SIM wants application to setup a voice call.
3187 * "data" is const int *
3188 * ((const int *)data)[0] contains timeout value (in milliseconds)
3190 #define RIL_UNSOL_STK_CALL_SETUP 1015
3193 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
3195 * Indicates that SMS storage on the SIM is full. Sent when the network
3196 * attempts to deliver a new SMS message. Messages cannot be saved on the
3197 * SIM until space is freed. In particular, incoming Class 2 messages
3203 #define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
3206 * RIL_UNSOL_SIM_REFRESH
3208 * Indicates that file(s) on the SIM have been updated, or the SIM
3209 * has been reinitialized.
3211 * "data" is an int *
3212 * ((int *)data)[0] is a RIL_SimRefreshResult.
3213 * ((int *)data)[1] is the EFID of the updated file if the result is
3214 * SIM_FILE_UPDATE or NULL for any other result.
3216 * Note: If the radio state changes as a result of the SIM refresh (eg,
3217 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3220 #define RIL_UNSOL_SIM_REFRESH 1017
3223 * RIL_UNSOL_CALL_RING
3225 * Ring indication for an incoming call (eg, RING or CRING event).
3226 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
3227 * of a call and sending multiple is optional. If the system property
3228 * ro.telephony.call_ring.multiple is false then the upper layers
3229 * will generate the multiple events internally. Otherwise the vendor
3230 * ril must generate multiple RIL_UNSOL_CALL_RING if
3231 * ro.telephony.call_ring.multiple is true or if it is absent.
3233 * The rate of these events is controlled by ro.telephony.call_ring.delay
3234 * and has a default value of 3000 (3 seconds) if absent.
3236 * "data" is null for GSM
3237 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
3239 #define RIL_UNSOL_CALL_RING 1018
3242 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
3244 * Indicates that SIM state changes.
3246 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
3250 #define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
3253 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3255 * Called when new CDMA SMS is received
3257 * "data" is const RIL_CDMA_SMS_Message *
3259 * Callee will subsequently confirm the receipt of the SMS with
3260 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
3262 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
3263 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
3266 #define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
3269 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
3271 * Called when new Broadcast SMS is received
3273 * "data" is const char * of 88 bytes which indicates each page
3274 * of a CBS Message sent to the MS by the BTS as coded in 3GPP
3275 * 23.041 Section 9.4.1.1
3278 #define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
3281 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
3283 * Indicates that SMS storage on the RUIM is full. Messages
3284 * cannot be saved on the RUIM until space is freed.
3289 #define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
3292 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
3294 * Indicates a restricted state change (eg, for Domain Specific Access Control).
3296 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
3298 * "data" is an int *
3299 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
3301 #define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
3304 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
3306 * Indicates that the radio system selection module has
3307 * autonomously entered emergency callback mode.
3312 #define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
3315 * RIL_UNSOL_CDMA_CALL_WAITING
3317 * Called when CDMA radio receives a call waiting indication.
3319 * "data" is const RIL_CDMA_CallWaiting *
3322 #define RIL_UNSOL_CDMA_CALL_WAITING 1025
3325 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
3327 * Called when CDMA radio receives an update of the progress of an
3330 * "data" is const int *
3331 * For CDMA this is an integer OTASP/OTAPA status listed in
3332 * RIL_CDMA_OTA_ProvisionStatus.
3335 #define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
3338 * RIL_UNSOL_CDMA_INFO_REC
3340 * Called when CDMA radio receives one or more info recs.
3342 * "data" is const RIL_CDMA_InformationRecords *
3345 #define RIL_UNSOL_CDMA_INFO_REC 1027
3348 * RIL_UNSOL_OEM_HOOK_RAW
3350 * This is for OEM specific use.
3352 * "data" is a byte[]
3354 #define RIL_UNSOL_OEM_HOOK_RAW 1028
3357 * RIL_UNSOL_RINGBACK_TONE
3359 * Indicates that nework doesn't have in-band information, need to
3360 * play out-band tone.
3362 * "data" is an int *
3363 * ((int *)data)[0] == 0 for stop play ringback tone.
3364 * ((int *)data)[0] == 1 for start play ringback tone.
3366 #define RIL_UNSOL_RINGBACK_TONE 1029
3369 * RIL_UNSOL_RESEND_INCALL_MUTE
3371 * Indicates that framework/application need reset the uplink mute state.
3373 * There may be situations where the mute state becomes out of sync
3374 * between the application and device in some GSM infrastructures.
3378 #define RIL_UNSOL_RESEND_INCALL_MUTE 1030
3379 /***********************************************************************/
3383 * RIL_Request Function pointer
3385 * @param request is one of RIL_REQUEST_*
3386 * @param data is pointer to data defined for that RIL_REQUEST_*
3387 * data is owned by caller, and should not be modified or freed by callee
3388 * @param t should be used in subsequent call to RIL_onResponse
3389 * @param datalen the length of data
3392 typedef void (*RIL_RequestFunc) (int request, void *data,
3393 size_t datalen, RIL_Token t);
3396 * This function should return the current radio state synchronously
3398 typedef RIL_RadioState (*RIL_RadioStateRequest)();
3401 * This function returns "1" if the specified RIL_REQUEST code is
3402 * supported and 0 if it is not
3404 * @param requestCode is one of RIL_REQUEST codes
3407 typedef int (*RIL_Supports)(int requestCode);
3410 * This function is called from a separate thread--not the
3411 * thread that calls RIL_RequestFunc--and indicates that a pending
3412 * request should be cancelled.
3414 * On cancel, the callee should do its best to abandon the request and
3415 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
3417 * Subsequent calls to RIL_onRequestComplete for this request with
3418 * other results will be tolerated but ignored. (That is, it is valid
3419 * to ignore the cancellation request)
3421 * RIL_Cancel calls should return immediately, and not wait for cancellation
3423 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
3426 * @param t token wants to be canceled
3429 typedef void (*RIL_Cancel)(RIL_Token t);
3431 typedef void (*RIL_TimedCallback) (void *param);
3434 * Return a version string for your RIL implementation
3436 typedef const char * (*RIL_GetVersion) (void);
3439 int version; /* set to RIL_VERSION */
3440 RIL_RequestFunc onRequest;
3441 RIL_RadioStateRequest onStateRequest;
3442 RIL_Supports supports;
3443 RIL_Cancel onCancel;
3444 RIL_GetVersion getVersion;
3445 } RIL_RadioFunctions;
3450 * "t" is parameter passed in on previous call to RIL_Notification
3453 * If "e" != SUCCESS, then response can be null/is ignored
3455 * "response" is owned by caller, and should not be modified or
3458 * RIL_onRequestComplete will return as soon as possible
3460 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
3461 void *response, size_t responselen);
3464 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
3465 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3467 * "data" is owned by caller, and should not be modified or freed by callee
3470 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
3474 * Call user-specifed "callback" function on on the same thread that
3475 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3476 * a relative time value at which the callback is invoked. If relativeTime is
3477 * NULL or points to a 0-filled structure, the callback will be invoked as
3481 void (*RequestTimedCallback) (RIL_TimedCallback callback,
3482 void *param, const struct timeval *relativeTime);
3487 * RIL implementations must defined RIL_Init
3488 * argc and argv will be command line arguments intended for the RIL implementation
3489 * Return NULL on error
3491 * @param env is environment point defined as RIL_Env
3492 * @param argc number of arguments
3493 * @param argv list fo arguments
3496 const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
3498 #else /* RIL_SHLIB */
3501 * Call this once at startup to register notification routine
3503 * @param callbacks user-specifed callback function
3505 void RIL_register (const RIL_RadioFunctions *callbacks);
3510 * RIL_onRequestComplete will return as soon as possible
3512 * @param t is parameter passed in on previous call to RIL_Notification
3514 * @param e error code
3515 * if "e" != SUCCESS, then response can be null/is ignored
3516 * @param response is owned by caller, and should not be modified or
3518 * @param responselen the length of response in byte
3520 void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
3521 void *response, size_t responselen);
3524 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
3525 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3526 * "data" is owned by caller, and should not be modified or freed by callee
3527 * @param datalen the length of data in byte
3530 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
3535 * Call user-specifed "callback" function on on the same thread that
3536 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3537 * a relative time value at which the callback is invoked. If relativeTime is
3538 * NULL or points to a 0-filled structure, the callback will be invoked as
3541 * @param callback user-specifed callback function
3542 * @param param parameter list
3543 * @param relativeTime a relative time value at which the callback is invoked
3546 void RIL_requestTimedCallback (RIL_TimedCallback callback,
3547 void *param, const struct timeval *relativeTime);
3550 #endif /* RIL_SHLIB */
3556 #endif /*ANDROID_RIL_H*/