blob: 31126ef1a477018f419c47600425583ca20939ca [file] [log] [blame]
The Android Open Source Project00f06fc2009-03-03 19:32:15 -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
Wink Saville7f856802009-06-09 10:23:37 -070017#ifndef ANDROID_RIL_H
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080018#define ANDROID_RIL_H 1
19
20#include <stdlib.h>
Wink Saville8a9e0212013-04-09 12:11:38 -070021#include <stdint.h>
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -070022#include <telephony/ril_cdma_sms.h>
Jake Hamby8a4a2332014-01-15 13:12:05 -080023#include <telephony/ril_nv_items.h>
Etan Cohend3652192014-06-20 08:28:44 -070024#include <telephony/ril_msim.h>
Jake Hamby8a4a2332014-01-15 13:12:05 -080025
Wink Savillef4c4d362009-04-02 01:37:03 -070026#ifndef FEATURE_UNIT_TEST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080027#include <sys/time.h>
Wink Savillef4c4d362009-04-02 01:37:03 -070028#endif /* !FEATURE_UNIT_TEST */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080029
30#ifdef __cplusplus
31extern "C" {
32#endif
33
Amit Mahajan93f603c2017-05-15 16:41:44 -070034#ifndef SIM_COUNT
Etan Cohend3652192014-06-20 08:28:44 -070035#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
Amit Mahajan93f603c2017-05-15 16:41:44 -070048#endif
Etan Cohend3652192014-06-20 08:28:44 -070049
Sanket Padawe88cf6a52016-01-11 12:45:43 -080050/*
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
Sanket Padawef53c5fa2016-01-27 10:00:38 -080061 * RIL_VERSION = 12 : This version corresponds to updated data structures namely
Sanket Padawe88cf6a52016-01-11 12:45:43 -080062 * RIL_Data_Call_Response_v11, RIL_SIM_IO_v6, RIL_CardStatus_v6,
63 * RIL_SimRefreshResponse_v7, RIL_CDMA_CallWaiting_v6,
Sanket Padawe6ff9a872016-01-27 15:09:12 -080064 * 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.
Sanket Padawe88cf6a52016-01-11 12:45:43 -080067 *
Sanket Padawe6ff9a872016-01-27 15:09:12 -080068 * RIL_VERSION = 13 : This version includes new wakelock semantics and as the first
Robert Greenwalt27e99c52016-06-01 16:31:38 -070069 * strongly versioned version it enforces structure use.
Jack Yude8c8552017-01-24 12:03:52 -080070 *
Robert Greenwalt27e99c52016-06-01 16:31:38 -070071 * 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,
Naveen Kalla90ddf072016-09-14 13:41:04 -070074 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS and RIL_UNSOL_PCO_DATA.
Wileen Chiu35380a32017-01-04 11:37:19 -080075 *
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,
pkanwarc61837e2017-03-17 12:49:34 -070080 * RIL_REQUEST_SET_SIM_CARD_POWER,
81 * RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION,
82 * RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION
Jack Yude8c8552017-01-24 12:03:52 -080083 * The new parameters for RIL_REQUEST_SETUP_DATA_CALL,
84 * Updated data structures: RIL_DataProfileInfo_v15, RIL_InitialAttachApn_v15
Sooraj Sasindranf4714b72016-11-30 18:36:03 -080085 * 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.
Wileen Chiud6222e02015-11-23 14:25:22 -080089 * New data structure RIL_OpenChannelParams.
yinxu7317bd42017-05-03 15:15:19 -070090 * RIL_REQUEST_START_NETWORK_SCAN
91 * RIL_REQUEST_STOP_NETWORK_SCAN
92 * RIL_UNSOL_NETWORK_SCAN_RESULT
Sanket Padawe88cf6a52016-01-11 12:45:43 -080093 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -080094#define RIL_VERSION 12
95#define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
Alex Yakavenka45e740e2012-01-31 11:48:27 -080096#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080097
Wink Savillea592eeb2009-05-22 13:26:36 -070098#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
99#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
100
Etan Cohend3652192014-06-20 08:28:44 -0700101#define MAX_RILDS 3
Amit Mahajan35e93102017-03-28 11:17:55 -0700102#define MAX_SERVICE_NAME_LENGTH 6
Etan Cohend3652192014-06-20 08:28:44 -0700103#define MAX_CLIENT_ID_LENGTH 2
104#define MAX_DEBUG_SOCKET_NAME_LENGTH 12
105#define MAX_QEMU_PIPE_NAME_LENGTH 11
Wink Saville8b4e4f72014-10-17 15:01:45 -0700106#define MAX_UUID_LENGTH 64
yinxu7317bd42017-05-03 15:15:19 -0700107#define MAX_BANDS 8
108#define MAX_CHANNELS 32
109#define MAX_RADIO_ACCESS_NETWORKS 8
Wink Saville8b4e4f72014-10-17 15:01:45 -0700110
Etan Cohend3652192014-06-20 08:28:44 -0700111
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800112typedef void * RIL_Token;
113
114typedef enum {
Etan Cohend3652192014-06-20 08:28:44 -0700115 RIL_SOCKET_1,
116#if (SIM_COUNT >= 2)
117 RIL_SOCKET_2,
118#if (SIM_COUNT >= 3)
119 RIL_SOCKET_3,
120#endif
121#if (SIM_COUNT >= 4)
122 RIL_SOCKET_4,
123#endif
124#endif
125 RIL_SOCKET_NUM
126} RIL_SOCKET_ID;
127
128
129typedef enum {
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800130 RIL_E_SUCCESS = 0,
131 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
132 RIL_E_GENERIC_FAILURE = 2,
133 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
134 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
135 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
136 RIL_E_REQUEST_NOT_SUPPORTED = 6,
137 RIL_E_CANCELLED = 7,
138 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
139 call on a Class C GPRS device */
140 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
141 registers in network */
Wink Saville3d54e742009-05-18 18:00:44 -0700142 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
143 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
144 shall be retrieved because of SIM or RUIM
Wink Savillef4c4d362009-04-02 01:37:03 -0700145 card absent */
Wink Saville3d54e742009-05-18 18:00:44 -0700146 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
Wink Savillef4c4d362009-04-02 01:37:03 -0700147 location */
jsh602f80f2009-07-10 15:44:37 -0700148 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
John Wang75534472010-04-20 15:11:42 -0700149 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800150 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
John Wang75534472010-04-20 15:11:42 -0700151 illegal SIM or ME */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800152 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
Amit Mahajan54563d32014-11-22 00:54:49 +0000153 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
154 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
155 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
156 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
157 data */
158 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
159 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
160 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
161 request */
162 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
163 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
164 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
fengluf7408292015-04-14 14:53:55 -0700165 RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800166 RIL_E_LCE_NOT_SUPPORTED = 36, /* LCE service not supported(36 in RILConstants.java) */
167 RIL_E_NO_MEMORY = 37, /* Not sufficient memory to process the request */
Jayachandran Cb0cba832017-03-13 19:17:18 -0700168 RIL_E_INTERNAL_ERR = 38, /* Modem hit unexpected error scenario while handling
169 this request */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800170 RIL_E_SYSTEM_ERR = 39, /* Hit platform or system error */
Jayachandran Cb0cba832017-03-13 19:17:18 -0700171 RIL_E_MODEM_ERR = 40, /* Vendor RIL got unexpected or incorrect response
172 from modem for this request */
Ajay Nambi10345892016-03-19 09:02:28 -0700173 RIL_E_INVALID_STATE = 41, /* Unexpected request for the current state */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800174 RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */
175 RIL_E_SIM_ERR = 43, /* Received error from SIM card */
176 RIL_E_INVALID_ARGUMENTS = 44, /* Received invalid arguments in request */
177 RIL_E_INVALID_SIM_STATE = 45, /* Can not process the request in current SIM state */
178 RIL_E_INVALID_MODEM_STATE = 46, /* Can not process the request in current Modem state */
179 RIL_E_INVALID_CALL_ID = 47, /* Received invalid call id in request */
180 RIL_E_NO_SMS_TO_ACK = 48, /* ACK received when there is no SMS to ack */
Nathan Haroldc97b2842016-02-02 12:04:35 -0800181 RIL_E_NETWORK_ERR = 49, /* Received error from network */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800182 RIL_E_REQUEST_RATE_LIMITED = 50, /* Operation denied due to overly-frequent requests */
twen.changdf7add02016-03-04 18:27:48 +0800183 RIL_E_SIM_BUSY = 51, /* SIM is busy */
184 RIL_E_SIM_FULL = 52, /* The target EF is full */
185 RIL_E_NETWORK_REJECT = 53, /* Request is rejected by network */
186 RIL_E_OPERATION_NOT_ALLOWED = 54, /* Not allowed the request now */
187 RIL_E_EMPTY_RECORD = 55, /* The request record is empty */
Ajay Nambi68900f52016-03-11 12:02:55 -0800188 RIL_E_INVALID_SMS_FORMAT = 56, /* Invalid sms format */
189 RIL_E_ENCODING_ERR = 57, /* Message not encoded properly */
190 RIL_E_INVALID_SMSC_ADDRESS = 58, /* SMSC address specified is invalid */
191 RIL_E_NO_SUCH_ENTRY = 59, /* No such entry present to perform the request */
192 RIL_E_NETWORK_NOT_READY = 60, /* Network is not ready to perform the request */
193 RIL_E_NOT_PROVISIONED = 61, /* Device doesnot have this value provisioned */
Ajay Nambi10345892016-03-19 09:02:28 -0700194 RIL_E_NO_SUBSCRIPTION = 62, /* Device doesnot have subscription */
195 RIL_E_NO_NETWORK_FOUND = 63, /* Network cannot be found */
196 RIL_E_DEVICE_IN_USE = 64, /* Operation cannot be performed because the device
197 is currently in use */
198 RIL_E_ABORTED = 65, /* Operation aborted */
Sanket Padawe85f952a2017-01-02 23:46:00 -0800199 RIL_E_INVALID_RESPONSE = 66, /* Invalid response sent by vendor code */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800200 // OEM specific error codes. To be used by OEM when they don't want to reveal
201 // specific error codes which would be replaced by Generic failure.
202 RIL_E_OEM_ERROR_1 = 501,
203 RIL_E_OEM_ERROR_2 = 502,
204 RIL_E_OEM_ERROR_3 = 503,
205 RIL_E_OEM_ERROR_4 = 504,
206 RIL_E_OEM_ERROR_5 = 505,
207 RIL_E_OEM_ERROR_6 = 506,
208 RIL_E_OEM_ERROR_7 = 507,
209 RIL_E_OEM_ERROR_8 = 508,
210 RIL_E_OEM_ERROR_9 = 509,
211 RIL_E_OEM_ERROR_10 = 510,
212 RIL_E_OEM_ERROR_11 = 511,
213 RIL_E_OEM_ERROR_12 = 512,
214 RIL_E_OEM_ERROR_13 = 513,
215 RIL_E_OEM_ERROR_14 = 514,
216 RIL_E_OEM_ERROR_15 = 515,
217 RIL_E_OEM_ERROR_16 = 516,
218 RIL_E_OEM_ERROR_17 = 517,
219 RIL_E_OEM_ERROR_18 = 518,
220 RIL_E_OEM_ERROR_19 = 519,
221 RIL_E_OEM_ERROR_20 = 520,
222 RIL_E_OEM_ERROR_21 = 521,
223 RIL_E_OEM_ERROR_22 = 522,
224 RIL_E_OEM_ERROR_23 = 523,
225 RIL_E_OEM_ERROR_24 = 524,
226 RIL_E_OEM_ERROR_25 = 525
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800227} RIL_Errno;
228
229typedef enum {
230 RIL_CALL_ACTIVE = 0,
231 RIL_CALL_HOLDING = 1,
232 RIL_CALL_DIALING = 2, /* MO call only */
233 RIL_CALL_ALERTING = 3, /* MO call only */
234 RIL_CALL_INCOMING = 4, /* MT call only */
235 RIL_CALL_WAITING = 5 /* MT call only */
236} RIL_CallState;
237
238typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -0700239 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
240 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800241 RADIO_STATE_ON = 10 /* Radio is on */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800242} RIL_RadioState;
243
Wink Saville43808972011-01-13 17:39:51 -0800244typedef enum {
245 RADIO_TECH_UNKNOWN = 0,
246 RADIO_TECH_GPRS = 1,
247 RADIO_TECH_EDGE = 2,
248 RADIO_TECH_UMTS = 3,
249 RADIO_TECH_IS95A = 4,
250 RADIO_TECH_IS95B = 5,
251 RADIO_TECH_1xRTT = 6,
252 RADIO_TECH_EVDO_0 = 7,
253 RADIO_TECH_EVDO_A = 8,
254 RADIO_TECH_HSDPA = 9,
255 RADIO_TECH_HSUPA = 10,
256 RADIO_TECH_HSPA = 11,
257 RADIO_TECH_EVDO_B = 12,
258 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800259 RADIO_TECH_LTE = 14,
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800260 RADIO_TECH_HSPAP = 15, // HSPA+
Etan Cohend3652192014-06-20 08:28:44 -0700261 RADIO_TECH_GSM = 16, // Only supports voice
Yashdev Singh3c8f37c2015-02-23 13:04:28 -0800262 RADIO_TECH_TD_SCDMA = 17,
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700263 RADIO_TECH_IWLAN = 18,
264 RADIO_TECH_LTE_CA = 19
Wink Saville43808972011-01-13 17:39:51 -0800265} RIL_RadioTechnology;
266
Wink Saville8b4e4f72014-10-17 15:01:45 -0700267typedef enum {
268 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
269 RAF_GPRS = (1 << RADIO_TECH_GPRS),
270 RAF_EDGE = (1 << RADIO_TECH_EDGE),
271 RAF_UMTS = (1 << RADIO_TECH_UMTS),
272 RAF_IS95A = (1 << RADIO_TECH_IS95A),
273 RAF_IS95B = (1 << RADIO_TECH_IS95B),
274 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
275 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
276 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
277 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
278 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
279 RAF_HSPA = (1 << RADIO_TECH_HSPA),
280 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
281 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
282 RAF_LTE = (1 << RADIO_TECH_LTE),
283 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
284 RAF_GSM = (1 << RADIO_TECH_GSM),
285 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700286 RAF_LTE_CA = (1 << RADIO_TECH_LTE_CA)
Wink Saville8b4e4f72014-10-17 15:01:45 -0700287} RIL_RadioAccessFamily;
288
289typedef enum {
Nathan Harold92839f12016-02-12 10:02:28 -0800290 BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically)
291 BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
292 BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
293 BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000)
294 BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
295 BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
296 BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band)
297 BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band)
298 BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band)
299 BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band)
300 BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band)
301 BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band)
302 BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band)
303 BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band)
304 BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band)
305 BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band)
306 BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band)
307 BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band)
308 BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band)
309} RIL_RadioBandMode;
310
311typedef enum {
Wink Saville8b4e4f72014-10-17 15:01:45 -0700312 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
313 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
314 // forthcoming with these same parameters
315 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
316 // RIL_RadioCapability.status = 0, if any START's fail no
317 // APPLY will be sent
318 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
319 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
320 // occurs in any previous command the RIL_RadioAccessesFamily and
Legler Wu8caf06f2014-10-29 14:02:14 +0800321 // logicalModemUuid fields will be the prior configuration thus
Wink Saville8b4e4f72014-10-17 15:01:45 -0700322 // restoring the configuration to the previous value. An error
323 // returned by this command will generally be ignored or may
324 // cause that logical modem to be removed from service.
325} RadioCapabilityPhase;
326
327typedef enum {
328 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
329 // RC_PHASE_APPLY
330 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
331 // capability was success with RC_PHASE_FINISH
332 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
333 // capability is fail with RC_PHASE_FINISH.
334} RadioCapabilityStatus;
335
336#define RIL_RADIO_CAPABILITY_VERSION 1
337typedef struct {
Legler Wu8caf06f2014-10-29 14:02:14 +0800338 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
Wink Saville8b4e4f72014-10-17 15:01:45 -0700339 int session; // Unique session value defined by framework returned in all "responses/unsol"
340 int phase; // CONFIGURED, START, APPLY, FINISH
341 int rat; // RIL_RadioAccessFamily for the radio
342 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
343 int status; // Return status and an input parameter for RC_PHASE_FINISH
344} RIL_RadioCapability;
345
Wink Savillec0114b32011-02-18 10:14:07 -0800346// Do we want to split Data from Voice and the use
347// RIL_RadioTechnology for get/setPreferredVoice/Data ?
348typedef enum {
349 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
350 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
351 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
352 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
353 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
354 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
355 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
356 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
357 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
358 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
359 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
Uma Maheswari Ramalingam0e094872011-09-28 13:25:48 -0700360 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
Rakesh Pallerla8c20ebe2015-03-31 14:52:49 -0700361 PREF_NET_TYPE_LTE_WCDMA = 12, /* LTE/WCDMA */
362 PREF_NET_TYPE_TD_SCDMA_ONLY = 13, /* TD-SCDMA only */
363 PREF_NET_TYPE_TD_SCDMA_WCDMA = 14, /* TD-SCDMA and WCDMA */
364 PREF_NET_TYPE_TD_SCDMA_LTE = 15, /* TD-SCDMA and LTE */
365 PREF_NET_TYPE_TD_SCDMA_GSM = 16, /* TD-SCDMA and GSM */
366 PREF_NET_TYPE_TD_SCDMA_GSM_LTE = 17, /* TD-SCDMA,GSM and LTE */
367 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA = 18, /* TD-SCDMA, GSM/WCDMA */
368 PREF_NET_TYPE_TD_SCDMA_WCDMA_LTE = 19, /* TD-SCDMA, WCDMA and LTE */
369 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_LTE = 20, /* TD-SCDMA, GSM/WCDMA and LTE */
370 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_CDMA_EVDO_AUTO = 21, /* TD-SCDMA, GSM/WCDMA, CDMA and EvDo */
371 PREF_NET_TYPE_TD_SCDMA_LTE_CDMA_EVDO_GSM_WCDMA = 22 /* TD-SCDMA, LTE, CDMA, EvDo GSM/WCDMA */
Wink Savillec0114b32011-02-18 10:14:07 -0800372} RIL_PreferredNetworkType;
373
374/* Source for cdma subscription */
375typedef enum {
376 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
377 CDMA_SUBSCRIPTION_SOURCE_NV = 1
378} RIL_CdmaSubscriptionSource;
379
Wink Saville74fa3882009-12-22 15:35:41 -0800380/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
381typedef enum {
382 RIL_UUS_TYPE1_IMPLICIT = 0,
383 RIL_UUS_TYPE1_REQUIRED = 1,
384 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
385 RIL_UUS_TYPE2_REQUIRED = 3,
386 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
387 RIL_UUS_TYPE3_REQUIRED = 5,
388 RIL_UUS_TYPE3_NOT_REQUIRED = 6
389} RIL_UUS_Type;
390
391/* User-to-User Signaling Information data coding schemes. Possible values for
392 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
393 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
394typedef enum {
395 RIL_UUS_DCS_USP = 0, /* User specified protocol */
396 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
397 RIL_UUS_DCS_X244 = 2, /* X.244 */
398 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
399 convergence function */
400 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
401} RIL_UUS_DCS;
402
403/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
404 * This data is passed in RIL_ExtensionRecord and rec contains this
405 * structure when type is RIL_UUS_INFO_EXT_REC */
406typedef struct {
407 RIL_UUS_Type uusType; /* UUS Type */
408 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
409 int uusLength; /* Length of UUS Data */
410 char * uusData; /* UUS Data */
411} RIL_UUS_Info;
412
413/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700414typedef struct {
415 char isPresent; /* non-zero if signal information record is present */
416 char signalType; /* as defined 3.7.5.5-1 */
417 char alertPitch; /* as defined 3.7.5.5-2 */
418 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
419} RIL_CDMA_SignalInfoRecord;
420
Wink Saville1b5fd232009-04-22 14:50:00 -0700421typedef struct {
422 RIL_CallState state;
423 int index; /* Connection Index for use with, eg, AT+CHLD */
424 int toa; /* type of address, eg 145 = intl */
425 char isMpty; /* nonzero if is mpty call */
426 char isMT; /* nonzero if call is mobile terminated */
427 char als; /* ALS line indicator if available
428 (0 = line 1) */
429 char isVoice; /* nonzero if this is is a voice call */
430 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
431 char * number; /* Remote party number */
432 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
433 char * name; /* Remote party name */
434 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800435 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800436} RIL_Call;
437
Wink Savillec0114b32011-02-18 10:14:07 -0800438/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800439typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800440 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700441 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700442 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
443 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800444 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800445 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
446} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800447
448/*
449 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
450 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
451 */
452typedef struct {
453 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500454 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
455 back-off timer value RIL wants to override the one
456 pre-configured in FW.
457 The unit is miliseconds.
458 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700459 The value 0 means retry should be done ASAP.
Wink Saville8a9e0212013-04-09 12:11:38 -0700460 The value of INT_MAX(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800461 int cid; /* Context ID, uniquely identifies this call */
462 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
463 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
464 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
465 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
466 such as "IP" or "IPV6" */
467 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800468 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
469 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800470 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800471 one of each. If the prefix length is absent the addresses
472 are assumed to be point to point with IPv4 having a prefix
473 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800474 char * dnses; /* A space-delimited list of DNS server addresses,
475 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
476 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800477 char * gateways; /* A space-delimited list of default gateway addresses,
478 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
479 May be empty in which case the addresses represent point
480 to point connections. */
481} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800482
Etan Cohend3652192014-06-20 08:28:44 -0700483typedef struct {
484 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
485 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
486 back-off timer value RIL wants to override the one
487 pre-configured in FW.
488 The unit is miliseconds.
489 The value < 0 means no value is suggested.
490 The value 0 means retry should be done ASAP.
491 The value of INT_MAX(0x7fffffff) means no retry. */
492 int cid; /* Context ID, uniquely identifies this call */
493 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
494 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
495 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
496 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
497 such as "IP" or "IPV6" */
498 char * ifname; /* The network interface name */
499 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
500 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
501 May not be empty, typically 1 IPv4 or 1 IPv6 or
502 one of each. If the prefix length is absent the addresses
503 are assumed to be point to point with IPv4 having a prefix
504 length of 32 and IPv6 128. */
505 char * dnses; /* A space-delimited list of DNS server addresses,
506 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
507 May be empty. */
508 char * gateways; /* A space-delimited list of default gateway addresses,
509 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
510 May be empty in which case the addresses represent point
511 to point connections. */
512 char * pcscf; /* the Proxy Call State Control Function address
513 via PCO(Protocol Configuration Option) for IMS client. */
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -0700514} RIL_Data_Call_Response_v9;
515
516typedef struct {
517 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
518 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
519 back-off timer value RIL wants to override the one
520 pre-configured in FW.
521 The unit is miliseconds.
522 The value < 0 means no value is suggested.
523 The value 0 means retry should be done ASAP.
524 The value of INT_MAX(0x7fffffff) means no retry. */
525 int cid; /* Context ID, uniquely identifies this call */
526 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
527 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
528 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
529 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
530 such as "IP" or "IPV6" */
531 char * ifname; /* The network interface name */
532 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
533 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
534 May not be empty, typically 1 IPv4 or 1 IPv6 or
535 one of each. If the prefix length is absent the addresses
536 are assumed to be point to point with IPv4 having a prefix
537 length of 32 and IPv6 128. */
538 char * dnses; /* A space-delimited list of DNS server addresses,
539 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
540 May be empty. */
541 char * gateways; /* A space-delimited list of default gateway addresses,
542 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
543 May be empty in which case the addresses represent point
544 to point connections. */
545 char * pcscf; /* the Proxy Call State Control Function address
546 via PCO(Protocol Configuration Option) for IMS client. */
547 int mtu; /* MTU received from network
548 Value <= 0 means network has either not sent a value or
549 sent an invalid value */
550} RIL_Data_Call_Response_v11;
Etan Cohend3652192014-06-20 08:28:44 -0700551
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700552typedef enum {
553 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
554 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
555} RIL_RadioTechnologyFamily;
556
557typedef struct {
558 RIL_RadioTechnologyFamily tech;
559 unsigned char retry; /* 0 == not retry, nonzero == retry */
560 int messageRef; /* Valid field if retry is set to nonzero.
561 Contains messageRef from RIL_SMS_Response
562 corresponding to failed MO SMS.
563 */
564
565 union {
566 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
567 RIL_CDMA_SMS_Message* cdmaMessage;
568
569 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
Sanket Padawe05c23072016-08-08 15:42:17 -0700570 char** gsmMessage; /* This is an array of pointers where pointers
571 are contiguous but elements pointed by those pointers
572 are not contiguous
573 */
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700574 } message;
575} RIL_IMS_SMS_Message;
576
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800577typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800578 int messageRef; /* TP-Message-Reference for GSM,
579 and BearerData MessageId for CDMA
580 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800581 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700582 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
583 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
584 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800585} RIL_SMS_Response;
586
587/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
588typedef struct {
589 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
590 /* 0 = "REC UNREAD" */
591 /* 1 = "REC READ" */
592 /* 2 = "STO UNSENT" */
593 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700594 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
595 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800596 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
597 (as expected by TS 27.005) or NULL for default SMSC */
598} RIL_SMS_WriteArgs;
599
600/** Used by RIL_REQUEST_DIAL */
601typedef struct {
602 char * address;
603 int clir;
604 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
605 * clir == 0 on "use subscription default value"
606 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
607 * clir == 2 on "CLIR suppression" (allow CLI presentation)
608 */
Wink Saville74fa3882009-12-22 15:35:41 -0800609 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800610} RIL_Dial;
611
612typedef struct {
613 int command; /* one of the commands listed for TS 27.007 +CRSM*/
614 int fileid; /* EF id */
615 char *path; /* "pathid" from TS 27.007 +CRSM command.
616 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700617 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800618 */
619 int p1;
620 int p2;
621 int p3;
622 char *data; /* May be NULL*/
623 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800624} RIL_SIM_IO_v5;
625
626typedef struct {
627 int command; /* one of the commands listed for TS 27.007 +CRSM*/
628 int fileid; /* EF id */
629 char *path; /* "pathid" from TS 27.007 +CRSM command.
630 Path is in hex asciii format eg "7f205f70"
631 Path must always be provided.
632 */
633 int p1;
634 int p2;
635 int p3;
636 char *data; /* May be NULL*/
637 char *pin2; /* May be NULL*/
638 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
639} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800640
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800641/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
642 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
643typedef struct {
644 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
645 ignored for +CSIM command. */
646
647 /* Following fields are used to derive the APDU ("command" and "length"
648 values in TS 27.007 +CSIM and +CGLA commands). */
649 int cla;
650 int instruction;
651 int p1;
652 int p2;
653 int p3; /* A negative P3 implies a 4 byte APDU. */
654 char *data; /* May be NULL. In hex string format. */
655} RIL_SIM_APDU;
656
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800657typedef struct {
658 int sw1;
659 int sw2;
Amit Mahajan2875bc22014-08-06 10:03:15 -0700660 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
661 response for which it is in Base64 format, see 3GPP TS 31.102 7.1.2 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800662} RIL_SIM_IO_Response;
663
664/* See also com.android.internal.telephony.gsm.CallForwardInfo */
665
666typedef struct {
667 int status; /*
668 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
669 * status 1 = active, 0 = not active
670 *
671 * For RIL_REQUEST_SET_CALL_FORWARD:
672 * status is:
673 * 0 = disable
674 * 1 = enable
675 * 2 = interrogate
676 * 3 = registeration
677 * 4 = erasure
678 */
679
Wink Saville3d54e742009-05-18 18:00:44 -0700680 int reason; /* from TS 27.007 7.11 "reason" */
681 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
682 See table for Android mapping from
683 MMI service code
684 0 means user doesn't input class */
685 int toa; /* "type" from TS 27.007 7.11 */
686 char * number; /* "number" from TS 27.007 7.11. May be NULL */
687 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800688}RIL_CallForwardInfo;
689
690typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700691 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
692 * Upper 16 bits is LAC and lower 16 bits
693 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800694 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700695 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700696 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800697 */
johnwange0ba6a92009-09-11 19:14:52 -0700698 int rssi; /* Received RSSI in GSM,
699 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800700 */
701} RIL_NeighboringCell;
702
fengluf7408292015-04-14 14:53:55 -0700703typedef struct {
704 char lce_status; /* LCE service status:
705 * -1 = not supported;
706 * 0 = stopped;
707 * 1 = active.
708 */
709 unsigned int actual_interval_ms; /* actual LCE reporting interval,
710 * meaningful only if LCEStatus = 1.
711 */
712} RIL_LceStatusInfo;
713
714typedef struct {
fenglu290add32015-05-01 17:05:15 -0700715 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
fengluf7408292015-04-14 14:53:55 -0700716 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
717 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
718 * moves to inactive state or network type change)
719 * 1 = suspended;
720 * 0 = not suspended.
721 */
722} RIL_LceDataInfo;
723
Meng Wangb4e34312016-05-12 14:54:36 -0700724typedef enum {
725 RIL_MATCH_ALL = 0, /* Apply to all carriers with the same mcc/mnc */
726 RIL_MATCH_SPN = 1, /* Use SPN and mcc/mnc to identify the carrier */
727 RIL_MATCH_IMSI_PREFIX = 2, /* Use IMSI prefix and mcc/mnc to identify the carrier */
728 RIL_MATCH_GID1 = 3, /* Use GID1 and mcc/mnc to identify the carrier */
729 RIL_MATCH_GID2 = 4, /* Use GID2 and mcc/mnc to identify the carrier */
730} RIL_CarrierMatchType;
731
732typedef struct {
733 const char * mcc;
734 const char * mnc;
735 RIL_CarrierMatchType match_type; /* Specify match type for the carrier.
736 * If it’s RIL_MATCH_ALL, match_data is null;
737 * otherwise, match_data is the value for the match type.
738 */
739 const char * match_data;
740} RIL_Carrier;
741
742typedef struct {
743 int32_t len_allowed_carriers; /* length of array allowed_carriers */
744 int32_t len_excluded_carriers; /* length of array excluded_carriers */
745 RIL_Carrier * allowed_carriers; /* whitelist for allowed carriers */
746 RIL_Carrier * excluded_carriers; /* blacklist for explicitly excluded carriers
747 * which match allowed_carriers. Eg. allowed_carriers match
748 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1
749 * is ABCD. It means except the carrier whose gid1 is ABCD,
750 * all carriers with the same mcc/mnc are allowed.
751 */
752} RIL_CarrierRestrictions;
753
pkanwarc61837e2017-03-17 12:49:34 -0700754typedef struct {
755 const uint8_t * carrierKey; /* Public Key from the Carrier used to encrypt the
756 * IMSI/IMPI.
757 */
758 const char * KeyIdentifier; /* The keyIdentifier Attribute value pair that helps
759 * a server locate the private key to decrypt the
760 * permanent identity.
761 */
762} RIL_CarrierInfoForImsiEncryption;
763
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800764/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
765typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700766 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800767 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
768 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
769 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800770 CALL_FAIL_NORMAL = 16,
771 CALL_FAIL_BUSY = 17,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800772 CALL_FAIL_NO_USER_RESPONDING = 18,
773 CALL_FAIL_NO_ANSWER_FROM_USER = 19,
774 CALL_FAIL_CALL_REJECTED = 21,
775 CALL_FAIL_NUMBER_CHANGED = 22,
776 CALL_FAIL_PREEMPTION = 25,
777 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
778 CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
779 CALL_FAIL_FACILITY_REJECTED = 29,
780 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
781 CALL_FAIL_NORMAL_UNSPECIFIED = 31,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800782 CALL_FAIL_CONGESTION = 34,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800783 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
784 CALL_FAIL_TEMPORARY_FAILURE = 41,
785 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
786 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
787 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
788 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
789 CALL_FAIL_QOS_UNAVAILABLE = 49,
790 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
791 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
792 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
793 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
794 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
795 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800796 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800797 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
798 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
799 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
800 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
801 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
802 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
803 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
804 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
805 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
806 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
807 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
808 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
809 CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
810 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
811 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
812 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
813 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800814 CALL_FAIL_CALL_BARRED = 240,
815 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700816 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
817 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Amit Mahajan54563d32014-11-22 00:54:49 +0000818 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
819 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
820 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
Jayachandran Ccc2a2022017-03-07 09:55:58 -0800821 CALL_FAIL_RADIO_OFF = 247, /* Radio is OFF */
822 CALL_FAIL_OUT_OF_SERVICE = 248, /* No cellular coverage */
823 CALL_FAIL_NO_VALID_SIM = 249, /* No valid SIM is present */
824 CALL_FAIL_RADIO_INTERNAL_ERROR = 250, /* Internal error at Modem */
825 CALL_FAIL_NETWORK_RESP_TIMEOUT = 251, /* No response from network */
826 CALL_FAIL_NETWORK_REJECT = 252, /* Explicit network reject */
827 CALL_FAIL_RADIO_ACCESS_FAILURE = 253, /* RRC connection failure. Eg.RACH */
828 CALL_FAIL_RADIO_LINK_FAILURE = 254, /* Radio Link Failure */
829 CALL_FAIL_RADIO_LINK_LOST = 255, /* Radio link lost due to poor coverage */
830 CALL_FAIL_RADIO_UPLINK_FAILURE = 256, /* Radio uplink failure */
831 CALL_FAIL_RADIO_SETUP_FAILURE = 257, /* RRC connection setup failure */
832 CALL_FAIL_RADIO_RELEASE_NORMAL = 258, /* RRC connection release, normal */
833 CALL_FAIL_RADIO_RELEASE_ABNORMAL = 259, /* RRC connection release, abnormal */
834 CALL_FAIL_ACCESS_CLASS_BLOCKED = 260, /* Access class barring */
835 CALL_FAIL_NETWORK_DETACH = 261, /* Explicit network detach */
Wink Saville1b5fd232009-04-22 14:50:00 -0700836 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
837 CALL_FAIL_CDMA_DROP = 1001,
838 CALL_FAIL_CDMA_INTERCEPT = 1002,
839 CALL_FAIL_CDMA_REORDER = 1003,
840 CALL_FAIL_CDMA_SO_REJECT = 1004,
841 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
842 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
843 CALL_FAIL_CDMA_PREEMPTED = 1007,
844 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
845 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700846 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
Jayachandran Ccc2a2022017-03-07 09:55:58 -0800847
848 /* OEM specific error codes. Used to distinguish error from
849 * CALL_FAIL_ERROR_UNSPECIFIED and help assist debugging */
850 CALL_FAIL_OEM_CAUSE_1 = 0xf001,
851 CALL_FAIL_OEM_CAUSE_2 = 0xf002,
852 CALL_FAIL_OEM_CAUSE_3 = 0xf003,
853 CALL_FAIL_OEM_CAUSE_4 = 0xf004,
854 CALL_FAIL_OEM_CAUSE_5 = 0xf005,
855 CALL_FAIL_OEM_CAUSE_6 = 0xf006,
856 CALL_FAIL_OEM_CAUSE_7 = 0xf007,
857 CALL_FAIL_OEM_CAUSE_8 = 0xf008,
858 CALL_FAIL_OEM_CAUSE_9 = 0xf009,
859 CALL_FAIL_OEM_CAUSE_10 = 0xf00a,
860 CALL_FAIL_OEM_CAUSE_11 = 0xf00b,
861 CALL_FAIL_OEM_CAUSE_12 = 0xf00c,
862 CALL_FAIL_OEM_CAUSE_13 = 0xf00d,
863 CALL_FAIL_OEM_CAUSE_14 = 0xf00e,
864 CALL_FAIL_OEM_CAUSE_15 = 0xf00f,
865
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800866 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
867 vendor code should make sure to map error
868 code to specific error */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800869} RIL_LastCallFailCause;
870
Chao Liu548a81e2015-05-14 16:13:46 -0700871typedef struct {
872 RIL_LastCallFailCause cause_code;
873 char * vendor_cause;
874} RIL_LastCallFailCauseInfo;
875
Wink Savillef4c4d362009-04-02 01:37:03 -0700876/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800877typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800878 PDP_FAIL_NONE = 0, /* No error, connection ok */
879
880 /* an integer cause code defined in TS 24.008
881 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
882 If the implementation does not have access to the exact cause codes,
883 then it should return one of the following values,
884 as the UI layer needs to distinguish these
885 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700886 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
Sanket Padaweac308b92016-01-07 14:41:17 -0800887 PDP_FAIL_NAS_SIGNALLING = 0x0E,
888 PDP_FAIL_LLC_SNDCP = 0x19,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700889 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
890 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
891 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
892 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
893 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
894 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
895 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
896 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
897 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800898 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
Hui Wang11e8b232014-09-19 16:40:17 -0500899 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
900 based on framework config */
Sanket Padaweac308b92016-01-07 14:41:17 -0800901 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
902 PDP_FAIL_NETWORK_FAILURE = 0x26,
903 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
904 PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
905 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
906 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
907 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
908 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
909 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
910 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
Wink Saville43808972011-01-13 17:39:51 -0800911 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
912 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
913 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Sanket Padaweac308b92016-01-07 14:41:17 -0800914 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
915 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
916 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
917 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
918 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
919 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
920 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
921 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
922 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
923 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
924 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
925 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
926 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
927 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
928 PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
929 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
930 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
931 PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
932 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
933 PDP_FAIL_IFACE_MISMATCH = 0x75,
934 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
935 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
936 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
937 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
938 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
Wink Saville43808972011-01-13 17:39:51 -0800939
Sanket Padawe0106aed2016-02-09 09:56:31 -0800940 // OEM specific error codes. To be used by OEMs when they don't want to
941 // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
942 PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001,
943 PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002,
944 PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003,
945 PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004,
946 PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005,
947 PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006,
948 PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007,
949 PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008,
950 PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009,
951 PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A,
952 PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B,
953 PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C,
954 PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D,
955 PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E,
956 PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F,
957
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700958 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800959 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
960 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800961
962 /* reasons for data call drop - network/modem disconnect */
Wink Saville3492c6e2013-10-03 13:53:27 -0700963 PDP_FAIL_SIGNAL_LOST = -3,
Wink Saville43808972011-01-13 17:39:51 -0800964 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
965 with parameters appropriate for new technology */
966 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
967 powered off - no retry */
968 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
969 mode was up on same APN/data profile - no retry until
970 tethered call is off */
971
Sanket Padaweac308b92016-01-07 14:41:17 -0800972 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
973 new error codes are added making this unnecessary */
Wink Saville43808972011-01-13 17:39:51 -0800974} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800975
jsh602f80f2009-07-10 15:44:37 -0700976/* See RIL_REQUEST_SETUP_DATA_CALL */
977typedef enum {
978 RIL_DATA_PROFILE_DEFAULT = 0,
979 RIL_DATA_PROFILE_TETHERED = 1,
Hui Wang8d679622014-10-16 14:59:27 -0500980 RIL_DATA_PROFILE_IMS = 2,
981 RIL_DATA_PROFILE_FOTA = 3,
982 RIL_DATA_PROFILE_CBS = 4,
983 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
984 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
jsh602f80f2009-07-10 15:44:37 -0700985} RIL_DataProfile;
986
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800987/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
988typedef struct {
989 int notificationType; /*
990 * 0 = MO intermediate result code
991 * 1 = MT unsolicited result code
992 */
993 int code; /* See 27.007 7.17
994 "code1" for MO
995 "code2" for MT. */
996 int index; /* CUG index. See 27.007 7.17. */
997 int type; /* "type" from 27.007 7.17 (MT only). */
998 char * number; /* "number" from 27.007 7.17
999 (MT only, may be NULL). */
1000} RIL_SuppSvcNotification;
1001
Wink Savillef4c4d362009-04-02 01:37:03 -07001002#define RIL_CARD_MAX_APPS 8
1003
1004typedef enum {
Meng Wangb4e34312016-05-12 14:54:36 -07001005 RIL_CARDSTATE_ABSENT = 0,
1006 RIL_CARDSTATE_PRESENT = 1,
1007 RIL_CARDSTATE_ERROR = 2,
1008 RIL_CARDSTATE_RESTRICTED = 3 /* card is present but not usable due to carrier restrictions.*/
Wink Savillef4c4d362009-04-02 01:37:03 -07001009} RIL_CardState;
1010
1011typedef enum {
1012 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
1013 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -07001014 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
1015 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -07001016 involved */
1017 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
1018 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
1019 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
1020 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
1021 RIL_PERSOSUBSTATE_SIM_SIM = 7,
1022 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
1023 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
1024 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
1025 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
1026 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
1027 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
1028 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
1029 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
1030 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
1031 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
1032 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
1033 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
1034 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
1035 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
1036 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
1037 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
1038 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
1039} RIL_PersoSubstate;
1040
1041typedef enum {
1042 RIL_APPSTATE_UNKNOWN = 0,
1043 RIL_APPSTATE_DETECTED = 1,
1044 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
1045 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -07001046 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -07001047 when app_state is assigned to this value */
1048 RIL_APPSTATE_READY = 5
1049} RIL_AppState;
1050
1051typedef enum {
1052 RIL_PINSTATE_UNKNOWN = 0,
1053 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
1054 RIL_PINSTATE_ENABLED_VERIFIED = 2,
1055 RIL_PINSTATE_DISABLED = 3,
1056 RIL_PINSTATE_ENABLED_BLOCKED = 4,
1057 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
1058} RIL_PinState;
1059
1060typedef enum {
1061 RIL_APPTYPE_UNKNOWN = 0,
1062 RIL_APPTYPE_SIM = 1,
1063 RIL_APPTYPE_USIM = 2,
1064 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -08001065 RIL_APPTYPE_CSIM = 4,
1066 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -07001067} RIL_AppType;
1068
Sooraj Sasindranf4714b72016-11-30 18:36:03 -08001069/*
1070 * Please note that registration state UNKNOWN is
1071 * treated as "out of service" in the Android telephony.
1072 * Registration state REG_DENIED must be returned if Location Update
1073 * Reject (with cause 17 - Network Failure) is received
1074 * repeatedly from the network, to facilitate
1075 * "managed roaming"
1076 */
1077typedef enum {
1078 RIL_NOT_REG_AND_NOT_SEARCHING = 0, // Not registered, MT is not currently searching
1079 // a new operator to register
1080 RIL_REG_HOME = 1, // Registered, home network
1081 RIL_NOT_REG_AND_SEARCHING = 2, // Not registered, but MT is currently searching
1082 // a new operator to register
1083 RIL_REG_DENIED = 3, // Registration denied
1084 RIL_UNKNOWN = 4, // Unknown
1085 RIL_REG_ROAMING = 5, // Registered, roaming
1086 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_NOT_SEARCHING = 10, // Same as
1087 // RIL_NOT_REG_AND_NOT_SEARCHING but indicates that
1088 // emergency calls are enabled.
1089 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_SEARCHING = 12, // Same as RIL_NOT_REG_AND_SEARCHING
1090 // but indicates that
1091 // emergency calls are enabled.
1092 RIL_REG_DENIED_AND_EMERGENCY_AVAILABLE = 13, // Same as REG_DENIED but indicates that
1093 // emergency calls are enabled.
1094 RIL_UNKNOWN_AND_EMERGENCY_AVAILABLE = 14, // Same as UNKNOWN but indicates that
1095 // emergency calls are enabled.
1096} RIL_RegState;
1097
Wink Savillef4c4d362009-04-02 01:37:03 -07001098typedef struct
1099{
Wink Saville7f856802009-06-09 10:23:37 -07001100 RIL_AppType app_type;
1101 RIL_AppState app_state;
1102 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -07001103 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -07001104 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -07001105 0x30, 0x30, 0x30 */
1106 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -08001107 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -07001108 RIL_PinState pin1;
1109 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -07001110} RIL_AppStatus;
1111
Wink Savillec0114b32011-02-18 10:14:07 -08001112/* Deprecated, use RIL_CardStatus_v6 */
1113typedef struct
1114{
1115 RIL_CardState card_state;
1116 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
1117 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1118 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1119 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1120 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
1121} RIL_CardStatus_v5;
1122
Wink Savillef4c4d362009-04-02 01:37:03 -07001123typedef struct
1124{
Wink Saville7f856802009-06-09 10:23:37 -07001125 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -07001126 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -08001127 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1128 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1129 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -07001130 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1131 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -08001132} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -07001133
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001134/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
1135 * or as part of RIL_SimRefreshResponse_v7
1136 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001137typedef enum {
1138 /* A file on SIM has been updated. data[1] contains the EFID. */
1139 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001140 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001141 SIM_INIT = 1,
1142 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
1143 SIM_RESET = 2
1144} RIL_SimRefreshResult;
1145
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001146typedef struct {
1147 RIL_SimRefreshResult result;
1148 int ef_id; /* is the EFID of the updated file if the result is */
1149 /* SIM_FILE_UPDATE or 0 for any other result. */
1150 char * aid; /* is AID(application ID) of the card application */
1151 /* See ETSI 102.221 8.1 and 101.220 4 */
1152 /* For SIM_FILE_UPDATE result it can be set to AID of */
1153 /* application in which updated EF resides or it can be */
1154 /* NULL if EF is outside of an application. */
1155 /* For SIM_INIT result this field is set to AID of */
1156 /* application that caused REFRESH */
1157 /* For SIM_RESET result it is NULL. */
1158} RIL_SimRefreshResponse_v7;
1159
Wink Savillec0114b32011-02-18 10:14:07 -08001160/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
1161typedef struct {
1162 char * number; /* Remote party number */
1163 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1164 char * name; /* Remote party name */
1165 RIL_CDMA_SignalInfoRecord signalInfoRecord;
1166} RIL_CDMA_CallWaiting_v5;
1167
Wink Saville1b5fd232009-04-22 14:50:00 -07001168typedef struct {
1169 char * number; /* Remote party number */
1170 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1171 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -07001172 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -08001173 /* Number type/Number plan required to support International Call Waiting */
1174 int number_type; /* 0=Unknown, 1=International, 2=National,
1175 3=Network specific, 4=subscriber */
1176 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
1177} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001178
Wink Savillea592eeb2009-05-22 13:26:36 -07001179/**
1180 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
1181 *
1182 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
1183 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
1184 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
1185 * CBM message ID.
1186 *
1187 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
1188 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
1189 * and 9.4.4.2.3 for UMTS.
1190 * All other values can be treated as empty CBM data coding scheme.
1191 *
1192 * selected 0 means message types specified in <fromServiceId, toServiceId>
1193 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
1194 *
1195 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
1196 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
1197 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001198typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -07001199 int fromServiceId;
1200 int toServiceId;
1201 int fromCodeScheme;
1202 int toCodeScheme;
1203 unsigned char selected;
1204} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -07001205
The Android Open Source Project34a51082009-03-05 14:34:37 -08001206/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
1207#define RIL_RESTRICTED_STATE_NONE 0x00
1208/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
1209#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
1210/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
1211#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -07001212/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -08001213#define RIL_RESTRICTED_STATE_CS_ALL 0x04
1214/* Block packet data access due to restriction. */
1215#define RIL_RESTRICTED_STATE_PS_ALL 0x10
1216
Wink Saville1b5fd232009-04-22 14:50:00 -07001217/* The status for an OTASP/OTAPA session */
1218typedef enum {
1219 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
1220 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
1221 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
1222 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
1223 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
1224 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
1225 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
1226 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
1227 CDMA_OTA_PROVISION_STATUS_COMMITTED,
1228 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
1229 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
1230 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
1231} RIL_CDMA_OTA_ProvisionStatus;
1232
1233typedef struct {
1234 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1235 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1236} RIL_GW_SignalStrength;
1237
Wink Savillec57b3eb2013-04-17 12:51:41 -07001238typedef struct {
1239 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1240 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001241 int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us.
1242 * INT_MAX denotes invalid value */
1243} RIL_GSM_SignalStrength_v12;
1244
1245typedef struct {
1246 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1247 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Wink Savillec57b3eb2013-04-17 12:51:41 -07001248} RIL_SignalStrengthWcdma;
Wink Saville1b5fd232009-04-22 14:50:00 -07001249
1250typedef struct {
1251 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1252 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1253 * value will be 75.
1254 */
1255 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1256 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1257 * will be 125.
1258 */
1259} RIL_CDMA_SignalStrength;
1260
1261
1262typedef struct {
1263 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1264 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1265 * value will be 75.
1266 */
1267 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1268 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1269 * will be 125.
1270 */
1271 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
1272} RIL_EVDO_SignalStrength;
1273
Wink Savillec0114b32011-02-18 10:14:07 -08001274typedef struct {
1275 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -07001276 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1277 * Range: 44 to 140 dBm
1278 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1279 * Reference: 3GPP TS 36.133 9.1.4 */
1280 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1281 * Range: 20 to 3 dB.
1282 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1283 * Reference: 3GPP TS 36.133 9.1.7 */
1284 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1285 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1286 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1287 * Reference: 3GPP TS 36.101 8.1.1 */
1288 int cqi; /* The current Channel Quality Indicator.
1289 * Range: 0 to 15.
1290 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1291 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -08001292} RIL_LTE_SignalStrength;
1293
Wink Saville8a9e0212013-04-09 12:11:38 -07001294typedef struct {
1295 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1296 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1297 * Range: 44 to 140 dBm
1298 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1299 * Reference: 3GPP TS 36.133 9.1.4 */
1300 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1301 * Range: 20 to 3 dB.
1302 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1303 * Reference: 3GPP TS 36.133 9.1.7 */
1304 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1305 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1306 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1307 * Reference: 3GPP TS 36.101 8.1.1 */
1308 int cqi; /* The current Channel Quality Indicator.
1309 * Range: 0 to 15.
1310 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1311 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1312 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
1313 * Approximate distance can be calculated using 300m/us * timingAdvance.
1314 * Range: 0 to 0x7FFFFFFE
1315 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1316 * Reference: 3GPP 36.321 section 6.1.3.5
1317 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1318} RIL_LTE_SignalStrength_v8;
1319
Etan Cohend3652192014-06-20 08:28:44 -07001320typedef struct {
1321 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
1322 * Range : 25 to 120
1323 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1324 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1325} RIL_TD_SCDMA_SignalStrength;
1326
Wink Savillec0114b32011-02-18 10:14:07 -08001327/* Deprecated, use RIL_SignalStrength_v6 */
1328typedef struct {
1329 RIL_GW_SignalStrength GW_SignalStrength;
1330 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1331 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1332} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -07001333
1334typedef struct {
1335 RIL_GW_SignalStrength GW_SignalStrength;
1336 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1337 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -08001338 RIL_LTE_SignalStrength LTE_SignalStrength;
1339} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001340
Wink Saville8a9e0212013-04-09 12:11:38 -07001341typedef struct {
1342 RIL_GW_SignalStrength GW_SignalStrength;
1343 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1344 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1345 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1346} RIL_SignalStrength_v8;
1347
Etan Cohend3652192014-06-20 08:28:44 -07001348typedef struct {
1349 RIL_GW_SignalStrength GW_SignalStrength;
1350 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1351 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1352 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1353 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1354} RIL_SignalStrength_v10;
1355
Wink Saville8a9e0212013-04-09 12:11:38 -07001356typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001357 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1358 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1359 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1360 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001361} RIL_CellIdentityGsm;
1362
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001363typedef struct {
1364 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1365 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1366 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1367 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
1368 int arfcn; /* 16-bit GSM Absolute RF channel number, INT_MAX if unknown */
Nathan Haroldf3769da2016-05-05 12:19:39 -07001369 uint8_t bsic;/* 6-bit Base Station Identity Code, 0xFF if unknown */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001370} RIL_CellIdentityGsm_v12;
1371
Wink Savillec57b3eb2013-04-17 12:51:41 -07001372typedef struct {
1373 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1374 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1375 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1376 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1377 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1378} RIL_CellIdentityWcdma;
1379
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001380typedef struct {
1381 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1382 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1383 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1384 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1385 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1386 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number, INT_MAX if unknown */
1387} RIL_CellIdentityWcdma_v12;
1388
Wink Saville8a9e0212013-04-09 12:11:38 -07001389typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001390 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1391 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1392 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001393 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1394 * It is represented in units of 0.25 seconds and ranges from -2592000
1395 * to 2592000, both values inclusive (corresponding to a range of -180
Wink Savillec57b3eb2013-04-17 12:51:41 -07001396 * to +180 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001397
1398 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1399 * It is represented in units of 0.25 seconds and ranges from -1296000
1400 * to 1296000, both values inclusive (corresponding to a range of -90
Wink Savillec57b3eb2013-04-17 12:51:41 -07001401 * to +90 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001402} RIL_CellIdentityCdma;
1403
Wink Saville8a9e0212013-04-09 12:11:38 -07001404typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001405 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1406 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1407 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1408 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1409 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001410} RIL_CellIdentityLte;
1411
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001412typedef struct {
1413 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1414 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1415 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1416 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1417 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1418 int earfcn; /* 18-bit LTE Absolute RC Channel Number, INT_MAX if unknown */
1419} RIL_CellIdentityLte_v12;
1420
Etan Cohend3652192014-06-20 08:28:44 -07001421typedef struct {
1422 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1423 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1424 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1425 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1426 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1427} RIL_CellIdentityTdscdma;
1428
Wink Saville8a9e0212013-04-09 12:11:38 -07001429typedef struct {
1430 RIL_CellIdentityGsm cellIdentityGsm;
1431 RIL_GW_SignalStrength signalStrengthGsm;
1432} RIL_CellInfoGsm;
1433
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001434typedef struct {
1435 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1436 RIL_GSM_SignalStrength_v12 signalStrengthGsm;
1437} RIL_CellInfoGsm_v12;
1438
Wink Savillec57b3eb2013-04-17 12:51:41 -07001439typedef struct {
1440 RIL_CellIdentityWcdma cellIdentityWcdma;
1441 RIL_SignalStrengthWcdma signalStrengthWcdma;
1442} RIL_CellInfoWcdma;
1443
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001444typedef struct {
1445 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1446 RIL_SignalStrengthWcdma signalStrengthWcdma;
1447} RIL_CellInfoWcdma_v12;
1448
Wink Saville8a9e0212013-04-09 12:11:38 -07001449typedef struct {
1450 RIL_CellIdentityCdma cellIdentityCdma;
1451 RIL_CDMA_SignalStrength signalStrengthCdma;
1452 RIL_EVDO_SignalStrength signalStrengthEvdo;
1453} RIL_CellInfoCdma;
1454
Wink Saville8a9e0212013-04-09 12:11:38 -07001455typedef struct {
1456 RIL_CellIdentityLte cellIdentityLte;
1457 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1458} RIL_CellInfoLte;
1459
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001460typedef struct {
1461 RIL_CellIdentityLte_v12 cellIdentityLte;
1462 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1463} RIL_CellInfoLte_v12;
1464
Etan Cohend3652192014-06-20 08:28:44 -07001465typedef struct {
1466 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1467 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1468} RIL_CellInfoTdscdma;
1469
Wink Saville8a9e0212013-04-09 12:11:38 -07001470// Must be the same as CellInfo.TYPE_XXX
1471typedef enum {
Sooraj Sasindranf4714b72016-11-30 18:36:03 -08001472 RIL_CELL_INFO_TYPE_NONE = 0, /* indicates no cell information */
Wink Saville8a9e0212013-04-09 12:11:38 -07001473 RIL_CELL_INFO_TYPE_GSM = 1,
1474 RIL_CELL_INFO_TYPE_CDMA = 2,
1475 RIL_CELL_INFO_TYPE_LTE = 3,
Wink Savillec57b3eb2013-04-17 12:51:41 -07001476 RIL_CELL_INFO_TYPE_WCDMA = 4,
Etan Cohend3652192014-06-20 08:28:44 -07001477 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
Wink Saville8a9e0212013-04-09 12:11:38 -07001478} RIL_CellInfoType;
1479
1480// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1481typedef enum {
1482 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1483 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1484 RIL_TIMESTAMP_TYPE_MODEM = 2,
1485 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1486 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1487} RIL_TimeStampType;
1488
1489typedef struct {
1490 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1491 int registered; /* !0 if this cell is registered 0 if not registered */
1492 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1493 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1494 union {
1495 RIL_CellInfoGsm gsm;
1496 RIL_CellInfoCdma cdma;
1497 RIL_CellInfoLte lte;
Wink Savillec57b3eb2013-04-17 12:51:41 -07001498 RIL_CellInfoWcdma wcdma;
Etan Cohend3652192014-06-20 08:28:44 -07001499 RIL_CellInfoTdscdma tdscdma;
Wink Saville8a9e0212013-04-09 12:11:38 -07001500 } CellInfo;
1501} RIL_CellInfo;
1502
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001503typedef struct {
1504 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1505 int registered; /* !0 if this cell is registered 0 if not registered */
1506 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1507 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1508 union {
1509 RIL_CellInfoGsm_v12 gsm;
1510 RIL_CellInfoCdma cdma;
1511 RIL_CellInfoLte_v12 lte;
1512 RIL_CellInfoWcdma_v12 wcdma;
1513 RIL_CellInfoTdscdma tdscdma;
1514 } CellInfo;
1515} RIL_CellInfo_v12;
1516
Sooraj Sasindranf4714b72016-11-30 18:36:03 -08001517typedef struct {
1518 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1519 union {
1520 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1521 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1522 RIL_CellIdentityLte_v12 cellIdentityLte;
1523 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1524 RIL_CellIdentityCdma cellIdentityCdma;
1525 };
1526}RIL_CellIdentity_v16;
1527
1528typedef struct {
1529 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
1530 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
1531 // UNKNOWN, REG_ROAMING defined in RegState
1532 RIL_RadioTechnology rat; // indicates the available voice radio technology,
1533 // valid values as defined by RadioTechnology.
1534 int32_t cssSupported; // concurrent services support indicator. if
1535 // registered on a CDMA system.
1536 // 0 - Concurrent services not supported,
1537 // 1 - Concurrent services supported
1538 int32_t roamingIndicator; // TSB-58 Roaming Indicator if registered
1539 // on a CDMA or EVDO system or -1 if not.
1540 // Valid values are 0-255.
1541 int32_t systemIsInPrl; // indicates whether the current system is in the
1542 // PRL if registered on a CDMA or EVDO system or -1 if
1543 // not. 0=not in the PRL, 1=in the PRL
1544 int32_t defaultRoamingIndicator; // default Roaming Indicator from the PRL,
1545 // if registered on a CDMA or EVDO system or -1 if not.
1546 // Valid values are 0-255.
1547 int32_t reasonForDenial; // reasonForDenial if registration state is 3
1548 // (Registration denied) this is an enumerated reason why
1549 // registration was denied. See 3GPP TS 24.008,
1550 // 10.5.3.6 and Annex G.
1551 // 0 - General
1552 // 1 - Authentication Failure
1553 // 2 - IMSI unknown in HLR
1554 // 3 - Illegal MS
1555 // 4 - Illegal ME
1556 // 5 - PLMN not allowed
1557 // 6 - Location area not allowed
1558 // 7 - Roaming not allowed
1559 // 8 - No Suitable Cells in this Location Area
1560 // 9 - Network failure
1561 // 10 - Persistent location update reject
1562 // 11 - PLMN not allowed
1563 // 12 - Location area not allowed
1564 // 13 - Roaming not allowed in this Location Area
1565 // 15 - No Suitable Cells in this Location Area
1566 // 17 - Network Failure
1567 // 20 - MAC Failure
1568 // 21 - Sync Failure
1569 // 22 - Congestion
1570 // 23 - GSM Authentication unacceptable
1571 // 25 - Not Authorized for this CSG
1572 // 32 - Service option not supported
1573 // 33 - Requested service option not subscribed
1574 // 34 - Service option temporarily out of order
1575 // 38 - Call cannot be identified
1576 // 48-63 - Retry upon entry into a new cell
1577 // 95 - Semantically incorrect message
1578 // 96 - Invalid mandatory information
1579 // 97 - Message type non-existent or not implemented
1580 // 98 - Message type not compatible with protocol state
1581 // 99 - Information element non-existent or
1582 // not implemented
1583 // 100 - Conditional IE error
1584 // 101 - Message not compatible with protocol state;
1585 RIL_CellIdentity_v16 cellIdentity; // current cell information
1586}RIL_VoiceRegistrationStateResponse;
1587
1588
1589typedef struct {
1590 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
1591 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
1592 // UNKNOWN, REG_ROAMING defined in RegState
1593 RIL_RadioTechnology rat; // indicates the available data radio technology,
1594 // valid values as defined by RadioTechnology.
1595 int32_t reasonDataDenied; // if registration state is 3 (Registration
1596 // denied) this is an enumerated reason why
1597 // registration was denied. See 3GPP TS 24.008,
1598 // Annex G.6 "Additional cause codes for GMM".
1599 // 7 == GPRS services not allowed
1600 // 8 == GPRS services and non-GPRS services not allowed
1601 // 9 == MS identity cannot be derived by the network
1602 // 10 == Implicitly detached
1603 // 14 == GPRS services not allowed in this PLMN
1604 // 16 == MSC temporarily not reachable
1605 // 40 == No PDP context activated
1606 int32_t maxDataCalls; // The maximum number of simultaneous Data Calls that
1607 // must be established using setupDataCall().
1608 RIL_CellIdentity_v16 cellIdentity; // Current cell information
1609}RIL_DataRegistrationStateResponse;
1610
Wink Saville1b5fd232009-04-22 14:50:00 -07001611/* Names of the CDMA info records (C.S0005 section 3.7.5) */
1612typedef enum {
1613 RIL_CDMA_DISPLAY_INFO_REC,
1614 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1615 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1616 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1617 RIL_CDMA_SIGNAL_INFO_REC,
1618 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1619 RIL_CDMA_LINE_CONTROL_INFO_REC,
1620 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1621 RIL_CDMA_T53_CLIR_INFO_REC,
1622 RIL_CDMA_T53_RELEASE_INFO_REC,
1623 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1624} RIL_CDMA_InfoRecName;
1625
1626/* Display Info Rec as defined in C.S0005 section 3.7.5.1
1627 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1628 Note: the Extended Display info rec contains multiple records of the
1629 form: display_tag, display_len, and display_len occurrences of the
1630 chari field if the display_tag is not 10000000 or 10000001.
1631 To save space, the records are stored consecutively in a byte buffer.
1632 The display_tag, display_len and chari fields are all 1 byte.
1633*/
1634
1635typedef struct {
1636 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001637 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001638} RIL_CDMA_DisplayInfoRecord;
1639
1640/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1641 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1642 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1643*/
1644
1645typedef struct {
1646 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001647 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001648 char number_type;
1649 char number_plan;
1650 char pi;
1651 char si;
1652} RIL_CDMA_NumberInfoRecord;
1653
1654/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1655typedef enum {
1656 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1657 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1658 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1659 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1660 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1661 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1662 RIL_REDIRECTING_REASON_RESERVED
1663} RIL_CDMA_RedirectingReason;
1664
1665typedef struct {
1666 RIL_CDMA_NumberInfoRecord redirectingNumber;
1667 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1668 RIL_CDMA_RedirectingReason redirectingReason;
1669} RIL_CDMA_RedirectingNumberInfoRecord;
1670
1671/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1672typedef struct {
1673 char lineCtrlPolarityIncluded;
1674 char lineCtrlToggle;
1675 char lineCtrlReverse;
1676 char lineCtrlPowerDenial;
1677} RIL_CDMA_LineControlInfoRecord;
1678
1679/* T53 CLIR Information Record */
1680typedef struct {
1681 char cause;
1682} RIL_CDMA_T53_CLIRInfoRecord;
1683
1684/* T53 Audio Control Information Record */
1685typedef struct {
1686 char upLink;
1687 char downLink;
1688} RIL_CDMA_T53_AudioControlInfoRecord;
1689
1690typedef struct {
1691
1692 RIL_CDMA_InfoRecName name;
1693
1694 union {
1695 /* Display and Extended Display Info Rec */
1696 RIL_CDMA_DisplayInfoRecord display;
1697
1698 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1699 RIL_CDMA_NumberInfoRecord number;
1700
1701 /* Signal Info Rec */
1702 RIL_CDMA_SignalInfoRecord signal;
1703
1704 /* Redirecting Number Info Rec */
1705 RIL_CDMA_RedirectingNumberInfoRecord redir;
1706
1707 /* Line Control Info Rec */
1708 RIL_CDMA_LineControlInfoRecord lineCtrl;
1709
1710 /* T53 CLIR Info Rec */
1711 RIL_CDMA_T53_CLIRInfoRecord clir;
1712
1713 /* T53 Audio Control Info Rec */
1714 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1715 } rec;
1716} RIL_CDMA_InformationRecord;
1717
1718#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1719
1720typedef struct {
1721 char numberOfInfoRecs;
1722 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1723} RIL_CDMA_InformationRecords;
1724
Jake Hamby8a4a2332014-01-15 13:12:05 -08001725/* See RIL_REQUEST_NV_READ_ITEM */
1726typedef struct {
1727 RIL_NV_Item itemID;
1728} RIL_NV_ReadItem;
1729
1730/* See RIL_REQUEST_NV_WRITE_ITEM */
1731typedef struct {
1732 RIL_NV_Item itemID;
1733 char * value;
1734} RIL_NV_WriteItem;
1735
Etan Cohend3652192014-06-20 08:28:44 -07001736typedef enum {
1737 HANDOVER_STARTED = 0,
1738 HANDOVER_COMPLETED = 1,
1739 HANDOVER_FAILED = 2,
1740 HANDOVER_CANCELED = 3
1741} RIL_SrvccState;
1742
1743/* hardware configuration reported to RILJ. */
1744typedef enum {
1745 RIL_HARDWARE_CONFIG_MODEM = 0,
1746 RIL_HARDWARE_CONFIG_SIM = 1,
1747} RIL_HardwareConfig_Type;
1748
1749typedef enum {
1750 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1751 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1752 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1753} RIL_HardwareConfig_State;
1754
1755typedef struct {
1756 int rilModel;
1757 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1758 int maxVoice;
1759 int maxData;
1760 int maxStandby;
1761} RIL_HardwareConfig_Modem;
1762
1763typedef struct {
Wink Saville8b4e4f72014-10-17 15:01:45 -07001764 char modemUuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001765} RIL_HardwareConfig_Sim;
1766
1767typedef struct {
1768 RIL_HardwareConfig_Type type;
Wink Saville8b4e4f72014-10-17 15:01:45 -07001769 char uuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001770 RIL_HardwareConfig_State state;
1771 union {
1772 RIL_HardwareConfig_Modem modem;
1773 RIL_HardwareConfig_Sim sim;
1774 } cfg;
1775} RIL_HardwareConfig;
1776
Amit Mahajan54563d32014-11-22 00:54:49 +00001777typedef enum {
1778 SS_CFU,
1779 SS_CF_BUSY,
1780 SS_CF_NO_REPLY,
1781 SS_CF_NOT_REACHABLE,
1782 SS_CF_ALL,
1783 SS_CF_ALL_CONDITIONAL,
1784 SS_CLIP,
1785 SS_CLIR,
1786 SS_COLP,
1787 SS_COLR,
1788 SS_WAIT,
1789 SS_BAOC,
1790 SS_BAOIC,
1791 SS_BAOIC_EXC_HOME,
1792 SS_BAIC,
1793 SS_BAIC_ROAMING,
1794 SS_ALL_BARRING,
1795 SS_OUTGOING_BARRING,
1796 SS_INCOMING_BARRING
1797} RIL_SsServiceType;
1798
1799typedef enum {
1800 SS_ACTIVATION,
1801 SS_DEACTIVATION,
1802 SS_INTERROGATION,
1803 SS_REGISTRATION,
1804 SS_ERASURE
1805} RIL_SsRequestType;
1806
1807typedef enum {
1808 SS_ALL_TELE_AND_BEARER_SERVICES,
1809 SS_ALL_TELESEVICES,
1810 SS_TELEPHONY,
1811 SS_ALL_DATA_TELESERVICES,
1812 SS_SMS_SERVICES,
1813 SS_ALL_TELESERVICES_EXCEPT_SMS
1814} RIL_SsTeleserviceType;
1815
1816#define SS_INFO_MAX 4
1817#define NUM_SERVICE_CLASSES 7
1818
1819typedef struct {
1820 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1821 For example if voice is forwarded to one number and data
1822 is forwarded to a different one then numValidIndexes will be
1823 2 indicating total number of valid values in cfInfo.
1824 Similarly if all the services are forwarded to the same
1825 number then the value of numValidIndexes will be 1. */
1826
1827 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1828 for SS request to query call
1829 forward status. see
1830 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1831} RIL_CfData;
1832
1833typedef struct {
1834 RIL_SsServiceType serviceType;
1835 RIL_SsRequestType requestType;
1836 RIL_SsTeleserviceType teleserviceType;
1837 int serviceClass;
1838 RIL_Errno result;
1839
1840 union {
1841 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1842 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1843 two ints, so first two values of ssInfo[] will be
1844 used for response if serviceType is SS_CLIR and
1845 requestType is SS_INTERROGATION */
1846
1847 RIL_CfData cfData;
1848 };
1849} RIL_StkCcUnsolSsResponse;
1850
Wink Saville7f856802009-06-09 10:23:37 -07001851/**
Wink Savillec29360a2014-07-13 05:17:28 -07001852 * Data connection power state
1853 */
1854typedef enum {
1855 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1856 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1857 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1858 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1859} RIL_DcPowerStates;
1860
1861/**
1862 * Data connection real time info
1863 */
1864typedef struct {
1865 uint64_t time; // Time in nanos as returned by ril_nano_time
1866 RIL_DcPowerStates powerState; // Current power state
1867} RIL_DcRtInfo;
1868
Amit Mahajanc796e222014-08-13 16:54:01 +00001869/**
1870 * Data profile to modem
1871 */
1872typedef struct {
1873 /* id of the data profile */
1874 int profileId;
1875 /* the APN to connect to */
1876 char* apn;
1877 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1878 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1879 */
1880 char* protocol;
1881 /** authentication protocol used for this PDP context
1882 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1883 */
1884 int authType;
1885 /* the username for APN, or NULL */
1886 char* user;
1887 /* the password for APN, or NULL */
1888 char* password;
1889 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1890 int type;
1891 /* the period in seconds to limit the maximum connections */
1892 int maxConnsTime;
1893 /* the maximum connections during maxConnsTime */
1894 int maxConns;
1895 /** the required wait time in seconds after a successful UE initiated
1896 * disconnect of a given PDN connection before the device can send
1897 * a new PDN connection request for that given PDN
1898 */
1899 int waitTime;
1900 /* true to enable the profile, 0 to disable, 1 to enable */
1901 int enabled;
1902} RIL_DataProfileInfo;
Wink Savillec29360a2014-07-13 05:17:28 -07001903
Jack Yude8c8552017-01-24 12:03:52 -08001904typedef struct {
1905 /* id of the data profile */
1906 int profileId;
1907 /* the APN to connect to */
1908 char* apn;
1909 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1910 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1911 */
1912 char* protocol;
1913 /** one of the PDP_type values in TS 27.007 section 10.1.1 used on roaming network.
1914 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1915 */
1916 char *roamingProtocol;
1917 /** authentication protocol used for this PDP context
1918 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1919 */
1920 int authType;
1921 /* the username for APN, or NULL */
1922 char* user;
1923 /* the password for APN, or NULL */
1924 char* password;
1925 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1926 int type;
1927 /* the period in seconds to limit the maximum connections */
1928 int maxConnsTime;
1929 /* the maximum connections during maxConnsTime */
1930 int maxConns;
1931 /** the required wait time in seconds after a successful UE initiated
1932 * disconnect of a given PDN connection before the device can send
1933 * a new PDN connection request for that given PDN
1934 */
1935 int waitTime;
1936 /* true to enable the profile, 0 to disable, 1 to enable */
1937 int enabled;
1938 /* supported APN types bitmask. See RIL_ApnTypes for the value of each bit. */
1939 int supportedTypesBitmask;
1940 /** the bearer bitmask. See RIL_RadioAccessFamily for the value of each bit. */
1941 int bearerBitmask;
1942 /** maximum transmission unit (MTU) size in bytes */
1943 int mtu;
1944 /** the MVNO type: possible values are "imsi", "gid", "spn" */
1945 char *mvnoType;
1946 /** MVNO match data. Can be anything defined by the carrier. For example,
1947 * SPN like: "A MOBILE", "BEN NL", etc...
1948 * IMSI like: "302720x94", "2060188", etc...
1949 * GID like: "4E", "33", etc...
1950 */
1951 char *mvnoMatchData;
1952} RIL_DataProfileInfo_v15;
1953
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001954/* Tx Power Levels */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001955#define RIL_NUM_TX_POWER_LEVELS 5
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001956
Nathan Haroldc8635212016-10-10 11:15:21 -07001957/**
1958 * Aggregate modem activity information
1959 */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001960typedef struct {
1961
Nathan Haroldc8635212016-10-10 11:15:21 -07001962 /* total time (in ms) when modem is in a low power or
1963 * sleep state
1964 */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001965 uint32_t sleep_mode_time_ms;
1966
Nathan Haroldc8635212016-10-10 11:15:21 -07001967 /* total time (in ms) when modem is awake but neither
1968 * the transmitter nor receiver are active/awake */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001969 uint32_t idle_mode_time_ms;
1970
Nathan Haroldc8635212016-10-10 11:15:21 -07001971 /* total time (in ms) during which the transmitter is active/awake,
1972 * subdivided by manufacturer-defined device-specific
1973 * contiguous increasing ranges of transmit power between
1974 * 0 and the transmitter's maximum transmit power.
1975 */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001976 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001977
Nathan Haroldc8635212016-10-10 11:15:21 -07001978 /* total time (in ms) for which receiver is active/awake and
1979 * the transmitter is inactive */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001980 uint32_t rx_mode_time_ms;
1981} RIL_ActivityStatsInfo;
1982
Jack Yude8c8552017-01-24 12:03:52 -08001983typedef enum {
1984 RIL_APN_TYPE_UNKNOWN = 0x0, // Unknown
1985 RIL_APN_TYPE_DEFAULT = 0x1, // APN type for default data traffic
1986 RIL_APN_TYPE_MMS = 0x2, // APN type for MMS traffic
1987 RIL_APN_TYPE_SUPL = 0x4, // APN type for SUPL assisted GPS
1988 RIL_APN_TYPE_DUN = 0x8, // APN type for DUN traffic
1989 RIL_APN_TYPE_HIPRI = 0x10, // APN type for HiPri traffic
1990 RIL_APN_TYPE_FOTA = 0x20, // APN type for FOTA
1991 RIL_APN_TYPE_IMS = 0x40, // APN type for IMS
1992 RIL_APN_TYPE_CBS = 0x80, // APN type for CBS
1993 RIL_APN_TYPE_IA = 0x100, // APN type for IA Initial Attach APN
1994 RIL_APN_TYPE_EMERGENCY = 0x200, // APN type for Emergency PDN. This is not an IA apn,
1995 // but is used for access to carrier services in an
1996 // emergency call situation.
1997 RIL_APN_TYPE_ALL = 0xFFFFFFFF // All APN types
1998} RIL_ApnTypes;
1999
2000typedef enum {
2001 RIL_DST_POWER_SAVE_MODE, // Device power save mode (provided by PowerManager)
2002 // True indicates the device is in power save mode.
2003 RIL_DST_CHARGING_STATE, // Device charging state (provided by BatteryManager)
2004 // True indicates the device is charging.
2005 RIL_DST_LOW_DATA_EXPECTED // Low data expected mode. True indicates low data traffic
2006 // is expected, for example, when the device is idle
2007 // (e.g. not doing tethering in the background). Note
2008 // this doesn't mean no data is expected.
2009} RIL_DeviceStateType;
2010
2011typedef enum {
2012 RIL_UR_SIGNAL_STRENGTH = 0x01, // When this bit is set, modem should always send the
2013 // signal strength update through
2014 // RIL_UNSOL_SIGNAL_STRENGTH, otherwise suppress it.
2015 RIL_UR_FULL_NETWORK_STATE = 0x02, // When this bit is set, modem should always send
2016 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
2017 // when any field in
2018 // RIL_REQUEST_VOICE_REGISTRATION_STATE or
2019 // RIL_REQUEST_DATA_REGISTRATION_STATE changes. When
2020 // this bit is not set, modem should suppress
2021 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
2022 // only when insignificant fields change
2023 // (e.g. cell info).
2024 // Modem should continue sending
2025 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
2026 // when significant fields are updated even when this
2027 // bit is not set. The following fields are
2028 // considered significant, registration state and
2029 // radio technology.
2030 RIL_UR_DATA_CALL_DORMANCY_CHANGED = 0x04 // When this bit is set, modem should send the data
2031 // call list changed unsolicited response
2032 // RIL_UNSOL_DATA_CALL_LIST_CHANGED whenever any
2033 // field in RIL_Data_Call_Response changes.
2034 // Otherwise modem should suppress the unsolicited
2035 // response when the only changed field is 'active'
2036 // (for data dormancy). For all other fields change,
2037 // modem should continue sending
2038 // RIL_UNSOL_DATA_CALL_LIST_CHANGED regardless this
2039 // bit is set or not.
2040} RIL_UnsolicitedResponseFilter;
2041
Wileen Chiud6222e02015-11-23 14:25:22 -08002042typedef struct {
2043 char * aidPtr; /* AID value, See ETSI 102.221 and 101.220*/
2044 int p2; /* P2 parameter (described in ISO 7816-4)
2045 P2Constants:NO_P2 if to be ignored */
2046} RIL_OpenChannelParams;
2047
yinxu7317bd42017-05-03 15:15:19 -07002048typedef enum {
2049 RIL_ONE_SHOT = 0x01, // Performs the scan only once
2050 RIL_PERIODIC = 0x02 // Performs the scan periodically until cancelled
2051} RIL_ScanType;
2052
2053typedef enum {
2054 GERAN = 0x01, // GSM EDGE Radio Access Network
2055 UTRAN = 0x02, // Universal Terrestrial Radio Access Network
2056 EUTRAN = 0x03, // Evolved Universal Terrestrial Radio Access Network
2057} RIL_RadioAccessNetworks;
2058
2059typedef enum {
2060 GERAN_BAND_T380 = 1,
2061 GERAN_BAND_T410 = 2,
2062 GERAN_BAND_450 = 3,
2063 GERAN_BAND_480 = 4,
2064 GERAN_BAND_710 = 5,
2065 GERAN_BAND_750 = 6,
2066 GERAN_BAND_T810 = 7,
2067 GERAN_BAND_850 = 8,
2068 GERAN_BAND_P900 = 9,
2069 GERAN_BAND_E900 = 10,
2070 GERAN_BAND_R900 = 11,
2071 GERAN_BAND_DCS1800 = 12,
2072 GERAN_BAND_PCS1900 = 13,
2073 GERAN_BAND_ER900 = 14,
2074} RIL_GeranBands;
2075
2076typedef enum {
2077 UTRAN_BAND_1 = 1,
2078 UTRAN_BAND_2 = 2,
2079 UTRAN_BAND_3 = 3,
2080 UTRAN_BAND_4 = 4,
2081 UTRAN_BAND_5 = 5,
2082 UTRAN_BAND_6 = 6,
2083 UTRAN_BAND_7 = 7,
2084 UTRAN_BAND_8 = 8,
2085 UTRAN_BAND_9 = 9,
2086 UTRAN_BAND_10 = 10,
2087 UTRAN_BAND_11 = 11,
2088 UTRAN_BAND_12 = 12,
2089 UTRAN_BAND_13 = 13,
2090 UTRAN_BAND_14 = 14,
2091 UTRAN_BAND_19 = 19,
2092 UTRAN_BAND_20 = 20,
2093 UTRAN_BAND_21 = 21,
2094 UTRAN_BAND_22 = 22,
2095 UTRAN_BAND_25 = 25,
2096 UTRAN_BAND_26 = 26,
2097} RIL_UtranBands;
2098
2099typedef enum {
2100 EUTRAN_BAND_1 = 1,
2101 EUTRAN_BAND_2 = 2,
2102 EUTRAN_BAND_3 = 3,
2103 EUTRAN_BAND_4 = 4,
2104 EUTRAN_BAND_5 = 5,
2105 EUTRAN_BAND_6 = 6,
2106 EUTRAN_BAND_7 = 7,
2107 EUTRAN_BAND_8 = 8,
2108 EUTRAN_BAND_9 = 9,
2109 EUTRAN_BAND_10 = 10,
2110 EUTRAN_BAND_11 = 11,
2111 EUTRAN_BAND_12 = 12,
2112 EUTRAN_BAND_13 = 13,
2113 EUTRAN_BAND_14 = 14,
2114 EUTRAN_BAND_17 = 17,
2115 EUTRAN_BAND_18 = 18,
2116 EUTRAN_BAND_19 = 19,
2117 EUTRAN_BAND_20 = 20,
2118 EUTRAN_BAND_21 = 21,
2119 EUTRAN_BAND_22 = 22,
2120 EUTRAN_BAND_23 = 23,
2121 EUTRAN_BAND_24 = 24,
2122 EUTRAN_BAND_25 = 25,
2123 EUTRAN_BAND_26 = 26,
2124 EUTRAN_BAND_27 = 27,
2125 EUTRAN_BAND_28 = 28,
2126 EUTRAN_BAND_30 = 30,
2127 EUTRAN_BAND_31 = 31,
2128 EUTRAN_BAND_33 = 33,
2129 EUTRAN_BAND_34 = 34,
2130 EUTRAN_BAND_35 = 35,
2131 EUTRAN_BAND_36 = 36,
2132 EUTRAN_BAND_37 = 37,
2133 EUTRAN_BAND_38 = 38,
2134 EUTRAN_BAND_39 = 39,
2135 EUTRAN_BAND_40 = 40,
2136 EUTRAN_BAND_41 = 41,
2137 EUTRAN_BAND_42 = 42,
2138 EUTRAN_BAND_43 = 43,
2139 EUTRAN_BAND_44 = 44,
2140 EUTRAN_BAND_45 = 45,
2141 EUTRAN_BAND_46 = 46,
2142 EUTRAN_BAND_47 = 47,
2143 EUTRAN_BAND_48 = 48,
2144 EUTRAN_BAND_65 = 65,
2145 EUTRAN_BAND_66 = 66,
2146 EUTRAN_BAND_68 = 68,
2147 EUTRAN_BAND_70 = 70,
2148} RIL_EutranBands;
2149
2150typedef struct {
2151 RIL_RadioAccessNetworks radio_access_network; // The type of network to scan.
yinxu8688abd2017-05-22 11:26:45 -07002152 uint32_t bands_length; // Length of bands
yinxu7317bd42017-05-03 15:15:19 -07002153 union {
2154 RIL_GeranBands geran_bands[MAX_BANDS];
2155 RIL_UtranBands utran_bands[MAX_BANDS];
2156 RIL_EutranBands eutran_bands[MAX_BANDS];
2157 } bands;
yinxu8688abd2017-05-22 11:26:45 -07002158 uint32_t channels_length; // Length of channels
yinxu7317bd42017-05-03 15:15:19 -07002159 uint32_t channels[MAX_CHANNELS]; // Frequency channels to scan
2160} RIL_RadioAccessSpecifier;
2161
2162typedef struct {
2163 RIL_ScanType type; // Type of the scan
yinxu8688abd2017-05-22 11:26:45 -07002164 int32_t interval; // Time interval in seconds
2165 // between periodic scans, only
2166 // valid when type=RIL_PERIODIC
2167 uint32_t specifiers_length; // Length of specifiers
yinxu7317bd42017-05-03 15:15:19 -07002168 RIL_RadioAccessSpecifier specifiers[MAX_RADIO_ACCESS_NETWORKS]; // Radio access networks
2169 // with bands/channels.
2170} RIL_NetworkScanRequest;
2171
2172typedef enum {
2173 PARTIAL = 0x01, // The result contains a part of the scan results
2174 COMPLETE = 0x02, // The result contains the last part of the scan results
2175} RIL_ScanStatus;
2176
2177typedef struct {
yinxu8688abd2017-05-22 11:26:45 -07002178 RIL_ScanStatus status; // The status of the scan
2179 uint32_t network_infos_length; // Total length of RIL_CellInfo
2180 RIL_CellInfo_v12* network_infos; // List of network information
yinxu7317bd42017-05-03 15:15:19 -07002181} RIL_NetworkScanResult;
2182
Wink Savillec29360a2014-07-13 05:17:28 -07002183/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002184 * RIL_REQUEST_GET_SIM_STATUS
2185 *
2186 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -07002187 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002188 * "data" is NULL
2189 *
Wink Savillefd729372011-02-22 16:19:39 -08002190 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002191 *
2192 * Valid errors:
sqiana216ed42017-06-20 11:54:31 -07002193 *
2194 * SUCCESS
2195 * RADIO_NOT_AVAILABLE
2196 * INTERNAL_ERR
2197 * NO_MEMORY
2198 * NO_RESOURCES
2199 * CANCELLED
2200 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002201 */
2202#define RIL_REQUEST_GET_SIM_STATUS 1
2203
2204/**
2205 * RIL_REQUEST_ENTER_SIM_PIN
2206 *
John Wang309ac292009-07-30 14:53:23 -07002207 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002208 *
2209 * "data" is const char **
2210 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08002211 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002212 *
jsh593c9102009-06-24 16:13:44 -07002213 * "response" is int *
2214 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002215 *
2216 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002217 *
2218 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002219 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002220 * PASSWORD_INCORRECT
sqiana216ed42017-06-20 11:54:31 -07002221 * INTERNAL_ERR
2222 * NO_MEMORY
2223 * NO_RESOURCES
2224 * CANCELLED
2225 * INVALID_ARGUMENTS
2226 * INVALID_SIM_STATE
2227 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002228 */
2229
2230#define RIL_REQUEST_ENTER_SIM_PIN 2
2231
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002232/**
2233 * RIL_REQUEST_ENTER_SIM_PUK
2234 *
Wink Saville7f856802009-06-09 10:23:37 -07002235 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002236 *
2237 * "data" is const char **
2238 * ((const char **)data)[0] is PUK value
2239 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08002240 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002241 *
jsh593c9102009-06-24 16:13:44 -07002242 * "response" is int *
2243 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002244 *
2245 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002246 *
2247 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002248 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002249 * PASSWORD_INCORRECT
2250 * (PUK is invalid)
sqiana216ed42017-06-20 11:54:31 -07002251 * INTERNAL_ERR
2252 * NO_MEMORY
2253 * NO_RESOURCES
2254 * CANCELLED
2255 * INVALID_ARGUMENTS
2256 * INVALID_SIM_STATE
2257 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002258 */
2259
2260#define RIL_REQUEST_ENTER_SIM_PUK 3
2261
2262/**
2263 * RIL_REQUEST_ENTER_SIM_PIN2
2264 *
2265 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
2266 * returned as a a failure from a previous operation.
2267 *
2268 * "data" is const char **
2269 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08002270 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002271 *
jsh593c9102009-06-24 16:13:44 -07002272 * "response" is int *
2273 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002274 *
2275 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002276 *
2277 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002278 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002279 * PASSWORD_INCORRECT
sqiana216ed42017-06-20 11:54:31 -07002280 * INTERNAL_ERR
2281 * NO_MEMORY
2282 * NO_RESOURCES
2283 * CANCELLED
2284 * INVALID_ARGUMENTS
2285 * INVALID_SIM_STATE
2286 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002287 */
2288
2289#define RIL_REQUEST_ENTER_SIM_PIN2 4
2290
2291/**
2292 * RIL_REQUEST_ENTER_SIM_PUK2
2293 *
Wink Saville7f856802009-06-09 10:23:37 -07002294 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002295 *
2296 * "data" is const char **
2297 * ((const char **)data)[0] is PUK2 value
2298 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08002299 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002300 *
jsh593c9102009-06-24 16:13:44 -07002301 * "response" is int *
2302 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002303 *
2304 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002305 *
2306 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002307 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002308 * PASSWORD_INCORRECT
2309 * (PUK2 is invalid)
sqiana216ed42017-06-20 11:54:31 -07002310 * INTERNAL_ERR
2311 * NO_MEMORY
2312 * NO_RESOURCES
2313 * CANCELLED
2314 * INVALID_ARGUMENTS
2315 * INVALID_SIM_STATE
2316 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002317 */
2318
2319#define RIL_REQUEST_ENTER_SIM_PUK2 5
2320
2321/**
2322 * RIL_REQUEST_CHANGE_SIM_PIN
2323 *
Wink Saville7f856802009-06-09 10:23:37 -07002324 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002325 *
2326 * "data" is const char **
2327 * ((const char **)data)[0] is old PIN value
2328 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08002329 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002330 *
jsh593c9102009-06-24 16:13:44 -07002331 * "response" is int *
2332 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002333 *
2334 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002335 *
2336 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002337 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002338 * PASSWORD_INCORRECT
2339 * (old PIN is invalid)
sqiana216ed42017-06-20 11:54:31 -07002340 * INTERNAL_ERR
2341 * NO_MEMORY
2342 * NO_RESOURCES
2343 * CANCELLED
2344 * INVALID_ARGUMENTS
2345 * INVALID_SIM_STATE
2346 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002347 */
2348
2349#define RIL_REQUEST_CHANGE_SIM_PIN 6
2350
2351
2352/**
2353 * RIL_REQUEST_CHANGE_SIM_PIN2
2354 *
Wink Saville7f856802009-06-09 10:23:37 -07002355 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002356 *
2357 * "data" is const char **
2358 * ((const char **)data)[0] is old PIN2 value
2359 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08002360 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002361 *
jsh593c9102009-06-24 16:13:44 -07002362 * "response" is int *
2363 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002364 *
2365 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002366 *
2367 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002368 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002369 * PASSWORD_INCORRECT
2370 * (old PIN2 is invalid)
sqiana216ed42017-06-20 11:54:31 -07002371 * INTERNAL_ERR
2372 * NO_MEMORY
2373 * NO_RESOURCES
2374 * CANCELLED
2375 * INVALID_ARGUMENTS
2376 * INVALID_SIM_STATE
2377 * REQUEST_NOT_SUPPORTED
Wink Saville7f856802009-06-09 10:23:37 -07002378 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002379 */
2380
2381#define RIL_REQUEST_CHANGE_SIM_PIN2 7
2382
2383/**
2384 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
2385 *
2386 * Requests that network personlization be deactivated
2387 *
2388 * "data" is const char **
2389 * ((const char **)(data))[0]] is network depersonlization code
2390 *
jsh593c9102009-06-24 16:13:44 -07002391 * "response" is int *
2392 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002393 *
2394 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002395 *
2396 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002397 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002398 * PASSWORD_INCORRECT
2399 * (code is invalid)
sqiana216ed42017-06-20 11:54:31 -07002400 * INTERNAL_ERR
2401 * NO_MEMORY
2402 * NO_RESOURCES
2403 * CANCELLED
2404 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002405 */
2406
2407#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
2408
2409/**
Wink Saville7f856802009-06-09 10:23:37 -07002410 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002411 *
2412 * Requests current call list
2413 *
2414 * "data" is NULL
2415 *
2416 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07002417 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002418 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002419 *
2420 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002421 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002422 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002423 * (request will be made again in a few hundred msec)
sqiana216ed42017-06-20 11:54:31 -07002424 * INTERNAL_ERR
2425 * NO_RESOURCES
2426 * CANCELLED
2427 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002428 */
2429
2430#define RIL_REQUEST_GET_CURRENT_CALLS 9
2431
2432
Wink Saville7f856802009-06-09 10:23:37 -07002433/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002434 * RIL_REQUEST_DIAL
2435 *
2436 * Initiate voice call
2437 *
2438 * "data" is const RIL_Dial *
2439 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002440 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002441 * This method is never used for supplementary service codes
2442 *
2443 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002444 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002445 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00002446 * DIAL_MODIFIED_TO_USSD
2447 * DIAL_MODIFIED_TO_SS
2448 * DIAL_MODIFIED_TO_DIAL
Ajay Nambi10345892016-03-19 09:02:28 -07002449 * INVALID_ARGUMENTS
2450 * NO_MEMORY
2451 * INVALID_STATE
2452 * NO_RESOURCES
2453 * INTERNAL_ERR
2454 * FDN_CHECK_FAILURE
2455 * MODEM_ERR
2456 * NO_SUBSCRIPTION
2457 * NO_NETWORK_FOUND
2458 * INVALID_CALL_ID
2459 * DEVICE_IN_USE
2460 * MODE_NOT_SUPPORTED
2461 * ABORTED
sqiana216ed42017-06-20 11:54:31 -07002462 * CANCELLED
2463 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002464 */
2465#define RIL_REQUEST_DIAL 10
2466
2467/**
2468 * RIL_REQUEST_GET_IMSI
2469 *
2470 * Get the SIM IMSI
2471 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08002472 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002473 *
Wink Savillec0114b32011-02-18 10:14:07 -08002474 * "data" is const char **
2475 * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002476 * "response" is a const char * containing the IMSI
2477 *
2478 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002479 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002480 * RADIO_NOT_AVAILABLE (radio resetting)
sqiana216ed42017-06-20 11:54:31 -07002481 * INTERNAL_ERR
2482 * NO_MEMORY
2483 * NO_RESOURCES
2484 * CANCELLED
2485 * INVALID_SIM_STATE
2486 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002487 */
2488
2489#define RIL_REQUEST_GET_IMSI 11
2490
2491/**
2492 * RIL_REQUEST_HANGUP
2493 *
2494 * Hang up a specific line (like AT+CHLD=1x)
2495 *
John Wang06bae4b2010-11-18 16:37:09 -08002496 * After this HANGUP request returns, RIL should show the connection is NOT
2497 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2498 *
Wink Saville7f856802009-06-09 10:23:37 -07002499 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002500 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002501 *
2502 * "response" is NULL
2503 *
2504 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002505 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002506 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002507 * INVALID_ARGUMENTS
2508 * NO_MEMORY
2509 * INVALID_STATE
2510 * MODEM_ERR
2511 * INTERNAL_ERR
2512 * NO_MEMORY
2513 * INVALID_CALL_ID
2514 * INVALID_ARGUMENTS
sqiana216ed42017-06-20 11:54:31 -07002515 * NO_RESOURCES
2516 * CANCELLED
2517 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002518 */
2519
2520#define RIL_REQUEST_HANGUP 12
2521
2522/**
2523 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
2524 *
2525 * Hang up waiting or held (like AT+CHLD=0)
2526 *
John Wang06bae4b2010-11-18 16:37:09 -08002527 * After this HANGUP request returns, RIL should show the connection is NOT
2528 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2529 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002530 * "data" is NULL
2531 * "response" is NULL
2532 *
2533 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002534 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002535 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002536 * INVALID_STATE
2537 * NO_MEMORY
2538 * MODEM_ERR
2539 * INTERNAL_ERR
2540 * NO_MEMORY
2541 * INVALID_CALL_ID
2542 * NO_RESOURCES
2543 * OPERATION_NOT_ALLOWED
2544 * INVALID_ARGUMENTS
sqiana216ed42017-06-20 11:54:31 -07002545 * NO_RESOURCES
2546 * CANCELLED
2547 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002548 */
2549
2550#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
2551
2552/**
2553 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
2554 *
2555 * Hang up waiting or held (like AT+CHLD=1)
2556 *
John Wang06bae4b2010-11-18 16:37:09 -08002557 * After this HANGUP request returns, RIL should show the connection is NOT
2558 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2559 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002560 * "data" is NULL
2561 * "response" is NULL
2562 *
2563 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002564 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002565 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002566 * INVALID_STATE
2567 * NO_MEMORY
2568 * MODEM_ERR
2569 * INTERNAL_ERR
2570 * INVALID_CALL_ID
2571 * OPERATION_NOT_ALLOWED
2572 * INVALID_ARGUMENTS
2573 * NO_RESOURCES
sqiana216ed42017-06-20 11:54:31 -07002574 * CANCELLED
2575 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002576 */
2577
2578#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
2579
2580/**
2581 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
2582 *
2583 * Switch waiting or holding call and active call (like AT+CHLD=2)
2584 *
2585 * State transitions should be is follows:
2586 *
2587 * If call 1 is waiting and call 2 is active, then if this re
2588 *
2589 * BEFORE AFTER
2590 * Call 1 Call 2 Call 1 Call 2
2591 * ACTIVE HOLDING HOLDING ACTIVE
2592 * ACTIVE WAITING HOLDING ACTIVE
2593 * HOLDING WAITING HOLDING ACTIVE
2594 * ACTIVE IDLE HOLDING IDLE
2595 * IDLE IDLE IDLE IDLE
2596 *
2597 * "data" is NULL
2598 * "response" is NULL
2599 *
2600 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002601 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002602 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002603 * INVALID_STATE
2604 * NO_MEMORY
2605 * MODEM_ERR
2606 * INTERNAL_ERR
2607 * INVALID_STATE
2608 * INVALID_ARGUMENTS
2609 * INVALID_CALL_ID
2610 * OPERATION_NOT_ALLOWED
sqiana216ed42017-06-20 11:54:31 -07002611 * NO_RESOURCES
2612 * CANCELLED
2613 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002614 */
2615
2616#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
2617#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
2618
2619/**
2620 * RIL_REQUEST_CONFERENCE
2621 *
2622 * Conference holding and active (like AT+CHLD=3)
2623
2624 * "data" is NULL
2625 * "response" is NULL
2626 *
2627 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002628 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002629 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002630 * NO_MEMORY
2631 * MODEM_ERR
2632 * INTERNAL_ERR
2633 * INVALID_STATE
2634 * INVALID_CALL_ID
2635 * INVALID_ARGUMENTS
2636 * OPERATION_NOT_ALLOWED
sqiana216ed42017-06-20 11:54:31 -07002637 * NO_RESOURCES
2638 * CANCELLED
2639 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002640 */
2641#define RIL_REQUEST_CONFERENCE 16
2642
2643/**
2644 * RIL_REQUEST_UDUB
2645 *
Wink Saville7f856802009-06-09 10:23:37 -07002646 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002647 * waiting call answer)(RIL_BasicRequest r);
2648 *
2649 * "data" is NULL
2650 * "response" is NULL
2651 *
2652 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002653 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002654 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002655 * INVALID_STATE
2656 * NO_RESOURCES
2657 * NO_MEMORY
2658 * MODEM_ERR
2659 * INTERNAL_ERR
2660 * INVALID_CALL_ID
2661 * OPERATION_NOT_ALLOWED
2662 * INVALID_ARGUMENTS
sqiana216ed42017-06-20 11:54:31 -07002663 * CANCELLED
2664 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002665 */
2666#define RIL_REQUEST_UDUB 17
2667
2668/**
2669 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2670 *
2671 * Requests the failure cause code for the most recently terminated call
2672 *
2673 * "data" is NULL
Jayachandran Ccc2a2022017-03-07 09:55:58 -08002674 * "response" is a const RIL_LastCallFailCauseInfo *
2675 * RIL_LastCallFailCauseInfo contains LastCallFailCause and vendor cause.
2676 * The vendor cause code must be used for debugging purpose only.
2677 * The implementation must return one of the values of LastCallFailCause
2678 * as mentioned below.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002679 *
Jayachandran Ccc2a2022017-03-07 09:55:58 -08002680 * GSM failure reasons codes for the cause codes defined in TS 24.008 Annex H
2681 * where possible.
2682 * CDMA failure reasons codes for the possible call failure scenarios
2683 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
2684 * Any of the following reason codes if the call is failed or dropped due to reason
2685 * mentioned with in the braces.
2686 *
2687 * CALL_FAIL_RADIO_OFF (Radio is OFF)
2688 * CALL_FAIL_OUT_OF_SERVICE (No cell coverage)
2689 * CALL_FAIL_NO_VALID_SIM (No valid SIM)
2690 * CALL_FAIL_RADIO_INTERNAL_ERROR (Modem hit unexpected error scenario)
2691 * CALL_FAIL_NETWORK_RESP_TIMEOUT (No response from network)
2692 * CALL_FAIL_NETWORK_REJECT (Explicit network reject)
2693 * CALL_FAIL_RADIO_ACCESS_FAILURE (RRC connection failure. Eg.RACH)
2694 * CALL_FAIL_RADIO_LINK_FAILURE (Radio Link Failure)
2695 * CALL_FAIL_RADIO_LINK_LOST (Radio link lost due to poor coverage)
2696 * CALL_FAIL_RADIO_UPLINK_FAILURE (Radio uplink failure)
2697 * CALL_FAIL_RADIO_SETUP_FAILURE (RRC connection setup failure)
2698 * CALL_FAIL_RADIO_RELEASE_NORMAL (RRC connection release, normal)
2699 * CALL_FAIL_RADIO_RELEASE_ABNORMAL (RRC connection release, abnormal)
2700 * CALL_FAIL_ACCESS_CLASS_BLOCKED (Access class barring)
2701 * CALL_FAIL_NETWORK_DETACH (Explicit network detach)
2702 *
2703 * OEM causes (CALL_FAIL_OEM_CAUSE_XX) must be used for debug purpose only
The Android Open Source Project34a51082009-03-05 14:34:37 -08002704 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002705 * If the implementation does not have access to the exact cause codes,
2706 * then it should return one of the values listed in RIL_LastCallFailCause,
2707 * as the UI layer needs to distinguish these cases for tone generation or
2708 * error notification.
2709 *
2710 * Valid errors:
2711 * SUCCESS
2712 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002713 * NO_MEMORY
sqiana216ed42017-06-20 11:54:31 -07002714 * INTERNAL_ERR
2715 * NO_RESOURCES
2716 * CANCELLED
2717 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002718 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002719 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002720 */
2721#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
2722
2723/**
2724 * RIL_REQUEST_SIGNAL_STRENGTH
2725 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002726 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002727 *
2728 * Must succeed if radio is on.
2729 *
2730 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07002731 *
2732 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002733 *
2734 * Valid errors:
2735 * SUCCESS
2736 * RADIO_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07002737 * NO_MEMORY
2738 * INTERNAL_ERR
2739 * SYSTEM_ERR
2740 * MODEM_ERR
2741 * NOT_PROVISIONED
2742 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07002743 * NO_RESOURCES
2744 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002745 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002746#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07002747
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002748/**
Wink Savillec0114b32011-02-18 10:14:07 -08002749 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002750 *
2751 * Request current registration state
2752 *
2753 * "data" is NULL
Sooraj Sasindranf4714b72016-11-30 18:36:03 -08002754 * "response" is a const RIL_VoiceRegistrationStateResponse *
Wink Saville1b5fd232009-04-22 14:50:00 -07002755 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002756 * Valid errors:
2757 * SUCCESS
2758 * RADIO_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07002759 * INTERNAL_ERR
2760 * NO_MEMORY
2761 * NO_RESOURCES
2762 * CANCELLED
2763 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002764 */
Wink Savillec0114b32011-02-18 10:14:07 -08002765#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002766
2767/**
Wink Savillec0114b32011-02-18 10:14:07 -08002768 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002769 *
Wink Savillec0114b32011-02-18 10:14:07 -08002770 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002771 *
2772 * "data" is NULL
Sooraj Sasindranf4714b72016-11-30 18:36:03 -08002773 * "response" is a const RIL_DataRegistrationStateResponse *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002774 *
2775 * Valid errors:
2776 * SUCCESS
2777 * RADIO_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07002778 * NO_MEMORY
2779 * INTERNAL_ERR
2780 * SYSTEM_ERR
2781 * MODEM_ERR
2782 * NOT_PROVISIONED
2783 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07002784 * NO_RESOURCES
2785 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002786 */
Wink Savillec0114b32011-02-18 10:14:07 -08002787#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002788
2789/**
2790 * RIL_REQUEST_OPERATOR
2791 *
2792 * Request current operator ONS or EONS
2793 *
2794 * "data" is NULL
2795 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07002796 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002797 * or NULL if unregistered
2798 *
Wink Saville7f856802009-06-09 10:23:37 -07002799 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002800 * or NULL if unregistered
2801 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2802 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07002803 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002804 * Valid errors:
2805 * SUCCESS
2806 * RADIO_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07002807 * NO_MEMORY
2808 * INTERNAL_ERR
2809 * SYSTEM_ERR
2810 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07002811 * NO_RESOURCES
2812 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002813 */
2814#define RIL_REQUEST_OPERATOR 22
2815
2816/**
2817 * RIL_REQUEST_RADIO_POWER
2818 *
2819 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07002820 * If the radio is is turned off/on the radio modem subsystem
2821 * is expected return to an initialized state. For instance,
2822 * any voice and data calls will be terminated and all associated
2823 * lists emptied.
2824 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002825 * "data" is int *
2826 * ((int *)data)[0] is > 0 for "Radio On"
2827 * ((int *)data)[0] is == 0 for "Radio Off"
2828 *
2829 * "response" is NULL
2830 *
2831 * Turn radio on if "on" > 0
2832 * Turn radio off if "on" == 0
2833 *
2834 * Valid errors:
2835 * SUCCESS
2836 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002837 * OPERATION_NOT_ALLOWED
Naina Nalluri67728582017-05-04 17:40:04 -07002838 * INVALID_STATE
2839 * NO_MEMORY
2840 * INTERNAL_ERR
2841 * SYSTEM_ERR
2842 * INVALID_ARGUMENTS
2843 * MODEM_ERR
2844 * DEVICE_IN_USE
2845 * OPERATION_NOT_ALLOWED
2846 * INVALID_MODEM_STATE
2847 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07002848 * NO_RESOURCES
2849 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002850 */
2851#define RIL_REQUEST_RADIO_POWER 23
2852
2853/**
2854 * RIL_REQUEST_DTMF
2855 *
2856 * Send a DTMF tone
2857 *
2858 * If the implementation is currently playing a tone requested via
2859 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2860 * should be played instead
2861 *
jsh602f80f2009-07-10 15:44:37 -07002862 * "data" is a char * containing a single character with one of 12 values: 0-9,*,#
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002863 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002864 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002865 * FIXME should this block/mute microphone?
2866 * How does this interact with local DTMF feedback?
2867 *
2868 * Valid errors:
2869 * SUCCESS
2870 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002871 * INVALID_ARGUMENTS
2872 * NO_RESOURCES
2873 * NO_MEMORY
2874 * MODEM_ERR
2875 * INTERNAL_ERR
2876 * INVALID_CALL_ID
sqiana216ed42017-06-20 11:54:31 -07002877 * NO_RESOURCES
2878 * CANCELLED
2879 * INVALID_MODEM_STATE
2880 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002881 *
2882 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2883 *
2884 */
2885#define RIL_REQUEST_DTMF 24
2886
2887/**
2888 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07002889 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002890 * Send an SMS message
2891 *
2892 * "data" is const char **
2893 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2894 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2895 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2896 * less the SMSC address
2897 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2898 *
2899 * "response" is a const RIL_SMS_Response *
2900 *
2901 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002902 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002903 *
2904 * Valid errors:
2905 * SUCCESS
2906 * RADIO_NOT_AVAILABLE
2907 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07002908 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08002909 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002910 * INVALID_STATE
2911 * INVALID_ARGUMENTS
2912 * NO_MEMORY
2913 * REQUEST_RATE_LIMITED
2914 * INVALID_SMS_FORMAT
2915 * SYSTEM_ERR
2916 * ENCODING_ERR
2917 * INVALID_SMSC_ADDRESS
2918 * MODEM_ERR
2919 * NETWORK_ERR
2920 * MODE_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07002921 * NO_MEMORY
2922 * NO_RESOURCES
2923 * CANCELLED
2924 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002925 *
2926 * FIXME how do we specify TP-Message-Reference if we need to resend?
2927 */
2928#define RIL_REQUEST_SEND_SMS 25
2929
2930
2931/**
2932 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07002933 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002934 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2935 * except that more messages are expected to be sent soon. If possible,
2936 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2937 *
2938 * "data" is const char **
2939 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2940 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2941 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2942 * less the SMSC address
2943 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2944 *
2945 * "response" is a const RIL_SMS_Response *
2946 *
2947 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002948 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002949 *
2950 * Valid errors:
2951 * SUCCESS
2952 * RADIO_NOT_AVAILABLE
2953 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08002954 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002955 * INVALID_STATE
2956 * INVALID_ARGUMENTS
2957 * NO_MEMORY
2958 * INVALID_SMS_FORMAT
2959 * SYSTEM_ERR
2960 * REQUEST_RATE_LIMITED
2961 * FDN_CHECK_FAILURE
2962 * MODEM_ERR
2963 * NETWORK_ERR
2964 * ENCODING_ERR
2965 * INVALID_SMSC_ADDRESS
2966 * MODE_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07002967 * INTERNAL_ERR
2968 * NO_RESOURCES
2969 * CANCELLED
2970 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002971 *
2972 */
2973#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2974
2975
2976/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002977 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002978 *
Wink Saville29487ef2011-04-15 09:15:31 -07002979 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2980 * return success it is added to the list of data calls and a
2981 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2982 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2983 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2984 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002985 *
Wink Saville43808972011-01-13 17:39:51 -08002986 * The RIL is expected to:
2987 * - Create one data call context.
2988 * - Create and configure a dedicated interface for the context
2989 * - The interface must be point to point.
2990 * - The interface is configured with one or more addresses and
2991 * is capable of sending and receiving packets. The prefix length
2992 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2993 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08002994 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08002995 * number of simultaneous data call contexts.
2996 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002997 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08002998 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2999 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07003000 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07003001 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
Wink Savillef4c4d362009-04-02 01:37:03 -07003002 * override the one in the profile. NULL indicates no APN overrride.
3003 * ((const char **)data)[3] is the username for APN, or NULL
3004 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07003005 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
3006 * 0 => PAP and CHAP is never performed.
3007 * 1 => PAP may be performed; CHAP is never performed.
3008 * 2 => CHAP may be performed; PAP is never performed.
3009 * 3 => PAP / CHAP may be performed - baseband dependent.
Jack Yude8c8552017-01-24 12:03:52 -08003010 * ((const char **)data)[6] is the non-roaming/home connection type to request. Must be one of the
Wink Savillec0114b32011-02-18 10:14:07 -08003011 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07003012 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Jack Yude8c8552017-01-24 12:03:52 -08003013 * ((const char **)data)[7] is the roaming connection type to request. Must be one of the
3014 * PDP_type values in TS 27.007 section 10.1.1.
3015 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
3016 * ((const char **)data)[8] is the bitmask of APN type in decimal string format. The
3017 * bitmask will encapsulate the following values:
3018 * ia,mms,agps,supl,hipri,fota,dun,ims,default.
3019 * ((const char **)data)[9] is the bearer bitmask in decimal string format. Each bit is a
3020 * RIL_RadioAccessFamily. "0" or NULL indicates all RATs.
3021 * ((const char **)data)[10] is the boolean in string format indicating the APN setting was
3022 * sent to the modem through RIL_REQUEST_SET_DATA_PROFILE earlier.
3023 * ((const char **)data)[11] is the mtu size in bytes of the mobile interface to which
3024 * the apn is connected.
3025 * ((const char **)data)[12] is the MVNO type:
3026 * possible values are "imsi", "gid", "spn".
3027 * ((const char **)data)[13] is MVNO match data in string. Can be anything defined by the carrier.
3028 * For example,
3029 * SPN like: "A MOBILE", "BEN NL", etc...
3030 * IMSI like: "302720x94", "2060188", etc...
3031 * GID like: "4E", "33", etc...
3032 * ((const char **)data)[14] is the boolean string indicating data roaming is allowed or not. "1"
3033 * indicates data roaming is enabled by the user, "0" indicates disabled.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003034 *
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -07003035 * "response" is a RIL_Data_Call_Response_v11
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003036 *
3037 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07003038 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003039 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08003040 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08003041 * the RIL_Data_Call_Response_v6.status containing the actual status.
3042 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08003043 *
3044 * Other errors could include:
sqian2e093612017-04-24 11:48:06 -07003045 * RADIO_NOT_AVAILABLE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
sqiana216ed42017-06-20 11:54:31 -07003046 * OP_NOT_ALLOWED_DURING_VOICE_CALL, REQUEST_NOT_SUPPORTED,
3047 * INVALID_ARGUMENTS, INTERNAL_ERR, NO_MEMORY, NO_RESOURCES
3048 * and CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003049 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003050 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003051 */
Wink Savillef4c4d362009-04-02 01:37:03 -07003052#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003053
3054
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003055/**
3056 * RIL_REQUEST_SIM_IO
3057 *
3058 * Request SIM I/O operation.
3059 * This is similar to the TS 27.007 "restricted SIM" operation
3060 * where it assumes all of the EF selection will be done by the
3061 * callee.
3062 *
Wink Savillefd729372011-02-22 16:19:39 -08003063 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003064 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
3065 * or may specify a PIN2 for operations that require a PIN2 (eg
3066 * updating FDN records)
3067 *
3068 * "response" is a const RIL_SIM_IO_Response *
3069 *
3070 * Arguments and responses that are unused for certain
3071 * values of "command" should be ignored or set to NULL
3072 *
3073 * Valid errors:
3074 * SUCCESS
3075 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003076 * SIM_PIN2
3077 * SIM_PUK2
sqiana216ed42017-06-20 11:54:31 -07003078 * INVALID_SIM_STATE
3079 * SIM_ERR
3080 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003081 */
3082#define RIL_REQUEST_SIM_IO 28
3083
3084/**
3085 * RIL_REQUEST_SEND_USSD
3086 *
3087 * Send a USSD message
3088 *
3089 * If a USSD session already exists, the message should be sent in the
3090 * context of that session. Otherwise, a new session should be created.
3091 *
3092 * The network reply should be reported via RIL_UNSOL_ON_USSD
3093 *
3094 * Only one USSD session may exist at a time, and the session is assumed
3095 * to exist until:
3096 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
3097 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
3098 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
3099 *
3100 * "data" is a const char * containing the USSD request in UTF-8 format
3101 * "response" is NULL
3102 *
3103 * Valid errors:
3104 * SUCCESS
3105 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07003106 * FDN_CHECK_FAILURE
Amit Mahajan54563d32014-11-22 00:54:49 +00003107 * USSD_MODIFIED_TO_DIAL
3108 * USSD_MODIFIED_TO_SS
3109 * USSD_MODIFIED_TO_USSD
twen.changdf7add02016-03-04 18:27:48 +08003110 * SIM_BUSY
3111 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07003112 * INVALID_ARGUMENTS
3113 * NO_MEMORY
3114 * MODEM_ERR
3115 * INTERNAL_ERR
3116 * ABORTED
3117 * SYSTEM_ERR
3118 * INVALID_STATE
sqiana216ed42017-06-20 11:54:31 -07003119 * NO_RESOURCES
3120 * CANCELLED
3121 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003122 *
3123 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
3124 */
3125
3126#define RIL_REQUEST_SEND_USSD 29
3127
3128/**
3129 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07003130 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003131 * Cancel the current USSD session if one exists
3132 *
3133 * "data" is null
3134 * "response" is NULL
3135 *
3136 * Valid errors:
3137 * SUCCESS
3138 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003139 * SIM_BUSY
3140 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07003141 * MODEM_ERR
3142 * INTERNAL_ERR
3143 * NO_MEMORY
3144 * INVALID_STATE
sqiana216ed42017-06-20 11:54:31 -07003145 * NO_RESOURCES
3146 * CANCELLED
3147 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003148 */
3149
3150#define RIL_REQUEST_CANCEL_USSD 30
3151
Wink Saville7f856802009-06-09 10:23:37 -07003152/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003153 * RIL_REQUEST_GET_CLIR
3154 *
3155 * Gets current CLIR status
3156 * "data" is NULL
3157 * "response" is int *
3158 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
3159 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
3160 *
3161 * Valid errors:
3162 * SUCCESS
3163 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003164 * SS_MODIFIED_TO_DIAL
3165 * SS_MODIFIED_TO_USSD
3166 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003167 * NO_MEMORY
3168 * MODEM_ERR
3169 * INTERNAL_ERR
3170 * FDN_CHECK_FAILURE
3171 * SYSTEM_ERR
sqiana216ed42017-06-20 11:54:31 -07003172 * NO_RESOURCES
3173 * CANCELLED
3174 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003175 */
3176#define RIL_REQUEST_GET_CLIR 31
3177
3178/**
3179 * RIL_REQUEST_SET_CLIR
3180 *
3181 * "data" is int *
3182 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
3183 *
3184 * "response" is NULL
3185 *
3186 * Valid errors:
3187 * SUCCESS
3188 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003189 * SS_MODIFIED_TO_DIAL
3190 * SS_MODIFIED_TO_USSD
3191 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003192 * INVALID_ARGUMENTS
3193 * SYSTEM_ERR
sqiana216ed42017-06-20 11:54:31 -07003194 * INTERNAL_ERR
3195 * NO_MEMORY
3196 * NO_RESOURCES
3197 * CANCELLED
3198 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003199 */
3200#define RIL_REQUEST_SET_CLIR 32
3201
3202/**
3203 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
3204 *
3205 * "data" is const RIL_CallForwardInfo *
3206 *
3207 * "response" is const RIL_CallForwardInfo **
3208 * "response" points to an array of RIL_CallForwardInfo *'s, one for
3209 * each distinct registered phone number.
3210 *
3211 * For example, if data is forwarded to +18005551212 and voice is forwarded
3212 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07003213 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003214 * If, however, both data and voice are forwarded to +18005551212, then
3215 * a single RIL_CallForwardInfo can be returned with the service class
3216 * set to "data + voice = 3")
3217 *
3218 * Valid errors:
3219 * SUCCESS
3220 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003221 * SS_MODIFIED_TO_DIAL
3222 * SS_MODIFIED_TO_USSD
3223 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003224 * INVALID_ARGUMENTS
3225 * NO_MEMORY
3226 * SYSTEM_ERR
3227 * MODEM_ERR
3228 * INTERNAL_ERR
3229 * NO_MEMORY
3230 * FDN_CHECK_FAILURE
sqiana216ed42017-06-20 11:54:31 -07003231 * NO_RESOURCES
3232 * CANCELLED
3233 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003234 */
3235#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
3236
3237
3238/**
3239 * RIL_REQUEST_SET_CALL_FORWARD
3240 *
3241 * Configure call forward rule
3242 *
3243 * "data" is const RIL_CallForwardInfo *
3244 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003245 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003246 * Valid errors:
3247 * SUCCESS
3248 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003249 * SS_MODIFIED_TO_DIAL
3250 * SS_MODIFIED_TO_USSD
3251 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003252 * INVALID_ARGUMENTS
3253 * NO_MEMORY
3254 * SYSTEM_ERR
3255 * MODEM_ERR
3256 * INTERNAL_ERR
3257 * INVALID_STATE
3258 * FDN_CHECK_FAILURE
sqiana216ed42017-06-20 11:54:31 -07003259 * NO_RESOURCES
3260 * CANCELLED
3261 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003262 */
3263#define RIL_REQUEST_SET_CALL_FORWARD 34
3264
3265
3266/**
3267 * RIL_REQUEST_QUERY_CALL_WAITING
3268 *
3269 * Query current call waiting state
3270 *
3271 * "data" is const int *
3272 * ((const int *)data)[0] is the TS 27.007 service class to query.
3273 * "response" is a const int *
3274 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
3275 *
3276 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
3277 * must follow, with the TS 27.007 service class bit vector of services
3278 * for which call waiting is enabled.
3279 *
Wink Saville7f856802009-06-09 10:23:37 -07003280 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003281 * ((const int *)response)[1] is 3, then call waiting is enabled for data
3282 * and voice and disabled for everything else
3283 *
3284 * Valid errors:
3285 * SUCCESS
3286 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003287 * SS_MODIFIED_TO_DIAL
3288 * SS_MODIFIED_TO_USSD
3289 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003290 * NO_MEMORY
3291 * MODEM_ERR
3292 * INTERNAL_ERR
3293 * NO_MEMORY
3294 * FDN_CHECK_FAILURE
3295 * INVALID_ARGUMENTS
sqiana216ed42017-06-20 11:54:31 -07003296 * NO_RESOURCES
3297 * CANCELLED
3298 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003299 */
3300#define RIL_REQUEST_QUERY_CALL_WAITING 35
3301
3302
3303/**
3304 * RIL_REQUEST_SET_CALL_WAITING
3305 *
3306 * Configure current call waiting state
3307 *
3308 * "data" is const int *
3309 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
3310 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
3311 * services to modify
3312 * "response" is NULL
3313 *
3314 * Valid errors:
3315 * SUCCESS
3316 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003317 * SS_MODIFIED_TO_DIAL
3318 * SS_MODIFIED_TO_USSD
3319 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003320 * INVALID_ARGUMENTS
3321 * NO_MEMORY
3322 * MODEM_ERR
3323 * INTERNAL_ERR
3324 * INVALID_STATE
3325 * FDN_CHECK_FAILURE
sqiana216ed42017-06-20 11:54:31 -07003326 * NO_RESOURCES
3327 * CANCELLED
3328 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003329 */
3330#define RIL_REQUEST_SET_CALL_WAITING 36
3331
3332/**
3333 * RIL_REQUEST_SMS_ACKNOWLEDGE
3334 *
3335 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07003336 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003337 *
3338 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07003339 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003340 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07003341 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003342 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07003343 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
3344 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
3345 * capacity exceeded) and 0xFF (unspecified error) are
3346 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003347 *
3348 * "response" is NULL
3349 *
3350 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
3351 *
3352 * Valid errors:
3353 * SUCCESS
3354 * RADIO_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07003355 * INTERNAL_ERR
3356 * NO_MEMORY
3357 * NO_RESOURCES
3358 * CANCELLED
3359 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003360 */
3361#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
3362
3363/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003364 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003365 *
3366 * Get the device IMEI, including check digit
3367 *
johnwangf8bc1672009-05-14 19:19:47 -07003368 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003369 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
3370 *
3371 * "data" is NULL
3372 * "response" is a const char * containing the IMEI
3373 *
3374 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003375 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003376 * RADIO_NOT_AVAILABLE (radio resetting)
Naina Nalluri67728582017-05-04 17:40:04 -07003377 * NO_MEMORY
3378 * INTERNAL_ERR
3379 * SYSTEM_ERR
3380 * MODEM_ERR
3381 * NOT_PROVISIONED
3382 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07003383 * NO_RESOURCES
3384 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003385 */
3386
3387#define RIL_REQUEST_GET_IMEI 38
3388
3389/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003390 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003391 *
3392 * Get the device IMEISV, which should be two decimal digits
3393 *
johnwangf8bc1672009-05-14 19:19:47 -07003394 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003395 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
3396 *
3397 * "data" is NULL
3398 * "response" is a const char * containing the IMEISV
3399 *
3400 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003401 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003402 * RADIO_NOT_AVAILABLE (radio resetting)
Naina Nalluri67728582017-05-04 17:40:04 -07003403 * NO_MEMORY
3404 * INTERNAL_ERR
3405 * SYSTEM_ERR
3406 * MODEM_ERR
3407 * NOT_PROVISIONED
3408 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07003409 * NO_RESOURCES
3410 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003411 */
3412
3413#define RIL_REQUEST_GET_IMEISV 39
3414
3415
3416/**
3417 * RIL_REQUEST_ANSWER
3418 *
3419 * Answer incoming call
3420 *
3421 * Will not be called for WAITING calls.
3422 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
3423 * instead
3424 *
3425 * "data" is NULL
3426 * "response" is NULL
3427 *
3428 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003429 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003430 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003431 * INVALID_STATE
3432 * NO_MEMORY
3433 * SYSTEM_ERR
3434 * MODEM_ERR
3435 * INTERNAL_ERR
3436 * INVALID_CALL_ID
sqiana216ed42017-06-20 11:54:31 -07003437 * NO_RESOURCES
3438 * CANCELLED
3439 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003440 */
3441
3442#define RIL_REQUEST_ANSWER 40
3443
3444/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003445 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003446 *
Wink Saville29487ef2011-04-15 09:15:31 -07003447 * Deactivate packet data connection and remove from the
3448 * data call list if SUCCESS is returned. Any other return
3449 * values should also try to remove the call from the list,
3450 * but that may not be possible. In any event a
3451 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
3452 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
3453 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003454 *
3455 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07003456 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06003457 * ((char**)data)[1] indicating Disconnect Reason
3458 * 0 => No specific reason specified
3459 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07003460 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003461 * "response" is NULL
3462 *
3463 * Valid errors:
3464 * SUCCESS
3465 * RADIO_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07003466 * INVALID_CALL_ID
3467 * INVALID_STATE
3468 * INVALID_ARGUMENTS
3469 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07003470 * INTERNAL_ERR
3471 * NO_MEMORY
3472 * NO_RESOURCES
3473 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003474 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003475 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003476 */
Wink Savillef4c4d362009-04-02 01:37:03 -07003477#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003478
3479/**
3480 * RIL_REQUEST_QUERY_FACILITY_LOCK
3481 *
3482 * Query the status of a facility lock state
3483 *
3484 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07003485 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003486 * (eg "AO" for BAOC, "SC" for SIM lock)
3487 * ((const char **)data)[1] is the password, or "" if not required
3488 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
3489 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08003490 * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
Wink Savillefd729372011-02-22 16:19:39 -08003491 * This is only applicable in the case of Fixed Dialing Numbers
3492 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003493 *
3494 * "response" is an int *
3495 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07003496 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003497 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07003498 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003499 *
3500 * Valid errors:
3501 * SUCCESS
3502 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003503 * SS_MODIFIED_TO_DIAL
3504 * SS_MODIFIED_TO_USSD
3505 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003506 * INVALID_ARGUMENTS
3507 * NO_MEMORY
3508 * INTERNAL_ERR
3509 * SYSTEM_ERR
3510 * MODEM_ERR
3511 * FDN_CHECK_FAILURE
sqiana216ed42017-06-20 11:54:31 -07003512 * NO_RESOURCES
3513 * CANCELLED
3514 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003515 *
3516 */
3517#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
3518
3519/**
3520 * RIL_REQUEST_SET_FACILITY_LOCK
3521 *
3522 * Enable/disable one facility lock
3523 *
3524 * "data" is const char **
3525 *
3526 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3527 * (eg "AO" for BAOC)
3528 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
3529 * ((const char **)data)[2] = password
3530 * ((const char **)data)[3] = string representation of decimal TS 27.007
3531 * service class bit vector. Eg, the string
3532 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08003533 * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
Wink Savillefd729372011-02-22 16:19:39 -08003534 * This is only applicable in the case of Fixed Dialing Numbers
3535 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003536 *
jsh593c9102009-06-24 16:13:44 -07003537 * "response" is int *
3538 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003539 *
3540 * Valid errors:
3541 * SUCCESS
3542 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003543 * SS_MODIFIED_TO_DIAL
3544 * SS_MODIFIED_TO_USSD
3545 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003546 * INVALID_ARGUMENTS
3547 * INTERNAL_ERR
3548 * NO_MEMORY
3549 * MODEM_ERR
3550 * INVALID_STATE
3551 * FDN_CHECK_FAILURE
sqiana216ed42017-06-20 11:54:31 -07003552 * NO_RESOURCES
3553 * CANCELLED
3554 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003555 *
3556 */
3557#define RIL_REQUEST_SET_FACILITY_LOCK 43
3558
3559/**
3560 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
3561 *
3562 * Change call barring facility password
3563 *
3564 * "data" is const char **
3565 *
3566 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3567 * (eg "AO" for BAOC)
3568 * ((const char **)data)[1] = old password
3569 * ((const char **)data)[2] = new password
3570 *
Wink Saville7f856802009-06-09 10:23:37 -07003571 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003572 *
3573 * Valid errors:
3574 * SUCCESS
3575 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003576 * SS_MODIFIED_TO_DIAL
3577 * SS_MODIFIED_TO_USSD
3578 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003579 * INVALID_ARGUMENTS
3580 * NO_MEMORY
3581 * MODEM_ERR
3582 * INTERNAL_ERR
3583 * SYSTEM_ERR
3584 * FDN_CHECK_FAILURE
sqiana216ed42017-06-20 11:54:31 -07003585 * NO_RESOURCES
3586 * CANCELLED
3587 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003588 *
3589 */
3590#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
3591
3592/**
3593 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
3594 *
3595 * Query current network selectin mode
3596 *
3597 * "data" is NULL
3598 *
3599 * "response" is int *
3600 * ((const int *)response)[0] is
3601 * 0 for automatic selection
3602 * 1 for manual selection
3603 *
3604 * Valid errors:
3605 * SUCCESS
3606 * RADIO_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07003607 * NO_MEMORY
3608 * INTERNAL_ERR
3609 * SYSTEM_ERR
3610 * INVALID_ARGUMENTS
3611 * MODEM_ERR
3612 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07003613 * NO_RESOURCES
3614 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003615 *
3616 */
3617#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
3618
3619/**
3620 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
3621 *
3622 * Specify that the network should be selected automatically
3623 *
3624 * "data" is NULL
3625 * "response" is NULL
3626 *
Wink Saville7f856802009-06-09 10:23:37 -07003627 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003628 * and registered
3629 *
3630 * Valid errors:
3631 * SUCCESS
3632 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003633 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003634 * OPERATION_NOT_ALLOWED
Naina Nalluri67728582017-05-04 17:40:04 -07003635 * NO_MEMORY
3636 * INTERNAL_ERR
3637 * SYSTEM_ERR
3638 * INVALID_ARGUMENTS
3639 * MODEM_ERR
3640 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07003641 * NO_RESOURCES
3642 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003643 *
John Wang75534472010-04-20 15:11:42 -07003644 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3645 * no retries needed, such as illegal SIM or ME.
John Wang75534472010-04-20 15:11:42 -07003646 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003647 */
3648#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
3649
3650/**
3651 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
3652 *
3653 * Manually select a specified network.
3654 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003655 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
3656 * "response" is NULL
3657 *
Wink Saville7f856802009-06-09 10:23:37 -07003658 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003659 * and registered
3660 *
3661 * Valid errors:
3662 * SUCCESS
3663 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003664 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003665 * OPERATION_NOT_ALLOWED
Naina Nalluri67728582017-05-04 17:40:04 -07003666 * INVALID_STATE
3667 * NO_MEMORY
3668 * INTERNAL_ERR
3669 * SYSTEM_ERR
3670 * INVALID_ARGUMENTS
3671 * MODEM_ERR
3672 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07003673 * NO_RESOURCES
3674 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003675 *
John Wang75534472010-04-20 15:11:42 -07003676 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3677 * no retries needed, such as illegal SIM or ME.
John Wang75534472010-04-20 15:11:42 -07003678 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003679 */
3680#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
3681
3682/**
3683 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
3684 *
3685 * Scans for available networks
3686 *
3687 * "data" is NULL
3688 * "response" is const char ** that should be an array of n*4 strings, where
3689 * n is the number of available networks
3690 * For each available network:
3691 *
Wink Saville7f856802009-06-09 10:23:37 -07003692 * ((const char **)response)[n+0] is long alpha ONS or EONS
3693 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003694 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
3695 * ((const char **)response)[n+3] is a string value of the status:
3696 * "unknown"
3697 * "available"
3698 * "current"
3699 * "forbidden"
3700 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003701 * Valid errors:
3702 * SUCCESS
3703 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003704 * OPERATION_NOT_ALLOWED
Jayachandran Cb0cba832017-03-13 19:17:18 -07003705 * ABORTED
3706 * DEVICE_IN_USE
3707 * INTERNAL_ERR
3708 * NO_MEMORY
3709 * MODEM_ERR
Naina Nalluri67728582017-05-04 17:40:04 -07003710 * REQUEST_NOT_SUPPORTED
3711 * CANCELLED
3712 * OPERATION_NOT_ALLOWED
sqiana216ed42017-06-20 11:54:31 -07003713 * NO_RESOURCES
3714 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003715 *
3716 */
3717#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
3718
3719/**
3720 * RIL_REQUEST_DTMF_START
3721 *
Wink Saville7f856802009-06-09 10:23:37 -07003722 * Start playing a DTMF tone. Continue playing DTMF tone until
3723 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003724 *
3725 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
3726 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07003727 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003728 * "data" is a char *
3729 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
3730 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003731 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003732 * Valid errors:
3733 * SUCCESS
3734 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003735 * INVALID_ARGUMENTS
3736 * NO_RESOURCES
3737 * NO_MEMORY
3738 * SYSTEM_ERR
3739 * MODEM_ERR
3740 * INTERNAL_ERR
3741 * INVALID_CALL_ID
sqiana216ed42017-06-20 11:54:31 -07003742 * CANCELLED
3743 * INVALID_MODEM_STATE
3744 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003745 *
3746 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
3747 */
3748#define RIL_REQUEST_DTMF_START 49
3749
3750/**
3751 * RIL_REQUEST_DTMF_STOP
3752 *
3753 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07003754 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003755 * "data" is NULL
3756 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003757 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003758 * Valid errors:
3759 * SUCCESS
3760 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003761 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07003762 * NO_RESOURCES
3763 * NO_MEMORY
3764 * INVALID_ARGUMENTS
3765 * SYSTEM_ERR
3766 * MODEM_ERR
3767 * INTERNAL_ERR
3768 * INVALID_CALL_ID
sqiana216ed42017-06-20 11:54:31 -07003769 * CANCELLED
3770 * INVALID_MODEM_STATE
3771 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003772 *
3773 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
3774 */
3775#define RIL_REQUEST_DTMF_STOP 50
3776
3777/**
3778 * RIL_REQUEST_BASEBAND_VERSION
3779 *
3780 * Return string value indicating baseband version, eg
3781 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07003782 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003783 * "data" is NULL
3784 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07003785 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003786 * Valid errors:
3787 * SUCCESS
3788 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003789 * EMPTY_RECORD
Naina Nalluri67728582017-05-04 17:40:04 -07003790 * NO_MEMORY
3791 * INTERNAL_ERR
3792 * SYSTEM_ERR
3793 * MODEM_ERR
3794 * NOT_PROVISIONED
3795 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07003796 * NO_RESOURCES
3797 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003798 *
3799 */
3800#define RIL_REQUEST_BASEBAND_VERSION 51
3801
3802/**
3803 * RIL_REQUEST_SEPARATE_CONNECTION
3804 *
3805 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07003806 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003807 * as the only other member of the current (active) call
3808 *
3809 * Like AT+CHLD=2x
3810 *
3811 * See TS 22.084 1.3.8.2 (iii)
3812 * TS 22.030 6.5.5 "Entering "2X followed by send"
3813 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07003814 *
3815 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07003816 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
3817 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003818 * "response" is NULL
3819 *
3820 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003821 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003822 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003823 * INVALID_ARGUMENTS
3824 * INVALID_STATE
3825 * NO_RESOURCES
3826 * NO_MEMORY
3827 * SYSTEM_ERR
3828 * MODEM_ERR
3829 * INTERNAL_ERR
3830 * INVALID_CALL_ID
3831 * INVALID_STATE
3832 * OPERATION_NOT_ALLOWED
sqiana216ed42017-06-20 11:54:31 -07003833 * CANCELLED
3834 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003835 */
3836#define RIL_REQUEST_SEPARATE_CONNECTION 52
3837
3838
3839/**
3840 * RIL_REQUEST_SET_MUTE
3841 *
3842 * Turn on or off uplink (microphone) mute.
3843 *
3844 * Will only be sent while voice call is active.
3845 * Will always be reset to "disable mute" when a new voice call is initiated
3846 *
3847 * "data" is an int *
3848 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
3849 *
3850 * "response" is NULL
3851 *
3852 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003853 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003854 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi68900f52016-03-11 12:02:55 -08003855 * INVALID_ARGUMENTS
3856 * NO_MEMORY
3857 * REQUEST_RATE_LIMITED
sqiana216ed42017-06-20 11:54:31 -07003858 * INTERNAL_ERR
3859 * NO_RESOURCES
3860 * CANCELLED
3861 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003862 */
3863
3864#define RIL_REQUEST_SET_MUTE 53
3865
3866/**
3867 * RIL_REQUEST_GET_MUTE
3868 *
3869 * Queries the current state of the uplink mute setting
3870 *
3871 * "data" is NULL
3872 * "response" is an int *
3873 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
3874 *
3875 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003876 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003877 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00003878 * SS_MODIFIED_TO_DIAL
3879 * SS_MODIFIED_TO_USSD
3880 * SS_MODIFIED_TO_SS
Ajay Nambi68900f52016-03-11 12:02:55 -08003881 * NO_MEMORY
3882 * REQUEST_RATE_LIMITED
sqiana216ed42017-06-20 11:54:31 -07003883 * INTERNAL_ERR
3884 * NO_RESOURCES
3885 * CANCELLED
3886 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003887 */
3888
3889#define RIL_REQUEST_GET_MUTE 54
3890
3891/**
3892 * RIL_REQUEST_QUERY_CLIP
3893 *
3894 * Queries the status of the CLIP supplementary service
3895 *
3896 * (for MMI code "*#30#")
3897 *
3898 * "data" is NULL
3899 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07003900 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003901 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07003902 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003903 *
3904 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003905 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003906 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003907 * NO_MEMORY
3908 * SYSTEM_ERR
3909 * MODEM_ERR
3910 * INTERNAL_ERR
3911 * FDN_CHECK_FAILURE
sqiana216ed42017-06-20 11:54:31 -07003912 * NO_RESOURCES
3913 * CANCELLED
3914 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003915 */
3916
3917#define RIL_REQUEST_QUERY_CLIP 55
3918
3919/**
Wink Savillec0114b32011-02-18 10:14:07 -08003920 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
3921 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003922 *
3923 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07003924 * context or CDMA data connection active
3925 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003926 *
3927 * "data" is NULL
3928 *
3929 * "response" is a "int *"
3930 * ((int *)response)[0] is an integer cause code defined in TS 24.008
3931 * section 6.1.3.1.3 or close approximation
3932 *
3933 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07003934 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08003935 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003936 * cases for error notification
3937 * and potential retries.
3938 *
3939 * Valid errors:
3940 * SUCCESS
3941 * RADIO_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07003942 * INTERNAL_ERR
3943 * NO_MEMORY
3944 * NO_RESOURCES
3945 * CANCELLED
3946 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003947 *
3948 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08003949 *
3950 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003951 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003952
Wink Savillef4c4d362009-04-02 01:37:03 -07003953#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003954
3955/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003956 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003957 *
Wink Saville29487ef2011-04-15 09:15:31 -07003958 * Returns the data call list. An entry is added when a
3959 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
3960 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
3961 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003962 *
3963 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08003964 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003965 *
3966 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003967 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003968 * RADIO_NOT_AVAILABLE (radio resetting)
sqiana216ed42017-06-20 11:54:31 -07003969 * INTERNAL_ERR
3970 * NO_MEMORY
3971 * NO_RESOURCES
3972 * CANCELLED
3973 * REQUEST_NOT_SUPPORTED
Wink Saville29487ef2011-04-15 09:15:31 -07003974 *
3975 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003976 */
3977
Wink Savillef4c4d362009-04-02 01:37:03 -07003978#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003979
3980/**
johnwangf8bc1672009-05-14 19:19:47 -07003981 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003982 *
3983 * Request a radio reset. The RIL implementation may postpone
3984 * the reset until after this request is responded to if the baseband
3985 * is presently busy.
3986 *
johnwangf8bc1672009-05-14 19:19:47 -07003987 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
3988 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003989 * "data" is NULL
3990 * "response" is NULL
3991 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003992 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003993 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003994 * RADIO_NOT_AVAILABLE (radio resetting)
johnwangf8bc1672009-05-14 19:19:47 -07003995 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003996 */
3997
3998#define RIL_REQUEST_RESET_RADIO 58
3999
4000/**
4001 * RIL_REQUEST_OEM_HOOK_RAW
4002 *
4003 * This request reserved for OEM-specific uses. It passes raw byte arrays
4004 * back and forth.
4005 *
Wink Saville7f856802009-06-09 10:23:37 -07004006 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004007 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
4008 *
4009 * "data" is a char * of bytes copied from the byte[] data argument in java
4010 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07004011 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004012 * (byte[])(((AsyncResult)response.obj).result)
4013 *
Wink Saville7f856802009-06-09 10:23:37 -07004014 * An error response here will result in
4015 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004016 * (((AsyncResult)response.obj).exception) being an instance of
4017 * com.android.internal.telephony.gsm.CommandException
4018 *
4019 * Valid errors:
4020 * All
4021 */
4022
4023#define RIL_REQUEST_OEM_HOOK_RAW 59
4024
4025/**
4026 * RIL_REQUEST_OEM_HOOK_STRINGS
4027 *
4028 * This request reserved for OEM-specific uses. It passes strings
4029 * back and forth.
4030 *
Wink Saville7f856802009-06-09 10:23:37 -07004031 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004032 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
4033 *
4034 * "data" is a const char **, representing an array of null-terminated UTF-8
4035 * strings copied from the "String[] strings" argument to
4036 * invokeOemRilRequestStrings()
4037 *
4038 * "response" is a const char **, representing an array of null-terminated UTF-8
4039 * stings that will be returned via the caller's response message here:
4040 *
4041 * (String[])(((AsyncResult)response.obj).result)
4042 *
Wink Saville7f856802009-06-09 10:23:37 -07004043 * An error response here will result in
4044 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004045 * (((AsyncResult)response.obj).exception) being an instance of
4046 * com.android.internal.telephony.gsm.CommandException
4047 *
4048 * Valid errors:
4049 * All
4050 */
4051
4052#define RIL_REQUEST_OEM_HOOK_STRINGS 60
4053
4054/**
Jack Yude8c8552017-01-24 12:03:52 -08004055 * RIL_REQUEST_SCREEN_STATE - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004056 *
4057 * Indicates the current state of the screen. When the screen is off, the
4058 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07004059 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
4060 * in an effort to conserve power. These notifications should resume when the
4061 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004062 *
Jack Yude8c8552017-01-24 12:03:52 -08004063 * Note this request is deprecated. Use RIL_REQUEST_SEND_DEVICE_STATE to report the device state
4064 * to the modem and use RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER to turn on/off unsolicited
4065 * response from the modem in different scenarios.
4066 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004067 * "data" is int *
4068 * ((int *)data)[0] is == 1 for "Screen On"
4069 * ((int *)data)[0] is == 0 for "Screen Off"
4070 *
4071 * "response" is NULL
4072 *
4073 * Valid errors:
4074 * SUCCESS
Naina Nalluri67728582017-05-04 17:40:04 -07004075 * NO_MEMORY
4076 * INTERNAL_ERR
4077 * SYSTEM_ERR
4078 * INVALID_ARGUMENTS
sqiana216ed42017-06-20 11:54:31 -07004079 * NO_RESOURCES
4080 * CANCELLED
Naina Nalluri67728582017-05-04 17:40:04 -07004081 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004082 */
4083#define RIL_REQUEST_SCREEN_STATE 61
4084
4085
4086/**
4087 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
4088 *
4089 * Enables/disables supplementary service related notifications
4090 * from the network.
4091 *
4092 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
4093 *
4094 * "data" is int *
4095 * ((int *)data)[0] is == 1 for notifications enabled
4096 * ((int *)data)[0] is == 0 for notifications disabled
4097 *
4098 * "response" is NULL
4099 *
4100 * Valid errors:
4101 * SUCCESS
4102 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004103 * SIM_BUSY
Ajay Nambi10345892016-03-19 09:02:28 -07004104 * INVALID_ARGUMENTS
4105 * NO_MEMORY
4106 * SYSTEM_ERR
4107 * MODEM_ERR
4108 * INTERNAL_ERR
sqiana216ed42017-06-20 11:54:31 -07004109 * NO_RESOURCES
4110 * CANCELLED
4111 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004112 *
4113 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
4114 */
4115#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
4116
4117/**
4118 * RIL_REQUEST_WRITE_SMS_TO_SIM
4119 *
4120 * Stores a SMS message to SIM memory.
4121 *
4122 * "data" is RIL_SMS_WriteArgs *
4123 *
4124 * "response" is int *
4125 * ((const int *)response)[0] is the record index where the message is stored.
4126 *
4127 * Valid errors:
4128 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08004129 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08004130 * INVALID_ARGUMENTS
4131 * INVALID_SMS_FORMAT
4132 * INTERNAL_ERR
4133 * MODEM_ERR
4134 * ENCODING_ERR
4135 * NO_MEMORY
4136 * NO_RESOURCES
4137 * INVALID_MODEM_STATE
4138 * MODE_NOT_SUPPORTED
4139 * INVALID_SMSC_ADDRESS
sqiana216ed42017-06-20 11:54:31 -07004140 * CANCELLED
4141 * INVALID_MODEM_STATE
4142 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004143 *
4144 */
4145#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
4146
4147/**
4148 * RIL_REQUEST_DELETE_SMS_ON_SIM
4149 *
4150 * Deletes a SMS message from SIM memory.
4151 *
4152 * "data" is int *
4153 * ((int *)data)[0] is the record index of the message to delete.
4154 *
4155 * "response" is NULL
4156 *
4157 * Valid errors:
4158 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08004159 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08004160 * INVALID_ARGUMENTS
4161 * NO_MEMORY
4162 * REQUEST_RATE_LIMITED
4163 * SYSTEM_ERR
4164 * MODEM_ERR
4165 * NO_SUCH_ENTRY
sqiana216ed42017-06-20 11:54:31 -07004166 * INTERNAL_ERR
4167 * NO_RESOURCES
4168 * CANCELLED
4169 * INVALID_MODEM_STATE
4170 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004171 *
4172 */
4173#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
4174
4175/**
4176 * RIL_REQUEST_SET_BAND_MODE
4177 *
4178 * Assign a specified band for RF configuration.
4179 *
4180 * "data" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08004181 * ((int *)data)[0] is a RIL_RadioBandMode
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004182 *
4183 * "response" is NULL
4184 *
4185 * Valid errors:
4186 * SUCCESS
4187 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004188 * OPERATION_NOT_ALLOWED
Naina Nalluri67728582017-05-04 17:40:04 -07004189 * NO_MEMORY
4190 * INTERNAL_ERR
4191 * SYSTEM_ERR
4192 * INVALID_ARGUMENTS
4193 * MODEM_ERR
4194 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07004195 * NO_RESOURCES
4196 * CANCELLED
Nathan Harold92839f12016-02-12 10:02:28 -08004197 *
4198 * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004199 */
4200#define RIL_REQUEST_SET_BAND_MODE 65
4201
4202/**
4203 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
4204 *
4205 * Query the list of band mode supported by RF.
4206 *
4207 * "data" is NULL
4208 *
4209 * "response" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08004210 * "response" points to an array of int's, the int[0] is the size of array;
4211 * subsequent values are a list of RIL_RadioBandMode listing supported modes.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004212 *
4213 * Valid errors:
4214 * SUCCESS
4215 * RADIO_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07004216 * NO_MEMORY
4217 * INTERNAL_ERR
4218 * SYSTEM_ERR
4219 * MODEM_ERR
4220 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07004221 * NO_RESOURCES
4222 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004223 *
4224 * See also: RIL_REQUEST_SET_BAND_MODE
4225 */
4226#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
4227
4228/**
4229 * RIL_REQUEST_STK_GET_PROFILE
4230 *
4231 * Requests the profile of SIM tool kit.
4232 * The profile indicates the SAT/USAT features supported by ME.
4233 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
4234 *
4235 * "data" is NULL
4236 *
4237 * "response" is a const char * containing SAT/USAT profile
4238 * in hexadecimal format string starting with first byte of terminal profile
4239 *
4240 * Valid errors:
4241 * RIL_E_SUCCESS
4242 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
sqiana216ed42017-06-20 11:54:31 -07004243 * INTERNAL_ERR
4244 * NO_MEMORY
4245 * NO_RESOURCES
4246 * CANCELLED
4247 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004248 */
4249#define RIL_REQUEST_STK_GET_PROFILE 67
4250
4251/**
4252 * RIL_REQUEST_STK_SET_PROFILE
4253 *
4254 * Download the STK terminal profile as part of SIM initialization
4255 * procedure
4256 *
4257 * "data" is a const char * containing SAT/USAT profile
4258 * in hexadecimal format string starting with first byte of terminal profile
4259 *
4260 * "response" is NULL
4261 *
4262 * Valid errors:
4263 * RIL_E_SUCCESS
4264 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
sqiana216ed42017-06-20 11:54:31 -07004265 * INTERNAL_ERR
4266 * NO_MEMORY
4267 * NO_RESOURCES
4268 * CANCELLED
4269 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004270 */
4271#define RIL_REQUEST_STK_SET_PROFILE 68
4272
4273/**
4274 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
4275 *
4276 * Requests to send a SAT/USAT envelope command to SIM.
4277 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
4278 *
4279 * "data" is a const char * containing SAT/USAT command
4280 * in hexadecimal format string starting with command tag
4281 *
4282 * "response" is a const char * containing SAT/USAT response
4283 * in hexadecimal format string starting with first byte of response
4284 * (May be NULL)
4285 *
4286 * Valid errors:
4287 * RIL_E_SUCCESS
4288 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08004289 * SIM_BUSY
4290 * OPERATION_NOT_ALLOWED
sqiana216ed42017-06-20 11:54:31 -07004291 * INTERNAL_ERR
4292 * NO_MEMORY
4293 * NO_RESOURCES
4294 * CANCELLED
4295 * INVALID_ARGUMENTS
4296 * MODEM_ERR
4297 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004298 */
4299#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
4300
4301/**
4302 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
4303 *
4304 * Requests to send a terminal response to SIM for a received
4305 * proactive command
4306 *
4307 * "data" is a const char * containing SAT/USAT response
4308 * in hexadecimal format string starting with first byte of response data
4309 *
4310 * "response" is NULL
4311 *
4312 * Valid errors:
4313 * RIL_E_SUCCESS
4314 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08004315 * RIL_E_OPERATION_NOT_ALLOWED
sqiana216ed42017-06-20 11:54:31 -07004316 * INTERNAL_ERR
4317 * NO_MEMORY
4318 * NO_RESOURCES
4319 * CANCELLED
4320 * INVALID_MODEM_STATE
4321 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004322 */
4323#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
4324
4325/**
4326 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
4327 *
4328 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
4329 * been initialized by ME already. (We could see the call has been in the 'call
4330 * list') So, STK application needs to accept/reject the call according as user
4331 * operations.
4332 *
4333 * "data" is int *
4334 * ((int *)data)[0] is > 0 for "accept" the call setup
4335 * ((int *)data)[0] is == 0 for "reject" the call setup
4336 *
4337 * "response" is NULL
4338 *
4339 * Valid errors:
4340 * RIL_E_SUCCESS
4341 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08004342 * RIL_E_OPERATION_NOT_ALLOWED
sqiana216ed42017-06-20 11:54:31 -07004343 * INTERNAL_ERR
4344 * NO_MEMORY
4345 * NO_RESOURCES
4346 * CANCELLED
4347 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004348 */
4349#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
4350
4351/**
4352 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
4353 *
4354 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07004355 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004356 * "data" is NULL
4357 * "response" is NULL
4358 *
4359 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07004360 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004361 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07004362 * INVALID_STATE
4363 * NO_RESOURCES
4364 * NO_MEMORY
4365 * INVALID_ARGUMENTS
4366 * SYSTEM_ERR
4367 * MODEM_ERR
4368 * INTERNAL_ERR
4369 * INVALID_CALL_ID
4370 * INVALID_STATE
4371 * OPERATION_NOT_ALLOWED
sqiana216ed42017-06-20 11:54:31 -07004372 * NO_RESOURCES
4373 * CANCELLED
4374 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004375 */
4376#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
4377
4378/**
4379 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
4380 *
4381 * Requests to set the preferred network type for searching and registering
4382 * (CS/PS domain, RAT, and operation mode)
4383 *
Wink Savillec0114b32011-02-18 10:14:07 -08004384 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004385 *
4386 * "response" is NULL
4387 *
4388 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07004389 * SUCCESS
4390 * RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08004391 * OPERATION_NOT_ALLOWED
Wink Savillef4c4d362009-04-02 01:37:03 -07004392 * MODE_NOT_SUPPORTED
Naina Nalluri67728582017-05-04 17:40:04 -07004393 * NO_MEMORY
4394 * INTERNAL_ERR
4395 * SYSTEM_ERR
4396 * INVALID_ARGUMENTS
4397 * MODEM_ERR
4398 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07004399 * NO_RESOURCES
4400 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004401 */
4402#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
4403
4404/**
4405 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
4406 *
4407 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
4408 * for searching and registering
4409 *
4410 * "data" is NULL
4411 *
4412 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08004413 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004414 *
4415 * Valid errors:
4416 * SUCCESS
4417 * RADIO_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07004418 * NO_MEMORY
4419 * INTERNAL_ERR
4420 * SYSTEM_ERR
4421 * INVALID_ARGUMENTS
4422 * MODEM_ERR
4423 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07004424 * NO_RESOURCES
4425 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004426 *
4427 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
4428 */
4429#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
4430
4431/**
4432 * RIL_REQUEST_NEIGHBORING_CELL_IDS
4433 *
4434 * Request neighboring cell id in GSM network
4435 *
4436 * "data" is NULL
4437 * "response" must be a " const RIL_NeighboringCell** "
4438 *
4439 * Valid errors:
4440 * SUCCESS
4441 * RADIO_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07004442 * NO_MEMORY
4443 * INTERNAL_ERR
4444 * SYSTEM_ERR
4445 * MODEM_ERR
4446 * NO_NETWORK_FOUND
4447 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07004448 * NO_RESOURCES
4449 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004450 */
4451#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
4452
4453/**
4454 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07004455 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004456 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07004457 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
4458 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004459 *
4460 * Note: The RIL implementation should default to "updates enabled"
4461 * when the screen is on and "updates disabled" when the screen is off.
4462 *
4463 * "data" is int *
4464 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
4465 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
4466 *
4467 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07004468 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004469 * Valid errors:
4470 * SUCCESS
4471 * RADIO_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07004472 * NO_MEMORY
4473 * INTERNAL_ERR
4474 * SYSTEM_ERR
4475 * INVALID_ARGUMENTS
4476 * MODEM_ERR
4477 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07004478 * NO_RESOURCES
4479 * CANCELLED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004480 *
4481 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
4482 */
4483#define RIL_REQUEST_SET_LOCATION_UPDATES 76
4484
Wink Savillef4c4d362009-04-02 01:37:03 -07004485/**
Wink Savillec0114b32011-02-18 10:14:07 -08004486 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07004487 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004488 * Request to set the location where the CDMA subscription shall
4489 * be retrieved
4490 *
4491 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08004492 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07004493 *
4494 * "response" is NULL
4495 *
4496 * Valid errors:
4497 * SUCCESS
4498 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07004499 * SIM_ABSENT
4500 * SUBSCRIPTION_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07004501 * INTERNAL_ERR
4502 * NO_MEMORY
4503 * NO_RESOURCES
4504 * CANCELLED
4505 * REQUEST_NOT_SUPPORTED
Wink Savillec0114b32011-02-18 10:14:07 -08004506 *
4507 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07004508 */
Wink Savillec0114b32011-02-18 10:14:07 -08004509#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07004510
4511/**
4512 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07004513 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004514 * Request to set the roaming preferences in CDMA
4515 *
4516 * "data" is int *
4517 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
4518 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
4519 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07004520 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004521 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004522 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004523 * Valid errors:
4524 * SUCCESS
4525 * RADIO_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07004526 * NO_MEMORY
4527 * INTERNAL_ERR
4528 * SYSTEM_ERR
4529 * INVALID_ARGUMENTS
4530 * MODEM_ERR
4531 * REQUEST_NOT_SUPPORTED
4532 * OPERATION_NOT_ALLOWED
sqiana216ed42017-06-20 11:54:31 -07004533 * NO_RESOURCES
4534 * CANCELLED
Wink Savillef4c4d362009-04-02 01:37:03 -07004535 */
4536#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
4537
4538/**
4539 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07004540 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004541 * Request the actual setting of the roaming preferences in CDMA in the modem
4542 *
4543 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004544 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004545 * "response" is int *
4546 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
4547 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
4548 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07004549 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004550 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004551 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004552 * Valid errors:
4553 * SUCCESS
4554 * RADIO_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07004555 * NO_MEMORY
4556 * INTERNAL_ERR
4557 * SYSTEM_ERR
4558 * INVALID_ARGUMENTS
4559 * MODEM_ERR
4560 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07004561 * NO_RESOURCES
4562 * CANCELLED
Wink Savillef4c4d362009-04-02 01:37:03 -07004563 */
4564#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
4565
4566/**
4567 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07004568 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004569 * Request to set the TTY mode
4570 *
4571 * "data" is int *
4572 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07004573 * ((int *)data)[0] is == 1 for TTY Full
4574 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
4575 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07004576 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004577 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004578 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004579 * Valid errors:
4580 * SUCCESS
4581 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004582 * INVALID_ARGUMENTS
4583 * MODEM_ERR
4584 * INTERNAL_ERR
sqiana216ed42017-06-20 11:54:31 -07004585 * NO_MEMORY
Ajay Nambi10345892016-03-19 09:02:28 -07004586 * INVALID_ARGUMENTS
4587 * MODEM_ERR
4588 * INTERNAL_ERR
sqiana216ed42017-06-20 11:54:31 -07004589 * NO_MEMORY
4590 * NO_RESOURCES
4591 * CANCELLED
4592 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004593 */
4594#define RIL_REQUEST_SET_TTY_MODE 80
4595
4596/**
4597 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07004598 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004599 * Request the setting of TTY mode
4600 *
4601 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004602 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004603 * "response" is int *
4604 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07004605 * ((int *)response)[0] is == 1 for TTY Full
4606 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
4607 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07004608 *
4609 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004610 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004611 * Valid errors:
4612 * SUCCESS
4613 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004614 * MODEM_ERR
4615 * INTERNAL_ERR
4616 * NO_MEMORY
4617 * INVALID_ARGUMENTS
sqiana216ed42017-06-20 11:54:31 -07004618 * NO_RESOURCES
4619 * CANCELLED
4620 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004621 */
4622#define RIL_REQUEST_QUERY_TTY_MODE 81
4623
4624/**
4625 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
4626 *
4627 * Request to set the preferred voice privacy mode used in voice
4628 * scrambling
4629 *
4630 * "data" is int *
4631 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
4632 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07004633 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004634 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004635 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004636 * Valid errors:
4637 * SUCCESS
4638 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004639 * INVALID_ARGUMENTS
4640 * SYSTEM_ERR
4641 * MODEM_ERR
4642 * INTERNAL_ERR
4643 * NO_MEMORY
4644 * INVALID_CALL_ID
sqiana216ed42017-06-20 11:54:31 -07004645 * NO_RESOURCES
4646 * CANCELLED
4647 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004648 */
4649#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
4650
4651/**
4652 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07004653 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004654 * Request the setting of preferred voice privacy mode
4655 *
4656 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004657 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004658 * "response" is int *
4659 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
4660 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07004661 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004662 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004663 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004664 * Valid errors:
4665 * SUCCESS
4666 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004667 * MODEM_ERR
4668 * INTERNAL_ERR
4669 * NO_MEMORY
4670 * INVALID_ARGUMENTS
sqiana216ed42017-06-20 11:54:31 -07004671 * NO_RESOURCES
4672 * CANCELLED
4673 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004674 */
4675#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
4676
4677/**
4678 * RIL_REQUEST_CDMA_FLASH
4679 *
4680 * Send FLASH
4681 *
4682 * "data" is const char *
4683 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07004684 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004685 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004686 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004687 * Valid errors:
4688 * SUCCESS
4689 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004690 * INVALID_ARGUMENTS
4691 * NO_MEMORY
4692 * SYSTEM_ERR
4693 * MODEM_ERR
4694 * INTERNAL_ERR
4695 * INVALID_CALL_ID
4696 * INVALID_STATE
sqiana216ed42017-06-20 11:54:31 -07004697 * NO_RESOURCES
4698 * CANCELLED
4699 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004700 *
4701 */
4702#define RIL_REQUEST_CDMA_FLASH 84
4703
4704/**
4705 * RIL_REQUEST_CDMA_BURST_DTMF
4706 *
4707 * Send DTMF string
4708 *
jsh602f80f2009-07-10 15:44:37 -07004709 * "data" is const char **
4710 * ((const char **)data)[0] is a DTMF string
4711 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
4712 * default
4713 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
4714 * default
Wink Saville7f856802009-06-09 10:23:37 -07004715 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004716 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004717 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004718 * Valid errors:
4719 * SUCCESS
4720 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004721 * INVALID_ARGUMENTS
4722 * NO_MEMORY
4723 * SYSTEM_ERR
4724 * MODEM_ERR
4725 * INTERNAL_ERR
4726 * INVALID_CALL_ID
sqiana216ed42017-06-20 11:54:31 -07004727 * NO_RESOURCES
4728 * CANCELLED
4729 * MODE_NOT_SUPPORTED
4730 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004731 *
4732 */
4733#define RIL_REQUEST_CDMA_BURST_DTMF 85
4734
4735/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004736 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07004737 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004738 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
4739 * If the checksum is valid the 20 digit AKEY is written to NV,
4740 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07004741 *
4742 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004743 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
4744 * where the last 6 digits are a checksum of the
4745 * first 20, as specified in TR45.AHAG
4746 * "Common Cryptographic Algorithms, Revision D.1
4747 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07004748 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004749 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004750 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004751 * Valid errors:
4752 * SUCCESS
4753 * RADIO_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07004754 * NO_MEMORY
4755 * INTERNAL_ERR
4756 * SYSTEM_ERR
4757 * INVALID_ARGUMENTS
4758 * MODEM_ERR
4759 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07004760 * NO_RESOURCES
4761 * CANCELLED
Wink Savillef4c4d362009-04-02 01:37:03 -07004762 *
4763 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004764#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07004765
4766/**
4767 * RIL_REQUEST_CDMA_SEND_SMS
4768 *
4769 * Send a CDMA SMS message
4770 *
4771 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07004772 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004773 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07004774 *
johnwangbfb151b2009-09-11 15:20:38 -07004775 * Based on the return error, caller decides to resend if sending sms
4776 * fails. The CDMA error class is derived as follows,
4777 * SUCCESS is error class 0 (no error)
4778 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
johnwangbfb151b2009-09-11 15:20:38 -07004779 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004780 * Valid errors:
4781 * SUCCESS
4782 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07004783 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08004784 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004785 * INVALID_STATE
4786 * INVALID_ARGUMENTS
4787 * NO_MEMORY
4788 * REQUEST_RATE_LIMITED
4789 * INVALID_SMS_FORMAT
4790 * SYSTEM_ERR
4791 * FDN_CHECK_FAILURE
4792 * MODEM_ERR
4793 * NETWORK_ERR
4794 * ENCODING_ERR
4795 * INVALID_SMSC_ADDRESS
4796 * MODE_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07004797 * NO_RESOURCES
4798 * CANCELLED
4799 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004800 *
4801 */
4802#define RIL_REQUEST_CDMA_SEND_SMS 87
4803
4804/**
4805 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4806 *
4807 * Acknowledge the success or failure in the receipt of SMS
4808 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4809 *
4810 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07004811 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004812 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004813 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004814 * Valid errors:
4815 * SUCCESS
4816 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004817 * INVALID_ARGUMENTS
4818 * NO_SMS_TO_ACK
4819 * INVALID_STATE
4820 * NO_MEMORY
4821 * REQUEST_RATE_LIMITED
4822 * SYSTEM_ERR
4823 * MODEM_ERR
4824 * INVALID_STATE
4825 * MODE_NOT_SUPPORTED
4826 * NETWORK_NOT_READY
4827 * INVALID_MODEM_STATE
sqiana216ed42017-06-20 11:54:31 -07004828 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004829 *
4830 */
4831#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
4832
4833/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004834 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004835 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004836 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
4837 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004838 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004839 *
4840 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
4841 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
4842 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004843 * Valid errors:
4844 * SUCCESS
4845 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004846 * INVALID_STATE
4847 * NO_MEMORY
4848 * REQUEST_RATE_LIMITED
4849 * SYSTEM_ERR
4850 * NO_RESOURCES
4851 * MODEM_ERR
4852 * SYSTEM_ERR
sqiana216ed42017-06-20 11:54:31 -07004853 * INTERNAL_ERR
4854 * NO_RESOURCES
4855 * CANCELLED
4856 * INVALID_MODEM_STATE
4857 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004858 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004859#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07004860
4861/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004862 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004863 *
4864 * Set GSM/WCDMA Cell Broadcast SMS config
4865 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004866 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
4867 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
4868 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004869 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004870 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004871 * Valid errors:
4872 * SUCCESS
4873 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004874 * INVALID_STATE
4875 * INVALID_ARGUMENTS
4876 * NO_MEMORY
4877 * SYSTEM_ERR
4878 * REQUEST_RATE_LIMITED
4879 * MODEM_ERR
4880 * SYSTEM_ERR
sqiana216ed42017-06-20 11:54:31 -07004881 * INTERNAL_ERR
4882 * NO_RESOURCES
4883 * CANCELLED
4884 * INVALID_MODEM_STATE
4885 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004886 *
4887 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004888#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07004889
4890/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004891 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004892 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004893* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07004894 *
4895 * "data" is const int *
4896 * (const int *)data[0] indicates to activate or turn off the
4897 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
4898 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004899 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004900 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004901 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004902 * Valid errors:
4903 * SUCCESS
4904 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004905 * INVALID_STATE
4906 * INVALID_ARGUMENTS
4907 * NO_MEMORY
4908 * SYSTEM_ERR
4909 * REQUEST_RATE_LIMITED
sqiana216ed42017-06-20 11:54:31 -07004910* MODEM_ERR
4911* INTERNAL_ERR
4912* NO_RESOURCES
4913* CANCELLED
4914* INVALID_MODEM_STATE
4915 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004916 *
4917 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004918#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07004919
4920/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004921 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004922 *
4923 * Request the setting of CDMA Broadcast SMS config
4924 *
4925 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004926 *
4927 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
4928 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
4929 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004930 * Valid errors:
4931 * SUCCESS
4932 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004933 * INVALID_STATE
4934 * NO_MEMORY
4935 * REQUEST_RATE_LIMITED
4936 * SYSTEM_ERR
4937 * NO_RESOURCES
4938 * MODEM_ERR
4939 * SYSTEM_ERR
sqiana216ed42017-06-20 11:54:31 -07004940 * INTERNAL_ERR
4941 * NO_RESOURCES
4942 * CANCELLED
4943 * INVALID_MODEM_STATE
4944 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004945 *
4946 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004947#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07004948
4949/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004950 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004951 *
4952 * Set CDMA Broadcast SMS config
4953 *
Jack Yude8c8552017-01-24 12:03:52 -08004954 * "data" is a const RIL_CDMA_BroadcastSmsConfigInfo **
Wink Savillea592eeb2009-05-22 13:26:36 -07004955 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
4956 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004957 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004958 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004959 * Valid errors:
4960 * SUCCESS
4961 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004962 * INVALID_STATE
4963 * INVALID_ARGUMENTS
4964 * NO_MEMORY
4965 * SYSTEM_ERR
4966 * REQUEST_RATE_LIMITED
4967 * MODEM_ERR
4968 * SYSTEM_ERR
sqiana216ed42017-06-20 11:54:31 -07004969 * INTERNAL_ERR
4970 * NO_RESOURCES
4971 * CANCELLED
4972 * INVALID_MODEM_STATE
4973 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004974 *
4975 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004976#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07004977
4978/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004979 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004980 *
4981 * Enable or disable the reception of CDMA Broadcast SMS
4982 *
4983 * "data" is const int *
4984 * (const int *)data[0] indicates to activate or turn off the
4985 * reception of CDMA Broadcast SMS, 0-1,
4986 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004987 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004988 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004989 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004990 * Valid errors:
4991 * SUCCESS
4992 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004993 * INVALID_STATE
4994 * INVALID_ARGUMENTS
4995 * NO_MEMORY
4996 * SYSTEM_ERR
4997 * REQUEST_RATE_LIMITED
4998 * MODEM_ERR
sqiana216ed42017-06-20 11:54:31 -07004999 * INTERNAL_ERR
5000 * NO_RESOURCES
5001 * CANCELLED
5002 * INVALID_MODEM_STATE
5003 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07005004 *
5005 */
Wink Savillea592eeb2009-05-22 13:26:36 -07005006#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07005007
5008/**
5009 * RIL_REQUEST_CDMA_SUBSCRIPTION
5010 *
5011 * Request the device MDN / H_SID / H_NID.
5012 *
5013 * The request is only allowed when CDMA subscription is available. When CDMA
5014 * subscription is changed, application layer should re-issue the request to
5015 * update the subscription information.
5016 *
5017 * If a NULL value is returned for any of the device id, it means that error
5018 * accessing the device.
5019 *
5020 * "response" is const char **
5021 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07005022 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
5023 * CDMA subscription is available, in decimal format
5024 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
5025 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07005026 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07005027 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07005028 *
5029 * Valid errors:
5030 * SUCCESS
5031 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07005032 * NO_MEMORY
5033 * INTERNAL_ERR
5034 * SYSTEM_ERR
5035 * INVALID_ARGUMENTS
5036 * MODEM_ERR
5037 * NOT_PROVISIONED
5038 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07005039 * INTERNAL_ERR
5040 * NO_RESOURCES
5041 * CANCELLED
Naina Nalluri67728582017-05-04 17:40:04 -07005042 *
Wink Savillef4c4d362009-04-02 01:37:03 -07005043 */
5044
Wink Savilleeafe79d2009-04-03 18:02:34 -07005045#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07005046
5047/**
5048 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
5049 *
5050 * Stores a CDMA SMS message to RUIM memory.
5051 *
5052 * "data" is RIL_CDMA_SMS_WriteArgs *
5053 *
5054 * "response" is int *
5055 * ((const int *)response)[0] is the record index where the message is stored.
5056 *
5057 * Valid errors:
5058 * SUCCESS
5059 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005060 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08005061 * INVALID_ARGUMENTS
5062 * INVALID_SMS_FORMAT
5063 * INTERNAL_ERR
5064 * MODEM_ERR
5065 * ENCODING_ERR
5066 * NO_MEMORY
5067 * NO_RESOURCES
5068 * INVALID_MODEM_STATE
5069 * MODE_NOT_SUPPORTED
5070 * INVALID_SMSC_ADDRESS
sqiana216ed42017-06-20 11:54:31 -07005071 * CANCELLED
5072 * INVALID_MODEM_STATE
5073 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07005074 *
5075 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07005076#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07005077
5078/**
5079 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
5080 *
5081 * Deletes a CDMA SMS message from RUIM memory.
5082 *
5083 * "data" is int *
5084 * ((int *)data)[0] is the record index of the message to delete.
5085 *
5086 * "response" is NULL
5087 *
5088 * Valid errors:
5089 * SUCCESS
5090 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08005091 * INVALID_ARGUMENTS
5092 * NO_MEMORY
5093 * REQUEST_RATE_LIMITED
5094 * SYSTEM_ERR
5095 * MODEM_ERR
5096 * NO_SUCH_ENTRY
sqiana216ed42017-06-20 11:54:31 -07005097 * INTERNAL_ERR
5098 * NO_RESOURCES
5099 * CANCELLED
5100 * INVALID_MODEM_STATE
5101 * REQUEST_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07005102 *
5103 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07005104#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07005105
5106/**
5107 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07005108 *
5109 * Request the device ESN / MEID / IMEI / IMEISV.
5110 *
Wink Savillef4c4d362009-04-02 01:37:03 -07005111 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07005112 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07005113 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07005114 *
5115 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07005116 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07005117 *
5118 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07005119 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07005120 *
Wink Savillef4c4d362009-04-02 01:37:03 -07005121 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07005122 * ((const char **)response)[0] is IMEI if GSM subscription is available
5123 * ((const char **)response)[1] is IMEISV if GSM subscription is available
5124 * ((const char **)response)[2] is ESN if CDMA subscription is available
5125 * ((const char **)response)[3] is MEID if CDMA subscription is available
5126 *
Wink Savillef4c4d362009-04-02 01:37:03 -07005127 * Valid errors:
5128 * SUCCESS
5129 * RADIO_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07005130 * NO_MEMORY
5131 * INTERNAL_ERR
5132 * SYSTEM_ERR
5133 * INVALID_ARGUMENTS
5134 * MODEM_ERR
5135 * NOT_PROVISIONED
5136 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07005137 * NO_RESOURCES
5138 * CANCELLED
Naina Nalluri67728582017-05-04 17:40:04 -07005139 *
Wink Savillef4c4d362009-04-02 01:37:03 -07005140 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07005141#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07005142
Wink Saville1b5fd232009-04-22 14:50:00 -07005143/**
5144 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
5145 *
5146 * Request the radio's system selection module to exit emergency
5147 * callback mode. RIL will not respond with SUCCESS until the modem has
5148 * completely exited from Emergency Callback Mode.
5149 *
5150 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07005151 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005152 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07005153 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005154 * Valid errors:
5155 * SUCCESS
5156 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005157 * OPERATION_NOT_ALLOWED
Naina Nalluri67728582017-05-04 17:40:04 -07005158 * NO_MEMORY
5159 * INTERNAL_ERR
5160 * SYSTEM_ERR
5161 * INVALID_ARGUMENTS
5162 * MODEM_ERR
5163 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07005164 * NO_RESOURCES
5165 * CANCELLED
Wink Saville1b5fd232009-04-22 14:50:00 -07005166 *
5167 */
5168#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07005169
jsh000a9fe2009-05-11 14:52:35 -07005170/**
5171 * RIL_REQUEST_GET_SMSC_ADDRESS
5172 *
5173 * Queries the default Short Message Service Center address on the device.
5174 *
5175 * "data" is NULL
5176 *
5177 * "response" is const char * containing the SMSC address.
5178 *
5179 * Valid errors:
5180 * SUCCESS
5181 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08005182 * NO_MEMORY
5183 * REQUEST_RATE_LIMITED
5184 * SYSTEM_ERR
5185 * INTERNAL_ERR
5186 * MODEM_ERR
5187 * INVALID_ARGUMENTS
5188 * INVALID_MODEM_STATE
5189 * NOT_PROVISIONED
sqiana216ed42017-06-20 11:54:31 -07005190 * NO_RESOURCES
5191 * CANCELLED
5192 * REQUEST_NOT_SUPPORTED
jsh000a9fe2009-05-11 14:52:35 -07005193 *
5194 */
5195#define RIL_REQUEST_GET_SMSC_ADDRESS 100
5196
5197/**
5198 * RIL_REQUEST_SET_SMSC_ADDRESS
5199 *
5200 * Sets the default Short Message Service Center address on the device.
5201 *
5202 * "data" is const char * containing the SMSC address.
5203 *
5204 * "response" is NULL
5205 *
5206 * Valid errors:
5207 * SUCCESS
5208 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08005209 * INVALID_ARGUMENTS
5210 * INVALID_SMS_FORMAT
5211 * NO_MEMORY
5212 * SYSTEM_ERR
5213 * REQUEST_RATE_LIMITED
5214 * MODEM_ERR
5215 * NO_RESOURCES
sqiana216ed42017-06-20 11:54:31 -07005216 * INTERNAL_ERR
5217 * CANCELLED
5218 * REQUEST_NOT_SUPPORTED
jsh000a9fe2009-05-11 14:52:35 -07005219 *
5220 */
5221#define RIL_REQUEST_SET_SMSC_ADDRESS 101
5222
jshb60444e2009-05-29 11:09:17 -07005223/**
5224 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
5225 *
5226 * Indicates whether there is storage available for new SMS messages.
5227 *
5228 * "data" is int *
5229 * ((int *)data)[0] is 1 if memory is available for storing new messages
5230 * is 0 if memory capacity is exceeded
5231 *
5232 * "response" is NULL
5233 *
5234 * Valid errors:
5235 * SUCCESS
5236 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08005237 * INVALID_ARGUMENTS
5238 * NO_MEMORY
5239 * INVALID_STATE
5240 * SYSTEM_ERR
5241 * REQUEST_RATE_LIMITED
5242 * MODEM_ERR
sqiana216ed42017-06-20 11:54:31 -07005243 * INTERNAL_ERR
5244 * NO_RESOURCES
5245 * CANCELLED
5246 * REQUEST_NOT_SUPPORTED
jshb60444e2009-05-29 11:09:17 -07005247 *
5248 */
5249#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
5250
Wink Saville2641d5b2009-06-08 17:40:42 -07005251/**
5252 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
5253 *
5254 * Indicates that the StkSerivce is running and is
5255 * ready to receive RIL_UNSOL_STK_XXXXX commands.
5256 *
5257 * "data" is NULL
5258 * "response" is NULL
5259 *
5260 * Valid errors:
5261 * SUCCESS
5262 * RADIO_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07005263 * INTERNAL_ERR
5264 * NO_MEMORY
5265 * NO_RESOURCES
5266 * CANCELLED
5267 * REQUEST_NOT_SUPPORTED
Wink Saville2641d5b2009-06-08 17:40:42 -07005268 *
5269 */
5270#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
5271
Wink Savillec0114b32011-02-18 10:14:07 -08005272/**
5273 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
5274 *
5275 * Request to query the location where the CDMA subscription shall
5276 * be retrieved
5277 *
5278 * "data" is NULL
5279 *
5280 * "response" is int *
5281 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
5282 *
5283 * Valid errors:
5284 * SUCCESS
5285 * RADIO_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08005286 * SUBSCRIPTION_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07005287 * INTERNAL_ERR
5288 * NO_MEMORY
5289 * NO_RESOURCES
5290 * CANCELLED
5291 * REQUEST_NOT_SUPPORTED
Wink Savillec0114b32011-02-18 10:14:07 -08005292 *
5293 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
5294 */
5295#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
5296
Jake Hambyfa8d5842011-08-19 16:22:18 -07005297/**
5298 * RIL_REQUEST_ISIM_AUTHENTICATION
5299 *
5300 * Request the ISIM application on the UICC to perform AKA
5301 * challenge/response algorithm for IMS authentication
5302 *
5303 * "data" is a const char * containing the challenge string in Base64 format
5304 * "response" is a const char * containing the response in Base64 format
5305 *
5306 * Valid errors:
5307 * SUCCESS
5308 * RADIO_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07005309 * INTERNAL_ERR
5310 * NO_MEMORY
5311 * NO_RESOURCES
5312 * CANCELLED
5313 * REQUEST_NOT_SUPPORTED
Jake Hambyfa8d5842011-08-19 16:22:18 -07005314 */
5315#define RIL_REQUEST_ISIM_AUTHENTICATION 105
5316
Jake Hamby300105d2011-09-26 01:01:44 -07005317/**
5318 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
5319 *
5320 * Acknowledge successful or failed receipt of SMS previously indicated
5321 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
5322 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
5323 *
5324 * "data" is const char **
5325 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
5326 * is "0" on failed receipt (send RP-ERROR)
5327 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
5328 *
5329 * "response" is NULL
5330 *
5331 * Valid errors:
5332 * SUCCESS
5333 * RADIO_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07005334 * INTERNAL_ERR
5335 * NO_MEMORY
5336 * NO_RESOURCES
5337 * CANCELLED
5338 * REQUEST_NOT_SUPPORTED
Jake Hamby300105d2011-09-26 01:01:44 -07005339 */
5340#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
5341
5342/**
5343 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
5344 *
5345 * Requests to send a SAT/USAT envelope command to SIM.
5346 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
5347 *
5348 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
5349 * the SW1 and SW2 status bytes from the UICC response are returned along with
5350 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
5351 *
5352 * The RIL implementation shall perform the normal processing of a '91XX'
5353 * response in SW1/SW2 to retrieve the pending proactive command and send it
5354 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
5355 *
5356 * "data" is a const char * containing the SAT/USAT command
5357 * in hexadecimal format starting with command tag
5358 *
5359 * "response" is a const RIL_SIM_IO_Response *
5360 *
5361 * Valid errors:
5362 * RIL_E_SUCCESS
5363 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08005364 * SIM_BUSY
5365 * OPERATION_NOT_ALLOWED
sqiana216ed42017-06-20 11:54:31 -07005366 * INTERNAL_ERR
5367 * NO_MEMORY
5368 * NO_RESOURCES
5369 * CANCELLED
5370 * REQUEST_NOT_SUPPORTED
Jake Hamby300105d2011-09-26 01:01:44 -07005371 */
5372#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
5373
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005374/**
5375 * RIL_REQUEST_VOICE_RADIO_TECH
5376 *
5377 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
Sooraj Sasindranb80acba2015-10-08 16:03:16 -07005378 * when radio state is not RADIO_STATE_UNAVAILABLE
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005379 *
5380 * "data" is NULL
5381 * "response" is int *
5382 * ((int *) response)[0] is of type const RIL_RadioTechnology
5383 *
5384 * Valid errors:
5385 * SUCCESS
5386 * RADIO_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07005387 * INTERNAL_ERR
5388 * NO_MEMORY
5389 * NO_RESOURCES
5390 * CANCELLED
5391 * REQUEST_NOT_SUPPORTED
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005392 */
5393#define RIL_REQUEST_VOICE_RADIO_TECH 108
5394
Wink Saville8a9e0212013-04-09 12:11:38 -07005395/**
5396 * RIL_REQUEST_GET_CELL_INFO_LIST
5397 *
5398 * Request all of the current cell information known to the radio. The radio
5399 * must a list of all current cells, including the neighboring cells. If for a particular
5400 * cell information isn't known then the appropriate unknown value will be returned.
5401 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
5402 *
5403 * "data" is NULL
5404 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08005405 * "response" is an array of RIL_CellInfo_v12.
Naina Nalluri67728582017-05-04 17:40:04 -07005406 *
5407 * Valid errors:
5408 * SUCCESS
5409 * RADIO_NOT_AVAILABLE
5410 * NO_MEMORY
5411 * INTERNAL_ERR
5412 * SYSTEM_ERR
5413 * MODEM_ERR
5414 * NO_NETWORK_FOUND
5415 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07005416 * NO_RESOURCES
5417 * CANCELLED
Naina Nalluri67728582017-05-04 17:40:04 -07005418 *
Wink Saville8a9e0212013-04-09 12:11:38 -07005419 */
5420#define RIL_REQUEST_GET_CELL_INFO_LIST 109
5421
5422/**
5423 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
5424 *
5425 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
Wink Savillec57b3eb2013-04-17 12:51:41 -07005426 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
Wink Saville8a9e0212013-04-09 12:11:38 -07005427 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
5428 * a RIL_UNSOL_CELL_INFO_LIST.
5429 *
5430 * "data" is int *
5431 * ((int *)data)[0] is minimum time in milliseconds
5432 *
5433 * "response" is NULL
5434 *
5435 * Valid errors:
5436 * SUCCESS
5437 * RADIO_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07005438 * NO_MEMORY
5439 * INTERNAL_ERR
5440 * SYSTEM_ERR
5441 * INVALID_ARGUMENTS
5442 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07005443 * NO_RESOURCES
5444 * CANCELLED
Wink Saville8a9e0212013-04-09 12:11:38 -07005445 */
5446#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
Jake Hamby300105d2011-09-26 01:01:44 -07005447
Sungmin Choi75697532013-04-26 15:04:45 -07005448/**
5449 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
5450 *
5451 * Set an apn to initial attach network
Ankit Nbc37e512016-12-07 21:05:43 +05305452 *
5453 * "data" is a const char **
5454 * ((const char **)data)[0] is the APN to connect if radio technology is LTE
5455 * ((const char **)data)[1] is the connection type to request must be one of the
5456 * PDP_type values in TS 27.007 section 10.1.1.
5457 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
5458 * ((const char **)data)[2] is the PAP / CHAP auth type. Values:
5459 * 0 => PAP and CHAP is never performed.
5460 * 1 => PAP may be performed; CHAP is never performed.
5461 * 2 => CHAP may be performed; PAP is never performed.
5462 * 3 => PAP / CHAP may be performed - baseband dependent.
5463 * ((const char **)data)[3] is the username for APN, or NULL
5464 * ((const char **)data)[4] is the password for APN, or NULL
5465 *
Sungmin Choi75697532013-04-26 15:04:45 -07005466 * "response" is NULL
5467 *
5468 * Valid errors:
5469 * SUCCESS
5470 * RADIO_NOT_AVAILABLE (radio resetting)
Sungmin Choi75697532013-04-26 15:04:45 -07005471 * SUBSCRIPTION_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07005472 * NO_MEMORY
5473 * INTERNAL_ERR
5474 * SYSTEM_ERR
5475 * INVALID_ARGUMENTS
5476 * MODEM_ERR
5477 * NOT_PROVISIONED
5478 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07005479 * NO_RESOURCES
5480 * CANCELLED
Naina Nalluri67728582017-05-04 17:40:04 -07005481 *
Sungmin Choi75697532013-04-26 15:04:45 -07005482 */
5483#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
5484
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005485/**
5486 * RIL_REQUEST_IMS_REGISTRATION_STATE
5487 *
Nathan Harold0eb43c22016-12-19 12:04:32 -08005488 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
5489 * instead, provide IMS registration status via an IMS Service.
5490 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005491 * Request current IMS registration state
5492 *
5493 * "data" is NULL
5494 *
5495 * "response" is int *
5496 * ((int *)response)[0] is registration state:
5497 * 0 - Not registered
5498 * 1 - Registered
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005499 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005500 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005501 * must follow with IMS SMS format:
5502 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005503 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
5504 *
5505 * Valid errors:
5506 * SUCCESS
5507 * RADIO_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07005508 * INTERNAL_ERR
5509 * NO_MEMORY
5510 * NO_RESOURCES
5511 * CANCELLED
5512 * INVALID_MODEM_STATE
5513 * REQUEST_NOT_SUPPORTED
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005514 */
5515#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
5516
5517/**
5518 * RIL_REQUEST_IMS_SEND_SMS
5519 *
5520 * Send a SMS message over IMS
5521 *
5522 * "data" is const RIL_IMS_SMS_Message *
5523 *
5524 * "response" is a const RIL_SMS_Response *
5525 *
5526 * Based on the return error, caller decides to resend if sending sms
5527 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
5528 * In case of retry, data is encoded based on Voice Technology available.
5529 *
5530 * Valid errors:
5531 * SUCCESS
5532 * RADIO_NOT_AVAILABLE
5533 * SMS_SEND_FAIL_RETRY
5534 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08005535 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08005536 * INVALID_ARGUMENTS
5537 * INVALID_STATE
5538 * NO_MEMORY
5539 * INVALID_SMS_FORMAT
5540 * SYSTEM_ERR
5541 * REQUEST_RATE_LIMITED
5542 * MODEM_ERR
5543 * NETWORK_ERR
5544 * ENCODING_ERR
5545 * INVALID_SMSC_ADDRESS
5546 * MODE_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07005547 * INTERNAL_ERR
5548 * NO_RESOURCES
5549 * CANCELLED
5550 * REQUEST_NOT_SUPPORTED
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005551 *
5552 */
5553#define RIL_REQUEST_IMS_SEND_SMS 113
5554
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08005555/**
5556 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
5557 *
5558 * Request APDU exchange on the basic channel. This command reflects TS 27.007
5559 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
5560 * of GSM/CDMA, and filter commands appropriately. It should filter
5561 * channel management and SELECT by DF name commands.
5562 *
5563 * "data" is a const RIL_SIM_APDU *
5564 * "sessionid" field should be ignored.
5565 *
5566 * "response" is a const RIL_SIM_IO_Response *
5567 *
5568 * Valid errors:
5569 * SUCCESS
5570 * RADIO_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07005571 * INTERNAL_ERR
5572 * NO_MEMORY
5573 * NO_RESOURCES
5574 * CANCELLED
5575 * REQUEST_NOT_SUPPORTED
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08005576 */
5577#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
5578
5579/**
5580 * RIL_REQUEST_SIM_OPEN_CHANNEL
5581 *
5582 * Open a new logical channel and select the given application. This command
Wileen Chiud6222e02015-11-23 14:25:22 -08005583 * reflects TS 27.007 "open logical channel" operation (+CCHO). This request
5584 * also specifies the P2 parameter (described in ISO 7816-4).
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08005585 *
Wileen Chiud6222e02015-11-23 14:25:22 -08005586 * "data" is a const RIL_OpenChannelParam *
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08005587 *
5588 * "response" is int *
5589 * ((int *)data)[0] contains the session id of the logical channel.
Shishir Agrawal760123f2014-10-14 09:14:57 -07005590 * ((int *)data)[1] onwards may optionally contain the select response for the
5591 * open channel command with one byte per integer.
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08005592 *
5593 * Valid errors:
5594 * SUCCESS
5595 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08005596 * MISSING_RESOURCE
5597 * NO_SUCH_ELEMENT
sqiana216ed42017-06-20 11:54:31 -07005598 * INTERNAL_ERR
5599 * NO_MEMORY
5600 * NO_RESOURCES
5601 * CANCELLED
5602 * SIM_ERR
5603 * INVALID_SIM_STATE
5604 * MISSING_RESOURCE
5605 * REQUEST_NOT_SUPPORTED
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08005606 */
5607#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
5608
5609/**
5610 * RIL_REQUEST_SIM_CLOSE_CHANNEL
5611 *
5612 * Close a previously opened logical channel. This command reflects TS 27.007
5613 * "close logical channel" operation (+CCHC).
5614 *
5615 * "data" is int *
5616 * ((int *)data)[0] is the session id of logical the channel to close.
5617 *
5618 * "response" is NULL
5619 *
5620 * Valid errors:
5621 * SUCCESS
5622 * RADIO_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07005623 * INTERNAL_ERR
5624 * NO_MEMORY
5625 * NO_RESOURCES
5626 * CANCELLED
5627 * REQUEST_NOT_SUPPORTED
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08005628 */
5629#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
5630
5631/**
5632 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
5633 *
5634 * Exchange APDUs with a UICC over a previously opened logical channel. This
5635 * command reflects TS 27.007 "generic logical channel access" operation
5636 * (+CGLA). The modem should filter channel management and SELECT by DF name
5637 * commands.
5638 *
5639 * "data" is a const RIL_SIM_APDU*
5640 *
5641 * "response" is a const RIL_SIM_IO_Response *
5642 *
5643 * Valid errors:
5644 * SUCCESS
5645 * RADIO_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07005646 * INTERNAL_ERR
5647 * NO_MEMORY
5648 * NO_RESOURCES
5649 * CANCELLED
5650 * REQUEST_NOT_SUPPORTED
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08005651 */
5652#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
5653
Jake Hamby8a4a2332014-01-15 13:12:05 -08005654/**
5655 * RIL_REQUEST_NV_READ_ITEM
5656 *
5657 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
5658 * This is used for device configuration by some CDMA operators.
5659 *
5660 * "data" is a const RIL_NV_ReadItem *
5661 *
5662 * "response" is const char * containing the contents of the NV item
5663 *
5664 * Valid errors:
5665 * SUCCESS
5666 * RADIO_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07005667 * REQUEST_NOT_SUPPORTED
Jake Hamby8a4a2332014-01-15 13:12:05 -08005668 */
5669#define RIL_REQUEST_NV_READ_ITEM 118
5670
5671/**
5672 * RIL_REQUEST_NV_WRITE_ITEM
5673 *
5674 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
5675 * This is used for device configuration by some CDMA operators.
5676 *
5677 * "data" is a const RIL_NV_WriteItem *
5678 *
5679 * "response" is NULL
5680 *
5681 * Valid errors:
5682 * SUCCESS
5683 * RADIO_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07005684 * REQUEST_NOT_SUPPORTED
Jake Hamby8a4a2332014-01-15 13:12:05 -08005685 */
5686#define RIL_REQUEST_NV_WRITE_ITEM 119
5687
5688/**
5689 * RIL_REQUEST_NV_WRITE_CDMA_PRL
5690 *
5691 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
5692 * This is used for device configuration by some CDMA operators.
5693 *
5694 * "data" is a const char * containing the PRL as a byte array
5695 *
5696 * "response" is NULL
5697 *
5698 * Valid errors:
5699 * SUCCESS
5700 * RADIO_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07005701 * REQUEST_NOT_SUPPORTED
Jake Hamby8a4a2332014-01-15 13:12:05 -08005702 */
5703#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
5704
5705/**
5706 * RIL_REQUEST_NV_RESET_CONFIG
5707 *
5708 * Reset the radio NV configuration to the factory state.
5709 * This is used for device configuration by some CDMA operators.
5710 *
5711 * "data" is int *
Jake Hambyd27c9d52014-02-06 14:52:05 -08005712 * ((int *)data)[0] is 1 to reload all NV items
5713 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
5714 * ((int *)data)[0] is 3 for factory reset (RTN)
Jake Hamby8a4a2332014-01-15 13:12:05 -08005715 *
5716 * "response" is NULL
5717 *
5718 * Valid errors:
5719 * SUCCESS
5720 * RADIO_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07005721 * REQUEST_NOT_SUPPORTED
Jake Hamby8a4a2332014-01-15 13:12:05 -08005722 */
5723#define RIL_REQUEST_NV_RESET_CONFIG 121
5724
Etan Cohend3652192014-06-20 08:28:44 -07005725 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
5726 * FIXME This API needs to have more documentation.
5727 *
5728 * Selection/de-selection of a subscription from a SIM card
5729 * "data" is const RIL_SelectUiccSub*
5730
5731 *
5732 * "response" is NULL
5733 *
5734 * Valid errors:
5735 * SUCCESS
5736 * RADIO_NOT_AVAILABLE (radio resetting)
Etan Cohend3652192014-06-20 08:28:44 -07005737 * SUBSCRIPTION_NOT_SUPPORTED
Naina Nalluri67728582017-05-04 17:40:04 -07005738 * NO_MEMORY
5739 * INTERNAL_ERR
5740 * SYSTEM_ERR
5741 * INVALID_ARGUMENTS
5742 * MODEM_ERR
5743 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07005744 * NO_RESOURCES
5745 * CANCELLED
Etan Cohend3652192014-06-20 08:28:44 -07005746 *
5747 */
5748#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
5749
5750/**
5751 * RIL_REQUEST_ALLOW_DATA
5752 *
5753 * Tells the modem whether data calls are allowed or not
5754 *
5755 * "data" is int *
5756 * FIXME slotId and aid will be added.
5757 * ((int *)data)[0] is == 0 to allow data calls
5758 * ((int *)data)[0] is == 1 to disallow data calls
5759 *
5760 * "response" is NULL
5761 *
5762 * Valid errors:
5763 *
5764 * SUCCESS
5765 * RADIO_NOT_AVAILABLE (radio resetting)
Naina Nalluri67728582017-05-04 17:40:04 -07005766 * NO_MEMORY
5767 * INTERNAL_ERR
5768 * SYSTEM_ERR
5769 * MODEM_ERR
5770 * INVALID_ARGUMENTS
5771 * DEVICE_IN_USE
5772 * INVALID_MODEM_STATE
5773 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07005774 * NO_RESOURCES
5775 * CANCELLED
Etan Cohend3652192014-06-20 08:28:44 -07005776 *
5777 */
5778#define RIL_REQUEST_ALLOW_DATA 123
5779
5780/**
5781 * RIL_REQUEST_GET_HARDWARE_CONFIG
5782 *
5783 * Request all of the current hardware (modem and sim) associated
5784 * with the RIL.
5785 *
5786 * "data" is NULL
5787 *
5788 * "response" is an array of RIL_HardwareConfig.
sqiana216ed42017-06-20 11:54:31 -07005789 *
5790 * Valid errors:
5791 * RADIO_NOT_AVAILABLE
5792 * REQUEST_NOT_SUPPORTED
Etan Cohend3652192014-06-20 08:28:44 -07005793 */
5794#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
5795
5796/**
Amit Mahajan2b772032014-06-26 14:20:11 -07005797 * RIL_REQUEST_SIM_AUTHENTICATION
Etan Cohend3652192014-06-20 08:28:44 -07005798 *
5799 * Returns the response of SIM Authentication through RIL to a
5800 * challenge request.
5801 *
5802 * "data" Base64 encoded string containing challenge:
5803 * int authContext; P2 value of authentication command, see P2 parameter in
5804 * 3GPP TS 31.102 7.1.2
5805 * char *authData; the challenge string in Base64 format, see 3GPP
5806 * TS 31.102 7.1.2
5807 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
5808 * NULL if no value
5809 *
5810 * "response" Base64 encoded strings containing response:
5811 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
5812 * int sw2;
5813 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
sqiana216ed42017-06-20 11:54:31 -07005814 *
5815 * Valid errors:
5816 * RADIO_NOT_AVAILABLE
5817 * INTERNAL_ERR
5818 * NO_MEMORY
5819 * NO_RESOURCES
5820 * CANCELLED
5821 * INVALID_MODEM_STATE
5822 * INVALID_ARGUMENTS
5823 * SIM_ERR
5824 * REQUEST_NOT_SUPPORTED
Etan Cohend3652192014-06-20 08:28:44 -07005825 */
Amit Mahajan2b772032014-06-26 14:20:11 -07005826#define RIL_REQUEST_SIM_AUTHENTICATION 125
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08005827
Wink Savillec29360a2014-07-13 05:17:28 -07005828/**
5829 * RIL_REQUEST_GET_DC_RT_INFO
5830 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005831 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005832 * Requests the Data Connection Real Time Info
5833 *
5834 * "data" is NULL
5835 *
5836 * "response" is the most recent RIL_DcRtInfo
5837 *
5838 * Valid errors:
5839 * SUCCESS
5840 * RADIO_NOT_AVAILABLE
Naina Nalluri67728582017-05-04 17:40:04 -07005841 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07005842 * INTERNAL_ERR
5843 * NO_MEMORY
5844 * NO_RESOURCES
5845 * CANCELLED
Wink Savillec29360a2014-07-13 05:17:28 -07005846 *
5847 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
5848 */
5849#define RIL_REQUEST_GET_DC_RT_INFO 126
5850
5851/**
5852 * RIL_REQUEST_SET_DC_RT_INFO_RATE
5853 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005854 * The request is DEPRECATED
Wink Savillec29360a2014-07-13 05:17:28 -07005855 * This is the minimum number of milliseconds between successive
5856 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
5857 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
5858 * 0 means send as fast as possible.
5859 *
5860 * "data" The number of milliseconds as an int
5861 *
5862 * "response" is null
5863 *
5864 * Valid errors:
5865 * SUCCESS must not fail
5866 */
5867#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
5868
Amit Mahajanc796e222014-08-13 16:54:01 +00005869/**
5870 * RIL_REQUEST_SET_DATA_PROFILE
5871 *
5872 * Set data profile in modem
Hui Wang8d679622014-10-16 14:59:27 -05005873 * Modem should erase existed profiles from framework, and apply new profiles
Jack Yude8c8552017-01-24 12:03:52 -08005874 * "data" is a const RIL_DataProfileInfo **
Amit Mahajanc796e222014-08-13 16:54:01 +00005875 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
5876 * "response" is NULL
5877 *
5878 * Valid errors:
5879 * SUCCESS
5880 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajanc796e222014-08-13 16:54:01 +00005881 * SUBSCRIPTION_NOT_AVAILABLE
sqiana216ed42017-06-20 11:54:31 -07005882 * INTERNAL_ERR
5883 * NO_MEMORY
5884 * NO_RESOURCES
5885 * CANCELLED
5886 * REQUEST_NOT_SUPPORTED
Amit Mahajanc796e222014-08-13 16:54:01 +00005887 */
5888#define RIL_REQUEST_SET_DATA_PROFILE 128
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005889
5890/**
5891 * RIL_REQUEST_SHUTDOWN
5892 *
5893 * Device is shutting down. All further commands are ignored
5894 * and RADIO_NOT_AVAILABLE must be returned.
5895 *
5896 * "data" is null
5897 * "response" is NULL
5898 *
5899 * Valid errors:
5900 * SUCCESS
5901 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005902 * OPERATION_NOT_ALLOWED
Naina Nalluri67728582017-05-04 17:40:04 -07005903 * NO_MEMORY
5904 * INTERNAL_ERR
5905 * SYSTEM_ERR
5906 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07005907 * NO_RESOURCES
5908 * CANCELLED
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005909 */
5910#define RIL_REQUEST_SHUTDOWN 129
5911
Wink Saville8b4e4f72014-10-17 15:01:45 -07005912/**
5913 * RIL_REQUEST_GET_RADIO_CAPABILITY
5914 *
5915 * Used to get phone radio capablility.
5916 *
Abhishek Adappa772c0d22015-02-09 11:11:12 -08005917 * "data" is the RIL_RadioCapability structure
Wink Saville8b4e4f72014-10-17 15:01:45 -07005918 *
5919 * Valid errors:
5920 * SUCCESS
5921 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005922 * OPERATION_NOT_ALLOWED
Naina Nalluri67728582017-05-04 17:40:04 -07005923 * INVALID_STATE
5924 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07005925 * INTERNAL_ERR
5926 * NO_MEMORY
5927 * NO_RESOURCES
5928 * CANCELLED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005929 */
5930#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
5931
5932/**
5933 * RIL_REQUEST_SET_RADIO_CAPABILITY
5934 *
5935 * Used to set the phones radio capability. Be VERY careful
5936 * using this request as it may cause some vendor modems to reset. Because
5937 * of the possible modem reset any RIL commands after this one may not be
5938 * processed.
5939 *
5940 * "data" is the RIL_RadioCapability structure
5941 *
5942 * "response" is the RIL_RadioCapability structure, used to feedback return status
5943 *
5944 * Valid errors:
5945 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
5946 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005947 * OPERATION_NOT_ALLOWED
Naina Nalluri67728582017-05-04 17:40:04 -07005948 * NO_MEMORY
5949 * INTERNAL_ERR
5950 * SYSTEM_ERR
5951 * INVALID_ARGUMENTS
5952 * MODEM_ERR
5953 * INVALID_STATE
5954 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07005955 * NO_RESOURCES
5956 * CANCELLED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005957 */
5958#define RIL_REQUEST_SET_RADIO_CAPABILITY 131
5959
fengluf7408292015-04-14 14:53:55 -07005960/**
5961 * RIL_REQUEST_START_LCE
5962 *
5963 * Start Link Capacity Estimate (LCE) service if supported by the radio.
5964 *
5965 * "data" is const int *
5966 * ((const int*)data)[0] specifies the desired reporting interval (ms).
fenglu290add32015-05-01 17:05:15 -07005967 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
fengluf7408292015-04-14 14:53:55 -07005968 *
fenglu290add32015-05-01 17:05:15 -07005969 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005970 *
5971 * Valid errors:
5972 * SUCCESS
5973 * RADIO_NOT_AVAILABLE
5974 * LCE_NOT_SUPPORTED
Naina Nalluri67728582017-05-04 17:40:04 -07005975 * INTERNAL_ERR
5976 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07005977 * NO_MEMORY
5978 * NO_RESOURCES
5979 * CANCELLED
fengluf7408292015-04-14 14:53:55 -07005980 */
5981#define RIL_REQUEST_START_LCE 132
5982
5983/**
5984 * RIL_REQUEST_STOP_LCE
5985 *
5986 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
5987 * idempotent for the radio modem.
5988 *
fenglu290add32015-05-01 17:05:15 -07005989 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005990 *
5991 * Valid errors:
5992 * SUCCESS
5993 * RADIO_NOT_AVAILABLE
5994 * LCE_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07005995 * INTERNAL_ERR
5996 * NO_MEMORY
5997 * NO_RESOURCES
5998 * CANCELLED
5999 * REQUEST_NOT_SUPPORTED
fengluf7408292015-04-14 14:53:55 -07006000 */
6001#define RIL_REQUEST_STOP_LCE 133
6002
6003/**
6004 * RIL_REQUEST_PULL_LCEDATA
6005 *
6006 * Pull LCE service for capacity information.
6007 *
fenglu290add32015-05-01 17:05:15 -07006008 * "response" is the RIL_LceDataInfo.
fengluf7408292015-04-14 14:53:55 -07006009 *
6010 * Valid errors:
6011 * SUCCESS
6012 * RADIO_NOT_AVAILABLE
6013 * LCE_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07006014 * INTERNAL_ERR
6015 * NO_MEMORY
6016 * NO_RESOURCES
6017 * CANCELLED
6018 * REQUEST_NOT_SUPPORTED
fengluf7408292015-04-14 14:53:55 -07006019 */
6020#define RIL_REQUEST_PULL_LCEDATA 134
6021
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07006022/**
6023 * RIL_REQUEST_GET_ACTIVITY_INFO
6024 *
Nathan Haroldc8635212016-10-10 11:15:21 -07006025 * Get modem activity information for power consumption estimation.
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07006026 *
Nathan Haroldc8635212016-10-10 11:15:21 -07006027 * Request clear-on-read statistics information that is used for
6028 * estimating the per-millisecond power consumption of the cellular
6029 * modem.
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07006030 *
6031 * "data" is null
6032 * "response" is const RIL_ActivityStatsInfo *
6033 *
6034 * Valid errors:
6035 *
6036 * SUCCESS
6037 * RADIO_NOT_AVAILABLE (radio resetting)
Naina Nalluri67728582017-05-04 17:40:04 -07006038 * NO_MEMORY
6039 * INTERNAL_ERR
6040 * SYSTEM_ERR
6041 * MODEM_ERR
6042 * NOT_PROVISIONED
6043 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07006044 * NO_RESOURCES CANCELLED
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07006045 */
6046#define RIL_REQUEST_GET_ACTIVITY_INFO 135
Naveen Kallaa65a16a2014-07-31 16:48:31 -07006047
Meng Wangb4e34312016-05-12 14:54:36 -07006048/**
6049 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS
6050 *
Meng Wangd5c540f2016-07-15 15:41:19 -07006051 * Set carrier restrictions for this sim slot. Expected modem behavior:
6052 * If never receives this command
6053 * - Must allow all carriers
6054 * Receives this command with data being NULL
6055 * - Must allow all carriers. If a previously allowed SIM is present, modem must not reload
6056 * the SIM. If a previously disallowed SIM is present, reload the SIM and notify Android.
6057 * Receives this command with a list of carriers
6058 * - Only allow specified carriers, persist across power cycles and FDR. If a present SIM
6059 * is in the allowed list, modem must not reload the SIM. If a present SIM is *not* in
6060 * the allowed list, modem must detach from the registered network and only keep emergency
6061 * service, and notify Android SIM refresh reset with new SIM state being
6062 * RIL_CARDSTATE_RESTRICTED. Emergency service must be enabled.
Meng Wangb4e34312016-05-12 14:54:36 -07006063 *
6064 * "data" is const RIL_CarrierRestrictions *
6065 * A list of allowed carriers and possibly a list of excluded carriers.
6066 * If data is NULL, means to clear previous carrier restrictions and allow all carriers
6067 *
6068 * "response" is int *
6069 * ((int *)data)[0] contains the number of allowed carriers which have been set correctly.
6070 * On success, it should match the length of list data->allowed_carriers.
6071 * If data is NULL, the value must be 0.
6072 *
6073 * Valid errors:
6074 * RIL_E_SUCCESS
6075 * RIL_E_INVALID_ARGUMENTS
6076 * RIL_E_RADIO_NOT_AVAILABLE
6077 * RIL_E_REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07006078 * INTERNAL_ERR
6079 * NO_MEMORY
6080 * NO_RESOURCES
6081 * CANCELLED
Meng Wangb4e34312016-05-12 14:54:36 -07006082 */
6083#define RIL_REQUEST_SET_CARRIER_RESTRICTIONS 136
6084
6085/**
6086 * RIL_REQUEST_GET_CARRIER_RESTRICTIONS
6087 *
Meng Wangd5c540f2016-07-15 15:41:19 -07006088 * Get carrier restrictions for this sim slot. Expected modem behavior:
6089 * Return list of allowed carriers, or null if all carriers are allowed.
Meng Wangb4e34312016-05-12 14:54:36 -07006090 *
6091 * "data" is NULL
6092 *
6093 * "response" is const RIL_CarrierRestrictions *.
6094 * If response is NULL, it means all carriers are allowed.
6095 *
6096 * Valid errors:
6097 * RIL_E_SUCCESS
6098 * RIL_E_RADIO_NOT_AVAILABLE
6099 * RIL_E_REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07006100 * INTERNAL_ERR
6101 * NO_MEMORY
6102 * NO_RESOURCES
6103 * CANCELLED
Meng Wangb4e34312016-05-12 14:54:36 -07006104 */
6105#define RIL_REQUEST_GET_CARRIER_RESTRICTIONS 137
6106
Jack Yude8c8552017-01-24 12:03:52 -08006107/**
6108 * RIL_REQUEST_SEND_DEVICE_STATE
6109 *
6110 * Send the updated device state.
6111 * Modem can perform power saving based on the provided device state.
6112 * "data" is const int *
6113 * ((const int*)data)[0] A RIL_DeviceStateType that specifies the device state type.
6114 * ((const int*)data)[1] Specifies the state. See RIL_DeviceStateType for the definition of each
6115 * type.
6116 *
6117 * "datalen" is count * sizeof(const RIL_DeviceState *)
6118 * "response" is NULL
6119 *
6120 * Valid errors:
6121 * SUCCESS
6122 * RADIO_NOT_AVAILABLE (radio resetting)
Naina Nalluri67728582017-05-04 17:40:04 -07006123 * NO_MEMORY
6124 * INTERNAL_ERR
6125 * SYSTEM_ERR
6126 * INVALID_ARGUMENTS
6127 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07006128 * NO_RESOURCES
6129 * CANCELLED
Jack Yude8c8552017-01-24 12:03:52 -08006130 */
6131#define RIL_REQUEST_SEND_DEVICE_STATE 138
6132
6133/**
6134 * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER
6135 *
6136 * Set the unsolicited response filter
6137 * This is used to prevent unnecessary application processor
6138 * wake up for power saving purposes by suppressing the
6139 * unsolicited responses in certain scenarios.
6140 *
6141 * "data" is an int *
6142 *
6143 * ((int *)data)[0] is a 32-bit bitmask of RIL_UnsolicitedResponseFilter
6144 *
6145 * "response" is NULL
6146 *
6147 * Valid errors:
6148 * SUCCESS
6149 * INVALID_ARGUMENTS (e.g. the requested filter doesn't exist)
6150 * RADIO_NOT_AVAILABLE (radio resetting)
Naina Nalluri67728582017-05-04 17:40:04 -07006151 * NO_MEMORY
6152 * INTERNAL_ERR
6153 * SYSTEM_ERR
6154 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07006155 * NO_RESOURCES
6156 * CANCELLED
Jack Yude8c8552017-01-24 12:03:52 -08006157 */
6158#define RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER 139
6159
Wileen Chiu35380a32017-01-04 11:37:19 -08006160 /**
6161 * RIL_REQUEST_SET_SIM_CARD_POWER
6162 *
6163 * Set SIM card power up or down
6164 *
6165 * Request is equivalent to inserting and removing the card, with
6166 * an additional effect where the ability to detect card removal/insertion
6167 * is disabled when the SIM card is powered down.
6168 *
6169 * This will generate RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
6170 * as if the SIM had been inserted or removed.
6171 *
6172 * "data" is int *
6173 * ((int *)data)[0] is 1 for "SIM POWER UP"
6174 * ((int *)data)[0] is 0 for "SIM POWER DOWN"
6175 *
6176 * "response" is NULL
6177 *
6178 * Valid errors:
6179 * SUCCESS
6180 * RADIO_NOT_AVAILABLE
6181 * REQUEST_NOT_SUPPORTED
6182 * SIM_ABSENT
6183 * INVALID_ARGUMENTS
sqiana216ed42017-06-20 11:54:31 -07006184 * INTERNAL_ERR
6185 * NO_MEMORY
6186 * NO_RESOURCES
6187 * CANCELLED
Wileen Chiu35380a32017-01-04 11:37:19 -08006188 */
6189#define RIL_REQUEST_SET_SIM_CARD_POWER 140
pkanwarc61837e2017-03-17 12:49:34 -07006190
6191/**
6192 * RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION
6193 *
6194 * Provide Carrier specific information to the modem that will be used to
6195 * encrypt the IMSI and IMPI. Sent by the framework during boot, carrier
6196 * switch and everytime we receive a new certificate.
6197 *
6198 * "data" is the RIL_CarrierInfoForImsiEncryption * structure.
6199 *
6200 * "response" is NULL
6201 *
6202 * Valid errors:
6203 * RIL_E_SUCCESS
6204 * RIL_E_RADIO_NOT_AVAILABLE
6205 * SIM_ABSENT
6206 * RIL_E_REQUEST_NOT_SUPPORTED
6207 * INVALID_ARGUMENTS
6208 * MODEM_INTERNAL_FAILURE
sqiana216ed42017-06-20 11:54:31 -07006209 * INTERNAL_ERR
6210 * NO_MEMORY
6211 * NO_RESOURCES
6212 * CANCELLED
pkanwarc61837e2017-03-17 12:49:34 -07006213 */
6214#define RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION 141
6215
yinxu7317bd42017-05-03 15:15:19 -07006216/**
6217 * RIL_REQUEST_START_NETWORK_SCAN
6218 *
6219 * Starts a new network scan
6220 *
6221 * Request to start a network scan with specified radio access networks with frequency bands and/or
6222 * channels.
6223 *
6224 * "data" is a const RIL_NetworkScanRequest *.
6225 * "response" is NULL
6226 *
6227 * Valid errors:
6228 * SUCCESS
6229 * RADIO_NOT_AVAILABLE
6230 * OPERATION_NOT_ALLOWED
6231 * DEVICE_IN_USE
6232 * INTERNAL_ERR
6233 * NO_MEMORY
6234 * MODEM_ERR
6235 * INVALID_ARGUMENTS
6236 * REQUEST_NOT_SUPPORTED
sqiana216ed42017-06-20 11:54:31 -07006237 * NO_RESOURCES
6238 * CANCELLED
yinxu7317bd42017-05-03 15:15:19 -07006239 *
6240 */
6241#define RIL_REQUEST_START_NETWORK_SCAN 142
6242
6243/**
6244 * RIL_REQUEST_STOP_NETWORK_SCAN
6245 *
6246 * Stops an ongoing network scan
6247 *
6248 * Request to stop the ongoing network scan. Since the modem can only perform one scan at a time,
6249 * there is no parameter for this request.
6250 *
6251 * "data" is NULL
6252 * "response" is NULL
6253 *
6254 * Valid errors:
6255 * SUCCESS
6256 * INTERNAL_ERR
6257 * MODEM_ERR
sqiana216ed42017-06-20 11:54:31 -07006258 * NO_MEMORY
6259 * NO_RESOURCES
6260 * CANCELLED
6261 * REQUEST_NOT_SUPPORTED
yinxu7317bd42017-05-03 15:15:19 -07006262 *
6263 */
6264#define RIL_REQUEST_STOP_NETWORK_SCAN 143
6265
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006266/***********************************************************************/
6267
Sanket Padawe6ff9a872016-01-27 15:09:12 -08006268/**
6269 * RIL_RESPONSE_ACKNOWLEDGEMENT
6270 *
6271 * This is used by Asynchronous solicited messages and Unsolicited messages
6272 * to acknowledge the receipt of those messages in RIL.java so that the ack
6273 * can be used to let ril.cpp to release wakelock.
6274 *
6275 * Valid errors
6276 * SUCCESS
6277 * RADIO_NOT_AVAILABLE
6278 */
6279
6280#define RIL_RESPONSE_ACKNOWLEDGEMENT 800
6281
6282/***********************************************************************/
6283
Wink Savillef4c4d362009-04-02 01:37:03 -07006284
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006285#define RIL_UNSOL_RESPONSE_BASE 1000
6286
6287/**
6288 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
6289 *
6290 * Indicate when value of RIL_RadioState has changed.
6291 *
6292 * Callee will invoke RIL_RadioStateRequest method on main thread
6293 *
6294 * "data" is NULL
6295 */
6296
6297#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
6298
6299
6300/**
6301 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
6302 *
6303 * Indicate when call state has changed
6304 *
6305 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
6306 *
6307 * "data" is NULL
6308 *
Wink Saville7f856802009-06-09 10:23:37 -07006309 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006310 * "RING", "BUSY", "NO CARRIER", and also call state
6311 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
6312 *
6313 * Redundent or extraneous invocations are tolerated
6314 */
6315#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
6316
6317
6318/**
Wink Savillec0114b32011-02-18 10:14:07 -08006319 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006320 *
Wink Savillec0114b32011-02-18 10:14:07 -08006321 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006322 *
6323 * Callee will invoke the following requests on main thread:
6324 *
Wink Savillec0114b32011-02-18 10:14:07 -08006325 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006326 * RIL_REQUEST_OPERATOR
6327 *
6328 * "data" is NULL
6329 *
6330 * FIXME should this happen when SIM records are loaded? (eg, for
6331 * EONS)
6332 */
Wink Savillec0114b32011-02-18 10:14:07 -08006333#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006334
6335/**
6336 * RIL_UNSOL_RESPONSE_NEW_SMS
6337 *
6338 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07006339 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006340 * "data" is const char *
6341 * This is a pointer to a string containing the PDU of an SMS-DELIVER
6342 * as an ascii string of hex digits. The PDU starts with the SMSC address
6343 * per TS 27.005 (+CMT:)
6344 *
6345 * Callee will subsequently confirm the receipt of thei SMS with a
6346 * RIL_REQUEST_SMS_ACKNOWLEDGE
6347 *
Wink Saville7f856802009-06-09 10:23:37 -07006348 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006349 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
6350 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
6351 */
6352
6353#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
6354
6355/**
6356 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
6357 *
6358 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07006359 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006360 * "data" is const char *
6361 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
6362 * as an ascii string of hex digits. The PDU starts with the SMSC address
6363 * per TS 27.005 (+CDS:).
6364 *
6365 * Callee will subsequently confirm the receipt of the SMS with a
6366 * RIL_REQUEST_SMS_ACKNOWLEDGE
6367 *
Wink Saville7f856802009-06-09 10:23:37 -07006368 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006369 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
6370 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
6371 */
6372
6373#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
6374
6375/**
6376 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
6377 *
6378 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07006379 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006380 * "data" is const int *
6381 * ((const int *)data)[0] contains the slot index on the SIM that contains
6382 * the new message
6383 */
6384
6385#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
6386
6387/**
6388 * RIL_UNSOL_ON_USSD
6389 *
6390 * Called when a new USSD message is received.
6391 *
6392 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07006393 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006394 * one of these string values:
6395 * "0" USSD-Notify -- text in ((const char **)data)[1]
6396 * "1" USSD-Request -- text in ((const char **)data)[1]
6397 * "2" Session terminated by network
6398 * "3" other local client (eg, SIM Toolkit) has responded
6399 * "4" Operation not supported
6400 * "5" Network timeout
6401 *
6402 * The USSD session is assumed to persist if the type code is "1", otherwise
6403 * the current session (if any) is assumed to have terminated.
6404 *
6405 * ((const char **)data)[1] points to a message string if applicable, which
6406 * should always be in UTF-8.
6407 */
6408#define RIL_UNSOL_ON_USSD 1006
6409/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
6410
6411/**
6412 * RIL_UNSOL_ON_USSD_REQUEST
6413 *
6414 * Obsolete. Send via RIL_UNSOL_ON_USSD
6415 */
Wink Saville7f856802009-06-09 10:23:37 -07006416#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006417
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006418/**
6419 * RIL_UNSOL_NITZ_TIME_RECEIVED
6420 *
6421 * Called when radio has received a NITZ time message
6422 *
6423 * "data" is const char * pointing to NITZ time string
6424 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
6425 */
6426#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
6427
6428/**
6429 * RIL_UNSOL_SIGNAL_STRENGTH
6430 *
6431 * Radio may report signal strength rather han have it polled.
6432 *
Wink Saville1b5fd232009-04-22 14:50:00 -07006433 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006434 */
6435#define RIL_UNSOL_SIGNAL_STRENGTH 1009
6436
6437
6438/**
Wink Savillef4c4d362009-04-02 01:37:03 -07006439 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006440 *
Wink Savillec0114b32011-02-18 10:14:07 -08006441 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07006442 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
6443 * of current data contexts including new contexts that have been
6444 * activated. A data call is only removed from this list when the
6445 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
6446 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006447 *
Wink Savillef4c4d362009-04-02 01:37:03 -07006448 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006449 */
6450
Wink Savillef4c4d362009-04-02 01:37:03 -07006451#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006452
6453/**
6454 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
6455 *
6456 * Reports supplementary service related notification from the network.
6457 *
6458 * "data" is a const RIL_SuppSvcNotification *
6459 *
6460 */
6461
6462#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
6463
6464/**
6465 * RIL_UNSOL_STK_SESSION_END
6466 *
6467 * Indicate when STK session is terminated by SIM.
6468 *
6469 * "data" is NULL
6470 */
6471#define RIL_UNSOL_STK_SESSION_END 1012
6472
6473/**
6474 * RIL_UNSOL_STK_PROACTIVE_COMMAND
6475 *
6476 * Indicate when SIM issue a STK proactive command to applications
6477 *
6478 * "data" is a const char * containing SAT/USAT proactive command
6479 * in hexadecimal format string starting with command tag
6480 *
6481 */
6482#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
6483
6484/**
6485 * RIL_UNSOL_STK_EVENT_NOTIFY
6486 *
6487 * Indicate when SIM notifies applcations some event happens.
6488 * Generally, application does not need to have any feedback to
6489 * SIM but shall be able to indicate appropriate messages to users.
6490 *
6491 * "data" is a const char * containing SAT/USAT commands or responses
6492 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
6493 * starting with first byte of response data or command tag
6494 *
6495 */
6496#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
6497
6498/**
6499 * RIL_UNSOL_STK_CALL_SETUP
6500 *
6501 * Indicate when SIM wants application to setup a voice call.
6502 *
6503 * "data" is const int *
6504 * ((const int *)data)[0] contains timeout value (in milliseconds)
6505 */
6506#define RIL_UNSOL_STK_CALL_SETUP 1015
6507
6508/**
6509 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
6510 *
6511 * Indicates that SMS storage on the SIM is full. Sent when the network
6512 * attempts to deliver a new SMS message. Messages cannot be saved on the
6513 * SIM until space is freed. In particular, incoming Class 2 messages
6514 * cannot be stored.
6515 *
6516 * "data" is null
6517 *
6518 */
6519#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
6520
6521/**
6522 * RIL_UNSOL_SIM_REFRESH
6523 *
6524 * Indicates that file(s) on the SIM have been updated, or the SIM
6525 * has been reinitialized.
6526 *
Alex Yakavenka45e740e2012-01-31 11:48:27 -08006527 * In the case where RIL is version 6 or older:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006528 * "data" is an int *
6529 * ((int *)data)[0] is a RIL_SimRefreshResult.
6530 * ((int *)data)[1] is the EFID of the updated file if the result is
Alex Yakavenka45e740e2012-01-31 11:48:27 -08006531 * SIM_FILE_UPDATE or NULL for any other result.
6532 *
6533 * In the case where RIL is version 7:
6534 * "data" is a RIL_SimRefreshResponse_v7 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006535 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08006536 * Note: If the SIM state changes as a result of the SIM refresh (eg,
6537 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006538 * should be sent.
6539 */
6540#define RIL_UNSOL_SIM_REFRESH 1017
6541
6542/**
6543 * RIL_UNSOL_CALL_RING
6544 *
6545 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07006546 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
6547 * of a call and sending multiple is optional. If the system property
6548 * ro.telephony.call_ring.multiple is false then the upper layers
6549 * will generate the multiple events internally. Otherwise the vendor
6550 * ril must generate multiple RIL_UNSOL_CALL_RING if
6551 * ro.telephony.call_ring.multiple is true or if it is absent.
6552 *
6553 * The rate of these events is controlled by ro.telephony.call_ring.delay
6554 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006555 *
Wink Saville3d54e742009-05-18 18:00:44 -07006556 * "data" is null for GSM
6557 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006558 */
6559#define RIL_UNSOL_CALL_RING 1018
6560
The Android Open Source Project34a51082009-03-05 14:34:37 -08006561/**
6562 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
6563 *
6564 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07006565 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08006566 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07006567
The Android Open Source Project34a51082009-03-05 14:34:37 -08006568 * "data" is null
6569 */
6570#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
6571
6572/**
6573 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
6574 *
6575 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07006576 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08006577 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07006578 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08006579 * Callee will subsequently confirm the receipt of the SMS with
6580 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07006581 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08006582 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
6583 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07006584 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08006585 */
6586#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
6587
6588/**
6589 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
6590 *
6591 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07006592 *
Henrik Hall0eba2022010-11-25 10:20:56 +01006593 * "data" can be one of the following:
6594 * If received from GSM network, "data" is const char of 88 bytes
6595 * which indicates each page of a CBS Message sent to the MS by the
6596 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
6597 * If received from UMTS network, "data" is const char of 90 up to 1252
6598 * bytes which contain between 1 and 15 CBS Message pages sent as one
6599 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2.
Wink Savillef4c4d362009-04-02 01:37:03 -07006600 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08006601 */
6602#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07006603
The Android Open Source Project34a51082009-03-05 14:34:37 -08006604/**
6605 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
6606 *
6607 * Indicates that SMS storage on the RUIM is full. Messages
6608 * cannot be saved on the RUIM until space is freed.
6609 *
6610 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07006611 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08006612 */
Wink Savillef4c4d362009-04-02 01:37:03 -07006613#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
6614
The Android Open Source Project34a51082009-03-05 14:34:37 -08006615/**
6616 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
6617 *
6618 * Indicates a restricted state change (eg, for Domain Specific Access Control).
6619 *
6620 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
6621 *
6622 * "data" is an int *
6623 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
6624 */
6625#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
6626
Wink Saville1b5fd232009-04-22 14:50:00 -07006627/**
6628 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
6629 *
6630 * Indicates that the radio system selection module has
6631 * autonomously entered emergency callback mode.
6632 *
6633 * "data" is null
6634 *
6635 */
6636#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08006637
Wink Saville1b5fd232009-04-22 14:50:00 -07006638/**
6639 * RIL_UNSOL_CDMA_CALL_WAITING
6640 *
6641 * Called when CDMA radio receives a call waiting indication.
6642 *
6643 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07006644 *
Wink Saville1b5fd232009-04-22 14:50:00 -07006645 */
6646#define RIL_UNSOL_CDMA_CALL_WAITING 1025
6647
6648/**
6649 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
6650 *
6651 * Called when CDMA radio receives an update of the progress of an
6652 * OTASP/OTAPA call.
6653 *
6654 * "data" is const int *
6655 * For CDMA this is an integer OTASP/OTAPA status listed in
6656 * RIL_CDMA_OTA_ProvisionStatus.
6657 *
6658 */
6659#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
6660
6661/**
6662 * RIL_UNSOL_CDMA_INFO_REC
6663 *
6664 * Called when CDMA radio receives one or more info recs.
6665 *
6666 * "data" is const RIL_CDMA_InformationRecords *
6667 *
6668 */
6669#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08006670
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07006671/**
6672 * RIL_UNSOL_OEM_HOOK_RAW
6673 *
6674 * This is for OEM specific use.
6675 *
6676 * "data" is a byte[]
6677 */
6678#define RIL_UNSOL_OEM_HOOK_RAW 1028
6679
John Wang5d621da2009-09-18 17:17:48 -07006680/**
6681 * RIL_UNSOL_RINGBACK_TONE
6682 *
6683 * Indicates that nework doesn't have in-band information, need to
6684 * play out-band tone.
6685 *
6686 * "data" is an int *
6687 * ((int *)data)[0] == 0 for stop play ringback tone.
6688 * ((int *)data)[0] == 1 for start play ringback tone.
6689 */
6690#define RIL_UNSOL_RINGBACK_TONE 1029
6691
John Wang5909cf82010-01-29 00:18:54 -08006692/**
6693 * RIL_UNSOL_RESEND_INCALL_MUTE
6694 *
6695 * Indicates that framework/application need reset the uplink mute state.
6696 *
6697 * There may be situations where the mute state becomes out of sync
6698 * between the application and device in some GSM infrastructures.
6699 *
6700 * "data" is null
6701 */
6702#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08006703
6704/**
6705 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
6706 *
6707 * Called when CDMA subscription source changed.
6708 *
6709 * "data" is int *
6710 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
6711 */
Wink Saville29487ef2011-04-15 09:15:31 -07006712#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08006713
6714/**
6715 * RIL_UNSOL_CDMA_PRL_CHANGED
6716 *
6717 * Called when PRL (preferred roaming list) changes.
6718 *
6719 * "data" is int *
6720 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
6721 */
6722#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
6723
6724/**
6725 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
6726 *
6727 * Called when Emergency Callback Mode Ends
6728 *
6729 * Indicates that the radio system selection module has
6730 * proactively exited emergency callback mode.
6731 *
6732 * "data" is NULL
6733 *
6734 */
6735#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
6736
Wink Saville5b9df332011-04-06 16:24:21 -07006737/**
6738 * RIL_UNSOL_RIL_CONNECTED
6739 *
6740 * Called the ril connects and returns the version
6741 *
6742 * "data" is int *
6743 * ((int *)data)[0] is RIL_VERSION
6744 */
6745#define RIL_UNSOL_RIL_CONNECTED 1034
6746
Naveen Kalla2bc78d62011-12-07 16:22:53 -08006747/**
6748 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
6749 *
6750 * Indicates that voice technology has changed. Contains new radio technology
6751 * as a data in the message.
6752 *
6753 * "data" is int *
6754 * ((int *)data)[0] is of type const RIL_RadioTechnology
6755 *
6756 */
6757#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
6758
Wink Saville8a9e0212013-04-09 12:11:38 -07006759/**
6760 * RIL_UNSOL_CELL_INFO_LIST
6761 *
6762 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
6763 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
6764 *
6765 * "data" is NULL
6766 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08006767 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07006768 */
6769#define RIL_UNSOL_CELL_INFO_LIST 1036
Naveen Kalla2bc78d62011-12-07 16:22:53 -08006770
Wink Saville865ce3b2013-11-08 16:37:01 -08006771/**
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07006772 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
6773 *
Nathan Harold0eb43c22016-12-19 12:04:32 -08006774 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
6775 * instead, provide IMS registration status via an IMS Service.
6776 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07006777 * Called when IMS registration state has changed
6778 *
Wink Saville865ce3b2013-11-08 16:37:01 -08006779 * To get IMS registration state and IMS SMS format, callee needs to invoke the
6780 * following request on main thread:
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07006781 *
Wink Saville865ce3b2013-11-08 16:37:01 -08006782 * RIL_REQUEST_IMS_REGISTRATION_STATE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07006783 *
Wink Saville865ce3b2013-11-08 16:37:01 -08006784 * "data" is NULL
6785 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07006786 */
6787#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
6788
Etan Cohend3652192014-06-20 08:28:44 -07006789/**
6790 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
6791 *
6792 * Indicated when there is a change in subscription status.
6793 * This event will be sent in the following scenarios
6794 * - subscription readiness at modem, which was selected by telephony layer
6795 * - when subscription is deactivated by modem due to UICC card removal
6796 * - When network invalidates the subscription i.e. attach reject due to authentication reject
6797 *
6798 * "data" is const int *
6799 * ((const int *)data)[0] == 0 for Subscription Deactivated
6800 * ((const int *)data)[0] == 1 for Subscription Activated
6801 *
6802 */
6803#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
6804
6805/**
6806 * RIL_UNSOL_SRVCC_STATE_NOTIFY
6807 *
6808 * Called when Single Radio Voice Call Continuity(SRVCC)
6809 * progress state has changed
6810 *
6811 * "data" is int *
6812 * ((int *)data)[0] is of type const RIL_SrvccState
6813 *
6814 */
6815
6816#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
6817
6818/**
6819 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
6820 *
6821 * Called when the hardware configuration associated with the RILd changes
6822 *
6823 * "data" is an array of RIL_HardwareConfig
6824 *
6825 */
6826#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
6827
Wink Savillec29360a2014-07-13 05:17:28 -07006828/**
6829 * RIL_UNSOL_DC_RT_INFO_CHANGED
6830 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07006831 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07006832 * Sent when the DC_RT_STATE changes but the time
6833 * between these messages must not be less than the
6834 * value set by RIL_REQUEST_SET_DC_RT_RATE.
6835 *
6836 * "data" is the most recent RIL_DcRtInfo
6837 *
6838 */
6839#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
6840
Wink Saville8b4e4f72014-10-17 15:01:45 -07006841/**
6842 * RIL_UNSOL_RADIO_CAPABILITY
6843 *
6844 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
6845 * Returns the phone radio capability exactly as
6846 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
6847 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
6848 *
6849 * "data" is the RIL_RadioCapability structure
6850 */
6851#define RIL_UNSOL_RADIO_CAPABILITY 1042
6852
Amit Mahajan54563d32014-11-22 00:54:49 +00006853/*
6854 * RIL_UNSOL_ON_SS
6855 *
6856 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
6857 * call control.
6858 *
6859 * "data" is const RIL_StkCcUnsolSsResponse *
6860 *
6861 */
6862#define RIL_UNSOL_ON_SS 1043
6863
6864/**
6865 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
6866 *
6867 * Called when there is an ALPHA from UICC during Call Control.
6868 *
6869 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
6870 *
6871 */
6872#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
6873
fengluf7408292015-04-14 14:53:55 -07006874/**
6875 * RIL_UNSOL_LCEDATA_RECV
6876 *
6877 * Called when there is an incoming Link Capacity Estimate (LCE) info report.
6878 *
fenglu290add32015-05-01 17:05:15 -07006879 * "data" is the RIL_LceDataInfo structure.
fengluf7408292015-04-14 14:53:55 -07006880 *
6881 */
6882#define RIL_UNSOL_LCEDATA_RECV 1045
6883
Robert Greenwalt27e99c52016-06-01 16:31:38 -07006884 /**
6885 * RIL_UNSOL_PCO_DATA
6886 *
6887 * Called when there is new Carrier PCO data received for a data call. Ideally
6888 * only new data will be forwarded, though this is not required. Multiple
6889 * boxes of carrier PCO data for a given call should result in a series of
6890 * RIL_UNSOL_PCO_DATA calls.
6891 *
6892 * "data" is the RIL_PCO_Data structure.
6893 *
6894 */
6895#define RIL_UNSOL_PCO_DATA 1046
6896
Naveen Kalla90ddf072016-09-14 13:41:04 -07006897 /**
6898 * RIL_UNSOL_MODEM_RESTART
6899 *
6900 * Called when there is a modem reset.
6901 *
6902 * "reason" is "const char *" containing the reason for the reset. It
6903 * could be a crash signature if the restart was due to a crash or some
6904 * string such as "user-initiated restart" or "AT command initiated
6905 * restart" that explains the cause of the modem restart.
6906 *
6907 * When modem restarts, one of the following radio state transitions will happen
6908 * 1) RADIO_STATE_ON->RADIO_STATE_UNAVAILABLE->RADIO_STATE_ON or
6909 * 2) RADIO_STATE_OFF->RADIO_STATE_UNAVAILABLE->RADIO_STATE_OFF
6910 * This message can be sent either just before the RADIO_STATE changes to RADIO_STATE_UNAVAILABLE
6911 * or just after but should never be sent after the RADIO_STATE changes from UNAVAILABLE to
6912 * AVAILABLE(RADIO_STATE_ON/RADIO_STATE_OFF) again.
6913 *
6914 * It should NOT be sent after the RADIO_STATE changes to AVAILABLE after the
6915 * modem restart as that could be interpreted as a second modem reset by the
6916 * framework.
6917 */
6918#define RIL_UNSOL_MODEM_RESTART 1047
6919
pkanwarc61837e2017-03-17 12:49:34 -07006920/**
6921 * RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION
6922 *
6923 * Called when the modem needs Carrier specific information that will
6924 * be used to encrypt IMSI and IMPI.
6925 *
6926 * "data" is NULL
6927 *
6928 */
pkanwar2a6951e2017-04-27 13:15:56 -07006929#define RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION 1048
pkanwarc61837e2017-03-17 12:49:34 -07006930
yinxu7317bd42017-05-03 15:15:19 -07006931/**
6932 * RIL_UNSOL_NETWORK_SCAN_RESULT
6933 *
6934 * Returns incremental result for the network scan which is started by
6935 * RIL_REQUEST_START_NETWORK_SCAN, sent to report results, status, or errors.
6936 *
6937 * "data" is NULL
6938 * "response" is a const RIL_NetworkScanResult *
6939 */
6940#define RIL_UNSOL_NETWORK_SCAN_RESULT 1049
6941
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006942/***********************************************************************/
6943
Amit Mahajan54563d32014-11-22 00:54:49 +00006944
Etan Cohend3652192014-06-20 08:28:44 -07006945#if defined(ANDROID_MULTI_SIM)
6946/**
6947 * RIL_Request Function pointer
6948 *
6949 * @param request is one of RIL_REQUEST_*
6950 * @param data is pointer to data defined for that RIL_REQUEST_*
6951 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07006952 * structures passed as data may contain pointers to non-contiguous memory
Etan Cohend3652192014-06-20 08:28:44 -07006953 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07006954 * @param datalen is the length of "data" which is defined as other argument. It may or may
6955 * not be equal to sizeof(data). Refer to the documentation of individual structures
6956 * to find if pointers listed in the structure are contiguous and counted in the datalen
6957 * length or not.
6958 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
Etan Cohend3652192014-06-20 08:28:44 -07006959 *
6960 */
6961typedef void (*RIL_RequestFunc) (int request, void *data,
6962 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
6963
6964/**
6965 * This function should return the current radio state synchronously
6966 */
6967typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
6968
6969#else
6970/* Backward compatible */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006971
6972/**
6973 * RIL_Request Function pointer
6974 *
6975 * @param request is one of RIL_REQUEST_*
6976 * @param data is pointer to data defined for that RIL_REQUEST_*
6977 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07006978 * structures passed as data may contain pointers to non-contiguous memory
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006979 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07006980 * @param datalen is the length of "data" which is defined as other argument. It may or may
6981 * not be equal to sizeof(data). Refer to the documentation of individual structures
6982 * to find if pointers listed in the structure are contiguous and counted in the datalen
6983 * length or not.
6984 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006985 *
6986 */
Wink Saville7f856802009-06-09 10:23:37 -07006987typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006988 size_t datalen, RIL_Token t);
6989
6990/**
6991 * This function should return the current radio state synchronously
6992 */
6993typedef RIL_RadioState (*RIL_RadioStateRequest)();
6994
Etan Cohend3652192014-06-20 08:28:44 -07006995#endif
6996
6997
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006998/**
6999 * This function returns "1" if the specified RIL_REQUEST code is
7000 * supported and 0 if it is not
7001 *
7002 * @param requestCode is one of RIL_REQUEST codes
7003 */
7004
7005typedef int (*RIL_Supports)(int requestCode);
7006
7007/**
Wink Saville7f856802009-06-09 10:23:37 -07007008 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007009 * thread that calls RIL_RequestFunc--and indicates that a pending
7010 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07007011 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007012 * On cancel, the callee should do its best to abandon the request and
7013 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
7014 *
7015 * Subsequent calls to RIL_onRequestComplete for this request with
7016 * other results will be tolerated but ignored. (That is, it is valid
7017 * to ignore the cancellation request)
7018 *
7019 * RIL_Cancel calls should return immediately, and not wait for cancellation
7020 *
Wink Saville7f856802009-06-09 10:23:37 -07007021 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007022 * interface
7023 *
7024 * @param t token wants to be canceled
7025 */
7026
7027typedef void (*RIL_Cancel)(RIL_Token t);
7028
7029typedef void (*RIL_TimedCallback) (void *param);
7030
7031/**
7032 * Return a version string for your RIL implementation
7033 */
7034typedef const char * (*RIL_GetVersion) (void);
7035
7036typedef struct {
7037 int version; /* set to RIL_VERSION */
7038 RIL_RequestFunc onRequest;
7039 RIL_RadioStateRequest onStateRequest;
7040 RIL_Supports supports;
7041 RIL_Cancel onCancel;
7042 RIL_GetVersion getVersion;
7043} RIL_RadioFunctions;
7044
Sungmin Choi75697532013-04-26 15:04:45 -07007045typedef struct {
Jack Yude8c8552017-01-24 12:03:52 -08007046 char *apn; /* the APN to connect to */
7047 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
7048 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/
7049 int authtype; /* authentication protocol used for this PDP context
7050 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */
7051 char *username; /* the username for APN, or NULL */
7052 char *password; /* the password for APN, or NULL */
Sungmin Choi75697532013-04-26 15:04:45 -07007053} RIL_InitialAttachApn;
7054
Amit Mahajan2b772032014-06-26 14:20:11 -07007055typedef struct {
Jack Yude8c8552017-01-24 12:03:52 -08007056 char *apn; /* the APN to connect to */
7057 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
7058 home network. For example, "IP", "IPV6", "IPV4V6", or "PPP". */
7059 char *roamingProtocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
7060 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/
7061 int authtype; /* authentication protocol used for this PDP context
7062 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */
7063 char *username; /* the username for APN, or NULL */
7064 char *password; /* the password for APN, or NULL */
7065 int supportedTypesBitmask; /* supported APN types bitmask. See RIL_ApnTypes for the value of
7066 each bit. */
7067 int bearerBitmask; /* the bearer bitmask. See RIL_RadioAccessFamily for the value of
7068 each bit. */
7069 int modemCognitive; /* indicating the APN setting was sent to the modem through
7070 setDataProfile earlier. */
7071 int mtu; /* maximum transmission unit (MTU) size in bytes */
7072 char *mvnoType; /* the MVNO type: possible values are "imsi", "gid", "spn" */
7073 char *mvnoMatchData; /* MVNO match data. Can be anything defined by the carrier.
7074 For example,
7075 SPN like: "A MOBILE", "BEN NL", etc...
7076 IMSI like: "302720x94", "2060188", etc...
7077 GID like: "4E", "33", etc... */
7078} RIL_InitialAttachApn_v15;
7079
7080typedef struct {
Amit Mahajan2b772032014-06-26 14:20:11 -07007081 int authContext; /* P2 value of authentication command, see P2 parameter in
7082 3GPP TS 31.102 7.1.2 */
7083 char *authData; /* the challenge string in Base64 format, see 3GPP
7084 TS 31.102 7.1.2 */
7085 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
7086 NULL if no value. */
7087} RIL_SimAuthentication;
7088
Robert Greenwalt17ea3fa2016-06-15 14:59:38 -07007089typedef struct {
Jack Yude8c8552017-01-24 12:03:52 -08007090 int cid; /* Context ID, uniquely identifies this call */
7091 char *bearer_proto; /* One of the PDP_type values in TS 27.007 section 10.1.1.
7092 For example, "IP", "IPV6", "IPV4V6". */
7093 int pco_id; /* The protocol ID for this box. Note that only IDs from
7094 FF00H - FFFFH are accepted. If more than one is included
7095 from the network, multiple calls should be made to send all
7096 of them. */
7097 int contents_length; /* The number of octets in the contents. */
7098 char *contents; /* Carrier-defined content. It is binary, opaque and
7099 loosely defined in LTE Layer 3 spec 24.008 */
Robert Greenwalt17ea3fa2016-06-15 14:59:38 -07007100} RIL_PCO_Data;
7101
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007102#ifdef RIL_SHLIB
7103struct RIL_Env {
7104 /**
7105 * "t" is parameter passed in on previous call to RIL_Notification
7106 * routine.
7107 *
7108 * If "e" != SUCCESS, then response can be null/is ignored
7109 *
Wink Saville7f856802009-06-09 10:23:37 -07007110 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007111 * freed by callee
7112 *
7113 * RIL_onRequestComplete will return as soon as possible
7114 */
Wink Saville7f856802009-06-09 10:23:37 -07007115 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007116 void *response, size_t responselen);
7117
Etan Cohend3652192014-06-20 08:28:44 -07007118#if defined(ANDROID_MULTI_SIM)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007119 /**
7120 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
7121 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
7122 *
7123 * "data" is owned by caller, and should not be modified or freed by callee
7124 */
Etan Cohend3652192014-06-20 08:28:44 -07007125 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
7126#else
7127 /**
7128 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
7129 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
7130 *
7131 * "data" is owned by caller, and should not be modified or freed by callee
7132 */
7133 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
7134#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007135 /**
Wink Saville7f856802009-06-09 10:23:37 -07007136 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007137 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
7138 * a relative time value at which the callback is invoked. If relativeTime is
7139 * NULL or points to a 0-filled structure, the callback will be invoked as
7140 * soon as possible
7141 */
7142
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07007143 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07007144 void *param, const struct timeval *relativeTime);
Sanket Padawe6ff9a872016-01-27 15:09:12 -08007145 /**
7146 * "t" is parameter passed in on previous call RIL_Notification routine
7147 *
7148 * RIL_onRequestAck will be called by vendor when an Async RIL request was received
7149 * by them and an ack needs to be sent back to java ril.
7150 */
7151 void (*OnRequestAck) (RIL_Token t);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007152};
7153
7154
Wink Saville7f856802009-06-09 10:23:37 -07007155/**
7156 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007157 * argc and argv will be command line arguments intended for the RIL implementation
7158 * Return NULL on error
7159 *
7160 * @param env is environment point defined as RIL_Env
7161 * @param argc number of arguments
7162 * @param argv list fo arguments
7163 *
7164 */
7165const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
7166
Sanket Padawe1be49ba2016-03-31 17:37:23 -07007167/**
7168 * If BT SAP(SIM Access Profile) is supported, then RIL implementations must define RIL_SAP_Init
7169 * for initializing RIL_RadioFunctions used for BT SAP communcations. It is called whenever RILD
7170 * starts or modem restarts. Returns handlers for SAP related request that are made on SAP
7171 * sepecific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init
7172 * and used on the general RIL socket.
7173 * argc and argv will be command line arguments intended for the RIL implementation
7174 * Return NULL on error.
7175 *
7176 * @param env is environment point defined as RIL_Env
7177 * @param argc number of arguments
7178 * @param argv list fo arguments
7179 *
7180 */
7181const RIL_RadioFunctions *RIL_SAP_Init(const struct RIL_Env *env, int argc, char **argv);
7182
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007183#else /* RIL_SHLIB */
7184
7185/**
7186 * Call this once at startup to register notification routine
7187 *
7188 * @param callbacks user-specifed callback function
7189 */
7190void RIL_register (const RIL_RadioFunctions *callbacks);
7191
Amit Mahajan18fe36b2016-08-25 11:19:21 -07007192void rilc_thread_pool();
7193
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007194
7195/**
7196 *
7197 * RIL_onRequestComplete will return as soon as possible
7198 *
7199 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07007200 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007201 * @param e error code
7202 * if "e" != SUCCESS, then response can be null/is ignored
7203 * @param response is owned by caller, and should not be modified or
7204 * freed by callee
7205 * @param responselen the length of response in byte
7206 */
Wink Saville7f856802009-06-09 10:23:37 -07007207void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007208 void *response, size_t responselen);
7209
Sanket Padawe6ff9a872016-01-27 15:09:12 -08007210/**
7211 * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and
7212 * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's
7213 * results, just that the command was received and will take a while. After sending this Ack
7214 * its vendor's responsibility to make sure that AP is up whenever needed while command is
7215 * being processed.
7216 *
7217 * @param t is parameter passed in on previous call to RIL_Notification
7218 * routine.
7219 */
7220void RIL_onRequestAck(RIL_Token t);
7221
Etan Cohend3652192014-06-20 08:28:44 -07007222#if defined(ANDROID_MULTI_SIM)
7223/**
7224 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
7225 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
7226 * "data" is owned by caller, and should not be modified or freed by callee
7227 * @param datalen the length of data in byte
7228 */
7229
7230void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
7231 size_t datalen, RIL_SOCKET_ID socket_id);
7232#else
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007233/**
7234 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
7235 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
7236 * "data" is owned by caller, and should not be modified or freed by callee
7237 * @param datalen the length of data in byte
7238 */
7239
Wink Saville7f856802009-06-09 10:23:37 -07007240void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007241 size_t datalen);
Etan Cohend3652192014-06-20 08:28:44 -07007242#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007243
7244/**
Wink Saville7f856802009-06-09 10:23:37 -07007245 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007246 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
7247 * a relative time value at which the callback is invoked. If relativeTime is
7248 * NULL or points to a 0-filled structure, the callback will be invoked as
7249 * soon as possible
7250 *
7251 * @param callback user-specifed callback function
7252 * @param param parameter list
7253 * @param relativeTime a relative time value at which the callback is invoked
7254 */
7255
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07007256void RIL_requestTimedCallback (RIL_TimedCallback callback,
7257 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007258
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08007259#endif /* RIL_SHLIB */
7260
7261#ifdef __cplusplus
7262}
7263#endif
7264
7265#endif /*ANDROID_RIL_H*/