blob: 33f8df07e299cbe2cd3a553c462a1b3043ffdbde [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.
Sanket Padawe88cf6a52016-01-11 12:45:43 -080085 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -080086#define RIL_VERSION 12
87#define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
Alex Yakavenka45e740e2012-01-31 11:48:27 -080088#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080089
Wink Savillea592eeb2009-05-22 13:26:36 -070090#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
91#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
92
Etan Cohend3652192014-06-20 08:28:44 -070093#define MAX_RILDS 3
Amit Mahajan7955c432017-03-28 11:17:55 -070094#define MAX_SERVICE_NAME_LENGTH 6
Etan Cohend3652192014-06-20 08:28:44 -070095#define MAX_CLIENT_ID_LENGTH 2
96#define MAX_DEBUG_SOCKET_NAME_LENGTH 12
97#define MAX_QEMU_PIPE_NAME_LENGTH 11
Wink Saville8b4e4f72014-10-17 15:01:45 -070098#define MAX_UUID_LENGTH 64
99
Etan Cohend3652192014-06-20 08:28:44 -0700100
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800101typedef void * RIL_Token;
102
103typedef enum {
Etan Cohend3652192014-06-20 08:28:44 -0700104 RIL_SOCKET_1,
105#if (SIM_COUNT >= 2)
106 RIL_SOCKET_2,
107#if (SIM_COUNT >= 3)
108 RIL_SOCKET_3,
109#endif
110#if (SIM_COUNT >= 4)
111 RIL_SOCKET_4,
112#endif
113#endif
114 RIL_SOCKET_NUM
115} RIL_SOCKET_ID;
116
117
118typedef enum {
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800119 RIL_E_SUCCESS = 0,
120 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
121 RIL_E_GENERIC_FAILURE = 2,
122 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
123 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
124 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
125 RIL_E_REQUEST_NOT_SUPPORTED = 6,
126 RIL_E_CANCELLED = 7,
127 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
128 call on a Class C GPRS device */
129 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
130 registers in network */
Wink Saville3d54e742009-05-18 18:00:44 -0700131 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
132 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
133 shall be retrieved because of SIM or RUIM
Wink Savillef4c4d362009-04-02 01:37:03 -0700134 card absent */
Wink Saville3d54e742009-05-18 18:00:44 -0700135 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
Wink Savillef4c4d362009-04-02 01:37:03 -0700136 location */
jsh602f80f2009-07-10 15:44:37 -0700137 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
John Wang75534472010-04-20 15:11:42 -0700138 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800139 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
John Wang75534472010-04-20 15:11:42 -0700140 illegal SIM or ME */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800141 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
Amit Mahajan54563d32014-11-22 00:54:49 +0000142 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
143 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
144 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
145 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
146 data */
147 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
148 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
149 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
150 request */
151 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
152 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
153 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
fengluf7408292015-04-14 14:53:55 -0700154 RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800155 RIL_E_LCE_NOT_SUPPORTED = 36, /* LCE service not supported(36 in RILConstants.java) */
156 RIL_E_NO_MEMORY = 37, /* Not sufficient memory to process the request */
Jayachandran Cb0cba832017-03-13 19:17:18 -0700157 RIL_E_INTERNAL_ERR = 38, /* Modem hit unexpected error scenario while handling
158 this request */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800159 RIL_E_SYSTEM_ERR = 39, /* Hit platform or system error */
Jayachandran Cb0cba832017-03-13 19:17:18 -0700160 RIL_E_MODEM_ERR = 40, /* Vendor RIL got unexpected or incorrect response
161 from modem for this request */
Ajay Nambi10345892016-03-19 09:02:28 -0700162 RIL_E_INVALID_STATE = 41, /* Unexpected request for the current state */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800163 RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */
164 RIL_E_SIM_ERR = 43, /* Received error from SIM card */
165 RIL_E_INVALID_ARGUMENTS = 44, /* Received invalid arguments in request */
166 RIL_E_INVALID_SIM_STATE = 45, /* Can not process the request in current SIM state */
167 RIL_E_INVALID_MODEM_STATE = 46, /* Can not process the request in current Modem state */
168 RIL_E_INVALID_CALL_ID = 47, /* Received invalid call id in request */
169 RIL_E_NO_SMS_TO_ACK = 48, /* ACK received when there is no SMS to ack */
Nathan Haroldc97b2842016-02-02 12:04:35 -0800170 RIL_E_NETWORK_ERR = 49, /* Received error from network */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800171 RIL_E_REQUEST_RATE_LIMITED = 50, /* Operation denied due to overly-frequent requests */
twen.changdf7add02016-03-04 18:27:48 +0800172 RIL_E_SIM_BUSY = 51, /* SIM is busy */
173 RIL_E_SIM_FULL = 52, /* The target EF is full */
174 RIL_E_NETWORK_REJECT = 53, /* Request is rejected by network */
175 RIL_E_OPERATION_NOT_ALLOWED = 54, /* Not allowed the request now */
176 RIL_E_EMPTY_RECORD = 55, /* The request record is empty */
Ajay Nambi68900f52016-03-11 12:02:55 -0800177 RIL_E_INVALID_SMS_FORMAT = 56, /* Invalid sms format */
178 RIL_E_ENCODING_ERR = 57, /* Message not encoded properly */
179 RIL_E_INVALID_SMSC_ADDRESS = 58, /* SMSC address specified is invalid */
180 RIL_E_NO_SUCH_ENTRY = 59, /* No such entry present to perform the request */
181 RIL_E_NETWORK_NOT_READY = 60, /* Network is not ready to perform the request */
182 RIL_E_NOT_PROVISIONED = 61, /* Device doesnot have this value provisioned */
Ajay Nambi10345892016-03-19 09:02:28 -0700183 RIL_E_NO_SUBSCRIPTION = 62, /* Device doesnot have subscription */
184 RIL_E_NO_NETWORK_FOUND = 63, /* Network cannot be found */
185 RIL_E_DEVICE_IN_USE = 64, /* Operation cannot be performed because the device
186 is currently in use */
187 RIL_E_ABORTED = 65, /* Operation aborted */
Sanket Padawef220dc52017-01-02 23:46:00 -0800188 RIL_E_INVALID_RESPONSE = 66, /* Invalid response sent by vendor code */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800189 // OEM specific error codes. To be used by OEM when they don't want to reveal
190 // specific error codes which would be replaced by Generic failure.
191 RIL_E_OEM_ERROR_1 = 501,
192 RIL_E_OEM_ERROR_2 = 502,
193 RIL_E_OEM_ERROR_3 = 503,
194 RIL_E_OEM_ERROR_4 = 504,
195 RIL_E_OEM_ERROR_5 = 505,
196 RIL_E_OEM_ERROR_6 = 506,
197 RIL_E_OEM_ERROR_7 = 507,
198 RIL_E_OEM_ERROR_8 = 508,
199 RIL_E_OEM_ERROR_9 = 509,
200 RIL_E_OEM_ERROR_10 = 510,
201 RIL_E_OEM_ERROR_11 = 511,
202 RIL_E_OEM_ERROR_12 = 512,
203 RIL_E_OEM_ERROR_13 = 513,
204 RIL_E_OEM_ERROR_14 = 514,
205 RIL_E_OEM_ERROR_15 = 515,
206 RIL_E_OEM_ERROR_16 = 516,
207 RIL_E_OEM_ERROR_17 = 517,
208 RIL_E_OEM_ERROR_18 = 518,
209 RIL_E_OEM_ERROR_19 = 519,
210 RIL_E_OEM_ERROR_20 = 520,
211 RIL_E_OEM_ERROR_21 = 521,
212 RIL_E_OEM_ERROR_22 = 522,
213 RIL_E_OEM_ERROR_23 = 523,
214 RIL_E_OEM_ERROR_24 = 524,
215 RIL_E_OEM_ERROR_25 = 525
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800216} RIL_Errno;
217
218typedef enum {
219 RIL_CALL_ACTIVE = 0,
220 RIL_CALL_HOLDING = 1,
221 RIL_CALL_DIALING = 2, /* MO call only */
222 RIL_CALL_ALERTING = 3, /* MO call only */
223 RIL_CALL_INCOMING = 4, /* MT call only */
224 RIL_CALL_WAITING = 5 /* MT call only */
225} RIL_CallState;
226
227typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -0700228 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
229 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800230 RADIO_STATE_ON = 10 /* Radio is on */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800231} RIL_RadioState;
232
Wink Saville43808972011-01-13 17:39:51 -0800233typedef enum {
234 RADIO_TECH_UNKNOWN = 0,
235 RADIO_TECH_GPRS = 1,
236 RADIO_TECH_EDGE = 2,
237 RADIO_TECH_UMTS = 3,
238 RADIO_TECH_IS95A = 4,
239 RADIO_TECH_IS95B = 5,
240 RADIO_TECH_1xRTT = 6,
241 RADIO_TECH_EVDO_0 = 7,
242 RADIO_TECH_EVDO_A = 8,
243 RADIO_TECH_HSDPA = 9,
244 RADIO_TECH_HSUPA = 10,
245 RADIO_TECH_HSPA = 11,
246 RADIO_TECH_EVDO_B = 12,
247 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800248 RADIO_TECH_LTE = 14,
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800249 RADIO_TECH_HSPAP = 15, // HSPA+
Etan Cohend3652192014-06-20 08:28:44 -0700250 RADIO_TECH_GSM = 16, // Only supports voice
Yashdev Singh3c8f37c2015-02-23 13:04:28 -0800251 RADIO_TECH_TD_SCDMA = 17,
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700252 RADIO_TECH_IWLAN = 18,
253 RADIO_TECH_LTE_CA = 19
Wink Saville43808972011-01-13 17:39:51 -0800254} RIL_RadioTechnology;
255
Wink Saville8b4e4f72014-10-17 15:01:45 -0700256typedef enum {
257 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
258 RAF_GPRS = (1 << RADIO_TECH_GPRS),
259 RAF_EDGE = (1 << RADIO_TECH_EDGE),
260 RAF_UMTS = (1 << RADIO_TECH_UMTS),
261 RAF_IS95A = (1 << RADIO_TECH_IS95A),
262 RAF_IS95B = (1 << RADIO_TECH_IS95B),
263 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
264 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
265 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
266 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
267 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
268 RAF_HSPA = (1 << RADIO_TECH_HSPA),
269 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
270 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
271 RAF_LTE = (1 << RADIO_TECH_LTE),
272 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
273 RAF_GSM = (1 << RADIO_TECH_GSM),
274 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700275 RAF_LTE_CA = (1 << RADIO_TECH_LTE_CA)
Wink Saville8b4e4f72014-10-17 15:01:45 -0700276} RIL_RadioAccessFamily;
277
278typedef enum {
Nathan Harold92839f12016-02-12 10:02:28 -0800279 BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically)
280 BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
281 BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
282 BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000)
283 BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
284 BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
285 BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band)
286 BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band)
287 BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band)
288 BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band)
289 BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band)
290 BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band)
291 BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band)
292 BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band)
293 BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band)
294 BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band)
295 BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band)
296 BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band)
297 BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band)
298} RIL_RadioBandMode;
299
300typedef enum {
Wink Saville8b4e4f72014-10-17 15:01:45 -0700301 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
302 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
303 // forthcoming with these same parameters
304 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
305 // RIL_RadioCapability.status = 0, if any START's fail no
306 // APPLY will be sent
307 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
308 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
309 // occurs in any previous command the RIL_RadioAccessesFamily and
Legler Wu8caf06f2014-10-29 14:02:14 +0800310 // logicalModemUuid fields will be the prior configuration thus
Wink Saville8b4e4f72014-10-17 15:01:45 -0700311 // restoring the configuration to the previous value. An error
312 // returned by this command will generally be ignored or may
313 // cause that logical modem to be removed from service.
314} RadioCapabilityPhase;
315
316typedef enum {
317 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
318 // RC_PHASE_APPLY
319 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
320 // capability was success with RC_PHASE_FINISH
321 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
322 // capability is fail with RC_PHASE_FINISH.
323} RadioCapabilityStatus;
324
325#define RIL_RADIO_CAPABILITY_VERSION 1
326typedef struct {
Legler Wu8caf06f2014-10-29 14:02:14 +0800327 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
Wink Saville8b4e4f72014-10-17 15:01:45 -0700328 int session; // Unique session value defined by framework returned in all "responses/unsol"
329 int phase; // CONFIGURED, START, APPLY, FINISH
330 int rat; // RIL_RadioAccessFamily for the radio
331 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
332 int status; // Return status and an input parameter for RC_PHASE_FINISH
333} RIL_RadioCapability;
334
Wink Savillec0114b32011-02-18 10:14:07 -0800335// Do we want to split Data from Voice and the use
336// RIL_RadioTechnology for get/setPreferredVoice/Data ?
337typedef enum {
338 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
339 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
340 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
341 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
342 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
343 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
344 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
345 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
346 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
347 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
348 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
Uma Maheswari Ramalingam0e094872011-09-28 13:25:48 -0700349 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
350 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
Wink Savillec0114b32011-02-18 10:14:07 -0800351} RIL_PreferredNetworkType;
352
353/* Source for cdma subscription */
354typedef enum {
355 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
356 CDMA_SUBSCRIPTION_SOURCE_NV = 1
357} RIL_CdmaSubscriptionSource;
358
Wink Saville74fa3882009-12-22 15:35:41 -0800359/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
360typedef enum {
361 RIL_UUS_TYPE1_IMPLICIT = 0,
362 RIL_UUS_TYPE1_REQUIRED = 1,
363 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
364 RIL_UUS_TYPE2_REQUIRED = 3,
365 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
366 RIL_UUS_TYPE3_REQUIRED = 5,
367 RIL_UUS_TYPE3_NOT_REQUIRED = 6
368} RIL_UUS_Type;
369
370/* User-to-User Signaling Information data coding schemes. Possible values for
371 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
372 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
373typedef enum {
374 RIL_UUS_DCS_USP = 0, /* User specified protocol */
375 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
376 RIL_UUS_DCS_X244 = 2, /* X.244 */
377 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
378 convergence function */
379 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
380} RIL_UUS_DCS;
381
382/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
383 * This data is passed in RIL_ExtensionRecord and rec contains this
384 * structure when type is RIL_UUS_INFO_EXT_REC */
385typedef struct {
386 RIL_UUS_Type uusType; /* UUS Type */
387 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
388 int uusLength; /* Length of UUS Data */
389 char * uusData; /* UUS Data */
390} RIL_UUS_Info;
391
392/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700393typedef struct {
394 char isPresent; /* non-zero if signal information record is present */
395 char signalType; /* as defined 3.7.5.5-1 */
396 char alertPitch; /* as defined 3.7.5.5-2 */
397 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
398} RIL_CDMA_SignalInfoRecord;
399
Wink Saville1b5fd232009-04-22 14:50:00 -0700400typedef struct {
401 RIL_CallState state;
402 int index; /* Connection Index for use with, eg, AT+CHLD */
403 int toa; /* type of address, eg 145 = intl */
404 char isMpty; /* nonzero if is mpty call */
405 char isMT; /* nonzero if call is mobile terminated */
406 char als; /* ALS line indicator if available
407 (0 = line 1) */
408 char isVoice; /* nonzero if this is is a voice call */
409 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
410 char * number; /* Remote party number */
411 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
412 char * name; /* Remote party name */
413 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800414 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800415} RIL_Call;
416
Wink Savillec0114b32011-02-18 10:14:07 -0800417/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800418typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800419 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700420 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700421 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
422 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800423 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800424 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
425} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800426
427/*
428 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
429 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
430 */
431typedef struct {
432 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500433 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
434 back-off timer value RIL wants to override the one
435 pre-configured in FW.
436 The unit is miliseconds.
437 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700438 The value 0 means retry should be done ASAP.
Wink Saville8a9e0212013-04-09 12:11:38 -0700439 The value of INT_MAX(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800440 int cid; /* Context ID, uniquely identifies this call */
441 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
442 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
443 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
444 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
445 such as "IP" or "IPV6" */
446 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800447 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
448 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800449 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800450 one of each. If the prefix length is absent the addresses
451 are assumed to be point to point with IPv4 having a prefix
452 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800453 char * dnses; /* A space-delimited list of DNS server addresses,
454 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
455 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800456 char * gateways; /* A space-delimited list of default gateway addresses,
457 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
458 May be empty in which case the addresses represent point
459 to point connections. */
460} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800461
Etan Cohend3652192014-06-20 08:28:44 -0700462typedef struct {
463 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
464 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
465 back-off timer value RIL wants to override the one
466 pre-configured in FW.
467 The unit is miliseconds.
468 The value < 0 means no value is suggested.
469 The value 0 means retry should be done ASAP.
470 The value of INT_MAX(0x7fffffff) means no retry. */
471 int cid; /* Context ID, uniquely identifies this call */
472 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
473 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
474 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
475 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
476 such as "IP" or "IPV6" */
477 char * ifname; /* The network interface name */
478 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
479 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
480 May not be empty, typically 1 IPv4 or 1 IPv6 or
481 one of each. If the prefix length is absent the addresses
482 are assumed to be point to point with IPv4 having a prefix
483 length of 32 and IPv6 128. */
484 char * dnses; /* A space-delimited list of DNS server addresses,
485 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
486 May be empty. */
487 char * gateways; /* A space-delimited list of default gateway addresses,
488 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
489 May be empty in which case the addresses represent point
490 to point connections. */
491 char * pcscf; /* the Proxy Call State Control Function address
492 via PCO(Protocol Configuration Option) for IMS client. */
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -0700493} RIL_Data_Call_Response_v9;
494
495typedef struct {
496 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
497 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
498 back-off timer value RIL wants to override the one
499 pre-configured in FW.
500 The unit is miliseconds.
501 The value < 0 means no value is suggested.
502 The value 0 means retry should be done ASAP.
503 The value of INT_MAX(0x7fffffff) means no retry. */
504 int cid; /* Context ID, uniquely identifies this call */
505 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
506 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
507 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
508 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
509 such as "IP" or "IPV6" */
510 char * ifname; /* The network interface name */
511 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
512 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
513 May not be empty, typically 1 IPv4 or 1 IPv6 or
514 one of each. If the prefix length is absent the addresses
515 are assumed to be point to point with IPv4 having a prefix
516 length of 32 and IPv6 128. */
517 char * dnses; /* A space-delimited list of DNS server addresses,
518 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
519 May be empty. */
520 char * gateways; /* A space-delimited list of default gateway addresses,
521 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
522 May be empty in which case the addresses represent point
523 to point connections. */
524 char * pcscf; /* the Proxy Call State Control Function address
525 via PCO(Protocol Configuration Option) for IMS client. */
526 int mtu; /* MTU received from network
527 Value <= 0 means network has either not sent a value or
528 sent an invalid value */
529} RIL_Data_Call_Response_v11;
Etan Cohend3652192014-06-20 08:28:44 -0700530
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700531typedef enum {
532 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
533 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
534} RIL_RadioTechnologyFamily;
535
536typedef struct {
537 RIL_RadioTechnologyFamily tech;
538 unsigned char retry; /* 0 == not retry, nonzero == retry */
539 int messageRef; /* Valid field if retry is set to nonzero.
540 Contains messageRef from RIL_SMS_Response
541 corresponding to failed MO SMS.
542 */
543
544 union {
545 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
546 RIL_CDMA_SMS_Message* cdmaMessage;
547
548 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
Sanket Padawe05c23072016-08-08 15:42:17 -0700549 char** gsmMessage; /* This is an array of pointers where pointers
550 are contiguous but elements pointed by those pointers
551 are not contiguous
552 */
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700553 } message;
554} RIL_IMS_SMS_Message;
555
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800556typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800557 int messageRef; /* TP-Message-Reference for GSM,
558 and BearerData MessageId for CDMA
559 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800560 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700561 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
562 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
563 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800564} RIL_SMS_Response;
565
566/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
567typedef struct {
568 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
569 /* 0 = "REC UNREAD" */
570 /* 1 = "REC READ" */
571 /* 2 = "STO UNSENT" */
572 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700573 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
574 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800575 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
576 (as expected by TS 27.005) or NULL for default SMSC */
577} RIL_SMS_WriteArgs;
578
579/** Used by RIL_REQUEST_DIAL */
580typedef struct {
581 char * address;
582 int clir;
583 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
584 * clir == 0 on "use subscription default value"
585 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
586 * clir == 2 on "CLIR suppression" (allow CLI presentation)
587 */
Wink Saville74fa3882009-12-22 15:35:41 -0800588 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800589} RIL_Dial;
590
591typedef struct {
592 int command; /* one of the commands listed for TS 27.007 +CRSM*/
593 int fileid; /* EF id */
594 char *path; /* "pathid" from TS 27.007 +CRSM command.
595 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700596 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800597 */
598 int p1;
599 int p2;
600 int p3;
601 char *data; /* May be NULL*/
602 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800603} RIL_SIM_IO_v5;
604
605typedef struct {
606 int command; /* one of the commands listed for TS 27.007 +CRSM*/
607 int fileid; /* EF id */
608 char *path; /* "pathid" from TS 27.007 +CRSM command.
609 Path is in hex asciii format eg "7f205f70"
610 Path must always be provided.
611 */
612 int p1;
613 int p2;
614 int p3;
615 char *data; /* May be NULL*/
616 char *pin2; /* May be NULL*/
617 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
618} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800619
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800620/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
621 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
622typedef struct {
623 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
624 ignored for +CSIM command. */
625
626 /* Following fields are used to derive the APDU ("command" and "length"
627 values in TS 27.007 +CSIM and +CGLA commands). */
628 int cla;
629 int instruction;
630 int p1;
631 int p2;
632 int p3; /* A negative P3 implies a 4 byte APDU. */
633 char *data; /* May be NULL. In hex string format. */
634} RIL_SIM_APDU;
635
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800636typedef struct {
637 int sw1;
638 int sw2;
Amit Mahajan2875bc22014-08-06 10:03:15 -0700639 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
640 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 -0800641} RIL_SIM_IO_Response;
642
643/* See also com.android.internal.telephony.gsm.CallForwardInfo */
644
645typedef struct {
646 int status; /*
647 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
648 * status 1 = active, 0 = not active
649 *
650 * For RIL_REQUEST_SET_CALL_FORWARD:
651 * status is:
652 * 0 = disable
653 * 1 = enable
654 * 2 = interrogate
655 * 3 = registeration
656 * 4 = erasure
657 */
658
Wink Saville3d54e742009-05-18 18:00:44 -0700659 int reason; /* from TS 27.007 7.11 "reason" */
660 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
661 See table for Android mapping from
662 MMI service code
663 0 means user doesn't input class */
664 int toa; /* "type" from TS 27.007 7.11 */
665 char * number; /* "number" from TS 27.007 7.11. May be NULL */
666 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800667}RIL_CallForwardInfo;
668
669typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700670 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
671 * Upper 16 bits is LAC and lower 16 bits
672 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800673 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700674 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700675 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800676 */
johnwange0ba6a92009-09-11 19:14:52 -0700677 int rssi; /* Received RSSI in GSM,
678 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800679 */
680} RIL_NeighboringCell;
681
fengluf7408292015-04-14 14:53:55 -0700682typedef struct {
683 char lce_status; /* LCE service status:
684 * -1 = not supported;
685 * 0 = stopped;
686 * 1 = active.
687 */
688 unsigned int actual_interval_ms; /* actual LCE reporting interval,
689 * meaningful only if LCEStatus = 1.
690 */
691} RIL_LceStatusInfo;
692
693typedef struct {
fenglu290add32015-05-01 17:05:15 -0700694 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
fengluf7408292015-04-14 14:53:55 -0700695 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
696 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
697 * moves to inactive state or network type change)
698 * 1 = suspended;
699 * 0 = not suspended.
700 */
701} RIL_LceDataInfo;
702
Meng Wangb4e34312016-05-12 14:54:36 -0700703typedef enum {
704 RIL_MATCH_ALL = 0, /* Apply to all carriers with the same mcc/mnc */
705 RIL_MATCH_SPN = 1, /* Use SPN and mcc/mnc to identify the carrier */
706 RIL_MATCH_IMSI_PREFIX = 2, /* Use IMSI prefix and mcc/mnc to identify the carrier */
707 RIL_MATCH_GID1 = 3, /* Use GID1 and mcc/mnc to identify the carrier */
708 RIL_MATCH_GID2 = 4, /* Use GID2 and mcc/mnc to identify the carrier */
709} RIL_CarrierMatchType;
710
711typedef struct {
712 const char * mcc;
713 const char * mnc;
714 RIL_CarrierMatchType match_type; /* Specify match type for the carrier.
715 * If it’s RIL_MATCH_ALL, match_data is null;
716 * otherwise, match_data is the value for the match type.
717 */
718 const char * match_data;
719} RIL_Carrier;
720
721typedef struct {
722 int32_t len_allowed_carriers; /* length of array allowed_carriers */
723 int32_t len_excluded_carriers; /* length of array excluded_carriers */
724 RIL_Carrier * allowed_carriers; /* whitelist for allowed carriers */
725 RIL_Carrier * excluded_carriers; /* blacklist for explicitly excluded carriers
726 * which match allowed_carriers. Eg. allowed_carriers match
727 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1
728 * is ABCD. It means except the carrier whose gid1 is ABCD,
729 * all carriers with the same mcc/mnc are allowed.
730 */
731} RIL_CarrierRestrictions;
732
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800733/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
734typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700735 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800736 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
737 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
738 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800739 CALL_FAIL_NORMAL = 16,
740 CALL_FAIL_BUSY = 17,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800741 CALL_FAIL_NO_USER_RESPONDING = 18,
742 CALL_FAIL_NO_ANSWER_FROM_USER = 19,
743 CALL_FAIL_CALL_REJECTED = 21,
744 CALL_FAIL_NUMBER_CHANGED = 22,
745 CALL_FAIL_PREEMPTION = 25,
746 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
747 CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
748 CALL_FAIL_FACILITY_REJECTED = 29,
749 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
750 CALL_FAIL_NORMAL_UNSPECIFIED = 31,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800751 CALL_FAIL_CONGESTION = 34,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800752 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
753 CALL_FAIL_TEMPORARY_FAILURE = 41,
754 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
755 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
756 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
757 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
758 CALL_FAIL_QOS_UNAVAILABLE = 49,
759 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
760 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
761 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
762 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
763 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
764 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800765 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800766 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
767 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
768 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
769 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
770 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
771 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
772 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
773 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
774 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
775 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
776 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
777 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
778 CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
779 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
780 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
781 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
782 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800783 CALL_FAIL_CALL_BARRED = 240,
784 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700785 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
786 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Amit Mahajan54563d32014-11-22 00:54:49 +0000787 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
788 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
789 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
Jayachandran Ccc2a2022017-03-07 09:55:58 -0800790 CALL_FAIL_RADIO_OFF = 247, /* Radio is OFF */
791 CALL_FAIL_OUT_OF_SERVICE = 248, /* No cellular coverage */
792 CALL_FAIL_NO_VALID_SIM = 249, /* No valid SIM is present */
793 CALL_FAIL_RADIO_INTERNAL_ERROR = 250, /* Internal error at Modem */
794 CALL_FAIL_NETWORK_RESP_TIMEOUT = 251, /* No response from network */
795 CALL_FAIL_NETWORK_REJECT = 252, /* Explicit network reject */
796 CALL_FAIL_RADIO_ACCESS_FAILURE = 253, /* RRC connection failure. Eg.RACH */
797 CALL_FAIL_RADIO_LINK_FAILURE = 254, /* Radio Link Failure */
798 CALL_FAIL_RADIO_LINK_LOST = 255, /* Radio link lost due to poor coverage */
799 CALL_FAIL_RADIO_UPLINK_FAILURE = 256, /* Radio uplink failure */
800 CALL_FAIL_RADIO_SETUP_FAILURE = 257, /* RRC connection setup failure */
801 CALL_FAIL_RADIO_RELEASE_NORMAL = 258, /* RRC connection release, normal */
802 CALL_FAIL_RADIO_RELEASE_ABNORMAL = 259, /* RRC connection release, abnormal */
803 CALL_FAIL_ACCESS_CLASS_BLOCKED = 260, /* Access class barring */
804 CALL_FAIL_NETWORK_DETACH = 261, /* Explicit network detach */
Wink Saville1b5fd232009-04-22 14:50:00 -0700805 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
806 CALL_FAIL_CDMA_DROP = 1001,
807 CALL_FAIL_CDMA_INTERCEPT = 1002,
808 CALL_FAIL_CDMA_REORDER = 1003,
809 CALL_FAIL_CDMA_SO_REJECT = 1004,
810 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
811 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
812 CALL_FAIL_CDMA_PREEMPTED = 1007,
813 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
814 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700815 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
Jayachandran Ccc2a2022017-03-07 09:55:58 -0800816
817 /* OEM specific error codes. Used to distinguish error from
818 * CALL_FAIL_ERROR_UNSPECIFIED and help assist debugging */
819 CALL_FAIL_OEM_CAUSE_1 = 0xf001,
820 CALL_FAIL_OEM_CAUSE_2 = 0xf002,
821 CALL_FAIL_OEM_CAUSE_3 = 0xf003,
822 CALL_FAIL_OEM_CAUSE_4 = 0xf004,
823 CALL_FAIL_OEM_CAUSE_5 = 0xf005,
824 CALL_FAIL_OEM_CAUSE_6 = 0xf006,
825 CALL_FAIL_OEM_CAUSE_7 = 0xf007,
826 CALL_FAIL_OEM_CAUSE_8 = 0xf008,
827 CALL_FAIL_OEM_CAUSE_9 = 0xf009,
828 CALL_FAIL_OEM_CAUSE_10 = 0xf00a,
829 CALL_FAIL_OEM_CAUSE_11 = 0xf00b,
830 CALL_FAIL_OEM_CAUSE_12 = 0xf00c,
831 CALL_FAIL_OEM_CAUSE_13 = 0xf00d,
832 CALL_FAIL_OEM_CAUSE_14 = 0xf00e,
833 CALL_FAIL_OEM_CAUSE_15 = 0xf00f,
834
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800835 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
836 vendor code should make sure to map error
837 code to specific error */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800838} RIL_LastCallFailCause;
839
Chao Liu548a81e2015-05-14 16:13:46 -0700840typedef struct {
841 RIL_LastCallFailCause cause_code;
842 char * vendor_cause;
843} RIL_LastCallFailCauseInfo;
844
Wink Savillef4c4d362009-04-02 01:37:03 -0700845/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800846typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800847 PDP_FAIL_NONE = 0, /* No error, connection ok */
848
849 /* an integer cause code defined in TS 24.008
850 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
851 If the implementation does not have access to the exact cause codes,
852 then it should return one of the following values,
853 as the UI layer needs to distinguish these
854 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700855 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
Sanket Padaweac308b92016-01-07 14:41:17 -0800856 PDP_FAIL_NAS_SIGNALLING = 0x0E,
857 PDP_FAIL_LLC_SNDCP = 0x19,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700858 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
859 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
860 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
861 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
862 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
863 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
864 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
865 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
866 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800867 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
Hui Wang11e8b232014-09-19 16:40:17 -0500868 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
869 based on framework config */
Sanket Padaweac308b92016-01-07 14:41:17 -0800870 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
871 PDP_FAIL_NETWORK_FAILURE = 0x26,
872 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
873 PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
874 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
875 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
876 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
877 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
878 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
879 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
Wink Saville43808972011-01-13 17:39:51 -0800880 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
881 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
882 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Sanket Padaweac308b92016-01-07 14:41:17 -0800883 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
884 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
885 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
886 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
887 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
888 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
889 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
890 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
891 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
892 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
893 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
894 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
895 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
896 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
897 PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
898 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
899 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
900 PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
901 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
902 PDP_FAIL_IFACE_MISMATCH = 0x75,
903 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
904 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
905 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
906 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
907 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
Wink Saville43808972011-01-13 17:39:51 -0800908
Sanket Padawe0106aed2016-02-09 09:56:31 -0800909 // OEM specific error codes. To be used by OEMs when they don't want to
910 // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
911 PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001,
912 PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002,
913 PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003,
914 PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004,
915 PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005,
916 PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006,
917 PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007,
918 PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008,
919 PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009,
920 PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A,
921 PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B,
922 PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C,
923 PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D,
924 PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E,
925 PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F,
926
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700927 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800928 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
929 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800930
931 /* reasons for data call drop - network/modem disconnect */
Wink Saville3492c6e2013-10-03 13:53:27 -0700932 PDP_FAIL_SIGNAL_LOST = -3,
Wink Saville43808972011-01-13 17:39:51 -0800933 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
934 with parameters appropriate for new technology */
935 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
936 powered off - no retry */
937 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
938 mode was up on same APN/data profile - no retry until
939 tethered call is off */
940
Sanket Padaweac308b92016-01-07 14:41:17 -0800941 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
942 new error codes are added making this unnecessary */
Wink Saville43808972011-01-13 17:39:51 -0800943} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800944
jsh602f80f2009-07-10 15:44:37 -0700945/* See RIL_REQUEST_SETUP_DATA_CALL */
946typedef enum {
947 RIL_DATA_PROFILE_DEFAULT = 0,
948 RIL_DATA_PROFILE_TETHERED = 1,
Hui Wang8d679622014-10-16 14:59:27 -0500949 RIL_DATA_PROFILE_IMS = 2,
950 RIL_DATA_PROFILE_FOTA = 3,
951 RIL_DATA_PROFILE_CBS = 4,
952 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
953 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
jsh602f80f2009-07-10 15:44:37 -0700954} RIL_DataProfile;
955
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800956/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
957typedef struct {
958 int notificationType; /*
959 * 0 = MO intermediate result code
960 * 1 = MT unsolicited result code
961 */
962 int code; /* See 27.007 7.17
963 "code1" for MO
964 "code2" for MT. */
965 int index; /* CUG index. See 27.007 7.17. */
966 int type; /* "type" from 27.007 7.17 (MT only). */
967 char * number; /* "number" from 27.007 7.17
968 (MT only, may be NULL). */
969} RIL_SuppSvcNotification;
970
Wink Savillef4c4d362009-04-02 01:37:03 -0700971#define RIL_CARD_MAX_APPS 8
972
973typedef enum {
Meng Wangb4e34312016-05-12 14:54:36 -0700974 RIL_CARDSTATE_ABSENT = 0,
975 RIL_CARDSTATE_PRESENT = 1,
976 RIL_CARDSTATE_ERROR = 2,
977 RIL_CARDSTATE_RESTRICTED = 3 /* card is present but not usable due to carrier restrictions.*/
Wink Savillef4c4d362009-04-02 01:37:03 -0700978} RIL_CardState;
979
980typedef enum {
981 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
982 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700983 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
984 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700985 involved */
986 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
987 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
988 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
989 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
990 RIL_PERSOSUBSTATE_SIM_SIM = 7,
991 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
992 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
993 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
994 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
995 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
996 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
997 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
998 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
999 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
1000 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
1001 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
1002 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
1003 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
1004 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
1005 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
1006 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
1007 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
1008} RIL_PersoSubstate;
1009
1010typedef enum {
1011 RIL_APPSTATE_UNKNOWN = 0,
1012 RIL_APPSTATE_DETECTED = 1,
1013 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
1014 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -07001015 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -07001016 when app_state is assigned to this value */
1017 RIL_APPSTATE_READY = 5
1018} RIL_AppState;
1019
1020typedef enum {
1021 RIL_PINSTATE_UNKNOWN = 0,
1022 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
1023 RIL_PINSTATE_ENABLED_VERIFIED = 2,
1024 RIL_PINSTATE_DISABLED = 3,
1025 RIL_PINSTATE_ENABLED_BLOCKED = 4,
1026 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
1027} RIL_PinState;
1028
1029typedef enum {
1030 RIL_APPTYPE_UNKNOWN = 0,
1031 RIL_APPTYPE_SIM = 1,
1032 RIL_APPTYPE_USIM = 2,
1033 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -08001034 RIL_APPTYPE_CSIM = 4,
1035 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -07001036} RIL_AppType;
1037
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -08001038/*
1039 * Please note that registration state UNKNOWN is
1040 * treated as "out of service" in the Android telephony.
1041 * Registration state REG_DENIED must be returned if Location Update
1042 * Reject (with cause 17 - Network Failure) is received
1043 * repeatedly from the network, to facilitate
1044 * "managed roaming"
1045 */
1046typedef enum {
1047 RIL_NOT_REG_AND_NOT_SEARCHING = 0, // Not registered, MT is not currently searching
1048 // a new operator to register
1049 RIL_REG_HOME = 1, // Registered, home network
1050 RIL_NOT_REG_AND_SEARCHING = 2, // Not registered, but MT is currently searching
1051 // a new operator to register
1052 RIL_REG_DENIED = 3, // Registration denied
1053 RIL_UNKNOWN = 4, // Unknown
1054 RIL_REG_ROAMING = 5, // Registered, roaming
1055 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_NOT_SEARCHING = 10, // Same as
1056 // RIL_NOT_REG_AND_NOT_SEARCHING but indicates that
1057 // emergency calls are enabled.
1058 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_SEARCHING = 12, // Same as RIL_NOT_REG_AND_SEARCHING
1059 // but indicates that
1060 // emergency calls are enabled.
1061 RIL_REG_DENIED_AND_EMERGENCY_AVAILABLE = 13, // Same as REG_DENIED but indicates that
1062 // emergency calls are enabled.
1063 RIL_UNKNOWN_AND_EMERGENCY_AVAILABLE = 14, // Same as UNKNOWN but indicates that
1064 // emergency calls are enabled.
1065} RIL_RegState;
1066
Wink Savillef4c4d362009-04-02 01:37:03 -07001067typedef struct
1068{
Wink Saville7f856802009-06-09 10:23:37 -07001069 RIL_AppType app_type;
1070 RIL_AppState app_state;
1071 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -07001072 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -07001073 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -07001074 0x30, 0x30, 0x30 */
1075 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -08001076 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -07001077 RIL_PinState pin1;
1078 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -07001079} RIL_AppStatus;
1080
Wink Savillec0114b32011-02-18 10:14:07 -08001081/* Deprecated, use RIL_CardStatus_v6 */
1082typedef struct
1083{
1084 RIL_CardState card_state;
1085 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
1086 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1087 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1088 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1089 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
1090} RIL_CardStatus_v5;
1091
Wink Savillef4c4d362009-04-02 01:37:03 -07001092typedef struct
1093{
Wink Saville7f856802009-06-09 10:23:37 -07001094 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -07001095 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -08001096 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1097 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1098 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -07001099 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1100 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -08001101} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -07001102
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001103/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
1104 * or as part of RIL_SimRefreshResponse_v7
1105 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001106typedef enum {
1107 /* A file on SIM has been updated. data[1] contains the EFID. */
1108 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001109 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001110 SIM_INIT = 1,
1111 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
1112 SIM_RESET = 2
1113} RIL_SimRefreshResult;
1114
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001115typedef struct {
1116 RIL_SimRefreshResult result;
1117 int ef_id; /* is the EFID of the updated file if the result is */
1118 /* SIM_FILE_UPDATE or 0 for any other result. */
1119 char * aid; /* is AID(application ID) of the card application */
1120 /* See ETSI 102.221 8.1 and 101.220 4 */
1121 /* For SIM_FILE_UPDATE result it can be set to AID of */
1122 /* application in which updated EF resides or it can be */
1123 /* NULL if EF is outside of an application. */
1124 /* For SIM_INIT result this field is set to AID of */
1125 /* application that caused REFRESH */
1126 /* For SIM_RESET result it is NULL. */
1127} RIL_SimRefreshResponse_v7;
1128
Wink Savillec0114b32011-02-18 10:14:07 -08001129/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
1130typedef struct {
1131 char * number; /* Remote party number */
1132 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1133 char * name; /* Remote party name */
1134 RIL_CDMA_SignalInfoRecord signalInfoRecord;
1135} RIL_CDMA_CallWaiting_v5;
1136
Wink Saville1b5fd232009-04-22 14:50:00 -07001137typedef struct {
1138 char * number; /* Remote party number */
1139 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1140 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -07001141 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -08001142 /* Number type/Number plan required to support International Call Waiting */
1143 int number_type; /* 0=Unknown, 1=International, 2=National,
1144 3=Network specific, 4=subscriber */
1145 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
1146} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001147
Wink Savillea592eeb2009-05-22 13:26:36 -07001148/**
1149 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
1150 *
1151 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
1152 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
1153 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
1154 * CBM message ID.
1155 *
1156 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
1157 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
1158 * and 9.4.4.2.3 for UMTS.
1159 * All other values can be treated as empty CBM data coding scheme.
1160 *
1161 * selected 0 means message types specified in <fromServiceId, toServiceId>
1162 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
1163 *
1164 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
1165 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
1166 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001167typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -07001168 int fromServiceId;
1169 int toServiceId;
1170 int fromCodeScheme;
1171 int toCodeScheme;
1172 unsigned char selected;
1173} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -07001174
The Android Open Source Project34a51082009-03-05 14:34:37 -08001175/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
1176#define RIL_RESTRICTED_STATE_NONE 0x00
1177/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
1178#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
1179/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
1180#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -07001181/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -08001182#define RIL_RESTRICTED_STATE_CS_ALL 0x04
1183/* Block packet data access due to restriction. */
1184#define RIL_RESTRICTED_STATE_PS_ALL 0x10
1185
Wink Saville1b5fd232009-04-22 14:50:00 -07001186/* The status for an OTASP/OTAPA session */
1187typedef enum {
1188 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
1189 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
1190 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
1191 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
1192 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
1193 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
1194 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
1195 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
1196 CDMA_OTA_PROVISION_STATUS_COMMITTED,
1197 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
1198 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
1199 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
1200} RIL_CDMA_OTA_ProvisionStatus;
1201
1202typedef struct {
1203 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1204 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1205} RIL_GW_SignalStrength;
1206
Wink Savillec57b3eb2013-04-17 12:51:41 -07001207typedef struct {
1208 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1209 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001210 int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us.
1211 * INT_MAX denotes invalid value */
1212} RIL_GSM_SignalStrength_v12;
1213
1214typedef struct {
1215 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1216 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Wink Savillec57b3eb2013-04-17 12:51:41 -07001217} RIL_SignalStrengthWcdma;
Wink Saville1b5fd232009-04-22 14:50:00 -07001218
1219typedef struct {
1220 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1221 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1222 * value will be 75.
1223 */
1224 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1225 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1226 * will be 125.
1227 */
1228} RIL_CDMA_SignalStrength;
1229
1230
1231typedef struct {
1232 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1233 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1234 * value will be 75.
1235 */
1236 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1237 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1238 * will be 125.
1239 */
1240 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
1241} RIL_EVDO_SignalStrength;
1242
Wink Savillec0114b32011-02-18 10:14:07 -08001243typedef struct {
1244 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -07001245 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1246 * Range: 44 to 140 dBm
1247 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1248 * Reference: 3GPP TS 36.133 9.1.4 */
1249 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1250 * Range: 20 to 3 dB.
1251 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1252 * Reference: 3GPP TS 36.133 9.1.7 */
1253 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1254 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1255 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1256 * Reference: 3GPP TS 36.101 8.1.1 */
1257 int cqi; /* The current Channel Quality Indicator.
1258 * Range: 0 to 15.
1259 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1260 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -08001261} RIL_LTE_SignalStrength;
1262
Wink Saville8a9e0212013-04-09 12:11:38 -07001263typedef struct {
1264 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1265 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1266 * Range: 44 to 140 dBm
1267 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1268 * Reference: 3GPP TS 36.133 9.1.4 */
1269 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1270 * Range: 20 to 3 dB.
1271 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1272 * Reference: 3GPP TS 36.133 9.1.7 */
1273 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1274 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1275 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1276 * Reference: 3GPP TS 36.101 8.1.1 */
1277 int cqi; /* The current Channel Quality Indicator.
1278 * Range: 0 to 15.
1279 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1280 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1281 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
1282 * Approximate distance can be calculated using 300m/us * timingAdvance.
1283 * Range: 0 to 0x7FFFFFFE
1284 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1285 * Reference: 3GPP 36.321 section 6.1.3.5
1286 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1287} RIL_LTE_SignalStrength_v8;
1288
Etan Cohend3652192014-06-20 08:28:44 -07001289typedef struct {
1290 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
1291 * Range : 25 to 120
1292 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1293 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1294} RIL_TD_SCDMA_SignalStrength;
1295
Wink Savillec0114b32011-02-18 10:14:07 -08001296/* Deprecated, use RIL_SignalStrength_v6 */
1297typedef struct {
1298 RIL_GW_SignalStrength GW_SignalStrength;
1299 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1300 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1301} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -07001302
1303typedef struct {
1304 RIL_GW_SignalStrength GW_SignalStrength;
1305 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1306 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -08001307 RIL_LTE_SignalStrength LTE_SignalStrength;
1308} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001309
Wink Saville8a9e0212013-04-09 12:11:38 -07001310typedef struct {
1311 RIL_GW_SignalStrength GW_SignalStrength;
1312 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1313 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1314 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1315} RIL_SignalStrength_v8;
1316
Etan Cohend3652192014-06-20 08:28:44 -07001317typedef struct {
1318 RIL_GW_SignalStrength GW_SignalStrength;
1319 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1320 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1321 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1322 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1323} RIL_SignalStrength_v10;
1324
Wink Saville8a9e0212013-04-09 12:11:38 -07001325typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001326 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1327 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1328 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1329 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 -07001330} RIL_CellIdentityGsm;
1331
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001332typedef struct {
1333 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1334 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1335 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1336 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
1337 int arfcn; /* 16-bit GSM Absolute RF channel number, INT_MAX if unknown */
Nathan Haroldf3769da2016-05-05 12:19:39 -07001338 uint8_t bsic;/* 6-bit Base Station Identity Code, 0xFF if unknown */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001339} RIL_CellIdentityGsm_v12;
1340
Wink Savillec57b3eb2013-04-17 12:51:41 -07001341typedef struct {
1342 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1343 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1344 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1345 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1346 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1347} RIL_CellIdentityWcdma;
1348
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001349typedef struct {
1350 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1351 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1352 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1353 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1354 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1355 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number, INT_MAX if unknown */
1356} RIL_CellIdentityWcdma_v12;
1357
Wink Saville8a9e0212013-04-09 12:11:38 -07001358typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001359 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1360 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1361 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001362 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1363 * It is represented in units of 0.25 seconds and ranges from -2592000
1364 * to 2592000, both values inclusive (corresponding to a range of -180
Wink Savillec57b3eb2013-04-17 12:51:41 -07001365 * to +180 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001366
1367 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1368 * It is represented in units of 0.25 seconds and ranges from -1296000
1369 * to 1296000, both values inclusive (corresponding to a range of -90
Wink Savillec57b3eb2013-04-17 12:51:41 -07001370 * to +90 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001371} RIL_CellIdentityCdma;
1372
Wink Saville8a9e0212013-04-09 12:11:38 -07001373typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001374 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1375 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1376 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1377 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1378 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001379} RIL_CellIdentityLte;
1380
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001381typedef struct {
1382 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1383 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1384 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1385 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1386 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1387 int earfcn; /* 18-bit LTE Absolute RC Channel Number, INT_MAX if unknown */
1388} RIL_CellIdentityLte_v12;
1389
Etan Cohend3652192014-06-20 08:28:44 -07001390typedef struct {
1391 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1392 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1393 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1394 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1395 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1396} RIL_CellIdentityTdscdma;
1397
Wink Saville8a9e0212013-04-09 12:11:38 -07001398typedef struct {
1399 RIL_CellIdentityGsm cellIdentityGsm;
1400 RIL_GW_SignalStrength signalStrengthGsm;
1401} RIL_CellInfoGsm;
1402
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001403typedef struct {
1404 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1405 RIL_GSM_SignalStrength_v12 signalStrengthGsm;
1406} RIL_CellInfoGsm_v12;
1407
Wink Savillec57b3eb2013-04-17 12:51:41 -07001408typedef struct {
1409 RIL_CellIdentityWcdma cellIdentityWcdma;
1410 RIL_SignalStrengthWcdma signalStrengthWcdma;
1411} RIL_CellInfoWcdma;
1412
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001413typedef struct {
1414 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1415 RIL_SignalStrengthWcdma signalStrengthWcdma;
1416} RIL_CellInfoWcdma_v12;
1417
Wink Saville8a9e0212013-04-09 12:11:38 -07001418typedef struct {
1419 RIL_CellIdentityCdma cellIdentityCdma;
1420 RIL_CDMA_SignalStrength signalStrengthCdma;
1421 RIL_EVDO_SignalStrength signalStrengthEvdo;
1422} RIL_CellInfoCdma;
1423
Wink Saville8a9e0212013-04-09 12:11:38 -07001424typedef struct {
1425 RIL_CellIdentityLte cellIdentityLte;
1426 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1427} RIL_CellInfoLte;
1428
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001429typedef struct {
1430 RIL_CellIdentityLte_v12 cellIdentityLte;
1431 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1432} RIL_CellInfoLte_v12;
1433
Etan Cohend3652192014-06-20 08:28:44 -07001434typedef struct {
1435 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1436 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1437} RIL_CellInfoTdscdma;
1438
Wink Saville8a9e0212013-04-09 12:11:38 -07001439// Must be the same as CellInfo.TYPE_XXX
1440typedef enum {
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -08001441 RIL_CELL_INFO_TYPE_NONE = 0, /* indicates no cell information */
Wink Saville8a9e0212013-04-09 12:11:38 -07001442 RIL_CELL_INFO_TYPE_GSM = 1,
1443 RIL_CELL_INFO_TYPE_CDMA = 2,
1444 RIL_CELL_INFO_TYPE_LTE = 3,
Wink Savillec57b3eb2013-04-17 12:51:41 -07001445 RIL_CELL_INFO_TYPE_WCDMA = 4,
Etan Cohend3652192014-06-20 08:28:44 -07001446 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
Wink Saville8a9e0212013-04-09 12:11:38 -07001447} RIL_CellInfoType;
1448
1449// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1450typedef enum {
1451 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1452 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1453 RIL_TIMESTAMP_TYPE_MODEM = 2,
1454 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1455 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1456} RIL_TimeStampType;
1457
1458typedef struct {
1459 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1460 int registered; /* !0 if this cell is registered 0 if not registered */
1461 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1462 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1463 union {
1464 RIL_CellInfoGsm gsm;
1465 RIL_CellInfoCdma cdma;
1466 RIL_CellInfoLte lte;
Wink Savillec57b3eb2013-04-17 12:51:41 -07001467 RIL_CellInfoWcdma wcdma;
Etan Cohend3652192014-06-20 08:28:44 -07001468 RIL_CellInfoTdscdma tdscdma;
Wink Saville8a9e0212013-04-09 12:11:38 -07001469 } CellInfo;
1470} RIL_CellInfo;
1471
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001472typedef struct {
1473 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1474 int registered; /* !0 if this cell is registered 0 if not registered */
1475 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1476 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1477 union {
1478 RIL_CellInfoGsm_v12 gsm;
1479 RIL_CellInfoCdma cdma;
1480 RIL_CellInfoLte_v12 lte;
1481 RIL_CellInfoWcdma_v12 wcdma;
1482 RIL_CellInfoTdscdma tdscdma;
1483 } CellInfo;
1484} RIL_CellInfo_v12;
1485
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -08001486typedef struct {
1487 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1488 union {
1489 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1490 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1491 RIL_CellIdentityLte_v12 cellIdentityLte;
1492 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1493 RIL_CellIdentityCdma cellIdentityCdma;
1494 };
1495}RIL_CellIdentity_v16;
1496
1497typedef struct {
1498 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
1499 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
1500 // UNKNOWN, REG_ROAMING defined in RegState
1501 RIL_RadioTechnology rat; // indicates the available voice radio technology,
1502 // valid values as defined by RadioTechnology.
1503 int32_t cssSupported; // concurrent services support indicator. if
1504 // registered on a CDMA system.
1505 // 0 - Concurrent services not supported,
1506 // 1 - Concurrent services supported
1507 int32_t roamingIndicator; // TSB-58 Roaming Indicator if registered
1508 // on a CDMA or EVDO system or -1 if not.
1509 // Valid values are 0-255.
1510 int32_t systemIsInPrl; // indicates whether the current system is in the
1511 // PRL if registered on a CDMA or EVDO system or -1 if
1512 // not. 0=not in the PRL, 1=in the PRL
1513 int32_t defaultRoamingIndicator; // default Roaming Indicator from the PRL,
1514 // if registered on a CDMA or EVDO system or -1 if not.
1515 // Valid values are 0-255.
1516 int32_t reasonForDenial; // reasonForDenial if registration state is 3
1517 // (Registration denied) this is an enumerated reason why
1518 // registration was denied. See 3GPP TS 24.008,
1519 // 10.5.3.6 and Annex G.
1520 // 0 - General
1521 // 1 - Authentication Failure
1522 // 2 - IMSI unknown in HLR
1523 // 3 - Illegal MS
1524 // 4 - Illegal ME
1525 // 5 - PLMN not allowed
1526 // 6 - Location area not allowed
1527 // 7 - Roaming not allowed
1528 // 8 - No Suitable Cells in this Location Area
1529 // 9 - Network failure
1530 // 10 - Persistent location update reject
1531 // 11 - PLMN not allowed
1532 // 12 - Location area not allowed
1533 // 13 - Roaming not allowed in this Location Area
1534 // 15 - No Suitable Cells in this Location Area
1535 // 17 - Network Failure
1536 // 20 - MAC Failure
1537 // 21 - Sync Failure
1538 // 22 - Congestion
1539 // 23 - GSM Authentication unacceptable
1540 // 25 - Not Authorized for this CSG
1541 // 32 - Service option not supported
1542 // 33 - Requested service option not subscribed
1543 // 34 - Service option temporarily out of order
1544 // 38 - Call cannot be identified
1545 // 48-63 - Retry upon entry into a new cell
1546 // 95 - Semantically incorrect message
1547 // 96 - Invalid mandatory information
1548 // 97 - Message type non-existent or not implemented
1549 // 98 - Message type not compatible with protocol state
1550 // 99 - Information element non-existent or
1551 // not implemented
1552 // 100 - Conditional IE error
1553 // 101 - Message not compatible with protocol state;
1554 RIL_CellIdentity_v16 cellIdentity; // current cell information
1555}RIL_VoiceRegistrationStateResponse;
1556
1557
1558typedef struct {
1559 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
1560 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
1561 // UNKNOWN, REG_ROAMING defined in RegState
1562 RIL_RadioTechnology rat; // indicates the available data radio technology,
1563 // valid values as defined by RadioTechnology.
1564 int32_t reasonDataDenied; // if registration state is 3 (Registration
1565 // denied) this is an enumerated reason why
1566 // registration was denied. See 3GPP TS 24.008,
1567 // Annex G.6 "Additional cause codes for GMM".
1568 // 7 == GPRS services not allowed
1569 // 8 == GPRS services and non-GPRS services not allowed
1570 // 9 == MS identity cannot be derived by the network
1571 // 10 == Implicitly detached
1572 // 14 == GPRS services not allowed in this PLMN
1573 // 16 == MSC temporarily not reachable
1574 // 40 == No PDP context activated
1575 int32_t maxDataCalls; // The maximum number of simultaneous Data Calls that
1576 // must be established using setupDataCall().
1577 RIL_CellIdentity_v16 cellIdentity; // Current cell information
1578}RIL_DataRegistrationStateResponse;
1579
Wink Saville1b5fd232009-04-22 14:50:00 -07001580/* Names of the CDMA info records (C.S0005 section 3.7.5) */
1581typedef enum {
1582 RIL_CDMA_DISPLAY_INFO_REC,
1583 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1584 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1585 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1586 RIL_CDMA_SIGNAL_INFO_REC,
1587 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1588 RIL_CDMA_LINE_CONTROL_INFO_REC,
1589 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1590 RIL_CDMA_T53_CLIR_INFO_REC,
1591 RIL_CDMA_T53_RELEASE_INFO_REC,
1592 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1593} RIL_CDMA_InfoRecName;
1594
1595/* Display Info Rec as defined in C.S0005 section 3.7.5.1
1596 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1597 Note: the Extended Display info rec contains multiple records of the
1598 form: display_tag, display_len, and display_len occurrences of the
1599 chari field if the display_tag is not 10000000 or 10000001.
1600 To save space, the records are stored consecutively in a byte buffer.
1601 The display_tag, display_len and chari fields are all 1 byte.
1602*/
1603
1604typedef struct {
1605 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001606 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001607} RIL_CDMA_DisplayInfoRecord;
1608
1609/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1610 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1611 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1612*/
1613
1614typedef struct {
1615 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001616 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001617 char number_type;
1618 char number_plan;
1619 char pi;
1620 char si;
1621} RIL_CDMA_NumberInfoRecord;
1622
1623/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1624typedef enum {
1625 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1626 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1627 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1628 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1629 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1630 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1631 RIL_REDIRECTING_REASON_RESERVED
1632} RIL_CDMA_RedirectingReason;
1633
1634typedef struct {
1635 RIL_CDMA_NumberInfoRecord redirectingNumber;
1636 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1637 RIL_CDMA_RedirectingReason redirectingReason;
1638} RIL_CDMA_RedirectingNumberInfoRecord;
1639
1640/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1641typedef struct {
1642 char lineCtrlPolarityIncluded;
1643 char lineCtrlToggle;
1644 char lineCtrlReverse;
1645 char lineCtrlPowerDenial;
1646} RIL_CDMA_LineControlInfoRecord;
1647
1648/* T53 CLIR Information Record */
1649typedef struct {
1650 char cause;
1651} RIL_CDMA_T53_CLIRInfoRecord;
1652
1653/* T53 Audio Control Information Record */
1654typedef struct {
1655 char upLink;
1656 char downLink;
1657} RIL_CDMA_T53_AudioControlInfoRecord;
1658
1659typedef struct {
1660
1661 RIL_CDMA_InfoRecName name;
1662
1663 union {
1664 /* Display and Extended Display Info Rec */
1665 RIL_CDMA_DisplayInfoRecord display;
1666
1667 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1668 RIL_CDMA_NumberInfoRecord number;
1669
1670 /* Signal Info Rec */
1671 RIL_CDMA_SignalInfoRecord signal;
1672
1673 /* Redirecting Number Info Rec */
1674 RIL_CDMA_RedirectingNumberInfoRecord redir;
1675
1676 /* Line Control Info Rec */
1677 RIL_CDMA_LineControlInfoRecord lineCtrl;
1678
1679 /* T53 CLIR Info Rec */
1680 RIL_CDMA_T53_CLIRInfoRecord clir;
1681
1682 /* T53 Audio Control Info Rec */
1683 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1684 } rec;
1685} RIL_CDMA_InformationRecord;
1686
1687#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1688
1689typedef struct {
1690 char numberOfInfoRecs;
1691 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1692} RIL_CDMA_InformationRecords;
1693
Jake Hamby8a4a2332014-01-15 13:12:05 -08001694/* See RIL_REQUEST_NV_READ_ITEM */
1695typedef struct {
1696 RIL_NV_Item itemID;
1697} RIL_NV_ReadItem;
1698
1699/* See RIL_REQUEST_NV_WRITE_ITEM */
1700typedef struct {
1701 RIL_NV_Item itemID;
1702 char * value;
1703} RIL_NV_WriteItem;
1704
Etan Cohend3652192014-06-20 08:28:44 -07001705typedef enum {
1706 HANDOVER_STARTED = 0,
1707 HANDOVER_COMPLETED = 1,
1708 HANDOVER_FAILED = 2,
1709 HANDOVER_CANCELED = 3
1710} RIL_SrvccState;
1711
1712/* hardware configuration reported to RILJ. */
1713typedef enum {
1714 RIL_HARDWARE_CONFIG_MODEM = 0,
1715 RIL_HARDWARE_CONFIG_SIM = 1,
1716} RIL_HardwareConfig_Type;
1717
1718typedef enum {
1719 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1720 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1721 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1722} RIL_HardwareConfig_State;
1723
1724typedef struct {
1725 int rilModel;
1726 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1727 int maxVoice;
1728 int maxData;
1729 int maxStandby;
1730} RIL_HardwareConfig_Modem;
1731
1732typedef struct {
Wink Saville8b4e4f72014-10-17 15:01:45 -07001733 char modemUuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001734} RIL_HardwareConfig_Sim;
1735
1736typedef struct {
1737 RIL_HardwareConfig_Type type;
Wink Saville8b4e4f72014-10-17 15:01:45 -07001738 char uuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001739 RIL_HardwareConfig_State state;
1740 union {
1741 RIL_HardwareConfig_Modem modem;
1742 RIL_HardwareConfig_Sim sim;
1743 } cfg;
1744} RIL_HardwareConfig;
1745
Amit Mahajan54563d32014-11-22 00:54:49 +00001746typedef enum {
1747 SS_CFU,
1748 SS_CF_BUSY,
1749 SS_CF_NO_REPLY,
1750 SS_CF_NOT_REACHABLE,
1751 SS_CF_ALL,
1752 SS_CF_ALL_CONDITIONAL,
1753 SS_CLIP,
1754 SS_CLIR,
1755 SS_COLP,
1756 SS_COLR,
1757 SS_WAIT,
1758 SS_BAOC,
1759 SS_BAOIC,
1760 SS_BAOIC_EXC_HOME,
1761 SS_BAIC,
1762 SS_BAIC_ROAMING,
1763 SS_ALL_BARRING,
1764 SS_OUTGOING_BARRING,
1765 SS_INCOMING_BARRING
1766} RIL_SsServiceType;
1767
1768typedef enum {
1769 SS_ACTIVATION,
1770 SS_DEACTIVATION,
1771 SS_INTERROGATION,
1772 SS_REGISTRATION,
1773 SS_ERASURE
1774} RIL_SsRequestType;
1775
1776typedef enum {
1777 SS_ALL_TELE_AND_BEARER_SERVICES,
1778 SS_ALL_TELESEVICES,
1779 SS_TELEPHONY,
1780 SS_ALL_DATA_TELESERVICES,
1781 SS_SMS_SERVICES,
1782 SS_ALL_TELESERVICES_EXCEPT_SMS
1783} RIL_SsTeleserviceType;
1784
1785#define SS_INFO_MAX 4
1786#define NUM_SERVICE_CLASSES 7
1787
1788typedef struct {
1789 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1790 For example if voice is forwarded to one number and data
1791 is forwarded to a different one then numValidIndexes will be
1792 2 indicating total number of valid values in cfInfo.
1793 Similarly if all the services are forwarded to the same
1794 number then the value of numValidIndexes will be 1. */
1795
1796 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1797 for SS request to query call
1798 forward status. see
1799 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1800} RIL_CfData;
1801
1802typedef struct {
1803 RIL_SsServiceType serviceType;
1804 RIL_SsRequestType requestType;
1805 RIL_SsTeleserviceType teleserviceType;
1806 int serviceClass;
1807 RIL_Errno result;
1808
1809 union {
1810 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1811 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1812 two ints, so first two values of ssInfo[] will be
1813 used for response if serviceType is SS_CLIR and
1814 requestType is SS_INTERROGATION */
1815
1816 RIL_CfData cfData;
1817 };
1818} RIL_StkCcUnsolSsResponse;
1819
Wink Saville7f856802009-06-09 10:23:37 -07001820/**
Wink Savillec29360a2014-07-13 05:17:28 -07001821 * Data connection power state
1822 */
1823typedef enum {
1824 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1825 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1826 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1827 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1828} RIL_DcPowerStates;
1829
1830/**
1831 * Data connection real time info
1832 */
1833typedef struct {
1834 uint64_t time; // Time in nanos as returned by ril_nano_time
1835 RIL_DcPowerStates powerState; // Current power state
1836} RIL_DcRtInfo;
1837
Amit Mahajanc796e222014-08-13 16:54:01 +00001838/**
1839 * Data profile to modem
1840 */
1841typedef struct {
1842 /* id of the data profile */
1843 int profileId;
1844 /* the APN to connect to */
1845 char* apn;
1846 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1847 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1848 */
1849 char* protocol;
1850 /** authentication protocol used for this PDP context
1851 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1852 */
1853 int authType;
1854 /* the username for APN, or NULL */
1855 char* user;
1856 /* the password for APN, or NULL */
1857 char* password;
1858 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1859 int type;
1860 /* the period in seconds to limit the maximum connections */
1861 int maxConnsTime;
1862 /* the maximum connections during maxConnsTime */
1863 int maxConns;
1864 /** the required wait time in seconds after a successful UE initiated
1865 * disconnect of a given PDN connection before the device can send
1866 * a new PDN connection request for that given PDN
1867 */
1868 int waitTime;
1869 /* true to enable the profile, 0 to disable, 1 to enable */
1870 int enabled;
1871} RIL_DataProfileInfo;
Wink Savillec29360a2014-07-13 05:17:28 -07001872
Jack Yu06181bb2017-01-10 12:10:41 -08001873typedef struct {
1874 /* id of the data profile */
1875 int profileId;
1876 /* the APN to connect to */
1877 char* apn;
1878 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1879 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1880 */
1881 char* protocol;
1882 /** one of the PDP_type values in TS 27.007 section 10.1.1 used on roaming network.
1883 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1884 */
1885 char *roamingProtocol;
1886 /** authentication protocol used for this PDP context
1887 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1888 */
1889 int authType;
1890 /* the username for APN, or NULL */
1891 char* user;
1892 /* the password for APN, or NULL */
1893 char* password;
1894 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1895 int type;
1896 /* the period in seconds to limit the maximum connections */
1897 int maxConnsTime;
1898 /* the maximum connections during maxConnsTime */
1899 int maxConns;
1900 /** the required wait time in seconds after a successful UE initiated
1901 * disconnect of a given PDN connection before the device can send
1902 * a new PDN connection request for that given PDN
1903 */
1904 int waitTime;
1905 /* true to enable the profile, 0 to disable, 1 to enable */
1906 int enabled;
1907 /* supported APN types bitmask. See RIL_ApnTypes for the value of each bit. */
1908 int supportedTypesBitmask;
1909 /** the bearer bitmask. See RIL_RadioAccessFamily for the value of each bit. */
1910 int bearerBitmask;
1911 /** maximum transmission unit (MTU) size in bytes */
1912 int mtu;
1913 /** the MVNO type: possible values are "imsi", "gid", "spn" */
1914 char *mvnoType;
1915 /** MVNO match data. Can be anything defined by the carrier. For example,
1916 * SPN like: "A MOBILE", "BEN NL", etc...
1917 * IMSI like: "302720x94", "2060188", etc...
1918 * GID like: "4E", "33", etc...
1919 */
1920 char *mvnoMatchData;
1921} RIL_DataProfileInfo_v15;
1922
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001923/* Tx Power Levels */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001924#define RIL_NUM_TX_POWER_LEVELS 5
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001925
Nathan Haroldc8635212016-10-10 11:15:21 -07001926/**
1927 * Aggregate modem activity information
1928 */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001929typedef struct {
1930
Nathan Haroldc8635212016-10-10 11:15:21 -07001931 /* total time (in ms) when modem is in a low power or
1932 * sleep state
1933 */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001934 uint32_t sleep_mode_time_ms;
1935
Nathan Haroldc8635212016-10-10 11:15:21 -07001936 /* total time (in ms) when modem is awake but neither
1937 * the transmitter nor receiver are active/awake */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001938 uint32_t idle_mode_time_ms;
1939
Nathan Haroldc8635212016-10-10 11:15:21 -07001940 /* total time (in ms) during which the transmitter is active/awake,
1941 * subdivided by manufacturer-defined device-specific
1942 * contiguous increasing ranges of transmit power between
1943 * 0 and the transmitter's maximum transmit power.
1944 */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001945 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001946
Nathan Haroldc8635212016-10-10 11:15:21 -07001947 /* total time (in ms) for which receiver is active/awake and
1948 * the transmitter is inactive */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001949 uint32_t rx_mode_time_ms;
1950} RIL_ActivityStatsInfo;
1951
Jack Yu06181bb2017-01-10 12:10:41 -08001952typedef enum {
1953 RIL_APN_TYPE_UNKNOWN = 0x0, // Unknown
1954 RIL_APN_TYPE_DEFAULT = 0x1, // APN type for default data traffic
1955 RIL_APN_TYPE_MMS = 0x2, // APN type for MMS traffic
1956 RIL_APN_TYPE_SUPL = 0x4, // APN type for SUPL assisted GPS
1957 RIL_APN_TYPE_DUN = 0x8, // APN type for DUN traffic
1958 RIL_APN_TYPE_HIPRI = 0x10, // APN type for HiPri traffic
1959 RIL_APN_TYPE_FOTA = 0x20, // APN type for FOTA
1960 RIL_APN_TYPE_IMS = 0x40, // APN type for IMS
1961 RIL_APN_TYPE_CBS = 0x80, // APN type for CBS
1962 RIL_APN_TYPE_IA = 0x100, // APN type for IA Initial Attach APN
1963 RIL_APN_TYPE_EMERGENCY = 0x200, // APN type for Emergency PDN. This is not an IA apn,
1964 // but is used for access to carrier services in an
1965 // emergency call situation.
1966 RIL_APN_TYPE_ALL = 0xFFFFFFFF // All APN types
1967} RIL_ApnTypes;
1968
1969typedef enum {
1970 RIL_DST_POWER_SAVE_MODE, // Device power save mode (provided by PowerManager)
1971 // Non-zero value indicates the device is in power save mode.
1972 RIL_DST_CHARGING_STATE, // Device charging state (provided by BatteryManager)
1973 // Non-zero value indicates the device is charging.
1974 RIL_DST_LOW_DATA_EXPECTED // Low data expected mode. Non-zero value indicates low data
1975 // traffic is expected, for example, when the device is idle
1976 // (e.g. not doing tethering in the background). Note
1977 // this doesn't mean no data is expected.
1978} RIL_DeviceStateType;
1979
1980typedef enum {
1981 RIL_UR_SIGNAL_STRENGTH = 0x01, // When this bit is set, modem should always send the
1982 // signal strength update through
1983 // RIL_UNSOL_SIGNAL_STRENGTH, otherwise suppress it.
1984 RIL_UR_FULL_NETWORK_STATE = 0x02, // When this bit is set, modem should always send
1985 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
1986 // when any field in
1987 // RIL_REQUEST_VOICE_REGISTRATION_STATE or
1988 // RIL_REQUEST_DATA_REGISTRATION_STATE changes. When
1989 // this bit is not set, modem should suppress
1990 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
1991 // only when insignificant fields change
1992 // (e.g. cell info).
1993 // Modem should continue sending
1994 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
1995 // when significant fields are updated even when this
1996 // bit is not set. The following fields are
1997 // considered significant, registration state and
1998 // radio technology.
1999 RIL_UR_DATA_CALL_DORMANCY_CHANGED = 0x04 // When this bit is set, modem should send the data
2000 // call list changed unsolicited response
2001 // RIL_UNSOL_DATA_CALL_LIST_CHANGED whenever any
2002 // field in RIL_Data_Call_Response changes.
2003 // Otherwise modem should suppress the unsolicited
2004 // response when the only changed field is 'active'
2005 // (for data dormancy). For all other fields change,
2006 // modem should continue sending
2007 // RIL_UNSOL_DATA_CALL_LIST_CHANGED regardless this
2008 // bit is set or not.
2009} RIL_UnsolicitedResponseFilter;
2010
Wink Savillec29360a2014-07-13 05:17:28 -07002011/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002012 * RIL_REQUEST_GET_SIM_STATUS
2013 *
2014 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -07002015 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002016 * "data" is NULL
2017 *
Wink Savillefd729372011-02-22 16:19:39 -08002018 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002019 *
2020 * Valid errors:
2021 * Must never fail
2022 */
2023#define RIL_REQUEST_GET_SIM_STATUS 1
2024
2025/**
2026 * RIL_REQUEST_ENTER_SIM_PIN
2027 *
John Wang309ac292009-07-30 14:53:23 -07002028 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002029 *
2030 * "data" is const char **
2031 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08002032 * ((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 -08002033 *
jsh593c9102009-06-24 16:13:44 -07002034 * "response" is int *
2035 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002036 *
2037 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002038 *
2039 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002040 * RADIO_NOT_AVAILABLE (radio resetting)
2041 * GENERIC_FAILURE
2042 * PASSWORD_INCORRECT
2043 */
2044
2045#define RIL_REQUEST_ENTER_SIM_PIN 2
2046
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002047/**
2048 * RIL_REQUEST_ENTER_SIM_PUK
2049 *
Wink Saville7f856802009-06-09 10:23:37 -07002050 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002051 *
2052 * "data" is const char **
2053 * ((const char **)data)[0] is PUK value
2054 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08002055 * ((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 -08002056 *
jsh593c9102009-06-24 16:13:44 -07002057 * "response" is int *
2058 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002059 *
2060 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002061 *
2062 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002063 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002064 * PASSWORD_INCORRECT
2065 * (PUK is invalid)
2066 */
2067
2068#define RIL_REQUEST_ENTER_SIM_PUK 3
2069
2070/**
2071 * RIL_REQUEST_ENTER_SIM_PIN2
2072 *
2073 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
2074 * returned as a a failure from a previous operation.
2075 *
2076 * "data" is const char **
2077 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08002078 * ((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 -08002079 *
jsh593c9102009-06-24 16:13:44 -07002080 * "response" is int *
2081 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002082 *
2083 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002084 *
2085 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002086 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002087 * PASSWORD_INCORRECT
2088 */
2089
2090#define RIL_REQUEST_ENTER_SIM_PIN2 4
2091
2092/**
2093 * RIL_REQUEST_ENTER_SIM_PUK2
2094 *
Wink Saville7f856802009-06-09 10:23:37 -07002095 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002096 *
2097 * "data" is const char **
2098 * ((const char **)data)[0] is PUK2 value
2099 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08002100 * ((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 -08002101 *
jsh593c9102009-06-24 16:13:44 -07002102 * "response" is int *
2103 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002104 *
2105 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002106 *
2107 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002108 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002109 * PASSWORD_INCORRECT
2110 * (PUK2 is invalid)
2111 */
2112
2113#define RIL_REQUEST_ENTER_SIM_PUK2 5
2114
2115/**
2116 * RIL_REQUEST_CHANGE_SIM_PIN
2117 *
Wink Saville7f856802009-06-09 10:23:37 -07002118 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002119 *
2120 * "data" is const char **
2121 * ((const char **)data)[0] is old PIN value
2122 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08002123 * ((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 -08002124 *
jsh593c9102009-06-24 16:13:44 -07002125 * "response" is int *
2126 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002127 *
2128 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002129 *
2130 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002131 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002132 * PASSWORD_INCORRECT
2133 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07002134 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002135 */
2136
2137#define RIL_REQUEST_CHANGE_SIM_PIN 6
2138
2139
2140/**
2141 * RIL_REQUEST_CHANGE_SIM_PIN2
2142 *
Wink Saville7f856802009-06-09 10:23:37 -07002143 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002144 *
2145 * "data" is const char **
2146 * ((const char **)data)[0] is old PIN2 value
2147 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08002148 * ((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 -08002149 *
jsh593c9102009-06-24 16:13:44 -07002150 * "response" is int *
2151 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002152 *
2153 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002154 *
2155 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002156 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002157 * PASSWORD_INCORRECT
2158 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07002159 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002160 */
2161
2162#define RIL_REQUEST_CHANGE_SIM_PIN2 7
2163
2164/**
2165 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
2166 *
2167 * Requests that network personlization be deactivated
2168 *
2169 * "data" is const char **
2170 * ((const char **)(data))[0]] is network depersonlization code
2171 *
jsh593c9102009-06-24 16:13:44 -07002172 * "response" is int *
2173 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002174 *
2175 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002176 *
2177 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002178 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002179 * PASSWORD_INCORRECT
2180 * (code is invalid)
2181 */
2182
2183#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
2184
2185/**
Wink Saville7f856802009-06-09 10:23:37 -07002186 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002187 *
2188 * Requests current call list
2189 *
2190 * "data" is NULL
2191 *
2192 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07002193 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002194 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002195 *
2196 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002197 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002198 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002199 * (request will be made again in a few hundred msec)
2200 */
2201
2202#define RIL_REQUEST_GET_CURRENT_CALLS 9
2203
2204
Wink Saville7f856802009-06-09 10:23:37 -07002205/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002206 * RIL_REQUEST_DIAL
2207 *
2208 * Initiate voice call
2209 *
2210 * "data" is const RIL_Dial *
2211 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002212 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002213 * This method is never used for supplementary service codes
2214 *
2215 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002216 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002217 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00002218 * DIAL_MODIFIED_TO_USSD
2219 * DIAL_MODIFIED_TO_SS
2220 * DIAL_MODIFIED_TO_DIAL
Ajay Nambi10345892016-03-19 09:02:28 -07002221 * INVALID_ARGUMENTS
2222 * NO_MEMORY
2223 * INVALID_STATE
2224 * NO_RESOURCES
2225 * INTERNAL_ERR
2226 * FDN_CHECK_FAILURE
2227 * MODEM_ERR
2228 * NO_SUBSCRIPTION
2229 * NO_NETWORK_FOUND
2230 * INVALID_CALL_ID
2231 * DEVICE_IN_USE
2232 * MODE_NOT_SUPPORTED
2233 * ABORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002234 */
2235#define RIL_REQUEST_DIAL 10
2236
2237/**
2238 * RIL_REQUEST_GET_IMSI
2239 *
2240 * Get the SIM IMSI
2241 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08002242 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002243 *
Wink Savillec0114b32011-02-18 10:14:07 -08002244 * "data" is const char **
2245 * ((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 -08002246 * "response" is a const char * containing the IMSI
2247 *
2248 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002249 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002250 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002251 */
2252
2253#define RIL_REQUEST_GET_IMSI 11
2254
2255/**
2256 * RIL_REQUEST_HANGUP
2257 *
2258 * Hang up a specific line (like AT+CHLD=1x)
2259 *
John Wang06bae4b2010-11-18 16:37:09 -08002260 * After this HANGUP request returns, RIL should show the connection is NOT
2261 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2262 *
Wink Saville7f856802009-06-09 10:23:37 -07002263 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002264 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002265 *
2266 * "response" is NULL
2267 *
2268 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002269 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002270 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002271 * INVALID_ARGUMENTS
2272 * NO_MEMORY
2273 * INVALID_STATE
2274 * MODEM_ERR
2275 * INTERNAL_ERR
2276 * NO_MEMORY
2277 * INVALID_CALL_ID
2278 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002279 */
2280
2281#define RIL_REQUEST_HANGUP 12
2282
2283/**
2284 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
2285 *
2286 * Hang up waiting or held (like AT+CHLD=0)
2287 *
John Wang06bae4b2010-11-18 16:37:09 -08002288 * After this HANGUP request returns, RIL should show the connection is NOT
2289 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2290 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002291 * "data" is NULL
2292 * "response" is NULL
2293 *
2294 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002295 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002296 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002297 * INVALID_STATE
2298 * NO_MEMORY
2299 * MODEM_ERR
2300 * INTERNAL_ERR
2301 * NO_MEMORY
2302 * INVALID_CALL_ID
2303 * NO_RESOURCES
2304 * OPERATION_NOT_ALLOWED
2305 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002306 */
2307
2308#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
2309
2310/**
2311 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
2312 *
2313 * Hang up waiting or held (like AT+CHLD=1)
2314 *
John Wang06bae4b2010-11-18 16:37:09 -08002315 * After this HANGUP request returns, RIL should show the connection is NOT
2316 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2317 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002318 * "data" is NULL
2319 * "response" is NULL
2320 *
2321 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002322 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002323 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002324 * INVALID_STATE
2325 * NO_MEMORY
2326 * MODEM_ERR
2327 * INTERNAL_ERR
2328 * INVALID_CALL_ID
2329 * OPERATION_NOT_ALLOWED
2330 * INVALID_ARGUMENTS
2331 * NO_RESOURCES
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002332 */
2333
2334#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
2335
2336/**
2337 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
2338 *
2339 * Switch waiting or holding call and active call (like AT+CHLD=2)
2340 *
2341 * State transitions should be is follows:
2342 *
2343 * If call 1 is waiting and call 2 is active, then if this re
2344 *
2345 * BEFORE AFTER
2346 * Call 1 Call 2 Call 1 Call 2
2347 * ACTIVE HOLDING HOLDING ACTIVE
2348 * ACTIVE WAITING HOLDING ACTIVE
2349 * HOLDING WAITING HOLDING ACTIVE
2350 * ACTIVE IDLE HOLDING IDLE
2351 * IDLE IDLE IDLE IDLE
2352 *
2353 * "data" is NULL
2354 * "response" is NULL
2355 *
2356 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002357 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002358 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002359 * INVALID_STATE
2360 * NO_MEMORY
2361 * MODEM_ERR
2362 * INTERNAL_ERR
2363 * INVALID_STATE
2364 * INVALID_ARGUMENTS
2365 * INVALID_CALL_ID
2366 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002367 */
2368
2369#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
2370#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
2371
2372/**
2373 * RIL_REQUEST_CONFERENCE
2374 *
2375 * Conference holding and active (like AT+CHLD=3)
2376
2377 * "data" is NULL
2378 * "response" is NULL
2379 *
2380 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002381 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002382 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002383 * NO_MEMORY
2384 * MODEM_ERR
2385 * INTERNAL_ERR
2386 * INVALID_STATE
2387 * INVALID_CALL_ID
2388 * INVALID_ARGUMENTS
2389 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002390 */
2391#define RIL_REQUEST_CONFERENCE 16
2392
2393/**
2394 * RIL_REQUEST_UDUB
2395 *
Wink Saville7f856802009-06-09 10:23:37 -07002396 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002397 * waiting call answer)(RIL_BasicRequest r);
2398 *
2399 * "data" is NULL
2400 * "response" is NULL
2401 *
2402 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002403 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002404 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002405 * INVALID_STATE
2406 * NO_RESOURCES
2407 * NO_MEMORY
2408 * MODEM_ERR
2409 * INTERNAL_ERR
2410 * INVALID_CALL_ID
2411 * OPERATION_NOT_ALLOWED
2412 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002413 */
2414#define RIL_REQUEST_UDUB 17
2415
2416/**
2417 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2418 *
2419 * Requests the failure cause code for the most recently terminated call
2420 *
2421 * "data" is NULL
Jayachandran Ccc2a2022017-03-07 09:55:58 -08002422 * "response" is a const RIL_LastCallFailCauseInfo *
2423 * RIL_LastCallFailCauseInfo contains LastCallFailCause and vendor cause.
2424 * The vendor cause code must be used for debugging purpose only.
2425 * The implementation must return one of the values of LastCallFailCause
2426 * as mentioned below.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002427 *
Jayachandran Ccc2a2022017-03-07 09:55:58 -08002428 * GSM failure reasons codes for the cause codes defined in TS 24.008 Annex H
2429 * where possible.
2430 * CDMA failure reasons codes for the possible call failure scenarios
2431 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
2432 * Any of the following reason codes if the call is failed or dropped due to reason
2433 * mentioned with in the braces.
2434 *
2435 * CALL_FAIL_RADIO_OFF (Radio is OFF)
2436 * CALL_FAIL_OUT_OF_SERVICE (No cell coverage)
2437 * CALL_FAIL_NO_VALID_SIM (No valid SIM)
2438 * CALL_FAIL_RADIO_INTERNAL_ERROR (Modem hit unexpected error scenario)
2439 * CALL_FAIL_NETWORK_RESP_TIMEOUT (No response from network)
2440 * CALL_FAIL_NETWORK_REJECT (Explicit network reject)
2441 * CALL_FAIL_RADIO_ACCESS_FAILURE (RRC connection failure. Eg.RACH)
2442 * CALL_FAIL_RADIO_LINK_FAILURE (Radio Link Failure)
2443 * CALL_FAIL_RADIO_LINK_LOST (Radio link lost due to poor coverage)
2444 * CALL_FAIL_RADIO_UPLINK_FAILURE (Radio uplink failure)
2445 * CALL_FAIL_RADIO_SETUP_FAILURE (RRC connection setup failure)
2446 * CALL_FAIL_RADIO_RELEASE_NORMAL (RRC connection release, normal)
2447 * CALL_FAIL_RADIO_RELEASE_ABNORMAL (RRC connection release, abnormal)
2448 * CALL_FAIL_ACCESS_CLASS_BLOCKED (Access class barring)
2449 * CALL_FAIL_NETWORK_DETACH (Explicit network detach)
2450 *
2451 * OEM causes (CALL_FAIL_OEM_CAUSE_XX) must be used for debug purpose only
The Android Open Source Project34a51082009-03-05 14:34:37 -08002452 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002453 * If the implementation does not have access to the exact cause codes,
2454 * then it should return one of the values listed in RIL_LastCallFailCause,
2455 * as the UI layer needs to distinguish these cases for tone generation or
2456 * error notification.
2457 *
2458 * Valid errors:
2459 * SUCCESS
2460 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002461 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002462 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002463 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002464 */
2465#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
2466
2467/**
2468 * RIL_REQUEST_SIGNAL_STRENGTH
2469 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002470 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002471 *
2472 * Must succeed if radio is on.
2473 *
2474 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07002475 *
2476 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002477 *
2478 * Valid errors:
2479 * SUCCESS
2480 * RADIO_NOT_AVAILABLE
2481 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002482#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07002483
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002484/**
Wink Savillec0114b32011-02-18 10:14:07 -08002485 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002486 *
2487 * Request current registration state
2488 *
2489 * "data" is NULL
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -08002490 * "response" is a const RIL_VoiceRegistrationStateResponse *
Wink Saville1b5fd232009-04-22 14:50:00 -07002491 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002492 * Valid errors:
2493 * SUCCESS
2494 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002495 */
Wink Savillec0114b32011-02-18 10:14:07 -08002496#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002497
2498/**
Wink Savillec0114b32011-02-18 10:14:07 -08002499 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002500 *
Wink Savillec0114b32011-02-18 10:14:07 -08002501 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002502 *
2503 * "data" is NULL
Sooraj Sasindrand8db60c2016-11-30 18:36:03 -08002504 * "response" is a const RIL_DataRegistrationStateResponse *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002505 *
2506 * Valid errors:
2507 * SUCCESS
2508 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002509 */
Wink Savillec0114b32011-02-18 10:14:07 -08002510#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002511
2512/**
2513 * RIL_REQUEST_OPERATOR
2514 *
2515 * Request current operator ONS or EONS
2516 *
2517 * "data" is NULL
2518 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07002519 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002520 * or NULL if unregistered
2521 *
Wink Saville7f856802009-06-09 10:23:37 -07002522 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002523 * or NULL if unregistered
2524 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2525 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07002526 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002527 * Valid errors:
2528 * SUCCESS
2529 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002530 */
2531#define RIL_REQUEST_OPERATOR 22
2532
2533/**
2534 * RIL_REQUEST_RADIO_POWER
2535 *
2536 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07002537 * If the radio is is turned off/on the radio modem subsystem
2538 * is expected return to an initialized state. For instance,
2539 * any voice and data calls will be terminated and all associated
2540 * lists emptied.
2541 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002542 * "data" is int *
2543 * ((int *)data)[0] is > 0 for "Radio On"
2544 * ((int *)data)[0] is == 0 for "Radio Off"
2545 *
2546 * "response" is NULL
2547 *
2548 * Turn radio on if "on" > 0
2549 * Turn radio off if "on" == 0
2550 *
2551 * Valid errors:
2552 * SUCCESS
2553 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002554 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002555 */
2556#define RIL_REQUEST_RADIO_POWER 23
2557
2558/**
2559 * RIL_REQUEST_DTMF
2560 *
2561 * Send a DTMF tone
2562 *
2563 * If the implementation is currently playing a tone requested via
2564 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2565 * should be played instead
2566 *
jsh602f80f2009-07-10 15:44:37 -07002567 * "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 -08002568 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002569 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002570 * FIXME should this block/mute microphone?
2571 * How does this interact with local DTMF feedback?
2572 *
2573 * Valid errors:
2574 * SUCCESS
2575 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002576 * INVALID_ARGUMENTS
2577 * NO_RESOURCES
2578 * NO_MEMORY
2579 * MODEM_ERR
2580 * INTERNAL_ERR
2581 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002582 *
2583 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2584 *
2585 */
2586#define RIL_REQUEST_DTMF 24
2587
2588/**
2589 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07002590 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002591 * Send an SMS message
2592 *
2593 * "data" is const char **
2594 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2595 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2596 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2597 * less the SMSC address
2598 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2599 *
2600 * "response" is a const RIL_SMS_Response *
2601 *
2602 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002603 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002604 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2605 *
2606 * Valid errors:
2607 * SUCCESS
2608 * RADIO_NOT_AVAILABLE
2609 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07002610 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08002611 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002612 * INVALID_STATE
2613 * INVALID_ARGUMENTS
2614 * NO_MEMORY
2615 * REQUEST_RATE_LIMITED
2616 * INVALID_SMS_FORMAT
2617 * SYSTEM_ERR
2618 * ENCODING_ERR
2619 * INVALID_SMSC_ADDRESS
2620 * MODEM_ERR
2621 * NETWORK_ERR
2622 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002623 *
2624 * FIXME how do we specify TP-Message-Reference if we need to resend?
2625 */
2626#define RIL_REQUEST_SEND_SMS 25
2627
2628
2629/**
2630 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07002631 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002632 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2633 * except that more messages are expected to be sent soon. If possible,
2634 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2635 *
2636 * "data" is const char **
2637 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2638 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2639 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2640 * less the SMSC address
2641 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2642 *
2643 * "response" is a const RIL_SMS_Response *
2644 *
2645 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002646 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002647 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2648 *
2649 * Valid errors:
2650 * SUCCESS
2651 * RADIO_NOT_AVAILABLE
2652 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08002653 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002654 * INVALID_STATE
2655 * INVALID_ARGUMENTS
2656 * NO_MEMORY
2657 * INVALID_SMS_FORMAT
2658 * SYSTEM_ERR
2659 * REQUEST_RATE_LIMITED
2660 * FDN_CHECK_FAILURE
2661 * MODEM_ERR
2662 * NETWORK_ERR
2663 * ENCODING_ERR
2664 * INVALID_SMSC_ADDRESS
2665 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002666 *
2667 */
2668#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2669
2670
2671/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002672 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002673 *
Wink Saville29487ef2011-04-15 09:15:31 -07002674 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2675 * return success it is added to the list of data calls and a
2676 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2677 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2678 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2679 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002680 *
Wink Saville43808972011-01-13 17:39:51 -08002681 * The RIL is expected to:
2682 * - Create one data call context.
2683 * - Create and configure a dedicated interface for the context
2684 * - The interface must be point to point.
2685 * - The interface is configured with one or more addresses and
2686 * is capable of sending and receiving packets. The prefix length
2687 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2688 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08002689 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08002690 * number of simultaneous data call contexts.
2691 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002692 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08002693 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2694 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07002695 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07002696 * ((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 -07002697 * override the one in the profile. NULL indicates no APN overrride.
2698 * ((const char **)data)[3] is the username for APN, or NULL
2699 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07002700 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2701 * 0 => PAP and CHAP is never performed.
2702 * 1 => PAP may be performed; CHAP is never performed.
2703 * 2 => CHAP may be performed; PAP is never performed.
2704 * 3 => PAP / CHAP may be performed - baseband dependent.
Jack Yu06181bb2017-01-10 12:10:41 -08002705 * ((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 -08002706 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07002707 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Jack Yu06181bb2017-01-10 12:10:41 -08002708 * ((const char **)data)[7] is the roaming connection type to request. Must be one of the
2709 * PDP_type values in TS 27.007 section 10.1.1.
2710 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
2711 * ((const char **)data)[8] is the bitmask of APN type in decimal string format. The
2712 * bitmask will encapsulate the following values:
2713 * ia,mms,agps,supl,hipri,fota,dun,ims,default.
2714 * ((const char **)data)[9] is the bearer bitmask in decimal string format. Each bit is a
2715 * RIL_RadioAccessFamily. "0" or NULL indicates all RATs.
2716 * ((const char **)data)[10] is the boolean in string format indicating the APN setting was
2717 * sent to the modem through RIL_REQUEST_SET_DATA_PROFILE earlier.
2718 * ((const char **)data)[11] is the mtu size in bytes of the mobile interface to which
2719 * the apn is connected.
2720 * ((const char **)data)[12] is the MVNO type:
2721 * possible values are "imsi", "gid", "spn".
2722 * ((const char **)data)[13] is MVNO match data in string. Can be anything defined by the carrier.
2723 * For example,
2724 * SPN like: "A MOBILE", "BEN NL", etc...
2725 * IMSI like: "302720x94", "2060188", etc...
2726 * GID like: "4E", "33", etc...
2727 * ((const char **)data)[14] is the boolean string indicating data roaming is allowed or not. "1"
2728 * indicates data roaming is enabled by the user, "0" indicates disabled.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002729 *
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -07002730 * "response" is a RIL_Data_Call_Response_v11
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002731 *
2732 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07002733 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002734 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08002735 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08002736 * the RIL_Data_Call_Response_v6.status containing the actual status.
2737 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08002738 *
2739 * Other errors could include:
2740 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2741 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002742 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002743 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002744 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002745#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002746
2747
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002748/**
2749 * RIL_REQUEST_SIM_IO
2750 *
2751 * Request SIM I/O operation.
2752 * This is similar to the TS 27.007 "restricted SIM" operation
2753 * where it assumes all of the EF selection will be done by the
2754 * callee.
2755 *
Wink Savillefd729372011-02-22 16:19:39 -08002756 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002757 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2758 * or may specify a PIN2 for operations that require a PIN2 (eg
2759 * updating FDN records)
2760 *
2761 * "response" is a const RIL_SIM_IO_Response *
2762 *
2763 * Arguments and responses that are unused for certain
2764 * values of "command" should be ignored or set to NULL
2765 *
2766 * Valid errors:
2767 * SUCCESS
2768 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002769 * SIM_PIN2
2770 * SIM_PUK2
2771 */
2772#define RIL_REQUEST_SIM_IO 28
2773
2774/**
2775 * RIL_REQUEST_SEND_USSD
2776 *
2777 * Send a USSD message
2778 *
2779 * If a USSD session already exists, the message should be sent in the
2780 * context of that session. Otherwise, a new session should be created.
2781 *
2782 * The network reply should be reported via RIL_UNSOL_ON_USSD
2783 *
2784 * Only one USSD session may exist at a time, and the session is assumed
2785 * to exist until:
2786 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2787 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2788 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2789 *
2790 * "data" is a const char * containing the USSD request in UTF-8 format
2791 * "response" is NULL
2792 *
2793 * Valid errors:
2794 * SUCCESS
2795 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07002796 * FDN_CHECK_FAILURE
Amit Mahajan54563d32014-11-22 00:54:49 +00002797 * USSD_MODIFIED_TO_DIAL
2798 * USSD_MODIFIED_TO_SS
2799 * USSD_MODIFIED_TO_USSD
twen.changdf7add02016-03-04 18:27:48 +08002800 * SIM_BUSY
2801 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002802 * INVALID_ARGUMENTS
2803 * NO_MEMORY
2804 * MODEM_ERR
2805 * INTERNAL_ERR
2806 * ABORTED
2807 * SYSTEM_ERR
2808 * INVALID_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002809 *
2810 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2811 */
2812
2813#define RIL_REQUEST_SEND_USSD 29
2814
2815/**
2816 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07002817 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002818 * Cancel the current USSD session if one exists
2819 *
2820 * "data" is null
2821 * "response" is NULL
2822 *
2823 * Valid errors:
2824 * SUCCESS
2825 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002826 * SIM_BUSY
2827 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002828 * MODEM_ERR
2829 * INTERNAL_ERR
2830 * NO_MEMORY
2831 * INVALID_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002832 */
2833
2834#define RIL_REQUEST_CANCEL_USSD 30
2835
Wink Saville7f856802009-06-09 10:23:37 -07002836/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002837 * RIL_REQUEST_GET_CLIR
2838 *
2839 * Gets current CLIR status
2840 * "data" is NULL
2841 * "response" is int *
2842 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2843 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2844 *
2845 * Valid errors:
2846 * SUCCESS
2847 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002848 * SS_MODIFIED_TO_DIAL
2849 * SS_MODIFIED_TO_USSD
2850 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002851 * NO_MEMORY
2852 * MODEM_ERR
2853 * INTERNAL_ERR
2854 * FDN_CHECK_FAILURE
2855 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002856 */
2857#define RIL_REQUEST_GET_CLIR 31
2858
2859/**
2860 * RIL_REQUEST_SET_CLIR
2861 *
2862 * "data" is int *
2863 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2864 *
2865 * "response" is NULL
2866 *
2867 * Valid errors:
2868 * SUCCESS
2869 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002870 * SS_MODIFIED_TO_DIAL
2871 * SS_MODIFIED_TO_USSD
2872 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002873 * INVALID_ARGUMENTS
2874 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002875 */
2876#define RIL_REQUEST_SET_CLIR 32
2877
2878/**
2879 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2880 *
2881 * "data" is const RIL_CallForwardInfo *
2882 *
2883 * "response" is const RIL_CallForwardInfo **
2884 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2885 * each distinct registered phone number.
2886 *
2887 * For example, if data is forwarded to +18005551212 and voice is forwarded
2888 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07002889 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002890 * If, however, both data and voice are forwarded to +18005551212, then
2891 * a single RIL_CallForwardInfo can be returned with the service class
2892 * set to "data + voice = 3")
2893 *
2894 * Valid errors:
2895 * SUCCESS
2896 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002897 * SS_MODIFIED_TO_DIAL
2898 * SS_MODIFIED_TO_USSD
2899 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002900 * INVALID_ARGUMENTS
2901 * NO_MEMORY
2902 * SYSTEM_ERR
2903 * MODEM_ERR
2904 * INTERNAL_ERR
2905 * NO_MEMORY
2906 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002907 */
2908#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2909
2910
2911/**
2912 * RIL_REQUEST_SET_CALL_FORWARD
2913 *
2914 * Configure call forward rule
2915 *
2916 * "data" is const RIL_CallForwardInfo *
2917 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002918 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002919 * Valid errors:
2920 * SUCCESS
2921 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002922 * SS_MODIFIED_TO_DIAL
2923 * SS_MODIFIED_TO_USSD
2924 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002925 * INVALID_ARGUMENTS
2926 * NO_MEMORY
2927 * SYSTEM_ERR
2928 * MODEM_ERR
2929 * INTERNAL_ERR
2930 * INVALID_STATE
2931 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002932 */
2933#define RIL_REQUEST_SET_CALL_FORWARD 34
2934
2935
2936/**
2937 * RIL_REQUEST_QUERY_CALL_WAITING
2938 *
2939 * Query current call waiting state
2940 *
2941 * "data" is const int *
2942 * ((const int *)data)[0] is the TS 27.007 service class to query.
2943 * "response" is a const int *
2944 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2945 *
2946 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2947 * must follow, with the TS 27.007 service class bit vector of services
2948 * for which call waiting is enabled.
2949 *
Wink Saville7f856802009-06-09 10:23:37 -07002950 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002951 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2952 * and voice and disabled for everything else
2953 *
2954 * Valid errors:
2955 * SUCCESS
2956 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002957 * SS_MODIFIED_TO_DIAL
2958 * SS_MODIFIED_TO_USSD
2959 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002960 * NO_MEMORY
2961 * MODEM_ERR
2962 * INTERNAL_ERR
2963 * NO_MEMORY
2964 * FDN_CHECK_FAILURE
2965 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002966 */
2967#define RIL_REQUEST_QUERY_CALL_WAITING 35
2968
2969
2970/**
2971 * RIL_REQUEST_SET_CALL_WAITING
2972 *
2973 * Configure current call waiting state
2974 *
2975 * "data" is const int *
2976 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2977 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2978 * services to modify
2979 * "response" is NULL
2980 *
2981 * Valid errors:
2982 * SUCCESS
2983 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002984 * SS_MODIFIED_TO_DIAL
2985 * SS_MODIFIED_TO_USSD
2986 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002987 * INVALID_ARGUMENTS
2988 * NO_MEMORY
2989 * MODEM_ERR
2990 * INTERNAL_ERR
2991 * INVALID_STATE
2992 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002993 */
2994#define RIL_REQUEST_SET_CALL_WAITING 36
2995
2996/**
2997 * RIL_REQUEST_SMS_ACKNOWLEDGE
2998 *
2999 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07003000 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003001 *
3002 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07003003 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003004 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07003005 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003006 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07003007 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
3008 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
3009 * capacity exceeded) and 0xFF (unspecified error) are
3010 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003011 *
3012 * "response" is NULL
3013 *
3014 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
3015 *
3016 * Valid errors:
3017 * SUCCESS
3018 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003019 */
3020#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
3021
3022/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003023 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003024 *
3025 * Get the device IMEI, including check digit
3026 *
johnwangf8bc1672009-05-14 19:19:47 -07003027 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003028 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
3029 *
3030 * "data" is NULL
3031 * "response" is a const char * containing the IMEI
3032 *
3033 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003034 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003035 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003036 */
3037
3038#define RIL_REQUEST_GET_IMEI 38
3039
3040/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003041 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003042 *
3043 * Get the device IMEISV, which should be two decimal digits
3044 *
johnwangf8bc1672009-05-14 19:19:47 -07003045 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003046 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
3047 *
3048 * "data" is NULL
3049 * "response" is a const char * containing the IMEISV
3050 *
3051 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003052 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003053 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003054 */
3055
3056#define RIL_REQUEST_GET_IMEISV 39
3057
3058
3059/**
3060 * RIL_REQUEST_ANSWER
3061 *
3062 * Answer incoming call
3063 *
3064 * Will not be called for WAITING calls.
3065 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
3066 * instead
3067 *
3068 * "data" is NULL
3069 * "response" is NULL
3070 *
3071 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003072 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003073 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003074 * INVALID_STATE
3075 * NO_MEMORY
3076 * SYSTEM_ERR
3077 * MODEM_ERR
3078 * INTERNAL_ERR
3079 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003080 */
3081
3082#define RIL_REQUEST_ANSWER 40
3083
3084/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003085 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003086 *
Wink Saville29487ef2011-04-15 09:15:31 -07003087 * Deactivate packet data connection and remove from the
3088 * data call list if SUCCESS is returned. Any other return
3089 * values should also try to remove the call from the list,
3090 * but that may not be possible. In any event a
3091 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
3092 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
3093 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003094 *
3095 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07003096 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06003097 * ((char**)data)[1] indicating Disconnect Reason
3098 * 0 => No specific reason specified
3099 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07003100 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003101 * "response" is NULL
3102 *
3103 * Valid errors:
3104 * SUCCESS
3105 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003106 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003107 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003108 */
Wink Savillef4c4d362009-04-02 01:37:03 -07003109#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003110
3111/**
3112 * RIL_REQUEST_QUERY_FACILITY_LOCK
3113 *
3114 * Query the status of a facility lock state
3115 *
3116 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07003117 * ((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 -08003118 * (eg "AO" for BAOC, "SC" for SIM lock)
3119 * ((const char **)data)[1] is the password, or "" if not required
3120 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
3121 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08003122 * ((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 -08003123 * This is only applicable in the case of Fixed Dialing Numbers
3124 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003125 *
3126 * "response" is an int *
3127 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07003128 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003129 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07003130 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003131 *
3132 * Valid errors:
3133 * SUCCESS
3134 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003135 * SS_MODIFIED_TO_DIAL
3136 * SS_MODIFIED_TO_USSD
3137 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003138 * INVALID_ARGUMENTS
3139 * NO_MEMORY
3140 * INTERNAL_ERR
3141 * SYSTEM_ERR
3142 * MODEM_ERR
3143 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003144 *
3145 */
3146#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
3147
3148/**
3149 * RIL_REQUEST_SET_FACILITY_LOCK
3150 *
3151 * Enable/disable one facility lock
3152 *
3153 * "data" is const char **
3154 *
3155 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3156 * (eg "AO" for BAOC)
3157 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
3158 * ((const char **)data)[2] = password
3159 * ((const char **)data)[3] = string representation of decimal TS 27.007
3160 * service class bit vector. Eg, the string
3161 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08003162 * ((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 -08003163 * This is only applicable in the case of Fixed Dialing Numbers
3164 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003165 *
jsh593c9102009-06-24 16:13:44 -07003166 * "response" is int *
3167 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003168 *
3169 * Valid errors:
3170 * SUCCESS
3171 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003172 * SS_MODIFIED_TO_DIAL
3173 * SS_MODIFIED_TO_USSD
3174 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003175 * INVALID_ARGUMENTS
3176 * INTERNAL_ERR
3177 * NO_MEMORY
3178 * MODEM_ERR
3179 * INVALID_STATE
3180 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003181 *
3182 */
3183#define RIL_REQUEST_SET_FACILITY_LOCK 43
3184
3185/**
3186 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
3187 *
3188 * Change call barring facility password
3189 *
3190 * "data" is const char **
3191 *
3192 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3193 * (eg "AO" for BAOC)
3194 * ((const char **)data)[1] = old password
3195 * ((const char **)data)[2] = new password
3196 *
Wink Saville7f856802009-06-09 10:23:37 -07003197 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003198 *
3199 * Valid errors:
3200 * SUCCESS
3201 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003202 * SS_MODIFIED_TO_DIAL
3203 * SS_MODIFIED_TO_USSD
3204 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003205 * INVALID_ARGUMENTS
3206 * NO_MEMORY
3207 * MODEM_ERR
3208 * INTERNAL_ERR
3209 * SYSTEM_ERR
3210 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003211 *
3212 */
3213#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
3214
3215/**
3216 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
3217 *
3218 * Query current network selectin mode
3219 *
3220 * "data" is NULL
3221 *
3222 * "response" is int *
3223 * ((const int *)response)[0] is
3224 * 0 for automatic selection
3225 * 1 for manual selection
3226 *
3227 * Valid errors:
3228 * SUCCESS
3229 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003230 *
3231 */
3232#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
3233
3234/**
3235 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
3236 *
3237 * Specify that the network should be selected automatically
3238 *
3239 * "data" is NULL
3240 * "response" is NULL
3241 *
Wink Saville7f856802009-06-09 10:23:37 -07003242 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003243 * and registered
3244 *
3245 * Valid errors:
3246 * SUCCESS
3247 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003248 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003249 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003250 *
John Wang75534472010-04-20 15:11:42 -07003251 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3252 * no retries needed, such as illegal SIM or ME.
3253 * Returns GENERIC_FAILURE for all other causes that might be
3254 * fixed by retries.
3255 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003256 */
3257#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
3258
3259/**
3260 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
3261 *
3262 * Manually select a specified network.
3263 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003264 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
3265 * "response" is NULL
3266 *
Wink Saville7f856802009-06-09 10:23:37 -07003267 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003268 * and registered
3269 *
3270 * Valid errors:
3271 * SUCCESS
3272 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003273 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003274 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003275 *
John Wang75534472010-04-20 15:11:42 -07003276 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3277 * no retries needed, such as illegal SIM or ME.
3278 * Returns GENERIC_FAILURE for all other causes that might be
3279 * fixed by retries.
3280 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003281 */
3282#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
3283
3284/**
3285 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
3286 *
3287 * Scans for available networks
3288 *
3289 * "data" is NULL
3290 * "response" is const char ** that should be an array of n*4 strings, where
3291 * n is the number of available networks
3292 * For each available network:
3293 *
Wink Saville7f856802009-06-09 10:23:37 -07003294 * ((const char **)response)[n+0] is long alpha ONS or EONS
3295 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003296 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
3297 * ((const char **)response)[n+3] is a string value of the status:
3298 * "unknown"
3299 * "available"
3300 * "current"
3301 * "forbidden"
3302 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003303 * Valid errors:
3304 * SUCCESS
3305 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003306 * OPERATION_NOT_ALLOWED
Jayachandran Cb0cba832017-03-13 19:17:18 -07003307 * ABORTED
3308 * DEVICE_IN_USE
3309 * INTERNAL_ERR
3310 * NO_MEMORY
3311 * MODEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003312 *
3313 */
3314#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
3315
3316/**
3317 * RIL_REQUEST_DTMF_START
3318 *
Wink Saville7f856802009-06-09 10:23:37 -07003319 * Start playing a DTMF tone. Continue playing DTMF tone until
3320 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003321 *
3322 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
3323 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07003324 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003325 * "data" is a char *
3326 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
3327 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003328 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003329 * Valid errors:
3330 * SUCCESS
3331 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003332 * INVALID_ARGUMENTS
3333 * NO_RESOURCES
3334 * NO_MEMORY
3335 * SYSTEM_ERR
3336 * MODEM_ERR
3337 * INTERNAL_ERR
3338 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003339 *
3340 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
3341 */
3342#define RIL_REQUEST_DTMF_START 49
3343
3344/**
3345 * RIL_REQUEST_DTMF_STOP
3346 *
3347 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07003348 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003349 * "data" is NULL
3350 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003351 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003352 * Valid errors:
3353 * SUCCESS
3354 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003355 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07003356 * NO_RESOURCES
3357 * NO_MEMORY
3358 * INVALID_ARGUMENTS
3359 * SYSTEM_ERR
3360 * MODEM_ERR
3361 * INTERNAL_ERR
3362 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003363 *
3364 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
3365 */
3366#define RIL_REQUEST_DTMF_STOP 50
3367
3368/**
3369 * RIL_REQUEST_BASEBAND_VERSION
3370 *
3371 * Return string value indicating baseband version, eg
3372 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07003373 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003374 * "data" is NULL
3375 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07003376 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003377 * Valid errors:
3378 * SUCCESS
3379 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003380 * EMPTY_RECORD
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003381 *
3382 */
3383#define RIL_REQUEST_BASEBAND_VERSION 51
3384
3385/**
3386 * RIL_REQUEST_SEPARATE_CONNECTION
3387 *
3388 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07003389 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003390 * as the only other member of the current (active) call
3391 *
3392 * Like AT+CHLD=2x
3393 *
3394 * See TS 22.084 1.3.8.2 (iii)
3395 * TS 22.030 6.5.5 "Entering "2X followed by send"
3396 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07003397 *
3398 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07003399 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
3400 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003401 * "response" is NULL
3402 *
3403 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003404 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003405 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003406 * INVALID_ARGUMENTS
3407 * INVALID_STATE
3408 * NO_RESOURCES
3409 * NO_MEMORY
3410 * SYSTEM_ERR
3411 * MODEM_ERR
3412 * INTERNAL_ERR
3413 * INVALID_CALL_ID
3414 * INVALID_STATE
3415 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003416 */
3417#define RIL_REQUEST_SEPARATE_CONNECTION 52
3418
3419
3420/**
3421 * RIL_REQUEST_SET_MUTE
3422 *
3423 * Turn on or off uplink (microphone) mute.
3424 *
3425 * Will only be sent while voice call is active.
3426 * Will always be reset to "disable mute" when a new voice call is initiated
3427 *
3428 * "data" is an int *
3429 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
3430 *
3431 * "response" is NULL
3432 *
3433 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003434 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003435 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi68900f52016-03-11 12:02:55 -08003436 * INVALID_ARGUMENTS
3437 * NO_MEMORY
3438 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003439 */
3440
3441#define RIL_REQUEST_SET_MUTE 53
3442
3443/**
3444 * RIL_REQUEST_GET_MUTE
3445 *
3446 * Queries the current state of the uplink mute setting
3447 *
3448 * "data" is NULL
3449 * "response" is an int *
3450 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
3451 *
3452 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003453 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003454 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00003455 * SS_MODIFIED_TO_DIAL
3456 * SS_MODIFIED_TO_USSD
3457 * SS_MODIFIED_TO_SS
Ajay Nambi68900f52016-03-11 12:02:55 -08003458 * NO_MEMORY
3459 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003460 */
3461
3462#define RIL_REQUEST_GET_MUTE 54
3463
3464/**
3465 * RIL_REQUEST_QUERY_CLIP
3466 *
3467 * Queries the status of the CLIP supplementary service
3468 *
3469 * (for MMI code "*#30#")
3470 *
3471 * "data" is NULL
3472 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07003473 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003474 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07003475 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003476 *
3477 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003478 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003479 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003480 * NO_MEMORY
3481 * SYSTEM_ERR
3482 * MODEM_ERR
3483 * INTERNAL_ERR
3484 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003485 */
3486
3487#define RIL_REQUEST_QUERY_CLIP 55
3488
3489/**
Wink Savillec0114b32011-02-18 10:14:07 -08003490 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
3491 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003492 *
3493 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07003494 * context or CDMA data connection active
3495 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003496 *
3497 * "data" is NULL
3498 *
3499 * "response" is a "int *"
3500 * ((int *)response)[0] is an integer cause code defined in TS 24.008
3501 * section 6.1.3.1.3 or close approximation
3502 *
3503 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07003504 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08003505 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003506 * cases for error notification
3507 * and potential retries.
3508 *
3509 * Valid errors:
3510 * SUCCESS
3511 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003512 *
3513 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08003514 *
3515 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003516 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003517
Wink Savillef4c4d362009-04-02 01:37:03 -07003518#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003519
3520/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003521 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003522 *
Wink Saville29487ef2011-04-15 09:15:31 -07003523 * Returns the data call list. An entry is added when a
3524 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
3525 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
3526 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003527 *
3528 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08003529 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003530 *
3531 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003532 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003533 * RADIO_NOT_AVAILABLE (radio resetting)
Wink Saville29487ef2011-04-15 09:15:31 -07003534 *
3535 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003536 */
3537
Wink Savillef4c4d362009-04-02 01:37:03 -07003538#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003539
3540/**
johnwangf8bc1672009-05-14 19:19:47 -07003541 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003542 *
3543 * Request a radio reset. The RIL implementation may postpone
3544 * the reset until after this request is responded to if the baseband
3545 * is presently busy.
3546 *
johnwangf8bc1672009-05-14 19:19:47 -07003547 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
3548 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003549 * "data" is NULL
3550 * "response" is NULL
3551 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003552 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003553 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003554 * RADIO_NOT_AVAILABLE (radio resetting)
johnwangf8bc1672009-05-14 19:19:47 -07003555 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003556 */
3557
3558#define RIL_REQUEST_RESET_RADIO 58
3559
3560/**
3561 * RIL_REQUEST_OEM_HOOK_RAW
3562 *
3563 * This request reserved for OEM-specific uses. It passes raw byte arrays
3564 * back and forth.
3565 *
Wink Saville7f856802009-06-09 10:23:37 -07003566 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003567 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
3568 *
3569 * "data" is a char * of bytes copied from the byte[] data argument in java
3570 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07003571 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003572 * (byte[])(((AsyncResult)response.obj).result)
3573 *
Wink Saville7f856802009-06-09 10:23:37 -07003574 * An error response here will result in
3575 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003576 * (((AsyncResult)response.obj).exception) being an instance of
3577 * com.android.internal.telephony.gsm.CommandException
3578 *
3579 * Valid errors:
3580 * All
3581 */
3582
3583#define RIL_REQUEST_OEM_HOOK_RAW 59
3584
3585/**
3586 * RIL_REQUEST_OEM_HOOK_STRINGS
3587 *
3588 * This request reserved for OEM-specific uses. It passes strings
3589 * back and forth.
3590 *
Wink Saville7f856802009-06-09 10:23:37 -07003591 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003592 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
3593 *
3594 * "data" is a const char **, representing an array of null-terminated UTF-8
3595 * strings copied from the "String[] strings" argument to
3596 * invokeOemRilRequestStrings()
3597 *
3598 * "response" is a const char **, representing an array of null-terminated UTF-8
3599 * stings that will be returned via the caller's response message here:
3600 *
3601 * (String[])(((AsyncResult)response.obj).result)
3602 *
Wink Saville7f856802009-06-09 10:23:37 -07003603 * An error response here will result in
3604 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003605 * (((AsyncResult)response.obj).exception) being an instance of
3606 * com.android.internal.telephony.gsm.CommandException
3607 *
3608 * Valid errors:
3609 * All
3610 */
3611
3612#define RIL_REQUEST_OEM_HOOK_STRINGS 60
3613
3614/**
Jack Yu06181bb2017-01-10 12:10:41 -08003615 * RIL_REQUEST_SCREEN_STATE - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003616 *
3617 * Indicates the current state of the screen. When the screen is off, the
3618 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07003619 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
3620 * in an effort to conserve power. These notifications should resume when the
3621 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003622 *
Jack Yu06181bb2017-01-10 12:10:41 -08003623 * Note this request is deprecated. Use RIL_REQUEST_SEND_DEVICE_STATE to report the device state
3624 * to the modem and use RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER to turn on/off unsolicited
3625 * response from the modem in different scenarios.
3626 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003627 * "data" is int *
3628 * ((int *)data)[0] is == 1 for "Screen On"
3629 * ((int *)data)[0] is == 0 for "Screen Off"
3630 *
3631 * "response" is NULL
3632 *
3633 * Valid errors:
3634 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003635 */
3636#define RIL_REQUEST_SCREEN_STATE 61
3637
3638
3639/**
3640 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
3641 *
3642 * Enables/disables supplementary service related notifications
3643 * from the network.
3644 *
3645 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3646 *
3647 * "data" is int *
3648 * ((int *)data)[0] is == 1 for notifications enabled
3649 * ((int *)data)[0] is == 0 for notifications disabled
3650 *
3651 * "response" is NULL
3652 *
3653 * Valid errors:
3654 * SUCCESS
3655 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003656 * SIM_BUSY
Ajay Nambi10345892016-03-19 09:02:28 -07003657 * INVALID_ARGUMENTS
3658 * NO_MEMORY
3659 * SYSTEM_ERR
3660 * MODEM_ERR
3661 * INTERNAL_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003662 *
3663 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3664 */
3665#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
3666
3667/**
3668 * RIL_REQUEST_WRITE_SMS_TO_SIM
3669 *
3670 * Stores a SMS message to SIM memory.
3671 *
3672 * "data" is RIL_SMS_WriteArgs *
3673 *
3674 * "response" is int *
3675 * ((const int *)response)[0] is the record index where the message is stored.
3676 *
3677 * Valid errors:
3678 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003679 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003680 * INVALID_ARGUMENTS
3681 * INVALID_SMS_FORMAT
3682 * INTERNAL_ERR
3683 * MODEM_ERR
3684 * ENCODING_ERR
3685 * NO_MEMORY
3686 * NO_RESOURCES
3687 * INVALID_MODEM_STATE
3688 * MODE_NOT_SUPPORTED
3689 * INVALID_SMSC_ADDRESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003690 *
3691 */
3692#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
3693
3694/**
3695 * RIL_REQUEST_DELETE_SMS_ON_SIM
3696 *
3697 * Deletes a SMS message from SIM memory.
3698 *
3699 * "data" is int *
3700 * ((int *)data)[0] is the record index of the message to delete.
3701 *
3702 * "response" is NULL
3703 *
3704 * Valid errors:
3705 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003706 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003707 * INVALID_ARGUMENTS
3708 * NO_MEMORY
3709 * REQUEST_RATE_LIMITED
3710 * SYSTEM_ERR
3711 * MODEM_ERR
3712 * NO_SUCH_ENTRY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003713 *
3714 */
3715#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
3716
3717/**
3718 * RIL_REQUEST_SET_BAND_MODE
3719 *
3720 * Assign a specified band for RF configuration.
3721 *
3722 * "data" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003723 * ((int *)data)[0] is a RIL_RadioBandMode
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003724 *
3725 * "response" is NULL
3726 *
3727 * Valid errors:
3728 * SUCCESS
3729 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003730 * OPERATION_NOT_ALLOWED
Nathan Harold92839f12016-02-12 10:02:28 -08003731 *
3732 * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003733 */
3734#define RIL_REQUEST_SET_BAND_MODE 65
3735
3736/**
3737 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3738 *
3739 * Query the list of band mode supported by RF.
3740 *
3741 * "data" is NULL
3742 *
3743 * "response" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003744 * "response" points to an array of int's, the int[0] is the size of array;
3745 * subsequent values are a list of RIL_RadioBandMode listing supported modes.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003746 *
3747 * Valid errors:
3748 * SUCCESS
3749 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003750 *
3751 * See also: RIL_REQUEST_SET_BAND_MODE
3752 */
3753#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
3754
3755/**
3756 * RIL_REQUEST_STK_GET_PROFILE
3757 *
3758 * Requests the profile of SIM tool kit.
3759 * The profile indicates the SAT/USAT features supported by ME.
3760 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
3761 *
3762 * "data" is NULL
3763 *
3764 * "response" is a const char * containing SAT/USAT profile
3765 * in hexadecimal format string starting with first byte of terminal profile
3766 *
3767 * Valid errors:
3768 * RIL_E_SUCCESS
3769 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3770 * RIL_E_GENERIC_FAILURE
3771 */
3772#define RIL_REQUEST_STK_GET_PROFILE 67
3773
3774/**
3775 * RIL_REQUEST_STK_SET_PROFILE
3776 *
3777 * Download the STK terminal profile as part of SIM initialization
3778 * procedure
3779 *
3780 * "data" is a const char * containing SAT/USAT profile
3781 * in hexadecimal format string starting with first byte of terminal profile
3782 *
3783 * "response" is NULL
3784 *
3785 * Valid errors:
3786 * RIL_E_SUCCESS
3787 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3788 * RIL_E_GENERIC_FAILURE
3789 */
3790#define RIL_REQUEST_STK_SET_PROFILE 68
3791
3792/**
3793 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
3794 *
3795 * Requests to send a SAT/USAT envelope command to SIM.
3796 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
3797 *
3798 * "data" is a const char * containing SAT/USAT command
3799 * in hexadecimal format string starting with command tag
3800 *
3801 * "response" is a const char * containing SAT/USAT response
3802 * in hexadecimal format string starting with first byte of response
3803 * (May be NULL)
3804 *
3805 * Valid errors:
3806 * RIL_E_SUCCESS
3807 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003808 * SIM_BUSY
3809 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003810 * RIL_E_GENERIC_FAILURE
3811 */
3812#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
3813
3814/**
3815 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
3816 *
3817 * Requests to send a terminal response to SIM for a received
3818 * proactive command
3819 *
3820 * "data" is a const char * containing SAT/USAT response
3821 * in hexadecimal format string starting with first byte of response data
3822 *
3823 * "response" is NULL
3824 *
3825 * Valid errors:
3826 * RIL_E_SUCCESS
3827 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003828 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003829 * RIL_E_GENERIC_FAILURE
3830 */
3831#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3832
3833/**
3834 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3835 *
3836 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3837 * been initialized by ME already. (We could see the call has been in the 'call
3838 * list') So, STK application needs to accept/reject the call according as user
3839 * operations.
3840 *
3841 * "data" is int *
3842 * ((int *)data)[0] is > 0 for "accept" the call setup
3843 * ((int *)data)[0] is == 0 for "reject" the call setup
3844 *
3845 * "response" is NULL
3846 *
3847 * Valid errors:
3848 * RIL_E_SUCCESS
3849 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003850 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003851 * RIL_E_GENERIC_FAILURE
3852 */
3853#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3854
3855/**
3856 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3857 *
3858 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07003859 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003860 * "data" is NULL
3861 * "response" is NULL
3862 *
3863 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003864 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003865 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003866 * INVALID_STATE
3867 * NO_RESOURCES
3868 * NO_MEMORY
3869 * INVALID_ARGUMENTS
3870 * SYSTEM_ERR
3871 * MODEM_ERR
3872 * INTERNAL_ERR
3873 * INVALID_CALL_ID
3874 * INVALID_STATE
3875 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003876 */
3877#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3878
3879/**
3880 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3881 *
3882 * Requests to set the preferred network type for searching and registering
3883 * (CS/PS domain, RAT, and operation mode)
3884 *
Wink Savillec0114b32011-02-18 10:14:07 -08003885 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003886 *
3887 * "response" is NULL
3888 *
3889 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07003890 * SUCCESS
3891 * RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003892 * OPERATION_NOT_ALLOWED
Wink Savillef4c4d362009-04-02 01:37:03 -07003893 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003894 */
3895#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3896
3897/**
3898 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
3899 *
3900 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
3901 * for searching and registering
3902 *
3903 * "data" is NULL
3904 *
3905 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003906 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003907 *
3908 * Valid errors:
3909 * SUCCESS
3910 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003911 *
3912 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3913 */
3914#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
3915
3916/**
3917 * RIL_REQUEST_NEIGHBORING_CELL_IDS
3918 *
3919 * Request neighboring cell id in GSM network
3920 *
3921 * "data" is NULL
3922 * "response" must be a " const RIL_NeighboringCell** "
3923 *
3924 * Valid errors:
3925 * SUCCESS
3926 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003927 */
3928#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3929
3930/**
3931 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07003932 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003933 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07003934 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3935 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003936 *
3937 * Note: The RIL implementation should default to "updates enabled"
3938 * when the screen is on and "updates disabled" when the screen is off.
3939 *
3940 * "data" is int *
3941 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3942 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3943 *
3944 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07003945 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003946 * Valid errors:
3947 * SUCCESS
3948 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003949 *
3950 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3951 */
3952#define RIL_REQUEST_SET_LOCATION_UPDATES 76
3953
Wink Savillef4c4d362009-04-02 01:37:03 -07003954/**
Wink Savillec0114b32011-02-18 10:14:07 -08003955 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07003956 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003957 * Request to set the location where the CDMA subscription shall
3958 * be retrieved
3959 *
3960 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003961 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07003962 *
3963 * "response" is NULL
3964 *
3965 * Valid errors:
3966 * SUCCESS
3967 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07003968 * SIM_ABSENT
3969 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08003970 *
3971 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07003972 */
Wink Savillec0114b32011-02-18 10:14:07 -08003973#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07003974
3975/**
3976 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003977 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003978 * Request to set the roaming preferences in CDMA
3979 *
3980 * "data" is int *
3981 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3982 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3983 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003984 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003985 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003986 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003987 * Valid errors:
3988 * SUCCESS
3989 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07003990 */
3991#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
3992
3993/**
3994 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003995 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003996 * Request the actual setting of the roaming preferences in CDMA in the modem
3997 *
3998 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003999 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004000 * "response" is int *
4001 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
4002 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
4003 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07004004 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004005 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004006 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004007 * Valid errors:
4008 * SUCCESS
4009 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07004010 */
4011#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
4012
4013/**
4014 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07004015 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004016 * Request to set the TTY mode
4017 *
4018 * "data" is int *
4019 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07004020 * ((int *)data)[0] is == 1 for TTY Full
4021 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
4022 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07004023 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004024 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004025 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004026 * Valid errors:
4027 * SUCCESS
4028 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004029 * INVALID_ARGUMENTS
4030 * MODEM_ERR
4031 * INTERNAL_ERR
4032 * NO_MEMOR
4033 * INVALID_ARGUMENTS
4034 * MODEM_ERR
4035 * INTERNAL_ERR
4036 * NO_MEMORYY
Wink Savillef4c4d362009-04-02 01:37:03 -07004037 */
4038#define RIL_REQUEST_SET_TTY_MODE 80
4039
4040/**
4041 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07004042 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004043 * Request the setting of TTY mode
4044 *
4045 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004046 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004047 * "response" is int *
4048 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07004049 * ((int *)response)[0] is == 1 for TTY Full
4050 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
4051 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07004052 *
4053 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004054 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004055 * Valid errors:
4056 * SUCCESS
4057 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004058 * MODEM_ERR
4059 * INTERNAL_ERR
4060 * NO_MEMORY
4061 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07004062 */
4063#define RIL_REQUEST_QUERY_TTY_MODE 81
4064
4065/**
4066 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
4067 *
4068 * Request to set the preferred voice privacy mode used in voice
4069 * scrambling
4070 *
4071 * "data" is int *
4072 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
4073 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07004074 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004075 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004076 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004077 * Valid errors:
4078 * SUCCESS
4079 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004080 * INVALID_ARGUMENTS
4081 * SYSTEM_ERR
4082 * MODEM_ERR
4083 * INTERNAL_ERR
4084 * NO_MEMORY
4085 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07004086 */
4087#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
4088
4089/**
4090 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07004091 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004092 * Request the setting of preferred voice privacy mode
4093 *
4094 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004095 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004096 * "response" is int *
4097 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
4098 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07004099 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004100 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004101 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004102 * Valid errors:
4103 * SUCCESS
4104 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004105 * MODEM_ERR
4106 * INTERNAL_ERR
4107 * NO_MEMORY
4108 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07004109 */
4110#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
4111
4112/**
4113 * RIL_REQUEST_CDMA_FLASH
4114 *
4115 * Send FLASH
4116 *
4117 * "data" is const char *
4118 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07004119 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004120 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004121 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004122 * Valid errors:
4123 * SUCCESS
4124 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004125 * INVALID_ARGUMENTS
4126 * NO_MEMORY
4127 * SYSTEM_ERR
4128 * MODEM_ERR
4129 * INTERNAL_ERR
4130 * INVALID_CALL_ID
4131 * INVALID_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004132 *
4133 */
4134#define RIL_REQUEST_CDMA_FLASH 84
4135
4136/**
4137 * RIL_REQUEST_CDMA_BURST_DTMF
4138 *
4139 * Send DTMF string
4140 *
jsh602f80f2009-07-10 15:44:37 -07004141 * "data" is const char **
4142 * ((const char **)data)[0] is a DTMF string
4143 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
4144 * default
4145 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
4146 * default
Wink Saville7f856802009-06-09 10:23:37 -07004147 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004148 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004149 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004150 * Valid errors:
4151 * SUCCESS
4152 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004153 * INVALID_ARGUMENTS
4154 * NO_MEMORY
4155 * SYSTEM_ERR
4156 * MODEM_ERR
4157 * INTERNAL_ERR
4158 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07004159 *
4160 */
4161#define RIL_REQUEST_CDMA_BURST_DTMF 85
4162
4163/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004164 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07004165 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004166 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
4167 * If the checksum is valid the 20 digit AKEY is written to NV,
4168 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07004169 *
4170 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004171 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
4172 * where the last 6 digits are a checksum of the
4173 * first 20, as specified in TR45.AHAG
4174 * "Common Cryptographic Algorithms, Revision D.1
4175 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07004176 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004177 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004178 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004179 * Valid errors:
4180 * SUCCESS
4181 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07004182 *
4183 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004184#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07004185
4186/**
4187 * RIL_REQUEST_CDMA_SEND_SMS
4188 *
4189 * Send a CDMA SMS message
4190 *
4191 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07004192 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004193 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07004194 *
johnwangbfb151b2009-09-11 15:20:38 -07004195 * Based on the return error, caller decides to resend if sending sms
4196 * fails. The CDMA error class is derived as follows,
4197 * SUCCESS is error class 0 (no error)
4198 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
4199 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
4200 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004201 * Valid errors:
4202 * SUCCESS
4203 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07004204 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08004205 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004206 * INVALID_STATE
4207 * INVALID_ARGUMENTS
4208 * NO_MEMORY
4209 * REQUEST_RATE_LIMITED
4210 * INVALID_SMS_FORMAT
4211 * SYSTEM_ERR
4212 * FDN_CHECK_FAILURE
4213 * MODEM_ERR
4214 * NETWORK_ERR
4215 * ENCODING_ERR
4216 * INVALID_SMSC_ADDRESS
4217 * MODE_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004218 *
4219 */
4220#define RIL_REQUEST_CDMA_SEND_SMS 87
4221
4222/**
4223 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4224 *
4225 * Acknowledge the success or failure in the receipt of SMS
4226 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4227 *
4228 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07004229 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004230 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004231 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004232 * Valid errors:
4233 * SUCCESS
4234 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004235 * INVALID_ARGUMENTS
4236 * NO_SMS_TO_ACK
4237 * INVALID_STATE
4238 * NO_MEMORY
4239 * REQUEST_RATE_LIMITED
4240 * SYSTEM_ERR
4241 * MODEM_ERR
4242 * INVALID_STATE
4243 * MODE_NOT_SUPPORTED
4244 * NETWORK_NOT_READY
4245 * INVALID_MODEM_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004246 *
4247 */
4248#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
4249
4250/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004251 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004252 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004253 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
4254 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004255 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004256 *
4257 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
4258 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
4259 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004260 * Valid errors:
4261 * SUCCESS
4262 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004263 * INVALID_STATE
4264 * NO_MEMORY
4265 * REQUEST_RATE_LIMITED
4266 * SYSTEM_ERR
4267 * NO_RESOURCES
4268 * MODEM_ERR
4269 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004270 *
4271 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004272#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07004273
4274/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004275 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004276 *
4277 * Set GSM/WCDMA Cell Broadcast SMS config
4278 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004279 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
4280 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
4281 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004282 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004283 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004284 * Valid errors:
4285 * SUCCESS
4286 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004287 * INVALID_STATE
4288 * INVALID_ARGUMENTS
4289 * NO_MEMORY
4290 * SYSTEM_ERR
4291 * REQUEST_RATE_LIMITED
4292 * MODEM_ERR
4293 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004294 *
4295 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004296#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07004297
4298/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004299 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004300 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004301* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07004302 *
4303 * "data" is const int *
4304 * (const int *)data[0] indicates to activate or turn off the
4305 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
4306 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004307 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004308 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004309 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004310 * Valid errors:
4311 * SUCCESS
4312 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004313 * INVALID_STATE
4314 * INVALID_ARGUMENTS
4315 * NO_MEMORY
4316 * SYSTEM_ERR
4317 * REQUEST_RATE_LIMITED
4318 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004319 *
4320 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004321#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07004322
4323/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004324 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004325 *
4326 * Request the setting of CDMA Broadcast SMS config
4327 *
4328 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004329 *
4330 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
4331 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
4332 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004333 * Valid errors:
4334 * SUCCESS
4335 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004336 * INVALID_STATE
4337 * NO_MEMORY
4338 * REQUEST_RATE_LIMITED
4339 * SYSTEM_ERR
4340 * NO_RESOURCES
4341 * MODEM_ERR
4342 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004343 *
4344 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004345#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07004346
4347/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004348 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004349 *
4350 * Set CDMA Broadcast SMS config
4351 *
Jack Yu06181bb2017-01-10 12:10:41 -08004352 * "data" is a const RIL_CDMA_BroadcastSmsConfigInfo **
Wink Savillea592eeb2009-05-22 13:26:36 -07004353 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
4354 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004355 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004356 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004357 * Valid errors:
4358 * SUCCESS
4359 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004360 * INVALID_STATE
4361 * INVALID_ARGUMENTS
4362 * NO_MEMORY
4363 * SYSTEM_ERR
4364 * REQUEST_RATE_LIMITED
4365 * MODEM_ERR
4366 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004367 *
4368 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004369#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07004370
4371/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004372 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004373 *
4374 * Enable or disable the reception of CDMA Broadcast SMS
4375 *
4376 * "data" is const int *
4377 * (const int *)data[0] indicates to activate or turn off the
4378 * reception of CDMA Broadcast SMS, 0-1,
4379 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004380 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004381 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004382 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004383 * Valid errors:
4384 * SUCCESS
4385 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004386 * INVALID_STATE
4387 * INVALID_ARGUMENTS
4388 * NO_MEMORY
4389 * SYSTEM_ERR
4390 * REQUEST_RATE_LIMITED
4391 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004392 *
4393 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004394#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07004395
4396/**
4397 * RIL_REQUEST_CDMA_SUBSCRIPTION
4398 *
4399 * Request the device MDN / H_SID / H_NID.
4400 *
4401 * The request is only allowed when CDMA subscription is available. When CDMA
4402 * subscription is changed, application layer should re-issue the request to
4403 * update the subscription information.
4404 *
4405 * If a NULL value is returned for any of the device id, it means that error
4406 * accessing the device.
4407 *
4408 * "response" is const char **
4409 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07004410 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
4411 * CDMA subscription is available, in decimal format
4412 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
4413 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07004414 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07004415 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07004416 *
4417 * Valid errors:
4418 * SUCCESS
4419 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
4420 */
4421
Wink Savilleeafe79d2009-04-03 18:02:34 -07004422#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07004423
4424/**
4425 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
4426 *
4427 * Stores a CDMA SMS message to RUIM memory.
4428 *
4429 * "data" is RIL_CDMA_SMS_WriteArgs *
4430 *
4431 * "response" is int *
4432 * ((const int *)response)[0] is the record index where the message is stored.
4433 *
4434 * Valid errors:
4435 * SUCCESS
4436 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004437 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08004438 * INVALID_ARGUMENTS
4439 * INVALID_SMS_FORMAT
4440 * INTERNAL_ERR
4441 * MODEM_ERR
4442 * ENCODING_ERR
4443 * NO_MEMORY
4444 * NO_RESOURCES
4445 * INVALID_MODEM_STATE
4446 * MODE_NOT_SUPPORTED
4447 * INVALID_SMSC_ADDRESS
Wink Savillef4c4d362009-04-02 01:37:03 -07004448 *
4449 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004450#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07004451
4452/**
4453 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
4454 *
4455 * Deletes a CDMA SMS message from RUIM memory.
4456 *
4457 * "data" is int *
4458 * ((int *)data)[0] is the record index of the message to delete.
4459 *
4460 * "response" is NULL
4461 *
4462 * Valid errors:
4463 * SUCCESS
4464 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004465 * INVALID_ARGUMENTS
4466 * NO_MEMORY
4467 * REQUEST_RATE_LIMITED
4468 * SYSTEM_ERR
4469 * MODEM_ERR
4470 * NO_SUCH_ENTRY
Wink Savillef4c4d362009-04-02 01:37:03 -07004471 *
4472 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004473#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07004474
4475/**
4476 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07004477 *
4478 * Request the device ESN / MEID / IMEI / IMEISV.
4479 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004480 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07004481 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07004482 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004483 *
4484 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07004485 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004486 *
4487 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07004488 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004489 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004490 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07004491 * ((const char **)response)[0] is IMEI if GSM subscription is available
4492 * ((const char **)response)[1] is IMEISV if GSM subscription is available
4493 * ((const char **)response)[2] is ESN if CDMA subscription is available
4494 * ((const char **)response)[3] is MEID if CDMA subscription is available
4495 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004496 * Valid errors:
4497 * SUCCESS
4498 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07004499 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004500#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07004501
Wink Saville1b5fd232009-04-22 14:50:00 -07004502/**
4503 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
4504 *
4505 * Request the radio's system selection module to exit emergency
4506 * callback mode. RIL will not respond with SUCCESS until the modem has
4507 * completely exited from Emergency Callback Mode.
4508 *
4509 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004510 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004511 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004512 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004513 * Valid errors:
4514 * SUCCESS
4515 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004516 * OPERATION_NOT_ALLOWED
Wink Saville1b5fd232009-04-22 14:50:00 -07004517 *
4518 */
4519#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07004520
jsh000a9fe2009-05-11 14:52:35 -07004521/**
4522 * RIL_REQUEST_GET_SMSC_ADDRESS
4523 *
4524 * Queries the default Short Message Service Center address on the device.
4525 *
4526 * "data" is NULL
4527 *
4528 * "response" is const char * containing the SMSC address.
4529 *
4530 * Valid errors:
4531 * SUCCESS
4532 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004533 * NO_MEMORY
4534 * REQUEST_RATE_LIMITED
4535 * SYSTEM_ERR
4536 * INTERNAL_ERR
4537 * MODEM_ERR
4538 * INVALID_ARGUMENTS
4539 * INVALID_MODEM_STATE
4540 * NOT_PROVISIONED
jsh000a9fe2009-05-11 14:52:35 -07004541 *
4542 */
4543#define RIL_REQUEST_GET_SMSC_ADDRESS 100
4544
4545/**
4546 * RIL_REQUEST_SET_SMSC_ADDRESS
4547 *
4548 * Sets the default Short Message Service Center address on the device.
4549 *
4550 * "data" is const char * containing the SMSC address.
4551 *
4552 * "response" is NULL
4553 *
4554 * Valid errors:
4555 * SUCCESS
4556 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004557 * INVALID_ARGUMENTS
4558 * INVALID_SMS_FORMAT
4559 * NO_MEMORY
4560 * SYSTEM_ERR
4561 * REQUEST_RATE_LIMITED
4562 * MODEM_ERR
4563 * NO_RESOURCES
jsh000a9fe2009-05-11 14:52:35 -07004564 *
4565 */
4566#define RIL_REQUEST_SET_SMSC_ADDRESS 101
4567
jshb60444e2009-05-29 11:09:17 -07004568/**
4569 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
4570 *
4571 * Indicates whether there is storage available for new SMS messages.
4572 *
4573 * "data" is int *
4574 * ((int *)data)[0] is 1 if memory is available for storing new messages
4575 * is 0 if memory capacity is exceeded
4576 *
4577 * "response" is NULL
4578 *
4579 * Valid errors:
4580 * SUCCESS
4581 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004582 * INVALID_ARGUMENTS
4583 * NO_MEMORY
4584 * INVALID_STATE
4585 * SYSTEM_ERR
4586 * REQUEST_RATE_LIMITED
4587 * MODEM_ERR
jshb60444e2009-05-29 11:09:17 -07004588 *
4589 */
4590#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
4591
Wink Saville2641d5b2009-06-08 17:40:42 -07004592/**
4593 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
4594 *
4595 * Indicates that the StkSerivce is running and is
4596 * ready to receive RIL_UNSOL_STK_XXXXX commands.
4597 *
4598 * "data" is NULL
4599 * "response" is NULL
4600 *
4601 * Valid errors:
4602 * SUCCESS
4603 * RADIO_NOT_AVAILABLE
Wink Saville2641d5b2009-06-08 17:40:42 -07004604 *
4605 */
4606#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
4607
Wink Savillec0114b32011-02-18 10:14:07 -08004608/**
4609 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
4610 *
4611 * Request to query the location where the CDMA subscription shall
4612 * be retrieved
4613 *
4614 * "data" is NULL
4615 *
4616 * "response" is int *
4617 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4618 *
4619 * Valid errors:
4620 * SUCCESS
4621 * RADIO_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08004622 * SUBSCRIPTION_NOT_AVAILABLE
4623 *
4624 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
4625 */
4626#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
4627
Jake Hambyfa8d5842011-08-19 16:22:18 -07004628/**
4629 * RIL_REQUEST_ISIM_AUTHENTICATION
4630 *
4631 * Request the ISIM application on the UICC to perform AKA
4632 * challenge/response algorithm for IMS authentication
4633 *
4634 * "data" is a const char * containing the challenge string in Base64 format
4635 * "response" is a const char * containing the response in Base64 format
4636 *
4637 * Valid errors:
4638 * SUCCESS
4639 * RADIO_NOT_AVAILABLE
Jake Hambyfa8d5842011-08-19 16:22:18 -07004640 */
4641#define RIL_REQUEST_ISIM_AUTHENTICATION 105
4642
Jake Hamby300105d2011-09-26 01:01:44 -07004643/**
4644 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
4645 *
4646 * Acknowledge successful or failed receipt of SMS previously indicated
4647 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
4648 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
4649 *
4650 * "data" is const char **
4651 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
4652 * is "0" on failed receipt (send RP-ERROR)
4653 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
4654 *
4655 * "response" is NULL
4656 *
4657 * Valid errors:
4658 * SUCCESS
4659 * RADIO_NOT_AVAILABLE
Jake Hamby300105d2011-09-26 01:01:44 -07004660 */
4661#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
4662
4663/**
4664 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
4665 *
4666 * Requests to send a SAT/USAT envelope command to SIM.
4667 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
4668 *
4669 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
4670 * the SW1 and SW2 status bytes from the UICC response are returned along with
4671 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
4672 *
4673 * The RIL implementation shall perform the normal processing of a '91XX'
4674 * response in SW1/SW2 to retrieve the pending proactive command and send it
4675 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
4676 *
4677 * "data" is a const char * containing the SAT/USAT command
4678 * in hexadecimal format starting with command tag
4679 *
4680 * "response" is a const RIL_SIM_IO_Response *
4681 *
4682 * Valid errors:
4683 * RIL_E_SUCCESS
4684 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08004685 * SIM_BUSY
4686 * OPERATION_NOT_ALLOWED
Jake Hamby300105d2011-09-26 01:01:44 -07004687 * RIL_E_GENERIC_FAILURE
4688 */
4689#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
4690
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004691/**
4692 * RIL_REQUEST_VOICE_RADIO_TECH
4693 *
4694 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
4695 * when radio state is RADIO_STATE_ON
4696 *
4697 * "data" is NULL
4698 * "response" is int *
4699 * ((int *) response)[0] is of type const RIL_RadioTechnology
4700 *
4701 * Valid errors:
4702 * SUCCESS
4703 * RADIO_NOT_AVAILABLE
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004704 */
4705#define RIL_REQUEST_VOICE_RADIO_TECH 108
4706
Wink Saville8a9e0212013-04-09 12:11:38 -07004707/**
4708 * RIL_REQUEST_GET_CELL_INFO_LIST
4709 *
4710 * Request all of the current cell information known to the radio. The radio
4711 * must a list of all current cells, including the neighboring cells. If for a particular
4712 * cell information isn't known then the appropriate unknown value will be returned.
4713 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
4714 *
4715 * "data" is NULL
4716 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08004717 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07004718 */
4719#define RIL_REQUEST_GET_CELL_INFO_LIST 109
4720
4721/**
4722 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
4723 *
4724 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
Wink Savillec57b3eb2013-04-17 12:51:41 -07004725 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
Wink Saville8a9e0212013-04-09 12:11:38 -07004726 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
4727 * a RIL_UNSOL_CELL_INFO_LIST.
4728 *
4729 * "data" is int *
4730 * ((int *)data)[0] is minimum time in milliseconds
4731 *
4732 * "response" is NULL
4733 *
4734 * Valid errors:
4735 * SUCCESS
4736 * RADIO_NOT_AVAILABLE
Wink Saville8a9e0212013-04-09 12:11:38 -07004737 */
4738#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
Jake Hamby300105d2011-09-26 01:01:44 -07004739
Sungmin Choi75697532013-04-26 15:04:45 -07004740/**
4741 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
4742 *
4743 * Set an apn to initial attach network
Ankit Nbc37e512016-12-07 21:05:43 +05304744 *
4745 * "data" is a const char **
4746 * ((const char **)data)[0] is the APN to connect if radio technology is LTE
4747 * ((const char **)data)[1] is the connection type to request must be one of the
4748 * PDP_type values in TS 27.007 section 10.1.1.
4749 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
4750 * ((const char **)data)[2] is the PAP / CHAP auth type. Values:
4751 * 0 => PAP and CHAP is never performed.
4752 * 1 => PAP may be performed; CHAP is never performed.
4753 * 2 => CHAP may be performed; PAP is never performed.
4754 * 3 => PAP / CHAP may be performed - baseband dependent.
4755 * ((const char **)data)[3] is the username for APN, or NULL
4756 * ((const char **)data)[4] is the password for APN, or NULL
4757 *
Sungmin Choi75697532013-04-26 15:04:45 -07004758 * "response" is NULL
4759 *
4760 * Valid errors:
4761 * SUCCESS
4762 * RADIO_NOT_AVAILABLE (radio resetting)
Sungmin Choi75697532013-04-26 15:04:45 -07004763 * SUBSCRIPTION_NOT_AVAILABLE
4764 */
4765#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
4766
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004767/**
4768 * RIL_REQUEST_IMS_REGISTRATION_STATE
4769 *
Nathan Harold0eb43c22016-12-19 12:04:32 -08004770 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
4771 * instead, provide IMS registration status via an IMS Service.
4772 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004773 * Request current IMS registration state
4774 *
4775 * "data" is NULL
4776 *
4777 * "response" is int *
4778 * ((int *)response)[0] is registration state:
4779 * 0 - Not registered
4780 * 1 - Registered
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004781 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004782 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004783 * must follow with IMS SMS format:
4784 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004785 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
4786 *
4787 * Valid errors:
4788 * SUCCESS
4789 * RADIO_NOT_AVAILABLE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004790 */
4791#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
4792
4793/**
4794 * RIL_REQUEST_IMS_SEND_SMS
4795 *
4796 * Send a SMS message over IMS
4797 *
4798 * "data" is const RIL_IMS_SMS_Message *
4799 *
4800 * "response" is a const RIL_SMS_Response *
4801 *
4802 * Based on the return error, caller decides to resend if sending sms
4803 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
4804 * In case of retry, data is encoded based on Voice Technology available.
4805 *
4806 * Valid errors:
4807 * SUCCESS
4808 * RADIO_NOT_AVAILABLE
4809 * SMS_SEND_FAIL_RETRY
4810 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08004811 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004812 * INVALID_ARGUMENTS
4813 * INVALID_STATE
4814 * NO_MEMORY
4815 * INVALID_SMS_FORMAT
4816 * SYSTEM_ERR
4817 * REQUEST_RATE_LIMITED
4818 * MODEM_ERR
4819 * NETWORK_ERR
4820 * ENCODING_ERR
4821 * INVALID_SMSC_ADDRESS
4822 * MODE_NOT_SUPPORTED
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004823 *
4824 */
4825#define RIL_REQUEST_IMS_SEND_SMS 113
4826
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004827/**
4828 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
4829 *
4830 * Request APDU exchange on the basic channel. This command reflects TS 27.007
4831 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
4832 * of GSM/CDMA, and filter commands appropriately. It should filter
4833 * channel management and SELECT by DF name commands.
4834 *
4835 * "data" is a const RIL_SIM_APDU *
4836 * "sessionid" field should be ignored.
4837 *
4838 * "response" is a const RIL_SIM_IO_Response *
4839 *
4840 * Valid errors:
4841 * SUCCESS
4842 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004843 */
4844#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
4845
4846/**
4847 * RIL_REQUEST_SIM_OPEN_CHANNEL
4848 *
4849 * Open a new logical channel and select the given application. This command
4850 * reflects TS 27.007 "open logical channel" operation (+CCHO).
4851 *
4852 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
4853 *
4854 * "response" is int *
4855 * ((int *)data)[0] contains the session id of the logical channel.
Shishir Agrawal760123f2014-10-14 09:14:57 -07004856 * ((int *)data)[1] onwards may optionally contain the select response for the
4857 * open channel command with one byte per integer.
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004858 *
4859 * Valid errors:
4860 * SUCCESS
4861 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004862 * MISSING_RESOURCE
4863 * NO_SUCH_ELEMENT
4864 */
4865#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
4866
4867/**
4868 * RIL_REQUEST_SIM_CLOSE_CHANNEL
4869 *
4870 * Close a previously opened logical channel. This command reflects TS 27.007
4871 * "close logical channel" operation (+CCHC).
4872 *
4873 * "data" is int *
4874 * ((int *)data)[0] is the session id of logical the channel to close.
4875 *
4876 * "response" is NULL
4877 *
4878 * Valid errors:
4879 * SUCCESS
4880 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004881 */
4882#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
4883
4884/**
4885 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
4886 *
4887 * Exchange APDUs with a UICC over a previously opened logical channel. This
4888 * command reflects TS 27.007 "generic logical channel access" operation
4889 * (+CGLA). The modem should filter channel management and SELECT by DF name
4890 * commands.
4891 *
4892 * "data" is a const RIL_SIM_APDU*
4893 *
4894 * "response" is a const RIL_SIM_IO_Response *
4895 *
4896 * Valid errors:
4897 * SUCCESS
4898 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004899 */
4900#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
4901
Jake Hamby8a4a2332014-01-15 13:12:05 -08004902/**
4903 * RIL_REQUEST_NV_READ_ITEM
4904 *
4905 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4906 * This is used for device configuration by some CDMA operators.
4907 *
4908 * "data" is a const RIL_NV_ReadItem *
4909 *
4910 * "response" is const char * containing the contents of the NV item
4911 *
4912 * Valid errors:
4913 * SUCCESS
4914 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004915 */
4916#define RIL_REQUEST_NV_READ_ITEM 118
4917
4918/**
4919 * RIL_REQUEST_NV_WRITE_ITEM
4920 *
4921 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4922 * This is used for device configuration by some CDMA operators.
4923 *
4924 * "data" is a const RIL_NV_WriteItem *
4925 *
4926 * "response" is NULL
4927 *
4928 * Valid errors:
4929 * SUCCESS
4930 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004931 */
4932#define RIL_REQUEST_NV_WRITE_ITEM 119
4933
4934/**
4935 * RIL_REQUEST_NV_WRITE_CDMA_PRL
4936 *
4937 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
4938 * This is used for device configuration by some CDMA operators.
4939 *
4940 * "data" is a const char * containing the PRL as a byte array
4941 *
4942 * "response" is NULL
4943 *
4944 * Valid errors:
4945 * SUCCESS
4946 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004947 */
4948#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
4949
4950/**
4951 * RIL_REQUEST_NV_RESET_CONFIG
4952 *
4953 * Reset the radio NV configuration to the factory state.
4954 * This is used for device configuration by some CDMA operators.
4955 *
4956 * "data" is int *
Jake Hambyd27c9d52014-02-06 14:52:05 -08004957 * ((int *)data)[0] is 1 to reload all NV items
4958 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
4959 * ((int *)data)[0] is 3 for factory reset (RTN)
Jake Hamby8a4a2332014-01-15 13:12:05 -08004960 *
4961 * "response" is NULL
4962 *
4963 * Valid errors:
4964 * SUCCESS
4965 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004966 */
4967#define RIL_REQUEST_NV_RESET_CONFIG 121
4968
Etan Cohend3652192014-06-20 08:28:44 -07004969 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
4970 * FIXME This API needs to have more documentation.
4971 *
4972 * Selection/de-selection of a subscription from a SIM card
4973 * "data" is const RIL_SelectUiccSub*
4974
4975 *
4976 * "response" is NULL
4977 *
4978 * Valid errors:
4979 * SUCCESS
4980 * RADIO_NOT_AVAILABLE (radio resetting)
Etan Cohend3652192014-06-20 08:28:44 -07004981 * SUBSCRIPTION_NOT_SUPPORTED
4982 *
4983 */
4984#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
4985
4986/**
4987 * RIL_REQUEST_ALLOW_DATA
4988 *
4989 * Tells the modem whether data calls are allowed or not
4990 *
4991 * "data" is int *
4992 * FIXME slotId and aid will be added.
4993 * ((int *)data)[0] is == 0 to allow data calls
4994 * ((int *)data)[0] is == 1 to disallow data calls
4995 *
4996 * "response" is NULL
4997 *
4998 * Valid errors:
4999 *
5000 * SUCCESS
5001 * RADIO_NOT_AVAILABLE (radio resetting)
Etan Cohend3652192014-06-20 08:28:44 -07005002 *
5003 */
5004#define RIL_REQUEST_ALLOW_DATA 123
5005
5006/**
5007 * RIL_REQUEST_GET_HARDWARE_CONFIG
5008 *
5009 * Request all of the current hardware (modem and sim) associated
5010 * with the RIL.
5011 *
5012 * "data" is NULL
5013 *
5014 * "response" is an array of RIL_HardwareConfig.
5015 */
5016#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
5017
5018/**
Amit Mahajan2b772032014-06-26 14:20:11 -07005019 * RIL_REQUEST_SIM_AUTHENTICATION
Etan Cohend3652192014-06-20 08:28:44 -07005020 *
5021 * Returns the response of SIM Authentication through RIL to a
5022 * challenge request.
5023 *
5024 * "data" Base64 encoded string containing challenge:
5025 * int authContext; P2 value of authentication command, see P2 parameter in
5026 * 3GPP TS 31.102 7.1.2
5027 * char *authData; the challenge string in Base64 format, see 3GPP
5028 * TS 31.102 7.1.2
5029 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
5030 * NULL if no value
5031 *
5032 * "response" Base64 encoded strings containing response:
5033 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
5034 * int sw2;
5035 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
5036 */
Amit Mahajan2b772032014-06-26 14:20:11 -07005037#define RIL_REQUEST_SIM_AUTHENTICATION 125
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08005038
Wink Savillec29360a2014-07-13 05:17:28 -07005039/**
5040 * RIL_REQUEST_GET_DC_RT_INFO
5041 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005042 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005043 * Requests the Data Connection Real Time Info
5044 *
5045 * "data" is NULL
5046 *
5047 * "response" is the most recent RIL_DcRtInfo
5048 *
5049 * Valid errors:
5050 * SUCCESS
5051 * RADIO_NOT_AVAILABLE
Wink Savillec29360a2014-07-13 05:17:28 -07005052 *
5053 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
5054 */
5055#define RIL_REQUEST_GET_DC_RT_INFO 126
5056
5057/**
5058 * RIL_REQUEST_SET_DC_RT_INFO_RATE
5059 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005060 * The request is DEPRECATED
Wink Savillec29360a2014-07-13 05:17:28 -07005061 * This is the minimum number of milliseconds between successive
5062 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
5063 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
5064 * 0 means send as fast as possible.
5065 *
5066 * "data" The number of milliseconds as an int
5067 *
5068 * "response" is null
5069 *
5070 * Valid errors:
5071 * SUCCESS must not fail
5072 */
5073#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
5074
Amit Mahajanc796e222014-08-13 16:54:01 +00005075/**
5076 * RIL_REQUEST_SET_DATA_PROFILE
5077 *
5078 * Set data profile in modem
Hui Wang8d679622014-10-16 14:59:27 -05005079 * Modem should erase existed profiles from framework, and apply new profiles
Jack Yu06181bb2017-01-10 12:10:41 -08005080 * "data" is a const RIL_DataProfileInfo **
Amit Mahajanc796e222014-08-13 16:54:01 +00005081 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
5082 * "response" is NULL
5083 *
5084 * Valid errors:
5085 * SUCCESS
5086 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajanc796e222014-08-13 16:54:01 +00005087 * SUBSCRIPTION_NOT_AVAILABLE
5088 */
5089#define RIL_REQUEST_SET_DATA_PROFILE 128
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005090
5091/**
5092 * RIL_REQUEST_SHUTDOWN
5093 *
5094 * Device is shutting down. All further commands are ignored
5095 * and RADIO_NOT_AVAILABLE must be returned.
5096 *
5097 * "data" is null
5098 * "response" is NULL
5099 *
5100 * Valid errors:
5101 * SUCCESS
5102 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005103 * OPERATION_NOT_ALLOWED
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005104 */
5105#define RIL_REQUEST_SHUTDOWN 129
5106
Wink Saville8b4e4f72014-10-17 15:01:45 -07005107/**
5108 * RIL_REQUEST_GET_RADIO_CAPABILITY
5109 *
5110 * Used to get phone radio capablility.
5111 *
Abhishek Adappa772c0d22015-02-09 11:11:12 -08005112 * "data" is the RIL_RadioCapability structure
Wink Saville8b4e4f72014-10-17 15:01:45 -07005113 *
5114 * Valid errors:
5115 * SUCCESS
5116 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005117 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005118 */
5119#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
5120
5121/**
5122 * RIL_REQUEST_SET_RADIO_CAPABILITY
5123 *
5124 * Used to set the phones radio capability. Be VERY careful
5125 * using this request as it may cause some vendor modems to reset. Because
5126 * of the possible modem reset any RIL commands after this one may not be
5127 * processed.
5128 *
5129 * "data" is the RIL_RadioCapability structure
5130 *
5131 * "response" is the RIL_RadioCapability structure, used to feedback return status
5132 *
5133 * Valid errors:
5134 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
5135 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005136 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005137 */
5138#define RIL_REQUEST_SET_RADIO_CAPABILITY 131
5139
fengluf7408292015-04-14 14:53:55 -07005140/**
5141 * RIL_REQUEST_START_LCE
5142 *
5143 * Start Link Capacity Estimate (LCE) service if supported by the radio.
5144 *
5145 * "data" is const int *
5146 * ((const int*)data)[0] specifies the desired reporting interval (ms).
fenglu290add32015-05-01 17:05:15 -07005147 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
fengluf7408292015-04-14 14:53:55 -07005148 *
fenglu290add32015-05-01 17:05:15 -07005149 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005150 *
5151 * Valid errors:
5152 * SUCCESS
5153 * RADIO_NOT_AVAILABLE
5154 * LCE_NOT_SUPPORTED
5155 */
5156#define RIL_REQUEST_START_LCE 132
5157
5158/**
5159 * RIL_REQUEST_STOP_LCE
5160 *
5161 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
5162 * idempotent for the radio modem.
5163 *
fenglu290add32015-05-01 17:05:15 -07005164 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005165 *
5166 * Valid errors:
5167 * SUCCESS
5168 * RADIO_NOT_AVAILABLE
5169 * LCE_NOT_SUPPORTED
5170 */
5171#define RIL_REQUEST_STOP_LCE 133
5172
5173/**
5174 * RIL_REQUEST_PULL_LCEDATA
5175 *
5176 * Pull LCE service for capacity information.
5177 *
fenglu290add32015-05-01 17:05:15 -07005178 * "response" is the RIL_LceDataInfo.
fengluf7408292015-04-14 14:53:55 -07005179 *
5180 * Valid errors:
5181 * SUCCESS
5182 * RADIO_NOT_AVAILABLE
5183 * LCE_NOT_SUPPORTED
5184 */
5185#define RIL_REQUEST_PULL_LCEDATA 134
5186
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005187/**
5188 * RIL_REQUEST_GET_ACTIVITY_INFO
5189 *
Nathan Haroldc8635212016-10-10 11:15:21 -07005190 * Get modem activity information for power consumption estimation.
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005191 *
Nathan Haroldc8635212016-10-10 11:15:21 -07005192 * Request clear-on-read statistics information that is used for
5193 * estimating the per-millisecond power consumption of the cellular
5194 * modem.
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005195 *
5196 * "data" is null
5197 * "response" is const RIL_ActivityStatsInfo *
5198 *
5199 * Valid errors:
5200 *
5201 * SUCCESS
5202 * RADIO_NOT_AVAILABLE (radio resetting)
5203 * GENERIC_FAILURE
5204 */
5205#define RIL_REQUEST_GET_ACTIVITY_INFO 135
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005206
Meng Wangb4e34312016-05-12 14:54:36 -07005207/**
5208 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS
5209 *
Meng Wangd5c540f2016-07-15 15:41:19 -07005210 * Set carrier restrictions for this sim slot. Expected modem behavior:
5211 * If never receives this command
5212 * - Must allow all carriers
5213 * Receives this command with data being NULL
5214 * - Must allow all carriers. If a previously allowed SIM is present, modem must not reload
5215 * the SIM. If a previously disallowed SIM is present, reload the SIM and notify Android.
5216 * Receives this command with a list of carriers
5217 * - Only allow specified carriers, persist across power cycles and FDR. If a present SIM
5218 * is in the allowed list, modem must not reload the SIM. If a present SIM is *not* in
5219 * the allowed list, modem must detach from the registered network and only keep emergency
5220 * service, and notify Android SIM refresh reset with new SIM state being
5221 * RIL_CARDSTATE_RESTRICTED. Emergency service must be enabled.
Meng Wangb4e34312016-05-12 14:54:36 -07005222 *
5223 * "data" is const RIL_CarrierRestrictions *
5224 * A list of allowed carriers and possibly a list of excluded carriers.
5225 * If data is NULL, means to clear previous carrier restrictions and allow all carriers
5226 *
5227 * "response" is int *
5228 * ((int *)data)[0] contains the number of allowed carriers which have been set correctly.
5229 * On success, it should match the length of list data->allowed_carriers.
5230 * If data is NULL, the value must be 0.
5231 *
5232 * Valid errors:
5233 * RIL_E_SUCCESS
5234 * RIL_E_INVALID_ARGUMENTS
5235 * RIL_E_RADIO_NOT_AVAILABLE
5236 * RIL_E_REQUEST_NOT_SUPPORTED
5237 */
5238#define RIL_REQUEST_SET_CARRIER_RESTRICTIONS 136
5239
5240/**
5241 * RIL_REQUEST_GET_CARRIER_RESTRICTIONS
5242 *
Meng Wangd5c540f2016-07-15 15:41:19 -07005243 * Get carrier restrictions for this sim slot. Expected modem behavior:
5244 * Return list of allowed carriers, or null if all carriers are allowed.
Meng Wangb4e34312016-05-12 14:54:36 -07005245 *
5246 * "data" is NULL
5247 *
5248 * "response" is const RIL_CarrierRestrictions *.
5249 * If response is NULL, it means all carriers are allowed.
5250 *
5251 * Valid errors:
5252 * RIL_E_SUCCESS
5253 * RIL_E_RADIO_NOT_AVAILABLE
5254 * RIL_E_REQUEST_NOT_SUPPORTED
5255 */
5256#define RIL_REQUEST_GET_CARRIER_RESTRICTIONS 137
5257
Jack Yu06181bb2017-01-10 12:10:41 -08005258/**
5259 * RIL_REQUEST_SEND_DEVICE_STATE
5260 *
5261 * Send the updated device state.
5262 * Modem can perform power saving based on the provided device state.
5263 * "data" is const int *
5264 * ((const int*)data)[0] A RIL_DeviceStateType that specifies the device state type.
5265 * ((const int*)data)[1] Specifies the state. See RIL_DeviceStateType for the definition of each
5266 * type.
5267 *
5268 * "datalen" is count * sizeof(const RIL_DeviceState *)
5269 * "response" is NULL
5270 *
5271 * Valid errors:
5272 * SUCCESS
5273 * RADIO_NOT_AVAILABLE (radio resetting)
5274 */
5275#define RIL_REQUEST_SEND_DEVICE_STATE 138
5276
5277/**
5278 * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER
5279 *
5280 * Set the unsolicited response filter
5281 * This is used to prevent unnecessary application processor
5282 * wake up for power saving purposes by suppressing the
5283 * unsolicited responses in certain scenarios.
5284 *
5285 * "data" is an int *
5286 *
5287 * ((int *)data)[0] is a 32-bit bitmask of RIL_UnsolicitedResponseFilter
5288 *
5289 * "response" is NULL
5290 *
5291 * Valid errors:
5292 * SUCCESS
5293 * INVALID_ARGUMENTS (e.g. the requested filter doesn't exist)
5294 * RADIO_NOT_AVAILABLE (radio resetting)
5295 */
5296#define RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER 139
5297
Wileen Chiu718c0bf2017-01-04 11:37:19 -08005298 /**
5299 * RIL_REQUEST_SET_SIM_CARD_POWER
5300 *
5301 * Set SIM card power up or down
5302 *
5303 * Request is equivalent to inserting and removing the card, with
5304 * an additional effect where the ability to detect card removal/insertion
5305 * is disabled when the SIM card is powered down.
5306 *
5307 * This will generate RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5308 * as if the SIM had been inserted or removed.
5309 *
5310 * "data" is int *
5311 * ((int *)data)[0] is 1 for "SIM POWER UP"
5312 * ((int *)data)[0] is 0 for "SIM POWER DOWN"
5313 *
5314 * "response" is NULL
5315 *
5316 * Valid errors:
5317 * SUCCESS
5318 * RADIO_NOT_AVAILABLE
5319 * REQUEST_NOT_SUPPORTED
5320 * SIM_ABSENT
5321 * INVALID_ARGUMENTS
5322 */
5323#define RIL_REQUEST_SET_SIM_CARD_POWER 140
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005324/***********************************************************************/
5325
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005326/**
5327 * RIL_RESPONSE_ACKNOWLEDGEMENT
5328 *
5329 * This is used by Asynchronous solicited messages and Unsolicited messages
5330 * to acknowledge the receipt of those messages in RIL.java so that the ack
5331 * can be used to let ril.cpp to release wakelock.
5332 *
5333 * Valid errors
5334 * SUCCESS
5335 * RADIO_NOT_AVAILABLE
5336 */
5337
5338#define RIL_RESPONSE_ACKNOWLEDGEMENT 800
5339
5340/***********************************************************************/
5341
Wink Savillef4c4d362009-04-02 01:37:03 -07005342
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005343#define RIL_UNSOL_RESPONSE_BASE 1000
5344
5345/**
5346 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
5347 *
5348 * Indicate when value of RIL_RadioState has changed.
5349 *
5350 * Callee will invoke RIL_RadioStateRequest method on main thread
5351 *
5352 * "data" is NULL
5353 */
5354
5355#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
5356
5357
5358/**
5359 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
5360 *
5361 * Indicate when call state has changed
5362 *
5363 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
5364 *
5365 * "data" is NULL
5366 *
Wink Saville7f856802009-06-09 10:23:37 -07005367 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005368 * "RING", "BUSY", "NO CARRIER", and also call state
5369 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
5370 *
5371 * Redundent or extraneous invocations are tolerated
5372 */
5373#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
5374
5375
5376/**
Wink Savillec0114b32011-02-18 10:14:07 -08005377 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005378 *
Wink Savillec0114b32011-02-18 10:14:07 -08005379 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005380 *
5381 * Callee will invoke the following requests on main thread:
5382 *
Wink Savillec0114b32011-02-18 10:14:07 -08005383 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005384 * RIL_REQUEST_OPERATOR
5385 *
5386 * "data" is NULL
5387 *
5388 * FIXME should this happen when SIM records are loaded? (eg, for
5389 * EONS)
5390 */
Wink Savillec0114b32011-02-18 10:14:07 -08005391#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005392
5393/**
5394 * RIL_UNSOL_RESPONSE_NEW_SMS
5395 *
5396 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07005397 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005398 * "data" is const char *
5399 * This is a pointer to a string containing the PDU of an SMS-DELIVER
5400 * as an ascii string of hex digits. The PDU starts with the SMSC address
5401 * per TS 27.005 (+CMT:)
5402 *
5403 * Callee will subsequently confirm the receipt of thei SMS with a
5404 * RIL_REQUEST_SMS_ACKNOWLEDGE
5405 *
Wink Saville7f856802009-06-09 10:23:37 -07005406 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005407 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5408 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5409 */
5410
5411#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
5412
5413/**
5414 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
5415 *
5416 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07005417 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005418 * "data" is const char *
5419 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
5420 * as an ascii string of hex digits. The PDU starts with the SMSC address
5421 * per TS 27.005 (+CDS:).
5422 *
5423 * Callee will subsequently confirm the receipt of the SMS with a
5424 * RIL_REQUEST_SMS_ACKNOWLEDGE
5425 *
Wink Saville7f856802009-06-09 10:23:37 -07005426 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005427 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5428 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5429 */
5430
5431#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
5432
5433/**
5434 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
5435 *
5436 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07005437 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005438 * "data" is const int *
5439 * ((const int *)data)[0] contains the slot index on the SIM that contains
5440 * the new message
5441 */
5442
5443#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
5444
5445/**
5446 * RIL_UNSOL_ON_USSD
5447 *
5448 * Called when a new USSD message is received.
5449 *
5450 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07005451 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005452 * one of these string values:
5453 * "0" USSD-Notify -- text in ((const char **)data)[1]
5454 * "1" USSD-Request -- text in ((const char **)data)[1]
5455 * "2" Session terminated by network
5456 * "3" other local client (eg, SIM Toolkit) has responded
5457 * "4" Operation not supported
5458 * "5" Network timeout
5459 *
5460 * The USSD session is assumed to persist if the type code is "1", otherwise
5461 * the current session (if any) is assumed to have terminated.
5462 *
5463 * ((const char **)data)[1] points to a message string if applicable, which
5464 * should always be in UTF-8.
5465 */
5466#define RIL_UNSOL_ON_USSD 1006
5467/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
5468
5469/**
5470 * RIL_UNSOL_ON_USSD_REQUEST
5471 *
5472 * Obsolete. Send via RIL_UNSOL_ON_USSD
5473 */
Wink Saville7f856802009-06-09 10:23:37 -07005474#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005475
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005476/**
5477 * RIL_UNSOL_NITZ_TIME_RECEIVED
5478 *
5479 * Called when radio has received a NITZ time message
5480 *
5481 * "data" is const char * pointing to NITZ time string
5482 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
5483 */
5484#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
5485
5486/**
5487 * RIL_UNSOL_SIGNAL_STRENGTH
5488 *
5489 * Radio may report signal strength rather han have it polled.
5490 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005491 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005492 */
5493#define RIL_UNSOL_SIGNAL_STRENGTH 1009
5494
5495
5496/**
Wink Savillef4c4d362009-04-02 01:37:03 -07005497 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005498 *
Wink Savillec0114b32011-02-18 10:14:07 -08005499 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07005500 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
5501 * of current data contexts including new contexts that have been
5502 * activated. A data call is only removed from this list when the
5503 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
5504 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005505 *
Wink Savillef4c4d362009-04-02 01:37:03 -07005506 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005507 */
5508
Wink Savillef4c4d362009-04-02 01:37:03 -07005509#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005510
5511/**
5512 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
5513 *
5514 * Reports supplementary service related notification from the network.
5515 *
5516 * "data" is a const RIL_SuppSvcNotification *
5517 *
5518 */
5519
5520#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
5521
5522/**
5523 * RIL_UNSOL_STK_SESSION_END
5524 *
5525 * Indicate when STK session is terminated by SIM.
5526 *
5527 * "data" is NULL
5528 */
5529#define RIL_UNSOL_STK_SESSION_END 1012
5530
5531/**
5532 * RIL_UNSOL_STK_PROACTIVE_COMMAND
5533 *
5534 * Indicate when SIM issue a STK proactive command to applications
5535 *
5536 * "data" is a const char * containing SAT/USAT proactive command
5537 * in hexadecimal format string starting with command tag
5538 *
5539 */
5540#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
5541
5542/**
5543 * RIL_UNSOL_STK_EVENT_NOTIFY
5544 *
5545 * Indicate when SIM notifies applcations some event happens.
5546 * Generally, application does not need to have any feedback to
5547 * SIM but shall be able to indicate appropriate messages to users.
5548 *
5549 * "data" is a const char * containing SAT/USAT commands or responses
5550 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
5551 * starting with first byte of response data or command tag
5552 *
5553 */
5554#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
5555
5556/**
5557 * RIL_UNSOL_STK_CALL_SETUP
5558 *
5559 * Indicate when SIM wants application to setup a voice call.
5560 *
5561 * "data" is const int *
5562 * ((const int *)data)[0] contains timeout value (in milliseconds)
5563 */
5564#define RIL_UNSOL_STK_CALL_SETUP 1015
5565
5566/**
5567 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
5568 *
5569 * Indicates that SMS storage on the SIM is full. Sent when the network
5570 * attempts to deliver a new SMS message. Messages cannot be saved on the
5571 * SIM until space is freed. In particular, incoming Class 2 messages
5572 * cannot be stored.
5573 *
5574 * "data" is null
5575 *
5576 */
5577#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
5578
5579/**
5580 * RIL_UNSOL_SIM_REFRESH
5581 *
5582 * Indicates that file(s) on the SIM have been updated, or the SIM
5583 * has been reinitialized.
5584 *
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005585 * In the case where RIL is version 6 or older:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005586 * "data" is an int *
5587 * ((int *)data)[0] is a RIL_SimRefreshResult.
5588 * ((int *)data)[1] is the EFID of the updated file if the result is
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005589 * SIM_FILE_UPDATE or NULL for any other result.
5590 *
5591 * In the case where RIL is version 7:
5592 * "data" is a RIL_SimRefreshResponse_v7 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005593 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005594 * Note: If the SIM state changes as a result of the SIM refresh (eg,
5595 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005596 * should be sent.
5597 */
5598#define RIL_UNSOL_SIM_REFRESH 1017
5599
5600/**
5601 * RIL_UNSOL_CALL_RING
5602 *
5603 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07005604 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
5605 * of a call and sending multiple is optional. If the system property
5606 * ro.telephony.call_ring.multiple is false then the upper layers
5607 * will generate the multiple events internally. Otherwise the vendor
5608 * ril must generate multiple RIL_UNSOL_CALL_RING if
5609 * ro.telephony.call_ring.multiple is true or if it is absent.
5610 *
5611 * The rate of these events is controlled by ro.telephony.call_ring.delay
5612 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005613 *
Wink Saville3d54e742009-05-18 18:00:44 -07005614 * "data" is null for GSM
5615 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005616 */
5617#define RIL_UNSOL_CALL_RING 1018
5618
The Android Open Source Project34a51082009-03-05 14:34:37 -08005619/**
5620 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5621 *
5622 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07005623 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005624 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07005625
The Android Open Source Project34a51082009-03-05 14:34:37 -08005626 * "data" is null
5627 */
5628#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
5629
5630/**
5631 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
5632 *
5633 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07005634 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005635 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07005636 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005637 * Callee will subsequently confirm the receipt of the SMS with
5638 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07005639 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005640 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
5641 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07005642 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005643 */
5644#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
5645
5646/**
5647 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
5648 *
5649 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07005650 *
Henrik Hall0eba2022010-11-25 10:20:56 +01005651 * "data" can be one of the following:
5652 * If received from GSM network, "data" is const char of 88 bytes
5653 * which indicates each page of a CBS Message sent to the MS by the
5654 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
5655 * If received from UMTS network, "data" is const char of 90 up to 1252
5656 * bytes which contain between 1 and 15 CBS Message pages sent as one
5657 * 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 -07005658 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005659 */
5660#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07005661
The Android Open Source Project34a51082009-03-05 14:34:37 -08005662/**
5663 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
5664 *
5665 * Indicates that SMS storage on the RUIM is full. Messages
5666 * cannot be saved on the RUIM until space is freed.
5667 *
5668 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07005669 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005670 */
Wink Savillef4c4d362009-04-02 01:37:03 -07005671#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
5672
The Android Open Source Project34a51082009-03-05 14:34:37 -08005673/**
5674 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
5675 *
5676 * Indicates a restricted state change (eg, for Domain Specific Access Control).
5677 *
5678 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
5679 *
5680 * "data" is an int *
5681 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
5682 */
5683#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
5684
Wink Saville1b5fd232009-04-22 14:50:00 -07005685/**
5686 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
5687 *
5688 * Indicates that the radio system selection module has
5689 * autonomously entered emergency callback mode.
5690 *
5691 * "data" is null
5692 *
5693 */
5694#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08005695
Wink Saville1b5fd232009-04-22 14:50:00 -07005696/**
5697 * RIL_UNSOL_CDMA_CALL_WAITING
5698 *
5699 * Called when CDMA radio receives a call waiting indication.
5700 *
5701 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07005702 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005703 */
5704#define RIL_UNSOL_CDMA_CALL_WAITING 1025
5705
5706/**
5707 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
5708 *
5709 * Called when CDMA radio receives an update of the progress of an
5710 * OTASP/OTAPA call.
5711 *
5712 * "data" is const int *
5713 * For CDMA this is an integer OTASP/OTAPA status listed in
5714 * RIL_CDMA_OTA_ProvisionStatus.
5715 *
5716 */
5717#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
5718
5719/**
5720 * RIL_UNSOL_CDMA_INFO_REC
5721 *
5722 * Called when CDMA radio receives one or more info recs.
5723 *
5724 * "data" is const RIL_CDMA_InformationRecords *
5725 *
5726 */
5727#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08005728
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07005729/**
5730 * RIL_UNSOL_OEM_HOOK_RAW
5731 *
5732 * This is for OEM specific use.
5733 *
5734 * "data" is a byte[]
5735 */
5736#define RIL_UNSOL_OEM_HOOK_RAW 1028
5737
John Wang5d621da2009-09-18 17:17:48 -07005738/**
5739 * RIL_UNSOL_RINGBACK_TONE
5740 *
5741 * Indicates that nework doesn't have in-band information, need to
5742 * play out-band tone.
5743 *
5744 * "data" is an int *
5745 * ((int *)data)[0] == 0 for stop play ringback tone.
5746 * ((int *)data)[0] == 1 for start play ringback tone.
5747 */
5748#define RIL_UNSOL_RINGBACK_TONE 1029
5749
John Wang5909cf82010-01-29 00:18:54 -08005750/**
5751 * RIL_UNSOL_RESEND_INCALL_MUTE
5752 *
5753 * Indicates that framework/application need reset the uplink mute state.
5754 *
5755 * There may be situations where the mute state becomes out of sync
5756 * between the application and device in some GSM infrastructures.
5757 *
5758 * "data" is null
5759 */
5760#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08005761
5762/**
5763 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
5764 *
5765 * Called when CDMA subscription source changed.
5766 *
5767 * "data" is int *
5768 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
5769 */
Wink Saville29487ef2011-04-15 09:15:31 -07005770#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08005771
5772/**
5773 * RIL_UNSOL_CDMA_PRL_CHANGED
5774 *
5775 * Called when PRL (preferred roaming list) changes.
5776 *
5777 * "data" is int *
5778 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
5779 */
5780#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
5781
5782/**
5783 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
5784 *
5785 * Called when Emergency Callback Mode Ends
5786 *
5787 * Indicates that the radio system selection module has
5788 * proactively exited emergency callback mode.
5789 *
5790 * "data" is NULL
5791 *
5792 */
5793#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
5794
Wink Saville5b9df332011-04-06 16:24:21 -07005795/**
5796 * RIL_UNSOL_RIL_CONNECTED
5797 *
5798 * Called the ril connects and returns the version
5799 *
5800 * "data" is int *
5801 * ((int *)data)[0] is RIL_VERSION
5802 */
5803#define RIL_UNSOL_RIL_CONNECTED 1034
5804
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005805/**
5806 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
5807 *
5808 * Indicates that voice technology has changed. Contains new radio technology
5809 * as a data in the message.
5810 *
5811 * "data" is int *
5812 * ((int *)data)[0] is of type const RIL_RadioTechnology
5813 *
5814 */
5815#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
5816
Wink Saville8a9e0212013-04-09 12:11:38 -07005817/**
5818 * RIL_UNSOL_CELL_INFO_LIST
5819 *
5820 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
5821 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
5822 *
5823 * "data" is NULL
5824 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08005825 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07005826 */
5827#define RIL_UNSOL_CELL_INFO_LIST 1036
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005828
Wink Saville865ce3b2013-11-08 16:37:01 -08005829/**
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005830 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
5831 *
Nathan Harold0eb43c22016-12-19 12:04:32 -08005832 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
5833 * instead, provide IMS registration status via an IMS Service.
5834 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005835 * Called when IMS registration state has changed
5836 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005837 * To get IMS registration state and IMS SMS format, callee needs to invoke the
5838 * following request on main thread:
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005839 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005840 * RIL_REQUEST_IMS_REGISTRATION_STATE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005841 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005842 * "data" is NULL
5843 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005844 */
5845#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
5846
Etan Cohend3652192014-06-20 08:28:44 -07005847/**
5848 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
5849 *
5850 * Indicated when there is a change in subscription status.
5851 * This event will be sent in the following scenarios
5852 * - subscription readiness at modem, which was selected by telephony layer
5853 * - when subscription is deactivated by modem due to UICC card removal
5854 * - When network invalidates the subscription i.e. attach reject due to authentication reject
5855 *
5856 * "data" is const int *
5857 * ((const int *)data)[0] == 0 for Subscription Deactivated
5858 * ((const int *)data)[0] == 1 for Subscription Activated
5859 *
5860 */
5861#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
5862
5863/**
5864 * RIL_UNSOL_SRVCC_STATE_NOTIFY
5865 *
5866 * Called when Single Radio Voice Call Continuity(SRVCC)
5867 * progress state has changed
5868 *
5869 * "data" is int *
5870 * ((int *)data)[0] is of type const RIL_SrvccState
5871 *
5872 */
5873
5874#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
5875
5876/**
5877 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
5878 *
5879 * Called when the hardware configuration associated with the RILd changes
5880 *
5881 * "data" is an array of RIL_HardwareConfig
5882 *
5883 */
5884#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
5885
Wink Savillec29360a2014-07-13 05:17:28 -07005886/**
5887 * RIL_UNSOL_DC_RT_INFO_CHANGED
5888 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005889 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005890 * Sent when the DC_RT_STATE changes but the time
5891 * between these messages must not be less than the
5892 * value set by RIL_REQUEST_SET_DC_RT_RATE.
5893 *
5894 * "data" is the most recent RIL_DcRtInfo
5895 *
5896 */
5897#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
5898
Wink Saville8b4e4f72014-10-17 15:01:45 -07005899/**
5900 * RIL_UNSOL_RADIO_CAPABILITY
5901 *
5902 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
5903 * Returns the phone radio capability exactly as
5904 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
5905 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
5906 *
5907 * "data" is the RIL_RadioCapability structure
5908 */
5909#define RIL_UNSOL_RADIO_CAPABILITY 1042
5910
Amit Mahajan54563d32014-11-22 00:54:49 +00005911/*
5912 * RIL_UNSOL_ON_SS
5913 *
5914 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
5915 * call control.
5916 *
5917 * "data" is const RIL_StkCcUnsolSsResponse *
5918 *
5919 */
5920#define RIL_UNSOL_ON_SS 1043
5921
5922/**
5923 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
5924 *
5925 * Called when there is an ALPHA from UICC during Call Control.
5926 *
5927 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
5928 *
5929 */
5930#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
5931
fengluf7408292015-04-14 14:53:55 -07005932/**
5933 * RIL_UNSOL_LCEDATA_RECV
5934 *
5935 * Called when there is an incoming Link Capacity Estimate (LCE) info report.
5936 *
fenglu290add32015-05-01 17:05:15 -07005937 * "data" is the RIL_LceDataInfo structure.
fengluf7408292015-04-14 14:53:55 -07005938 *
5939 */
5940#define RIL_UNSOL_LCEDATA_RECV 1045
5941
Robert Greenwalt27e99c52016-06-01 16:31:38 -07005942 /**
5943 * RIL_UNSOL_PCO_DATA
5944 *
5945 * Called when there is new Carrier PCO data received for a data call. Ideally
5946 * only new data will be forwarded, though this is not required. Multiple
5947 * boxes of carrier PCO data for a given call should result in a series of
5948 * RIL_UNSOL_PCO_DATA calls.
5949 *
5950 * "data" is the RIL_PCO_Data structure.
5951 *
5952 */
5953#define RIL_UNSOL_PCO_DATA 1046
5954
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005955/***********************************************************************/
5956
Amit Mahajan54563d32014-11-22 00:54:49 +00005957
Etan Cohend3652192014-06-20 08:28:44 -07005958#if defined(ANDROID_MULTI_SIM)
5959/**
5960 * RIL_Request Function pointer
5961 *
5962 * @param request is one of RIL_REQUEST_*
5963 * @param data is pointer to data defined for that RIL_REQUEST_*
5964 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07005965 * structures passed as data may contain pointers to non-contiguous memory
Etan Cohend3652192014-06-20 08:28:44 -07005966 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07005967 * @param datalen is the length of "data" which is defined as other argument. It may or may
5968 * not be equal to sizeof(data). Refer to the documentation of individual structures
5969 * to find if pointers listed in the structure are contiguous and counted in the datalen
5970 * length or not.
5971 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
Etan Cohend3652192014-06-20 08:28:44 -07005972 *
5973 */
5974typedef void (*RIL_RequestFunc) (int request, void *data,
5975 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
5976
5977/**
5978 * This function should return the current radio state synchronously
5979 */
5980typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
5981
5982#else
5983/* Backward compatible */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005984
5985/**
5986 * RIL_Request Function pointer
5987 *
5988 * @param request is one of RIL_REQUEST_*
5989 * @param data is pointer to data defined for that RIL_REQUEST_*
5990 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07005991 * structures passed as data may contain pointers to non-contiguous memory
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005992 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07005993 * @param datalen is the length of "data" which is defined as other argument. It may or may
5994 * not be equal to sizeof(data). Refer to the documentation of individual structures
5995 * to find if pointers listed in the structure are contiguous and counted in the datalen
5996 * length or not.
5997 * (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 -08005998 *
5999 */
Wink Saville7f856802009-06-09 10:23:37 -07006000typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006001 size_t datalen, RIL_Token t);
6002
6003/**
6004 * This function should return the current radio state synchronously
6005 */
6006typedef RIL_RadioState (*RIL_RadioStateRequest)();
6007
Etan Cohend3652192014-06-20 08:28:44 -07006008#endif
6009
6010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006011/**
6012 * This function returns "1" if the specified RIL_REQUEST code is
6013 * supported and 0 if it is not
6014 *
6015 * @param requestCode is one of RIL_REQUEST codes
6016 */
6017
6018typedef int (*RIL_Supports)(int requestCode);
6019
6020/**
Wink Saville7f856802009-06-09 10:23:37 -07006021 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006022 * thread that calls RIL_RequestFunc--and indicates that a pending
6023 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07006024 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006025 * On cancel, the callee should do its best to abandon the request and
6026 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
6027 *
6028 * Subsequent calls to RIL_onRequestComplete for this request with
6029 * other results will be tolerated but ignored. (That is, it is valid
6030 * to ignore the cancellation request)
6031 *
6032 * RIL_Cancel calls should return immediately, and not wait for cancellation
6033 *
Wink Saville7f856802009-06-09 10:23:37 -07006034 * 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 -08006035 * interface
6036 *
6037 * @param t token wants to be canceled
6038 */
6039
6040typedef void (*RIL_Cancel)(RIL_Token t);
6041
6042typedef void (*RIL_TimedCallback) (void *param);
6043
6044/**
6045 * Return a version string for your RIL implementation
6046 */
6047typedef const char * (*RIL_GetVersion) (void);
6048
6049typedef struct {
6050 int version; /* set to RIL_VERSION */
6051 RIL_RequestFunc onRequest;
6052 RIL_RadioStateRequest onStateRequest;
6053 RIL_Supports supports;
6054 RIL_Cancel onCancel;
6055 RIL_GetVersion getVersion;
6056} RIL_RadioFunctions;
6057
Sungmin Choi75697532013-04-26 15:04:45 -07006058typedef struct {
Jack Yu06181bb2017-01-10 12:10:41 -08006059 char *apn; /* the APN to connect to */
6060 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
6061 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/
6062 int authtype; /* authentication protocol used for this PDP context
6063 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */
6064 char *username; /* the username for APN, or NULL */
6065 char *password; /* the password for APN, or NULL */
Sungmin Choi75697532013-04-26 15:04:45 -07006066} RIL_InitialAttachApn;
6067
Amit Mahajan2b772032014-06-26 14:20:11 -07006068typedef struct {
Jack Yu06181bb2017-01-10 12:10:41 -08006069 char *apn; /* the APN to connect to */
6070 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
6071 home network. For example, "IP", "IPV6", "IPV4V6", or "PPP". */
6072 char *roamingProtocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
6073 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/
6074 int authtype; /* authentication protocol used for this PDP context
6075 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */
6076 char *username; /* the username for APN, or NULL */
6077 char *password; /* the password for APN, or NULL */
6078 int supportedTypesBitmask; /* supported APN types bitmask. See RIL_ApnTypes for the value of
6079 each bit. */
6080 int bearerBitmask; /* the bearer bitmask. See RIL_RadioAccessFamily for the value of
6081 each bit. */
6082 int modemCognitive; /* indicating the APN setting was sent to the modem through
6083 setDataProfile earlier. */
6084 int mtu; /* maximum transmission unit (MTU) size in bytes */
6085 char *mvnoType; /* the MVNO type: possible values are "imsi", "gid", "spn" */
6086 char *mvnoMatchData; /* MVNO match data. Can be anything defined by the carrier.
6087 For example,
6088 SPN like: "A MOBILE", "BEN NL", etc...
6089 IMSI like: "302720x94", "2060188", etc...
6090 GID like: "4E", "33", etc... */
6091} RIL_InitialAttachApn_v15;
6092
6093typedef struct {
Amit Mahajan2b772032014-06-26 14:20:11 -07006094 int authContext; /* P2 value of authentication command, see P2 parameter in
6095 3GPP TS 31.102 7.1.2 */
6096 char *authData; /* the challenge string in Base64 format, see 3GPP
6097 TS 31.102 7.1.2 */
6098 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
6099 NULL if no value. */
6100} RIL_SimAuthentication;
6101
Robert Greenwalt17ea3fa2016-06-15 14:59:38 -07006102typedef struct {
Jack Yu06181bb2017-01-10 12:10:41 -08006103 int cid; /* Context ID, uniquely identifies this call */
6104 char *bearer_proto; /* One of the PDP_type values in TS 27.007 section 10.1.1.
6105 For example, "IP", "IPV6", "IPV4V6". */
6106 int pco_id; /* The protocol ID for this box. Note that only IDs from
6107 FF00H - FFFFH are accepted. If more than one is included
6108 from the network, multiple calls should be made to send all
6109 of them. */
6110 int contents_length; /* The number of octets in the contents. */
6111 char *contents; /* Carrier-defined content. It is binary, opaque and
6112 loosely defined in LTE Layer 3 spec 24.008 */
Robert Greenwalt17ea3fa2016-06-15 14:59:38 -07006113} RIL_PCO_Data;
6114
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006115#ifdef RIL_SHLIB
6116struct RIL_Env {
6117 /**
6118 * "t" is parameter passed in on previous call to RIL_Notification
6119 * routine.
6120 *
6121 * If "e" != SUCCESS, then response can be null/is ignored
6122 *
Wink Saville7f856802009-06-09 10:23:37 -07006123 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006124 * freed by callee
6125 *
6126 * RIL_onRequestComplete will return as soon as possible
6127 */
Wink Saville7f856802009-06-09 10:23:37 -07006128 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006129 void *response, size_t responselen);
6130
Etan Cohend3652192014-06-20 08:28:44 -07006131#if defined(ANDROID_MULTI_SIM)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006132 /**
6133 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
6134 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6135 *
6136 * "data" is owned by caller, and should not be modified or freed by callee
6137 */
Etan Cohend3652192014-06-20 08:28:44 -07006138 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
6139#else
6140 /**
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 */
6146 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
6147#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006148 /**
Wink Saville7f856802009-06-09 10:23:37 -07006149 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006150 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6151 * a relative time value at which the callback is invoked. If relativeTime is
6152 * NULL or points to a 0-filled structure, the callback will be invoked as
6153 * soon as possible
6154 */
6155
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07006156 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07006157 void *param, const struct timeval *relativeTime);
Sanket Padawe6ff9a872016-01-27 15:09:12 -08006158 /**
6159 * "t" is parameter passed in on previous call RIL_Notification routine
6160 *
6161 * RIL_onRequestAck will be called by vendor when an Async RIL request was received
6162 * by them and an ack needs to be sent back to java ril.
6163 */
6164 void (*OnRequestAck) (RIL_Token t);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006165};
6166
6167
Wink Saville7f856802009-06-09 10:23:37 -07006168/**
6169 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006170 * argc and argv will be command line arguments intended for the RIL implementation
6171 * Return NULL on error
6172 *
6173 * @param env is environment point defined as RIL_Env
6174 * @param argc number of arguments
6175 * @param argv list fo arguments
6176 *
6177 */
6178const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
6179
Sanket Padawe1be49ba2016-03-31 17:37:23 -07006180/**
6181 * If BT SAP(SIM Access Profile) is supported, then RIL implementations must define RIL_SAP_Init
6182 * for initializing RIL_RadioFunctions used for BT SAP communcations. It is called whenever RILD
6183 * starts or modem restarts. Returns handlers for SAP related request that are made on SAP
6184 * sepecific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init
6185 * and used on the general RIL socket.
6186 * argc and argv will be command line arguments intended for the RIL implementation
6187 * Return NULL on error.
6188 *
6189 * @param env is environment point defined as RIL_Env
6190 * @param argc number of arguments
6191 * @param argv list fo arguments
6192 *
6193 */
6194const RIL_RadioFunctions *RIL_SAP_Init(const struct RIL_Env *env, int argc, char **argv);
6195
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006196#else /* RIL_SHLIB */
6197
6198/**
6199 * Call this once at startup to register notification routine
6200 *
6201 * @param callbacks user-specifed callback function
6202 */
6203void RIL_register (const RIL_RadioFunctions *callbacks);
6204
Amit Mahajancd77a5b2016-08-25 11:19:21 -07006205void rilc_thread_pool();
6206
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006207
6208/**
6209 *
6210 * RIL_onRequestComplete will return as soon as possible
6211 *
6212 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07006213 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006214 * @param e error code
6215 * if "e" != SUCCESS, then response can be null/is ignored
6216 * @param response is owned by caller, and should not be modified or
6217 * freed by callee
6218 * @param responselen the length of response in byte
6219 */
Wink Saville7f856802009-06-09 10:23:37 -07006220void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006221 void *response, size_t responselen);
6222
Sanket Padawe6ff9a872016-01-27 15:09:12 -08006223/**
6224 * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and
6225 * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's
6226 * results, just that the command was received and will take a while. After sending this Ack
6227 * its vendor's responsibility to make sure that AP is up whenever needed while command is
6228 * being processed.
6229 *
6230 * @param t is parameter passed in on previous call to RIL_Notification
6231 * routine.
6232 */
6233void RIL_onRequestAck(RIL_Token t);
6234
Etan Cohend3652192014-06-20 08:28:44 -07006235#if defined(ANDROID_MULTI_SIM)
6236/**
6237 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6238 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6239 * "data" is owned by caller, and should not be modified or freed by callee
6240 * @param datalen the length of data in byte
6241 */
6242
6243void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
6244 size_t datalen, RIL_SOCKET_ID socket_id);
6245#else
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006246/**
6247 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6248 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6249 * "data" is owned by caller, and should not be modified or freed by callee
6250 * @param datalen the length of data in byte
6251 */
6252
Wink Saville7f856802009-06-09 10:23:37 -07006253void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006254 size_t datalen);
Etan Cohend3652192014-06-20 08:28:44 -07006255#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006256
6257/**
Wink Saville7f856802009-06-09 10:23:37 -07006258 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006259 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6260 * a relative time value at which the callback is invoked. If relativeTime is
6261 * NULL or points to a 0-filled structure, the callback will be invoked as
6262 * soon as possible
6263 *
6264 * @param callback user-specifed callback function
6265 * @param param parameter list
6266 * @param relativeTime a relative time value at which the callback is invoked
6267 */
6268
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07006269void RIL_requestTimedCallback (RIL_TimedCallback callback,
6270 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006271
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006272#endif /* RIL_SHLIB */
6273
6274#ifdef __cplusplus
6275}
6276#endif
6277
6278#endif /*ANDROID_RIL_H*/