blob: 2012403e7023f3c10caf0a7e6b5c68c108abd4d0 [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
Etan Cohend3652192014-06-20 08:28:44 -070034
35#if defined(ANDROID_SIM_COUNT_2)
36#define SIM_COUNT 2
37#elif defined(ANDROID_SIM_COUNT_3)
38#define SIM_COUNT 3
39#elif defined(ANDROID_SIM_COUNT_4)
40#define SIM_COUNT 4
41#else
42#define SIM_COUNT 1
43#endif
44
45#ifndef ANDROID_MULTI_SIM
46#define SIM_COUNT 1
47#endif
48
Sanket Padawe88cf6a52016-01-11 12:45:43 -080049/*
50 * RIL version.
51 * Value of RIL_VERSION should not be changed in future. Here onwards,
52 * when a new change is supposed to be introduced which could involve new
53 * schemes added like Wakelocks, data structures added/updated, etc, we would
54 * just document RIL version associated with that change below. When OEM updates its
55 * RIL with those changes, they would return that new RIL version during RIL_REGISTER.
56 * We should make use of the returned version by vendor to identify appropriate scheme
57 * or data structure version to use.
58 *
59 * Documentation of RIL version and associated changes
Sanket Padawef53c5fa2016-01-27 10:00:38 -080060 * RIL_VERSION = 12 : This version corresponds to updated data structures namely
Sanket Padawe88cf6a52016-01-11 12:45:43 -080061 * RIL_Data_Call_Response_v11, RIL_SIM_IO_v6, RIL_CardStatus_v6,
62 * RIL_SimRefreshResponse_v7, RIL_CDMA_CallWaiting_v6,
Sanket Padawe6ff9a872016-01-27 15:09:12 -080063 * RIL_LTE_SignalStrength_v8, RIL_SignalStrength_v10, RIL_CellIdentityGsm_v12
64 * RIL_CellIdentityWcdma_v12, RIL_CellIdentityLte_v12,RIL_CellInfoGsm_v12,
65 * RIL_CellInfoWcdma_v12, RIL_CellInfoLte_v12, RIL_CellInfo_v12.
Sanket Padawe88cf6a52016-01-11 12:45:43 -080066 *
Sanket Padawe6ff9a872016-01-27 15:09:12 -080067 * RIL_VERSION = 13 : This version includes new wakelock semantics and as the first
Robert Greenwalt27e99c52016-06-01 16:31:38 -070068 * strongly versioned version it enforces structure use.
Jack Yu06181bb2017-01-10 12:10:41 -080069 *
Robert Greenwalt27e99c52016-06-01 16:31:38 -070070 * RIL_VERSION = 14 : New data structures are added, namely RIL_CarrierMatchType,
71 * RIL_Carrier, RIL_CarrierRestrictions and RIL_PCO_Data.
72 * New commands added: RIL_REQUEST_SET_CARRIER_RESTRICTIONS,
Wileen Chiu718c0bf2017-01-04 11:37:19 -080073 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS and RIL_UNSOL_PCO_DATA.
Jack Yu06181bb2017-01-10 12:10:41 -080074 *
Wileen Chiu718c0bf2017-01-04 11:37:19 -080075 * RIL_VERSION = 15 : New commands added:
76 * RIL_REQUEST_SEND_DEVICE_STATE,
77 * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER,
pkanwarc61837e2017-03-17 12:49:34 -070078 * RIL_REQUEST_SET_SIM_CARD_POWER,
79 * RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION,
80 * RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION
Wileen Chiu718c0bf2017-01-04 11:37:19 -080081 * The new parameters for RIL_REQUEST_SETUP_DATA_CALL,
Jack Yu06181bb2017-01-10 12:10:41 -080082 * Updated data structures: RIL_DataProfileInfo_v15, RIL_InitialAttachApn_v15
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -080083 * New data structure RIL_DataRegistrationStateResponse,
84 * RIL_VoiceRegistrationStateResponse same is
85 * used in RIL_REQUEST_DATA_REGISTRATION_STATE and
86 * RIL_REQUEST_VOICE_REGISTRATION_STATE respectively.
Wileen Chiu410b7562015-11-23 14:25:22 -080087 * New data structure RIL_OpenChannelParams.
Sanket Padawe88cf6a52016-01-11 12:45:43 -080088 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -080089#define RIL_VERSION 12
90#define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
Alex Yakavenka45e740e2012-01-31 11:48:27 -080091#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080092
Wink Savillea592eeb2009-05-22 13:26:36 -070093#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
94#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
95
Etan Cohend3652192014-06-20 08:28:44 -070096#define MAX_RILDS 3
Amit Mahajan7955c432017-03-28 11:17:55 -070097#define MAX_SERVICE_NAME_LENGTH 6
Etan Cohend3652192014-06-20 08:28:44 -070098#define MAX_CLIENT_ID_LENGTH 2
99#define MAX_DEBUG_SOCKET_NAME_LENGTH 12
100#define MAX_QEMU_PIPE_NAME_LENGTH 11
Wink Saville8b4e4f72014-10-17 15:01:45 -0700101#define MAX_UUID_LENGTH 64
102
Etan Cohend3652192014-06-20 08:28:44 -0700103
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800104typedef void * RIL_Token;
105
106typedef enum {
Etan Cohend3652192014-06-20 08:28:44 -0700107 RIL_SOCKET_1,
108#if (SIM_COUNT >= 2)
109 RIL_SOCKET_2,
110#if (SIM_COUNT >= 3)
111 RIL_SOCKET_3,
112#endif
113#if (SIM_COUNT >= 4)
114 RIL_SOCKET_4,
115#endif
116#endif
117 RIL_SOCKET_NUM
118} RIL_SOCKET_ID;
119
120
121typedef enum {
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800122 RIL_E_SUCCESS = 0,
123 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
124 RIL_E_GENERIC_FAILURE = 2,
125 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
126 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
127 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
128 RIL_E_REQUEST_NOT_SUPPORTED = 6,
129 RIL_E_CANCELLED = 7,
130 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
131 call on a Class C GPRS device */
132 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
133 registers in network */
Wink Saville3d54e742009-05-18 18:00:44 -0700134 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
135 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
136 shall be retrieved because of SIM or RUIM
Wink Savillef4c4d362009-04-02 01:37:03 -0700137 card absent */
Wink Saville3d54e742009-05-18 18:00:44 -0700138 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
Wink Savillef4c4d362009-04-02 01:37:03 -0700139 location */
jsh602f80f2009-07-10 15:44:37 -0700140 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
John Wang75534472010-04-20 15:11:42 -0700141 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800142 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
John Wang75534472010-04-20 15:11:42 -0700143 illegal SIM or ME */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800144 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
Amit Mahajan54563d32014-11-22 00:54:49 +0000145 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
146 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
147 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
148 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
149 data */
150 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
151 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
152 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
153 request */
154 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
155 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
156 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
fengluf7408292015-04-14 14:53:55 -0700157 RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800158 RIL_E_LCE_NOT_SUPPORTED = 36, /* LCE service not supported(36 in RILConstants.java) */
159 RIL_E_NO_MEMORY = 37, /* Not sufficient memory to process the request */
Jayachandran Cb0cba832017-03-13 19:17:18 -0700160 RIL_E_INTERNAL_ERR = 38, /* Modem hit unexpected error scenario while handling
161 this request */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800162 RIL_E_SYSTEM_ERR = 39, /* Hit platform or system error */
Jayachandran Cb0cba832017-03-13 19:17:18 -0700163 RIL_E_MODEM_ERR = 40, /* Vendor RIL got unexpected or incorrect response
164 from modem for this request */
Ajay Nambi10345892016-03-19 09:02:28 -0700165 RIL_E_INVALID_STATE = 41, /* Unexpected request for the current state */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800166 RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */
167 RIL_E_SIM_ERR = 43, /* Received error from SIM card */
168 RIL_E_INVALID_ARGUMENTS = 44, /* Received invalid arguments in request */
169 RIL_E_INVALID_SIM_STATE = 45, /* Can not process the request in current SIM state */
170 RIL_E_INVALID_MODEM_STATE = 46, /* Can not process the request in current Modem state */
171 RIL_E_INVALID_CALL_ID = 47, /* Received invalid call id in request */
172 RIL_E_NO_SMS_TO_ACK = 48, /* ACK received when there is no SMS to ack */
Nathan Haroldc97b2842016-02-02 12:04:35 -0800173 RIL_E_NETWORK_ERR = 49, /* Received error from network */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800174 RIL_E_REQUEST_RATE_LIMITED = 50, /* Operation denied due to overly-frequent requests */
twen.changdf7add02016-03-04 18:27:48 +0800175 RIL_E_SIM_BUSY = 51, /* SIM is busy */
176 RIL_E_SIM_FULL = 52, /* The target EF is full */
177 RIL_E_NETWORK_REJECT = 53, /* Request is rejected by network */
178 RIL_E_OPERATION_NOT_ALLOWED = 54, /* Not allowed the request now */
179 RIL_E_EMPTY_RECORD = 55, /* The request record is empty */
Ajay Nambi68900f52016-03-11 12:02:55 -0800180 RIL_E_INVALID_SMS_FORMAT = 56, /* Invalid sms format */
181 RIL_E_ENCODING_ERR = 57, /* Message not encoded properly */
182 RIL_E_INVALID_SMSC_ADDRESS = 58, /* SMSC address specified is invalid */
183 RIL_E_NO_SUCH_ENTRY = 59, /* No such entry present to perform the request */
184 RIL_E_NETWORK_NOT_READY = 60, /* Network is not ready to perform the request */
185 RIL_E_NOT_PROVISIONED = 61, /* Device doesnot have this value provisioned */
Ajay Nambi10345892016-03-19 09:02:28 -0700186 RIL_E_NO_SUBSCRIPTION = 62, /* Device doesnot have subscription */
187 RIL_E_NO_NETWORK_FOUND = 63, /* Network cannot be found */
188 RIL_E_DEVICE_IN_USE = 64, /* Operation cannot be performed because the device
189 is currently in use */
190 RIL_E_ABORTED = 65, /* Operation aborted */
Sanket Padawef220dc52017-01-02 23:46:00 -0800191 RIL_E_INVALID_RESPONSE = 66, /* Invalid response sent by vendor code */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800192 // OEM specific error codes. To be used by OEM when they don't want to reveal
193 // specific error codes which would be replaced by Generic failure.
194 RIL_E_OEM_ERROR_1 = 501,
195 RIL_E_OEM_ERROR_2 = 502,
196 RIL_E_OEM_ERROR_3 = 503,
197 RIL_E_OEM_ERROR_4 = 504,
198 RIL_E_OEM_ERROR_5 = 505,
199 RIL_E_OEM_ERROR_6 = 506,
200 RIL_E_OEM_ERROR_7 = 507,
201 RIL_E_OEM_ERROR_8 = 508,
202 RIL_E_OEM_ERROR_9 = 509,
203 RIL_E_OEM_ERROR_10 = 510,
204 RIL_E_OEM_ERROR_11 = 511,
205 RIL_E_OEM_ERROR_12 = 512,
206 RIL_E_OEM_ERROR_13 = 513,
207 RIL_E_OEM_ERROR_14 = 514,
208 RIL_E_OEM_ERROR_15 = 515,
209 RIL_E_OEM_ERROR_16 = 516,
210 RIL_E_OEM_ERROR_17 = 517,
211 RIL_E_OEM_ERROR_18 = 518,
212 RIL_E_OEM_ERROR_19 = 519,
213 RIL_E_OEM_ERROR_20 = 520,
214 RIL_E_OEM_ERROR_21 = 521,
215 RIL_E_OEM_ERROR_22 = 522,
216 RIL_E_OEM_ERROR_23 = 523,
217 RIL_E_OEM_ERROR_24 = 524,
218 RIL_E_OEM_ERROR_25 = 525
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800219} RIL_Errno;
220
221typedef enum {
222 RIL_CALL_ACTIVE = 0,
223 RIL_CALL_HOLDING = 1,
224 RIL_CALL_DIALING = 2, /* MO call only */
225 RIL_CALL_ALERTING = 3, /* MO call only */
226 RIL_CALL_INCOMING = 4, /* MT call only */
227 RIL_CALL_WAITING = 5 /* MT call only */
228} RIL_CallState;
229
230typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -0700231 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
232 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800233 RADIO_STATE_ON = 10 /* Radio is on */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800234} RIL_RadioState;
235
Wink Saville43808972011-01-13 17:39:51 -0800236typedef enum {
237 RADIO_TECH_UNKNOWN = 0,
238 RADIO_TECH_GPRS = 1,
239 RADIO_TECH_EDGE = 2,
240 RADIO_TECH_UMTS = 3,
241 RADIO_TECH_IS95A = 4,
242 RADIO_TECH_IS95B = 5,
243 RADIO_TECH_1xRTT = 6,
244 RADIO_TECH_EVDO_0 = 7,
245 RADIO_TECH_EVDO_A = 8,
246 RADIO_TECH_HSDPA = 9,
247 RADIO_TECH_HSUPA = 10,
248 RADIO_TECH_HSPA = 11,
249 RADIO_TECH_EVDO_B = 12,
250 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800251 RADIO_TECH_LTE = 14,
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800252 RADIO_TECH_HSPAP = 15, // HSPA+
Etan Cohend3652192014-06-20 08:28:44 -0700253 RADIO_TECH_GSM = 16, // Only supports voice
Yashdev Singh3c8f37c2015-02-23 13:04:28 -0800254 RADIO_TECH_TD_SCDMA = 17,
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700255 RADIO_TECH_IWLAN = 18,
256 RADIO_TECH_LTE_CA = 19
Wink Saville43808972011-01-13 17:39:51 -0800257} RIL_RadioTechnology;
258
Wink Saville8b4e4f72014-10-17 15:01:45 -0700259typedef enum {
260 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
261 RAF_GPRS = (1 << RADIO_TECH_GPRS),
262 RAF_EDGE = (1 << RADIO_TECH_EDGE),
263 RAF_UMTS = (1 << RADIO_TECH_UMTS),
264 RAF_IS95A = (1 << RADIO_TECH_IS95A),
265 RAF_IS95B = (1 << RADIO_TECH_IS95B),
266 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
267 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
268 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
269 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
270 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
271 RAF_HSPA = (1 << RADIO_TECH_HSPA),
272 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
273 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
274 RAF_LTE = (1 << RADIO_TECH_LTE),
275 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
276 RAF_GSM = (1 << RADIO_TECH_GSM),
277 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700278 RAF_LTE_CA = (1 << RADIO_TECH_LTE_CA)
Wink Saville8b4e4f72014-10-17 15:01:45 -0700279} RIL_RadioAccessFamily;
280
281typedef enum {
Nathan Harold92839f12016-02-12 10:02:28 -0800282 BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically)
283 BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
284 BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
285 BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000)
286 BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
287 BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
288 BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band)
289 BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band)
290 BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band)
291 BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band)
292 BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band)
293 BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band)
294 BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band)
295 BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band)
296 BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band)
297 BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band)
298 BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band)
299 BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band)
300 BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band)
301} RIL_RadioBandMode;
302
303typedef enum {
Wink Saville8b4e4f72014-10-17 15:01:45 -0700304 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
305 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
306 // forthcoming with these same parameters
307 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
308 // RIL_RadioCapability.status = 0, if any START's fail no
309 // APPLY will be sent
310 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
311 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
312 // occurs in any previous command the RIL_RadioAccessesFamily and
Legler Wu8caf06f2014-10-29 14:02:14 +0800313 // logicalModemUuid fields will be the prior configuration thus
Wink Saville8b4e4f72014-10-17 15:01:45 -0700314 // restoring the configuration to the previous value. An error
315 // returned by this command will generally be ignored or may
316 // cause that logical modem to be removed from service.
317} RadioCapabilityPhase;
318
319typedef enum {
320 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
321 // RC_PHASE_APPLY
322 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
323 // capability was success with RC_PHASE_FINISH
324 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
325 // capability is fail with RC_PHASE_FINISH.
326} RadioCapabilityStatus;
327
328#define RIL_RADIO_CAPABILITY_VERSION 1
329typedef struct {
Legler Wu8caf06f2014-10-29 14:02:14 +0800330 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
Wink Saville8b4e4f72014-10-17 15:01:45 -0700331 int session; // Unique session value defined by framework returned in all "responses/unsol"
332 int phase; // CONFIGURED, START, APPLY, FINISH
333 int rat; // RIL_RadioAccessFamily for the radio
334 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
335 int status; // Return status and an input parameter for RC_PHASE_FINISH
336} RIL_RadioCapability;
337
Wink Savillec0114b32011-02-18 10:14:07 -0800338// Do we want to split Data from Voice and the use
339// RIL_RadioTechnology for get/setPreferredVoice/Data ?
340typedef enum {
341 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
342 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
343 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
344 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
345 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
346 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
347 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
348 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
349 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
350 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
351 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
Uma Maheswari Ramalingam0e094872011-09-28 13:25:48 -0700352 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
353 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
Wink Savillec0114b32011-02-18 10:14:07 -0800354} RIL_PreferredNetworkType;
355
356/* Source for cdma subscription */
357typedef enum {
358 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
359 CDMA_SUBSCRIPTION_SOURCE_NV = 1
360} RIL_CdmaSubscriptionSource;
361
Wink Saville74fa3882009-12-22 15:35:41 -0800362/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
363typedef enum {
364 RIL_UUS_TYPE1_IMPLICIT = 0,
365 RIL_UUS_TYPE1_REQUIRED = 1,
366 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
367 RIL_UUS_TYPE2_REQUIRED = 3,
368 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
369 RIL_UUS_TYPE3_REQUIRED = 5,
370 RIL_UUS_TYPE3_NOT_REQUIRED = 6
371} RIL_UUS_Type;
372
373/* User-to-User Signaling Information data coding schemes. Possible values for
374 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
375 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
376typedef enum {
377 RIL_UUS_DCS_USP = 0, /* User specified protocol */
378 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
379 RIL_UUS_DCS_X244 = 2, /* X.244 */
380 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
381 convergence function */
382 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
383} RIL_UUS_DCS;
384
385/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
386 * This data is passed in RIL_ExtensionRecord and rec contains this
387 * structure when type is RIL_UUS_INFO_EXT_REC */
388typedef struct {
389 RIL_UUS_Type uusType; /* UUS Type */
390 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
391 int uusLength; /* Length of UUS Data */
392 char * uusData; /* UUS Data */
393} RIL_UUS_Info;
394
395/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700396typedef struct {
397 char isPresent; /* non-zero if signal information record is present */
398 char signalType; /* as defined 3.7.5.5-1 */
399 char alertPitch; /* as defined 3.7.5.5-2 */
400 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
401} RIL_CDMA_SignalInfoRecord;
402
Wink Saville1b5fd232009-04-22 14:50:00 -0700403typedef struct {
404 RIL_CallState state;
405 int index; /* Connection Index for use with, eg, AT+CHLD */
406 int toa; /* type of address, eg 145 = intl */
407 char isMpty; /* nonzero if is mpty call */
408 char isMT; /* nonzero if call is mobile terminated */
409 char als; /* ALS line indicator if available
410 (0 = line 1) */
411 char isVoice; /* nonzero if this is is a voice call */
412 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
413 char * number; /* Remote party number */
414 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
415 char * name; /* Remote party name */
416 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800417 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800418} RIL_Call;
419
Wink Savillec0114b32011-02-18 10:14:07 -0800420/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800421typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800422 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700423 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700424 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
425 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800426 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800427 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
428} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800429
430/*
431 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
432 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
433 */
434typedef struct {
435 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500436 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
437 back-off timer value RIL wants to override the one
438 pre-configured in FW.
439 The unit is miliseconds.
440 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700441 The value 0 means retry should be done ASAP.
Wink Saville8a9e0212013-04-09 12:11:38 -0700442 The value of INT_MAX(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800443 int cid; /* Context ID, uniquely identifies this call */
444 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
445 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
446 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
447 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
448 such as "IP" or "IPV6" */
449 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800450 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
451 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800452 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800453 one of each. If the prefix length is absent the addresses
454 are assumed to be point to point with IPv4 having a prefix
455 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800456 char * dnses; /* A space-delimited list of DNS server addresses,
457 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
458 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800459 char * gateways; /* A space-delimited list of default gateway addresses,
460 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
461 May be empty in which case the addresses represent point
462 to point connections. */
463} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800464
Etan Cohend3652192014-06-20 08:28:44 -0700465typedef struct {
466 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
467 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
468 back-off timer value RIL wants to override the one
469 pre-configured in FW.
470 The unit is miliseconds.
471 The value < 0 means no value is suggested.
472 The value 0 means retry should be done ASAP.
473 The value of INT_MAX(0x7fffffff) means no retry. */
474 int cid; /* Context ID, uniquely identifies this call */
475 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
476 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
477 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
478 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
479 such as "IP" or "IPV6" */
480 char * ifname; /* The network interface name */
481 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
482 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
483 May not be empty, typically 1 IPv4 or 1 IPv6 or
484 one of each. If the prefix length is absent the addresses
485 are assumed to be point to point with IPv4 having a prefix
486 length of 32 and IPv6 128. */
487 char * dnses; /* A space-delimited list of DNS server addresses,
488 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
489 May be empty. */
490 char * gateways; /* A space-delimited list of default gateway addresses,
491 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
492 May be empty in which case the addresses represent point
493 to point connections. */
494 char * pcscf; /* the Proxy Call State Control Function address
495 via PCO(Protocol Configuration Option) for IMS client. */
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -0700496} RIL_Data_Call_Response_v9;
497
498typedef struct {
499 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
500 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
501 back-off timer value RIL wants to override the one
502 pre-configured in FW.
503 The unit is miliseconds.
504 The value < 0 means no value is suggested.
505 The value 0 means retry should be done ASAP.
506 The value of INT_MAX(0x7fffffff) means no retry. */
507 int cid; /* Context ID, uniquely identifies this call */
508 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
509 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
510 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
511 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
512 such as "IP" or "IPV6" */
513 char * ifname; /* The network interface name */
514 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
515 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
516 May not be empty, typically 1 IPv4 or 1 IPv6 or
517 one of each. If the prefix length is absent the addresses
518 are assumed to be point to point with IPv4 having a prefix
519 length of 32 and IPv6 128. */
520 char * dnses; /* A space-delimited list of DNS server addresses,
521 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
522 May be empty. */
523 char * gateways; /* A space-delimited list of default gateway addresses,
524 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
525 May be empty in which case the addresses represent point
526 to point connections. */
527 char * pcscf; /* the Proxy Call State Control Function address
528 via PCO(Protocol Configuration Option) for IMS client. */
529 int mtu; /* MTU received from network
530 Value <= 0 means network has either not sent a value or
531 sent an invalid value */
532} RIL_Data_Call_Response_v11;
Etan Cohend3652192014-06-20 08:28:44 -0700533
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700534typedef enum {
535 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
536 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
537} RIL_RadioTechnologyFamily;
538
539typedef struct {
540 RIL_RadioTechnologyFamily tech;
541 unsigned char retry; /* 0 == not retry, nonzero == retry */
542 int messageRef; /* Valid field if retry is set to nonzero.
543 Contains messageRef from RIL_SMS_Response
544 corresponding to failed MO SMS.
545 */
546
547 union {
548 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
549 RIL_CDMA_SMS_Message* cdmaMessage;
550
551 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
Sanket Padawe05c23072016-08-08 15:42:17 -0700552 char** gsmMessage; /* This is an array of pointers where pointers
553 are contiguous but elements pointed by those pointers
554 are not contiguous
555 */
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700556 } message;
557} RIL_IMS_SMS_Message;
558
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800559typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800560 int messageRef; /* TP-Message-Reference for GSM,
561 and BearerData MessageId for CDMA
562 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800563 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700564 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
565 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
566 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800567} RIL_SMS_Response;
568
569/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
570typedef struct {
571 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
572 /* 0 = "REC UNREAD" */
573 /* 1 = "REC READ" */
574 /* 2 = "STO UNSENT" */
575 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700576 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
577 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800578 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
579 (as expected by TS 27.005) or NULL for default SMSC */
580} RIL_SMS_WriteArgs;
581
582/** Used by RIL_REQUEST_DIAL */
583typedef struct {
584 char * address;
585 int clir;
586 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
587 * clir == 0 on "use subscription default value"
588 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
589 * clir == 2 on "CLIR suppression" (allow CLI presentation)
590 */
Wink Saville74fa3882009-12-22 15:35:41 -0800591 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800592} RIL_Dial;
593
594typedef struct {
595 int command; /* one of the commands listed for TS 27.007 +CRSM*/
596 int fileid; /* EF id */
597 char *path; /* "pathid" from TS 27.007 +CRSM command.
598 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700599 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800600 */
601 int p1;
602 int p2;
603 int p3;
604 char *data; /* May be NULL*/
605 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800606} RIL_SIM_IO_v5;
607
608typedef struct {
609 int command; /* one of the commands listed for TS 27.007 +CRSM*/
610 int fileid; /* EF id */
611 char *path; /* "pathid" from TS 27.007 +CRSM command.
612 Path is in hex asciii format eg "7f205f70"
613 Path must always be provided.
614 */
615 int p1;
616 int p2;
617 int p3;
618 char *data; /* May be NULL*/
619 char *pin2; /* May be NULL*/
620 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
621} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800622
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800623/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
624 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
625typedef struct {
626 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
627 ignored for +CSIM command. */
628
629 /* Following fields are used to derive the APDU ("command" and "length"
630 values in TS 27.007 +CSIM and +CGLA commands). */
631 int cla;
632 int instruction;
633 int p1;
634 int p2;
635 int p3; /* A negative P3 implies a 4 byte APDU. */
636 char *data; /* May be NULL. In hex string format. */
637} RIL_SIM_APDU;
638
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800639typedef struct {
640 int sw1;
641 int sw2;
Amit Mahajan2875bc22014-08-06 10:03:15 -0700642 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
643 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 -0800644} RIL_SIM_IO_Response;
645
646/* See also com.android.internal.telephony.gsm.CallForwardInfo */
647
648typedef struct {
649 int status; /*
650 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
651 * status 1 = active, 0 = not active
652 *
653 * For RIL_REQUEST_SET_CALL_FORWARD:
654 * status is:
655 * 0 = disable
656 * 1 = enable
657 * 2 = interrogate
658 * 3 = registeration
659 * 4 = erasure
660 */
661
Wink Saville3d54e742009-05-18 18:00:44 -0700662 int reason; /* from TS 27.007 7.11 "reason" */
663 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
664 See table for Android mapping from
665 MMI service code
666 0 means user doesn't input class */
667 int toa; /* "type" from TS 27.007 7.11 */
668 char * number; /* "number" from TS 27.007 7.11. May be NULL */
669 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800670}RIL_CallForwardInfo;
671
672typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700673 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
674 * Upper 16 bits is LAC and lower 16 bits
675 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800676 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700677 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700678 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800679 */
johnwange0ba6a92009-09-11 19:14:52 -0700680 int rssi; /* Received RSSI in GSM,
681 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800682 */
683} RIL_NeighboringCell;
684
fengluf7408292015-04-14 14:53:55 -0700685typedef struct {
686 char lce_status; /* LCE service status:
687 * -1 = not supported;
688 * 0 = stopped;
689 * 1 = active.
690 */
691 unsigned int actual_interval_ms; /* actual LCE reporting interval,
692 * meaningful only if LCEStatus = 1.
693 */
694} RIL_LceStatusInfo;
695
696typedef struct {
fenglu290add32015-05-01 17:05:15 -0700697 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
fengluf7408292015-04-14 14:53:55 -0700698 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
699 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
700 * moves to inactive state or network type change)
701 * 1 = suspended;
702 * 0 = not suspended.
703 */
704} RIL_LceDataInfo;
705
Meng Wangb4e34312016-05-12 14:54:36 -0700706typedef enum {
707 RIL_MATCH_ALL = 0, /* Apply to all carriers with the same mcc/mnc */
708 RIL_MATCH_SPN = 1, /* Use SPN and mcc/mnc to identify the carrier */
709 RIL_MATCH_IMSI_PREFIX = 2, /* Use IMSI prefix and mcc/mnc to identify the carrier */
710 RIL_MATCH_GID1 = 3, /* Use GID1 and mcc/mnc to identify the carrier */
711 RIL_MATCH_GID2 = 4, /* Use GID2 and mcc/mnc to identify the carrier */
712} RIL_CarrierMatchType;
713
714typedef struct {
715 const char * mcc;
716 const char * mnc;
717 RIL_CarrierMatchType match_type; /* Specify match type for the carrier.
718 * If it’s RIL_MATCH_ALL, match_data is null;
719 * otherwise, match_data is the value for the match type.
720 */
721 const char * match_data;
722} RIL_Carrier;
723
724typedef struct {
725 int32_t len_allowed_carriers; /* length of array allowed_carriers */
726 int32_t len_excluded_carriers; /* length of array excluded_carriers */
727 RIL_Carrier * allowed_carriers; /* whitelist for allowed carriers */
728 RIL_Carrier * excluded_carriers; /* blacklist for explicitly excluded carriers
729 * which match allowed_carriers. Eg. allowed_carriers match
730 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1
731 * is ABCD. It means except the carrier whose gid1 is ABCD,
732 * all carriers with the same mcc/mnc are allowed.
733 */
734} RIL_CarrierRestrictions;
735
pkanwarc61837e2017-03-17 12:49:34 -0700736typedef struct {
737 const uint8_t * carrierKey; /* Public Key from the Carrier used to encrypt the
738 * IMSI/IMPI.
739 */
740 const char * KeyIdentifier; /* The keyIdentifier Attribute value pair that helps
741 * a server locate the private key to decrypt the
742 * permanent identity.
743 */
744} RIL_CarrierInfoForImsiEncryption;
745
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800746/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
747typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700748 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800749 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
750 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
751 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800752 CALL_FAIL_NORMAL = 16,
753 CALL_FAIL_BUSY = 17,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800754 CALL_FAIL_NO_USER_RESPONDING = 18,
755 CALL_FAIL_NO_ANSWER_FROM_USER = 19,
756 CALL_FAIL_CALL_REJECTED = 21,
757 CALL_FAIL_NUMBER_CHANGED = 22,
758 CALL_FAIL_PREEMPTION = 25,
759 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
760 CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
761 CALL_FAIL_FACILITY_REJECTED = 29,
762 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
763 CALL_FAIL_NORMAL_UNSPECIFIED = 31,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800764 CALL_FAIL_CONGESTION = 34,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800765 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
766 CALL_FAIL_TEMPORARY_FAILURE = 41,
767 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
768 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
769 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
770 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
771 CALL_FAIL_QOS_UNAVAILABLE = 49,
772 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
773 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
774 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
775 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
776 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
777 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800778 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800779 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
780 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
781 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
782 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
783 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
784 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
785 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
786 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
787 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
788 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
789 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
790 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
791 CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
792 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
793 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
794 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
795 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800796 CALL_FAIL_CALL_BARRED = 240,
797 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700798 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
799 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Amit Mahajan54563d32014-11-22 00:54:49 +0000800 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
801 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
802 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
Jayachandran Ccc2a2022017-03-07 09:55:58 -0800803 CALL_FAIL_RADIO_OFF = 247, /* Radio is OFF */
804 CALL_FAIL_OUT_OF_SERVICE = 248, /* No cellular coverage */
805 CALL_FAIL_NO_VALID_SIM = 249, /* No valid SIM is present */
806 CALL_FAIL_RADIO_INTERNAL_ERROR = 250, /* Internal error at Modem */
807 CALL_FAIL_NETWORK_RESP_TIMEOUT = 251, /* No response from network */
808 CALL_FAIL_NETWORK_REJECT = 252, /* Explicit network reject */
809 CALL_FAIL_RADIO_ACCESS_FAILURE = 253, /* RRC connection failure. Eg.RACH */
810 CALL_FAIL_RADIO_LINK_FAILURE = 254, /* Radio Link Failure */
811 CALL_FAIL_RADIO_LINK_LOST = 255, /* Radio link lost due to poor coverage */
812 CALL_FAIL_RADIO_UPLINK_FAILURE = 256, /* Radio uplink failure */
813 CALL_FAIL_RADIO_SETUP_FAILURE = 257, /* RRC connection setup failure */
814 CALL_FAIL_RADIO_RELEASE_NORMAL = 258, /* RRC connection release, normal */
815 CALL_FAIL_RADIO_RELEASE_ABNORMAL = 259, /* RRC connection release, abnormal */
816 CALL_FAIL_ACCESS_CLASS_BLOCKED = 260, /* Access class barring */
817 CALL_FAIL_NETWORK_DETACH = 261, /* Explicit network detach */
Wink Saville1b5fd232009-04-22 14:50:00 -0700818 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
819 CALL_FAIL_CDMA_DROP = 1001,
820 CALL_FAIL_CDMA_INTERCEPT = 1002,
821 CALL_FAIL_CDMA_REORDER = 1003,
822 CALL_FAIL_CDMA_SO_REJECT = 1004,
823 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
824 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
825 CALL_FAIL_CDMA_PREEMPTED = 1007,
826 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
827 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700828 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
Jayachandran Ccc2a2022017-03-07 09:55:58 -0800829
830 /* OEM specific error codes. Used to distinguish error from
831 * CALL_FAIL_ERROR_UNSPECIFIED and help assist debugging */
832 CALL_FAIL_OEM_CAUSE_1 = 0xf001,
833 CALL_FAIL_OEM_CAUSE_2 = 0xf002,
834 CALL_FAIL_OEM_CAUSE_3 = 0xf003,
835 CALL_FAIL_OEM_CAUSE_4 = 0xf004,
836 CALL_FAIL_OEM_CAUSE_5 = 0xf005,
837 CALL_FAIL_OEM_CAUSE_6 = 0xf006,
838 CALL_FAIL_OEM_CAUSE_7 = 0xf007,
839 CALL_FAIL_OEM_CAUSE_8 = 0xf008,
840 CALL_FAIL_OEM_CAUSE_9 = 0xf009,
841 CALL_FAIL_OEM_CAUSE_10 = 0xf00a,
842 CALL_FAIL_OEM_CAUSE_11 = 0xf00b,
843 CALL_FAIL_OEM_CAUSE_12 = 0xf00c,
844 CALL_FAIL_OEM_CAUSE_13 = 0xf00d,
845 CALL_FAIL_OEM_CAUSE_14 = 0xf00e,
846 CALL_FAIL_OEM_CAUSE_15 = 0xf00f,
847
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800848 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
849 vendor code should make sure to map error
850 code to specific error */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800851} RIL_LastCallFailCause;
852
Chao Liu548a81e2015-05-14 16:13:46 -0700853typedef struct {
854 RIL_LastCallFailCause cause_code;
855 char * vendor_cause;
856} RIL_LastCallFailCauseInfo;
857
Wink Savillef4c4d362009-04-02 01:37:03 -0700858/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800859typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800860 PDP_FAIL_NONE = 0, /* No error, connection ok */
861
862 /* an integer cause code defined in TS 24.008
863 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
864 If the implementation does not have access to the exact cause codes,
865 then it should return one of the following values,
866 as the UI layer needs to distinguish these
867 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700868 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
Sanket Padaweac308b92016-01-07 14:41:17 -0800869 PDP_FAIL_NAS_SIGNALLING = 0x0E,
870 PDP_FAIL_LLC_SNDCP = 0x19,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700871 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
872 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
873 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
874 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
875 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
876 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
877 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
878 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
879 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800880 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
Hui Wang11e8b232014-09-19 16:40:17 -0500881 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
882 based on framework config */
Sanket Padaweac308b92016-01-07 14:41:17 -0800883 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
884 PDP_FAIL_NETWORK_FAILURE = 0x26,
885 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
886 PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
887 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
888 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
889 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
890 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
891 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
892 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
Wink Saville43808972011-01-13 17:39:51 -0800893 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
894 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
895 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Sanket Padaweac308b92016-01-07 14:41:17 -0800896 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
897 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
898 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
899 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
900 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
901 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
902 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
903 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
904 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
905 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
906 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
907 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
908 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
909 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
910 PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
911 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
912 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
913 PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
914 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
915 PDP_FAIL_IFACE_MISMATCH = 0x75,
916 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
917 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
918 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
919 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
920 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
Wink Saville43808972011-01-13 17:39:51 -0800921
Sanket Padawe0106aed2016-02-09 09:56:31 -0800922 // OEM specific error codes. To be used by OEMs when they don't want to
923 // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
924 PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001,
925 PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002,
926 PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003,
927 PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004,
928 PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005,
929 PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006,
930 PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007,
931 PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008,
932 PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009,
933 PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A,
934 PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B,
935 PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C,
936 PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D,
937 PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E,
938 PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F,
939
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700940 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800941 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
942 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800943
944 /* reasons for data call drop - network/modem disconnect */
Wink Saville3492c6e2013-10-03 13:53:27 -0700945 PDP_FAIL_SIGNAL_LOST = -3,
Wink Saville43808972011-01-13 17:39:51 -0800946 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
947 with parameters appropriate for new technology */
948 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
949 powered off - no retry */
950 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
951 mode was up on same APN/data profile - no retry until
952 tethered call is off */
953
Sanket Padaweac308b92016-01-07 14:41:17 -0800954 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
955 new error codes are added making this unnecessary */
Wink Saville43808972011-01-13 17:39:51 -0800956} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800957
jsh602f80f2009-07-10 15:44:37 -0700958/* See RIL_REQUEST_SETUP_DATA_CALL */
959typedef enum {
960 RIL_DATA_PROFILE_DEFAULT = 0,
961 RIL_DATA_PROFILE_TETHERED = 1,
Hui Wang8d679622014-10-16 14:59:27 -0500962 RIL_DATA_PROFILE_IMS = 2,
963 RIL_DATA_PROFILE_FOTA = 3,
964 RIL_DATA_PROFILE_CBS = 4,
965 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
966 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
jsh602f80f2009-07-10 15:44:37 -0700967} RIL_DataProfile;
968
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800969/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
970typedef struct {
971 int notificationType; /*
972 * 0 = MO intermediate result code
973 * 1 = MT unsolicited result code
974 */
975 int code; /* See 27.007 7.17
976 "code1" for MO
977 "code2" for MT. */
978 int index; /* CUG index. See 27.007 7.17. */
979 int type; /* "type" from 27.007 7.17 (MT only). */
980 char * number; /* "number" from 27.007 7.17
981 (MT only, may be NULL). */
982} RIL_SuppSvcNotification;
983
Wink Savillef4c4d362009-04-02 01:37:03 -0700984#define RIL_CARD_MAX_APPS 8
985
986typedef enum {
Meng Wangb4e34312016-05-12 14:54:36 -0700987 RIL_CARDSTATE_ABSENT = 0,
988 RIL_CARDSTATE_PRESENT = 1,
989 RIL_CARDSTATE_ERROR = 2,
990 RIL_CARDSTATE_RESTRICTED = 3 /* card is present but not usable due to carrier restrictions.*/
Wink Savillef4c4d362009-04-02 01:37:03 -0700991} RIL_CardState;
992
993typedef enum {
994 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
995 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700996 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
997 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700998 involved */
999 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
1000 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
1001 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
1002 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
1003 RIL_PERSOSUBSTATE_SIM_SIM = 7,
1004 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
1005 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
1006 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
1007 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
1008 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
1009 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
1010 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
1011 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
1012 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
1013 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
1014 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
1015 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
1016 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
1017 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
1018 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
1019 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
1020 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
1021} RIL_PersoSubstate;
1022
1023typedef enum {
1024 RIL_APPSTATE_UNKNOWN = 0,
1025 RIL_APPSTATE_DETECTED = 1,
1026 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
1027 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -07001028 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -07001029 when app_state is assigned to this value */
1030 RIL_APPSTATE_READY = 5
1031} RIL_AppState;
1032
1033typedef enum {
1034 RIL_PINSTATE_UNKNOWN = 0,
1035 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
1036 RIL_PINSTATE_ENABLED_VERIFIED = 2,
1037 RIL_PINSTATE_DISABLED = 3,
1038 RIL_PINSTATE_ENABLED_BLOCKED = 4,
1039 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
1040} RIL_PinState;
1041
1042typedef enum {
1043 RIL_APPTYPE_UNKNOWN = 0,
1044 RIL_APPTYPE_SIM = 1,
1045 RIL_APPTYPE_USIM = 2,
1046 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -08001047 RIL_APPTYPE_CSIM = 4,
1048 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -07001049} RIL_AppType;
1050
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -08001051/*
1052 * Please note that registration state UNKNOWN is
1053 * treated as "out of service" in the Android telephony.
1054 * Registration state REG_DENIED must be returned if Location Update
1055 * Reject (with cause 17 - Network Failure) is received
1056 * repeatedly from the network, to facilitate
1057 * "managed roaming"
1058 */
1059typedef enum {
1060 RIL_NOT_REG_AND_NOT_SEARCHING = 0, // Not registered, MT is not currently searching
1061 // a new operator to register
1062 RIL_REG_HOME = 1, // Registered, home network
1063 RIL_NOT_REG_AND_SEARCHING = 2, // Not registered, but MT is currently searching
1064 // a new operator to register
1065 RIL_REG_DENIED = 3, // Registration denied
1066 RIL_UNKNOWN = 4, // Unknown
1067 RIL_REG_ROAMING = 5, // Registered, roaming
1068 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_NOT_SEARCHING = 10, // Same as
1069 // RIL_NOT_REG_AND_NOT_SEARCHING but indicates that
1070 // emergency calls are enabled.
1071 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_SEARCHING = 12, // Same as RIL_NOT_REG_AND_SEARCHING
1072 // but indicates that
1073 // emergency calls are enabled.
1074 RIL_REG_DENIED_AND_EMERGENCY_AVAILABLE = 13, // Same as REG_DENIED but indicates that
1075 // emergency calls are enabled.
1076 RIL_UNKNOWN_AND_EMERGENCY_AVAILABLE = 14, // Same as UNKNOWN but indicates that
1077 // emergency calls are enabled.
1078} RIL_RegState;
1079
Wink Savillef4c4d362009-04-02 01:37:03 -07001080typedef struct
1081{
Wink Saville7f856802009-06-09 10:23:37 -07001082 RIL_AppType app_type;
1083 RIL_AppState app_state;
1084 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -07001085 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -07001086 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -07001087 0x30, 0x30, 0x30 */
1088 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -08001089 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -07001090 RIL_PinState pin1;
1091 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -07001092} RIL_AppStatus;
1093
Wink Savillec0114b32011-02-18 10:14:07 -08001094/* Deprecated, use RIL_CardStatus_v6 */
1095typedef struct
1096{
1097 RIL_CardState card_state;
1098 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
1099 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1100 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1101 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1102 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
1103} RIL_CardStatus_v5;
1104
Wink Savillef4c4d362009-04-02 01:37:03 -07001105typedef struct
1106{
Wink Saville7f856802009-06-09 10:23:37 -07001107 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -07001108 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -08001109 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1110 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1111 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -07001112 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1113 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -08001114} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -07001115
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001116/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
1117 * or as part of RIL_SimRefreshResponse_v7
1118 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001119typedef enum {
1120 /* A file on SIM has been updated. data[1] contains the EFID. */
1121 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001122 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001123 SIM_INIT = 1,
1124 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
1125 SIM_RESET = 2
1126} RIL_SimRefreshResult;
1127
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001128typedef struct {
1129 RIL_SimRefreshResult result;
1130 int ef_id; /* is the EFID of the updated file if the result is */
1131 /* SIM_FILE_UPDATE or 0 for any other result. */
1132 char * aid; /* is AID(application ID) of the card application */
1133 /* See ETSI 102.221 8.1 and 101.220 4 */
1134 /* For SIM_FILE_UPDATE result it can be set to AID of */
1135 /* application in which updated EF resides or it can be */
1136 /* NULL if EF is outside of an application. */
1137 /* For SIM_INIT result this field is set to AID of */
1138 /* application that caused REFRESH */
1139 /* For SIM_RESET result it is NULL. */
1140} RIL_SimRefreshResponse_v7;
1141
Wink Savillec0114b32011-02-18 10:14:07 -08001142/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
1143typedef struct {
1144 char * number; /* Remote party number */
1145 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1146 char * name; /* Remote party name */
1147 RIL_CDMA_SignalInfoRecord signalInfoRecord;
1148} RIL_CDMA_CallWaiting_v5;
1149
Wink Saville1b5fd232009-04-22 14:50:00 -07001150typedef struct {
1151 char * number; /* Remote party number */
1152 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1153 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -07001154 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -08001155 /* Number type/Number plan required to support International Call Waiting */
1156 int number_type; /* 0=Unknown, 1=International, 2=National,
1157 3=Network specific, 4=subscriber */
1158 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
1159} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001160
Wink Savillea592eeb2009-05-22 13:26:36 -07001161/**
1162 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
1163 *
1164 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
1165 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
1166 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
1167 * CBM message ID.
1168 *
1169 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
1170 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
1171 * and 9.4.4.2.3 for UMTS.
1172 * All other values can be treated as empty CBM data coding scheme.
1173 *
1174 * selected 0 means message types specified in <fromServiceId, toServiceId>
1175 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
1176 *
1177 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
1178 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
1179 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001180typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -07001181 int fromServiceId;
1182 int toServiceId;
1183 int fromCodeScheme;
1184 int toCodeScheme;
1185 unsigned char selected;
1186} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -07001187
The Android Open Source Project34a51082009-03-05 14:34:37 -08001188/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
1189#define RIL_RESTRICTED_STATE_NONE 0x00
1190/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
1191#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
1192/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
1193#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -07001194/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -08001195#define RIL_RESTRICTED_STATE_CS_ALL 0x04
1196/* Block packet data access due to restriction. */
1197#define RIL_RESTRICTED_STATE_PS_ALL 0x10
1198
Wink Saville1b5fd232009-04-22 14:50:00 -07001199/* The status for an OTASP/OTAPA session */
1200typedef enum {
1201 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
1202 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
1203 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
1204 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
1205 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
1206 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
1207 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
1208 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
1209 CDMA_OTA_PROVISION_STATUS_COMMITTED,
1210 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
1211 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
1212 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
1213} RIL_CDMA_OTA_ProvisionStatus;
1214
1215typedef struct {
1216 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1217 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1218} RIL_GW_SignalStrength;
1219
Wink Savillec57b3eb2013-04-17 12:51:41 -07001220typedef struct {
1221 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1222 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001223 int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us.
1224 * INT_MAX denotes invalid value */
1225} RIL_GSM_SignalStrength_v12;
1226
1227typedef struct {
1228 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1229 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Wink Savillec57b3eb2013-04-17 12:51:41 -07001230} RIL_SignalStrengthWcdma;
Wink Saville1b5fd232009-04-22 14:50:00 -07001231
1232typedef struct {
1233 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1234 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1235 * value will be 75.
1236 */
1237 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1238 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1239 * will be 125.
1240 */
1241} RIL_CDMA_SignalStrength;
1242
1243
1244typedef struct {
1245 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1246 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1247 * value will be 75.
1248 */
1249 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1250 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1251 * will be 125.
1252 */
1253 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
1254} RIL_EVDO_SignalStrength;
1255
Wink Savillec0114b32011-02-18 10:14:07 -08001256typedef struct {
1257 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -07001258 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1259 * Range: 44 to 140 dBm
1260 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1261 * Reference: 3GPP TS 36.133 9.1.4 */
1262 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1263 * Range: 20 to 3 dB.
1264 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1265 * Reference: 3GPP TS 36.133 9.1.7 */
1266 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1267 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1268 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1269 * Reference: 3GPP TS 36.101 8.1.1 */
1270 int cqi; /* The current Channel Quality Indicator.
1271 * Range: 0 to 15.
1272 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1273 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -08001274} RIL_LTE_SignalStrength;
1275
Wink Saville8a9e0212013-04-09 12:11:38 -07001276typedef struct {
1277 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1278 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1279 * Range: 44 to 140 dBm
1280 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1281 * Reference: 3GPP TS 36.133 9.1.4 */
1282 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1283 * Range: 20 to 3 dB.
1284 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1285 * Reference: 3GPP TS 36.133 9.1.7 */
1286 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1287 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1288 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1289 * Reference: 3GPP TS 36.101 8.1.1 */
1290 int cqi; /* The current Channel Quality Indicator.
1291 * Range: 0 to 15.
1292 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1293 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1294 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
1295 * Approximate distance can be calculated using 300m/us * timingAdvance.
1296 * Range: 0 to 0x7FFFFFFE
1297 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1298 * Reference: 3GPP 36.321 section 6.1.3.5
1299 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1300} RIL_LTE_SignalStrength_v8;
1301
Etan Cohend3652192014-06-20 08:28:44 -07001302typedef struct {
1303 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
1304 * Range : 25 to 120
1305 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1306 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1307} RIL_TD_SCDMA_SignalStrength;
1308
Wink Savillec0114b32011-02-18 10:14:07 -08001309/* Deprecated, use RIL_SignalStrength_v6 */
1310typedef struct {
1311 RIL_GW_SignalStrength GW_SignalStrength;
1312 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1313 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1314} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -07001315
1316typedef struct {
1317 RIL_GW_SignalStrength GW_SignalStrength;
1318 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1319 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -08001320 RIL_LTE_SignalStrength LTE_SignalStrength;
1321} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001322
Wink Saville8a9e0212013-04-09 12:11:38 -07001323typedef struct {
1324 RIL_GW_SignalStrength GW_SignalStrength;
1325 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1326 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1327 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1328} RIL_SignalStrength_v8;
1329
Etan Cohend3652192014-06-20 08:28:44 -07001330typedef struct {
1331 RIL_GW_SignalStrength GW_SignalStrength;
1332 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1333 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1334 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1335 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1336} RIL_SignalStrength_v10;
1337
Wink Saville8a9e0212013-04-09 12:11:38 -07001338typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001339 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1340 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1341 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1342 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 -07001343} RIL_CellIdentityGsm;
1344
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001345typedef struct {
1346 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1347 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1348 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1349 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
1350 int arfcn; /* 16-bit GSM Absolute RF channel number, INT_MAX if unknown */
Nathan Haroldf3769da2016-05-05 12:19:39 -07001351 uint8_t bsic;/* 6-bit Base Station Identity Code, 0xFF if unknown */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001352} RIL_CellIdentityGsm_v12;
1353
Wink Savillec57b3eb2013-04-17 12:51:41 -07001354typedef struct {
1355 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1356 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1357 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1358 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1359 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1360} RIL_CellIdentityWcdma;
1361
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001362typedef struct {
1363 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1364 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1365 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1366 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1367 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1368 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number, INT_MAX if unknown */
1369} RIL_CellIdentityWcdma_v12;
1370
Wink Saville8a9e0212013-04-09 12:11:38 -07001371typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001372 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1373 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1374 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001375 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1376 * It is represented in units of 0.25 seconds and ranges from -2592000
1377 * to 2592000, both values inclusive (corresponding to a range of -180
Wink Savillec57b3eb2013-04-17 12:51:41 -07001378 * to +180 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001379
1380 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1381 * It is represented in units of 0.25 seconds and ranges from -1296000
1382 * to 1296000, both values inclusive (corresponding to a range of -90
Wink Savillec57b3eb2013-04-17 12:51:41 -07001383 * to +90 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001384} RIL_CellIdentityCdma;
1385
Wink Saville8a9e0212013-04-09 12:11:38 -07001386typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001387 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1388 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1389 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1390 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1391 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001392} RIL_CellIdentityLte;
1393
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001394typedef struct {
1395 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1396 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1397 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1398 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1399 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1400 int earfcn; /* 18-bit LTE Absolute RC Channel Number, INT_MAX if unknown */
1401} RIL_CellIdentityLte_v12;
1402
Etan Cohend3652192014-06-20 08:28:44 -07001403typedef struct {
1404 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1405 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1406 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1407 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1408 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1409} RIL_CellIdentityTdscdma;
1410
Wink Saville8a9e0212013-04-09 12:11:38 -07001411typedef struct {
1412 RIL_CellIdentityGsm cellIdentityGsm;
1413 RIL_GW_SignalStrength signalStrengthGsm;
1414} RIL_CellInfoGsm;
1415
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001416typedef struct {
1417 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1418 RIL_GSM_SignalStrength_v12 signalStrengthGsm;
1419} RIL_CellInfoGsm_v12;
1420
Wink Savillec57b3eb2013-04-17 12:51:41 -07001421typedef struct {
1422 RIL_CellIdentityWcdma cellIdentityWcdma;
1423 RIL_SignalStrengthWcdma signalStrengthWcdma;
1424} RIL_CellInfoWcdma;
1425
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001426typedef struct {
1427 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1428 RIL_SignalStrengthWcdma signalStrengthWcdma;
1429} RIL_CellInfoWcdma_v12;
1430
Wink Saville8a9e0212013-04-09 12:11:38 -07001431typedef struct {
1432 RIL_CellIdentityCdma cellIdentityCdma;
1433 RIL_CDMA_SignalStrength signalStrengthCdma;
1434 RIL_EVDO_SignalStrength signalStrengthEvdo;
1435} RIL_CellInfoCdma;
1436
Wink Saville8a9e0212013-04-09 12:11:38 -07001437typedef struct {
1438 RIL_CellIdentityLte cellIdentityLte;
1439 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1440} RIL_CellInfoLte;
1441
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001442typedef struct {
1443 RIL_CellIdentityLte_v12 cellIdentityLte;
1444 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1445} RIL_CellInfoLte_v12;
1446
Etan Cohend3652192014-06-20 08:28:44 -07001447typedef struct {
1448 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1449 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1450} RIL_CellInfoTdscdma;
1451
Wink Saville8a9e0212013-04-09 12:11:38 -07001452// Must be the same as CellInfo.TYPE_XXX
1453typedef enum {
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -08001454 RIL_CELL_INFO_TYPE_NONE = 0, /* indicates no cell information */
Wink Saville8a9e0212013-04-09 12:11:38 -07001455 RIL_CELL_INFO_TYPE_GSM = 1,
1456 RIL_CELL_INFO_TYPE_CDMA = 2,
1457 RIL_CELL_INFO_TYPE_LTE = 3,
Wink Savillec57b3eb2013-04-17 12:51:41 -07001458 RIL_CELL_INFO_TYPE_WCDMA = 4,
Etan Cohend3652192014-06-20 08:28:44 -07001459 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
Wink Saville8a9e0212013-04-09 12:11:38 -07001460} RIL_CellInfoType;
1461
1462// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1463typedef enum {
1464 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1465 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1466 RIL_TIMESTAMP_TYPE_MODEM = 2,
1467 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1468 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1469} RIL_TimeStampType;
1470
1471typedef struct {
1472 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1473 int registered; /* !0 if this cell is registered 0 if not registered */
1474 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1475 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1476 union {
1477 RIL_CellInfoGsm gsm;
1478 RIL_CellInfoCdma cdma;
1479 RIL_CellInfoLte lte;
Wink Savillec57b3eb2013-04-17 12:51:41 -07001480 RIL_CellInfoWcdma wcdma;
Etan Cohend3652192014-06-20 08:28:44 -07001481 RIL_CellInfoTdscdma tdscdma;
Wink Saville8a9e0212013-04-09 12:11:38 -07001482 } CellInfo;
1483} RIL_CellInfo;
1484
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001485typedef struct {
1486 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1487 int registered; /* !0 if this cell is registered 0 if not registered */
1488 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1489 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1490 union {
1491 RIL_CellInfoGsm_v12 gsm;
1492 RIL_CellInfoCdma cdma;
1493 RIL_CellInfoLte_v12 lte;
1494 RIL_CellInfoWcdma_v12 wcdma;
1495 RIL_CellInfoTdscdma tdscdma;
1496 } CellInfo;
1497} RIL_CellInfo_v12;
1498
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -08001499typedef struct {
1500 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1501 union {
1502 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1503 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1504 RIL_CellIdentityLte_v12 cellIdentityLte;
1505 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1506 RIL_CellIdentityCdma cellIdentityCdma;
1507 };
1508}RIL_CellIdentity_v16;
1509
1510typedef struct {
1511 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
1512 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
1513 // UNKNOWN, REG_ROAMING defined in RegState
1514 RIL_RadioTechnology rat; // indicates the available voice radio technology,
1515 // valid values as defined by RadioTechnology.
1516 int32_t cssSupported; // concurrent services support indicator. if
1517 // registered on a CDMA system.
1518 // 0 - Concurrent services not supported,
1519 // 1 - Concurrent services supported
1520 int32_t roamingIndicator; // TSB-58 Roaming Indicator if registered
1521 // on a CDMA or EVDO system or -1 if not.
1522 // Valid values are 0-255.
1523 int32_t systemIsInPrl; // indicates whether the current system is in the
1524 // PRL if registered on a CDMA or EVDO system or -1 if
1525 // not. 0=not in the PRL, 1=in the PRL
1526 int32_t defaultRoamingIndicator; // default Roaming Indicator from the PRL,
1527 // if registered on a CDMA or EVDO system or -1 if not.
1528 // Valid values are 0-255.
1529 int32_t reasonForDenial; // reasonForDenial if registration state is 3
1530 // (Registration denied) this is an enumerated reason why
1531 // registration was denied. See 3GPP TS 24.008,
1532 // 10.5.3.6 and Annex G.
1533 // 0 - General
1534 // 1 - Authentication Failure
1535 // 2 - IMSI unknown in HLR
1536 // 3 - Illegal MS
1537 // 4 - Illegal ME
1538 // 5 - PLMN not allowed
1539 // 6 - Location area not allowed
1540 // 7 - Roaming not allowed
1541 // 8 - No Suitable Cells in this Location Area
1542 // 9 - Network failure
1543 // 10 - Persistent location update reject
1544 // 11 - PLMN not allowed
1545 // 12 - Location area not allowed
1546 // 13 - Roaming not allowed in this Location Area
1547 // 15 - No Suitable Cells in this Location Area
1548 // 17 - Network Failure
1549 // 20 - MAC Failure
1550 // 21 - Sync Failure
1551 // 22 - Congestion
1552 // 23 - GSM Authentication unacceptable
1553 // 25 - Not Authorized for this CSG
1554 // 32 - Service option not supported
1555 // 33 - Requested service option not subscribed
1556 // 34 - Service option temporarily out of order
1557 // 38 - Call cannot be identified
1558 // 48-63 - Retry upon entry into a new cell
1559 // 95 - Semantically incorrect message
1560 // 96 - Invalid mandatory information
1561 // 97 - Message type non-existent or not implemented
1562 // 98 - Message type not compatible with protocol state
1563 // 99 - Information element non-existent or
1564 // not implemented
1565 // 100 - Conditional IE error
1566 // 101 - Message not compatible with protocol state;
1567 RIL_CellIdentity_v16 cellIdentity; // current cell information
1568}RIL_VoiceRegistrationStateResponse;
1569
1570
1571typedef struct {
1572 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
1573 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
1574 // UNKNOWN, REG_ROAMING defined in RegState
1575 RIL_RadioTechnology rat; // indicates the available data radio technology,
1576 // valid values as defined by RadioTechnology.
1577 int32_t reasonDataDenied; // if registration state is 3 (Registration
1578 // denied) this is an enumerated reason why
1579 // registration was denied. See 3GPP TS 24.008,
1580 // Annex G.6 "Additional cause codes for GMM".
1581 // 7 == GPRS services not allowed
1582 // 8 == GPRS services and non-GPRS services not allowed
1583 // 9 == MS identity cannot be derived by the network
1584 // 10 == Implicitly detached
1585 // 14 == GPRS services not allowed in this PLMN
1586 // 16 == MSC temporarily not reachable
1587 // 40 == No PDP context activated
1588 int32_t maxDataCalls; // The maximum number of simultaneous Data Calls that
1589 // must be established using setupDataCall().
1590 RIL_CellIdentity_v16 cellIdentity; // Current cell information
1591}RIL_DataRegistrationStateResponse;
1592
Wink Saville1b5fd232009-04-22 14:50:00 -07001593/* Names of the CDMA info records (C.S0005 section 3.7.5) */
1594typedef enum {
1595 RIL_CDMA_DISPLAY_INFO_REC,
1596 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1597 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1598 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1599 RIL_CDMA_SIGNAL_INFO_REC,
1600 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1601 RIL_CDMA_LINE_CONTROL_INFO_REC,
1602 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1603 RIL_CDMA_T53_CLIR_INFO_REC,
1604 RIL_CDMA_T53_RELEASE_INFO_REC,
1605 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1606} RIL_CDMA_InfoRecName;
1607
1608/* Display Info Rec as defined in C.S0005 section 3.7.5.1
1609 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1610 Note: the Extended Display info rec contains multiple records of the
1611 form: display_tag, display_len, and display_len occurrences of the
1612 chari field if the display_tag is not 10000000 or 10000001.
1613 To save space, the records are stored consecutively in a byte buffer.
1614 The display_tag, display_len and chari fields are all 1 byte.
1615*/
1616
1617typedef struct {
1618 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001619 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001620} RIL_CDMA_DisplayInfoRecord;
1621
1622/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1623 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1624 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1625*/
1626
1627typedef struct {
1628 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001629 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001630 char number_type;
1631 char number_plan;
1632 char pi;
1633 char si;
1634} RIL_CDMA_NumberInfoRecord;
1635
1636/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1637typedef enum {
1638 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1639 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1640 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1641 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1642 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1643 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1644 RIL_REDIRECTING_REASON_RESERVED
1645} RIL_CDMA_RedirectingReason;
1646
1647typedef struct {
1648 RIL_CDMA_NumberInfoRecord redirectingNumber;
1649 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1650 RIL_CDMA_RedirectingReason redirectingReason;
1651} RIL_CDMA_RedirectingNumberInfoRecord;
1652
1653/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1654typedef struct {
1655 char lineCtrlPolarityIncluded;
1656 char lineCtrlToggle;
1657 char lineCtrlReverse;
1658 char lineCtrlPowerDenial;
1659} RIL_CDMA_LineControlInfoRecord;
1660
1661/* T53 CLIR Information Record */
1662typedef struct {
1663 char cause;
1664} RIL_CDMA_T53_CLIRInfoRecord;
1665
1666/* T53 Audio Control Information Record */
1667typedef struct {
1668 char upLink;
1669 char downLink;
1670} RIL_CDMA_T53_AudioControlInfoRecord;
1671
1672typedef struct {
1673
1674 RIL_CDMA_InfoRecName name;
1675
1676 union {
1677 /* Display and Extended Display Info Rec */
1678 RIL_CDMA_DisplayInfoRecord display;
1679
1680 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1681 RIL_CDMA_NumberInfoRecord number;
1682
1683 /* Signal Info Rec */
1684 RIL_CDMA_SignalInfoRecord signal;
1685
1686 /* Redirecting Number Info Rec */
1687 RIL_CDMA_RedirectingNumberInfoRecord redir;
1688
1689 /* Line Control Info Rec */
1690 RIL_CDMA_LineControlInfoRecord lineCtrl;
1691
1692 /* T53 CLIR Info Rec */
1693 RIL_CDMA_T53_CLIRInfoRecord clir;
1694
1695 /* T53 Audio Control Info Rec */
1696 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1697 } rec;
1698} RIL_CDMA_InformationRecord;
1699
1700#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1701
1702typedef struct {
1703 char numberOfInfoRecs;
1704 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1705} RIL_CDMA_InformationRecords;
1706
Jake Hamby8a4a2332014-01-15 13:12:05 -08001707/* See RIL_REQUEST_NV_READ_ITEM */
1708typedef struct {
1709 RIL_NV_Item itemID;
1710} RIL_NV_ReadItem;
1711
1712/* See RIL_REQUEST_NV_WRITE_ITEM */
1713typedef struct {
1714 RIL_NV_Item itemID;
1715 char * value;
1716} RIL_NV_WriteItem;
1717
Etan Cohend3652192014-06-20 08:28:44 -07001718typedef enum {
1719 HANDOVER_STARTED = 0,
1720 HANDOVER_COMPLETED = 1,
1721 HANDOVER_FAILED = 2,
1722 HANDOVER_CANCELED = 3
1723} RIL_SrvccState;
1724
1725/* hardware configuration reported to RILJ. */
1726typedef enum {
1727 RIL_HARDWARE_CONFIG_MODEM = 0,
1728 RIL_HARDWARE_CONFIG_SIM = 1,
1729} RIL_HardwareConfig_Type;
1730
1731typedef enum {
1732 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1733 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1734 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1735} RIL_HardwareConfig_State;
1736
1737typedef struct {
1738 int rilModel;
1739 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1740 int maxVoice;
1741 int maxData;
1742 int maxStandby;
1743} RIL_HardwareConfig_Modem;
1744
1745typedef struct {
Wink Saville8b4e4f72014-10-17 15:01:45 -07001746 char modemUuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001747} RIL_HardwareConfig_Sim;
1748
1749typedef struct {
1750 RIL_HardwareConfig_Type type;
Wink Saville8b4e4f72014-10-17 15:01:45 -07001751 char uuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001752 RIL_HardwareConfig_State state;
1753 union {
1754 RIL_HardwareConfig_Modem modem;
1755 RIL_HardwareConfig_Sim sim;
1756 } cfg;
1757} RIL_HardwareConfig;
1758
Amit Mahajan54563d32014-11-22 00:54:49 +00001759typedef enum {
1760 SS_CFU,
1761 SS_CF_BUSY,
1762 SS_CF_NO_REPLY,
1763 SS_CF_NOT_REACHABLE,
1764 SS_CF_ALL,
1765 SS_CF_ALL_CONDITIONAL,
1766 SS_CLIP,
1767 SS_CLIR,
1768 SS_COLP,
1769 SS_COLR,
1770 SS_WAIT,
1771 SS_BAOC,
1772 SS_BAOIC,
1773 SS_BAOIC_EXC_HOME,
1774 SS_BAIC,
1775 SS_BAIC_ROAMING,
1776 SS_ALL_BARRING,
1777 SS_OUTGOING_BARRING,
1778 SS_INCOMING_BARRING
1779} RIL_SsServiceType;
1780
1781typedef enum {
1782 SS_ACTIVATION,
1783 SS_DEACTIVATION,
1784 SS_INTERROGATION,
1785 SS_REGISTRATION,
1786 SS_ERASURE
1787} RIL_SsRequestType;
1788
1789typedef enum {
1790 SS_ALL_TELE_AND_BEARER_SERVICES,
1791 SS_ALL_TELESEVICES,
1792 SS_TELEPHONY,
1793 SS_ALL_DATA_TELESERVICES,
1794 SS_SMS_SERVICES,
1795 SS_ALL_TELESERVICES_EXCEPT_SMS
1796} RIL_SsTeleserviceType;
1797
1798#define SS_INFO_MAX 4
1799#define NUM_SERVICE_CLASSES 7
1800
1801typedef struct {
1802 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1803 For example if voice is forwarded to one number and data
1804 is forwarded to a different one then numValidIndexes will be
1805 2 indicating total number of valid values in cfInfo.
1806 Similarly if all the services are forwarded to the same
1807 number then the value of numValidIndexes will be 1. */
1808
1809 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1810 for SS request to query call
1811 forward status. see
1812 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1813} RIL_CfData;
1814
1815typedef struct {
1816 RIL_SsServiceType serviceType;
1817 RIL_SsRequestType requestType;
1818 RIL_SsTeleserviceType teleserviceType;
1819 int serviceClass;
1820 RIL_Errno result;
1821
1822 union {
1823 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1824 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1825 two ints, so first two values of ssInfo[] will be
1826 used for response if serviceType is SS_CLIR and
1827 requestType is SS_INTERROGATION */
1828
1829 RIL_CfData cfData;
1830 };
1831} RIL_StkCcUnsolSsResponse;
1832
Wink Saville7f856802009-06-09 10:23:37 -07001833/**
Wink Savillec29360a2014-07-13 05:17:28 -07001834 * Data connection power state
1835 */
1836typedef enum {
1837 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1838 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1839 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1840 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1841} RIL_DcPowerStates;
1842
1843/**
1844 * Data connection real time info
1845 */
1846typedef struct {
1847 uint64_t time; // Time in nanos as returned by ril_nano_time
1848 RIL_DcPowerStates powerState; // Current power state
1849} RIL_DcRtInfo;
1850
Amit Mahajanc796e222014-08-13 16:54:01 +00001851/**
1852 * Data profile to modem
1853 */
1854typedef struct {
1855 /* id of the data profile */
1856 int profileId;
1857 /* the APN to connect to */
1858 char* apn;
1859 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1860 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1861 */
1862 char* protocol;
1863 /** authentication protocol used for this PDP context
1864 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1865 */
1866 int authType;
1867 /* the username for APN, or NULL */
1868 char* user;
1869 /* the password for APN, or NULL */
1870 char* password;
1871 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1872 int type;
1873 /* the period in seconds to limit the maximum connections */
1874 int maxConnsTime;
1875 /* the maximum connections during maxConnsTime */
1876 int maxConns;
1877 /** the required wait time in seconds after a successful UE initiated
1878 * disconnect of a given PDN connection before the device can send
1879 * a new PDN connection request for that given PDN
1880 */
1881 int waitTime;
1882 /* true to enable the profile, 0 to disable, 1 to enable */
1883 int enabled;
1884} RIL_DataProfileInfo;
Wink Savillec29360a2014-07-13 05:17:28 -07001885
Jack Yu06181bb2017-01-10 12:10:41 -08001886typedef struct {
1887 /* id of the data profile */
1888 int profileId;
1889 /* the APN to connect to */
1890 char* apn;
1891 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1892 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1893 */
1894 char* protocol;
1895 /** one of the PDP_type values in TS 27.007 section 10.1.1 used on roaming network.
1896 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1897 */
1898 char *roamingProtocol;
1899 /** authentication protocol used for this PDP context
1900 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1901 */
1902 int authType;
1903 /* the username for APN, or NULL */
1904 char* user;
1905 /* the password for APN, or NULL */
1906 char* password;
1907 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1908 int type;
1909 /* the period in seconds to limit the maximum connections */
1910 int maxConnsTime;
1911 /* the maximum connections during maxConnsTime */
1912 int maxConns;
1913 /** the required wait time in seconds after a successful UE initiated
1914 * disconnect of a given PDN connection before the device can send
1915 * a new PDN connection request for that given PDN
1916 */
1917 int waitTime;
1918 /* true to enable the profile, 0 to disable, 1 to enable */
1919 int enabled;
1920 /* supported APN types bitmask. See RIL_ApnTypes for the value of each bit. */
1921 int supportedTypesBitmask;
1922 /** the bearer bitmask. See RIL_RadioAccessFamily for the value of each bit. */
1923 int bearerBitmask;
1924 /** maximum transmission unit (MTU) size in bytes */
1925 int mtu;
1926 /** the MVNO type: possible values are "imsi", "gid", "spn" */
1927 char *mvnoType;
1928 /** MVNO match data. Can be anything defined by the carrier. For example,
1929 * SPN like: "A MOBILE", "BEN NL", etc...
1930 * IMSI like: "302720x94", "2060188", etc...
1931 * GID like: "4E", "33", etc...
1932 */
1933 char *mvnoMatchData;
1934} RIL_DataProfileInfo_v15;
1935
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001936/* Tx Power Levels */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001937#define RIL_NUM_TX_POWER_LEVELS 5
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001938
Nathan Haroldc8635212016-10-10 11:15:21 -07001939/**
1940 * Aggregate modem activity information
1941 */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001942typedef struct {
1943
Nathan Haroldc8635212016-10-10 11:15:21 -07001944 /* total time (in ms) when modem is in a low power or
1945 * sleep state
1946 */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001947 uint32_t sleep_mode_time_ms;
1948
Nathan Haroldc8635212016-10-10 11:15:21 -07001949 /* total time (in ms) when modem is awake but neither
1950 * the transmitter nor receiver are active/awake */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001951 uint32_t idle_mode_time_ms;
1952
Nathan Haroldc8635212016-10-10 11:15:21 -07001953 /* total time (in ms) during which the transmitter is active/awake,
1954 * subdivided by manufacturer-defined device-specific
1955 * contiguous increasing ranges of transmit power between
1956 * 0 and the transmitter's maximum transmit power.
1957 */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001958 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001959
Nathan Haroldc8635212016-10-10 11:15:21 -07001960 /* total time (in ms) for which receiver is active/awake and
1961 * the transmitter is inactive */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001962 uint32_t rx_mode_time_ms;
1963} RIL_ActivityStatsInfo;
1964
Jack Yu06181bb2017-01-10 12:10:41 -08001965typedef enum {
1966 RIL_APN_TYPE_UNKNOWN = 0x0, // Unknown
1967 RIL_APN_TYPE_DEFAULT = 0x1, // APN type for default data traffic
1968 RIL_APN_TYPE_MMS = 0x2, // APN type for MMS traffic
1969 RIL_APN_TYPE_SUPL = 0x4, // APN type for SUPL assisted GPS
1970 RIL_APN_TYPE_DUN = 0x8, // APN type for DUN traffic
1971 RIL_APN_TYPE_HIPRI = 0x10, // APN type for HiPri traffic
1972 RIL_APN_TYPE_FOTA = 0x20, // APN type for FOTA
1973 RIL_APN_TYPE_IMS = 0x40, // APN type for IMS
1974 RIL_APN_TYPE_CBS = 0x80, // APN type for CBS
1975 RIL_APN_TYPE_IA = 0x100, // APN type for IA Initial Attach APN
1976 RIL_APN_TYPE_EMERGENCY = 0x200, // APN type for Emergency PDN. This is not an IA apn,
1977 // but is used for access to carrier services in an
1978 // emergency call situation.
1979 RIL_APN_TYPE_ALL = 0xFFFFFFFF // All APN types
1980} RIL_ApnTypes;
1981
1982typedef enum {
1983 RIL_DST_POWER_SAVE_MODE, // Device power save mode (provided by PowerManager)
1984 // Non-zero value indicates the device is in power save mode.
1985 RIL_DST_CHARGING_STATE, // Device charging state (provided by BatteryManager)
1986 // Non-zero value indicates the device is charging.
1987 RIL_DST_LOW_DATA_EXPECTED // Low data expected mode. Non-zero value indicates low data
1988 // traffic is expected, for example, when the device is idle
1989 // (e.g. not doing tethering in the background). Note
1990 // this doesn't mean no data is expected.
1991} RIL_DeviceStateType;
1992
1993typedef enum {
1994 RIL_UR_SIGNAL_STRENGTH = 0x01, // When this bit is set, modem should always send the
1995 // signal strength update through
1996 // RIL_UNSOL_SIGNAL_STRENGTH, otherwise suppress it.
1997 RIL_UR_FULL_NETWORK_STATE = 0x02, // When this bit is set, modem should always send
1998 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
1999 // when any field in
2000 // RIL_REQUEST_VOICE_REGISTRATION_STATE or
2001 // RIL_REQUEST_DATA_REGISTRATION_STATE changes. When
2002 // this bit is not set, modem should suppress
2003 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
2004 // only when insignificant fields change
2005 // (e.g. cell info).
2006 // Modem should continue sending
2007 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
2008 // when significant fields are updated even when this
2009 // bit is not set. The following fields are
2010 // considered significant, registration state and
2011 // radio technology.
2012 RIL_UR_DATA_CALL_DORMANCY_CHANGED = 0x04 // When this bit is set, modem should send the data
2013 // call list changed unsolicited response
2014 // RIL_UNSOL_DATA_CALL_LIST_CHANGED whenever any
2015 // field in RIL_Data_Call_Response changes.
2016 // Otherwise modem should suppress the unsolicited
2017 // response when the only changed field is 'active'
2018 // (for data dormancy). For all other fields change,
2019 // modem should continue sending
2020 // RIL_UNSOL_DATA_CALL_LIST_CHANGED regardless this
2021 // bit is set or not.
2022} RIL_UnsolicitedResponseFilter;
2023
Wileen Chiu410b7562015-11-23 14:25:22 -08002024typedef struct {
2025 char * aidPtr; /* AID value, See ETSI 102.221 and 101.220*/
2026 int p2; /* P2 parameter (described in ISO 7816-4)
2027 P2Constants:NO_P2 if to be ignored */
2028} RIL_OpenChannelParams;
2029
Wink Savillec29360a2014-07-13 05:17:28 -07002030/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002031 * RIL_REQUEST_GET_SIM_STATUS
2032 *
2033 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -07002034 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002035 * "data" is NULL
2036 *
Wink Savillefd729372011-02-22 16:19:39 -08002037 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002038 *
2039 * Valid errors:
2040 * Must never fail
2041 */
2042#define RIL_REQUEST_GET_SIM_STATUS 1
2043
2044/**
2045 * RIL_REQUEST_ENTER_SIM_PIN
2046 *
John Wang309ac292009-07-30 14:53:23 -07002047 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002048 *
2049 * "data" is const char **
2050 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08002051 * ((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 -08002052 *
jsh593c9102009-06-24 16:13:44 -07002053 * "response" is int *
2054 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002055 *
2056 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002057 *
2058 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002059 * RADIO_NOT_AVAILABLE (radio resetting)
2060 * GENERIC_FAILURE
2061 * PASSWORD_INCORRECT
2062 */
2063
2064#define RIL_REQUEST_ENTER_SIM_PIN 2
2065
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002066/**
2067 * RIL_REQUEST_ENTER_SIM_PUK
2068 *
Wink Saville7f856802009-06-09 10:23:37 -07002069 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002070 *
2071 * "data" is const char **
2072 * ((const char **)data)[0] is PUK value
2073 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08002074 * ((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 -08002075 *
jsh593c9102009-06-24 16:13:44 -07002076 * "response" is int *
2077 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002078 *
2079 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002080 *
2081 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002082 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002083 * PASSWORD_INCORRECT
2084 * (PUK is invalid)
2085 */
2086
2087#define RIL_REQUEST_ENTER_SIM_PUK 3
2088
2089/**
2090 * RIL_REQUEST_ENTER_SIM_PIN2
2091 *
2092 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
2093 * returned as a a failure from a previous operation.
2094 *
2095 * "data" is const char **
2096 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08002097 * ((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 -08002098 *
jsh593c9102009-06-24 16:13:44 -07002099 * "response" is int *
2100 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002101 *
2102 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002103 *
2104 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002105 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002106 * PASSWORD_INCORRECT
2107 */
2108
2109#define RIL_REQUEST_ENTER_SIM_PIN2 4
2110
2111/**
2112 * RIL_REQUEST_ENTER_SIM_PUK2
2113 *
Wink Saville7f856802009-06-09 10:23:37 -07002114 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002115 *
2116 * "data" is const char **
2117 * ((const char **)data)[0] is PUK2 value
2118 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08002119 * ((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 -08002120 *
jsh593c9102009-06-24 16:13:44 -07002121 * "response" is int *
2122 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002123 *
2124 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002125 *
2126 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002127 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002128 * PASSWORD_INCORRECT
2129 * (PUK2 is invalid)
2130 */
2131
2132#define RIL_REQUEST_ENTER_SIM_PUK2 5
2133
2134/**
2135 * RIL_REQUEST_CHANGE_SIM_PIN
2136 *
Wink Saville7f856802009-06-09 10:23:37 -07002137 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002138 *
2139 * "data" is const char **
2140 * ((const char **)data)[0] is old PIN value
2141 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08002142 * ((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 -08002143 *
jsh593c9102009-06-24 16:13:44 -07002144 * "response" is int *
2145 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002146 *
2147 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002148 *
2149 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002150 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002151 * PASSWORD_INCORRECT
2152 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07002153 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002154 */
2155
2156#define RIL_REQUEST_CHANGE_SIM_PIN 6
2157
2158
2159/**
2160 * RIL_REQUEST_CHANGE_SIM_PIN2
2161 *
Wink Saville7f856802009-06-09 10:23:37 -07002162 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002163 *
2164 * "data" is const char **
2165 * ((const char **)data)[0] is old PIN2 value
2166 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08002167 * ((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 -08002168 *
jsh593c9102009-06-24 16:13:44 -07002169 * "response" is int *
2170 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002171 *
2172 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002173 *
2174 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002175 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002176 * PASSWORD_INCORRECT
2177 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07002178 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002179 */
2180
2181#define RIL_REQUEST_CHANGE_SIM_PIN2 7
2182
2183/**
2184 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
2185 *
2186 * Requests that network personlization be deactivated
2187 *
2188 * "data" is const char **
2189 * ((const char **)(data))[0]] is network depersonlization code
2190 *
jsh593c9102009-06-24 16:13:44 -07002191 * "response" is int *
2192 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002193 *
2194 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002195 *
2196 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002197 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002198 * PASSWORD_INCORRECT
2199 * (code is invalid)
2200 */
2201
2202#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
2203
2204/**
Wink Saville7f856802009-06-09 10:23:37 -07002205 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002206 *
2207 * Requests current call list
2208 *
2209 * "data" is NULL
2210 *
2211 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07002212 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002213 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002214 *
2215 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002216 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002217 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002218 * (request will be made again in a few hundred msec)
2219 */
2220
2221#define RIL_REQUEST_GET_CURRENT_CALLS 9
2222
2223
Wink Saville7f856802009-06-09 10:23:37 -07002224/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002225 * RIL_REQUEST_DIAL
2226 *
2227 * Initiate voice call
2228 *
2229 * "data" is const RIL_Dial *
2230 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002231 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002232 * This method is never used for supplementary service codes
2233 *
2234 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002235 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002236 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00002237 * DIAL_MODIFIED_TO_USSD
2238 * DIAL_MODIFIED_TO_SS
2239 * DIAL_MODIFIED_TO_DIAL
Ajay Nambi10345892016-03-19 09:02:28 -07002240 * INVALID_ARGUMENTS
2241 * NO_MEMORY
2242 * INVALID_STATE
2243 * NO_RESOURCES
2244 * INTERNAL_ERR
2245 * FDN_CHECK_FAILURE
2246 * MODEM_ERR
2247 * NO_SUBSCRIPTION
2248 * NO_NETWORK_FOUND
2249 * INVALID_CALL_ID
2250 * DEVICE_IN_USE
2251 * MODE_NOT_SUPPORTED
2252 * ABORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002253 */
2254#define RIL_REQUEST_DIAL 10
2255
2256/**
2257 * RIL_REQUEST_GET_IMSI
2258 *
2259 * Get the SIM IMSI
2260 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08002261 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002262 *
Wink Savillec0114b32011-02-18 10:14:07 -08002263 * "data" is const char **
2264 * ((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 -08002265 * "response" is a const char * containing the IMSI
2266 *
2267 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002268 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002269 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002270 */
2271
2272#define RIL_REQUEST_GET_IMSI 11
2273
2274/**
2275 * RIL_REQUEST_HANGUP
2276 *
2277 * Hang up a specific line (like AT+CHLD=1x)
2278 *
John Wang06bae4b2010-11-18 16:37:09 -08002279 * After this HANGUP request returns, RIL should show the connection is NOT
2280 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2281 *
Wink Saville7f856802009-06-09 10:23:37 -07002282 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002283 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002284 *
2285 * "response" is NULL
2286 *
2287 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002288 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002289 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002290 * INVALID_ARGUMENTS
2291 * NO_MEMORY
2292 * INVALID_STATE
2293 * MODEM_ERR
2294 * INTERNAL_ERR
2295 * NO_MEMORY
2296 * INVALID_CALL_ID
2297 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002298 */
2299
2300#define RIL_REQUEST_HANGUP 12
2301
2302/**
2303 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
2304 *
2305 * Hang up waiting or held (like AT+CHLD=0)
2306 *
John Wang06bae4b2010-11-18 16:37:09 -08002307 * After this HANGUP request returns, RIL should show the connection is NOT
2308 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2309 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002310 * "data" is NULL
2311 * "response" is NULL
2312 *
2313 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002314 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002315 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002316 * INVALID_STATE
2317 * NO_MEMORY
2318 * MODEM_ERR
2319 * INTERNAL_ERR
2320 * NO_MEMORY
2321 * INVALID_CALL_ID
2322 * NO_RESOURCES
2323 * OPERATION_NOT_ALLOWED
2324 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002325 */
2326
2327#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
2328
2329/**
2330 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
2331 *
2332 * Hang up waiting or held (like AT+CHLD=1)
2333 *
John Wang06bae4b2010-11-18 16:37:09 -08002334 * After this HANGUP request returns, RIL should show the connection is NOT
2335 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2336 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002337 * "data" is NULL
2338 * "response" is NULL
2339 *
2340 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002341 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002342 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002343 * INVALID_STATE
2344 * NO_MEMORY
2345 * MODEM_ERR
2346 * INTERNAL_ERR
2347 * INVALID_CALL_ID
2348 * OPERATION_NOT_ALLOWED
2349 * INVALID_ARGUMENTS
2350 * NO_RESOURCES
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002351 */
2352
2353#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
2354
2355/**
2356 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
2357 *
2358 * Switch waiting or holding call and active call (like AT+CHLD=2)
2359 *
2360 * State transitions should be is follows:
2361 *
2362 * If call 1 is waiting and call 2 is active, then if this re
2363 *
2364 * BEFORE AFTER
2365 * Call 1 Call 2 Call 1 Call 2
2366 * ACTIVE HOLDING HOLDING ACTIVE
2367 * ACTIVE WAITING HOLDING ACTIVE
2368 * HOLDING WAITING HOLDING ACTIVE
2369 * ACTIVE IDLE HOLDING IDLE
2370 * IDLE IDLE IDLE IDLE
2371 *
2372 * "data" is NULL
2373 * "response" is NULL
2374 *
2375 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002376 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002377 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002378 * INVALID_STATE
2379 * NO_MEMORY
2380 * MODEM_ERR
2381 * INTERNAL_ERR
2382 * INVALID_STATE
2383 * INVALID_ARGUMENTS
2384 * INVALID_CALL_ID
2385 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002386 */
2387
2388#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
2389#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
2390
2391/**
2392 * RIL_REQUEST_CONFERENCE
2393 *
2394 * Conference holding and active (like AT+CHLD=3)
2395
2396 * "data" is NULL
2397 * "response" is NULL
2398 *
2399 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002400 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002401 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002402 * NO_MEMORY
2403 * MODEM_ERR
2404 * INTERNAL_ERR
2405 * INVALID_STATE
2406 * INVALID_CALL_ID
2407 * INVALID_ARGUMENTS
2408 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002409 */
2410#define RIL_REQUEST_CONFERENCE 16
2411
2412/**
2413 * RIL_REQUEST_UDUB
2414 *
Wink Saville7f856802009-06-09 10:23:37 -07002415 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002416 * waiting call answer)(RIL_BasicRequest r);
2417 *
2418 * "data" is NULL
2419 * "response" is NULL
2420 *
2421 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002422 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002423 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002424 * INVALID_STATE
2425 * NO_RESOURCES
2426 * NO_MEMORY
2427 * MODEM_ERR
2428 * INTERNAL_ERR
2429 * INVALID_CALL_ID
2430 * OPERATION_NOT_ALLOWED
2431 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002432 */
2433#define RIL_REQUEST_UDUB 17
2434
2435/**
2436 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2437 *
2438 * Requests the failure cause code for the most recently terminated call
2439 *
2440 * "data" is NULL
Jayachandran Ccc2a2022017-03-07 09:55:58 -08002441 * "response" is a const RIL_LastCallFailCauseInfo *
2442 * RIL_LastCallFailCauseInfo contains LastCallFailCause and vendor cause.
2443 * The vendor cause code must be used for debugging purpose only.
2444 * The implementation must return one of the values of LastCallFailCause
2445 * as mentioned below.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002446 *
Jayachandran Ccc2a2022017-03-07 09:55:58 -08002447 * GSM failure reasons codes for the cause codes defined in TS 24.008 Annex H
2448 * where possible.
2449 * CDMA failure reasons codes for the possible call failure scenarios
2450 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
2451 * Any of the following reason codes if the call is failed or dropped due to reason
2452 * mentioned with in the braces.
2453 *
2454 * CALL_FAIL_RADIO_OFF (Radio is OFF)
2455 * CALL_FAIL_OUT_OF_SERVICE (No cell coverage)
2456 * CALL_FAIL_NO_VALID_SIM (No valid SIM)
2457 * CALL_FAIL_RADIO_INTERNAL_ERROR (Modem hit unexpected error scenario)
2458 * CALL_FAIL_NETWORK_RESP_TIMEOUT (No response from network)
2459 * CALL_FAIL_NETWORK_REJECT (Explicit network reject)
2460 * CALL_FAIL_RADIO_ACCESS_FAILURE (RRC connection failure. Eg.RACH)
2461 * CALL_FAIL_RADIO_LINK_FAILURE (Radio Link Failure)
2462 * CALL_FAIL_RADIO_LINK_LOST (Radio link lost due to poor coverage)
2463 * CALL_FAIL_RADIO_UPLINK_FAILURE (Radio uplink failure)
2464 * CALL_FAIL_RADIO_SETUP_FAILURE (RRC connection setup failure)
2465 * CALL_FAIL_RADIO_RELEASE_NORMAL (RRC connection release, normal)
2466 * CALL_FAIL_RADIO_RELEASE_ABNORMAL (RRC connection release, abnormal)
2467 * CALL_FAIL_ACCESS_CLASS_BLOCKED (Access class barring)
2468 * CALL_FAIL_NETWORK_DETACH (Explicit network detach)
2469 *
2470 * OEM causes (CALL_FAIL_OEM_CAUSE_XX) must be used for debug purpose only
The Android Open Source Project34a51082009-03-05 14:34:37 -08002471 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002472 * If the implementation does not have access to the exact cause codes,
2473 * then it should return one of the values listed in RIL_LastCallFailCause,
2474 * as the UI layer needs to distinguish these cases for tone generation or
2475 * error notification.
2476 *
2477 * Valid errors:
2478 * SUCCESS
2479 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002480 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002481 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002482 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002483 */
2484#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
2485
2486/**
2487 * RIL_REQUEST_SIGNAL_STRENGTH
2488 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002489 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002490 *
2491 * Must succeed if radio is on.
2492 *
2493 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07002494 *
2495 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002496 *
2497 * Valid errors:
2498 * SUCCESS
2499 * RADIO_NOT_AVAILABLE
2500 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002501#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07002502
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002503/**
Wink Savillec0114b32011-02-18 10:14:07 -08002504 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002505 *
2506 * Request current registration state
2507 *
2508 * "data" is NULL
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -08002509 * "response" is a const RIL_VoiceRegistrationStateResponse *
Wink Saville1b5fd232009-04-22 14:50:00 -07002510 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002511 * Valid errors:
2512 * SUCCESS
2513 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002514 */
Wink Savillec0114b32011-02-18 10:14:07 -08002515#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002516
2517/**
Wink Savillec0114b32011-02-18 10:14:07 -08002518 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002519 *
Wink Savillec0114b32011-02-18 10:14:07 -08002520 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002521 *
2522 * "data" is NULL
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -08002523 * "response" is a const RIL_DataRegistrationStateResponse *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002524 *
2525 * Valid errors:
2526 * SUCCESS
2527 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002528 */
Wink Savillec0114b32011-02-18 10:14:07 -08002529#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002530
2531/**
2532 * RIL_REQUEST_OPERATOR
2533 *
2534 * Request current operator ONS or EONS
2535 *
2536 * "data" is NULL
2537 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07002538 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002539 * or NULL if unregistered
2540 *
Wink Saville7f856802009-06-09 10:23:37 -07002541 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002542 * or NULL if unregistered
2543 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2544 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07002545 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002546 * Valid errors:
2547 * SUCCESS
2548 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002549 */
2550#define RIL_REQUEST_OPERATOR 22
2551
2552/**
2553 * RIL_REQUEST_RADIO_POWER
2554 *
2555 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07002556 * If the radio is is turned off/on the radio modem subsystem
2557 * is expected return to an initialized state. For instance,
2558 * any voice and data calls will be terminated and all associated
2559 * lists emptied.
2560 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002561 * "data" is int *
2562 * ((int *)data)[0] is > 0 for "Radio On"
2563 * ((int *)data)[0] is == 0 for "Radio Off"
2564 *
2565 * "response" is NULL
2566 *
2567 * Turn radio on if "on" > 0
2568 * Turn radio off if "on" == 0
2569 *
2570 * Valid errors:
2571 * SUCCESS
2572 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002573 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002574 */
2575#define RIL_REQUEST_RADIO_POWER 23
2576
2577/**
2578 * RIL_REQUEST_DTMF
2579 *
2580 * Send a DTMF tone
2581 *
2582 * If the implementation is currently playing a tone requested via
2583 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2584 * should be played instead
2585 *
jsh602f80f2009-07-10 15:44:37 -07002586 * "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 -08002587 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002588 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002589 * FIXME should this block/mute microphone?
2590 * How does this interact with local DTMF feedback?
2591 *
2592 * Valid errors:
2593 * SUCCESS
2594 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002595 * INVALID_ARGUMENTS
2596 * NO_RESOURCES
2597 * NO_MEMORY
2598 * MODEM_ERR
2599 * INTERNAL_ERR
2600 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002601 *
2602 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2603 *
2604 */
2605#define RIL_REQUEST_DTMF 24
2606
2607/**
2608 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07002609 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002610 * Send an SMS message
2611 *
2612 * "data" is const char **
2613 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2614 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2615 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2616 * less the SMSC address
2617 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2618 *
2619 * "response" is a const RIL_SMS_Response *
2620 *
2621 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002622 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002623 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2624 *
2625 * Valid errors:
2626 * SUCCESS
2627 * RADIO_NOT_AVAILABLE
2628 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07002629 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08002630 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002631 * INVALID_STATE
2632 * INVALID_ARGUMENTS
2633 * NO_MEMORY
2634 * REQUEST_RATE_LIMITED
2635 * INVALID_SMS_FORMAT
2636 * SYSTEM_ERR
2637 * ENCODING_ERR
2638 * INVALID_SMSC_ADDRESS
2639 * MODEM_ERR
2640 * NETWORK_ERR
2641 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002642 *
2643 * FIXME how do we specify TP-Message-Reference if we need to resend?
2644 */
2645#define RIL_REQUEST_SEND_SMS 25
2646
2647
2648/**
2649 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07002650 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002651 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2652 * except that more messages are expected to be sent soon. If possible,
2653 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2654 *
2655 * "data" is const char **
2656 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2657 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2658 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2659 * less the SMSC address
2660 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2661 *
2662 * "response" is a const RIL_SMS_Response *
2663 *
2664 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002665 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002666 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2667 *
2668 * Valid errors:
2669 * SUCCESS
2670 * RADIO_NOT_AVAILABLE
2671 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08002672 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002673 * INVALID_STATE
2674 * INVALID_ARGUMENTS
2675 * NO_MEMORY
2676 * INVALID_SMS_FORMAT
2677 * SYSTEM_ERR
2678 * REQUEST_RATE_LIMITED
2679 * FDN_CHECK_FAILURE
2680 * MODEM_ERR
2681 * NETWORK_ERR
2682 * ENCODING_ERR
2683 * INVALID_SMSC_ADDRESS
2684 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002685 *
2686 */
2687#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2688
2689
2690/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002691 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002692 *
Wink Saville29487ef2011-04-15 09:15:31 -07002693 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2694 * return success it is added to the list of data calls and a
2695 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2696 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2697 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2698 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002699 *
Wink Saville43808972011-01-13 17:39:51 -08002700 * The RIL is expected to:
2701 * - Create one data call context.
2702 * - Create and configure a dedicated interface for the context
2703 * - The interface must be point to point.
2704 * - The interface is configured with one or more addresses and
2705 * is capable of sending and receiving packets. The prefix length
2706 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2707 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08002708 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08002709 * number of simultaneous data call contexts.
2710 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002711 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08002712 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2713 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07002714 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07002715 * ((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 -07002716 * override the one in the profile. NULL indicates no APN overrride.
2717 * ((const char **)data)[3] is the username for APN, or NULL
2718 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07002719 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2720 * 0 => PAP and CHAP is never performed.
2721 * 1 => PAP may be performed; CHAP is never performed.
2722 * 2 => CHAP may be performed; PAP is never performed.
2723 * 3 => PAP / CHAP may be performed - baseband dependent.
Jack Yu06181bb2017-01-10 12:10:41 -08002724 * ((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 -08002725 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07002726 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Jack Yu06181bb2017-01-10 12:10:41 -08002727 * ((const char **)data)[7] is the roaming connection type to request. Must be one of the
2728 * PDP_type values in TS 27.007 section 10.1.1.
2729 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
2730 * ((const char **)data)[8] is the bitmask of APN type in decimal string format. The
2731 * bitmask will encapsulate the following values:
2732 * ia,mms,agps,supl,hipri,fota,dun,ims,default.
2733 * ((const char **)data)[9] is the bearer bitmask in decimal string format. Each bit is a
2734 * RIL_RadioAccessFamily. "0" or NULL indicates all RATs.
2735 * ((const char **)data)[10] is the boolean in string format indicating the APN setting was
2736 * sent to the modem through RIL_REQUEST_SET_DATA_PROFILE earlier.
2737 * ((const char **)data)[11] is the mtu size in bytes of the mobile interface to which
2738 * the apn is connected.
2739 * ((const char **)data)[12] is the MVNO type:
2740 * possible values are "imsi", "gid", "spn".
2741 * ((const char **)data)[13] is MVNO match data in string. Can be anything defined by the carrier.
2742 * For example,
2743 * SPN like: "A MOBILE", "BEN NL", etc...
2744 * IMSI like: "302720x94", "2060188", etc...
2745 * GID like: "4E", "33", etc...
2746 * ((const char **)data)[14] is the boolean string indicating data roaming is allowed or not. "1"
2747 * indicates data roaming is enabled by the user, "0" indicates disabled.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002748 *
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -07002749 * "response" is a RIL_Data_Call_Response_v11
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002750 *
2751 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07002752 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002753 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08002754 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08002755 * the RIL_Data_Call_Response_v6.status containing the actual status.
2756 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08002757 *
2758 * Other errors could include:
2759 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2760 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002761 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002762 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002763 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002764#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002765
2766
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002767/**
2768 * RIL_REQUEST_SIM_IO
2769 *
2770 * Request SIM I/O operation.
2771 * This is similar to the TS 27.007 "restricted SIM" operation
2772 * where it assumes all of the EF selection will be done by the
2773 * callee.
2774 *
Wink Savillefd729372011-02-22 16:19:39 -08002775 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002776 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2777 * or may specify a PIN2 for operations that require a PIN2 (eg
2778 * updating FDN records)
2779 *
2780 * "response" is a const RIL_SIM_IO_Response *
2781 *
2782 * Arguments and responses that are unused for certain
2783 * values of "command" should be ignored or set to NULL
2784 *
2785 * Valid errors:
2786 * SUCCESS
2787 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002788 * SIM_PIN2
2789 * SIM_PUK2
2790 */
2791#define RIL_REQUEST_SIM_IO 28
2792
2793/**
2794 * RIL_REQUEST_SEND_USSD
2795 *
2796 * Send a USSD message
2797 *
2798 * If a USSD session already exists, the message should be sent in the
2799 * context of that session. Otherwise, a new session should be created.
2800 *
2801 * The network reply should be reported via RIL_UNSOL_ON_USSD
2802 *
2803 * Only one USSD session may exist at a time, and the session is assumed
2804 * to exist until:
2805 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2806 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2807 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2808 *
2809 * "data" is a const char * containing the USSD request in UTF-8 format
2810 * "response" is NULL
2811 *
2812 * Valid errors:
2813 * SUCCESS
2814 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07002815 * FDN_CHECK_FAILURE
Amit Mahajan54563d32014-11-22 00:54:49 +00002816 * USSD_MODIFIED_TO_DIAL
2817 * USSD_MODIFIED_TO_SS
2818 * USSD_MODIFIED_TO_USSD
twen.changdf7add02016-03-04 18:27:48 +08002819 * SIM_BUSY
2820 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002821 * INVALID_ARGUMENTS
2822 * NO_MEMORY
2823 * MODEM_ERR
2824 * INTERNAL_ERR
2825 * ABORTED
2826 * SYSTEM_ERR
2827 * INVALID_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002828 *
2829 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2830 */
2831
2832#define RIL_REQUEST_SEND_USSD 29
2833
2834/**
2835 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07002836 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002837 * Cancel the current USSD session if one exists
2838 *
2839 * "data" is null
2840 * "response" is NULL
2841 *
2842 * Valid errors:
2843 * SUCCESS
2844 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002845 * SIM_BUSY
2846 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002847 * MODEM_ERR
2848 * INTERNAL_ERR
2849 * NO_MEMORY
2850 * INVALID_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002851 */
2852
2853#define RIL_REQUEST_CANCEL_USSD 30
2854
Wink Saville7f856802009-06-09 10:23:37 -07002855/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002856 * RIL_REQUEST_GET_CLIR
2857 *
2858 * Gets current CLIR status
2859 * "data" is NULL
2860 * "response" is int *
2861 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2862 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2863 *
2864 * Valid errors:
2865 * SUCCESS
2866 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002867 * SS_MODIFIED_TO_DIAL
2868 * SS_MODIFIED_TO_USSD
2869 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002870 * NO_MEMORY
2871 * MODEM_ERR
2872 * INTERNAL_ERR
2873 * FDN_CHECK_FAILURE
2874 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002875 */
2876#define RIL_REQUEST_GET_CLIR 31
2877
2878/**
2879 * RIL_REQUEST_SET_CLIR
2880 *
2881 * "data" is int *
2882 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2883 *
2884 * "response" is NULL
2885 *
2886 * Valid errors:
2887 * SUCCESS
2888 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002889 * SS_MODIFIED_TO_DIAL
2890 * SS_MODIFIED_TO_USSD
2891 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002892 * INVALID_ARGUMENTS
2893 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002894 */
2895#define RIL_REQUEST_SET_CLIR 32
2896
2897/**
2898 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2899 *
2900 * "data" is const RIL_CallForwardInfo *
2901 *
2902 * "response" is const RIL_CallForwardInfo **
2903 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2904 * each distinct registered phone number.
2905 *
2906 * For example, if data is forwarded to +18005551212 and voice is forwarded
2907 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07002908 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002909 * If, however, both data and voice are forwarded to +18005551212, then
2910 * a single RIL_CallForwardInfo can be returned with the service class
2911 * set to "data + voice = 3")
2912 *
2913 * Valid errors:
2914 * SUCCESS
2915 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002916 * SS_MODIFIED_TO_DIAL
2917 * SS_MODIFIED_TO_USSD
2918 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002919 * INVALID_ARGUMENTS
2920 * NO_MEMORY
2921 * SYSTEM_ERR
2922 * MODEM_ERR
2923 * INTERNAL_ERR
2924 * NO_MEMORY
2925 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002926 */
2927#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2928
2929
2930/**
2931 * RIL_REQUEST_SET_CALL_FORWARD
2932 *
2933 * Configure call forward rule
2934 *
2935 * "data" is const RIL_CallForwardInfo *
2936 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002937 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002938 * Valid errors:
2939 * SUCCESS
2940 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002941 * SS_MODIFIED_TO_DIAL
2942 * SS_MODIFIED_TO_USSD
2943 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002944 * INVALID_ARGUMENTS
2945 * NO_MEMORY
2946 * SYSTEM_ERR
2947 * MODEM_ERR
2948 * INTERNAL_ERR
2949 * INVALID_STATE
2950 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002951 */
2952#define RIL_REQUEST_SET_CALL_FORWARD 34
2953
2954
2955/**
2956 * RIL_REQUEST_QUERY_CALL_WAITING
2957 *
2958 * Query current call waiting state
2959 *
2960 * "data" is const int *
2961 * ((const int *)data)[0] is the TS 27.007 service class to query.
2962 * "response" is a const int *
2963 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2964 *
2965 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2966 * must follow, with the TS 27.007 service class bit vector of services
2967 * for which call waiting is enabled.
2968 *
Wink Saville7f856802009-06-09 10:23:37 -07002969 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002970 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2971 * and voice and disabled for everything else
2972 *
2973 * Valid errors:
2974 * SUCCESS
2975 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002976 * SS_MODIFIED_TO_DIAL
2977 * SS_MODIFIED_TO_USSD
2978 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002979 * NO_MEMORY
2980 * MODEM_ERR
2981 * INTERNAL_ERR
2982 * NO_MEMORY
2983 * FDN_CHECK_FAILURE
2984 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002985 */
2986#define RIL_REQUEST_QUERY_CALL_WAITING 35
2987
2988
2989/**
2990 * RIL_REQUEST_SET_CALL_WAITING
2991 *
2992 * Configure current call waiting state
2993 *
2994 * "data" is const int *
2995 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2996 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2997 * services to modify
2998 * "response" is NULL
2999 *
3000 * Valid errors:
3001 * SUCCESS
3002 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003003 * SS_MODIFIED_TO_DIAL
3004 * SS_MODIFIED_TO_USSD
3005 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003006 * INVALID_ARGUMENTS
3007 * NO_MEMORY
3008 * MODEM_ERR
3009 * INTERNAL_ERR
3010 * INVALID_STATE
3011 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003012 */
3013#define RIL_REQUEST_SET_CALL_WAITING 36
3014
3015/**
3016 * RIL_REQUEST_SMS_ACKNOWLEDGE
3017 *
3018 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07003019 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003020 *
3021 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07003022 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003023 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07003024 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003025 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07003026 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
3027 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
3028 * capacity exceeded) and 0xFF (unspecified error) are
3029 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003030 *
3031 * "response" is NULL
3032 *
3033 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
3034 *
3035 * Valid errors:
3036 * SUCCESS
3037 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003038 */
3039#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
3040
3041/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003042 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003043 *
3044 * Get the device IMEI, including check digit
3045 *
johnwangf8bc1672009-05-14 19:19:47 -07003046 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003047 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
3048 *
3049 * "data" is NULL
3050 * "response" is a const char * containing the IMEI
3051 *
3052 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003053 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003054 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003055 */
3056
3057#define RIL_REQUEST_GET_IMEI 38
3058
3059/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003060 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003061 *
3062 * Get the device IMEISV, which should be two decimal digits
3063 *
johnwangf8bc1672009-05-14 19:19:47 -07003064 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003065 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
3066 *
3067 * "data" is NULL
3068 * "response" is a const char * containing the IMEISV
3069 *
3070 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003071 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003072 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003073 */
3074
3075#define RIL_REQUEST_GET_IMEISV 39
3076
3077
3078/**
3079 * RIL_REQUEST_ANSWER
3080 *
3081 * Answer incoming call
3082 *
3083 * Will not be called for WAITING calls.
3084 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
3085 * instead
3086 *
3087 * "data" is NULL
3088 * "response" is NULL
3089 *
3090 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003091 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003092 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003093 * INVALID_STATE
3094 * NO_MEMORY
3095 * SYSTEM_ERR
3096 * MODEM_ERR
3097 * INTERNAL_ERR
3098 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003099 */
3100
3101#define RIL_REQUEST_ANSWER 40
3102
3103/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003104 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003105 *
Wink Saville29487ef2011-04-15 09:15:31 -07003106 * Deactivate packet data connection and remove from the
3107 * data call list if SUCCESS is returned. Any other return
3108 * values should also try to remove the call from the list,
3109 * but that may not be possible. In any event a
3110 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
3111 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
3112 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003113 *
3114 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07003115 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06003116 * ((char**)data)[1] indicating Disconnect Reason
3117 * 0 => No specific reason specified
3118 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07003119 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003120 * "response" is NULL
3121 *
3122 * Valid errors:
3123 * SUCCESS
3124 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003125 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003126 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003127 */
Wink Savillef4c4d362009-04-02 01:37:03 -07003128#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003129
3130/**
3131 * RIL_REQUEST_QUERY_FACILITY_LOCK
3132 *
3133 * Query the status of a facility lock state
3134 *
3135 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07003136 * ((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 -08003137 * (eg "AO" for BAOC, "SC" for SIM lock)
3138 * ((const char **)data)[1] is the password, or "" if not required
3139 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
3140 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08003141 * ((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 -08003142 * This is only applicable in the case of Fixed Dialing Numbers
3143 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003144 *
3145 * "response" is an int *
3146 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07003147 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003148 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07003149 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003150 *
3151 * Valid errors:
3152 * SUCCESS
3153 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003154 * SS_MODIFIED_TO_DIAL
3155 * SS_MODIFIED_TO_USSD
3156 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003157 * INVALID_ARGUMENTS
3158 * NO_MEMORY
3159 * INTERNAL_ERR
3160 * SYSTEM_ERR
3161 * MODEM_ERR
3162 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003163 *
3164 */
3165#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
3166
3167/**
3168 * RIL_REQUEST_SET_FACILITY_LOCK
3169 *
3170 * Enable/disable one facility lock
3171 *
3172 * "data" is const char **
3173 *
3174 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3175 * (eg "AO" for BAOC)
3176 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
3177 * ((const char **)data)[2] = password
3178 * ((const char **)data)[3] = string representation of decimal TS 27.007
3179 * service class bit vector. Eg, the string
3180 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08003181 * ((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 -08003182 * This is only applicable in the case of Fixed Dialing Numbers
3183 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003184 *
jsh593c9102009-06-24 16:13:44 -07003185 * "response" is int *
3186 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003187 *
3188 * Valid errors:
3189 * SUCCESS
3190 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003191 * SS_MODIFIED_TO_DIAL
3192 * SS_MODIFIED_TO_USSD
3193 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003194 * INVALID_ARGUMENTS
3195 * INTERNAL_ERR
3196 * NO_MEMORY
3197 * MODEM_ERR
3198 * INVALID_STATE
3199 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003200 *
3201 */
3202#define RIL_REQUEST_SET_FACILITY_LOCK 43
3203
3204/**
3205 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
3206 *
3207 * Change call barring facility password
3208 *
3209 * "data" is const char **
3210 *
3211 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3212 * (eg "AO" for BAOC)
3213 * ((const char **)data)[1] = old password
3214 * ((const char **)data)[2] = new password
3215 *
Wink Saville7f856802009-06-09 10:23:37 -07003216 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003217 *
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 * MODEM_ERR
3227 * INTERNAL_ERR
3228 * SYSTEM_ERR
3229 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003230 *
3231 */
3232#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
3233
3234/**
3235 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
3236 *
3237 * Query current network selectin mode
3238 *
3239 * "data" is NULL
3240 *
3241 * "response" is int *
3242 * ((const int *)response)[0] is
3243 * 0 for automatic selection
3244 * 1 for manual selection
3245 *
3246 * Valid errors:
3247 * SUCCESS
3248 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003249 *
3250 */
3251#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
3252
3253/**
3254 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
3255 *
3256 * Specify that the network should be selected automatically
3257 *
3258 * "data" is NULL
3259 * "response" is NULL
3260 *
Wink Saville7f856802009-06-09 10:23:37 -07003261 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003262 * and registered
3263 *
3264 * Valid errors:
3265 * SUCCESS
3266 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003267 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003268 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003269 *
John Wang75534472010-04-20 15:11:42 -07003270 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3271 * no retries needed, such as illegal SIM or ME.
3272 * Returns GENERIC_FAILURE for all other causes that might be
3273 * fixed by retries.
3274 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003275 */
3276#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
3277
3278/**
3279 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
3280 *
3281 * Manually select a specified network.
3282 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003283 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
3284 * "response" is NULL
3285 *
Wink Saville7f856802009-06-09 10:23:37 -07003286 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003287 * and registered
3288 *
3289 * Valid errors:
3290 * SUCCESS
3291 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003292 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003293 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003294 *
John Wang75534472010-04-20 15:11:42 -07003295 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3296 * no retries needed, such as illegal SIM or ME.
3297 * Returns GENERIC_FAILURE for all other causes that might be
3298 * fixed by retries.
3299 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003300 */
3301#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
3302
3303/**
3304 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
3305 *
3306 * Scans for available networks
3307 *
3308 * "data" is NULL
3309 * "response" is const char ** that should be an array of n*4 strings, where
3310 * n is the number of available networks
3311 * For each available network:
3312 *
Wink Saville7f856802009-06-09 10:23:37 -07003313 * ((const char **)response)[n+0] is long alpha ONS or EONS
3314 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003315 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
3316 * ((const char **)response)[n+3] is a string value of the status:
3317 * "unknown"
3318 * "available"
3319 * "current"
3320 * "forbidden"
3321 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003322 * Valid errors:
3323 * SUCCESS
3324 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003325 * OPERATION_NOT_ALLOWED
Jayachandran Cb0cba832017-03-13 19:17:18 -07003326 * ABORTED
3327 * DEVICE_IN_USE
3328 * INTERNAL_ERR
3329 * NO_MEMORY
3330 * MODEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003331 *
3332 */
3333#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
3334
3335/**
3336 * RIL_REQUEST_DTMF_START
3337 *
Wink Saville7f856802009-06-09 10:23:37 -07003338 * Start playing a DTMF tone. Continue playing DTMF tone until
3339 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003340 *
3341 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
3342 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07003343 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003344 * "data" is a char *
3345 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
3346 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003347 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003348 * Valid errors:
3349 * SUCCESS
3350 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003351 * INVALID_ARGUMENTS
3352 * NO_RESOURCES
3353 * NO_MEMORY
3354 * SYSTEM_ERR
3355 * MODEM_ERR
3356 * INTERNAL_ERR
3357 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003358 *
3359 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
3360 */
3361#define RIL_REQUEST_DTMF_START 49
3362
3363/**
3364 * RIL_REQUEST_DTMF_STOP
3365 *
3366 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07003367 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003368 * "data" is NULL
3369 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003370 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003371 * Valid errors:
3372 * SUCCESS
3373 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003374 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07003375 * NO_RESOURCES
3376 * NO_MEMORY
3377 * INVALID_ARGUMENTS
3378 * SYSTEM_ERR
3379 * MODEM_ERR
3380 * INTERNAL_ERR
3381 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003382 *
3383 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
3384 */
3385#define RIL_REQUEST_DTMF_STOP 50
3386
3387/**
3388 * RIL_REQUEST_BASEBAND_VERSION
3389 *
3390 * Return string value indicating baseband version, eg
3391 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07003392 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003393 * "data" is NULL
3394 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07003395 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003396 * Valid errors:
3397 * SUCCESS
3398 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003399 * EMPTY_RECORD
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003400 *
3401 */
3402#define RIL_REQUEST_BASEBAND_VERSION 51
3403
3404/**
3405 * RIL_REQUEST_SEPARATE_CONNECTION
3406 *
3407 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07003408 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003409 * as the only other member of the current (active) call
3410 *
3411 * Like AT+CHLD=2x
3412 *
3413 * See TS 22.084 1.3.8.2 (iii)
3414 * TS 22.030 6.5.5 "Entering "2X followed by send"
3415 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07003416 *
3417 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07003418 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
3419 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003420 * "response" is NULL
3421 *
3422 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003423 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003424 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003425 * INVALID_ARGUMENTS
3426 * INVALID_STATE
3427 * NO_RESOURCES
3428 * NO_MEMORY
3429 * SYSTEM_ERR
3430 * MODEM_ERR
3431 * INTERNAL_ERR
3432 * INVALID_CALL_ID
3433 * INVALID_STATE
3434 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003435 */
3436#define RIL_REQUEST_SEPARATE_CONNECTION 52
3437
3438
3439/**
3440 * RIL_REQUEST_SET_MUTE
3441 *
3442 * Turn on or off uplink (microphone) mute.
3443 *
3444 * Will only be sent while voice call is active.
3445 * Will always be reset to "disable mute" when a new voice call is initiated
3446 *
3447 * "data" is an int *
3448 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
3449 *
3450 * "response" is NULL
3451 *
3452 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003453 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003454 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi68900f52016-03-11 12:02:55 -08003455 * INVALID_ARGUMENTS
3456 * NO_MEMORY
3457 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003458 */
3459
3460#define RIL_REQUEST_SET_MUTE 53
3461
3462/**
3463 * RIL_REQUEST_GET_MUTE
3464 *
3465 * Queries the current state of the uplink mute setting
3466 *
3467 * "data" is NULL
3468 * "response" is an int *
3469 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
3470 *
3471 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003472 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003473 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00003474 * SS_MODIFIED_TO_DIAL
3475 * SS_MODIFIED_TO_USSD
3476 * SS_MODIFIED_TO_SS
Ajay Nambi68900f52016-03-11 12:02:55 -08003477 * NO_MEMORY
3478 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003479 */
3480
3481#define RIL_REQUEST_GET_MUTE 54
3482
3483/**
3484 * RIL_REQUEST_QUERY_CLIP
3485 *
3486 * Queries the status of the CLIP supplementary service
3487 *
3488 * (for MMI code "*#30#")
3489 *
3490 * "data" is NULL
3491 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07003492 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003493 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07003494 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003495 *
3496 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003497 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003498 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003499 * NO_MEMORY
3500 * SYSTEM_ERR
3501 * MODEM_ERR
3502 * INTERNAL_ERR
3503 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003504 */
3505
3506#define RIL_REQUEST_QUERY_CLIP 55
3507
3508/**
Wink Savillec0114b32011-02-18 10:14:07 -08003509 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
3510 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003511 *
3512 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07003513 * context or CDMA data connection active
3514 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003515 *
3516 * "data" is NULL
3517 *
3518 * "response" is a "int *"
3519 * ((int *)response)[0] is an integer cause code defined in TS 24.008
3520 * section 6.1.3.1.3 or close approximation
3521 *
3522 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07003523 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08003524 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003525 * cases for error notification
3526 * and potential retries.
3527 *
3528 * Valid errors:
3529 * SUCCESS
3530 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003531 *
3532 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08003533 *
3534 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003535 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003536
Wink Savillef4c4d362009-04-02 01:37:03 -07003537#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003538
3539/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003540 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003541 *
Wink Saville29487ef2011-04-15 09:15:31 -07003542 * Returns the data call list. An entry is added when a
3543 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
3544 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
3545 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003546 *
3547 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08003548 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003549 *
3550 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003551 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003552 * RADIO_NOT_AVAILABLE (radio resetting)
Wink Saville29487ef2011-04-15 09:15:31 -07003553 *
3554 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003555 */
3556
Wink Savillef4c4d362009-04-02 01:37:03 -07003557#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003558
3559/**
johnwangf8bc1672009-05-14 19:19:47 -07003560 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003561 *
3562 * Request a radio reset. The RIL implementation may postpone
3563 * the reset until after this request is responded to if the baseband
3564 * is presently busy.
3565 *
johnwangf8bc1672009-05-14 19:19:47 -07003566 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
3567 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003568 * "data" is NULL
3569 * "response" is NULL
3570 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003571 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003572 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003573 * RADIO_NOT_AVAILABLE (radio resetting)
johnwangf8bc1672009-05-14 19:19:47 -07003574 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003575 */
3576
3577#define RIL_REQUEST_RESET_RADIO 58
3578
3579/**
3580 * RIL_REQUEST_OEM_HOOK_RAW
3581 *
3582 * This request reserved for OEM-specific uses. It passes raw byte arrays
3583 * back and forth.
3584 *
Wink Saville7f856802009-06-09 10:23:37 -07003585 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003586 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
3587 *
3588 * "data" is a char * of bytes copied from the byte[] data argument in java
3589 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07003590 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003591 * (byte[])(((AsyncResult)response.obj).result)
3592 *
Wink Saville7f856802009-06-09 10:23:37 -07003593 * An error response here will result in
3594 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003595 * (((AsyncResult)response.obj).exception) being an instance of
3596 * com.android.internal.telephony.gsm.CommandException
3597 *
3598 * Valid errors:
3599 * All
3600 */
3601
3602#define RIL_REQUEST_OEM_HOOK_RAW 59
3603
3604/**
3605 * RIL_REQUEST_OEM_HOOK_STRINGS
3606 *
3607 * This request reserved for OEM-specific uses. It passes strings
3608 * back and forth.
3609 *
Wink Saville7f856802009-06-09 10:23:37 -07003610 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003611 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
3612 *
3613 * "data" is a const char **, representing an array of null-terminated UTF-8
3614 * strings copied from the "String[] strings" argument to
3615 * invokeOemRilRequestStrings()
3616 *
3617 * "response" is a const char **, representing an array of null-terminated UTF-8
3618 * stings that will be returned via the caller's response message here:
3619 *
3620 * (String[])(((AsyncResult)response.obj).result)
3621 *
Wink Saville7f856802009-06-09 10:23:37 -07003622 * An error response here will result in
3623 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003624 * (((AsyncResult)response.obj).exception) being an instance of
3625 * com.android.internal.telephony.gsm.CommandException
3626 *
3627 * Valid errors:
3628 * All
3629 */
3630
3631#define RIL_REQUEST_OEM_HOOK_STRINGS 60
3632
3633/**
Jack Yu06181bb2017-01-10 12:10:41 -08003634 * RIL_REQUEST_SCREEN_STATE - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003635 *
3636 * Indicates the current state of the screen. When the screen is off, the
3637 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07003638 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
3639 * in an effort to conserve power. These notifications should resume when the
3640 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003641 *
Jack Yu06181bb2017-01-10 12:10:41 -08003642 * Note this request is deprecated. Use RIL_REQUEST_SEND_DEVICE_STATE to report the device state
3643 * to the modem and use RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER to turn on/off unsolicited
3644 * response from the modem in different scenarios.
3645 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003646 * "data" is int *
3647 * ((int *)data)[0] is == 1 for "Screen On"
3648 * ((int *)data)[0] is == 0 for "Screen Off"
3649 *
3650 * "response" is NULL
3651 *
3652 * Valid errors:
3653 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003654 */
3655#define RIL_REQUEST_SCREEN_STATE 61
3656
3657
3658/**
3659 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
3660 *
3661 * Enables/disables supplementary service related notifications
3662 * from the network.
3663 *
3664 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3665 *
3666 * "data" is int *
3667 * ((int *)data)[0] is == 1 for notifications enabled
3668 * ((int *)data)[0] is == 0 for notifications disabled
3669 *
3670 * "response" is NULL
3671 *
3672 * Valid errors:
3673 * SUCCESS
3674 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003675 * SIM_BUSY
Ajay Nambi10345892016-03-19 09:02:28 -07003676 * INVALID_ARGUMENTS
3677 * NO_MEMORY
3678 * SYSTEM_ERR
3679 * MODEM_ERR
3680 * INTERNAL_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003681 *
3682 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3683 */
3684#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
3685
3686/**
3687 * RIL_REQUEST_WRITE_SMS_TO_SIM
3688 *
3689 * Stores a SMS message to SIM memory.
3690 *
3691 * "data" is RIL_SMS_WriteArgs *
3692 *
3693 * "response" is int *
3694 * ((const int *)response)[0] is the record index where the message is stored.
3695 *
3696 * Valid errors:
3697 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003698 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003699 * INVALID_ARGUMENTS
3700 * INVALID_SMS_FORMAT
3701 * INTERNAL_ERR
3702 * MODEM_ERR
3703 * ENCODING_ERR
3704 * NO_MEMORY
3705 * NO_RESOURCES
3706 * INVALID_MODEM_STATE
3707 * MODE_NOT_SUPPORTED
3708 * INVALID_SMSC_ADDRESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003709 *
3710 */
3711#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
3712
3713/**
3714 * RIL_REQUEST_DELETE_SMS_ON_SIM
3715 *
3716 * Deletes a SMS message from SIM memory.
3717 *
3718 * "data" is int *
3719 * ((int *)data)[0] is the record index of the message to delete.
3720 *
3721 * "response" is NULL
3722 *
3723 * Valid errors:
3724 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003725 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003726 * INVALID_ARGUMENTS
3727 * NO_MEMORY
3728 * REQUEST_RATE_LIMITED
3729 * SYSTEM_ERR
3730 * MODEM_ERR
3731 * NO_SUCH_ENTRY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003732 *
3733 */
3734#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
3735
3736/**
3737 * RIL_REQUEST_SET_BAND_MODE
3738 *
3739 * Assign a specified band for RF configuration.
3740 *
3741 * "data" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003742 * ((int *)data)[0] is a RIL_RadioBandMode
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003743 *
3744 * "response" is NULL
3745 *
3746 * Valid errors:
3747 * SUCCESS
3748 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003749 * OPERATION_NOT_ALLOWED
Nathan Harold92839f12016-02-12 10:02:28 -08003750 *
3751 * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003752 */
3753#define RIL_REQUEST_SET_BAND_MODE 65
3754
3755/**
3756 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3757 *
3758 * Query the list of band mode supported by RF.
3759 *
3760 * "data" is NULL
3761 *
3762 * "response" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003763 * "response" points to an array of int's, the int[0] is the size of array;
3764 * subsequent values are a list of RIL_RadioBandMode listing supported modes.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003765 *
3766 * Valid errors:
3767 * SUCCESS
3768 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003769 *
3770 * See also: RIL_REQUEST_SET_BAND_MODE
3771 */
3772#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
3773
3774/**
3775 * RIL_REQUEST_STK_GET_PROFILE
3776 *
3777 * Requests the profile of SIM tool kit.
3778 * The profile indicates the SAT/USAT features supported by ME.
3779 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
3780 *
3781 * "data" is NULL
3782 *
3783 * "response" is a const char * containing SAT/USAT profile
3784 * in hexadecimal format string starting with first byte of terminal profile
3785 *
3786 * Valid errors:
3787 * RIL_E_SUCCESS
3788 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3789 * RIL_E_GENERIC_FAILURE
3790 */
3791#define RIL_REQUEST_STK_GET_PROFILE 67
3792
3793/**
3794 * RIL_REQUEST_STK_SET_PROFILE
3795 *
3796 * Download the STK terminal profile as part of SIM initialization
3797 * procedure
3798 *
3799 * "data" is a const char * containing SAT/USAT profile
3800 * in hexadecimal format string starting with first byte of terminal profile
3801 *
3802 * "response" is NULL
3803 *
3804 * Valid errors:
3805 * RIL_E_SUCCESS
3806 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3807 * RIL_E_GENERIC_FAILURE
3808 */
3809#define RIL_REQUEST_STK_SET_PROFILE 68
3810
3811/**
3812 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
3813 *
3814 * Requests to send a SAT/USAT envelope command to SIM.
3815 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
3816 *
3817 * "data" is a const char * containing SAT/USAT command
3818 * in hexadecimal format string starting with command tag
3819 *
3820 * "response" is a const char * containing SAT/USAT response
3821 * in hexadecimal format string starting with first byte of response
3822 * (May be NULL)
3823 *
3824 * Valid errors:
3825 * RIL_E_SUCCESS
3826 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003827 * SIM_BUSY
3828 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003829 * RIL_E_GENERIC_FAILURE
3830 */
3831#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
3832
3833/**
3834 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
3835 *
3836 * Requests to send a terminal response to SIM for a received
3837 * proactive command
3838 *
3839 * "data" is a const char * containing SAT/USAT response
3840 * in hexadecimal format string starting with first byte of response data
3841 *
3842 * "response" is NULL
3843 *
3844 * Valid errors:
3845 * RIL_E_SUCCESS
3846 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003847 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003848 * RIL_E_GENERIC_FAILURE
3849 */
3850#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3851
3852/**
3853 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3854 *
3855 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3856 * been initialized by ME already. (We could see the call has been in the 'call
3857 * list') So, STK application needs to accept/reject the call according as user
3858 * operations.
3859 *
3860 * "data" is int *
3861 * ((int *)data)[0] is > 0 for "accept" the call setup
3862 * ((int *)data)[0] is == 0 for "reject" the call setup
3863 *
3864 * "response" is NULL
3865 *
3866 * Valid errors:
3867 * RIL_E_SUCCESS
3868 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003869 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003870 * RIL_E_GENERIC_FAILURE
3871 */
3872#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3873
3874/**
3875 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3876 *
3877 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07003878 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003879 * "data" is NULL
3880 * "response" is NULL
3881 *
3882 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003883 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003884 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003885 * INVALID_STATE
3886 * NO_RESOURCES
3887 * NO_MEMORY
3888 * INVALID_ARGUMENTS
3889 * SYSTEM_ERR
3890 * MODEM_ERR
3891 * INTERNAL_ERR
3892 * INVALID_CALL_ID
3893 * INVALID_STATE
3894 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003895 */
3896#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3897
3898/**
3899 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3900 *
3901 * Requests to set the preferred network type for searching and registering
3902 * (CS/PS domain, RAT, and operation mode)
3903 *
Wink Savillec0114b32011-02-18 10:14:07 -08003904 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003905 *
3906 * "response" is NULL
3907 *
3908 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07003909 * SUCCESS
3910 * RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003911 * OPERATION_NOT_ALLOWED
Wink Savillef4c4d362009-04-02 01:37:03 -07003912 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003913 */
3914#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3915
3916/**
3917 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
3918 *
3919 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
3920 * for searching and registering
3921 *
3922 * "data" is NULL
3923 *
3924 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003925 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003926 *
3927 * Valid errors:
3928 * SUCCESS
3929 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003930 *
3931 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3932 */
3933#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
3934
3935/**
3936 * RIL_REQUEST_NEIGHBORING_CELL_IDS
3937 *
3938 * Request neighboring cell id in GSM network
3939 *
3940 * "data" is NULL
3941 * "response" must be a " const RIL_NeighboringCell** "
3942 *
3943 * Valid errors:
3944 * SUCCESS
3945 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003946 */
3947#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3948
3949/**
3950 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07003951 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003952 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07003953 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3954 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003955 *
3956 * Note: The RIL implementation should default to "updates enabled"
3957 * when the screen is on and "updates disabled" when the screen is off.
3958 *
3959 * "data" is int *
3960 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3961 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3962 *
3963 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07003964 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003965 * Valid errors:
3966 * SUCCESS
3967 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003968 *
3969 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3970 */
3971#define RIL_REQUEST_SET_LOCATION_UPDATES 76
3972
Wink Savillef4c4d362009-04-02 01:37:03 -07003973/**
Wink Savillec0114b32011-02-18 10:14:07 -08003974 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07003975 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003976 * Request to set the location where the CDMA subscription shall
3977 * be retrieved
3978 *
3979 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003980 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07003981 *
3982 * "response" is NULL
3983 *
3984 * Valid errors:
3985 * SUCCESS
3986 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07003987 * SIM_ABSENT
3988 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08003989 *
3990 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07003991 */
Wink Savillec0114b32011-02-18 10:14:07 -08003992#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07003993
3994/**
3995 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003996 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003997 * Request to set the roaming preferences in CDMA
3998 *
3999 * "data" is int *
4000 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
4001 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
4002 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07004003 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004004 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004005 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004006 * Valid errors:
4007 * SUCCESS
4008 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07004009 */
4010#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
4011
4012/**
4013 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07004014 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004015 * Request the actual setting of the roaming preferences in CDMA in the modem
4016 *
4017 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004018 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004019 * "response" is int *
4020 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
4021 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
4022 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07004023 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004024 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004025 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004026 * Valid errors:
4027 * SUCCESS
4028 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07004029 */
4030#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
4031
4032/**
4033 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07004034 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004035 * Request to set the TTY mode
4036 *
4037 * "data" is int *
4038 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07004039 * ((int *)data)[0] is == 1 for TTY Full
4040 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
4041 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07004042 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004043 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004044 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004045 * Valid errors:
4046 * SUCCESS
4047 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004048 * INVALID_ARGUMENTS
4049 * MODEM_ERR
4050 * INTERNAL_ERR
4051 * NO_MEMOR
4052 * INVALID_ARGUMENTS
4053 * MODEM_ERR
4054 * INTERNAL_ERR
4055 * NO_MEMORYY
Wink Savillef4c4d362009-04-02 01:37:03 -07004056 */
4057#define RIL_REQUEST_SET_TTY_MODE 80
4058
4059/**
4060 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07004061 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004062 * Request the setting of TTY mode
4063 *
4064 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004065 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004066 * "response" is int *
4067 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07004068 * ((int *)response)[0] is == 1 for TTY Full
4069 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
4070 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07004071 *
4072 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004073 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004074 * Valid errors:
4075 * SUCCESS
4076 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004077 * MODEM_ERR
4078 * INTERNAL_ERR
4079 * NO_MEMORY
4080 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07004081 */
4082#define RIL_REQUEST_QUERY_TTY_MODE 81
4083
4084/**
4085 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
4086 *
4087 * Request to set the preferred voice privacy mode used in voice
4088 * scrambling
4089 *
4090 * "data" is int *
4091 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
4092 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07004093 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004094 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004095 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004096 * Valid errors:
4097 * SUCCESS
4098 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004099 * INVALID_ARGUMENTS
4100 * SYSTEM_ERR
4101 * MODEM_ERR
4102 * INTERNAL_ERR
4103 * NO_MEMORY
4104 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07004105 */
4106#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
4107
4108/**
4109 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07004110 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004111 * Request the setting of preferred voice privacy mode
4112 *
4113 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004114 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004115 * "response" is int *
4116 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
4117 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07004118 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004119 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004120 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004121 * Valid errors:
4122 * SUCCESS
4123 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004124 * MODEM_ERR
4125 * INTERNAL_ERR
4126 * NO_MEMORY
4127 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07004128 */
4129#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
4130
4131/**
4132 * RIL_REQUEST_CDMA_FLASH
4133 *
4134 * Send FLASH
4135 *
4136 * "data" is const char *
4137 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07004138 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004139 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004140 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004141 * Valid errors:
4142 * SUCCESS
4143 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004144 * INVALID_ARGUMENTS
4145 * NO_MEMORY
4146 * SYSTEM_ERR
4147 * MODEM_ERR
4148 * INTERNAL_ERR
4149 * INVALID_CALL_ID
4150 * INVALID_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004151 *
4152 */
4153#define RIL_REQUEST_CDMA_FLASH 84
4154
4155/**
4156 * RIL_REQUEST_CDMA_BURST_DTMF
4157 *
4158 * Send DTMF string
4159 *
jsh602f80f2009-07-10 15:44:37 -07004160 * "data" is const char **
4161 * ((const char **)data)[0] is a DTMF string
4162 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
4163 * default
4164 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
4165 * default
Wink Saville7f856802009-06-09 10:23:37 -07004166 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004167 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004168 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004169 * Valid errors:
4170 * SUCCESS
4171 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004172 * INVALID_ARGUMENTS
4173 * NO_MEMORY
4174 * SYSTEM_ERR
4175 * MODEM_ERR
4176 * INTERNAL_ERR
4177 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07004178 *
4179 */
4180#define RIL_REQUEST_CDMA_BURST_DTMF 85
4181
4182/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004183 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07004184 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004185 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
4186 * If the checksum is valid the 20 digit AKEY is written to NV,
4187 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07004188 *
4189 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004190 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
4191 * where the last 6 digits are a checksum of the
4192 * first 20, as specified in TR45.AHAG
4193 * "Common Cryptographic Algorithms, Revision D.1
4194 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07004195 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004196 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004197 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004198 * Valid errors:
4199 * SUCCESS
4200 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07004201 *
4202 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004203#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07004204
4205/**
4206 * RIL_REQUEST_CDMA_SEND_SMS
4207 *
4208 * Send a CDMA SMS message
4209 *
4210 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07004211 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004212 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07004213 *
johnwangbfb151b2009-09-11 15:20:38 -07004214 * Based on the return error, caller decides to resend if sending sms
4215 * fails. The CDMA error class is derived as follows,
4216 * SUCCESS is error class 0 (no error)
4217 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
4218 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
4219 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004220 * Valid errors:
4221 * SUCCESS
4222 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07004223 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08004224 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004225 * INVALID_STATE
4226 * INVALID_ARGUMENTS
4227 * NO_MEMORY
4228 * REQUEST_RATE_LIMITED
4229 * INVALID_SMS_FORMAT
4230 * SYSTEM_ERR
4231 * FDN_CHECK_FAILURE
4232 * MODEM_ERR
4233 * NETWORK_ERR
4234 * ENCODING_ERR
4235 * INVALID_SMSC_ADDRESS
4236 * MODE_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004237 *
4238 */
4239#define RIL_REQUEST_CDMA_SEND_SMS 87
4240
4241/**
4242 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4243 *
4244 * Acknowledge the success or failure in the receipt of SMS
4245 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4246 *
4247 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07004248 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004249 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004250 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004251 * Valid errors:
4252 * SUCCESS
4253 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004254 * INVALID_ARGUMENTS
4255 * NO_SMS_TO_ACK
4256 * INVALID_STATE
4257 * NO_MEMORY
4258 * REQUEST_RATE_LIMITED
4259 * SYSTEM_ERR
4260 * MODEM_ERR
4261 * INVALID_STATE
4262 * MODE_NOT_SUPPORTED
4263 * NETWORK_NOT_READY
4264 * INVALID_MODEM_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004265 *
4266 */
4267#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
4268
4269/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004270 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004271 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004272 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
4273 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004274 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004275 *
4276 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
4277 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
4278 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004279 * Valid errors:
4280 * SUCCESS
4281 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004282 * INVALID_STATE
4283 * NO_MEMORY
4284 * REQUEST_RATE_LIMITED
4285 * SYSTEM_ERR
4286 * NO_RESOURCES
4287 * MODEM_ERR
4288 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004289 *
4290 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004291#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07004292
4293/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004294 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004295 *
4296 * Set GSM/WCDMA Cell Broadcast SMS config
4297 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004298 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
4299 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
4300 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004301 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004302 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004303 * Valid errors:
4304 * SUCCESS
4305 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004306 * INVALID_STATE
4307 * INVALID_ARGUMENTS
4308 * NO_MEMORY
4309 * SYSTEM_ERR
4310 * REQUEST_RATE_LIMITED
4311 * MODEM_ERR
4312 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004313 *
4314 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004315#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07004316
4317/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004318 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004319 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004320* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07004321 *
4322 * "data" is const int *
4323 * (const int *)data[0] indicates to activate or turn off the
4324 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
4325 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004326 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004327 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004328 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004329 * Valid errors:
4330 * SUCCESS
4331 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004332 * INVALID_STATE
4333 * INVALID_ARGUMENTS
4334 * NO_MEMORY
4335 * SYSTEM_ERR
4336 * REQUEST_RATE_LIMITED
4337 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004338 *
4339 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004340#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07004341
4342/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004343 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004344 *
4345 * Request the setting of CDMA Broadcast SMS config
4346 *
4347 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004348 *
4349 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
4350 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
4351 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004352 * Valid errors:
4353 * SUCCESS
4354 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004355 * INVALID_STATE
4356 * NO_MEMORY
4357 * REQUEST_RATE_LIMITED
4358 * SYSTEM_ERR
4359 * NO_RESOURCES
4360 * MODEM_ERR
4361 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004362 *
4363 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004364#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07004365
4366/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004367 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004368 *
4369 * Set CDMA Broadcast SMS config
4370 *
Jack Yu06181bb2017-01-10 12:10:41 -08004371 * "data" is a const RIL_CDMA_BroadcastSmsConfigInfo **
Wink Savillea592eeb2009-05-22 13:26:36 -07004372 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
4373 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004374 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004375 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004376 * Valid errors:
4377 * SUCCESS
4378 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004379 * INVALID_STATE
4380 * INVALID_ARGUMENTS
4381 * NO_MEMORY
4382 * SYSTEM_ERR
4383 * REQUEST_RATE_LIMITED
4384 * MODEM_ERR
4385 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004386 *
4387 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004388#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07004389
4390/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004391 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004392 *
4393 * Enable or disable the reception of CDMA Broadcast SMS
4394 *
4395 * "data" is const int *
4396 * (const int *)data[0] indicates to activate or turn off the
4397 * reception of CDMA Broadcast SMS, 0-1,
4398 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004399 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004400 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004401 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004402 * Valid errors:
4403 * SUCCESS
4404 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004405 * INVALID_STATE
4406 * INVALID_ARGUMENTS
4407 * NO_MEMORY
4408 * SYSTEM_ERR
4409 * REQUEST_RATE_LIMITED
4410 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004411 *
4412 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004413#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07004414
4415/**
4416 * RIL_REQUEST_CDMA_SUBSCRIPTION
4417 *
4418 * Request the device MDN / H_SID / H_NID.
4419 *
4420 * The request is only allowed when CDMA subscription is available. When CDMA
4421 * subscription is changed, application layer should re-issue the request to
4422 * update the subscription information.
4423 *
4424 * If a NULL value is returned for any of the device id, it means that error
4425 * accessing the device.
4426 *
4427 * "response" is const char **
4428 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07004429 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
4430 * CDMA subscription is available, in decimal format
4431 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
4432 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07004433 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07004434 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07004435 *
4436 * Valid errors:
4437 * SUCCESS
4438 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
4439 */
4440
Wink Savilleeafe79d2009-04-03 18:02:34 -07004441#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07004442
4443/**
4444 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
4445 *
4446 * Stores a CDMA SMS message to RUIM memory.
4447 *
4448 * "data" is RIL_CDMA_SMS_WriteArgs *
4449 *
4450 * "response" is int *
4451 * ((const int *)response)[0] is the record index where the message is stored.
4452 *
4453 * Valid errors:
4454 * SUCCESS
4455 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004456 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08004457 * INVALID_ARGUMENTS
4458 * INVALID_SMS_FORMAT
4459 * INTERNAL_ERR
4460 * MODEM_ERR
4461 * ENCODING_ERR
4462 * NO_MEMORY
4463 * NO_RESOURCES
4464 * INVALID_MODEM_STATE
4465 * MODE_NOT_SUPPORTED
4466 * INVALID_SMSC_ADDRESS
Wink Savillef4c4d362009-04-02 01:37:03 -07004467 *
4468 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004469#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07004470
4471/**
4472 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
4473 *
4474 * Deletes a CDMA SMS message from RUIM memory.
4475 *
4476 * "data" is int *
4477 * ((int *)data)[0] is the record index of the message to delete.
4478 *
4479 * "response" is NULL
4480 *
4481 * Valid errors:
4482 * SUCCESS
4483 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004484 * INVALID_ARGUMENTS
4485 * NO_MEMORY
4486 * REQUEST_RATE_LIMITED
4487 * SYSTEM_ERR
4488 * MODEM_ERR
4489 * NO_SUCH_ENTRY
Wink Savillef4c4d362009-04-02 01:37:03 -07004490 *
4491 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004492#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07004493
4494/**
4495 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07004496 *
4497 * Request the device ESN / MEID / IMEI / IMEISV.
4498 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004499 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07004500 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07004501 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004502 *
4503 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07004504 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004505 *
4506 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07004507 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004508 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004509 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07004510 * ((const char **)response)[0] is IMEI if GSM subscription is available
4511 * ((const char **)response)[1] is IMEISV if GSM subscription is available
4512 * ((const char **)response)[2] is ESN if CDMA subscription is available
4513 * ((const char **)response)[3] is MEID if CDMA subscription is available
4514 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004515 * Valid errors:
4516 * SUCCESS
4517 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07004518 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004519#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07004520
Wink Saville1b5fd232009-04-22 14:50:00 -07004521/**
4522 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
4523 *
4524 * Request the radio's system selection module to exit emergency
4525 * callback mode. RIL will not respond with SUCCESS until the modem has
4526 * completely exited from Emergency Callback Mode.
4527 *
4528 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004529 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004530 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004531 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004532 * Valid errors:
4533 * SUCCESS
4534 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004535 * OPERATION_NOT_ALLOWED
Wink Saville1b5fd232009-04-22 14:50:00 -07004536 *
4537 */
4538#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07004539
jsh000a9fe2009-05-11 14:52:35 -07004540/**
4541 * RIL_REQUEST_GET_SMSC_ADDRESS
4542 *
4543 * Queries the default Short Message Service Center address on the device.
4544 *
4545 * "data" is NULL
4546 *
4547 * "response" is const char * containing the SMSC address.
4548 *
4549 * Valid errors:
4550 * SUCCESS
4551 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004552 * NO_MEMORY
4553 * REQUEST_RATE_LIMITED
4554 * SYSTEM_ERR
4555 * INTERNAL_ERR
4556 * MODEM_ERR
4557 * INVALID_ARGUMENTS
4558 * INVALID_MODEM_STATE
4559 * NOT_PROVISIONED
jsh000a9fe2009-05-11 14:52:35 -07004560 *
4561 */
4562#define RIL_REQUEST_GET_SMSC_ADDRESS 100
4563
4564/**
4565 * RIL_REQUEST_SET_SMSC_ADDRESS
4566 *
4567 * Sets the default Short Message Service Center address on the device.
4568 *
4569 * "data" is const char * containing the SMSC address.
4570 *
4571 * "response" is NULL
4572 *
4573 * Valid errors:
4574 * SUCCESS
4575 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004576 * INVALID_ARGUMENTS
4577 * INVALID_SMS_FORMAT
4578 * NO_MEMORY
4579 * SYSTEM_ERR
4580 * REQUEST_RATE_LIMITED
4581 * MODEM_ERR
4582 * NO_RESOURCES
jsh000a9fe2009-05-11 14:52:35 -07004583 *
4584 */
4585#define RIL_REQUEST_SET_SMSC_ADDRESS 101
4586
jshb60444e2009-05-29 11:09:17 -07004587/**
4588 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
4589 *
4590 * Indicates whether there is storage available for new SMS messages.
4591 *
4592 * "data" is int *
4593 * ((int *)data)[0] is 1 if memory is available for storing new messages
4594 * is 0 if memory capacity is exceeded
4595 *
4596 * "response" is NULL
4597 *
4598 * Valid errors:
4599 * SUCCESS
4600 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004601 * INVALID_ARGUMENTS
4602 * NO_MEMORY
4603 * INVALID_STATE
4604 * SYSTEM_ERR
4605 * REQUEST_RATE_LIMITED
4606 * MODEM_ERR
jshb60444e2009-05-29 11:09:17 -07004607 *
4608 */
4609#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
4610
Wink Saville2641d5b2009-06-08 17:40:42 -07004611/**
4612 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
4613 *
4614 * Indicates that the StkSerivce is running and is
4615 * ready to receive RIL_UNSOL_STK_XXXXX commands.
4616 *
4617 * "data" is NULL
4618 * "response" is NULL
4619 *
4620 * Valid errors:
4621 * SUCCESS
4622 * RADIO_NOT_AVAILABLE
Wink Saville2641d5b2009-06-08 17:40:42 -07004623 *
4624 */
4625#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
4626
Wink Savillec0114b32011-02-18 10:14:07 -08004627/**
4628 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
4629 *
4630 * Request to query the location where the CDMA subscription shall
4631 * be retrieved
4632 *
4633 * "data" is NULL
4634 *
4635 * "response" is int *
4636 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4637 *
4638 * Valid errors:
4639 * SUCCESS
4640 * RADIO_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08004641 * SUBSCRIPTION_NOT_AVAILABLE
4642 *
4643 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
4644 */
4645#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
4646
Jake Hambyfa8d5842011-08-19 16:22:18 -07004647/**
4648 * RIL_REQUEST_ISIM_AUTHENTICATION
4649 *
4650 * Request the ISIM application on the UICC to perform AKA
4651 * challenge/response algorithm for IMS authentication
4652 *
4653 * "data" is a const char * containing the challenge string in Base64 format
4654 * "response" is a const char * containing the response in Base64 format
4655 *
4656 * Valid errors:
4657 * SUCCESS
4658 * RADIO_NOT_AVAILABLE
Jake Hambyfa8d5842011-08-19 16:22:18 -07004659 */
4660#define RIL_REQUEST_ISIM_AUTHENTICATION 105
4661
Jake Hamby300105d2011-09-26 01:01:44 -07004662/**
4663 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
4664 *
4665 * Acknowledge successful or failed receipt of SMS previously indicated
4666 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
4667 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
4668 *
4669 * "data" is const char **
4670 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
4671 * is "0" on failed receipt (send RP-ERROR)
4672 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
4673 *
4674 * "response" is NULL
4675 *
4676 * Valid errors:
4677 * SUCCESS
4678 * RADIO_NOT_AVAILABLE
Jake Hamby300105d2011-09-26 01:01:44 -07004679 */
4680#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
4681
4682/**
4683 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
4684 *
4685 * Requests to send a SAT/USAT envelope command to SIM.
4686 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
4687 *
4688 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
4689 * the SW1 and SW2 status bytes from the UICC response are returned along with
4690 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
4691 *
4692 * The RIL implementation shall perform the normal processing of a '91XX'
4693 * response in SW1/SW2 to retrieve the pending proactive command and send it
4694 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
4695 *
4696 * "data" is a const char * containing the SAT/USAT command
4697 * in hexadecimal format starting with command tag
4698 *
4699 * "response" is a const RIL_SIM_IO_Response *
4700 *
4701 * Valid errors:
4702 * RIL_E_SUCCESS
4703 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08004704 * SIM_BUSY
4705 * OPERATION_NOT_ALLOWED
Jake Hamby300105d2011-09-26 01:01:44 -07004706 * RIL_E_GENERIC_FAILURE
4707 */
4708#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
4709
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004710/**
4711 * RIL_REQUEST_VOICE_RADIO_TECH
4712 *
4713 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
4714 * when radio state is RADIO_STATE_ON
4715 *
4716 * "data" is NULL
4717 * "response" is int *
4718 * ((int *) response)[0] is of type const RIL_RadioTechnology
4719 *
4720 * Valid errors:
4721 * SUCCESS
4722 * RADIO_NOT_AVAILABLE
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004723 */
4724#define RIL_REQUEST_VOICE_RADIO_TECH 108
4725
Wink Saville8a9e0212013-04-09 12:11:38 -07004726/**
4727 * RIL_REQUEST_GET_CELL_INFO_LIST
4728 *
4729 * Request all of the current cell information known to the radio. The radio
4730 * must a list of all current cells, including the neighboring cells. If for a particular
4731 * cell information isn't known then the appropriate unknown value will be returned.
4732 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
4733 *
4734 * "data" is NULL
4735 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08004736 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07004737 */
4738#define RIL_REQUEST_GET_CELL_INFO_LIST 109
4739
4740/**
4741 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
4742 *
4743 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
Wink Savillec57b3eb2013-04-17 12:51:41 -07004744 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
Wink Saville8a9e0212013-04-09 12:11:38 -07004745 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
4746 * a RIL_UNSOL_CELL_INFO_LIST.
4747 *
4748 * "data" is int *
4749 * ((int *)data)[0] is minimum time in milliseconds
4750 *
4751 * "response" is NULL
4752 *
4753 * Valid errors:
4754 * SUCCESS
4755 * RADIO_NOT_AVAILABLE
Wink Saville8a9e0212013-04-09 12:11:38 -07004756 */
4757#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
Jake Hamby300105d2011-09-26 01:01:44 -07004758
Sungmin Choi75697532013-04-26 15:04:45 -07004759/**
4760 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
4761 *
4762 * Set an apn to initial attach network
Ankit Nbc37e512016-12-07 21:05:43 +05304763 *
4764 * "data" is a const char **
4765 * ((const char **)data)[0] is the APN to connect if radio technology is LTE
4766 * ((const char **)data)[1] is the connection type to request must be one of the
4767 * PDP_type values in TS 27.007 section 10.1.1.
4768 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
4769 * ((const char **)data)[2] is the PAP / CHAP auth type. Values:
4770 * 0 => PAP and CHAP is never performed.
4771 * 1 => PAP may be performed; CHAP is never performed.
4772 * 2 => CHAP may be performed; PAP is never performed.
4773 * 3 => PAP / CHAP may be performed - baseband dependent.
4774 * ((const char **)data)[3] is the username for APN, or NULL
4775 * ((const char **)data)[4] is the password for APN, or NULL
4776 *
Sungmin Choi75697532013-04-26 15:04:45 -07004777 * "response" is NULL
4778 *
4779 * Valid errors:
4780 * SUCCESS
4781 * RADIO_NOT_AVAILABLE (radio resetting)
Sungmin Choi75697532013-04-26 15:04:45 -07004782 * SUBSCRIPTION_NOT_AVAILABLE
4783 */
4784#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
4785
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004786/**
4787 * RIL_REQUEST_IMS_REGISTRATION_STATE
4788 *
Nathan Harold0eb43c22016-12-19 12:04:32 -08004789 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
4790 * instead, provide IMS registration status via an IMS Service.
4791 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004792 * Request current IMS registration state
4793 *
4794 * "data" is NULL
4795 *
4796 * "response" is int *
4797 * ((int *)response)[0] is registration state:
4798 * 0 - Not registered
4799 * 1 - Registered
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004800 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004801 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004802 * must follow with IMS SMS format:
4803 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004804 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
4805 *
4806 * Valid errors:
4807 * SUCCESS
4808 * RADIO_NOT_AVAILABLE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004809 */
4810#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
4811
4812/**
4813 * RIL_REQUEST_IMS_SEND_SMS
4814 *
4815 * Send a SMS message over IMS
4816 *
4817 * "data" is const RIL_IMS_SMS_Message *
4818 *
4819 * "response" is a const RIL_SMS_Response *
4820 *
4821 * Based on the return error, caller decides to resend if sending sms
4822 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
4823 * In case of retry, data is encoded based on Voice Technology available.
4824 *
4825 * Valid errors:
4826 * SUCCESS
4827 * RADIO_NOT_AVAILABLE
4828 * SMS_SEND_FAIL_RETRY
4829 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08004830 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004831 * INVALID_ARGUMENTS
4832 * INVALID_STATE
4833 * NO_MEMORY
4834 * INVALID_SMS_FORMAT
4835 * SYSTEM_ERR
4836 * REQUEST_RATE_LIMITED
4837 * MODEM_ERR
4838 * NETWORK_ERR
4839 * ENCODING_ERR
4840 * INVALID_SMSC_ADDRESS
4841 * MODE_NOT_SUPPORTED
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004842 *
4843 */
4844#define RIL_REQUEST_IMS_SEND_SMS 113
4845
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004846/**
4847 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
4848 *
4849 * Request APDU exchange on the basic channel. This command reflects TS 27.007
4850 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
4851 * of GSM/CDMA, and filter commands appropriately. It should filter
4852 * channel management and SELECT by DF name commands.
4853 *
4854 * "data" is a const RIL_SIM_APDU *
4855 * "sessionid" field should be ignored.
4856 *
4857 * "response" is a const RIL_SIM_IO_Response *
4858 *
4859 * Valid errors:
4860 * SUCCESS
4861 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004862 */
4863#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
4864
4865/**
4866 * RIL_REQUEST_SIM_OPEN_CHANNEL
4867 *
4868 * Open a new logical channel and select the given application. This command
Wileen Chiu410b7562015-11-23 14:25:22 -08004869 * reflects TS 27.007 "open logical channel" operation (+CCHO). This request
4870 * also specifies the P2 parameter (described in ISO 7816-4).
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004871 *
Wileen Chiu410b7562015-11-23 14:25:22 -08004872 * "data" is a const RIL_OpenChannelParam *
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004873 *
4874 * "response" is int *
4875 * ((int *)data)[0] contains the session id of the logical channel.
Shishir Agrawal760123f2014-10-14 09:14:57 -07004876 * ((int *)data)[1] onwards may optionally contain the select response for the
4877 * open channel command with one byte per integer.
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004878 *
4879 * Valid errors:
4880 * SUCCESS
4881 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004882 * MISSING_RESOURCE
4883 * NO_SUCH_ELEMENT
4884 */
4885#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
4886
4887/**
4888 * RIL_REQUEST_SIM_CLOSE_CHANNEL
4889 *
4890 * Close a previously opened logical channel. This command reflects TS 27.007
4891 * "close logical channel" operation (+CCHC).
4892 *
4893 * "data" is int *
4894 * ((int *)data)[0] is the session id of logical the channel to close.
4895 *
4896 * "response" is NULL
4897 *
4898 * Valid errors:
4899 * SUCCESS
4900 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004901 */
4902#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
4903
4904/**
4905 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
4906 *
4907 * Exchange APDUs with a UICC over a previously opened logical channel. This
4908 * command reflects TS 27.007 "generic logical channel access" operation
4909 * (+CGLA). The modem should filter channel management and SELECT by DF name
4910 * commands.
4911 *
4912 * "data" is a const RIL_SIM_APDU*
4913 *
4914 * "response" is a const RIL_SIM_IO_Response *
4915 *
4916 * Valid errors:
4917 * SUCCESS
4918 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004919 */
4920#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
4921
Jake Hamby8a4a2332014-01-15 13:12:05 -08004922/**
4923 * RIL_REQUEST_NV_READ_ITEM
4924 *
4925 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4926 * This is used for device configuration by some CDMA operators.
4927 *
4928 * "data" is a const RIL_NV_ReadItem *
4929 *
4930 * "response" is const char * containing the contents of the NV item
4931 *
4932 * Valid errors:
4933 * SUCCESS
4934 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004935 */
4936#define RIL_REQUEST_NV_READ_ITEM 118
4937
4938/**
4939 * RIL_REQUEST_NV_WRITE_ITEM
4940 *
4941 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4942 * This is used for device configuration by some CDMA operators.
4943 *
4944 * "data" is a const RIL_NV_WriteItem *
4945 *
4946 * "response" is NULL
4947 *
4948 * Valid errors:
4949 * SUCCESS
4950 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004951 */
4952#define RIL_REQUEST_NV_WRITE_ITEM 119
4953
4954/**
4955 * RIL_REQUEST_NV_WRITE_CDMA_PRL
4956 *
4957 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
4958 * This is used for device configuration by some CDMA operators.
4959 *
4960 * "data" is a const char * containing the PRL as a byte array
4961 *
4962 * "response" is NULL
4963 *
4964 * Valid errors:
4965 * SUCCESS
4966 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004967 */
4968#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
4969
4970/**
4971 * RIL_REQUEST_NV_RESET_CONFIG
4972 *
4973 * Reset the radio NV configuration to the factory state.
4974 * This is used for device configuration by some CDMA operators.
4975 *
4976 * "data" is int *
Jake Hambyd27c9d52014-02-06 14:52:05 -08004977 * ((int *)data)[0] is 1 to reload all NV items
4978 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
4979 * ((int *)data)[0] is 3 for factory reset (RTN)
Jake Hamby8a4a2332014-01-15 13:12:05 -08004980 *
4981 * "response" is NULL
4982 *
4983 * Valid errors:
4984 * SUCCESS
4985 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004986 */
4987#define RIL_REQUEST_NV_RESET_CONFIG 121
4988
Etan Cohend3652192014-06-20 08:28:44 -07004989 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
4990 * FIXME This API needs to have more documentation.
4991 *
4992 * Selection/de-selection of a subscription from a SIM card
4993 * "data" is const RIL_SelectUiccSub*
4994
4995 *
4996 * "response" is NULL
4997 *
4998 * Valid errors:
4999 * SUCCESS
5000 * RADIO_NOT_AVAILABLE (radio resetting)
Etan Cohend3652192014-06-20 08:28:44 -07005001 * SUBSCRIPTION_NOT_SUPPORTED
5002 *
5003 */
5004#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
5005
5006/**
5007 * RIL_REQUEST_ALLOW_DATA
5008 *
5009 * Tells the modem whether data calls are allowed or not
5010 *
5011 * "data" is int *
5012 * FIXME slotId and aid will be added.
5013 * ((int *)data)[0] is == 0 to allow data calls
5014 * ((int *)data)[0] is == 1 to disallow data calls
5015 *
5016 * "response" is NULL
5017 *
5018 * Valid errors:
5019 *
5020 * SUCCESS
5021 * RADIO_NOT_AVAILABLE (radio resetting)
Etan Cohend3652192014-06-20 08:28:44 -07005022 *
5023 */
5024#define RIL_REQUEST_ALLOW_DATA 123
5025
5026/**
5027 * RIL_REQUEST_GET_HARDWARE_CONFIG
5028 *
5029 * Request all of the current hardware (modem and sim) associated
5030 * with the RIL.
5031 *
5032 * "data" is NULL
5033 *
5034 * "response" is an array of RIL_HardwareConfig.
5035 */
5036#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
5037
5038/**
Amit Mahajan2b772032014-06-26 14:20:11 -07005039 * RIL_REQUEST_SIM_AUTHENTICATION
Etan Cohend3652192014-06-20 08:28:44 -07005040 *
5041 * Returns the response of SIM Authentication through RIL to a
5042 * challenge request.
5043 *
5044 * "data" Base64 encoded string containing challenge:
5045 * int authContext; P2 value of authentication command, see P2 parameter in
5046 * 3GPP TS 31.102 7.1.2
5047 * char *authData; the challenge string in Base64 format, see 3GPP
5048 * TS 31.102 7.1.2
5049 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
5050 * NULL if no value
5051 *
5052 * "response" Base64 encoded strings containing response:
5053 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
5054 * int sw2;
5055 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
5056 */
Amit Mahajan2b772032014-06-26 14:20:11 -07005057#define RIL_REQUEST_SIM_AUTHENTICATION 125
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08005058
Wink Savillec29360a2014-07-13 05:17:28 -07005059/**
5060 * RIL_REQUEST_GET_DC_RT_INFO
5061 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005062 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005063 * Requests the Data Connection Real Time Info
5064 *
5065 * "data" is NULL
5066 *
5067 * "response" is the most recent RIL_DcRtInfo
5068 *
5069 * Valid errors:
5070 * SUCCESS
5071 * RADIO_NOT_AVAILABLE
Wink Savillec29360a2014-07-13 05:17:28 -07005072 *
5073 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
5074 */
5075#define RIL_REQUEST_GET_DC_RT_INFO 126
5076
5077/**
5078 * RIL_REQUEST_SET_DC_RT_INFO_RATE
5079 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005080 * The request is DEPRECATED
Wink Savillec29360a2014-07-13 05:17:28 -07005081 * This is the minimum number of milliseconds between successive
5082 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
5083 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
5084 * 0 means send as fast as possible.
5085 *
5086 * "data" The number of milliseconds as an int
5087 *
5088 * "response" is null
5089 *
5090 * Valid errors:
5091 * SUCCESS must not fail
5092 */
5093#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
5094
Amit Mahajanc796e222014-08-13 16:54:01 +00005095/**
5096 * RIL_REQUEST_SET_DATA_PROFILE
5097 *
5098 * Set data profile in modem
Hui Wang8d679622014-10-16 14:59:27 -05005099 * Modem should erase existed profiles from framework, and apply new profiles
Jack Yu06181bb2017-01-10 12:10:41 -08005100 * "data" is a const RIL_DataProfileInfo **
Amit Mahajanc796e222014-08-13 16:54:01 +00005101 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
5102 * "response" is NULL
5103 *
5104 * Valid errors:
5105 * SUCCESS
5106 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajanc796e222014-08-13 16:54:01 +00005107 * SUBSCRIPTION_NOT_AVAILABLE
5108 */
5109#define RIL_REQUEST_SET_DATA_PROFILE 128
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005110
5111/**
5112 * RIL_REQUEST_SHUTDOWN
5113 *
5114 * Device is shutting down. All further commands are ignored
5115 * and RADIO_NOT_AVAILABLE must be returned.
5116 *
5117 * "data" is null
5118 * "response" is NULL
5119 *
5120 * Valid errors:
5121 * SUCCESS
5122 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005123 * OPERATION_NOT_ALLOWED
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005124 */
5125#define RIL_REQUEST_SHUTDOWN 129
5126
Wink Saville8b4e4f72014-10-17 15:01:45 -07005127/**
5128 * RIL_REQUEST_GET_RADIO_CAPABILITY
5129 *
5130 * Used to get phone radio capablility.
5131 *
Abhishek Adappa772c0d22015-02-09 11:11:12 -08005132 * "data" is the RIL_RadioCapability structure
Wink Saville8b4e4f72014-10-17 15:01:45 -07005133 *
5134 * Valid errors:
5135 * SUCCESS
5136 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005137 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005138 */
5139#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
5140
5141/**
5142 * RIL_REQUEST_SET_RADIO_CAPABILITY
5143 *
5144 * Used to set the phones radio capability. Be VERY careful
5145 * using this request as it may cause some vendor modems to reset. Because
5146 * of the possible modem reset any RIL commands after this one may not be
5147 * processed.
5148 *
5149 * "data" is the RIL_RadioCapability structure
5150 *
5151 * "response" is the RIL_RadioCapability structure, used to feedback return status
5152 *
5153 * Valid errors:
5154 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
5155 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005156 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005157 */
5158#define RIL_REQUEST_SET_RADIO_CAPABILITY 131
5159
fengluf7408292015-04-14 14:53:55 -07005160/**
5161 * RIL_REQUEST_START_LCE
5162 *
5163 * Start Link Capacity Estimate (LCE) service if supported by the radio.
5164 *
5165 * "data" is const int *
5166 * ((const int*)data)[0] specifies the desired reporting interval (ms).
fenglu290add32015-05-01 17:05:15 -07005167 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
fengluf7408292015-04-14 14:53:55 -07005168 *
fenglu290add32015-05-01 17:05:15 -07005169 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005170 *
5171 * Valid errors:
5172 * SUCCESS
5173 * RADIO_NOT_AVAILABLE
5174 * LCE_NOT_SUPPORTED
5175 */
5176#define RIL_REQUEST_START_LCE 132
5177
5178/**
5179 * RIL_REQUEST_STOP_LCE
5180 *
5181 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
5182 * idempotent for the radio modem.
5183 *
fenglu290add32015-05-01 17:05:15 -07005184 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005185 *
5186 * Valid errors:
5187 * SUCCESS
5188 * RADIO_NOT_AVAILABLE
5189 * LCE_NOT_SUPPORTED
5190 */
5191#define RIL_REQUEST_STOP_LCE 133
5192
5193/**
5194 * RIL_REQUEST_PULL_LCEDATA
5195 *
5196 * Pull LCE service for capacity information.
5197 *
fenglu290add32015-05-01 17:05:15 -07005198 * "response" is the RIL_LceDataInfo.
fengluf7408292015-04-14 14:53:55 -07005199 *
5200 * Valid errors:
5201 * SUCCESS
5202 * RADIO_NOT_AVAILABLE
5203 * LCE_NOT_SUPPORTED
5204 */
5205#define RIL_REQUEST_PULL_LCEDATA 134
5206
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005207/**
5208 * RIL_REQUEST_GET_ACTIVITY_INFO
5209 *
Nathan Haroldc8635212016-10-10 11:15:21 -07005210 * Get modem activity information for power consumption estimation.
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005211 *
Nathan Haroldc8635212016-10-10 11:15:21 -07005212 * Request clear-on-read statistics information that is used for
5213 * estimating the per-millisecond power consumption of the cellular
5214 * modem.
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005215 *
5216 * "data" is null
5217 * "response" is const RIL_ActivityStatsInfo *
5218 *
5219 * Valid errors:
5220 *
5221 * SUCCESS
5222 * RADIO_NOT_AVAILABLE (radio resetting)
5223 * GENERIC_FAILURE
5224 */
5225#define RIL_REQUEST_GET_ACTIVITY_INFO 135
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005226
Meng Wangb4e34312016-05-12 14:54:36 -07005227/**
5228 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS
5229 *
Meng Wangd5c540f2016-07-15 15:41:19 -07005230 * Set carrier restrictions for this sim slot. Expected modem behavior:
5231 * If never receives this command
5232 * - Must allow all carriers
5233 * Receives this command with data being NULL
5234 * - Must allow all carriers. If a previously allowed SIM is present, modem must not reload
5235 * the SIM. If a previously disallowed SIM is present, reload the SIM and notify Android.
5236 * Receives this command with a list of carriers
5237 * - Only allow specified carriers, persist across power cycles and FDR. If a present SIM
5238 * is in the allowed list, modem must not reload the SIM. If a present SIM is *not* in
5239 * the allowed list, modem must detach from the registered network and only keep emergency
5240 * service, and notify Android SIM refresh reset with new SIM state being
5241 * RIL_CARDSTATE_RESTRICTED. Emergency service must be enabled.
Meng Wangb4e34312016-05-12 14:54:36 -07005242 *
5243 * "data" is const RIL_CarrierRestrictions *
5244 * A list of allowed carriers and possibly a list of excluded carriers.
5245 * If data is NULL, means to clear previous carrier restrictions and allow all carriers
5246 *
5247 * "response" is int *
5248 * ((int *)data)[0] contains the number of allowed carriers which have been set correctly.
5249 * On success, it should match the length of list data->allowed_carriers.
5250 * If data is NULL, the value must be 0.
5251 *
5252 * Valid errors:
5253 * RIL_E_SUCCESS
5254 * RIL_E_INVALID_ARGUMENTS
5255 * RIL_E_RADIO_NOT_AVAILABLE
5256 * RIL_E_REQUEST_NOT_SUPPORTED
5257 */
5258#define RIL_REQUEST_SET_CARRIER_RESTRICTIONS 136
5259
5260/**
5261 * RIL_REQUEST_GET_CARRIER_RESTRICTIONS
5262 *
Meng Wangd5c540f2016-07-15 15:41:19 -07005263 * Get carrier restrictions for this sim slot. Expected modem behavior:
5264 * Return list of allowed carriers, or null if all carriers are allowed.
Meng Wangb4e34312016-05-12 14:54:36 -07005265 *
5266 * "data" is NULL
5267 *
5268 * "response" is const RIL_CarrierRestrictions *.
5269 * If response is NULL, it means all carriers are allowed.
5270 *
5271 * Valid errors:
5272 * RIL_E_SUCCESS
5273 * RIL_E_RADIO_NOT_AVAILABLE
5274 * RIL_E_REQUEST_NOT_SUPPORTED
5275 */
5276#define RIL_REQUEST_GET_CARRIER_RESTRICTIONS 137
5277
Jack Yu06181bb2017-01-10 12:10:41 -08005278/**
5279 * RIL_REQUEST_SEND_DEVICE_STATE
5280 *
5281 * Send the updated device state.
5282 * Modem can perform power saving based on the provided device state.
5283 * "data" is const int *
5284 * ((const int*)data)[0] A RIL_DeviceStateType that specifies the device state type.
5285 * ((const int*)data)[1] Specifies the state. See RIL_DeviceStateType for the definition of each
5286 * type.
5287 *
5288 * "datalen" is count * sizeof(const RIL_DeviceState *)
5289 * "response" is NULL
5290 *
5291 * Valid errors:
5292 * SUCCESS
5293 * RADIO_NOT_AVAILABLE (radio resetting)
5294 */
5295#define RIL_REQUEST_SEND_DEVICE_STATE 138
5296
5297/**
5298 * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER
5299 *
5300 * Set the unsolicited response filter
5301 * This is used to prevent unnecessary application processor
5302 * wake up for power saving purposes by suppressing the
5303 * unsolicited responses in certain scenarios.
5304 *
5305 * "data" is an int *
5306 *
5307 * ((int *)data)[0] is a 32-bit bitmask of RIL_UnsolicitedResponseFilter
5308 *
5309 * "response" is NULL
5310 *
5311 * Valid errors:
5312 * SUCCESS
5313 * INVALID_ARGUMENTS (e.g. the requested filter doesn't exist)
5314 * RADIO_NOT_AVAILABLE (radio resetting)
5315 */
5316#define RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER 139
5317
Wileen Chiu718c0bf2017-01-04 11:37:19 -08005318 /**
5319 * RIL_REQUEST_SET_SIM_CARD_POWER
5320 *
5321 * Set SIM card power up or down
5322 *
5323 * Request is equivalent to inserting and removing the card, with
5324 * an additional effect where the ability to detect card removal/insertion
5325 * is disabled when the SIM card is powered down.
5326 *
5327 * This will generate RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5328 * as if the SIM had been inserted or removed.
5329 *
5330 * "data" is int *
5331 * ((int *)data)[0] is 1 for "SIM POWER UP"
5332 * ((int *)data)[0] is 0 for "SIM POWER DOWN"
5333 *
5334 * "response" is NULL
5335 *
5336 * Valid errors:
5337 * SUCCESS
5338 * RADIO_NOT_AVAILABLE
5339 * REQUEST_NOT_SUPPORTED
5340 * SIM_ABSENT
5341 * INVALID_ARGUMENTS
5342 */
5343#define RIL_REQUEST_SET_SIM_CARD_POWER 140
pkanwarc61837e2017-03-17 12:49:34 -07005344
5345/**
5346 * RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION
5347 *
5348 * Provide Carrier specific information to the modem that will be used to
5349 * encrypt the IMSI and IMPI. Sent by the framework during boot, carrier
5350 * switch and everytime we receive a new certificate.
5351 *
5352 * "data" is the RIL_CarrierInfoForImsiEncryption * structure.
5353 *
5354 * "response" is NULL
5355 *
5356 * Valid errors:
5357 * RIL_E_SUCCESS
5358 * RIL_E_RADIO_NOT_AVAILABLE
5359 * SIM_ABSENT
5360 * RIL_E_REQUEST_NOT_SUPPORTED
5361 * INVALID_ARGUMENTS
5362 * MODEM_INTERNAL_FAILURE
5363 */
5364#define RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION 141
5365
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005366/***********************************************************************/
5367
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005368/**
5369 * RIL_RESPONSE_ACKNOWLEDGEMENT
5370 *
5371 * This is used by Asynchronous solicited messages and Unsolicited messages
5372 * to acknowledge the receipt of those messages in RIL.java so that the ack
5373 * can be used to let ril.cpp to release wakelock.
5374 *
5375 * Valid errors
5376 * SUCCESS
5377 * RADIO_NOT_AVAILABLE
5378 */
5379
5380#define RIL_RESPONSE_ACKNOWLEDGEMENT 800
5381
5382/***********************************************************************/
5383
Wink Savillef4c4d362009-04-02 01:37:03 -07005384
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005385#define RIL_UNSOL_RESPONSE_BASE 1000
5386
5387/**
5388 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
5389 *
5390 * Indicate when value of RIL_RadioState has changed.
5391 *
5392 * Callee will invoke RIL_RadioStateRequest method on main thread
5393 *
5394 * "data" is NULL
5395 */
5396
5397#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
5398
5399
5400/**
5401 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
5402 *
5403 * Indicate when call state has changed
5404 *
5405 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
5406 *
5407 * "data" is NULL
5408 *
Wink Saville7f856802009-06-09 10:23:37 -07005409 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005410 * "RING", "BUSY", "NO CARRIER", and also call state
5411 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
5412 *
5413 * Redundent or extraneous invocations are tolerated
5414 */
5415#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
5416
5417
5418/**
Wink Savillec0114b32011-02-18 10:14:07 -08005419 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005420 *
Wink Savillec0114b32011-02-18 10:14:07 -08005421 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005422 *
5423 * Callee will invoke the following requests on main thread:
5424 *
Wink Savillec0114b32011-02-18 10:14:07 -08005425 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005426 * RIL_REQUEST_OPERATOR
5427 *
5428 * "data" is NULL
5429 *
5430 * FIXME should this happen when SIM records are loaded? (eg, for
5431 * EONS)
5432 */
Wink Savillec0114b32011-02-18 10:14:07 -08005433#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005434
5435/**
5436 * RIL_UNSOL_RESPONSE_NEW_SMS
5437 *
5438 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07005439 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005440 * "data" is const char *
5441 * This is a pointer to a string containing the PDU of an SMS-DELIVER
5442 * as an ascii string of hex digits. The PDU starts with the SMSC address
5443 * per TS 27.005 (+CMT:)
5444 *
5445 * Callee will subsequently confirm the receipt of thei SMS with a
5446 * RIL_REQUEST_SMS_ACKNOWLEDGE
5447 *
Wink Saville7f856802009-06-09 10:23:37 -07005448 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005449 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5450 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5451 */
5452
5453#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
5454
5455/**
5456 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
5457 *
5458 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07005459 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005460 * "data" is const char *
5461 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
5462 * as an ascii string of hex digits. The PDU starts with the SMSC address
5463 * per TS 27.005 (+CDS:).
5464 *
5465 * Callee will subsequently confirm the receipt of the SMS with a
5466 * RIL_REQUEST_SMS_ACKNOWLEDGE
5467 *
Wink Saville7f856802009-06-09 10:23:37 -07005468 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005469 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5470 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5471 */
5472
5473#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
5474
5475/**
5476 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
5477 *
5478 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07005479 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005480 * "data" is const int *
5481 * ((const int *)data)[0] contains the slot index on the SIM that contains
5482 * the new message
5483 */
5484
5485#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
5486
5487/**
5488 * RIL_UNSOL_ON_USSD
5489 *
5490 * Called when a new USSD message is received.
5491 *
5492 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07005493 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005494 * one of these string values:
5495 * "0" USSD-Notify -- text in ((const char **)data)[1]
5496 * "1" USSD-Request -- text in ((const char **)data)[1]
5497 * "2" Session terminated by network
5498 * "3" other local client (eg, SIM Toolkit) has responded
5499 * "4" Operation not supported
5500 * "5" Network timeout
5501 *
5502 * The USSD session is assumed to persist if the type code is "1", otherwise
5503 * the current session (if any) is assumed to have terminated.
5504 *
5505 * ((const char **)data)[1] points to a message string if applicable, which
5506 * should always be in UTF-8.
5507 */
5508#define RIL_UNSOL_ON_USSD 1006
5509/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
5510
5511/**
5512 * RIL_UNSOL_ON_USSD_REQUEST
5513 *
5514 * Obsolete. Send via RIL_UNSOL_ON_USSD
5515 */
Wink Saville7f856802009-06-09 10:23:37 -07005516#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005517
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005518/**
5519 * RIL_UNSOL_NITZ_TIME_RECEIVED
5520 *
5521 * Called when radio has received a NITZ time message
5522 *
5523 * "data" is const char * pointing to NITZ time string
5524 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
5525 */
5526#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
5527
5528/**
5529 * RIL_UNSOL_SIGNAL_STRENGTH
5530 *
5531 * Radio may report signal strength rather han have it polled.
5532 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005533 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005534 */
5535#define RIL_UNSOL_SIGNAL_STRENGTH 1009
5536
5537
5538/**
Wink Savillef4c4d362009-04-02 01:37:03 -07005539 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005540 *
Wink Savillec0114b32011-02-18 10:14:07 -08005541 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07005542 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
5543 * of current data contexts including new contexts that have been
5544 * activated. A data call is only removed from this list when the
5545 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
5546 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005547 *
Wink Savillef4c4d362009-04-02 01:37:03 -07005548 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005549 */
5550
Wink Savillef4c4d362009-04-02 01:37:03 -07005551#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005552
5553/**
5554 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
5555 *
5556 * Reports supplementary service related notification from the network.
5557 *
5558 * "data" is a const RIL_SuppSvcNotification *
5559 *
5560 */
5561
5562#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
5563
5564/**
5565 * RIL_UNSOL_STK_SESSION_END
5566 *
5567 * Indicate when STK session is terminated by SIM.
5568 *
5569 * "data" is NULL
5570 */
5571#define RIL_UNSOL_STK_SESSION_END 1012
5572
5573/**
5574 * RIL_UNSOL_STK_PROACTIVE_COMMAND
5575 *
5576 * Indicate when SIM issue a STK proactive command to applications
5577 *
5578 * "data" is a const char * containing SAT/USAT proactive command
5579 * in hexadecimal format string starting with command tag
5580 *
5581 */
5582#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
5583
5584/**
5585 * RIL_UNSOL_STK_EVENT_NOTIFY
5586 *
5587 * Indicate when SIM notifies applcations some event happens.
5588 * Generally, application does not need to have any feedback to
5589 * SIM but shall be able to indicate appropriate messages to users.
5590 *
5591 * "data" is a const char * containing SAT/USAT commands or responses
5592 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
5593 * starting with first byte of response data or command tag
5594 *
5595 */
5596#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
5597
5598/**
5599 * RIL_UNSOL_STK_CALL_SETUP
5600 *
5601 * Indicate when SIM wants application to setup a voice call.
5602 *
5603 * "data" is const int *
5604 * ((const int *)data)[0] contains timeout value (in milliseconds)
5605 */
5606#define RIL_UNSOL_STK_CALL_SETUP 1015
5607
5608/**
5609 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
5610 *
5611 * Indicates that SMS storage on the SIM is full. Sent when the network
5612 * attempts to deliver a new SMS message. Messages cannot be saved on the
5613 * SIM until space is freed. In particular, incoming Class 2 messages
5614 * cannot be stored.
5615 *
5616 * "data" is null
5617 *
5618 */
5619#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
5620
5621/**
5622 * RIL_UNSOL_SIM_REFRESH
5623 *
5624 * Indicates that file(s) on the SIM have been updated, or the SIM
5625 * has been reinitialized.
5626 *
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005627 * In the case where RIL is version 6 or older:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005628 * "data" is an int *
5629 * ((int *)data)[0] is a RIL_SimRefreshResult.
5630 * ((int *)data)[1] is the EFID of the updated file if the result is
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005631 * SIM_FILE_UPDATE or NULL for any other result.
5632 *
5633 * In the case where RIL is version 7:
5634 * "data" is a RIL_SimRefreshResponse_v7 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005635 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005636 * Note: If the SIM state changes as a result of the SIM refresh (eg,
5637 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005638 * should be sent.
5639 */
5640#define RIL_UNSOL_SIM_REFRESH 1017
5641
5642/**
5643 * RIL_UNSOL_CALL_RING
5644 *
5645 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07005646 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
5647 * of a call and sending multiple is optional. If the system property
5648 * ro.telephony.call_ring.multiple is false then the upper layers
5649 * will generate the multiple events internally. Otherwise the vendor
5650 * ril must generate multiple RIL_UNSOL_CALL_RING if
5651 * ro.telephony.call_ring.multiple is true or if it is absent.
5652 *
5653 * The rate of these events is controlled by ro.telephony.call_ring.delay
5654 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005655 *
Wink Saville3d54e742009-05-18 18:00:44 -07005656 * "data" is null for GSM
5657 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005658 */
5659#define RIL_UNSOL_CALL_RING 1018
5660
The Android Open Source Project34a51082009-03-05 14:34:37 -08005661/**
5662 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5663 *
5664 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07005665 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005666 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07005667
The Android Open Source Project34a51082009-03-05 14:34:37 -08005668 * "data" is null
5669 */
5670#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
5671
5672/**
5673 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
5674 *
5675 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07005676 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005677 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07005678 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005679 * Callee will subsequently confirm the receipt of the SMS with
5680 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07005681 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005682 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
5683 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07005684 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005685 */
5686#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
5687
5688/**
5689 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
5690 *
5691 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07005692 *
Henrik Hall0eba2022010-11-25 10:20:56 +01005693 * "data" can be one of the following:
5694 * If received from GSM network, "data" is const char of 88 bytes
5695 * which indicates each page of a CBS Message sent to the MS by the
5696 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
5697 * If received from UMTS network, "data" is const char of 90 up to 1252
5698 * bytes which contain between 1 and 15 CBS Message pages sent as one
5699 * 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 -07005700 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005701 */
5702#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07005703
The Android Open Source Project34a51082009-03-05 14:34:37 -08005704/**
5705 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
5706 *
5707 * Indicates that SMS storage on the RUIM is full. Messages
5708 * cannot be saved on the RUIM until space is freed.
5709 *
5710 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07005711 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005712 */
Wink Savillef4c4d362009-04-02 01:37:03 -07005713#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
5714
The Android Open Source Project34a51082009-03-05 14:34:37 -08005715/**
5716 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
5717 *
5718 * Indicates a restricted state change (eg, for Domain Specific Access Control).
5719 *
5720 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
5721 *
5722 * "data" is an int *
5723 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
5724 */
5725#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
5726
Wink Saville1b5fd232009-04-22 14:50:00 -07005727/**
5728 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
5729 *
5730 * Indicates that the radio system selection module has
5731 * autonomously entered emergency callback mode.
5732 *
5733 * "data" is null
5734 *
5735 */
5736#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08005737
Wink Saville1b5fd232009-04-22 14:50:00 -07005738/**
5739 * RIL_UNSOL_CDMA_CALL_WAITING
5740 *
5741 * Called when CDMA radio receives a call waiting indication.
5742 *
5743 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07005744 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005745 */
5746#define RIL_UNSOL_CDMA_CALL_WAITING 1025
5747
5748/**
5749 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
5750 *
5751 * Called when CDMA radio receives an update of the progress of an
5752 * OTASP/OTAPA call.
5753 *
5754 * "data" is const int *
5755 * For CDMA this is an integer OTASP/OTAPA status listed in
5756 * RIL_CDMA_OTA_ProvisionStatus.
5757 *
5758 */
5759#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
5760
5761/**
5762 * RIL_UNSOL_CDMA_INFO_REC
5763 *
5764 * Called when CDMA radio receives one or more info recs.
5765 *
5766 * "data" is const RIL_CDMA_InformationRecords *
5767 *
5768 */
5769#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08005770
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07005771/**
5772 * RIL_UNSOL_OEM_HOOK_RAW
5773 *
5774 * This is for OEM specific use.
5775 *
5776 * "data" is a byte[]
5777 */
5778#define RIL_UNSOL_OEM_HOOK_RAW 1028
5779
John Wang5d621da2009-09-18 17:17:48 -07005780/**
5781 * RIL_UNSOL_RINGBACK_TONE
5782 *
5783 * Indicates that nework doesn't have in-band information, need to
5784 * play out-band tone.
5785 *
5786 * "data" is an int *
5787 * ((int *)data)[0] == 0 for stop play ringback tone.
5788 * ((int *)data)[0] == 1 for start play ringback tone.
5789 */
5790#define RIL_UNSOL_RINGBACK_TONE 1029
5791
John Wang5909cf82010-01-29 00:18:54 -08005792/**
5793 * RIL_UNSOL_RESEND_INCALL_MUTE
5794 *
5795 * Indicates that framework/application need reset the uplink mute state.
5796 *
5797 * There may be situations where the mute state becomes out of sync
5798 * between the application and device in some GSM infrastructures.
5799 *
5800 * "data" is null
5801 */
5802#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08005803
5804/**
5805 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
5806 *
5807 * Called when CDMA subscription source changed.
5808 *
5809 * "data" is int *
5810 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
5811 */
Wink Saville29487ef2011-04-15 09:15:31 -07005812#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08005813
5814/**
5815 * RIL_UNSOL_CDMA_PRL_CHANGED
5816 *
5817 * Called when PRL (preferred roaming list) changes.
5818 *
5819 * "data" is int *
5820 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
5821 */
5822#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
5823
5824/**
5825 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
5826 *
5827 * Called when Emergency Callback Mode Ends
5828 *
5829 * Indicates that the radio system selection module has
5830 * proactively exited emergency callback mode.
5831 *
5832 * "data" is NULL
5833 *
5834 */
5835#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
5836
Wink Saville5b9df332011-04-06 16:24:21 -07005837/**
5838 * RIL_UNSOL_RIL_CONNECTED
5839 *
5840 * Called the ril connects and returns the version
5841 *
5842 * "data" is int *
5843 * ((int *)data)[0] is RIL_VERSION
5844 */
5845#define RIL_UNSOL_RIL_CONNECTED 1034
5846
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005847/**
5848 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
5849 *
5850 * Indicates that voice technology has changed. Contains new radio technology
5851 * as a data in the message.
5852 *
5853 * "data" is int *
5854 * ((int *)data)[0] is of type const RIL_RadioTechnology
5855 *
5856 */
5857#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
5858
Wink Saville8a9e0212013-04-09 12:11:38 -07005859/**
5860 * RIL_UNSOL_CELL_INFO_LIST
5861 *
5862 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
5863 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
5864 *
5865 * "data" is NULL
5866 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08005867 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07005868 */
5869#define RIL_UNSOL_CELL_INFO_LIST 1036
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005870
Wink Saville865ce3b2013-11-08 16:37:01 -08005871/**
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005872 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
5873 *
Nathan Harold0eb43c22016-12-19 12:04:32 -08005874 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
5875 * instead, provide IMS registration status via an IMS Service.
5876 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005877 * Called when IMS registration state has changed
5878 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005879 * To get IMS registration state and IMS SMS format, callee needs to invoke the
5880 * following request on main thread:
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005881 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005882 * RIL_REQUEST_IMS_REGISTRATION_STATE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005883 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005884 * "data" is NULL
5885 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005886 */
5887#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
5888
Etan Cohend3652192014-06-20 08:28:44 -07005889/**
5890 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
5891 *
5892 * Indicated when there is a change in subscription status.
5893 * This event will be sent in the following scenarios
5894 * - subscription readiness at modem, which was selected by telephony layer
5895 * - when subscription is deactivated by modem due to UICC card removal
5896 * - When network invalidates the subscription i.e. attach reject due to authentication reject
5897 *
5898 * "data" is const int *
5899 * ((const int *)data)[0] == 0 for Subscription Deactivated
5900 * ((const int *)data)[0] == 1 for Subscription Activated
5901 *
5902 */
5903#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
5904
5905/**
5906 * RIL_UNSOL_SRVCC_STATE_NOTIFY
5907 *
5908 * Called when Single Radio Voice Call Continuity(SRVCC)
5909 * progress state has changed
5910 *
5911 * "data" is int *
5912 * ((int *)data)[0] is of type const RIL_SrvccState
5913 *
5914 */
5915
5916#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
5917
5918/**
5919 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
5920 *
5921 * Called when the hardware configuration associated with the RILd changes
5922 *
5923 * "data" is an array of RIL_HardwareConfig
5924 *
5925 */
5926#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
5927
Wink Savillec29360a2014-07-13 05:17:28 -07005928/**
5929 * RIL_UNSOL_DC_RT_INFO_CHANGED
5930 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005931 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005932 * Sent when the DC_RT_STATE changes but the time
5933 * between these messages must not be less than the
5934 * value set by RIL_REQUEST_SET_DC_RT_RATE.
5935 *
5936 * "data" is the most recent RIL_DcRtInfo
5937 *
5938 */
5939#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
5940
Wink Saville8b4e4f72014-10-17 15:01:45 -07005941/**
5942 * RIL_UNSOL_RADIO_CAPABILITY
5943 *
5944 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
5945 * Returns the phone radio capability exactly as
5946 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
5947 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
5948 *
5949 * "data" is the RIL_RadioCapability structure
5950 */
5951#define RIL_UNSOL_RADIO_CAPABILITY 1042
5952
Amit Mahajan54563d32014-11-22 00:54:49 +00005953/*
5954 * RIL_UNSOL_ON_SS
5955 *
5956 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
5957 * call control.
5958 *
5959 * "data" is const RIL_StkCcUnsolSsResponse *
5960 *
5961 */
5962#define RIL_UNSOL_ON_SS 1043
5963
5964/**
5965 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
5966 *
5967 * Called when there is an ALPHA from UICC during Call Control.
5968 *
5969 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
5970 *
5971 */
5972#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
5973
fengluf7408292015-04-14 14:53:55 -07005974/**
5975 * RIL_UNSOL_LCEDATA_RECV
5976 *
5977 * Called when there is an incoming Link Capacity Estimate (LCE) info report.
5978 *
fenglu290add32015-05-01 17:05:15 -07005979 * "data" is the RIL_LceDataInfo structure.
fengluf7408292015-04-14 14:53:55 -07005980 *
5981 */
5982#define RIL_UNSOL_LCEDATA_RECV 1045
5983
Robert Greenwalt27e99c52016-06-01 16:31:38 -07005984 /**
5985 * RIL_UNSOL_PCO_DATA
5986 *
5987 * Called when there is new Carrier PCO data received for a data call. Ideally
5988 * only new data will be forwarded, though this is not required. Multiple
5989 * boxes of carrier PCO data for a given call should result in a series of
5990 * RIL_UNSOL_PCO_DATA calls.
5991 *
5992 * "data" is the RIL_PCO_Data structure.
5993 *
5994 */
5995#define RIL_UNSOL_PCO_DATA 1046
5996
pkanwarc61837e2017-03-17 12:49:34 -07005997/**
5998 * RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION
5999 *
6000 * Called when the modem needs Carrier specific information that will
6001 * be used to encrypt IMSI and IMPI.
6002 *
6003 * "data" is NULL
6004 *
6005 */
6006#define RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION 1047
6007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006008/***********************************************************************/
6009
Amit Mahajan54563d32014-11-22 00:54:49 +00006010
Etan Cohend3652192014-06-20 08:28:44 -07006011#if defined(ANDROID_MULTI_SIM)
6012/**
6013 * RIL_Request Function pointer
6014 *
6015 * @param request is one of RIL_REQUEST_*
6016 * @param data is pointer to data defined for that RIL_REQUEST_*
6017 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07006018 * structures passed as data may contain pointers to non-contiguous memory
Etan Cohend3652192014-06-20 08:28:44 -07006019 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07006020 * @param datalen is the length of "data" which is defined as other argument. It may or may
6021 * not be equal to sizeof(data). Refer to the documentation of individual structures
6022 * to find if pointers listed in the structure are contiguous and counted in the datalen
6023 * length or not.
6024 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
Etan Cohend3652192014-06-20 08:28:44 -07006025 *
6026 */
6027typedef void (*RIL_RequestFunc) (int request, void *data,
6028 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
6029
6030/**
6031 * This function should return the current radio state synchronously
6032 */
6033typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
6034
6035#else
6036/* Backward compatible */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006037
6038/**
6039 * RIL_Request Function pointer
6040 *
6041 * @param request is one of RIL_REQUEST_*
6042 * @param data is pointer to data defined for that RIL_REQUEST_*
6043 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07006044 * structures passed as data may contain pointers to non-contiguous memory
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006045 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07006046 * @param datalen is the length of "data" which is defined as other argument. It may or may
6047 * not be equal to sizeof(data). Refer to the documentation of individual structures
6048 * to find if pointers listed in the structure are contiguous and counted in the datalen
6049 * length or not.
6050 * (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 -08006051 *
6052 */
Wink Saville7f856802009-06-09 10:23:37 -07006053typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006054 size_t datalen, RIL_Token t);
6055
6056/**
6057 * This function should return the current radio state synchronously
6058 */
6059typedef RIL_RadioState (*RIL_RadioStateRequest)();
6060
Etan Cohend3652192014-06-20 08:28:44 -07006061#endif
6062
6063
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006064/**
6065 * This function returns "1" if the specified RIL_REQUEST code is
6066 * supported and 0 if it is not
6067 *
6068 * @param requestCode is one of RIL_REQUEST codes
6069 */
6070
6071typedef int (*RIL_Supports)(int requestCode);
6072
6073/**
Wink Saville7f856802009-06-09 10:23:37 -07006074 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006075 * thread that calls RIL_RequestFunc--and indicates that a pending
6076 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07006077 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006078 * On cancel, the callee should do its best to abandon the request and
6079 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
6080 *
6081 * Subsequent calls to RIL_onRequestComplete for this request with
6082 * other results will be tolerated but ignored. (That is, it is valid
6083 * to ignore the cancellation request)
6084 *
6085 * RIL_Cancel calls should return immediately, and not wait for cancellation
6086 *
Wink Saville7f856802009-06-09 10:23:37 -07006087 * 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 -08006088 * interface
6089 *
6090 * @param t token wants to be canceled
6091 */
6092
6093typedef void (*RIL_Cancel)(RIL_Token t);
6094
6095typedef void (*RIL_TimedCallback) (void *param);
6096
6097/**
6098 * Return a version string for your RIL implementation
6099 */
6100typedef const char * (*RIL_GetVersion) (void);
6101
6102typedef struct {
6103 int version; /* set to RIL_VERSION */
6104 RIL_RequestFunc onRequest;
6105 RIL_RadioStateRequest onStateRequest;
6106 RIL_Supports supports;
6107 RIL_Cancel onCancel;
6108 RIL_GetVersion getVersion;
6109} RIL_RadioFunctions;
6110
Sungmin Choi75697532013-04-26 15:04:45 -07006111typedef struct {
Jack Yu06181bb2017-01-10 12:10:41 -08006112 char *apn; /* the APN to connect to */
6113 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
6114 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/
6115 int authtype; /* authentication protocol used for this PDP context
6116 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */
6117 char *username; /* the username for APN, or NULL */
6118 char *password; /* the password for APN, or NULL */
Sungmin Choi75697532013-04-26 15:04:45 -07006119} RIL_InitialAttachApn;
6120
Amit Mahajan2b772032014-06-26 14:20:11 -07006121typedef struct {
Jack Yu06181bb2017-01-10 12:10:41 -08006122 char *apn; /* the APN to connect to */
6123 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
6124 home network. For example, "IP", "IPV6", "IPV4V6", or "PPP". */
6125 char *roamingProtocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
6126 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/
6127 int authtype; /* authentication protocol used for this PDP context
6128 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */
6129 char *username; /* the username for APN, or NULL */
6130 char *password; /* the password for APN, or NULL */
6131 int supportedTypesBitmask; /* supported APN types bitmask. See RIL_ApnTypes for the value of
6132 each bit. */
6133 int bearerBitmask; /* the bearer bitmask. See RIL_RadioAccessFamily for the value of
6134 each bit. */
6135 int modemCognitive; /* indicating the APN setting was sent to the modem through
6136 setDataProfile earlier. */
6137 int mtu; /* maximum transmission unit (MTU) size in bytes */
6138 char *mvnoType; /* the MVNO type: possible values are "imsi", "gid", "spn" */
6139 char *mvnoMatchData; /* MVNO match data. Can be anything defined by the carrier.
6140 For example,
6141 SPN like: "A MOBILE", "BEN NL", etc...
6142 IMSI like: "302720x94", "2060188", etc...
6143 GID like: "4E", "33", etc... */
6144} RIL_InitialAttachApn_v15;
6145
6146typedef struct {
Amit Mahajan2b772032014-06-26 14:20:11 -07006147 int authContext; /* P2 value of authentication command, see P2 parameter in
6148 3GPP TS 31.102 7.1.2 */
6149 char *authData; /* the challenge string in Base64 format, see 3GPP
6150 TS 31.102 7.1.2 */
6151 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
6152 NULL if no value. */
6153} RIL_SimAuthentication;
6154
Robert Greenwalt17ea3fa2016-06-15 14:59:38 -07006155typedef struct {
Jack Yu06181bb2017-01-10 12:10:41 -08006156 int cid; /* Context ID, uniquely identifies this call */
6157 char *bearer_proto; /* One of the PDP_type values in TS 27.007 section 10.1.1.
6158 For example, "IP", "IPV6", "IPV4V6". */
6159 int pco_id; /* The protocol ID for this box. Note that only IDs from
6160 FF00H - FFFFH are accepted. If more than one is included
6161 from the network, multiple calls should be made to send all
6162 of them. */
6163 int contents_length; /* The number of octets in the contents. */
6164 char *contents; /* Carrier-defined content. It is binary, opaque and
6165 loosely defined in LTE Layer 3 spec 24.008 */
Robert Greenwalt17ea3fa2016-06-15 14:59:38 -07006166} RIL_PCO_Data;
6167
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006168#ifdef RIL_SHLIB
6169struct RIL_Env {
6170 /**
6171 * "t" is parameter passed in on previous call to RIL_Notification
6172 * routine.
6173 *
6174 * If "e" != SUCCESS, then response can be null/is ignored
6175 *
Wink Saville7f856802009-06-09 10:23:37 -07006176 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006177 * freed by callee
6178 *
6179 * RIL_onRequestComplete will return as soon as possible
6180 */
Wink Saville7f856802009-06-09 10:23:37 -07006181 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006182 void *response, size_t responselen);
6183
Etan Cohend3652192014-06-20 08:28:44 -07006184#if defined(ANDROID_MULTI_SIM)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006185 /**
6186 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
6187 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6188 *
6189 * "data" is owned by caller, and should not be modified or freed by callee
6190 */
Etan Cohend3652192014-06-20 08:28:44 -07006191 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
6192#else
6193 /**
6194 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
6195 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6196 *
6197 * "data" is owned by caller, and should not be modified or freed by callee
6198 */
6199 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
6200#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006201 /**
Wink Saville7f856802009-06-09 10:23:37 -07006202 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006203 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6204 * a relative time value at which the callback is invoked. If relativeTime is
6205 * NULL or points to a 0-filled structure, the callback will be invoked as
6206 * soon as possible
6207 */
6208
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07006209 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07006210 void *param, const struct timeval *relativeTime);
Sanket Padawe6ff9a872016-01-27 15:09:12 -08006211 /**
6212 * "t" is parameter passed in on previous call RIL_Notification routine
6213 *
6214 * RIL_onRequestAck will be called by vendor when an Async RIL request was received
6215 * by them and an ack needs to be sent back to java ril.
6216 */
6217 void (*OnRequestAck) (RIL_Token t);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006218};
6219
6220
Wink Saville7f856802009-06-09 10:23:37 -07006221/**
6222 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006223 * argc and argv will be command line arguments intended for the RIL implementation
6224 * Return NULL on error
6225 *
6226 * @param env is environment point defined as RIL_Env
6227 * @param argc number of arguments
6228 * @param argv list fo arguments
6229 *
6230 */
6231const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
6232
Sanket Padawe1be49ba2016-03-31 17:37:23 -07006233/**
6234 * If BT SAP(SIM Access Profile) is supported, then RIL implementations must define RIL_SAP_Init
6235 * for initializing RIL_RadioFunctions used for BT SAP communcations. It is called whenever RILD
6236 * starts or modem restarts. Returns handlers for SAP related request that are made on SAP
6237 * sepecific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init
6238 * and used on the general RIL socket.
6239 * argc and argv will be command line arguments intended for the RIL implementation
6240 * Return NULL on error.
6241 *
6242 * @param env is environment point defined as RIL_Env
6243 * @param argc number of arguments
6244 * @param argv list fo arguments
6245 *
6246 */
6247const RIL_RadioFunctions *RIL_SAP_Init(const struct RIL_Env *env, int argc, char **argv);
6248
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006249#else /* RIL_SHLIB */
6250
6251/**
6252 * Call this once at startup to register notification routine
6253 *
6254 * @param callbacks user-specifed callback function
6255 */
6256void RIL_register (const RIL_RadioFunctions *callbacks);
6257
Amit Mahajancd77a5b2016-08-25 11:19:21 -07006258void rilc_thread_pool();
6259
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006260
6261/**
6262 *
6263 * RIL_onRequestComplete will return as soon as possible
6264 *
6265 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07006266 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006267 * @param e error code
6268 * if "e" != SUCCESS, then response can be null/is ignored
6269 * @param response is owned by caller, and should not be modified or
6270 * freed by callee
6271 * @param responselen the length of response in byte
6272 */
Wink Saville7f856802009-06-09 10:23:37 -07006273void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006274 void *response, size_t responselen);
6275
Sanket Padawe6ff9a872016-01-27 15:09:12 -08006276/**
6277 * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and
6278 * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's
6279 * results, just that the command was received and will take a while. After sending this Ack
6280 * its vendor's responsibility to make sure that AP is up whenever needed while command is
6281 * being processed.
6282 *
6283 * @param t is parameter passed in on previous call to RIL_Notification
6284 * routine.
6285 */
6286void RIL_onRequestAck(RIL_Token t);
6287
Etan Cohend3652192014-06-20 08:28:44 -07006288#if defined(ANDROID_MULTI_SIM)
6289/**
6290 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6291 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6292 * "data" is owned by caller, and should not be modified or freed by callee
6293 * @param datalen the length of data in byte
6294 */
6295
6296void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
6297 size_t datalen, RIL_SOCKET_ID socket_id);
6298#else
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006299/**
6300 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6301 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6302 * "data" is owned by caller, and should not be modified or freed by callee
6303 * @param datalen the length of data in byte
6304 */
6305
Wink Saville7f856802009-06-09 10:23:37 -07006306void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006307 size_t datalen);
Etan Cohend3652192014-06-20 08:28:44 -07006308#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006309
6310/**
Wink Saville7f856802009-06-09 10:23:37 -07006311 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006312 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6313 * a relative time value at which the callback is invoked. If relativeTime is
6314 * NULL or points to a 0-filled structure, the callback will be invoked as
6315 * soon as possible
6316 *
6317 * @param callback user-specifed callback function
6318 * @param param parameter list
6319 * @param relativeTime a relative time value at which the callback is invoked
6320 */
6321
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07006322void RIL_requestTimedCallback (RIL_TimedCallback callback,
6323 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006324
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006325#endif /* RIL_SHLIB */
6326
6327#ifdef __cplusplus
6328}
6329#endif
6330
6331#endif /*ANDROID_RIL_H*/