blob: 72700d53d5f169afb2896826a76c706aba1e36c8 [file] [log] [blame]
paulye91d34712019-02-07 19:02:02 -08001/*
2 * Copyright (C) 2006 The Android Open Source Project
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17#ifndef ANDROID_RIL_H
18#define ANDROID_RIL_H 1
19
20#include <stdlib.h>
21#include <stdint.h>
22#include <telephony/ril_cdma_sms.h>
23#include <telephony/ril_nv_items.h>
24#include <telephony/ril_msim.h>
25
26#ifndef FEATURE_UNIT_TEST
27#include <sys/time.h>
28#endif /* !FEATURE_UNIT_TEST */
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#ifndef SIM_COUNT
35#if defined(ANDROID_SIM_COUNT_2)
36#define SIM_COUNT 2
37#elif defined(ANDROID_SIM_COUNT_3)
38#define SIM_COUNT 3
39#elif defined(ANDROID_SIM_COUNT_4)
40#define SIM_COUNT 4
41#else
42#define SIM_COUNT 1
43#endif
44
45#ifndef ANDROID_MULTI_SIM
46#define SIM_COUNT 1
47#endif
48#endif
49
50/*
51 * RIL version.
52 * Value of RIL_VERSION should not be changed in future. Here onwards,
53 * when a new change is supposed to be introduced which could involve new
54 * schemes added like Wakelocks, data structures added/updated, etc, we would
55 * just document RIL version associated with that change below. When OEM updates its
56 * RIL with those changes, they would return that new RIL version during RIL_REGISTER.
57 * We should make use of the returned version by vendor to identify appropriate scheme
58 * or data structure version to use.
59 *
60 * Documentation of RIL version and associated changes
61 * RIL_VERSION = 12 : This version corresponds to updated data structures namely
62 * RIL_Data_Call_Response_v11, RIL_SIM_IO_v6, RIL_CardStatus_v6,
63 * RIL_SimRefreshResponse_v7, RIL_CDMA_CallWaiting_v6,
64 * RIL_LTE_SignalStrength_v8, RIL_SignalStrength_v10, RIL_CellIdentityGsm_v12
65 * RIL_CellIdentityWcdma_v12, RIL_CellIdentityLte_v12,RIL_CellInfoGsm_v12,
66 * RIL_CellInfoWcdma_v12, RIL_CellInfoLte_v12, RIL_CellInfo_v12.
67 *
68 * RIL_VERSION = 13 : This version includes new wakelock semantics and as the first
69 * strongly versioned version it enforces structure use.
70 *
71 * RIL_VERSION = 14 : New data structures are added, namely RIL_CarrierMatchType,
72 * RIL_Carrier, RIL_CarrierRestrictions and RIL_PCO_Data.
73 * New commands added: RIL_REQUEST_SET_CARRIER_RESTRICTIONS,
74 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS and RIL_UNSOL_PCO_DATA.
75 *
76 * RIL_VERSION = 15 : New commands added:
77 * RIL_UNSOL_MODEM_RESTART,
78 * RIL_REQUEST_SEND_DEVICE_STATE,
79 * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER,
80 * RIL_REQUEST_SET_SIM_CARD_POWER,
81 * RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION,
82 * RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION
paulye91d34712019-02-07 19:02:02 -080083 * RIL_REQUEST_START_NETWORK_SCAN
84 * RIL_REQUEST_STOP_NETWORK_SCAN
85 * RIL_UNSOL_NETWORK_SCAN_RESULT
Nazanin Bakhshi25443002019-02-21 16:52:32 -080086 * RIL_REQUEST_GET_MODEM_STACK_STATUS
Nazanin Bakhshi42acd932019-02-27 15:05:39 -080087 * RIL_REQUEST_ENABLE_MODEM
sqian2e6e6c62019-02-26 16:55:02 -080088 * RIL_REQUEST_EMERGENCY_DIAL
Malcolm Chen4bb42072019-02-22 18:21:48 -080089 * RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS
Sarah Chinef7f9222020-01-30 10:37:08 -080090 * RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA
Malcolm Chenc2008a22019-11-12 18:43:09 -080091 * RIL_REQUEST_ENABLE_UICC_APPLICATIONS
92 * RIL_REQUEST_ARE_UICC_APPLICATIONS_ENABLED
Sarah Chinef7f9222020-01-30 10:37:08 -080093 * RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION
94 * RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE
95 * The new parameters for RIL_REQUEST_SETUP_DATA_CALL,
96 * Updated data structures: RIL_DataProfileInfo_v15, RIL_InitialAttachApn_v15,
97 * RIL_Data_Call_Response_v12.
98 * New data structure RIL_DataRegistrationStateResponse, RIL_OpenChannelParams,
99 * RIL_VoiceRegistrationStateResponse same is
100 * used in RIL_REQUEST_DATA_REGISTRATION_STATE and
101 * RIL_REQUEST_VOICE_REGISTRATION_STATE respectively.
paulye91d34712019-02-07 19:02:02 -0800102 */
103#define RIL_VERSION 12
104#define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
105#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
106
107#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
108#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
109
110#define MAX_RILDS 3
111#define MAX_SERVICE_NAME_LENGTH 6
112#define MAX_CLIENT_ID_LENGTH 2
113#define MAX_DEBUG_SOCKET_NAME_LENGTH 12
114#define MAX_QEMU_PIPE_NAME_LENGTH 11
115#define MAX_UUID_LENGTH 64
116#define MAX_BANDS 8
117#define MAX_CHANNELS 32
118#define MAX_RADIO_ACCESS_NETWORKS 8
119
120
121typedef void * RIL_Token;
122
123typedef enum {
124 RIL_SOCKET_1,
125#if (SIM_COUNT >= 2)
126 RIL_SOCKET_2,
127#if (SIM_COUNT >= 3)
128 RIL_SOCKET_3,
129#endif
130#if (SIM_COUNT >= 4)
131 RIL_SOCKET_4,
132#endif
133#endif
134 RIL_SOCKET_NUM
135} RIL_SOCKET_ID;
136
137
138typedef enum {
139 RIL_E_SUCCESS = 0,
140 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
141 RIL_E_GENERIC_FAILURE = 2,
142 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
143 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
144 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
145 RIL_E_REQUEST_NOT_SUPPORTED = 6,
146 RIL_E_CANCELLED = 7,
147 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
148 call on a Class C GPRS device */
149 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
150 registers in network */
151 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
152 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
153 shall be retrieved because of SIM or RUIM
154 card absent */
155 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
156 location */
157 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
158 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
159 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
160 illegal SIM or ME */
161 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
162 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
163 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
164 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
165 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
166 data */
167 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
168 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
169 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
170 request */
171 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
172 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
173 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
174 RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */
175 RIL_E_LCE_NOT_SUPPORTED = 36, /* LCE service not supported(36 in RILConstants.java) */
176 RIL_E_NO_MEMORY = 37, /* Not sufficient memory to process the request */
177 RIL_E_INTERNAL_ERR = 38, /* Modem hit unexpected error scenario while handling
178 this request */
179 RIL_E_SYSTEM_ERR = 39, /* Hit platform or system error */
180 RIL_E_MODEM_ERR = 40, /* Vendor RIL got unexpected or incorrect response
181 from modem for this request */
182 RIL_E_INVALID_STATE = 41, /* Unexpected request for the current state */
183 RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */
184 RIL_E_SIM_ERR = 43, /* Received error from SIM card */
185 RIL_E_INVALID_ARGUMENTS = 44, /* Received invalid arguments in request */
186 RIL_E_INVALID_SIM_STATE = 45, /* Can not process the request in current SIM state */
187 RIL_E_INVALID_MODEM_STATE = 46, /* Can not process the request in current Modem state */
188 RIL_E_INVALID_CALL_ID = 47, /* Received invalid call id in request */
189 RIL_E_NO_SMS_TO_ACK = 48, /* ACK received when there is no SMS to ack */
190 RIL_E_NETWORK_ERR = 49, /* Received error from network */
191 RIL_E_REQUEST_RATE_LIMITED = 50, /* Operation denied due to overly-frequent requests */
192 RIL_E_SIM_BUSY = 51, /* SIM is busy */
193 RIL_E_SIM_FULL = 52, /* The target EF is full */
194 RIL_E_NETWORK_REJECT = 53, /* Request is rejected by network */
195 RIL_E_OPERATION_NOT_ALLOWED = 54, /* Not allowed the request now */
196 RIL_E_EMPTY_RECORD = 55, /* The request record is empty */
197 RIL_E_INVALID_SMS_FORMAT = 56, /* Invalid sms format */
198 RIL_E_ENCODING_ERR = 57, /* Message not encoded properly */
199 RIL_E_INVALID_SMSC_ADDRESS = 58, /* SMSC address specified is invalid */
200 RIL_E_NO_SUCH_ENTRY = 59, /* No such entry present to perform the request */
201 RIL_E_NETWORK_NOT_READY = 60, /* Network is not ready to perform the request */
202 RIL_E_NOT_PROVISIONED = 61, /* Device doesnot have this value provisioned */
203 RIL_E_NO_SUBSCRIPTION = 62, /* Device doesnot have subscription */
204 RIL_E_NO_NETWORK_FOUND = 63, /* Network cannot be found */
205 RIL_E_DEVICE_IN_USE = 64, /* Operation cannot be performed because the device
206 is currently in use */
207 RIL_E_ABORTED = 65, /* Operation aborted */
208 RIL_E_INVALID_RESPONSE = 66, /* Invalid response sent by vendor code */
209 // OEM specific error codes. To be used by OEM when they don't want to reveal
210 // specific error codes which would be replaced by Generic failure.
211 RIL_E_OEM_ERROR_1 = 501,
212 RIL_E_OEM_ERROR_2 = 502,
213 RIL_E_OEM_ERROR_3 = 503,
214 RIL_E_OEM_ERROR_4 = 504,
215 RIL_E_OEM_ERROR_5 = 505,
216 RIL_E_OEM_ERROR_6 = 506,
217 RIL_E_OEM_ERROR_7 = 507,
218 RIL_E_OEM_ERROR_8 = 508,
219 RIL_E_OEM_ERROR_9 = 509,
220 RIL_E_OEM_ERROR_10 = 510,
221 RIL_E_OEM_ERROR_11 = 511,
222 RIL_E_OEM_ERROR_12 = 512,
223 RIL_E_OEM_ERROR_13 = 513,
224 RIL_E_OEM_ERROR_14 = 514,
225 RIL_E_OEM_ERROR_15 = 515,
226 RIL_E_OEM_ERROR_16 = 516,
227 RIL_E_OEM_ERROR_17 = 517,
228 RIL_E_OEM_ERROR_18 = 518,
229 RIL_E_OEM_ERROR_19 = 519,
230 RIL_E_OEM_ERROR_20 = 520,
231 RIL_E_OEM_ERROR_21 = 521,
232 RIL_E_OEM_ERROR_22 = 522,
233 RIL_E_OEM_ERROR_23 = 523,
234 RIL_E_OEM_ERROR_24 = 524,
235 RIL_E_OEM_ERROR_25 = 525
236} RIL_Errno;
237
238typedef enum {
239 RIL_CALL_ACTIVE = 0,
240 RIL_CALL_HOLDING = 1,
241 RIL_CALL_DIALING = 2, /* MO call only */
242 RIL_CALL_ALERTING = 3, /* MO call only */
243 RIL_CALL_INCOMING = 4, /* MT call only */
244 RIL_CALL_WAITING = 5 /* MT call only */
245} RIL_CallState;
246
247typedef enum {
248 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
249 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
250 RADIO_STATE_ON = 10 /* Radio is on */
251} RIL_RadioState;
252
253typedef enum {
254 RADIO_TECH_UNKNOWN = 0,
255 RADIO_TECH_GPRS = 1,
256 RADIO_TECH_EDGE = 2,
257 RADIO_TECH_UMTS = 3,
258 RADIO_TECH_IS95A = 4,
259 RADIO_TECH_IS95B = 5,
260 RADIO_TECH_1xRTT = 6,
261 RADIO_TECH_EVDO_0 = 7,
262 RADIO_TECH_EVDO_A = 8,
263 RADIO_TECH_HSDPA = 9,
264 RADIO_TECH_HSUPA = 10,
265 RADIO_TECH_HSPA = 11,
266 RADIO_TECH_EVDO_B = 12,
267 RADIO_TECH_EHRPD = 13,
268 RADIO_TECH_LTE = 14,
269 RADIO_TECH_HSPAP = 15, // HSPA+
270 RADIO_TECH_GSM = 16, // Only supports voice
271 RADIO_TECH_TD_SCDMA = 17,
272 RADIO_TECH_IWLAN = 18,
273 RADIO_TECH_LTE_CA = 19
274} RIL_RadioTechnology;
275
276typedef enum {
277 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
278 RAF_GPRS = (1 << RADIO_TECH_GPRS),
279 RAF_EDGE = (1 << RADIO_TECH_EDGE),
280 RAF_UMTS = (1 << RADIO_TECH_UMTS),
281 RAF_IS95A = (1 << RADIO_TECH_IS95A),
282 RAF_IS95B = (1 << RADIO_TECH_IS95B),
283 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
284 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
285 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
286 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
287 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
288 RAF_HSPA = (1 << RADIO_TECH_HSPA),
289 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
290 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
291 RAF_LTE = (1 << RADIO_TECH_LTE),
292 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
293 RAF_GSM = (1 << RADIO_TECH_GSM),
294 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
295 RAF_LTE_CA = (1 << RADIO_TECH_LTE_CA)
296} RIL_RadioAccessFamily;
297
298typedef enum {
299 BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically)
300 BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
301 BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
302 BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000)
303 BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
304 BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
305 BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band)
306 BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band)
307 BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band)
308 BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band)
309 BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band)
310 BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band)
311 BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band)
312 BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band)
313 BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band)
314 BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band)
315 BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band)
316 BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band)
317 BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band)
318} RIL_RadioBandMode;
319
320typedef enum {
321 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
322 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
323 // forthcoming with these same parameters
324 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
325 // RIL_RadioCapability.status = 0, if any START's fail no
326 // APPLY will be sent
327 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
328 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
329 // occurs in any previous command the RIL_RadioAccessesFamily and
330 // logicalModemUuid fields will be the prior configuration thus
331 // restoring the configuration to the previous value. An error
332 // returned by this command will generally be ignored or may
333 // cause that logical modem to be removed from service.
334} RadioCapabilityPhase;
335
336typedef enum {
337 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
338 // RC_PHASE_APPLY
339 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
340 // capability was success with RC_PHASE_FINISH
341 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
342 // capability is fail with RC_PHASE_FINISH.
343} RadioCapabilityStatus;
344
345#define RIL_RADIO_CAPABILITY_VERSION 1
346typedef struct {
347 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
348 int session; // Unique session value defined by framework returned in all "responses/unsol"
349 int phase; // CONFIGURED, START, APPLY, FINISH
350 int rat; // RIL_RadioAccessFamily for the radio
351 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
352 int status; // Return status and an input parameter for RC_PHASE_FINISH
353} RIL_RadioCapability;
354
355// Do we want to split Data from Voice and the use
356// RIL_RadioTechnology for get/setPreferredVoice/Data ?
357typedef enum {
358 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
359 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
360 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
361 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
362 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
363 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
364 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
365 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
366 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
367 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
368 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
369 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
370 PREF_NET_TYPE_LTE_WCDMA = 12, /* LTE/WCDMA */
371 PREF_NET_TYPE_TD_SCDMA_ONLY = 13, /* TD-SCDMA only */
372 PREF_NET_TYPE_TD_SCDMA_WCDMA = 14, /* TD-SCDMA and WCDMA */
373 PREF_NET_TYPE_TD_SCDMA_LTE = 15, /* TD-SCDMA and LTE */
374 PREF_NET_TYPE_TD_SCDMA_GSM = 16, /* TD-SCDMA and GSM */
375 PREF_NET_TYPE_TD_SCDMA_GSM_LTE = 17, /* TD-SCDMA,GSM and LTE */
376 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA = 18, /* TD-SCDMA, GSM/WCDMA */
377 PREF_NET_TYPE_TD_SCDMA_WCDMA_LTE = 19, /* TD-SCDMA, WCDMA and LTE */
378 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_LTE = 20, /* TD-SCDMA, GSM/WCDMA and LTE */
379 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_CDMA_EVDO_AUTO = 21, /* TD-SCDMA, GSM/WCDMA, CDMA and EvDo */
380 PREF_NET_TYPE_TD_SCDMA_LTE_CDMA_EVDO_GSM_WCDMA = 22 /* TD-SCDMA, LTE, CDMA, EvDo GSM/WCDMA */
381} RIL_PreferredNetworkType;
382
383/* Source for cdma subscription */
384typedef enum {
385 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
386 CDMA_SUBSCRIPTION_SOURCE_NV = 1
387} RIL_CdmaSubscriptionSource;
388
389/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
390typedef enum {
391 RIL_UUS_TYPE1_IMPLICIT = 0,
392 RIL_UUS_TYPE1_REQUIRED = 1,
393 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
394 RIL_UUS_TYPE2_REQUIRED = 3,
395 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
396 RIL_UUS_TYPE3_REQUIRED = 5,
397 RIL_UUS_TYPE3_NOT_REQUIRED = 6
398} RIL_UUS_Type;
399
400/* User-to-User Signaling Information data coding schemes. Possible values for
401 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
402 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
403typedef enum {
404 RIL_UUS_DCS_USP = 0, /* User specified protocol */
405 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
406 RIL_UUS_DCS_X244 = 2, /* X.244 */
407 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
408 convergence function */
409 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
410} RIL_UUS_DCS;
411
412/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
413 * This data is passed in RIL_ExtensionRecord and rec contains this
414 * structure when type is RIL_UUS_INFO_EXT_REC */
415typedef struct {
416 RIL_UUS_Type uusType; /* UUS Type */
417 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
418 int uusLength; /* Length of UUS Data */
419 char * uusData; /* UUS Data */
420} RIL_UUS_Info;
421
422/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
423typedef struct {
424 char isPresent; /* non-zero if signal information record is present */
425 char signalType; /* as defined 3.7.5.5-1 */
426 char alertPitch; /* as defined 3.7.5.5-2 */
427 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
428} RIL_CDMA_SignalInfoRecord;
429
430typedef struct {
431 RIL_CallState state;
432 int index; /* Connection Index for use with, eg, AT+CHLD */
433 int toa; /* type of address, eg 145 = intl */
434 char isMpty; /* nonzero if is mpty call */
435 char isMT; /* nonzero if call is mobile terminated */
436 char als; /* ALS line indicator if available
437 (0 = line 1) */
438 char isVoice; /* nonzero if this is is a voice call */
439 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
440 char * number; /* Remote party number */
441 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
442 char * name; /* Remote party name */
443 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
444 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
445} RIL_Call;
446
447/* Deprecated, use RIL_Data_Call_Response_v6 */
448typedef struct {
449 int cid; /* Context ID, uniquely identifies this call */
450 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
451 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
452 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
453 char * apn; /* ignored */
454 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
455} RIL_Data_Call_Response_v4;
456
457/*
458 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
459 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
460 */
461typedef struct {
462 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
463 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
464 back-off timer value RIL wants to override the one
465 pre-configured in FW.
466 The unit is miliseconds.
467 The value < 0 means no value is suggested.
468 The value 0 means retry should be done ASAP.
469 The value of INT_MAX(0x7fffffff) means no retry. */
470 int cid; /* Context ID, uniquely identifies this call */
471 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
472 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
473 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
474 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
475 such as "IP" or "IPV6" */
476 char * ifname; /* The network interface name */
477 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
478 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
479 May not be empty, typically 1 IPv4 or 1 IPv6 or
480 one of each. If the prefix length is absent the addresses
481 are assumed to be point to point with IPv4 having a prefix
482 length of 32 and IPv6 128. */
483 char * dnses; /* A space-delimited list of DNS server addresses,
484 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
485 May be empty. */
486 char * gateways; /* A space-delimited list of default gateway addresses,
487 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
488 May be empty in which case the addresses represent point
489 to point connections. */
490} RIL_Data_Call_Response_v6;
491
492typedef struct {
493 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
494 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
495 back-off timer value RIL wants to override the one
496 pre-configured in FW.
497 The unit is miliseconds.
498 The value < 0 means no value is suggested.
499 The value 0 means retry should be done ASAP.
500 The value of INT_MAX(0x7fffffff) means no retry. */
501 int cid; /* Context ID, uniquely identifies this call */
502 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
503 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
504 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
505 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
506 such as "IP" or "IPV6" */
507 char * ifname; /* The network interface name */
508 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
509 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
510 May not be empty, typically 1 IPv4 or 1 IPv6 or
511 one of each. If the prefix length is absent the addresses
512 are assumed to be point to point with IPv4 having a prefix
513 length of 32 and IPv6 128. */
514 char * dnses; /* A space-delimited list of DNS server addresses,
515 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
516 May be empty. */
517 char * gateways; /* A space-delimited list of default gateway addresses,
518 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
519 May be empty in which case the addresses represent point
520 to point connections. */
521 char * pcscf; /* the Proxy Call State Control Function address
522 via PCO(Protocol Configuration Option) for IMS client. */
523} RIL_Data_Call_Response_v9;
524
525typedef struct {
526 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
527 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
528 back-off timer value RIL wants to override the one
529 pre-configured in FW.
530 The unit is miliseconds.
531 The value < 0 means no value is suggested.
532 The value 0 means retry should be done ASAP.
533 The value of INT_MAX(0x7fffffff) means no retry. */
534 int cid; /* Context ID, uniquely identifies this call */
535 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
536 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
537 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
538 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
539 such as "IP" or "IPV6" */
540 char * ifname; /* The network interface name */
541 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
542 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
543 May not be empty, typically 1 IPv4 or 1 IPv6 or
544 one of each. If the prefix length is absent the addresses
545 are assumed to be point to point with IPv4 having a prefix
546 length of 32 and IPv6 128. */
547 char * dnses; /* A space-delimited list of DNS server addresses,
548 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
549 May be empty. */
550 char * gateways; /* A space-delimited list of default gateway addresses,
551 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
552 May be empty in which case the addresses represent point
553 to point connections. */
554 char * pcscf; /* the Proxy Call State Control Function address
555 via PCO(Protocol Configuration Option) for IMS client. */
556 int mtu; /* MTU received from network
557 Value <= 0 means network has either not sent a value or
558 sent an invalid value */
559} RIL_Data_Call_Response_v11;
560
Sarah Chin9ecfc322020-01-16 10:35:02 -0800561typedef struct {
562 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
563 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
564 back-off timer value RIL wants to override the one
565 pre-configured in FW.
566 The unit is milliseconds.
567 The value < 0 means no value is suggested.
568 The value 0 means retry should be done ASAP.
569 The value of INT_MAX(0x7fffffff) means no retry. */
570 int cid; /* Context ID, uniquely identifies this call */
571 int active; /* 0=inactive, 1=active/physical link down,
572 2=active/physical link up */
573 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
574 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
575 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
576 such as "IP" or "IPV6" */
577 char * ifname; /* The network interface name */
578 char * addresses; /* A space-delimited list of addresses with optional "/" prefix
579 length, e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
580 May not be empty, typically 1 IPv4 or 1 IPv6 or
581 one of each. If the prefix length is absent the addresses
582 are assumed to be point to point with IPv4 having a prefix
583 length of 32 and IPv6 128. */
584 char * dnses; /* A space-delimited list of DNS server addresses,
585 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
586 May be empty. */
587 char * gateways; /* A space-delimited list of default gateway addresses,
588 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
589 May be empty in which case the addresses represent point
590 to point connections. */
591 char * pcscf; /* the Proxy Call State Control Function address
592 via PCO(Protocol Configuration Option) for IMS client. */
593 int mtuV4; /* MTU received from network for IPv4.
594 Value <= 0 means network has either not sent a value or
595 sent an invalid value. */
596 int mtuV6; /* MTU received from network for IPv6.
597 Value <= 0 means network has either not sent a value or
598 sent an invalid value. */
599} RIL_Data_Call_Response_v12;
600
paulye91d34712019-02-07 19:02:02 -0800601typedef enum {
602 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
603 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
604} RIL_RadioTechnologyFamily;
605
606typedef struct {
607 RIL_RadioTechnologyFamily tech;
608 unsigned char retry; /* 0 == not retry, nonzero == retry */
609 int messageRef; /* Valid field if retry is set to nonzero.
610 Contains messageRef from RIL_SMS_Response
611 corresponding to failed MO SMS.
612 */
613
614 union {
615 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
616 RIL_CDMA_SMS_Message* cdmaMessage;
617
618 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
619 char** gsmMessage; /* This is an array of pointers where pointers
620 are contiguous but elements pointed by those pointers
621 are not contiguous
622 */
623 } message;
624} RIL_IMS_SMS_Message;
625
626typedef struct {
627 int messageRef; /* TP-Message-Reference for GSM,
628 and BearerData MessageId for CDMA
629 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
630 char *ackPDU; /* or NULL if n/a */
631 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
632 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
633 -1 if unknown or not applicable*/
634} RIL_SMS_Response;
635
636/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
637typedef struct {
638 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
639 /* 0 = "REC UNREAD" */
640 /* 1 = "REC READ" */
641 /* 2 = "STO UNSENT" */
642 /* 3 = "STO SENT" */
643 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
644 the TP-layer length is "strlen(pdu)/2". */
645 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
646 (as expected by TS 27.005) or NULL for default SMSC */
647} RIL_SMS_WriteArgs;
648
649/** Used by RIL_REQUEST_DIAL */
650typedef struct {
651 char * address;
652 int clir;
653 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
654 * clir == 0 on "use subscription default value"
655 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
656 * clir == 2 on "CLIR suppression" (allow CLI presentation)
657 */
658 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
659} RIL_Dial;
660
661typedef struct {
662 int command; /* one of the commands listed for TS 27.007 +CRSM*/
663 int fileid; /* EF id */
664 char *path; /* "pathid" from TS 27.007 +CRSM command.
665 Path is in hex asciii format eg "7f205f70"
666 Path must always be provided.
667 */
668 int p1;
669 int p2;
670 int p3;
671 char *data; /* May be NULL*/
672 char *pin2; /* May be NULL*/
673} RIL_SIM_IO_v5;
674
675typedef struct {
676 int command; /* one of the commands listed for TS 27.007 +CRSM*/
677 int fileid; /* EF id */
678 char *path; /* "pathid" from TS 27.007 +CRSM command.
679 Path is in hex asciii format eg "7f205f70"
680 Path must always be provided.
681 */
682 int p1;
683 int p2;
684 int p3;
685 char *data; /* May be NULL*/
686 char *pin2; /* May be NULL*/
687 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
688} RIL_SIM_IO_v6;
689
690/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
691 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
692typedef struct {
693 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
694 ignored for +CSIM command. */
695
696 /* Following fields are used to derive the APDU ("command" and "length"
697 values in TS 27.007 +CSIM and +CGLA commands). */
698 int cla;
699 int instruction;
700 int p1;
701 int p2;
702 int p3; /* A negative P3 implies a 4 byte APDU. */
703 char *data; /* May be NULL. In hex string format. */
704} RIL_SIM_APDU;
705
706typedef struct {
707 int sw1;
708 int sw2;
709 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
710 response for which it is in Base64 format, see 3GPP TS 31.102 7.1.2 */
711} RIL_SIM_IO_Response;
712
713/* See also com.android.internal.telephony.gsm.CallForwardInfo */
714
715typedef struct {
716 int status; /*
717 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
718 * status 1 = active, 0 = not active
719 *
720 * For RIL_REQUEST_SET_CALL_FORWARD:
721 * status is:
722 * 0 = disable
723 * 1 = enable
724 * 2 = interrogate
725 * 3 = registeration
726 * 4 = erasure
727 */
728
729 int reason; /* from TS 27.007 7.11 "reason" */
730 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
731 See table for Android mapping from
732 MMI service code
733 0 means user doesn't input class */
734 int toa; /* "type" from TS 27.007 7.11 */
735 char * number; /* "number" from TS 27.007 7.11. May be NULL */
736 int timeSeconds; /* for CF no reply only */
737}RIL_CallForwardInfo;
738
739typedef struct {
740 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
741 * Upper 16 bits is LAC and lower 16 bits
742 * is CID (as described in TS 27.005)
743 * Primary Scrambling Code (as described in TS 25.331)
744 * in 9 bits in UMTS
745 * Valid values are hexadecimal 0x0000 - 0xffffffff.
746 */
747 int rssi; /* Received RSSI in GSM,
748 * Level index of CPICH Received Signal Code Power in UMTS
749 */
750} RIL_NeighboringCell;
751
752typedef struct {
753 char lce_status; /* LCE service status:
754 * -1 = not supported;
755 * 0 = stopped;
756 * 1 = active.
757 */
758 unsigned int actual_interval_ms; /* actual LCE reporting interval,
759 * meaningful only if LCEStatus = 1.
760 */
761} RIL_LceStatusInfo;
762
763typedef struct {
764 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
765 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
766 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
767 * moves to inactive state or network type change)
768 * 1 = suspended;
769 * 0 = not suspended.
770 */
771} RIL_LceDataInfo;
772
773typedef enum {
774 RIL_MATCH_ALL = 0, /* Apply to all carriers with the same mcc/mnc */
775 RIL_MATCH_SPN = 1, /* Use SPN and mcc/mnc to identify the carrier */
776 RIL_MATCH_IMSI_PREFIX = 2, /* Use IMSI prefix and mcc/mnc to identify the carrier */
777 RIL_MATCH_GID1 = 3, /* Use GID1 and mcc/mnc to identify the carrier */
778 RIL_MATCH_GID2 = 4, /* Use GID2 and mcc/mnc to identify the carrier */
779} RIL_CarrierMatchType;
780
781typedef struct {
782 const char * mcc;
783 const char * mnc;
784 RIL_CarrierMatchType match_type; /* Specify match type for the carrier.
785 * If it’s RIL_MATCH_ALL, match_data is null;
786 * otherwise, match_data is the value for the match type.
787 */
788 const char * match_data;
789} RIL_Carrier;
790
791typedef struct {
792 int32_t len_allowed_carriers; /* length of array allowed_carriers */
793 int32_t len_excluded_carriers; /* length of array excluded_carriers */
794 RIL_Carrier * allowed_carriers; /* whitelist for allowed carriers */
795 RIL_Carrier * excluded_carriers; /* blacklist for explicitly excluded carriers
796 * which match allowed_carriers. Eg. allowed_carriers match
797 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1
798 * is ABCD. It means except the carrier whose gid1 is ABCD,
799 * all carriers with the same mcc/mnc are allowed.
800 */
801} RIL_CarrierRestrictions;
802
Michelee218c362019-02-27 22:48:48 -0800803typedef enum {
804 NO_MULTISIM_POLICY = 0, /* configuration applies to each slot independently. */
805 ONE_VALID_SIM_MUST_BE_PRESENT = 1, /* Any SIM card can be used as far as one valid card is
806 * present in the device.
807 */
808} RIL_SimLockMultiSimPolicy;
809
810typedef struct {
811 int32_t len_allowed_carriers; /* length of array allowed_carriers */
812 int32_t len_excluded_carriers; /* length of array excluded_carriers */
813 RIL_Carrier * allowed_carriers; /* whitelist for allowed carriers */
814 RIL_Carrier * excluded_carriers; /* blacklist for explicitly excluded carriers
815 * which match allowed_carriers. Eg. allowed_carriers match
816 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1
817 * is ABCD. It means except the carrier whose gid1 is ABCD,
818 * all carriers with the same mcc/mnc are allowed.
819 */
820 int allowedCarriersPrioritized; /* allowed list prioritized */
821 RIL_SimLockMultiSimPolicy multiSimPolicy; /* multisim policy */
822} RIL_CarrierRestrictionsWithPriority;
823
paulye91d34712019-02-07 19:02:02 -0800824typedef struct {
825 char * mcc; /* MCC of the Carrier. */
826 char * mnc ; /* MNC of the Carrier. */
827 uint8_t * carrierKey; /* Public Key from the Carrier used to encrypt the
828 * IMSI/IMPI.
829 */
830 int32_t carrierKeyLength; /* Length of the Public Key. */
831 char * keyIdentifier; /* The keyIdentifier Attribute value pair that helps
832 * a server locate the private key to decrypt the
833 * permanent identity.
834 */
835 int64_t expirationTime; /* Date-Time (in UTC) when the key will expire. */
836
837} RIL_CarrierInfoForImsiEncryption;
838
839/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
840typedef enum {
841 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
842 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
843 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
844 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
845 CALL_FAIL_NORMAL = 16,
846 CALL_FAIL_BUSY = 17,
847 CALL_FAIL_NO_USER_RESPONDING = 18,
848 CALL_FAIL_NO_ANSWER_FROM_USER = 19,
849 CALL_FAIL_CALL_REJECTED = 21,
850 CALL_FAIL_NUMBER_CHANGED = 22,
851 CALL_FAIL_PREEMPTION = 25,
852 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
853 CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
854 CALL_FAIL_FACILITY_REJECTED = 29,
855 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
856 CALL_FAIL_NORMAL_UNSPECIFIED = 31,
857 CALL_FAIL_CONGESTION = 34,
858 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
859 CALL_FAIL_TEMPORARY_FAILURE = 41,
860 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
861 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
862 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
863 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
864 CALL_FAIL_QOS_UNAVAILABLE = 49,
865 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
866 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
867 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
868 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
869 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
870 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
871 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
872 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
873 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
874 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
875 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
876 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
877 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
878 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
879 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
880 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
881 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
882 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
883 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
884 CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
885 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
886 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
887 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
888 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
889 CALL_FAIL_CALL_BARRED = 240,
890 CALL_FAIL_FDN_BLOCKED = 241,
891 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
892 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
893 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
894 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
895 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
896 CALL_FAIL_RADIO_OFF = 247, /* Radio is OFF */
897 CALL_FAIL_OUT_OF_SERVICE = 248, /* No cellular coverage */
898 CALL_FAIL_NO_VALID_SIM = 249, /* No valid SIM is present */
899 CALL_FAIL_RADIO_INTERNAL_ERROR = 250, /* Internal error at Modem */
900 CALL_FAIL_NETWORK_RESP_TIMEOUT = 251, /* No response from network */
901 CALL_FAIL_NETWORK_REJECT = 252, /* Explicit network reject */
902 CALL_FAIL_RADIO_ACCESS_FAILURE = 253, /* RRC connection failure. Eg.RACH */
903 CALL_FAIL_RADIO_LINK_FAILURE = 254, /* Radio Link Failure */
904 CALL_FAIL_RADIO_LINK_LOST = 255, /* Radio link lost due to poor coverage */
905 CALL_FAIL_RADIO_UPLINK_FAILURE = 256, /* Radio uplink failure */
906 CALL_FAIL_RADIO_SETUP_FAILURE = 257, /* RRC connection setup failure */
907 CALL_FAIL_RADIO_RELEASE_NORMAL = 258, /* RRC connection release, normal */
908 CALL_FAIL_RADIO_RELEASE_ABNORMAL = 259, /* RRC connection release, abnormal */
909 CALL_FAIL_ACCESS_CLASS_BLOCKED = 260, /* Access class barring */
910 CALL_FAIL_NETWORK_DETACH = 261, /* Explicit network detach */
911 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
912 CALL_FAIL_CDMA_DROP = 1001,
913 CALL_FAIL_CDMA_INTERCEPT = 1002,
914 CALL_FAIL_CDMA_REORDER = 1003,
915 CALL_FAIL_CDMA_SO_REJECT = 1004,
916 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
917 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
918 CALL_FAIL_CDMA_PREEMPTED = 1007,
919 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
920 during emergency callback mode */
921 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
922
923 /* OEM specific error codes. Used to distinguish error from
924 * CALL_FAIL_ERROR_UNSPECIFIED and help assist debugging */
925 CALL_FAIL_OEM_CAUSE_1 = 0xf001,
926 CALL_FAIL_OEM_CAUSE_2 = 0xf002,
927 CALL_FAIL_OEM_CAUSE_3 = 0xf003,
928 CALL_FAIL_OEM_CAUSE_4 = 0xf004,
929 CALL_FAIL_OEM_CAUSE_5 = 0xf005,
930 CALL_FAIL_OEM_CAUSE_6 = 0xf006,
931 CALL_FAIL_OEM_CAUSE_7 = 0xf007,
932 CALL_FAIL_OEM_CAUSE_8 = 0xf008,
933 CALL_FAIL_OEM_CAUSE_9 = 0xf009,
934 CALL_FAIL_OEM_CAUSE_10 = 0xf00a,
935 CALL_FAIL_OEM_CAUSE_11 = 0xf00b,
936 CALL_FAIL_OEM_CAUSE_12 = 0xf00c,
937 CALL_FAIL_OEM_CAUSE_13 = 0xf00d,
938 CALL_FAIL_OEM_CAUSE_14 = 0xf00e,
939 CALL_FAIL_OEM_CAUSE_15 = 0xf00f,
940
941 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
942 vendor code should make sure to map error
943 code to specific error */
944} RIL_LastCallFailCause;
945
946typedef struct {
947 RIL_LastCallFailCause cause_code;
948 char * vendor_cause;
949} RIL_LastCallFailCauseInfo;
950
951/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
952typedef enum {
953 PDP_FAIL_NONE = 0, /* No error, connection ok */
954
955 /* an integer cause code defined in TS 24.008
956 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
957 If the implementation does not have access to the exact cause codes,
958 then it should return one of the following values,
959 as the UI layer needs to distinguish these
960 cases for error notification and potential retries. */
961 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
962 PDP_FAIL_NAS_SIGNALLING = 0x0E,
963 PDP_FAIL_LLC_SNDCP = 0x19,
964 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
965 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
966 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
967 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
968 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
969 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
970 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
971 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
972 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
973 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
974 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
975 based on framework config */
976 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
977 PDP_FAIL_NETWORK_FAILURE = 0x26,
978 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
979 PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
980 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
981 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
982 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
983 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
984 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
985 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
986 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
987 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
988 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
989 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
990 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
991 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
992 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
993 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
994 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
995 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
996 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
997 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
998 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
999 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
1000 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
1001 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
1002 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
1003 PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
1004 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
1005 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
1006 PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
1007 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
1008 PDP_FAIL_IFACE_MISMATCH = 0x75,
1009 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
1010 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
1011 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
1012 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
1013 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
1014
1015 // OEM specific error codes. To be used by OEMs when they don't want to
1016 // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
1017 PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001,
1018 PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002,
1019 PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003,
1020 PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004,
1021 PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005,
1022 PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006,
1023 PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007,
1024 PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008,
1025 PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009,
1026 PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A,
1027 PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B,
1028 PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C,
1029 PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D,
1030 PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E,
1031 PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F,
1032
1033 /* Not mentioned in the specification */
1034 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
1035 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
1036
1037 /* reasons for data call drop - network/modem disconnect */
1038 PDP_FAIL_SIGNAL_LOST = -3,
1039 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
1040 with parameters appropriate for new technology */
1041 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
1042 powered off - no retry */
1043 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
1044 mode was up on same APN/data profile - no retry until
1045 tethered call is off */
1046
1047 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
1048 new error codes are added making this unnecessary */
1049} RIL_DataCallFailCause;
1050
1051/* See RIL_REQUEST_SETUP_DATA_CALL */
1052typedef enum {
1053 RIL_DATA_PROFILE_DEFAULT = 0,
1054 RIL_DATA_PROFILE_TETHERED = 1,
1055 RIL_DATA_PROFILE_IMS = 2,
1056 RIL_DATA_PROFILE_FOTA = 3,
1057 RIL_DATA_PROFILE_CBS = 4,
1058 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
1059 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
1060} RIL_DataProfile;
1061
1062/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
1063typedef struct {
1064 int notificationType; /*
1065 * 0 = MO intermediate result code
1066 * 1 = MT unsolicited result code
1067 */
1068 int code; /* See 27.007 7.17
1069 "code1" for MO
1070 "code2" for MT. */
1071 int index; /* CUG index. See 27.007 7.17. */
1072 int type; /* "type" from 27.007 7.17 (MT only). */
1073 char * number; /* "number" from 27.007 7.17
1074 (MT only, may be NULL). */
1075} RIL_SuppSvcNotification;
1076
1077#define RIL_CARD_MAX_APPS 8
1078
1079typedef enum {
1080 RIL_CARDSTATE_ABSENT = 0,
1081 RIL_CARDSTATE_PRESENT = 1,
1082 RIL_CARDSTATE_ERROR = 2,
1083 RIL_CARDSTATE_RESTRICTED = 3 /* card is present but not usable due to carrier restrictions.*/
1084} RIL_CardState;
1085
1086typedef enum {
1087 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
1088 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
1089 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
1090 since each app can only have 1 active perso
1091 involved */
1092 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
1093 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
1094 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
1095 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
1096 RIL_PERSOSUBSTATE_SIM_SIM = 7,
1097 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
1098 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
1099 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
1100 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
1101 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
1102 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
1103 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
1104 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
1105 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
1106 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
1107 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
1108 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
1109 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
1110 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
1111 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
1112 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
1113 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
1114} RIL_PersoSubstate;
1115
1116typedef enum {
1117 RIL_APPSTATE_UNKNOWN = 0,
1118 RIL_APPSTATE_DETECTED = 1,
1119 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
1120 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
1121 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
1122 when app_state is assigned to this value */
1123 RIL_APPSTATE_READY = 5
1124} RIL_AppState;
1125
1126typedef enum {
1127 RIL_PINSTATE_UNKNOWN = 0,
1128 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
1129 RIL_PINSTATE_ENABLED_VERIFIED = 2,
1130 RIL_PINSTATE_DISABLED = 3,
1131 RIL_PINSTATE_ENABLED_BLOCKED = 4,
1132 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
1133} RIL_PinState;
1134
1135typedef enum {
1136 RIL_APPTYPE_UNKNOWN = 0,
1137 RIL_APPTYPE_SIM = 1,
1138 RIL_APPTYPE_USIM = 2,
1139 RIL_APPTYPE_RUIM = 3,
1140 RIL_APPTYPE_CSIM = 4,
1141 RIL_APPTYPE_ISIM = 5
1142} RIL_AppType;
1143
1144/*
1145 * Please note that registration state UNKNOWN is
1146 * treated as "out of service" in the Android telephony.
1147 * Registration state REG_DENIED must be returned if Location Update
1148 * Reject (with cause 17 - Network Failure) is received
1149 * repeatedly from the network, to facilitate
1150 * "managed roaming"
1151 */
1152typedef enum {
1153 RIL_NOT_REG_AND_NOT_SEARCHING = 0, // Not registered, MT is not currently searching
1154 // a new operator to register
1155 RIL_REG_HOME = 1, // Registered, home network
1156 RIL_NOT_REG_AND_SEARCHING = 2, // Not registered, but MT is currently searching
1157 // a new operator to register
1158 RIL_REG_DENIED = 3, // Registration denied
1159 RIL_UNKNOWN = 4, // Unknown
1160 RIL_REG_ROAMING = 5, // Registered, roaming
1161 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_NOT_SEARCHING = 10, // Same as
1162 // RIL_NOT_REG_AND_NOT_SEARCHING but indicates that
1163 // emergency calls are enabled.
1164 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_SEARCHING = 12, // Same as RIL_NOT_REG_AND_SEARCHING
1165 // but indicates that
1166 // emergency calls are enabled.
1167 RIL_REG_DENIED_AND_EMERGENCY_AVAILABLE = 13, // Same as REG_DENIED but indicates that
1168 // emergency calls are enabled.
1169 RIL_UNKNOWN_AND_EMERGENCY_AVAILABLE = 14, // Same as UNKNOWN but indicates that
1170 // emergency calls are enabled.
1171} RIL_RegState;
1172
1173typedef struct
1174{
1175 RIL_AppType app_type;
1176 RIL_AppState app_state;
1177 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
1178 RIL_APPSTATE_SUBSCRIPTION_PERSO */
1179 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
1180 0x30, 0x30, 0x30 */
1181 char *app_label_ptr; /* null terminated string */
1182 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
1183 RIL_PinState pin1;
1184 RIL_PinState pin2;
1185} RIL_AppStatus;
1186
1187/* Deprecated, use RIL_CardStatus_v6 */
1188typedef struct
1189{
1190 RIL_CardState card_state;
1191 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
1192 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1193 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1194 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1195 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
1196} RIL_CardStatus_v5;
1197
1198typedef struct
1199{
1200 RIL_CardState card_state;
1201 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
1202 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1203 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1204 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1205 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1206 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
1207} RIL_CardStatus_v6;
1208
1209/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
1210 * or as part of RIL_SimRefreshResponse_v7
1211 */
1212typedef enum {
1213 /* A file on SIM has been updated. data[1] contains the EFID. */
1214 SIM_FILE_UPDATE = 0,
1215 /* SIM initialized. All files should be re-read. */
1216 SIM_INIT = 1,
1217 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
1218 SIM_RESET = 2
1219} RIL_SimRefreshResult;
1220
1221typedef struct {
1222 RIL_SimRefreshResult result;
1223 int ef_id; /* is the EFID of the updated file if the result is */
1224 /* SIM_FILE_UPDATE or 0 for any other result. */
1225 char * aid; /* is AID(application ID) of the card application */
1226 /* See ETSI 102.221 8.1 and 101.220 4 */
1227 /* For SIM_FILE_UPDATE result it can be set to AID of */
1228 /* application in which updated EF resides or it can be */
1229 /* NULL if EF is outside of an application. */
1230 /* For SIM_INIT result this field is set to AID of */
1231 /* application that caused REFRESH */
1232 /* For SIM_RESET result it is NULL. */
1233} RIL_SimRefreshResponse_v7;
1234
1235/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
1236typedef struct {
1237 char * number; /* Remote party number */
1238 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1239 char * name; /* Remote party name */
1240 RIL_CDMA_SignalInfoRecord signalInfoRecord;
1241} RIL_CDMA_CallWaiting_v5;
1242
1243typedef struct {
1244 char * number; /* Remote party number */
1245 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1246 char * name; /* Remote party name */
1247 RIL_CDMA_SignalInfoRecord signalInfoRecord;
1248 /* Number type/Number plan required to support International Call Waiting */
1249 int number_type; /* 0=Unknown, 1=International, 2=National,
1250 3=Network specific, 4=subscriber */
1251 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
1252} RIL_CDMA_CallWaiting_v6;
1253
1254/**
1255 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
1256 *
1257 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
1258 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
1259 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
1260 * CBM message ID.
1261 *
1262 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
1263 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
1264 * and 9.4.4.2.3 for UMTS.
1265 * All other values can be treated as empty CBM data coding scheme.
1266 *
1267 * selected 0 means message types specified in <fromServiceId, toServiceId>
1268 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
1269 *
1270 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
1271 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
1272 */
1273typedef struct {
1274 int fromServiceId;
1275 int toServiceId;
1276 int fromCodeScheme;
1277 int toCodeScheme;
1278 unsigned char selected;
1279} RIL_GSM_BroadcastSmsConfigInfo;
1280
1281/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
1282#define RIL_RESTRICTED_STATE_NONE 0x00
1283/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
1284#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
1285/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
1286#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
1287/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
1288#define RIL_RESTRICTED_STATE_CS_ALL 0x04
1289/* Block packet data access due to restriction. */
1290#define RIL_RESTRICTED_STATE_PS_ALL 0x10
1291
1292/* The status for an OTASP/OTAPA session */
1293typedef enum {
1294 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
1295 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
1296 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
1297 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
1298 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
1299 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
1300 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
1301 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
1302 CDMA_OTA_PROVISION_STATUS_COMMITTED,
1303 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
1304 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
1305 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
1306} RIL_CDMA_OTA_ProvisionStatus;
1307
1308typedef struct {
1309 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1310 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1311} RIL_GW_SignalStrength;
1312
1313typedef struct {
1314 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1315 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1316 int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us.
1317 * INT_MAX denotes invalid value */
1318} RIL_GSM_SignalStrength_v12;
1319
1320typedef struct {
1321 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1322 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1323} RIL_SignalStrengthWcdma;
1324
1325typedef struct {
1326 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1327 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1328 * value will be 75.
1329 */
1330 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1331 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1332 * will be 125.
1333 */
1334} RIL_CDMA_SignalStrength;
1335
1336
1337typedef struct {
1338 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1339 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1340 * value will be 75.
1341 */
1342 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1343 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1344 * will be 125.
1345 */
1346 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
1347} RIL_EVDO_SignalStrength;
1348
1349typedef struct {
1350 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1351 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1352 * Range: 44 to 140 dBm
1353 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1354 * Reference: 3GPP TS 36.133 9.1.4 */
1355 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1356 * Range: 20 to 3 dB.
1357 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1358 * Reference: 3GPP TS 36.133 9.1.7 */
1359 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1360 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1361 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1362 * Reference: 3GPP TS 36.101 8.1.1 */
1363 int cqi; /* The current Channel Quality Indicator.
1364 * Range: 0 to 15.
1365 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1366 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1367} RIL_LTE_SignalStrength;
1368
1369typedef struct {
1370 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1371 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1372 * Range: 44 to 140 dBm
1373 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1374 * Reference: 3GPP TS 36.133 9.1.4 */
1375 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1376 * Range: 20 to 3 dB.
1377 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1378 * Reference: 3GPP TS 36.133 9.1.7 */
1379 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1380 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1381 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1382 * Reference: 3GPP TS 36.101 8.1.1 */
1383 int cqi; /* The current Channel Quality Indicator.
1384 * Range: 0 to 15.
1385 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1386 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1387 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
1388 * Approximate distance can be calculated using 300m/us * timingAdvance.
1389 * Range: 0 to 0x7FFFFFFE
1390 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1391 * Reference: 3GPP 36.321 section 6.1.3.5
1392 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1393} RIL_LTE_SignalStrength_v8;
1394
1395typedef struct {
1396 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
1397 * Range : 25 to 120
1398 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1399 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1400} RIL_TD_SCDMA_SignalStrength;
1401
1402/* Deprecated, use RIL_SignalStrength_v6 */
1403typedef struct {
1404 RIL_GW_SignalStrength GW_SignalStrength;
1405 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1406 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1407} RIL_SignalStrength_v5;
1408
1409typedef struct {
1410 RIL_GW_SignalStrength GW_SignalStrength;
1411 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1412 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1413 RIL_LTE_SignalStrength LTE_SignalStrength;
1414} RIL_SignalStrength_v6;
1415
1416typedef struct {
1417 RIL_GW_SignalStrength GW_SignalStrength;
1418 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1419 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1420 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1421} RIL_SignalStrength_v8;
1422
1423typedef struct {
1424 RIL_GW_SignalStrength GW_SignalStrength;
1425 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1426 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1427 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1428 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1429} RIL_SignalStrength_v10;
1430
1431typedef struct {
1432 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1433 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999;
1434 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)};
1435 INT_MAX if unknown */
1436 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1437 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
1438} RIL_CellIdentityGsm;
1439
1440typedef struct {
1441 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1442 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999;
1443 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)};
1444 INT_MAX if unknown */
1445 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1446 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
1447 int arfcn; /* 16-bit GSM Absolute RF channel number; this value must be reported */
1448 uint8_t bsic; /* 6-bit Base Station Identity Code; 0xFF if unknown */
1449} RIL_CellIdentityGsm_v12;
1450
1451typedef struct {
1452 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1453 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999;
1454 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)};
1455 INT_MAX if unknown */
1456 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1457 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1458 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1459} RIL_CellIdentityWcdma;
1460
1461typedef struct {
1462 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1463 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999;
1464 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)};
1465 INT_MAX if unknown */
1466 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1467 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1468 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511; this value must be reported */
1469 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number; this value must be reported */
1470} RIL_CellIdentityWcdma_v12;
1471
1472typedef struct {
1473 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1474 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1475 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
1476 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1477 * It is represented in units of 0.25 seconds and ranges from -2592000
1478 * to 2592000, both values inclusive (corresponding to a range of -180
1479 * to +180 degrees). INT_MAX if unknown */
1480
1481 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1482 * It is represented in units of 0.25 seconds and ranges from -1296000
1483 * to 1296000, both values inclusive (corresponding to a range of -90
1484 * to +90 degrees). INT_MAX if unknown */
1485} RIL_CellIdentityCdma;
1486
1487typedef struct {
1488 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1489 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999;
1490 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)};
1491 INT_MAX if unknown */
1492 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1493 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1494 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1495} RIL_CellIdentityLte;
1496
1497typedef struct {
1498 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1499 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999;
1500 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)};
1501 INT_MAX if unknown */
1502 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1503 int pci; /* physical cell id 0..503; this value must be reported */
1504 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1505 int earfcn; /* 18-bit LTE Absolute RF Channel Number; this value must be reported */
1506} RIL_CellIdentityLte_v12;
1507
1508typedef struct {
1509 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1510 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999;
1511 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)};
1512 INT_MAX if unknown */
1513 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1514 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1515 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1516} RIL_CellIdentityTdscdma;
1517
1518typedef struct {
1519 RIL_CellIdentityGsm cellIdentityGsm;
1520 RIL_GW_SignalStrength signalStrengthGsm;
1521} RIL_CellInfoGsm;
1522
1523typedef struct {
1524 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1525 RIL_GSM_SignalStrength_v12 signalStrengthGsm;
1526} RIL_CellInfoGsm_v12;
1527
1528typedef struct {
1529 RIL_CellIdentityWcdma cellIdentityWcdma;
1530 RIL_SignalStrengthWcdma signalStrengthWcdma;
1531} RIL_CellInfoWcdma;
1532
1533typedef struct {
1534 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1535 RIL_SignalStrengthWcdma signalStrengthWcdma;
1536} RIL_CellInfoWcdma_v12;
1537
1538typedef struct {
1539 RIL_CellIdentityCdma cellIdentityCdma;
1540 RIL_CDMA_SignalStrength signalStrengthCdma;
1541 RIL_EVDO_SignalStrength signalStrengthEvdo;
1542} RIL_CellInfoCdma;
1543
1544typedef struct {
1545 RIL_CellIdentityLte cellIdentityLte;
1546 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1547} RIL_CellInfoLte;
1548
1549typedef struct {
1550 RIL_CellIdentityLte_v12 cellIdentityLte;
1551 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1552} RIL_CellInfoLte_v12;
1553
1554typedef struct {
1555 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1556 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1557} RIL_CellInfoTdscdma;
1558
1559// Must be the same as CellInfo.TYPE_XXX
1560typedef enum {
1561 RIL_CELL_INFO_TYPE_NONE = 0, /* indicates no cell information */
1562 RIL_CELL_INFO_TYPE_GSM = 1,
1563 RIL_CELL_INFO_TYPE_CDMA = 2,
1564 RIL_CELL_INFO_TYPE_LTE = 3,
1565 RIL_CELL_INFO_TYPE_WCDMA = 4,
1566 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
1567} RIL_CellInfoType;
1568
1569// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1570typedef enum {
1571 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1572 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1573 RIL_TIMESTAMP_TYPE_MODEM = 2,
1574 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1575 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1576} RIL_TimeStampType;
1577
1578typedef struct {
1579 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1580 int registered; /* !0 if this cell is registered 0 if not registered */
1581 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1582 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1583 union {
1584 RIL_CellInfoGsm gsm;
1585 RIL_CellInfoCdma cdma;
1586 RIL_CellInfoLte lte;
1587 RIL_CellInfoWcdma wcdma;
1588 RIL_CellInfoTdscdma tdscdma;
1589 } CellInfo;
1590} RIL_CellInfo;
1591
1592typedef struct {
1593 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1594 int registered; /* !0 if this cell is registered 0 if not registered */
1595 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1596 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1597 union {
1598 RIL_CellInfoGsm_v12 gsm;
1599 RIL_CellInfoCdma cdma;
1600 RIL_CellInfoLte_v12 lte;
1601 RIL_CellInfoWcdma_v12 wcdma;
1602 RIL_CellInfoTdscdma tdscdma;
1603 } CellInfo;
1604} RIL_CellInfo_v12;
1605
1606typedef struct {
1607 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1608 union {
1609 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1610 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1611 RIL_CellIdentityLte_v12 cellIdentityLte;
1612 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1613 RIL_CellIdentityCdma cellIdentityCdma;
1614 };
1615}RIL_CellIdentity_v16;
1616
1617typedef struct {
1618 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
1619 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
1620 // UNKNOWN, REG_ROAMING defined in RegState
1621 RIL_RadioTechnology rat; // indicates the available voice radio technology,
1622 // valid values as defined by RadioTechnology.
1623 int32_t cssSupported; // concurrent services support indicator. if
1624 // registered on a CDMA system.
1625 // 0 - Concurrent services not supported,
1626 // 1 - Concurrent services supported
1627 int32_t roamingIndicator; // TSB-58 Roaming Indicator if registered
1628 // on a CDMA or EVDO system or -1 if not.
1629 // Valid values are 0-255.
1630 int32_t systemIsInPrl; // indicates whether the current system is in the
1631 // PRL if registered on a CDMA or EVDO system or -1 if
1632 // not. 0=not in the PRL, 1=in the PRL
1633 int32_t defaultRoamingIndicator; // default Roaming Indicator from the PRL,
1634 // if registered on a CDMA or EVDO system or -1 if not.
1635 // Valid values are 0-255.
1636 int32_t reasonForDenial; // reasonForDenial if registration state is 3
1637 // (Registration denied) this is an enumerated reason why
1638 // registration was denied. See 3GPP TS 24.008,
1639 // 10.5.3.6 and Annex G.
1640 // 0 - General
1641 // 1 - Authentication Failure
1642 // 2 - IMSI unknown in HLR
1643 // 3 - Illegal MS
1644 // 4 - Illegal ME
1645 // 5 - PLMN not allowed
1646 // 6 - Location area not allowed
1647 // 7 - Roaming not allowed
1648 // 8 - No Suitable Cells in this Location Area
1649 // 9 - Network failure
1650 // 10 - Persistent location update reject
1651 // 11 - PLMN not allowed
1652 // 12 - Location area not allowed
1653 // 13 - Roaming not allowed in this Location Area
1654 // 15 - No Suitable Cells in this Location Area
1655 // 17 - Network Failure
1656 // 20 - MAC Failure
1657 // 21 - Sync Failure
1658 // 22 - Congestion
1659 // 23 - GSM Authentication unacceptable
1660 // 25 - Not Authorized for this CSG
1661 // 32 - Service option not supported
1662 // 33 - Requested service option not subscribed
1663 // 34 - Service option temporarily out of order
1664 // 38 - Call cannot be identified
1665 // 48-63 - Retry upon entry into a new cell
1666 // 95 - Semantically incorrect message
1667 // 96 - Invalid mandatory information
1668 // 97 - Message type non-existent or not implemented
1669 // 98 - Message type not compatible with protocol state
1670 // 99 - Information element non-existent or
1671 // not implemented
1672 // 100 - Conditional IE error
1673 // 101 - Message not compatible with protocol state;
1674 RIL_CellIdentity_v16 cellIdentity; // current cell information
1675}RIL_VoiceRegistrationStateResponse;
1676
1677
1678typedef struct {
1679 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
1680 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
1681 // UNKNOWN, REG_ROAMING defined in RegState
1682 RIL_RadioTechnology rat; // indicates the available data radio technology,
1683 // valid values as defined by RadioTechnology.
1684 int32_t reasonDataDenied; // if registration state is 3 (Registration
1685 // denied) this is an enumerated reason why
1686 // registration was denied. See 3GPP TS 24.008,
1687 // Annex G.6 "Additional cause codes for GMM".
1688 // 7 == GPRS services not allowed
1689 // 8 == GPRS services and non-GPRS services not allowed
1690 // 9 == MS identity cannot be derived by the network
1691 // 10 == Implicitly detached
1692 // 14 == GPRS services not allowed in this PLMN
1693 // 16 == MSC temporarily not reachable
1694 // 40 == No PDP context activated
1695 int32_t maxDataCalls; // The maximum number of simultaneous Data Calls that
1696 // must be established using setupDataCall().
1697 RIL_CellIdentity_v16 cellIdentity; // Current cell information
1698}RIL_DataRegistrationStateResponse;
1699
1700/* Names of the CDMA info records (C.S0005 section 3.7.5) */
1701typedef enum {
1702 RIL_CDMA_DISPLAY_INFO_REC,
1703 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1704 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1705 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1706 RIL_CDMA_SIGNAL_INFO_REC,
1707 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1708 RIL_CDMA_LINE_CONTROL_INFO_REC,
1709 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1710 RIL_CDMA_T53_CLIR_INFO_REC,
1711 RIL_CDMA_T53_RELEASE_INFO_REC,
1712 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1713} RIL_CDMA_InfoRecName;
1714
1715/* Display Info Rec as defined in C.S0005 section 3.7.5.1
1716 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1717 Note: the Extended Display info rec contains multiple records of the
1718 form: display_tag, display_len, and display_len occurrences of the
1719 chari field if the display_tag is not 10000000 or 10000001.
1720 To save space, the records are stored consecutively in a byte buffer.
1721 The display_tag, display_len and chari fields are all 1 byte.
1722*/
1723
1724typedef struct {
1725 char alpha_len;
1726 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
1727} RIL_CDMA_DisplayInfoRecord;
1728
1729/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1730 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1731 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1732*/
1733
1734typedef struct {
1735 char len;
1736 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
1737 char number_type;
1738 char number_plan;
1739 char pi;
1740 char si;
1741} RIL_CDMA_NumberInfoRecord;
1742
1743/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1744typedef enum {
1745 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1746 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1747 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1748 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1749 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1750 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1751 RIL_REDIRECTING_REASON_RESERVED
1752} RIL_CDMA_RedirectingReason;
1753
1754typedef struct {
1755 RIL_CDMA_NumberInfoRecord redirectingNumber;
1756 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1757 RIL_CDMA_RedirectingReason redirectingReason;
1758} RIL_CDMA_RedirectingNumberInfoRecord;
1759
1760/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1761typedef struct {
1762 char lineCtrlPolarityIncluded;
1763 char lineCtrlToggle;
1764 char lineCtrlReverse;
1765 char lineCtrlPowerDenial;
1766} RIL_CDMA_LineControlInfoRecord;
1767
1768/* T53 CLIR Information Record */
1769typedef struct {
1770 char cause;
1771} RIL_CDMA_T53_CLIRInfoRecord;
1772
1773/* T53 Audio Control Information Record */
1774typedef struct {
1775 char upLink;
1776 char downLink;
1777} RIL_CDMA_T53_AudioControlInfoRecord;
1778
1779typedef struct {
1780
1781 RIL_CDMA_InfoRecName name;
1782
1783 union {
1784 /* Display and Extended Display Info Rec */
1785 RIL_CDMA_DisplayInfoRecord display;
1786
1787 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1788 RIL_CDMA_NumberInfoRecord number;
1789
1790 /* Signal Info Rec */
1791 RIL_CDMA_SignalInfoRecord signal;
1792
1793 /* Redirecting Number Info Rec */
1794 RIL_CDMA_RedirectingNumberInfoRecord redir;
1795
1796 /* Line Control Info Rec */
1797 RIL_CDMA_LineControlInfoRecord lineCtrl;
1798
1799 /* T53 CLIR Info Rec */
1800 RIL_CDMA_T53_CLIRInfoRecord clir;
1801
1802 /* T53 Audio Control Info Rec */
1803 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1804 } rec;
1805} RIL_CDMA_InformationRecord;
1806
1807#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1808
1809typedef struct {
1810 char numberOfInfoRecs;
1811 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1812} RIL_CDMA_InformationRecords;
1813
1814/* See RIL_REQUEST_NV_READ_ITEM */
1815typedef struct {
1816 RIL_NV_Item itemID;
1817} RIL_NV_ReadItem;
1818
1819/* See RIL_REQUEST_NV_WRITE_ITEM */
1820typedef struct {
1821 RIL_NV_Item itemID;
1822 char * value;
1823} RIL_NV_WriteItem;
1824
1825typedef enum {
1826 HANDOVER_STARTED = 0,
1827 HANDOVER_COMPLETED = 1,
1828 HANDOVER_FAILED = 2,
1829 HANDOVER_CANCELED = 3
1830} RIL_SrvccState;
1831
1832/* hardware configuration reported to RILJ. */
1833typedef enum {
1834 RIL_HARDWARE_CONFIG_MODEM = 0,
1835 RIL_HARDWARE_CONFIG_SIM = 1,
1836} RIL_HardwareConfig_Type;
1837
1838typedef enum {
1839 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1840 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1841 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1842} RIL_HardwareConfig_State;
1843
1844typedef struct {
1845 int rilModel;
1846 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1847 int maxVoice;
1848 int maxData;
1849 int maxStandby;
1850} RIL_HardwareConfig_Modem;
1851
1852typedef struct {
1853 char modemUuid[MAX_UUID_LENGTH];
1854} RIL_HardwareConfig_Sim;
1855
1856typedef struct {
1857 RIL_HardwareConfig_Type type;
1858 char uuid[MAX_UUID_LENGTH];
1859 RIL_HardwareConfig_State state;
1860 union {
1861 RIL_HardwareConfig_Modem modem;
1862 RIL_HardwareConfig_Sim sim;
1863 } cfg;
1864} RIL_HardwareConfig;
1865
1866typedef enum {
1867 SS_CFU,
1868 SS_CF_BUSY,
1869 SS_CF_NO_REPLY,
1870 SS_CF_NOT_REACHABLE,
1871 SS_CF_ALL,
1872 SS_CF_ALL_CONDITIONAL,
1873 SS_CLIP,
1874 SS_CLIR,
1875 SS_COLP,
1876 SS_COLR,
1877 SS_WAIT,
1878 SS_BAOC,
1879 SS_BAOIC,
1880 SS_BAOIC_EXC_HOME,
1881 SS_BAIC,
1882 SS_BAIC_ROAMING,
1883 SS_ALL_BARRING,
1884 SS_OUTGOING_BARRING,
1885 SS_INCOMING_BARRING
1886} RIL_SsServiceType;
1887
1888typedef enum {
1889 SS_ACTIVATION,
1890 SS_DEACTIVATION,
1891 SS_INTERROGATION,
1892 SS_REGISTRATION,
1893 SS_ERASURE
1894} RIL_SsRequestType;
1895
1896typedef enum {
1897 SS_ALL_TELE_AND_BEARER_SERVICES,
1898 SS_ALL_TELESEVICES,
1899 SS_TELEPHONY,
1900 SS_ALL_DATA_TELESERVICES,
1901 SS_SMS_SERVICES,
1902 SS_ALL_TELESERVICES_EXCEPT_SMS
1903} RIL_SsTeleserviceType;
1904
1905#define SS_INFO_MAX 4
1906#define NUM_SERVICE_CLASSES 7
1907
1908typedef struct {
1909 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1910 For example if voice is forwarded to one number and data
1911 is forwarded to a different one then numValidIndexes will be
1912 2 indicating total number of valid values in cfInfo.
1913 Similarly if all the services are forwarded to the same
1914 number then the value of numValidIndexes will be 1. */
1915
1916 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1917 for SS request to query call
1918 forward status. see
1919 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1920} RIL_CfData;
1921
1922typedef struct {
1923 RIL_SsServiceType serviceType;
1924 RIL_SsRequestType requestType;
1925 RIL_SsTeleserviceType teleserviceType;
1926 int serviceClass;
1927 RIL_Errno result;
1928
1929 union {
1930 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1931 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1932 two ints, so first two values of ssInfo[] will be
1933 used for response if serviceType is SS_CLIR and
1934 requestType is SS_INTERROGATION */
1935
1936 RIL_CfData cfData;
1937 };
1938} RIL_StkCcUnsolSsResponse;
1939
1940/**
1941 * Data connection power state
1942 */
1943typedef enum {
1944 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1945 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1946 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1947 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1948} RIL_DcPowerStates;
1949
1950/**
1951 * Data connection real time info
1952 */
1953typedef struct {
1954 uint64_t time; // Time in nanos as returned by ril_nano_time
1955 RIL_DcPowerStates powerState; // Current power state
1956} RIL_DcRtInfo;
1957
1958/**
1959 * Data profile to modem
1960 */
1961typedef struct {
1962 /* id of the data profile */
1963 int profileId;
1964 /* the APN to connect to */
1965 char* apn;
1966 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1967 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1968 */
1969 char* protocol;
1970 /** authentication protocol used for this PDP context
1971 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1972 */
1973 int authType;
1974 /* the username for APN, or NULL */
1975 char* user;
1976 /* the password for APN, or NULL */
1977 char* password;
1978 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1979 int type;
1980 /* the period in seconds to limit the maximum connections */
1981 int maxConnsTime;
1982 /* the maximum connections during maxConnsTime */
1983 int maxConns;
1984 /** the required wait time in seconds after a successful UE initiated
1985 * disconnect of a given PDN connection before the device can send
1986 * a new PDN connection request for that given PDN
1987 */
1988 int waitTime;
1989 /* true to enable the profile, 0 to disable, 1 to enable */
1990 int enabled;
1991} RIL_DataProfileInfo;
1992
1993typedef struct {
1994 /* id of the data profile */
1995 int profileId;
1996 /* the APN to connect to */
1997 char* apn;
1998 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1999 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
2000 */
2001 char* protocol;
2002 /** one of the PDP_type values in TS 27.007 section 10.1.1 used on roaming network.
2003 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
2004 */
2005 char *roamingProtocol;
2006 /** authentication protocol used for this PDP context
2007 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
2008 */
2009 int authType;
2010 /* the username for APN, or NULL */
2011 char* user;
2012 /* the password for APN, or NULL */
2013 char* password;
2014 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
2015 int type;
2016 /* the period in seconds to limit the maximum connections */
2017 int maxConnsTime;
2018 /* the maximum connections during maxConnsTime */
2019 int maxConns;
2020 /** the required wait time in seconds after a successful UE initiated
2021 * disconnect of a given PDN connection before the device can send
2022 * a new PDN connection request for that given PDN
2023 */
2024 int waitTime;
2025 /* true to enable the profile, 0 to disable, 1 to enable */
2026 int enabled;
2027 /* supported APN types bitmask. See RIL_ApnTypes for the value of each bit. */
2028 int supportedTypesBitmask;
2029 /** the bearer bitmask. See RIL_RadioAccessFamily for the value of each bit. */
2030 int bearerBitmask;
2031 /** maximum transmission unit (MTU) size in bytes */
2032 int mtu;
2033 /** the MVNO type: possible values are "imsi", "gid", "spn" */
2034 char *mvnoType;
2035 /** MVNO match data. Can be anything defined by the carrier. For example,
2036 * SPN like: "A MOBILE", "BEN NL", etc...
2037 * IMSI like: "302720x94", "2060188", etc...
2038 * GID like: "4E", "33", etc...
2039 */
2040 char *mvnoMatchData;
2041} RIL_DataProfileInfo_v15;
2042
2043/* Tx Power Levels */
2044#define RIL_NUM_TX_POWER_LEVELS 5
2045
2046/**
2047 * Aggregate modem activity information
2048 */
2049typedef struct {
2050
2051 /* total time (in ms) when modem is in a low power or
2052 * sleep state
2053 */
2054 uint32_t sleep_mode_time_ms;
2055
2056 /* total time (in ms) when modem is awake but neither
2057 * the transmitter nor receiver are active/awake */
2058 uint32_t idle_mode_time_ms;
2059
2060 /* total time (in ms) during which the transmitter is active/awake,
2061 * subdivided by manufacturer-defined device-specific
2062 * contiguous increasing ranges of transmit power between
2063 * 0 and the transmitter's maximum transmit power.
2064 */
2065 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
2066
2067 /* total time (in ms) for which receiver is active/awake and
2068 * the transmitter is inactive */
2069 uint32_t rx_mode_time_ms;
2070} RIL_ActivityStatsInfo;
2071
2072typedef enum {
2073 RIL_APN_TYPE_UNKNOWN = 0x0, // Unknown
2074 RIL_APN_TYPE_DEFAULT = 0x1, // APN type for default data traffic
2075 RIL_APN_TYPE_MMS = 0x2, // APN type for MMS traffic
2076 RIL_APN_TYPE_SUPL = 0x4, // APN type for SUPL assisted GPS
2077 RIL_APN_TYPE_DUN = 0x8, // APN type for DUN traffic
2078 RIL_APN_TYPE_HIPRI = 0x10, // APN type for HiPri traffic
2079 RIL_APN_TYPE_FOTA = 0x20, // APN type for FOTA
2080 RIL_APN_TYPE_IMS = 0x40, // APN type for IMS
2081 RIL_APN_TYPE_CBS = 0x80, // APN type for CBS
2082 RIL_APN_TYPE_IA = 0x100, // APN type for IA Initial Attach APN
2083 RIL_APN_TYPE_EMERGENCY = 0x200, // APN type for Emergency PDN. This is not an IA apn,
2084 // but is used for access to carrier services in an
2085 // emergency call situation.
Sarah Chin75b299c2019-12-11 10:57:28 -08002086 RIL_APN_TYPE_MCX = 0x400, // APN type for Mission Critical Service
2087 RIL_APN_TYPE_XCAP = 0x800, // APN type for XCAP
paulye91d34712019-02-07 19:02:02 -08002088 RIL_APN_TYPE_ALL = 0xFFFFFFFF // All APN types
2089} RIL_ApnTypes;
2090
2091typedef enum {
2092 RIL_DST_POWER_SAVE_MODE, // Device power save mode (provided by PowerManager)
2093 // True indicates the device is in power save mode.
2094 RIL_DST_CHARGING_STATE, // Device charging state (provided by BatteryManager)
2095 // True indicates the device is charging.
2096 RIL_DST_LOW_DATA_EXPECTED // Low data expected mode. True indicates low data traffic
2097 // is expected, for example, when the device is idle
2098 // (e.g. not doing tethering in the background). Note
2099 // this doesn't mean no data is expected.
2100} RIL_DeviceStateType;
2101
2102typedef enum {
2103 RIL_UR_SIGNAL_STRENGTH = 0x01, // When this bit is set, modem should always send the
2104 // signal strength update through
2105 // RIL_UNSOL_SIGNAL_STRENGTH, otherwise suppress it.
2106 RIL_UR_FULL_NETWORK_STATE = 0x02, // When this bit is set, modem should always send
2107 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
2108 // when any field in
2109 // RIL_REQUEST_VOICE_REGISTRATION_STATE or
2110 // RIL_REQUEST_DATA_REGISTRATION_STATE changes. When
2111 // this bit is not set, modem should suppress
2112 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
2113 // only when insignificant fields change
2114 // (e.g. cell info).
2115 // Modem should continue sending
2116 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
2117 // when significant fields are updated even when this
2118 // bit is not set. The following fields are
2119 // considered significant, registration state and
2120 // radio technology.
2121 RIL_UR_DATA_CALL_DORMANCY_CHANGED = 0x04 // When this bit is set, modem should send the data
2122 // call list changed unsolicited response
2123 // RIL_UNSOL_DATA_CALL_LIST_CHANGED whenever any
2124 // field in RIL_Data_Call_Response changes.
2125 // Otherwise modem should suppress the unsolicited
2126 // response when the only changed field is 'active'
2127 // (for data dormancy). For all other fields change,
2128 // modem should continue sending
2129 // RIL_UNSOL_DATA_CALL_LIST_CHANGED regardless this
2130 // bit is set or not.
2131} RIL_UnsolicitedResponseFilter;
2132
2133typedef struct {
2134 char * aidPtr; /* AID value, See ETSI 102.221 and 101.220*/
2135 int p2; /* P2 parameter (described in ISO 7816-4)
2136 P2Constants:NO_P2 if to be ignored */
2137} RIL_OpenChannelParams;
2138
2139typedef enum {
2140 RIL_ONE_SHOT = 0x01, // Performs the scan only once
2141 RIL_PERIODIC = 0x02 // Performs the scan periodically until cancelled
2142} RIL_ScanType;
2143
2144typedef enum {
Sarah Chin65f1d7f2019-12-18 17:07:39 -08002145 UNKNOWN = 0x00, // Unknown Radio Access Network
2146 GERAN = 0x01, // GSM EDGE Radio Access Network
2147 UTRAN = 0x02, // Universal Terrestrial Radio Access Network
2148 EUTRAN = 0x03, // Evolved Universal Terrestrial Radio Access Network
2149 NGRAN = 0x04, // Next-Generation Radio Access Network
2150 CDMA2000 = 0x05, // CDMA 2000 Radio AccessNetwork
paulye91d34712019-02-07 19:02:02 -08002151} RIL_RadioAccessNetworks;
2152
2153typedef enum {
2154 GERAN_BAND_T380 = 1,
2155 GERAN_BAND_T410 = 2,
2156 GERAN_BAND_450 = 3,
2157 GERAN_BAND_480 = 4,
2158 GERAN_BAND_710 = 5,
2159 GERAN_BAND_750 = 6,
2160 GERAN_BAND_T810 = 7,
2161 GERAN_BAND_850 = 8,
2162 GERAN_BAND_P900 = 9,
2163 GERAN_BAND_E900 = 10,
2164 GERAN_BAND_R900 = 11,
2165 GERAN_BAND_DCS1800 = 12,
2166 GERAN_BAND_PCS1900 = 13,
2167 GERAN_BAND_ER900 = 14,
2168} RIL_GeranBands;
2169
2170typedef enum {
2171 UTRAN_BAND_1 = 1,
2172 UTRAN_BAND_2 = 2,
2173 UTRAN_BAND_3 = 3,
2174 UTRAN_BAND_4 = 4,
2175 UTRAN_BAND_5 = 5,
2176 UTRAN_BAND_6 = 6,
2177 UTRAN_BAND_7 = 7,
2178 UTRAN_BAND_8 = 8,
2179 UTRAN_BAND_9 = 9,
2180 UTRAN_BAND_10 = 10,
2181 UTRAN_BAND_11 = 11,
2182 UTRAN_BAND_12 = 12,
2183 UTRAN_BAND_13 = 13,
2184 UTRAN_BAND_14 = 14,
2185 UTRAN_BAND_19 = 19,
2186 UTRAN_BAND_20 = 20,
2187 UTRAN_BAND_21 = 21,
2188 UTRAN_BAND_22 = 22,
2189 UTRAN_BAND_25 = 25,
2190 UTRAN_BAND_26 = 26,
2191} RIL_UtranBands;
2192
2193typedef enum {
2194 EUTRAN_BAND_1 = 1,
2195 EUTRAN_BAND_2 = 2,
2196 EUTRAN_BAND_3 = 3,
2197 EUTRAN_BAND_4 = 4,
2198 EUTRAN_BAND_5 = 5,
2199 EUTRAN_BAND_6 = 6,
2200 EUTRAN_BAND_7 = 7,
2201 EUTRAN_BAND_8 = 8,
2202 EUTRAN_BAND_9 = 9,
2203 EUTRAN_BAND_10 = 10,
2204 EUTRAN_BAND_11 = 11,
2205 EUTRAN_BAND_12 = 12,
2206 EUTRAN_BAND_13 = 13,
2207 EUTRAN_BAND_14 = 14,
2208 EUTRAN_BAND_17 = 17,
2209 EUTRAN_BAND_18 = 18,
2210 EUTRAN_BAND_19 = 19,
2211 EUTRAN_BAND_20 = 20,
2212 EUTRAN_BAND_21 = 21,
2213 EUTRAN_BAND_22 = 22,
2214 EUTRAN_BAND_23 = 23,
2215 EUTRAN_BAND_24 = 24,
2216 EUTRAN_BAND_25 = 25,
2217 EUTRAN_BAND_26 = 26,
2218 EUTRAN_BAND_27 = 27,
2219 EUTRAN_BAND_28 = 28,
2220 EUTRAN_BAND_30 = 30,
2221 EUTRAN_BAND_31 = 31,
2222 EUTRAN_BAND_33 = 33,
2223 EUTRAN_BAND_34 = 34,
2224 EUTRAN_BAND_35 = 35,
2225 EUTRAN_BAND_36 = 36,
2226 EUTRAN_BAND_37 = 37,
2227 EUTRAN_BAND_38 = 38,
2228 EUTRAN_BAND_39 = 39,
2229 EUTRAN_BAND_40 = 40,
2230 EUTRAN_BAND_41 = 41,
2231 EUTRAN_BAND_42 = 42,
2232 EUTRAN_BAND_43 = 43,
2233 EUTRAN_BAND_44 = 44,
2234 EUTRAN_BAND_45 = 45,
2235 EUTRAN_BAND_46 = 46,
2236 EUTRAN_BAND_47 = 47,
2237 EUTRAN_BAND_48 = 48,
2238 EUTRAN_BAND_65 = 65,
2239 EUTRAN_BAND_66 = 66,
2240 EUTRAN_BAND_68 = 68,
2241 EUTRAN_BAND_70 = 70,
2242} RIL_EutranBands;
2243
Sarah Chinbb757c62019-11-06 12:46:42 -08002244typedef enum {
2245 NGRAN_BAND_1 = 1,
2246 NGRAN_BAND_2 = 2,
2247 NGRAN_BAND_3 = 3,
2248 NGRAN_BAND_5 = 5,
2249 NGRAN_BAND_7 = 7,
2250 NGRAN_BAND_8 = 8,
2251 NGRAN_BAND_12 = 12,
2252 NGRAN_BAND_20 = 20,
2253 NGRAN_BAND_25 = 25,
2254 NGRAN_BAND_28 = 28,
2255 NGRAN_BAND_34 = 34,
2256 NGRAN_BAND_38 = 38,
2257 NGRAN_BAND_39 = 39,
2258 NGRAN_BAND_40 = 40,
2259 NGRAN_BAND_41 = 41,
2260 NGRAN_BAND_50 = 50,
2261 NGRAN_BAND_51 = 51,
2262 NGRAN_BAND_66 = 66,
2263 NGRAN_BAND_70 = 70,
2264 NGRAN_BAND_71 = 71,
2265 NGRAN_BAND_74 = 74,
2266 NGRAN_BAND_75 = 75,
2267 NGRAN_BAND_76 = 76,
2268 NGRAN_BAND_77 = 77,
2269 NGRAN_BAND_78 = 78,
2270 NGRAN_BAND_79 = 79,
2271 NGRAN_BAND_80 = 80,
2272 NGRAN_BAND_81 = 81,
2273 NGRAN_BAND_82 = 82,
2274 NGRAN_BAND_83 = 83,
2275 NGRAN_BAND_84 = 84,
2276 NGRAN_BAND_86 = 86,
2277 NGRAN_BAND_257 = 257,
2278 NGRAN_BAND_258 = 258,
2279 NGRAN_BAND_260 = 260,
2280 NGRAN_BAND_261 = 261,
2281} RIL_NgranBands;
2282
paulye91d34712019-02-07 19:02:02 -08002283typedef struct {
2284 RIL_RadioAccessNetworks radio_access_network; // The type of network to scan.
2285 uint32_t bands_length; // Length of bands
2286 union {
2287 RIL_GeranBands geran_bands[MAX_BANDS];
2288 RIL_UtranBands utran_bands[MAX_BANDS];
2289 RIL_EutranBands eutran_bands[MAX_BANDS];
Sarah Chinbb757c62019-11-06 12:46:42 -08002290 RIL_NgranBands ngran_bands[MAX_BANDS];
paulye91d34712019-02-07 19:02:02 -08002291 } bands;
2292 uint32_t channels_length; // Length of channels
2293 uint32_t channels[MAX_CHANNELS]; // Frequency channels to scan
2294} RIL_RadioAccessSpecifier;
2295
2296typedef struct {
2297 RIL_ScanType type; // Type of the scan
2298 int32_t interval; // Time interval in seconds
2299 // between periodic scans, only
2300 // valid when type=RIL_PERIODIC
2301 uint32_t specifiers_length; // Length of specifiers
2302 RIL_RadioAccessSpecifier specifiers[MAX_RADIO_ACCESS_NETWORKS]; // Radio access networks
2303 // with bands/channels.
2304} RIL_NetworkScanRequest;
2305
2306typedef enum {
2307 PARTIAL = 0x01, // The result contains a part of the scan results
2308 COMPLETE = 0x02, // The result contains the last part of the scan results
2309} RIL_ScanStatus;
2310
2311typedef struct {
2312 RIL_ScanStatus status; // The status of the scan
2313 uint32_t network_infos_length; // Total length of RIL_CellInfo
2314 RIL_CellInfo_v12* network_infos; // List of network information
2315 RIL_Errno error;
2316} RIL_NetworkScanResult;
2317
2318/**
2319 * RIL_REQUEST_GET_SIM_STATUS
2320 *
2321 * Requests status of the SIM interface and the SIM card
2322 *
2323 * "data" is NULL
2324 *
2325 * "response" is const RIL_CardStatus_v6 *
2326 *
2327 * Valid errors:
2328 *
2329 * SUCCESS
2330 * RADIO_NOT_AVAILABLE
2331 * INTERNAL_ERR
2332 * NO_MEMORY
2333 * NO_RESOURCES
2334 * CANCELLED
2335 * REQUEST_NOT_SUPPORTED
2336 */
2337#define RIL_REQUEST_GET_SIM_STATUS 1
2338
2339/**
2340 * RIL_REQUEST_ENTER_SIM_PIN
2341 *
2342 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
2343 *
2344 * "data" is const char **
2345 * ((const char **)data)[0] is PIN value
2346 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2347 *
2348 * "response" is int *
2349 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2350 *
2351 * Valid errors:
2352 *
2353 * SUCCESS
2354 * RADIO_NOT_AVAILABLE (radio resetting)
2355 * PASSWORD_INCORRECT
2356 * INTERNAL_ERR
2357 * NO_MEMORY
2358 * NO_RESOURCES
2359 * CANCELLED
2360 * INVALID_ARGUMENTS
2361 * INVALID_SIM_STATE
2362 * REQUEST_NOT_SUPPORTED
2363 */
2364
2365#define RIL_REQUEST_ENTER_SIM_PIN 2
2366
2367/**
2368 * RIL_REQUEST_ENTER_SIM_PUK
2369 *
2370 * Supplies SIM PUK and new PIN.
2371 *
2372 * "data" is const char **
2373 * ((const char **)data)[0] is PUK value
2374 * ((const char **)data)[1] is new PIN value
2375 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2376 *
2377 * "response" is int *
2378 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2379 *
2380 * Valid errors:
2381 *
2382 * SUCCESS
2383 * RADIO_NOT_AVAILABLE (radio resetting)
2384 * PASSWORD_INCORRECT
2385 * (PUK is invalid)
2386 * INTERNAL_ERR
2387 * NO_MEMORY
2388 * NO_RESOURCES
2389 * CANCELLED
2390 * INVALID_ARGUMENTS
2391 * INVALID_SIM_STATE
2392 * REQUEST_NOT_SUPPORTED
2393 */
2394
2395#define RIL_REQUEST_ENTER_SIM_PUK 3
2396
2397/**
2398 * RIL_REQUEST_ENTER_SIM_PIN2
2399 *
2400 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
2401 * returned as a a failure from a previous operation.
2402 *
2403 * "data" is const char **
2404 * ((const char **)data)[0] is PIN2 value
2405 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2406 *
2407 * "response" is int *
2408 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2409 *
2410 * Valid errors:
2411 *
2412 * SUCCESS
2413 * RADIO_NOT_AVAILABLE (radio resetting)
2414 * PASSWORD_INCORRECT
2415 * INTERNAL_ERR
2416 * NO_MEMORY
2417 * NO_RESOURCES
2418 * CANCELLED
2419 * INVALID_ARGUMENTS
2420 * INVALID_SIM_STATE
2421 * REQUEST_NOT_SUPPORTED
2422 */
2423
2424#define RIL_REQUEST_ENTER_SIM_PIN2 4
2425
2426/**
2427 * RIL_REQUEST_ENTER_SIM_PUK2
2428 *
2429 * Supplies SIM PUK2 and new PIN2.
2430 *
2431 * "data" is const char **
2432 * ((const char **)data)[0] is PUK2 value
2433 * ((const char **)data)[1] is new PIN2 value
2434 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2435 *
2436 * "response" is int *
2437 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2438 *
2439 * Valid errors:
2440 *
2441 * SUCCESS
2442 * RADIO_NOT_AVAILABLE (radio resetting)
2443 * PASSWORD_INCORRECT
2444 * (PUK2 is invalid)
2445 * INTERNAL_ERR
2446 * NO_MEMORY
2447 * NO_RESOURCES
2448 * CANCELLED
2449 * INVALID_ARGUMENTS
2450 * INVALID_SIM_STATE
2451 * REQUEST_NOT_SUPPORTED
2452 */
2453
2454#define RIL_REQUEST_ENTER_SIM_PUK2 5
2455
2456/**
2457 * RIL_REQUEST_CHANGE_SIM_PIN
2458 *
2459 * Supplies old SIM PIN and new PIN.
2460 *
2461 * "data" is const char **
2462 * ((const char **)data)[0] is old PIN value
2463 * ((const char **)data)[1] is new PIN value
2464 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2465 *
2466 * "response" is int *
2467 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2468 *
2469 * Valid errors:
2470 *
2471 * SUCCESS
2472 * RADIO_NOT_AVAILABLE (radio resetting)
2473 * PASSWORD_INCORRECT
2474 * (old PIN is invalid)
2475 * INTERNAL_ERR
2476 * NO_MEMORY
2477 * NO_RESOURCES
2478 * CANCELLED
2479 * INVALID_ARGUMENTS
2480 * INVALID_SIM_STATE
2481 * REQUEST_NOT_SUPPORTED
2482 */
2483
2484#define RIL_REQUEST_CHANGE_SIM_PIN 6
2485
2486
2487/**
2488 * RIL_REQUEST_CHANGE_SIM_PIN2
2489 *
2490 * Supplies old SIM PIN2 and new PIN2.
2491 *
2492 * "data" is const char **
2493 * ((const char **)data)[0] is old PIN2 value
2494 * ((const char **)data)[1] is new PIN2 value
2495 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2496 *
2497 * "response" is int *
2498 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2499 *
2500 * Valid errors:
2501 *
2502 * SUCCESS
2503 * RADIO_NOT_AVAILABLE (radio resetting)
2504 * PASSWORD_INCORRECT
2505 * (old PIN2 is invalid)
2506 * INTERNAL_ERR
2507 * NO_MEMORY
2508 * NO_RESOURCES
2509 * CANCELLED
2510 * INVALID_ARGUMENTS
2511 * INVALID_SIM_STATE
2512 * REQUEST_NOT_SUPPORTED
2513 *
2514 */
2515
2516#define RIL_REQUEST_CHANGE_SIM_PIN2 7
2517
2518/**
2519 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
2520 *
2521 * Requests that network personlization be deactivated
2522 *
2523 * "data" is const char **
2524 * ((const char **)(data))[0]] is network depersonlization code
2525 *
2526 * "response" is int *
2527 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2528 *
2529 * Valid errors:
2530 *
2531 * SUCCESS
2532 * RADIO_NOT_AVAILABLE (radio resetting)
2533 * PASSWORD_INCORRECT
2534 * SIM_ABSENT
2535 * (code is invalid)
2536 * INTERNAL_ERR
2537 * NO_MEMORY
2538 * NO_RESOURCES
2539 * CANCELLED
2540 * REQUEST_NOT_SUPPORTED
2541 */
2542
2543#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
2544
2545/**
2546 * RIL_REQUEST_GET_CURRENT_CALLS
2547 *
2548 * Requests current call list
2549 *
2550 * "data" is NULL
2551 *
2552 * "response" must be a "const RIL_Call **"
2553 *
2554 * Valid errors:
2555 *
2556 * SUCCESS
2557 * RADIO_NOT_AVAILABLE (radio resetting)
2558 * NO_MEMORY
2559 * (request will be made again in a few hundred msec)
2560 * INTERNAL_ERR
2561 * NO_RESOURCES
2562 * CANCELLED
2563 * REQUEST_NOT_SUPPORTED
2564 */
2565
2566#define RIL_REQUEST_GET_CURRENT_CALLS 9
2567
2568
2569/**
2570 * RIL_REQUEST_DIAL
2571 *
2572 * Initiate voice call
2573 *
2574 * "data" is const RIL_Dial *
2575 * "response" is NULL
2576 *
2577 * This method is never used for supplementary service codes
2578 *
2579 * Valid errors:
2580 * SUCCESS
2581 * RADIO_NOT_AVAILABLE (radio resetting)
2582 * DIAL_MODIFIED_TO_USSD
2583 * DIAL_MODIFIED_TO_SS
2584 * DIAL_MODIFIED_TO_DIAL
2585 * INVALID_ARGUMENTS
2586 * NO_MEMORY
2587 * INVALID_STATE
2588 * NO_RESOURCES
2589 * INTERNAL_ERR
2590 * FDN_CHECK_FAILURE
2591 * MODEM_ERR
2592 * NO_SUBSCRIPTION
2593 * NO_NETWORK_FOUND
2594 * INVALID_CALL_ID
2595 * DEVICE_IN_USE
2596 * OPERATION_NOT_ALLOWED
2597 * ABORTED
2598 * CANCELLED
2599 * REQUEST_NOT_SUPPORTED
2600 */
2601#define RIL_REQUEST_DIAL 10
2602
2603/**
2604 * RIL_REQUEST_GET_IMSI
2605 *
2606 * Get the SIM IMSI
2607 *
2608 * Only valid when radio state is "RADIO_STATE_ON"
2609 *
2610 * "data" is const char **
2611 * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2612 * "response" is a const char * containing the IMSI
2613 *
2614 * Valid errors:
2615 * SUCCESS
2616 * RADIO_NOT_AVAILABLE (radio resetting)
2617 * INTERNAL_ERR
2618 * NO_MEMORY
2619 * NO_RESOURCES
2620 * CANCELLED
2621 * INVALID_SIM_STATE
2622 * REQUEST_NOT_SUPPORTED
2623 */
2624
2625#define RIL_REQUEST_GET_IMSI 11
2626
2627/**
2628 * RIL_REQUEST_HANGUP
2629 *
2630 * Hang up a specific line (like AT+CHLD=1x)
2631 *
2632 * After this HANGUP request returns, RIL should show the connection is NOT
2633 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2634 *
2635 * "data" is an int *
2636 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
2637 *
2638 * "response" is NULL
2639 *
2640 * Valid errors:
2641 * SUCCESS
2642 * RADIO_NOT_AVAILABLE (radio resetting)
2643 * INVALID_ARGUMENTS
2644 * NO_MEMORY
2645 * INVALID_STATE
2646 * MODEM_ERR
2647 * INTERNAL_ERR
2648 * NO_MEMORY
2649 * INVALID_CALL_ID
2650 * INVALID_ARGUMENTS
2651 * NO_RESOURCES
2652 * CANCELLED
2653 * REQUEST_NOT_SUPPORTED
2654 */
2655
2656#define RIL_REQUEST_HANGUP 12
2657
2658/**
2659 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
2660 *
2661 * Hang up waiting or held (like AT+CHLD=0)
2662 *
2663 * After this HANGUP request returns, RIL should show the connection is NOT
2664 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2665 *
2666 * "data" is NULL
2667 * "response" is NULL
2668 *
2669 * Valid errors:
2670 * SUCCESS
2671 * RADIO_NOT_AVAILABLE (radio resetting)
2672 * INVALID_STATE
2673 * NO_MEMORY
2674 * MODEM_ERR
2675 * INTERNAL_ERR
2676 * NO_MEMORY
2677 * INVALID_CALL_ID
2678 * NO_RESOURCES
2679 * OPERATION_NOT_ALLOWED
2680 * INVALID_ARGUMENTS
2681 * NO_RESOURCES
2682 * CANCELLED
2683 * REQUEST_NOT_SUPPORTED
2684 */
2685
2686#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
2687
2688/**
2689 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
2690 *
2691 * Hang up waiting or held (like AT+CHLD=1)
2692 *
2693 * After this HANGUP request returns, RIL should show the connection is NOT
2694 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2695 *
2696 * "data" is NULL
2697 * "response" is NULL
2698 *
2699 * Valid errors:
2700 * SUCCESS
2701 * RADIO_NOT_AVAILABLE (radio resetting)
2702 * INVALID_STATE
2703 * NO_MEMORY
2704 * MODEM_ERR
2705 * INTERNAL_ERR
2706 * INVALID_CALL_ID
2707 * OPERATION_NOT_ALLOWED
2708 * INVALID_ARGUMENTS
2709 * NO_RESOURCES
2710 * CANCELLED
2711 * REQUEST_NOT_SUPPORTED
2712 */
2713
2714#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
2715
2716/**
2717 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
2718 *
2719 * Switch waiting or holding call and active call (like AT+CHLD=2)
2720 *
2721 * State transitions should be is follows:
2722 *
2723 * If call 1 is waiting and call 2 is active, then if this re
2724 *
2725 * BEFORE AFTER
2726 * Call 1 Call 2 Call 1 Call 2
2727 * ACTIVE HOLDING HOLDING ACTIVE
2728 * ACTIVE WAITING HOLDING ACTIVE
2729 * HOLDING WAITING HOLDING ACTIVE
2730 * ACTIVE IDLE HOLDING IDLE
2731 * IDLE IDLE IDLE IDLE
2732 *
2733 * "data" is NULL
2734 * "response" is NULL
2735 *
2736 * Valid errors:
2737 * SUCCESS
2738 * RADIO_NOT_AVAILABLE (radio resetting)
2739 * INVALID_STATE
2740 * NO_MEMORY
2741 * MODEM_ERR
2742 * INTERNAL_ERR
2743 * INVALID_STATE
2744 * INVALID_ARGUMENTS
2745 * INVALID_CALL_ID
2746 * OPERATION_NOT_ALLOWED
2747 * NO_RESOURCES
2748 * CANCELLED
2749 * REQUEST_NOT_SUPPORTED
2750 */
2751
2752#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
2753#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
2754
2755/**
2756 * RIL_REQUEST_CONFERENCE
2757 *
2758 * Conference holding and active (like AT+CHLD=3)
2759
2760 * "data" is NULL
2761 * "response" is NULL
2762 *
2763 * Valid errors:
2764 * SUCCESS
2765 * RADIO_NOT_AVAILABLE (radio resetting)
2766 * NO_MEMORY
2767 * MODEM_ERR
2768 * INTERNAL_ERR
2769 * INVALID_STATE
2770 * INVALID_CALL_ID
2771 * INVALID_ARGUMENTS
2772 * OPERATION_NOT_ALLOWED
2773 * NO_RESOURCES
2774 * CANCELLED
2775 * REQUEST_NOT_SUPPORTED
2776 */
2777#define RIL_REQUEST_CONFERENCE 16
2778
2779/**
2780 * RIL_REQUEST_UDUB
2781 *
2782 * Send UDUB (user determined used busy) to ringing or
2783 * waiting call answer)(RIL_BasicRequest r);
2784 *
2785 * "data" is NULL
2786 * "response" is NULL
2787 *
2788 * Valid errors:
2789 * SUCCESS
2790 * RADIO_NOT_AVAILABLE (radio resetting)
2791 * INVALID_STATE
2792 * NO_RESOURCES
2793 * NO_MEMORY
2794 * MODEM_ERR
2795 * INTERNAL_ERR
2796 * INVALID_CALL_ID
2797 * OPERATION_NOT_ALLOWED
2798 * INVALID_ARGUMENTS
2799 * CANCELLED
2800 * REQUEST_NOT_SUPPORTED
2801 */
2802#define RIL_REQUEST_UDUB 17
2803
2804/**
2805 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2806 *
2807 * Requests the failure cause code for the most recently terminated call
2808 *
2809 * "data" is NULL
2810 * "response" is a const RIL_LastCallFailCauseInfo *
2811 * RIL_LastCallFailCauseInfo contains LastCallFailCause and vendor cause.
2812 * The vendor cause code must be used for debugging purpose only.
2813 * The implementation must return one of the values of LastCallFailCause
2814 * as mentioned below.
2815 *
2816 * GSM failure reasons codes for the cause codes defined in TS 24.008 Annex H
2817 * where possible.
2818 * CDMA failure reasons codes for the possible call failure scenarios
2819 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
2820 * Any of the following reason codes if the call is failed or dropped due to reason
2821 * mentioned with in the braces.
2822 *
2823 * CALL_FAIL_RADIO_OFF (Radio is OFF)
2824 * CALL_FAIL_OUT_OF_SERVICE (No cell coverage)
2825 * CALL_FAIL_NO_VALID_SIM (No valid SIM)
2826 * CALL_FAIL_RADIO_INTERNAL_ERROR (Modem hit unexpected error scenario)
2827 * CALL_FAIL_NETWORK_RESP_TIMEOUT (No response from network)
2828 * CALL_FAIL_NETWORK_REJECT (Explicit network reject)
2829 * CALL_FAIL_RADIO_ACCESS_FAILURE (RRC connection failure. Eg.RACH)
2830 * CALL_FAIL_RADIO_LINK_FAILURE (Radio Link Failure)
2831 * CALL_FAIL_RADIO_LINK_LOST (Radio link lost due to poor coverage)
2832 * CALL_FAIL_RADIO_UPLINK_FAILURE (Radio uplink failure)
2833 * CALL_FAIL_RADIO_SETUP_FAILURE (RRC connection setup failure)
2834 * CALL_FAIL_RADIO_RELEASE_NORMAL (RRC connection release, normal)
2835 * CALL_FAIL_RADIO_RELEASE_ABNORMAL (RRC connection release, abnormal)
2836 * CALL_FAIL_ACCESS_CLASS_BLOCKED (Access class barring)
2837 * CALL_FAIL_NETWORK_DETACH (Explicit network detach)
2838 *
2839 * OEM causes (CALL_FAIL_OEM_CAUSE_XX) must be used for debug purpose only
2840 *
2841 * If the implementation does not have access to the exact cause codes,
2842 * then it should return one of the values listed in RIL_LastCallFailCause,
2843 * as the UI layer needs to distinguish these cases for tone generation or
2844 * error notification.
2845 *
2846 * Valid errors:
2847 * SUCCESS
2848 * RADIO_NOT_AVAILABLE
2849 * NO_MEMORY
2850 * INTERNAL_ERR
2851 * NO_RESOURCES
2852 * CANCELLED
2853 * REQUEST_NOT_SUPPORTED
2854 *
2855 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
2856 */
2857#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
2858
2859/**
2860 * RIL_REQUEST_SIGNAL_STRENGTH
2861 *
2862 * Requests current signal strength and associated information
2863 *
2864 * Must succeed if radio is on.
2865 *
2866 * "data" is NULL
2867 *
2868 * "response" is a const RIL_SignalStrength *
2869 *
2870 * Valid errors:
2871 * SUCCESS
2872 * RADIO_NOT_AVAILABLE
2873 * NO_MEMORY
2874 * INTERNAL_ERR
2875 * SYSTEM_ERR
2876 * MODEM_ERR
2877 * NOT_PROVISIONED
2878 * REQUEST_NOT_SUPPORTED
2879 * NO_RESOURCES
2880 * CANCELLED
2881 */
2882#define RIL_REQUEST_SIGNAL_STRENGTH 19
2883
2884/**
2885 * RIL_REQUEST_VOICE_REGISTRATION_STATE
2886 *
2887 * Request current registration state
2888 *
2889 * "data" is NULL
2890 * "response" is a const RIL_VoiceRegistrationStateResponse *
2891 *
2892 * Valid errors:
2893 * SUCCESS
2894 * RADIO_NOT_AVAILABLE
2895 * INTERNAL_ERR
2896 * NO_MEMORY
2897 * NO_RESOURCES
2898 * CANCELLED
2899 * REQUEST_NOT_SUPPORTED
2900 */
2901#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
2902
2903/**
2904 * RIL_REQUEST_DATA_REGISTRATION_STATE
2905 *
2906 * Request current DATA registration state
2907 *
2908 * "data" is NULL
2909 * "response" is a const RIL_DataRegistrationStateResponse *
2910 *
2911 * Valid errors:
2912 * SUCCESS
2913 * RADIO_NOT_AVAILABLE
2914 * NO_MEMORY
2915 * INTERNAL_ERR
2916 * SYSTEM_ERR
2917 * MODEM_ERR
2918 * NOT_PROVISIONED
2919 * REQUEST_NOT_SUPPORTED
2920 * NO_RESOURCES
2921 * CANCELLED
2922 */
2923#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
2924
2925/**
2926 * RIL_REQUEST_OPERATOR
2927 *
2928 * Request current operator ONS or EONS
2929 *
2930 * "data" is NULL
2931 * "response" is a "const char **"
2932 * ((const char **)response)[0] is long alpha ONS or EONS
2933 * or NULL if unregistered
2934 *
2935 * ((const char **)response)[1] is short alpha ONS or EONS
2936 * or NULL if unregistered
2937 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2938 * or NULL if unregistered
2939 *
2940 * Valid errors:
2941 * SUCCESS
2942 * RADIO_NOT_AVAILABLE
2943 * NO_MEMORY
2944 * INTERNAL_ERR
2945 * SYSTEM_ERR
2946 * REQUEST_NOT_SUPPORTED
2947 * NO_RESOURCES
2948 * CANCELLED
2949 */
2950#define RIL_REQUEST_OPERATOR 22
2951
2952/**
2953 * RIL_REQUEST_RADIO_POWER
2954 *
2955 * Toggle radio on and off (for "airplane" mode)
2956 * If the radio is is turned off/on the radio modem subsystem
2957 * is expected return to an initialized state. For instance,
2958 * any voice and data calls will be terminated and all associated
2959 * lists emptied.
2960 *
2961 * "data" is int *
2962 * ((int *)data)[0] is > 0 for "Radio On"
2963 * ((int *)data)[0] is == 0 for "Radio Off"
2964 *
2965 * "response" is NULL
2966 *
2967 * Turn radio on if "on" > 0
2968 * Turn radio off if "on" == 0
2969 *
2970 * Valid errors:
2971 * SUCCESS
2972 * RADIO_NOT_AVAILABLE
2973 * OPERATION_NOT_ALLOWED
2974 * INVALID_STATE
2975 * NO_MEMORY
2976 * INTERNAL_ERR
2977 * SYSTEM_ERR
2978 * INVALID_ARGUMENTS
2979 * MODEM_ERR
2980 * DEVICE_IN_USE
2981 * OPERATION_NOT_ALLOWED
2982 * INVALID_MODEM_STATE
2983 * REQUEST_NOT_SUPPORTED
2984 * NO_RESOURCES
2985 * CANCELLED
2986 */
2987#define RIL_REQUEST_RADIO_POWER 23
2988
2989/**
2990 * RIL_REQUEST_DTMF
2991 *
2992 * Send a DTMF tone
2993 *
2994 * If the implementation is currently playing a tone requested via
2995 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2996 * should be played instead
2997 *
2998 * "data" is a char * containing a single character with one of 12 values: 0-9,*,#
2999 * "response" is NULL
3000 *
3001 * FIXME should this block/mute microphone?
3002 * How does this interact with local DTMF feedback?
3003 *
3004 * Valid errors:
3005 * SUCCESS
3006 * RADIO_NOT_AVAILABLE
3007 * INVALID_ARGUMENTS
3008 * NO_RESOURCES
3009 * NO_MEMORY
3010 * MODEM_ERR
3011 * INTERNAL_ERR
3012 * INVALID_CALL_ID
3013 * NO_RESOURCES
3014 * CANCELLED
3015 * INVALID_MODEM_STATE
3016 * REQUEST_NOT_SUPPORTED
3017 *
3018 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
3019 *
3020 */
3021#define RIL_REQUEST_DTMF 24
3022
3023/**
3024 * RIL_REQUEST_SEND_SMS
3025 *
3026 * Send an SMS message
3027 *
3028 * "data" is const char **
3029 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
3030 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
3031 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
3032 * less the SMSC address
3033 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
3034 *
3035 * "response" is a const RIL_SMS_Response *
3036 *
3037 * Based on the return error, caller decides to resend if sending sms
3038 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
3039 *
3040 * Valid errors:
3041 * SUCCESS
3042 * RADIO_NOT_AVAILABLE
3043 * SMS_SEND_FAIL_RETRY
3044 * FDN_CHECK_FAILURE
3045 * NETWORK_REJECT
3046 * INVALID_STATE
3047 * INVALID_ARGUMENTS
3048 * NO_MEMORY
3049 * REQUEST_RATE_LIMITED
3050 * INVALID_SMS_FORMAT
3051 * SYSTEM_ERR
3052 * ENCODING_ERR
3053 * INVALID_SMSC_ADDRESS
3054 * MODEM_ERR
3055 * NETWORK_ERR
3056 * OPERATION_NOT_ALLOWED
3057 * NO_MEMORY
3058 * NO_RESOURCES
3059 * CANCELLED
3060 * REQUEST_NOT_SUPPORTED
3061 * MODE_NOT_SUPPORTED
3062 * SIM_ABSENT
3063 *
3064 * FIXME how do we specify TP-Message-Reference if we need to resend?
3065 */
3066#define RIL_REQUEST_SEND_SMS 25
3067
3068
3069/**
3070 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
3071 *
3072 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
3073 * except that more messages are expected to be sent soon. If possible,
3074 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
3075 *
3076 * "data" is const char **
3077 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
3078 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
3079 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
3080 * less the SMSC address
3081 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
3082 *
3083 * "response" is a const RIL_SMS_Response *
3084 *
3085 * Based on the return error, caller decides to resend if sending sms
3086 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
3087 *
3088 * Valid errors:
3089 * SUCCESS
3090 * RADIO_NOT_AVAILABLE
3091 * SMS_SEND_FAIL_RETRY
3092 * NETWORK_REJECT
3093 * INVALID_STATE
3094 * INVALID_ARGUMENTS
3095 * NO_MEMORY
3096 * INVALID_SMS_FORMAT
3097 * SYSTEM_ERR
3098 * REQUEST_RATE_LIMITED
3099 * FDN_CHECK_FAILURE
3100 * MODEM_ERR
3101 * NETWORK_ERR
3102 * ENCODING_ERR
3103 * INVALID_SMSC_ADDRESS
3104 * OPERATION_NOT_ALLOWED
3105 * INTERNAL_ERR
3106 * NO_RESOURCES
3107 * CANCELLED
3108 * REQUEST_NOT_SUPPORTED
3109 * MODE_NOT_SUPPORTED
3110 * SIM_ABSENT
3111 *
3112 */
3113#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
3114
3115
3116/**
3117 * RIL_REQUEST_SETUP_DATA_CALL
3118 *
3119 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
3120 * return success it is added to the list of data calls and a
3121 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
3122 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
3123 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
3124 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
3125 *
3126 * The RIL is expected to:
3127 * - Create one data call context.
3128 * - Create and configure a dedicated interface for the context
3129 * - The interface must be point to point.
3130 * - The interface is configured with one or more addresses and
3131 * is capable of sending and receiving packets. The prefix length
3132 * of the addresses must be /32 for IPv4 and /128 for IPv6.
3133 * - Must NOT change the linux routing table.
3134 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
3135 * number of simultaneous data call contexts.
3136 *
3137 * "data" is a const char **
3138 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
3139 * for values above 2 this is RIL_RadioTechnology + 2.
3140 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
3141 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
3142 * override the one in the profile. NULL indicates no APN overrride.
3143 * ((const char **)data)[3] is the username for APN, or NULL
3144 * ((const char **)data)[4] is the password for APN, or NULL
3145 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
3146 * 0 => PAP and CHAP is never performed.
3147 * 1 => PAP may be performed; CHAP is never performed.
3148 * 2 => CHAP may be performed; PAP is never performed.
3149 * 3 => PAP / CHAP may be performed - baseband dependent.
3150 * ((const char **)data)[6] is the non-roaming/home connection type to request. Must be one of the
3151 * PDP_type values in TS 27.007 section 10.1.1.
3152 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
3153 * ((const char **)data)[7] is the roaming connection type to request. Must be one of the
3154 * PDP_type values in TS 27.007 section 10.1.1.
3155 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
3156 * ((const char **)data)[8] is the bitmask of APN type in decimal string format. The
3157 * bitmask will encapsulate the following values:
3158 * ia,mms,agps,supl,hipri,fota,dun,ims,default.
3159 * ((const char **)data)[9] is the bearer bitmask in decimal string format. Each bit is a
3160 * RIL_RadioAccessFamily. "0" or NULL indicates all RATs.
3161 * ((const char **)data)[10] is the boolean in string format indicating the APN setting was
3162 * sent to the modem through RIL_REQUEST_SET_DATA_PROFILE earlier.
3163 * ((const char **)data)[11] is the mtu size in bytes of the mobile interface to which
3164 * the apn is connected.
3165 * ((const char **)data)[12] is the MVNO type:
3166 * possible values are "imsi", "gid", "spn".
3167 * ((const char **)data)[13] is MVNO match data in string. Can be anything defined by the carrier.
3168 * For example,
3169 * SPN like: "A MOBILE", "BEN NL", etc...
3170 * IMSI like: "302720x94", "2060188", etc...
3171 * GID like: "4E", "33", etc...
3172 * ((const char **)data)[14] is the boolean string indicating data roaming is allowed or not. "1"
3173 * indicates data roaming is enabled by the user, "0" indicates disabled.
3174 *
3175 * "response" is a RIL_Data_Call_Response_v11
3176 *
3177 * FIXME may need way to configure QoS settings
3178 *
3179 * Valid errors:
3180 * SUCCESS should be returned on both success and failure of setup with
3181 * the RIL_Data_Call_Response_v6.status containing the actual status.
3182 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
3183 *
3184 * Other errors could include:
3185 * RADIO_NOT_AVAILABLE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
3186 * OP_NOT_ALLOWED_DURING_VOICE_CALL, REQUEST_NOT_SUPPORTED,
3187 * INVALID_ARGUMENTS, INTERNAL_ERR, NO_MEMORY, NO_RESOURCES,
3188 * CANCELLED and SIM_ABSENT
3189 *
3190 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
3191 */
3192#define RIL_REQUEST_SETUP_DATA_CALL 27
3193
3194
3195/**
3196 * RIL_REQUEST_SIM_IO
3197 *
3198 * Request SIM I/O operation.
3199 * This is similar to the TS 27.007 "restricted SIM" operation
3200 * where it assumes all of the EF selection will be done by the
3201 * callee.
3202 *
3203 * "data" is a const RIL_SIM_IO_v6 *
3204 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
3205 * or may specify a PIN2 for operations that require a PIN2 (eg
3206 * updating FDN records)
3207 *
3208 * "response" is a const RIL_SIM_IO_Response *
3209 *
3210 * Arguments and responses that are unused for certain
3211 * values of "command" should be ignored or set to NULL
3212 *
3213 * Valid errors:
3214 * SUCCESS
3215 * RADIO_NOT_AVAILABLE
3216 * SIM_PIN2
3217 * SIM_PUK2
3218 * INVALID_SIM_STATE
3219 * SIM_ERR
3220 * REQUEST_NOT_SUPPORTED
3221 */
3222#define RIL_REQUEST_SIM_IO 28
3223
3224/**
3225 * RIL_REQUEST_SEND_USSD
3226 *
3227 * Send a USSD message
3228 *
3229 * If a USSD session already exists, the message should be sent in the
3230 * context of that session. Otherwise, a new session should be created.
3231 *
3232 * The network reply should be reported via RIL_UNSOL_ON_USSD
3233 *
3234 * Only one USSD session may exist at a time, and the session is assumed
3235 * to exist until:
3236 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
3237 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
3238 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
3239 *
3240 * "data" is a const char * containing the USSD request in UTF-8 format
3241 * "response" is NULL
3242 *
3243 * Valid errors:
3244 * SUCCESS
3245 * RADIO_NOT_AVAILABLE
3246 * FDN_CHECK_FAILURE
3247 * USSD_MODIFIED_TO_DIAL
3248 * USSD_MODIFIED_TO_SS
3249 * USSD_MODIFIED_TO_USSD
3250 * SIM_BUSY
3251 * OPERATION_NOT_ALLOWED
3252 * INVALID_ARGUMENTS
3253 * NO_MEMORY
3254 * MODEM_ERR
3255 * INTERNAL_ERR
3256 * ABORTED
3257 * SYSTEM_ERR
3258 * INVALID_STATE
3259 * NO_RESOURCES
3260 * CANCELLED
3261 * REQUEST_NOT_SUPPORTED
3262 *
3263 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
3264 */
3265
3266#define RIL_REQUEST_SEND_USSD 29
3267
3268/**
3269 * RIL_REQUEST_CANCEL_USSD
3270 *
3271 * Cancel the current USSD session if one exists
3272 *
3273 * "data" is null
3274 * "response" is NULL
3275 *
3276 * Valid errors:
3277 * SUCCESS
3278 * RADIO_NOT_AVAILABLE
3279 * SIM_BUSY
3280 * OPERATION_NOT_ALLOWED
3281 * MODEM_ERR
3282 * INTERNAL_ERR
3283 * NO_MEMORY
3284 * INVALID_STATE
3285 * NO_RESOURCES
3286 * CANCELLED
3287 * REQUEST_NOT_SUPPORTED
3288 */
3289
3290#define RIL_REQUEST_CANCEL_USSD 30
3291
3292/**
3293 * RIL_REQUEST_GET_CLIR
3294 *
3295 * Gets current CLIR status
3296 * "data" is NULL
3297 * "response" is int *
3298 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
3299 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
3300 *
3301 * Valid errors:
3302 * SUCCESS
3303 * RADIO_NOT_AVAILABLE
3304 * SS_MODIFIED_TO_DIAL
3305 * SS_MODIFIED_TO_USSD
3306 * SS_MODIFIED_TO_SS
3307 * NO_MEMORY
3308 * MODEM_ERR
3309 * INTERNAL_ERR
3310 * FDN_CHECK_FAILURE
3311 * SYSTEM_ERR
3312 * NO_RESOURCES
3313 * CANCELLED
3314 * REQUEST_NOT_SUPPORTED
3315 */
3316#define RIL_REQUEST_GET_CLIR 31
3317
3318/**
3319 * RIL_REQUEST_SET_CLIR
3320 *
3321 * "data" is int *
3322 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
3323 *
3324 * "response" is NULL
3325 *
3326 * Valid errors:
3327 * SUCCESS
3328 * RADIO_NOT_AVAILABLE
3329 * SS_MODIFIED_TO_DIAL
3330 * SS_MODIFIED_TO_USSD
3331 * SS_MODIFIED_TO_SS
3332 * INVALID_ARGUMENTS
3333 * SYSTEM_ERR
3334 * INTERNAL_ERR
3335 * NO_MEMORY
3336 * NO_RESOURCES
3337 * CANCELLED
3338 * REQUEST_NOT_SUPPORTED
3339 */
3340#define RIL_REQUEST_SET_CLIR 32
3341
3342/**
3343 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
3344 *
3345 * "data" is const RIL_CallForwardInfo *
3346 *
3347 * "response" is const RIL_CallForwardInfo **
3348 * "response" points to an array of RIL_CallForwardInfo *'s, one for
3349 * each distinct registered phone number.
3350 *
3351 * For example, if data is forwarded to +18005551212 and voice is forwarded
3352 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
3353 *
3354 * If, however, both data and voice are forwarded to +18005551212, then
3355 * a single RIL_CallForwardInfo can be returned with the service class
3356 * set to "data + voice = 3")
3357 *
3358 * Valid errors:
3359 * SUCCESS
3360 * RADIO_NOT_AVAILABLE
3361 * SS_MODIFIED_TO_DIAL
3362 * SS_MODIFIED_TO_USSD
3363 * SS_MODIFIED_TO_SS
3364 * INVALID_ARGUMENTS
3365 * NO_MEMORY
3366 * SYSTEM_ERR
3367 * MODEM_ERR
3368 * INTERNAL_ERR
3369 * NO_MEMORY
3370 * FDN_CHECK_FAILURE
3371 * NO_RESOURCES
3372 * CANCELLED
3373 * REQUEST_NOT_SUPPORTED
3374 */
3375#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
3376
3377
3378/**
3379 * RIL_REQUEST_SET_CALL_FORWARD
3380 *
3381 * Configure call forward rule
3382 *
3383 * "data" is const RIL_CallForwardInfo *
3384 * "response" is NULL
3385 *
3386 * Valid errors:
3387 * SUCCESS
3388 * RADIO_NOT_AVAILABLE
3389 * SS_MODIFIED_TO_DIAL
3390 * SS_MODIFIED_TO_USSD
3391 * SS_MODIFIED_TO_SS
3392 * INVALID_ARGUMENTS
3393 * NO_MEMORY
3394 * SYSTEM_ERR
3395 * MODEM_ERR
3396 * INTERNAL_ERR
3397 * INVALID_STATE
3398 * FDN_CHECK_FAILURE
3399 * NO_RESOURCES
3400 * CANCELLED
3401 * REQUEST_NOT_SUPPORTED
3402 */
3403#define RIL_REQUEST_SET_CALL_FORWARD 34
3404
3405
3406/**
3407 * RIL_REQUEST_QUERY_CALL_WAITING
3408 *
3409 * Query current call waiting state
3410 *
3411 * "data" is const int *
3412 * ((const int *)data)[0] is the TS 27.007 service class to query.
3413 * "response" is a const int *
3414 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
3415 *
3416 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
3417 * must follow, with the TS 27.007 service class bit vector of services
3418 * for which call waiting is enabled.
3419 *
3420 * For example, if ((const int *)response)[0] is 1 and
3421 * ((const int *)response)[1] is 3, then call waiting is enabled for data
3422 * and voice and disabled for everything else
3423 *
3424 * Valid errors:
3425 * SUCCESS
3426 * RADIO_NOT_AVAILABLE
3427 * SS_MODIFIED_TO_DIAL
3428 * SS_MODIFIED_TO_USSD
3429 * SS_MODIFIED_TO_SS
3430 * NO_MEMORY
3431 * MODEM_ERR
3432 * INTERNAL_ERR
3433 * NO_MEMORY
3434 * FDN_CHECK_FAILURE
3435 * INVALID_ARGUMENTS
3436 * NO_RESOURCES
3437 * CANCELLED
3438 * REQUEST_NOT_SUPPORTED
3439 */
3440#define RIL_REQUEST_QUERY_CALL_WAITING 35
3441
3442
3443/**
3444 * RIL_REQUEST_SET_CALL_WAITING
3445 *
3446 * Configure current call waiting state
3447 *
3448 * "data" is const int *
3449 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
3450 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
3451 * services to modify
3452 * "response" is NULL
3453 *
3454 * Valid errors:
3455 * SUCCESS
3456 * RADIO_NOT_AVAILABLE
3457 * SS_MODIFIED_TO_DIAL
3458 * SS_MODIFIED_TO_USSD
3459 * SS_MODIFIED_TO_SS
3460 * INVALID_ARGUMENTS
3461 * NO_MEMORY
3462 * MODEM_ERR
3463 * INTERNAL_ERR
3464 * INVALID_STATE
3465 * FDN_CHECK_FAILURE
3466 * NO_RESOURCES
3467 * CANCELLED
3468 * REQUEST_NOT_SUPPORTED
3469 */
3470#define RIL_REQUEST_SET_CALL_WAITING 36
3471
3472/**
3473 * RIL_REQUEST_SMS_ACKNOWLEDGE
3474 *
3475 * Acknowledge successful or failed receipt of SMS previously indicated
3476 * via RIL_UNSOL_RESPONSE_NEW_SMS
3477 *
3478 * "data" is int *
3479 * ((int *)data)[0] is 1 on successful receipt
3480 * (basically, AT+CNMA=1 from TS 27.005
3481 * is 0 on failed receipt
3482 * (basically, AT+CNMA=2 from TS 27.005)
3483 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
3484 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
3485 * capacity exceeded) and 0xFF (unspecified error) are
3486 * reported.
3487 *
3488 * "response" is NULL
3489 *
3490 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
3491 *
3492 * Valid errors:
3493 * SUCCESS
3494 * RADIO_NOT_AVAILABLE
3495 * INTERNAL_ERR
3496 * NO_MEMORY
3497 * NO_RESOURCES
3498 * CANCELLED
3499 * REQUEST_NOT_SUPPORTED
3500 */
3501#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
3502
3503/**
3504 * RIL_REQUEST_GET_IMEI - DEPRECATED
3505 *
3506 * Get the device IMEI, including check digit
3507 *
3508 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
3509 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
3510 *
3511 * "data" is NULL
3512 * "response" is a const char * containing the IMEI
3513 *
3514 * Valid errors:
3515 * SUCCESS
3516 * RADIO_NOT_AVAILABLE (radio resetting)
3517 * NO_MEMORY
3518 * INTERNAL_ERR
3519 * SYSTEM_ERR
3520 * MODEM_ERR
3521 * NOT_PROVISIONED
3522 * REQUEST_NOT_SUPPORTED
3523 * NO_RESOURCES
3524 * CANCELLED
3525 */
3526
3527#define RIL_REQUEST_GET_IMEI 38
3528
3529/**
3530 * RIL_REQUEST_GET_IMEISV - DEPRECATED
3531 *
3532 * Get the device IMEISV, which should be two decimal digits
3533 *
3534 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
3535 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
3536 *
3537 * "data" is NULL
3538 * "response" is a const char * containing the IMEISV
3539 *
3540 * Valid errors:
3541 * SUCCESS
3542 * RADIO_NOT_AVAILABLE (radio resetting)
3543 * NO_MEMORY
3544 * INTERNAL_ERR
3545 * SYSTEM_ERR
3546 * MODEM_ERR
3547 * NOT_PROVISIONED
3548 * REQUEST_NOT_SUPPORTED
3549 * NO_RESOURCES
3550 * CANCELLED
3551 */
3552
3553#define RIL_REQUEST_GET_IMEISV 39
3554
3555
3556/**
3557 * RIL_REQUEST_ANSWER
3558 *
3559 * Answer incoming call
3560 *
3561 * Will not be called for WAITING calls.
3562 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
3563 * instead
3564 *
3565 * "data" is NULL
3566 * "response" is NULL
3567 *
3568 * Valid errors:
3569 * SUCCESS
3570 * RADIO_NOT_AVAILABLE (radio resetting)
3571 * INVALID_STATE
3572 * NO_MEMORY
3573 * SYSTEM_ERR
3574 * MODEM_ERR
3575 * INTERNAL_ERR
3576 * INVALID_CALL_ID
3577 * NO_RESOURCES
3578 * CANCELLED
3579 * REQUEST_NOT_SUPPORTED
3580 */
3581
3582#define RIL_REQUEST_ANSWER 40
3583
3584/**
3585 * RIL_REQUEST_DEACTIVATE_DATA_CALL
3586 *
3587 * Deactivate packet data connection and remove from the
3588 * data call list if SUCCESS is returned. Any other return
3589 * values should also try to remove the call from the list,
3590 * but that may not be possible. In any event a
3591 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
3592 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
3593 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
3594 *
3595 * "data" is const char **
3596 * ((char**)data)[0] indicating CID
3597 * ((char**)data)[1] indicating Disconnect Reason
3598 * 0 => No specific reason specified
3599 * 1 => Radio shutdown requested
3600 *
3601 * "response" is NULL
3602 *
3603 * Valid errors:
3604 * SUCCESS
3605 * RADIO_NOT_AVAILABLE
3606 * INVALID_CALL_ID
3607 * INVALID_STATE
3608 * INVALID_ARGUMENTS
3609 * REQUEST_NOT_SUPPORTED
3610 * INTERNAL_ERR
3611 * NO_MEMORY
3612 * NO_RESOURCES
3613 * CANCELLED
3614 * SIM_ABSENT
3615 *
3616 * See also: RIL_REQUEST_SETUP_DATA_CALL
3617 */
3618#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
3619
3620/**
3621 * RIL_REQUEST_QUERY_FACILITY_LOCK
3622 *
3623 * Query the status of a facility lock state
3624 *
3625 * "data" is const char **
3626 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
3627 * (eg "AO" for BAOC, "SC" for SIM lock)
3628 * ((const char **)data)[1] is the password, or "" if not required
3629 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
3630 * services to query
3631 * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
3632 * This is only applicable in the case of Fixed Dialing Numbers
3633 * (FDN) requests.
3634 *
3635 * "response" is an int *
3636 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
3637 * services for which the specified barring facility
3638 * is active. "0" means "disabled for all"
3639 *
3640 *
3641 * Valid errors:
3642 * SUCCESS
3643 * RADIO_NOT_AVAILABLE
3644 * SS_MODIFIED_TO_DIAL
3645 * SS_MODIFIED_TO_USSD
3646 * SS_MODIFIED_TO_SS
3647 * INVALID_ARGUMENTS
3648 * NO_MEMORY
3649 * INTERNAL_ERR
3650 * SYSTEM_ERR
3651 * MODEM_ERR
3652 * FDN_CHECK_FAILURE
3653 * NO_RESOURCES
3654 * CANCELLED
3655 * REQUEST_NOT_SUPPORTED
3656 *
3657 */
3658#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
3659
3660/**
3661 * RIL_REQUEST_SET_FACILITY_LOCK
3662 *
3663 * Enable/disable one facility lock
3664 *
3665 * "data" is const char **
3666 *
3667 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3668 * (eg "AO" for BAOC)
3669 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
3670 * ((const char **)data)[2] = password
3671 * ((const char **)data)[3] = string representation of decimal TS 27.007
3672 * service class bit vector. Eg, the string
3673 * "1" means "set this facility for voice services"
3674 * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
3675 * This is only applicable in the case of Fixed Dialing Numbers
3676 * (FDN) requests.
3677 *
3678 * "response" is int *
3679 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
3680 *
3681 * Valid errors:
3682 * SUCCESS
3683 * RADIO_NOT_AVAILABLE
3684 * SS_MODIFIED_TO_DIAL
3685 * SS_MODIFIED_TO_USSD
3686 * SS_MODIFIED_TO_SS
3687 * INVALID_ARGUMENTS
3688 * INTERNAL_ERR
3689 * NO_MEMORY
3690 * MODEM_ERR
3691 * INVALID_STATE
3692 * FDN_CHECK_FAILURE
3693 * NO_RESOURCES
3694 * CANCELLED
3695 * REQUEST_NOT_SUPPORTED
3696 *
3697 */
3698#define RIL_REQUEST_SET_FACILITY_LOCK 43
3699
3700/**
3701 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
3702 *
3703 * Change call barring facility password
3704 *
3705 * "data" is const char **
3706 *
3707 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3708 * (eg "AO" for BAOC)
3709 * ((const char **)data)[1] = old password
3710 * ((const char **)data)[2] = new password
3711 *
3712 * "response" is NULL
3713 *
3714 * Valid errors:
3715 * SUCCESS
3716 * RADIO_NOT_AVAILABLE
3717 * SS_MODIFIED_TO_DIAL
3718 * SS_MODIFIED_TO_USSD
3719 * SS_MODIFIED_TO_SS
3720 * INVALID_ARGUMENTS
3721 * NO_MEMORY
3722 * MODEM_ERR
3723 * INTERNAL_ERR
3724 * SYSTEM_ERR
3725 * FDN_CHECK_FAILURE
3726 * NO_RESOURCES
3727 * CANCELLED
3728 * REQUEST_NOT_SUPPORTED
3729 *
3730 */
3731#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
3732
3733/**
3734 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
3735 *
3736 * Query current network selectin mode
3737 *
3738 * "data" is NULL
3739 *
3740 * "response" is int *
3741 * ((const int *)response)[0] is
3742 * 0 for automatic selection
3743 * 1 for manual selection
3744 *
3745 * Valid errors:
3746 * SUCCESS
3747 * RADIO_NOT_AVAILABLE
3748 * NO_MEMORY
3749 * INTERNAL_ERR
3750 * SYSTEM_ERR
3751 * INVALID_ARGUMENTS
3752 * MODEM_ERR
3753 * REQUEST_NOT_SUPPORTED
3754 * NO_RESOURCES
3755 * CANCELLED
3756 *
3757 */
3758#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
3759
3760/**
3761 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
3762 *
3763 * Specify that the network should be selected automatically
3764 *
3765 * "data" is NULL
3766 * "response" is NULL
3767 *
3768 * This request must not respond until the new operator is selected
3769 * and registered
3770 *
3771 * Valid errors:
3772 * SUCCESS
3773 * RADIO_NOT_AVAILABLE
3774 * ILLEGAL_SIM_OR_ME
3775 * OPERATION_NOT_ALLOWED
3776 * NO_MEMORY
3777 * INTERNAL_ERR
3778 * SYSTEM_ERR
3779 * INVALID_ARGUMENTS
3780 * MODEM_ERR
3781 * REQUEST_NOT_SUPPORTED
3782 * NO_RESOURCES
3783 * CANCELLED
3784 *
3785 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3786 * no retries needed, such as illegal SIM or ME.
3787 *
3788 */
3789#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
3790
3791/**
3792 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
3793 *
3794 * Manually select a specified network.
3795 *
3796 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
3797 * "response" is NULL
3798 *
3799 * This request must not respond until the new operator is selected
3800 * and registered
3801 *
3802 * Valid errors:
3803 * SUCCESS
3804 * RADIO_NOT_AVAILABLE
3805 * ILLEGAL_SIM_OR_ME
3806 * OPERATION_NOT_ALLOWED
3807 * INVALID_STATE
3808 * NO_MEMORY
3809 * INTERNAL_ERR
3810 * SYSTEM_ERR
3811 * INVALID_ARGUMENTS
3812 * MODEM_ERR
3813 * REQUEST_NOT_SUPPORTED
3814 * NO_RESOURCES
3815 * CANCELLED
3816 *
3817 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3818 * no retries needed, such as illegal SIM or ME.
3819 *
3820 */
3821#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
3822
3823/**
3824 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
3825 *
3826 * Scans for available networks
3827 *
3828 * "data" is NULL
3829 * "response" is const char ** that should be an array of n*4 strings, where
3830 * n is the number of available networks
3831 * For each available network:
3832 *
3833 * ((const char **)response)[n+0] is long alpha ONS or EONS
3834 * ((const char **)response)[n+1] is short alpha ONS or EONS
3835 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
3836 * ((const char **)response)[n+3] is a string value of the status:
3837 * "unknown"
3838 * "available"
3839 * "current"
3840 * "forbidden"
3841 *
3842 * Valid errors:
3843 * SUCCESS
3844 * RADIO_NOT_AVAILABLE
3845 * OPERATION_NOT_ALLOWED
3846 * ABORTED
3847 * DEVICE_IN_USE
3848 * INTERNAL_ERR
3849 * NO_MEMORY
3850 * MODEM_ERR
3851 * REQUEST_NOT_SUPPORTED
3852 * CANCELLED
3853 * OPERATION_NOT_ALLOWED
3854 * NO_RESOURCES
3855 * CANCELLED
3856 *
3857 */
3858#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
3859
3860/**
3861 * RIL_REQUEST_DTMF_START
3862 *
3863 * Start playing a DTMF tone. Continue playing DTMF tone until
3864 * RIL_REQUEST_DTMF_STOP is received
3865 *
3866 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
3867 * it should cancel the previous tone and play the new one.
3868 *
3869 * "data" is a char *
3870 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
3871 * "response" is NULL
3872 *
3873 * Valid errors:
3874 * SUCCESS
3875 * RADIO_NOT_AVAILABLE
3876 * INVALID_ARGUMENTS
3877 * NO_RESOURCES
3878 * NO_MEMORY
3879 * SYSTEM_ERR
3880 * MODEM_ERR
3881 * INTERNAL_ERR
3882 * INVALID_CALL_ID
3883 * CANCELLED
3884 * INVALID_MODEM_STATE
3885 * REQUEST_NOT_SUPPORTED
3886 *
3887 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
3888 */
3889#define RIL_REQUEST_DTMF_START 49
3890
3891/**
3892 * RIL_REQUEST_DTMF_STOP
3893 *
3894 * Stop playing a currently playing DTMF tone.
3895 *
3896 * "data" is NULL
3897 * "response" is NULL
3898 *
3899 * Valid errors:
3900 * SUCCESS
3901 * RADIO_NOT_AVAILABLE
3902 * OPERATION_NOT_ALLOWED
3903 * NO_RESOURCES
3904 * NO_MEMORY
3905 * INVALID_ARGUMENTS
3906 * SYSTEM_ERR
3907 * MODEM_ERR
3908 * INTERNAL_ERR
3909 * INVALID_CALL_ID
3910 * CANCELLED
3911 * INVALID_MODEM_STATE
3912 * REQUEST_NOT_SUPPORTED
3913 *
3914 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
3915 */
3916#define RIL_REQUEST_DTMF_STOP 50
3917
3918/**
3919 * RIL_REQUEST_BASEBAND_VERSION
3920 *
3921 * Return string value indicating baseband version, eg
3922 * response from AT+CGMR
3923 *
3924 * "data" is NULL
3925 * "response" is const char * containing version string for log reporting
3926 *
3927 * Valid errors:
3928 * SUCCESS
3929 * RADIO_NOT_AVAILABLE
3930 * EMPTY_RECORD
3931 * NO_MEMORY
3932 * INTERNAL_ERR
3933 * SYSTEM_ERR
3934 * MODEM_ERR
3935 * NOT_PROVISIONED
3936 * REQUEST_NOT_SUPPORTED
3937 * NO_RESOURCES
3938 * CANCELLED
3939 *
3940 */
3941#define RIL_REQUEST_BASEBAND_VERSION 51
3942
3943/**
3944 * RIL_REQUEST_SEPARATE_CONNECTION
3945 *
3946 * Separate a party from a multiparty call placing the multiparty call
3947 * (less the specified party) on hold and leaving the specified party
3948 * as the only other member of the current (active) call
3949 *
3950 * Like AT+CHLD=2x
3951 *
3952 * See TS 22.084 1.3.8.2 (iii)
3953 * TS 22.030 6.5.5 "Entering "2X followed by send"
3954 * TS 27.007 "AT+CHLD=2x"
3955 *
3956 * "data" is an int *
3957 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
3958 *
3959 * "response" is NULL
3960 *
3961 * Valid errors:
3962 * SUCCESS
3963 * RADIO_NOT_AVAILABLE (radio resetting)
3964 * INVALID_ARGUMENTS
3965 * INVALID_STATE
3966 * NO_RESOURCES
3967 * NO_MEMORY
3968 * SYSTEM_ERR
3969 * MODEM_ERR
3970 * INTERNAL_ERR
3971 * INVALID_CALL_ID
3972 * INVALID_STATE
3973 * OPERATION_NOT_ALLOWED
3974 * CANCELLED
3975 * REQUEST_NOT_SUPPORTED
3976 */
3977#define RIL_REQUEST_SEPARATE_CONNECTION 52
3978
3979
3980/**
3981 * RIL_REQUEST_SET_MUTE
3982 *
3983 * Turn on or off uplink (microphone) mute.
3984 *
3985 * Will only be sent while voice call is active.
3986 * Will always be reset to "disable mute" when a new voice call is initiated
3987 *
3988 * "data" is an int *
3989 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
3990 *
3991 * "response" is NULL
3992 *
3993 * Valid errors:
3994 * SUCCESS
3995 * RADIO_NOT_AVAILABLE (radio resetting)
3996 * INVALID_ARGUMENTS
3997 * NO_MEMORY
3998 * REQUEST_RATE_LIMITED
3999 * INTERNAL_ERR
4000 * NO_RESOURCES
4001 * CANCELLED
4002 * REQUEST_NOT_SUPPORTED
4003 */
4004
4005#define RIL_REQUEST_SET_MUTE 53
4006
4007/**
4008 * RIL_REQUEST_GET_MUTE
4009 *
4010 * Queries the current state of the uplink mute setting
4011 *
4012 * "data" is NULL
4013 * "response" is an int *
4014 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
4015 *
4016 * Valid errors:
4017 * SUCCESS
4018 * RADIO_NOT_AVAILABLE (radio resetting)
4019 * SS_MODIFIED_TO_DIAL
4020 * SS_MODIFIED_TO_USSD
4021 * SS_MODIFIED_TO_SS
4022 * NO_MEMORY
4023 * REQUEST_RATE_LIMITED
4024 * INTERNAL_ERR
4025 * NO_RESOURCES
4026 * CANCELLED
4027 * REQUEST_NOT_SUPPORTED
4028 */
4029
4030#define RIL_REQUEST_GET_MUTE 54
4031
4032/**
4033 * RIL_REQUEST_QUERY_CLIP
4034 *
4035 * Queries the status of the CLIP supplementary service
4036 *
4037 * (for MMI code "*#30#")
4038 *
4039 * "data" is NULL
4040 * "response" is an int *
4041 * (int *)response)[0] is 1 for "CLIP provisioned"
4042 * and 0 for "CLIP not provisioned"
4043 * and 2 for "unknown, e.g. no network etc"
4044 *
4045 * Valid errors:
4046 * SUCCESS
4047 * RADIO_NOT_AVAILABLE (radio resetting)
4048 * NO_MEMORY
4049 * SYSTEM_ERR
4050 * MODEM_ERR
4051 * INTERNAL_ERR
4052 * FDN_CHECK_FAILURE
4053 * NO_RESOURCES
4054 * CANCELLED
4055 * REQUEST_NOT_SUPPORTED
4056 */
4057
4058#define RIL_REQUEST_QUERY_CLIP 55
4059
4060/**
4061 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
4062 * field in RIL_Data_Call_Response_v6.
4063 *
4064 * Requests the failure cause code for the most recently failed PDP
4065 * context or CDMA data connection active
4066 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
4067 *
4068 * "data" is NULL
4069 *
4070 * "response" is a "int *"
4071 * ((int *)response)[0] is an integer cause code defined in TS 24.008
4072 * section 6.1.3.1.3 or close approximation
4073 *
4074 * If the implementation does not have access to the exact cause codes,
4075 * then it should return one of the values listed in
4076 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
4077 * cases for error notification
4078 * and potential retries.
4079 *
4080 * Valid errors:
4081 * SUCCESS
4082 * RADIO_NOT_AVAILABLE
4083 * INTERNAL_ERR
4084 * NO_MEMORY
4085 * NO_RESOURCES
4086 * CANCELLED
4087 * REQUEST_NOT_SUPPORTED
4088 *
4089 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
4090 *
4091 * Deprecated use the status field in RIL_Data_Call_Response_v6.
4092 */
4093
4094#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
4095
4096/**
4097 * RIL_REQUEST_DATA_CALL_LIST
4098 *
4099 * Returns the data call list. An entry is added when a
4100 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
4101 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
4102 * when RIL_REQUEST_RADIO_POWER off/on is issued.
4103 *
4104 * "data" is NULL
4105 * "response" is an array of RIL_Data_Call_Response_v6
4106 *
4107 * Valid errors:
4108 * SUCCESS
4109 * RADIO_NOT_AVAILABLE (radio resetting)
4110 * INTERNAL_ERR
4111 * NO_MEMORY
4112 * NO_RESOURCES
4113 * CANCELLED
4114 * REQUEST_NOT_SUPPORTED
4115 * SIM_ABSENT
4116 *
4117 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
4118 */
4119
4120#define RIL_REQUEST_DATA_CALL_LIST 57
4121
4122/**
4123 * RIL_REQUEST_RESET_RADIO - DEPRECATED
4124 *
4125 * Request a radio reset. The RIL implementation may postpone
4126 * the reset until after this request is responded to if the baseband
4127 * is presently busy.
4128 *
4129 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
4130 *
4131 * "data" is NULL
4132 * "response" is NULL
4133 *
4134 * Valid errors:
4135 * SUCCESS
4136 * RADIO_NOT_AVAILABLE (radio resetting)
4137 * REQUEST_NOT_SUPPORTED
4138 */
4139
4140#define RIL_REQUEST_RESET_RADIO 58
4141
4142/**
4143 * RIL_REQUEST_OEM_HOOK_RAW
4144 *
4145 * This request reserved for OEM-specific uses. It passes raw byte arrays
4146 * back and forth.
4147 *
4148 * It can be invoked on the Java side from
4149 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
4150 *
4151 * "data" is a char * of bytes copied from the byte[] data argument in java
4152 * "response" is a char * of bytes that will returned via the
4153 * caller's "response" Message here:
4154 * (byte[])(((AsyncResult)response.obj).result)
4155 *
4156 * An error response here will result in
4157 * (((AsyncResult)response.obj).result) == null and
4158 * (((AsyncResult)response.obj).exception) being an instance of
4159 * com.android.internal.telephony.gsm.CommandException
4160 *
4161 * Valid errors:
4162 * All
4163 */
4164
4165#define RIL_REQUEST_OEM_HOOK_RAW 59
4166
4167/**
4168 * RIL_REQUEST_OEM_HOOK_STRINGS
4169 *
4170 * This request reserved for OEM-specific uses. It passes strings
4171 * back and forth.
4172 *
4173 * It can be invoked on the Java side from
4174 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
4175 *
4176 * "data" is a const char **, representing an array of null-terminated UTF-8
4177 * strings copied from the "String[] strings" argument to
4178 * invokeOemRilRequestStrings()
4179 *
4180 * "response" is a const char **, representing an array of null-terminated UTF-8
4181 * stings that will be returned via the caller's response message here:
4182 *
4183 * (String[])(((AsyncResult)response.obj).result)
4184 *
4185 * An error response here will result in
4186 * (((AsyncResult)response.obj).result) == null and
4187 * (((AsyncResult)response.obj).exception) being an instance of
4188 * com.android.internal.telephony.gsm.CommandException
4189 *
4190 * Valid errors:
4191 * All
4192 */
4193
4194#define RIL_REQUEST_OEM_HOOK_STRINGS 60
4195
4196/**
4197 * RIL_REQUEST_SCREEN_STATE - DEPRECATED
4198 *
4199 * Indicates the current state of the screen. When the screen is off, the
4200 * RIL should notify the baseband to suppress certain notifications (eg,
4201 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
4202 * in an effort to conserve power. These notifications should resume when the
4203 * screen is on.
4204 *
4205 * Note this request is deprecated. Use RIL_REQUEST_SEND_DEVICE_STATE to report the device state
4206 * to the modem and use RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER to turn on/off unsolicited
4207 * response from the modem in different scenarios.
4208 *
4209 * "data" is int *
4210 * ((int *)data)[0] is == 1 for "Screen On"
4211 * ((int *)data)[0] is == 0 for "Screen Off"
4212 *
4213 * "response" is NULL
4214 *
4215 * Valid errors:
4216 * SUCCESS
4217 * NO_MEMORY
4218 * INTERNAL_ERR
4219 * SYSTEM_ERR
4220 * INVALID_ARGUMENTS
4221 * NO_RESOURCES
4222 * CANCELLED
4223 * REQUEST_NOT_SUPPORTED
4224 */
4225#define RIL_REQUEST_SCREEN_STATE 61
4226
4227
4228/**
4229 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
4230 *
4231 * Enables/disables supplementary service related notifications
4232 * from the network.
4233 *
4234 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
4235 *
4236 * "data" is int *
4237 * ((int *)data)[0] is == 1 for notifications enabled
4238 * ((int *)data)[0] is == 0 for notifications disabled
4239 *
4240 * "response" is NULL
4241 *
4242 * Valid errors:
4243 * SUCCESS
4244 * RADIO_NOT_AVAILABLE
4245 * SIM_BUSY
4246 * INVALID_ARGUMENTS
4247 * NO_MEMORY
4248 * SYSTEM_ERR
4249 * MODEM_ERR
4250 * INTERNAL_ERR
4251 * NO_RESOURCES
4252 * CANCELLED
4253 * REQUEST_NOT_SUPPORTED
4254 *
4255 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
4256 */
4257#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
4258
4259/**
4260 * RIL_REQUEST_WRITE_SMS_TO_SIM
4261 *
4262 * Stores a SMS message to SIM memory.
4263 *
4264 * "data" is RIL_SMS_WriteArgs *
4265 *
4266 * "response" is int *
4267 * ((const int *)response)[0] is the record index where the message is stored.
4268 *
4269 * Valid errors:
4270 * SUCCESS
4271 * SIM_FULL
4272 * INVALID_ARGUMENTS
4273 * INVALID_SMS_FORMAT
4274 * INTERNAL_ERR
4275 * MODEM_ERR
4276 * ENCODING_ERR
4277 * NO_MEMORY
4278 * NO_RESOURCES
4279 * INVALID_MODEM_STATE
4280 * OPERATION_NOT_ALLOWED
4281 * INVALID_SMSC_ADDRESS
4282 * CANCELLED
4283 * INVALID_MODEM_STATE
4284 * REQUEST_NOT_SUPPORTED
4285 * SIM_ABSENT
4286 *
4287 */
4288#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
4289
4290/**
4291 * RIL_REQUEST_DELETE_SMS_ON_SIM
4292 *
4293 * Deletes a SMS message from SIM memory.
4294 *
4295 * "data" is int *
4296 * ((int *)data)[0] is the record index of the message to delete.
4297 *
4298 * "response" is NULL
4299 *
4300 * Valid errors:
4301 * SUCCESS
4302 * SIM_FULL
4303 * INVALID_ARGUMENTS
4304 * NO_MEMORY
4305 * REQUEST_RATE_LIMITED
4306 * SYSTEM_ERR
4307 * MODEM_ERR
4308 * NO_SUCH_ENTRY
4309 * INTERNAL_ERR
4310 * NO_RESOURCES
4311 * CANCELLED
4312 * INVALID_MODEM_STATE
4313 * REQUEST_NOT_SUPPORTED
4314 * SIM_ABSENT
4315 *
4316 */
4317#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
4318
4319/**
4320 * RIL_REQUEST_SET_BAND_MODE
4321 *
4322 * Assign a specified band for RF configuration.
4323 *
4324 * "data" is int *
4325 * ((int *)data)[0] is a RIL_RadioBandMode
4326 *
4327 * "response" is NULL
4328 *
4329 * Valid errors:
4330 * SUCCESS
4331 * RADIO_NOT_AVAILABLE
4332 * OPERATION_NOT_ALLOWED
4333 * NO_MEMORY
4334 * INTERNAL_ERR
4335 * SYSTEM_ERR
4336 * INVALID_ARGUMENTS
4337 * MODEM_ERR
4338 * REQUEST_NOT_SUPPORTED
4339 * NO_RESOURCES
4340 * CANCELLED
4341 *
4342 * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
4343 */
4344#define RIL_REQUEST_SET_BAND_MODE 65
4345
4346/**
4347 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
4348 *
4349 * Query the list of band mode supported by RF.
4350 *
4351 * "data" is NULL
4352 *
4353 * "response" is int *
4354 * "response" points to an array of int's, the int[0] is the size of array;
4355 * subsequent values are a list of RIL_RadioBandMode listing supported modes.
4356 *
4357 * Valid errors:
4358 * SUCCESS
4359 * RADIO_NOT_AVAILABLE
4360 * NO_MEMORY
4361 * INTERNAL_ERR
4362 * SYSTEM_ERR
4363 * MODEM_ERR
4364 * REQUEST_NOT_SUPPORTED
4365 * NO_RESOURCES
4366 * CANCELLED
4367 *
4368 * See also: RIL_REQUEST_SET_BAND_MODE
4369 */
4370#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
4371
4372/**
4373 * RIL_REQUEST_STK_GET_PROFILE
4374 *
4375 * Requests the profile of SIM tool kit.
4376 * The profile indicates the SAT/USAT features supported by ME.
4377 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
4378 *
4379 * "data" is NULL
4380 *
4381 * "response" is a const char * containing SAT/USAT profile
4382 * in hexadecimal format string starting with first byte of terminal profile
4383 *
4384 * Valid errors:
4385 * RIL_E_SUCCESS
4386 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
4387 * INTERNAL_ERR
4388 * NO_MEMORY
4389 * NO_RESOURCES
4390 * CANCELLED
4391 * REQUEST_NOT_SUPPORTED
4392 */
4393#define RIL_REQUEST_STK_GET_PROFILE 67
4394
4395/**
4396 * RIL_REQUEST_STK_SET_PROFILE
4397 *
4398 * Download the STK terminal profile as part of SIM initialization
4399 * procedure
4400 *
4401 * "data" is a const char * containing SAT/USAT profile
4402 * in hexadecimal format string starting with first byte of terminal profile
4403 *
4404 * "response" is NULL
4405 *
4406 * Valid errors:
4407 * RIL_E_SUCCESS
4408 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
4409 * INTERNAL_ERR
4410 * NO_MEMORY
4411 * NO_RESOURCES
4412 * CANCELLED
4413 * REQUEST_NOT_SUPPORTED
4414 */
4415#define RIL_REQUEST_STK_SET_PROFILE 68
4416
4417/**
4418 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
4419 *
4420 * Requests to send a SAT/USAT envelope command to SIM.
4421 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
4422 *
4423 * "data" is a const char * containing SAT/USAT command
4424 * in hexadecimal format string starting with command tag
4425 *
4426 * "response" is a const char * containing SAT/USAT response
4427 * in hexadecimal format string starting with first byte of response
4428 * (May be NULL)
4429 *
4430 * Valid errors:
4431 * RIL_E_SUCCESS
4432 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
4433 * SIM_BUSY
4434 * OPERATION_NOT_ALLOWED
4435 * INTERNAL_ERR
4436 * NO_MEMORY
4437 * NO_RESOURCES
4438 * CANCELLED
4439 * INVALID_ARGUMENTS
4440 * MODEM_ERR
4441 * REQUEST_NOT_SUPPORTED
4442 */
4443#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
4444
4445/**
4446 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
4447 *
4448 * Requests to send a terminal response to SIM for a received
4449 * proactive command
4450 *
4451 * "data" is a const char * containing SAT/USAT response
4452 * in hexadecimal format string starting with first byte of response data
4453 *
4454 * "response" is NULL
4455 *
4456 * Valid errors:
4457 * RIL_E_SUCCESS
4458 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
4459 * RIL_E_OPERATION_NOT_ALLOWED
4460 * INTERNAL_ERR
4461 * NO_MEMORY
4462 * NO_RESOURCES
4463 * CANCELLED
4464 * INVALID_MODEM_STATE
4465 * REQUEST_NOT_SUPPORTED
4466 */
4467#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
4468
4469/**
4470 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
4471 *
4472 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
4473 * been initialized by ME already. (We could see the call has been in the 'call
4474 * list') So, STK application needs to accept/reject the call according as user
4475 * operations.
4476 *
4477 * "data" is int *
4478 * ((int *)data)[0] is > 0 for "accept" the call setup
4479 * ((int *)data)[0] is == 0 for "reject" the call setup
4480 *
4481 * "response" is NULL
4482 *
4483 * Valid errors:
4484 * RIL_E_SUCCESS
4485 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
4486 * RIL_E_OPERATION_NOT_ALLOWED
4487 * INTERNAL_ERR
4488 * NO_MEMORY
4489 * NO_RESOURCES
4490 * CANCELLED
4491 * REQUEST_NOT_SUPPORTED
4492 */
4493#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
4494
4495/**
4496 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
4497 *
4498 * Connects the two calls and disconnects the subscriber from both calls.
4499 *
4500 * "data" is NULL
4501 * "response" is NULL
4502 *
4503 * Valid errors:
4504 * SUCCESS
4505 * RADIO_NOT_AVAILABLE (radio resetting)
4506 * INVALID_STATE
4507 * NO_RESOURCES
4508 * NO_MEMORY
4509 * INVALID_ARGUMENTS
4510 * SYSTEM_ERR
4511 * MODEM_ERR
4512 * INTERNAL_ERR
4513 * INVALID_CALL_ID
4514 * INVALID_STATE
4515 * OPERATION_NOT_ALLOWED
4516 * NO_RESOURCES
4517 * CANCELLED
4518 * REQUEST_NOT_SUPPORTED
4519 */
4520#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
4521
4522/**
4523 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
4524 *
4525 * Requests to set the preferred network type for searching and registering
4526 * (CS/PS domain, RAT, and operation mode)
4527 *
4528 * "data" is int * which is RIL_PreferredNetworkType
4529 *
4530 * "response" is NULL
4531 *
4532 * Valid errors:
4533 * SUCCESS
4534 * RADIO_NOT_AVAILABLE (radio resetting)
4535 * OPERATION_NOT_ALLOWED
4536 * MODE_NOT_SUPPORTED
4537 * NO_MEMORY
4538 * INTERNAL_ERR
4539 * SYSTEM_ERR
4540 * INVALID_ARGUMENTS
4541 * MODEM_ERR
4542 * REQUEST_NOT_SUPPORTED
4543 * NO_RESOURCES
4544 * CANCELLED
4545 */
4546#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
4547
4548/**
4549 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
4550 *
4551 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
4552 * for searching and registering
4553 *
4554 * "data" is NULL
4555 *
4556 * "response" is int *
4557 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
4558 *
4559 * Valid errors:
4560 * SUCCESS
4561 * RADIO_NOT_AVAILABLE
4562 * NO_MEMORY
4563 * INTERNAL_ERR
4564 * SYSTEM_ERR
4565 * INVALID_ARGUMENTS
4566 * MODEM_ERR
4567 * REQUEST_NOT_SUPPORTED
4568 * NO_RESOURCES
4569 * CANCELLED
4570 *
4571 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
4572 */
4573#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
4574
4575/**
4576 * RIL_REQUEST_NEIGHBORING_CELL_IDS
4577 *
4578 * Request neighboring cell id in GSM network
4579 *
4580 * "data" is NULL
4581 * "response" must be a " const RIL_NeighboringCell** "
4582 *
4583 * Valid errors:
4584 * SUCCESS
4585 * RADIO_NOT_AVAILABLE
4586 * NO_MEMORY
4587 * INTERNAL_ERR
4588 * SYSTEM_ERR
4589 * MODEM_ERR
4590 * NO_NETWORK_FOUND
4591 * REQUEST_NOT_SUPPORTED
4592 * NO_RESOURCES
4593 * CANCELLED
4594 */
4595#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
4596
4597/**
4598 * RIL_REQUEST_SET_LOCATION_UPDATES
4599 *
4600 * Enables/disables network state change notifications due to changes in
4601 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
4602 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
4603 *
4604 * Note: The RIL implementation should default to "updates enabled"
4605 * when the screen is on and "updates disabled" when the screen is off.
4606 *
4607 * "data" is int *
4608 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
4609 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
4610 *
4611 * "response" is NULL
4612 *
4613 * Valid errors:
4614 * SUCCESS
4615 * RADIO_NOT_AVAILABLE
4616 * NO_MEMORY
4617 * INTERNAL_ERR
4618 * SYSTEM_ERR
4619 * INVALID_ARGUMENTS
4620 * MODEM_ERR
4621 * REQUEST_NOT_SUPPORTED
4622 * NO_RESOURCES
4623 * CANCELLED
4624 *
4625 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
4626 */
4627#define RIL_REQUEST_SET_LOCATION_UPDATES 76
4628
4629/**
4630 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
4631 *
4632 * Request to set the location where the CDMA subscription shall
4633 * be retrieved
4634 *
4635 * "data" is int *
4636 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4637 *
4638 * "response" is NULL
4639 *
4640 * Valid errors:
4641 * SUCCESS
4642 * RADIO_NOT_AVAILABLE
4643 * SIM_ABSENT
4644 * SUBSCRIPTION_NOT_AVAILABLE
4645 * INTERNAL_ERR
4646 * NO_MEMORY
4647 * NO_RESOURCES
4648 * CANCELLED
4649 * REQUEST_NOT_SUPPORTED
4650 *
4651 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
4652 */
4653#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
4654
4655/**
4656 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
4657 *
4658 * Request to set the roaming preferences in CDMA
4659 *
4660 * "data" is int *
4661 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
4662 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
4663 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
4664 *
4665 * "response" is NULL
4666 *
4667 * Valid errors:
4668 * SUCCESS
4669 * RADIO_NOT_AVAILABLE
4670 * NO_MEMORY
4671 * INTERNAL_ERR
4672 * SYSTEM_ERR
4673 * INVALID_ARGUMENTS
4674 * MODEM_ERR
4675 * REQUEST_NOT_SUPPORTED
4676 * OPERATION_NOT_ALLOWED
4677 * NO_RESOURCES
4678 * CANCELLED
4679 */
4680#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
4681
4682/**
4683 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
4684 *
4685 * Request the actual setting of the roaming preferences in CDMA in the modem
4686 *
4687 * "data" is NULL
4688 *
4689 * "response" is int *
4690 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
4691 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
4692 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
4693 *
4694 * "response" is NULL
4695 *
4696 * Valid errors:
4697 * SUCCESS
4698 * RADIO_NOT_AVAILABLE
4699 * NO_MEMORY
4700 * INTERNAL_ERR
4701 * SYSTEM_ERR
4702 * INVALID_ARGUMENTS
4703 * MODEM_ERR
4704 * REQUEST_NOT_SUPPORTED
4705 * NO_RESOURCES
4706 * CANCELLED
4707 */
4708#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
4709
4710/**
4711 * RIL_REQUEST_SET_TTY_MODE
4712 *
4713 * Request to set the TTY mode
4714 *
4715 * "data" is int *
4716 * ((int *)data)[0] is == 0 for TTY off
4717 * ((int *)data)[0] is == 1 for TTY Full
4718 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
4719 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
4720 *
4721 * "response" is NULL
4722 *
4723 * Valid errors:
4724 * SUCCESS
4725 * RADIO_NOT_AVAILABLE
4726 * INVALID_ARGUMENTS
4727 * MODEM_ERR
4728 * INTERNAL_ERR
4729 * NO_MEMORY
4730 * INVALID_ARGUMENTS
4731 * MODEM_ERR
4732 * INTERNAL_ERR
4733 * NO_MEMORY
4734 * NO_RESOURCES
4735 * CANCELLED
4736 * REQUEST_NOT_SUPPORTED
4737 */
4738#define RIL_REQUEST_SET_TTY_MODE 80
4739
4740/**
4741 * RIL_REQUEST_QUERY_TTY_MODE
4742 *
4743 * Request the setting of TTY mode
4744 *
4745 * "data" is NULL
4746 *
4747 * "response" is int *
4748 * ((int *)response)[0] is == 0 for TTY off
4749 * ((int *)response)[0] is == 1 for TTY Full
4750 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
4751 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
4752 *
4753 * "response" is NULL
4754 *
4755 * Valid errors:
4756 * SUCCESS
4757 * RADIO_NOT_AVAILABLE
4758 * MODEM_ERR
4759 * INTERNAL_ERR
4760 * NO_MEMORY
4761 * INVALID_ARGUMENTS
4762 * NO_RESOURCES
4763 * CANCELLED
4764 * REQUEST_NOT_SUPPORTED
4765 */
4766#define RIL_REQUEST_QUERY_TTY_MODE 81
4767
4768/**
4769 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
4770 *
4771 * Request to set the preferred voice privacy mode used in voice
4772 * scrambling
4773 *
4774 * "data" is int *
4775 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
4776 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
4777 *
4778 * "response" is NULL
4779 *
4780 * Valid errors:
4781 * SUCCESS
4782 * RADIO_NOT_AVAILABLE
4783 * INVALID_ARGUMENTS
4784 * SYSTEM_ERR
4785 * MODEM_ERR
4786 * INTERNAL_ERR
4787 * NO_MEMORY
4788 * INVALID_CALL_ID
4789 * NO_RESOURCES
4790 * CANCELLED
4791 * REQUEST_NOT_SUPPORTED
4792 */
4793#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
4794
4795/**
4796 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
4797 *
4798 * Request the setting of preferred voice privacy mode
4799 *
4800 * "data" is NULL
4801 *
4802 * "response" is int *
4803 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
4804 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
4805 *
4806 * "response" is NULL
4807 *
4808 * Valid errors:
4809 * SUCCESS
4810 * RADIO_NOT_AVAILABLE
4811 * MODEM_ERR
4812 * INTERNAL_ERR
4813 * NO_MEMORY
4814 * INVALID_ARGUMENTS
4815 * NO_RESOURCES
4816 * CANCELLED
4817 * REQUEST_NOT_SUPPORTED
4818 */
4819#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
4820
4821/**
4822 * RIL_REQUEST_CDMA_FLASH
4823 *
4824 * Send FLASH
4825 *
4826 * "data" is const char *
4827 * ((const char *)data)[0] is a FLASH string
4828 *
4829 * "response" is NULL
4830 *
4831 * Valid errors:
4832 * SUCCESS
4833 * RADIO_NOT_AVAILABLE
4834 * INVALID_ARGUMENTS
4835 * NO_MEMORY
4836 * SYSTEM_ERR
4837 * MODEM_ERR
4838 * INTERNAL_ERR
4839 * INVALID_CALL_ID
4840 * INVALID_STATE
4841 * NO_RESOURCES
4842 * CANCELLED
4843 * REQUEST_NOT_SUPPORTED
4844 *
4845 */
4846#define RIL_REQUEST_CDMA_FLASH 84
4847
4848/**
4849 * RIL_REQUEST_CDMA_BURST_DTMF
4850 *
4851 * Send DTMF string
4852 *
4853 * "data" is const char **
4854 * ((const char **)data)[0] is a DTMF string
4855 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
4856 * default
4857 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
4858 * default
4859 *
4860 * "response" is NULL
4861 *
4862 * Valid errors:
4863 * SUCCESS
4864 * RADIO_NOT_AVAILABLE
4865 * INVALID_ARGUMENTS
4866 * NO_MEMORY
4867 * SYSTEM_ERR
4868 * MODEM_ERR
4869 * INTERNAL_ERR
4870 * INVALID_CALL_ID
4871 * NO_RESOURCES
4872 * CANCELLED
4873 * OPERATION_NOT_ALLOWED
4874 * REQUEST_NOT_SUPPORTED
4875 *
4876 */
4877#define RIL_REQUEST_CDMA_BURST_DTMF 85
4878
4879/**
4880 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
4881 *
4882 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
4883 * If the checksum is valid the 20 digit AKEY is written to NV,
4884 * replacing the existing AKEY no matter what it was before.
4885 *
4886 * "data" is const char *
4887 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
4888 * where the last 6 digits are a checksum of the
4889 * first 20, as specified in TR45.AHAG
4890 * "Common Cryptographic Algorithms, Revision D.1
4891 * Section 2.2"
4892 *
4893 * "response" is NULL
4894 *
4895 * Valid errors:
4896 * SUCCESS
4897 * RADIO_NOT_AVAILABLE
4898 * NO_MEMORY
4899 * INTERNAL_ERR
4900 * SYSTEM_ERR
4901 * INVALID_ARGUMENTS
4902 * MODEM_ERR
4903 * REQUEST_NOT_SUPPORTED
4904 * NO_RESOURCES
4905 * CANCELLED
4906 *
4907 */
4908#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
4909
4910/**
4911 * RIL_REQUEST_CDMA_SEND_SMS
4912 *
4913 * Send a CDMA SMS message
4914 *
4915 * "data" is const RIL_CDMA_SMS_Message *
4916 *
4917 * "response" is a const RIL_SMS_Response *
4918 *
4919 * Based on the return error, caller decides to resend if sending sms
4920 * fails. The CDMA error class is derived as follows,
4921 * SUCCESS is error class 0 (no error)
4922 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
4923 *
4924 * Valid errors:
4925 * SUCCESS
4926 * RADIO_NOT_AVAILABLE
4927 * SMS_SEND_FAIL_RETRY
4928 * NETWORK_REJECT
4929 * INVALID_STATE
4930 * INVALID_ARGUMENTS
4931 * NO_MEMORY
4932 * REQUEST_RATE_LIMITED
4933 * INVALID_SMS_FORMAT
4934 * SYSTEM_ERR
4935 * FDN_CHECK_FAILURE
4936 * MODEM_ERR
4937 * NETWORK_ERR
4938 * ENCODING_ERR
4939 * INVALID_SMSC_ADDRESS
4940 * OPERATION_NOT_ALLOWED
4941 * NO_RESOURCES
4942 * CANCELLED
4943 * REQUEST_NOT_SUPPORTED
4944 * MODE_NOT_SUPPORTED
4945 * SIM_ABSENT
4946 *
4947 */
4948#define RIL_REQUEST_CDMA_SEND_SMS 87
4949
4950/**
4951 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4952 *
4953 * Acknowledge the success or failure in the receipt of SMS
4954 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4955 *
4956 * "data" is const RIL_CDMA_SMS_Ack *
4957 *
4958 * "response" is NULL
4959 *
4960 * Valid errors:
4961 * SUCCESS
4962 * RADIO_NOT_AVAILABLE
4963 * INVALID_ARGUMENTS
4964 * NO_SMS_TO_ACK
4965 * INVALID_STATE
4966 * NO_MEMORY
4967 * REQUEST_RATE_LIMITED
4968 * SYSTEM_ERR
4969 * MODEM_ERR
4970 * INVALID_STATE
4971 * OPERATION_NOT_ALLOWED
4972 * NETWORK_NOT_READY
4973 * INVALID_MODEM_STATE
4974 * REQUEST_NOT_SUPPORTED
4975 *
4976 */
4977#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
4978
4979/**
4980 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
4981 *
4982 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
4983 *
4984 * "data" is NULL
4985 *
4986 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
4987 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
4988 *
4989 * Valid errors:
4990 * SUCCESS
4991 * RADIO_NOT_AVAILABLE
4992 * INVALID_STATE
4993 * NO_MEMORY
4994 * REQUEST_RATE_LIMITED
4995 * SYSTEM_ERR
4996 * NO_RESOURCES
4997 * MODEM_ERR
4998 * SYSTEM_ERR
4999 * INTERNAL_ERR
5000 * NO_RESOURCES
5001 * CANCELLED
5002 * INVALID_MODEM_STATE
5003 * REQUEST_NOT_SUPPORTED
5004 */
5005#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
5006
5007/**
5008 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
5009 *
5010 * Set GSM/WCDMA Cell Broadcast SMS config
5011 *
5012 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
5013 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
5014 *
5015 * "response" is NULL
5016 *
5017 * Valid errors:
5018 * SUCCESS
5019 * RADIO_NOT_AVAILABLE
5020 * INVALID_STATE
5021 * INVALID_ARGUMENTS
5022 * NO_MEMORY
5023 * SYSTEM_ERR
5024 * REQUEST_RATE_LIMITED
5025 * MODEM_ERR
5026 * SYSTEM_ERR
5027 * INTERNAL_ERR
5028 * NO_RESOURCES
5029 * CANCELLED
5030 * INVALID_MODEM_STATE
5031 * REQUEST_NOT_SUPPORTED
5032 *
5033 */
5034#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
5035
5036/**
5037 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
5038 *
5039* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
5040 *
5041 * "data" is const int *
5042 * (const int *)data[0] indicates to activate or turn off the
5043 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
5044 * 0 - Activate, 1 - Turn off
5045 *
5046 * "response" is NULL
5047 *
5048 * Valid errors:
5049 * SUCCESS
5050 * RADIO_NOT_AVAILABLE
5051 * INVALID_STATE
5052 * INVALID_ARGUMENTS
5053 * NO_MEMORY
5054 * SYSTEM_ERR
5055 * REQUEST_RATE_LIMITED
5056* MODEM_ERR
5057* INTERNAL_ERR
5058* NO_RESOURCES
5059* CANCELLED
5060* INVALID_MODEM_STATE
5061 * REQUEST_NOT_SUPPORTED
5062 *
5063 */
5064#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
5065
5066/**
5067 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
5068 *
5069 * Request the setting of CDMA Broadcast SMS config
5070 *
5071 * "data" is NULL
5072 *
5073 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
5074 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
5075 *
5076 * Valid errors:
5077 * SUCCESS
5078 * RADIO_NOT_AVAILABLE
5079 * INVALID_STATE
5080 * NO_MEMORY
5081 * REQUEST_RATE_LIMITED
5082 * SYSTEM_ERR
5083 * NO_RESOURCES
5084 * MODEM_ERR
5085 * SYSTEM_ERR
5086 * INTERNAL_ERR
5087 * NO_RESOURCES
5088 * CANCELLED
5089 * INVALID_MODEM_STATE
5090 * REQUEST_NOT_SUPPORTED
5091 *
5092 */
5093#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
5094
5095/**
5096 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
5097 *
5098 * Set CDMA Broadcast SMS config
5099 *
5100 * "data" is a const RIL_CDMA_BroadcastSmsConfigInfo **
5101 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
5102 *
5103 * "response" is NULL
5104 *
5105 * Valid errors:
5106 * SUCCESS
5107 * RADIO_NOT_AVAILABLE
5108 * INVALID_STATE
5109 * INVALID_ARGUMENTS
5110 * NO_MEMORY
5111 * SYSTEM_ERR
5112 * REQUEST_RATE_LIMITED
5113 * MODEM_ERR
5114 * SYSTEM_ERR
5115 * INTERNAL_ERR
5116 * NO_RESOURCES
5117 * CANCELLED
5118 * INVALID_MODEM_STATE
5119 * REQUEST_NOT_SUPPORTED
5120 *
5121 */
5122#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
5123
5124/**
5125 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
5126 *
5127 * Enable or disable the reception of CDMA Broadcast SMS
5128 *
5129 * "data" is const int *
5130 * (const int *)data[0] indicates to activate or turn off the
5131 * reception of CDMA Broadcast SMS, 0-1,
5132 * 0 - Activate, 1 - Turn off
5133 *
5134 * "response" is NULL
5135 *
5136 * Valid errors:
5137 * SUCCESS
5138 * RADIO_NOT_AVAILABLE
5139 * INVALID_STATE
5140 * INVALID_ARGUMENTS
5141 * NO_MEMORY
5142 * SYSTEM_ERR
5143 * REQUEST_RATE_LIMITED
5144 * MODEM_ERR
5145 * INTERNAL_ERR
5146 * NO_RESOURCES
5147 * CANCELLED
5148 * INVALID_MODEM_STATE
5149 * REQUEST_NOT_SUPPORTED
5150 *
5151 */
5152#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
5153
5154/**
5155 * RIL_REQUEST_CDMA_SUBSCRIPTION
5156 *
5157 * Request the device MDN / H_SID / H_NID.
5158 *
5159 * The request is only allowed when CDMA subscription is available. When CDMA
5160 * subscription is changed, application layer should re-issue the request to
5161 * update the subscription information.
5162 *
5163 * If a NULL value is returned for any of the device id, it means that error
5164 * accessing the device.
5165 *
5166 * "response" is const char **
5167 * ((const char **)response)[0] is MDN if CDMA subscription is available
5168 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
5169 * CDMA subscription is available, in decimal format
5170 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
5171 * CDMA subscription is available, in decimal format
5172 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
5173 * ((const char **)response)[4] is PRL version if CDMA subscription is available
5174 *
5175 * Valid errors:
5176 * SUCCESS
5177 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
5178 * NO_MEMORY
5179 * INTERNAL_ERR
5180 * SYSTEM_ERR
5181 * INVALID_ARGUMENTS
5182 * MODEM_ERR
5183 * NOT_PROVISIONED
5184 * REQUEST_NOT_SUPPORTED
5185 * INTERNAL_ERR
5186 * NO_RESOURCES
5187 * CANCELLED
5188 *
5189 */
5190
5191#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
5192
5193/**
5194 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
5195 *
5196 * Stores a CDMA SMS message to RUIM memory.
5197 *
5198 * "data" is RIL_CDMA_SMS_WriteArgs *
5199 *
5200 * "response" is int *
5201 * ((const int *)response)[0] is the record index where the message is stored.
5202 *
5203 * Valid errors:
5204 * SUCCESS
5205 * RADIO_NOT_AVAILABLE
5206 * SIM_FULL
5207 * INVALID_ARGUMENTS
5208 * INVALID_SMS_FORMAT
5209 * INTERNAL_ERR
5210 * MODEM_ERR
5211 * ENCODING_ERR
5212 * NO_MEMORY
5213 * NO_RESOURCES
5214 * INVALID_MODEM_STATE
5215 * OPERATION_NOT_ALLOWED
5216 * INVALID_SMSC_ADDRESS
5217 * CANCELLED
5218 * INVALID_MODEM_STATE
5219 * REQUEST_NOT_SUPPORTED
5220 * SIM_ABSENT
5221 *
5222 */
5223#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
5224
5225/**
5226 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
5227 *
5228 * Deletes a CDMA SMS message from RUIM memory.
5229 *
5230 * "data" is int *
5231 * ((int *)data)[0] is the record index of the message to delete.
5232 *
5233 * "response" is NULL
5234 *
5235 * Valid errors:
5236 * SUCCESS
5237 * RADIO_NOT_AVAILABLE
5238 * INVALID_ARGUMENTS
5239 * NO_MEMORY
5240 * REQUEST_RATE_LIMITED
5241 * SYSTEM_ERR
5242 * MODEM_ERR
5243 * NO_SUCH_ENTRY
5244 * INTERNAL_ERR
5245 * NO_RESOURCES
5246 * CANCELLED
5247 * INVALID_MODEM_STATE
5248 * REQUEST_NOT_SUPPORTED
5249 * SIM_ABSENT
5250 */
5251#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
5252
5253/**
5254 * RIL_REQUEST_DEVICE_IDENTITY
5255 *
5256 * Request the device ESN / MEID / IMEI / IMEISV.
5257 *
5258 * The request is always allowed and contains GSM and CDMA device identity;
5259 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
5260 * RIL_REQUEST_GET_IMEISV.
5261 *
5262 * If a NULL value is returned for any of the device id, it means that error
5263 * accessing the device.
5264 *
5265 * When CDMA subscription is changed the ESN/MEID may change. The application
5266 * layer should re-issue the request to update the device identity in this case.
5267 *
5268 * "response" is const char **
5269 * ((const char **)response)[0] is IMEI if GSM subscription is available
5270 * ((const char **)response)[1] is IMEISV if GSM subscription is available
5271 * ((const char **)response)[2] is ESN if CDMA subscription is available
5272 * ((const char **)response)[3] is MEID if CDMA subscription is available
5273 *
5274 * Valid errors:
5275 * SUCCESS
5276 * RADIO_NOT_AVAILABLE
5277 * NO_MEMORY
5278 * INTERNAL_ERR
5279 * SYSTEM_ERR
5280 * INVALID_ARGUMENTS
5281 * MODEM_ERR
5282 * NOT_PROVISIONED
5283 * REQUEST_NOT_SUPPORTED
5284 * NO_RESOURCES
5285 * CANCELLED
5286 *
5287 */
5288#define RIL_REQUEST_DEVICE_IDENTITY 98
5289
5290/**
5291 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
5292 *
5293 * Request the radio's system selection module to exit emergency
5294 * callback mode. RIL will not respond with SUCCESS until the modem has
5295 * completely exited from Emergency Callback Mode.
5296 *
5297 * "data" is NULL
5298 *
5299 * "response" is NULL
5300 *
5301 * Valid errors:
5302 * SUCCESS
5303 * RADIO_NOT_AVAILABLE
5304 * OPERATION_NOT_ALLOWED
5305 * NO_MEMORY
5306 * INTERNAL_ERR
5307 * SYSTEM_ERR
5308 * INVALID_ARGUMENTS
5309 * MODEM_ERR
5310 * REQUEST_NOT_SUPPORTED
5311 * NO_RESOURCES
5312 * CANCELLED
5313 *
5314 */
5315#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
5316
5317/**
5318 * RIL_REQUEST_GET_SMSC_ADDRESS
5319 *
5320 * Queries the default Short Message Service Center address on the device.
5321 *
5322 * "data" is NULL
5323 *
5324 * "response" is const char * containing the SMSC address.
5325 *
5326 * Valid errors:
5327 * SUCCESS
5328 * RADIO_NOT_AVAILABLE
5329 * NO_MEMORY
5330 * REQUEST_RATE_LIMITED
5331 * SYSTEM_ERR
5332 * INTERNAL_ERR
5333 * MODEM_ERR
5334 * INVALID_ARGUMENTS
5335 * INVALID_MODEM_STATE
5336 * NOT_PROVISIONED
5337 * NO_RESOURCES
5338 * CANCELLED
5339 * REQUEST_NOT_SUPPORTED
5340 * SIM_ABSENT
5341 *
5342 */
5343#define RIL_REQUEST_GET_SMSC_ADDRESS 100
5344
5345/**
5346 * RIL_REQUEST_SET_SMSC_ADDRESS
5347 *
5348 * Sets the default Short Message Service Center address on the device.
5349 *
5350 * "data" is const char * containing the SMSC address.
5351 *
5352 * "response" is NULL
5353 *
5354 * Valid errors:
5355 * SUCCESS
5356 * RADIO_NOT_AVAILABLE
5357 * INVALID_ARGUMENTS
5358 * INVALID_SMS_FORMAT
5359 * NO_MEMORY
5360 * SYSTEM_ERR
5361 * REQUEST_RATE_LIMITED
5362 * MODEM_ERR
5363 * NO_RESOURCES
5364 * INTERNAL_ERR
5365 * CANCELLED
5366 * REQUEST_NOT_SUPPORTED
5367 * SIM_ABSENT
5368 */
5369#define RIL_REQUEST_SET_SMSC_ADDRESS 101
5370
5371/**
5372 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
5373 *
5374 * Indicates whether there is storage available for new SMS messages.
5375 *
5376 * "data" is int *
5377 * ((int *)data)[0] is 1 if memory is available for storing new messages
5378 * is 0 if memory capacity is exceeded
5379 *
5380 * "response" is NULL
5381 *
5382 * Valid errors:
5383 * SUCCESS
5384 * RADIO_NOT_AVAILABLE
5385 * INVALID_ARGUMENTS
5386 * NO_MEMORY
5387 * INVALID_STATE
5388 * SYSTEM_ERR
5389 * REQUEST_RATE_LIMITED
5390 * MODEM_ERR
5391 * INTERNAL_ERR
5392 * NO_RESOURCES
5393 * CANCELLED
5394 * REQUEST_NOT_SUPPORTED
5395 *
5396 */
5397#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
5398
5399/**
5400 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
5401 *
5402 * Indicates that the StkSerivce is running and is
5403 * ready to receive RIL_UNSOL_STK_XXXXX commands.
5404 *
5405 * "data" is NULL
5406 * "response" is NULL
5407 *
5408 * Valid errors:
5409 * SUCCESS
5410 * RADIO_NOT_AVAILABLE
5411 * INTERNAL_ERR
5412 * NO_MEMORY
5413 * NO_RESOURCES
5414 * CANCELLED
5415 * REQUEST_NOT_SUPPORTED
5416 *
5417 */
5418#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
5419
5420/**
5421 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
5422 *
5423 * Request to query the location where the CDMA subscription shall
5424 * be retrieved
5425 *
5426 * "data" is NULL
5427 *
5428 * "response" is int *
5429 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
5430 *
5431 * Valid errors:
5432 * SUCCESS
5433 * RADIO_NOT_AVAILABLE
5434 * SUBSCRIPTION_NOT_AVAILABLE
5435 * INTERNAL_ERR
5436 * NO_MEMORY
5437 * NO_RESOURCES
5438 * CANCELLED
5439 * REQUEST_NOT_SUPPORTED
5440 *
5441 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
5442 */
5443#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
5444
5445/**
5446 * RIL_REQUEST_ISIM_AUTHENTICATION
5447 *
5448 * Request the ISIM application on the UICC to perform AKA
5449 * challenge/response algorithm for IMS authentication
5450 *
5451 * "data" is a const char * containing the challenge string in Base64 format
5452 * "response" is a const char * containing the response in Base64 format
5453 *
5454 * Valid errors:
5455 * SUCCESS
5456 * RADIO_NOT_AVAILABLE
5457 * INTERNAL_ERR
5458 * NO_MEMORY
5459 * NO_RESOURCES
5460 * CANCELLED
5461 * REQUEST_NOT_SUPPORTED
5462 */
5463#define RIL_REQUEST_ISIM_AUTHENTICATION 105
5464
5465/**
5466 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
5467 *
5468 * Acknowledge successful or failed receipt of SMS previously indicated
5469 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
5470 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
5471 *
5472 * "data" is const char **
5473 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
5474 * is "0" on failed receipt (send RP-ERROR)
5475 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
5476 *
5477 * "response" is NULL
5478 *
5479 * Valid errors:
5480 * SUCCESS
5481 * RADIO_NOT_AVAILABLE
5482 * INTERNAL_ERR
5483 * NO_MEMORY
5484 * NO_RESOURCES
5485 * CANCELLED
5486 * REQUEST_NOT_SUPPORTED
5487 */
5488#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
5489
5490/**
5491 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
5492 *
5493 * Requests to send a SAT/USAT envelope command to SIM.
5494 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
5495 *
5496 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
5497 * the SW1 and SW2 status bytes from the UICC response are returned along with
5498 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
5499 *
5500 * The RIL implementation shall perform the normal processing of a '91XX'
5501 * response in SW1/SW2 to retrieve the pending proactive command and send it
5502 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
5503 *
5504 * "data" is a const char * containing the SAT/USAT command
5505 * in hexadecimal format starting with command tag
5506 *
5507 * "response" is a const RIL_SIM_IO_Response *
5508 *
5509 * Valid errors:
5510 * RIL_E_SUCCESS
5511 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
5512 * SIM_BUSY
5513 * OPERATION_NOT_ALLOWED
5514 * INTERNAL_ERR
5515 * NO_MEMORY
5516 * NO_RESOURCES
5517 * CANCELLED
5518 * REQUEST_NOT_SUPPORTED
5519 * SIM_ABSENT
5520 */
5521#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
5522
5523/**
5524 * RIL_REQUEST_VOICE_RADIO_TECH
5525 *
5526 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
5527 * when radio state is not RADIO_STATE_UNAVAILABLE
5528 *
5529 * "data" is NULL
5530 * "response" is int *
5531 * ((int *) response)[0] is of type const RIL_RadioTechnology
5532 *
5533 * Valid errors:
5534 * SUCCESS
5535 * RADIO_NOT_AVAILABLE
5536 * INTERNAL_ERR
5537 * NO_MEMORY
5538 * NO_RESOURCES
5539 * CANCELLED
5540 * REQUEST_NOT_SUPPORTED
5541 */
5542#define RIL_REQUEST_VOICE_RADIO_TECH 108
5543
5544/**
5545 * RIL_REQUEST_GET_CELL_INFO_LIST
5546 *
5547 * Request all of the current cell information known to the radio. The radio
5548 * must a list of all current cells, including the neighboring cells. If for a particular
5549 * cell information isn't known then the appropriate unknown value will be returned.
5550 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
5551 *
5552 * "data" is NULL
5553 *
5554 * "response" is an array of RIL_CellInfo_v12.
5555 *
5556 * Valid errors:
5557 * SUCCESS
5558 * RADIO_NOT_AVAILABLE
5559 * NO_MEMORY
5560 * INTERNAL_ERR
5561 * SYSTEM_ERR
5562 * MODEM_ERR
5563 * NO_NETWORK_FOUND
5564 * REQUEST_NOT_SUPPORTED
5565 * NO_RESOURCES
5566 * CANCELLED
5567 *
5568 */
5569#define RIL_REQUEST_GET_CELL_INFO_LIST 109
5570
5571/**
5572 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
5573 *
5574 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
5575 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
5576 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
5577 * a RIL_UNSOL_CELL_INFO_LIST.
5578 *
5579 * "data" is int *
5580 * ((int *)data)[0] is minimum time in milliseconds
5581 *
5582 * "response" is NULL
5583 *
5584 * Valid errors:
5585 * SUCCESS
5586 * RADIO_NOT_AVAILABLE
5587 * NO_MEMORY
5588 * INTERNAL_ERR
5589 * SYSTEM_ERR
5590 * INVALID_ARGUMENTS
5591 * REQUEST_NOT_SUPPORTED
5592 * NO_RESOURCES
5593 * CANCELLED
5594 */
5595#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
5596
5597/**
5598 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
5599 *
5600 * Set an apn to initial attach network
5601 *
5602 * "data" is a const char **
5603 * ((const char **)data)[0] is the APN to connect if radio technology is LTE
5604 * ((const char **)data)[1] is the connection type to request must be one of the
5605 * PDP_type values in TS 27.007 section 10.1.1.
5606 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
5607 * ((const char **)data)[2] is the PAP / CHAP auth type. Values:
5608 * 0 => PAP and CHAP is never performed.
5609 * 1 => PAP may be performed; CHAP is never performed.
5610 * 2 => CHAP may be performed; PAP is never performed.
5611 * 3 => PAP / CHAP may be performed - baseband dependent.
5612 * ((const char **)data)[3] is the username for APN, or NULL
5613 * ((const char **)data)[4] is the password for APN, or NULL
5614 *
5615 * "response" is NULL
5616 *
5617 * Valid errors:
5618 * SUCCESS
5619 * RADIO_NOT_AVAILABLE (radio resetting)
5620 * SUBSCRIPTION_NOT_AVAILABLE
5621 * NO_MEMORY
5622 * INTERNAL_ERR
5623 * SYSTEM_ERR
5624 * INVALID_ARGUMENTS
5625 * MODEM_ERR
5626 * NOT_PROVISIONED
5627 * REQUEST_NOT_SUPPORTED
5628 * NO_RESOURCES
5629 * CANCELLED
5630 *
5631 */
5632#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
5633
5634/**
5635 * RIL_REQUEST_IMS_REGISTRATION_STATE
5636 *
5637 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
5638 * instead, provide IMS registration status via an IMS Service.
5639 *
5640 * Request current IMS registration state
5641 *
5642 * "data" is NULL
5643 *
5644 * "response" is int *
5645 * ((int *)response)[0] is registration state:
5646 * 0 - Not registered
5647 * 1 - Registered
5648 *
5649 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
5650 * must follow with IMS SMS format:
5651 *
5652 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
5653 *
5654 * Valid errors:
5655 * SUCCESS
5656 * RADIO_NOT_AVAILABLE
5657 * INTERNAL_ERR
5658 * NO_MEMORY
5659 * NO_RESOURCES
5660 * CANCELLED
5661 * INVALID_MODEM_STATE
5662 * REQUEST_NOT_SUPPORTED
5663 */
5664#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
5665
5666/**
5667 * RIL_REQUEST_IMS_SEND_SMS
5668 *
5669 * Send a SMS message over IMS
5670 *
5671 * "data" is const RIL_IMS_SMS_Message *
5672 *
5673 * "response" is a const RIL_SMS_Response *
5674 *
5675 * Based on the return error, caller decides to resend if sending sms
5676 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
5677 * In case of retry, data is encoded based on Voice Technology available.
5678 *
5679 * Valid errors:
5680 * SUCCESS
5681 * RADIO_NOT_AVAILABLE
5682 * SMS_SEND_FAIL_RETRY
5683 * FDN_CHECK_FAILURE
5684 * NETWORK_REJECT
5685 * INVALID_ARGUMENTS
5686 * INVALID_STATE
5687 * NO_MEMORY
5688 * INVALID_SMS_FORMAT
5689 * SYSTEM_ERR
5690 * REQUEST_RATE_LIMITED
5691 * MODEM_ERR
5692 * NETWORK_ERR
5693 * ENCODING_ERR
5694 * INVALID_SMSC_ADDRESS
5695 * OPERATION_NOT_ALLOWED
5696 * INTERNAL_ERR
5697 * NO_RESOURCES
5698 * CANCELLED
5699 * REQUEST_NOT_SUPPORTED
5700 *
5701 */
5702#define RIL_REQUEST_IMS_SEND_SMS 113
5703
5704/**
5705 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
5706 *
5707 * Request APDU exchange on the basic channel. This command reflects TS 27.007
5708 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
5709 * of GSM/CDMA, and filter commands appropriately. It should filter
5710 * channel management and SELECT by DF name commands.
5711 *
5712 * "data" is a const RIL_SIM_APDU *
5713 * "sessionid" field should be ignored.
5714 *
5715 * "response" is a const RIL_SIM_IO_Response *
5716 *
5717 * Valid errors:
5718 * SUCCESS
5719 * RADIO_NOT_AVAILABLE
5720 * INTERNAL_ERR
5721 * NO_MEMORY
5722 * NO_RESOURCES
5723 * CANCELLED
5724 * REQUEST_NOT_SUPPORTED
5725 */
5726#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
5727
5728/**
5729 * RIL_REQUEST_SIM_OPEN_CHANNEL
5730 *
5731 * Open a new logical channel and select the given application. This command
5732 * reflects TS 27.007 "open logical channel" operation (+CCHO). This request
5733 * also specifies the P2 parameter (described in ISO 7816-4).
5734 *
5735 * "data" is a const RIL_OpenChannelParam *
5736 *
5737 * "response" is int *
5738 * ((int *)data)[0] contains the session id of the logical channel.
5739 * ((int *)data)[1] onwards may optionally contain the select response for the
5740 * open channel command with one byte per integer.
5741 *
5742 * Valid errors:
5743 * SUCCESS
5744 * RADIO_NOT_AVAILABLE
5745 * MISSING_RESOURCE
5746 * NO_SUCH_ELEMENT
5747 * INTERNAL_ERR
5748 * NO_MEMORY
5749 * NO_RESOURCES
5750 * CANCELLED
5751 * SIM_ERR
5752 * INVALID_SIM_STATE
5753 * MISSING_RESOURCE
5754 * REQUEST_NOT_SUPPORTED
5755 */
5756#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
5757
5758/**
5759 * RIL_REQUEST_SIM_CLOSE_CHANNEL
5760 *
5761 * Close a previously opened logical channel. This command reflects TS 27.007
5762 * "close logical channel" operation (+CCHC).
5763 *
5764 * "data" is int *
5765 * ((int *)data)[0] is the session id of logical the channel to close.
5766 *
5767 * "response" is NULL
5768 *
5769 * Valid errors:
5770 * SUCCESS
5771 * RADIO_NOT_AVAILABLE
5772 * INTERNAL_ERR
5773 * NO_MEMORY
5774 * NO_RESOURCES
5775 * CANCELLED
5776 * REQUEST_NOT_SUPPORTED
5777 */
5778#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
5779
5780/**
5781 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
5782 *
5783 * Exchange APDUs with a UICC over a previously opened logical channel. This
5784 * command reflects TS 27.007 "generic logical channel access" operation
5785 * (+CGLA). The modem should filter channel management and SELECT by DF name
5786 * commands.
5787 *
5788 * "data" is a const RIL_SIM_APDU*
5789 *
5790 * "response" is a const RIL_SIM_IO_Response *
5791 *
5792 * Valid errors:
5793 * SUCCESS
5794 * RADIO_NOT_AVAILABLE
5795 * INTERNAL_ERR
5796 * NO_MEMORY
5797 * NO_RESOURCES
5798 * CANCELLED
5799 * REQUEST_NOT_SUPPORTED
5800 */
5801#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
5802
5803/**
5804 * RIL_REQUEST_NV_READ_ITEM
5805 *
5806 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
5807 * This is used for device configuration by some CDMA operators.
5808 *
5809 * "data" is a const RIL_NV_ReadItem *
5810 *
5811 * "response" is const char * containing the contents of the NV item
5812 *
5813 * Valid errors:
5814 * SUCCESS
5815 * RADIO_NOT_AVAILABLE
5816 * REQUEST_NOT_SUPPORTED
5817 */
5818#define RIL_REQUEST_NV_READ_ITEM 118
5819
5820/**
5821 * RIL_REQUEST_NV_WRITE_ITEM
5822 *
5823 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
5824 * This is used for device configuration by some CDMA operators.
5825 *
5826 * "data" is a const RIL_NV_WriteItem *
5827 *
5828 * "response" is NULL
5829 *
5830 * Valid errors:
5831 * SUCCESS
5832 * RADIO_NOT_AVAILABLE
5833 * REQUEST_NOT_SUPPORTED
5834 */
5835#define RIL_REQUEST_NV_WRITE_ITEM 119
5836
5837/**
5838 * RIL_REQUEST_NV_WRITE_CDMA_PRL
5839 *
5840 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
5841 * This is used for device configuration by some CDMA operators.
5842 *
5843 * "data" is a const char * containing the PRL as a byte array
5844 *
5845 * "response" is NULL
5846 *
5847 * Valid errors:
5848 * SUCCESS
5849 * RADIO_NOT_AVAILABLE
5850 * REQUEST_NOT_SUPPORTED
5851 */
5852#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
5853
5854/**
5855 * RIL_REQUEST_NV_RESET_CONFIG
5856 *
5857 * Reset the radio NV configuration to the factory state.
5858 * This is used for device configuration by some CDMA operators.
5859 *
5860 * "data" is int *
5861 * ((int *)data)[0] is 1 to reload all NV items
5862 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
5863 * ((int *)data)[0] is 3 for factory reset (RTN)
5864 *
5865 * "response" is NULL
5866 *
5867 * Valid errors:
5868 * SUCCESS
5869 * RADIO_NOT_AVAILABLE
5870 * REQUEST_NOT_SUPPORTED
5871 */
5872#define RIL_REQUEST_NV_RESET_CONFIG 121
5873
5874 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
5875 * FIXME This API needs to have more documentation.
5876 *
5877 * Selection/de-selection of a subscription from a SIM card
5878 * "data" is const RIL_SelectUiccSub*
5879
5880 *
5881 * "response" is NULL
5882 *
5883 * Valid errors:
5884 * SUCCESS
5885 * RADIO_NOT_AVAILABLE (radio resetting)
5886 * SUBSCRIPTION_NOT_SUPPORTED
5887 * NO_MEMORY
5888 * INTERNAL_ERR
5889 * SYSTEM_ERR
5890 * INVALID_ARGUMENTS
5891 * MODEM_ERR
5892 * REQUEST_NOT_SUPPORTED
5893 * NO_RESOURCES
5894 * CANCELLED
5895 *
5896 */
5897#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
5898
5899/**
5900 * RIL_REQUEST_ALLOW_DATA
5901 *
5902 * Tells the modem whether data calls are allowed or not
5903 *
5904 * "data" is int *
5905 * FIXME slotId and aid will be added.
5906 * ((int *)data)[0] is == 0 to allow data calls
5907 * ((int *)data)[0] is == 1 to disallow data calls
5908 *
5909 * "response" is NULL
5910 *
5911 * Valid errors:
5912 *
5913 * SUCCESS
5914 * RADIO_NOT_AVAILABLE (radio resetting)
5915 * NO_MEMORY
5916 * INTERNAL_ERR
5917 * SYSTEM_ERR
5918 * MODEM_ERR
5919 * INVALID_ARGUMENTS
5920 * DEVICE_IN_USE
5921 * INVALID_MODEM_STATE
5922 * REQUEST_NOT_SUPPORTED
5923 * NO_RESOURCES
5924 * CANCELLED
5925 *
5926 */
5927#define RIL_REQUEST_ALLOW_DATA 123
5928
5929/**
5930 * RIL_REQUEST_GET_HARDWARE_CONFIG
5931 *
5932 * Request all of the current hardware (modem and sim) associated
5933 * with the RIL.
5934 *
5935 * "data" is NULL
5936 *
5937 * "response" is an array of RIL_HardwareConfig.
5938 *
5939 * Valid errors:
5940 * RADIO_NOT_AVAILABLE
5941 * REQUEST_NOT_SUPPORTED
5942 */
5943#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
5944
5945/**
5946 * RIL_REQUEST_SIM_AUTHENTICATION
5947 *
5948 * Returns the response of SIM Authentication through RIL to a
5949 * challenge request.
5950 *
5951 * "data" Base64 encoded string containing challenge:
5952 * int authContext; P2 value of authentication command, see P2 parameter in
5953 * 3GPP TS 31.102 7.1.2
5954 * char *authData; the challenge string in Base64 format, see 3GPP
5955 * TS 31.102 7.1.2
5956 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
5957 * NULL if no value
5958 *
5959 * "response" Base64 encoded strings containing response:
5960 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
5961 * int sw2;
5962 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
5963 *
5964 * Valid errors:
5965 * RADIO_NOT_AVAILABLE
5966 * INTERNAL_ERR
5967 * NO_MEMORY
5968 * NO_RESOURCES
5969 * CANCELLED
5970 * INVALID_MODEM_STATE
5971 * INVALID_ARGUMENTS
5972 * SIM_ERR
5973 * REQUEST_NOT_SUPPORTED
5974 */
5975#define RIL_REQUEST_SIM_AUTHENTICATION 125
5976
5977/**
5978 * RIL_REQUEST_GET_DC_RT_INFO
5979 *
5980 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
5981 * Requests the Data Connection Real Time Info
5982 *
5983 * "data" is NULL
5984 *
5985 * "response" is the most recent RIL_DcRtInfo
5986 *
5987 * Valid errors:
5988 * SUCCESS
5989 * RADIO_NOT_AVAILABLE
5990 * REQUEST_NOT_SUPPORTED
5991 * INTERNAL_ERR
5992 * NO_MEMORY
5993 * NO_RESOURCES
5994 * CANCELLED
5995 *
5996 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
5997 */
5998#define RIL_REQUEST_GET_DC_RT_INFO 126
5999
6000/**
6001 * RIL_REQUEST_SET_DC_RT_INFO_RATE
6002 *
6003 * The request is DEPRECATED
6004 * This is the minimum number of milliseconds between successive
6005 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
6006 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
6007 * 0 means send as fast as possible.
6008 *
6009 * "data" The number of milliseconds as an int
6010 *
6011 * "response" is null
6012 *
6013 * Valid errors:
6014 * SUCCESS must not fail
6015 */
6016#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
6017
6018/**
6019 * RIL_REQUEST_SET_DATA_PROFILE
6020 *
6021 * Set data profile in modem
6022 * Modem should erase existed profiles from framework, and apply new profiles
6023 * "data" is a const RIL_DataProfileInfo **
6024 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
6025 * "response" is NULL
6026 *
6027 * Valid errors:
6028 * SUCCESS
6029 * RADIO_NOT_AVAILABLE (radio resetting)
6030 * SUBSCRIPTION_NOT_AVAILABLE
6031 * INTERNAL_ERR
6032 * NO_MEMORY
6033 * NO_RESOURCES
6034 * CANCELLED
6035 * REQUEST_NOT_SUPPORTED
6036 * SIM_ABSENT
6037 */
6038#define RIL_REQUEST_SET_DATA_PROFILE 128
6039
6040/**
6041 * RIL_REQUEST_SHUTDOWN
6042 *
6043 * Device is shutting down. All further commands are ignored
6044 * and RADIO_NOT_AVAILABLE must be returned.
6045 *
6046 * "data" is null
6047 * "response" is NULL
6048 *
6049 * Valid errors:
6050 * SUCCESS
6051 * RADIO_NOT_AVAILABLE
6052 * OPERATION_NOT_ALLOWED
6053 * NO_MEMORY
6054 * INTERNAL_ERR
6055 * SYSTEM_ERR
6056 * REQUEST_NOT_SUPPORTED
6057 * NO_RESOURCES
6058 * CANCELLED
6059 */
6060#define RIL_REQUEST_SHUTDOWN 129
6061
6062/**
6063 * RIL_REQUEST_GET_RADIO_CAPABILITY
6064 *
6065 * Used to get phone radio capablility.
6066 *
6067 * "data" is the RIL_RadioCapability structure
6068 *
6069 * Valid errors:
6070 * SUCCESS
6071 * RADIO_NOT_AVAILABLE
6072 * OPERATION_NOT_ALLOWED
6073 * INVALID_STATE
6074 * REQUEST_NOT_SUPPORTED
6075 * INTERNAL_ERR
6076 * NO_MEMORY
6077 * NO_RESOURCES
6078 * CANCELLED
6079 */
6080#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
6081
6082/**
6083 * RIL_REQUEST_SET_RADIO_CAPABILITY
6084 *
6085 * Used to set the phones radio capability. Be VERY careful
6086 * using this request as it may cause some vendor modems to reset. Because
6087 * of the possible modem reset any RIL commands after this one may not be
6088 * processed.
6089 *
6090 * "data" is the RIL_RadioCapability structure
6091 *
6092 * "response" is the RIL_RadioCapability structure, used to feedback return status
6093 *
6094 * Valid errors:
6095 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
6096 * RADIO_NOT_AVAILABLE
6097 * OPERATION_NOT_ALLOWED
6098 * NO_MEMORY
6099 * INTERNAL_ERR
6100 * SYSTEM_ERR
6101 * INVALID_ARGUMENTS
6102 * MODEM_ERR
6103 * INVALID_STATE
6104 * REQUEST_NOT_SUPPORTED
6105 * NO_RESOURCES
6106 * CANCELLED
6107 */
6108#define RIL_REQUEST_SET_RADIO_CAPABILITY 131
6109
6110/**
6111 * RIL_REQUEST_START_LCE
6112 *
6113 * Start Link Capacity Estimate (LCE) service if supported by the radio.
6114 *
6115 * "data" is const int *
6116 * ((const int*)data)[0] specifies the desired reporting interval (ms).
6117 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
6118 *
6119 * "response" is the RIL_LceStatusInfo.
6120 *
6121 * Valid errors:
6122 * SUCCESS
6123 * RADIO_NOT_AVAILABLE
6124 * LCE_NOT_SUPPORTED
6125 * INTERNAL_ERR
6126 * REQUEST_NOT_SUPPORTED
6127 * NO_MEMORY
6128 * NO_RESOURCES
6129 * CANCELLED
6130 * SIM_ABSENT
6131 */
6132#define RIL_REQUEST_START_LCE 132
6133
6134/**
6135 * RIL_REQUEST_STOP_LCE
6136 *
6137 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
6138 * idempotent for the radio modem.
6139 *
6140 * "response" is the RIL_LceStatusInfo.
6141 *
6142 * Valid errors:
6143 * SUCCESS
6144 * RADIO_NOT_AVAILABLE
6145 * LCE_NOT_SUPPORTED
6146 * INTERNAL_ERR
6147 * NO_MEMORY
6148 * NO_RESOURCES
6149 * CANCELLED
6150 * REQUEST_NOT_SUPPORTED
6151 * SIM_ABSENT
6152 */
6153#define RIL_REQUEST_STOP_LCE 133
6154
6155/**
6156 * RIL_REQUEST_PULL_LCEDATA
6157 *
6158 * Pull LCE service for capacity information.
6159 *
6160 * "response" is the RIL_LceDataInfo.
6161 *
6162 * Valid errors:
6163 * SUCCESS
6164 * RADIO_NOT_AVAILABLE
6165 * LCE_NOT_SUPPORTED
6166 * INTERNAL_ERR
6167 * NO_MEMORY
6168 * NO_RESOURCES
6169 * CANCELLED
6170 * REQUEST_NOT_SUPPORTED
6171 * SIM_ABSENT
6172 */
6173#define RIL_REQUEST_PULL_LCEDATA 134
6174
6175/**
6176 * RIL_REQUEST_GET_ACTIVITY_INFO
6177 *
6178 * Get modem activity information for power consumption estimation.
6179 *
6180 * Request clear-on-read statistics information that is used for
6181 * estimating the per-millisecond power consumption of the cellular
6182 * modem.
6183 *
6184 * "data" is null
6185 * "response" is const RIL_ActivityStatsInfo *
6186 *
6187 * Valid errors:
6188 *
6189 * SUCCESS
6190 * RADIO_NOT_AVAILABLE (radio resetting)
6191 * NO_MEMORY
6192 * INTERNAL_ERR
6193 * SYSTEM_ERR
6194 * MODEM_ERR
6195 * NOT_PROVISIONED
6196 * REQUEST_NOT_SUPPORTED
6197 * NO_RESOURCES CANCELLED
6198 */
6199#define RIL_REQUEST_GET_ACTIVITY_INFO 135
6200
6201/**
6202 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS
6203 *
6204 * Set carrier restrictions for this sim slot. Expected modem behavior:
6205 * If never receives this command
6206 * - Must allow all carriers
6207 * Receives this command with data being NULL
6208 * - Must allow all carriers. If a previously allowed SIM is present, modem must not reload
6209 * the SIM. If a previously disallowed SIM is present, reload the SIM and notify Android.
6210 * Receives this command with a list of carriers
6211 * - Only allow specified carriers, persist across power cycles and FDR. If a present SIM
6212 * is in the allowed list, modem must not reload the SIM. If a present SIM is *not* in
6213 * the allowed list, modem must detach from the registered network and only keep emergency
6214 * service, and notify Android SIM refresh reset with new SIM state being
6215 * RIL_CARDSTATE_RESTRICTED. Emergency service must be enabled.
6216 *
6217 * "data" is const RIL_CarrierRestrictions *
6218 * A list of allowed carriers and possibly a list of excluded carriers.
6219 * If data is NULL, means to clear previous carrier restrictions and allow all carriers
6220 *
6221 * "response" is int *
6222 * ((int *)data)[0] contains the number of allowed carriers which have been set correctly.
6223 * On success, it should match the length of list data->allowed_carriers.
6224 * If data is NULL, the value must be 0.
6225 *
6226 * Valid errors:
6227 * RIL_E_SUCCESS
6228 * RIL_E_INVALID_ARGUMENTS
6229 * RIL_E_RADIO_NOT_AVAILABLE
6230 * RIL_E_REQUEST_NOT_SUPPORTED
6231 * INTERNAL_ERR
6232 * NO_MEMORY
6233 * NO_RESOURCES
6234 * CANCELLED
6235 */
6236#define RIL_REQUEST_SET_CARRIER_RESTRICTIONS 136
6237
6238/**
6239 * RIL_REQUEST_GET_CARRIER_RESTRICTIONS
6240 *
6241 * Get carrier restrictions for this sim slot. Expected modem behavior:
6242 * Return list of allowed carriers, or null if all carriers are allowed.
6243 *
6244 * "data" is NULL
6245 *
6246 * "response" is const RIL_CarrierRestrictions *.
6247 * If response is NULL, it means all carriers are allowed.
6248 *
6249 * Valid errors:
6250 * RIL_E_SUCCESS
6251 * RIL_E_RADIO_NOT_AVAILABLE
6252 * RIL_E_REQUEST_NOT_SUPPORTED
6253 * INTERNAL_ERR
6254 * NO_MEMORY
6255 * NO_RESOURCES
6256 * CANCELLED
6257 */
6258#define RIL_REQUEST_GET_CARRIER_RESTRICTIONS 137
6259
6260/**
6261 * RIL_REQUEST_SEND_DEVICE_STATE
6262 *
6263 * Send the updated device state.
6264 * Modem can perform power saving based on the provided device state.
6265 * "data" is const int *
6266 * ((const int*)data)[0] A RIL_DeviceStateType that specifies the device state type.
6267 * ((const int*)data)[1] Specifies the state. See RIL_DeviceStateType for the definition of each
6268 * type.
6269 *
6270 * "datalen" is count * sizeof(const RIL_DeviceState *)
6271 * "response" is NULL
6272 *
6273 * Valid errors:
6274 * SUCCESS
6275 * RADIO_NOT_AVAILABLE (radio resetting)
6276 * NO_MEMORY
6277 * INTERNAL_ERR
6278 * SYSTEM_ERR
6279 * INVALID_ARGUMENTS
6280 * REQUEST_NOT_SUPPORTED
6281 * NO_RESOURCES
6282 * CANCELLED
6283 */
6284#define RIL_REQUEST_SEND_DEVICE_STATE 138
6285
6286/**
6287 * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER
6288 *
6289 * Set the unsolicited response filter
6290 * This is used to prevent unnecessary application processor
6291 * wake up for power saving purposes by suppressing the
6292 * unsolicited responses in certain scenarios.
6293 *
6294 * "data" is an int *
6295 *
6296 * ((int *)data)[0] is a 32-bit bitmask of RIL_UnsolicitedResponseFilter
6297 *
6298 * "response" is NULL
6299 *
6300 * Valid errors:
6301 * SUCCESS
6302 * INVALID_ARGUMENTS (e.g. the requested filter doesn't exist)
6303 * RADIO_NOT_AVAILABLE (radio resetting)
6304 * NO_MEMORY
6305 * INTERNAL_ERR
6306 * SYSTEM_ERR
6307 * REQUEST_NOT_SUPPORTED
6308 * NO_RESOURCES
6309 * CANCELLED
6310 */
6311#define RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER 139
6312
6313 /**
6314 * RIL_REQUEST_SET_SIM_CARD_POWER
6315 *
6316 * Set SIM card power up or down
6317 *
6318 * Request is equivalent to inserting and removing the card, with
6319 * an additional effect where the ability to detect card removal/insertion
6320 * is disabled when the SIM card is powered down.
6321 *
6322 * This will generate RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
6323 * as if the SIM had been inserted or removed.
6324 *
6325 * "data" is int *
6326 * ((int *)data)[0] is 1 for "SIM POWER UP"
6327 * ((int *)data)[0] is 0 for "SIM POWER DOWN"
6328 *
6329 * "response" is NULL
6330 *
6331 * Valid errors:
6332 * SUCCESS
6333 * RADIO_NOT_AVAILABLE
6334 * REQUEST_NOT_SUPPORTED
6335 * SIM_ABSENT
6336 * INVALID_ARGUMENTS
6337 * INTERNAL_ERR
6338 * NO_MEMORY
6339 * NO_RESOURCES
6340 * CANCELLED
6341 */
6342#define RIL_REQUEST_SET_SIM_CARD_POWER 140
6343
6344/**
6345 * RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION
6346 *
6347 * Provide Carrier specific information to the modem that will be used to
6348 * encrypt the IMSI and IMPI. Sent by the framework during boot, carrier
6349 * switch and everytime we receive a new certificate.
6350 *
6351 * "data" is the RIL_CarrierInfoForImsiEncryption * structure.
6352 *
6353 * "response" is NULL
6354 *
6355 * Valid errors:
6356 * RIL_E_SUCCESS
6357 * RIL_E_RADIO_NOT_AVAILABLE
6358 * SIM_ABSENT
6359 * RIL_E_REQUEST_NOT_SUPPORTED
6360 * INVALID_ARGUMENTS
6361 * MODEM_INTERNAL_FAILURE
6362 * INTERNAL_ERR
6363 * NO_MEMORY
6364 * NO_RESOURCES
6365 * CANCELLED
6366 */
6367#define RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION 141
6368
6369/**
6370 * RIL_REQUEST_START_NETWORK_SCAN
6371 *
6372 * Starts a new network scan
6373 *
6374 * Request to start a network scan with specified radio access networks with frequency bands and/or
6375 * channels.
6376 *
6377 * "data" is a const RIL_NetworkScanRequest *.
6378 * "response" is NULL
6379 *
6380 * Valid errors:
6381 * SUCCESS
6382 * RADIO_NOT_AVAILABLE
6383 * OPERATION_NOT_ALLOWED
6384 * DEVICE_IN_USE
6385 * INTERNAL_ERR
6386 * NO_MEMORY
6387 * MODEM_ERR
6388 * INVALID_ARGUMENTS
6389 * REQUEST_NOT_SUPPORTED
6390 * NO_RESOURCES
6391 * CANCELLED
6392 *
6393 */
6394#define RIL_REQUEST_START_NETWORK_SCAN 142
6395
6396/**
6397 * RIL_REQUEST_STOP_NETWORK_SCAN
6398 *
6399 * Stops an ongoing network scan
6400 *
6401 * Request to stop the ongoing network scan. Since the modem can only perform one scan at a time,
6402 * there is no parameter for this request.
6403 *
6404 * "data" is NULL
6405 * "response" is NULL
6406 *
6407 * Valid errors:
6408 * SUCCESS
6409 * INTERNAL_ERR
6410 * MODEM_ERR
6411 * NO_MEMORY
6412 * NO_RESOURCES
6413 * CANCELLED
6414 * REQUEST_NOT_SUPPORTED
6415 *
6416 */
6417#define RIL_REQUEST_STOP_NETWORK_SCAN 143
6418
6419/**
6420 * RIL_REQUEST_START_KEEPALIVE
6421 *
6422 * Start a keepalive session
6423 *
6424 * Request that the modem begin sending keepalive packets on a particular
6425 * data call, with a specified source, destination, and format.
6426 *
6427 * "data" is a const RIL_RequestKeepalive
6428 * "response" is RIL_KeepaliveStatus with a valid "handle"
6429 *
6430 * Valid errors:
6431 * SUCCESS
6432 * NO_RESOURCES
6433 * INVALID_ARGUMENTS
6434 *
6435 */
6436#define RIL_REQUEST_START_KEEPALIVE 144
6437
6438/**
6439 * RIL_REQUEST_STOP_KEEPALIVE
6440 *
6441 * Stops an ongoing keepalive session
6442 *
6443 * Requests that a keepalive session with the given handle be stopped.
6444 * there is no parameter for this request.
6445 *
6446 * "data" is an integer handle
6447 * "response" is NULL
6448 *
6449 * Valid errors:
6450 * SUCCESS
6451 * INVALID_ARGUMENTS
6452 *
6453 */
6454#define RIL_REQUEST_STOP_KEEPALIVE 145
6455
6456/**
Nazanin Bakhshi25443002019-02-21 16:52:32 -08006457 * RIL_REQUEST_GET_MODEM_STACK_STATUS
6458 *
6459 * Request status of a logical modem
6460 *
6461 * Valid errors:
6462 * SUCCESS
6463 * RADIO_NOT_AVAILABLE
6464 * MODEM_ERR
6465 *
6466 */
Sarah Chinef7f9222020-01-30 10:37:08 -08006467#define RIL_REQUEST_GET_MODEM_STACK_STATUS 146
Nazanin Bakhshi25443002019-02-21 16:52:32 -08006468
paulyeff378952019-02-25 12:40:45 -08006469/**
6470 * @param info Response info struct containing response type, serial no. and error
6471 * @param networkTypeBitmap a 32-bit bitmap of RadioAccessFamily.
6472 *
6473 * Valid errors returned:
6474 * RadioError:NONE
6475 * RadioError:RADIO_NOT_AVAILABLE
6476 * RadioError:INTERNAL_ERR
6477 * RadioError:INVALID_ARGUMENTS
6478 * RadioError:MODEM_ERR
6479 * RadioError:REQUEST_NOT_SUPPORTED
6480 * RadioError:NO_RESOURCES
6481 */
Sarah Chinef7f9222020-01-30 10:37:08 -08006482#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE_BITMAP 147
paulyeff378952019-02-25 12:40:45 -08006483
6484/**
6485 * Callback of IRadio.setPreferredNetworkTypeBitmap(int, bitfield<RadioAccessFamily>)
6486 *
6487 * @param info Response info struct containing response type, serial no. and error
6488 *
6489 * Valid errors returned:
6490 * RadioError:NONE
6491 * RadioError:RADIO_NOT_AVAILABLE
6492 * RadioError:OPERATION_NOT_ALLOWED
6493 * RadioError:MODE_NOT_SUPPORTED
6494 * RadioError:INTERNAL_ERR
6495 * RadioError:INVALID_ARGUMENTS
6496 * RadioError:MODEM_ERR
6497 * RadioError:REQUEST_NOT_SUPPORTED
6498 * RadioError:NO_RESOURCES
6499 */
Sarah Chinef7f9222020-01-30 10:37:08 -08006500#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE_BITMAP 148
Nazanin Bakhshi25443002019-02-21 16:52:32 -08006501
Malcolm Chen4bb42072019-02-22 18:21:48 -08006502/**
paulye91d34712019-02-07 19:02:02 -08006503 * RIL_REQUEST_EMERGENCY_DIAL
6504 *
6505 * Initiate emergency voice call, with zero or more emergency service category(s), zero or
6506 * more emergency Uniform Resource Names (URN), and routing information for handling the call.
6507 * Android uses this request to make its emergency call instead of using @1.0::IRadio.dial
6508 * if the 'address' in the 'dialInfo' field is identified as an emergency number by Android.
6509 *
6510 * In multi-sim scenario, if the emergency number is from a specific subscription, this radio
6511 * request is sent through the IRadio service that serves the subscription, no matter of the
6512 * PUK/PIN state of the subscription and the service state of the radio.
6513 *
6514 * Some countries or carriers require some emergency numbers that must be handled with normal
6515 * call routing or emergency routing. If the 'routing' field is specified as
6516 * @1.4::EmergencyNumberRouting#NORMAL, the implementation must use normal call routing to
6517 * handle the call; if it is specified as @1.4::EmergencyNumberRouting#EMERGENCY, the
6518 * implementation must use emergency routing to handle the call; if it is
6519 * @1.4::EmergencyNumberRouting#UNKNOWN, Android does not know how to handle the call.
6520 *
6521 * If the dialed emergency number does not have a specified emergency service category, the
6522 * 'categories' field is set to @1.4::EmergencyServiceCategory#UNSPECIFIED; if the dialed
6523 * emergency number does not have specified emergency Uniform Resource Names, the 'urns' field
6524 * is set to an empty list. If the underlying technology used to request emergency services
6525 * does not support the emergency service category or emergency uniform resource names, the
6526 * field 'categories' or 'urns' may be ignored.
6527 *
6528 * 'fromEmergencyDialer' indicates if this request originated from emergency dialer/shortcut,
6529 * which means an explicit intent from the user to dial an emergency number. The modem must
6530 * treat this as an actual emergency dial and not try to disambiguate.
6531 *
6532 * If 'isTesting' is true, this request is for testing purpose, and must not be sent to a real
6533 * emergency service; otherwise it's for a real emergency call request.
6534 * Valid errors:
6535 * NONE
6536 * RADIO_NOT_AVAILABLE (radio resetting)
6537 * DIAL_MODIFIED_TO_USSD
6538 * DIAL_MODIFIED_TO_SS
6539 * DIAL_MODIFIED_TO_DIAL
6540 * INVALID_ARGUMENTS
6541 * NO_RESOURCES
6542 * INTERNAL_ERR
6543 * FDN_CHECK_FAILURE
6544 * MODEM_ERR
6545 * NO_SUBSCRIPTION
6546 * NO_NETWORK_FOUND
6547 * INVALID_CALL_ID
6548 * DEVICE_IN_USE
6549 * ABORTED
6550 * INVALID_MODEM_STATE
6551 */
Sarah Chinef7f9222020-01-30 10:37:08 -08006552#define RIL_REQUEST_EMERGENCY_DIAL 149
paulye91d34712019-02-07 19:02:02 -08006553
Malcolm Chen4bb42072019-02-22 18:21:48 -08006554/**
6555 * Specify which bands modem's background scan must act on.
6556 * If specifyChannels is true, it only scans bands specified in specifiers.
6557 * If specifyChannels is false, it scans all bands.
6558 *
6559 * For example, CBRS is only on LTE band 48. By specifying this band,
6560 * modem saves more power.
6561 *
6562 * Valid errors:
6563 * SUCCESS
6564 * RADIO_NOT_AVAILABLE
6565 * INTERNAL_ERR
6566 *
6567 */
Sarah Chinef7f9222020-01-30 10:37:08 -08006568#define RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS 150
Malcolm Chen4bb42072019-02-22 18:21:48 -08006569
Nazanin Bakhshi42acd932019-02-27 15:05:39 -08006570/**
6571 * RIL_REQUEST_ENABLE_MODEM
6572 *
6573 * Enable a logical modem
6574 *
6575 * Valid errors:
6576 * SUCCESS
6577 * RADIO_NOT_AVAILABLE
6578 * MODEM_ERR
6579 *
6580 */
Sarah Chinef7f9222020-01-30 10:37:08 -08006581#define RIL_REQUEST_ENABLE_MODEM 151
Nazanin Bakhshi42acd932019-02-27 15:05:39 -08006582
Michelee218c362019-02-27 22:48:48 -08006583/**
Sarah Chinef7f9222020-01-30 10:37:08 -08006584 * RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA
Michelee218c362019-02-27 22:48:48 -08006585 *
Shuo Qian4fffb032019-11-08 17:59:42 -08006586 * Sets the signal strength reporting criteria.
6587 *
6588 * The resulting reporting rules are the AND of all the supplied criteria. For each RAN
6589 * The hysteresisDb apply to only the following measured quantities:
6590 * -GERAN - RSSI
6591 * -CDMA2000 - RSSI
6592 * -UTRAN - RSCP
6593 * -EUTRAN - RSRP/RSRQ/RSSNR
6594 *
6595 * The thresholds apply to only the following measured quantities:
6596 * -GERAN - RSSI
6597 * -CDMA2000 - RSSI
6598 * -UTRAN - RSCP
6599 * -EUTRAN - RSRP/RSRQ/RSSNR
6600 * -NGRAN - SSRSRP/SSRSRQ/SSSINR
6601 *
6602 * Note: Reporting criteria must be individually set for each RAN. For any unset reporting
6603 * criteria, the value is implementation-defined.
6604 *
6605 * Note: @1.5::SignalThresholdInfo includes fields 'hysteresisDb', 'hysteresisMs',
6606 * and 'thresholds'. As this mechanism generally only constrains reports based on one
6607 * measured quantity per RAN, if multiple measured quantities must be used to trigger a report
6608 * for a given RAN, the only valid field may be hysteresisMs: hysteresisDb and thresholds must
6609 * be set to zero and length zero respectively. If either hysteresisDb or thresholds is set,
6610 * then reports shall only be triggered by the respective measured quantity, subject to the
6611 * applied constraints.
6612 *
6613 * Valid errors returned:
6614 * RadioError:NONE
6615 * RadioError:INVALID_ARGUMENTS
6616 * RadioError:RADIO_NOT_AVAILABLE
6617 */
Sarah Chinef7f9222020-01-30 10:37:08 -08006618#define RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA 152
Shuo Qian4fffb032019-11-08 17:59:42 -08006619
Malcolm Chenc2008a22019-11-12 18:43:09 -08006620/**
6621 * RIL_REQUEST_ENABLE_UICC_APPLICATIONS
6622 *
6623 * Enable or disable uicc applications.
6624 *
6625 * Valid errors:
6626 * SUCCESS
6627 * RADIO_NOT_AVAILABLE
6628 * SIM_ABSENT
6629 * INTERNAL_ERR
6630 * REQUEST_NOT_SUPPORTED
6631 */
Sarah Chinef7f9222020-01-30 10:37:08 -08006632#define RIL_REQUEST_ENABLE_UICC_APPLICATIONS 153
Malcolm Chenc2008a22019-11-12 18:43:09 -08006633
6634/**
6635 * RIL_REQUEST_ARE_UICC_APPLICATIONS_ENABLED
6636 *
6637 * Whether uicc applications are enabled.
6638 *
6639 * Response: a boolean of enable or not.
6640 *
6641 * Valid errors:
6642 * SUCCESS
6643 * RADIO_NOT_AVAILABLE
6644 * SIM_ABSENT
6645 * INTERNAL_ERR
6646 * REQUEST_NOT_SUPPORTED
6647 */
Sarah Chinef7f9222020-01-30 10:37:08 -08006648#define RIL_REQUEST_ARE_UICC_APPLICATIONS_ENABLED 154
Malcolm Chenc2008a22019-11-12 18:43:09 -08006649
6650/**
Sarah Chinef7f9222020-01-30 10:37:08 -08006651 * RIL_REQUEST_SET_RADIO_POWER
Malcolm Chenad6b0972019-12-17 15:52:16 -08006652 *
6653 * Turn on or off radio power. It can also specify whether turning on radio power is to place an
6654 * emergency call and whether the call will be placed on this logical modem.
6655 *
6656 * Valid errors:
6657 * SUCCESS
6658 * INTERNAL_ERR
6659 * INVALID_ARGUMENTS
6660 *
6661 */
Sarah Chinef7f9222020-01-30 10:37:08 -08006662#define RIL_REQUEST_SET_RADIO_POWER 155
Nazish Tabassum3befb8b2019-12-19 12:29:57 +05306663
6664/**
6665 * RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION
6666 *
6667 * Requests that sim personlization be deactivated
6668 *
6669 * "data" is const char **
6670 * ((const char **)(data))[0]] is sim depersonlization code
6671 *
6672 * "response" is int *
6673 * ((int *)response)[0] is the number of retries remaining,
6674 * or -1 if number of retries are infinite.
6675 *
6676 * Valid errors:
6677 *
6678 * SUCCESS
6679 * RADIO_NOT_AVAILABLE (radio resetting)
6680 * PASSWORD_INCORRECT
6681 * SIM_ABSENT (code is invalid)
6682 * INTERNAL_ERR
6683 * NO_MEMORY
6684 * NO_RESOURCES
6685 * CANCELLED
6686 * REQUEST_NOT_SUPPORTED
6687 */
6688
Sarah Chinef7f9222020-01-30 10:37:08 -08006689#define RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION 156
Nazish Tabassumbf833032020-01-16 22:55:14 +05306690
6691/**
6692 * RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE
6693 *
6694 * Send a CDMA SMS message
6695 *
6696 * "data" is const RIL_CDMA_SMS_Message *
6697 *
6698 * "response" is a const RIL_SMS_Response *
6699 *
6700 * Based on the return error, caller decides to resend if sending sms
6701 * fails. The CDMA error class is derived as follows,
6702 * SUCCESS is error class 0 (no error)
6703 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
6704 *
6705 * Valid errors:
6706 * SUCCESS
6707 * RADIO_NOT_AVAILABLE
6708 * SMS_SEND_FAIL_RETRY
6709 * NETWORK_REJECT
6710 * INVALID_STATE
6711 * INVALID_ARGUMENTS
6712 * NO_MEMORY
6713 * REQUEST_RATE_LIMITED
6714 * INVALID_SMS_FORMAT
6715 * SYSTEM_ERR
6716 * FDN_CHECK_FAILURE
6717 * MODEM_ERR
6718 * NETWORK_ERR
6719 * ENCODING_ERR
6720 * INVALID_SMSC_ADDRESS
6721 * OPERATION_NOT_ALLOWED
6722 * NO_RESOURCES
6723 * CANCELLED
6724 * REQUEST_NOT_SUPPORTED
6725 * MODE_NOT_SUPPORTED
6726 * SIM_ABSENT
Nazish Tabassumbf833032020-01-16 22:55:14 +05306727 */
Sarah Chinef7f9222020-01-30 10:37:08 -08006728#define RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE 157
Nazish Tabassumbf833032020-01-16 22:55:14 +05306729
paulye91d34712019-02-07 19:02:02 -08006730/***********************************************************************/
6731
6732/**
6733 * RIL_RESPONSE_ACKNOWLEDGEMENT
6734 *
6735 * This is used by Asynchronous solicited messages and Unsolicited messages
6736 * to acknowledge the receipt of those messages in RIL.java so that the ack
6737 * can be used to let ril.cpp to release wakelock.
6738 *
6739 * Valid errors
6740 * SUCCESS
6741 * RADIO_NOT_AVAILABLE
6742 */
6743
6744#define RIL_RESPONSE_ACKNOWLEDGEMENT 800
6745
6746/***********************************************************************/
6747
6748
6749#define RIL_UNSOL_RESPONSE_BASE 1000
6750
6751/**
6752 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
6753 *
6754 * Indicate when value of RIL_RadioState has changed.
6755 *
6756 * Callee will invoke RIL_RadioStateRequest method on main thread
6757 *
6758 * "data" is NULL
6759 */
6760
6761#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
6762
6763
6764/**
6765 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
6766 *
6767 * Indicate when call state has changed
6768 *
6769 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
6770 *
6771 * "data" is NULL
6772 *
6773 * Response should be invoked on, for example,
6774 * "RING", "BUSY", "NO CARRIER", and also call state
6775 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
6776 *
6777 * Redundent or extraneous invocations are tolerated
6778 */
6779#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
6780
6781
6782/**
6783 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
6784 *
6785 * Called when the voice network state changed
6786 *
6787 * Callee will invoke the following requests on main thread:
6788 *
6789 * RIL_REQUEST_VOICE_REGISTRATION_STATE
6790 * RIL_REQUEST_OPERATOR
6791 *
6792 * "data" is NULL
6793 *
6794 * FIXME should this happen when SIM records are loaded? (eg, for
6795 * EONS)
6796 */
6797#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
6798
6799/**
6800 * RIL_UNSOL_RESPONSE_NEW_SMS
6801 *
6802 * Called when new SMS is received.
6803 *
6804 * "data" is const char *
6805 * This is a pointer to a string containing the PDU of an SMS-DELIVER
6806 * as an ascii string of hex digits. The PDU starts with the SMSC address
6807 * per TS 27.005 (+CMT:)
6808 *
6809 * Callee will subsequently confirm the receipt of thei SMS with a
6810 * RIL_REQUEST_SMS_ACKNOWLEDGE
6811 *
6812 * No new RIL_UNSOL_RESPONSE_NEW_SMS
6813 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
6814 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
6815 */
6816
6817#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
6818
6819/**
6820 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
6821 *
6822 * Called when new SMS Status Report is received.
6823 *
6824 * "data" is const char *
6825 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
6826 * as an ascii string of hex digits. The PDU starts with the SMSC address
6827 * per TS 27.005 (+CDS:).
6828 *
6829 * Callee will subsequently confirm the receipt of the SMS with a
6830 * RIL_REQUEST_SMS_ACKNOWLEDGE
6831 *
6832 * No new RIL_UNSOL_RESPONSE_NEW_SMS
6833 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
6834 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
6835 */
6836
6837#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
6838
6839/**
6840 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
6841 *
6842 * Called when new SMS has been stored on SIM card
6843 *
6844 * "data" is const int *
6845 * ((const int *)data)[0] contains the slot index on the SIM that contains
6846 * the new message
6847 */
6848
6849#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
6850
6851/**
6852 * RIL_UNSOL_ON_USSD
6853 *
6854 * Called when a new USSD message is received.
6855 *
6856 * "data" is const char **
6857 * ((const char **)data)[0] points to a type code, which is
6858 * one of these string values:
6859 * "0" USSD-Notify -- text in ((const char **)data)[1]
6860 * "1" USSD-Request -- text in ((const char **)data)[1]
6861 * "2" Session terminated by network
6862 * "3" other local client (eg, SIM Toolkit) has responded
6863 * "4" Operation not supported
6864 * "5" Network timeout
6865 *
6866 * The USSD session is assumed to persist if the type code is "1", otherwise
6867 * the current session (if any) is assumed to have terminated.
6868 *
6869 * ((const char **)data)[1] points to a message string if applicable, which
6870 * should always be in UTF-8.
6871 */
6872#define RIL_UNSOL_ON_USSD 1006
6873/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
6874
6875/**
6876 * RIL_UNSOL_ON_USSD_REQUEST
6877 *
6878 * Obsolete. Send via RIL_UNSOL_ON_USSD
6879 */
6880#define RIL_UNSOL_ON_USSD_REQUEST 1007
6881
6882/**
6883 * RIL_UNSOL_NITZ_TIME_RECEIVED
6884 *
6885 * Called when radio has received a NITZ time message
6886 *
6887 * "data" is const char * pointing to NITZ time string
6888 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
6889 */
6890#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
6891
6892/**
6893 * RIL_UNSOL_SIGNAL_STRENGTH
6894 *
6895 * Radio may report signal strength rather han have it polled.
6896 *
6897 * "data" is a const RIL_SignalStrength *
6898 */
6899#define RIL_UNSOL_SIGNAL_STRENGTH 1009
6900
6901
6902/**
6903 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
6904 *
6905 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
6906 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
6907 * of current data contexts including new contexts that have been
6908 * activated. A data call is only removed from this list when the
6909 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
6910 * is powered off/on.
6911 *
6912 * See also: RIL_REQUEST_DATA_CALL_LIST
6913 */
6914
6915#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
6916
6917/**
6918 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
6919 *
6920 * Reports supplementary service related notification from the network.
6921 *
6922 * "data" is a const RIL_SuppSvcNotification *
6923 *
6924 */
6925
6926#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
6927
6928/**
6929 * RIL_UNSOL_STK_SESSION_END
6930 *
6931 * Indicate when STK session is terminated by SIM.
6932 *
6933 * "data" is NULL
6934 */
6935#define RIL_UNSOL_STK_SESSION_END 1012
6936
6937/**
6938 * RIL_UNSOL_STK_PROACTIVE_COMMAND
6939 *
6940 * Indicate when SIM issue a STK proactive command to applications
6941 *
6942 * "data" is a const char * containing SAT/USAT proactive command
6943 * in hexadecimal format string starting with command tag
6944 *
6945 */
6946#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
6947
6948/**
6949 * RIL_UNSOL_STK_EVENT_NOTIFY
6950 *
6951 * Indicate when SIM notifies applcations some event happens.
6952 * Generally, application does not need to have any feedback to
6953 * SIM but shall be able to indicate appropriate messages to users.
6954 *
6955 * "data" is a const char * containing SAT/USAT commands or responses
6956 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
6957 * starting with first byte of response data or command tag
6958 *
6959 */
6960#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
6961
6962/**
6963 * RIL_UNSOL_STK_CALL_SETUP
6964 *
6965 * Indicate when SIM wants application to setup a voice call.
6966 *
6967 * "data" is const int *
6968 * ((const int *)data)[0] contains timeout value (in milliseconds)
6969 */
6970#define RIL_UNSOL_STK_CALL_SETUP 1015
6971
6972/**
6973 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
6974 *
6975 * Indicates that SMS storage on the SIM is full. Sent when the network
6976 * attempts to deliver a new SMS message. Messages cannot be saved on the
6977 * SIM until space is freed. In particular, incoming Class 2 messages
6978 * cannot be stored.
6979 *
6980 * "data" is null
6981 *
6982 */
6983#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
6984
6985/**
6986 * RIL_UNSOL_SIM_REFRESH
6987 *
6988 * Indicates that file(s) on the SIM have been updated, or the SIM
6989 * has been reinitialized.
6990 *
6991 * In the case where RIL is version 6 or older:
6992 * "data" is an int *
6993 * ((int *)data)[0] is a RIL_SimRefreshResult.
6994 * ((int *)data)[1] is the EFID of the updated file if the result is
6995 * SIM_FILE_UPDATE or NULL for any other result.
6996 *
6997 * In the case where RIL is version 7:
6998 * "data" is a RIL_SimRefreshResponse_v7 *
6999 *
7000 * Note: If the SIM state changes as a result of the SIM refresh (eg,
7001 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
7002 * should be sent.
7003 */
7004#define RIL_UNSOL_SIM_REFRESH 1017
7005
7006/**
7007 * RIL_UNSOL_CALL_RING
7008 *
7009 * Ring indication for an incoming call (eg, RING or CRING event).
7010 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
7011 * of a call and sending multiple is optional. If the system property
7012 * ro.telephony.call_ring.multiple is false then the upper layers
7013 * will generate the multiple events internally. Otherwise the vendor
7014 * ril must generate multiple RIL_UNSOL_CALL_RING if
7015 * ro.telephony.call_ring.multiple is true or if it is absent.
7016 *
7017 * The rate of these events is controlled by ro.telephony.call_ring.delay
7018 * and has a default value of 3000 (3 seconds) if absent.
7019 *
7020 * "data" is null for GSM
7021 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
7022 */
7023#define RIL_UNSOL_CALL_RING 1018
7024
7025/**
7026 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
7027 *
7028 * Indicates that SIM state changes.
7029 *
7030 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
7031
7032 * "data" is null
7033 */
7034#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
7035
7036/**
7037 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
7038 *
7039 * Called when new CDMA SMS is received
7040 *
7041 * "data" is const RIL_CDMA_SMS_Message *
7042 *
7043 * Callee will subsequently confirm the receipt of the SMS with
7044 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
7045 *
7046 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
7047 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
7048 *
7049 */
7050#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
7051
7052/**
7053 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
7054 *
7055 * Called when new Broadcast SMS is received
7056 *
7057 * "data" can be one of the following:
7058 * If received from GSM network, "data" is const char of 88 bytes
7059 * which indicates each page of a CBS Message sent to the MS by the
7060 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
7061 * If received from UMTS network, "data" is const char of 90 up to 1252
7062 * bytes which contain between 1 and 15 CBS Message pages sent as one
7063 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2.
7064 *
7065 */
7066#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
7067
7068/**
7069 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
7070 *
7071 * Indicates that SMS storage on the RUIM is full. Messages
7072 * cannot be saved on the RUIM until space is freed.
7073 *
7074 * "data" is null
7075 *
7076 */
7077#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
7078
7079/**
7080 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
7081 *
7082 * Indicates a restricted state change (eg, for Domain Specific Access Control).
7083 *
7084 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
7085 *
7086 * "data" is an int *
7087 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
7088 */
7089#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
7090
7091/**
7092 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
7093 *
7094 * Indicates that the radio system selection module has
7095 * autonomously entered emergency callback mode.
7096 *
7097 * "data" is null
7098 *
7099 */
7100#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
7101
7102/**
7103 * RIL_UNSOL_CDMA_CALL_WAITING
7104 *
7105 * Called when CDMA radio receives a call waiting indication.
7106 *
7107 * "data" is const RIL_CDMA_CallWaiting *
7108 *
7109 */
7110#define RIL_UNSOL_CDMA_CALL_WAITING 1025
7111
7112/**
7113 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
7114 *
7115 * Called when CDMA radio receives an update of the progress of an
7116 * OTASP/OTAPA call.
7117 *
7118 * "data" is const int *
7119 * For CDMA this is an integer OTASP/OTAPA status listed in
7120 * RIL_CDMA_OTA_ProvisionStatus.
7121 *
7122 */
7123#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
7124
7125/**
7126 * RIL_UNSOL_CDMA_INFO_REC
7127 *
7128 * Called when CDMA radio receives one or more info recs.
7129 *
7130 * "data" is const RIL_CDMA_InformationRecords *
7131 *
7132 */
7133#define RIL_UNSOL_CDMA_INFO_REC 1027
7134
7135/**
7136 * RIL_UNSOL_OEM_HOOK_RAW
7137 *
7138 * This is for OEM specific use.
7139 *
7140 * "data" is a byte[]
7141 */
7142#define RIL_UNSOL_OEM_HOOK_RAW 1028
7143
7144/**
7145 * RIL_UNSOL_RINGBACK_TONE
7146 *
7147 * Indicates that nework doesn't have in-band information, need to
7148 * play out-band tone.
7149 *
7150 * "data" is an int *
7151 * ((int *)data)[0] == 0 for stop play ringback tone.
7152 * ((int *)data)[0] == 1 for start play ringback tone.
7153 */
7154#define RIL_UNSOL_RINGBACK_TONE 1029
7155
7156/**
7157 * RIL_UNSOL_RESEND_INCALL_MUTE
7158 *
7159 * Indicates that framework/application need reset the uplink mute state.
7160 *
7161 * There may be situations where the mute state becomes out of sync
7162 * between the application and device in some GSM infrastructures.
7163 *
7164 * "data" is null
7165 */
7166#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
7167
7168/**
7169 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
7170 *
7171 * Called when CDMA subscription source changed.
7172 *
7173 * "data" is int *
7174 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
7175 */
7176#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
7177
7178/**
7179 * RIL_UNSOL_CDMA_PRL_CHANGED
7180 *
7181 * Called when PRL (preferred roaming list) changes.
7182 *
7183 * "data" is int *
7184 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
7185 */
7186#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
7187
7188/**
7189 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
7190 *
7191 * Called when Emergency Callback Mode Ends
7192 *
7193 * Indicates that the radio system selection module has
7194 * proactively exited emergency callback mode.
7195 *
7196 * "data" is NULL
7197 *
7198 */
7199#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
7200
7201/**
7202 * RIL_UNSOL_RIL_CONNECTED
7203 *
7204 * Called the ril connects and returns the version
7205 *
7206 * "data" is int *
7207 * ((int *)data)[0] is RIL_VERSION
7208 */
7209#define RIL_UNSOL_RIL_CONNECTED 1034
7210
7211/**
7212 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
7213 *
7214 * Indicates that voice technology has changed. Contains new radio technology
7215 * as a data in the message.
7216 *
7217 * "data" is int *
7218 * ((int *)data)[0] is of type const RIL_RadioTechnology
7219 *
7220 */
7221#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
7222
7223/**
7224 * RIL_UNSOL_CELL_INFO_LIST
7225 *
7226 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
7227 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
7228 *
7229 * "data" is NULL
7230 *
7231 * "response" is an array of RIL_CellInfo_v12.
7232 */
7233#define RIL_UNSOL_CELL_INFO_LIST 1036
7234
7235/**
7236 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
7237 *
7238 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
7239 * instead, provide IMS registration status via an IMS Service.
7240 *
7241 * Called when IMS registration state has changed
7242 *
7243 * To get IMS registration state and IMS SMS format, callee needs to invoke the
7244 * following request on main thread:
7245 *
7246 * RIL_REQUEST_IMS_REGISTRATION_STATE
7247 *
7248 * "data" is NULL
7249 *
7250 */
7251#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
7252
7253/**
7254 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
7255 *
7256 * Indicated when there is a change in subscription status.
7257 * This event will be sent in the following scenarios
7258 * - subscription readiness at modem, which was selected by telephony layer
7259 * - when subscription is deactivated by modem due to UICC card removal
7260 * - When network invalidates the subscription i.e. attach reject due to authentication reject
7261 *
7262 * "data" is const int *
7263 * ((const int *)data)[0] == 0 for Subscription Deactivated
7264 * ((const int *)data)[0] == 1 for Subscription Activated
7265 *
7266 */
7267#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
7268
7269/**
7270 * RIL_UNSOL_SRVCC_STATE_NOTIFY
7271 *
7272 * Called when Single Radio Voice Call Continuity(SRVCC)
7273 * progress state has changed
7274 *
7275 * "data" is int *
7276 * ((int *)data)[0] is of type const RIL_SrvccState
7277 *
7278 */
7279
7280#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
7281
7282/**
7283 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
7284 *
7285 * Called when the hardware configuration associated with the RILd changes
7286 *
7287 * "data" is an array of RIL_HardwareConfig
7288 *
7289 */
7290#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
7291
7292/**
7293 * RIL_UNSOL_DC_RT_INFO_CHANGED
7294 *
7295 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
7296 * Sent when the DC_RT_STATE changes but the time
7297 * between these messages must not be less than the
7298 * value set by RIL_REQUEST_SET_DC_RT_RATE.
7299 *
7300 * "data" is the most recent RIL_DcRtInfo
7301 *
7302 */
7303#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
7304
7305/**
7306 * RIL_UNSOL_RADIO_CAPABILITY
7307 *
7308 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
7309 * Returns the phone radio capability exactly as
7310 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
7311 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
7312 *
7313 * "data" is the RIL_RadioCapability structure
7314 */
7315#define RIL_UNSOL_RADIO_CAPABILITY 1042
7316
7317/*
7318 * RIL_UNSOL_ON_SS
7319 *
7320 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
7321 * call control.
7322 *
7323 * "data" is const RIL_StkCcUnsolSsResponse *
7324 *
7325 */
7326#define RIL_UNSOL_ON_SS 1043
7327
7328/**
7329 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
7330 *
7331 * Called when there is an ALPHA from UICC during Call Control.
7332 *
7333 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
7334 *
7335 */
7336#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
7337
7338/**
7339 * RIL_UNSOL_LCEDATA_RECV
7340 *
7341 * Called when there is an incoming Link Capacity Estimate (LCE) info report.
7342 *
7343 * "data" is the RIL_LceDataInfo structure.
7344 *
7345 */
7346#define RIL_UNSOL_LCEDATA_RECV 1045
7347
7348 /**
7349 * RIL_UNSOL_PCO_DATA
7350 *
7351 * Called when there is new Carrier PCO data received for a data call. Ideally
7352 * only new data will be forwarded, though this is not required. Multiple
7353 * boxes of carrier PCO data for a given call should result in a series of
7354 * RIL_UNSOL_PCO_DATA calls.
7355 *
7356 * "data" is the RIL_PCO_Data structure.
7357 *
7358 */
7359#define RIL_UNSOL_PCO_DATA 1046
7360
7361 /**
7362 * RIL_UNSOL_MODEM_RESTART
7363 *
7364 * Called when there is a modem reset.
7365 *
7366 * "reason" is "const char *" containing the reason for the reset. It
7367 * could be a crash signature if the restart was due to a crash or some
7368 * string such as "user-initiated restart" or "AT command initiated
7369 * restart" that explains the cause of the modem restart.
7370 *
7371 * When modem restarts, one of the following radio state transitions will happen
7372 * 1) RADIO_STATE_ON->RADIO_STATE_UNAVAILABLE->RADIO_STATE_ON or
7373 * 2) RADIO_STATE_OFF->RADIO_STATE_UNAVAILABLE->RADIO_STATE_OFF
7374 * This message can be sent either just before the RADIO_STATE changes to RADIO_STATE_UNAVAILABLE
7375 * or just after but should never be sent after the RADIO_STATE changes from UNAVAILABLE to
7376 * AVAILABLE(RADIO_STATE_ON/RADIO_STATE_OFF) again.
7377 *
7378 * It should NOT be sent after the RADIO_STATE changes to AVAILABLE after the
7379 * modem restart as that could be interpreted as a second modem reset by the
7380 * framework.
7381 */
7382#define RIL_UNSOL_MODEM_RESTART 1047
7383
7384/**
7385 * RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION
7386 *
7387 * Called when the modem needs Carrier specific information that will
7388 * be used to encrypt IMSI and IMPI.
7389 *
7390 * "data" is NULL
7391 *
7392 */
7393#define RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION 1048
7394
7395/**
7396 * RIL_UNSOL_NETWORK_SCAN_RESULT
7397 *
7398 * Returns incremental result for the network scan which is started by
7399 * RIL_REQUEST_START_NETWORK_SCAN, sent to report results, status, or errors.
7400 *
7401 * "data" is NULL
7402 * "response" is a const RIL_NetworkScanResult *
7403 */
7404#define RIL_UNSOL_NETWORK_SCAN_RESULT 1049
7405
7406/**
7407 * RIL_UNSOL_KEEPALIVE_STATUS
7408 *
7409 * "data" is NULL
7410 * "response" is a const RIL_KeepaliveStatus *
7411 */
7412#define RIL_UNSOL_KEEPALIVE_STATUS 1050
7413
7414/***********************************************************************/
7415
7416
7417#if defined(ANDROID_MULTI_SIM)
7418/**
7419 * RIL_Request Function pointer
7420 *
7421 * @param request is one of RIL_REQUEST_*
7422 * @param data is pointer to data defined for that RIL_REQUEST_*
7423 * data is owned by caller, and should not be modified or freed by callee
7424 * structures passed as data may contain pointers to non-contiguous memory
7425 * @param t should be used in subsequent call to RIL_onResponse
7426 * @param datalen is the length of "data" which is defined as other argument. It may or may
7427 * not be equal to sizeof(data). Refer to the documentation of individual structures
7428 * to find if pointers listed in the structure are contiguous and counted in the datalen
7429 * length or not.
7430 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
7431 *
7432 */
7433typedef void (*RIL_RequestFunc) (int request, void *data,
7434 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
7435
7436/**
7437 * This function should return the current radio state synchronously
7438 */
7439typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
7440
7441#else
7442/* Backward compatible */
7443
7444/**
7445 * RIL_Request Function pointer
7446 *
7447 * @param request is one of RIL_REQUEST_*
7448 * @param data is pointer to data defined for that RIL_REQUEST_*
7449 * data is owned by caller, and should not be modified or freed by callee
7450 * structures passed as data may contain pointers to non-contiguous memory
7451 * @param t should be used in subsequent call to RIL_onResponse
7452 * @param datalen is the length of "data" which is defined as other argument. It may or may
7453 * not be equal to sizeof(data). Refer to the documentation of individual structures
7454 * to find if pointers listed in the structure are contiguous and counted in the datalen
7455 * length or not.
7456 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
7457 *
7458 */
7459typedef void (*RIL_RequestFunc) (int request, void *data,
7460 size_t datalen, RIL_Token t);
7461
7462/**
7463 * This function should return the current radio state synchronously
7464 */
7465typedef RIL_RadioState (*RIL_RadioStateRequest)();
7466
7467#endif
7468
7469
7470/**
7471 * This function returns "1" if the specified RIL_REQUEST code is
7472 * supported and 0 if it is not
7473 *
7474 * @param requestCode is one of RIL_REQUEST codes
7475 */
7476
7477typedef int (*RIL_Supports)(int requestCode);
7478
7479/**
7480 * This function is called from a separate thread--not the
7481 * thread that calls RIL_RequestFunc--and indicates that a pending
7482 * request should be cancelled.
7483 *
7484 * On cancel, the callee should do its best to abandon the request and
7485 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
7486 *
7487 * Subsequent calls to RIL_onRequestComplete for this request with
7488 * other results will be tolerated but ignored. (That is, it is valid
7489 * to ignore the cancellation request)
7490 *
7491 * RIL_Cancel calls should return immediately, and not wait for cancellation
7492 *
7493 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
7494 * interface
7495 *
7496 * @param t token wants to be canceled
7497 */
7498
7499typedef void (*RIL_Cancel)(RIL_Token t);
7500
7501typedef void (*RIL_TimedCallback) (void *param);
7502
7503/**
7504 * Return a version string for your RIL implementation
7505 */
7506typedef const char * (*RIL_GetVersion) (void);
7507
7508typedef struct {
7509 int version; /* set to RIL_VERSION */
7510 RIL_RequestFunc onRequest;
7511 RIL_RadioStateRequest onStateRequest;
7512 RIL_Supports supports;
7513 RIL_Cancel onCancel;
7514 RIL_GetVersion getVersion;
7515} RIL_RadioFunctions;
7516
7517typedef struct {
7518 char *apn; /* the APN to connect to */
7519 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
7520 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/
7521 int authtype; /* authentication protocol used for this PDP context
7522 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */
7523 char *username; /* the username for APN, or NULL */
7524 char *password; /* the password for APN, or NULL */
7525} RIL_InitialAttachApn;
7526
7527typedef struct {
7528 char *apn; /* the APN to connect to */
7529 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
7530 home network. For example, "IP", "IPV6", "IPV4V6", or "PPP". */
7531 char *roamingProtocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
7532 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/
7533 int authtype; /* authentication protocol used for this PDP context
7534 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */
7535 char *username; /* the username for APN, or NULL */
7536 char *password; /* the password for APN, or NULL */
7537 int supportedTypesBitmask; /* supported APN types bitmask. See RIL_ApnTypes for the value of
7538 each bit. */
7539 int bearerBitmask; /* the bearer bitmask. See RIL_RadioAccessFamily for the value of
7540 each bit. */
7541 int modemCognitive; /* indicating the APN setting was sent to the modem through
7542 setDataProfile earlier. */
7543 int mtu; /* maximum transmission unit (MTU) size in bytes */
7544 char *mvnoType; /* the MVNO type: possible values are "imsi", "gid", "spn" */
7545 char *mvnoMatchData; /* MVNO match data. Can be anything defined by the carrier.
7546 For example,
7547 SPN like: "A MOBILE", "BEN NL", etc...
7548 IMSI like: "302720x94", "2060188", etc...
7549 GID like: "4E", "33", etc... */
7550} RIL_InitialAttachApn_v15;
7551
7552typedef struct {
7553 int authContext; /* P2 value of authentication command, see P2 parameter in
7554 3GPP TS 31.102 7.1.2 */
7555 char *authData; /* the challenge string in Base64 format, see 3GPP
7556 TS 31.102 7.1.2 */
7557 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
7558 NULL if no value. */
7559} RIL_SimAuthentication;
7560
7561typedef struct {
7562 int cid; /* Context ID, uniquely identifies this call */
7563 char *bearer_proto; /* One of the PDP_type values in TS 27.007 section 10.1.1.
7564 For example, "IP", "IPV6", "IPV4V6". */
7565 int pco_id; /* The protocol ID for this box. Note that only IDs from
7566 FF00H - FFFFH are accepted. If more than one is included
7567 from the network, multiple calls should be made to send all
7568 of them. */
7569 int contents_length; /* The number of octets in the contents. */
7570 char *contents; /* Carrier-defined content. It is binary, opaque and
7571 loosely defined in LTE Layer 3 spec 24.008 */
7572} RIL_PCO_Data;
7573
7574typedef enum {
7575 NATT_IPV4 = 0, /* Keepalive specified by RFC 3948 Sec. 2.3 using IPv4 */
7576 NATT_IPV6 = 1 /* Keepalive specified by RFC 3948 Sec. 2.3 using IPv6 */
7577} RIL_KeepaliveType;
7578
7579#define MAX_INADDR_LEN 16
7580typedef struct {
7581 RIL_KeepaliveType type; /* Type of keepalive packet */
7582 char sourceAddress[MAX_INADDR_LEN]; /* Source address in network-byte order */
7583 int sourcePort; /* Source port if applicable, or 0x7FFFFFFF;
7584 the maximum value is 65535 */
7585 char destinationAddress[MAX_INADDR_LEN]; /* Destination address in network-byte order */
7586 int destinationPort; /* Destination port if applicable or 0x7FFFFFFF;
7587 the maximum value is 65535 */
7588 int maxKeepaliveIntervalMillis; /* Maximum milliseconds between two packets */
7589 int cid; /* Context ID, uniquely identifies this call */
7590} RIL_KeepaliveRequest;
7591
7592typedef enum {
7593 KEEPALIVE_ACTIVE, /* Keepalive session is active */
7594 KEEPALIVE_INACTIVE, /* Keepalive session is inactive */
7595 KEEPALIVE_PENDING /* Keepalive session status not available */
7596} RIL_KeepaliveStatusCode;
7597
7598typedef struct {
7599 uint32_t sessionHandle;
7600 RIL_KeepaliveStatusCode code;
7601} RIL_KeepaliveStatus;
7602
7603#ifdef RIL_SHLIB
7604struct RIL_Env {
7605 /**
7606 * "t" is parameter passed in on previous call to RIL_Notification
7607 * routine.
7608 *
7609 * If "e" != SUCCESS, then response can be null/is ignored
7610 *
7611 * "response" is owned by caller, and should not be modified or
7612 * freed by callee
7613 *
7614 * RIL_onRequestComplete will return as soon as possible
7615 */
7616 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
7617 void *response, size_t responselen);
7618
7619#if defined(ANDROID_MULTI_SIM)
7620 /**
7621 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
7622 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
7623 *
7624 * "data" is owned by caller, and should not be modified or freed by callee
7625 */
7626 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
7627#else
7628 /**
7629 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
7630 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
7631 *
7632 * "data" is owned by caller, and should not be modified or freed by callee
7633 */
7634 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
7635#endif
7636 /**
7637 * Call user-specifed "callback" function on on the same thread that
7638 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
7639 * a relative time value at which the callback is invoked. If relativeTime is
7640 * NULL or points to a 0-filled structure, the callback will be invoked as
7641 * soon as possible
7642 */
7643
7644 void (*RequestTimedCallback) (RIL_TimedCallback callback,
7645 void *param, const struct timeval *relativeTime);
7646 /**
7647 * "t" is parameter passed in on previous call RIL_Notification routine
7648 *
7649 * RIL_onRequestAck will be called by vendor when an Async RIL request was received
7650 * by them and an ack needs to be sent back to java ril.
7651 */
7652 void (*OnRequestAck) (RIL_Token t);
7653};
7654
7655
7656/**
7657 * RIL implementations must defined RIL_Init
7658 * argc and argv will be command line arguments intended for the RIL implementation
7659 * Return NULL on error
7660 *
7661 * @param env is environment point defined as RIL_Env
7662 * @param argc number of arguments
7663 * @param argv list fo arguments
7664 *
7665 */
7666const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
7667
7668/**
7669 * If BT SAP(SIM Access Profile) is supported, then RIL implementations must define RIL_SAP_Init
7670 * for initializing RIL_RadioFunctions used for BT SAP communcations. It is called whenever RILD
7671 * starts or modem restarts. Returns handlers for SAP related request that are made on SAP
7672 * sepecific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init
7673 * and used on the general RIL socket.
7674 * argc and argv will be command line arguments intended for the RIL implementation
7675 * Return NULL on error.
7676 *
7677 * @param env is environment point defined as RIL_Env
7678 * @param argc number of arguments
7679 * @param argv list fo arguments
7680 *
7681 */
7682const RIL_RadioFunctions *RIL_SAP_Init(const struct RIL_Env *env, int argc, char **argv);
7683
7684#else /* RIL_SHLIB */
7685
7686/**
7687 * Call this once at startup to register notification routine
7688 *
7689 * @param callbacks user-specifed callback function
7690 */
7691void RIL_register (const RIL_RadioFunctions *callbacks);
7692
7693void rilc_thread_pool();
7694
7695
7696/**
7697 *
7698 * RIL_onRequestComplete will return as soon as possible
7699 *
7700 * @param t is parameter passed in on previous call to RIL_Notification
7701 * routine.
7702 * @param e error code
7703 * if "e" != SUCCESS, then response can be null/is ignored
7704 * @param response is owned by caller, and should not be modified or
7705 * freed by callee
7706 * @param responselen the length of response in byte
7707 */
7708void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
7709 void *response, size_t responselen);
7710
7711/**
7712 * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and
7713 * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's
7714 * results, just that the command was received and will take a while. After sending this Ack
7715 * its vendor's responsibility to make sure that AP is up whenever needed while command is
7716 * being processed.
7717 *
7718 * @param t is parameter passed in on previous call to RIL_Notification
7719 * routine.
7720 */
7721void RIL_onRequestAck(RIL_Token t);
7722
7723#if defined(ANDROID_MULTI_SIM)
7724/**
7725 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
7726 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
7727 * "data" is owned by caller, and should not be modified or freed by callee
7728 * @param datalen the length of data in byte
7729 */
7730
7731void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
7732 size_t datalen, RIL_SOCKET_ID socket_id);
7733#else
7734/**
7735 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
7736 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
7737 * "data" is owned by caller, and should not be modified or freed by callee
7738 * @param datalen the length of data in byte
7739 */
7740
7741void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
7742 size_t datalen);
7743#endif
7744
7745/**
7746 * Call user-specifed "callback" function on on the same thread that
7747 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
7748 * a relative time value at which the callback is invoked. If relativeTime is
7749 * NULL or points to a 0-filled structure, the callback will be invoked as
7750 * soon as possible
7751 *
7752 * @param callback user-specifed callback function
7753 * @param param parameter list
7754 * @param relativeTime a relative time value at which the callback is invoked
7755 */
7756
7757void RIL_requestTimedCallback (RIL_TimedCallback callback,
7758 void *param, const struct timeval *relativeTime);
7759
7760#endif /* RIL_SHLIB */
7761
7762#ifdef __cplusplus
7763}
7764#endif
7765
7766#endif /*ANDROID_RIL_H*/