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 #define ANDROID_RIL_H 1
21 #ifndef FEATURE_UNIT_TEST
23 #endif /* !FEATURE_UNIT_TEST */
29 #define RIL_VERSION 6 /* Current version */
30 #define RIL_VERSION_MIN 2 /* Minimum RIL_VERSION supported */
32 #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
33 #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
35 typedef void * RIL_Token;
39 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
40 RIL_E_GENERIC_FAILURE = 2,
41 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
42 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
43 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
44 RIL_E_REQUEST_NOT_SUPPORTED = 6,
46 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
47 call on a Class C GPRS device */
48 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
49 registers in network */
50 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
51 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
52 shall be retrieved because of SIM or RUIM
54 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
56 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
57 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
58 RIL_E_ILLEGAL_SIM_OR_ME = 15 /* network selection failed due to
65 RIL_CALL_DIALING = 2, /* MO call only */
66 RIL_CALL_ALERTING = 3, /* MO call only */
67 RIL_CALL_INCOMING = 4, /* MT call only */
68 RIL_CALL_WAITING = 5 /* MT call only */
72 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
73 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
74 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
75 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
76 personalization locked, or SIM absent */
77 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
78 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
79 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
80 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
81 personalization locked, or RUIM absent */
82 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
83 RADIO_STATE_NV_READY = 9 /* Radio is on and the NV interface is available */
87 RADIO_TECH_UNKNOWN = 0,
94 RADIO_TECH_EVDO_0 = 7,
95 RADIO_TECH_EVDO_A = 8,
97 RADIO_TECH_HSUPA = 10,
99 RADIO_TECH_EVDO_B = 12,
100 RADIO_TECH_EHRPD = 13,
102 RADIO_TECH_HSPAP = 15 // HSPA+
103 } RIL_RadioTechnology;
105 // Do we want to split Data from Voice and the use
106 // RIL_RadioTechnology for get/setPreferredVoice/Data ?
108 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
109 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
110 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
111 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
112 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
113 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
114 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
115 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
116 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
117 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
118 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
119 PREF_NET_TYPE_LTE_ONLY = 11 /* LTE only */
120 } RIL_PreferredNetworkType;
122 /* Source for cdma subscription */
124 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
125 CDMA_SUBSCRIPTION_SOURCE_NV = 1
126 } RIL_CdmaSubscriptionSource;
128 /* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
130 RIL_UUS_TYPE1_IMPLICIT = 0,
131 RIL_UUS_TYPE1_REQUIRED = 1,
132 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
133 RIL_UUS_TYPE2_REQUIRED = 3,
134 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
135 RIL_UUS_TYPE3_REQUIRED = 5,
136 RIL_UUS_TYPE3_NOT_REQUIRED = 6
139 /* User-to-User Signaling Information data coding schemes. Possible values for
140 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
141 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
143 RIL_UUS_DCS_USP = 0, /* User specified protocol */
144 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
145 RIL_UUS_DCS_X244 = 2, /* X.244 */
146 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
147 convergence function */
148 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
151 /* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
152 * This data is passed in RIL_ExtensionRecord and rec contains this
153 * structure when type is RIL_UUS_INFO_EXT_REC */
155 RIL_UUS_Type uusType; /* UUS Type */
156 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
157 int uusLength; /* Length of UUS Data */
158 char * uusData; /* UUS Data */
161 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
163 char isPresent; /* non-zero if signal information record is present */
164 char signalType; /* as defined 3.7.5.5-1 */
165 char alertPitch; /* as defined 3.7.5.5-2 */
166 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
167 } RIL_CDMA_SignalInfoRecord;
171 int index; /* Connection Index for use with, eg, AT+CHLD */
172 int toa; /* type of address, eg 145 = intl */
173 char isMpty; /* nonzero if is mpty call */
174 char isMT; /* nonzero if call is mobile terminated */
175 char als; /* ALS line indicator if available
177 char isVoice; /* nonzero if this is is a voice call */
178 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
179 char * number; /* Remote party number */
180 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
181 char * name; /* Remote party name */
182 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
183 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
186 /* Deprecated, use RIL_Data_Call_Response_v6 */
188 int cid; /* Context ID, uniquely identifies this call */
189 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
190 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
191 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
192 char * apn; /* ignored */
193 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
194 } RIL_Data_Call_Response_v4;
197 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
198 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
201 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
202 int cid; /* Context ID, uniquely identifies this call */
203 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
204 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
205 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
206 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
207 such as "IP" or "IPV6" */
208 char * ifname; /* The network interface name */
209 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
210 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
211 May not be empty, typically 1 IPv4 or 1 IPv6 or
212 one of each. If the prefix length is absent the addresses
213 are assumed to be point to point with IPv4 having a prefix
214 length of 32 and IPv6 128. */
215 char * dnses; /* A space-delimited list of DNS server addresses,
216 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
218 char * gateways; /* A space-delimited list of default gateway addresses,
219 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
220 May be empty in which case the addresses represent point
221 to point connections. */
222 } RIL_Data_Call_Response_v6;
225 int messageRef; /* TP-Message-Reference for GSM,
226 and BearerData MessageId for CDMA
227 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
228 char *ackPDU; /* or NULL if n/a */
229 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
230 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
231 -1 if unknown or not applicable*/
234 /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
236 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
237 /* 0 = "REC UNREAD" */
239 /* 2 = "STO UNSENT" */
241 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
242 the TP-layer length is "strlen(pdu)/2". */
243 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
244 (as expected by TS 27.005) or NULL for default SMSC */
247 /** Used by RIL_REQUEST_DIAL */
251 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
252 * clir == 0 on "use subscription default value"
253 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
254 * clir == 2 on "CLIR suppression" (allow CLI presentation)
256 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
260 int command; /* one of the commands listed for TS 27.007 +CRSM*/
261 int fileid; /* EF id */
262 char *path; /* "pathid" from TS 27.007 +CRSM command.
263 Path is in hex asciii format eg "7f205f70"
264 Path must always be provided.
269 char *data; /* May be NULL*/
270 char *pin2; /* May be NULL*/
274 int command; /* one of the commands listed for TS 27.007 +CRSM*/
275 int fileid; /* EF id */
276 char *path; /* "pathid" from TS 27.007 +CRSM command.
277 Path is in hex asciii format eg "7f205f70"
278 Path must always be provided.
283 char *data; /* May be NULL*/
284 char *pin2; /* May be NULL*/
285 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
291 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
292 } RIL_SIM_IO_Response;
294 /* See also com.android.internal.telephony.gsm.CallForwardInfo */
298 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
299 * status 1 = active, 0 = not active
301 * For RIL_REQUEST_SET_CALL_FORWARD:
310 int reason; /* from TS 27.007 7.11 "reason" */
311 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
312 See table for Android mapping from
314 0 means user doesn't input class */
315 int toa; /* "type" from TS 27.007 7.11 */
316 char * number; /* "number" from TS 27.007 7.11. May be NULL */
317 int timeSeconds; /* for CF no reply only */
318 }RIL_CallForwardInfo;
321 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
322 * Upper 16 bits is LAC and lower 16 bits
323 * is CID (as described in TS 27.005)
324 * Primary Scrambling Code (as described in TS 25.331)
326 * Valid values are hexadecimal 0x0000 - 0xffffffff.
328 int rssi; /* Received RSSI in GSM,
329 * Level index of CPICH Received Signal Code Power in UMTS
331 } RIL_NeighboringCell;
333 /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
335 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
336 CALL_FAIL_NORMAL = 16,
338 CALL_FAIL_CONGESTION = 34,
339 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
340 CALL_FAIL_CALL_BARRED = 240,
341 CALL_FAIL_FDN_BLOCKED = 241,
342 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
343 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
344 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
345 CALL_FAIL_CDMA_DROP = 1001,
346 CALL_FAIL_CDMA_INTERCEPT = 1002,
347 CALL_FAIL_CDMA_REORDER = 1003,
348 CALL_FAIL_CDMA_SO_REJECT = 1004,
349 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
350 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
351 CALL_FAIL_CDMA_PREEMPTED = 1007,
352 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
353 during emergency callback mode */
354 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
355 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
356 } RIL_LastCallFailCause;
358 /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
360 PDP_FAIL_NONE = 0, /* No error, connection ok */
362 /* an integer cause code defined in TS 24.008
363 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
364 If the implementation does not have access to the exact cause codes,
365 then it should return one of the following values,
366 as the UI layer needs to distinguish these
367 cases for error notification and potential retries. */
368 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
369 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
370 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
371 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
372 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
373 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
374 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
375 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
376 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
377 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
378 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
379 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
380 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
381 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
382 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
384 /* Not mentioned in the specification */
385 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
386 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
388 /* reasons for data call drop - network/modem disconnect */
389 PDP_FAIL_SIGNAL_LOST = -3, /* no retry */
390 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
391 with parameters appropriate for new technology */
392 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
393 powered off - no retry */
394 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
395 mode was up on same APN/data profile - no retry until
396 tethered call is off */
398 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */
399 } RIL_DataCallFailCause;
401 /* See RIL_REQUEST_SETUP_DATA_CALL */
403 RIL_DATA_PROFILE_DEFAULT = 0,
404 RIL_DATA_PROFILE_TETHERED = 1,
405 RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */
408 /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
410 int notificationType; /*
411 * 0 = MO intermediate result code
412 * 1 = MT unsolicited result code
414 int code; /* See 27.007 7.17
417 int index; /* CUG index. See 27.007 7.17. */
418 int type; /* "type" from 27.007 7.17 (MT only). */
419 char * number; /* "number" from 27.007 7.17
420 (MT only, may be NULL). */
421 } RIL_SuppSvcNotification;
423 #define RIL_CARD_MAX_APPS 8
426 RIL_CARDSTATE_ABSENT = 0,
427 RIL_CARDSTATE_PRESENT = 1,
428 RIL_CARDSTATE_ERROR = 2
432 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
433 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
434 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
435 since each app can only have 1 active perso
437 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
438 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
439 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
440 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
441 RIL_PERSOSUBSTATE_SIM_SIM = 7,
442 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
443 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
444 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
445 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
446 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
447 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
448 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
449 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
450 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
451 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
452 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
453 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
454 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
455 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
456 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
457 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
458 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
462 RIL_APPSTATE_UNKNOWN = 0,
463 RIL_APPSTATE_DETECTED = 1,
464 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
465 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
466 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
467 when app_state is assigned to this value */
468 RIL_APPSTATE_READY = 5
472 RIL_PINSTATE_UNKNOWN = 0,
473 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
474 RIL_PINSTATE_ENABLED_VERIFIED = 2,
475 RIL_PINSTATE_DISABLED = 3,
476 RIL_PINSTATE_ENABLED_BLOCKED = 4,
477 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
481 RIL_APPTYPE_UNKNOWN = 0,
483 RIL_APPTYPE_USIM = 2,
484 RIL_APPTYPE_RUIM = 3,
485 RIL_APPTYPE_CSIM = 4,
491 RIL_AppType app_type;
492 RIL_AppState app_state;
493 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
494 RIL_APPSTATE_SUBSCRIPTION_PERSO */
495 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
497 char *app_label_ptr; /* null terminated string */
498 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
503 /* Deprecated, use RIL_CardStatus_v6 */
506 RIL_CardState card_state;
507 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
508 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
509 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
510 int num_applications; /* value <= RIL_CARD_MAX_APPS */
511 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
516 RIL_CardState card_state;
517 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
518 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
519 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
520 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
521 int num_applications; /* value <= RIL_CARD_MAX_APPS */
522 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
525 /* The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH */
527 /* A file on SIM has been updated. data[1] contains the EFID. */
529 /* SIM initialized. All files should be re-read. data[1] contains AID that caused REFRESH */
531 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
533 } RIL_SimRefreshResult;
535 /* Deprecated, use RIL_CDMA_CallWaiting_v6 */
537 char * number; /* Remote party number */
538 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
539 char * name; /* Remote party name */
540 RIL_CDMA_SignalInfoRecord signalInfoRecord;
541 } RIL_CDMA_CallWaiting_v5;
544 char * number; /* Remote party number */
545 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
546 char * name; /* Remote party name */
547 RIL_CDMA_SignalInfoRecord signalInfoRecord;
548 /* Number type/Number plan required to support International Call Waiting */
549 int number_type; /* 0=Unknown, 1=International, 2=National,
550 3=Network specific, 4=subscriber */
551 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
552 } RIL_CDMA_CallWaiting_v6;
555 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
557 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
558 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
559 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
562 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
563 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
564 * and 9.4.4.2.3 for UMTS.
565 * All other values can be treated as empty CBM data coding scheme.
567 * selected 0 means message types specified in <fromServiceId, toServiceId>
568 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
570 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
571 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
578 unsigned char selected;
579 } RIL_GSM_BroadcastSmsConfigInfo;
581 /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
582 #define RIL_RESTRICTED_STATE_NONE 0x00
583 /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
584 #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
585 /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
586 #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
587 /* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
588 #define RIL_RESTRICTED_STATE_CS_ALL 0x04
589 /* Block packet data access due to restriction. */
590 #define RIL_RESTRICTED_STATE_PS_ALL 0x10
592 /* The status for an OTASP/OTAPA session */
594 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
595 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
596 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
597 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
598 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
599 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
600 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
601 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
602 CDMA_OTA_PROVISION_STATUS_COMMITTED,
603 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
604 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
605 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
606 } RIL_CDMA_OTA_ProvisionStatus;
609 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
610 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
611 } RIL_GW_SignalStrength;
615 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
616 * multiplied by -1. Example: If the actual RSSI is -75, then this response
619 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
620 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
623 } RIL_CDMA_SignalStrength;
627 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
628 * multiplied by -1. Example: If the actual RSSI is -75, then this response
631 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
632 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
635 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
636 } RIL_EVDO_SignalStrength;
639 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
640 int rsrp; /* The current Reference Signal Receive Power in dBm
641 * multipled by -1. Range: 44 to 140 dBm, TODO: doc reference */
642 int rsrq; /* The current Reference Signal Receive Quality in dB
643 * multiplied by -1. Range: 20 to 3 dB. TODO: doc reference */
644 int rssnr; /* TODO: Need documentation and doc reference */
645 int cqi; /* TODO: Need documentation and doc reference */
646 } RIL_LTE_SignalStrength;
648 /* Deprecated, use RIL_SignalStrength_v6 */
650 RIL_GW_SignalStrength GW_SignalStrength;
651 RIL_CDMA_SignalStrength CDMA_SignalStrength;
652 RIL_EVDO_SignalStrength EVDO_SignalStrength;
653 } RIL_SignalStrength_v5;
656 RIL_GW_SignalStrength GW_SignalStrength;
657 RIL_CDMA_SignalStrength CDMA_SignalStrength;
658 RIL_EVDO_SignalStrength EVDO_SignalStrength;
659 RIL_LTE_SignalStrength LTE_SignalStrength;
660 } RIL_SignalStrength_v6;
662 /* Names of the CDMA info records (C.S0005 section 3.7.5) */
664 RIL_CDMA_DISPLAY_INFO_REC,
665 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
666 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
667 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
668 RIL_CDMA_SIGNAL_INFO_REC,
669 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
670 RIL_CDMA_LINE_CONTROL_INFO_REC,
671 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
672 RIL_CDMA_T53_CLIR_INFO_REC,
673 RIL_CDMA_T53_RELEASE_INFO_REC,
674 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
675 } RIL_CDMA_InfoRecName;
677 /* Display Info Rec as defined in C.S0005 section 3.7.5.1
678 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
679 Note: the Extended Display info rec contains multiple records of the
680 form: display_tag, display_len, and display_len occurrences of the
681 chari field if the display_tag is not 10000000 or 10000001.
682 To save space, the records are stored consecutively in a byte buffer.
683 The display_tag, display_len and chari fields are all 1 byte.
688 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
689 } RIL_CDMA_DisplayInfoRecord;
691 /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
692 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
693 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
698 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
703 } RIL_CDMA_NumberInfoRecord;
705 /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
707 RIL_REDIRECTING_REASON_UNKNOWN = 0,
708 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
709 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
710 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
711 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
712 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
713 RIL_REDIRECTING_REASON_RESERVED
714 } RIL_CDMA_RedirectingReason;
717 RIL_CDMA_NumberInfoRecord redirectingNumber;
718 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
719 RIL_CDMA_RedirectingReason redirectingReason;
720 } RIL_CDMA_RedirectingNumberInfoRecord;
722 /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
724 char lineCtrlPolarityIncluded;
726 char lineCtrlReverse;
727 char lineCtrlPowerDenial;
728 } RIL_CDMA_LineControlInfoRecord;
730 /* T53 CLIR Information Record */
733 } RIL_CDMA_T53_CLIRInfoRecord;
735 /* T53 Audio Control Information Record */
739 } RIL_CDMA_T53_AudioControlInfoRecord;
743 RIL_CDMA_InfoRecName name;
746 /* Display and Extended Display Info Rec */
747 RIL_CDMA_DisplayInfoRecord display;
749 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
750 RIL_CDMA_NumberInfoRecord number;
752 /* Signal Info Rec */
753 RIL_CDMA_SignalInfoRecord signal;
755 /* Redirecting Number Info Rec */
756 RIL_CDMA_RedirectingNumberInfoRecord redir;
758 /* Line Control Info Rec */
759 RIL_CDMA_LineControlInfoRecord lineCtrl;
761 /* T53 CLIR Info Rec */
762 RIL_CDMA_T53_CLIRInfoRecord clir;
764 /* T53 Audio Control Info Rec */
765 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
767 } RIL_CDMA_InformationRecord;
769 #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
772 char numberOfInfoRecs;
773 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
774 } RIL_CDMA_InformationRecords;
777 * RIL_REQUEST_GET_SIM_STATUS
779 * Requests status of the SIM interface and the SIM card
783 * "response" is const RIL_CardStatus_v6 *
788 #define RIL_REQUEST_GET_SIM_STATUS 1
791 * RIL_REQUEST_ENTER_SIM_PIN
793 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
795 * "data" is const char **
796 * ((const char **)data)[0] is PIN value
797 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
799 * "response" is int *
800 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
805 * RADIO_NOT_AVAILABLE (radio resetting)
810 #define RIL_REQUEST_ENTER_SIM_PIN 2
814 * RIL_REQUEST_ENTER_SIM_PUK
816 * Supplies SIM PUK and new PIN.
818 * "data" is const char **
819 * ((const char **)data)[0] is PUK value
820 * ((const char **)data)[1] is new PIN value
821 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
823 * "response" is int *
824 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
829 * RADIO_NOT_AVAILABLE (radio resetting)
835 #define RIL_REQUEST_ENTER_SIM_PUK 3
838 * RIL_REQUEST_ENTER_SIM_PIN2
840 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
841 * returned as a a failure from a previous operation.
843 * "data" is const char **
844 * ((const char **)data)[0] is PIN2 value
845 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
847 * "response" is int *
848 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
853 * RADIO_NOT_AVAILABLE (radio resetting)
858 #define RIL_REQUEST_ENTER_SIM_PIN2 4
861 * RIL_REQUEST_ENTER_SIM_PUK2
863 * Supplies SIM PUK2 and new PIN2.
865 * "data" is const char **
866 * ((const char **)data)[0] is PUK2 value
867 * ((const char **)data)[1] is new PIN2 value
868 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
870 * "response" is int *
871 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
876 * RADIO_NOT_AVAILABLE (radio resetting)
882 #define RIL_REQUEST_ENTER_SIM_PUK2 5
885 * RIL_REQUEST_CHANGE_SIM_PIN
887 * Supplies old SIM PIN and new PIN.
889 * "data" is const char **
890 * ((const char **)data)[0] is old PIN value
891 * ((const char **)data)[1] is new PIN value
892 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
894 * "response" is int *
895 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
900 * RADIO_NOT_AVAILABLE (radio resetting)
903 * (old PIN is invalid)
907 #define RIL_REQUEST_CHANGE_SIM_PIN 6
911 * RIL_REQUEST_CHANGE_SIM_PIN2
913 * Supplies old SIM PIN2 and new PIN2.
915 * "data" is const char **
916 * ((const char **)data)[0] is old PIN2 value
917 * ((const char **)data)[1] is new PIN2 value
918 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
920 * "response" is int *
921 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
926 * RADIO_NOT_AVAILABLE (radio resetting)
929 * (old PIN2 is invalid)
933 #define RIL_REQUEST_CHANGE_SIM_PIN2 7
936 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
938 * Requests that network personlization be deactivated
940 * "data" is const char **
941 * ((const char **)(data))[0]] is network depersonlization code
943 * "response" is int *
944 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
949 * RADIO_NOT_AVAILABLE (radio resetting)
955 #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
958 * RIL_REQUEST_GET_CURRENT_CALLS
960 * Requests current call list
964 * "response" must be a "const RIL_Call **"
969 * RADIO_NOT_AVAILABLE (radio resetting)
971 * (request will be made again in a few hundred msec)
974 #define RIL_REQUEST_GET_CURRENT_CALLS 9
980 * Initiate voice call
982 * "data" is const RIL_Dial *
985 * This method is never used for supplementary service codes
989 * RADIO_NOT_AVAILABLE (radio resetting)
992 #define RIL_REQUEST_DIAL 10
995 * RIL_REQUEST_GET_IMSI
999 * Only valid when radio state is "RADIO_STATE_SIM_READY"
1001 * "data" is const char **
1002 * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1003 * "response" is a const char * containing the IMSI
1007 * RADIO_NOT_AVAILABLE (radio resetting)
1011 #define RIL_REQUEST_GET_IMSI 11
1014 * RIL_REQUEST_HANGUP
1016 * Hang up a specific line (like AT+CHLD=1x)
1018 * After this HANGUP request returns, RIL should show the connection is NOT
1019 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1021 * "data" is an int *
1022 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
1024 * "response" is NULL
1028 * RADIO_NOT_AVAILABLE (radio resetting)
1032 #define RIL_REQUEST_HANGUP 12
1035 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
1037 * Hang up waiting or held (like AT+CHLD=0)
1039 * After this HANGUP request returns, RIL should show the connection is NOT
1040 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1043 * "response" is NULL
1047 * RADIO_NOT_AVAILABLE (radio resetting)
1051 #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
1054 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
1056 * Hang up waiting or held (like AT+CHLD=1)
1058 * After this HANGUP request returns, RIL should show the connection is NOT
1059 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1062 * "response" is NULL
1066 * RADIO_NOT_AVAILABLE (radio resetting)
1070 #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
1073 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
1075 * Switch waiting or holding call and active call (like AT+CHLD=2)
1077 * State transitions should be is follows:
1079 * If call 1 is waiting and call 2 is active, then if this re
1082 * Call 1 Call 2 Call 1 Call 2
1083 * ACTIVE HOLDING HOLDING ACTIVE
1084 * ACTIVE WAITING HOLDING ACTIVE
1085 * HOLDING WAITING HOLDING ACTIVE
1086 * ACTIVE IDLE HOLDING IDLE
1087 * IDLE IDLE IDLE IDLE
1090 * "response" is NULL
1094 * RADIO_NOT_AVAILABLE (radio resetting)
1098 #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
1099 #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
1102 * RIL_REQUEST_CONFERENCE
1104 * Conference holding and active (like AT+CHLD=3)
1107 * "response" is NULL
1111 * RADIO_NOT_AVAILABLE (radio resetting)
1114 #define RIL_REQUEST_CONFERENCE 16
1119 * Send UDUB (user determined used busy) to ringing or
1120 * waiting call answer)(RIL_BasicRequest r);
1123 * "response" is NULL
1127 * RADIO_NOT_AVAILABLE (radio resetting)
1130 #define RIL_REQUEST_UDUB 17
1133 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1135 * Requests the failure cause code for the most recently terminated call
1138 * "response" is a "int *"
1139 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
1140 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
1141 * failure reasons are derived from the possible call failure scenarios
1142 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
1144 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
1145 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
1147 * If the implementation does not have access to the exact cause codes,
1148 * then it should return one of the values listed in RIL_LastCallFailCause,
1149 * as the UI layer needs to distinguish these cases for tone generation or
1150 * error notification.
1154 * RADIO_NOT_AVAILABLE
1157 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
1159 #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
1162 * RIL_REQUEST_SIGNAL_STRENGTH
1164 * Requests current signal strength and associated information
1166 * Must succeed if radio is on.
1170 * "response" is a const RIL_SignalStrength *
1174 * RADIO_NOT_AVAILABLE
1176 #define RIL_REQUEST_SIGNAL_STRENGTH 19
1179 * RIL_REQUEST_VOICE_REGISTRATION_STATE
1181 * Request current registration state
1184 * "response" is a "char **"
1185 * ((const char **)response)[0] is registration state 0-6,
1186 * 0 - Not registered, MT is not currently searching
1187 * a new operator to register
1188 * 1 - Registered, home network
1189 * 2 - Not registered, but MT is currently searching
1190 * a new operator to register
1191 * 3 - Registration denied
1193 * 5 - Registered, roaming
1194 * 10 - Same as 0, but indicates that emergency calls
1196 * 12 - Same as 2, but indicates that emergency calls
1198 * 13 - Same as 3, but indicates that emergency calls
1200 * 14 - Same as 4, but indicates that emergency calls
1203 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1204 * NULL if not.Valid LAC are 0x0000 - 0xffff
1205 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1207 * Valid CID are 0x00000000 - 0xffffffff
1208 * In GSM, CID is Cell ID (see TS 27.007)
1210 * In UMTS, CID is UMTS Cell Identity
1211 * (see TS 25.331) in 28 bits
1212 * ((const char **)response)[3] indicates the available voice radio technology,
1213 * valid values as defined by RIL_RadioTechnology.
1214 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1215 * system or NULL if not. Base Station ID in
1217 * ((const char **)response)[5] is Base Station latitude if registered on a
1218 * CDMA system or NULL if not. Base Station
1219 * latitude is a decimal number as specified in
1220 * 3GPP2 C.S0005-A v6.0. It is represented in
1221 * units of 0.25 seconds and ranges from -1296000
1222 * to 1296000, both values inclusive (corresponding
1223 * to a range of -90 to +90 degrees).
1224 * ((const char **)response)[6] is Base Station longitude if registered on a
1225 * CDMA system or NULL if not. Base Station
1226 * longitude is a decimal number as specified in
1227 * 3GPP2 C.S0005-A v6.0. It is represented in
1228 * units of 0.25 seconds and ranges from -2592000
1229 * to 2592000, both values inclusive (corresponding
1230 * to a range of -180 to +180 degrees).
1231 * ((const char **)response)[7] is concurrent services support indicator if
1232 * registered on a CDMA system 0-1.
1233 * 0 - Concurrent services not supported,
1234 * 1 - Concurrent services supported
1235 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1236 * NULL if not. Valid System ID are 0 - 32767
1237 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1238 * NULL if not. Valid System ID are 0 - 65535
1239 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
1240 * on a CDMA or EVDO system or NULL if not. Valid values
1242 * ((const char **)response)[11] indicates whether the current system is in the
1243 * PRL if registered on a CDMA or EVDO system or NULL if
1244 * not. 0=not in the PRL, 1=in the PRL
1245 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
1246 * if registered on a CDMA or EVDO system or NULL if not.
1247 * Valid values are 0-255.
1248 * ((const char **)response)[13] if registration state is 3 (Registration
1249 * denied) this is an enumerated reason why
1250 * registration was denied. See 3GPP TS 24.008,
1251 * 10.5.3.6 and Annex G.
1253 * 1 - Authentication Failure
1254 * 2 - IMSI unknown in HLR
1257 * 5 - PLMN not allowed
1258 * 6 - Location area not allowed
1259 * 7 - Roaming not allowed
1260 * 8 - No Suitable Cells in this Location Area
1261 * 9 - Network failure
1262 * 10 - Persistent location update reject
1263 * 11 - PLMN not allowed
1264 * 12 - Location area not allowed
1265 * 13 - Roaming not allowed in this Location Area
1266 * 15 - No Suitable Cells in this Location Area
1267 * 17 - Network Failure
1271 * 23 - GSM Authentication unacceptable
1272 * 25 - Not Authorized for this CSG
1273 * 32 - Service option not supported
1274 * 33 - Requested service option not subscribed
1275 * 34 - Service option temporarily out of order
1276 * 38 - Call cannot be identified
1277 * 48-63 - Retry upon entry into a new cell
1278 * 95 - Semantically incorrect message
1279 * 96 - Invalid mandatory information
1280 * 97 - Message type non-existent or not implemented
1281 * 98 - Message not compatible with protocol state
1282 * 99 - Information element non-existent or not implemented
1283 * 100 - Conditional IE error
1284 * 101 - Message not compatible with protocol state
1285 * 111 - Protocol error, unspecified
1286 * ((const char **)response)[14] is the Primary Scrambling Code of the current
1287 * cell as described in TS 25.331, in hexadecimal
1288 * format, or NULL if unknown or not registered
1289 * to a UMTS network.
1291 * Please note that registration state 4 ("unknown") is treated
1292 * as "out of service" in the Android telephony system
1294 * Registration state 3 can be returned if Location Update Reject
1295 * (with cause 17 - Network Failure) is received repeatedly from the network,
1296 * to facilitate "managed roaming"
1300 * RADIO_NOT_AVAILABLE
1303 #define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
1306 * RIL_REQUEST_DATA_REGISTRATION_STATE
1308 * Request current DATA registration state
1311 * "response" is a "char **"
1312 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG
1313 * ((const char **)response)[1] is LAC if registered or NULL if not
1314 * ((const char **)response)[2] is CID if registered or NULL if not
1315 * ((const char **)response)[3] indicates the available data radio technology,
1316 * valid values as defined by RIL_RadioTechnology.
1317 * ((const char **)response)[4] if registration state is 3 (Registration
1318 * denied) this is an enumerated reason why
1319 * registration was denied. See 3GPP TS 24.008,
1320 * Annex G.6 "Additonal cause codes for GMM".
1321 * 7 == GPRS services not allowed
1322 * 8 == GPRS services and non-GPRS services not allowed
1323 * 9 == MS identity cannot be derived by the network
1324 * 10 == Implicitly detached
1325 * 14 == GPRS services not allowed in this PLMN
1326 * 16 == MSC temporarily not reachable
1327 * 40 == No PDP context activated
1328 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
1329 * established using RIL_REQUEST_SETUP_DATA_CALL.
1331 * LAC and CID are in hexadecimal format.
1332 * valid LAC are 0x0000 - 0xffff
1333 * valid CID are 0x00000000 - 0x0fffffff
1335 * Please note that registration state 4 ("unknown") is treated
1336 * as "out of service" in the Android telephony system
1340 * RADIO_NOT_AVAILABLE
1343 #define RIL_REQUEST_DATA_REGISTRATION_STATE 21
1346 * RIL_REQUEST_OPERATOR
1348 * Request current operator ONS or EONS
1351 * "response" is a "const char **"
1352 * ((const char **)response)[0] is long alpha ONS or EONS
1353 * or NULL if unregistered
1355 * ((const char **)response)[1] is short alpha ONS or EONS
1356 * or NULL if unregistered
1357 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1358 * or NULL if unregistered
1362 * RADIO_NOT_AVAILABLE
1365 #define RIL_REQUEST_OPERATOR 22
1368 * RIL_REQUEST_RADIO_POWER
1370 * Toggle radio on and off (for "airplane" mode)
1371 * If the radio is is turned off/on the radio modem subsystem
1372 * is expected return to an initialized state. For instance,
1373 * any voice and data calls will be terminated and all associated
1377 * ((int *)data)[0] is > 0 for "Radio On"
1378 * ((int *)data)[0] is == 0 for "Radio Off"
1380 * "response" is NULL
1382 * Turn radio on if "on" > 0
1383 * Turn radio off if "on" == 0
1387 * RADIO_NOT_AVAILABLE
1390 #define RIL_REQUEST_RADIO_POWER 23
1397 * If the implementation is currently playing a tone requested via
1398 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1399 * should be played instead
1401 * "data" is a char * containing a single character with one of 12 values: 0-9,*,#
1402 * "response" is NULL
1404 * FIXME should this block/mute microphone?
1405 * How does this interact with local DTMF feedback?
1409 * RADIO_NOT_AVAILABLE
1412 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1415 #define RIL_REQUEST_DTMF 24
1418 * RIL_REQUEST_SEND_SMS
1420 * Send an SMS message
1422 * "data" is const char **
1423 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1424 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1425 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1426 * less the SMSC address
1427 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1429 * "response" is a const RIL_SMS_Response *
1431 * Based on the return error, caller decides to resend if sending sms
1432 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1433 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1437 * RADIO_NOT_AVAILABLE
1438 * SMS_SEND_FAIL_RETRY
1442 * FIXME how do we specify TP-Message-Reference if we need to resend?
1444 #define RIL_REQUEST_SEND_SMS 25
1448 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
1450 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1451 * except that more messages are expected to be sent soon. If possible,
1452 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1454 * "data" is const char **
1455 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1456 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1457 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1458 * less the SMSC address
1459 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1461 * "response" is a const RIL_SMS_Response *
1463 * Based on the return error, caller decides to resend if sending sms
1464 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1465 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1469 * RADIO_NOT_AVAILABLE
1470 * SMS_SEND_FAIL_RETRY
1474 #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1478 * RIL_REQUEST_SETUP_DATA_CALL
1480 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
1481 * return success it is added to the list of data calls and a
1482 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
1483 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
1484 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
1485 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
1487 * The RIL is expected to:
1488 * - Create one data call context.
1489 * - Create and configure a dedicated interface for the context
1490 * - The interface must be point to point.
1491 * - The interface is configured with one or more addresses and
1492 * is capable of sending and receiving packets. The prefix length
1493 * of the addresses must be /32 for IPv4 and /128 for IPv6.
1494 * - Must NOT change the linux routing table.
1495 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
1496 * number of simultaneous data call contexts.
1498 * "data" is a const char **
1499 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
1500 * for values above 2 this is RIL_RadioTechnology + 2.
1501 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
1502 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
1503 * override the one in the profile. NULL indicates no APN overrride.
1504 * ((const char **)data)[3] is the username for APN, or NULL
1505 * ((const char **)data)[4] is the password for APN, or NULL
1506 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
1507 * 0 => PAP and CHAP is never performed.
1508 * 1 => PAP may be performed; CHAP is never performed.
1509 * 2 => CHAP may be performed; PAP is never performed.
1510 * 3 => PAP / CHAP may be performed - baseband dependent.
1511 * ((const char **)data)[6] is the connection type to request must be one of the
1512 * PDP_type values in TS 27.007 section 10.1.1.
1513 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1514 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
1516 * "response" is a RIL_Data_Call_Response_v6
1518 * FIXME may need way to configure QoS settings
1521 * SUCCESS should be returned on both success and failure of setup with
1522 * the RIL_Data_Call_Response_v6.status containing the actual status.
1523 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
1525 * Other errors could include:
1526 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
1527 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
1529 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
1531 #define RIL_REQUEST_SETUP_DATA_CALL 27
1535 * RIL_REQUEST_SIM_IO
1537 * Request SIM I/O operation.
1538 * This is similar to the TS 27.007 "restricted SIM" operation
1539 * where it assumes all of the EF selection will be done by the
1542 * "data" is a const RIL_SIM_IO_v6 *
1543 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1544 * or may specify a PIN2 for operations that require a PIN2 (eg
1545 * updating FDN records)
1547 * "response" is a const RIL_SIM_IO_Response *
1549 * Arguments and responses that are unused for certain
1550 * values of "command" should be ignored or set to NULL
1554 * RADIO_NOT_AVAILABLE
1559 #define RIL_REQUEST_SIM_IO 28
1562 * RIL_REQUEST_SEND_USSD
1564 * Send a USSD message
1566 * If a USSD session already exists, the message should be sent in the
1567 * context of that session. Otherwise, a new session should be created.
1569 * The network reply should be reported via RIL_UNSOL_ON_USSD
1571 * Only one USSD session may exist at a time, and the session is assumed
1573 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1574 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1575 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1577 * "data" is a const char * containing the USSD request in UTF-8 format
1578 * "response" is NULL
1582 * RADIO_NOT_AVAILABLE
1586 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1589 #define RIL_REQUEST_SEND_USSD 29
1592 * RIL_REQUEST_CANCEL_USSD
1594 * Cancel the current USSD session if one exists
1597 * "response" is NULL
1601 * RADIO_NOT_AVAILABLE
1605 #define RIL_REQUEST_CANCEL_USSD 30
1608 * RIL_REQUEST_GET_CLIR
1610 * Gets current CLIR status
1612 * "response" is int *
1613 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1614 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
1618 * RADIO_NOT_AVAILABLE
1621 #define RIL_REQUEST_GET_CLIR 31
1624 * RIL_REQUEST_SET_CLIR
1627 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1629 * "response" is NULL
1633 * RADIO_NOT_AVAILABLE
1636 #define RIL_REQUEST_SET_CLIR 32
1639 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
1641 * "data" is const RIL_CallForwardInfo *
1643 * "response" is const RIL_CallForwardInfo **
1644 * "response" points to an array of RIL_CallForwardInfo *'s, one for
1645 * each distinct registered phone number.
1647 * For example, if data is forwarded to +18005551212 and voice is forwarded
1648 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
1650 * If, however, both data and voice are forwarded to +18005551212, then
1651 * a single RIL_CallForwardInfo can be returned with the service class
1652 * set to "data + voice = 3")
1656 * RADIO_NOT_AVAILABLE
1659 #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
1663 * RIL_REQUEST_SET_CALL_FORWARD
1665 * Configure call forward rule
1667 * "data" is const RIL_CallForwardInfo *
1668 * "response" is NULL
1672 * RADIO_NOT_AVAILABLE
1675 #define RIL_REQUEST_SET_CALL_FORWARD 34
1679 * RIL_REQUEST_QUERY_CALL_WAITING
1681 * Query current call waiting state
1683 * "data" is const int *
1684 * ((const int *)data)[0] is the TS 27.007 service class to query.
1685 * "response" is a const int *
1686 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
1688 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
1689 * must follow, with the TS 27.007 service class bit vector of services
1690 * for which call waiting is enabled.
1692 * For example, if ((const int *)response)[0] is 1 and
1693 * ((const int *)response)[1] is 3, then call waiting is enabled for data
1694 * and voice and disabled for everything else
1698 * RADIO_NOT_AVAILABLE
1701 #define RIL_REQUEST_QUERY_CALL_WAITING 35
1705 * RIL_REQUEST_SET_CALL_WAITING
1707 * Configure current call waiting state
1709 * "data" is const int *
1710 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
1711 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
1712 * services to modify
1713 * "response" is NULL
1717 * RADIO_NOT_AVAILABLE
1720 #define RIL_REQUEST_SET_CALL_WAITING 36
1723 * RIL_REQUEST_SMS_ACKNOWLEDGE
1725 * Acknowledge successful or failed receipt of SMS previously indicated
1726 * via RIL_UNSOL_RESPONSE_NEW_SMS
1729 * ((int *)data)[0] is 1 on successful receipt
1730 * (basically, AT+CNMA=1 from TS 27.005
1731 * is 0 on failed receipt
1732 * (basically, AT+CNMA=2 from TS 27.005)
1733 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
1734 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
1735 * capacity exceeded) and 0xFF (unspecified error) are
1738 * "response" is NULL
1740 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
1744 * RADIO_NOT_AVAILABLE
1747 #define RIL_REQUEST_SMS_ACKNOWLEDGE 37
1750 * RIL_REQUEST_GET_IMEI - DEPRECATED
1752 * Get the device IMEI, including check digit
1754 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
1755 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1758 * "response" is a const char * containing the IMEI
1762 * RADIO_NOT_AVAILABLE (radio resetting)
1766 #define RIL_REQUEST_GET_IMEI 38
1769 * RIL_REQUEST_GET_IMEISV - DEPRECATED
1771 * Get the device IMEISV, which should be two decimal digits
1773 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
1774 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1777 * "response" is a const char * containing the IMEISV
1781 * RADIO_NOT_AVAILABLE (radio resetting)
1785 #define RIL_REQUEST_GET_IMEISV 39
1789 * RIL_REQUEST_ANSWER
1791 * Answer incoming call
1793 * Will not be called for WAITING calls.
1794 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
1798 * "response" is NULL
1802 * RADIO_NOT_AVAILABLE (radio resetting)
1806 #define RIL_REQUEST_ANSWER 40
1809 * RIL_REQUEST_DEACTIVATE_DATA_CALL
1811 * Deactivate packet data connection and remove from the
1812 * data call list if SUCCESS is returned. Any other return
1813 * values should also try to remove the call from the list,
1814 * but that may not be possible. In any event a
1815 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
1816 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
1817 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
1819 * "data" is const char **
1820 * ((char**)data)[0] indicating CID
1821 * ((char**)data)[1] indicating Disconnect Reason
1822 * 0 => No specific reason specified
1823 * 1 => Radio shutdown requested
1825 * "response" is NULL
1829 * RADIO_NOT_AVAILABLE
1832 * See also: RIL_REQUEST_SETUP_DATA_CALL
1834 #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
1837 * RIL_REQUEST_QUERY_FACILITY_LOCK
1839 * Query the status of a facility lock state
1841 * "data" is const char **
1842 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
1843 * (eg "AO" for BAOC, "SC" for SIM lock)
1844 * ((const char **)data)[1] is the password, or "" if not required
1845 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
1847 * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1848 * This is only applicable in the case of Fixed Dialing Numbers
1851 * "response" is an int *
1852 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
1853 * services for which the specified barring facility
1854 * is active. "0" means "disabled for all"
1859 * RADIO_NOT_AVAILABLE
1863 #define RIL_REQUEST_QUERY_FACILITY_LOCK 42
1866 * RIL_REQUEST_SET_FACILITY_LOCK
1868 * Enable/disable one facility lock
1870 * "data" is const char **
1872 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1873 * (eg "AO" for BAOC)
1874 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
1875 * ((const char **)data)[2] = password
1876 * ((const char **)data)[3] = string representation of decimal TS 27.007
1877 * service class bit vector. Eg, the string
1878 * "1" means "set this facility for voice services"
1879 * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1880 * This is only applicable in the case of Fixed Dialing Numbers
1883 * "response" is int *
1884 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1888 * RADIO_NOT_AVAILABLE
1892 #define RIL_REQUEST_SET_FACILITY_LOCK 43
1895 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
1897 * Change call barring facility password
1899 * "data" is const char **
1901 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1902 * (eg "AO" for BAOC)
1903 * ((const char **)data)[1] = old password
1904 * ((const char **)data)[2] = new password
1906 * "response" is NULL
1910 * RADIO_NOT_AVAILABLE
1914 #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
1917 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
1919 * Query current network selectin mode
1923 * "response" is int *
1924 * ((const int *)response)[0] is
1925 * 0 for automatic selection
1926 * 1 for manual selection
1930 * RADIO_NOT_AVAILABLE
1934 #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
1937 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
1939 * Specify that the network should be selected automatically
1942 * "response" is NULL
1944 * This request must not respond until the new operator is selected
1949 * RADIO_NOT_AVAILABLE
1953 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
1954 * no retries needed, such as illegal SIM or ME.
1955 * Returns GENERIC_FAILURE for all other causes that might be
1959 #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
1962 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
1964 * Manually select a specified network.
1966 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
1967 * "response" is NULL
1969 * This request must not respond until the new operator is selected
1974 * RADIO_NOT_AVAILABLE
1978 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
1979 * no retries needed, such as illegal SIM or ME.
1980 * Returns GENERIC_FAILURE for all other causes that might be
1984 #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
1987 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
1989 * Scans for available networks
1992 * "response" is const char ** that should be an array of n*4 strings, where
1993 * n is the number of available networks
1994 * For each available network:
1996 * ((const char **)response)[n+0] is long alpha ONS or EONS
1997 * ((const char **)response)[n+1] is short alpha ONS or EONS
1998 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
1999 * ((const char **)response)[n+3] is a string value of the status:
2005 * This request must not respond until the new operator is selected
2010 * RADIO_NOT_AVAILABLE
2014 #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
2017 * RIL_REQUEST_DTMF_START
2019 * Start playing a DTMF tone. Continue playing DTMF tone until
2020 * RIL_REQUEST_DTMF_STOP is received
2022 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
2023 * it should cancel the previous tone and play the new one.
2025 * "data" is a char *
2026 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
2027 * "response" is NULL
2031 * RADIO_NOT_AVAILABLE
2034 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
2036 #define RIL_REQUEST_DTMF_START 49
2039 * RIL_REQUEST_DTMF_STOP
2041 * Stop playing a currently playing DTMF tone.
2044 * "response" is NULL
2048 * RADIO_NOT_AVAILABLE
2051 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
2053 #define RIL_REQUEST_DTMF_STOP 50
2056 * RIL_REQUEST_BASEBAND_VERSION
2058 * Return string value indicating baseband version, eg
2059 * response from AT+CGMR
2062 * "response" is const char * containing version string for log reporting
2066 * RADIO_NOT_AVAILABLE
2070 #define RIL_REQUEST_BASEBAND_VERSION 51
2073 * RIL_REQUEST_SEPARATE_CONNECTION
2075 * Separate a party from a multiparty call placing the multiparty call
2076 * (less the specified party) on hold and leaving the specified party
2077 * as the only other member of the current (active) call
2081 * See TS 22.084 1.3.8.2 (iii)
2082 * TS 22.030 6.5.5 "Entering "2X followed by send"
2083 * TS 27.007 "AT+CHLD=2x"
2085 * "data" is an int *
2086 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
2088 * "response" is NULL
2092 * RADIO_NOT_AVAILABLE (radio resetting)
2095 #define RIL_REQUEST_SEPARATE_CONNECTION 52
2099 * RIL_REQUEST_SET_MUTE
2101 * Turn on or off uplink (microphone) mute.
2103 * Will only be sent while voice call is active.
2104 * Will always be reset to "disable mute" when a new voice call is initiated
2106 * "data" is an int *
2107 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
2109 * "response" is NULL
2113 * RADIO_NOT_AVAILABLE (radio resetting)
2117 #define RIL_REQUEST_SET_MUTE 53
2120 * RIL_REQUEST_GET_MUTE
2122 * Queries the current state of the uplink mute setting
2125 * "response" is an int *
2126 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
2130 * RADIO_NOT_AVAILABLE (radio resetting)
2134 #define RIL_REQUEST_GET_MUTE 54
2137 * RIL_REQUEST_QUERY_CLIP
2139 * Queries the status of the CLIP supplementary service
2141 * (for MMI code "*#30#")
2144 * "response" is an int *
2145 * (int *)response)[0] is 1 for "CLIP provisioned"
2146 * and 0 for "CLIP not provisioned"
2147 * and 2 for "unknown, e.g. no network etc"
2151 * RADIO_NOT_AVAILABLE (radio resetting)
2155 #define RIL_REQUEST_QUERY_CLIP 55
2158 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
2159 * field in RIL_Data_Call_Response_v6.
2161 * Requests the failure cause code for the most recently failed PDP
2162 * context or CDMA data connection active
2163 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
2167 * "response" is a "int *"
2168 * ((int *)response)[0] is an integer cause code defined in TS 24.008
2169 * section 6.1.3.1.3 or close approximation
2171 * If the implementation does not have access to the exact cause codes,
2172 * then it should return one of the values listed in
2173 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
2174 * cases for error notification
2175 * and potential retries.
2179 * RADIO_NOT_AVAILABLE
2182 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2184 * Deprecated use the status field in RIL_Data_Call_Response_v6.
2187 #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
2190 * RIL_REQUEST_DATA_CALL_LIST
2192 * Returns the data call list. An entry is added when a
2193 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
2194 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
2195 * when RIL_REQUEST_RADIO_POWER off/on is issued.
2198 * "response" is an array of RIL_Data_Call_Response_v6
2202 * RADIO_NOT_AVAILABLE (radio resetting)
2205 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
2208 #define RIL_REQUEST_DATA_CALL_LIST 57
2211 * RIL_REQUEST_RESET_RADIO - DEPRECATED
2213 * Request a radio reset. The RIL implementation may postpone
2214 * the reset until after this request is responded to if the baseband
2215 * is presently busy.
2217 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
2220 * "response" is NULL
2224 * RADIO_NOT_AVAILABLE (radio resetting)
2226 * REQUEST_NOT_SUPPORTED
2229 #define RIL_REQUEST_RESET_RADIO 58
2232 * RIL_REQUEST_OEM_HOOK_RAW
2234 * This request reserved for OEM-specific uses. It passes raw byte arrays
2237 * It can be invoked on the Java side from
2238 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
2240 * "data" is a char * of bytes copied from the byte[] data argument in java
2241 * "response" is a char * of bytes that will returned via the
2242 * caller's "response" Message here:
2243 * (byte[])(((AsyncResult)response.obj).result)
2245 * An error response here will result in
2246 * (((AsyncResult)response.obj).result) == null and
2247 * (((AsyncResult)response.obj).exception) being an instance of
2248 * com.android.internal.telephony.gsm.CommandException
2254 #define RIL_REQUEST_OEM_HOOK_RAW 59
2257 * RIL_REQUEST_OEM_HOOK_STRINGS
2259 * This request reserved for OEM-specific uses. It passes strings
2262 * It can be invoked on the Java side from
2263 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
2265 * "data" is a const char **, representing an array of null-terminated UTF-8
2266 * strings copied from the "String[] strings" argument to
2267 * invokeOemRilRequestStrings()
2269 * "response" is a const char **, representing an array of null-terminated UTF-8
2270 * stings that will be returned via the caller's response message here:
2272 * (String[])(((AsyncResult)response.obj).result)
2274 * An error response here will result in
2275 * (((AsyncResult)response.obj).result) == null and
2276 * (((AsyncResult)response.obj).exception) being an instance of
2277 * com.android.internal.telephony.gsm.CommandException
2283 #define RIL_REQUEST_OEM_HOOK_STRINGS 60
2286 * RIL_REQUEST_SCREEN_STATE
2288 * Indicates the current state of the screen. When the screen is off, the
2289 * RIL should notify the baseband to suppress certain notifications (eg,
2290 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
2291 * in an effort to conserve power. These notifications should resume when the
2295 * ((int *)data)[0] is == 1 for "Screen On"
2296 * ((int *)data)[0] is == 0 for "Screen Off"
2298 * "response" is NULL
2304 #define RIL_REQUEST_SCREEN_STATE 61
2308 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
2310 * Enables/disables supplementary service related notifications
2313 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2316 * ((int *)data)[0] is == 1 for notifications enabled
2317 * ((int *)data)[0] is == 0 for notifications disabled
2319 * "response" is NULL
2323 * RADIO_NOT_AVAILABLE
2326 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2328 #define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2331 * RIL_REQUEST_WRITE_SMS_TO_SIM
2333 * Stores a SMS message to SIM memory.
2335 * "data" is RIL_SMS_WriteArgs *
2337 * "response" is int *
2338 * ((const int *)response)[0] is the record index where the message is stored.
2345 #define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2348 * RIL_REQUEST_DELETE_SMS_ON_SIM
2350 * Deletes a SMS message from SIM memory.
2353 * ((int *)data)[0] is the record index of the message to delete.
2355 * "response" is NULL
2362 #define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2365 * RIL_REQUEST_SET_BAND_MODE
2367 * Assign a specified band for RF configuration.
2370 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2371 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2372 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2373 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2374 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2375 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2376 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2377 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2378 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2379 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2380 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2381 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2382 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2383 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2384 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2385 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2386 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2387 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2388 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
2390 * "response" is NULL
2394 * RADIO_NOT_AVAILABLE
2397 #define RIL_REQUEST_SET_BAND_MODE 65
2400 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2402 * Query the list of band mode supported by RF.
2406 * "response" is int *
2407 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2408 * each available band mode.
2410 * 0 for "unspecified" (selected by baseband automatically)
2411 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2412 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2413 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2414 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2415 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2416 * 6 for "Cellular (800-MHz Band)"
2417 * 7 for "PCS (1900-MHz Band)"
2418 * 8 for "Band Class 3 (JTACS Band)"
2419 * 9 for "Band Class 4 (Korean PCS Band)"
2420 * 10 for "Band Class 5 (450-MHz Band)"
2421 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2422 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2423 * 13 for "Band Class 8 (1800-MHz Band)"
2424 * 14 for "Band Class 9 (900-MHz Band)"
2425 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2426 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2427 * 17 for "Band Class 15 (AWS Band)"
2428 * 18 for "Band Class 16 (US 2.5-GHz Band)"
2432 * RADIO_NOT_AVAILABLE
2435 * See also: RIL_REQUEST_SET_BAND_MODE
2437 #define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2440 * RIL_REQUEST_STK_GET_PROFILE
2442 * Requests the profile of SIM tool kit.
2443 * The profile indicates the SAT/USAT features supported by ME.
2444 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2448 * "response" is a const char * containing SAT/USAT profile
2449 * in hexadecimal format string starting with first byte of terminal profile
2453 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2454 * RIL_E_GENERIC_FAILURE
2456 #define RIL_REQUEST_STK_GET_PROFILE 67
2459 * RIL_REQUEST_STK_SET_PROFILE
2461 * Download the STK terminal profile as part of SIM initialization
2464 * "data" is a const char * containing SAT/USAT profile
2465 * in hexadecimal format string starting with first byte of terminal profile
2467 * "response" is NULL
2471 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2472 * RIL_E_GENERIC_FAILURE
2474 #define RIL_REQUEST_STK_SET_PROFILE 68
2477 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2479 * Requests to send a SAT/USAT envelope command to SIM.
2480 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2482 * "data" is a const char * containing SAT/USAT command
2483 * in hexadecimal format string starting with command tag
2485 * "response" is a const char * containing SAT/USAT response
2486 * in hexadecimal format string starting with first byte of response
2491 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2492 * RIL_E_GENERIC_FAILURE
2494 #define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2497 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2499 * Requests to send a terminal response to SIM for a received
2502 * "data" is a const char * containing SAT/USAT response
2503 * in hexadecimal format string starting with first byte of response data
2505 * "response" is NULL
2509 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2510 * RIL_E_GENERIC_FAILURE
2512 #define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
2515 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
2517 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
2518 * been initialized by ME already. (We could see the call has been in the 'call
2519 * list') So, STK application needs to accept/reject the call according as user
2523 * ((int *)data)[0] is > 0 for "accept" the call setup
2524 * ((int *)data)[0] is == 0 for "reject" the call setup
2526 * "response" is NULL
2530 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2531 * RIL_E_GENERIC_FAILURE
2533 #define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
2536 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
2538 * Connects the two calls and disconnects the subscriber from both calls.
2541 * "response" is NULL
2545 * RADIO_NOT_AVAILABLE (radio resetting)
2548 #define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
2551 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2553 * Requests to set the preferred network type for searching and registering
2554 * (CS/PS domain, RAT, and operation mode)
2556 * "data" is int * which is RIL_PreferredNetworkType
2558 * "response" is NULL
2562 * RADIO_NOT_AVAILABLE (radio resetting)
2564 * MODE_NOT_SUPPORTED
2566 #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2569 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2571 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2572 * for searching and registering
2576 * "response" is int *
2577 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
2581 * RADIO_NOT_AVAILABLE
2584 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2586 #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2589 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2591 * Request neighboring cell id in GSM network
2594 * "response" must be a " const RIL_NeighboringCell** "
2598 * RADIO_NOT_AVAILABLE
2601 #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
2604 * RIL_REQUEST_SET_LOCATION_UPDATES
2606 * Enables/disables network state change notifications due to changes in
2607 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
2608 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
2610 * Note: The RIL implementation should default to "updates enabled"
2611 * when the screen is on and "updates disabled" when the screen is off.
2614 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
2615 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
2617 * "response" is NULL
2621 * RADIO_NOT_AVAILABLE
2624 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2626 #define RIL_REQUEST_SET_LOCATION_UPDATES 76
2629 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
2631 * Request to set the location where the CDMA subscription shall
2635 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
2637 * "response" is NULL
2641 * RADIO_NOT_AVAILABLE
2644 * SUBSCRIPTION_NOT_AVAILABLE
2646 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
2648 #define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
2651 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
2653 * Request to set the roaming preferences in CDMA
2656 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
2657 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2658 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
2660 * "response" is NULL
2664 * RADIO_NOT_AVAILABLE
2667 #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
2670 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
2672 * Request the actual setting of the roaming preferences in CDMA in the modem
2676 * "response" is int *
2677 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
2678 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2679 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
2681 * "response" is NULL
2685 * RADIO_NOT_AVAILABLE
2688 #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
2691 * RIL_REQUEST_SET_TTY_MODE
2693 * Request to set the TTY mode
2696 * ((int *)data)[0] is == 0 for TTY off
2697 * ((int *)data)[0] is == 1 for TTY Full
2698 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
2699 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
2701 * "response" is NULL
2705 * RADIO_NOT_AVAILABLE
2708 #define RIL_REQUEST_SET_TTY_MODE 80
2711 * RIL_REQUEST_QUERY_TTY_MODE
2713 * Request the setting of TTY mode
2717 * "response" is int *
2718 * ((int *)response)[0] is == 0 for TTY off
2719 * ((int *)response)[0] is == 1 for TTY Full
2720 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
2721 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
2723 * "response" is NULL
2727 * RADIO_NOT_AVAILABLE
2730 #define RIL_REQUEST_QUERY_TTY_MODE 81
2733 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
2735 * Request to set the preferred voice privacy mode used in voice
2739 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2740 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
2742 * "response" is NULL
2746 * RADIO_NOT_AVAILABLE
2749 #define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
2752 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
2754 * Request the setting of preferred voice privacy mode
2758 * "response" is int *
2759 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2760 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
2762 * "response" is NULL
2766 * RADIO_NOT_AVAILABLE
2769 #define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
2772 * RIL_REQUEST_CDMA_FLASH
2776 * "data" is const char *
2777 * ((const char *)data)[0] is a FLASH string
2779 * "response" is NULL
2783 * RADIO_NOT_AVAILABLE
2787 #define RIL_REQUEST_CDMA_FLASH 84
2790 * RIL_REQUEST_CDMA_BURST_DTMF
2794 * "data" is const char **
2795 * ((const char **)data)[0] is a DTMF string
2796 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
2798 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
2801 * "response" is NULL
2805 * RADIO_NOT_AVAILABLE
2809 #define RIL_REQUEST_CDMA_BURST_DTMF 85
2812 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
2814 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
2815 * If the checksum is valid the 20 digit AKEY is written to NV,
2816 * replacing the existing AKEY no matter what it was before.
2818 * "data" is const char *
2819 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
2820 * where the last 6 digits are a checksum of the
2821 * first 20, as specified in TR45.AHAG
2822 * "Common Cryptographic Algorithms, Revision D.1
2825 * "response" is NULL
2829 * RADIO_NOT_AVAILABLE
2833 #define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
2836 * RIL_REQUEST_CDMA_SEND_SMS
2838 * Send a CDMA SMS message
2840 * "data" is const RIL_CDMA_SMS_Message *
2842 * "response" is a const RIL_SMS_Response *
2844 * Based on the return error, caller decides to resend if sending sms
2845 * fails. The CDMA error class is derived as follows,
2846 * SUCCESS is error class 0 (no error)
2847 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
2848 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
2852 * RADIO_NOT_AVAILABLE
2853 * SMS_SEND_FAIL_RETRY
2857 #define RIL_REQUEST_CDMA_SEND_SMS 87
2860 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
2862 * Acknowledge the success or failure in the receipt of SMS
2863 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
2865 * "data" is const RIL_CDMA_SMS_Ack *
2867 * "response" is NULL
2871 * RADIO_NOT_AVAILABLE
2875 #define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
2878 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
2880 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
2884 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
2885 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
2889 * RADIO_NOT_AVAILABLE
2893 #define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
2896 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
2898 * Set GSM/WCDMA Cell Broadcast SMS config
2900 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
2901 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
2903 * "response" is NULL
2907 * RADIO_NOT_AVAILABLE
2911 #define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
2914 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
2916 * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
2918 * "data" is const int *
2919 * (const int *)data[0] indicates to activate or turn off the
2920 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
2921 * 0 - Activate, 1 - Turn off
2923 * "response" is NULL
2927 * RADIO_NOT_AVAILABLE
2931 #define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
2934 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
2936 * Request the setting of CDMA Broadcast SMS config
2940 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
2941 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
2945 * RADIO_NOT_AVAILABLE
2949 #define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
2952 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
2954 * Set CDMA Broadcast SMS config
2956 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
2957 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
2959 * "response" is NULL
2963 * RADIO_NOT_AVAILABLE
2967 #define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
2970 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
2972 * Enable or disable the reception of CDMA Broadcast SMS
2974 * "data" is const int *
2975 * (const int *)data[0] indicates to activate or turn off the
2976 * reception of CDMA Broadcast SMS, 0-1,
2977 * 0 - Activate, 1 - Turn off
2979 * "response" is NULL
2983 * RADIO_NOT_AVAILABLE
2987 #define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
2990 * RIL_REQUEST_CDMA_SUBSCRIPTION
2992 * Request the device MDN / H_SID / H_NID.
2994 * The request is only allowed when CDMA subscription is available. When CDMA
2995 * subscription is changed, application layer should re-issue the request to
2996 * update the subscription information.
2998 * If a NULL value is returned for any of the device id, it means that error
2999 * accessing the device.
3001 * "response" is const char **
3002 * ((const char **)response)[0] is MDN if CDMA subscription is available
3003 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
3004 * CDMA subscription is available, in decimal format
3005 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
3006 * CDMA subscription is available, in decimal format
3007 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
3008 * ((const char **)response)[4] is PRL version if CDMA subscription is available
3012 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
3015 #define RIL_REQUEST_CDMA_SUBSCRIPTION 95
3018 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
3020 * Stores a CDMA SMS message to RUIM memory.
3022 * "data" is RIL_CDMA_SMS_WriteArgs *
3024 * "response" is int *
3025 * ((const int *)response)[0] is the record index where the message is stored.
3029 * RADIO_NOT_AVAILABLE
3033 #define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
3036 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
3038 * Deletes a CDMA SMS message from RUIM memory.
3041 * ((int *)data)[0] is the record index of the message to delete.
3043 * "response" is NULL
3047 * RADIO_NOT_AVAILABLE
3051 #define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
3054 * RIL_REQUEST_DEVICE_IDENTITY
3056 * Request the device ESN / MEID / IMEI / IMEISV.
3058 * The request is always allowed and contains GSM and CDMA device identity;
3059 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
3060 * RIL_REQUEST_GET_IMEISV.
3062 * If a NULL value is returned for any of the device id, it means that error
3063 * accessing the device.
3065 * When CDMA subscription is changed the ESN/MEID may change. The application
3066 * layer should re-issue the request to update the device identity in this case.
3068 * "response" is const char **
3069 * ((const char **)response)[0] is IMEI if GSM subscription is available
3070 * ((const char **)response)[1] is IMEISV if GSM subscription is available
3071 * ((const char **)response)[2] is ESN if CDMA subscription is available
3072 * ((const char **)response)[3] is MEID if CDMA subscription is available
3076 * RADIO_NOT_AVAILABLE
3079 #define RIL_REQUEST_DEVICE_IDENTITY 98
3082 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
3084 * Request the radio's system selection module to exit emergency
3085 * callback mode. RIL will not respond with SUCCESS until the modem has
3086 * completely exited from Emergency Callback Mode.
3090 * "response" is NULL
3094 * RADIO_NOT_AVAILABLE
3098 #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
3101 * RIL_REQUEST_GET_SMSC_ADDRESS
3103 * Queries the default Short Message Service Center address on the device.
3107 * "response" is const char * containing the SMSC address.
3111 * RADIO_NOT_AVAILABLE
3115 #define RIL_REQUEST_GET_SMSC_ADDRESS 100
3118 * RIL_REQUEST_SET_SMSC_ADDRESS
3120 * Sets the default Short Message Service Center address on the device.
3122 * "data" is const char * containing the SMSC address.
3124 * "response" is NULL
3128 * RADIO_NOT_AVAILABLE
3132 #define RIL_REQUEST_SET_SMSC_ADDRESS 101
3135 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
3137 * Indicates whether there is storage available for new SMS messages.
3140 * ((int *)data)[0] is 1 if memory is available for storing new messages
3141 * is 0 if memory capacity is exceeded
3143 * "response" is NULL
3147 * RADIO_NOT_AVAILABLE
3151 #define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
3154 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
3156 * Indicates that the StkSerivce is running and is
3157 * ready to receive RIL_UNSOL_STK_XXXXX commands.
3160 * "response" is NULL
3164 * RADIO_NOT_AVAILABLE
3168 #define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
3171 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3173 * Request to query the location where the CDMA subscription shall
3178 * "response" is int *
3179 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3183 * RADIO_NOT_AVAILABLE
3185 * SUBSCRIPTION_NOT_AVAILABLE
3187 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
3189 #define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
3191 /***********************************************************************/
3194 #define RIL_UNSOL_RESPONSE_BASE 1000
3197 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3199 * Indicate when value of RIL_RadioState has changed.
3201 * Callee will invoke RIL_RadioStateRequest method on main thread
3206 #define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
3210 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
3212 * Indicate when call state has changed
3214 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
3218 * Response should be invoked on, for example,
3219 * "RING", "BUSY", "NO CARRIER", and also call state
3220 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
3222 * Redundent or extraneous invocations are tolerated
3224 #define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
3228 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
3230 * Called when the voice network state changed
3232 * Callee will invoke the following requests on main thread:
3234 * RIL_REQUEST_VOICE_REGISTRATION_STATE
3235 * RIL_REQUEST_OPERATOR
3239 * FIXME should this happen when SIM records are loaded? (eg, for
3242 #define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
3245 * RIL_UNSOL_RESPONSE_NEW_SMS
3247 * Called when new SMS is received.
3249 * "data" is const char *
3250 * This is a pointer to a string containing the PDU of an SMS-DELIVER
3251 * as an ascii string of hex digits. The PDU starts with the SMSC address
3252 * per TS 27.005 (+CMT:)
3254 * Callee will subsequently confirm the receipt of thei SMS with a
3255 * RIL_REQUEST_SMS_ACKNOWLEDGE
3257 * No new RIL_UNSOL_RESPONSE_NEW_SMS
3258 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3259 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3262 #define RIL_UNSOL_RESPONSE_NEW_SMS 1003
3265 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
3267 * Called when new SMS Status Report is received.
3269 * "data" is const char *
3270 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
3271 * as an ascii string of hex digits. The PDU starts with the SMSC address
3272 * per TS 27.005 (+CDS:).
3274 * Callee will subsequently confirm the receipt of the SMS with a
3275 * RIL_REQUEST_SMS_ACKNOWLEDGE
3277 * No new RIL_UNSOL_RESPONSE_NEW_SMS
3278 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3279 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3282 #define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
3285 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
3287 * Called when new SMS has been stored on SIM card
3289 * "data" is const int *
3290 * ((const int *)data)[0] contains the slot index on the SIM that contains
3294 #define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
3299 * Called when a new USSD message is received.
3301 * "data" is const char **
3302 * ((const char **)data)[0] points to a type code, which is
3303 * one of these string values:
3304 * "0" USSD-Notify -- text in ((const char **)data)[1]
3305 * "1" USSD-Request -- text in ((const char **)data)[1]
3306 * "2" Session terminated by network
3307 * "3" other local client (eg, SIM Toolkit) has responded
3308 * "4" Operation not supported
3309 * "5" Network timeout
3311 * The USSD session is assumed to persist if the type code is "1", otherwise
3312 * the current session (if any) is assumed to have terminated.
3314 * ((const char **)data)[1] points to a message string if applicable, which
3315 * should always be in UTF-8.
3317 #define RIL_UNSOL_ON_USSD 1006
3318 /* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
3321 * RIL_UNSOL_ON_USSD_REQUEST
3323 * Obsolete. Send via RIL_UNSOL_ON_USSD
3325 #define RIL_UNSOL_ON_USSD_REQUEST 1007
3329 * RIL_UNSOL_NITZ_TIME_RECEIVED
3331 * Called when radio has received a NITZ time message
3333 * "data" is const char * pointing to NITZ time string
3334 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
3336 #define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
3339 * RIL_UNSOL_SIGNAL_STRENGTH
3341 * Radio may report signal strength rather han have it polled.
3343 * "data" is a const RIL_SignalStrength *
3345 #define RIL_UNSOL_SIGNAL_STRENGTH 1009
3349 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
3351 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
3352 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
3353 * of current data contexts including new contexts that have been
3354 * activated. A data call is only removed from this list when the
3355 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
3356 * is powered off/on.
3358 * See also: RIL_REQUEST_DATA_CALL_LIST
3361 #define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
3364 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
3366 * Reports supplementary service related notification from the network.
3368 * "data" is a const RIL_SuppSvcNotification *
3372 #define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
3375 * RIL_UNSOL_STK_SESSION_END
3377 * Indicate when STK session is terminated by SIM.
3381 #define RIL_UNSOL_STK_SESSION_END 1012
3384 * RIL_UNSOL_STK_PROACTIVE_COMMAND
3386 * Indicate when SIM issue a STK proactive command to applications
3388 * "data" is a const char * containing SAT/USAT proactive command
3389 * in hexadecimal format string starting with command tag
3392 #define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
3395 * RIL_UNSOL_STK_EVENT_NOTIFY
3397 * Indicate when SIM notifies applcations some event happens.
3398 * Generally, application does not need to have any feedback to
3399 * SIM but shall be able to indicate appropriate messages to users.
3401 * "data" is a const char * containing SAT/USAT commands or responses
3402 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
3403 * starting with first byte of response data or command tag
3406 #define RIL_UNSOL_STK_EVENT_NOTIFY 1014
3409 * RIL_UNSOL_STK_CALL_SETUP
3411 * Indicate when SIM wants application to setup a voice call.
3413 * "data" is const int *
3414 * ((const int *)data)[0] contains timeout value (in milliseconds)
3416 #define RIL_UNSOL_STK_CALL_SETUP 1015
3419 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
3421 * Indicates that SMS storage on the SIM is full. Sent when the network
3422 * attempts to deliver a new SMS message. Messages cannot be saved on the
3423 * SIM until space is freed. In particular, incoming Class 2 messages
3429 #define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
3432 * RIL_UNSOL_SIM_REFRESH
3434 * Indicates that file(s) on the SIM have been updated, or the SIM
3435 * has been reinitialized.
3437 * "data" is an int *
3438 * ((int *)data)[0] is a RIL_SimRefreshResult.
3439 * ((int *)data)[1] is the EFID of the updated file if the result is
3440 * SIM_FILE_UPDATE, AID(application ID) of the card application
3441 * triggering the REFRESH if the result is SIM_INIT, or NULL for any other result.
3443 * Note: If the radio state changes as a result of the SIM refresh (eg,
3444 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3447 #define RIL_UNSOL_SIM_REFRESH 1017
3450 * RIL_UNSOL_CALL_RING
3452 * Ring indication for an incoming call (eg, RING or CRING event).
3453 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
3454 * of a call and sending multiple is optional. If the system property
3455 * ro.telephony.call_ring.multiple is false then the upper layers
3456 * will generate the multiple events internally. Otherwise the vendor
3457 * ril must generate multiple RIL_UNSOL_CALL_RING if
3458 * ro.telephony.call_ring.multiple is true or if it is absent.
3460 * The rate of these events is controlled by ro.telephony.call_ring.delay
3461 * and has a default value of 3000 (3 seconds) if absent.
3463 * "data" is null for GSM
3464 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
3466 #define RIL_UNSOL_CALL_RING 1018
3469 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
3471 * Indicates that SIM state changes.
3473 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
3477 #define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
3480 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3482 * Called when new CDMA SMS is received
3484 * "data" is const RIL_CDMA_SMS_Message *
3486 * Callee will subsequently confirm the receipt of the SMS with
3487 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
3489 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
3490 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
3493 #define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
3496 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
3498 * Called when new Broadcast SMS is received
3500 * "data" can be one of the following:
3501 * If received from GSM network, "data" is const char of 88 bytes
3502 * which indicates each page of a CBS Message sent to the MS by the
3503 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
3504 * If received from UMTS network, "data" is const char of 90 up to 1252
3505 * bytes which contain between 1 and 15 CBS Message pages sent as one
3506 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2.
3509 #define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
3512 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
3514 * Indicates that SMS storage on the RUIM is full. Messages
3515 * cannot be saved on the RUIM until space is freed.
3520 #define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
3523 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
3525 * Indicates a restricted state change (eg, for Domain Specific Access Control).
3527 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
3529 * "data" is an int *
3530 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
3532 #define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
3535 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
3537 * Indicates that the radio system selection module has
3538 * autonomously entered emergency callback mode.
3543 #define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
3546 * RIL_UNSOL_CDMA_CALL_WAITING
3548 * Called when CDMA radio receives a call waiting indication.
3550 * "data" is const RIL_CDMA_CallWaiting *
3553 #define RIL_UNSOL_CDMA_CALL_WAITING 1025
3556 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
3558 * Called when CDMA radio receives an update of the progress of an
3561 * "data" is const int *
3562 * For CDMA this is an integer OTASP/OTAPA status listed in
3563 * RIL_CDMA_OTA_ProvisionStatus.
3566 #define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
3569 * RIL_UNSOL_CDMA_INFO_REC
3571 * Called when CDMA radio receives one or more info recs.
3573 * "data" is const RIL_CDMA_InformationRecords *
3576 #define RIL_UNSOL_CDMA_INFO_REC 1027
3579 * RIL_UNSOL_OEM_HOOK_RAW
3581 * This is for OEM specific use.
3583 * "data" is a byte[]
3585 #define RIL_UNSOL_OEM_HOOK_RAW 1028
3588 * RIL_UNSOL_RINGBACK_TONE
3590 * Indicates that nework doesn't have in-band information, need to
3591 * play out-band tone.
3593 * "data" is an int *
3594 * ((int *)data)[0] == 0 for stop play ringback tone.
3595 * ((int *)data)[0] == 1 for start play ringback tone.
3597 #define RIL_UNSOL_RINGBACK_TONE 1029
3600 * RIL_UNSOL_RESEND_INCALL_MUTE
3602 * Indicates that framework/application need reset the uplink mute state.
3604 * There may be situations where the mute state becomes out of sync
3605 * between the application and device in some GSM infrastructures.
3609 #define RIL_UNSOL_RESEND_INCALL_MUTE 1030
3612 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
3614 * Called when CDMA subscription source changed.
3617 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3619 #define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
3622 * RIL_UNSOL_CDMA_PRL_CHANGED
3624 * Called when PRL (preferred roaming list) changes.
3627 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
3629 #define RIL_UNSOL_CDMA_PRL_CHANGED 1032
3632 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
3634 * Called when Emergency Callback Mode Ends
3636 * Indicates that the radio system selection module has
3637 * proactively exited emergency callback mode.
3642 #define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
3645 * RIL_UNSOL_RIL_CONNECTED
3647 * Called the ril connects and returns the version
3650 * ((int *)data)[0] is RIL_VERSION
3652 #define RIL_UNSOL_RIL_CONNECTED 1034
3654 /***********************************************************************/
3658 * RIL_Request Function pointer
3660 * @param request is one of RIL_REQUEST_*
3661 * @param data is pointer to data defined for that RIL_REQUEST_*
3662 * data is owned by caller, and should not be modified or freed by callee
3663 * @param t should be used in subsequent call to RIL_onResponse
3664 * @param datalen the length of data
3667 typedef void (*RIL_RequestFunc) (int request, void *data,
3668 size_t datalen, RIL_Token t);
3671 * This function should return the current radio state synchronously
3673 typedef RIL_RadioState (*RIL_RadioStateRequest)();
3676 * This function returns "1" if the specified RIL_REQUEST code is
3677 * supported and 0 if it is not
3679 * @param requestCode is one of RIL_REQUEST codes
3682 typedef int (*RIL_Supports)(int requestCode);
3685 * This function is called from a separate thread--not the
3686 * thread that calls RIL_RequestFunc--and indicates that a pending
3687 * request should be cancelled.
3689 * On cancel, the callee should do its best to abandon the request and
3690 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
3692 * Subsequent calls to RIL_onRequestComplete for this request with
3693 * other results will be tolerated but ignored. (That is, it is valid
3694 * to ignore the cancellation request)
3696 * RIL_Cancel calls should return immediately, and not wait for cancellation
3698 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
3701 * @param t token wants to be canceled
3704 typedef void (*RIL_Cancel)(RIL_Token t);
3706 typedef void (*RIL_TimedCallback) (void *param);
3709 * Return a version string for your RIL implementation
3711 typedef const char * (*RIL_GetVersion) (void);
3714 int version; /* set to RIL_VERSION */
3715 RIL_RequestFunc onRequest;
3716 RIL_RadioStateRequest onStateRequest;
3717 RIL_Supports supports;
3718 RIL_Cancel onCancel;
3719 RIL_GetVersion getVersion;
3720 } RIL_RadioFunctions;
3725 * "t" is parameter passed in on previous call to RIL_Notification
3728 * If "e" != SUCCESS, then response can be null/is ignored
3730 * "response" is owned by caller, and should not be modified or
3733 * RIL_onRequestComplete will return as soon as possible
3735 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
3736 void *response, size_t responselen);
3739 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
3740 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3742 * "data" is owned by caller, and should not be modified or freed by callee
3745 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
3749 * Call user-specifed "callback" function on on the same thread that
3750 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3751 * a relative time value at which the callback is invoked. If relativeTime is
3752 * NULL or points to a 0-filled structure, the callback will be invoked as
3756 void (*RequestTimedCallback) (RIL_TimedCallback callback,
3757 void *param, const struct timeval *relativeTime);
3762 * RIL implementations must defined RIL_Init
3763 * argc and argv will be command line arguments intended for the RIL implementation
3764 * Return NULL on error
3766 * @param env is environment point defined as RIL_Env
3767 * @param argc number of arguments
3768 * @param argv list fo arguments
3771 const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
3773 #else /* RIL_SHLIB */
3776 * Call this once at startup to register notification routine
3778 * @param callbacks user-specifed callback function
3780 void RIL_register (const RIL_RadioFunctions *callbacks);
3785 * RIL_onRequestComplete will return as soon as possible
3787 * @param t is parameter passed in on previous call to RIL_Notification
3789 * @param e error code
3790 * if "e" != SUCCESS, then response can be null/is ignored
3791 * @param response is owned by caller, and should not be modified or
3793 * @param responselen the length of response in byte
3795 void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
3796 void *response, size_t responselen);
3799 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
3800 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3801 * "data" is owned by caller, and should not be modified or freed by callee
3802 * @param datalen the length of data in byte
3805 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
3810 * Call user-specifed "callback" function on on the same thread that
3811 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3812 * a relative time value at which the callback is invoked. If relativeTime is
3813 * NULL or points to a 0-filled structure, the callback will be invoked as
3816 * @param callback user-specifed callback function
3817 * @param param parameter list
3818 * @param relativeTime a relative time value at which the callback is invoked
3821 void RIL_requestTimedCallback (RIL_TimedCallback callback,
3822 void *param, const struct timeval *relativeTime);
3825 #endif /* RIL_SHLIB */
3831 #endif /*ANDROID_RIL_H*/