2 * Copyright (C) 2006 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #define ANDROID_RIL_H 1
21 #ifndef FEATURE_UNIT_TEST
23 #endif /* !FEATURE_UNIT_TEST */
29 #define RIL_VERSION 6 /* Current version */
30 #define RIL_VERSION_MIN 2 /* Minimum RIL_VERSION supported */
32 #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
33 #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
35 typedef void * RIL_Token;
39 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
40 RIL_E_GENERIC_FAILURE = 2,
41 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
42 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
43 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
44 RIL_E_REQUEST_NOT_SUPPORTED = 6,
46 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
47 call on a Class C GPRS device */
48 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
49 registers in network */
50 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
51 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
52 shall be retrieved because of SIM or RUIM
54 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
56 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
57 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
58 RIL_E_ILLEGAL_SIM_OR_ME = 15 /* network selection failed due to
65 RIL_CALL_DIALING = 2, /* MO call only */
66 RIL_CALL_ALERTING = 3, /* MO call only */
67 RIL_CALL_INCOMING = 4, /* MT call only */
68 RIL_CALL_WAITING = 5 /* MT call only */
72 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
73 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
74 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
75 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
76 personalization locked, or SIM absent */
77 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
78 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
79 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
80 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
81 personalization locked, or RUIM absent */
82 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
83 RADIO_STATE_NV_READY = 9 /* Radio is on and the NV interface is available */
87 RADIO_TECH_UNKNOWN = 0,
94 RADIO_TECH_EVDO_0 = 7,
95 RADIO_TECH_EVDO_A = 8,
97 RADIO_TECH_HSUPA = 10,
99 RADIO_TECH_EVDO_B = 12,
100 RADIO_TECH_EHRPD = 13,
102 RADIO_TECH_HSPAP = 15 // HSPA+
103 } RIL_RadioTechnology;
105 // Do we want to split Data from Voice and the use
106 // RIL_RadioTechnology for get/setPreferredVoice/Data ?
108 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
109 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
110 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
111 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
112 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
113 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
114 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
115 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
116 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
117 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
118 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
119 PREF_NET_TYPE_LTE_ONLY = 11 /* LTE only */
120 } RIL_PreferredNetworkType;
122 /* Source for cdma subscription */
124 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
125 CDMA_SUBSCRIPTION_SOURCE_NV = 1
126 } RIL_CdmaSubscriptionSource;
128 /* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
130 RIL_UUS_TYPE1_IMPLICIT = 0,
131 RIL_UUS_TYPE1_REQUIRED = 1,
132 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
133 RIL_UUS_TYPE2_REQUIRED = 3,
134 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
135 RIL_UUS_TYPE3_REQUIRED = 5,
136 RIL_UUS_TYPE3_NOT_REQUIRED = 6
139 /* User-to-User Signaling Information data coding schemes. Possible values for
140 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
141 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
143 RIL_UUS_DCS_USP = 0, /* User specified protocol */
144 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
145 RIL_UUS_DCS_X244 = 2, /* X.244 */
146 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
147 convergence function */
148 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
151 /* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
152 * This data is passed in RIL_ExtensionRecord and rec contains this
153 * structure when type is RIL_UUS_INFO_EXT_REC */
155 RIL_UUS_Type uusType; /* UUS Type */
156 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
157 int uusLength; /* Length of UUS Data */
158 char * uusData; /* UUS Data */
161 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
163 char isPresent; /* non-zero if signal information record is present */
164 char signalType; /* as defined 3.7.5.5-1 */
165 char alertPitch; /* as defined 3.7.5.5-2 */
166 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
167 } RIL_CDMA_SignalInfoRecord;
171 int index; /* Connection Index for use with, eg, AT+CHLD */
172 int toa; /* type of address, eg 145 = intl */
173 char isMpty; /* nonzero if is mpty call */
174 char isMT; /* nonzero if call is mobile terminated */
175 char als; /* ALS line indicator if available
177 char isVoice; /* nonzero if this is is a voice call */
178 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
179 char * number; /* Remote party number */
180 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
181 char * name; /* Remote party name */
182 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
183 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
186 /* Deprecated, use RIL_Data_Call_Response_v6 */
188 int cid; /* Context ID, uniquely identifies this call */
189 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
190 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
191 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
192 char * apn; /* ignored */
193 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
194 } RIL_Data_Call_Response_v4;
197 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
198 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
201 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
202 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
203 back-off timer value RIL wants to override the one
204 pre-configured in FW.
205 The unit is miliseconds.
206 The value < 0 means no value is suggested.
207 The value 0 means retry should be done ASAP.
208 The value of MAX_INT(0x7fffffff) means no retry. */
209 int cid; /* Context ID, uniquely identifies this call */
210 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
211 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
212 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
213 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
214 such as "IP" or "IPV6" */
215 char * ifname; /* The network interface name */
216 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
217 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
218 May not be empty, typically 1 IPv4 or 1 IPv6 or
219 one of each. If the prefix length is absent the addresses
220 are assumed to be point to point with IPv4 having a prefix
221 length of 32 and IPv6 128. */
222 char * dnses; /* A space-delimited list of DNS server addresses,
223 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
225 char * gateways; /* A space-delimited list of default gateway addresses,
226 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
227 May be empty in which case the addresses represent point
228 to point connections. */
229 } RIL_Data_Call_Response_v6;
232 int messageRef; /* TP-Message-Reference for GSM,
233 and BearerData MessageId for CDMA
234 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
235 char *ackPDU; /* or NULL if n/a */
236 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
237 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
238 -1 if unknown or not applicable*/
241 /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
243 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
244 /* 0 = "REC UNREAD" */
246 /* 2 = "STO UNSENT" */
248 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
249 the TP-layer length is "strlen(pdu)/2". */
250 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
251 (as expected by TS 27.005) or NULL for default SMSC */
254 /** Used by RIL_REQUEST_DIAL */
258 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
259 * clir == 0 on "use subscription default value"
260 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
261 * clir == 2 on "CLIR suppression" (allow CLI presentation)
263 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
267 int command; /* one of the commands listed for TS 27.007 +CRSM*/
268 int fileid; /* EF id */
269 char *path; /* "pathid" from TS 27.007 +CRSM command.
270 Path is in hex asciii format eg "7f205f70"
271 Path must always be provided.
276 char *data; /* May be NULL*/
277 char *pin2; /* May be NULL*/
281 int command; /* one of the commands listed for TS 27.007 +CRSM*/
282 int fileid; /* EF id */
283 char *path; /* "pathid" from TS 27.007 +CRSM command.
284 Path is in hex asciii format eg "7f205f70"
285 Path must always be provided.
290 char *data; /* May be NULL*/
291 char *pin2; /* May be NULL*/
292 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
298 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
299 } RIL_SIM_IO_Response;
301 /* See also com.android.internal.telephony.gsm.CallForwardInfo */
305 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
306 * status 1 = active, 0 = not active
308 * For RIL_REQUEST_SET_CALL_FORWARD:
317 int reason; /* from TS 27.007 7.11 "reason" */
318 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
319 See table for Android mapping from
321 0 means user doesn't input class */
322 int toa; /* "type" from TS 27.007 7.11 */
323 char * number; /* "number" from TS 27.007 7.11. May be NULL */
324 int timeSeconds; /* for CF no reply only */
325 }RIL_CallForwardInfo;
328 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
329 * Upper 16 bits is LAC and lower 16 bits
330 * is CID (as described in TS 27.005)
331 * Primary Scrambling Code (as described in TS 25.331)
333 * Valid values are hexadecimal 0x0000 - 0xffffffff.
335 int rssi; /* Received RSSI in GSM,
336 * Level index of CPICH Received Signal Code Power in UMTS
338 } RIL_NeighboringCell;
340 /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
342 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
343 CALL_FAIL_NORMAL = 16,
345 CALL_FAIL_CONGESTION = 34,
346 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
347 CALL_FAIL_CALL_BARRED = 240,
348 CALL_FAIL_FDN_BLOCKED = 241,
349 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
350 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
351 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
352 CALL_FAIL_CDMA_DROP = 1001,
353 CALL_FAIL_CDMA_INTERCEPT = 1002,
354 CALL_FAIL_CDMA_REORDER = 1003,
355 CALL_FAIL_CDMA_SO_REJECT = 1004,
356 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
357 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
358 CALL_FAIL_CDMA_PREEMPTED = 1007,
359 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
360 during emergency callback mode */
361 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
362 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
363 } RIL_LastCallFailCause;
365 /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
367 PDP_FAIL_NONE = 0, /* No error, connection ok */
369 /* an integer cause code defined in TS 24.008
370 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
371 If the implementation does not have access to the exact cause codes,
372 then it should return one of the following values,
373 as the UI layer needs to distinguish these
374 cases for error notification and potential retries. */
375 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
376 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
377 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
378 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
379 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
380 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
381 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
382 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
383 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
384 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
385 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
386 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
387 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
388 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
389 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
391 /* Not mentioned in the specification */
392 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
393 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
395 /* reasons for data call drop - network/modem disconnect */
396 PDP_FAIL_SIGNAL_LOST = -3, /* no retry */
397 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
398 with parameters appropriate for new technology */
399 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
400 powered off - no retry */
401 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
402 mode was up on same APN/data profile - no retry until
403 tethered call is off */
405 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */
406 } RIL_DataCallFailCause;
408 /* See RIL_REQUEST_SETUP_DATA_CALL */
410 RIL_DATA_PROFILE_DEFAULT = 0,
411 RIL_DATA_PROFILE_TETHERED = 1,
412 RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */
415 /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
417 int notificationType; /*
418 * 0 = MO intermediate result code
419 * 1 = MT unsolicited result code
421 int code; /* See 27.007 7.17
424 int index; /* CUG index. See 27.007 7.17. */
425 int type; /* "type" from 27.007 7.17 (MT only). */
426 char * number; /* "number" from 27.007 7.17
427 (MT only, may be NULL). */
428 } RIL_SuppSvcNotification;
430 #define RIL_CARD_MAX_APPS 8
433 RIL_CARDSTATE_ABSENT = 0,
434 RIL_CARDSTATE_PRESENT = 1,
435 RIL_CARDSTATE_ERROR = 2
439 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
440 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
441 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
442 since each app can only have 1 active perso
444 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
445 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
446 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
447 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
448 RIL_PERSOSUBSTATE_SIM_SIM = 7,
449 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
450 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
451 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
452 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
453 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
454 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
455 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
456 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
457 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
458 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
459 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
460 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
461 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
462 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
463 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
464 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
465 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
469 RIL_APPSTATE_UNKNOWN = 0,
470 RIL_APPSTATE_DETECTED = 1,
471 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
472 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
473 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
474 when app_state is assigned to this value */
475 RIL_APPSTATE_READY = 5
479 RIL_PINSTATE_UNKNOWN = 0,
480 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
481 RIL_PINSTATE_ENABLED_VERIFIED = 2,
482 RIL_PINSTATE_DISABLED = 3,
483 RIL_PINSTATE_ENABLED_BLOCKED = 4,
484 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
488 RIL_APPTYPE_UNKNOWN = 0,
490 RIL_APPTYPE_USIM = 2,
491 RIL_APPTYPE_RUIM = 3,
492 RIL_APPTYPE_CSIM = 4,
498 RIL_AppType app_type;
499 RIL_AppState app_state;
500 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
501 RIL_APPSTATE_SUBSCRIPTION_PERSO */
502 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
504 char *app_label_ptr; /* null terminated string */
505 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
510 /* Deprecated, use RIL_CardStatus_v6 */
513 RIL_CardState card_state;
514 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
515 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
516 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
517 int num_applications; /* value <= RIL_CARD_MAX_APPS */
518 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
523 RIL_CardState card_state;
524 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
525 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
526 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
527 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
528 int num_applications; /* value <= RIL_CARD_MAX_APPS */
529 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
532 /* The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH */
534 /* A file on SIM has been updated. data[1] contains the EFID. */
536 /* SIM initialized. All files should be re-read. data[1] contains AID that caused REFRESH */
538 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
540 } RIL_SimRefreshResult;
542 /* Deprecated, use RIL_CDMA_CallWaiting_v6 */
544 char * number; /* Remote party number */
545 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
546 char * name; /* Remote party name */
547 RIL_CDMA_SignalInfoRecord signalInfoRecord;
548 } RIL_CDMA_CallWaiting_v5;
551 char * number; /* Remote party number */
552 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
553 char * name; /* Remote party name */
554 RIL_CDMA_SignalInfoRecord signalInfoRecord;
555 /* Number type/Number plan required to support International Call Waiting */
556 int number_type; /* 0=Unknown, 1=International, 2=National,
557 3=Network specific, 4=subscriber */
558 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
559 } RIL_CDMA_CallWaiting_v6;
562 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
564 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
565 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
566 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
569 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
570 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
571 * and 9.4.4.2.3 for UMTS.
572 * All other values can be treated as empty CBM data coding scheme.
574 * selected 0 means message types specified in <fromServiceId, toServiceId>
575 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
577 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
578 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
585 unsigned char selected;
586 } RIL_GSM_BroadcastSmsConfigInfo;
588 /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
589 #define RIL_RESTRICTED_STATE_NONE 0x00
590 /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
591 #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
592 /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
593 #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
594 /* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
595 #define RIL_RESTRICTED_STATE_CS_ALL 0x04
596 /* Block packet data access due to restriction. */
597 #define RIL_RESTRICTED_STATE_PS_ALL 0x10
599 /* The status for an OTASP/OTAPA session */
601 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
602 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
603 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
604 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
605 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
606 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
607 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
608 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
609 CDMA_OTA_PROVISION_STATUS_COMMITTED,
610 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
611 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
612 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
613 } RIL_CDMA_OTA_ProvisionStatus;
616 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
617 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
618 } RIL_GW_SignalStrength;
622 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
623 * multiplied by -1. Example: If the actual RSSI is -75, then this response
626 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
627 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
630 } RIL_CDMA_SignalStrength;
634 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
635 * multiplied by -1. Example: If the actual RSSI is -75, then this response
638 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
639 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
642 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
643 } RIL_EVDO_SignalStrength;
646 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
647 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
648 * Range: 44 to 140 dBm
649 * INT_MAX: 0x7FFFFFFF denotes invalid value.
650 * Reference: 3GPP TS 36.133 9.1.4 */
651 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
653 * INT_MAX: 0x7FFFFFFF denotes invalid value.
654 * Reference: 3GPP TS 36.133 9.1.7 */
655 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
656 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
657 * INT_MAX : 0x7FFFFFFF denotes invalid value.
658 * Reference: 3GPP TS 36.101 8.1.1 */
659 int cqi; /* The current Channel Quality Indicator.
661 * INT_MAX : 0x7FFFFFFF denotes invalid value.
662 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
663 } RIL_LTE_SignalStrength;
665 /* Deprecated, use RIL_SignalStrength_v6 */
667 RIL_GW_SignalStrength GW_SignalStrength;
668 RIL_CDMA_SignalStrength CDMA_SignalStrength;
669 RIL_EVDO_SignalStrength EVDO_SignalStrength;
670 } RIL_SignalStrength_v5;
673 RIL_GW_SignalStrength GW_SignalStrength;
674 RIL_CDMA_SignalStrength CDMA_SignalStrength;
675 RIL_EVDO_SignalStrength EVDO_SignalStrength;
676 RIL_LTE_SignalStrength LTE_SignalStrength;
677 } RIL_SignalStrength_v6;
679 /* Names of the CDMA info records (C.S0005 section 3.7.5) */
681 RIL_CDMA_DISPLAY_INFO_REC,
682 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
683 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
684 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
685 RIL_CDMA_SIGNAL_INFO_REC,
686 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
687 RIL_CDMA_LINE_CONTROL_INFO_REC,
688 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
689 RIL_CDMA_T53_CLIR_INFO_REC,
690 RIL_CDMA_T53_RELEASE_INFO_REC,
691 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
692 } RIL_CDMA_InfoRecName;
694 /* Display Info Rec as defined in C.S0005 section 3.7.5.1
695 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
696 Note: the Extended Display info rec contains multiple records of the
697 form: display_tag, display_len, and display_len occurrences of the
698 chari field if the display_tag is not 10000000 or 10000001.
699 To save space, the records are stored consecutively in a byte buffer.
700 The display_tag, display_len and chari fields are all 1 byte.
705 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
706 } RIL_CDMA_DisplayInfoRecord;
708 /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
709 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
710 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
715 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
720 } RIL_CDMA_NumberInfoRecord;
722 /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
724 RIL_REDIRECTING_REASON_UNKNOWN = 0,
725 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
726 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
727 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
728 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
729 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
730 RIL_REDIRECTING_REASON_RESERVED
731 } RIL_CDMA_RedirectingReason;
734 RIL_CDMA_NumberInfoRecord redirectingNumber;
735 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
736 RIL_CDMA_RedirectingReason redirectingReason;
737 } RIL_CDMA_RedirectingNumberInfoRecord;
739 /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
741 char lineCtrlPolarityIncluded;
743 char lineCtrlReverse;
744 char lineCtrlPowerDenial;
745 } RIL_CDMA_LineControlInfoRecord;
747 /* T53 CLIR Information Record */
750 } RIL_CDMA_T53_CLIRInfoRecord;
752 /* T53 Audio Control Information Record */
756 } RIL_CDMA_T53_AudioControlInfoRecord;
760 RIL_CDMA_InfoRecName name;
763 /* Display and Extended Display Info Rec */
764 RIL_CDMA_DisplayInfoRecord display;
766 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
767 RIL_CDMA_NumberInfoRecord number;
769 /* Signal Info Rec */
770 RIL_CDMA_SignalInfoRecord signal;
772 /* Redirecting Number Info Rec */
773 RIL_CDMA_RedirectingNumberInfoRecord redir;
775 /* Line Control Info Rec */
776 RIL_CDMA_LineControlInfoRecord lineCtrl;
778 /* T53 CLIR Info Rec */
779 RIL_CDMA_T53_CLIRInfoRecord clir;
781 /* T53 Audio Control Info Rec */
782 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
784 } RIL_CDMA_InformationRecord;
786 #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
789 char numberOfInfoRecs;
790 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
791 } RIL_CDMA_InformationRecords;
794 * RIL_REQUEST_GET_SIM_STATUS
796 * Requests status of the SIM interface and the SIM card
800 * "response" is const RIL_CardStatus_v6 *
805 #define RIL_REQUEST_GET_SIM_STATUS 1
808 * RIL_REQUEST_ENTER_SIM_PIN
810 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
812 * "data" is const char **
813 * ((const char **)data)[0] is PIN value
814 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
816 * "response" is int *
817 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
822 * RADIO_NOT_AVAILABLE (radio resetting)
827 #define RIL_REQUEST_ENTER_SIM_PIN 2
831 * RIL_REQUEST_ENTER_SIM_PUK
833 * Supplies SIM PUK and new PIN.
835 * "data" is const char **
836 * ((const char **)data)[0] is PUK value
837 * ((const char **)data)[1] is new PIN value
838 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
840 * "response" is int *
841 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
846 * RADIO_NOT_AVAILABLE (radio resetting)
852 #define RIL_REQUEST_ENTER_SIM_PUK 3
855 * RIL_REQUEST_ENTER_SIM_PIN2
857 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
858 * returned as a a failure from a previous operation.
860 * "data" is const char **
861 * ((const char **)data)[0] is PIN2 value
862 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
864 * "response" is int *
865 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
870 * RADIO_NOT_AVAILABLE (radio resetting)
875 #define RIL_REQUEST_ENTER_SIM_PIN2 4
878 * RIL_REQUEST_ENTER_SIM_PUK2
880 * Supplies SIM PUK2 and new PIN2.
882 * "data" is const char **
883 * ((const char **)data)[0] is PUK2 value
884 * ((const char **)data)[1] is new PIN2 value
885 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
887 * "response" is int *
888 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
893 * RADIO_NOT_AVAILABLE (radio resetting)
899 #define RIL_REQUEST_ENTER_SIM_PUK2 5
902 * RIL_REQUEST_CHANGE_SIM_PIN
904 * Supplies old SIM PIN and new PIN.
906 * "data" is const char **
907 * ((const char **)data)[0] is old PIN value
908 * ((const char **)data)[1] is new PIN value
909 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
911 * "response" is int *
912 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
917 * RADIO_NOT_AVAILABLE (radio resetting)
920 * (old PIN is invalid)
924 #define RIL_REQUEST_CHANGE_SIM_PIN 6
928 * RIL_REQUEST_CHANGE_SIM_PIN2
930 * Supplies old SIM PIN2 and new PIN2.
932 * "data" is const char **
933 * ((const char **)data)[0] is old PIN2 value
934 * ((const char **)data)[1] is new PIN2 value
935 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
937 * "response" is int *
938 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
943 * RADIO_NOT_AVAILABLE (radio resetting)
946 * (old PIN2 is invalid)
950 #define RIL_REQUEST_CHANGE_SIM_PIN2 7
953 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
955 * Requests that network personlization be deactivated
957 * "data" is const char **
958 * ((const char **)(data))[0]] is network depersonlization code
960 * "response" is int *
961 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
966 * RADIO_NOT_AVAILABLE (radio resetting)
972 #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
975 * RIL_REQUEST_GET_CURRENT_CALLS
977 * Requests current call list
981 * "response" must be a "const RIL_Call **"
986 * RADIO_NOT_AVAILABLE (radio resetting)
988 * (request will be made again in a few hundred msec)
991 #define RIL_REQUEST_GET_CURRENT_CALLS 9
997 * Initiate voice call
999 * "data" is const RIL_Dial *
1000 * "response" is NULL
1002 * This method is never used for supplementary service codes
1006 * RADIO_NOT_AVAILABLE (radio resetting)
1009 #define RIL_REQUEST_DIAL 10
1012 * RIL_REQUEST_GET_IMSI
1016 * Only valid when radio state is "RADIO_STATE_SIM_READY"
1018 * "data" is const char **
1019 * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1020 * "response" is a const char * containing the IMSI
1024 * RADIO_NOT_AVAILABLE (radio resetting)
1028 #define RIL_REQUEST_GET_IMSI 11
1031 * RIL_REQUEST_HANGUP
1033 * Hang up a specific line (like AT+CHLD=1x)
1035 * After this HANGUP request returns, RIL should show the connection is NOT
1036 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1038 * "data" is an int *
1039 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
1041 * "response" is NULL
1045 * RADIO_NOT_AVAILABLE (radio resetting)
1049 #define RIL_REQUEST_HANGUP 12
1052 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
1054 * Hang up waiting or held (like AT+CHLD=0)
1056 * After this HANGUP request returns, RIL should show the connection is NOT
1057 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1060 * "response" is NULL
1064 * RADIO_NOT_AVAILABLE (radio resetting)
1068 #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
1071 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
1073 * Hang up waiting or held (like AT+CHLD=1)
1075 * After this HANGUP request returns, RIL should show the connection is NOT
1076 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1079 * "response" is NULL
1083 * RADIO_NOT_AVAILABLE (radio resetting)
1087 #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
1090 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
1092 * Switch waiting or holding call and active call (like AT+CHLD=2)
1094 * State transitions should be is follows:
1096 * If call 1 is waiting and call 2 is active, then if this re
1099 * Call 1 Call 2 Call 1 Call 2
1100 * ACTIVE HOLDING HOLDING ACTIVE
1101 * ACTIVE WAITING HOLDING ACTIVE
1102 * HOLDING WAITING HOLDING ACTIVE
1103 * ACTIVE IDLE HOLDING IDLE
1104 * IDLE IDLE IDLE IDLE
1107 * "response" is NULL
1111 * RADIO_NOT_AVAILABLE (radio resetting)
1115 #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
1116 #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
1119 * RIL_REQUEST_CONFERENCE
1121 * Conference holding and active (like AT+CHLD=3)
1124 * "response" is NULL
1128 * RADIO_NOT_AVAILABLE (radio resetting)
1131 #define RIL_REQUEST_CONFERENCE 16
1136 * Send UDUB (user determined used busy) to ringing or
1137 * waiting call answer)(RIL_BasicRequest r);
1140 * "response" is NULL
1144 * RADIO_NOT_AVAILABLE (radio resetting)
1147 #define RIL_REQUEST_UDUB 17
1150 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1152 * Requests the failure cause code for the most recently terminated call
1155 * "response" is a "int *"
1156 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
1157 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
1158 * failure reasons are derived from the possible call failure scenarios
1159 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
1161 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
1162 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
1164 * If the implementation does not have access to the exact cause codes,
1165 * then it should return one of the values listed in RIL_LastCallFailCause,
1166 * as the UI layer needs to distinguish these cases for tone generation or
1167 * error notification.
1171 * RADIO_NOT_AVAILABLE
1174 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
1176 #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
1179 * RIL_REQUEST_SIGNAL_STRENGTH
1181 * Requests current signal strength and associated information
1183 * Must succeed if radio is on.
1187 * "response" is a const RIL_SignalStrength *
1191 * RADIO_NOT_AVAILABLE
1193 #define RIL_REQUEST_SIGNAL_STRENGTH 19
1196 * RIL_REQUEST_VOICE_REGISTRATION_STATE
1198 * Request current registration state
1201 * "response" is a "char **"
1202 * ((const char **)response)[0] is registration state 0-6,
1203 * 0 - Not registered, MT is not currently searching
1204 * a new operator to register
1205 * 1 - Registered, home network
1206 * 2 - Not registered, but MT is currently searching
1207 * a new operator to register
1208 * 3 - Registration denied
1210 * 5 - Registered, roaming
1211 * 10 - Same as 0, but indicates that emergency calls
1213 * 12 - Same as 2, but indicates that emergency calls
1215 * 13 - Same as 3, but indicates that emergency calls
1217 * 14 - Same as 4, but indicates that emergency calls
1220 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1221 * NULL if not.Valid LAC are 0x0000 - 0xffff
1222 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1224 * Valid CID are 0x00000000 - 0xffffffff
1225 * In GSM, CID is Cell ID (see TS 27.007)
1227 * In UMTS, CID is UMTS Cell Identity
1228 * (see TS 25.331) in 28 bits
1229 * ((const char **)response)[3] indicates the available voice radio technology,
1230 * valid values as defined by RIL_RadioTechnology.
1231 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1232 * system or NULL if not. Base Station ID in
1234 * ((const char **)response)[5] is Base Station latitude if registered on a
1235 * CDMA system or NULL if not. Base Station
1236 * latitude is a decimal number as specified in
1237 * 3GPP2 C.S0005-A v6.0. It is represented in
1238 * units of 0.25 seconds and ranges from -1296000
1239 * to 1296000, both values inclusive (corresponding
1240 * to a range of -90 to +90 degrees).
1241 * ((const char **)response)[6] is Base Station longitude if registered on a
1242 * CDMA system or NULL if not. Base Station
1243 * longitude is a decimal number as specified in
1244 * 3GPP2 C.S0005-A v6.0. It is represented in
1245 * units of 0.25 seconds and ranges from -2592000
1246 * to 2592000, both values inclusive (corresponding
1247 * to a range of -180 to +180 degrees).
1248 * ((const char **)response)[7] is concurrent services support indicator if
1249 * registered on a CDMA system 0-1.
1250 * 0 - Concurrent services not supported,
1251 * 1 - Concurrent services supported
1252 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1253 * NULL if not. Valid System ID are 0 - 32767
1254 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1255 * NULL if not. Valid System ID are 0 - 65535
1256 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
1257 * on a CDMA or EVDO system or NULL if not. Valid values
1259 * ((const char **)response)[11] indicates whether the current system is in the
1260 * PRL if registered on a CDMA or EVDO system or NULL if
1261 * not. 0=not in the PRL, 1=in the PRL
1262 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
1263 * if registered on a CDMA or EVDO system or NULL if not.
1264 * Valid values are 0-255.
1265 * ((const char **)response)[13] if registration state is 3 (Registration
1266 * denied) this is an enumerated reason why
1267 * registration was denied. See 3GPP TS 24.008,
1268 * 10.5.3.6 and Annex G.
1270 * 1 - Authentication Failure
1271 * 2 - IMSI unknown in HLR
1274 * 5 - PLMN not allowed
1275 * 6 - Location area not allowed
1276 * 7 - Roaming not allowed
1277 * 8 - No Suitable Cells in this Location Area
1278 * 9 - Network failure
1279 * 10 - Persistent location update reject
1280 * 11 - PLMN not allowed
1281 * 12 - Location area not allowed
1282 * 13 - Roaming not allowed in this Location Area
1283 * 15 - No Suitable Cells in this Location Area
1284 * 17 - Network Failure
1288 * 23 - GSM Authentication unacceptable
1289 * 25 - Not Authorized for this CSG
1290 * 32 - Service option not supported
1291 * 33 - Requested service option not subscribed
1292 * 34 - Service option temporarily out of order
1293 * 38 - Call cannot be identified
1294 * 48-63 - Retry upon entry into a new cell
1295 * 95 - Semantically incorrect message
1296 * 96 - Invalid mandatory information
1297 * 97 - Message type non-existent or not implemented
1298 * 98 - Message not compatible with protocol state
1299 * 99 - Information element non-existent or not implemented
1300 * 100 - Conditional IE error
1301 * 101 - Message not compatible with protocol state
1302 * 111 - Protocol error, unspecified
1303 * ((const char **)response)[14] is the Primary Scrambling Code of the current
1304 * cell as described in TS 25.331, in hexadecimal
1305 * format, or NULL if unknown or not registered
1306 * to a UMTS network.
1308 * Please note that registration state 4 ("unknown") is treated
1309 * as "out of service" in the Android telephony system
1311 * Registration state 3 can be returned if Location Update Reject
1312 * (with cause 17 - Network Failure) is received repeatedly from the network,
1313 * to facilitate "managed roaming"
1317 * RADIO_NOT_AVAILABLE
1320 #define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
1323 * RIL_REQUEST_DATA_REGISTRATION_STATE
1325 * Request current DATA registration state
1328 * "response" is a "char **"
1329 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG
1330 * ((const char **)response)[1] is LAC if registered or NULL if not
1331 * ((const char **)response)[2] is CID if registered or NULL if not
1332 * ((const char **)response)[3] indicates the available data radio technology,
1333 * valid values as defined by RIL_RadioTechnology.
1334 * ((const char **)response)[4] if registration state is 3 (Registration
1335 * denied) this is an enumerated reason why
1336 * registration was denied. See 3GPP TS 24.008,
1337 * Annex G.6 "Additonal cause codes for GMM".
1338 * 7 == GPRS services not allowed
1339 * 8 == GPRS services and non-GPRS services not allowed
1340 * 9 == MS identity cannot be derived by the network
1341 * 10 == Implicitly detached
1342 * 14 == GPRS services not allowed in this PLMN
1343 * 16 == MSC temporarily not reachable
1344 * 40 == No PDP context activated
1345 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
1346 * established using RIL_REQUEST_SETUP_DATA_CALL.
1348 * LAC and CID are in hexadecimal format.
1349 * valid LAC are 0x0000 - 0xffff
1350 * valid CID are 0x00000000 - 0x0fffffff
1352 * Please note that registration state 4 ("unknown") is treated
1353 * as "out of service" in the Android telephony system
1357 * RADIO_NOT_AVAILABLE
1360 #define RIL_REQUEST_DATA_REGISTRATION_STATE 21
1363 * RIL_REQUEST_OPERATOR
1365 * Request current operator ONS or EONS
1368 * "response" is a "const char **"
1369 * ((const char **)response)[0] is long alpha ONS or EONS
1370 * or NULL if unregistered
1372 * ((const char **)response)[1] is short alpha ONS or EONS
1373 * or NULL if unregistered
1374 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1375 * or NULL if unregistered
1379 * RADIO_NOT_AVAILABLE
1382 #define RIL_REQUEST_OPERATOR 22
1385 * RIL_REQUEST_RADIO_POWER
1387 * Toggle radio on and off (for "airplane" mode)
1388 * If the radio is is turned off/on the radio modem subsystem
1389 * is expected return to an initialized state. For instance,
1390 * any voice and data calls will be terminated and all associated
1394 * ((int *)data)[0] is > 0 for "Radio On"
1395 * ((int *)data)[0] is == 0 for "Radio Off"
1397 * "response" is NULL
1399 * Turn radio on if "on" > 0
1400 * Turn radio off if "on" == 0
1404 * RADIO_NOT_AVAILABLE
1407 #define RIL_REQUEST_RADIO_POWER 23
1414 * If the implementation is currently playing a tone requested via
1415 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1416 * should be played instead
1418 * "data" is a char * containing a single character with one of 12 values: 0-9,*,#
1419 * "response" is NULL
1421 * FIXME should this block/mute microphone?
1422 * How does this interact with local DTMF feedback?
1426 * RADIO_NOT_AVAILABLE
1429 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1432 #define RIL_REQUEST_DTMF 24
1435 * RIL_REQUEST_SEND_SMS
1437 * Send an SMS message
1439 * "data" is const char **
1440 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1441 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1442 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1443 * less the SMSC address
1444 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1446 * "response" is a const RIL_SMS_Response *
1448 * Based on the return error, caller decides to resend if sending sms
1449 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1450 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1454 * RADIO_NOT_AVAILABLE
1455 * SMS_SEND_FAIL_RETRY
1459 * FIXME how do we specify TP-Message-Reference if we need to resend?
1461 #define RIL_REQUEST_SEND_SMS 25
1465 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
1467 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1468 * except that more messages are expected to be sent soon. If possible,
1469 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1471 * "data" is const char **
1472 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1473 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1474 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1475 * less the SMSC address
1476 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1478 * "response" is a const RIL_SMS_Response *
1480 * Based on the return error, caller decides to resend if sending sms
1481 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1482 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1486 * RADIO_NOT_AVAILABLE
1487 * SMS_SEND_FAIL_RETRY
1491 #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1495 * RIL_REQUEST_SETUP_DATA_CALL
1497 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
1498 * return success it is added to the list of data calls and a
1499 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
1500 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
1501 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
1502 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
1504 * The RIL is expected to:
1505 * - Create one data call context.
1506 * - Create and configure a dedicated interface for the context
1507 * - The interface must be point to point.
1508 * - The interface is configured with one or more addresses and
1509 * is capable of sending and receiving packets. The prefix length
1510 * of the addresses must be /32 for IPv4 and /128 for IPv6.
1511 * - Must NOT change the linux routing table.
1512 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
1513 * number of simultaneous data call contexts.
1515 * "data" is a const char **
1516 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
1517 * for values above 2 this is RIL_RadioTechnology + 2.
1518 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
1519 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
1520 * override the one in the profile. NULL indicates no APN overrride.
1521 * ((const char **)data)[3] is the username for APN, or NULL
1522 * ((const char **)data)[4] is the password for APN, or NULL
1523 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
1524 * 0 => PAP and CHAP is never performed.
1525 * 1 => PAP may be performed; CHAP is never performed.
1526 * 2 => CHAP may be performed; PAP is never performed.
1527 * 3 => PAP / CHAP may be performed - baseband dependent.
1528 * ((const char **)data)[6] is the connection type to request must be one of the
1529 * PDP_type values in TS 27.007 section 10.1.1.
1530 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1531 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
1533 * "response" is a RIL_Data_Call_Response_v6
1535 * FIXME may need way to configure QoS settings
1538 * SUCCESS should be returned on both success and failure of setup with
1539 * the RIL_Data_Call_Response_v6.status containing the actual status.
1540 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
1542 * Other errors could include:
1543 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
1544 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
1546 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
1548 #define RIL_REQUEST_SETUP_DATA_CALL 27
1552 * RIL_REQUEST_SIM_IO
1554 * Request SIM I/O operation.
1555 * This is similar to the TS 27.007 "restricted SIM" operation
1556 * where it assumes all of the EF selection will be done by the
1559 * "data" is a const RIL_SIM_IO_v6 *
1560 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1561 * or may specify a PIN2 for operations that require a PIN2 (eg
1562 * updating FDN records)
1564 * "response" is a const RIL_SIM_IO_Response *
1566 * Arguments and responses that are unused for certain
1567 * values of "command" should be ignored or set to NULL
1571 * RADIO_NOT_AVAILABLE
1576 #define RIL_REQUEST_SIM_IO 28
1579 * RIL_REQUEST_SEND_USSD
1581 * Send a USSD message
1583 * If a USSD session already exists, the message should be sent in the
1584 * context of that session. Otherwise, a new session should be created.
1586 * The network reply should be reported via RIL_UNSOL_ON_USSD
1588 * Only one USSD session may exist at a time, and the session is assumed
1590 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1591 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1592 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1594 * "data" is a const char * containing the USSD request in UTF-8 format
1595 * "response" is NULL
1599 * RADIO_NOT_AVAILABLE
1603 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1606 #define RIL_REQUEST_SEND_USSD 29
1609 * RIL_REQUEST_CANCEL_USSD
1611 * Cancel the current USSD session if one exists
1614 * "response" is NULL
1618 * RADIO_NOT_AVAILABLE
1622 #define RIL_REQUEST_CANCEL_USSD 30
1625 * RIL_REQUEST_GET_CLIR
1627 * Gets current CLIR status
1629 * "response" is int *
1630 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1631 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
1635 * RADIO_NOT_AVAILABLE
1638 #define RIL_REQUEST_GET_CLIR 31
1641 * RIL_REQUEST_SET_CLIR
1644 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1646 * "response" is NULL
1650 * RADIO_NOT_AVAILABLE
1653 #define RIL_REQUEST_SET_CLIR 32
1656 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
1658 * "data" is const RIL_CallForwardInfo *
1660 * "response" is const RIL_CallForwardInfo **
1661 * "response" points to an array of RIL_CallForwardInfo *'s, one for
1662 * each distinct registered phone number.
1664 * For example, if data is forwarded to +18005551212 and voice is forwarded
1665 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
1667 * If, however, both data and voice are forwarded to +18005551212, then
1668 * a single RIL_CallForwardInfo can be returned with the service class
1669 * set to "data + voice = 3")
1673 * RADIO_NOT_AVAILABLE
1676 #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
1680 * RIL_REQUEST_SET_CALL_FORWARD
1682 * Configure call forward rule
1684 * "data" is const RIL_CallForwardInfo *
1685 * "response" is NULL
1689 * RADIO_NOT_AVAILABLE
1692 #define RIL_REQUEST_SET_CALL_FORWARD 34
1696 * RIL_REQUEST_QUERY_CALL_WAITING
1698 * Query current call waiting state
1700 * "data" is const int *
1701 * ((const int *)data)[0] is the TS 27.007 service class to query.
1702 * "response" is a const int *
1703 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
1705 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
1706 * must follow, with the TS 27.007 service class bit vector of services
1707 * for which call waiting is enabled.
1709 * For example, if ((const int *)response)[0] is 1 and
1710 * ((const int *)response)[1] is 3, then call waiting is enabled for data
1711 * and voice and disabled for everything else
1715 * RADIO_NOT_AVAILABLE
1718 #define RIL_REQUEST_QUERY_CALL_WAITING 35
1722 * RIL_REQUEST_SET_CALL_WAITING
1724 * Configure current call waiting state
1726 * "data" is const int *
1727 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
1728 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
1729 * services to modify
1730 * "response" is NULL
1734 * RADIO_NOT_AVAILABLE
1737 #define RIL_REQUEST_SET_CALL_WAITING 36
1740 * RIL_REQUEST_SMS_ACKNOWLEDGE
1742 * Acknowledge successful or failed receipt of SMS previously indicated
1743 * via RIL_UNSOL_RESPONSE_NEW_SMS
1746 * ((int *)data)[0] is 1 on successful receipt
1747 * (basically, AT+CNMA=1 from TS 27.005
1748 * is 0 on failed receipt
1749 * (basically, AT+CNMA=2 from TS 27.005)
1750 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
1751 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
1752 * capacity exceeded) and 0xFF (unspecified error) are
1755 * "response" is NULL
1757 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
1761 * RADIO_NOT_AVAILABLE
1764 #define RIL_REQUEST_SMS_ACKNOWLEDGE 37
1767 * RIL_REQUEST_GET_IMEI - DEPRECATED
1769 * Get the device IMEI, including check digit
1771 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
1772 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1775 * "response" is a const char * containing the IMEI
1779 * RADIO_NOT_AVAILABLE (radio resetting)
1783 #define RIL_REQUEST_GET_IMEI 38
1786 * RIL_REQUEST_GET_IMEISV - DEPRECATED
1788 * Get the device IMEISV, which should be two decimal digits
1790 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
1791 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1794 * "response" is a const char * containing the IMEISV
1798 * RADIO_NOT_AVAILABLE (radio resetting)
1802 #define RIL_REQUEST_GET_IMEISV 39
1806 * RIL_REQUEST_ANSWER
1808 * Answer incoming call
1810 * Will not be called for WAITING calls.
1811 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
1815 * "response" is NULL
1819 * RADIO_NOT_AVAILABLE (radio resetting)
1823 #define RIL_REQUEST_ANSWER 40
1826 * RIL_REQUEST_DEACTIVATE_DATA_CALL
1828 * Deactivate packet data connection and remove from the
1829 * data call list if SUCCESS is returned. Any other return
1830 * values should also try to remove the call from the list,
1831 * but that may not be possible. In any event a
1832 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
1833 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
1834 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
1836 * "data" is const char **
1837 * ((char**)data)[0] indicating CID
1838 * ((char**)data)[1] indicating Disconnect Reason
1839 * 0 => No specific reason specified
1840 * 1 => Radio shutdown requested
1842 * "response" is NULL
1846 * RADIO_NOT_AVAILABLE
1849 * See also: RIL_REQUEST_SETUP_DATA_CALL
1851 #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
1854 * RIL_REQUEST_QUERY_FACILITY_LOCK
1856 * Query the status of a facility lock state
1858 * "data" is const char **
1859 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
1860 * (eg "AO" for BAOC, "SC" for SIM lock)
1861 * ((const char **)data)[1] is the password, or "" if not required
1862 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
1864 * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1865 * This is only applicable in the case of Fixed Dialing Numbers
1868 * "response" is an int *
1869 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
1870 * services for which the specified barring facility
1871 * is active. "0" means "disabled for all"
1876 * RADIO_NOT_AVAILABLE
1880 #define RIL_REQUEST_QUERY_FACILITY_LOCK 42
1883 * RIL_REQUEST_SET_FACILITY_LOCK
1885 * Enable/disable one facility lock
1887 * "data" is const char **
1889 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1890 * (eg "AO" for BAOC)
1891 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
1892 * ((const char **)data)[2] = password
1893 * ((const char **)data)[3] = string representation of decimal TS 27.007
1894 * service class bit vector. Eg, the string
1895 * "1" means "set this facility for voice services"
1896 * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1897 * This is only applicable in the case of Fixed Dialing Numbers
1900 * "response" is int *
1901 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1905 * RADIO_NOT_AVAILABLE
1909 #define RIL_REQUEST_SET_FACILITY_LOCK 43
1912 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
1914 * Change call barring facility password
1916 * "data" is const char **
1918 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1919 * (eg "AO" for BAOC)
1920 * ((const char **)data)[1] = old password
1921 * ((const char **)data)[2] = new password
1923 * "response" is NULL
1927 * RADIO_NOT_AVAILABLE
1931 #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
1934 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
1936 * Query current network selectin mode
1940 * "response" is int *
1941 * ((const int *)response)[0] is
1942 * 0 for automatic selection
1943 * 1 for manual selection
1947 * RADIO_NOT_AVAILABLE
1951 #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
1954 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
1956 * Specify that the network should be selected automatically
1959 * "response" is NULL
1961 * This request must not respond until the new operator is selected
1966 * RADIO_NOT_AVAILABLE
1970 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
1971 * no retries needed, such as illegal SIM or ME.
1972 * Returns GENERIC_FAILURE for all other causes that might be
1976 #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
1979 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
1981 * Manually select a specified network.
1983 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
1984 * "response" is NULL
1986 * This request must not respond until the new operator is selected
1991 * RADIO_NOT_AVAILABLE
1995 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
1996 * no retries needed, such as illegal SIM or ME.
1997 * Returns GENERIC_FAILURE for all other causes that might be
2001 #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
2004 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
2006 * Scans for available networks
2009 * "response" is const char ** that should be an array of n*4 strings, where
2010 * n is the number of available networks
2011 * For each available network:
2013 * ((const char **)response)[n+0] is long alpha ONS or EONS
2014 * ((const char **)response)[n+1] is short alpha ONS or EONS
2015 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
2016 * ((const char **)response)[n+3] is a string value of the status:
2022 * This request must not respond until the new operator is selected
2027 * RADIO_NOT_AVAILABLE
2031 #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
2034 * RIL_REQUEST_DTMF_START
2036 * Start playing a DTMF tone. Continue playing DTMF tone until
2037 * RIL_REQUEST_DTMF_STOP is received
2039 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
2040 * it should cancel the previous tone and play the new one.
2042 * "data" is a char *
2043 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
2044 * "response" is NULL
2048 * RADIO_NOT_AVAILABLE
2051 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
2053 #define RIL_REQUEST_DTMF_START 49
2056 * RIL_REQUEST_DTMF_STOP
2058 * Stop playing a currently playing DTMF tone.
2061 * "response" is NULL
2065 * RADIO_NOT_AVAILABLE
2068 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
2070 #define RIL_REQUEST_DTMF_STOP 50
2073 * RIL_REQUEST_BASEBAND_VERSION
2075 * Return string value indicating baseband version, eg
2076 * response from AT+CGMR
2079 * "response" is const char * containing version string for log reporting
2083 * RADIO_NOT_AVAILABLE
2087 #define RIL_REQUEST_BASEBAND_VERSION 51
2090 * RIL_REQUEST_SEPARATE_CONNECTION
2092 * Separate a party from a multiparty call placing the multiparty call
2093 * (less the specified party) on hold and leaving the specified party
2094 * as the only other member of the current (active) call
2098 * See TS 22.084 1.3.8.2 (iii)
2099 * TS 22.030 6.5.5 "Entering "2X followed by send"
2100 * TS 27.007 "AT+CHLD=2x"
2102 * "data" is an int *
2103 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
2105 * "response" is NULL
2109 * RADIO_NOT_AVAILABLE (radio resetting)
2112 #define RIL_REQUEST_SEPARATE_CONNECTION 52
2116 * RIL_REQUEST_SET_MUTE
2118 * Turn on or off uplink (microphone) mute.
2120 * Will only be sent while voice call is active.
2121 * Will always be reset to "disable mute" when a new voice call is initiated
2123 * "data" is an int *
2124 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
2126 * "response" is NULL
2130 * RADIO_NOT_AVAILABLE (radio resetting)
2134 #define RIL_REQUEST_SET_MUTE 53
2137 * RIL_REQUEST_GET_MUTE
2139 * Queries the current state of the uplink mute setting
2142 * "response" is an int *
2143 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
2147 * RADIO_NOT_AVAILABLE (radio resetting)
2151 #define RIL_REQUEST_GET_MUTE 54
2154 * RIL_REQUEST_QUERY_CLIP
2156 * Queries the status of the CLIP supplementary service
2158 * (for MMI code "*#30#")
2161 * "response" is an int *
2162 * (int *)response)[0] is 1 for "CLIP provisioned"
2163 * and 0 for "CLIP not provisioned"
2164 * and 2 for "unknown, e.g. no network etc"
2168 * RADIO_NOT_AVAILABLE (radio resetting)
2172 #define RIL_REQUEST_QUERY_CLIP 55
2175 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
2176 * field in RIL_Data_Call_Response_v6.
2178 * Requests the failure cause code for the most recently failed PDP
2179 * context or CDMA data connection active
2180 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
2184 * "response" is a "int *"
2185 * ((int *)response)[0] is an integer cause code defined in TS 24.008
2186 * section 6.1.3.1.3 or close approximation
2188 * If the implementation does not have access to the exact cause codes,
2189 * then it should return one of the values listed in
2190 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
2191 * cases for error notification
2192 * and potential retries.
2196 * RADIO_NOT_AVAILABLE
2199 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2201 * Deprecated use the status field in RIL_Data_Call_Response_v6.
2204 #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
2207 * RIL_REQUEST_DATA_CALL_LIST
2209 * Returns the data call list. An entry is added when a
2210 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
2211 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
2212 * when RIL_REQUEST_RADIO_POWER off/on is issued.
2215 * "response" is an array of RIL_Data_Call_Response_v6
2219 * RADIO_NOT_AVAILABLE (radio resetting)
2222 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
2225 #define RIL_REQUEST_DATA_CALL_LIST 57
2228 * RIL_REQUEST_RESET_RADIO - DEPRECATED
2230 * Request a radio reset. The RIL implementation may postpone
2231 * the reset until after this request is responded to if the baseband
2232 * is presently busy.
2234 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
2237 * "response" is NULL
2241 * RADIO_NOT_AVAILABLE (radio resetting)
2243 * REQUEST_NOT_SUPPORTED
2246 #define RIL_REQUEST_RESET_RADIO 58
2249 * RIL_REQUEST_OEM_HOOK_RAW
2251 * This request reserved for OEM-specific uses. It passes raw byte arrays
2254 * It can be invoked on the Java side from
2255 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
2257 * "data" is a char * of bytes copied from the byte[] data argument in java
2258 * "response" is a char * of bytes that will returned via the
2259 * caller's "response" Message here:
2260 * (byte[])(((AsyncResult)response.obj).result)
2262 * An error response here will result in
2263 * (((AsyncResult)response.obj).result) == null and
2264 * (((AsyncResult)response.obj).exception) being an instance of
2265 * com.android.internal.telephony.gsm.CommandException
2271 #define RIL_REQUEST_OEM_HOOK_RAW 59
2274 * RIL_REQUEST_OEM_HOOK_STRINGS
2276 * This request reserved for OEM-specific uses. It passes strings
2279 * It can be invoked on the Java side from
2280 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
2282 * "data" is a const char **, representing an array of null-terminated UTF-8
2283 * strings copied from the "String[] strings" argument to
2284 * invokeOemRilRequestStrings()
2286 * "response" is a const char **, representing an array of null-terminated UTF-8
2287 * stings that will be returned via the caller's response message here:
2289 * (String[])(((AsyncResult)response.obj).result)
2291 * An error response here will result in
2292 * (((AsyncResult)response.obj).result) == null and
2293 * (((AsyncResult)response.obj).exception) being an instance of
2294 * com.android.internal.telephony.gsm.CommandException
2300 #define RIL_REQUEST_OEM_HOOK_STRINGS 60
2303 * RIL_REQUEST_SCREEN_STATE
2305 * Indicates the current state of the screen. When the screen is off, the
2306 * RIL should notify the baseband to suppress certain notifications (eg,
2307 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
2308 * in an effort to conserve power. These notifications should resume when the
2312 * ((int *)data)[0] is == 1 for "Screen On"
2313 * ((int *)data)[0] is == 0 for "Screen Off"
2315 * "response" is NULL
2321 #define RIL_REQUEST_SCREEN_STATE 61
2325 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
2327 * Enables/disables supplementary service related notifications
2330 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2333 * ((int *)data)[0] is == 1 for notifications enabled
2334 * ((int *)data)[0] is == 0 for notifications disabled
2336 * "response" is NULL
2340 * RADIO_NOT_AVAILABLE
2343 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2345 #define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2348 * RIL_REQUEST_WRITE_SMS_TO_SIM
2350 * Stores a SMS message to SIM memory.
2352 * "data" is RIL_SMS_WriteArgs *
2354 * "response" is int *
2355 * ((const int *)response)[0] is the record index where the message is stored.
2362 #define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2365 * RIL_REQUEST_DELETE_SMS_ON_SIM
2367 * Deletes a SMS message from SIM memory.
2370 * ((int *)data)[0] is the record index of the message to delete.
2372 * "response" is NULL
2379 #define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2382 * RIL_REQUEST_SET_BAND_MODE
2384 * Assign a specified band for RF configuration.
2387 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2388 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2389 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2390 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2391 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2392 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2393 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2394 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2395 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2396 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2397 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2398 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2399 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2400 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2401 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2402 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2403 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2404 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2405 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
2407 * "response" is NULL
2411 * RADIO_NOT_AVAILABLE
2414 #define RIL_REQUEST_SET_BAND_MODE 65
2417 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2419 * Query the list of band mode supported by RF.
2423 * "response" is int *
2424 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2425 * each available band mode.
2427 * 0 for "unspecified" (selected by baseband automatically)
2428 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2429 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2430 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2431 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2432 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2433 * 6 for "Cellular (800-MHz Band)"
2434 * 7 for "PCS (1900-MHz Band)"
2435 * 8 for "Band Class 3 (JTACS Band)"
2436 * 9 for "Band Class 4 (Korean PCS Band)"
2437 * 10 for "Band Class 5 (450-MHz Band)"
2438 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2439 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2440 * 13 for "Band Class 8 (1800-MHz Band)"
2441 * 14 for "Band Class 9 (900-MHz Band)"
2442 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2443 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2444 * 17 for "Band Class 15 (AWS Band)"
2445 * 18 for "Band Class 16 (US 2.5-GHz Band)"
2449 * RADIO_NOT_AVAILABLE
2452 * See also: RIL_REQUEST_SET_BAND_MODE
2454 #define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2457 * RIL_REQUEST_STK_GET_PROFILE
2459 * Requests the profile of SIM tool kit.
2460 * The profile indicates the SAT/USAT features supported by ME.
2461 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2465 * "response" is a const char * containing SAT/USAT profile
2466 * in hexadecimal format string starting with first byte of terminal profile
2470 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2471 * RIL_E_GENERIC_FAILURE
2473 #define RIL_REQUEST_STK_GET_PROFILE 67
2476 * RIL_REQUEST_STK_SET_PROFILE
2478 * Download the STK terminal profile as part of SIM initialization
2481 * "data" is a const char * containing SAT/USAT profile
2482 * in hexadecimal format string starting with first byte of terminal profile
2484 * "response" is NULL
2488 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2489 * RIL_E_GENERIC_FAILURE
2491 #define RIL_REQUEST_STK_SET_PROFILE 68
2494 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2496 * Requests to send a SAT/USAT envelope command to SIM.
2497 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2499 * "data" is a const char * containing SAT/USAT command
2500 * in hexadecimal format string starting with command tag
2502 * "response" is a const char * containing SAT/USAT response
2503 * in hexadecimal format string starting with first byte of response
2508 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2509 * RIL_E_GENERIC_FAILURE
2511 #define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2514 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2516 * Requests to send a terminal response to SIM for a received
2519 * "data" is a const char * containing SAT/USAT response
2520 * in hexadecimal format string starting with first byte of response data
2522 * "response" is NULL
2526 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2527 * RIL_E_GENERIC_FAILURE
2529 #define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
2532 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
2534 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
2535 * been initialized by ME already. (We could see the call has been in the 'call
2536 * list') So, STK application needs to accept/reject the call according as user
2540 * ((int *)data)[0] is > 0 for "accept" the call setup
2541 * ((int *)data)[0] is == 0 for "reject" the call setup
2543 * "response" is NULL
2547 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2548 * RIL_E_GENERIC_FAILURE
2550 #define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
2553 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
2555 * Connects the two calls and disconnects the subscriber from both calls.
2558 * "response" is NULL
2562 * RADIO_NOT_AVAILABLE (radio resetting)
2565 #define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
2568 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2570 * Requests to set the preferred network type for searching and registering
2571 * (CS/PS domain, RAT, and operation mode)
2573 * "data" is int * which is RIL_PreferredNetworkType
2575 * "response" is NULL
2579 * RADIO_NOT_AVAILABLE (radio resetting)
2581 * MODE_NOT_SUPPORTED
2583 #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2586 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2588 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2589 * for searching and registering
2593 * "response" is int *
2594 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
2598 * RADIO_NOT_AVAILABLE
2601 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2603 #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2606 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2608 * Request neighboring cell id in GSM network
2611 * "response" must be a " const RIL_NeighboringCell** "
2615 * RADIO_NOT_AVAILABLE
2618 #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
2621 * RIL_REQUEST_SET_LOCATION_UPDATES
2623 * Enables/disables network state change notifications due to changes in
2624 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
2625 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
2627 * Note: The RIL implementation should default to "updates enabled"
2628 * when the screen is on and "updates disabled" when the screen is off.
2631 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
2632 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
2634 * "response" is NULL
2638 * RADIO_NOT_AVAILABLE
2641 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2643 #define RIL_REQUEST_SET_LOCATION_UPDATES 76
2646 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
2648 * Request to set the location where the CDMA subscription shall
2652 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
2654 * "response" is NULL
2658 * RADIO_NOT_AVAILABLE
2661 * SUBSCRIPTION_NOT_AVAILABLE
2663 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
2665 #define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
2668 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
2670 * Request to set the roaming preferences in CDMA
2673 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
2674 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2675 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
2677 * "response" is NULL
2681 * RADIO_NOT_AVAILABLE
2684 #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
2687 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
2689 * Request the actual setting of the roaming preferences in CDMA in the modem
2693 * "response" is int *
2694 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
2695 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2696 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
2698 * "response" is NULL
2702 * RADIO_NOT_AVAILABLE
2705 #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
2708 * RIL_REQUEST_SET_TTY_MODE
2710 * Request to set the TTY mode
2713 * ((int *)data)[0] is == 0 for TTY off
2714 * ((int *)data)[0] is == 1 for TTY Full
2715 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
2716 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
2718 * "response" is NULL
2722 * RADIO_NOT_AVAILABLE
2725 #define RIL_REQUEST_SET_TTY_MODE 80
2728 * RIL_REQUEST_QUERY_TTY_MODE
2730 * Request the setting of TTY mode
2734 * "response" is int *
2735 * ((int *)response)[0] is == 0 for TTY off
2736 * ((int *)response)[0] is == 1 for TTY Full
2737 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
2738 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
2740 * "response" is NULL
2744 * RADIO_NOT_AVAILABLE
2747 #define RIL_REQUEST_QUERY_TTY_MODE 81
2750 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
2752 * Request to set the preferred voice privacy mode used in voice
2756 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2757 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
2759 * "response" is NULL
2763 * RADIO_NOT_AVAILABLE
2766 #define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
2769 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
2771 * Request the setting of preferred voice privacy mode
2775 * "response" is int *
2776 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2777 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
2779 * "response" is NULL
2783 * RADIO_NOT_AVAILABLE
2786 #define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
2789 * RIL_REQUEST_CDMA_FLASH
2793 * "data" is const char *
2794 * ((const char *)data)[0] is a FLASH string
2796 * "response" is NULL
2800 * RADIO_NOT_AVAILABLE
2804 #define RIL_REQUEST_CDMA_FLASH 84
2807 * RIL_REQUEST_CDMA_BURST_DTMF
2811 * "data" is const char **
2812 * ((const char **)data)[0] is a DTMF string
2813 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
2815 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
2818 * "response" is NULL
2822 * RADIO_NOT_AVAILABLE
2826 #define RIL_REQUEST_CDMA_BURST_DTMF 85
2829 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
2831 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
2832 * If the checksum is valid the 20 digit AKEY is written to NV,
2833 * replacing the existing AKEY no matter what it was before.
2835 * "data" is const char *
2836 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
2837 * where the last 6 digits are a checksum of the
2838 * first 20, as specified in TR45.AHAG
2839 * "Common Cryptographic Algorithms, Revision D.1
2842 * "response" is NULL
2846 * RADIO_NOT_AVAILABLE
2850 #define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
2853 * RIL_REQUEST_CDMA_SEND_SMS
2855 * Send a CDMA SMS message
2857 * "data" is const RIL_CDMA_SMS_Message *
2859 * "response" is a const RIL_SMS_Response *
2861 * Based on the return error, caller decides to resend if sending sms
2862 * fails. The CDMA error class is derived as follows,
2863 * SUCCESS is error class 0 (no error)
2864 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
2865 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
2869 * RADIO_NOT_AVAILABLE
2870 * SMS_SEND_FAIL_RETRY
2874 #define RIL_REQUEST_CDMA_SEND_SMS 87
2877 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
2879 * Acknowledge the success or failure in the receipt of SMS
2880 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
2882 * "data" is const RIL_CDMA_SMS_Ack *
2884 * "response" is NULL
2888 * RADIO_NOT_AVAILABLE
2892 #define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
2895 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
2897 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
2901 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
2902 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
2906 * RADIO_NOT_AVAILABLE
2910 #define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
2913 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
2915 * Set GSM/WCDMA Cell Broadcast SMS config
2917 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
2918 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
2920 * "response" is NULL
2924 * RADIO_NOT_AVAILABLE
2928 #define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
2931 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
2933 * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
2935 * "data" is const int *
2936 * (const int *)data[0] indicates to activate or turn off the
2937 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
2938 * 0 - Activate, 1 - Turn off
2940 * "response" is NULL
2944 * RADIO_NOT_AVAILABLE
2948 #define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
2951 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
2953 * Request the setting of CDMA Broadcast SMS config
2957 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
2958 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
2962 * RADIO_NOT_AVAILABLE
2966 #define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
2969 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
2971 * Set CDMA Broadcast SMS config
2973 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
2974 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
2976 * "response" is NULL
2980 * RADIO_NOT_AVAILABLE
2984 #define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
2987 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
2989 * Enable or disable the reception of CDMA Broadcast SMS
2991 * "data" is const int *
2992 * (const int *)data[0] indicates to activate or turn off the
2993 * reception of CDMA Broadcast SMS, 0-1,
2994 * 0 - Activate, 1 - Turn off
2996 * "response" is NULL
3000 * RADIO_NOT_AVAILABLE
3004 #define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
3007 * RIL_REQUEST_CDMA_SUBSCRIPTION
3009 * Request the device MDN / H_SID / H_NID.
3011 * The request is only allowed when CDMA subscription is available. When CDMA
3012 * subscription is changed, application layer should re-issue the request to
3013 * update the subscription information.
3015 * If a NULL value is returned for any of the device id, it means that error
3016 * accessing the device.
3018 * "response" is const char **
3019 * ((const char **)response)[0] is MDN if CDMA subscription is available
3020 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
3021 * CDMA subscription is available, in decimal format
3022 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
3023 * CDMA subscription is available, in decimal format
3024 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
3025 * ((const char **)response)[4] is PRL version if CDMA subscription is available
3029 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
3032 #define RIL_REQUEST_CDMA_SUBSCRIPTION 95
3035 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
3037 * Stores a CDMA SMS message to RUIM memory.
3039 * "data" is RIL_CDMA_SMS_WriteArgs *
3041 * "response" is int *
3042 * ((const int *)response)[0] is the record index where the message is stored.
3046 * RADIO_NOT_AVAILABLE
3050 #define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
3053 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
3055 * Deletes a CDMA SMS message from RUIM memory.
3058 * ((int *)data)[0] is the record index of the message to delete.
3060 * "response" is NULL
3064 * RADIO_NOT_AVAILABLE
3068 #define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
3071 * RIL_REQUEST_DEVICE_IDENTITY
3073 * Request the device ESN / MEID / IMEI / IMEISV.
3075 * The request is always allowed and contains GSM and CDMA device identity;
3076 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
3077 * RIL_REQUEST_GET_IMEISV.
3079 * If a NULL value is returned for any of the device id, it means that error
3080 * accessing the device.
3082 * When CDMA subscription is changed the ESN/MEID may change. The application
3083 * layer should re-issue the request to update the device identity in this case.
3085 * "response" is const char **
3086 * ((const char **)response)[0] is IMEI if GSM subscription is available
3087 * ((const char **)response)[1] is IMEISV if GSM subscription is available
3088 * ((const char **)response)[2] is ESN if CDMA subscription is available
3089 * ((const char **)response)[3] is MEID if CDMA subscription is available
3093 * RADIO_NOT_AVAILABLE
3096 #define RIL_REQUEST_DEVICE_IDENTITY 98
3099 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
3101 * Request the radio's system selection module to exit emergency
3102 * callback mode. RIL will not respond with SUCCESS until the modem has
3103 * completely exited from Emergency Callback Mode.
3107 * "response" is NULL
3111 * RADIO_NOT_AVAILABLE
3115 #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
3118 * RIL_REQUEST_GET_SMSC_ADDRESS
3120 * Queries the default Short Message Service Center address on the device.
3124 * "response" is const char * containing the SMSC address.
3128 * RADIO_NOT_AVAILABLE
3132 #define RIL_REQUEST_GET_SMSC_ADDRESS 100
3135 * RIL_REQUEST_SET_SMSC_ADDRESS
3137 * Sets the default Short Message Service Center address on the device.
3139 * "data" is const char * containing the SMSC address.
3141 * "response" is NULL
3145 * RADIO_NOT_AVAILABLE
3149 #define RIL_REQUEST_SET_SMSC_ADDRESS 101
3152 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
3154 * Indicates whether there is storage available for new SMS messages.
3157 * ((int *)data)[0] is 1 if memory is available for storing new messages
3158 * is 0 if memory capacity is exceeded
3160 * "response" is NULL
3164 * RADIO_NOT_AVAILABLE
3168 #define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
3171 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
3173 * Indicates that the StkSerivce is running and is
3174 * ready to receive RIL_UNSOL_STK_XXXXX commands.
3177 * "response" is NULL
3181 * RADIO_NOT_AVAILABLE
3185 #define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
3188 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3190 * Request to query the location where the CDMA subscription shall
3195 * "response" is int *
3196 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3200 * RADIO_NOT_AVAILABLE
3202 * SUBSCRIPTION_NOT_AVAILABLE
3204 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
3206 #define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
3208 /***********************************************************************/
3211 #define RIL_UNSOL_RESPONSE_BASE 1000
3214 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3216 * Indicate when value of RIL_RadioState has changed.
3218 * Callee will invoke RIL_RadioStateRequest method on main thread
3223 #define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
3227 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
3229 * Indicate when call state has changed
3231 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
3235 * Response should be invoked on, for example,
3236 * "RING", "BUSY", "NO CARRIER", and also call state
3237 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
3239 * Redundent or extraneous invocations are tolerated
3241 #define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
3245 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
3247 * Called when the voice network state changed
3249 * Callee will invoke the following requests on main thread:
3251 * RIL_REQUEST_VOICE_REGISTRATION_STATE
3252 * RIL_REQUEST_OPERATOR
3256 * FIXME should this happen when SIM records are loaded? (eg, for
3259 #define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
3262 * RIL_UNSOL_RESPONSE_NEW_SMS
3264 * Called when new SMS is received.
3266 * "data" is const char *
3267 * This is a pointer to a string containing the PDU of an SMS-DELIVER
3268 * as an ascii string of hex digits. The PDU starts with the SMSC address
3269 * per TS 27.005 (+CMT:)
3271 * Callee will subsequently confirm the receipt of thei SMS with a
3272 * RIL_REQUEST_SMS_ACKNOWLEDGE
3274 * No new RIL_UNSOL_RESPONSE_NEW_SMS
3275 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3276 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3279 #define RIL_UNSOL_RESPONSE_NEW_SMS 1003
3282 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
3284 * Called when new SMS Status Report is received.
3286 * "data" is const char *
3287 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
3288 * as an ascii string of hex digits. The PDU starts with the SMSC address
3289 * per TS 27.005 (+CDS:).
3291 * Callee will subsequently confirm the receipt of the SMS with a
3292 * RIL_REQUEST_SMS_ACKNOWLEDGE
3294 * No new RIL_UNSOL_RESPONSE_NEW_SMS
3295 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3296 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3299 #define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
3302 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
3304 * Called when new SMS has been stored on SIM card
3306 * "data" is const int *
3307 * ((const int *)data)[0] contains the slot index on the SIM that contains
3311 #define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
3316 * Called when a new USSD message is received.
3318 * "data" is const char **
3319 * ((const char **)data)[0] points to a type code, which is
3320 * one of these string values:
3321 * "0" USSD-Notify -- text in ((const char **)data)[1]
3322 * "1" USSD-Request -- text in ((const char **)data)[1]
3323 * "2" Session terminated by network
3324 * "3" other local client (eg, SIM Toolkit) has responded
3325 * "4" Operation not supported
3326 * "5" Network timeout
3328 * The USSD session is assumed to persist if the type code is "1", otherwise
3329 * the current session (if any) is assumed to have terminated.
3331 * ((const char **)data)[1] points to a message string if applicable, which
3332 * should always be in UTF-8.
3334 #define RIL_UNSOL_ON_USSD 1006
3335 /* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
3338 * RIL_UNSOL_ON_USSD_REQUEST
3340 * Obsolete. Send via RIL_UNSOL_ON_USSD
3342 #define RIL_UNSOL_ON_USSD_REQUEST 1007
3346 * RIL_UNSOL_NITZ_TIME_RECEIVED
3348 * Called when radio has received a NITZ time message
3350 * "data" is const char * pointing to NITZ time string
3351 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
3353 #define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
3356 * RIL_UNSOL_SIGNAL_STRENGTH
3358 * Radio may report signal strength rather han have it polled.
3360 * "data" is a const RIL_SignalStrength *
3362 #define RIL_UNSOL_SIGNAL_STRENGTH 1009
3366 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
3368 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
3369 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
3370 * of current data contexts including new contexts that have been
3371 * activated. A data call is only removed from this list when the
3372 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
3373 * is powered off/on.
3375 * See also: RIL_REQUEST_DATA_CALL_LIST
3378 #define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
3381 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
3383 * Reports supplementary service related notification from the network.
3385 * "data" is a const RIL_SuppSvcNotification *
3389 #define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
3392 * RIL_UNSOL_STK_SESSION_END
3394 * Indicate when STK session is terminated by SIM.
3398 #define RIL_UNSOL_STK_SESSION_END 1012
3401 * RIL_UNSOL_STK_PROACTIVE_COMMAND
3403 * Indicate when SIM issue a STK proactive command to applications
3405 * "data" is a const char * containing SAT/USAT proactive command
3406 * in hexadecimal format string starting with command tag
3409 #define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
3412 * RIL_UNSOL_STK_EVENT_NOTIFY
3414 * Indicate when SIM notifies applcations some event happens.
3415 * Generally, application does not need to have any feedback to
3416 * SIM but shall be able to indicate appropriate messages to users.
3418 * "data" is a const char * containing SAT/USAT commands or responses
3419 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
3420 * starting with first byte of response data or command tag
3423 #define RIL_UNSOL_STK_EVENT_NOTIFY 1014
3426 * RIL_UNSOL_STK_CALL_SETUP
3428 * Indicate when SIM wants application to setup a voice call.
3430 * "data" is const int *
3431 * ((const int *)data)[0] contains timeout value (in milliseconds)
3433 #define RIL_UNSOL_STK_CALL_SETUP 1015
3436 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
3438 * Indicates that SMS storage on the SIM is full. Sent when the network
3439 * attempts to deliver a new SMS message. Messages cannot be saved on the
3440 * SIM until space is freed. In particular, incoming Class 2 messages
3446 #define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
3449 * RIL_UNSOL_SIM_REFRESH
3451 * Indicates that file(s) on the SIM have been updated, or the SIM
3452 * has been reinitialized.
3454 * "data" is an int *
3455 * ((int *)data)[0] is a RIL_SimRefreshResult.
3456 * ((int *)data)[1] is the EFID of the updated file if the result is
3457 * SIM_FILE_UPDATE, AID(application ID) of the card application
3458 * triggering the REFRESH if the result is SIM_INIT, or NULL for any other result.
3460 * Note: If the radio state changes as a result of the SIM refresh (eg,
3461 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3464 #define RIL_UNSOL_SIM_REFRESH 1017
3467 * RIL_UNSOL_CALL_RING
3469 * Ring indication for an incoming call (eg, RING or CRING event).
3470 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
3471 * of a call and sending multiple is optional. If the system property
3472 * ro.telephony.call_ring.multiple is false then the upper layers
3473 * will generate the multiple events internally. Otherwise the vendor
3474 * ril must generate multiple RIL_UNSOL_CALL_RING if
3475 * ro.telephony.call_ring.multiple is true or if it is absent.
3477 * The rate of these events is controlled by ro.telephony.call_ring.delay
3478 * and has a default value of 3000 (3 seconds) if absent.
3480 * "data" is null for GSM
3481 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
3483 #define RIL_UNSOL_CALL_RING 1018
3486 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
3488 * Indicates that SIM state changes.
3490 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
3494 #define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
3497 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3499 * Called when new CDMA SMS is received
3501 * "data" is const RIL_CDMA_SMS_Message *
3503 * Callee will subsequently confirm the receipt of the SMS with
3504 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
3506 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
3507 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
3510 #define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
3513 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
3515 * Called when new Broadcast SMS is received
3517 * "data" can be one of the following:
3518 * If received from GSM network, "data" is const char of 88 bytes
3519 * which indicates each page of a CBS Message sent to the MS by the
3520 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
3521 * If received from UMTS network, "data" is const char of 90 up to 1252
3522 * bytes which contain between 1 and 15 CBS Message pages sent as one
3523 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2.
3526 #define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
3529 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
3531 * Indicates that SMS storage on the RUIM is full. Messages
3532 * cannot be saved on the RUIM until space is freed.
3537 #define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
3540 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
3542 * Indicates a restricted state change (eg, for Domain Specific Access Control).
3544 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
3546 * "data" is an int *
3547 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
3549 #define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
3552 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
3554 * Indicates that the radio system selection module has
3555 * autonomously entered emergency callback mode.
3560 #define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
3563 * RIL_UNSOL_CDMA_CALL_WAITING
3565 * Called when CDMA radio receives a call waiting indication.
3567 * "data" is const RIL_CDMA_CallWaiting *
3570 #define RIL_UNSOL_CDMA_CALL_WAITING 1025
3573 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
3575 * Called when CDMA radio receives an update of the progress of an
3578 * "data" is const int *
3579 * For CDMA this is an integer OTASP/OTAPA status listed in
3580 * RIL_CDMA_OTA_ProvisionStatus.
3583 #define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
3586 * RIL_UNSOL_CDMA_INFO_REC
3588 * Called when CDMA radio receives one or more info recs.
3590 * "data" is const RIL_CDMA_InformationRecords *
3593 #define RIL_UNSOL_CDMA_INFO_REC 1027
3596 * RIL_UNSOL_OEM_HOOK_RAW
3598 * This is for OEM specific use.
3600 * "data" is a byte[]
3602 #define RIL_UNSOL_OEM_HOOK_RAW 1028
3605 * RIL_UNSOL_RINGBACK_TONE
3607 * Indicates that nework doesn't have in-band information, need to
3608 * play out-band tone.
3610 * "data" is an int *
3611 * ((int *)data)[0] == 0 for stop play ringback tone.
3612 * ((int *)data)[0] == 1 for start play ringback tone.
3614 #define RIL_UNSOL_RINGBACK_TONE 1029
3617 * RIL_UNSOL_RESEND_INCALL_MUTE
3619 * Indicates that framework/application need reset the uplink mute state.
3621 * There may be situations where the mute state becomes out of sync
3622 * between the application and device in some GSM infrastructures.
3626 #define RIL_UNSOL_RESEND_INCALL_MUTE 1030
3629 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
3631 * Called when CDMA subscription source changed.
3634 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3636 #define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
3639 * RIL_UNSOL_CDMA_PRL_CHANGED
3641 * Called when PRL (preferred roaming list) changes.
3644 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
3646 #define RIL_UNSOL_CDMA_PRL_CHANGED 1032
3649 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
3651 * Called when Emergency Callback Mode Ends
3653 * Indicates that the radio system selection module has
3654 * proactively exited emergency callback mode.
3659 #define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
3662 * RIL_UNSOL_RIL_CONNECTED
3664 * Called the ril connects and returns the version
3667 * ((int *)data)[0] is RIL_VERSION
3669 #define RIL_UNSOL_RIL_CONNECTED 1034
3671 /***********************************************************************/
3675 * RIL_Request Function pointer
3677 * @param request is one of RIL_REQUEST_*
3678 * @param data is pointer to data defined for that RIL_REQUEST_*
3679 * data is owned by caller, and should not be modified or freed by callee
3680 * @param t should be used in subsequent call to RIL_onResponse
3681 * @param datalen the length of data
3684 typedef void (*RIL_RequestFunc) (int request, void *data,
3685 size_t datalen, RIL_Token t);
3688 * This function should return the current radio state synchronously
3690 typedef RIL_RadioState (*RIL_RadioStateRequest)();
3693 * This function returns "1" if the specified RIL_REQUEST code is
3694 * supported and 0 if it is not
3696 * @param requestCode is one of RIL_REQUEST codes
3699 typedef int (*RIL_Supports)(int requestCode);
3702 * This function is called from a separate thread--not the
3703 * thread that calls RIL_RequestFunc--and indicates that a pending
3704 * request should be cancelled.
3706 * On cancel, the callee should do its best to abandon the request and
3707 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
3709 * Subsequent calls to RIL_onRequestComplete for this request with
3710 * other results will be tolerated but ignored. (That is, it is valid
3711 * to ignore the cancellation request)
3713 * RIL_Cancel calls should return immediately, and not wait for cancellation
3715 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
3718 * @param t token wants to be canceled
3721 typedef void (*RIL_Cancel)(RIL_Token t);
3723 typedef void (*RIL_TimedCallback) (void *param);
3726 * Return a version string for your RIL implementation
3728 typedef const char * (*RIL_GetVersion) (void);
3731 int version; /* set to RIL_VERSION */
3732 RIL_RequestFunc onRequest;
3733 RIL_RadioStateRequest onStateRequest;
3734 RIL_Supports supports;
3735 RIL_Cancel onCancel;
3736 RIL_GetVersion getVersion;
3737 } RIL_RadioFunctions;
3742 * "t" is parameter passed in on previous call to RIL_Notification
3745 * If "e" != SUCCESS, then response can be null/is ignored
3747 * "response" is owned by caller, and should not be modified or
3750 * RIL_onRequestComplete will return as soon as possible
3752 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
3753 void *response, size_t responselen);
3756 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
3757 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3759 * "data" is owned by caller, and should not be modified or freed by callee
3762 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
3766 * Call user-specifed "callback" function on on the same thread that
3767 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3768 * a relative time value at which the callback is invoked. If relativeTime is
3769 * NULL or points to a 0-filled structure, the callback will be invoked as
3773 void (*RequestTimedCallback) (RIL_TimedCallback callback,
3774 void *param, const struct timeval *relativeTime);
3779 * RIL implementations must defined RIL_Init
3780 * argc and argv will be command line arguments intended for the RIL implementation
3781 * Return NULL on error
3783 * @param env is environment point defined as RIL_Env
3784 * @param argc number of arguments
3785 * @param argv list fo arguments
3788 const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
3790 #else /* RIL_SHLIB */
3793 * Call this once at startup to register notification routine
3795 * @param callbacks user-specifed callback function
3797 void RIL_register (const RIL_RadioFunctions *callbacks);
3802 * RIL_onRequestComplete will return as soon as possible
3804 * @param t is parameter passed in on previous call to RIL_Notification
3806 * @param e error code
3807 * if "e" != SUCCESS, then response can be null/is ignored
3808 * @param response is owned by caller, and should not be modified or
3810 * @param responselen the length of response in byte
3812 void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
3813 void *response, size_t responselen);
3816 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
3817 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3818 * "data" is owned by caller, and should not be modified or freed by callee
3819 * @param datalen the length of data in byte
3822 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
3827 * Call user-specifed "callback" function on on the same thread that
3828 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3829 * a relative time value at which the callback is invoked. If relativeTime is
3830 * NULL or points to a 0-filled structure, the callback will be invoked as
3833 * @param callback user-specifed callback function
3834 * @param param parameter list
3835 * @param relativeTime a relative time value at which the callback is invoked
3838 void RIL_requestTimedCallback (RIL_TimedCallback callback,
3839 void *param, const struct timeval *relativeTime);
3842 #endif /* RIL_SHLIB */
3848 #endif /*ANDROID_RIL_H*/