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