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