blob: 5bf5e17c57cf8af0219776f6f9d2c8c50c223ef1 [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,
78 * RIL_REQUEST_SET_SIM_CARD_POWER
79 * The new parameters for RIL_REQUEST_SETUP_DATA_CALL,
Jack Yu06181bb2017-01-10 12:10:41 -080080 * Updated data structures: RIL_DataProfileInfo_v15, RIL_InitialAttachApn_v15
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -080081 * New data structure RIL_DataRegistrationStateResponse,
82 * RIL_VoiceRegistrationStateResponse same is
83 * used in RIL_REQUEST_DATA_REGISTRATION_STATE and
84 * RIL_REQUEST_VOICE_REGISTRATION_STATE respectively.
Wileen Chiu410b7562015-11-23 14:25:22 -080085 * New data structure RIL_OpenChannelParams.
Sanket Padawe88cf6a52016-01-11 12:45:43 -080086 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -080087#define RIL_VERSION 12
88#define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
Alex Yakavenka45e740e2012-01-31 11:48:27 -080089#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080090
Wink Savillea592eeb2009-05-22 13:26:36 -070091#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
92#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
93
Etan Cohend3652192014-06-20 08:28:44 -070094#define MAX_RILDS 3
Amit Mahajan7955c432017-03-28 11:17:55 -070095#define MAX_SERVICE_NAME_LENGTH 6
Etan Cohend3652192014-06-20 08:28:44 -070096#define MAX_CLIENT_ID_LENGTH 2
97#define MAX_DEBUG_SOCKET_NAME_LENGTH 12
98#define MAX_QEMU_PIPE_NAME_LENGTH 11
Wink Saville8b4e4f72014-10-17 15:01:45 -070099#define MAX_UUID_LENGTH 64
100
Etan Cohend3652192014-06-20 08:28:44 -0700101
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800102typedef void * RIL_Token;
103
104typedef enum {
Etan Cohend3652192014-06-20 08:28:44 -0700105 RIL_SOCKET_1,
106#if (SIM_COUNT >= 2)
107 RIL_SOCKET_2,
108#if (SIM_COUNT >= 3)
109 RIL_SOCKET_3,
110#endif
111#if (SIM_COUNT >= 4)
112 RIL_SOCKET_4,
113#endif
114#endif
115 RIL_SOCKET_NUM
116} RIL_SOCKET_ID;
117
118
119typedef enum {
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800120 RIL_E_SUCCESS = 0,
121 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
122 RIL_E_GENERIC_FAILURE = 2,
123 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
124 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
125 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
126 RIL_E_REQUEST_NOT_SUPPORTED = 6,
127 RIL_E_CANCELLED = 7,
128 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
129 call on a Class C GPRS device */
130 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
131 registers in network */
Wink Saville3d54e742009-05-18 18:00:44 -0700132 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
133 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
134 shall be retrieved because of SIM or RUIM
Wink Savillef4c4d362009-04-02 01:37:03 -0700135 card absent */
Wink Saville3d54e742009-05-18 18:00:44 -0700136 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
Wink Savillef4c4d362009-04-02 01:37:03 -0700137 location */
jsh602f80f2009-07-10 15:44:37 -0700138 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
John Wang75534472010-04-20 15:11:42 -0700139 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800140 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
John Wang75534472010-04-20 15:11:42 -0700141 illegal SIM or ME */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800142 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
Amit Mahajan54563d32014-11-22 00:54:49 +0000143 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
144 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
145 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
146 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
147 data */
148 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
149 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
150 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
151 request */
152 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
153 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
154 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
fengluf7408292015-04-14 14:53:55 -0700155 RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800156 RIL_E_LCE_NOT_SUPPORTED = 36, /* LCE service not supported(36 in RILConstants.java) */
157 RIL_E_NO_MEMORY = 37, /* Not sufficient memory to process the request */
Jayachandran Cb0cba832017-03-13 19:17:18 -0700158 RIL_E_INTERNAL_ERR = 38, /* Modem hit unexpected error scenario while handling
159 this request */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800160 RIL_E_SYSTEM_ERR = 39, /* Hit platform or system error */
Jayachandran Cb0cba832017-03-13 19:17:18 -0700161 RIL_E_MODEM_ERR = 40, /* Vendor RIL got unexpected or incorrect response
162 from modem for this request */
Ajay Nambi10345892016-03-19 09:02:28 -0700163 RIL_E_INVALID_STATE = 41, /* Unexpected request for the current state */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800164 RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */
165 RIL_E_SIM_ERR = 43, /* Received error from SIM card */
166 RIL_E_INVALID_ARGUMENTS = 44, /* Received invalid arguments in request */
167 RIL_E_INVALID_SIM_STATE = 45, /* Can not process the request in current SIM state */
168 RIL_E_INVALID_MODEM_STATE = 46, /* Can not process the request in current Modem state */
169 RIL_E_INVALID_CALL_ID = 47, /* Received invalid call id in request */
170 RIL_E_NO_SMS_TO_ACK = 48, /* ACK received when there is no SMS to ack */
Nathan Haroldc97b2842016-02-02 12:04:35 -0800171 RIL_E_NETWORK_ERR = 49, /* Received error from network */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800172 RIL_E_REQUEST_RATE_LIMITED = 50, /* Operation denied due to overly-frequent requests */
twen.changdf7add02016-03-04 18:27:48 +0800173 RIL_E_SIM_BUSY = 51, /* SIM is busy */
174 RIL_E_SIM_FULL = 52, /* The target EF is full */
175 RIL_E_NETWORK_REJECT = 53, /* Request is rejected by network */
176 RIL_E_OPERATION_NOT_ALLOWED = 54, /* Not allowed the request now */
177 RIL_E_EMPTY_RECORD = 55, /* The request record is empty */
Ajay Nambi68900f52016-03-11 12:02:55 -0800178 RIL_E_INVALID_SMS_FORMAT = 56, /* Invalid sms format */
179 RIL_E_ENCODING_ERR = 57, /* Message not encoded properly */
180 RIL_E_INVALID_SMSC_ADDRESS = 58, /* SMSC address specified is invalid */
181 RIL_E_NO_SUCH_ENTRY = 59, /* No such entry present to perform the request */
182 RIL_E_NETWORK_NOT_READY = 60, /* Network is not ready to perform the request */
183 RIL_E_NOT_PROVISIONED = 61, /* Device doesnot have this value provisioned */
Ajay Nambi10345892016-03-19 09:02:28 -0700184 RIL_E_NO_SUBSCRIPTION = 62, /* Device doesnot have subscription */
185 RIL_E_NO_NETWORK_FOUND = 63, /* Network cannot be found */
186 RIL_E_DEVICE_IN_USE = 64, /* Operation cannot be performed because the device
187 is currently in use */
188 RIL_E_ABORTED = 65, /* Operation aborted */
Sanket Padawef220dc52017-01-02 23:46:00 -0800189 RIL_E_INVALID_RESPONSE = 66, /* Invalid response sent by vendor code */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800190 // OEM specific error codes. To be used by OEM when they don't want to reveal
191 // specific error codes which would be replaced by Generic failure.
192 RIL_E_OEM_ERROR_1 = 501,
193 RIL_E_OEM_ERROR_2 = 502,
194 RIL_E_OEM_ERROR_3 = 503,
195 RIL_E_OEM_ERROR_4 = 504,
196 RIL_E_OEM_ERROR_5 = 505,
197 RIL_E_OEM_ERROR_6 = 506,
198 RIL_E_OEM_ERROR_7 = 507,
199 RIL_E_OEM_ERROR_8 = 508,
200 RIL_E_OEM_ERROR_9 = 509,
201 RIL_E_OEM_ERROR_10 = 510,
202 RIL_E_OEM_ERROR_11 = 511,
203 RIL_E_OEM_ERROR_12 = 512,
204 RIL_E_OEM_ERROR_13 = 513,
205 RIL_E_OEM_ERROR_14 = 514,
206 RIL_E_OEM_ERROR_15 = 515,
207 RIL_E_OEM_ERROR_16 = 516,
208 RIL_E_OEM_ERROR_17 = 517,
209 RIL_E_OEM_ERROR_18 = 518,
210 RIL_E_OEM_ERROR_19 = 519,
211 RIL_E_OEM_ERROR_20 = 520,
212 RIL_E_OEM_ERROR_21 = 521,
213 RIL_E_OEM_ERROR_22 = 522,
214 RIL_E_OEM_ERROR_23 = 523,
215 RIL_E_OEM_ERROR_24 = 524,
216 RIL_E_OEM_ERROR_25 = 525
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800217} RIL_Errno;
218
219typedef enum {
220 RIL_CALL_ACTIVE = 0,
221 RIL_CALL_HOLDING = 1,
222 RIL_CALL_DIALING = 2, /* MO call only */
223 RIL_CALL_ALERTING = 3, /* MO call only */
224 RIL_CALL_INCOMING = 4, /* MT call only */
225 RIL_CALL_WAITING = 5 /* MT call only */
226} RIL_CallState;
227
228typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -0700229 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
230 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800231 RADIO_STATE_ON = 10 /* Radio is on */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800232} RIL_RadioState;
233
Wink Saville43808972011-01-13 17:39:51 -0800234typedef enum {
235 RADIO_TECH_UNKNOWN = 0,
236 RADIO_TECH_GPRS = 1,
237 RADIO_TECH_EDGE = 2,
238 RADIO_TECH_UMTS = 3,
239 RADIO_TECH_IS95A = 4,
240 RADIO_TECH_IS95B = 5,
241 RADIO_TECH_1xRTT = 6,
242 RADIO_TECH_EVDO_0 = 7,
243 RADIO_TECH_EVDO_A = 8,
244 RADIO_TECH_HSDPA = 9,
245 RADIO_TECH_HSUPA = 10,
246 RADIO_TECH_HSPA = 11,
247 RADIO_TECH_EVDO_B = 12,
248 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800249 RADIO_TECH_LTE = 14,
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800250 RADIO_TECH_HSPAP = 15, // HSPA+
Etan Cohend3652192014-06-20 08:28:44 -0700251 RADIO_TECH_GSM = 16, // Only supports voice
Yashdev Singh3c8f37c2015-02-23 13:04:28 -0800252 RADIO_TECH_TD_SCDMA = 17,
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700253 RADIO_TECH_IWLAN = 18,
254 RADIO_TECH_LTE_CA = 19
Wink Saville43808972011-01-13 17:39:51 -0800255} RIL_RadioTechnology;
256
Wink Saville8b4e4f72014-10-17 15:01:45 -0700257typedef enum {
258 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
259 RAF_GPRS = (1 << RADIO_TECH_GPRS),
260 RAF_EDGE = (1 << RADIO_TECH_EDGE),
261 RAF_UMTS = (1 << RADIO_TECH_UMTS),
262 RAF_IS95A = (1 << RADIO_TECH_IS95A),
263 RAF_IS95B = (1 << RADIO_TECH_IS95B),
264 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
265 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
266 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
267 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
268 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
269 RAF_HSPA = (1 << RADIO_TECH_HSPA),
270 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
271 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
272 RAF_LTE = (1 << RADIO_TECH_LTE),
273 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
274 RAF_GSM = (1 << RADIO_TECH_GSM),
275 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700276 RAF_LTE_CA = (1 << RADIO_TECH_LTE_CA)
Wink Saville8b4e4f72014-10-17 15:01:45 -0700277} RIL_RadioAccessFamily;
278
279typedef enum {
Nathan Harold92839f12016-02-12 10:02:28 -0800280 BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically)
281 BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
282 BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
283 BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000)
284 BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
285 BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
286 BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band)
287 BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band)
288 BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band)
289 BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band)
290 BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band)
291 BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band)
292 BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band)
293 BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band)
294 BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band)
295 BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band)
296 BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band)
297 BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band)
298 BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band)
299} RIL_RadioBandMode;
300
301typedef enum {
Wink Saville8b4e4f72014-10-17 15:01:45 -0700302 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
303 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
304 // forthcoming with these same parameters
305 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
306 // RIL_RadioCapability.status = 0, if any START's fail no
307 // APPLY will be sent
308 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
309 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
310 // occurs in any previous command the RIL_RadioAccessesFamily and
Legler Wu8caf06f2014-10-29 14:02:14 +0800311 // logicalModemUuid fields will be the prior configuration thus
Wink Saville8b4e4f72014-10-17 15:01:45 -0700312 // restoring the configuration to the previous value. An error
313 // returned by this command will generally be ignored or may
314 // cause that logical modem to be removed from service.
315} RadioCapabilityPhase;
316
317typedef enum {
318 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
319 // RC_PHASE_APPLY
320 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
321 // capability was success with RC_PHASE_FINISH
322 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
323 // capability is fail with RC_PHASE_FINISH.
324} RadioCapabilityStatus;
325
326#define RIL_RADIO_CAPABILITY_VERSION 1
327typedef struct {
Legler Wu8caf06f2014-10-29 14:02:14 +0800328 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
Wink Saville8b4e4f72014-10-17 15:01:45 -0700329 int session; // Unique session value defined by framework returned in all "responses/unsol"
330 int phase; // CONFIGURED, START, APPLY, FINISH
331 int rat; // RIL_RadioAccessFamily for the radio
332 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
333 int status; // Return status and an input parameter for RC_PHASE_FINISH
334} RIL_RadioCapability;
335
Wink Savillec0114b32011-02-18 10:14:07 -0800336// Do we want to split Data from Voice and the use
337// RIL_RadioTechnology for get/setPreferredVoice/Data ?
338typedef enum {
339 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
340 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
341 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
342 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
343 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
344 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
345 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
346 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
347 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
348 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
349 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
Uma Maheswari Ramalingam0e094872011-09-28 13:25:48 -0700350 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
351 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
Wink Savillec0114b32011-02-18 10:14:07 -0800352} RIL_PreferredNetworkType;
353
354/* Source for cdma subscription */
355typedef enum {
356 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
357 CDMA_SUBSCRIPTION_SOURCE_NV = 1
358} RIL_CdmaSubscriptionSource;
359
Wink Saville74fa3882009-12-22 15:35:41 -0800360/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
361typedef enum {
362 RIL_UUS_TYPE1_IMPLICIT = 0,
363 RIL_UUS_TYPE1_REQUIRED = 1,
364 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
365 RIL_UUS_TYPE2_REQUIRED = 3,
366 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
367 RIL_UUS_TYPE3_REQUIRED = 5,
368 RIL_UUS_TYPE3_NOT_REQUIRED = 6
369} RIL_UUS_Type;
370
371/* User-to-User Signaling Information data coding schemes. Possible values for
372 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
373 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
374typedef enum {
375 RIL_UUS_DCS_USP = 0, /* User specified protocol */
376 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
377 RIL_UUS_DCS_X244 = 2, /* X.244 */
378 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
379 convergence function */
380 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
381} RIL_UUS_DCS;
382
383/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
384 * This data is passed in RIL_ExtensionRecord and rec contains this
385 * structure when type is RIL_UUS_INFO_EXT_REC */
386typedef struct {
387 RIL_UUS_Type uusType; /* UUS Type */
388 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
389 int uusLength; /* Length of UUS Data */
390 char * uusData; /* UUS Data */
391} RIL_UUS_Info;
392
393/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700394typedef struct {
395 char isPresent; /* non-zero if signal information record is present */
396 char signalType; /* as defined 3.7.5.5-1 */
397 char alertPitch; /* as defined 3.7.5.5-2 */
398 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
399} RIL_CDMA_SignalInfoRecord;
400
Wink Saville1b5fd232009-04-22 14:50:00 -0700401typedef struct {
402 RIL_CallState state;
403 int index; /* Connection Index for use with, eg, AT+CHLD */
404 int toa; /* type of address, eg 145 = intl */
405 char isMpty; /* nonzero if is mpty call */
406 char isMT; /* nonzero if call is mobile terminated */
407 char als; /* ALS line indicator if available
408 (0 = line 1) */
409 char isVoice; /* nonzero if this is is a voice call */
410 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
411 char * number; /* Remote party number */
412 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
413 char * name; /* Remote party name */
414 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800415 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800416} RIL_Call;
417
Wink Savillec0114b32011-02-18 10:14:07 -0800418/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800419typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800420 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700421 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700422 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
423 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800424 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800425 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
426} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800427
428/*
429 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
430 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
431 */
432typedef struct {
433 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500434 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
435 back-off timer value RIL wants to override the one
436 pre-configured in FW.
437 The unit is miliseconds.
438 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700439 The value 0 means retry should be done ASAP.
Wink Saville8a9e0212013-04-09 12:11:38 -0700440 The value of INT_MAX(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800441 int cid; /* Context ID, uniquely identifies this call */
442 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
443 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
444 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
445 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
446 such as "IP" or "IPV6" */
447 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800448 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
449 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800450 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800451 one of each. If the prefix length is absent the addresses
452 are assumed to be point to point with IPv4 having a prefix
453 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800454 char * dnses; /* A space-delimited list of DNS server addresses,
455 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
456 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800457 char * gateways; /* A space-delimited list of default gateway addresses,
458 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
459 May be empty in which case the addresses represent point
460 to point connections. */
461} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800462
Etan Cohend3652192014-06-20 08:28:44 -0700463typedef struct {
464 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
465 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
466 back-off timer value RIL wants to override the one
467 pre-configured in FW.
468 The unit is miliseconds.
469 The value < 0 means no value is suggested.
470 The value 0 means retry should be done ASAP.
471 The value of INT_MAX(0x7fffffff) means no retry. */
472 int cid; /* Context ID, uniquely identifies this call */
473 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
474 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
475 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
476 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
477 such as "IP" or "IPV6" */
478 char * ifname; /* The network interface name */
479 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
480 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
481 May not be empty, typically 1 IPv4 or 1 IPv6 or
482 one of each. If the prefix length is absent the addresses
483 are assumed to be point to point with IPv4 having a prefix
484 length of 32 and IPv6 128. */
485 char * dnses; /* A space-delimited list of DNS server addresses,
486 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
487 May be empty. */
488 char * gateways; /* A space-delimited list of default gateway addresses,
489 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
490 May be empty in which case the addresses represent point
491 to point connections. */
492 char * pcscf; /* the Proxy Call State Control Function address
493 via PCO(Protocol Configuration Option) for IMS client. */
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -0700494} RIL_Data_Call_Response_v9;
495
496typedef struct {
497 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
498 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
499 back-off timer value RIL wants to override the one
500 pre-configured in FW.
501 The unit is miliseconds.
502 The value < 0 means no value is suggested.
503 The value 0 means retry should be done ASAP.
504 The value of INT_MAX(0x7fffffff) means no retry. */
505 int cid; /* Context ID, uniquely identifies this call */
506 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
507 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
508 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
509 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
510 such as "IP" or "IPV6" */
511 char * ifname; /* The network interface name */
512 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
513 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
514 May not be empty, typically 1 IPv4 or 1 IPv6 or
515 one of each. If the prefix length is absent the addresses
516 are assumed to be point to point with IPv4 having a prefix
517 length of 32 and IPv6 128. */
518 char * dnses; /* A space-delimited list of DNS server addresses,
519 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
520 May be empty. */
521 char * gateways; /* A space-delimited list of default gateway addresses,
522 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
523 May be empty in which case the addresses represent point
524 to point connections. */
525 char * pcscf; /* the Proxy Call State Control Function address
526 via PCO(Protocol Configuration Option) for IMS client. */
527 int mtu; /* MTU received from network
528 Value <= 0 means network has either not sent a value or
529 sent an invalid value */
530} RIL_Data_Call_Response_v11;
Etan Cohend3652192014-06-20 08:28:44 -0700531
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700532typedef enum {
533 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
534 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
535} RIL_RadioTechnologyFamily;
536
537typedef struct {
538 RIL_RadioTechnologyFamily tech;
539 unsigned char retry; /* 0 == not retry, nonzero == retry */
540 int messageRef; /* Valid field if retry is set to nonzero.
541 Contains messageRef from RIL_SMS_Response
542 corresponding to failed MO SMS.
543 */
544
545 union {
546 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
547 RIL_CDMA_SMS_Message* cdmaMessage;
548
549 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
Sanket Padawe05c23072016-08-08 15:42:17 -0700550 char** gsmMessage; /* This is an array of pointers where pointers
551 are contiguous but elements pointed by those pointers
552 are not contiguous
553 */
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700554 } message;
555} RIL_IMS_SMS_Message;
556
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800557typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800558 int messageRef; /* TP-Message-Reference for GSM,
559 and BearerData MessageId for CDMA
560 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800561 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700562 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
563 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
564 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800565} RIL_SMS_Response;
566
567/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
568typedef struct {
569 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
570 /* 0 = "REC UNREAD" */
571 /* 1 = "REC READ" */
572 /* 2 = "STO UNSENT" */
573 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700574 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
575 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800576 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
577 (as expected by TS 27.005) or NULL for default SMSC */
578} RIL_SMS_WriteArgs;
579
580/** Used by RIL_REQUEST_DIAL */
581typedef struct {
582 char * address;
583 int clir;
584 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
585 * clir == 0 on "use subscription default value"
586 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
587 * clir == 2 on "CLIR suppression" (allow CLI presentation)
588 */
Wink Saville74fa3882009-12-22 15:35:41 -0800589 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800590} RIL_Dial;
591
592typedef struct {
593 int command; /* one of the commands listed for TS 27.007 +CRSM*/
594 int fileid; /* EF id */
595 char *path; /* "pathid" from TS 27.007 +CRSM command.
596 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700597 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800598 */
599 int p1;
600 int p2;
601 int p3;
602 char *data; /* May be NULL*/
603 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800604} RIL_SIM_IO_v5;
605
606typedef struct {
607 int command; /* one of the commands listed for TS 27.007 +CRSM*/
608 int fileid; /* EF id */
609 char *path; /* "pathid" from TS 27.007 +CRSM command.
610 Path is in hex asciii format eg "7f205f70"
611 Path must always be provided.
612 */
613 int p1;
614 int p2;
615 int p3;
616 char *data; /* May be NULL*/
617 char *pin2; /* May be NULL*/
618 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
619} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800620
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800621/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
622 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
623typedef struct {
624 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
625 ignored for +CSIM command. */
626
627 /* Following fields are used to derive the APDU ("command" and "length"
628 values in TS 27.007 +CSIM and +CGLA commands). */
629 int cla;
630 int instruction;
631 int p1;
632 int p2;
633 int p3; /* A negative P3 implies a 4 byte APDU. */
634 char *data; /* May be NULL. In hex string format. */
635} RIL_SIM_APDU;
636
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800637typedef struct {
638 int sw1;
639 int sw2;
Amit Mahajan2875bc22014-08-06 10:03:15 -0700640 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
641 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 -0800642} RIL_SIM_IO_Response;
643
644/* See also com.android.internal.telephony.gsm.CallForwardInfo */
645
646typedef struct {
647 int status; /*
648 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
649 * status 1 = active, 0 = not active
650 *
651 * For RIL_REQUEST_SET_CALL_FORWARD:
652 * status is:
653 * 0 = disable
654 * 1 = enable
655 * 2 = interrogate
656 * 3 = registeration
657 * 4 = erasure
658 */
659
Wink Saville3d54e742009-05-18 18:00:44 -0700660 int reason; /* from TS 27.007 7.11 "reason" */
661 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
662 See table for Android mapping from
663 MMI service code
664 0 means user doesn't input class */
665 int toa; /* "type" from TS 27.007 7.11 */
666 char * number; /* "number" from TS 27.007 7.11. May be NULL */
667 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800668}RIL_CallForwardInfo;
669
670typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700671 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
672 * Upper 16 bits is LAC and lower 16 bits
673 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800674 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700675 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700676 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800677 */
johnwange0ba6a92009-09-11 19:14:52 -0700678 int rssi; /* Received RSSI in GSM,
679 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800680 */
681} RIL_NeighboringCell;
682
fengluf7408292015-04-14 14:53:55 -0700683typedef struct {
684 char lce_status; /* LCE service status:
685 * -1 = not supported;
686 * 0 = stopped;
687 * 1 = active.
688 */
689 unsigned int actual_interval_ms; /* actual LCE reporting interval,
690 * meaningful only if LCEStatus = 1.
691 */
692} RIL_LceStatusInfo;
693
694typedef struct {
fenglu290add32015-05-01 17:05:15 -0700695 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
fengluf7408292015-04-14 14:53:55 -0700696 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
697 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
698 * moves to inactive state or network type change)
699 * 1 = suspended;
700 * 0 = not suspended.
701 */
702} RIL_LceDataInfo;
703
Meng Wangb4e34312016-05-12 14:54:36 -0700704typedef enum {
705 RIL_MATCH_ALL = 0, /* Apply to all carriers with the same mcc/mnc */
706 RIL_MATCH_SPN = 1, /* Use SPN and mcc/mnc to identify the carrier */
707 RIL_MATCH_IMSI_PREFIX = 2, /* Use IMSI prefix and mcc/mnc to identify the carrier */
708 RIL_MATCH_GID1 = 3, /* Use GID1 and mcc/mnc to identify the carrier */
709 RIL_MATCH_GID2 = 4, /* Use GID2 and mcc/mnc to identify the carrier */
710} RIL_CarrierMatchType;
711
712typedef struct {
713 const char * mcc;
714 const char * mnc;
715 RIL_CarrierMatchType match_type; /* Specify match type for the carrier.
716 * If it’s RIL_MATCH_ALL, match_data is null;
717 * otherwise, match_data is the value for the match type.
718 */
719 const char * match_data;
720} RIL_Carrier;
721
722typedef struct {
723 int32_t len_allowed_carriers; /* length of array allowed_carriers */
724 int32_t len_excluded_carriers; /* length of array excluded_carriers */
725 RIL_Carrier * allowed_carriers; /* whitelist for allowed carriers */
726 RIL_Carrier * excluded_carriers; /* blacklist for explicitly excluded carriers
727 * which match allowed_carriers. Eg. allowed_carriers match
728 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1
729 * is ABCD. It means except the carrier whose gid1 is ABCD,
730 * all carriers with the same mcc/mnc are allowed.
731 */
732} RIL_CarrierRestrictions;
733
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800734/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
735typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700736 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800737 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
738 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
739 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800740 CALL_FAIL_NORMAL = 16,
741 CALL_FAIL_BUSY = 17,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800742 CALL_FAIL_NO_USER_RESPONDING = 18,
743 CALL_FAIL_NO_ANSWER_FROM_USER = 19,
744 CALL_FAIL_CALL_REJECTED = 21,
745 CALL_FAIL_NUMBER_CHANGED = 22,
746 CALL_FAIL_PREEMPTION = 25,
747 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
748 CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
749 CALL_FAIL_FACILITY_REJECTED = 29,
750 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
751 CALL_FAIL_NORMAL_UNSPECIFIED = 31,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800752 CALL_FAIL_CONGESTION = 34,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800753 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
754 CALL_FAIL_TEMPORARY_FAILURE = 41,
755 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
756 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
757 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
758 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
759 CALL_FAIL_QOS_UNAVAILABLE = 49,
760 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
761 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
762 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
763 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
764 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
765 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800766 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800767 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
768 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
769 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
770 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
771 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
772 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
773 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
774 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
775 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
776 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
777 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
778 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
779 CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
780 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
781 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
782 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
783 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800784 CALL_FAIL_CALL_BARRED = 240,
785 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700786 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
787 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Amit Mahajan54563d32014-11-22 00:54:49 +0000788 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
789 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
790 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
Jayachandran Ccc2a2022017-03-07 09:55:58 -0800791 CALL_FAIL_RADIO_OFF = 247, /* Radio is OFF */
792 CALL_FAIL_OUT_OF_SERVICE = 248, /* No cellular coverage */
793 CALL_FAIL_NO_VALID_SIM = 249, /* No valid SIM is present */
794 CALL_FAIL_RADIO_INTERNAL_ERROR = 250, /* Internal error at Modem */
795 CALL_FAIL_NETWORK_RESP_TIMEOUT = 251, /* No response from network */
796 CALL_FAIL_NETWORK_REJECT = 252, /* Explicit network reject */
797 CALL_FAIL_RADIO_ACCESS_FAILURE = 253, /* RRC connection failure. Eg.RACH */
798 CALL_FAIL_RADIO_LINK_FAILURE = 254, /* Radio Link Failure */
799 CALL_FAIL_RADIO_LINK_LOST = 255, /* Radio link lost due to poor coverage */
800 CALL_FAIL_RADIO_UPLINK_FAILURE = 256, /* Radio uplink failure */
801 CALL_FAIL_RADIO_SETUP_FAILURE = 257, /* RRC connection setup failure */
802 CALL_FAIL_RADIO_RELEASE_NORMAL = 258, /* RRC connection release, normal */
803 CALL_FAIL_RADIO_RELEASE_ABNORMAL = 259, /* RRC connection release, abnormal */
804 CALL_FAIL_ACCESS_CLASS_BLOCKED = 260, /* Access class barring */
805 CALL_FAIL_NETWORK_DETACH = 261, /* Explicit network detach */
Wink Saville1b5fd232009-04-22 14:50:00 -0700806 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
807 CALL_FAIL_CDMA_DROP = 1001,
808 CALL_FAIL_CDMA_INTERCEPT = 1002,
809 CALL_FAIL_CDMA_REORDER = 1003,
810 CALL_FAIL_CDMA_SO_REJECT = 1004,
811 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
812 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
813 CALL_FAIL_CDMA_PREEMPTED = 1007,
814 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
815 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700816 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
Jayachandran Ccc2a2022017-03-07 09:55:58 -0800817
818 /* OEM specific error codes. Used to distinguish error from
819 * CALL_FAIL_ERROR_UNSPECIFIED and help assist debugging */
820 CALL_FAIL_OEM_CAUSE_1 = 0xf001,
821 CALL_FAIL_OEM_CAUSE_2 = 0xf002,
822 CALL_FAIL_OEM_CAUSE_3 = 0xf003,
823 CALL_FAIL_OEM_CAUSE_4 = 0xf004,
824 CALL_FAIL_OEM_CAUSE_5 = 0xf005,
825 CALL_FAIL_OEM_CAUSE_6 = 0xf006,
826 CALL_FAIL_OEM_CAUSE_7 = 0xf007,
827 CALL_FAIL_OEM_CAUSE_8 = 0xf008,
828 CALL_FAIL_OEM_CAUSE_9 = 0xf009,
829 CALL_FAIL_OEM_CAUSE_10 = 0xf00a,
830 CALL_FAIL_OEM_CAUSE_11 = 0xf00b,
831 CALL_FAIL_OEM_CAUSE_12 = 0xf00c,
832 CALL_FAIL_OEM_CAUSE_13 = 0xf00d,
833 CALL_FAIL_OEM_CAUSE_14 = 0xf00e,
834 CALL_FAIL_OEM_CAUSE_15 = 0xf00f,
835
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800836 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
837 vendor code should make sure to map error
838 code to specific error */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800839} RIL_LastCallFailCause;
840
Chao Liu548a81e2015-05-14 16:13:46 -0700841typedef struct {
842 RIL_LastCallFailCause cause_code;
843 char * vendor_cause;
844} RIL_LastCallFailCauseInfo;
845
Wink Savillef4c4d362009-04-02 01:37:03 -0700846/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800847typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800848 PDP_FAIL_NONE = 0, /* No error, connection ok */
849
850 /* an integer cause code defined in TS 24.008
851 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
852 If the implementation does not have access to the exact cause codes,
853 then it should return one of the following values,
854 as the UI layer needs to distinguish these
855 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700856 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
Sanket Padaweac308b92016-01-07 14:41:17 -0800857 PDP_FAIL_NAS_SIGNALLING = 0x0E,
858 PDP_FAIL_LLC_SNDCP = 0x19,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700859 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
860 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
861 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
862 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
863 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
864 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
865 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
866 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
867 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800868 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
Hui Wang11e8b232014-09-19 16:40:17 -0500869 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
870 based on framework config */
Sanket Padaweac308b92016-01-07 14:41:17 -0800871 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
872 PDP_FAIL_NETWORK_FAILURE = 0x26,
873 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
874 PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
875 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
876 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
877 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
878 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
879 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
880 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
Wink Saville43808972011-01-13 17:39:51 -0800881 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
882 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
883 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Sanket Padaweac308b92016-01-07 14:41:17 -0800884 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
885 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
886 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
887 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
888 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
889 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
890 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
891 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
892 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
893 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
894 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
895 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
896 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
897 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
898 PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
899 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
900 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
901 PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
902 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
903 PDP_FAIL_IFACE_MISMATCH = 0x75,
904 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
905 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
906 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
907 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
908 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
Wink Saville43808972011-01-13 17:39:51 -0800909
Sanket Padawe0106aed2016-02-09 09:56:31 -0800910 // OEM specific error codes. To be used by OEMs when they don't want to
911 // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
912 PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001,
913 PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002,
914 PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003,
915 PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004,
916 PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005,
917 PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006,
918 PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007,
919 PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008,
920 PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009,
921 PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A,
922 PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B,
923 PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C,
924 PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D,
925 PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E,
926 PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F,
927
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700928 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800929 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
930 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800931
932 /* reasons for data call drop - network/modem disconnect */
Wink Saville3492c6e2013-10-03 13:53:27 -0700933 PDP_FAIL_SIGNAL_LOST = -3,
Wink Saville43808972011-01-13 17:39:51 -0800934 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
935 with parameters appropriate for new technology */
936 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
937 powered off - no retry */
938 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
939 mode was up on same APN/data profile - no retry until
940 tethered call is off */
941
Sanket Padaweac308b92016-01-07 14:41:17 -0800942 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
943 new error codes are added making this unnecessary */
Wink Saville43808972011-01-13 17:39:51 -0800944} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800945
jsh602f80f2009-07-10 15:44:37 -0700946/* See RIL_REQUEST_SETUP_DATA_CALL */
947typedef enum {
948 RIL_DATA_PROFILE_DEFAULT = 0,
949 RIL_DATA_PROFILE_TETHERED = 1,
Hui Wang8d679622014-10-16 14:59:27 -0500950 RIL_DATA_PROFILE_IMS = 2,
951 RIL_DATA_PROFILE_FOTA = 3,
952 RIL_DATA_PROFILE_CBS = 4,
953 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
954 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
jsh602f80f2009-07-10 15:44:37 -0700955} RIL_DataProfile;
956
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800957/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
958typedef struct {
959 int notificationType; /*
960 * 0 = MO intermediate result code
961 * 1 = MT unsolicited result code
962 */
963 int code; /* See 27.007 7.17
964 "code1" for MO
965 "code2" for MT. */
966 int index; /* CUG index. See 27.007 7.17. */
967 int type; /* "type" from 27.007 7.17 (MT only). */
968 char * number; /* "number" from 27.007 7.17
969 (MT only, may be NULL). */
970} RIL_SuppSvcNotification;
971
Wink Savillef4c4d362009-04-02 01:37:03 -0700972#define RIL_CARD_MAX_APPS 8
973
974typedef enum {
Meng Wangb4e34312016-05-12 14:54:36 -0700975 RIL_CARDSTATE_ABSENT = 0,
976 RIL_CARDSTATE_PRESENT = 1,
977 RIL_CARDSTATE_ERROR = 2,
978 RIL_CARDSTATE_RESTRICTED = 3 /* card is present but not usable due to carrier restrictions.*/
Wink Savillef4c4d362009-04-02 01:37:03 -0700979} RIL_CardState;
980
981typedef enum {
982 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
983 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700984 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
985 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700986 involved */
987 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
988 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
989 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
990 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
991 RIL_PERSOSUBSTATE_SIM_SIM = 7,
992 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
993 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
994 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
995 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
996 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
997 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
998 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
999 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
1000 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
1001 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
1002 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
1003 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
1004 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
1005 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
1006 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
1007 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
1008 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
1009} RIL_PersoSubstate;
1010
1011typedef enum {
1012 RIL_APPSTATE_UNKNOWN = 0,
1013 RIL_APPSTATE_DETECTED = 1,
1014 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
1015 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -07001016 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -07001017 when app_state is assigned to this value */
1018 RIL_APPSTATE_READY = 5
1019} RIL_AppState;
1020
1021typedef enum {
1022 RIL_PINSTATE_UNKNOWN = 0,
1023 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
1024 RIL_PINSTATE_ENABLED_VERIFIED = 2,
1025 RIL_PINSTATE_DISABLED = 3,
1026 RIL_PINSTATE_ENABLED_BLOCKED = 4,
1027 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
1028} RIL_PinState;
1029
1030typedef enum {
1031 RIL_APPTYPE_UNKNOWN = 0,
1032 RIL_APPTYPE_SIM = 1,
1033 RIL_APPTYPE_USIM = 2,
1034 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -08001035 RIL_APPTYPE_CSIM = 4,
1036 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -07001037} RIL_AppType;
1038
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -08001039/*
1040 * Please note that registration state UNKNOWN is
1041 * treated as "out of service" in the Android telephony.
1042 * Registration state REG_DENIED must be returned if Location Update
1043 * Reject (with cause 17 - Network Failure) is received
1044 * repeatedly from the network, to facilitate
1045 * "managed roaming"
1046 */
1047typedef enum {
1048 RIL_NOT_REG_AND_NOT_SEARCHING = 0, // Not registered, MT is not currently searching
1049 // a new operator to register
1050 RIL_REG_HOME = 1, // Registered, home network
1051 RIL_NOT_REG_AND_SEARCHING = 2, // Not registered, but MT is currently searching
1052 // a new operator to register
1053 RIL_REG_DENIED = 3, // Registration denied
1054 RIL_UNKNOWN = 4, // Unknown
1055 RIL_REG_ROAMING = 5, // Registered, roaming
1056 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_NOT_SEARCHING = 10, // Same as
1057 // RIL_NOT_REG_AND_NOT_SEARCHING but indicates that
1058 // emergency calls are enabled.
1059 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_SEARCHING = 12, // Same as RIL_NOT_REG_AND_SEARCHING
1060 // but indicates that
1061 // emergency calls are enabled.
1062 RIL_REG_DENIED_AND_EMERGENCY_AVAILABLE = 13, // Same as REG_DENIED but indicates that
1063 // emergency calls are enabled.
1064 RIL_UNKNOWN_AND_EMERGENCY_AVAILABLE = 14, // Same as UNKNOWN but indicates that
1065 // emergency calls are enabled.
1066} RIL_RegState;
1067
Wink Savillef4c4d362009-04-02 01:37:03 -07001068typedef struct
1069{
Wink Saville7f856802009-06-09 10:23:37 -07001070 RIL_AppType app_type;
1071 RIL_AppState app_state;
1072 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -07001073 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -07001074 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -07001075 0x30, 0x30, 0x30 */
1076 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -08001077 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -07001078 RIL_PinState pin1;
1079 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -07001080} RIL_AppStatus;
1081
Wink Savillec0114b32011-02-18 10:14:07 -08001082/* Deprecated, use RIL_CardStatus_v6 */
1083typedef struct
1084{
1085 RIL_CardState card_state;
1086 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
1087 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1088 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1089 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1090 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
1091} RIL_CardStatus_v5;
1092
Wink Savillef4c4d362009-04-02 01:37:03 -07001093typedef struct
1094{
Wink Saville7f856802009-06-09 10:23:37 -07001095 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -07001096 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -08001097 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1098 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1099 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -07001100 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1101 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -08001102} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -07001103
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001104/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
1105 * or as part of RIL_SimRefreshResponse_v7
1106 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001107typedef enum {
1108 /* A file on SIM has been updated. data[1] contains the EFID. */
1109 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001110 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001111 SIM_INIT = 1,
1112 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
1113 SIM_RESET = 2
1114} RIL_SimRefreshResult;
1115
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001116typedef struct {
1117 RIL_SimRefreshResult result;
1118 int ef_id; /* is the EFID of the updated file if the result is */
1119 /* SIM_FILE_UPDATE or 0 for any other result. */
1120 char * aid; /* is AID(application ID) of the card application */
1121 /* See ETSI 102.221 8.1 and 101.220 4 */
1122 /* For SIM_FILE_UPDATE result it can be set to AID of */
1123 /* application in which updated EF resides or it can be */
1124 /* NULL if EF is outside of an application. */
1125 /* For SIM_INIT result this field is set to AID of */
1126 /* application that caused REFRESH */
1127 /* For SIM_RESET result it is NULL. */
1128} RIL_SimRefreshResponse_v7;
1129
Wink Savillec0114b32011-02-18 10:14:07 -08001130/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
1131typedef struct {
1132 char * number; /* Remote party number */
1133 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1134 char * name; /* Remote party name */
1135 RIL_CDMA_SignalInfoRecord signalInfoRecord;
1136} RIL_CDMA_CallWaiting_v5;
1137
Wink Saville1b5fd232009-04-22 14:50:00 -07001138typedef struct {
1139 char * number; /* Remote party number */
1140 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1141 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -07001142 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -08001143 /* Number type/Number plan required to support International Call Waiting */
1144 int number_type; /* 0=Unknown, 1=International, 2=National,
1145 3=Network specific, 4=subscriber */
1146 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
1147} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001148
Wink Savillea592eeb2009-05-22 13:26:36 -07001149/**
1150 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
1151 *
1152 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
1153 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
1154 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
1155 * CBM message ID.
1156 *
1157 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
1158 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
1159 * and 9.4.4.2.3 for UMTS.
1160 * All other values can be treated as empty CBM data coding scheme.
1161 *
1162 * selected 0 means message types specified in <fromServiceId, toServiceId>
1163 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
1164 *
1165 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
1166 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
1167 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001168typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -07001169 int fromServiceId;
1170 int toServiceId;
1171 int fromCodeScheme;
1172 int toCodeScheme;
1173 unsigned char selected;
1174} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -07001175
The Android Open Source Project34a51082009-03-05 14:34:37 -08001176/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
1177#define RIL_RESTRICTED_STATE_NONE 0x00
1178/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
1179#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
1180/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
1181#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -07001182/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -08001183#define RIL_RESTRICTED_STATE_CS_ALL 0x04
1184/* Block packet data access due to restriction. */
1185#define RIL_RESTRICTED_STATE_PS_ALL 0x10
1186
Wink Saville1b5fd232009-04-22 14:50:00 -07001187/* The status for an OTASP/OTAPA session */
1188typedef enum {
1189 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
1190 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
1191 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
1192 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
1193 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
1194 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
1195 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
1196 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
1197 CDMA_OTA_PROVISION_STATUS_COMMITTED,
1198 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
1199 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
1200 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
1201} RIL_CDMA_OTA_ProvisionStatus;
1202
1203typedef struct {
1204 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1205 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1206} RIL_GW_SignalStrength;
1207
Wink Savillec57b3eb2013-04-17 12:51:41 -07001208typedef struct {
1209 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1210 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001211 int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us.
1212 * INT_MAX denotes invalid value */
1213} RIL_GSM_SignalStrength_v12;
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 */
Wink Savillec57b3eb2013-04-17 12:51:41 -07001218} RIL_SignalStrengthWcdma;
Wink Saville1b5fd232009-04-22 14:50:00 -07001219
1220typedef struct {
1221 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1222 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1223 * value will be 75.
1224 */
1225 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1226 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1227 * will be 125.
1228 */
1229} RIL_CDMA_SignalStrength;
1230
1231
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 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
1242} RIL_EVDO_SignalStrength;
1243
Wink Savillec0114b32011-02-18 10:14:07 -08001244typedef struct {
1245 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -07001246 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1247 * Range: 44 to 140 dBm
1248 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1249 * Reference: 3GPP TS 36.133 9.1.4 */
1250 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1251 * Range: 20 to 3 dB.
1252 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1253 * Reference: 3GPP TS 36.133 9.1.7 */
1254 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1255 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1256 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1257 * Reference: 3GPP TS 36.101 8.1.1 */
1258 int cqi; /* The current Channel Quality Indicator.
1259 * Range: 0 to 15.
1260 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1261 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -08001262} RIL_LTE_SignalStrength;
1263
Wink Saville8a9e0212013-04-09 12:11:38 -07001264typedef struct {
1265 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1266 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1267 * Range: 44 to 140 dBm
1268 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1269 * Reference: 3GPP TS 36.133 9.1.4 */
1270 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1271 * Range: 20 to 3 dB.
1272 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1273 * Reference: 3GPP TS 36.133 9.1.7 */
1274 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1275 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1276 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1277 * Reference: 3GPP TS 36.101 8.1.1 */
1278 int cqi; /* The current Channel Quality Indicator.
1279 * Range: 0 to 15.
1280 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1281 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1282 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
1283 * Approximate distance can be calculated using 300m/us * timingAdvance.
1284 * Range: 0 to 0x7FFFFFFE
1285 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1286 * Reference: 3GPP 36.321 section 6.1.3.5
1287 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1288} RIL_LTE_SignalStrength_v8;
1289
Etan Cohend3652192014-06-20 08:28:44 -07001290typedef struct {
1291 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
1292 * Range : 25 to 120
1293 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1294 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1295} RIL_TD_SCDMA_SignalStrength;
1296
Wink Savillec0114b32011-02-18 10:14:07 -08001297/* Deprecated, use RIL_SignalStrength_v6 */
1298typedef struct {
1299 RIL_GW_SignalStrength GW_SignalStrength;
1300 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1301 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1302} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -07001303
1304typedef struct {
1305 RIL_GW_SignalStrength GW_SignalStrength;
1306 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1307 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -08001308 RIL_LTE_SignalStrength LTE_SignalStrength;
1309} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001310
Wink Saville8a9e0212013-04-09 12:11:38 -07001311typedef struct {
1312 RIL_GW_SignalStrength GW_SignalStrength;
1313 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1314 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1315 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1316} RIL_SignalStrength_v8;
1317
Etan Cohend3652192014-06-20 08:28:44 -07001318typedef struct {
1319 RIL_GW_SignalStrength GW_SignalStrength;
1320 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1321 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1322 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1323 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1324} RIL_SignalStrength_v10;
1325
Wink Saville8a9e0212013-04-09 12:11:38 -07001326typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001327 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1328 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1329 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1330 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 -07001331} RIL_CellIdentityGsm;
1332
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001333typedef struct {
1334 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1335 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1336 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1337 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
1338 int arfcn; /* 16-bit GSM Absolute RF channel number, INT_MAX if unknown */
Nathan Haroldf3769da2016-05-05 12:19:39 -07001339 uint8_t bsic;/* 6-bit Base Station Identity Code, 0xFF if unknown */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001340} RIL_CellIdentityGsm_v12;
1341
Wink Savillec57b3eb2013-04-17 12:51:41 -07001342typedef struct {
1343 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1344 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1345 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1346 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1347 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1348} RIL_CellIdentityWcdma;
1349
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001350typedef struct {
1351 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1352 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1353 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1354 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1355 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1356 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number, INT_MAX if unknown */
1357} RIL_CellIdentityWcdma_v12;
1358
Wink Saville8a9e0212013-04-09 12:11:38 -07001359typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001360 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1361 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1362 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001363 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1364 * It is represented in units of 0.25 seconds and ranges from -2592000
1365 * to 2592000, both values inclusive (corresponding to a range of -180
Wink Savillec57b3eb2013-04-17 12:51:41 -07001366 * to +180 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001367
1368 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1369 * It is represented in units of 0.25 seconds and ranges from -1296000
1370 * to 1296000, both values inclusive (corresponding to a range of -90
Wink Savillec57b3eb2013-04-17 12:51:41 -07001371 * to +90 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001372} RIL_CellIdentityCdma;
1373
Wink Saville8a9e0212013-04-09 12:11:38 -07001374typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001375 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1376 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1377 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1378 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1379 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001380} RIL_CellIdentityLte;
1381
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001382typedef struct {
1383 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1384 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1385 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1386 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1387 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1388 int earfcn; /* 18-bit LTE Absolute RC Channel Number, INT_MAX if unknown */
1389} RIL_CellIdentityLte_v12;
1390
Etan Cohend3652192014-06-20 08:28:44 -07001391typedef struct {
1392 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1393 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1394 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1395 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1396 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1397} RIL_CellIdentityTdscdma;
1398
Wink Saville8a9e0212013-04-09 12:11:38 -07001399typedef struct {
1400 RIL_CellIdentityGsm cellIdentityGsm;
1401 RIL_GW_SignalStrength signalStrengthGsm;
1402} RIL_CellInfoGsm;
1403
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001404typedef struct {
1405 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1406 RIL_GSM_SignalStrength_v12 signalStrengthGsm;
1407} RIL_CellInfoGsm_v12;
1408
Wink Savillec57b3eb2013-04-17 12:51:41 -07001409typedef struct {
1410 RIL_CellIdentityWcdma cellIdentityWcdma;
1411 RIL_SignalStrengthWcdma signalStrengthWcdma;
1412} RIL_CellInfoWcdma;
1413
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001414typedef struct {
1415 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1416 RIL_SignalStrengthWcdma signalStrengthWcdma;
1417} RIL_CellInfoWcdma_v12;
1418
Wink Saville8a9e0212013-04-09 12:11:38 -07001419typedef struct {
1420 RIL_CellIdentityCdma cellIdentityCdma;
1421 RIL_CDMA_SignalStrength signalStrengthCdma;
1422 RIL_EVDO_SignalStrength signalStrengthEvdo;
1423} RIL_CellInfoCdma;
1424
Wink Saville8a9e0212013-04-09 12:11:38 -07001425typedef struct {
1426 RIL_CellIdentityLte cellIdentityLte;
1427 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1428} RIL_CellInfoLte;
1429
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001430typedef struct {
1431 RIL_CellIdentityLte_v12 cellIdentityLte;
1432 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1433} RIL_CellInfoLte_v12;
1434
Etan Cohend3652192014-06-20 08:28:44 -07001435typedef struct {
1436 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1437 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1438} RIL_CellInfoTdscdma;
1439
Wink Saville8a9e0212013-04-09 12:11:38 -07001440// Must be the same as CellInfo.TYPE_XXX
1441typedef enum {
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -08001442 RIL_CELL_INFO_TYPE_NONE = 0, /* indicates no cell information */
Wink Saville8a9e0212013-04-09 12:11:38 -07001443 RIL_CELL_INFO_TYPE_GSM = 1,
1444 RIL_CELL_INFO_TYPE_CDMA = 2,
1445 RIL_CELL_INFO_TYPE_LTE = 3,
Wink Savillec57b3eb2013-04-17 12:51:41 -07001446 RIL_CELL_INFO_TYPE_WCDMA = 4,
Etan Cohend3652192014-06-20 08:28:44 -07001447 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
Wink Saville8a9e0212013-04-09 12:11:38 -07001448} RIL_CellInfoType;
1449
1450// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1451typedef enum {
1452 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1453 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1454 RIL_TIMESTAMP_TYPE_MODEM = 2,
1455 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1456 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1457} RIL_TimeStampType;
1458
1459typedef struct {
1460 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1461 int registered; /* !0 if this cell is registered 0 if not registered */
1462 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1463 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1464 union {
1465 RIL_CellInfoGsm gsm;
1466 RIL_CellInfoCdma cdma;
1467 RIL_CellInfoLte lte;
Wink Savillec57b3eb2013-04-17 12:51:41 -07001468 RIL_CellInfoWcdma wcdma;
Etan Cohend3652192014-06-20 08:28:44 -07001469 RIL_CellInfoTdscdma tdscdma;
Wink Saville8a9e0212013-04-09 12:11:38 -07001470 } CellInfo;
1471} RIL_CellInfo;
1472
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001473typedef struct {
1474 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1475 int registered; /* !0 if this cell is registered 0 if not registered */
1476 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1477 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1478 union {
1479 RIL_CellInfoGsm_v12 gsm;
1480 RIL_CellInfoCdma cdma;
1481 RIL_CellInfoLte_v12 lte;
1482 RIL_CellInfoWcdma_v12 wcdma;
1483 RIL_CellInfoTdscdma tdscdma;
1484 } CellInfo;
1485} RIL_CellInfo_v12;
1486
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -08001487typedef struct {
1488 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1489 union {
1490 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1491 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1492 RIL_CellIdentityLte_v12 cellIdentityLte;
1493 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1494 RIL_CellIdentityCdma cellIdentityCdma;
1495 };
1496}RIL_CellIdentity_v16;
1497
1498typedef struct {
1499 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
1500 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
1501 // UNKNOWN, REG_ROAMING defined in RegState
1502 RIL_RadioTechnology rat; // indicates the available voice radio technology,
1503 // valid values as defined by RadioTechnology.
1504 int32_t cssSupported; // concurrent services support indicator. if
1505 // registered on a CDMA system.
1506 // 0 - Concurrent services not supported,
1507 // 1 - Concurrent services supported
1508 int32_t roamingIndicator; // TSB-58 Roaming Indicator if registered
1509 // on a CDMA or EVDO system or -1 if not.
1510 // Valid values are 0-255.
1511 int32_t systemIsInPrl; // indicates whether the current system is in the
1512 // PRL if registered on a CDMA or EVDO system or -1 if
1513 // not. 0=not in the PRL, 1=in the PRL
1514 int32_t defaultRoamingIndicator; // default Roaming Indicator from the PRL,
1515 // if registered on a CDMA or EVDO system or -1 if not.
1516 // Valid values are 0-255.
1517 int32_t reasonForDenial; // reasonForDenial if registration state is 3
1518 // (Registration denied) this is an enumerated reason why
1519 // registration was denied. See 3GPP TS 24.008,
1520 // 10.5.3.6 and Annex G.
1521 // 0 - General
1522 // 1 - Authentication Failure
1523 // 2 - IMSI unknown in HLR
1524 // 3 - Illegal MS
1525 // 4 - Illegal ME
1526 // 5 - PLMN not allowed
1527 // 6 - Location area not allowed
1528 // 7 - Roaming not allowed
1529 // 8 - No Suitable Cells in this Location Area
1530 // 9 - Network failure
1531 // 10 - Persistent location update reject
1532 // 11 - PLMN not allowed
1533 // 12 - Location area not allowed
1534 // 13 - Roaming not allowed in this Location Area
1535 // 15 - No Suitable Cells in this Location Area
1536 // 17 - Network Failure
1537 // 20 - MAC Failure
1538 // 21 - Sync Failure
1539 // 22 - Congestion
1540 // 23 - GSM Authentication unacceptable
1541 // 25 - Not Authorized for this CSG
1542 // 32 - Service option not supported
1543 // 33 - Requested service option not subscribed
1544 // 34 - Service option temporarily out of order
1545 // 38 - Call cannot be identified
1546 // 48-63 - Retry upon entry into a new cell
1547 // 95 - Semantically incorrect message
1548 // 96 - Invalid mandatory information
1549 // 97 - Message type non-existent or not implemented
1550 // 98 - Message type not compatible with protocol state
1551 // 99 - Information element non-existent or
1552 // not implemented
1553 // 100 - Conditional IE error
1554 // 101 - Message not compatible with protocol state;
1555 RIL_CellIdentity_v16 cellIdentity; // current cell information
1556}RIL_VoiceRegistrationStateResponse;
1557
1558
1559typedef struct {
1560 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
1561 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
1562 // UNKNOWN, REG_ROAMING defined in RegState
1563 RIL_RadioTechnology rat; // indicates the available data radio technology,
1564 // valid values as defined by RadioTechnology.
1565 int32_t reasonDataDenied; // if registration state is 3 (Registration
1566 // denied) this is an enumerated reason why
1567 // registration was denied. See 3GPP TS 24.008,
1568 // Annex G.6 "Additional cause codes for GMM".
1569 // 7 == GPRS services not allowed
1570 // 8 == GPRS services and non-GPRS services not allowed
1571 // 9 == MS identity cannot be derived by the network
1572 // 10 == Implicitly detached
1573 // 14 == GPRS services not allowed in this PLMN
1574 // 16 == MSC temporarily not reachable
1575 // 40 == No PDP context activated
1576 int32_t maxDataCalls; // The maximum number of simultaneous Data Calls that
1577 // must be established using setupDataCall().
1578 RIL_CellIdentity_v16 cellIdentity; // Current cell information
1579}RIL_DataRegistrationStateResponse;
1580
Wink Saville1b5fd232009-04-22 14:50:00 -07001581/* Names of the CDMA info records (C.S0005 section 3.7.5) */
1582typedef enum {
1583 RIL_CDMA_DISPLAY_INFO_REC,
1584 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1585 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1586 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1587 RIL_CDMA_SIGNAL_INFO_REC,
1588 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1589 RIL_CDMA_LINE_CONTROL_INFO_REC,
1590 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1591 RIL_CDMA_T53_CLIR_INFO_REC,
1592 RIL_CDMA_T53_RELEASE_INFO_REC,
1593 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1594} RIL_CDMA_InfoRecName;
1595
1596/* Display Info Rec as defined in C.S0005 section 3.7.5.1
1597 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1598 Note: the Extended Display info rec contains multiple records of the
1599 form: display_tag, display_len, and display_len occurrences of the
1600 chari field if the display_tag is not 10000000 or 10000001.
1601 To save space, the records are stored consecutively in a byte buffer.
1602 The display_tag, display_len and chari fields are all 1 byte.
1603*/
1604
1605typedef struct {
1606 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001607 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001608} RIL_CDMA_DisplayInfoRecord;
1609
1610/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1611 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1612 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1613*/
1614
1615typedef struct {
1616 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001617 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001618 char number_type;
1619 char number_plan;
1620 char pi;
1621 char si;
1622} RIL_CDMA_NumberInfoRecord;
1623
1624/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1625typedef enum {
1626 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1627 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1628 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1629 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1630 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1631 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1632 RIL_REDIRECTING_REASON_RESERVED
1633} RIL_CDMA_RedirectingReason;
1634
1635typedef struct {
1636 RIL_CDMA_NumberInfoRecord redirectingNumber;
1637 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1638 RIL_CDMA_RedirectingReason redirectingReason;
1639} RIL_CDMA_RedirectingNumberInfoRecord;
1640
1641/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1642typedef struct {
1643 char lineCtrlPolarityIncluded;
1644 char lineCtrlToggle;
1645 char lineCtrlReverse;
1646 char lineCtrlPowerDenial;
1647} RIL_CDMA_LineControlInfoRecord;
1648
1649/* T53 CLIR Information Record */
1650typedef struct {
1651 char cause;
1652} RIL_CDMA_T53_CLIRInfoRecord;
1653
1654/* T53 Audio Control Information Record */
1655typedef struct {
1656 char upLink;
1657 char downLink;
1658} RIL_CDMA_T53_AudioControlInfoRecord;
1659
1660typedef struct {
1661
1662 RIL_CDMA_InfoRecName name;
1663
1664 union {
1665 /* Display and Extended Display Info Rec */
1666 RIL_CDMA_DisplayInfoRecord display;
1667
1668 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1669 RIL_CDMA_NumberInfoRecord number;
1670
1671 /* Signal Info Rec */
1672 RIL_CDMA_SignalInfoRecord signal;
1673
1674 /* Redirecting Number Info Rec */
1675 RIL_CDMA_RedirectingNumberInfoRecord redir;
1676
1677 /* Line Control Info Rec */
1678 RIL_CDMA_LineControlInfoRecord lineCtrl;
1679
1680 /* T53 CLIR Info Rec */
1681 RIL_CDMA_T53_CLIRInfoRecord clir;
1682
1683 /* T53 Audio Control Info Rec */
1684 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1685 } rec;
1686} RIL_CDMA_InformationRecord;
1687
1688#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1689
1690typedef struct {
1691 char numberOfInfoRecs;
1692 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1693} RIL_CDMA_InformationRecords;
1694
Jake Hamby8a4a2332014-01-15 13:12:05 -08001695/* See RIL_REQUEST_NV_READ_ITEM */
1696typedef struct {
1697 RIL_NV_Item itemID;
1698} RIL_NV_ReadItem;
1699
1700/* See RIL_REQUEST_NV_WRITE_ITEM */
1701typedef struct {
1702 RIL_NV_Item itemID;
1703 char * value;
1704} RIL_NV_WriteItem;
1705
Etan Cohend3652192014-06-20 08:28:44 -07001706typedef enum {
1707 HANDOVER_STARTED = 0,
1708 HANDOVER_COMPLETED = 1,
1709 HANDOVER_FAILED = 2,
1710 HANDOVER_CANCELED = 3
1711} RIL_SrvccState;
1712
1713/* hardware configuration reported to RILJ. */
1714typedef enum {
1715 RIL_HARDWARE_CONFIG_MODEM = 0,
1716 RIL_HARDWARE_CONFIG_SIM = 1,
1717} RIL_HardwareConfig_Type;
1718
1719typedef enum {
1720 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1721 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1722 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1723} RIL_HardwareConfig_State;
1724
1725typedef struct {
1726 int rilModel;
1727 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1728 int maxVoice;
1729 int maxData;
1730 int maxStandby;
1731} RIL_HardwareConfig_Modem;
1732
1733typedef struct {
Wink Saville8b4e4f72014-10-17 15:01:45 -07001734 char modemUuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001735} RIL_HardwareConfig_Sim;
1736
1737typedef struct {
1738 RIL_HardwareConfig_Type type;
Wink Saville8b4e4f72014-10-17 15:01:45 -07001739 char uuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001740 RIL_HardwareConfig_State state;
1741 union {
1742 RIL_HardwareConfig_Modem modem;
1743 RIL_HardwareConfig_Sim sim;
1744 } cfg;
1745} RIL_HardwareConfig;
1746
Amit Mahajan54563d32014-11-22 00:54:49 +00001747typedef enum {
1748 SS_CFU,
1749 SS_CF_BUSY,
1750 SS_CF_NO_REPLY,
1751 SS_CF_NOT_REACHABLE,
1752 SS_CF_ALL,
1753 SS_CF_ALL_CONDITIONAL,
1754 SS_CLIP,
1755 SS_CLIR,
1756 SS_COLP,
1757 SS_COLR,
1758 SS_WAIT,
1759 SS_BAOC,
1760 SS_BAOIC,
1761 SS_BAOIC_EXC_HOME,
1762 SS_BAIC,
1763 SS_BAIC_ROAMING,
1764 SS_ALL_BARRING,
1765 SS_OUTGOING_BARRING,
1766 SS_INCOMING_BARRING
1767} RIL_SsServiceType;
1768
1769typedef enum {
1770 SS_ACTIVATION,
1771 SS_DEACTIVATION,
1772 SS_INTERROGATION,
1773 SS_REGISTRATION,
1774 SS_ERASURE
1775} RIL_SsRequestType;
1776
1777typedef enum {
1778 SS_ALL_TELE_AND_BEARER_SERVICES,
1779 SS_ALL_TELESEVICES,
1780 SS_TELEPHONY,
1781 SS_ALL_DATA_TELESERVICES,
1782 SS_SMS_SERVICES,
1783 SS_ALL_TELESERVICES_EXCEPT_SMS
1784} RIL_SsTeleserviceType;
1785
1786#define SS_INFO_MAX 4
1787#define NUM_SERVICE_CLASSES 7
1788
1789typedef struct {
1790 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1791 For example if voice is forwarded to one number and data
1792 is forwarded to a different one then numValidIndexes will be
1793 2 indicating total number of valid values in cfInfo.
1794 Similarly if all the services are forwarded to the same
1795 number then the value of numValidIndexes will be 1. */
1796
1797 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1798 for SS request to query call
1799 forward status. see
1800 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1801} RIL_CfData;
1802
1803typedef struct {
1804 RIL_SsServiceType serviceType;
1805 RIL_SsRequestType requestType;
1806 RIL_SsTeleserviceType teleserviceType;
1807 int serviceClass;
1808 RIL_Errno result;
1809
1810 union {
1811 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1812 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1813 two ints, so first two values of ssInfo[] will be
1814 used for response if serviceType is SS_CLIR and
1815 requestType is SS_INTERROGATION */
1816
1817 RIL_CfData cfData;
1818 };
1819} RIL_StkCcUnsolSsResponse;
1820
Wink Saville7f856802009-06-09 10:23:37 -07001821/**
Wink Savillec29360a2014-07-13 05:17:28 -07001822 * Data connection power state
1823 */
1824typedef enum {
1825 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1826 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1827 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1828 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1829} RIL_DcPowerStates;
1830
1831/**
1832 * Data connection real time info
1833 */
1834typedef struct {
1835 uint64_t time; // Time in nanos as returned by ril_nano_time
1836 RIL_DcPowerStates powerState; // Current power state
1837} RIL_DcRtInfo;
1838
Amit Mahajanc796e222014-08-13 16:54:01 +00001839/**
1840 * Data profile to modem
1841 */
1842typedef struct {
1843 /* id of the data profile */
1844 int profileId;
1845 /* the APN to connect to */
1846 char* apn;
1847 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1848 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1849 */
1850 char* protocol;
1851 /** authentication protocol used for this PDP context
1852 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1853 */
1854 int authType;
1855 /* the username for APN, or NULL */
1856 char* user;
1857 /* the password for APN, or NULL */
1858 char* password;
1859 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1860 int type;
1861 /* the period in seconds to limit the maximum connections */
1862 int maxConnsTime;
1863 /* the maximum connections during maxConnsTime */
1864 int maxConns;
1865 /** the required wait time in seconds after a successful UE initiated
1866 * disconnect of a given PDN connection before the device can send
1867 * a new PDN connection request for that given PDN
1868 */
1869 int waitTime;
1870 /* true to enable the profile, 0 to disable, 1 to enable */
1871 int enabled;
1872} RIL_DataProfileInfo;
Wink Savillec29360a2014-07-13 05:17:28 -07001873
Jack Yu06181bb2017-01-10 12:10:41 -08001874typedef struct {
1875 /* id of the data profile */
1876 int profileId;
1877 /* the APN to connect to */
1878 char* apn;
1879 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1880 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1881 */
1882 char* protocol;
1883 /** one of the PDP_type values in TS 27.007 section 10.1.1 used on roaming network.
1884 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1885 */
1886 char *roamingProtocol;
1887 /** authentication protocol used for this PDP context
1888 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1889 */
1890 int authType;
1891 /* the username for APN, or NULL */
1892 char* user;
1893 /* the password for APN, or NULL */
1894 char* password;
1895 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1896 int type;
1897 /* the period in seconds to limit the maximum connections */
1898 int maxConnsTime;
1899 /* the maximum connections during maxConnsTime */
1900 int maxConns;
1901 /** the required wait time in seconds after a successful UE initiated
1902 * disconnect of a given PDN connection before the device can send
1903 * a new PDN connection request for that given PDN
1904 */
1905 int waitTime;
1906 /* true to enable the profile, 0 to disable, 1 to enable */
1907 int enabled;
1908 /* supported APN types bitmask. See RIL_ApnTypes for the value of each bit. */
1909 int supportedTypesBitmask;
1910 /** the bearer bitmask. See RIL_RadioAccessFamily for the value of each bit. */
1911 int bearerBitmask;
1912 /** maximum transmission unit (MTU) size in bytes */
1913 int mtu;
1914 /** the MVNO type: possible values are "imsi", "gid", "spn" */
1915 char *mvnoType;
1916 /** MVNO match data. Can be anything defined by the carrier. For example,
1917 * SPN like: "A MOBILE", "BEN NL", etc...
1918 * IMSI like: "302720x94", "2060188", etc...
1919 * GID like: "4E", "33", etc...
1920 */
1921 char *mvnoMatchData;
1922} RIL_DataProfileInfo_v15;
1923
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001924/* Tx Power Levels */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001925#define RIL_NUM_TX_POWER_LEVELS 5
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001926
Nathan Haroldc8635212016-10-10 11:15:21 -07001927/**
1928 * Aggregate modem activity information
1929 */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001930typedef struct {
1931
Nathan Haroldc8635212016-10-10 11:15:21 -07001932 /* total time (in ms) when modem is in a low power or
1933 * sleep state
1934 */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001935 uint32_t sleep_mode_time_ms;
1936
Nathan Haroldc8635212016-10-10 11:15:21 -07001937 /* total time (in ms) when modem is awake but neither
1938 * the transmitter nor receiver are active/awake */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001939 uint32_t idle_mode_time_ms;
1940
Nathan Haroldc8635212016-10-10 11:15:21 -07001941 /* total time (in ms) during which the transmitter is active/awake,
1942 * subdivided by manufacturer-defined device-specific
1943 * contiguous increasing ranges of transmit power between
1944 * 0 and the transmitter's maximum transmit power.
1945 */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001946 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001947
Nathan Haroldc8635212016-10-10 11:15:21 -07001948 /* total time (in ms) for which receiver is active/awake and
1949 * the transmitter is inactive */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001950 uint32_t rx_mode_time_ms;
1951} RIL_ActivityStatsInfo;
1952
Jack Yu06181bb2017-01-10 12:10:41 -08001953typedef enum {
1954 RIL_APN_TYPE_UNKNOWN = 0x0, // Unknown
1955 RIL_APN_TYPE_DEFAULT = 0x1, // APN type for default data traffic
1956 RIL_APN_TYPE_MMS = 0x2, // APN type for MMS traffic
1957 RIL_APN_TYPE_SUPL = 0x4, // APN type for SUPL assisted GPS
1958 RIL_APN_TYPE_DUN = 0x8, // APN type for DUN traffic
1959 RIL_APN_TYPE_HIPRI = 0x10, // APN type for HiPri traffic
1960 RIL_APN_TYPE_FOTA = 0x20, // APN type for FOTA
1961 RIL_APN_TYPE_IMS = 0x40, // APN type for IMS
1962 RIL_APN_TYPE_CBS = 0x80, // APN type for CBS
1963 RIL_APN_TYPE_IA = 0x100, // APN type for IA Initial Attach APN
1964 RIL_APN_TYPE_EMERGENCY = 0x200, // APN type for Emergency PDN. This is not an IA apn,
1965 // but is used for access to carrier services in an
1966 // emergency call situation.
1967 RIL_APN_TYPE_ALL = 0xFFFFFFFF // All APN types
1968} RIL_ApnTypes;
1969
1970typedef enum {
1971 RIL_DST_POWER_SAVE_MODE, // Device power save mode (provided by PowerManager)
1972 // Non-zero value indicates the device is in power save mode.
1973 RIL_DST_CHARGING_STATE, // Device charging state (provided by BatteryManager)
1974 // Non-zero value indicates the device is charging.
1975 RIL_DST_LOW_DATA_EXPECTED // Low data expected mode. Non-zero value indicates low data
1976 // traffic is expected, for example, when the device is idle
1977 // (e.g. not doing tethering in the background). Note
1978 // this doesn't mean no data is expected.
1979} RIL_DeviceStateType;
1980
1981typedef enum {
1982 RIL_UR_SIGNAL_STRENGTH = 0x01, // When this bit is set, modem should always send the
1983 // signal strength update through
1984 // RIL_UNSOL_SIGNAL_STRENGTH, otherwise suppress it.
1985 RIL_UR_FULL_NETWORK_STATE = 0x02, // When this bit is set, modem should always send
1986 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
1987 // when any field in
1988 // RIL_REQUEST_VOICE_REGISTRATION_STATE or
1989 // RIL_REQUEST_DATA_REGISTRATION_STATE changes. When
1990 // this bit is not set, modem should suppress
1991 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
1992 // only when insignificant fields change
1993 // (e.g. cell info).
1994 // Modem should continue sending
1995 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
1996 // when significant fields are updated even when this
1997 // bit is not set. The following fields are
1998 // considered significant, registration state and
1999 // radio technology.
2000 RIL_UR_DATA_CALL_DORMANCY_CHANGED = 0x04 // When this bit is set, modem should send the data
2001 // call list changed unsolicited response
2002 // RIL_UNSOL_DATA_CALL_LIST_CHANGED whenever any
2003 // field in RIL_Data_Call_Response changes.
2004 // Otherwise modem should suppress the unsolicited
2005 // response when the only changed field is 'active'
2006 // (for data dormancy). For all other fields change,
2007 // modem should continue sending
2008 // RIL_UNSOL_DATA_CALL_LIST_CHANGED regardless this
2009 // bit is set or not.
2010} RIL_UnsolicitedResponseFilter;
2011
Wileen Chiu410b7562015-11-23 14:25:22 -08002012typedef struct {
2013 char * aidPtr; /* AID value, See ETSI 102.221 and 101.220*/
2014 int p2; /* P2 parameter (described in ISO 7816-4)
2015 P2Constants:NO_P2 if to be ignored */
2016} RIL_OpenChannelParams;
2017
Wink Savillec29360a2014-07-13 05:17:28 -07002018/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002019 * RIL_REQUEST_GET_SIM_STATUS
2020 *
2021 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -07002022 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002023 * "data" is NULL
2024 *
Wink Savillefd729372011-02-22 16:19:39 -08002025 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002026 *
2027 * Valid errors:
2028 * Must never fail
2029 */
2030#define RIL_REQUEST_GET_SIM_STATUS 1
2031
2032/**
2033 * RIL_REQUEST_ENTER_SIM_PIN
2034 *
John Wang309ac292009-07-30 14:53:23 -07002035 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002036 *
2037 * "data" is const char **
2038 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08002039 * ((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 -08002040 *
jsh593c9102009-06-24 16:13:44 -07002041 * "response" is int *
2042 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002043 *
2044 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002045 *
2046 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002047 * RADIO_NOT_AVAILABLE (radio resetting)
2048 * GENERIC_FAILURE
2049 * PASSWORD_INCORRECT
2050 */
2051
2052#define RIL_REQUEST_ENTER_SIM_PIN 2
2053
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002054/**
2055 * RIL_REQUEST_ENTER_SIM_PUK
2056 *
Wink Saville7f856802009-06-09 10:23:37 -07002057 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002058 *
2059 * "data" is const char **
2060 * ((const char **)data)[0] is PUK value
2061 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08002062 * ((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 -08002063 *
jsh593c9102009-06-24 16:13:44 -07002064 * "response" is int *
2065 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002066 *
2067 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002068 *
2069 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002070 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002071 * PASSWORD_INCORRECT
2072 * (PUK is invalid)
2073 */
2074
2075#define RIL_REQUEST_ENTER_SIM_PUK 3
2076
2077/**
2078 * RIL_REQUEST_ENTER_SIM_PIN2
2079 *
2080 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
2081 * returned as a a failure from a previous operation.
2082 *
2083 * "data" is const char **
2084 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08002085 * ((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 -08002086 *
jsh593c9102009-06-24 16:13:44 -07002087 * "response" is int *
2088 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002089 *
2090 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002091 *
2092 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002093 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002094 * PASSWORD_INCORRECT
2095 */
2096
2097#define RIL_REQUEST_ENTER_SIM_PIN2 4
2098
2099/**
2100 * RIL_REQUEST_ENTER_SIM_PUK2
2101 *
Wink Saville7f856802009-06-09 10:23:37 -07002102 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002103 *
2104 * "data" is const char **
2105 * ((const char **)data)[0] is PUK2 value
2106 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08002107 * ((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 -08002108 *
jsh593c9102009-06-24 16:13:44 -07002109 * "response" is int *
2110 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002111 *
2112 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002113 *
2114 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002115 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002116 * PASSWORD_INCORRECT
2117 * (PUK2 is invalid)
2118 */
2119
2120#define RIL_REQUEST_ENTER_SIM_PUK2 5
2121
2122/**
2123 * RIL_REQUEST_CHANGE_SIM_PIN
2124 *
Wink Saville7f856802009-06-09 10:23:37 -07002125 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002126 *
2127 * "data" is const char **
2128 * ((const char **)data)[0] is old PIN value
2129 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08002130 * ((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 -08002131 *
jsh593c9102009-06-24 16:13:44 -07002132 * "response" is int *
2133 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002134 *
2135 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002136 *
2137 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002138 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002139 * PASSWORD_INCORRECT
2140 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07002141 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002142 */
2143
2144#define RIL_REQUEST_CHANGE_SIM_PIN 6
2145
2146
2147/**
2148 * RIL_REQUEST_CHANGE_SIM_PIN2
2149 *
Wink Saville7f856802009-06-09 10:23:37 -07002150 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002151 *
2152 * "data" is const char **
2153 * ((const char **)data)[0] is old PIN2 value
2154 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08002155 * ((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 -08002156 *
jsh593c9102009-06-24 16:13:44 -07002157 * "response" is int *
2158 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002159 *
2160 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002161 *
2162 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002163 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002164 * PASSWORD_INCORRECT
2165 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07002166 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002167 */
2168
2169#define RIL_REQUEST_CHANGE_SIM_PIN2 7
2170
2171/**
2172 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
2173 *
2174 * Requests that network personlization be deactivated
2175 *
2176 * "data" is const char **
2177 * ((const char **)(data))[0]] is network depersonlization code
2178 *
jsh593c9102009-06-24 16:13:44 -07002179 * "response" is int *
2180 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002181 *
2182 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002183 *
2184 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002185 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002186 * PASSWORD_INCORRECT
2187 * (code is invalid)
2188 */
2189
2190#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
2191
2192/**
Wink Saville7f856802009-06-09 10:23:37 -07002193 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002194 *
2195 * Requests current call list
2196 *
2197 * "data" is NULL
2198 *
2199 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07002200 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002201 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002202 *
2203 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002204 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002205 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002206 * (request will be made again in a few hundred msec)
2207 */
2208
2209#define RIL_REQUEST_GET_CURRENT_CALLS 9
2210
2211
Wink Saville7f856802009-06-09 10:23:37 -07002212/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002213 * RIL_REQUEST_DIAL
2214 *
2215 * Initiate voice call
2216 *
2217 * "data" is const RIL_Dial *
2218 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002219 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002220 * This method is never used for supplementary service codes
2221 *
2222 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002223 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002224 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00002225 * DIAL_MODIFIED_TO_USSD
2226 * DIAL_MODIFIED_TO_SS
2227 * DIAL_MODIFIED_TO_DIAL
Ajay Nambi10345892016-03-19 09:02:28 -07002228 * INVALID_ARGUMENTS
2229 * NO_MEMORY
2230 * INVALID_STATE
2231 * NO_RESOURCES
2232 * INTERNAL_ERR
2233 * FDN_CHECK_FAILURE
2234 * MODEM_ERR
2235 * NO_SUBSCRIPTION
2236 * NO_NETWORK_FOUND
2237 * INVALID_CALL_ID
2238 * DEVICE_IN_USE
2239 * MODE_NOT_SUPPORTED
2240 * ABORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002241 */
2242#define RIL_REQUEST_DIAL 10
2243
2244/**
2245 * RIL_REQUEST_GET_IMSI
2246 *
2247 * Get the SIM IMSI
2248 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08002249 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002250 *
Wink Savillec0114b32011-02-18 10:14:07 -08002251 * "data" is const char **
2252 * ((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 -08002253 * "response" is a const char * containing the IMSI
2254 *
2255 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002256 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002257 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002258 */
2259
2260#define RIL_REQUEST_GET_IMSI 11
2261
2262/**
2263 * RIL_REQUEST_HANGUP
2264 *
2265 * Hang up a specific line (like AT+CHLD=1x)
2266 *
John Wang06bae4b2010-11-18 16:37:09 -08002267 * After this HANGUP request returns, RIL should show the connection is NOT
2268 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2269 *
Wink Saville7f856802009-06-09 10:23:37 -07002270 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002271 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002272 *
2273 * "response" is NULL
2274 *
2275 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002276 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002277 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002278 * INVALID_ARGUMENTS
2279 * NO_MEMORY
2280 * INVALID_STATE
2281 * MODEM_ERR
2282 * INTERNAL_ERR
2283 * NO_MEMORY
2284 * INVALID_CALL_ID
2285 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002286 */
2287
2288#define RIL_REQUEST_HANGUP 12
2289
2290/**
2291 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
2292 *
2293 * Hang up waiting or held (like AT+CHLD=0)
2294 *
John Wang06bae4b2010-11-18 16:37:09 -08002295 * After this HANGUP request returns, RIL should show the connection is NOT
2296 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2297 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002298 * "data" is NULL
2299 * "response" is NULL
2300 *
2301 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002302 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002303 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002304 * INVALID_STATE
2305 * NO_MEMORY
2306 * MODEM_ERR
2307 * INTERNAL_ERR
2308 * NO_MEMORY
2309 * INVALID_CALL_ID
2310 * NO_RESOURCES
2311 * OPERATION_NOT_ALLOWED
2312 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002313 */
2314
2315#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
2316
2317/**
2318 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
2319 *
2320 * Hang up waiting or held (like AT+CHLD=1)
2321 *
John Wang06bae4b2010-11-18 16:37:09 -08002322 * After this HANGUP request returns, RIL should show the connection is NOT
2323 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2324 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002325 * "data" is NULL
2326 * "response" is NULL
2327 *
2328 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002329 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002330 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002331 * INVALID_STATE
2332 * NO_MEMORY
2333 * MODEM_ERR
2334 * INTERNAL_ERR
2335 * INVALID_CALL_ID
2336 * OPERATION_NOT_ALLOWED
2337 * INVALID_ARGUMENTS
2338 * NO_RESOURCES
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002339 */
2340
2341#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
2342
2343/**
2344 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
2345 *
2346 * Switch waiting or holding call and active call (like AT+CHLD=2)
2347 *
2348 * State transitions should be is follows:
2349 *
2350 * If call 1 is waiting and call 2 is active, then if this re
2351 *
2352 * BEFORE AFTER
2353 * Call 1 Call 2 Call 1 Call 2
2354 * ACTIVE HOLDING HOLDING ACTIVE
2355 * ACTIVE WAITING HOLDING ACTIVE
2356 * HOLDING WAITING HOLDING ACTIVE
2357 * ACTIVE IDLE HOLDING IDLE
2358 * IDLE IDLE IDLE IDLE
2359 *
2360 * "data" is NULL
2361 * "response" is NULL
2362 *
2363 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002364 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002365 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002366 * INVALID_STATE
2367 * NO_MEMORY
2368 * MODEM_ERR
2369 * INTERNAL_ERR
2370 * INVALID_STATE
2371 * INVALID_ARGUMENTS
2372 * INVALID_CALL_ID
2373 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002374 */
2375
2376#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
2377#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
2378
2379/**
2380 * RIL_REQUEST_CONFERENCE
2381 *
2382 * Conference holding and active (like AT+CHLD=3)
2383
2384 * "data" is NULL
2385 * "response" is NULL
2386 *
2387 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002388 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002389 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002390 * NO_MEMORY
2391 * MODEM_ERR
2392 * INTERNAL_ERR
2393 * INVALID_STATE
2394 * INVALID_CALL_ID
2395 * INVALID_ARGUMENTS
2396 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002397 */
2398#define RIL_REQUEST_CONFERENCE 16
2399
2400/**
2401 * RIL_REQUEST_UDUB
2402 *
Wink Saville7f856802009-06-09 10:23:37 -07002403 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002404 * waiting call answer)(RIL_BasicRequest r);
2405 *
2406 * "data" is NULL
2407 * "response" is NULL
2408 *
2409 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002410 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002411 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002412 * INVALID_STATE
2413 * NO_RESOURCES
2414 * NO_MEMORY
2415 * MODEM_ERR
2416 * INTERNAL_ERR
2417 * INVALID_CALL_ID
2418 * OPERATION_NOT_ALLOWED
2419 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002420 */
2421#define RIL_REQUEST_UDUB 17
2422
2423/**
2424 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2425 *
2426 * Requests the failure cause code for the most recently terminated call
2427 *
2428 * "data" is NULL
Jayachandran Ccc2a2022017-03-07 09:55:58 -08002429 * "response" is a const RIL_LastCallFailCauseInfo *
2430 * RIL_LastCallFailCauseInfo contains LastCallFailCause and vendor cause.
2431 * The vendor cause code must be used for debugging purpose only.
2432 * The implementation must return one of the values of LastCallFailCause
2433 * as mentioned below.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002434 *
Jayachandran Ccc2a2022017-03-07 09:55:58 -08002435 * GSM failure reasons codes for the cause codes defined in TS 24.008 Annex H
2436 * where possible.
2437 * CDMA failure reasons codes for the possible call failure scenarios
2438 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
2439 * Any of the following reason codes if the call is failed or dropped due to reason
2440 * mentioned with in the braces.
2441 *
2442 * CALL_FAIL_RADIO_OFF (Radio is OFF)
2443 * CALL_FAIL_OUT_OF_SERVICE (No cell coverage)
2444 * CALL_FAIL_NO_VALID_SIM (No valid SIM)
2445 * CALL_FAIL_RADIO_INTERNAL_ERROR (Modem hit unexpected error scenario)
2446 * CALL_FAIL_NETWORK_RESP_TIMEOUT (No response from network)
2447 * CALL_FAIL_NETWORK_REJECT (Explicit network reject)
2448 * CALL_FAIL_RADIO_ACCESS_FAILURE (RRC connection failure. Eg.RACH)
2449 * CALL_FAIL_RADIO_LINK_FAILURE (Radio Link Failure)
2450 * CALL_FAIL_RADIO_LINK_LOST (Radio link lost due to poor coverage)
2451 * CALL_FAIL_RADIO_UPLINK_FAILURE (Radio uplink failure)
2452 * CALL_FAIL_RADIO_SETUP_FAILURE (RRC connection setup failure)
2453 * CALL_FAIL_RADIO_RELEASE_NORMAL (RRC connection release, normal)
2454 * CALL_FAIL_RADIO_RELEASE_ABNORMAL (RRC connection release, abnormal)
2455 * CALL_FAIL_ACCESS_CLASS_BLOCKED (Access class barring)
2456 * CALL_FAIL_NETWORK_DETACH (Explicit network detach)
2457 *
2458 * OEM causes (CALL_FAIL_OEM_CAUSE_XX) must be used for debug purpose only
The Android Open Source Project34a51082009-03-05 14:34:37 -08002459 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002460 * If the implementation does not have access to the exact cause codes,
2461 * then it should return one of the values listed in RIL_LastCallFailCause,
2462 * as the UI layer needs to distinguish these cases for tone generation or
2463 * error notification.
2464 *
2465 * Valid errors:
2466 * SUCCESS
2467 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002468 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002469 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002470 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002471 */
2472#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
2473
2474/**
2475 * RIL_REQUEST_SIGNAL_STRENGTH
2476 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002477 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002478 *
2479 * Must succeed if radio is on.
2480 *
2481 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07002482 *
2483 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002484 *
2485 * Valid errors:
2486 * SUCCESS
2487 * RADIO_NOT_AVAILABLE
2488 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002489#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07002490
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002491/**
Wink Savillec0114b32011-02-18 10:14:07 -08002492 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002493 *
2494 * Request current registration state
2495 *
2496 * "data" is NULL
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -08002497 * "response" is a const RIL_VoiceRegistrationStateResponse *
Wink Saville1b5fd232009-04-22 14:50:00 -07002498 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002499 * Valid errors:
2500 * SUCCESS
2501 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002502 */
Wink Savillec0114b32011-02-18 10:14:07 -08002503#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002504
2505/**
Wink Savillec0114b32011-02-18 10:14:07 -08002506 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002507 *
Wink Savillec0114b32011-02-18 10:14:07 -08002508 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002509 *
2510 * "data" is NULL
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -08002511 * "response" is a const RIL_DataRegistrationStateResponse *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002512 *
2513 * Valid errors:
2514 * SUCCESS
2515 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002516 */
Wink Savillec0114b32011-02-18 10:14:07 -08002517#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002518
2519/**
2520 * RIL_REQUEST_OPERATOR
2521 *
2522 * Request current operator ONS or EONS
2523 *
2524 * "data" is NULL
2525 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07002526 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002527 * or NULL if unregistered
2528 *
Wink Saville7f856802009-06-09 10:23:37 -07002529 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002530 * or NULL if unregistered
2531 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2532 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07002533 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002534 * Valid errors:
2535 * SUCCESS
2536 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002537 */
2538#define RIL_REQUEST_OPERATOR 22
2539
2540/**
2541 * RIL_REQUEST_RADIO_POWER
2542 *
2543 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07002544 * If the radio is is turned off/on the radio modem subsystem
2545 * is expected return to an initialized state. For instance,
2546 * any voice and data calls will be terminated and all associated
2547 * lists emptied.
2548 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002549 * "data" is int *
2550 * ((int *)data)[0] is > 0 for "Radio On"
2551 * ((int *)data)[0] is == 0 for "Radio Off"
2552 *
2553 * "response" is NULL
2554 *
2555 * Turn radio on if "on" > 0
2556 * Turn radio off if "on" == 0
2557 *
2558 * Valid errors:
2559 * SUCCESS
2560 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002561 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002562 */
2563#define RIL_REQUEST_RADIO_POWER 23
2564
2565/**
2566 * RIL_REQUEST_DTMF
2567 *
2568 * Send a DTMF tone
2569 *
2570 * If the implementation is currently playing a tone requested via
2571 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2572 * should be played instead
2573 *
jsh602f80f2009-07-10 15:44:37 -07002574 * "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 -08002575 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002576 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002577 * FIXME should this block/mute microphone?
2578 * How does this interact with local DTMF feedback?
2579 *
2580 * Valid errors:
2581 * SUCCESS
2582 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002583 * INVALID_ARGUMENTS
2584 * NO_RESOURCES
2585 * NO_MEMORY
2586 * MODEM_ERR
2587 * INTERNAL_ERR
2588 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002589 *
2590 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2591 *
2592 */
2593#define RIL_REQUEST_DTMF 24
2594
2595/**
2596 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07002597 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002598 * Send an SMS message
2599 *
2600 * "data" is const char **
2601 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2602 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2603 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2604 * less the SMSC address
2605 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2606 *
2607 * "response" is a const RIL_SMS_Response *
2608 *
2609 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002610 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002611 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2612 *
2613 * Valid errors:
2614 * SUCCESS
2615 * RADIO_NOT_AVAILABLE
2616 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07002617 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08002618 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002619 * INVALID_STATE
2620 * INVALID_ARGUMENTS
2621 * NO_MEMORY
2622 * REQUEST_RATE_LIMITED
2623 * INVALID_SMS_FORMAT
2624 * SYSTEM_ERR
2625 * ENCODING_ERR
2626 * INVALID_SMSC_ADDRESS
2627 * MODEM_ERR
2628 * NETWORK_ERR
2629 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002630 *
2631 * FIXME how do we specify TP-Message-Reference if we need to resend?
2632 */
2633#define RIL_REQUEST_SEND_SMS 25
2634
2635
2636/**
2637 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07002638 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002639 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2640 * except that more messages are expected to be sent soon. If possible,
2641 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2642 *
2643 * "data" is const char **
2644 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2645 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2646 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2647 * less the SMSC address
2648 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2649 *
2650 * "response" is a const RIL_SMS_Response *
2651 *
2652 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002653 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002654 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2655 *
2656 * Valid errors:
2657 * SUCCESS
2658 * RADIO_NOT_AVAILABLE
2659 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08002660 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002661 * INVALID_STATE
2662 * INVALID_ARGUMENTS
2663 * NO_MEMORY
2664 * INVALID_SMS_FORMAT
2665 * SYSTEM_ERR
2666 * REQUEST_RATE_LIMITED
2667 * FDN_CHECK_FAILURE
2668 * MODEM_ERR
2669 * NETWORK_ERR
2670 * ENCODING_ERR
2671 * INVALID_SMSC_ADDRESS
2672 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002673 *
2674 */
2675#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2676
2677
2678/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002679 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002680 *
Wink Saville29487ef2011-04-15 09:15:31 -07002681 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2682 * return success it is added to the list of data calls and a
2683 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2684 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2685 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2686 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002687 *
Wink Saville43808972011-01-13 17:39:51 -08002688 * The RIL is expected to:
2689 * - Create one data call context.
2690 * - Create and configure a dedicated interface for the context
2691 * - The interface must be point to point.
2692 * - The interface is configured with one or more addresses and
2693 * is capable of sending and receiving packets. The prefix length
2694 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2695 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08002696 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08002697 * number of simultaneous data call contexts.
2698 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002699 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08002700 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2701 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07002702 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07002703 * ((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 -07002704 * override the one in the profile. NULL indicates no APN overrride.
2705 * ((const char **)data)[3] is the username for APN, or NULL
2706 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07002707 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2708 * 0 => PAP and CHAP is never performed.
2709 * 1 => PAP may be performed; CHAP is never performed.
2710 * 2 => CHAP may be performed; PAP is never performed.
2711 * 3 => PAP / CHAP may be performed - baseband dependent.
Jack Yu06181bb2017-01-10 12:10:41 -08002712 * ((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 -08002713 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07002714 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Jack Yu06181bb2017-01-10 12:10:41 -08002715 * ((const char **)data)[7] is the roaming connection type to request. Must be one of the
2716 * PDP_type values in TS 27.007 section 10.1.1.
2717 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
2718 * ((const char **)data)[8] is the bitmask of APN type in decimal string format. The
2719 * bitmask will encapsulate the following values:
2720 * ia,mms,agps,supl,hipri,fota,dun,ims,default.
2721 * ((const char **)data)[9] is the bearer bitmask in decimal string format. Each bit is a
2722 * RIL_RadioAccessFamily. "0" or NULL indicates all RATs.
2723 * ((const char **)data)[10] is the boolean in string format indicating the APN setting was
2724 * sent to the modem through RIL_REQUEST_SET_DATA_PROFILE earlier.
2725 * ((const char **)data)[11] is the mtu size in bytes of the mobile interface to which
2726 * the apn is connected.
2727 * ((const char **)data)[12] is the MVNO type:
2728 * possible values are "imsi", "gid", "spn".
2729 * ((const char **)data)[13] is MVNO match data in string. Can be anything defined by the carrier.
2730 * For example,
2731 * SPN like: "A MOBILE", "BEN NL", etc...
2732 * IMSI like: "302720x94", "2060188", etc...
2733 * GID like: "4E", "33", etc...
2734 * ((const char **)data)[14] is the boolean string indicating data roaming is allowed or not. "1"
2735 * indicates data roaming is enabled by the user, "0" indicates disabled.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002736 *
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -07002737 * "response" is a RIL_Data_Call_Response_v11
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002738 *
2739 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07002740 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002741 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08002742 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08002743 * the RIL_Data_Call_Response_v6.status containing the actual status.
2744 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08002745 *
2746 * Other errors could include:
2747 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2748 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002749 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002750 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002751 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002752#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002753
2754
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002755/**
2756 * RIL_REQUEST_SIM_IO
2757 *
2758 * Request SIM I/O operation.
2759 * This is similar to the TS 27.007 "restricted SIM" operation
2760 * where it assumes all of the EF selection will be done by the
2761 * callee.
2762 *
Wink Savillefd729372011-02-22 16:19:39 -08002763 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002764 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2765 * or may specify a PIN2 for operations that require a PIN2 (eg
2766 * updating FDN records)
2767 *
2768 * "response" is a const RIL_SIM_IO_Response *
2769 *
2770 * Arguments and responses that are unused for certain
2771 * values of "command" should be ignored or set to NULL
2772 *
2773 * Valid errors:
2774 * SUCCESS
2775 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002776 * SIM_PIN2
2777 * SIM_PUK2
2778 */
2779#define RIL_REQUEST_SIM_IO 28
2780
2781/**
2782 * RIL_REQUEST_SEND_USSD
2783 *
2784 * Send a USSD message
2785 *
2786 * If a USSD session already exists, the message should be sent in the
2787 * context of that session. Otherwise, a new session should be created.
2788 *
2789 * The network reply should be reported via RIL_UNSOL_ON_USSD
2790 *
2791 * Only one USSD session may exist at a time, and the session is assumed
2792 * to exist until:
2793 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2794 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2795 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2796 *
2797 * "data" is a const char * containing the USSD request in UTF-8 format
2798 * "response" is NULL
2799 *
2800 * Valid errors:
2801 * SUCCESS
2802 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07002803 * FDN_CHECK_FAILURE
Amit Mahajan54563d32014-11-22 00:54:49 +00002804 * USSD_MODIFIED_TO_DIAL
2805 * USSD_MODIFIED_TO_SS
2806 * USSD_MODIFIED_TO_USSD
twen.changdf7add02016-03-04 18:27:48 +08002807 * SIM_BUSY
2808 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002809 * INVALID_ARGUMENTS
2810 * NO_MEMORY
2811 * MODEM_ERR
2812 * INTERNAL_ERR
2813 * ABORTED
2814 * SYSTEM_ERR
2815 * INVALID_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002816 *
2817 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2818 */
2819
2820#define RIL_REQUEST_SEND_USSD 29
2821
2822/**
2823 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07002824 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002825 * Cancel the current USSD session if one exists
2826 *
2827 * "data" is null
2828 * "response" is NULL
2829 *
2830 * Valid errors:
2831 * SUCCESS
2832 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002833 * SIM_BUSY
2834 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002835 * MODEM_ERR
2836 * INTERNAL_ERR
2837 * NO_MEMORY
2838 * INVALID_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002839 */
2840
2841#define RIL_REQUEST_CANCEL_USSD 30
2842
Wink Saville7f856802009-06-09 10:23:37 -07002843/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002844 * RIL_REQUEST_GET_CLIR
2845 *
2846 * Gets current CLIR status
2847 * "data" is NULL
2848 * "response" is int *
2849 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2850 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2851 *
2852 * Valid errors:
2853 * SUCCESS
2854 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002855 * SS_MODIFIED_TO_DIAL
2856 * SS_MODIFIED_TO_USSD
2857 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002858 * NO_MEMORY
2859 * MODEM_ERR
2860 * INTERNAL_ERR
2861 * FDN_CHECK_FAILURE
2862 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002863 */
2864#define RIL_REQUEST_GET_CLIR 31
2865
2866/**
2867 * RIL_REQUEST_SET_CLIR
2868 *
2869 * "data" is int *
2870 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2871 *
2872 * "response" is NULL
2873 *
2874 * Valid errors:
2875 * SUCCESS
2876 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002877 * SS_MODIFIED_TO_DIAL
2878 * SS_MODIFIED_TO_USSD
2879 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002880 * INVALID_ARGUMENTS
2881 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002882 */
2883#define RIL_REQUEST_SET_CLIR 32
2884
2885/**
2886 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2887 *
2888 * "data" is const RIL_CallForwardInfo *
2889 *
2890 * "response" is const RIL_CallForwardInfo **
2891 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2892 * each distinct registered phone number.
2893 *
2894 * For example, if data is forwarded to +18005551212 and voice is forwarded
2895 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07002896 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002897 * If, however, both data and voice are forwarded to +18005551212, then
2898 * a single RIL_CallForwardInfo can be returned with the service class
2899 * set to "data + voice = 3")
2900 *
2901 * Valid errors:
2902 * SUCCESS
2903 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002904 * SS_MODIFIED_TO_DIAL
2905 * SS_MODIFIED_TO_USSD
2906 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002907 * INVALID_ARGUMENTS
2908 * NO_MEMORY
2909 * SYSTEM_ERR
2910 * MODEM_ERR
2911 * INTERNAL_ERR
2912 * NO_MEMORY
2913 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002914 */
2915#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2916
2917
2918/**
2919 * RIL_REQUEST_SET_CALL_FORWARD
2920 *
2921 * Configure call forward rule
2922 *
2923 * "data" is const RIL_CallForwardInfo *
2924 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002925 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002926 * Valid errors:
2927 * SUCCESS
2928 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002929 * SS_MODIFIED_TO_DIAL
2930 * SS_MODIFIED_TO_USSD
2931 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002932 * INVALID_ARGUMENTS
2933 * NO_MEMORY
2934 * SYSTEM_ERR
2935 * MODEM_ERR
2936 * INTERNAL_ERR
2937 * INVALID_STATE
2938 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002939 */
2940#define RIL_REQUEST_SET_CALL_FORWARD 34
2941
2942
2943/**
2944 * RIL_REQUEST_QUERY_CALL_WAITING
2945 *
2946 * Query current call waiting state
2947 *
2948 * "data" is const int *
2949 * ((const int *)data)[0] is the TS 27.007 service class to query.
2950 * "response" is a const int *
2951 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2952 *
2953 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2954 * must follow, with the TS 27.007 service class bit vector of services
2955 * for which call waiting is enabled.
2956 *
Wink Saville7f856802009-06-09 10:23:37 -07002957 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002958 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2959 * and voice and disabled for everything else
2960 *
2961 * Valid errors:
2962 * SUCCESS
2963 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002964 * SS_MODIFIED_TO_DIAL
2965 * SS_MODIFIED_TO_USSD
2966 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002967 * NO_MEMORY
2968 * MODEM_ERR
2969 * INTERNAL_ERR
2970 * NO_MEMORY
2971 * FDN_CHECK_FAILURE
2972 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002973 */
2974#define RIL_REQUEST_QUERY_CALL_WAITING 35
2975
2976
2977/**
2978 * RIL_REQUEST_SET_CALL_WAITING
2979 *
2980 * Configure current call waiting state
2981 *
2982 * "data" is const int *
2983 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2984 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2985 * services to modify
2986 * "response" is NULL
2987 *
2988 * Valid errors:
2989 * SUCCESS
2990 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002991 * SS_MODIFIED_TO_DIAL
2992 * SS_MODIFIED_TO_USSD
2993 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002994 * INVALID_ARGUMENTS
2995 * NO_MEMORY
2996 * MODEM_ERR
2997 * INTERNAL_ERR
2998 * INVALID_STATE
2999 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003000 */
3001#define RIL_REQUEST_SET_CALL_WAITING 36
3002
3003/**
3004 * RIL_REQUEST_SMS_ACKNOWLEDGE
3005 *
3006 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07003007 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003008 *
3009 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07003010 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003011 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07003012 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003013 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07003014 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
3015 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
3016 * capacity exceeded) and 0xFF (unspecified error) are
3017 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003018 *
3019 * "response" is NULL
3020 *
3021 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
3022 *
3023 * Valid errors:
3024 * SUCCESS
3025 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003026 */
3027#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
3028
3029/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003030 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003031 *
3032 * Get the device IMEI, including check digit
3033 *
johnwangf8bc1672009-05-14 19:19:47 -07003034 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003035 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
3036 *
3037 * "data" is NULL
3038 * "response" is a const char * containing the IMEI
3039 *
3040 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003041 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003042 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003043 */
3044
3045#define RIL_REQUEST_GET_IMEI 38
3046
3047/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003048 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003049 *
3050 * Get the device IMEISV, which should be two decimal digits
3051 *
johnwangf8bc1672009-05-14 19:19:47 -07003052 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003053 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
3054 *
3055 * "data" is NULL
3056 * "response" is a const char * containing the IMEISV
3057 *
3058 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003059 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003060 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003061 */
3062
3063#define RIL_REQUEST_GET_IMEISV 39
3064
3065
3066/**
3067 * RIL_REQUEST_ANSWER
3068 *
3069 * Answer incoming call
3070 *
3071 * Will not be called for WAITING calls.
3072 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
3073 * instead
3074 *
3075 * "data" is NULL
3076 * "response" is NULL
3077 *
3078 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003079 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003080 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003081 * INVALID_STATE
3082 * NO_MEMORY
3083 * SYSTEM_ERR
3084 * MODEM_ERR
3085 * INTERNAL_ERR
3086 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003087 */
3088
3089#define RIL_REQUEST_ANSWER 40
3090
3091/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003092 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003093 *
Wink Saville29487ef2011-04-15 09:15:31 -07003094 * Deactivate packet data connection and remove from the
3095 * data call list if SUCCESS is returned. Any other return
3096 * values should also try to remove the call from the list,
3097 * but that may not be possible. In any event a
3098 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
3099 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
3100 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003101 *
3102 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07003103 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06003104 * ((char**)data)[1] indicating Disconnect Reason
3105 * 0 => No specific reason specified
3106 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07003107 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003108 * "response" is NULL
3109 *
3110 * Valid errors:
3111 * SUCCESS
3112 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003113 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003114 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003115 */
Wink Savillef4c4d362009-04-02 01:37:03 -07003116#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003117
3118/**
3119 * RIL_REQUEST_QUERY_FACILITY_LOCK
3120 *
3121 * Query the status of a facility lock state
3122 *
3123 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07003124 * ((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 -08003125 * (eg "AO" for BAOC, "SC" for SIM lock)
3126 * ((const char **)data)[1] is the password, or "" if not required
3127 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
3128 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08003129 * ((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 -08003130 * This is only applicable in the case of Fixed Dialing Numbers
3131 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003132 *
3133 * "response" is an int *
3134 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07003135 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003136 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07003137 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003138 *
3139 * Valid errors:
3140 * SUCCESS
3141 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003142 * SS_MODIFIED_TO_DIAL
3143 * SS_MODIFIED_TO_USSD
3144 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003145 * INVALID_ARGUMENTS
3146 * NO_MEMORY
3147 * INTERNAL_ERR
3148 * SYSTEM_ERR
3149 * MODEM_ERR
3150 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003151 *
3152 */
3153#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
3154
3155/**
3156 * RIL_REQUEST_SET_FACILITY_LOCK
3157 *
3158 * Enable/disable one facility lock
3159 *
3160 * "data" is const char **
3161 *
3162 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3163 * (eg "AO" for BAOC)
3164 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
3165 * ((const char **)data)[2] = password
3166 * ((const char **)data)[3] = string representation of decimal TS 27.007
3167 * service class bit vector. Eg, the string
3168 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08003169 * ((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 -08003170 * This is only applicable in the case of Fixed Dialing Numbers
3171 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003172 *
jsh593c9102009-06-24 16:13:44 -07003173 * "response" is int *
3174 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003175 *
3176 * Valid errors:
3177 * SUCCESS
3178 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003179 * SS_MODIFIED_TO_DIAL
3180 * SS_MODIFIED_TO_USSD
3181 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003182 * INVALID_ARGUMENTS
3183 * INTERNAL_ERR
3184 * NO_MEMORY
3185 * MODEM_ERR
3186 * INVALID_STATE
3187 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003188 *
3189 */
3190#define RIL_REQUEST_SET_FACILITY_LOCK 43
3191
3192/**
3193 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
3194 *
3195 * Change call barring facility password
3196 *
3197 * "data" is const char **
3198 *
3199 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3200 * (eg "AO" for BAOC)
3201 * ((const char **)data)[1] = old password
3202 * ((const char **)data)[2] = new password
3203 *
Wink Saville7f856802009-06-09 10:23:37 -07003204 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003205 *
3206 * Valid errors:
3207 * SUCCESS
3208 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003209 * SS_MODIFIED_TO_DIAL
3210 * SS_MODIFIED_TO_USSD
3211 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003212 * INVALID_ARGUMENTS
3213 * NO_MEMORY
3214 * MODEM_ERR
3215 * INTERNAL_ERR
3216 * SYSTEM_ERR
3217 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003218 *
3219 */
3220#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
3221
3222/**
3223 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
3224 *
3225 * Query current network selectin mode
3226 *
3227 * "data" is NULL
3228 *
3229 * "response" is int *
3230 * ((const int *)response)[0] is
3231 * 0 for automatic selection
3232 * 1 for manual selection
3233 *
3234 * Valid errors:
3235 * SUCCESS
3236 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003237 *
3238 */
3239#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
3240
3241/**
3242 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
3243 *
3244 * Specify that the network should be selected automatically
3245 *
3246 * "data" is NULL
3247 * "response" is NULL
3248 *
Wink Saville7f856802009-06-09 10:23:37 -07003249 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003250 * and registered
3251 *
3252 * Valid errors:
3253 * SUCCESS
3254 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003255 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003256 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003257 *
John Wang75534472010-04-20 15:11:42 -07003258 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3259 * no retries needed, such as illegal SIM or ME.
3260 * Returns GENERIC_FAILURE for all other causes that might be
3261 * fixed by retries.
3262 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003263 */
3264#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
3265
3266/**
3267 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
3268 *
3269 * Manually select a specified network.
3270 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003271 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
3272 * "response" is NULL
3273 *
Wink Saville7f856802009-06-09 10:23:37 -07003274 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003275 * and registered
3276 *
3277 * Valid errors:
3278 * SUCCESS
3279 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003280 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003281 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003282 *
John Wang75534472010-04-20 15:11:42 -07003283 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3284 * no retries needed, such as illegal SIM or ME.
3285 * Returns GENERIC_FAILURE for all other causes that might be
3286 * fixed by retries.
3287 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003288 */
3289#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
3290
3291/**
3292 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
3293 *
3294 * Scans for available networks
3295 *
3296 * "data" is NULL
3297 * "response" is const char ** that should be an array of n*4 strings, where
3298 * n is the number of available networks
3299 * For each available network:
3300 *
Wink Saville7f856802009-06-09 10:23:37 -07003301 * ((const char **)response)[n+0] is long alpha ONS or EONS
3302 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003303 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
3304 * ((const char **)response)[n+3] is a string value of the status:
3305 * "unknown"
3306 * "available"
3307 * "current"
3308 * "forbidden"
3309 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003310 * Valid errors:
3311 * SUCCESS
3312 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003313 * OPERATION_NOT_ALLOWED
Jayachandran Cb0cba832017-03-13 19:17:18 -07003314 * ABORTED
3315 * DEVICE_IN_USE
3316 * INTERNAL_ERR
3317 * NO_MEMORY
3318 * MODEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003319 *
3320 */
3321#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
3322
3323/**
3324 * RIL_REQUEST_DTMF_START
3325 *
Wink Saville7f856802009-06-09 10:23:37 -07003326 * Start playing a DTMF tone. Continue playing DTMF tone until
3327 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003328 *
3329 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
3330 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07003331 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003332 * "data" is a char *
3333 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
3334 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003335 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003336 * Valid errors:
3337 * SUCCESS
3338 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003339 * INVALID_ARGUMENTS
3340 * NO_RESOURCES
3341 * NO_MEMORY
3342 * SYSTEM_ERR
3343 * MODEM_ERR
3344 * INTERNAL_ERR
3345 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003346 *
3347 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
3348 */
3349#define RIL_REQUEST_DTMF_START 49
3350
3351/**
3352 * RIL_REQUEST_DTMF_STOP
3353 *
3354 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07003355 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003356 * "data" is NULL
3357 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003358 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003359 * Valid errors:
3360 * SUCCESS
3361 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003362 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07003363 * NO_RESOURCES
3364 * NO_MEMORY
3365 * INVALID_ARGUMENTS
3366 * SYSTEM_ERR
3367 * MODEM_ERR
3368 * INTERNAL_ERR
3369 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003370 *
3371 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
3372 */
3373#define RIL_REQUEST_DTMF_STOP 50
3374
3375/**
3376 * RIL_REQUEST_BASEBAND_VERSION
3377 *
3378 * Return string value indicating baseband version, eg
3379 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07003380 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003381 * "data" is NULL
3382 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07003383 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003384 * Valid errors:
3385 * SUCCESS
3386 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003387 * EMPTY_RECORD
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003388 *
3389 */
3390#define RIL_REQUEST_BASEBAND_VERSION 51
3391
3392/**
3393 * RIL_REQUEST_SEPARATE_CONNECTION
3394 *
3395 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07003396 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003397 * as the only other member of the current (active) call
3398 *
3399 * Like AT+CHLD=2x
3400 *
3401 * See TS 22.084 1.3.8.2 (iii)
3402 * TS 22.030 6.5.5 "Entering "2X followed by send"
3403 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07003404 *
3405 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07003406 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
3407 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003408 * "response" is NULL
3409 *
3410 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003411 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003412 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003413 * INVALID_ARGUMENTS
3414 * INVALID_STATE
3415 * NO_RESOURCES
3416 * NO_MEMORY
3417 * SYSTEM_ERR
3418 * MODEM_ERR
3419 * INTERNAL_ERR
3420 * INVALID_CALL_ID
3421 * INVALID_STATE
3422 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003423 */
3424#define RIL_REQUEST_SEPARATE_CONNECTION 52
3425
3426
3427/**
3428 * RIL_REQUEST_SET_MUTE
3429 *
3430 * Turn on or off uplink (microphone) mute.
3431 *
3432 * Will only be sent while voice call is active.
3433 * Will always be reset to "disable mute" when a new voice call is initiated
3434 *
3435 * "data" is an int *
3436 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
3437 *
3438 * "response" is NULL
3439 *
3440 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003441 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003442 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi68900f52016-03-11 12:02:55 -08003443 * INVALID_ARGUMENTS
3444 * NO_MEMORY
3445 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003446 */
3447
3448#define RIL_REQUEST_SET_MUTE 53
3449
3450/**
3451 * RIL_REQUEST_GET_MUTE
3452 *
3453 * Queries the current state of the uplink mute setting
3454 *
3455 * "data" is NULL
3456 * "response" is an int *
3457 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
3458 *
3459 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003460 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003461 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00003462 * SS_MODIFIED_TO_DIAL
3463 * SS_MODIFIED_TO_USSD
3464 * SS_MODIFIED_TO_SS
Ajay Nambi68900f52016-03-11 12:02:55 -08003465 * NO_MEMORY
3466 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003467 */
3468
3469#define RIL_REQUEST_GET_MUTE 54
3470
3471/**
3472 * RIL_REQUEST_QUERY_CLIP
3473 *
3474 * Queries the status of the CLIP supplementary service
3475 *
3476 * (for MMI code "*#30#")
3477 *
3478 * "data" is NULL
3479 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07003480 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003481 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07003482 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003483 *
3484 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003485 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003486 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003487 * NO_MEMORY
3488 * SYSTEM_ERR
3489 * MODEM_ERR
3490 * INTERNAL_ERR
3491 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003492 */
3493
3494#define RIL_REQUEST_QUERY_CLIP 55
3495
3496/**
Wink Savillec0114b32011-02-18 10:14:07 -08003497 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
3498 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003499 *
3500 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07003501 * context or CDMA data connection active
3502 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003503 *
3504 * "data" is NULL
3505 *
3506 * "response" is a "int *"
3507 * ((int *)response)[0] is an integer cause code defined in TS 24.008
3508 * section 6.1.3.1.3 or close approximation
3509 *
3510 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07003511 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08003512 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003513 * cases for error notification
3514 * and potential retries.
3515 *
3516 * Valid errors:
3517 * SUCCESS
3518 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003519 *
3520 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08003521 *
3522 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003523 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003524
Wink Savillef4c4d362009-04-02 01:37:03 -07003525#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003526
3527/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003528 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003529 *
Wink Saville29487ef2011-04-15 09:15:31 -07003530 * Returns the data call list. An entry is added when a
3531 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
3532 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
3533 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003534 *
3535 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08003536 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003537 *
3538 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003539 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003540 * RADIO_NOT_AVAILABLE (radio resetting)
Wink Saville29487ef2011-04-15 09:15:31 -07003541 *
3542 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003543 */
3544
Wink Savillef4c4d362009-04-02 01:37:03 -07003545#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003546
3547/**
johnwangf8bc1672009-05-14 19:19:47 -07003548 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003549 *
3550 * Request a radio reset. The RIL implementation may postpone
3551 * the reset until after this request is responded to if the baseband
3552 * is presently busy.
3553 *
johnwangf8bc1672009-05-14 19:19:47 -07003554 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
3555 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003556 * "data" is NULL
3557 * "response" is NULL
3558 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003559 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003560 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003561 * RADIO_NOT_AVAILABLE (radio resetting)
johnwangf8bc1672009-05-14 19:19:47 -07003562 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003563 */
3564
3565#define RIL_REQUEST_RESET_RADIO 58
3566
3567/**
3568 * RIL_REQUEST_OEM_HOOK_RAW
3569 *
3570 * This request reserved for OEM-specific uses. It passes raw byte arrays
3571 * back and forth.
3572 *
Wink Saville7f856802009-06-09 10:23:37 -07003573 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003574 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
3575 *
3576 * "data" is a char * of bytes copied from the byte[] data argument in java
3577 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07003578 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003579 * (byte[])(((AsyncResult)response.obj).result)
3580 *
Wink Saville7f856802009-06-09 10:23:37 -07003581 * An error response here will result in
3582 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003583 * (((AsyncResult)response.obj).exception) being an instance of
3584 * com.android.internal.telephony.gsm.CommandException
3585 *
3586 * Valid errors:
3587 * All
3588 */
3589
3590#define RIL_REQUEST_OEM_HOOK_RAW 59
3591
3592/**
3593 * RIL_REQUEST_OEM_HOOK_STRINGS
3594 *
3595 * This request reserved for OEM-specific uses. It passes strings
3596 * back and forth.
3597 *
Wink Saville7f856802009-06-09 10:23:37 -07003598 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003599 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
3600 *
3601 * "data" is a const char **, representing an array of null-terminated UTF-8
3602 * strings copied from the "String[] strings" argument to
3603 * invokeOemRilRequestStrings()
3604 *
3605 * "response" is a const char **, representing an array of null-terminated UTF-8
3606 * stings that will be returned via the caller's response message here:
3607 *
3608 * (String[])(((AsyncResult)response.obj).result)
3609 *
Wink Saville7f856802009-06-09 10:23:37 -07003610 * An error response here will result in
3611 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003612 * (((AsyncResult)response.obj).exception) being an instance of
3613 * com.android.internal.telephony.gsm.CommandException
3614 *
3615 * Valid errors:
3616 * All
3617 */
3618
3619#define RIL_REQUEST_OEM_HOOK_STRINGS 60
3620
3621/**
Jack Yu06181bb2017-01-10 12:10:41 -08003622 * RIL_REQUEST_SCREEN_STATE - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003623 *
3624 * Indicates the current state of the screen. When the screen is off, the
3625 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07003626 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
3627 * in an effort to conserve power. These notifications should resume when the
3628 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003629 *
Jack Yu06181bb2017-01-10 12:10:41 -08003630 * Note this request is deprecated. Use RIL_REQUEST_SEND_DEVICE_STATE to report the device state
3631 * to the modem and use RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER to turn on/off unsolicited
3632 * response from the modem in different scenarios.
3633 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003634 * "data" is int *
3635 * ((int *)data)[0] is == 1 for "Screen On"
3636 * ((int *)data)[0] is == 0 for "Screen Off"
3637 *
3638 * "response" is NULL
3639 *
3640 * Valid errors:
3641 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003642 */
3643#define RIL_REQUEST_SCREEN_STATE 61
3644
3645
3646/**
3647 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
3648 *
3649 * Enables/disables supplementary service related notifications
3650 * from the network.
3651 *
3652 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3653 *
3654 * "data" is int *
3655 * ((int *)data)[0] is == 1 for notifications enabled
3656 * ((int *)data)[0] is == 0 for notifications disabled
3657 *
3658 * "response" is NULL
3659 *
3660 * Valid errors:
3661 * SUCCESS
3662 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003663 * SIM_BUSY
Ajay Nambi10345892016-03-19 09:02:28 -07003664 * INVALID_ARGUMENTS
3665 * NO_MEMORY
3666 * SYSTEM_ERR
3667 * MODEM_ERR
3668 * INTERNAL_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003669 *
3670 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3671 */
3672#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
3673
3674/**
3675 * RIL_REQUEST_WRITE_SMS_TO_SIM
3676 *
3677 * Stores a SMS message to SIM memory.
3678 *
3679 * "data" is RIL_SMS_WriteArgs *
3680 *
3681 * "response" is int *
3682 * ((const int *)response)[0] is the record index where the message is stored.
3683 *
3684 * Valid errors:
3685 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003686 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003687 * INVALID_ARGUMENTS
3688 * INVALID_SMS_FORMAT
3689 * INTERNAL_ERR
3690 * MODEM_ERR
3691 * ENCODING_ERR
3692 * NO_MEMORY
3693 * NO_RESOURCES
3694 * INVALID_MODEM_STATE
3695 * MODE_NOT_SUPPORTED
3696 * INVALID_SMSC_ADDRESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003697 *
3698 */
3699#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
3700
3701/**
3702 * RIL_REQUEST_DELETE_SMS_ON_SIM
3703 *
3704 * Deletes a SMS message from SIM memory.
3705 *
3706 * "data" is int *
3707 * ((int *)data)[0] is the record index of the message to delete.
3708 *
3709 * "response" is NULL
3710 *
3711 * Valid errors:
3712 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003713 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003714 * INVALID_ARGUMENTS
3715 * NO_MEMORY
3716 * REQUEST_RATE_LIMITED
3717 * SYSTEM_ERR
3718 * MODEM_ERR
3719 * NO_SUCH_ENTRY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003720 *
3721 */
3722#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
3723
3724/**
3725 * RIL_REQUEST_SET_BAND_MODE
3726 *
3727 * Assign a specified band for RF configuration.
3728 *
3729 * "data" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003730 * ((int *)data)[0] is a RIL_RadioBandMode
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003731 *
3732 * "response" is NULL
3733 *
3734 * Valid errors:
3735 * SUCCESS
3736 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003737 * OPERATION_NOT_ALLOWED
Nathan Harold92839f12016-02-12 10:02:28 -08003738 *
3739 * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003740 */
3741#define RIL_REQUEST_SET_BAND_MODE 65
3742
3743/**
3744 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3745 *
3746 * Query the list of band mode supported by RF.
3747 *
3748 * "data" is NULL
3749 *
3750 * "response" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003751 * "response" points to an array of int's, the int[0] is the size of array;
3752 * subsequent values are a list of RIL_RadioBandMode listing supported modes.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003753 *
3754 * Valid errors:
3755 * SUCCESS
3756 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003757 *
3758 * See also: RIL_REQUEST_SET_BAND_MODE
3759 */
3760#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
3761
3762/**
3763 * RIL_REQUEST_STK_GET_PROFILE
3764 *
3765 * Requests the profile of SIM tool kit.
3766 * The profile indicates the SAT/USAT features supported by ME.
3767 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
3768 *
3769 * "data" is NULL
3770 *
3771 * "response" is a const char * containing SAT/USAT profile
3772 * in hexadecimal format string starting with first byte of terminal profile
3773 *
3774 * Valid errors:
3775 * RIL_E_SUCCESS
3776 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3777 * RIL_E_GENERIC_FAILURE
3778 */
3779#define RIL_REQUEST_STK_GET_PROFILE 67
3780
3781/**
3782 * RIL_REQUEST_STK_SET_PROFILE
3783 *
3784 * Download the STK terminal profile as part of SIM initialization
3785 * procedure
3786 *
3787 * "data" is a const char * containing SAT/USAT profile
3788 * in hexadecimal format string starting with first byte of terminal profile
3789 *
3790 * "response" is NULL
3791 *
3792 * Valid errors:
3793 * RIL_E_SUCCESS
3794 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3795 * RIL_E_GENERIC_FAILURE
3796 */
3797#define RIL_REQUEST_STK_SET_PROFILE 68
3798
3799/**
3800 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
3801 *
3802 * Requests to send a SAT/USAT envelope command to SIM.
3803 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
3804 *
3805 * "data" is a const char * containing SAT/USAT command
3806 * in hexadecimal format string starting with command tag
3807 *
3808 * "response" is a const char * containing SAT/USAT response
3809 * in hexadecimal format string starting with first byte of response
3810 * (May be NULL)
3811 *
3812 * Valid errors:
3813 * RIL_E_SUCCESS
3814 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003815 * SIM_BUSY
3816 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003817 * RIL_E_GENERIC_FAILURE
3818 */
3819#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
3820
3821/**
3822 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
3823 *
3824 * Requests to send a terminal response to SIM for a received
3825 * proactive command
3826 *
3827 * "data" is a const char * containing SAT/USAT response
3828 * in hexadecimal format string starting with first byte of response data
3829 *
3830 * "response" is NULL
3831 *
3832 * Valid errors:
3833 * RIL_E_SUCCESS
3834 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003835 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003836 * RIL_E_GENERIC_FAILURE
3837 */
3838#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3839
3840/**
3841 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3842 *
3843 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3844 * been initialized by ME already. (We could see the call has been in the 'call
3845 * list') So, STK application needs to accept/reject the call according as user
3846 * operations.
3847 *
3848 * "data" is int *
3849 * ((int *)data)[0] is > 0 for "accept" the call setup
3850 * ((int *)data)[0] is == 0 for "reject" the call setup
3851 *
3852 * "response" is NULL
3853 *
3854 * Valid errors:
3855 * RIL_E_SUCCESS
3856 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003857 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003858 * RIL_E_GENERIC_FAILURE
3859 */
3860#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3861
3862/**
3863 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3864 *
3865 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07003866 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003867 * "data" is NULL
3868 * "response" is NULL
3869 *
3870 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003871 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003872 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003873 * INVALID_STATE
3874 * NO_RESOURCES
3875 * NO_MEMORY
3876 * INVALID_ARGUMENTS
3877 * SYSTEM_ERR
3878 * MODEM_ERR
3879 * INTERNAL_ERR
3880 * INVALID_CALL_ID
3881 * INVALID_STATE
3882 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003883 */
3884#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3885
3886/**
3887 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3888 *
3889 * Requests to set the preferred network type for searching and registering
3890 * (CS/PS domain, RAT, and operation mode)
3891 *
Wink Savillec0114b32011-02-18 10:14:07 -08003892 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003893 *
3894 * "response" is NULL
3895 *
3896 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07003897 * SUCCESS
3898 * RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003899 * OPERATION_NOT_ALLOWED
Wink Savillef4c4d362009-04-02 01:37:03 -07003900 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003901 */
3902#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3903
3904/**
3905 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
3906 *
3907 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
3908 * for searching and registering
3909 *
3910 * "data" is NULL
3911 *
3912 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003913 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003914 *
3915 * Valid errors:
3916 * SUCCESS
3917 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003918 *
3919 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3920 */
3921#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
3922
3923/**
3924 * RIL_REQUEST_NEIGHBORING_CELL_IDS
3925 *
3926 * Request neighboring cell id in GSM network
3927 *
3928 * "data" is NULL
3929 * "response" must be a " const RIL_NeighboringCell** "
3930 *
3931 * Valid errors:
3932 * SUCCESS
3933 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003934 */
3935#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3936
3937/**
3938 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07003939 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003940 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07003941 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3942 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003943 *
3944 * Note: The RIL implementation should default to "updates enabled"
3945 * when the screen is on and "updates disabled" when the screen is off.
3946 *
3947 * "data" is int *
3948 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3949 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3950 *
3951 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07003952 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003953 * Valid errors:
3954 * SUCCESS
3955 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003956 *
3957 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3958 */
3959#define RIL_REQUEST_SET_LOCATION_UPDATES 76
3960
Wink Savillef4c4d362009-04-02 01:37:03 -07003961/**
Wink Savillec0114b32011-02-18 10:14:07 -08003962 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07003963 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003964 * Request to set the location where the CDMA subscription shall
3965 * be retrieved
3966 *
3967 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003968 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07003969 *
3970 * "response" is NULL
3971 *
3972 * Valid errors:
3973 * SUCCESS
3974 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07003975 * SIM_ABSENT
3976 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08003977 *
3978 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07003979 */
Wink Savillec0114b32011-02-18 10:14:07 -08003980#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07003981
3982/**
3983 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003984 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003985 * Request to set the roaming preferences in CDMA
3986 *
3987 * "data" is int *
3988 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3989 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3990 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003991 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003992 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003993 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003994 * Valid errors:
3995 * SUCCESS
3996 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07003997 */
3998#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
3999
4000/**
4001 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07004002 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004003 * Request the actual setting of the roaming preferences in CDMA in the modem
4004 *
4005 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004006 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004007 * "response" is int *
4008 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
4009 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
4010 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07004011 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004012 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004013 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004014 * Valid errors:
4015 * SUCCESS
4016 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07004017 */
4018#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
4019
4020/**
4021 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07004022 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004023 * Request to set the TTY mode
4024 *
4025 * "data" is int *
4026 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07004027 * ((int *)data)[0] is == 1 for TTY Full
4028 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
4029 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07004030 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004031 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004032 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004033 * Valid errors:
4034 * SUCCESS
4035 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004036 * INVALID_ARGUMENTS
4037 * MODEM_ERR
4038 * INTERNAL_ERR
4039 * NO_MEMOR
4040 * INVALID_ARGUMENTS
4041 * MODEM_ERR
4042 * INTERNAL_ERR
4043 * NO_MEMORYY
Wink Savillef4c4d362009-04-02 01:37:03 -07004044 */
4045#define RIL_REQUEST_SET_TTY_MODE 80
4046
4047/**
4048 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07004049 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004050 * Request the setting of TTY mode
4051 *
4052 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004053 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004054 * "response" is int *
4055 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07004056 * ((int *)response)[0] is == 1 for TTY Full
4057 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
4058 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07004059 *
4060 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004061 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004062 * Valid errors:
4063 * SUCCESS
4064 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004065 * MODEM_ERR
4066 * INTERNAL_ERR
4067 * NO_MEMORY
4068 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07004069 */
4070#define RIL_REQUEST_QUERY_TTY_MODE 81
4071
4072/**
4073 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
4074 *
4075 * Request to set the preferred voice privacy mode used in voice
4076 * scrambling
4077 *
4078 * "data" is int *
4079 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
4080 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07004081 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004082 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004083 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004084 * Valid errors:
4085 * SUCCESS
4086 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004087 * INVALID_ARGUMENTS
4088 * SYSTEM_ERR
4089 * MODEM_ERR
4090 * INTERNAL_ERR
4091 * NO_MEMORY
4092 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07004093 */
4094#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
4095
4096/**
4097 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07004098 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004099 * Request the setting of preferred voice privacy mode
4100 *
4101 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004102 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004103 * "response" is int *
4104 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
4105 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07004106 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004107 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004108 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004109 * Valid errors:
4110 * SUCCESS
4111 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004112 * MODEM_ERR
4113 * INTERNAL_ERR
4114 * NO_MEMORY
4115 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07004116 */
4117#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
4118
4119/**
4120 * RIL_REQUEST_CDMA_FLASH
4121 *
4122 * Send FLASH
4123 *
4124 * "data" is const char *
4125 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07004126 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004127 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004128 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004129 * Valid errors:
4130 * SUCCESS
4131 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004132 * INVALID_ARGUMENTS
4133 * NO_MEMORY
4134 * SYSTEM_ERR
4135 * MODEM_ERR
4136 * INTERNAL_ERR
4137 * INVALID_CALL_ID
4138 * INVALID_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004139 *
4140 */
4141#define RIL_REQUEST_CDMA_FLASH 84
4142
4143/**
4144 * RIL_REQUEST_CDMA_BURST_DTMF
4145 *
4146 * Send DTMF string
4147 *
jsh602f80f2009-07-10 15:44:37 -07004148 * "data" is const char **
4149 * ((const char **)data)[0] is a DTMF string
4150 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
4151 * default
4152 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
4153 * default
Wink Saville7f856802009-06-09 10:23:37 -07004154 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004155 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004156 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004157 * Valid errors:
4158 * SUCCESS
4159 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004160 * INVALID_ARGUMENTS
4161 * NO_MEMORY
4162 * SYSTEM_ERR
4163 * MODEM_ERR
4164 * INTERNAL_ERR
4165 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07004166 *
4167 */
4168#define RIL_REQUEST_CDMA_BURST_DTMF 85
4169
4170/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004171 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07004172 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004173 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
4174 * If the checksum is valid the 20 digit AKEY is written to NV,
4175 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07004176 *
4177 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004178 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
4179 * where the last 6 digits are a checksum of the
4180 * first 20, as specified in TR45.AHAG
4181 * "Common Cryptographic Algorithms, Revision D.1
4182 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07004183 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004184 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004185 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004186 * Valid errors:
4187 * SUCCESS
4188 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07004189 *
4190 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004191#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07004192
4193/**
4194 * RIL_REQUEST_CDMA_SEND_SMS
4195 *
4196 * Send a CDMA SMS message
4197 *
4198 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07004199 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004200 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07004201 *
johnwangbfb151b2009-09-11 15:20:38 -07004202 * Based on the return error, caller decides to resend if sending sms
4203 * fails. The CDMA error class is derived as follows,
4204 * SUCCESS is error class 0 (no error)
4205 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
4206 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
4207 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004208 * Valid errors:
4209 * SUCCESS
4210 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07004211 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08004212 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004213 * INVALID_STATE
4214 * INVALID_ARGUMENTS
4215 * NO_MEMORY
4216 * REQUEST_RATE_LIMITED
4217 * INVALID_SMS_FORMAT
4218 * SYSTEM_ERR
4219 * FDN_CHECK_FAILURE
4220 * MODEM_ERR
4221 * NETWORK_ERR
4222 * ENCODING_ERR
4223 * INVALID_SMSC_ADDRESS
4224 * MODE_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004225 *
4226 */
4227#define RIL_REQUEST_CDMA_SEND_SMS 87
4228
4229/**
4230 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4231 *
4232 * Acknowledge the success or failure in the receipt of SMS
4233 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4234 *
4235 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07004236 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004237 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004238 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004239 * Valid errors:
4240 * SUCCESS
4241 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004242 * INVALID_ARGUMENTS
4243 * NO_SMS_TO_ACK
4244 * INVALID_STATE
4245 * NO_MEMORY
4246 * REQUEST_RATE_LIMITED
4247 * SYSTEM_ERR
4248 * MODEM_ERR
4249 * INVALID_STATE
4250 * MODE_NOT_SUPPORTED
4251 * NETWORK_NOT_READY
4252 * INVALID_MODEM_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004253 *
4254 */
4255#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
4256
4257/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004258 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004259 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004260 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
4261 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004262 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004263 *
4264 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
4265 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
4266 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004267 * Valid errors:
4268 * SUCCESS
4269 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004270 * INVALID_STATE
4271 * NO_MEMORY
4272 * REQUEST_RATE_LIMITED
4273 * SYSTEM_ERR
4274 * NO_RESOURCES
4275 * MODEM_ERR
4276 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004277 *
4278 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004279#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07004280
4281/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004282 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004283 *
4284 * Set GSM/WCDMA Cell Broadcast SMS config
4285 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004286 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
4287 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
4288 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004289 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004290 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004291 * Valid errors:
4292 * SUCCESS
4293 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004294 * INVALID_STATE
4295 * INVALID_ARGUMENTS
4296 * NO_MEMORY
4297 * SYSTEM_ERR
4298 * REQUEST_RATE_LIMITED
4299 * MODEM_ERR
4300 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004301 *
4302 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004303#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07004304
4305/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004306 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004307 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004308* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07004309 *
4310 * "data" is const int *
4311 * (const int *)data[0] indicates to activate or turn off the
4312 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
4313 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004314 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004315 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004316 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004317 * Valid errors:
4318 * SUCCESS
4319 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004320 * INVALID_STATE
4321 * INVALID_ARGUMENTS
4322 * NO_MEMORY
4323 * SYSTEM_ERR
4324 * REQUEST_RATE_LIMITED
4325 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004326 *
4327 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004328#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07004329
4330/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004331 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004332 *
4333 * Request the setting of CDMA Broadcast SMS config
4334 *
4335 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004336 *
4337 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
4338 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
4339 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004340 * Valid errors:
4341 * SUCCESS
4342 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004343 * INVALID_STATE
4344 * NO_MEMORY
4345 * REQUEST_RATE_LIMITED
4346 * SYSTEM_ERR
4347 * NO_RESOURCES
4348 * MODEM_ERR
4349 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004350 *
4351 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004352#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07004353
4354/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004355 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004356 *
4357 * Set CDMA Broadcast SMS config
4358 *
Jack Yu06181bb2017-01-10 12:10:41 -08004359 * "data" is a const RIL_CDMA_BroadcastSmsConfigInfo **
Wink Savillea592eeb2009-05-22 13:26:36 -07004360 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
4361 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004362 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004363 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004364 * Valid errors:
4365 * SUCCESS
4366 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004367 * INVALID_STATE
4368 * INVALID_ARGUMENTS
4369 * NO_MEMORY
4370 * SYSTEM_ERR
4371 * REQUEST_RATE_LIMITED
4372 * MODEM_ERR
4373 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004374 *
4375 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004376#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07004377
4378/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004379 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004380 *
4381 * Enable or disable the reception of CDMA Broadcast SMS
4382 *
4383 * "data" is const int *
4384 * (const int *)data[0] indicates to activate or turn off the
4385 * reception of CDMA Broadcast SMS, 0-1,
4386 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004387 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004388 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004389 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004390 * Valid errors:
4391 * SUCCESS
4392 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004393 * INVALID_STATE
4394 * INVALID_ARGUMENTS
4395 * NO_MEMORY
4396 * SYSTEM_ERR
4397 * REQUEST_RATE_LIMITED
4398 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004399 *
4400 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004401#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07004402
4403/**
4404 * RIL_REQUEST_CDMA_SUBSCRIPTION
4405 *
4406 * Request the device MDN / H_SID / H_NID.
4407 *
4408 * The request is only allowed when CDMA subscription is available. When CDMA
4409 * subscription is changed, application layer should re-issue the request to
4410 * update the subscription information.
4411 *
4412 * If a NULL value is returned for any of the device id, it means that error
4413 * accessing the device.
4414 *
4415 * "response" is const char **
4416 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07004417 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
4418 * CDMA subscription is available, in decimal format
4419 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
4420 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07004421 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07004422 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07004423 *
4424 * Valid errors:
4425 * SUCCESS
4426 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
4427 */
4428
Wink Savilleeafe79d2009-04-03 18:02:34 -07004429#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07004430
4431/**
4432 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
4433 *
4434 * Stores a CDMA SMS message to RUIM memory.
4435 *
4436 * "data" is RIL_CDMA_SMS_WriteArgs *
4437 *
4438 * "response" is int *
4439 * ((const int *)response)[0] is the record index where the message is stored.
4440 *
4441 * Valid errors:
4442 * SUCCESS
4443 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004444 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08004445 * INVALID_ARGUMENTS
4446 * INVALID_SMS_FORMAT
4447 * INTERNAL_ERR
4448 * MODEM_ERR
4449 * ENCODING_ERR
4450 * NO_MEMORY
4451 * NO_RESOURCES
4452 * INVALID_MODEM_STATE
4453 * MODE_NOT_SUPPORTED
4454 * INVALID_SMSC_ADDRESS
Wink Savillef4c4d362009-04-02 01:37:03 -07004455 *
4456 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004457#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07004458
4459/**
4460 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
4461 *
4462 * Deletes a CDMA SMS message from RUIM memory.
4463 *
4464 * "data" is int *
4465 * ((int *)data)[0] is the record index of the message to delete.
4466 *
4467 * "response" is NULL
4468 *
4469 * Valid errors:
4470 * SUCCESS
4471 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004472 * INVALID_ARGUMENTS
4473 * NO_MEMORY
4474 * REQUEST_RATE_LIMITED
4475 * SYSTEM_ERR
4476 * MODEM_ERR
4477 * NO_SUCH_ENTRY
Wink Savillef4c4d362009-04-02 01:37:03 -07004478 *
4479 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004480#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07004481
4482/**
4483 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07004484 *
4485 * Request the device ESN / MEID / IMEI / IMEISV.
4486 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004487 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07004488 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07004489 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004490 *
4491 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07004492 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004493 *
4494 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07004495 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004496 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004497 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07004498 * ((const char **)response)[0] is IMEI if GSM subscription is available
4499 * ((const char **)response)[1] is IMEISV if GSM subscription is available
4500 * ((const char **)response)[2] is ESN if CDMA subscription is available
4501 * ((const char **)response)[3] is MEID if CDMA subscription is available
4502 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004503 * Valid errors:
4504 * SUCCESS
4505 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07004506 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004507#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07004508
Wink Saville1b5fd232009-04-22 14:50:00 -07004509/**
4510 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
4511 *
4512 * Request the radio's system selection module to exit emergency
4513 * callback mode. RIL will not respond with SUCCESS until the modem has
4514 * completely exited from Emergency Callback Mode.
4515 *
4516 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004517 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004518 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004519 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004520 * Valid errors:
4521 * SUCCESS
4522 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004523 * OPERATION_NOT_ALLOWED
Wink Saville1b5fd232009-04-22 14:50:00 -07004524 *
4525 */
4526#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07004527
jsh000a9fe2009-05-11 14:52:35 -07004528/**
4529 * RIL_REQUEST_GET_SMSC_ADDRESS
4530 *
4531 * Queries the default Short Message Service Center address on the device.
4532 *
4533 * "data" is NULL
4534 *
4535 * "response" is const char * containing the SMSC address.
4536 *
4537 * Valid errors:
4538 * SUCCESS
4539 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004540 * NO_MEMORY
4541 * REQUEST_RATE_LIMITED
4542 * SYSTEM_ERR
4543 * INTERNAL_ERR
4544 * MODEM_ERR
4545 * INVALID_ARGUMENTS
4546 * INVALID_MODEM_STATE
4547 * NOT_PROVISIONED
jsh000a9fe2009-05-11 14:52:35 -07004548 *
4549 */
4550#define RIL_REQUEST_GET_SMSC_ADDRESS 100
4551
4552/**
4553 * RIL_REQUEST_SET_SMSC_ADDRESS
4554 *
4555 * Sets the default Short Message Service Center address on the device.
4556 *
4557 * "data" is const char * containing the SMSC address.
4558 *
4559 * "response" is NULL
4560 *
4561 * Valid errors:
4562 * SUCCESS
4563 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004564 * INVALID_ARGUMENTS
4565 * INVALID_SMS_FORMAT
4566 * NO_MEMORY
4567 * SYSTEM_ERR
4568 * REQUEST_RATE_LIMITED
4569 * MODEM_ERR
4570 * NO_RESOURCES
jsh000a9fe2009-05-11 14:52:35 -07004571 *
4572 */
4573#define RIL_REQUEST_SET_SMSC_ADDRESS 101
4574
jshb60444e2009-05-29 11:09:17 -07004575/**
4576 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
4577 *
4578 * Indicates whether there is storage available for new SMS messages.
4579 *
4580 * "data" is int *
4581 * ((int *)data)[0] is 1 if memory is available for storing new messages
4582 * is 0 if memory capacity is exceeded
4583 *
4584 * "response" is NULL
4585 *
4586 * Valid errors:
4587 * SUCCESS
4588 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004589 * INVALID_ARGUMENTS
4590 * NO_MEMORY
4591 * INVALID_STATE
4592 * SYSTEM_ERR
4593 * REQUEST_RATE_LIMITED
4594 * MODEM_ERR
jshb60444e2009-05-29 11:09:17 -07004595 *
4596 */
4597#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
4598
Wink Saville2641d5b2009-06-08 17:40:42 -07004599/**
4600 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
4601 *
4602 * Indicates that the StkSerivce is running and is
4603 * ready to receive RIL_UNSOL_STK_XXXXX commands.
4604 *
4605 * "data" is NULL
4606 * "response" is NULL
4607 *
4608 * Valid errors:
4609 * SUCCESS
4610 * RADIO_NOT_AVAILABLE
Wink Saville2641d5b2009-06-08 17:40:42 -07004611 *
4612 */
4613#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
4614
Wink Savillec0114b32011-02-18 10:14:07 -08004615/**
4616 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
4617 *
4618 * Request to query the location where the CDMA subscription shall
4619 * be retrieved
4620 *
4621 * "data" is NULL
4622 *
4623 * "response" is int *
4624 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4625 *
4626 * Valid errors:
4627 * SUCCESS
4628 * RADIO_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08004629 * SUBSCRIPTION_NOT_AVAILABLE
4630 *
4631 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
4632 */
4633#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
4634
Jake Hambyfa8d5842011-08-19 16:22:18 -07004635/**
4636 * RIL_REQUEST_ISIM_AUTHENTICATION
4637 *
4638 * Request the ISIM application on the UICC to perform AKA
4639 * challenge/response algorithm for IMS authentication
4640 *
4641 * "data" is a const char * containing the challenge string in Base64 format
4642 * "response" is a const char * containing the response in Base64 format
4643 *
4644 * Valid errors:
4645 * SUCCESS
4646 * RADIO_NOT_AVAILABLE
Jake Hambyfa8d5842011-08-19 16:22:18 -07004647 */
4648#define RIL_REQUEST_ISIM_AUTHENTICATION 105
4649
Jake Hamby300105d2011-09-26 01:01:44 -07004650/**
4651 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
4652 *
4653 * Acknowledge successful or failed receipt of SMS previously indicated
4654 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
4655 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
4656 *
4657 * "data" is const char **
4658 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
4659 * is "0" on failed receipt (send RP-ERROR)
4660 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
4661 *
4662 * "response" is NULL
4663 *
4664 * Valid errors:
4665 * SUCCESS
4666 * RADIO_NOT_AVAILABLE
Jake Hamby300105d2011-09-26 01:01:44 -07004667 */
4668#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
4669
4670/**
4671 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
4672 *
4673 * Requests to send a SAT/USAT envelope command to SIM.
4674 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
4675 *
4676 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
4677 * the SW1 and SW2 status bytes from the UICC response are returned along with
4678 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
4679 *
4680 * The RIL implementation shall perform the normal processing of a '91XX'
4681 * response in SW1/SW2 to retrieve the pending proactive command and send it
4682 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
4683 *
4684 * "data" is a const char * containing the SAT/USAT command
4685 * in hexadecimal format starting with command tag
4686 *
4687 * "response" is a const RIL_SIM_IO_Response *
4688 *
4689 * Valid errors:
4690 * RIL_E_SUCCESS
4691 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08004692 * SIM_BUSY
4693 * OPERATION_NOT_ALLOWED
Jake Hamby300105d2011-09-26 01:01:44 -07004694 * RIL_E_GENERIC_FAILURE
4695 */
4696#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
4697
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004698/**
4699 * RIL_REQUEST_VOICE_RADIO_TECH
4700 *
4701 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
4702 * when radio state is RADIO_STATE_ON
4703 *
4704 * "data" is NULL
4705 * "response" is int *
4706 * ((int *) response)[0] is of type const RIL_RadioTechnology
4707 *
4708 * Valid errors:
4709 * SUCCESS
4710 * RADIO_NOT_AVAILABLE
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004711 */
4712#define RIL_REQUEST_VOICE_RADIO_TECH 108
4713
Wink Saville8a9e0212013-04-09 12:11:38 -07004714/**
4715 * RIL_REQUEST_GET_CELL_INFO_LIST
4716 *
4717 * Request all of the current cell information known to the radio. The radio
4718 * must a list of all current cells, including the neighboring cells. If for a particular
4719 * cell information isn't known then the appropriate unknown value will be returned.
4720 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
4721 *
4722 * "data" is NULL
4723 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08004724 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07004725 */
4726#define RIL_REQUEST_GET_CELL_INFO_LIST 109
4727
4728/**
4729 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
4730 *
4731 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
Wink Savillec57b3eb2013-04-17 12:51:41 -07004732 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
Wink Saville8a9e0212013-04-09 12:11:38 -07004733 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
4734 * a RIL_UNSOL_CELL_INFO_LIST.
4735 *
4736 * "data" is int *
4737 * ((int *)data)[0] is minimum time in milliseconds
4738 *
4739 * "response" is NULL
4740 *
4741 * Valid errors:
4742 * SUCCESS
4743 * RADIO_NOT_AVAILABLE
Wink Saville8a9e0212013-04-09 12:11:38 -07004744 */
4745#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
Jake Hamby300105d2011-09-26 01:01:44 -07004746
Sungmin Choi75697532013-04-26 15:04:45 -07004747/**
4748 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
4749 *
4750 * Set an apn to initial attach network
Ankit Nbc37e512016-12-07 21:05:43 +05304751 *
4752 * "data" is a const char **
4753 * ((const char **)data)[0] is the APN to connect if radio technology is LTE
4754 * ((const char **)data)[1] is the connection type to request must be one of the
4755 * PDP_type values in TS 27.007 section 10.1.1.
4756 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
4757 * ((const char **)data)[2] is the PAP / CHAP auth type. Values:
4758 * 0 => PAP and CHAP is never performed.
4759 * 1 => PAP may be performed; CHAP is never performed.
4760 * 2 => CHAP may be performed; PAP is never performed.
4761 * 3 => PAP / CHAP may be performed - baseband dependent.
4762 * ((const char **)data)[3] is the username for APN, or NULL
4763 * ((const char **)data)[4] is the password for APN, or NULL
4764 *
Sungmin Choi75697532013-04-26 15:04:45 -07004765 * "response" is NULL
4766 *
4767 * Valid errors:
4768 * SUCCESS
4769 * RADIO_NOT_AVAILABLE (radio resetting)
Sungmin Choi75697532013-04-26 15:04:45 -07004770 * SUBSCRIPTION_NOT_AVAILABLE
4771 */
4772#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
4773
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004774/**
4775 * RIL_REQUEST_IMS_REGISTRATION_STATE
4776 *
Nathan Harold0eb43c22016-12-19 12:04:32 -08004777 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
4778 * instead, provide IMS registration status via an IMS Service.
4779 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004780 * Request current IMS registration state
4781 *
4782 * "data" is NULL
4783 *
4784 * "response" is int *
4785 * ((int *)response)[0] is registration state:
4786 * 0 - Not registered
4787 * 1 - Registered
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004788 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004789 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004790 * must follow with IMS SMS format:
4791 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004792 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
4793 *
4794 * Valid errors:
4795 * SUCCESS
4796 * RADIO_NOT_AVAILABLE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004797 */
4798#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
4799
4800/**
4801 * RIL_REQUEST_IMS_SEND_SMS
4802 *
4803 * Send a SMS message over IMS
4804 *
4805 * "data" is const RIL_IMS_SMS_Message *
4806 *
4807 * "response" is a const RIL_SMS_Response *
4808 *
4809 * Based on the return error, caller decides to resend if sending sms
4810 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
4811 * In case of retry, data is encoded based on Voice Technology available.
4812 *
4813 * Valid errors:
4814 * SUCCESS
4815 * RADIO_NOT_AVAILABLE
4816 * SMS_SEND_FAIL_RETRY
4817 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08004818 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004819 * INVALID_ARGUMENTS
4820 * INVALID_STATE
4821 * NO_MEMORY
4822 * INVALID_SMS_FORMAT
4823 * SYSTEM_ERR
4824 * REQUEST_RATE_LIMITED
4825 * MODEM_ERR
4826 * NETWORK_ERR
4827 * ENCODING_ERR
4828 * INVALID_SMSC_ADDRESS
4829 * MODE_NOT_SUPPORTED
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004830 *
4831 */
4832#define RIL_REQUEST_IMS_SEND_SMS 113
4833
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004834/**
4835 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
4836 *
4837 * Request APDU exchange on the basic channel. This command reflects TS 27.007
4838 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
4839 * of GSM/CDMA, and filter commands appropriately. It should filter
4840 * channel management and SELECT by DF name commands.
4841 *
4842 * "data" is a const RIL_SIM_APDU *
4843 * "sessionid" field should be ignored.
4844 *
4845 * "response" is a const RIL_SIM_IO_Response *
4846 *
4847 * Valid errors:
4848 * SUCCESS
4849 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004850 */
4851#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
4852
4853/**
4854 * RIL_REQUEST_SIM_OPEN_CHANNEL
4855 *
4856 * Open a new logical channel and select the given application. This command
Wileen Chiu410b7562015-11-23 14:25:22 -08004857 * reflects TS 27.007 "open logical channel" operation (+CCHO). This request
4858 * also specifies the P2 parameter (described in ISO 7816-4).
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004859 *
Wileen Chiu410b7562015-11-23 14:25:22 -08004860 * "data" is a const RIL_OpenChannelParam *
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004861 *
4862 * "response" is int *
4863 * ((int *)data)[0] contains the session id of the logical channel.
Shishir Agrawal760123f2014-10-14 09:14:57 -07004864 * ((int *)data)[1] onwards may optionally contain the select response for the
4865 * open channel command with one byte per integer.
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004866 *
4867 * Valid errors:
4868 * SUCCESS
4869 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004870 * MISSING_RESOURCE
4871 * NO_SUCH_ELEMENT
4872 */
4873#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
4874
4875/**
4876 * RIL_REQUEST_SIM_CLOSE_CHANNEL
4877 *
4878 * Close a previously opened logical channel. This command reflects TS 27.007
4879 * "close logical channel" operation (+CCHC).
4880 *
4881 * "data" is int *
4882 * ((int *)data)[0] is the session id of logical the channel to close.
4883 *
4884 * "response" is NULL
4885 *
4886 * Valid errors:
4887 * SUCCESS
4888 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004889 */
4890#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
4891
4892/**
4893 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
4894 *
4895 * Exchange APDUs with a UICC over a previously opened logical channel. This
4896 * command reflects TS 27.007 "generic logical channel access" operation
4897 * (+CGLA). The modem should filter channel management and SELECT by DF name
4898 * commands.
4899 *
4900 * "data" is a const RIL_SIM_APDU*
4901 *
4902 * "response" is a const RIL_SIM_IO_Response *
4903 *
4904 * Valid errors:
4905 * SUCCESS
4906 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004907 */
4908#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
4909
Jake Hamby8a4a2332014-01-15 13:12:05 -08004910/**
4911 * RIL_REQUEST_NV_READ_ITEM
4912 *
4913 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4914 * This is used for device configuration by some CDMA operators.
4915 *
4916 * "data" is a const RIL_NV_ReadItem *
4917 *
4918 * "response" is const char * containing the contents of the NV item
4919 *
4920 * Valid errors:
4921 * SUCCESS
4922 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004923 */
4924#define RIL_REQUEST_NV_READ_ITEM 118
4925
4926/**
4927 * RIL_REQUEST_NV_WRITE_ITEM
4928 *
4929 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4930 * This is used for device configuration by some CDMA operators.
4931 *
4932 * "data" is a const RIL_NV_WriteItem *
4933 *
4934 * "response" is NULL
4935 *
4936 * Valid errors:
4937 * SUCCESS
4938 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004939 */
4940#define RIL_REQUEST_NV_WRITE_ITEM 119
4941
4942/**
4943 * RIL_REQUEST_NV_WRITE_CDMA_PRL
4944 *
4945 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
4946 * This is used for device configuration by some CDMA operators.
4947 *
4948 * "data" is a const char * containing the PRL as a byte array
4949 *
4950 * "response" is NULL
4951 *
4952 * Valid errors:
4953 * SUCCESS
4954 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004955 */
4956#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
4957
4958/**
4959 * RIL_REQUEST_NV_RESET_CONFIG
4960 *
4961 * Reset the radio NV configuration to the factory state.
4962 * This is used for device configuration by some CDMA operators.
4963 *
4964 * "data" is int *
Jake Hambyd27c9d52014-02-06 14:52:05 -08004965 * ((int *)data)[0] is 1 to reload all NV items
4966 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
4967 * ((int *)data)[0] is 3 for factory reset (RTN)
Jake Hamby8a4a2332014-01-15 13:12:05 -08004968 *
4969 * "response" is NULL
4970 *
4971 * Valid errors:
4972 * SUCCESS
4973 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004974 */
4975#define RIL_REQUEST_NV_RESET_CONFIG 121
4976
Etan Cohend3652192014-06-20 08:28:44 -07004977 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
4978 * FIXME This API needs to have more documentation.
4979 *
4980 * Selection/de-selection of a subscription from a SIM card
4981 * "data" is const RIL_SelectUiccSub*
4982
4983 *
4984 * "response" is NULL
4985 *
4986 * Valid errors:
4987 * SUCCESS
4988 * RADIO_NOT_AVAILABLE (radio resetting)
Etan Cohend3652192014-06-20 08:28:44 -07004989 * SUBSCRIPTION_NOT_SUPPORTED
4990 *
4991 */
4992#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
4993
4994/**
4995 * RIL_REQUEST_ALLOW_DATA
4996 *
4997 * Tells the modem whether data calls are allowed or not
4998 *
4999 * "data" is int *
5000 * FIXME slotId and aid will be added.
5001 * ((int *)data)[0] is == 0 to allow data calls
5002 * ((int *)data)[0] is == 1 to disallow data calls
5003 *
5004 * "response" is NULL
5005 *
5006 * Valid errors:
5007 *
5008 * SUCCESS
5009 * RADIO_NOT_AVAILABLE (radio resetting)
Etan Cohend3652192014-06-20 08:28:44 -07005010 *
5011 */
5012#define RIL_REQUEST_ALLOW_DATA 123
5013
5014/**
5015 * RIL_REQUEST_GET_HARDWARE_CONFIG
5016 *
5017 * Request all of the current hardware (modem and sim) associated
5018 * with the RIL.
5019 *
5020 * "data" is NULL
5021 *
5022 * "response" is an array of RIL_HardwareConfig.
5023 */
5024#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
5025
5026/**
Amit Mahajan2b772032014-06-26 14:20:11 -07005027 * RIL_REQUEST_SIM_AUTHENTICATION
Etan Cohend3652192014-06-20 08:28:44 -07005028 *
5029 * Returns the response of SIM Authentication through RIL to a
5030 * challenge request.
5031 *
5032 * "data" Base64 encoded string containing challenge:
5033 * int authContext; P2 value of authentication command, see P2 parameter in
5034 * 3GPP TS 31.102 7.1.2
5035 * char *authData; the challenge string in Base64 format, see 3GPP
5036 * TS 31.102 7.1.2
5037 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
5038 * NULL if no value
5039 *
5040 * "response" Base64 encoded strings containing response:
5041 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
5042 * int sw2;
5043 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
5044 */
Amit Mahajan2b772032014-06-26 14:20:11 -07005045#define RIL_REQUEST_SIM_AUTHENTICATION 125
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08005046
Wink Savillec29360a2014-07-13 05:17:28 -07005047/**
5048 * RIL_REQUEST_GET_DC_RT_INFO
5049 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005050 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005051 * Requests the Data Connection Real Time Info
5052 *
5053 * "data" is NULL
5054 *
5055 * "response" is the most recent RIL_DcRtInfo
5056 *
5057 * Valid errors:
5058 * SUCCESS
5059 * RADIO_NOT_AVAILABLE
Wink Savillec29360a2014-07-13 05:17:28 -07005060 *
5061 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
5062 */
5063#define RIL_REQUEST_GET_DC_RT_INFO 126
5064
5065/**
5066 * RIL_REQUEST_SET_DC_RT_INFO_RATE
5067 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005068 * The request is DEPRECATED
Wink Savillec29360a2014-07-13 05:17:28 -07005069 * This is the minimum number of milliseconds between successive
5070 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
5071 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
5072 * 0 means send as fast as possible.
5073 *
5074 * "data" The number of milliseconds as an int
5075 *
5076 * "response" is null
5077 *
5078 * Valid errors:
5079 * SUCCESS must not fail
5080 */
5081#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
5082
Amit Mahajanc796e222014-08-13 16:54:01 +00005083/**
5084 * RIL_REQUEST_SET_DATA_PROFILE
5085 *
5086 * Set data profile in modem
Hui Wang8d679622014-10-16 14:59:27 -05005087 * Modem should erase existed profiles from framework, and apply new profiles
Jack Yu06181bb2017-01-10 12:10:41 -08005088 * "data" is a const RIL_DataProfileInfo **
Amit Mahajanc796e222014-08-13 16:54:01 +00005089 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
5090 * "response" is NULL
5091 *
5092 * Valid errors:
5093 * SUCCESS
5094 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajanc796e222014-08-13 16:54:01 +00005095 * SUBSCRIPTION_NOT_AVAILABLE
5096 */
5097#define RIL_REQUEST_SET_DATA_PROFILE 128
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005098
5099/**
5100 * RIL_REQUEST_SHUTDOWN
5101 *
5102 * Device is shutting down. All further commands are ignored
5103 * and RADIO_NOT_AVAILABLE must be returned.
5104 *
5105 * "data" is null
5106 * "response" is NULL
5107 *
5108 * Valid errors:
5109 * SUCCESS
5110 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005111 * OPERATION_NOT_ALLOWED
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005112 */
5113#define RIL_REQUEST_SHUTDOWN 129
5114
Wink Saville8b4e4f72014-10-17 15:01:45 -07005115/**
5116 * RIL_REQUEST_GET_RADIO_CAPABILITY
5117 *
5118 * Used to get phone radio capablility.
5119 *
Abhishek Adappa772c0d22015-02-09 11:11:12 -08005120 * "data" is the RIL_RadioCapability structure
Wink Saville8b4e4f72014-10-17 15:01:45 -07005121 *
5122 * Valid errors:
5123 * SUCCESS
5124 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005125 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005126 */
5127#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
5128
5129/**
5130 * RIL_REQUEST_SET_RADIO_CAPABILITY
5131 *
5132 * Used to set the phones radio capability. Be VERY careful
5133 * using this request as it may cause some vendor modems to reset. Because
5134 * of the possible modem reset any RIL commands after this one may not be
5135 * processed.
5136 *
5137 * "data" is the RIL_RadioCapability structure
5138 *
5139 * "response" is the RIL_RadioCapability structure, used to feedback return status
5140 *
5141 * Valid errors:
5142 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
5143 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005144 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005145 */
5146#define RIL_REQUEST_SET_RADIO_CAPABILITY 131
5147
fengluf7408292015-04-14 14:53:55 -07005148/**
5149 * RIL_REQUEST_START_LCE
5150 *
5151 * Start Link Capacity Estimate (LCE) service if supported by the radio.
5152 *
5153 * "data" is const int *
5154 * ((const int*)data)[0] specifies the desired reporting interval (ms).
fenglu290add32015-05-01 17:05:15 -07005155 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
fengluf7408292015-04-14 14:53:55 -07005156 *
fenglu290add32015-05-01 17:05:15 -07005157 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005158 *
5159 * Valid errors:
5160 * SUCCESS
5161 * RADIO_NOT_AVAILABLE
5162 * LCE_NOT_SUPPORTED
5163 */
5164#define RIL_REQUEST_START_LCE 132
5165
5166/**
5167 * RIL_REQUEST_STOP_LCE
5168 *
5169 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
5170 * idempotent for the radio modem.
5171 *
fenglu290add32015-05-01 17:05:15 -07005172 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005173 *
5174 * Valid errors:
5175 * SUCCESS
5176 * RADIO_NOT_AVAILABLE
5177 * LCE_NOT_SUPPORTED
5178 */
5179#define RIL_REQUEST_STOP_LCE 133
5180
5181/**
5182 * RIL_REQUEST_PULL_LCEDATA
5183 *
5184 * Pull LCE service for capacity information.
5185 *
fenglu290add32015-05-01 17:05:15 -07005186 * "response" is the RIL_LceDataInfo.
fengluf7408292015-04-14 14:53:55 -07005187 *
5188 * Valid errors:
5189 * SUCCESS
5190 * RADIO_NOT_AVAILABLE
5191 * LCE_NOT_SUPPORTED
5192 */
5193#define RIL_REQUEST_PULL_LCEDATA 134
5194
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005195/**
5196 * RIL_REQUEST_GET_ACTIVITY_INFO
5197 *
Nathan Haroldc8635212016-10-10 11:15:21 -07005198 * Get modem activity information for power consumption estimation.
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005199 *
Nathan Haroldc8635212016-10-10 11:15:21 -07005200 * Request clear-on-read statistics information that is used for
5201 * estimating the per-millisecond power consumption of the cellular
5202 * modem.
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005203 *
5204 * "data" is null
5205 * "response" is const RIL_ActivityStatsInfo *
5206 *
5207 * Valid errors:
5208 *
5209 * SUCCESS
5210 * RADIO_NOT_AVAILABLE (radio resetting)
5211 * GENERIC_FAILURE
5212 */
5213#define RIL_REQUEST_GET_ACTIVITY_INFO 135
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005214
Meng Wangb4e34312016-05-12 14:54:36 -07005215/**
5216 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS
5217 *
Meng Wangd5c540f2016-07-15 15:41:19 -07005218 * Set carrier restrictions for this sim slot. Expected modem behavior:
5219 * If never receives this command
5220 * - Must allow all carriers
5221 * Receives this command with data being NULL
5222 * - Must allow all carriers. If a previously allowed SIM is present, modem must not reload
5223 * the SIM. If a previously disallowed SIM is present, reload the SIM and notify Android.
5224 * Receives this command with a list of carriers
5225 * - Only allow specified carriers, persist across power cycles and FDR. If a present SIM
5226 * is in the allowed list, modem must not reload the SIM. If a present SIM is *not* in
5227 * the allowed list, modem must detach from the registered network and only keep emergency
5228 * service, and notify Android SIM refresh reset with new SIM state being
5229 * RIL_CARDSTATE_RESTRICTED. Emergency service must be enabled.
Meng Wangb4e34312016-05-12 14:54:36 -07005230 *
5231 * "data" is const RIL_CarrierRestrictions *
5232 * A list of allowed carriers and possibly a list of excluded carriers.
5233 * If data is NULL, means to clear previous carrier restrictions and allow all carriers
5234 *
5235 * "response" is int *
5236 * ((int *)data)[0] contains the number of allowed carriers which have been set correctly.
5237 * On success, it should match the length of list data->allowed_carriers.
5238 * If data is NULL, the value must be 0.
5239 *
5240 * Valid errors:
5241 * RIL_E_SUCCESS
5242 * RIL_E_INVALID_ARGUMENTS
5243 * RIL_E_RADIO_NOT_AVAILABLE
5244 * RIL_E_REQUEST_NOT_SUPPORTED
5245 */
5246#define RIL_REQUEST_SET_CARRIER_RESTRICTIONS 136
5247
5248/**
5249 * RIL_REQUEST_GET_CARRIER_RESTRICTIONS
5250 *
Meng Wangd5c540f2016-07-15 15:41:19 -07005251 * Get carrier restrictions for this sim slot. Expected modem behavior:
5252 * Return list of allowed carriers, or null if all carriers are allowed.
Meng Wangb4e34312016-05-12 14:54:36 -07005253 *
5254 * "data" is NULL
5255 *
5256 * "response" is const RIL_CarrierRestrictions *.
5257 * If response is NULL, it means all carriers are allowed.
5258 *
5259 * Valid errors:
5260 * RIL_E_SUCCESS
5261 * RIL_E_RADIO_NOT_AVAILABLE
5262 * RIL_E_REQUEST_NOT_SUPPORTED
5263 */
5264#define RIL_REQUEST_GET_CARRIER_RESTRICTIONS 137
5265
Jack Yu06181bb2017-01-10 12:10:41 -08005266/**
5267 * RIL_REQUEST_SEND_DEVICE_STATE
5268 *
5269 * Send the updated device state.
5270 * Modem can perform power saving based on the provided device state.
5271 * "data" is const int *
5272 * ((const int*)data)[0] A RIL_DeviceStateType that specifies the device state type.
5273 * ((const int*)data)[1] Specifies the state. See RIL_DeviceStateType for the definition of each
5274 * type.
5275 *
5276 * "datalen" is count * sizeof(const RIL_DeviceState *)
5277 * "response" is NULL
5278 *
5279 * Valid errors:
5280 * SUCCESS
5281 * RADIO_NOT_AVAILABLE (radio resetting)
5282 */
5283#define RIL_REQUEST_SEND_DEVICE_STATE 138
5284
5285/**
5286 * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER
5287 *
5288 * Set the unsolicited response filter
5289 * This is used to prevent unnecessary application processor
5290 * wake up for power saving purposes by suppressing the
5291 * unsolicited responses in certain scenarios.
5292 *
5293 * "data" is an int *
5294 *
5295 * ((int *)data)[0] is a 32-bit bitmask of RIL_UnsolicitedResponseFilter
5296 *
5297 * "response" is NULL
5298 *
5299 * Valid errors:
5300 * SUCCESS
5301 * INVALID_ARGUMENTS (e.g. the requested filter doesn't exist)
5302 * RADIO_NOT_AVAILABLE (radio resetting)
5303 */
5304#define RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER 139
5305
Wileen Chiu718c0bf2017-01-04 11:37:19 -08005306 /**
5307 * RIL_REQUEST_SET_SIM_CARD_POWER
5308 *
5309 * Set SIM card power up or down
5310 *
5311 * Request is equivalent to inserting and removing the card, with
5312 * an additional effect where the ability to detect card removal/insertion
5313 * is disabled when the SIM card is powered down.
5314 *
5315 * This will generate RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5316 * as if the SIM had been inserted or removed.
5317 *
5318 * "data" is int *
5319 * ((int *)data)[0] is 1 for "SIM POWER UP"
5320 * ((int *)data)[0] is 0 for "SIM POWER DOWN"
5321 *
5322 * "response" is NULL
5323 *
5324 * Valid errors:
5325 * SUCCESS
5326 * RADIO_NOT_AVAILABLE
5327 * REQUEST_NOT_SUPPORTED
5328 * SIM_ABSENT
5329 * INVALID_ARGUMENTS
5330 */
5331#define RIL_REQUEST_SET_SIM_CARD_POWER 140
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005332/***********************************************************************/
5333
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005334/**
5335 * RIL_RESPONSE_ACKNOWLEDGEMENT
5336 *
5337 * This is used by Asynchronous solicited messages and Unsolicited messages
5338 * to acknowledge the receipt of those messages in RIL.java so that the ack
5339 * can be used to let ril.cpp to release wakelock.
5340 *
5341 * Valid errors
5342 * SUCCESS
5343 * RADIO_NOT_AVAILABLE
5344 */
5345
5346#define RIL_RESPONSE_ACKNOWLEDGEMENT 800
5347
5348/***********************************************************************/
5349
Wink Savillef4c4d362009-04-02 01:37:03 -07005350
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005351#define RIL_UNSOL_RESPONSE_BASE 1000
5352
5353/**
5354 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
5355 *
5356 * Indicate when value of RIL_RadioState has changed.
5357 *
5358 * Callee will invoke RIL_RadioStateRequest method on main thread
5359 *
5360 * "data" is NULL
5361 */
5362
5363#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
5364
5365
5366/**
5367 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
5368 *
5369 * Indicate when call state has changed
5370 *
5371 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
5372 *
5373 * "data" is NULL
5374 *
Wink Saville7f856802009-06-09 10:23:37 -07005375 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005376 * "RING", "BUSY", "NO CARRIER", and also call state
5377 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
5378 *
5379 * Redundent or extraneous invocations are tolerated
5380 */
5381#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
5382
5383
5384/**
Wink Savillec0114b32011-02-18 10:14:07 -08005385 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005386 *
Wink Savillec0114b32011-02-18 10:14:07 -08005387 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005388 *
5389 * Callee will invoke the following requests on main thread:
5390 *
Wink Savillec0114b32011-02-18 10:14:07 -08005391 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005392 * RIL_REQUEST_OPERATOR
5393 *
5394 * "data" is NULL
5395 *
5396 * FIXME should this happen when SIM records are loaded? (eg, for
5397 * EONS)
5398 */
Wink Savillec0114b32011-02-18 10:14:07 -08005399#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005400
5401/**
5402 * RIL_UNSOL_RESPONSE_NEW_SMS
5403 *
5404 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07005405 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005406 * "data" is const char *
5407 * This is a pointer to a string containing the PDU of an SMS-DELIVER
5408 * as an ascii string of hex digits. The PDU starts with the SMSC address
5409 * per TS 27.005 (+CMT:)
5410 *
5411 * Callee will subsequently confirm the receipt of thei SMS with a
5412 * RIL_REQUEST_SMS_ACKNOWLEDGE
5413 *
Wink Saville7f856802009-06-09 10:23:37 -07005414 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005415 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5416 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5417 */
5418
5419#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
5420
5421/**
5422 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
5423 *
5424 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07005425 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005426 * "data" is const char *
5427 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
5428 * as an ascii string of hex digits. The PDU starts with the SMSC address
5429 * per TS 27.005 (+CDS:).
5430 *
5431 * Callee will subsequently confirm the receipt of the SMS with a
5432 * RIL_REQUEST_SMS_ACKNOWLEDGE
5433 *
Wink Saville7f856802009-06-09 10:23:37 -07005434 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005435 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5436 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5437 */
5438
5439#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
5440
5441/**
5442 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
5443 *
5444 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07005445 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005446 * "data" is const int *
5447 * ((const int *)data)[0] contains the slot index on the SIM that contains
5448 * the new message
5449 */
5450
5451#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
5452
5453/**
5454 * RIL_UNSOL_ON_USSD
5455 *
5456 * Called when a new USSD message is received.
5457 *
5458 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07005459 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005460 * one of these string values:
5461 * "0" USSD-Notify -- text in ((const char **)data)[1]
5462 * "1" USSD-Request -- text in ((const char **)data)[1]
5463 * "2" Session terminated by network
5464 * "3" other local client (eg, SIM Toolkit) has responded
5465 * "4" Operation not supported
5466 * "5" Network timeout
5467 *
5468 * The USSD session is assumed to persist if the type code is "1", otherwise
5469 * the current session (if any) is assumed to have terminated.
5470 *
5471 * ((const char **)data)[1] points to a message string if applicable, which
5472 * should always be in UTF-8.
5473 */
5474#define RIL_UNSOL_ON_USSD 1006
5475/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
5476
5477/**
5478 * RIL_UNSOL_ON_USSD_REQUEST
5479 *
5480 * Obsolete. Send via RIL_UNSOL_ON_USSD
5481 */
Wink Saville7f856802009-06-09 10:23:37 -07005482#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005483
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005484/**
5485 * RIL_UNSOL_NITZ_TIME_RECEIVED
5486 *
5487 * Called when radio has received a NITZ time message
5488 *
5489 * "data" is const char * pointing to NITZ time string
5490 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
5491 */
5492#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
5493
5494/**
5495 * RIL_UNSOL_SIGNAL_STRENGTH
5496 *
5497 * Radio may report signal strength rather han have it polled.
5498 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005499 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005500 */
5501#define RIL_UNSOL_SIGNAL_STRENGTH 1009
5502
5503
5504/**
Wink Savillef4c4d362009-04-02 01:37:03 -07005505 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005506 *
Wink Savillec0114b32011-02-18 10:14:07 -08005507 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07005508 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
5509 * of current data contexts including new contexts that have been
5510 * activated. A data call is only removed from this list when the
5511 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
5512 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005513 *
Wink Savillef4c4d362009-04-02 01:37:03 -07005514 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005515 */
5516
Wink Savillef4c4d362009-04-02 01:37:03 -07005517#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005518
5519/**
5520 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
5521 *
5522 * Reports supplementary service related notification from the network.
5523 *
5524 * "data" is a const RIL_SuppSvcNotification *
5525 *
5526 */
5527
5528#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
5529
5530/**
5531 * RIL_UNSOL_STK_SESSION_END
5532 *
5533 * Indicate when STK session is terminated by SIM.
5534 *
5535 * "data" is NULL
5536 */
5537#define RIL_UNSOL_STK_SESSION_END 1012
5538
5539/**
5540 * RIL_UNSOL_STK_PROACTIVE_COMMAND
5541 *
5542 * Indicate when SIM issue a STK proactive command to applications
5543 *
5544 * "data" is a const char * containing SAT/USAT proactive command
5545 * in hexadecimal format string starting with command tag
5546 *
5547 */
5548#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
5549
5550/**
5551 * RIL_UNSOL_STK_EVENT_NOTIFY
5552 *
5553 * Indicate when SIM notifies applcations some event happens.
5554 * Generally, application does not need to have any feedback to
5555 * SIM but shall be able to indicate appropriate messages to users.
5556 *
5557 * "data" is a const char * containing SAT/USAT commands or responses
5558 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
5559 * starting with first byte of response data or command tag
5560 *
5561 */
5562#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
5563
5564/**
5565 * RIL_UNSOL_STK_CALL_SETUP
5566 *
5567 * Indicate when SIM wants application to setup a voice call.
5568 *
5569 * "data" is const int *
5570 * ((const int *)data)[0] contains timeout value (in milliseconds)
5571 */
5572#define RIL_UNSOL_STK_CALL_SETUP 1015
5573
5574/**
5575 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
5576 *
5577 * Indicates that SMS storage on the SIM is full. Sent when the network
5578 * attempts to deliver a new SMS message. Messages cannot be saved on the
5579 * SIM until space is freed. In particular, incoming Class 2 messages
5580 * cannot be stored.
5581 *
5582 * "data" is null
5583 *
5584 */
5585#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
5586
5587/**
5588 * RIL_UNSOL_SIM_REFRESH
5589 *
5590 * Indicates that file(s) on the SIM have been updated, or the SIM
5591 * has been reinitialized.
5592 *
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005593 * In the case where RIL is version 6 or older:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005594 * "data" is an int *
5595 * ((int *)data)[0] is a RIL_SimRefreshResult.
5596 * ((int *)data)[1] is the EFID of the updated file if the result is
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005597 * SIM_FILE_UPDATE or NULL for any other result.
5598 *
5599 * In the case where RIL is version 7:
5600 * "data" is a RIL_SimRefreshResponse_v7 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005601 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005602 * Note: If the SIM state changes as a result of the SIM refresh (eg,
5603 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005604 * should be sent.
5605 */
5606#define RIL_UNSOL_SIM_REFRESH 1017
5607
5608/**
5609 * RIL_UNSOL_CALL_RING
5610 *
5611 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07005612 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
5613 * of a call and sending multiple is optional. If the system property
5614 * ro.telephony.call_ring.multiple is false then the upper layers
5615 * will generate the multiple events internally. Otherwise the vendor
5616 * ril must generate multiple RIL_UNSOL_CALL_RING if
5617 * ro.telephony.call_ring.multiple is true or if it is absent.
5618 *
5619 * The rate of these events is controlled by ro.telephony.call_ring.delay
5620 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005621 *
Wink Saville3d54e742009-05-18 18:00:44 -07005622 * "data" is null for GSM
5623 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005624 */
5625#define RIL_UNSOL_CALL_RING 1018
5626
The Android Open Source Project34a51082009-03-05 14:34:37 -08005627/**
5628 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5629 *
5630 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07005631 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005632 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07005633
The Android Open Source Project34a51082009-03-05 14:34:37 -08005634 * "data" is null
5635 */
5636#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
5637
5638/**
5639 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
5640 *
5641 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07005642 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005643 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07005644 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005645 * Callee will subsequently confirm the receipt of the SMS with
5646 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07005647 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005648 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
5649 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07005650 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005651 */
5652#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
5653
5654/**
5655 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
5656 *
5657 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07005658 *
Henrik Hall0eba2022010-11-25 10:20:56 +01005659 * "data" can be one of the following:
5660 * If received from GSM network, "data" is const char of 88 bytes
5661 * which indicates each page of a CBS Message sent to the MS by the
5662 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
5663 * If received from UMTS network, "data" is const char of 90 up to 1252
5664 * bytes which contain between 1 and 15 CBS Message pages sent as one
5665 * 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 -07005666 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005667 */
5668#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07005669
The Android Open Source Project34a51082009-03-05 14:34:37 -08005670/**
5671 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
5672 *
5673 * Indicates that SMS storage on the RUIM is full. Messages
5674 * cannot be saved on the RUIM until space is freed.
5675 *
5676 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07005677 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005678 */
Wink Savillef4c4d362009-04-02 01:37:03 -07005679#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
5680
The Android Open Source Project34a51082009-03-05 14:34:37 -08005681/**
5682 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
5683 *
5684 * Indicates a restricted state change (eg, for Domain Specific Access Control).
5685 *
5686 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
5687 *
5688 * "data" is an int *
5689 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
5690 */
5691#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
5692
Wink Saville1b5fd232009-04-22 14:50:00 -07005693/**
5694 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
5695 *
5696 * Indicates that the radio system selection module has
5697 * autonomously entered emergency callback mode.
5698 *
5699 * "data" is null
5700 *
5701 */
5702#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08005703
Wink Saville1b5fd232009-04-22 14:50:00 -07005704/**
5705 * RIL_UNSOL_CDMA_CALL_WAITING
5706 *
5707 * Called when CDMA radio receives a call waiting indication.
5708 *
5709 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07005710 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005711 */
5712#define RIL_UNSOL_CDMA_CALL_WAITING 1025
5713
5714/**
5715 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
5716 *
5717 * Called when CDMA radio receives an update of the progress of an
5718 * OTASP/OTAPA call.
5719 *
5720 * "data" is const int *
5721 * For CDMA this is an integer OTASP/OTAPA status listed in
5722 * RIL_CDMA_OTA_ProvisionStatus.
5723 *
5724 */
5725#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
5726
5727/**
5728 * RIL_UNSOL_CDMA_INFO_REC
5729 *
5730 * Called when CDMA radio receives one or more info recs.
5731 *
5732 * "data" is const RIL_CDMA_InformationRecords *
5733 *
5734 */
5735#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08005736
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07005737/**
5738 * RIL_UNSOL_OEM_HOOK_RAW
5739 *
5740 * This is for OEM specific use.
5741 *
5742 * "data" is a byte[]
5743 */
5744#define RIL_UNSOL_OEM_HOOK_RAW 1028
5745
John Wang5d621da2009-09-18 17:17:48 -07005746/**
5747 * RIL_UNSOL_RINGBACK_TONE
5748 *
5749 * Indicates that nework doesn't have in-band information, need to
5750 * play out-band tone.
5751 *
5752 * "data" is an int *
5753 * ((int *)data)[0] == 0 for stop play ringback tone.
5754 * ((int *)data)[0] == 1 for start play ringback tone.
5755 */
5756#define RIL_UNSOL_RINGBACK_TONE 1029
5757
John Wang5909cf82010-01-29 00:18:54 -08005758/**
5759 * RIL_UNSOL_RESEND_INCALL_MUTE
5760 *
5761 * Indicates that framework/application need reset the uplink mute state.
5762 *
5763 * There may be situations where the mute state becomes out of sync
5764 * between the application and device in some GSM infrastructures.
5765 *
5766 * "data" is null
5767 */
5768#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08005769
5770/**
5771 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
5772 *
5773 * Called when CDMA subscription source changed.
5774 *
5775 * "data" is int *
5776 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
5777 */
Wink Saville29487ef2011-04-15 09:15:31 -07005778#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08005779
5780/**
5781 * RIL_UNSOL_CDMA_PRL_CHANGED
5782 *
5783 * Called when PRL (preferred roaming list) changes.
5784 *
5785 * "data" is int *
5786 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
5787 */
5788#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
5789
5790/**
5791 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
5792 *
5793 * Called when Emergency Callback Mode Ends
5794 *
5795 * Indicates that the radio system selection module has
5796 * proactively exited emergency callback mode.
5797 *
5798 * "data" is NULL
5799 *
5800 */
5801#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
5802
Wink Saville5b9df332011-04-06 16:24:21 -07005803/**
5804 * RIL_UNSOL_RIL_CONNECTED
5805 *
5806 * Called the ril connects and returns the version
5807 *
5808 * "data" is int *
5809 * ((int *)data)[0] is RIL_VERSION
5810 */
5811#define RIL_UNSOL_RIL_CONNECTED 1034
5812
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005813/**
5814 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
5815 *
5816 * Indicates that voice technology has changed. Contains new radio technology
5817 * as a data in the message.
5818 *
5819 * "data" is int *
5820 * ((int *)data)[0] is of type const RIL_RadioTechnology
5821 *
5822 */
5823#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
5824
Wink Saville8a9e0212013-04-09 12:11:38 -07005825/**
5826 * RIL_UNSOL_CELL_INFO_LIST
5827 *
5828 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
5829 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
5830 *
5831 * "data" is NULL
5832 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08005833 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07005834 */
5835#define RIL_UNSOL_CELL_INFO_LIST 1036
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005836
Wink Saville865ce3b2013-11-08 16:37:01 -08005837/**
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005838 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
5839 *
Nathan Harold0eb43c22016-12-19 12:04:32 -08005840 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
5841 * instead, provide IMS registration status via an IMS Service.
5842 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005843 * Called when IMS registration state has changed
5844 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005845 * To get IMS registration state and IMS SMS format, callee needs to invoke the
5846 * following request on main thread:
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005847 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005848 * RIL_REQUEST_IMS_REGISTRATION_STATE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005849 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005850 * "data" is NULL
5851 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005852 */
5853#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
5854
Etan Cohend3652192014-06-20 08:28:44 -07005855/**
5856 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
5857 *
5858 * Indicated when there is a change in subscription status.
5859 * This event will be sent in the following scenarios
5860 * - subscription readiness at modem, which was selected by telephony layer
5861 * - when subscription is deactivated by modem due to UICC card removal
5862 * - When network invalidates the subscription i.e. attach reject due to authentication reject
5863 *
5864 * "data" is const int *
5865 * ((const int *)data)[0] == 0 for Subscription Deactivated
5866 * ((const int *)data)[0] == 1 for Subscription Activated
5867 *
5868 */
5869#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
5870
5871/**
5872 * RIL_UNSOL_SRVCC_STATE_NOTIFY
5873 *
5874 * Called when Single Radio Voice Call Continuity(SRVCC)
5875 * progress state has changed
5876 *
5877 * "data" is int *
5878 * ((int *)data)[0] is of type const RIL_SrvccState
5879 *
5880 */
5881
5882#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
5883
5884/**
5885 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
5886 *
5887 * Called when the hardware configuration associated with the RILd changes
5888 *
5889 * "data" is an array of RIL_HardwareConfig
5890 *
5891 */
5892#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
5893
Wink Savillec29360a2014-07-13 05:17:28 -07005894/**
5895 * RIL_UNSOL_DC_RT_INFO_CHANGED
5896 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005897 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005898 * Sent when the DC_RT_STATE changes but the time
5899 * between these messages must not be less than the
5900 * value set by RIL_REQUEST_SET_DC_RT_RATE.
5901 *
5902 * "data" is the most recent RIL_DcRtInfo
5903 *
5904 */
5905#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
5906
Wink Saville8b4e4f72014-10-17 15:01:45 -07005907/**
5908 * RIL_UNSOL_RADIO_CAPABILITY
5909 *
5910 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
5911 * Returns the phone radio capability exactly as
5912 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
5913 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
5914 *
5915 * "data" is the RIL_RadioCapability structure
5916 */
5917#define RIL_UNSOL_RADIO_CAPABILITY 1042
5918
Amit Mahajan54563d32014-11-22 00:54:49 +00005919/*
5920 * RIL_UNSOL_ON_SS
5921 *
5922 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
5923 * call control.
5924 *
5925 * "data" is const RIL_StkCcUnsolSsResponse *
5926 *
5927 */
5928#define RIL_UNSOL_ON_SS 1043
5929
5930/**
5931 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
5932 *
5933 * Called when there is an ALPHA from UICC during Call Control.
5934 *
5935 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
5936 *
5937 */
5938#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
5939
fengluf7408292015-04-14 14:53:55 -07005940/**
5941 * RIL_UNSOL_LCEDATA_RECV
5942 *
5943 * Called when there is an incoming Link Capacity Estimate (LCE) info report.
5944 *
fenglu290add32015-05-01 17:05:15 -07005945 * "data" is the RIL_LceDataInfo structure.
fengluf7408292015-04-14 14:53:55 -07005946 *
5947 */
5948#define RIL_UNSOL_LCEDATA_RECV 1045
5949
Robert Greenwalt27e99c52016-06-01 16:31:38 -07005950 /**
5951 * RIL_UNSOL_PCO_DATA
5952 *
5953 * Called when there is new Carrier PCO data received for a data call. Ideally
5954 * only new data will be forwarded, though this is not required. Multiple
5955 * boxes of carrier PCO data for a given call should result in a series of
5956 * RIL_UNSOL_PCO_DATA calls.
5957 *
5958 * "data" is the RIL_PCO_Data structure.
5959 *
5960 */
5961#define RIL_UNSOL_PCO_DATA 1046
5962
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005963/***********************************************************************/
5964
Amit Mahajan54563d32014-11-22 00:54:49 +00005965
Etan Cohend3652192014-06-20 08:28:44 -07005966#if defined(ANDROID_MULTI_SIM)
5967/**
5968 * RIL_Request Function pointer
5969 *
5970 * @param request is one of RIL_REQUEST_*
5971 * @param data is pointer to data defined for that RIL_REQUEST_*
5972 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07005973 * structures passed as data may contain pointers to non-contiguous memory
Etan Cohend3652192014-06-20 08:28:44 -07005974 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07005975 * @param datalen is the length of "data" which is defined as other argument. It may or may
5976 * not be equal to sizeof(data). Refer to the documentation of individual structures
5977 * to find if pointers listed in the structure are contiguous and counted in the datalen
5978 * length or not.
5979 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
Etan Cohend3652192014-06-20 08:28:44 -07005980 *
5981 */
5982typedef void (*RIL_RequestFunc) (int request, void *data,
5983 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
5984
5985/**
5986 * This function should return the current radio state synchronously
5987 */
5988typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
5989
5990#else
5991/* Backward compatible */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005992
5993/**
5994 * RIL_Request Function pointer
5995 *
5996 * @param request is one of RIL_REQUEST_*
5997 * @param data is pointer to data defined for that RIL_REQUEST_*
5998 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07005999 * structures passed as data may contain pointers to non-contiguous memory
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006000 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07006001 * @param datalen is the length of "data" which is defined as other argument. It may or may
6002 * not be equal to sizeof(data). Refer to the documentation of individual structures
6003 * to find if pointers listed in the structure are contiguous and counted in the datalen
6004 * length or not.
6005 * (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 -08006006 *
6007 */
Wink Saville7f856802009-06-09 10:23:37 -07006008typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006009 size_t datalen, RIL_Token t);
6010
6011/**
6012 * This function should return the current radio state synchronously
6013 */
6014typedef RIL_RadioState (*RIL_RadioStateRequest)();
6015
Etan Cohend3652192014-06-20 08:28:44 -07006016#endif
6017
6018
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006019/**
6020 * This function returns "1" if the specified RIL_REQUEST code is
6021 * supported and 0 if it is not
6022 *
6023 * @param requestCode is one of RIL_REQUEST codes
6024 */
6025
6026typedef int (*RIL_Supports)(int requestCode);
6027
6028/**
Wink Saville7f856802009-06-09 10:23:37 -07006029 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006030 * thread that calls RIL_RequestFunc--and indicates that a pending
6031 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07006032 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006033 * On cancel, the callee should do its best to abandon the request and
6034 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
6035 *
6036 * Subsequent calls to RIL_onRequestComplete for this request with
6037 * other results will be tolerated but ignored. (That is, it is valid
6038 * to ignore the cancellation request)
6039 *
6040 * RIL_Cancel calls should return immediately, and not wait for cancellation
6041 *
Wink Saville7f856802009-06-09 10:23:37 -07006042 * 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 -08006043 * interface
6044 *
6045 * @param t token wants to be canceled
6046 */
6047
6048typedef void (*RIL_Cancel)(RIL_Token t);
6049
6050typedef void (*RIL_TimedCallback) (void *param);
6051
6052/**
6053 * Return a version string for your RIL implementation
6054 */
6055typedef const char * (*RIL_GetVersion) (void);
6056
6057typedef struct {
6058 int version; /* set to RIL_VERSION */
6059 RIL_RequestFunc onRequest;
6060 RIL_RadioStateRequest onStateRequest;
6061 RIL_Supports supports;
6062 RIL_Cancel onCancel;
6063 RIL_GetVersion getVersion;
6064} RIL_RadioFunctions;
6065
Sungmin Choi75697532013-04-26 15:04:45 -07006066typedef struct {
Jack Yu06181bb2017-01-10 12:10:41 -08006067 char *apn; /* the APN to connect to */
6068 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
6069 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/
6070 int authtype; /* authentication protocol used for this PDP context
6071 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */
6072 char *username; /* the username for APN, or NULL */
6073 char *password; /* the password for APN, or NULL */
Sungmin Choi75697532013-04-26 15:04:45 -07006074} RIL_InitialAttachApn;
6075
Amit Mahajan2b772032014-06-26 14:20:11 -07006076typedef struct {
Jack Yu06181bb2017-01-10 12:10:41 -08006077 char *apn; /* the APN to connect to */
6078 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
6079 home network. For example, "IP", "IPV6", "IPV4V6", or "PPP". */
6080 char *roamingProtocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
6081 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/
6082 int authtype; /* authentication protocol used for this PDP context
6083 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */
6084 char *username; /* the username for APN, or NULL */
6085 char *password; /* the password for APN, or NULL */
6086 int supportedTypesBitmask; /* supported APN types bitmask. See RIL_ApnTypes for the value of
6087 each bit. */
6088 int bearerBitmask; /* the bearer bitmask. See RIL_RadioAccessFamily for the value of
6089 each bit. */
6090 int modemCognitive; /* indicating the APN setting was sent to the modem through
6091 setDataProfile earlier. */
6092 int mtu; /* maximum transmission unit (MTU) size in bytes */
6093 char *mvnoType; /* the MVNO type: possible values are "imsi", "gid", "spn" */
6094 char *mvnoMatchData; /* MVNO match data. Can be anything defined by the carrier.
6095 For example,
6096 SPN like: "A MOBILE", "BEN NL", etc...
6097 IMSI like: "302720x94", "2060188", etc...
6098 GID like: "4E", "33", etc... */
6099} RIL_InitialAttachApn_v15;
6100
6101typedef struct {
Amit Mahajan2b772032014-06-26 14:20:11 -07006102 int authContext; /* P2 value of authentication command, see P2 parameter in
6103 3GPP TS 31.102 7.1.2 */
6104 char *authData; /* the challenge string in Base64 format, see 3GPP
6105 TS 31.102 7.1.2 */
6106 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
6107 NULL if no value. */
6108} RIL_SimAuthentication;
6109
Robert Greenwalt17ea3fa2016-06-15 14:59:38 -07006110typedef struct {
Jack Yu06181bb2017-01-10 12:10:41 -08006111 int cid; /* Context ID, uniquely identifies this call */
6112 char *bearer_proto; /* One of the PDP_type values in TS 27.007 section 10.1.1.
6113 For example, "IP", "IPV6", "IPV4V6". */
6114 int pco_id; /* The protocol ID for this box. Note that only IDs from
6115 FF00H - FFFFH are accepted. If more than one is included
6116 from the network, multiple calls should be made to send all
6117 of them. */
6118 int contents_length; /* The number of octets in the contents. */
6119 char *contents; /* Carrier-defined content. It is binary, opaque and
6120 loosely defined in LTE Layer 3 spec 24.008 */
Robert Greenwalt17ea3fa2016-06-15 14:59:38 -07006121} RIL_PCO_Data;
6122
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006123#ifdef RIL_SHLIB
6124struct RIL_Env {
6125 /**
6126 * "t" is parameter passed in on previous call to RIL_Notification
6127 * routine.
6128 *
6129 * If "e" != SUCCESS, then response can be null/is ignored
6130 *
Wink Saville7f856802009-06-09 10:23:37 -07006131 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006132 * freed by callee
6133 *
6134 * RIL_onRequestComplete will return as soon as possible
6135 */
Wink Saville7f856802009-06-09 10:23:37 -07006136 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006137 void *response, size_t responselen);
6138
Etan Cohend3652192014-06-20 08:28:44 -07006139#if defined(ANDROID_MULTI_SIM)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006140 /**
6141 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
6142 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6143 *
6144 * "data" is owned by caller, and should not be modified or freed by callee
6145 */
Etan Cohend3652192014-06-20 08:28:44 -07006146 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
6147#else
6148 /**
6149 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
6150 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6151 *
6152 * "data" is owned by caller, and should not be modified or freed by callee
6153 */
6154 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
6155#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006156 /**
Wink Saville7f856802009-06-09 10:23:37 -07006157 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006158 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6159 * a relative time value at which the callback is invoked. If relativeTime is
6160 * NULL or points to a 0-filled structure, the callback will be invoked as
6161 * soon as possible
6162 */
6163
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07006164 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07006165 void *param, const struct timeval *relativeTime);
Sanket Padawe6ff9a872016-01-27 15:09:12 -08006166 /**
6167 * "t" is parameter passed in on previous call RIL_Notification routine
6168 *
6169 * RIL_onRequestAck will be called by vendor when an Async RIL request was received
6170 * by them and an ack needs to be sent back to java ril.
6171 */
6172 void (*OnRequestAck) (RIL_Token t);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006173};
6174
6175
Wink Saville7f856802009-06-09 10:23:37 -07006176/**
6177 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006178 * argc and argv will be command line arguments intended for the RIL implementation
6179 * Return NULL on error
6180 *
6181 * @param env is environment point defined as RIL_Env
6182 * @param argc number of arguments
6183 * @param argv list fo arguments
6184 *
6185 */
6186const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
6187
Sanket Padawe1be49ba2016-03-31 17:37:23 -07006188/**
6189 * If BT SAP(SIM Access Profile) is supported, then RIL implementations must define RIL_SAP_Init
6190 * for initializing RIL_RadioFunctions used for BT SAP communcations. It is called whenever RILD
6191 * starts or modem restarts. Returns handlers for SAP related request that are made on SAP
6192 * sepecific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init
6193 * and used on the general RIL socket.
6194 * argc and argv will be command line arguments intended for the RIL implementation
6195 * Return NULL on error.
6196 *
6197 * @param env is environment point defined as RIL_Env
6198 * @param argc number of arguments
6199 * @param argv list fo arguments
6200 *
6201 */
6202const RIL_RadioFunctions *RIL_SAP_Init(const struct RIL_Env *env, int argc, char **argv);
6203
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006204#else /* RIL_SHLIB */
6205
6206/**
6207 * Call this once at startup to register notification routine
6208 *
6209 * @param callbacks user-specifed callback function
6210 */
6211void RIL_register (const RIL_RadioFunctions *callbacks);
6212
Amit Mahajancd77a5b2016-08-25 11:19:21 -07006213void rilc_thread_pool();
6214
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006215
6216/**
6217 *
6218 * RIL_onRequestComplete will return as soon as possible
6219 *
6220 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07006221 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006222 * @param e error code
6223 * if "e" != SUCCESS, then response can be null/is ignored
6224 * @param response is owned by caller, and should not be modified or
6225 * freed by callee
6226 * @param responselen the length of response in byte
6227 */
Wink Saville7f856802009-06-09 10:23:37 -07006228void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006229 void *response, size_t responselen);
6230
Sanket Padawe6ff9a872016-01-27 15:09:12 -08006231/**
6232 * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and
6233 * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's
6234 * results, just that the command was received and will take a while. After sending this Ack
6235 * its vendor's responsibility to make sure that AP is up whenever needed while command is
6236 * being processed.
6237 *
6238 * @param t is parameter passed in on previous call to RIL_Notification
6239 * routine.
6240 */
6241void RIL_onRequestAck(RIL_Token t);
6242
Etan Cohend3652192014-06-20 08:28:44 -07006243#if defined(ANDROID_MULTI_SIM)
6244/**
6245 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6246 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6247 * "data" is owned by caller, and should not be modified or freed by callee
6248 * @param datalen the length of data in byte
6249 */
6250
6251void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
6252 size_t datalen, RIL_SOCKET_ID socket_id);
6253#else
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006254/**
6255 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6256 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6257 * "data" is owned by caller, and should not be modified or freed by callee
6258 * @param datalen the length of data in byte
6259 */
6260
Wink Saville7f856802009-06-09 10:23:37 -07006261void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006262 size_t datalen);
Etan Cohend3652192014-06-20 08:28:44 -07006263#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006264
6265/**
Wink Saville7f856802009-06-09 10:23:37 -07006266 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006267 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6268 * a relative time value at which the callback is invoked. If relativeTime is
6269 * NULL or points to a 0-filled structure, the callback will be invoked as
6270 * soon as possible
6271 *
6272 * @param callback user-specifed callback function
6273 * @param param parameter list
6274 * @param relativeTime a relative time value at which the callback is invoked
6275 */
6276
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07006277void RIL_requestTimedCallback (RIL_TimedCallback callback,
6278 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006279
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006280#endif /* RIL_SHLIB */
6281
6282#ifdef __cplusplus
6283}
6284#endif
6285
6286#endif /*ANDROID_RIL_H*/