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
22 #include <telephony/ril_cdma_sms.h>
23 #include <telephony/ril_nv_items.h>
24 #include <telephony/ril_msim.h>
26 #ifndef FEATURE_UNIT_TEST
28 #endif /* !FEATURE_UNIT_TEST */
35 #if defined(ANDROID_SIM_COUNT_2)
37 #elif defined(ANDROID_SIM_COUNT_3)
39 #elif defined(ANDROID_SIM_COUNT_4)
45 #ifndef ANDROID_MULTI_SIM
49 #define RIL_VERSION 11 /* Current version */
50 #define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
52 #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
53 #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
56 #define MAX_SOCKET_NAME_LENGTH 6
57 #define MAX_CLIENT_ID_LENGTH 2
58 #define MAX_DEBUG_SOCKET_NAME_LENGTH 12
59 #define MAX_QEMU_PIPE_NAME_LENGTH 11
60 #define MAX_UUID_LENGTH 64
63 typedef void * RIL_Token;
82 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
83 RIL_E_GENERIC_FAILURE = 2,
84 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
85 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
86 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
87 RIL_E_REQUEST_NOT_SUPPORTED = 6,
89 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
90 call on a Class C GPRS device */
91 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
92 registers in network */
93 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
94 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
95 shall be retrieved because of SIM or RUIM
97 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
99 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
100 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
101 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
103 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
104 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
105 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
106 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
107 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
109 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
110 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
111 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
113 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
114 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
115 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
116 RIL_E_SS_MODIFIED_TO_SS = 27 /* SS request modified to different SS request */
123 RIL_CALL_HOLDING = 1,
124 RIL_CALL_DIALING = 2, /* MO call only */
125 RIL_CALL_ALERTING = 3, /* MO call only */
126 RIL_CALL_INCOMING = 4, /* MT call only */
127 RIL_CALL_WAITING = 5 /* MT call only */
131 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
132 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
133 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
134 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
135 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
136 personalization locked, or SIM absent */
137 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
138 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
139 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
140 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
141 personalization locked, or RUIM absent */
142 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
143 RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */
144 RADIO_STATE_ON = 10 /* Radio is on */
148 RADIO_TECH_UNKNOWN = 0,
152 RADIO_TECH_IS95A = 4,
153 RADIO_TECH_IS95B = 5,
154 RADIO_TECH_1xRTT = 6,
155 RADIO_TECH_EVDO_0 = 7,
156 RADIO_TECH_EVDO_A = 8,
157 RADIO_TECH_HSDPA = 9,
158 RADIO_TECH_HSUPA = 10,
159 RADIO_TECH_HSPA = 11,
160 RADIO_TECH_EVDO_B = 12,
161 RADIO_TECH_EHRPD = 13,
163 RADIO_TECH_HSPAP = 15, // HSPA+
164 RADIO_TECH_GSM = 16, // Only supports voice
165 RADIO_TECH_TD_SCDMA = 17,
166 RADIO_TECH_IWLAN = 18
167 } RIL_RadioTechnology;
170 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
171 RAF_GPRS = (1 << RADIO_TECH_GPRS),
172 RAF_EDGE = (1 << RADIO_TECH_EDGE),
173 RAF_UMTS = (1 << RADIO_TECH_UMTS),
174 RAF_IS95A = (1 << RADIO_TECH_IS95A),
175 RAF_IS95B = (1 << RADIO_TECH_IS95B),
176 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
177 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
178 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
179 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
180 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
181 RAF_HSPA = (1 << RADIO_TECH_HSPA),
182 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
183 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
184 RAF_LTE = (1 << RADIO_TECH_LTE),
185 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
186 RAF_GSM = (1 << RADIO_TECH_GSM),
187 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
188 } RIL_RadioAccessFamily;
191 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
192 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
193 // forthcoming with these same parameters
194 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
195 // RIL_RadioCapability.status = 0, if any START's fail no
196 // APPLY will be sent
197 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
198 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
199 // occurs in any previous command the RIL_RadioAccessesFamily and
200 // logicalModemUuid fields will be the prior configuration thus
201 // restoring the configuration to the previous value. An error
202 // returned by this command will generally be ignored or may
203 // cause that logical modem to be removed from service.
204 } RadioCapabilityPhase;
207 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
209 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
210 // capability was success with RC_PHASE_FINISH
211 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
212 // capability is fail with RC_PHASE_FINISH.
213 } RadioCapabilityStatus;
215 #define RIL_RADIO_CAPABILITY_VERSION 1
217 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
218 int session; // Unique session value defined by framework returned in all "responses/unsol"
219 int phase; // CONFIGURED, START, APPLY, FINISH
220 int rat; // RIL_RadioAccessFamily for the radio
221 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
222 int status; // Return status and an input parameter for RC_PHASE_FINISH
223 } RIL_RadioCapability;
225 // Do we want to split Data from Voice and the use
226 // RIL_RadioTechnology for get/setPreferredVoice/Data ?
228 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
229 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
230 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
231 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
232 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
233 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
234 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
235 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
236 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
237 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
238 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
239 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
240 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
241 } RIL_PreferredNetworkType;
243 /* Source for cdma subscription */
245 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
246 CDMA_SUBSCRIPTION_SOURCE_NV = 1
247 } RIL_CdmaSubscriptionSource;
249 /* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
251 RIL_UUS_TYPE1_IMPLICIT = 0,
252 RIL_UUS_TYPE1_REQUIRED = 1,
253 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
254 RIL_UUS_TYPE2_REQUIRED = 3,
255 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
256 RIL_UUS_TYPE3_REQUIRED = 5,
257 RIL_UUS_TYPE3_NOT_REQUIRED = 6
260 /* User-to-User Signaling Information data coding schemes. Possible values for
261 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
262 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
264 RIL_UUS_DCS_USP = 0, /* User specified protocol */
265 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
266 RIL_UUS_DCS_X244 = 2, /* X.244 */
267 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
268 convergence function */
269 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
272 /* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
273 * This data is passed in RIL_ExtensionRecord and rec contains this
274 * structure when type is RIL_UUS_INFO_EXT_REC */
276 RIL_UUS_Type uusType; /* UUS Type */
277 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
278 int uusLength; /* Length of UUS Data */
279 char * uusData; /* UUS Data */
282 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
284 char isPresent; /* non-zero if signal information record is present */
285 char signalType; /* as defined 3.7.5.5-1 */
286 char alertPitch; /* as defined 3.7.5.5-2 */
287 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
288 } RIL_CDMA_SignalInfoRecord;
292 int index; /* Connection Index for use with, eg, AT+CHLD */
293 int toa; /* type of address, eg 145 = intl */
294 char isMpty; /* nonzero if is mpty call */
295 char isMT; /* nonzero if call is mobile terminated */
296 char als; /* ALS line indicator if available
298 char isVoice; /* nonzero if this is is a voice call */
299 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
300 char * number; /* Remote party number */
301 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
302 char * name; /* Remote party name */
303 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
304 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
307 /* Deprecated, use RIL_Data_Call_Response_v6 */
309 int cid; /* Context ID, uniquely identifies this call */
310 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
311 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
312 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
313 char * apn; /* ignored */
314 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
315 } RIL_Data_Call_Response_v4;
318 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
319 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
322 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
323 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
324 back-off timer value RIL wants to override the one
325 pre-configured in FW.
326 The unit is miliseconds.
327 The value < 0 means no value is suggested.
328 The value 0 means retry should be done ASAP.
329 The value of INT_MAX(0x7fffffff) means no retry. */
330 int cid; /* Context ID, uniquely identifies this call */
331 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
332 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
333 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
334 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
335 such as "IP" or "IPV6" */
336 char * ifname; /* The network interface name */
337 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
338 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
339 May not be empty, typically 1 IPv4 or 1 IPv6 or
340 one of each. If the prefix length is absent the addresses
341 are assumed to be point to point with IPv4 having a prefix
342 length of 32 and IPv6 128. */
343 char * dnses; /* A space-delimited list of DNS server addresses,
344 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
346 char * gateways; /* A space-delimited list of default gateway addresses,
347 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
348 May be empty in which case the addresses represent point
349 to point connections. */
350 } RIL_Data_Call_Response_v6;
353 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
354 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
355 back-off timer value RIL wants to override the one
356 pre-configured in FW.
357 The unit is miliseconds.
358 The value < 0 means no value is suggested.
359 The value 0 means retry should be done ASAP.
360 The value of INT_MAX(0x7fffffff) means no retry. */
361 int cid; /* Context ID, uniquely identifies this call */
362 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
363 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
364 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
365 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
366 such as "IP" or "IPV6" */
367 char * ifname; /* The network interface name */
368 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
369 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
370 May not be empty, typically 1 IPv4 or 1 IPv6 or
371 one of each. If the prefix length is absent the addresses
372 are assumed to be point to point with IPv4 having a prefix
373 length of 32 and IPv6 128. */
374 char * dnses; /* A space-delimited list of DNS server addresses,
375 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
377 char * gateways; /* A space-delimited list of default gateway addresses,
378 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
379 May be empty in which case the addresses represent point
380 to point connections. */
381 char * pcscf; /* the Proxy Call State Control Function address
382 via PCO(Protocol Configuration Option) for IMS client. */
383 } RIL_Data_Call_Response_v9;
386 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
387 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
388 back-off timer value RIL wants to override the one
389 pre-configured in FW.
390 The unit is miliseconds.
391 The value < 0 means no value is suggested.
392 The value 0 means retry should be done ASAP.
393 The value of INT_MAX(0x7fffffff) means no retry. */
394 int cid; /* Context ID, uniquely identifies this call */
395 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
396 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
397 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
398 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
399 such as "IP" or "IPV6" */
400 char * ifname; /* The network interface name */
401 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
402 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
403 May not be empty, typically 1 IPv4 or 1 IPv6 or
404 one of each. If the prefix length is absent the addresses
405 are assumed to be point to point with IPv4 having a prefix
406 length of 32 and IPv6 128. */
407 char * dnses; /* A space-delimited list of DNS server addresses,
408 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
410 char * gateways; /* A space-delimited list of default gateway addresses,
411 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
412 May be empty in which case the addresses represent point
413 to point connections. */
414 char * pcscf; /* the Proxy Call State Control Function address
415 via PCO(Protocol Configuration Option) for IMS client. */
416 int mtu; /* MTU received from network
417 Value <= 0 means network has either not sent a value or
418 sent an invalid value */
419 } RIL_Data_Call_Response_v11;
422 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
423 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
424 } RIL_RadioTechnologyFamily;
427 RIL_RadioTechnologyFamily tech;
428 unsigned char retry; /* 0 == not retry, nonzero == retry */
429 int messageRef; /* Valid field if retry is set to nonzero.
430 Contains messageRef from RIL_SMS_Response
431 corresponding to failed MO SMS.
435 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
436 RIL_CDMA_SMS_Message* cdmaMessage;
438 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
441 } RIL_IMS_SMS_Message;
444 int messageRef; /* TP-Message-Reference for GSM,
445 and BearerData MessageId for CDMA
446 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
447 char *ackPDU; /* or NULL if n/a */
448 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
449 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
450 -1 if unknown or not applicable*/
453 /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
455 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
456 /* 0 = "REC UNREAD" */
458 /* 2 = "STO UNSENT" */
460 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
461 the TP-layer length is "strlen(pdu)/2". */
462 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
463 (as expected by TS 27.005) or NULL for default SMSC */
466 /** Used by RIL_REQUEST_DIAL */
470 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
471 * clir == 0 on "use subscription default value"
472 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
473 * clir == 2 on "CLIR suppression" (allow CLI presentation)
475 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
479 int command; /* one of the commands listed for TS 27.007 +CRSM*/
480 int fileid; /* EF id */
481 char *path; /* "pathid" from TS 27.007 +CRSM command.
482 Path is in hex asciii format eg "7f205f70"
483 Path must always be provided.
488 char *data; /* May be NULL*/
489 char *pin2; /* May be NULL*/
493 int command; /* one of the commands listed for TS 27.007 +CRSM*/
494 int fileid; /* EF id */
495 char *path; /* "pathid" from TS 27.007 +CRSM command.
496 Path is in hex asciii format eg "7f205f70"
497 Path must always be provided.
502 char *data; /* May be NULL*/
503 char *pin2; /* May be NULL*/
504 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
507 /* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
508 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
510 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
511 ignored for +CSIM command. */
513 /* Following fields are used to derive the APDU ("command" and "length"
514 values in TS 27.007 +CSIM and +CGLA commands). */
519 int p3; /* A negative P3 implies a 4 byte APDU. */
520 char *data; /* May be NULL. In hex string format. */
526 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
527 response for which it is in Base64 format, see 3GPP TS 31.102 7.1.2 */
528 } RIL_SIM_IO_Response;
530 /* See also com.android.internal.telephony.gsm.CallForwardInfo */
534 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
535 * status 1 = active, 0 = not active
537 * For RIL_REQUEST_SET_CALL_FORWARD:
546 int reason; /* from TS 27.007 7.11 "reason" */
547 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
548 See table for Android mapping from
550 0 means user doesn't input class */
551 int toa; /* "type" from TS 27.007 7.11 */
552 char * number; /* "number" from TS 27.007 7.11. May be NULL */
553 int timeSeconds; /* for CF no reply only */
554 }RIL_CallForwardInfo;
557 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
558 * Upper 16 bits is LAC and lower 16 bits
559 * is CID (as described in TS 27.005)
560 * Primary Scrambling Code (as described in TS 25.331)
562 * Valid values are hexadecimal 0x0000 - 0xffffffff.
564 int rssi; /* Received RSSI in GSM,
565 * Level index of CPICH Received Signal Code Power in UMTS
567 } RIL_NeighboringCell;
569 /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
571 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
572 CALL_FAIL_NORMAL = 16,
574 CALL_FAIL_CONGESTION = 34,
575 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
576 CALL_FAIL_CALL_BARRED = 240,
577 CALL_FAIL_FDN_BLOCKED = 241,
578 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
579 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
580 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
581 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
582 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
583 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
584 CALL_FAIL_CDMA_DROP = 1001,
585 CALL_FAIL_CDMA_INTERCEPT = 1002,
586 CALL_FAIL_CDMA_REORDER = 1003,
587 CALL_FAIL_CDMA_SO_REJECT = 1004,
588 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
589 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
590 CALL_FAIL_CDMA_PREEMPTED = 1007,
591 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
592 during emergency callback mode */
593 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
594 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
595 } RIL_LastCallFailCause;
597 /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
599 PDP_FAIL_NONE = 0, /* No error, connection ok */
601 /* an integer cause code defined in TS 24.008
602 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
603 If the implementation does not have access to the exact cause codes,
604 then it should return one of the following values,
605 as the UI layer needs to distinguish these
606 cases for error notification and potential retries. */
607 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
608 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
609 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
610 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
611 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
612 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
613 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
614 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
615 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
616 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
617 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
618 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
619 based on framework config */
620 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
621 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
622 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
623 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
625 /* Not mentioned in the specification */
626 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
627 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
629 /* reasons for data call drop - network/modem disconnect */
630 PDP_FAIL_SIGNAL_LOST = -3,
631 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
632 with parameters appropriate for new technology */
633 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
634 powered off - no retry */
635 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
636 mode was up on same APN/data profile - no retry until
637 tethered call is off */
639 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */
640 } RIL_DataCallFailCause;
642 /* See RIL_REQUEST_SETUP_DATA_CALL */
644 RIL_DATA_PROFILE_DEFAULT = 0,
645 RIL_DATA_PROFILE_TETHERED = 1,
646 RIL_DATA_PROFILE_IMS = 2,
647 RIL_DATA_PROFILE_FOTA = 3,
648 RIL_DATA_PROFILE_CBS = 4,
649 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
650 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
653 /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
655 int notificationType; /*
656 * 0 = MO intermediate result code
657 * 1 = MT unsolicited result code
659 int code; /* See 27.007 7.17
662 int index; /* CUG index. See 27.007 7.17. */
663 int type; /* "type" from 27.007 7.17 (MT only). */
664 char * number; /* "number" from 27.007 7.17
665 (MT only, may be NULL). */
666 } RIL_SuppSvcNotification;
668 #define RIL_CARD_MAX_APPS 8
671 RIL_CARDSTATE_ABSENT = 0,
672 RIL_CARDSTATE_PRESENT = 1,
673 RIL_CARDSTATE_ERROR = 2
677 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
678 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
679 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
680 since each app can only have 1 active perso
682 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
683 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
684 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
685 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
686 RIL_PERSOSUBSTATE_SIM_SIM = 7,
687 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
688 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
689 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
690 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
691 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
692 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
693 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
694 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
695 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
696 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
697 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
698 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
699 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
700 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
701 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
702 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
703 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
707 RIL_APPSTATE_UNKNOWN = 0,
708 RIL_APPSTATE_DETECTED = 1,
709 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
710 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
711 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
712 when app_state is assigned to this value */
713 RIL_APPSTATE_READY = 5
717 RIL_PINSTATE_UNKNOWN = 0,
718 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
719 RIL_PINSTATE_ENABLED_VERIFIED = 2,
720 RIL_PINSTATE_DISABLED = 3,
721 RIL_PINSTATE_ENABLED_BLOCKED = 4,
722 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
726 RIL_APPTYPE_UNKNOWN = 0,
728 RIL_APPTYPE_USIM = 2,
729 RIL_APPTYPE_RUIM = 3,
730 RIL_APPTYPE_CSIM = 4,
736 RIL_AppType app_type;
737 RIL_AppState app_state;
738 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
739 RIL_APPSTATE_SUBSCRIPTION_PERSO */
740 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
742 char *app_label_ptr; /* null terminated string */
743 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
748 /* Deprecated, use RIL_CardStatus_v6 */
751 RIL_CardState card_state;
752 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
753 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
754 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
755 int num_applications; /* value <= RIL_CARD_MAX_APPS */
756 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
761 RIL_CardState card_state;
762 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
763 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
764 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
765 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
766 int num_applications; /* value <= RIL_CARD_MAX_APPS */
767 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
770 /** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
771 * or as part of RIL_SimRefreshResponse_v7
774 /* A file on SIM has been updated. data[1] contains the EFID. */
776 /* SIM initialized. All files should be re-read. */
778 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
780 } RIL_SimRefreshResult;
783 RIL_SimRefreshResult result;
784 int ef_id; /* is the EFID of the updated file if the result is */
785 /* SIM_FILE_UPDATE or 0 for any other result. */
786 char * aid; /* is AID(application ID) of the card application */
787 /* See ETSI 102.221 8.1 and 101.220 4 */
788 /* For SIM_FILE_UPDATE result it can be set to AID of */
789 /* application in which updated EF resides or it can be */
790 /* NULL if EF is outside of an application. */
791 /* For SIM_INIT result this field is set to AID of */
792 /* application that caused REFRESH */
793 /* For SIM_RESET result it is NULL. */
794 } RIL_SimRefreshResponse_v7;
796 /* Deprecated, use RIL_CDMA_CallWaiting_v6 */
798 char * number; /* Remote party number */
799 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
800 char * name; /* Remote party name */
801 RIL_CDMA_SignalInfoRecord signalInfoRecord;
802 } RIL_CDMA_CallWaiting_v5;
805 char * number; /* Remote party number */
806 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
807 char * name; /* Remote party name */
808 RIL_CDMA_SignalInfoRecord signalInfoRecord;
809 /* Number type/Number plan required to support International Call Waiting */
810 int number_type; /* 0=Unknown, 1=International, 2=National,
811 3=Network specific, 4=subscriber */
812 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
813 } RIL_CDMA_CallWaiting_v6;
816 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
818 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
819 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
820 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
823 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
824 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
825 * and 9.4.4.2.3 for UMTS.
826 * All other values can be treated as empty CBM data coding scheme.
828 * selected 0 means message types specified in <fromServiceId, toServiceId>
829 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
831 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
832 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
839 unsigned char selected;
840 } RIL_GSM_BroadcastSmsConfigInfo;
842 /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
843 #define RIL_RESTRICTED_STATE_NONE 0x00
844 /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
845 #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
846 /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
847 #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
848 /* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
849 #define RIL_RESTRICTED_STATE_CS_ALL 0x04
850 /* Block packet data access due to restriction. */
851 #define RIL_RESTRICTED_STATE_PS_ALL 0x10
853 /* The status for an OTASP/OTAPA session */
855 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
856 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
857 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
858 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
859 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
860 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
861 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
862 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
863 CDMA_OTA_PROVISION_STATUS_COMMITTED,
864 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
865 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
866 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
867 } RIL_CDMA_OTA_ProvisionStatus;
870 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
871 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
872 } RIL_GW_SignalStrength;
875 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
876 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
877 } RIL_SignalStrengthWcdma;
880 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
881 * multiplied by -1. Example: If the actual RSSI is -75, then this response
884 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
885 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
888 } RIL_CDMA_SignalStrength;
892 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
893 * multiplied by -1. Example: If the actual RSSI is -75, then this response
896 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
897 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
900 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
901 } RIL_EVDO_SignalStrength;
904 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
905 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
906 * Range: 44 to 140 dBm
907 * INT_MAX: 0x7FFFFFFF denotes invalid value.
908 * Reference: 3GPP TS 36.133 9.1.4 */
909 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
911 * INT_MAX: 0x7FFFFFFF denotes invalid value.
912 * Reference: 3GPP TS 36.133 9.1.7 */
913 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
914 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
915 * INT_MAX : 0x7FFFFFFF denotes invalid value.
916 * Reference: 3GPP TS 36.101 8.1.1 */
917 int cqi; /* The current Channel Quality Indicator.
919 * INT_MAX : 0x7FFFFFFF denotes invalid value.
920 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
921 } RIL_LTE_SignalStrength;
924 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
925 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
926 * Range: 44 to 140 dBm
927 * INT_MAX: 0x7FFFFFFF denotes invalid value.
928 * Reference: 3GPP TS 36.133 9.1.4 */
929 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
931 * INT_MAX: 0x7FFFFFFF denotes invalid value.
932 * Reference: 3GPP TS 36.133 9.1.7 */
933 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
934 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
935 * INT_MAX : 0x7FFFFFFF denotes invalid value.
936 * Reference: 3GPP TS 36.101 8.1.1 */
937 int cqi; /* The current Channel Quality Indicator.
939 * INT_MAX : 0x7FFFFFFF denotes invalid value.
940 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
941 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
942 * Approximate distance can be calculated using 300m/us * timingAdvance.
943 * Range: 0 to 0x7FFFFFFE
944 * INT_MAX : 0x7FFFFFFF denotes invalid value.
945 * Reference: 3GPP 36.321 section 6.1.3.5
946 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
947 } RIL_LTE_SignalStrength_v8;
950 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
952 * INT_MAX: 0x7FFFFFFF denotes invalid value.
953 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
954 } RIL_TD_SCDMA_SignalStrength;
956 /* Deprecated, use RIL_SignalStrength_v6 */
958 RIL_GW_SignalStrength GW_SignalStrength;
959 RIL_CDMA_SignalStrength CDMA_SignalStrength;
960 RIL_EVDO_SignalStrength EVDO_SignalStrength;
961 } RIL_SignalStrength_v5;
964 RIL_GW_SignalStrength GW_SignalStrength;
965 RIL_CDMA_SignalStrength CDMA_SignalStrength;
966 RIL_EVDO_SignalStrength EVDO_SignalStrength;
967 RIL_LTE_SignalStrength LTE_SignalStrength;
968 } RIL_SignalStrength_v6;
971 RIL_GW_SignalStrength GW_SignalStrength;
972 RIL_CDMA_SignalStrength CDMA_SignalStrength;
973 RIL_EVDO_SignalStrength EVDO_SignalStrength;
974 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
975 } RIL_SignalStrength_v8;
978 RIL_GW_SignalStrength GW_SignalStrength;
979 RIL_CDMA_SignalStrength CDMA_SignalStrength;
980 RIL_EVDO_SignalStrength EVDO_SignalStrength;
981 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
982 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
983 } RIL_SignalStrength_v10;
985 /** RIL_CellIdentityGsm */
987 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
988 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
989 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
990 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
991 } RIL_CellIdentityGsm;
993 /** RIL_CellIdentityWcdma */
995 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
996 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
997 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
998 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
999 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1000 } RIL_CellIdentityWcdma;
1002 /** RIL_CellIdentityCdma */
1004 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1005 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1006 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
1007 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1008 * It is represented in units of 0.25 seconds and ranges from -2592000
1009 * to 2592000, both values inclusive (corresponding to a range of -180
1010 * to +180 degrees). INT_MAX if unknown */
1012 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1013 * It is represented in units of 0.25 seconds and ranges from -1296000
1014 * to 1296000, both values inclusive (corresponding to a range of -90
1015 * to +90 degrees). INT_MAX if unknown */
1016 } RIL_CellIdentityCdma;
1018 /** RIL_CellIdentityLte */
1020 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1021 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1022 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1023 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1024 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1025 } RIL_CellIdentityLte;
1027 /** RIL_CellIdentityTdscdma */
1029 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1030 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1031 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1032 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1033 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1034 } RIL_CellIdentityTdscdma;
1036 /** RIL_CellInfoGsm */
1038 RIL_CellIdentityGsm cellIdentityGsm;
1039 RIL_GW_SignalStrength signalStrengthGsm;
1042 /** RIL_CellInfoWcdma */
1044 RIL_CellIdentityWcdma cellIdentityWcdma;
1045 RIL_SignalStrengthWcdma signalStrengthWcdma;
1046 } RIL_CellInfoWcdma;
1048 /** RIL_CellInfoCdma */
1050 RIL_CellIdentityCdma cellIdentityCdma;
1051 RIL_CDMA_SignalStrength signalStrengthCdma;
1052 RIL_EVDO_SignalStrength signalStrengthEvdo;
1055 /** RIL_CellInfoLte */
1057 RIL_CellIdentityLte cellIdentityLte;
1058 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1061 /** RIL_CellInfoTdscdma */
1063 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1064 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1065 } RIL_CellInfoTdscdma;
1067 // Must be the same as CellInfo.TYPE_XXX
1069 RIL_CELL_INFO_TYPE_GSM = 1,
1070 RIL_CELL_INFO_TYPE_CDMA = 2,
1071 RIL_CELL_INFO_TYPE_LTE = 3,
1072 RIL_CELL_INFO_TYPE_WCDMA = 4,
1073 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
1076 // Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1078 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1079 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1080 RIL_TIMESTAMP_TYPE_MODEM = 2,
1081 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1082 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1083 } RIL_TimeStampType;
1086 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1087 int registered; /* !0 if this cell is registered 0 if not registered */
1088 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1089 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1091 RIL_CellInfoGsm gsm;
1092 RIL_CellInfoCdma cdma;
1093 RIL_CellInfoLte lte;
1094 RIL_CellInfoWcdma wcdma;
1095 RIL_CellInfoTdscdma tdscdma;
1099 /* Names of the CDMA info records (C.S0005 section 3.7.5) */
1101 RIL_CDMA_DISPLAY_INFO_REC,
1102 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1103 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1104 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1105 RIL_CDMA_SIGNAL_INFO_REC,
1106 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1107 RIL_CDMA_LINE_CONTROL_INFO_REC,
1108 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1109 RIL_CDMA_T53_CLIR_INFO_REC,
1110 RIL_CDMA_T53_RELEASE_INFO_REC,
1111 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1112 } RIL_CDMA_InfoRecName;
1114 /* Display Info Rec as defined in C.S0005 section 3.7.5.1
1115 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1116 Note: the Extended Display info rec contains multiple records of the
1117 form: display_tag, display_len, and display_len occurrences of the
1118 chari field if the display_tag is not 10000000 or 10000001.
1119 To save space, the records are stored consecutively in a byte buffer.
1120 The display_tag, display_len and chari fields are all 1 byte.
1125 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
1126 } RIL_CDMA_DisplayInfoRecord;
1128 /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1129 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1130 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1135 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
1140 } RIL_CDMA_NumberInfoRecord;
1142 /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1144 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1145 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1146 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1147 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1148 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1149 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1150 RIL_REDIRECTING_REASON_RESERVED
1151 } RIL_CDMA_RedirectingReason;
1154 RIL_CDMA_NumberInfoRecord redirectingNumber;
1155 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1156 RIL_CDMA_RedirectingReason redirectingReason;
1157 } RIL_CDMA_RedirectingNumberInfoRecord;
1159 /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1161 char lineCtrlPolarityIncluded;
1162 char lineCtrlToggle;
1163 char lineCtrlReverse;
1164 char lineCtrlPowerDenial;
1165 } RIL_CDMA_LineControlInfoRecord;
1167 /* T53 CLIR Information Record */
1170 } RIL_CDMA_T53_CLIRInfoRecord;
1172 /* T53 Audio Control Information Record */
1176 } RIL_CDMA_T53_AudioControlInfoRecord;
1180 RIL_CDMA_InfoRecName name;
1183 /* Display and Extended Display Info Rec */
1184 RIL_CDMA_DisplayInfoRecord display;
1186 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1187 RIL_CDMA_NumberInfoRecord number;
1189 /* Signal Info Rec */
1190 RIL_CDMA_SignalInfoRecord signal;
1192 /* Redirecting Number Info Rec */
1193 RIL_CDMA_RedirectingNumberInfoRecord redir;
1195 /* Line Control Info Rec */
1196 RIL_CDMA_LineControlInfoRecord lineCtrl;
1198 /* T53 CLIR Info Rec */
1199 RIL_CDMA_T53_CLIRInfoRecord clir;
1201 /* T53 Audio Control Info Rec */
1202 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1204 } RIL_CDMA_InformationRecord;
1206 #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1209 char numberOfInfoRecs;
1210 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1211 } RIL_CDMA_InformationRecords;
1213 /* See RIL_REQUEST_NV_READ_ITEM */
1218 /* See RIL_REQUEST_NV_WRITE_ITEM */
1225 HANDOVER_STARTED = 0,
1226 HANDOVER_COMPLETED = 1,
1227 HANDOVER_FAILED = 2,
1228 HANDOVER_CANCELED = 3
1231 /* hardware configuration reported to RILJ. */
1233 RIL_HARDWARE_CONFIG_MODEM = 0,
1234 RIL_HARDWARE_CONFIG_SIM = 1,
1235 } RIL_HardwareConfig_Type;
1238 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1239 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1240 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1241 } RIL_HardwareConfig_State;
1245 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1249 } RIL_HardwareConfig_Modem;
1252 char modemUuid[MAX_UUID_LENGTH];
1253 } RIL_HardwareConfig_Sim;
1256 RIL_HardwareConfig_Type type;
1257 char uuid[MAX_UUID_LENGTH];
1258 RIL_HardwareConfig_State state;
1260 RIL_HardwareConfig_Modem modem;
1261 RIL_HardwareConfig_Sim sim;
1263 } RIL_HardwareConfig;
1269 SS_CF_NOT_REACHABLE,
1271 SS_CF_ALL_CONDITIONAL,
1283 SS_OUTGOING_BARRING,
1285 } RIL_SsServiceType;
1293 } RIL_SsRequestType;
1296 SS_ALL_TELE_AND_BEARER_SERVICES,
1299 SS_ALL_DATA_TELESERVICES,
1301 SS_ALL_TELESERVICES_EXCEPT_SMS
1302 } RIL_SsTeleserviceType;
1304 #define SS_INFO_MAX 4
1305 #define NUM_SERVICE_CLASSES 7
1308 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1309 For example if voice is forwarded to one number and data
1310 is forwarded to a different one then numValidIndexes will be
1311 2 indicating total number of valid values in cfInfo.
1312 Similarly if all the services are forwarded to the same
1313 number then the value of numValidIndexes will be 1. */
1315 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1316 for SS request to query call
1318 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1322 RIL_SsServiceType serviceType;
1323 RIL_SsRequestType requestType;
1324 RIL_SsTeleserviceType teleserviceType;
1329 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1330 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1331 two ints, so first two values of ssInfo[] will be
1332 used for response if serviceType is SS_CLIR and
1333 requestType is SS_INTERROGATION */
1337 } RIL_StkCcUnsolSsResponse;
1340 * Data connection power state
1343 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1344 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1345 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1346 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1347 } RIL_DcPowerStates;
1350 * Data connection real time info
1353 uint64_t time; // Time in nanos as returned by ril_nano_time
1354 RIL_DcPowerStates powerState; // Current power state
1358 * Data profile to modem
1361 /* id of the data profile */
1363 /* the APN to connect to */
1365 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1366 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1369 /** authentication protocol used for this PDP context
1370 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1373 /* the username for APN, or NULL */
1375 /* the password for APN, or NULL */
1377 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1379 /* the period in seconds to limit the maximum connections */
1381 /* the maximum connections during maxConnsTime */
1383 /** the required wait time in seconds after a successful UE initiated
1384 * disconnect of a given PDN connection before the device can send
1385 * a new PDN connection request for that given PDN
1388 /* true to enable the profile, 0 to disable, 1 to enable */
1390 } RIL_DataProfileInfo;
1393 * RIL_REQUEST_GET_SIM_STATUS
1395 * Requests status of the SIM interface and the SIM card
1399 * "response" is const RIL_CardStatus_v6 *
1404 #define RIL_REQUEST_GET_SIM_STATUS 1
1407 * RIL_REQUEST_ENTER_SIM_PIN
1409 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
1411 * "data" is const char **
1412 * ((const char **)data)[0] is PIN value
1413 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1415 * "response" is int *
1416 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1421 * RADIO_NOT_AVAILABLE (radio resetting)
1423 * PASSWORD_INCORRECT
1426 #define RIL_REQUEST_ENTER_SIM_PIN 2
1429 * RIL_REQUEST_ENTER_SIM_PUK
1431 * Supplies SIM PUK and new PIN.
1433 * "data" is const char **
1434 * ((const char **)data)[0] is PUK value
1435 * ((const char **)data)[1] is new PIN value
1436 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1438 * "response" is int *
1439 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1444 * RADIO_NOT_AVAILABLE (radio resetting)
1446 * PASSWORD_INCORRECT
1450 #define RIL_REQUEST_ENTER_SIM_PUK 3
1453 * RIL_REQUEST_ENTER_SIM_PIN2
1455 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
1456 * returned as a a failure from a previous operation.
1458 * "data" is const char **
1459 * ((const char **)data)[0] is PIN2 value
1460 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1462 * "response" is int *
1463 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1468 * RADIO_NOT_AVAILABLE (radio resetting)
1470 * PASSWORD_INCORRECT
1473 #define RIL_REQUEST_ENTER_SIM_PIN2 4
1476 * RIL_REQUEST_ENTER_SIM_PUK2
1478 * Supplies SIM PUK2 and new PIN2.
1480 * "data" is const char **
1481 * ((const char **)data)[0] is PUK2 value
1482 * ((const char **)data)[1] is new PIN2 value
1483 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1485 * "response" is int *
1486 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1491 * RADIO_NOT_AVAILABLE (radio resetting)
1493 * PASSWORD_INCORRECT
1497 #define RIL_REQUEST_ENTER_SIM_PUK2 5
1500 * RIL_REQUEST_CHANGE_SIM_PIN
1502 * Supplies old SIM PIN and new PIN.
1504 * "data" is const char **
1505 * ((const char **)data)[0] is old PIN value
1506 * ((const char **)data)[1] is new PIN value
1507 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1509 * "response" is int *
1510 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1515 * RADIO_NOT_AVAILABLE (radio resetting)
1517 * PASSWORD_INCORRECT
1518 * (old PIN is invalid)
1522 #define RIL_REQUEST_CHANGE_SIM_PIN 6
1526 * RIL_REQUEST_CHANGE_SIM_PIN2
1528 * Supplies old SIM PIN2 and new PIN2.
1530 * "data" is const char **
1531 * ((const char **)data)[0] is old PIN2 value
1532 * ((const char **)data)[1] is new PIN2 value
1533 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1535 * "response" is int *
1536 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1541 * RADIO_NOT_AVAILABLE (radio resetting)
1543 * PASSWORD_INCORRECT
1544 * (old PIN2 is invalid)
1548 #define RIL_REQUEST_CHANGE_SIM_PIN2 7
1551 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
1553 * Requests that network personlization be deactivated
1555 * "data" is const char **
1556 * ((const char **)(data))[0]] is network depersonlization code
1558 * "response" is int *
1559 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1564 * RADIO_NOT_AVAILABLE (radio resetting)
1566 * PASSWORD_INCORRECT
1570 #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
1573 * RIL_REQUEST_GET_CURRENT_CALLS
1575 * Requests current call list
1579 * "response" must be a "const RIL_Call **"
1584 * RADIO_NOT_AVAILABLE (radio resetting)
1586 * (request will be made again in a few hundred msec)
1589 #define RIL_REQUEST_GET_CURRENT_CALLS 9
1595 * Initiate voice call
1597 * "data" is const RIL_Dial *
1598 * "response" is NULL
1600 * This method is never used for supplementary service codes
1604 * RADIO_NOT_AVAILABLE (radio resetting)
1605 * DIAL_MODIFIED_TO_USSD
1606 * DIAL_MODIFIED_TO_SS
1607 * DIAL_MODIFIED_TO_DIAL
1610 #define RIL_REQUEST_DIAL 10
1613 * RIL_REQUEST_GET_IMSI
1617 * Only valid when radio state is "RADIO_STATE_ON"
1619 * "data" is const char **
1620 * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1621 * "response" is a const char * containing the IMSI
1625 * RADIO_NOT_AVAILABLE (radio resetting)
1629 #define RIL_REQUEST_GET_IMSI 11
1632 * RIL_REQUEST_HANGUP
1634 * Hang up a specific line (like AT+CHLD=1x)
1636 * After this HANGUP request returns, RIL should show the connection is NOT
1637 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1639 * "data" is an int *
1640 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
1642 * "response" is NULL
1646 * RADIO_NOT_AVAILABLE (radio resetting)
1650 #define RIL_REQUEST_HANGUP 12
1653 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
1655 * Hang up waiting or held (like AT+CHLD=0)
1657 * After this HANGUP request returns, RIL should show the connection is NOT
1658 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1661 * "response" is NULL
1665 * RADIO_NOT_AVAILABLE (radio resetting)
1669 #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
1672 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
1674 * Hang up waiting or held (like AT+CHLD=1)
1676 * After this HANGUP request returns, RIL should show the connection is NOT
1677 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1680 * "response" is NULL
1684 * RADIO_NOT_AVAILABLE (radio resetting)
1688 #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
1691 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
1693 * Switch waiting or holding call and active call (like AT+CHLD=2)
1695 * State transitions should be is follows:
1697 * If call 1 is waiting and call 2 is active, then if this re
1700 * Call 1 Call 2 Call 1 Call 2
1701 * ACTIVE HOLDING HOLDING ACTIVE
1702 * ACTIVE WAITING HOLDING ACTIVE
1703 * HOLDING WAITING HOLDING ACTIVE
1704 * ACTIVE IDLE HOLDING IDLE
1705 * IDLE IDLE IDLE IDLE
1708 * "response" is NULL
1712 * RADIO_NOT_AVAILABLE (radio resetting)
1716 #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
1717 #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
1720 * RIL_REQUEST_CONFERENCE
1722 * Conference holding and active (like AT+CHLD=3)
1725 * "response" is NULL
1729 * RADIO_NOT_AVAILABLE (radio resetting)
1732 #define RIL_REQUEST_CONFERENCE 16
1737 * Send UDUB (user determined used busy) to ringing or
1738 * waiting call answer)(RIL_BasicRequest r);
1741 * "response" is NULL
1745 * RADIO_NOT_AVAILABLE (radio resetting)
1748 #define RIL_REQUEST_UDUB 17
1751 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1753 * Requests the failure cause code for the most recently terminated call
1756 * "response" is a "int *"
1757 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
1758 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
1759 * failure reasons are derived from the possible call failure scenarios
1760 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
1762 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
1763 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
1765 * If the implementation does not have access to the exact cause codes,
1766 * then it should return one of the values listed in RIL_LastCallFailCause,
1767 * as the UI layer needs to distinguish these cases for tone generation or
1768 * error notification.
1772 * RADIO_NOT_AVAILABLE
1775 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
1777 #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
1780 * RIL_REQUEST_SIGNAL_STRENGTH
1782 * Requests current signal strength and associated information
1784 * Must succeed if radio is on.
1788 * "response" is a const RIL_SignalStrength *
1792 * RADIO_NOT_AVAILABLE
1794 #define RIL_REQUEST_SIGNAL_STRENGTH 19
1797 * RIL_REQUEST_VOICE_REGISTRATION_STATE
1799 * Request current registration state
1802 * "response" is a "char **"
1803 * ((const char **)response)[0] is registration state 0-6,
1804 * 0 - Not registered, MT is not currently searching
1805 * a new operator to register
1806 * 1 - Registered, home network
1807 * 2 - Not registered, but MT is currently searching
1808 * a new operator to register
1809 * 3 - Registration denied
1811 * 5 - Registered, roaming
1812 * 10 - Same as 0, but indicates that emergency calls
1814 * 12 - Same as 2, but indicates that emergency calls
1816 * 13 - Same as 3, but indicates that emergency calls
1818 * 14 - Same as 4, but indicates that emergency calls
1821 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1822 * NULL if not.Valid LAC are 0x0000 - 0xffff
1823 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1825 * Valid CID are 0x00000000 - 0xffffffff
1826 * In GSM, CID is Cell ID (see TS 27.007)
1828 * In UMTS, CID is UMTS Cell Identity
1829 * (see TS 25.331) in 28 bits
1830 * ((const char **)response)[3] indicates the available voice radio technology,
1831 * valid values as defined by RIL_RadioTechnology.
1832 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1833 * system or NULL if not. Base Station ID in
1835 * ((const char **)response)[5] is Base Station latitude if registered on a
1836 * CDMA system or NULL if not. Base Station
1837 * latitude is a decimal number as specified in
1838 * 3GPP2 C.S0005-A v6.0. It is represented in
1839 * units of 0.25 seconds and ranges from -1296000
1840 * to 1296000, both values inclusive (corresponding
1841 * to a range of -90 to +90 degrees).
1842 * ((const char **)response)[6] is Base Station longitude if registered on a
1843 * CDMA system or NULL if not. Base Station
1844 * longitude is a decimal number as specified in
1845 * 3GPP2 C.S0005-A v6.0. It is represented in
1846 * units of 0.25 seconds and ranges from -2592000
1847 * to 2592000, both values inclusive (corresponding
1848 * to a range of -180 to +180 degrees).
1849 * ((const char **)response)[7] is concurrent services support indicator if
1850 * registered on a CDMA system 0-1.
1851 * 0 - Concurrent services not supported,
1852 * 1 - Concurrent services supported
1853 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1854 * NULL if not. Valid System ID are 0 - 32767
1855 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1856 * NULL if not. Valid System ID are 0 - 65535
1857 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
1858 * on a CDMA or EVDO system or NULL if not. Valid values
1860 * ((const char **)response)[11] indicates whether the current system is in the
1861 * PRL if registered on a CDMA or EVDO system or NULL if
1862 * not. 0=not in the PRL, 1=in the PRL
1863 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
1864 * if registered on a CDMA or EVDO system or NULL if not.
1865 * Valid values are 0-255.
1866 * ((const char **)response)[13] if registration state is 3 (Registration
1867 * denied) this is an enumerated reason why
1868 * registration was denied. See 3GPP TS 24.008,
1869 * 10.5.3.6 and Annex G.
1871 * 1 - Authentication Failure
1872 * 2 - IMSI unknown in HLR
1875 * 5 - PLMN not allowed
1876 * 6 - Location area not allowed
1877 * 7 - Roaming not allowed
1878 * 8 - No Suitable Cells in this Location Area
1879 * 9 - Network failure
1880 * 10 - Persistent location update reject
1881 * 11 - PLMN not allowed
1882 * 12 - Location area not allowed
1883 * 13 - Roaming not allowed in this Location Area
1884 * 15 - No Suitable Cells in this Location Area
1885 * 17 - Network Failure
1889 * 23 - GSM Authentication unacceptable
1890 * 25 - Not Authorized for this CSG
1891 * 32 - Service option not supported
1892 * 33 - Requested service option not subscribed
1893 * 34 - Service option temporarily out of order
1894 * 38 - Call cannot be identified
1895 * 48-63 - Retry upon entry into a new cell
1896 * 95 - Semantically incorrect message
1897 * 96 - Invalid mandatory information
1898 * 97 - Message type non-existent or not implemented
1899 * 98 - Message not compatible with protocol state
1900 * 99 - Information element non-existent or not implemented
1901 * 100 - Conditional IE error
1902 * 101 - Message not compatible with protocol state
1903 * 111 - Protocol error, unspecified
1904 * ((const char **)response)[14] is the Primary Scrambling Code of the current
1905 * cell as described in TS 25.331, in hexadecimal
1906 * format, or NULL if unknown or not registered
1907 * to a UMTS network.
1909 * Please note that registration state 4 ("unknown") is treated
1910 * as "out of service" in the Android telephony system
1912 * Registration state 3 can be returned if Location Update Reject
1913 * (with cause 17 - Network Failure) is received repeatedly from the network,
1914 * to facilitate "managed roaming"
1918 * RADIO_NOT_AVAILABLE
1921 #define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
1924 * RIL_REQUEST_DATA_REGISTRATION_STATE
1926 * Request current DATA registration state
1929 * "response" is a "char **"
1930 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG
1931 * ((const char **)response)[1] is LAC if registered or NULL if not
1932 * ((const char **)response)[2] is CID if registered or NULL if not
1933 * ((const char **)response)[3] indicates the available data radio technology,
1934 * valid values as defined by RIL_RadioTechnology.
1935 * ((const char **)response)[4] if registration state is 3 (Registration
1936 * denied) this is an enumerated reason why
1937 * registration was denied. See 3GPP TS 24.008,
1938 * Annex G.6 "Additonal cause codes for GMM".
1939 * 7 == GPRS services not allowed
1940 * 8 == GPRS services and non-GPRS services not allowed
1941 * 9 == MS identity cannot be derived by the network
1942 * 10 == Implicitly detached
1943 * 14 == GPRS services not allowed in this PLMN
1944 * 16 == MSC temporarily not reachable
1945 * 40 == No PDP context activated
1946 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
1947 * established using RIL_REQUEST_SETUP_DATA_CALL.
1949 * The values at offsets 6..10 are optional LTE location information in decimal.
1950 * If a value is unknown that value may be NULL. If all values are NULL,
1951 * none need to be present.
1952 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
1953 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
1954 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
1955 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
1956 * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
1958 * LAC and CID are in hexadecimal format.
1959 * valid LAC are 0x0000 - 0xffff
1960 * valid CID are 0x00000000 - 0x0fffffff
1962 * Please note that registration state 4 ("unknown") is treated
1963 * as "out of service" in the Android telephony system
1967 * RADIO_NOT_AVAILABLE
1970 #define RIL_REQUEST_DATA_REGISTRATION_STATE 21
1973 * RIL_REQUEST_OPERATOR
1975 * Request current operator ONS or EONS
1978 * "response" is a "const char **"
1979 * ((const char **)response)[0] is long alpha ONS or EONS
1980 * or NULL if unregistered
1982 * ((const char **)response)[1] is short alpha ONS or EONS
1983 * or NULL if unregistered
1984 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1985 * or NULL if unregistered
1989 * RADIO_NOT_AVAILABLE
1992 #define RIL_REQUEST_OPERATOR 22
1995 * RIL_REQUEST_RADIO_POWER
1997 * Toggle radio on and off (for "airplane" mode)
1998 * If the radio is is turned off/on the radio modem subsystem
1999 * is expected return to an initialized state. For instance,
2000 * any voice and data calls will be terminated and all associated
2004 * ((int *)data)[0] is > 0 for "Radio On"
2005 * ((int *)data)[0] is == 0 for "Radio Off"
2007 * "response" is NULL
2009 * Turn radio on if "on" > 0
2010 * Turn radio off if "on" == 0
2014 * RADIO_NOT_AVAILABLE
2017 #define RIL_REQUEST_RADIO_POWER 23
2024 * If the implementation is currently playing a tone requested via
2025 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2026 * should be played instead
2028 * "data" is a char * containing a single character with one of 12 values: 0-9,*,#
2029 * "response" is NULL
2031 * FIXME should this block/mute microphone?
2032 * How does this interact with local DTMF feedback?
2036 * RADIO_NOT_AVAILABLE
2039 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2042 #define RIL_REQUEST_DTMF 24
2045 * RIL_REQUEST_SEND_SMS
2047 * Send an SMS message
2049 * "data" is const char **
2050 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2051 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2052 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2053 * less the SMSC address
2054 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2056 * "response" is a const RIL_SMS_Response *
2058 * Based on the return error, caller decides to resend if sending sms
2059 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
2060 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2064 * RADIO_NOT_AVAILABLE
2065 * SMS_SEND_FAIL_RETRY
2069 * FIXME how do we specify TP-Message-Reference if we need to resend?
2071 #define RIL_REQUEST_SEND_SMS 25
2075 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
2077 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2078 * except that more messages are expected to be sent soon. If possible,
2079 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2081 * "data" is const char **
2082 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2083 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2084 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2085 * less the SMSC address
2086 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2088 * "response" is a const RIL_SMS_Response *
2090 * Based on the return error, caller decides to resend if sending sms
2091 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
2092 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2096 * RADIO_NOT_AVAILABLE
2097 * SMS_SEND_FAIL_RETRY
2101 #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2105 * RIL_REQUEST_SETUP_DATA_CALL
2107 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2108 * return success it is added to the list of data calls and a
2109 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2110 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2111 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2112 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
2114 * The RIL is expected to:
2115 * - Create one data call context.
2116 * - Create and configure a dedicated interface for the context
2117 * - The interface must be point to point.
2118 * - The interface is configured with one or more addresses and
2119 * is capable of sending and receiving packets. The prefix length
2120 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2121 * - Must NOT change the linux routing table.
2122 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
2123 * number of simultaneous data call contexts.
2125 * "data" is a const char **
2126 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2127 * for values above 2 this is RIL_RadioTechnology + 2.
2128 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
2129 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
2130 * override the one in the profile. NULL indicates no APN overrride.
2131 * ((const char **)data)[3] is the username for APN, or NULL
2132 * ((const char **)data)[4] is the password for APN, or NULL
2133 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2134 * 0 => PAP and CHAP is never performed.
2135 * 1 => PAP may be performed; CHAP is never performed.
2136 * 2 => CHAP may be performed; PAP is never performed.
2137 * 3 => PAP / CHAP may be performed - baseband dependent.
2138 * ((const char **)data)[6] is the connection type to request must be one of the
2139 * PDP_type values in TS 27.007 section 10.1.1.
2140 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
2141 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
2143 * "response" is a RIL_Data_Call_Response_v11
2145 * FIXME may need way to configure QoS settings
2148 * SUCCESS should be returned on both success and failure of setup with
2149 * the RIL_Data_Call_Response_v6.status containing the actual status.
2150 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
2152 * Other errors could include:
2153 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2154 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
2156 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
2158 #define RIL_REQUEST_SETUP_DATA_CALL 27
2162 * RIL_REQUEST_SIM_IO
2164 * Request SIM I/O operation.
2165 * This is similar to the TS 27.007 "restricted SIM" operation
2166 * where it assumes all of the EF selection will be done by the
2169 * "data" is a const RIL_SIM_IO_v6 *
2170 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2171 * or may specify a PIN2 for operations that require a PIN2 (eg
2172 * updating FDN records)
2174 * "response" is a const RIL_SIM_IO_Response *
2176 * Arguments and responses that are unused for certain
2177 * values of "command" should be ignored or set to NULL
2181 * RADIO_NOT_AVAILABLE
2186 #define RIL_REQUEST_SIM_IO 28
2189 * RIL_REQUEST_SEND_USSD
2191 * Send a USSD message
2193 * If a USSD session already exists, the message should be sent in the
2194 * context of that session. Otherwise, a new session should be created.
2196 * The network reply should be reported via RIL_UNSOL_ON_USSD
2198 * Only one USSD session may exist at a time, and the session is assumed
2200 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2201 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2202 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2204 * "data" is a const char * containing the USSD request in UTF-8 format
2205 * "response" is NULL
2209 * RADIO_NOT_AVAILABLE
2211 * USSD_MODIFIED_TO_DIAL
2212 * USSD_MODIFIED_TO_SS
2213 * USSD_MODIFIED_TO_USSD
2216 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2219 #define RIL_REQUEST_SEND_USSD 29
2222 * RIL_REQUEST_CANCEL_USSD
2224 * Cancel the current USSD session if one exists
2227 * "response" is NULL
2231 * RADIO_NOT_AVAILABLE
2235 #define RIL_REQUEST_CANCEL_USSD 30
2238 * RIL_REQUEST_GET_CLIR
2240 * Gets current CLIR status
2242 * "response" is int *
2243 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2244 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2248 * RADIO_NOT_AVAILABLE
2249 * SS_MODIFIED_TO_DIAL
2250 * SS_MODIFIED_TO_USSD
2254 #define RIL_REQUEST_GET_CLIR 31
2257 * RIL_REQUEST_SET_CLIR
2260 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2262 * "response" is NULL
2266 * RADIO_NOT_AVAILABLE
2267 * SS_MODIFIED_TO_DIAL
2268 * SS_MODIFIED_TO_USSD
2272 #define RIL_REQUEST_SET_CLIR 32
2275 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2277 * "data" is const RIL_CallForwardInfo *
2279 * "response" is const RIL_CallForwardInfo **
2280 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2281 * each distinct registered phone number.
2283 * For example, if data is forwarded to +18005551212 and voice is forwarded
2284 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
2286 * If, however, both data and voice are forwarded to +18005551212, then
2287 * a single RIL_CallForwardInfo can be returned with the service class
2288 * set to "data + voice = 3")
2292 * RADIO_NOT_AVAILABLE
2293 * SS_MODIFIED_TO_DIAL
2294 * SS_MODIFIED_TO_USSD
2298 #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2302 * RIL_REQUEST_SET_CALL_FORWARD
2304 * Configure call forward rule
2306 * "data" is const RIL_CallForwardInfo *
2307 * "response" is NULL
2311 * RADIO_NOT_AVAILABLE
2312 * SS_MODIFIED_TO_DIAL
2313 * SS_MODIFIED_TO_USSD
2317 #define RIL_REQUEST_SET_CALL_FORWARD 34
2321 * RIL_REQUEST_QUERY_CALL_WAITING
2323 * Query current call waiting state
2325 * "data" is const int *
2326 * ((const int *)data)[0] is the TS 27.007 service class to query.
2327 * "response" is a const int *
2328 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2330 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2331 * must follow, with the TS 27.007 service class bit vector of services
2332 * for which call waiting is enabled.
2334 * For example, if ((const int *)response)[0] is 1 and
2335 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2336 * and voice and disabled for everything else
2340 * RADIO_NOT_AVAILABLE
2341 * SS_MODIFIED_TO_DIAL
2342 * SS_MODIFIED_TO_USSD
2346 #define RIL_REQUEST_QUERY_CALL_WAITING 35
2350 * RIL_REQUEST_SET_CALL_WAITING
2352 * Configure current call waiting state
2354 * "data" is const int *
2355 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2356 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2357 * services to modify
2358 * "response" is NULL
2362 * RADIO_NOT_AVAILABLE
2363 * SS_MODIFIED_TO_DIAL
2364 * SS_MODIFIED_TO_USSD
2368 #define RIL_REQUEST_SET_CALL_WAITING 36
2371 * RIL_REQUEST_SMS_ACKNOWLEDGE
2373 * Acknowledge successful or failed receipt of SMS previously indicated
2374 * via RIL_UNSOL_RESPONSE_NEW_SMS
2377 * ((int *)data)[0] is 1 on successful receipt
2378 * (basically, AT+CNMA=1 from TS 27.005
2379 * is 0 on failed receipt
2380 * (basically, AT+CNMA=2 from TS 27.005)
2381 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
2382 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
2383 * capacity exceeded) and 0xFF (unspecified error) are
2386 * "response" is NULL
2388 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
2392 * RADIO_NOT_AVAILABLE
2395 #define RIL_REQUEST_SMS_ACKNOWLEDGE 37
2398 * RIL_REQUEST_GET_IMEI - DEPRECATED
2400 * Get the device IMEI, including check digit
2402 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
2403 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2406 * "response" is a const char * containing the IMEI
2410 * RADIO_NOT_AVAILABLE (radio resetting)
2414 #define RIL_REQUEST_GET_IMEI 38
2417 * RIL_REQUEST_GET_IMEISV - DEPRECATED
2419 * Get the device IMEISV, which should be two decimal digits
2421 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
2422 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2425 * "response" is a const char * containing the IMEISV
2429 * RADIO_NOT_AVAILABLE (radio resetting)
2433 #define RIL_REQUEST_GET_IMEISV 39
2437 * RIL_REQUEST_ANSWER
2439 * Answer incoming call
2441 * Will not be called for WAITING calls.
2442 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
2446 * "response" is NULL
2450 * RADIO_NOT_AVAILABLE (radio resetting)
2454 #define RIL_REQUEST_ANSWER 40
2457 * RIL_REQUEST_DEACTIVATE_DATA_CALL
2459 * Deactivate packet data connection and remove from the
2460 * data call list if SUCCESS is returned. Any other return
2461 * values should also try to remove the call from the list,
2462 * but that may not be possible. In any event a
2463 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
2464 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
2465 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
2467 * "data" is const char **
2468 * ((char**)data)[0] indicating CID
2469 * ((char**)data)[1] indicating Disconnect Reason
2470 * 0 => No specific reason specified
2471 * 1 => Radio shutdown requested
2473 * "response" is NULL
2477 * RADIO_NOT_AVAILABLE
2480 * See also: RIL_REQUEST_SETUP_DATA_CALL
2482 #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
2485 * RIL_REQUEST_QUERY_FACILITY_LOCK
2487 * Query the status of a facility lock state
2489 * "data" is const char **
2490 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
2491 * (eg "AO" for BAOC, "SC" for SIM lock)
2492 * ((const char **)data)[1] is the password, or "" if not required
2493 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
2495 * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2496 * This is only applicable in the case of Fixed Dialing Numbers
2499 * "response" is an int *
2500 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
2501 * services for which the specified barring facility
2502 * is active. "0" means "disabled for all"
2507 * RADIO_NOT_AVAILABLE
2508 * SS_MODIFIED_TO_DIAL
2509 * SS_MODIFIED_TO_USSD
2514 #define RIL_REQUEST_QUERY_FACILITY_LOCK 42
2517 * RIL_REQUEST_SET_FACILITY_LOCK
2519 * Enable/disable one facility lock
2521 * "data" is const char **
2523 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2524 * (eg "AO" for BAOC)
2525 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
2526 * ((const char **)data)[2] = password
2527 * ((const char **)data)[3] = string representation of decimal TS 27.007
2528 * service class bit vector. Eg, the string
2529 * "1" means "set this facility for voice services"
2530 * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2531 * This is only applicable in the case of Fixed Dialing Numbers
2534 * "response" is int *
2535 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2539 * RADIO_NOT_AVAILABLE
2540 * SS_MODIFIED_TO_DIAL
2541 * SS_MODIFIED_TO_USSD
2546 #define RIL_REQUEST_SET_FACILITY_LOCK 43
2549 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
2551 * Change call barring facility password
2553 * "data" is const char **
2555 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2556 * (eg "AO" for BAOC)
2557 * ((const char **)data)[1] = old password
2558 * ((const char **)data)[2] = new password
2560 * "response" is NULL
2564 * RADIO_NOT_AVAILABLE
2565 * SS_MODIFIED_TO_DIAL
2566 * SS_MODIFIED_TO_USSD
2571 #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
2574 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
2576 * Query current network selectin mode
2580 * "response" is int *
2581 * ((const int *)response)[0] is
2582 * 0 for automatic selection
2583 * 1 for manual selection
2587 * RADIO_NOT_AVAILABLE
2591 #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
2594 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
2596 * Specify that the network should be selected automatically
2599 * "response" is NULL
2601 * This request must not respond until the new operator is selected
2606 * RADIO_NOT_AVAILABLE
2610 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2611 * no retries needed, such as illegal SIM or ME.
2612 * Returns GENERIC_FAILURE for all other causes that might be
2616 #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
2619 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
2621 * Manually select a specified network.
2623 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
2624 * "response" is NULL
2626 * This request must not respond until the new operator is selected
2631 * RADIO_NOT_AVAILABLE
2635 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2636 * no retries needed, such as illegal SIM or ME.
2637 * Returns GENERIC_FAILURE for all other causes that might be
2641 #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
2644 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
2646 * Scans for available networks
2649 * "response" is const char ** that should be an array of n*4 strings, where
2650 * n is the number of available networks
2651 * For each available network:
2653 * ((const char **)response)[n+0] is long alpha ONS or EONS
2654 * ((const char **)response)[n+1] is short alpha ONS or EONS
2655 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
2656 * ((const char **)response)[n+3] is a string value of the status:
2662 * This request must not respond until the new operator is selected
2667 * RADIO_NOT_AVAILABLE
2671 #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
2674 * RIL_REQUEST_DTMF_START
2676 * Start playing a DTMF tone. Continue playing DTMF tone until
2677 * RIL_REQUEST_DTMF_STOP is received
2679 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
2680 * it should cancel the previous tone and play the new one.
2682 * "data" is a char *
2683 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
2684 * "response" is NULL
2688 * RADIO_NOT_AVAILABLE
2691 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
2693 #define RIL_REQUEST_DTMF_START 49
2696 * RIL_REQUEST_DTMF_STOP
2698 * Stop playing a currently playing DTMF tone.
2701 * "response" is NULL
2705 * RADIO_NOT_AVAILABLE
2708 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
2710 #define RIL_REQUEST_DTMF_STOP 50
2713 * RIL_REQUEST_BASEBAND_VERSION
2715 * Return string value indicating baseband version, eg
2716 * response from AT+CGMR
2719 * "response" is const char * containing version string for log reporting
2723 * RADIO_NOT_AVAILABLE
2727 #define RIL_REQUEST_BASEBAND_VERSION 51
2730 * RIL_REQUEST_SEPARATE_CONNECTION
2732 * Separate a party from a multiparty call placing the multiparty call
2733 * (less the specified party) on hold and leaving the specified party
2734 * as the only other member of the current (active) call
2738 * See TS 22.084 1.3.8.2 (iii)
2739 * TS 22.030 6.5.5 "Entering "2X followed by send"
2740 * TS 27.007 "AT+CHLD=2x"
2742 * "data" is an int *
2743 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
2745 * "response" is NULL
2749 * RADIO_NOT_AVAILABLE (radio resetting)
2752 #define RIL_REQUEST_SEPARATE_CONNECTION 52
2756 * RIL_REQUEST_SET_MUTE
2758 * Turn on or off uplink (microphone) mute.
2760 * Will only be sent while voice call is active.
2761 * Will always be reset to "disable mute" when a new voice call is initiated
2763 * "data" is an int *
2764 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
2766 * "response" is NULL
2770 * RADIO_NOT_AVAILABLE (radio resetting)
2774 #define RIL_REQUEST_SET_MUTE 53
2777 * RIL_REQUEST_GET_MUTE
2779 * Queries the current state of the uplink mute setting
2782 * "response" is an int *
2783 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
2787 * RADIO_NOT_AVAILABLE (radio resetting)
2788 * SS_MODIFIED_TO_DIAL
2789 * SS_MODIFIED_TO_USSD
2794 #define RIL_REQUEST_GET_MUTE 54
2797 * RIL_REQUEST_QUERY_CLIP
2799 * Queries the status of the CLIP supplementary service
2801 * (for MMI code "*#30#")
2804 * "response" is an int *
2805 * (int *)response)[0] is 1 for "CLIP provisioned"
2806 * and 0 for "CLIP not provisioned"
2807 * and 2 for "unknown, e.g. no network etc"
2811 * RADIO_NOT_AVAILABLE (radio resetting)
2815 #define RIL_REQUEST_QUERY_CLIP 55
2818 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
2819 * field in RIL_Data_Call_Response_v6.
2821 * Requests the failure cause code for the most recently failed PDP
2822 * context or CDMA data connection active
2823 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
2827 * "response" is a "int *"
2828 * ((int *)response)[0] is an integer cause code defined in TS 24.008
2829 * section 6.1.3.1.3 or close approximation
2831 * If the implementation does not have access to the exact cause codes,
2832 * then it should return one of the values listed in
2833 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
2834 * cases for error notification
2835 * and potential retries.
2839 * RADIO_NOT_AVAILABLE
2842 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2844 * Deprecated use the status field in RIL_Data_Call_Response_v6.
2847 #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
2850 * RIL_REQUEST_DATA_CALL_LIST
2852 * Returns the data call list. An entry is added when a
2853 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
2854 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
2855 * when RIL_REQUEST_RADIO_POWER off/on is issued.
2858 * "response" is an array of RIL_Data_Call_Response_v6
2862 * RADIO_NOT_AVAILABLE (radio resetting)
2865 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
2868 #define RIL_REQUEST_DATA_CALL_LIST 57
2871 * RIL_REQUEST_RESET_RADIO - DEPRECATED
2873 * Request a radio reset. The RIL implementation may postpone
2874 * the reset until after this request is responded to if the baseband
2875 * is presently busy.
2877 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
2880 * "response" is NULL
2884 * RADIO_NOT_AVAILABLE (radio resetting)
2886 * REQUEST_NOT_SUPPORTED
2889 #define RIL_REQUEST_RESET_RADIO 58
2892 * RIL_REQUEST_OEM_HOOK_RAW
2894 * This request reserved for OEM-specific uses. It passes raw byte arrays
2897 * It can be invoked on the Java side from
2898 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
2900 * "data" is a char * of bytes copied from the byte[] data argument in java
2901 * "response" is a char * of bytes that will returned via the
2902 * caller's "response" Message here:
2903 * (byte[])(((AsyncResult)response.obj).result)
2905 * An error response here will result in
2906 * (((AsyncResult)response.obj).result) == null and
2907 * (((AsyncResult)response.obj).exception) being an instance of
2908 * com.android.internal.telephony.gsm.CommandException
2914 #define RIL_REQUEST_OEM_HOOK_RAW 59
2917 * RIL_REQUEST_OEM_HOOK_STRINGS
2919 * This request reserved for OEM-specific uses. It passes strings
2922 * It can be invoked on the Java side from
2923 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
2925 * "data" is a const char **, representing an array of null-terminated UTF-8
2926 * strings copied from the "String[] strings" argument to
2927 * invokeOemRilRequestStrings()
2929 * "response" is a const char **, representing an array of null-terminated UTF-8
2930 * stings that will be returned via the caller's response message here:
2932 * (String[])(((AsyncResult)response.obj).result)
2934 * An error response here will result in
2935 * (((AsyncResult)response.obj).result) == null and
2936 * (((AsyncResult)response.obj).exception) being an instance of
2937 * com.android.internal.telephony.gsm.CommandException
2943 #define RIL_REQUEST_OEM_HOOK_STRINGS 60
2946 * RIL_REQUEST_SCREEN_STATE
2948 * Indicates the current state of the screen. When the screen is off, the
2949 * RIL should notify the baseband to suppress certain notifications (eg,
2950 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
2951 * in an effort to conserve power. These notifications should resume when the
2955 * ((int *)data)[0] is == 1 for "Screen On"
2956 * ((int *)data)[0] is == 0 for "Screen Off"
2958 * "response" is NULL
2964 #define RIL_REQUEST_SCREEN_STATE 61
2968 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
2970 * Enables/disables supplementary service related notifications
2973 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2976 * ((int *)data)[0] is == 1 for notifications enabled
2977 * ((int *)data)[0] is == 0 for notifications disabled
2979 * "response" is NULL
2983 * RADIO_NOT_AVAILABLE
2986 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2988 #define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2991 * RIL_REQUEST_WRITE_SMS_TO_SIM
2993 * Stores a SMS message to SIM memory.
2995 * "data" is RIL_SMS_WriteArgs *
2997 * "response" is int *
2998 * ((const int *)response)[0] is the record index where the message is stored.
3005 #define RIL_REQUEST_WRITE_SMS_TO_SIM 63
3008 * RIL_REQUEST_DELETE_SMS_ON_SIM
3010 * Deletes a SMS message from SIM memory.
3013 * ((int *)data)[0] is the record index of the message to delete.
3015 * "response" is NULL
3022 #define RIL_REQUEST_DELETE_SMS_ON_SIM 64
3025 * RIL_REQUEST_SET_BAND_MODE
3027 * Assign a specified band for RF configuration.
3030 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
3031 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
3032 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
3033 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
3034 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
3035 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
3036 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
3037 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
3038 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
3039 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
3040 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
3041 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
3042 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
3043 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
3044 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
3045 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
3046 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
3047 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
3048 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
3050 * "response" is NULL
3054 * RADIO_NOT_AVAILABLE
3057 #define RIL_REQUEST_SET_BAND_MODE 65
3060 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3062 * Query the list of band mode supported by RF.
3066 * "response" is int *
3067 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
3068 * each available band mode.
3070 * 0 for "unspecified" (selected by baseband automatically)
3071 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
3072 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
3073 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
3074 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
3075 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
3076 * 6 for "Cellular (800-MHz Band)"
3077 * 7 for "PCS (1900-MHz Band)"
3078 * 8 for "Band Class 3 (JTACS Band)"
3079 * 9 for "Band Class 4 (Korean PCS Band)"
3080 * 10 for "Band Class 5 (450-MHz Band)"
3081 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
3082 * 12 for "Band Class 7 (Upper 700-MHz Band)"
3083 * 13 for "Band Class 8 (1800-MHz Band)"
3084 * 14 for "Band Class 9 (900-MHz Band)"
3085 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
3086 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
3087 * 17 for "Band Class 15 (AWS Band)"
3088 * 18 for "Band Class 16 (US 2.5-GHz Band)"
3092 * RADIO_NOT_AVAILABLE
3095 * See also: RIL_REQUEST_SET_BAND_MODE
3097 #define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
3100 * RIL_REQUEST_STK_GET_PROFILE
3102 * Requests the profile of SIM tool kit.
3103 * The profile indicates the SAT/USAT features supported by ME.
3104 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
3108 * "response" is a const char * containing SAT/USAT profile
3109 * in hexadecimal format string starting with first byte of terminal profile
3113 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3114 * RIL_E_GENERIC_FAILURE
3116 #define RIL_REQUEST_STK_GET_PROFILE 67
3119 * RIL_REQUEST_STK_SET_PROFILE
3121 * Download the STK terminal profile as part of SIM initialization
3124 * "data" is a const char * containing SAT/USAT profile
3125 * in hexadecimal format string starting with first byte of terminal profile
3127 * "response" is NULL
3131 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3132 * RIL_E_GENERIC_FAILURE
3134 #define RIL_REQUEST_STK_SET_PROFILE 68
3137 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
3139 * Requests to send a SAT/USAT envelope command to SIM.
3140 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
3142 * "data" is a const char * containing SAT/USAT command
3143 * in hexadecimal format string starting with command tag
3145 * "response" is a const char * containing SAT/USAT response
3146 * in hexadecimal format string starting with first byte of response
3151 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3152 * RIL_E_GENERIC_FAILURE
3154 #define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
3157 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
3159 * Requests to send a terminal response to SIM for a received
3162 * "data" is a const char * containing SAT/USAT response
3163 * in hexadecimal format string starting with first byte of response data
3165 * "response" is NULL
3169 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3170 * RIL_E_GENERIC_FAILURE
3172 #define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3175 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3177 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3178 * been initialized by ME already. (We could see the call has been in the 'call
3179 * list') So, STK application needs to accept/reject the call according as user
3183 * ((int *)data)[0] is > 0 for "accept" the call setup
3184 * ((int *)data)[0] is == 0 for "reject" the call setup
3186 * "response" is NULL
3190 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3191 * RIL_E_GENERIC_FAILURE
3193 #define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3196 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3198 * Connects the two calls and disconnects the subscriber from both calls.
3201 * "response" is NULL
3205 * RADIO_NOT_AVAILABLE (radio resetting)
3208 #define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3211 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3213 * Requests to set the preferred network type for searching and registering
3214 * (CS/PS domain, RAT, and operation mode)
3216 * "data" is int * which is RIL_PreferredNetworkType
3218 * "response" is NULL
3222 * RADIO_NOT_AVAILABLE (radio resetting)
3224 * MODE_NOT_SUPPORTED
3226 #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3229 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
3231 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
3232 * for searching and registering
3236 * "response" is int *
3237 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
3241 * RADIO_NOT_AVAILABLE
3244 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3246 #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
3249 * RIL_REQUEST_NEIGHBORING_CELL_IDS
3251 * Request neighboring cell id in GSM network
3254 * "response" must be a " const RIL_NeighboringCell** "
3258 * RADIO_NOT_AVAILABLE
3261 #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3264 * RIL_REQUEST_SET_LOCATION_UPDATES
3266 * Enables/disables network state change notifications due to changes in
3267 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3268 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
3270 * Note: The RIL implementation should default to "updates enabled"
3271 * when the screen is on and "updates disabled" when the screen is off.
3274 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3275 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3277 * "response" is NULL
3281 * RADIO_NOT_AVAILABLE
3284 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3286 #define RIL_REQUEST_SET_LOCATION_UPDATES 76
3289 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
3291 * Request to set the location where the CDMA subscription shall
3295 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3297 * "response" is NULL
3301 * RADIO_NOT_AVAILABLE
3304 * SUBSCRIPTION_NOT_AVAILABLE
3306 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3308 #define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
3311 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
3313 * Request to set the roaming preferences in CDMA
3316 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3317 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3318 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
3320 * "response" is NULL
3324 * RADIO_NOT_AVAILABLE
3327 #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
3330 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
3332 * Request the actual setting of the roaming preferences in CDMA in the modem
3336 * "response" is int *
3337 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
3338 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3339 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
3341 * "response" is NULL
3345 * RADIO_NOT_AVAILABLE
3348 #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
3351 * RIL_REQUEST_SET_TTY_MODE
3353 * Request to set the TTY mode
3356 * ((int *)data)[0] is == 0 for TTY off
3357 * ((int *)data)[0] is == 1 for TTY Full
3358 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
3359 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
3361 * "response" is NULL
3365 * RADIO_NOT_AVAILABLE
3368 #define RIL_REQUEST_SET_TTY_MODE 80
3371 * RIL_REQUEST_QUERY_TTY_MODE
3373 * Request the setting of TTY mode
3377 * "response" is int *
3378 * ((int *)response)[0] is == 0 for TTY off
3379 * ((int *)response)[0] is == 1 for TTY Full
3380 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
3381 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
3383 * "response" is NULL
3387 * RADIO_NOT_AVAILABLE
3390 #define RIL_REQUEST_QUERY_TTY_MODE 81
3393 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
3395 * Request to set the preferred voice privacy mode used in voice
3399 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3400 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
3402 * "response" is NULL
3406 * RADIO_NOT_AVAILABLE
3409 #define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
3412 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
3414 * Request the setting of preferred voice privacy mode
3418 * "response" is int *
3419 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3420 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
3422 * "response" is NULL
3426 * RADIO_NOT_AVAILABLE
3429 #define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
3432 * RIL_REQUEST_CDMA_FLASH
3436 * "data" is const char *
3437 * ((const char *)data)[0] is a FLASH string
3439 * "response" is NULL
3443 * RADIO_NOT_AVAILABLE
3447 #define RIL_REQUEST_CDMA_FLASH 84
3450 * RIL_REQUEST_CDMA_BURST_DTMF
3454 * "data" is const char **
3455 * ((const char **)data)[0] is a DTMF string
3456 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
3458 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
3461 * "response" is NULL
3465 * RADIO_NOT_AVAILABLE
3469 #define RIL_REQUEST_CDMA_BURST_DTMF 85
3472 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
3474 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
3475 * If the checksum is valid the 20 digit AKEY is written to NV,
3476 * replacing the existing AKEY no matter what it was before.
3478 * "data" is const char *
3479 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
3480 * where the last 6 digits are a checksum of the
3481 * first 20, as specified in TR45.AHAG
3482 * "Common Cryptographic Algorithms, Revision D.1
3485 * "response" is NULL
3489 * RADIO_NOT_AVAILABLE
3493 #define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
3496 * RIL_REQUEST_CDMA_SEND_SMS
3498 * Send a CDMA SMS message
3500 * "data" is const RIL_CDMA_SMS_Message *
3502 * "response" is a const RIL_SMS_Response *
3504 * Based on the return error, caller decides to resend if sending sms
3505 * fails. The CDMA error class is derived as follows,
3506 * SUCCESS is error class 0 (no error)
3507 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
3508 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
3512 * RADIO_NOT_AVAILABLE
3513 * SMS_SEND_FAIL_RETRY
3517 #define RIL_REQUEST_CDMA_SEND_SMS 87
3520 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
3522 * Acknowledge the success or failure in the receipt of SMS
3523 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3525 * "data" is const RIL_CDMA_SMS_Ack *
3527 * "response" is NULL
3531 * RADIO_NOT_AVAILABLE
3535 #define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
3538 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
3540 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
3544 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
3545 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
3549 * RADIO_NOT_AVAILABLE
3553 #define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
3556 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
3558 * Set GSM/WCDMA Cell Broadcast SMS config
3560 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
3561 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
3563 * "response" is NULL
3567 * RADIO_NOT_AVAILABLE
3571 #define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
3574 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
3576 * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
3578 * "data" is const int *
3579 * (const int *)data[0] indicates to activate or turn off the
3580 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
3581 * 0 - Activate, 1 - Turn off
3583 * "response" is NULL
3587 * RADIO_NOT_AVAILABLE
3591 #define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
3594 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
3596 * Request the setting of CDMA Broadcast SMS config
3600 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
3601 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
3605 * RADIO_NOT_AVAILABLE
3609 #define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
3612 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
3614 * Set CDMA Broadcast SMS config
3616 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
3617 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
3619 * "response" is NULL
3623 * RADIO_NOT_AVAILABLE
3627 #define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
3630 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
3632 * Enable or disable the reception of CDMA Broadcast SMS
3634 * "data" is const int *
3635 * (const int *)data[0] indicates to activate or turn off the
3636 * reception of CDMA Broadcast SMS, 0-1,
3637 * 0 - Activate, 1 - Turn off
3639 * "response" is NULL
3643 * RADIO_NOT_AVAILABLE
3647 #define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
3650 * RIL_REQUEST_CDMA_SUBSCRIPTION
3652 * Request the device MDN / H_SID / H_NID.
3654 * The request is only allowed when CDMA subscription is available. When CDMA
3655 * subscription is changed, application layer should re-issue the request to
3656 * update the subscription information.
3658 * If a NULL value is returned for any of the device id, it means that error
3659 * accessing the device.
3661 * "response" is const char **
3662 * ((const char **)response)[0] is MDN if CDMA subscription is available
3663 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
3664 * CDMA subscription is available, in decimal format
3665 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
3666 * CDMA subscription is available, in decimal format
3667 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
3668 * ((const char **)response)[4] is PRL version if CDMA subscription is available
3672 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
3675 #define RIL_REQUEST_CDMA_SUBSCRIPTION 95
3678 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
3680 * Stores a CDMA SMS message to RUIM memory.
3682 * "data" is RIL_CDMA_SMS_WriteArgs *
3684 * "response" is int *
3685 * ((const int *)response)[0] is the record index where the message is stored.
3689 * RADIO_NOT_AVAILABLE
3693 #define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
3696 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
3698 * Deletes a CDMA SMS message from RUIM memory.
3701 * ((int *)data)[0] is the record index of the message to delete.
3703 * "response" is NULL
3707 * RADIO_NOT_AVAILABLE
3711 #define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
3714 * RIL_REQUEST_DEVICE_IDENTITY
3716 * Request the device ESN / MEID / IMEI / IMEISV.
3718 * The request is always allowed and contains GSM and CDMA device identity;
3719 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
3720 * RIL_REQUEST_GET_IMEISV.
3722 * If a NULL value is returned for any of the device id, it means that error
3723 * accessing the device.
3725 * When CDMA subscription is changed the ESN/MEID may change. The application
3726 * layer should re-issue the request to update the device identity in this case.
3728 * "response" is const char **
3729 * ((const char **)response)[0] is IMEI if GSM subscription is available
3730 * ((const char **)response)[1] is IMEISV if GSM subscription is available
3731 * ((const char **)response)[2] is ESN if CDMA subscription is available
3732 * ((const char **)response)[3] is MEID if CDMA subscription is available
3736 * RADIO_NOT_AVAILABLE
3739 #define RIL_REQUEST_DEVICE_IDENTITY 98
3742 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
3744 * Request the radio's system selection module to exit emergency
3745 * callback mode. RIL will not respond with SUCCESS until the modem has
3746 * completely exited from Emergency Callback Mode.
3750 * "response" is NULL
3754 * RADIO_NOT_AVAILABLE
3758 #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
3761 * RIL_REQUEST_GET_SMSC_ADDRESS
3763 * Queries the default Short Message Service Center address on the device.
3767 * "response" is const char * containing the SMSC address.
3771 * RADIO_NOT_AVAILABLE
3775 #define RIL_REQUEST_GET_SMSC_ADDRESS 100
3778 * RIL_REQUEST_SET_SMSC_ADDRESS
3780 * Sets the default Short Message Service Center address on the device.
3782 * "data" is const char * containing the SMSC address.
3784 * "response" is NULL
3788 * RADIO_NOT_AVAILABLE
3792 #define RIL_REQUEST_SET_SMSC_ADDRESS 101
3795 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
3797 * Indicates whether there is storage available for new SMS messages.
3800 * ((int *)data)[0] is 1 if memory is available for storing new messages
3801 * is 0 if memory capacity is exceeded
3803 * "response" is NULL
3807 * RADIO_NOT_AVAILABLE
3811 #define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
3814 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
3816 * Indicates that the StkSerivce is running and is
3817 * ready to receive RIL_UNSOL_STK_XXXXX commands.
3820 * "response" is NULL
3824 * RADIO_NOT_AVAILABLE
3828 #define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
3831 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3833 * Request to query the location where the CDMA subscription shall
3838 * "response" is int *
3839 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3843 * RADIO_NOT_AVAILABLE
3845 * SUBSCRIPTION_NOT_AVAILABLE
3847 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
3849 #define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
3852 * RIL_REQUEST_ISIM_AUTHENTICATION
3854 * Request the ISIM application on the UICC to perform AKA
3855 * challenge/response algorithm for IMS authentication
3857 * "data" is a const char * containing the challenge string in Base64 format
3858 * "response" is a const char * containing the response in Base64 format
3862 * RADIO_NOT_AVAILABLE
3865 #define RIL_REQUEST_ISIM_AUTHENTICATION 105
3868 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
3870 * Acknowledge successful or failed receipt of SMS previously indicated
3871 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
3872 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
3874 * "data" is const char **
3875 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
3876 * is "0" on failed receipt (send RP-ERROR)
3877 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
3879 * "response" is NULL
3883 * RADIO_NOT_AVAILABLE
3886 #define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
3889 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
3891 * Requests to send a SAT/USAT envelope command to SIM.
3892 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
3894 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
3895 * the SW1 and SW2 status bytes from the UICC response are returned along with
3896 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
3898 * The RIL implementation shall perform the normal processing of a '91XX'
3899 * response in SW1/SW2 to retrieve the pending proactive command and send it
3900 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
3902 * "data" is a const char * containing the SAT/USAT command
3903 * in hexadecimal format starting with command tag
3905 * "response" is a const RIL_SIM_IO_Response *
3909 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3910 * RIL_E_GENERIC_FAILURE
3912 #define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
3915 * RIL_REQUEST_VOICE_RADIO_TECH
3917 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
3918 * when radio state is RADIO_STATE_ON
3921 * "response" is int *
3922 * ((int *) response)[0] is of type const RIL_RadioTechnology
3926 * RADIO_NOT_AVAILABLE
3929 #define RIL_REQUEST_VOICE_RADIO_TECH 108
3932 * RIL_REQUEST_GET_CELL_INFO_LIST
3934 * Request all of the current cell information known to the radio. The radio
3935 * must a list of all current cells, including the neighboring cells. If for a particular
3936 * cell information isn't known then the appropriate unknown value will be returned.
3937 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
3941 * "response" is an array of RIL_CellInfo.
3943 #define RIL_REQUEST_GET_CELL_INFO_LIST 109
3946 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
3948 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
3949 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
3950 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
3951 * a RIL_UNSOL_CELL_INFO_LIST.
3954 * ((int *)data)[0] is minimum time in milliseconds
3956 * "response" is NULL
3960 * RADIO_NOT_AVAILABLE
3963 #define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
3966 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
3968 * Set an apn to initial attach network
3969 * "response" is NULL
3973 * RADIO_NOT_AVAILABLE (radio resetting)
3975 * SUBSCRIPTION_NOT_AVAILABLE
3977 #define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
3980 * RIL_REQUEST_IMS_REGISTRATION_STATE
3982 * Request current IMS registration state
3986 * "response" is int *
3987 * ((int *)response)[0] is registration state:
3988 * 0 - Not registered
3991 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
3992 * must follow with IMS SMS format:
3994 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
3998 * RADIO_NOT_AVAILABLE
4001 #define RIL_REQUEST_IMS_REGISTRATION_STATE 112
4004 * RIL_REQUEST_IMS_SEND_SMS
4006 * Send a SMS message over IMS
4008 * "data" is const RIL_IMS_SMS_Message *
4010 * "response" is a const RIL_SMS_Response *
4012 * Based on the return error, caller decides to resend if sending sms
4013 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
4014 * In case of retry, data is encoded based on Voice Technology available.
4018 * RADIO_NOT_AVAILABLE
4019 * SMS_SEND_FAIL_RETRY
4024 #define RIL_REQUEST_IMS_SEND_SMS 113
4027 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
4029 * Request APDU exchange on the basic channel. This command reflects TS 27.007
4030 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
4031 * of GSM/CDMA, and filter commands appropriately. It should filter
4032 * channel management and SELECT by DF name commands.
4034 * "data" is a const RIL_SIM_APDU *
4035 * "sessionid" field should be ignored.
4037 * "response" is a const RIL_SIM_IO_Response *
4041 * RADIO_NOT_AVAILABLE
4044 #define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
4047 * RIL_REQUEST_SIM_OPEN_CHANNEL
4049 * Open a new logical channel and select the given application. This command
4050 * reflects TS 27.007 "open logical channel" operation (+CCHO).
4052 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
4054 * "response" is int *
4055 * ((int *)data)[0] contains the session id of the logical channel.
4056 * ((int *)data)[1] onwards may optionally contain the select response for the
4057 * open channel command with one byte per integer.
4061 * RADIO_NOT_AVAILABLE
4066 #define RIL_REQUEST_SIM_OPEN_CHANNEL 115
4069 * RIL_REQUEST_SIM_CLOSE_CHANNEL
4071 * Close a previously opened logical channel. This command reflects TS 27.007
4072 * "close logical channel" operation (+CCHC).
4075 * ((int *)data)[0] is the session id of logical the channel to close.
4077 * "response" is NULL
4081 * RADIO_NOT_AVAILABLE
4084 #define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
4087 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
4089 * Exchange APDUs with a UICC over a previously opened logical channel. This
4090 * command reflects TS 27.007 "generic logical channel access" operation
4091 * (+CGLA). The modem should filter channel management and SELECT by DF name
4094 * "data" is a const RIL_SIM_APDU*
4096 * "response" is a const RIL_SIM_IO_Response *
4100 * RADIO_NOT_AVAILABLE
4103 #define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
4106 * RIL_REQUEST_NV_READ_ITEM
4108 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4109 * This is used for device configuration by some CDMA operators.
4111 * "data" is a const RIL_NV_ReadItem *
4113 * "response" is const char * containing the contents of the NV item
4117 * RADIO_NOT_AVAILABLE
4120 #define RIL_REQUEST_NV_READ_ITEM 118
4123 * RIL_REQUEST_NV_WRITE_ITEM
4125 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4126 * This is used for device configuration by some CDMA operators.
4128 * "data" is a const RIL_NV_WriteItem *
4130 * "response" is NULL
4134 * RADIO_NOT_AVAILABLE
4137 #define RIL_REQUEST_NV_WRITE_ITEM 119
4140 * RIL_REQUEST_NV_WRITE_CDMA_PRL
4142 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
4143 * This is used for device configuration by some CDMA operators.
4145 * "data" is a const char * containing the PRL as a byte array
4147 * "response" is NULL
4151 * RADIO_NOT_AVAILABLE
4154 #define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
4157 * RIL_REQUEST_NV_RESET_CONFIG
4159 * Reset the radio NV configuration to the factory state.
4160 * This is used for device configuration by some CDMA operators.
4163 * ((int *)data)[0] is 1 to reload all NV items
4164 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
4165 * ((int *)data)[0] is 3 for factory reset (RTN)
4167 * "response" is NULL
4171 * RADIO_NOT_AVAILABLE
4174 #define RIL_REQUEST_NV_RESET_CONFIG 121
4176 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
4177 * FIXME This API needs to have more documentation.
4179 * Selection/de-selection of a subscription from a SIM card
4180 * "data" is const RIL_SelectUiccSub*
4183 * "response" is NULL
4187 * RADIO_NOT_AVAILABLE (radio resetting)
4189 * SUBSCRIPTION_NOT_SUPPORTED
4192 #define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
4195 * RIL_REQUEST_ALLOW_DATA
4197 * Tells the modem whether data calls are allowed or not
4200 * FIXME slotId and aid will be added.
4201 * ((int *)data)[0] is == 0 to allow data calls
4202 * ((int *)data)[0] is == 1 to disallow data calls
4204 * "response" is NULL
4209 * RADIO_NOT_AVAILABLE (radio resetting)
4213 #define RIL_REQUEST_ALLOW_DATA 123
4216 * RIL_REQUEST_GET_HARDWARE_CONFIG
4218 * Request all of the current hardware (modem and sim) associated
4223 * "response" is an array of RIL_HardwareConfig.
4225 #define RIL_REQUEST_GET_HARDWARE_CONFIG 124
4228 * RIL_REQUEST_SIM_AUTHENTICATION
4230 * Returns the response of SIM Authentication through RIL to a
4231 * challenge request.
4233 * "data" Base64 encoded string containing challenge:
4234 * int authContext; P2 value of authentication command, see P2 parameter in
4235 * 3GPP TS 31.102 7.1.2
4236 * char *authData; the challenge string in Base64 format, see 3GPP
4238 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
4241 * "response" Base64 encoded strings containing response:
4242 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
4244 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
4246 #define RIL_REQUEST_SIM_AUTHENTICATION 125
4249 * RIL_REQUEST_GET_DC_RT_INFO
4251 * Requests the Data Connection Real Time Info
4255 * "response" is the most recent RIL_DcRtInfo
4259 * RADIO_NOT_AVAILABLE
4262 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
4264 #define RIL_REQUEST_GET_DC_RT_INFO 126
4267 * RIL_REQUEST_SET_DC_RT_INFO_RATE
4269 * This is the minimum number of milliseconds between successive
4270 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
4271 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
4272 * 0 means send as fast as possible.
4274 * "data" The number of milliseconds as an int
4276 * "response" is null
4279 * SUCCESS must not fail
4281 #define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
4284 * RIL_REQUEST_SET_DATA_PROFILE
4286 * Set data profile in modem
4287 * Modem should erase existed profiles from framework, and apply new profiles
4288 * "data" is an const RIL_DataProfileInfo **
4289 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
4290 * "response" is NULL
4294 * RADIO_NOT_AVAILABLE (radio resetting)
4296 * SUBSCRIPTION_NOT_AVAILABLE
4298 #define RIL_REQUEST_SET_DATA_PROFILE 128
4301 * RIL_REQUEST_SHUTDOWN
4303 * Device is shutting down. All further commands are ignored
4304 * and RADIO_NOT_AVAILABLE must be returned.
4307 * "response" is NULL
4311 * RADIO_NOT_AVAILABLE
4314 #define RIL_REQUEST_SHUTDOWN 129
4317 * RIL_REQUEST_GET_RADIO_CAPABILITY
4319 * Used to get phone radio capablility.
4322 * ((int *)data)[0] is the phone radio access family defined in
4323 * RadioAccessFamily. It's a bit mask value to represent the support type.
4327 * RADIO_NOT_AVAILABLE
4330 #define RIL_REQUEST_GET_RADIO_CAPABILITY 130
4333 * RIL_REQUEST_SET_RADIO_CAPABILITY
4335 * Used to set the phones radio capability. Be VERY careful
4336 * using this request as it may cause some vendor modems to reset. Because
4337 * of the possible modem reset any RIL commands after this one may not be
4340 * "data" is the RIL_RadioCapability structure
4342 * "response" is the RIL_RadioCapability structure, used to feedback return status
4345 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
4346 * RADIO_NOT_AVAILABLE
4349 #define RIL_REQUEST_SET_RADIO_CAPABILITY 131
4352 /***********************************************************************/
4355 #define RIL_UNSOL_RESPONSE_BASE 1000
4358 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
4360 * Indicate when value of RIL_RadioState has changed.
4362 * Callee will invoke RIL_RadioStateRequest method on main thread
4367 #define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
4371 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
4373 * Indicate when call state has changed
4375 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
4379 * Response should be invoked on, for example,
4380 * "RING", "BUSY", "NO CARRIER", and also call state
4381 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
4383 * Redundent or extraneous invocations are tolerated
4385 #define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
4389 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
4391 * Called when the voice network state changed
4393 * Callee will invoke the following requests on main thread:
4395 * RIL_REQUEST_VOICE_REGISTRATION_STATE
4396 * RIL_REQUEST_OPERATOR
4400 * FIXME should this happen when SIM records are loaded? (eg, for
4403 #define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
4406 * RIL_UNSOL_RESPONSE_NEW_SMS
4408 * Called when new SMS is received.
4410 * "data" is const char *
4411 * This is a pointer to a string containing the PDU of an SMS-DELIVER
4412 * as an ascii string of hex digits. The PDU starts with the SMSC address
4413 * per TS 27.005 (+CMT:)
4415 * Callee will subsequently confirm the receipt of thei SMS with a
4416 * RIL_REQUEST_SMS_ACKNOWLEDGE
4418 * No new RIL_UNSOL_RESPONSE_NEW_SMS
4419 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
4420 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
4423 #define RIL_UNSOL_RESPONSE_NEW_SMS 1003
4426 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
4428 * Called when new SMS Status Report is received.
4430 * "data" is const char *
4431 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
4432 * as an ascii string of hex digits. The PDU starts with the SMSC address
4433 * per TS 27.005 (+CDS:).
4435 * Callee will subsequently confirm the receipt of the SMS with a
4436 * RIL_REQUEST_SMS_ACKNOWLEDGE
4438 * No new RIL_UNSOL_RESPONSE_NEW_SMS
4439 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
4440 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
4443 #define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
4446 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
4448 * Called when new SMS has been stored on SIM card
4450 * "data" is const int *
4451 * ((const int *)data)[0] contains the slot index on the SIM that contains
4455 #define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
4460 * Called when a new USSD message is received.
4462 * "data" is const char **
4463 * ((const char **)data)[0] points to a type code, which is
4464 * one of these string values:
4465 * "0" USSD-Notify -- text in ((const char **)data)[1]
4466 * "1" USSD-Request -- text in ((const char **)data)[1]
4467 * "2" Session terminated by network
4468 * "3" other local client (eg, SIM Toolkit) has responded
4469 * "4" Operation not supported
4470 * "5" Network timeout
4472 * The USSD session is assumed to persist if the type code is "1", otherwise
4473 * the current session (if any) is assumed to have terminated.
4475 * ((const char **)data)[1] points to a message string if applicable, which
4476 * should always be in UTF-8.
4478 #define RIL_UNSOL_ON_USSD 1006
4479 /* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
4482 * RIL_UNSOL_ON_USSD_REQUEST
4484 * Obsolete. Send via RIL_UNSOL_ON_USSD
4486 #define RIL_UNSOL_ON_USSD_REQUEST 1007
4489 * RIL_UNSOL_NITZ_TIME_RECEIVED
4491 * Called when radio has received a NITZ time message
4493 * "data" is const char * pointing to NITZ time string
4494 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
4496 #define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
4499 * RIL_UNSOL_SIGNAL_STRENGTH
4501 * Radio may report signal strength rather han have it polled.
4503 * "data" is a const RIL_SignalStrength *
4505 #define RIL_UNSOL_SIGNAL_STRENGTH 1009
4509 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
4511 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
4512 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
4513 * of current data contexts including new contexts that have been
4514 * activated. A data call is only removed from this list when the
4515 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
4516 * is powered off/on.
4518 * See also: RIL_REQUEST_DATA_CALL_LIST
4521 #define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
4524 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
4526 * Reports supplementary service related notification from the network.
4528 * "data" is a const RIL_SuppSvcNotification *
4532 #define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
4535 * RIL_UNSOL_STK_SESSION_END
4537 * Indicate when STK session is terminated by SIM.
4541 #define RIL_UNSOL_STK_SESSION_END 1012
4544 * RIL_UNSOL_STK_PROACTIVE_COMMAND
4546 * Indicate when SIM issue a STK proactive command to applications
4548 * "data" is a const char * containing SAT/USAT proactive command
4549 * in hexadecimal format string starting with command tag
4552 #define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
4555 * RIL_UNSOL_STK_EVENT_NOTIFY
4557 * Indicate when SIM notifies applcations some event happens.
4558 * Generally, application does not need to have any feedback to
4559 * SIM but shall be able to indicate appropriate messages to users.
4561 * "data" is a const char * containing SAT/USAT commands or responses
4562 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
4563 * starting with first byte of response data or command tag
4566 #define RIL_UNSOL_STK_EVENT_NOTIFY 1014
4569 * RIL_UNSOL_STK_CALL_SETUP
4571 * Indicate when SIM wants application to setup a voice call.
4573 * "data" is const int *
4574 * ((const int *)data)[0] contains timeout value (in milliseconds)
4576 #define RIL_UNSOL_STK_CALL_SETUP 1015
4579 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
4581 * Indicates that SMS storage on the SIM is full. Sent when the network
4582 * attempts to deliver a new SMS message. Messages cannot be saved on the
4583 * SIM until space is freed. In particular, incoming Class 2 messages
4589 #define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
4592 * RIL_UNSOL_SIM_REFRESH
4594 * Indicates that file(s) on the SIM have been updated, or the SIM
4595 * has been reinitialized.
4597 * In the case where RIL is version 6 or older:
4598 * "data" is an int *
4599 * ((int *)data)[0] is a RIL_SimRefreshResult.
4600 * ((int *)data)[1] is the EFID of the updated file if the result is
4601 * SIM_FILE_UPDATE or NULL for any other result.
4603 * In the case where RIL is version 7:
4604 * "data" is a RIL_SimRefreshResponse_v7 *
4606 * Note: If the SIM state changes as a result of the SIM refresh (eg,
4607 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
4610 #define RIL_UNSOL_SIM_REFRESH 1017
4613 * RIL_UNSOL_CALL_RING
4615 * Ring indication for an incoming call (eg, RING or CRING event).
4616 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
4617 * of a call and sending multiple is optional. If the system property
4618 * ro.telephony.call_ring.multiple is false then the upper layers
4619 * will generate the multiple events internally. Otherwise the vendor
4620 * ril must generate multiple RIL_UNSOL_CALL_RING if
4621 * ro.telephony.call_ring.multiple is true or if it is absent.
4623 * The rate of these events is controlled by ro.telephony.call_ring.delay
4624 * and has a default value of 3000 (3 seconds) if absent.
4626 * "data" is null for GSM
4627 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
4629 #define RIL_UNSOL_CALL_RING 1018
4632 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
4634 * Indicates that SIM state changes.
4636 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
4640 #define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
4643 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4645 * Called when new CDMA SMS is received
4647 * "data" is const RIL_CDMA_SMS_Message *
4649 * Callee will subsequently confirm the receipt of the SMS with
4650 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4652 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
4653 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
4656 #define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
4659 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
4661 * Called when new Broadcast SMS is received
4663 * "data" can be one of the following:
4664 * If received from GSM network, "data" is const char of 88 bytes
4665 * which indicates each page of a CBS Message sent to the MS by the
4666 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
4667 * If received from UMTS network, "data" is const char of 90 up to 1252
4668 * bytes which contain between 1 and 15 CBS Message pages sent as one
4669 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2.
4672 #define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
4675 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
4677 * Indicates that SMS storage on the RUIM is full. Messages
4678 * cannot be saved on the RUIM until space is freed.
4683 #define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
4686 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
4688 * Indicates a restricted state change (eg, for Domain Specific Access Control).
4690 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
4692 * "data" is an int *
4693 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
4695 #define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
4698 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
4700 * Indicates that the radio system selection module has
4701 * autonomously entered emergency callback mode.
4706 #define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
4709 * RIL_UNSOL_CDMA_CALL_WAITING
4711 * Called when CDMA radio receives a call waiting indication.
4713 * "data" is const RIL_CDMA_CallWaiting *
4716 #define RIL_UNSOL_CDMA_CALL_WAITING 1025
4719 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
4721 * Called when CDMA radio receives an update of the progress of an
4724 * "data" is const int *
4725 * For CDMA this is an integer OTASP/OTAPA status listed in
4726 * RIL_CDMA_OTA_ProvisionStatus.
4729 #define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
4732 * RIL_UNSOL_CDMA_INFO_REC
4734 * Called when CDMA radio receives one or more info recs.
4736 * "data" is const RIL_CDMA_InformationRecords *
4739 #define RIL_UNSOL_CDMA_INFO_REC 1027
4742 * RIL_UNSOL_OEM_HOOK_RAW
4744 * This is for OEM specific use.
4746 * "data" is a byte[]
4748 #define RIL_UNSOL_OEM_HOOK_RAW 1028
4751 * RIL_UNSOL_RINGBACK_TONE
4753 * Indicates that nework doesn't have in-band information, need to
4754 * play out-band tone.
4756 * "data" is an int *
4757 * ((int *)data)[0] == 0 for stop play ringback tone.
4758 * ((int *)data)[0] == 1 for start play ringback tone.
4760 #define RIL_UNSOL_RINGBACK_TONE 1029
4763 * RIL_UNSOL_RESEND_INCALL_MUTE
4765 * Indicates that framework/application need reset the uplink mute state.
4767 * There may be situations where the mute state becomes out of sync
4768 * between the application and device in some GSM infrastructures.
4772 #define RIL_UNSOL_RESEND_INCALL_MUTE 1030
4775 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
4777 * Called when CDMA subscription source changed.
4780 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4782 #define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
4785 * RIL_UNSOL_CDMA_PRL_CHANGED
4787 * Called when PRL (preferred roaming list) changes.
4790 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
4792 #define RIL_UNSOL_CDMA_PRL_CHANGED 1032
4795 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
4797 * Called when Emergency Callback Mode Ends
4799 * Indicates that the radio system selection module has
4800 * proactively exited emergency callback mode.
4805 #define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
4808 * RIL_UNSOL_RIL_CONNECTED
4810 * Called the ril connects and returns the version
4813 * ((int *)data)[0] is RIL_VERSION
4815 #define RIL_UNSOL_RIL_CONNECTED 1034
4818 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
4820 * Indicates that voice technology has changed. Contains new radio technology
4821 * as a data in the message.
4824 * ((int *)data)[0] is of type const RIL_RadioTechnology
4827 #define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
4830 * RIL_UNSOL_CELL_INFO_LIST
4832 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
4833 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
4837 * "response" is an array of RIL_CellInfo.
4839 #define RIL_UNSOL_CELL_INFO_LIST 1036
4842 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
4844 * Called when IMS registration state has changed
4846 * To get IMS registration state and IMS SMS format, callee needs to invoke the
4847 * following request on main thread:
4849 * RIL_REQUEST_IMS_REGISTRATION_STATE
4854 #define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
4857 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
4859 * Indicated when there is a change in subscription status.
4860 * This event will be sent in the following scenarios
4861 * - subscription readiness at modem, which was selected by telephony layer
4862 * - when subscription is deactivated by modem due to UICC card removal
4863 * - When network invalidates the subscription i.e. attach reject due to authentication reject
4865 * "data" is const int *
4866 * ((const int *)data)[0] == 0 for Subscription Deactivated
4867 * ((const int *)data)[0] == 1 for Subscription Activated
4870 #define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
4873 * RIL_UNSOL_SRVCC_STATE_NOTIFY
4875 * Called when Single Radio Voice Call Continuity(SRVCC)
4876 * progress state has changed
4879 * ((int *)data)[0] is of type const RIL_SrvccState
4883 #define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
4886 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
4888 * Called when the hardware configuration associated with the RILd changes
4890 * "data" is an array of RIL_HardwareConfig
4893 #define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
4896 * RIL_UNSOL_DC_RT_INFO_CHANGED
4898 * Sent when the DC_RT_STATE changes but the time
4899 * between these messages must not be less than the
4900 * value set by RIL_REQUEST_SET_DC_RT_RATE.
4902 * "data" is the most recent RIL_DcRtInfo
4905 #define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
4908 * RIL_UNSOL_RADIO_CAPABILITY
4910 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
4911 * Returns the phone radio capability exactly as
4912 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
4913 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
4915 * "data" is the RIL_RadioCapability structure
4917 #define RIL_UNSOL_RADIO_CAPABILITY 1042
4922 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
4925 * "data" is const RIL_StkCcUnsolSsResponse *
4928 #define RIL_UNSOL_ON_SS 1043
4931 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
4933 * Called when there is an ALPHA from UICC during Call Control.
4935 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
4938 #define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
4940 /***********************************************************************/
4943 #if defined(ANDROID_MULTI_SIM)
4945 * RIL_Request Function pointer
4947 * @param request is one of RIL_REQUEST_*
4948 * @param data is pointer to data defined for that RIL_REQUEST_*
4949 * data is owned by caller, and should not be modified or freed by callee
4950 * @param t should be used in subsequent call to RIL_onResponse
4951 * @param datalen the length of data
4954 typedef void (*RIL_RequestFunc) (int request, void *data,
4955 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
4958 * This function should return the current radio state synchronously
4960 typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
4963 /* Backward compatible */
4966 * RIL_Request Function pointer
4968 * @param request is one of RIL_REQUEST_*
4969 * @param data is pointer to data defined for that RIL_REQUEST_*
4970 * data is owned by caller, and should not be modified or freed by callee
4971 * @param t should be used in subsequent call to RIL_onResponse
4972 * @param datalen the length of data
4975 typedef void (*RIL_RequestFunc) (int request, void *data,
4976 size_t datalen, RIL_Token t);
4979 * This function should return the current radio state synchronously
4981 typedef RIL_RadioState (*RIL_RadioStateRequest)();
4987 * This function returns "1" if the specified RIL_REQUEST code is
4988 * supported and 0 if it is not
4990 * @param requestCode is one of RIL_REQUEST codes
4993 typedef int (*RIL_Supports)(int requestCode);
4996 * This function is called from a separate thread--not the
4997 * thread that calls RIL_RequestFunc--and indicates that a pending
4998 * request should be cancelled.
5000 * On cancel, the callee should do its best to abandon the request and
5001 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
5003 * Subsequent calls to RIL_onRequestComplete for this request with
5004 * other results will be tolerated but ignored. (That is, it is valid
5005 * to ignore the cancellation request)
5007 * RIL_Cancel calls should return immediately, and not wait for cancellation
5009 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
5012 * @param t token wants to be canceled
5015 typedef void (*RIL_Cancel)(RIL_Token t);
5017 typedef void (*RIL_TimedCallback) (void *param);
5020 * Return a version string for your RIL implementation
5022 typedef const char * (*RIL_GetVersion) (void);
5025 int version; /* set to RIL_VERSION */
5026 RIL_RequestFunc onRequest;
5027 RIL_RadioStateRequest onStateRequest;
5028 RIL_Supports supports;
5029 RIL_Cancel onCancel;
5030 RIL_GetVersion getVersion;
5031 } RIL_RadioFunctions;
5039 } RIL_InitialAttachApn;
5042 int authContext; /* P2 value of authentication command, see P2 parameter in
5043 3GPP TS 31.102 7.1.2 */
5044 char *authData; /* the challenge string in Base64 format, see 3GPP
5046 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
5047 NULL if no value. */
5048 } RIL_SimAuthentication;
5053 * "t" is parameter passed in on previous call to RIL_Notification
5056 * If "e" != SUCCESS, then response can be null/is ignored
5058 * "response" is owned by caller, and should not be modified or
5061 * RIL_onRequestComplete will return as soon as possible
5063 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
5064 void *response, size_t responselen);
5066 #if defined(ANDROID_MULTI_SIM)
5068 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5069 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5071 * "data" is owned by caller, and should not be modified or freed by callee
5073 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
5076 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5077 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5079 * "data" is owned by caller, and should not be modified or freed by callee
5081 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
5084 * Call user-specifed "callback" function on on the same thread that
5085 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
5086 * a relative time value at which the callback is invoked. If relativeTime is
5087 * NULL or points to a 0-filled structure, the callback will be invoked as
5091 void (*RequestTimedCallback) (RIL_TimedCallback callback,
5092 void *param, const struct timeval *relativeTime);
5097 * RIL implementations must defined RIL_Init
5098 * argc and argv will be command line arguments intended for the RIL implementation
5099 * Return NULL on error
5101 * @param env is environment point defined as RIL_Env
5102 * @param argc number of arguments
5103 * @param argv list fo arguments
5106 const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
5108 #else /* RIL_SHLIB */
5111 * Call this once at startup to register notification routine
5113 * @param callbacks user-specifed callback function
5115 void RIL_register (const RIL_RadioFunctions *callbacks);
5120 * RIL_onRequestComplete will return as soon as possible
5122 * @param t is parameter passed in on previous call to RIL_Notification
5124 * @param e error code
5125 * if "e" != SUCCESS, then response can be null/is ignored
5126 * @param response is owned by caller, and should not be modified or
5128 * @param responselen the length of response in byte
5130 void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
5131 void *response, size_t responselen);
5133 #if defined(ANDROID_MULTI_SIM)
5135 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
5136 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5137 * "data" is owned by caller, and should not be modified or freed by callee
5138 * @param datalen the length of data in byte
5141 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
5142 size_t datalen, RIL_SOCKET_ID socket_id);
5145 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
5146 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5147 * "data" is owned by caller, and should not be modified or freed by callee
5148 * @param datalen the length of data in byte
5151 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
5156 * Call user-specifed "callback" function on on the same thread that
5157 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
5158 * a relative time value at which the callback is invoked. If relativeTime is
5159 * NULL or points to a 0-filled structure, the callback will be invoked as
5162 * @param callback user-specifed callback function
5163 * @param param parameter list
5164 * @param relativeTime a relative time value at which the callback is invoked
5167 void RIL_requestTimedCallback (RIL_TimedCallback callback,
5168 void *param, const struct timeval *relativeTime);
5171 #endif /* RIL_SHLIB */
5177 #endif /*ANDROID_RIL_H*/