blob: 66f6494ba44ff129e69b28a243f0de9e2f80b04b [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 Yude8c8552017-01-24 12:03:52 -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,
Naveen Kalla90ddf072016-09-14 13:41:04 -070073 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS and RIL_UNSOL_PCO_DATA.
Wileen Chiu35380a32017-01-04 11:37:19 -080074 *
75 * RIL_VERSION = 15 : New commands added:
76 * RIL_UNSOL_MODEM_RESTART,
77 * RIL_REQUEST_SEND_DEVICE_STATE,
78 * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER,
79 * RIL_REQUEST_SET_SIM_CARD_POWER
Jack Yude8c8552017-01-24 12:03:52 -080080 * The new parameters for RIL_REQUEST_SETUP_DATA_CALL,
81 * Updated data structures: RIL_DataProfileInfo_v15, RIL_InitialAttachApn_v15
Sooraj Sasindranf4714b72016-11-30 18:36:03 -080082 * New data structure RIL_DataRegistrationStateResponse,
83 * RIL_VoiceRegistrationStateResponse same is
84 * used in RIL_REQUEST_DATA_REGISTRATION_STATE and
85 * RIL_REQUEST_VOICE_REGISTRATION_STATE respectively.
Sanket Padawe88cf6a52016-01-11 12:45:43 -080086 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -080087#define RIL_VERSION 12
88#define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
Alex Yakavenka45e740e2012-01-31 11:48:27 -080089#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080090
Wink Savillea592eeb2009-05-22 13:26:36 -070091#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
92#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
93
Etan Cohend3652192014-06-20 08:28:44 -070094#define MAX_RILDS 3
Amit Mahajan35e93102017-03-28 11:17:55 -070095#define MAX_SERVICE_NAME_LENGTH 6
Etan Cohend3652192014-06-20 08:28:44 -070096#define MAX_CLIENT_ID_LENGTH 2
97#define MAX_DEBUG_SOCKET_NAME_LENGTH 12
98#define MAX_QEMU_PIPE_NAME_LENGTH 11
Wink Saville8b4e4f72014-10-17 15:01:45 -070099#define MAX_UUID_LENGTH 64
100
Etan Cohend3652192014-06-20 08:28:44 -0700101
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800102typedef void * RIL_Token;
103
104typedef enum {
Etan Cohend3652192014-06-20 08:28:44 -0700105 RIL_SOCKET_1,
106#if (SIM_COUNT >= 2)
107 RIL_SOCKET_2,
108#if (SIM_COUNT >= 3)
109 RIL_SOCKET_3,
110#endif
111#if (SIM_COUNT >= 4)
112 RIL_SOCKET_4,
113#endif
114#endif
115 RIL_SOCKET_NUM
116} RIL_SOCKET_ID;
117
118
119typedef enum {
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800120 RIL_E_SUCCESS = 0,
121 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
122 RIL_E_GENERIC_FAILURE = 2,
123 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
124 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
125 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
126 RIL_E_REQUEST_NOT_SUPPORTED = 6,
127 RIL_E_CANCELLED = 7,
128 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
129 call on a Class C GPRS device */
130 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
131 registers in network */
Wink Saville3d54e742009-05-18 18:00:44 -0700132 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
133 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
134 shall be retrieved because of SIM or RUIM
Wink Savillef4c4d362009-04-02 01:37:03 -0700135 card absent */
Wink Saville3d54e742009-05-18 18:00:44 -0700136 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
Wink Savillef4c4d362009-04-02 01:37:03 -0700137 location */
jsh602f80f2009-07-10 15:44:37 -0700138 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
John Wang75534472010-04-20 15:11:42 -0700139 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800140 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
John Wang75534472010-04-20 15:11:42 -0700141 illegal SIM or ME */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800142 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
Amit Mahajan54563d32014-11-22 00:54:49 +0000143 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
144 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
145 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
146 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
147 data */
148 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
149 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
150 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
151 request */
152 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
153 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
154 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
fengluf7408292015-04-14 14:53:55 -0700155 RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800156 RIL_E_LCE_NOT_SUPPORTED = 36, /* LCE service not supported(36 in RILConstants.java) */
157 RIL_E_NO_MEMORY = 37, /* Not sufficient memory to process the request */
Jayachandran Cb0cba832017-03-13 19:17:18 -0700158 RIL_E_INTERNAL_ERR = 38, /* Modem hit unexpected error scenario while handling
159 this request */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800160 RIL_E_SYSTEM_ERR = 39, /* Hit platform or system error */
Jayachandran Cb0cba832017-03-13 19:17:18 -0700161 RIL_E_MODEM_ERR = 40, /* Vendor RIL got unexpected or incorrect response
162 from modem for this request */
Ajay Nambi10345892016-03-19 09:02:28 -0700163 RIL_E_INVALID_STATE = 41, /* Unexpected request for the current state */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800164 RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */
165 RIL_E_SIM_ERR = 43, /* Received error from SIM card */
166 RIL_E_INVALID_ARGUMENTS = 44, /* Received invalid arguments in request */
167 RIL_E_INVALID_SIM_STATE = 45, /* Can not process the request in current SIM state */
168 RIL_E_INVALID_MODEM_STATE = 46, /* Can not process the request in current Modem state */
169 RIL_E_INVALID_CALL_ID = 47, /* Received invalid call id in request */
170 RIL_E_NO_SMS_TO_ACK = 48, /* ACK received when there is no SMS to ack */
Nathan Haroldc97b2842016-02-02 12:04:35 -0800171 RIL_E_NETWORK_ERR = 49, /* Received error from network */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800172 RIL_E_REQUEST_RATE_LIMITED = 50, /* Operation denied due to overly-frequent requests */
twen.changdf7add02016-03-04 18:27:48 +0800173 RIL_E_SIM_BUSY = 51, /* SIM is busy */
174 RIL_E_SIM_FULL = 52, /* The target EF is full */
175 RIL_E_NETWORK_REJECT = 53, /* Request is rejected by network */
176 RIL_E_OPERATION_NOT_ALLOWED = 54, /* Not allowed the request now */
177 RIL_E_EMPTY_RECORD = 55, /* The request record is empty */
Ajay Nambi68900f52016-03-11 12:02:55 -0800178 RIL_E_INVALID_SMS_FORMAT = 56, /* Invalid sms format */
179 RIL_E_ENCODING_ERR = 57, /* Message not encoded properly */
180 RIL_E_INVALID_SMSC_ADDRESS = 58, /* SMSC address specified is invalid */
181 RIL_E_NO_SUCH_ENTRY = 59, /* No such entry present to perform the request */
182 RIL_E_NETWORK_NOT_READY = 60, /* Network is not ready to perform the request */
183 RIL_E_NOT_PROVISIONED = 61, /* Device doesnot have this value provisioned */
Ajay Nambi10345892016-03-19 09:02:28 -0700184 RIL_E_NO_SUBSCRIPTION = 62, /* Device doesnot have subscription */
185 RIL_E_NO_NETWORK_FOUND = 63, /* Network cannot be found */
186 RIL_E_DEVICE_IN_USE = 64, /* Operation cannot be performed because the device
187 is currently in use */
188 RIL_E_ABORTED = 65, /* Operation aborted */
Sanket Padawe85f952a2017-01-02 23:46:00 -0800189 RIL_E_INVALID_RESPONSE = 66, /* Invalid response sent by vendor code */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800190 // OEM specific error codes. To be used by OEM when they don't want to reveal
191 // specific error codes which would be replaced by Generic failure.
192 RIL_E_OEM_ERROR_1 = 501,
193 RIL_E_OEM_ERROR_2 = 502,
194 RIL_E_OEM_ERROR_3 = 503,
195 RIL_E_OEM_ERROR_4 = 504,
196 RIL_E_OEM_ERROR_5 = 505,
197 RIL_E_OEM_ERROR_6 = 506,
198 RIL_E_OEM_ERROR_7 = 507,
199 RIL_E_OEM_ERROR_8 = 508,
200 RIL_E_OEM_ERROR_9 = 509,
201 RIL_E_OEM_ERROR_10 = 510,
202 RIL_E_OEM_ERROR_11 = 511,
203 RIL_E_OEM_ERROR_12 = 512,
204 RIL_E_OEM_ERROR_13 = 513,
205 RIL_E_OEM_ERROR_14 = 514,
206 RIL_E_OEM_ERROR_15 = 515,
207 RIL_E_OEM_ERROR_16 = 516,
208 RIL_E_OEM_ERROR_17 = 517,
209 RIL_E_OEM_ERROR_18 = 518,
210 RIL_E_OEM_ERROR_19 = 519,
211 RIL_E_OEM_ERROR_20 = 520,
212 RIL_E_OEM_ERROR_21 = 521,
213 RIL_E_OEM_ERROR_22 = 522,
214 RIL_E_OEM_ERROR_23 = 523,
215 RIL_E_OEM_ERROR_24 = 524,
216 RIL_E_OEM_ERROR_25 = 525
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800217} RIL_Errno;
218
219typedef enum {
220 RIL_CALL_ACTIVE = 0,
221 RIL_CALL_HOLDING = 1,
222 RIL_CALL_DIALING = 2, /* MO call only */
223 RIL_CALL_ALERTING = 3, /* MO call only */
224 RIL_CALL_INCOMING = 4, /* MT call only */
225 RIL_CALL_WAITING = 5 /* MT call only */
226} RIL_CallState;
227
228typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -0700229 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
230 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800231 RADIO_STATE_ON = 10 /* Radio is on */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800232} RIL_RadioState;
233
Wink Saville43808972011-01-13 17:39:51 -0800234typedef enum {
235 RADIO_TECH_UNKNOWN = 0,
236 RADIO_TECH_GPRS = 1,
237 RADIO_TECH_EDGE = 2,
238 RADIO_TECH_UMTS = 3,
239 RADIO_TECH_IS95A = 4,
240 RADIO_TECH_IS95B = 5,
241 RADIO_TECH_1xRTT = 6,
242 RADIO_TECH_EVDO_0 = 7,
243 RADIO_TECH_EVDO_A = 8,
244 RADIO_TECH_HSDPA = 9,
245 RADIO_TECH_HSUPA = 10,
246 RADIO_TECH_HSPA = 11,
247 RADIO_TECH_EVDO_B = 12,
248 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800249 RADIO_TECH_LTE = 14,
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800250 RADIO_TECH_HSPAP = 15, // HSPA+
Etan Cohend3652192014-06-20 08:28:44 -0700251 RADIO_TECH_GSM = 16, // Only supports voice
Yashdev Singh3c8f37c2015-02-23 13:04:28 -0800252 RADIO_TECH_TD_SCDMA = 17,
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700253 RADIO_TECH_IWLAN = 18,
254 RADIO_TECH_LTE_CA = 19
Wink Saville43808972011-01-13 17:39:51 -0800255} RIL_RadioTechnology;
256
Wink Saville8b4e4f72014-10-17 15:01:45 -0700257typedef enum {
258 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
259 RAF_GPRS = (1 << RADIO_TECH_GPRS),
260 RAF_EDGE = (1 << RADIO_TECH_EDGE),
261 RAF_UMTS = (1 << RADIO_TECH_UMTS),
262 RAF_IS95A = (1 << RADIO_TECH_IS95A),
263 RAF_IS95B = (1 << RADIO_TECH_IS95B),
264 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
265 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
266 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
267 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
268 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
269 RAF_HSPA = (1 << RADIO_TECH_HSPA),
270 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
271 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
272 RAF_LTE = (1 << RADIO_TECH_LTE),
273 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
274 RAF_GSM = (1 << RADIO_TECH_GSM),
275 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700276 RAF_LTE_CA = (1 << RADIO_TECH_LTE_CA)
Wink Saville8b4e4f72014-10-17 15:01:45 -0700277} RIL_RadioAccessFamily;
278
279typedef enum {
Nathan Harold92839f12016-02-12 10:02:28 -0800280 BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically)
281 BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
282 BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
283 BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000)
284 BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
285 BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
286 BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band)
287 BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band)
288 BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band)
289 BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band)
290 BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band)
291 BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band)
292 BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band)
293 BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band)
294 BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band)
295 BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band)
296 BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band)
297 BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band)
298 BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band)
299} RIL_RadioBandMode;
300
301typedef enum {
Wink Saville8b4e4f72014-10-17 15:01:45 -0700302 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
303 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
304 // forthcoming with these same parameters
305 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
306 // RIL_RadioCapability.status = 0, if any START's fail no
307 // APPLY will be sent
308 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
309 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
310 // occurs in any previous command the RIL_RadioAccessesFamily and
Legler Wu8caf06f2014-10-29 14:02:14 +0800311 // logicalModemUuid fields will be the prior configuration thus
Wink Saville8b4e4f72014-10-17 15:01:45 -0700312 // restoring the configuration to the previous value. An error
313 // returned by this command will generally be ignored or may
314 // cause that logical modem to be removed from service.
315} RadioCapabilityPhase;
316
317typedef enum {
318 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
319 // RC_PHASE_APPLY
320 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
321 // capability was success with RC_PHASE_FINISH
322 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
323 // capability is fail with RC_PHASE_FINISH.
324} RadioCapabilityStatus;
325
326#define RIL_RADIO_CAPABILITY_VERSION 1
327typedef struct {
Legler Wu8caf06f2014-10-29 14:02:14 +0800328 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
Wink Saville8b4e4f72014-10-17 15:01:45 -0700329 int session; // Unique session value defined by framework returned in all "responses/unsol"
330 int phase; // CONFIGURED, START, APPLY, FINISH
331 int rat; // RIL_RadioAccessFamily for the radio
332 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
333 int status; // Return status and an input parameter for RC_PHASE_FINISH
334} RIL_RadioCapability;
335
Wink Savillec0114b32011-02-18 10:14:07 -0800336// Do we want to split Data from Voice and the use
337// RIL_RadioTechnology for get/setPreferredVoice/Data ?
338typedef enum {
339 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
340 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
341 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
342 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
343 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
344 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
345 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
346 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
347 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
348 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
349 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
Uma Maheswari Ramalingam0e094872011-09-28 13:25:48 -0700350 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
Rakesh Pallerla8c20ebe2015-03-31 14:52:49 -0700351 PREF_NET_TYPE_LTE_WCDMA = 12, /* LTE/WCDMA */
352 PREF_NET_TYPE_TD_SCDMA_ONLY = 13, /* TD-SCDMA only */
353 PREF_NET_TYPE_TD_SCDMA_WCDMA = 14, /* TD-SCDMA and WCDMA */
354 PREF_NET_TYPE_TD_SCDMA_LTE = 15, /* TD-SCDMA and LTE */
355 PREF_NET_TYPE_TD_SCDMA_GSM = 16, /* TD-SCDMA and GSM */
356 PREF_NET_TYPE_TD_SCDMA_GSM_LTE = 17, /* TD-SCDMA,GSM and LTE */
357 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA = 18, /* TD-SCDMA, GSM/WCDMA */
358 PREF_NET_TYPE_TD_SCDMA_WCDMA_LTE = 19, /* TD-SCDMA, WCDMA and LTE */
359 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_LTE = 20, /* TD-SCDMA, GSM/WCDMA and LTE */
360 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_CDMA_EVDO_AUTO = 21, /* TD-SCDMA, GSM/WCDMA, CDMA and EvDo */
361 PREF_NET_TYPE_TD_SCDMA_LTE_CDMA_EVDO_GSM_WCDMA = 22 /* TD-SCDMA, LTE, CDMA, EvDo GSM/WCDMA */
Wink Savillec0114b32011-02-18 10:14:07 -0800362} RIL_PreferredNetworkType;
363
364/* Source for cdma subscription */
365typedef enum {
366 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
367 CDMA_SUBSCRIPTION_SOURCE_NV = 1
368} RIL_CdmaSubscriptionSource;
369
Wink Saville74fa3882009-12-22 15:35:41 -0800370/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
371typedef enum {
372 RIL_UUS_TYPE1_IMPLICIT = 0,
373 RIL_UUS_TYPE1_REQUIRED = 1,
374 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
375 RIL_UUS_TYPE2_REQUIRED = 3,
376 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
377 RIL_UUS_TYPE3_REQUIRED = 5,
378 RIL_UUS_TYPE3_NOT_REQUIRED = 6
379} RIL_UUS_Type;
380
381/* User-to-User Signaling Information data coding schemes. Possible values for
382 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
383 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
384typedef enum {
385 RIL_UUS_DCS_USP = 0, /* User specified protocol */
386 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
387 RIL_UUS_DCS_X244 = 2, /* X.244 */
388 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
389 convergence function */
390 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
391} RIL_UUS_DCS;
392
393/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
394 * This data is passed in RIL_ExtensionRecord and rec contains this
395 * structure when type is RIL_UUS_INFO_EXT_REC */
396typedef struct {
397 RIL_UUS_Type uusType; /* UUS Type */
398 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
399 int uusLength; /* Length of UUS Data */
400 char * uusData; /* UUS Data */
401} RIL_UUS_Info;
402
403/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700404typedef struct {
405 char isPresent; /* non-zero if signal information record is present */
406 char signalType; /* as defined 3.7.5.5-1 */
407 char alertPitch; /* as defined 3.7.5.5-2 */
408 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
409} RIL_CDMA_SignalInfoRecord;
410
Wink Saville1b5fd232009-04-22 14:50:00 -0700411typedef struct {
412 RIL_CallState state;
413 int index; /* Connection Index for use with, eg, AT+CHLD */
414 int toa; /* type of address, eg 145 = intl */
415 char isMpty; /* nonzero if is mpty call */
416 char isMT; /* nonzero if call is mobile terminated */
417 char als; /* ALS line indicator if available
418 (0 = line 1) */
419 char isVoice; /* nonzero if this is is a voice call */
420 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
421 char * number; /* Remote party number */
422 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
423 char * name; /* Remote party name */
424 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800425 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800426} RIL_Call;
427
Wink Savillec0114b32011-02-18 10:14:07 -0800428/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800429typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800430 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700431 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700432 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
433 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800434 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800435 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
436} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800437
438/*
439 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
440 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
441 */
442typedef struct {
443 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500444 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
445 back-off timer value RIL wants to override the one
446 pre-configured in FW.
447 The unit is miliseconds.
448 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700449 The value 0 means retry should be done ASAP.
Wink Saville8a9e0212013-04-09 12:11:38 -0700450 The value of INT_MAX(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800451 int cid; /* Context ID, uniquely identifies this call */
452 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
453 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
454 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
455 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
456 such as "IP" or "IPV6" */
457 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800458 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
459 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800460 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800461 one of each. If the prefix length is absent the addresses
462 are assumed to be point to point with IPv4 having a prefix
463 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800464 char * dnses; /* A space-delimited list of DNS server addresses,
465 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
466 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800467 char * gateways; /* A space-delimited list of default gateway addresses,
468 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
469 May be empty in which case the addresses represent point
470 to point connections. */
471} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800472
Etan Cohend3652192014-06-20 08:28:44 -0700473typedef struct {
474 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
475 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
476 back-off timer value RIL wants to override the one
477 pre-configured in FW.
478 The unit is miliseconds.
479 The value < 0 means no value is suggested.
480 The value 0 means retry should be done ASAP.
481 The value of INT_MAX(0x7fffffff) means no retry. */
482 int cid; /* Context ID, uniquely identifies this call */
483 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
484 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
485 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
486 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
487 such as "IP" or "IPV6" */
488 char * ifname; /* The network interface name */
489 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
490 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
491 May not be empty, typically 1 IPv4 or 1 IPv6 or
492 one of each. If the prefix length is absent the addresses
493 are assumed to be point to point with IPv4 having a prefix
494 length of 32 and IPv6 128. */
495 char * dnses; /* A space-delimited list of DNS server addresses,
496 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
497 May be empty. */
498 char * gateways; /* A space-delimited list of default gateway addresses,
499 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
500 May be empty in which case the addresses represent point
501 to point connections. */
502 char * pcscf; /* the Proxy Call State Control Function address
503 via PCO(Protocol Configuration Option) for IMS client. */
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -0700504} RIL_Data_Call_Response_v9;
505
506typedef struct {
507 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
508 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
509 back-off timer value RIL wants to override the one
510 pre-configured in FW.
511 The unit is miliseconds.
512 The value < 0 means no value is suggested.
513 The value 0 means retry should be done ASAP.
514 The value of INT_MAX(0x7fffffff) means no retry. */
515 int cid; /* Context ID, uniquely identifies this call */
516 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
517 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
518 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
519 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
520 such as "IP" or "IPV6" */
521 char * ifname; /* The network interface name */
522 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
523 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
524 May not be empty, typically 1 IPv4 or 1 IPv6 or
525 one of each. If the prefix length is absent the addresses
526 are assumed to be point to point with IPv4 having a prefix
527 length of 32 and IPv6 128. */
528 char * dnses; /* A space-delimited list of DNS server addresses,
529 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
530 May be empty. */
531 char * gateways; /* A space-delimited list of default gateway addresses,
532 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
533 May be empty in which case the addresses represent point
534 to point connections. */
535 char * pcscf; /* the Proxy Call State Control Function address
536 via PCO(Protocol Configuration Option) for IMS client. */
537 int mtu; /* MTU received from network
538 Value <= 0 means network has either not sent a value or
539 sent an invalid value */
540} RIL_Data_Call_Response_v11;
Etan Cohend3652192014-06-20 08:28:44 -0700541
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700542typedef enum {
543 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
544 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
545} RIL_RadioTechnologyFamily;
546
547typedef struct {
548 RIL_RadioTechnologyFamily tech;
549 unsigned char retry; /* 0 == not retry, nonzero == retry */
550 int messageRef; /* Valid field if retry is set to nonzero.
551 Contains messageRef from RIL_SMS_Response
552 corresponding to failed MO SMS.
553 */
554
555 union {
556 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
557 RIL_CDMA_SMS_Message* cdmaMessage;
558
559 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
Sanket Padawe05c23072016-08-08 15:42:17 -0700560 char** gsmMessage; /* This is an array of pointers where pointers
561 are contiguous but elements pointed by those pointers
562 are not contiguous
563 */
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700564 } message;
565} RIL_IMS_SMS_Message;
566
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800567typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800568 int messageRef; /* TP-Message-Reference for GSM,
569 and BearerData MessageId for CDMA
570 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800571 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700572 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
573 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
574 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800575} RIL_SMS_Response;
576
577/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
578typedef struct {
579 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
580 /* 0 = "REC UNREAD" */
581 /* 1 = "REC READ" */
582 /* 2 = "STO UNSENT" */
583 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700584 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
585 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800586 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
587 (as expected by TS 27.005) or NULL for default SMSC */
588} RIL_SMS_WriteArgs;
589
590/** Used by RIL_REQUEST_DIAL */
591typedef struct {
592 char * address;
593 int clir;
594 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
595 * clir == 0 on "use subscription default value"
596 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
597 * clir == 2 on "CLIR suppression" (allow CLI presentation)
598 */
Wink Saville74fa3882009-12-22 15:35:41 -0800599 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800600} RIL_Dial;
601
602typedef struct {
603 int command; /* one of the commands listed for TS 27.007 +CRSM*/
604 int fileid; /* EF id */
605 char *path; /* "pathid" from TS 27.007 +CRSM command.
606 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700607 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800608 */
609 int p1;
610 int p2;
611 int p3;
612 char *data; /* May be NULL*/
613 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800614} RIL_SIM_IO_v5;
615
616typedef struct {
617 int command; /* one of the commands listed for TS 27.007 +CRSM*/
618 int fileid; /* EF id */
619 char *path; /* "pathid" from TS 27.007 +CRSM command.
620 Path is in hex asciii format eg "7f205f70"
621 Path must always be provided.
622 */
623 int p1;
624 int p2;
625 int p3;
626 char *data; /* May be NULL*/
627 char *pin2; /* May be NULL*/
628 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
629} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800630
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800631/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
632 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
633typedef struct {
634 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
635 ignored for +CSIM command. */
636
637 /* Following fields are used to derive the APDU ("command" and "length"
638 values in TS 27.007 +CSIM and +CGLA commands). */
639 int cla;
640 int instruction;
641 int p1;
642 int p2;
643 int p3; /* A negative P3 implies a 4 byte APDU. */
644 char *data; /* May be NULL. In hex string format. */
645} RIL_SIM_APDU;
646
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800647typedef struct {
648 int sw1;
649 int sw2;
Amit Mahajan2875bc22014-08-06 10:03:15 -0700650 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
651 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 -0800652} RIL_SIM_IO_Response;
653
654/* See also com.android.internal.telephony.gsm.CallForwardInfo */
655
656typedef struct {
657 int status; /*
658 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
659 * status 1 = active, 0 = not active
660 *
661 * For RIL_REQUEST_SET_CALL_FORWARD:
662 * status is:
663 * 0 = disable
664 * 1 = enable
665 * 2 = interrogate
666 * 3 = registeration
667 * 4 = erasure
668 */
669
Wink Saville3d54e742009-05-18 18:00:44 -0700670 int reason; /* from TS 27.007 7.11 "reason" */
671 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
672 See table for Android mapping from
673 MMI service code
674 0 means user doesn't input class */
675 int toa; /* "type" from TS 27.007 7.11 */
676 char * number; /* "number" from TS 27.007 7.11. May be NULL */
677 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800678}RIL_CallForwardInfo;
679
680typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700681 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
682 * Upper 16 bits is LAC and lower 16 bits
683 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800684 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700685 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700686 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800687 */
johnwange0ba6a92009-09-11 19:14:52 -0700688 int rssi; /* Received RSSI in GSM,
689 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800690 */
691} RIL_NeighboringCell;
692
fengluf7408292015-04-14 14:53:55 -0700693typedef struct {
694 char lce_status; /* LCE service status:
695 * -1 = not supported;
696 * 0 = stopped;
697 * 1 = active.
698 */
699 unsigned int actual_interval_ms; /* actual LCE reporting interval,
700 * meaningful only if LCEStatus = 1.
701 */
702} RIL_LceStatusInfo;
703
704typedef struct {
fenglu290add32015-05-01 17:05:15 -0700705 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
fengluf7408292015-04-14 14:53:55 -0700706 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
707 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
708 * moves to inactive state or network type change)
709 * 1 = suspended;
710 * 0 = not suspended.
711 */
712} RIL_LceDataInfo;
713
Meng Wangb4e34312016-05-12 14:54:36 -0700714typedef enum {
715 RIL_MATCH_ALL = 0, /* Apply to all carriers with the same mcc/mnc */
716 RIL_MATCH_SPN = 1, /* Use SPN and mcc/mnc to identify the carrier */
717 RIL_MATCH_IMSI_PREFIX = 2, /* Use IMSI prefix and mcc/mnc to identify the carrier */
718 RIL_MATCH_GID1 = 3, /* Use GID1 and mcc/mnc to identify the carrier */
719 RIL_MATCH_GID2 = 4, /* Use GID2 and mcc/mnc to identify the carrier */
720} RIL_CarrierMatchType;
721
722typedef struct {
723 const char * mcc;
724 const char * mnc;
725 RIL_CarrierMatchType match_type; /* Specify match type for the carrier.
726 * If it’s RIL_MATCH_ALL, match_data is null;
727 * otherwise, match_data is the value for the match type.
728 */
729 const char * match_data;
730} RIL_Carrier;
731
732typedef struct {
733 int32_t len_allowed_carriers; /* length of array allowed_carriers */
734 int32_t len_excluded_carriers; /* length of array excluded_carriers */
735 RIL_Carrier * allowed_carriers; /* whitelist for allowed carriers */
736 RIL_Carrier * excluded_carriers; /* blacklist for explicitly excluded carriers
737 * which match allowed_carriers. Eg. allowed_carriers match
738 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1
739 * is ABCD. It means except the carrier whose gid1 is ABCD,
740 * all carriers with the same mcc/mnc are allowed.
741 */
742} RIL_CarrierRestrictions;
743
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800744/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
745typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700746 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800747 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
748 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
749 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800750 CALL_FAIL_NORMAL = 16,
751 CALL_FAIL_BUSY = 17,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800752 CALL_FAIL_NO_USER_RESPONDING = 18,
753 CALL_FAIL_NO_ANSWER_FROM_USER = 19,
754 CALL_FAIL_CALL_REJECTED = 21,
755 CALL_FAIL_NUMBER_CHANGED = 22,
756 CALL_FAIL_PREEMPTION = 25,
757 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
758 CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
759 CALL_FAIL_FACILITY_REJECTED = 29,
760 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
761 CALL_FAIL_NORMAL_UNSPECIFIED = 31,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800762 CALL_FAIL_CONGESTION = 34,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800763 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
764 CALL_FAIL_TEMPORARY_FAILURE = 41,
765 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
766 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
767 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
768 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
769 CALL_FAIL_QOS_UNAVAILABLE = 49,
770 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
771 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
772 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
773 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
774 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
775 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800776 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800777 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
778 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
779 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
780 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
781 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
782 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
783 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
784 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
785 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
786 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
787 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
788 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
789 CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
790 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
791 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
792 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
793 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800794 CALL_FAIL_CALL_BARRED = 240,
795 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700796 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
797 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Amit Mahajan54563d32014-11-22 00:54:49 +0000798 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
799 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
800 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
Jayachandran Ccc2a2022017-03-07 09:55:58 -0800801 CALL_FAIL_RADIO_OFF = 247, /* Radio is OFF */
802 CALL_FAIL_OUT_OF_SERVICE = 248, /* No cellular coverage */
803 CALL_FAIL_NO_VALID_SIM = 249, /* No valid SIM is present */
804 CALL_FAIL_RADIO_INTERNAL_ERROR = 250, /* Internal error at Modem */
805 CALL_FAIL_NETWORK_RESP_TIMEOUT = 251, /* No response from network */
806 CALL_FAIL_NETWORK_REJECT = 252, /* Explicit network reject */
807 CALL_FAIL_RADIO_ACCESS_FAILURE = 253, /* RRC connection failure. Eg.RACH */
808 CALL_FAIL_RADIO_LINK_FAILURE = 254, /* Radio Link Failure */
809 CALL_FAIL_RADIO_LINK_LOST = 255, /* Radio link lost due to poor coverage */
810 CALL_FAIL_RADIO_UPLINK_FAILURE = 256, /* Radio uplink failure */
811 CALL_FAIL_RADIO_SETUP_FAILURE = 257, /* RRC connection setup failure */
812 CALL_FAIL_RADIO_RELEASE_NORMAL = 258, /* RRC connection release, normal */
813 CALL_FAIL_RADIO_RELEASE_ABNORMAL = 259, /* RRC connection release, abnormal */
814 CALL_FAIL_ACCESS_CLASS_BLOCKED = 260, /* Access class barring */
815 CALL_FAIL_NETWORK_DETACH = 261, /* Explicit network detach */
Wink Saville1b5fd232009-04-22 14:50:00 -0700816 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
817 CALL_FAIL_CDMA_DROP = 1001,
818 CALL_FAIL_CDMA_INTERCEPT = 1002,
819 CALL_FAIL_CDMA_REORDER = 1003,
820 CALL_FAIL_CDMA_SO_REJECT = 1004,
821 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
822 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
823 CALL_FAIL_CDMA_PREEMPTED = 1007,
824 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
825 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700826 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
Jayachandran Ccc2a2022017-03-07 09:55:58 -0800827
828 /* OEM specific error codes. Used to distinguish error from
829 * CALL_FAIL_ERROR_UNSPECIFIED and help assist debugging */
830 CALL_FAIL_OEM_CAUSE_1 = 0xf001,
831 CALL_FAIL_OEM_CAUSE_2 = 0xf002,
832 CALL_FAIL_OEM_CAUSE_3 = 0xf003,
833 CALL_FAIL_OEM_CAUSE_4 = 0xf004,
834 CALL_FAIL_OEM_CAUSE_5 = 0xf005,
835 CALL_FAIL_OEM_CAUSE_6 = 0xf006,
836 CALL_FAIL_OEM_CAUSE_7 = 0xf007,
837 CALL_FAIL_OEM_CAUSE_8 = 0xf008,
838 CALL_FAIL_OEM_CAUSE_9 = 0xf009,
839 CALL_FAIL_OEM_CAUSE_10 = 0xf00a,
840 CALL_FAIL_OEM_CAUSE_11 = 0xf00b,
841 CALL_FAIL_OEM_CAUSE_12 = 0xf00c,
842 CALL_FAIL_OEM_CAUSE_13 = 0xf00d,
843 CALL_FAIL_OEM_CAUSE_14 = 0xf00e,
844 CALL_FAIL_OEM_CAUSE_15 = 0xf00f,
845
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800846 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
847 vendor code should make sure to map error
848 code to specific error */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800849} RIL_LastCallFailCause;
850
Chao Liu548a81e2015-05-14 16:13:46 -0700851typedef struct {
852 RIL_LastCallFailCause cause_code;
853 char * vendor_cause;
854} RIL_LastCallFailCauseInfo;
855
Wink Savillef4c4d362009-04-02 01:37:03 -0700856/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800857typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800858 PDP_FAIL_NONE = 0, /* No error, connection ok */
859
860 /* an integer cause code defined in TS 24.008
861 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
862 If the implementation does not have access to the exact cause codes,
863 then it should return one of the following values,
864 as the UI layer needs to distinguish these
865 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700866 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
Sanket Padaweac308b92016-01-07 14:41:17 -0800867 PDP_FAIL_NAS_SIGNALLING = 0x0E,
868 PDP_FAIL_LLC_SNDCP = 0x19,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700869 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
870 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
871 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
872 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
873 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
874 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
875 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
876 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
877 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800878 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
Hui Wang11e8b232014-09-19 16:40:17 -0500879 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
880 based on framework config */
Sanket Padaweac308b92016-01-07 14:41:17 -0800881 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
882 PDP_FAIL_NETWORK_FAILURE = 0x26,
883 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
884 PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
885 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
886 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
887 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
888 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
889 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
890 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
Wink Saville43808972011-01-13 17:39:51 -0800891 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
892 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
893 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Sanket Padaweac308b92016-01-07 14:41:17 -0800894 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
895 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
896 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
897 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
898 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
899 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
900 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
901 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
902 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
903 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
904 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
905 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
906 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
907 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
908 PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
909 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
910 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
911 PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
912 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
913 PDP_FAIL_IFACE_MISMATCH = 0x75,
914 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
915 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
916 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
917 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
918 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
Wink Saville43808972011-01-13 17:39:51 -0800919
Sanket Padawe0106aed2016-02-09 09:56:31 -0800920 // OEM specific error codes. To be used by OEMs when they don't want to
921 // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
922 PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001,
923 PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002,
924 PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003,
925 PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004,
926 PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005,
927 PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006,
928 PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007,
929 PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008,
930 PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009,
931 PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A,
932 PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B,
933 PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C,
934 PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D,
935 PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E,
936 PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F,
937
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700938 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800939 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
940 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800941
942 /* reasons for data call drop - network/modem disconnect */
Wink Saville3492c6e2013-10-03 13:53:27 -0700943 PDP_FAIL_SIGNAL_LOST = -3,
Wink Saville43808972011-01-13 17:39:51 -0800944 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
945 with parameters appropriate for new technology */
946 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
947 powered off - no retry */
948 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
949 mode was up on same APN/data profile - no retry until
950 tethered call is off */
951
Sanket Padaweac308b92016-01-07 14:41:17 -0800952 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
953 new error codes are added making this unnecessary */
Wink Saville43808972011-01-13 17:39:51 -0800954} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800955
jsh602f80f2009-07-10 15:44:37 -0700956/* See RIL_REQUEST_SETUP_DATA_CALL */
957typedef enum {
958 RIL_DATA_PROFILE_DEFAULT = 0,
959 RIL_DATA_PROFILE_TETHERED = 1,
Hui Wang8d679622014-10-16 14:59:27 -0500960 RIL_DATA_PROFILE_IMS = 2,
961 RIL_DATA_PROFILE_FOTA = 3,
962 RIL_DATA_PROFILE_CBS = 4,
963 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
964 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
jsh602f80f2009-07-10 15:44:37 -0700965} RIL_DataProfile;
966
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800967/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
968typedef struct {
969 int notificationType; /*
970 * 0 = MO intermediate result code
971 * 1 = MT unsolicited result code
972 */
973 int code; /* See 27.007 7.17
974 "code1" for MO
975 "code2" for MT. */
976 int index; /* CUG index. See 27.007 7.17. */
977 int type; /* "type" from 27.007 7.17 (MT only). */
978 char * number; /* "number" from 27.007 7.17
979 (MT only, may be NULL). */
980} RIL_SuppSvcNotification;
981
Wink Savillef4c4d362009-04-02 01:37:03 -0700982#define RIL_CARD_MAX_APPS 8
983
984typedef enum {
Meng Wangb4e34312016-05-12 14:54:36 -0700985 RIL_CARDSTATE_ABSENT = 0,
986 RIL_CARDSTATE_PRESENT = 1,
987 RIL_CARDSTATE_ERROR = 2,
988 RIL_CARDSTATE_RESTRICTED = 3 /* card is present but not usable due to carrier restrictions.*/
Wink Savillef4c4d362009-04-02 01:37:03 -0700989} RIL_CardState;
990
991typedef enum {
992 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
993 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700994 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
995 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700996 involved */
997 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
998 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
999 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
1000 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
1001 RIL_PERSOSUBSTATE_SIM_SIM = 7,
1002 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
1003 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
1004 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
1005 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
1006 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
1007 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
1008 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
1009 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
1010 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
1011 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
1012 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
1013 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
1014 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
1015 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
1016 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
1017 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
1018 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
1019} RIL_PersoSubstate;
1020
1021typedef enum {
1022 RIL_APPSTATE_UNKNOWN = 0,
1023 RIL_APPSTATE_DETECTED = 1,
1024 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
1025 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -07001026 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -07001027 when app_state is assigned to this value */
1028 RIL_APPSTATE_READY = 5
1029} RIL_AppState;
1030
1031typedef enum {
1032 RIL_PINSTATE_UNKNOWN = 0,
1033 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
1034 RIL_PINSTATE_ENABLED_VERIFIED = 2,
1035 RIL_PINSTATE_DISABLED = 3,
1036 RIL_PINSTATE_ENABLED_BLOCKED = 4,
1037 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
1038} RIL_PinState;
1039
1040typedef enum {
1041 RIL_APPTYPE_UNKNOWN = 0,
1042 RIL_APPTYPE_SIM = 1,
1043 RIL_APPTYPE_USIM = 2,
1044 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -08001045 RIL_APPTYPE_CSIM = 4,
1046 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -07001047} RIL_AppType;
1048
Sooraj Sasindranf4714b72016-11-30 18:36:03 -08001049/*
1050 * Please note that registration state UNKNOWN is
1051 * treated as "out of service" in the Android telephony.
1052 * Registration state REG_DENIED must be returned if Location Update
1053 * Reject (with cause 17 - Network Failure) is received
1054 * repeatedly from the network, to facilitate
1055 * "managed roaming"
1056 */
1057typedef enum {
1058 RIL_NOT_REG_AND_NOT_SEARCHING = 0, // Not registered, MT is not currently searching
1059 // a new operator to register
1060 RIL_REG_HOME = 1, // Registered, home network
1061 RIL_NOT_REG_AND_SEARCHING = 2, // Not registered, but MT is currently searching
1062 // a new operator to register
1063 RIL_REG_DENIED = 3, // Registration denied
1064 RIL_UNKNOWN = 4, // Unknown
1065 RIL_REG_ROAMING = 5, // Registered, roaming
1066 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_NOT_SEARCHING = 10, // Same as
1067 // RIL_NOT_REG_AND_NOT_SEARCHING but indicates that
1068 // emergency calls are enabled.
1069 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_SEARCHING = 12, // Same as RIL_NOT_REG_AND_SEARCHING
1070 // but indicates that
1071 // emergency calls are enabled.
1072 RIL_REG_DENIED_AND_EMERGENCY_AVAILABLE = 13, // Same as REG_DENIED but indicates that
1073 // emergency calls are enabled.
1074 RIL_UNKNOWN_AND_EMERGENCY_AVAILABLE = 14, // Same as UNKNOWN but indicates that
1075 // emergency calls are enabled.
1076} RIL_RegState;
1077
Wink Savillef4c4d362009-04-02 01:37:03 -07001078typedef struct
1079{
Wink Saville7f856802009-06-09 10:23:37 -07001080 RIL_AppType app_type;
1081 RIL_AppState app_state;
1082 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -07001083 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -07001084 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -07001085 0x30, 0x30, 0x30 */
1086 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -08001087 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -07001088 RIL_PinState pin1;
1089 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -07001090} RIL_AppStatus;
1091
Wink Savillec0114b32011-02-18 10:14:07 -08001092/* Deprecated, use RIL_CardStatus_v6 */
1093typedef struct
1094{
1095 RIL_CardState card_state;
1096 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
1097 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1098 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1099 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1100 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
1101} RIL_CardStatus_v5;
1102
Wink Savillef4c4d362009-04-02 01:37:03 -07001103typedef struct
1104{
Wink Saville7f856802009-06-09 10:23:37 -07001105 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -07001106 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -08001107 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1108 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1109 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -07001110 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1111 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -08001112} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -07001113
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001114/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
1115 * or as part of RIL_SimRefreshResponse_v7
1116 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001117typedef enum {
1118 /* A file on SIM has been updated. data[1] contains the EFID. */
1119 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001120 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001121 SIM_INIT = 1,
1122 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
1123 SIM_RESET = 2
1124} RIL_SimRefreshResult;
1125
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001126typedef struct {
1127 RIL_SimRefreshResult result;
1128 int ef_id; /* is the EFID of the updated file if the result is */
1129 /* SIM_FILE_UPDATE or 0 for any other result. */
1130 char * aid; /* is AID(application ID) of the card application */
1131 /* See ETSI 102.221 8.1 and 101.220 4 */
1132 /* For SIM_FILE_UPDATE result it can be set to AID of */
1133 /* application in which updated EF resides or it can be */
1134 /* NULL if EF is outside of an application. */
1135 /* For SIM_INIT result this field is set to AID of */
1136 /* application that caused REFRESH */
1137 /* For SIM_RESET result it is NULL. */
1138} RIL_SimRefreshResponse_v7;
1139
Wink Savillec0114b32011-02-18 10:14:07 -08001140/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
1141typedef struct {
1142 char * number; /* Remote party number */
1143 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1144 char * name; /* Remote party name */
1145 RIL_CDMA_SignalInfoRecord signalInfoRecord;
1146} RIL_CDMA_CallWaiting_v5;
1147
Wink Saville1b5fd232009-04-22 14:50:00 -07001148typedef struct {
1149 char * number; /* Remote party number */
1150 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1151 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -07001152 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -08001153 /* Number type/Number plan required to support International Call Waiting */
1154 int number_type; /* 0=Unknown, 1=International, 2=National,
1155 3=Network specific, 4=subscriber */
1156 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
1157} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001158
Wink Savillea592eeb2009-05-22 13:26:36 -07001159/**
1160 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
1161 *
1162 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
1163 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
1164 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
1165 * CBM message ID.
1166 *
1167 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
1168 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
1169 * and 9.4.4.2.3 for UMTS.
1170 * All other values can be treated as empty CBM data coding scheme.
1171 *
1172 * selected 0 means message types specified in <fromServiceId, toServiceId>
1173 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
1174 *
1175 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
1176 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
1177 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001178typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -07001179 int fromServiceId;
1180 int toServiceId;
1181 int fromCodeScheme;
1182 int toCodeScheme;
1183 unsigned char selected;
1184} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -07001185
The Android Open Source Project34a51082009-03-05 14:34:37 -08001186/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
1187#define RIL_RESTRICTED_STATE_NONE 0x00
1188/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
1189#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
1190/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
1191#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -07001192/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -08001193#define RIL_RESTRICTED_STATE_CS_ALL 0x04
1194/* Block packet data access due to restriction. */
1195#define RIL_RESTRICTED_STATE_PS_ALL 0x10
1196
Wink Saville1b5fd232009-04-22 14:50:00 -07001197/* The status for an OTASP/OTAPA session */
1198typedef enum {
1199 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
1200 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
1201 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
1202 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
1203 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
1204 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
1205 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
1206 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
1207 CDMA_OTA_PROVISION_STATUS_COMMITTED,
1208 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
1209 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
1210 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
1211} RIL_CDMA_OTA_ProvisionStatus;
1212
1213typedef struct {
1214 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1215 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1216} RIL_GW_SignalStrength;
1217
Wink Savillec57b3eb2013-04-17 12:51:41 -07001218typedef struct {
1219 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1220 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001221 int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us.
1222 * INT_MAX denotes invalid value */
1223} RIL_GSM_SignalStrength_v12;
1224
1225typedef struct {
1226 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1227 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Wink Savillec57b3eb2013-04-17 12:51:41 -07001228} RIL_SignalStrengthWcdma;
Wink Saville1b5fd232009-04-22 14:50:00 -07001229
1230typedef struct {
1231 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1232 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1233 * value will be 75.
1234 */
1235 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1236 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1237 * will be 125.
1238 */
1239} RIL_CDMA_SignalStrength;
1240
1241
1242typedef struct {
1243 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1244 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1245 * value will be 75.
1246 */
1247 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1248 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1249 * will be 125.
1250 */
1251 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
1252} RIL_EVDO_SignalStrength;
1253
Wink Savillec0114b32011-02-18 10:14:07 -08001254typedef struct {
1255 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -07001256 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1257 * Range: 44 to 140 dBm
1258 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1259 * Reference: 3GPP TS 36.133 9.1.4 */
1260 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1261 * Range: 20 to 3 dB.
1262 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1263 * Reference: 3GPP TS 36.133 9.1.7 */
1264 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1265 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1266 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1267 * Reference: 3GPP TS 36.101 8.1.1 */
1268 int cqi; /* The current Channel Quality Indicator.
1269 * Range: 0 to 15.
1270 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1271 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -08001272} RIL_LTE_SignalStrength;
1273
Wink Saville8a9e0212013-04-09 12:11:38 -07001274typedef struct {
1275 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1276 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1277 * Range: 44 to 140 dBm
1278 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1279 * Reference: 3GPP TS 36.133 9.1.4 */
1280 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1281 * Range: 20 to 3 dB.
1282 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1283 * Reference: 3GPP TS 36.133 9.1.7 */
1284 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1285 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1286 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1287 * Reference: 3GPP TS 36.101 8.1.1 */
1288 int cqi; /* The current Channel Quality Indicator.
1289 * Range: 0 to 15.
1290 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1291 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1292 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
1293 * Approximate distance can be calculated using 300m/us * timingAdvance.
1294 * Range: 0 to 0x7FFFFFFE
1295 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1296 * Reference: 3GPP 36.321 section 6.1.3.5
1297 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1298} RIL_LTE_SignalStrength_v8;
1299
Etan Cohend3652192014-06-20 08:28:44 -07001300typedef struct {
1301 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
1302 * Range : 25 to 120
1303 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1304 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1305} RIL_TD_SCDMA_SignalStrength;
1306
Wink Savillec0114b32011-02-18 10:14:07 -08001307/* Deprecated, use RIL_SignalStrength_v6 */
1308typedef struct {
1309 RIL_GW_SignalStrength GW_SignalStrength;
1310 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1311 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1312} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -07001313
1314typedef struct {
1315 RIL_GW_SignalStrength GW_SignalStrength;
1316 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1317 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -08001318 RIL_LTE_SignalStrength LTE_SignalStrength;
1319} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001320
Wink Saville8a9e0212013-04-09 12:11:38 -07001321typedef struct {
1322 RIL_GW_SignalStrength GW_SignalStrength;
1323 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1324 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1325 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1326} RIL_SignalStrength_v8;
1327
Etan Cohend3652192014-06-20 08:28:44 -07001328typedef struct {
1329 RIL_GW_SignalStrength GW_SignalStrength;
1330 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1331 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1332 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1333 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1334} RIL_SignalStrength_v10;
1335
Wink Saville8a9e0212013-04-09 12:11:38 -07001336typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001337 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1338 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1339 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1340 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 -07001341} RIL_CellIdentityGsm;
1342
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001343typedef struct {
1344 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1345 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1346 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1347 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
1348 int arfcn; /* 16-bit GSM Absolute RF channel number, INT_MAX if unknown */
Nathan Haroldf3769da2016-05-05 12:19:39 -07001349 uint8_t bsic;/* 6-bit Base Station Identity Code, 0xFF if unknown */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001350} RIL_CellIdentityGsm_v12;
1351
Wink Savillec57b3eb2013-04-17 12:51:41 -07001352typedef struct {
1353 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1354 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1355 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1356 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1357 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1358} RIL_CellIdentityWcdma;
1359
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001360typedef struct {
1361 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1362 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1363 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1364 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1365 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1366 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number, INT_MAX if unknown */
1367} RIL_CellIdentityWcdma_v12;
1368
Wink Saville8a9e0212013-04-09 12:11:38 -07001369typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001370 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1371 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1372 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001373 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1374 * It is represented in units of 0.25 seconds and ranges from -2592000
1375 * to 2592000, both values inclusive (corresponding to a range of -180
Wink Savillec57b3eb2013-04-17 12:51:41 -07001376 * to +180 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001377
1378 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1379 * It is represented in units of 0.25 seconds and ranges from -1296000
1380 * to 1296000, both values inclusive (corresponding to a range of -90
Wink Savillec57b3eb2013-04-17 12:51:41 -07001381 * to +90 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001382} RIL_CellIdentityCdma;
1383
Wink Saville8a9e0212013-04-09 12:11:38 -07001384typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001385 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1386 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1387 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1388 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1389 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001390} RIL_CellIdentityLte;
1391
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001392typedef struct {
1393 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1394 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1395 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1396 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1397 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1398 int earfcn; /* 18-bit LTE Absolute RC Channel Number, INT_MAX if unknown */
1399} RIL_CellIdentityLte_v12;
1400
Etan Cohend3652192014-06-20 08:28:44 -07001401typedef struct {
1402 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1403 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1404 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1405 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1406 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1407} RIL_CellIdentityTdscdma;
1408
Wink Saville8a9e0212013-04-09 12:11:38 -07001409typedef struct {
1410 RIL_CellIdentityGsm cellIdentityGsm;
1411 RIL_GW_SignalStrength signalStrengthGsm;
1412} RIL_CellInfoGsm;
1413
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001414typedef struct {
1415 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1416 RIL_GSM_SignalStrength_v12 signalStrengthGsm;
1417} RIL_CellInfoGsm_v12;
1418
Wink Savillec57b3eb2013-04-17 12:51:41 -07001419typedef struct {
1420 RIL_CellIdentityWcdma cellIdentityWcdma;
1421 RIL_SignalStrengthWcdma signalStrengthWcdma;
1422} RIL_CellInfoWcdma;
1423
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001424typedef struct {
1425 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1426 RIL_SignalStrengthWcdma signalStrengthWcdma;
1427} RIL_CellInfoWcdma_v12;
1428
Wink Saville8a9e0212013-04-09 12:11:38 -07001429typedef struct {
1430 RIL_CellIdentityCdma cellIdentityCdma;
1431 RIL_CDMA_SignalStrength signalStrengthCdma;
1432 RIL_EVDO_SignalStrength signalStrengthEvdo;
1433} RIL_CellInfoCdma;
1434
Wink Saville8a9e0212013-04-09 12:11:38 -07001435typedef struct {
1436 RIL_CellIdentityLte cellIdentityLte;
1437 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1438} RIL_CellInfoLte;
1439
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001440typedef struct {
1441 RIL_CellIdentityLte_v12 cellIdentityLte;
1442 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1443} RIL_CellInfoLte_v12;
1444
Etan Cohend3652192014-06-20 08:28:44 -07001445typedef struct {
1446 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1447 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1448} RIL_CellInfoTdscdma;
1449
Wink Saville8a9e0212013-04-09 12:11:38 -07001450// Must be the same as CellInfo.TYPE_XXX
1451typedef enum {
Sooraj Sasindranf4714b72016-11-30 18:36:03 -08001452 RIL_CELL_INFO_TYPE_NONE = 0, /* indicates no cell information */
Wink Saville8a9e0212013-04-09 12:11:38 -07001453 RIL_CELL_INFO_TYPE_GSM = 1,
1454 RIL_CELL_INFO_TYPE_CDMA = 2,
1455 RIL_CELL_INFO_TYPE_LTE = 3,
Wink Savillec57b3eb2013-04-17 12:51:41 -07001456 RIL_CELL_INFO_TYPE_WCDMA = 4,
Etan Cohend3652192014-06-20 08:28:44 -07001457 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
Wink Saville8a9e0212013-04-09 12:11:38 -07001458} RIL_CellInfoType;
1459
1460// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1461typedef enum {
1462 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1463 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1464 RIL_TIMESTAMP_TYPE_MODEM = 2,
1465 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1466 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1467} RIL_TimeStampType;
1468
1469typedef struct {
1470 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1471 int registered; /* !0 if this cell is registered 0 if not registered */
1472 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1473 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1474 union {
1475 RIL_CellInfoGsm gsm;
1476 RIL_CellInfoCdma cdma;
1477 RIL_CellInfoLte lte;
Wink Savillec57b3eb2013-04-17 12:51:41 -07001478 RIL_CellInfoWcdma wcdma;
Etan Cohend3652192014-06-20 08:28:44 -07001479 RIL_CellInfoTdscdma tdscdma;
Wink Saville8a9e0212013-04-09 12:11:38 -07001480 } CellInfo;
1481} RIL_CellInfo;
1482
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001483typedef struct {
1484 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1485 int registered; /* !0 if this cell is registered 0 if not registered */
1486 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1487 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1488 union {
1489 RIL_CellInfoGsm_v12 gsm;
1490 RIL_CellInfoCdma cdma;
1491 RIL_CellInfoLte_v12 lte;
1492 RIL_CellInfoWcdma_v12 wcdma;
1493 RIL_CellInfoTdscdma tdscdma;
1494 } CellInfo;
1495} RIL_CellInfo_v12;
1496
Sooraj Sasindranf4714b72016-11-30 18:36:03 -08001497typedef struct {
1498 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1499 union {
1500 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1501 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1502 RIL_CellIdentityLte_v12 cellIdentityLte;
1503 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1504 RIL_CellIdentityCdma cellIdentityCdma;
1505 };
1506}RIL_CellIdentity_v16;
1507
1508typedef struct {
1509 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
1510 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
1511 // UNKNOWN, REG_ROAMING defined in RegState
1512 RIL_RadioTechnology rat; // indicates the available voice radio technology,
1513 // valid values as defined by RadioTechnology.
1514 int32_t cssSupported; // concurrent services support indicator. if
1515 // registered on a CDMA system.
1516 // 0 - Concurrent services not supported,
1517 // 1 - Concurrent services supported
1518 int32_t roamingIndicator; // TSB-58 Roaming Indicator if registered
1519 // on a CDMA or EVDO system or -1 if not.
1520 // Valid values are 0-255.
1521 int32_t systemIsInPrl; // indicates whether the current system is in the
1522 // PRL if registered on a CDMA or EVDO system or -1 if
1523 // not. 0=not in the PRL, 1=in the PRL
1524 int32_t defaultRoamingIndicator; // default Roaming Indicator from the PRL,
1525 // if registered on a CDMA or EVDO system or -1 if not.
1526 // Valid values are 0-255.
1527 int32_t reasonForDenial; // reasonForDenial if registration state is 3
1528 // (Registration denied) this is an enumerated reason why
1529 // registration was denied. See 3GPP TS 24.008,
1530 // 10.5.3.6 and Annex G.
1531 // 0 - General
1532 // 1 - Authentication Failure
1533 // 2 - IMSI unknown in HLR
1534 // 3 - Illegal MS
1535 // 4 - Illegal ME
1536 // 5 - PLMN not allowed
1537 // 6 - Location area not allowed
1538 // 7 - Roaming not allowed
1539 // 8 - No Suitable Cells in this Location Area
1540 // 9 - Network failure
1541 // 10 - Persistent location update reject
1542 // 11 - PLMN not allowed
1543 // 12 - Location area not allowed
1544 // 13 - Roaming not allowed in this Location Area
1545 // 15 - No Suitable Cells in this Location Area
1546 // 17 - Network Failure
1547 // 20 - MAC Failure
1548 // 21 - Sync Failure
1549 // 22 - Congestion
1550 // 23 - GSM Authentication unacceptable
1551 // 25 - Not Authorized for this CSG
1552 // 32 - Service option not supported
1553 // 33 - Requested service option not subscribed
1554 // 34 - Service option temporarily out of order
1555 // 38 - Call cannot be identified
1556 // 48-63 - Retry upon entry into a new cell
1557 // 95 - Semantically incorrect message
1558 // 96 - Invalid mandatory information
1559 // 97 - Message type non-existent or not implemented
1560 // 98 - Message type not compatible with protocol state
1561 // 99 - Information element non-existent or
1562 // not implemented
1563 // 100 - Conditional IE error
1564 // 101 - Message not compatible with protocol state;
1565 RIL_CellIdentity_v16 cellIdentity; // current cell information
1566}RIL_VoiceRegistrationStateResponse;
1567
1568
1569typedef struct {
1570 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
1571 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
1572 // UNKNOWN, REG_ROAMING defined in RegState
1573 RIL_RadioTechnology rat; // indicates the available data radio technology,
1574 // valid values as defined by RadioTechnology.
1575 int32_t reasonDataDenied; // if registration state is 3 (Registration
1576 // denied) this is an enumerated reason why
1577 // registration was denied. See 3GPP TS 24.008,
1578 // Annex G.6 "Additional cause codes for GMM".
1579 // 7 == GPRS services not allowed
1580 // 8 == GPRS services and non-GPRS services not allowed
1581 // 9 == MS identity cannot be derived by the network
1582 // 10 == Implicitly detached
1583 // 14 == GPRS services not allowed in this PLMN
1584 // 16 == MSC temporarily not reachable
1585 // 40 == No PDP context activated
1586 int32_t maxDataCalls; // The maximum number of simultaneous Data Calls that
1587 // must be established using setupDataCall().
1588 RIL_CellIdentity_v16 cellIdentity; // Current cell information
1589}RIL_DataRegistrationStateResponse;
1590
Wink Saville1b5fd232009-04-22 14:50:00 -07001591/* Names of the CDMA info records (C.S0005 section 3.7.5) */
1592typedef enum {
1593 RIL_CDMA_DISPLAY_INFO_REC,
1594 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1595 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1596 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1597 RIL_CDMA_SIGNAL_INFO_REC,
1598 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1599 RIL_CDMA_LINE_CONTROL_INFO_REC,
1600 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1601 RIL_CDMA_T53_CLIR_INFO_REC,
1602 RIL_CDMA_T53_RELEASE_INFO_REC,
1603 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1604} RIL_CDMA_InfoRecName;
1605
1606/* Display Info Rec as defined in C.S0005 section 3.7.5.1
1607 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1608 Note: the Extended Display info rec contains multiple records of the
1609 form: display_tag, display_len, and display_len occurrences of the
1610 chari field if the display_tag is not 10000000 or 10000001.
1611 To save space, the records are stored consecutively in a byte buffer.
1612 The display_tag, display_len and chari fields are all 1 byte.
1613*/
1614
1615typedef struct {
1616 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001617 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001618} RIL_CDMA_DisplayInfoRecord;
1619
1620/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1621 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1622 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1623*/
1624
1625typedef struct {
1626 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001627 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001628 char number_type;
1629 char number_plan;
1630 char pi;
1631 char si;
1632} RIL_CDMA_NumberInfoRecord;
1633
1634/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1635typedef enum {
1636 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1637 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1638 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1639 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1640 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1641 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1642 RIL_REDIRECTING_REASON_RESERVED
1643} RIL_CDMA_RedirectingReason;
1644
1645typedef struct {
1646 RIL_CDMA_NumberInfoRecord redirectingNumber;
1647 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1648 RIL_CDMA_RedirectingReason redirectingReason;
1649} RIL_CDMA_RedirectingNumberInfoRecord;
1650
1651/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1652typedef struct {
1653 char lineCtrlPolarityIncluded;
1654 char lineCtrlToggle;
1655 char lineCtrlReverse;
1656 char lineCtrlPowerDenial;
1657} RIL_CDMA_LineControlInfoRecord;
1658
1659/* T53 CLIR Information Record */
1660typedef struct {
1661 char cause;
1662} RIL_CDMA_T53_CLIRInfoRecord;
1663
1664/* T53 Audio Control Information Record */
1665typedef struct {
1666 char upLink;
1667 char downLink;
1668} RIL_CDMA_T53_AudioControlInfoRecord;
1669
1670typedef struct {
1671
1672 RIL_CDMA_InfoRecName name;
1673
1674 union {
1675 /* Display and Extended Display Info Rec */
1676 RIL_CDMA_DisplayInfoRecord display;
1677
1678 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1679 RIL_CDMA_NumberInfoRecord number;
1680
1681 /* Signal Info Rec */
1682 RIL_CDMA_SignalInfoRecord signal;
1683
1684 /* Redirecting Number Info Rec */
1685 RIL_CDMA_RedirectingNumberInfoRecord redir;
1686
1687 /* Line Control Info Rec */
1688 RIL_CDMA_LineControlInfoRecord lineCtrl;
1689
1690 /* T53 CLIR Info Rec */
1691 RIL_CDMA_T53_CLIRInfoRecord clir;
1692
1693 /* T53 Audio Control Info Rec */
1694 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1695 } rec;
1696} RIL_CDMA_InformationRecord;
1697
1698#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1699
1700typedef struct {
1701 char numberOfInfoRecs;
1702 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1703} RIL_CDMA_InformationRecords;
1704
Jake Hamby8a4a2332014-01-15 13:12:05 -08001705/* See RIL_REQUEST_NV_READ_ITEM */
1706typedef struct {
1707 RIL_NV_Item itemID;
1708} RIL_NV_ReadItem;
1709
1710/* See RIL_REQUEST_NV_WRITE_ITEM */
1711typedef struct {
1712 RIL_NV_Item itemID;
1713 char * value;
1714} RIL_NV_WriteItem;
1715
Etan Cohend3652192014-06-20 08:28:44 -07001716typedef enum {
1717 HANDOVER_STARTED = 0,
1718 HANDOVER_COMPLETED = 1,
1719 HANDOVER_FAILED = 2,
1720 HANDOVER_CANCELED = 3
1721} RIL_SrvccState;
1722
1723/* hardware configuration reported to RILJ. */
1724typedef enum {
1725 RIL_HARDWARE_CONFIG_MODEM = 0,
1726 RIL_HARDWARE_CONFIG_SIM = 1,
1727} RIL_HardwareConfig_Type;
1728
1729typedef enum {
1730 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1731 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1732 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1733} RIL_HardwareConfig_State;
1734
1735typedef struct {
1736 int rilModel;
1737 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1738 int maxVoice;
1739 int maxData;
1740 int maxStandby;
1741} RIL_HardwareConfig_Modem;
1742
1743typedef struct {
Wink Saville8b4e4f72014-10-17 15:01:45 -07001744 char modemUuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001745} RIL_HardwareConfig_Sim;
1746
1747typedef struct {
1748 RIL_HardwareConfig_Type type;
Wink Saville8b4e4f72014-10-17 15:01:45 -07001749 char uuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001750 RIL_HardwareConfig_State state;
1751 union {
1752 RIL_HardwareConfig_Modem modem;
1753 RIL_HardwareConfig_Sim sim;
1754 } cfg;
1755} RIL_HardwareConfig;
1756
Amit Mahajan54563d32014-11-22 00:54:49 +00001757typedef enum {
1758 SS_CFU,
1759 SS_CF_BUSY,
1760 SS_CF_NO_REPLY,
1761 SS_CF_NOT_REACHABLE,
1762 SS_CF_ALL,
1763 SS_CF_ALL_CONDITIONAL,
1764 SS_CLIP,
1765 SS_CLIR,
1766 SS_COLP,
1767 SS_COLR,
1768 SS_WAIT,
1769 SS_BAOC,
1770 SS_BAOIC,
1771 SS_BAOIC_EXC_HOME,
1772 SS_BAIC,
1773 SS_BAIC_ROAMING,
1774 SS_ALL_BARRING,
1775 SS_OUTGOING_BARRING,
1776 SS_INCOMING_BARRING
1777} RIL_SsServiceType;
1778
1779typedef enum {
1780 SS_ACTIVATION,
1781 SS_DEACTIVATION,
1782 SS_INTERROGATION,
1783 SS_REGISTRATION,
1784 SS_ERASURE
1785} RIL_SsRequestType;
1786
1787typedef enum {
1788 SS_ALL_TELE_AND_BEARER_SERVICES,
1789 SS_ALL_TELESEVICES,
1790 SS_TELEPHONY,
1791 SS_ALL_DATA_TELESERVICES,
1792 SS_SMS_SERVICES,
1793 SS_ALL_TELESERVICES_EXCEPT_SMS
1794} RIL_SsTeleserviceType;
1795
1796#define SS_INFO_MAX 4
1797#define NUM_SERVICE_CLASSES 7
1798
1799typedef struct {
1800 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1801 For example if voice is forwarded to one number and data
1802 is forwarded to a different one then numValidIndexes will be
1803 2 indicating total number of valid values in cfInfo.
1804 Similarly if all the services are forwarded to the same
1805 number then the value of numValidIndexes will be 1. */
1806
1807 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1808 for SS request to query call
1809 forward status. see
1810 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1811} RIL_CfData;
1812
1813typedef struct {
1814 RIL_SsServiceType serviceType;
1815 RIL_SsRequestType requestType;
1816 RIL_SsTeleserviceType teleserviceType;
1817 int serviceClass;
1818 RIL_Errno result;
1819
1820 union {
1821 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1822 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1823 two ints, so first two values of ssInfo[] will be
1824 used for response if serviceType is SS_CLIR and
1825 requestType is SS_INTERROGATION */
1826
1827 RIL_CfData cfData;
1828 };
1829} RIL_StkCcUnsolSsResponse;
1830
Wink Saville7f856802009-06-09 10:23:37 -07001831/**
Wink Savillec29360a2014-07-13 05:17:28 -07001832 * Data connection power state
1833 */
1834typedef enum {
1835 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1836 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1837 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1838 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1839} RIL_DcPowerStates;
1840
1841/**
1842 * Data connection real time info
1843 */
1844typedef struct {
1845 uint64_t time; // Time in nanos as returned by ril_nano_time
1846 RIL_DcPowerStates powerState; // Current power state
1847} RIL_DcRtInfo;
1848
Amit Mahajanc796e222014-08-13 16:54:01 +00001849/**
1850 * Data profile to modem
1851 */
1852typedef struct {
1853 /* id of the data profile */
1854 int profileId;
1855 /* the APN to connect to */
1856 char* apn;
1857 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1858 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1859 */
1860 char* protocol;
1861 /** authentication protocol used for this PDP context
1862 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1863 */
1864 int authType;
1865 /* the username for APN, or NULL */
1866 char* user;
1867 /* the password for APN, or NULL */
1868 char* password;
1869 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1870 int type;
1871 /* the period in seconds to limit the maximum connections */
1872 int maxConnsTime;
1873 /* the maximum connections during maxConnsTime */
1874 int maxConns;
1875 /** the required wait time in seconds after a successful UE initiated
1876 * disconnect of a given PDN connection before the device can send
1877 * a new PDN connection request for that given PDN
1878 */
1879 int waitTime;
1880 /* true to enable the profile, 0 to disable, 1 to enable */
1881 int enabled;
1882} RIL_DataProfileInfo;
Wink Savillec29360a2014-07-13 05:17:28 -07001883
Jack Yude8c8552017-01-24 12:03:52 -08001884typedef struct {
1885 /* id of the data profile */
1886 int profileId;
1887 /* the APN to connect to */
1888 char* apn;
1889 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1890 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1891 */
1892 char* protocol;
1893 /** one of the PDP_type values in TS 27.007 section 10.1.1 used on roaming network.
1894 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1895 */
1896 char *roamingProtocol;
1897 /** authentication protocol used for this PDP context
1898 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1899 */
1900 int authType;
1901 /* the username for APN, or NULL */
1902 char* user;
1903 /* the password for APN, or NULL */
1904 char* password;
1905 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1906 int type;
1907 /* the period in seconds to limit the maximum connections */
1908 int maxConnsTime;
1909 /* the maximum connections during maxConnsTime */
1910 int maxConns;
1911 /** the required wait time in seconds after a successful UE initiated
1912 * disconnect of a given PDN connection before the device can send
1913 * a new PDN connection request for that given PDN
1914 */
1915 int waitTime;
1916 /* true to enable the profile, 0 to disable, 1 to enable */
1917 int enabled;
1918 /* supported APN types bitmask. See RIL_ApnTypes for the value of each bit. */
1919 int supportedTypesBitmask;
1920 /** the bearer bitmask. See RIL_RadioAccessFamily for the value of each bit. */
1921 int bearerBitmask;
1922 /** maximum transmission unit (MTU) size in bytes */
1923 int mtu;
1924 /** the MVNO type: possible values are "imsi", "gid", "spn" */
1925 char *mvnoType;
1926 /** MVNO match data. Can be anything defined by the carrier. For example,
1927 * SPN like: "A MOBILE", "BEN NL", etc...
1928 * IMSI like: "302720x94", "2060188", etc...
1929 * GID like: "4E", "33", etc...
1930 */
1931 char *mvnoMatchData;
1932} RIL_DataProfileInfo_v15;
1933
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001934/* Tx Power Levels */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001935#define RIL_NUM_TX_POWER_LEVELS 5
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001936
Nathan Haroldc8635212016-10-10 11:15:21 -07001937/**
1938 * Aggregate modem activity information
1939 */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001940typedef struct {
1941
Nathan Haroldc8635212016-10-10 11:15:21 -07001942 /* total time (in ms) when modem is in a low power or
1943 * sleep state
1944 */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001945 uint32_t sleep_mode_time_ms;
1946
Nathan Haroldc8635212016-10-10 11:15:21 -07001947 /* total time (in ms) when modem is awake but neither
1948 * the transmitter nor receiver are active/awake */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001949 uint32_t idle_mode_time_ms;
1950
Nathan Haroldc8635212016-10-10 11:15:21 -07001951 /* total time (in ms) during which the transmitter is active/awake,
1952 * subdivided by manufacturer-defined device-specific
1953 * contiguous increasing ranges of transmit power between
1954 * 0 and the transmitter's maximum transmit power.
1955 */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001956 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001957
Nathan Haroldc8635212016-10-10 11:15:21 -07001958 /* total time (in ms) for which receiver is active/awake and
1959 * the transmitter is inactive */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001960 uint32_t rx_mode_time_ms;
1961} RIL_ActivityStatsInfo;
1962
Jack Yude8c8552017-01-24 12:03:52 -08001963typedef enum {
1964 RIL_APN_TYPE_UNKNOWN = 0x0, // Unknown
1965 RIL_APN_TYPE_DEFAULT = 0x1, // APN type for default data traffic
1966 RIL_APN_TYPE_MMS = 0x2, // APN type for MMS traffic
1967 RIL_APN_TYPE_SUPL = 0x4, // APN type for SUPL assisted GPS
1968 RIL_APN_TYPE_DUN = 0x8, // APN type for DUN traffic
1969 RIL_APN_TYPE_HIPRI = 0x10, // APN type for HiPri traffic
1970 RIL_APN_TYPE_FOTA = 0x20, // APN type for FOTA
1971 RIL_APN_TYPE_IMS = 0x40, // APN type for IMS
1972 RIL_APN_TYPE_CBS = 0x80, // APN type for CBS
1973 RIL_APN_TYPE_IA = 0x100, // APN type for IA Initial Attach APN
1974 RIL_APN_TYPE_EMERGENCY = 0x200, // APN type for Emergency PDN. This is not an IA apn,
1975 // but is used for access to carrier services in an
1976 // emergency call situation.
1977 RIL_APN_TYPE_ALL = 0xFFFFFFFF // All APN types
1978} RIL_ApnTypes;
1979
1980typedef enum {
1981 RIL_DST_POWER_SAVE_MODE, // Device power save mode (provided by PowerManager)
1982 // True indicates the device is in power save mode.
1983 RIL_DST_CHARGING_STATE, // Device charging state (provided by BatteryManager)
1984 // True indicates the device is charging.
1985 RIL_DST_LOW_DATA_EXPECTED // Low data expected mode. True indicates low data traffic
1986 // is expected, for example, when the device is idle
1987 // (e.g. not doing tethering in the background). Note
1988 // this doesn't mean no data is expected.
1989} RIL_DeviceStateType;
1990
1991typedef enum {
1992 RIL_UR_SIGNAL_STRENGTH = 0x01, // When this bit is set, modem should always send the
1993 // signal strength update through
1994 // RIL_UNSOL_SIGNAL_STRENGTH, otherwise suppress it.
1995 RIL_UR_FULL_NETWORK_STATE = 0x02, // When this bit is set, modem should always send
1996 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
1997 // when any field in
1998 // RIL_REQUEST_VOICE_REGISTRATION_STATE or
1999 // RIL_REQUEST_DATA_REGISTRATION_STATE changes. When
2000 // this bit is not set, modem should suppress
2001 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
2002 // only when insignificant fields change
2003 // (e.g. cell info).
2004 // Modem should continue sending
2005 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
2006 // when significant fields are updated even when this
2007 // bit is not set. The following fields are
2008 // considered significant, registration state and
2009 // radio technology.
2010 RIL_UR_DATA_CALL_DORMANCY_CHANGED = 0x04 // When this bit is set, modem should send the data
2011 // call list changed unsolicited response
2012 // RIL_UNSOL_DATA_CALL_LIST_CHANGED whenever any
2013 // field in RIL_Data_Call_Response changes.
2014 // Otherwise modem should suppress the unsolicited
2015 // response when the only changed field is 'active'
2016 // (for data dormancy). For all other fields change,
2017 // modem should continue sending
2018 // RIL_UNSOL_DATA_CALL_LIST_CHANGED regardless this
2019 // bit is set or not.
2020} RIL_UnsolicitedResponseFilter;
2021
Wink Savillec29360a2014-07-13 05:17:28 -07002022/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002023 * RIL_REQUEST_GET_SIM_STATUS
2024 *
2025 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -07002026 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002027 * "data" is NULL
2028 *
Wink Savillefd729372011-02-22 16:19:39 -08002029 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002030 *
2031 * Valid errors:
2032 * Must never fail
2033 */
2034#define RIL_REQUEST_GET_SIM_STATUS 1
2035
2036/**
2037 * RIL_REQUEST_ENTER_SIM_PIN
2038 *
John Wang309ac292009-07-30 14:53:23 -07002039 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002040 *
2041 * "data" is const char **
2042 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08002043 * ((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 -08002044 *
jsh593c9102009-06-24 16:13:44 -07002045 * "response" is int *
2046 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002047 *
2048 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002049 *
2050 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002051 * RADIO_NOT_AVAILABLE (radio resetting)
2052 * GENERIC_FAILURE
2053 * PASSWORD_INCORRECT
2054 */
2055
2056#define RIL_REQUEST_ENTER_SIM_PIN 2
2057
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002058/**
2059 * RIL_REQUEST_ENTER_SIM_PUK
2060 *
Wink Saville7f856802009-06-09 10:23:37 -07002061 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002062 *
2063 * "data" is const char **
2064 * ((const char **)data)[0] is PUK value
2065 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08002066 * ((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 -08002067 *
jsh593c9102009-06-24 16:13:44 -07002068 * "response" is int *
2069 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002070 *
2071 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002072 *
2073 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002074 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002075 * PASSWORD_INCORRECT
2076 * (PUK is invalid)
2077 */
2078
2079#define RIL_REQUEST_ENTER_SIM_PUK 3
2080
2081/**
2082 * RIL_REQUEST_ENTER_SIM_PIN2
2083 *
2084 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
2085 * returned as a a failure from a previous operation.
2086 *
2087 * "data" is const char **
2088 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08002089 * ((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 -08002090 *
jsh593c9102009-06-24 16:13:44 -07002091 * "response" is int *
2092 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002093 *
2094 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002095 *
2096 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002097 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002098 * PASSWORD_INCORRECT
2099 */
2100
2101#define RIL_REQUEST_ENTER_SIM_PIN2 4
2102
2103/**
2104 * RIL_REQUEST_ENTER_SIM_PUK2
2105 *
Wink Saville7f856802009-06-09 10:23:37 -07002106 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002107 *
2108 * "data" is const char **
2109 * ((const char **)data)[0] is PUK2 value
2110 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08002111 * ((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 -08002112 *
jsh593c9102009-06-24 16:13:44 -07002113 * "response" is int *
2114 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002115 *
2116 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002117 *
2118 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002119 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002120 * PASSWORD_INCORRECT
2121 * (PUK2 is invalid)
2122 */
2123
2124#define RIL_REQUEST_ENTER_SIM_PUK2 5
2125
2126/**
2127 * RIL_REQUEST_CHANGE_SIM_PIN
2128 *
Wink Saville7f856802009-06-09 10:23:37 -07002129 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002130 *
2131 * "data" is const char **
2132 * ((const char **)data)[0] is old PIN value
2133 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08002134 * ((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 -08002135 *
jsh593c9102009-06-24 16:13:44 -07002136 * "response" is int *
2137 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002138 *
2139 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002140 *
2141 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002142 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002143 * PASSWORD_INCORRECT
2144 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07002145 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002146 */
2147
2148#define RIL_REQUEST_CHANGE_SIM_PIN 6
2149
2150
2151/**
2152 * RIL_REQUEST_CHANGE_SIM_PIN2
2153 *
Wink Saville7f856802009-06-09 10:23:37 -07002154 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002155 *
2156 * "data" is const char **
2157 * ((const char **)data)[0] is old PIN2 value
2158 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08002159 * ((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 -08002160 *
jsh593c9102009-06-24 16:13:44 -07002161 * "response" is int *
2162 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002163 *
2164 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002165 *
2166 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002167 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002168 * PASSWORD_INCORRECT
2169 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07002170 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002171 */
2172
2173#define RIL_REQUEST_CHANGE_SIM_PIN2 7
2174
2175/**
2176 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
2177 *
2178 * Requests that network personlization be deactivated
2179 *
2180 * "data" is const char **
2181 * ((const char **)(data))[0]] is network depersonlization code
2182 *
jsh593c9102009-06-24 16:13:44 -07002183 * "response" is int *
2184 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002185 *
2186 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002187 *
2188 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002189 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002190 * PASSWORD_INCORRECT
2191 * (code is invalid)
2192 */
2193
2194#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
2195
2196/**
Wink Saville7f856802009-06-09 10:23:37 -07002197 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002198 *
2199 * Requests current call list
2200 *
2201 * "data" is NULL
2202 *
2203 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07002204 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002205 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002206 *
2207 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002208 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002209 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002210 * (request will be made again in a few hundred msec)
2211 */
2212
2213#define RIL_REQUEST_GET_CURRENT_CALLS 9
2214
2215
Wink Saville7f856802009-06-09 10:23:37 -07002216/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002217 * RIL_REQUEST_DIAL
2218 *
2219 * Initiate voice call
2220 *
2221 * "data" is const RIL_Dial *
2222 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002223 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002224 * This method is never used for supplementary service codes
2225 *
2226 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002227 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002228 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00002229 * DIAL_MODIFIED_TO_USSD
2230 * DIAL_MODIFIED_TO_SS
2231 * DIAL_MODIFIED_TO_DIAL
Ajay Nambi10345892016-03-19 09:02:28 -07002232 * INVALID_ARGUMENTS
2233 * NO_MEMORY
2234 * INVALID_STATE
2235 * NO_RESOURCES
2236 * INTERNAL_ERR
2237 * FDN_CHECK_FAILURE
2238 * MODEM_ERR
2239 * NO_SUBSCRIPTION
2240 * NO_NETWORK_FOUND
2241 * INVALID_CALL_ID
2242 * DEVICE_IN_USE
2243 * MODE_NOT_SUPPORTED
2244 * ABORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002245 */
2246#define RIL_REQUEST_DIAL 10
2247
2248/**
2249 * RIL_REQUEST_GET_IMSI
2250 *
2251 * Get the SIM IMSI
2252 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08002253 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002254 *
Wink Savillec0114b32011-02-18 10:14:07 -08002255 * "data" is const char **
2256 * ((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 -08002257 * "response" is a const char * containing the IMSI
2258 *
2259 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002260 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002261 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002262 */
2263
2264#define RIL_REQUEST_GET_IMSI 11
2265
2266/**
2267 * RIL_REQUEST_HANGUP
2268 *
2269 * Hang up a specific line (like AT+CHLD=1x)
2270 *
John Wang06bae4b2010-11-18 16:37:09 -08002271 * After this HANGUP request returns, RIL should show the connection is NOT
2272 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2273 *
Wink Saville7f856802009-06-09 10:23:37 -07002274 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002275 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002276 *
2277 * "response" is NULL
2278 *
2279 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002280 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002281 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002282 * INVALID_ARGUMENTS
2283 * NO_MEMORY
2284 * INVALID_STATE
2285 * MODEM_ERR
2286 * INTERNAL_ERR
2287 * NO_MEMORY
2288 * INVALID_CALL_ID
2289 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002290 */
2291
2292#define RIL_REQUEST_HANGUP 12
2293
2294/**
2295 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
2296 *
2297 * Hang up waiting or held (like AT+CHLD=0)
2298 *
John Wang06bae4b2010-11-18 16:37:09 -08002299 * After this HANGUP request returns, RIL should show the connection is NOT
2300 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2301 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002302 * "data" is NULL
2303 * "response" is NULL
2304 *
2305 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002306 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002307 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002308 * INVALID_STATE
2309 * NO_MEMORY
2310 * MODEM_ERR
2311 * INTERNAL_ERR
2312 * NO_MEMORY
2313 * INVALID_CALL_ID
2314 * NO_RESOURCES
2315 * OPERATION_NOT_ALLOWED
2316 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002317 */
2318
2319#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
2320
2321/**
2322 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
2323 *
2324 * Hang up waiting or held (like AT+CHLD=1)
2325 *
John Wang06bae4b2010-11-18 16:37:09 -08002326 * After this HANGUP request returns, RIL should show the connection is NOT
2327 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2328 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002329 * "data" is NULL
2330 * "response" is NULL
2331 *
2332 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002333 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002334 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002335 * INVALID_STATE
2336 * NO_MEMORY
2337 * MODEM_ERR
2338 * INTERNAL_ERR
2339 * INVALID_CALL_ID
2340 * OPERATION_NOT_ALLOWED
2341 * INVALID_ARGUMENTS
2342 * NO_RESOURCES
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002343 */
2344
2345#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
2346
2347/**
2348 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
2349 *
2350 * Switch waiting or holding call and active call (like AT+CHLD=2)
2351 *
2352 * State transitions should be is follows:
2353 *
2354 * If call 1 is waiting and call 2 is active, then if this re
2355 *
2356 * BEFORE AFTER
2357 * Call 1 Call 2 Call 1 Call 2
2358 * ACTIVE HOLDING HOLDING ACTIVE
2359 * ACTIVE WAITING HOLDING ACTIVE
2360 * HOLDING WAITING HOLDING ACTIVE
2361 * ACTIVE IDLE HOLDING IDLE
2362 * IDLE IDLE IDLE IDLE
2363 *
2364 * "data" is NULL
2365 * "response" is NULL
2366 *
2367 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002368 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002369 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002370 * INVALID_STATE
2371 * NO_MEMORY
2372 * MODEM_ERR
2373 * INTERNAL_ERR
2374 * INVALID_STATE
2375 * INVALID_ARGUMENTS
2376 * INVALID_CALL_ID
2377 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002378 */
2379
2380#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
2381#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
2382
2383/**
2384 * RIL_REQUEST_CONFERENCE
2385 *
2386 * Conference holding and active (like AT+CHLD=3)
2387
2388 * "data" is NULL
2389 * "response" is NULL
2390 *
2391 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002392 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002393 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002394 * NO_MEMORY
2395 * MODEM_ERR
2396 * INTERNAL_ERR
2397 * INVALID_STATE
2398 * INVALID_CALL_ID
2399 * INVALID_ARGUMENTS
2400 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002401 */
2402#define RIL_REQUEST_CONFERENCE 16
2403
2404/**
2405 * RIL_REQUEST_UDUB
2406 *
Wink Saville7f856802009-06-09 10:23:37 -07002407 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002408 * waiting call answer)(RIL_BasicRequest r);
2409 *
2410 * "data" is NULL
2411 * "response" is NULL
2412 *
2413 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002414 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002415 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002416 * INVALID_STATE
2417 * NO_RESOURCES
2418 * NO_MEMORY
2419 * MODEM_ERR
2420 * INTERNAL_ERR
2421 * INVALID_CALL_ID
2422 * OPERATION_NOT_ALLOWED
2423 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002424 */
2425#define RIL_REQUEST_UDUB 17
2426
2427/**
2428 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2429 *
2430 * Requests the failure cause code for the most recently terminated call
2431 *
2432 * "data" is NULL
Jayachandran Ccc2a2022017-03-07 09:55:58 -08002433 * "response" is a const RIL_LastCallFailCauseInfo *
2434 * RIL_LastCallFailCauseInfo contains LastCallFailCause and vendor cause.
2435 * The vendor cause code must be used for debugging purpose only.
2436 * The implementation must return one of the values of LastCallFailCause
2437 * as mentioned below.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002438 *
Jayachandran Ccc2a2022017-03-07 09:55:58 -08002439 * GSM failure reasons codes for the cause codes defined in TS 24.008 Annex H
2440 * where possible.
2441 * CDMA failure reasons codes for the possible call failure scenarios
2442 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
2443 * Any of the following reason codes if the call is failed or dropped due to reason
2444 * mentioned with in the braces.
2445 *
2446 * CALL_FAIL_RADIO_OFF (Radio is OFF)
2447 * CALL_FAIL_OUT_OF_SERVICE (No cell coverage)
2448 * CALL_FAIL_NO_VALID_SIM (No valid SIM)
2449 * CALL_FAIL_RADIO_INTERNAL_ERROR (Modem hit unexpected error scenario)
2450 * CALL_FAIL_NETWORK_RESP_TIMEOUT (No response from network)
2451 * CALL_FAIL_NETWORK_REJECT (Explicit network reject)
2452 * CALL_FAIL_RADIO_ACCESS_FAILURE (RRC connection failure. Eg.RACH)
2453 * CALL_FAIL_RADIO_LINK_FAILURE (Radio Link Failure)
2454 * CALL_FAIL_RADIO_LINK_LOST (Radio link lost due to poor coverage)
2455 * CALL_FAIL_RADIO_UPLINK_FAILURE (Radio uplink failure)
2456 * CALL_FAIL_RADIO_SETUP_FAILURE (RRC connection setup failure)
2457 * CALL_FAIL_RADIO_RELEASE_NORMAL (RRC connection release, normal)
2458 * CALL_FAIL_RADIO_RELEASE_ABNORMAL (RRC connection release, abnormal)
2459 * CALL_FAIL_ACCESS_CLASS_BLOCKED (Access class barring)
2460 * CALL_FAIL_NETWORK_DETACH (Explicit network detach)
2461 *
2462 * OEM causes (CALL_FAIL_OEM_CAUSE_XX) must be used for debug purpose only
The Android Open Source Project34a51082009-03-05 14:34:37 -08002463 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002464 * If the implementation does not have access to the exact cause codes,
2465 * then it should return one of the values listed in RIL_LastCallFailCause,
2466 * as the UI layer needs to distinguish these cases for tone generation or
2467 * error notification.
2468 *
2469 * Valid errors:
2470 * SUCCESS
2471 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002472 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002473 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002474 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002475 */
2476#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
2477
2478/**
2479 * RIL_REQUEST_SIGNAL_STRENGTH
2480 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002481 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002482 *
2483 * Must succeed if radio is on.
2484 *
2485 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07002486 *
2487 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002488 *
2489 * Valid errors:
2490 * SUCCESS
2491 * RADIO_NOT_AVAILABLE
2492 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002493#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07002494
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002495/**
Wink Savillec0114b32011-02-18 10:14:07 -08002496 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002497 *
2498 * Request current registration state
2499 *
2500 * "data" is NULL
Sooraj Sasindranf4714b72016-11-30 18:36:03 -08002501 * "response" is a const RIL_VoiceRegistrationStateResponse *
Wink Saville1b5fd232009-04-22 14:50:00 -07002502 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002503 * Valid errors:
2504 * SUCCESS
2505 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002506 */
Wink Savillec0114b32011-02-18 10:14:07 -08002507#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002508
2509/**
Wink Savillec0114b32011-02-18 10:14:07 -08002510 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002511 *
Wink Savillec0114b32011-02-18 10:14:07 -08002512 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002513 *
2514 * "data" is NULL
Sooraj Sasindranf4714b72016-11-30 18:36:03 -08002515 * "response" is a const RIL_DataRegistrationStateResponse *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002516 *
2517 * Valid errors:
2518 * SUCCESS
2519 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002520 */
Wink Savillec0114b32011-02-18 10:14:07 -08002521#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002522
2523/**
2524 * RIL_REQUEST_OPERATOR
2525 *
2526 * Request current operator ONS or EONS
2527 *
2528 * "data" is NULL
2529 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07002530 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002531 * or NULL if unregistered
2532 *
Wink Saville7f856802009-06-09 10:23:37 -07002533 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002534 * or NULL if unregistered
2535 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2536 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07002537 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002538 * Valid errors:
2539 * SUCCESS
2540 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002541 */
2542#define RIL_REQUEST_OPERATOR 22
2543
2544/**
2545 * RIL_REQUEST_RADIO_POWER
2546 *
2547 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07002548 * If the radio is is turned off/on the radio modem subsystem
2549 * is expected return to an initialized state. For instance,
2550 * any voice and data calls will be terminated and all associated
2551 * lists emptied.
2552 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002553 * "data" is int *
2554 * ((int *)data)[0] is > 0 for "Radio On"
2555 * ((int *)data)[0] is == 0 for "Radio Off"
2556 *
2557 * "response" is NULL
2558 *
2559 * Turn radio on if "on" > 0
2560 * Turn radio off if "on" == 0
2561 *
2562 * Valid errors:
2563 * SUCCESS
2564 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002565 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002566 */
2567#define RIL_REQUEST_RADIO_POWER 23
2568
2569/**
2570 * RIL_REQUEST_DTMF
2571 *
2572 * Send a DTMF tone
2573 *
2574 * If the implementation is currently playing a tone requested via
2575 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2576 * should be played instead
2577 *
jsh602f80f2009-07-10 15:44:37 -07002578 * "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 -08002579 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002580 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002581 * FIXME should this block/mute microphone?
2582 * How does this interact with local DTMF feedback?
2583 *
2584 * Valid errors:
2585 * SUCCESS
2586 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002587 * INVALID_ARGUMENTS
2588 * NO_RESOURCES
2589 * NO_MEMORY
2590 * MODEM_ERR
2591 * INTERNAL_ERR
2592 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002593 *
2594 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2595 *
2596 */
2597#define RIL_REQUEST_DTMF 24
2598
2599/**
2600 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07002601 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002602 * Send an SMS message
2603 *
2604 * "data" is const char **
2605 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2606 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2607 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2608 * less the SMSC address
2609 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2610 *
2611 * "response" is a const RIL_SMS_Response *
2612 *
2613 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002614 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002615 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2616 *
2617 * Valid errors:
2618 * SUCCESS
2619 * RADIO_NOT_AVAILABLE
2620 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07002621 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08002622 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002623 * INVALID_STATE
2624 * INVALID_ARGUMENTS
2625 * NO_MEMORY
2626 * REQUEST_RATE_LIMITED
2627 * INVALID_SMS_FORMAT
2628 * SYSTEM_ERR
2629 * ENCODING_ERR
2630 * INVALID_SMSC_ADDRESS
2631 * MODEM_ERR
2632 * NETWORK_ERR
2633 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002634 *
2635 * FIXME how do we specify TP-Message-Reference if we need to resend?
2636 */
2637#define RIL_REQUEST_SEND_SMS 25
2638
2639
2640/**
2641 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07002642 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002643 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2644 * except that more messages are expected to be sent soon. If possible,
2645 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2646 *
2647 * "data" is const char **
2648 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2649 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2650 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2651 * less the SMSC address
2652 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2653 *
2654 * "response" is a const RIL_SMS_Response *
2655 *
2656 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002657 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002658 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2659 *
2660 * Valid errors:
2661 * SUCCESS
2662 * RADIO_NOT_AVAILABLE
2663 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08002664 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002665 * INVALID_STATE
2666 * INVALID_ARGUMENTS
2667 * NO_MEMORY
2668 * INVALID_SMS_FORMAT
2669 * SYSTEM_ERR
2670 * REQUEST_RATE_LIMITED
2671 * FDN_CHECK_FAILURE
2672 * MODEM_ERR
2673 * NETWORK_ERR
2674 * ENCODING_ERR
2675 * INVALID_SMSC_ADDRESS
2676 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002677 *
2678 */
2679#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2680
2681
2682/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002683 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002684 *
Wink Saville29487ef2011-04-15 09:15:31 -07002685 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2686 * return success it is added to the list of data calls and a
2687 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2688 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2689 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2690 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002691 *
Wink Saville43808972011-01-13 17:39:51 -08002692 * The RIL is expected to:
2693 * - Create one data call context.
2694 * - Create and configure a dedicated interface for the context
2695 * - The interface must be point to point.
2696 * - The interface is configured with one or more addresses and
2697 * is capable of sending and receiving packets. The prefix length
2698 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2699 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08002700 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08002701 * number of simultaneous data call contexts.
2702 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002703 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08002704 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2705 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07002706 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07002707 * ((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 -07002708 * override the one in the profile. NULL indicates no APN overrride.
2709 * ((const char **)data)[3] is the username for APN, or NULL
2710 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07002711 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2712 * 0 => PAP and CHAP is never performed.
2713 * 1 => PAP may be performed; CHAP is never performed.
2714 * 2 => CHAP may be performed; PAP is never performed.
2715 * 3 => PAP / CHAP may be performed - baseband dependent.
Jack Yude8c8552017-01-24 12:03:52 -08002716 * ((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 -08002717 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07002718 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Jack Yude8c8552017-01-24 12:03:52 -08002719 * ((const char **)data)[7] is the roaming connection type to request. Must be one of the
2720 * PDP_type values in TS 27.007 section 10.1.1.
2721 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
2722 * ((const char **)data)[8] is the bitmask of APN type in decimal string format. The
2723 * bitmask will encapsulate the following values:
2724 * ia,mms,agps,supl,hipri,fota,dun,ims,default.
2725 * ((const char **)data)[9] is the bearer bitmask in decimal string format. Each bit is a
2726 * RIL_RadioAccessFamily. "0" or NULL indicates all RATs.
2727 * ((const char **)data)[10] is the boolean in string format indicating the APN setting was
2728 * sent to the modem through RIL_REQUEST_SET_DATA_PROFILE earlier.
2729 * ((const char **)data)[11] is the mtu size in bytes of the mobile interface to which
2730 * the apn is connected.
2731 * ((const char **)data)[12] is the MVNO type:
2732 * possible values are "imsi", "gid", "spn".
2733 * ((const char **)data)[13] is MVNO match data in string. Can be anything defined by the carrier.
2734 * For example,
2735 * SPN like: "A MOBILE", "BEN NL", etc...
2736 * IMSI like: "302720x94", "2060188", etc...
2737 * GID like: "4E", "33", etc...
2738 * ((const char **)data)[14] is the boolean string indicating data roaming is allowed or not. "1"
2739 * indicates data roaming is enabled by the user, "0" indicates disabled.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002740 *
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -07002741 * "response" is a RIL_Data_Call_Response_v11
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002742 *
2743 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07002744 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002745 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08002746 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08002747 * the RIL_Data_Call_Response_v6.status containing the actual status.
2748 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08002749 *
2750 * Other errors could include:
2751 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2752 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002753 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002754 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002755 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002756#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002757
2758
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002759/**
2760 * RIL_REQUEST_SIM_IO
2761 *
2762 * Request SIM I/O operation.
2763 * This is similar to the TS 27.007 "restricted SIM" operation
2764 * where it assumes all of the EF selection will be done by the
2765 * callee.
2766 *
Wink Savillefd729372011-02-22 16:19:39 -08002767 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002768 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2769 * or may specify a PIN2 for operations that require a PIN2 (eg
2770 * updating FDN records)
2771 *
2772 * "response" is a const RIL_SIM_IO_Response *
2773 *
2774 * Arguments and responses that are unused for certain
2775 * values of "command" should be ignored or set to NULL
2776 *
2777 * Valid errors:
2778 * SUCCESS
2779 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002780 * SIM_PIN2
2781 * SIM_PUK2
2782 */
2783#define RIL_REQUEST_SIM_IO 28
2784
2785/**
2786 * RIL_REQUEST_SEND_USSD
2787 *
2788 * Send a USSD message
2789 *
2790 * If a USSD session already exists, the message should be sent in the
2791 * context of that session. Otherwise, a new session should be created.
2792 *
2793 * The network reply should be reported via RIL_UNSOL_ON_USSD
2794 *
2795 * Only one USSD session may exist at a time, and the session is assumed
2796 * to exist until:
2797 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2798 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2799 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2800 *
2801 * "data" is a const char * containing the USSD request in UTF-8 format
2802 * "response" is NULL
2803 *
2804 * Valid errors:
2805 * SUCCESS
2806 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07002807 * FDN_CHECK_FAILURE
Amit Mahajan54563d32014-11-22 00:54:49 +00002808 * USSD_MODIFIED_TO_DIAL
2809 * USSD_MODIFIED_TO_SS
2810 * USSD_MODIFIED_TO_USSD
twen.changdf7add02016-03-04 18:27:48 +08002811 * SIM_BUSY
2812 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002813 * INVALID_ARGUMENTS
2814 * NO_MEMORY
2815 * MODEM_ERR
2816 * INTERNAL_ERR
2817 * ABORTED
2818 * SYSTEM_ERR
2819 * INVALID_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002820 *
2821 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2822 */
2823
2824#define RIL_REQUEST_SEND_USSD 29
2825
2826/**
2827 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07002828 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002829 * Cancel the current USSD session if one exists
2830 *
2831 * "data" is null
2832 * "response" is NULL
2833 *
2834 * Valid errors:
2835 * SUCCESS
2836 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002837 * SIM_BUSY
2838 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002839 * MODEM_ERR
2840 * INTERNAL_ERR
2841 * NO_MEMORY
2842 * INVALID_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002843 */
2844
2845#define RIL_REQUEST_CANCEL_USSD 30
2846
Wink Saville7f856802009-06-09 10:23:37 -07002847/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002848 * RIL_REQUEST_GET_CLIR
2849 *
2850 * Gets current CLIR status
2851 * "data" is NULL
2852 * "response" is int *
2853 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2854 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2855 *
2856 * Valid errors:
2857 * SUCCESS
2858 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002859 * SS_MODIFIED_TO_DIAL
2860 * SS_MODIFIED_TO_USSD
2861 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002862 * NO_MEMORY
2863 * MODEM_ERR
2864 * INTERNAL_ERR
2865 * FDN_CHECK_FAILURE
2866 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002867 */
2868#define RIL_REQUEST_GET_CLIR 31
2869
2870/**
2871 * RIL_REQUEST_SET_CLIR
2872 *
2873 * "data" is int *
2874 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2875 *
2876 * "response" is NULL
2877 *
2878 * Valid errors:
2879 * SUCCESS
2880 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002881 * SS_MODIFIED_TO_DIAL
2882 * SS_MODIFIED_TO_USSD
2883 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002884 * INVALID_ARGUMENTS
2885 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002886 */
2887#define RIL_REQUEST_SET_CLIR 32
2888
2889/**
2890 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2891 *
2892 * "data" is const RIL_CallForwardInfo *
2893 *
2894 * "response" is const RIL_CallForwardInfo **
2895 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2896 * each distinct registered phone number.
2897 *
2898 * For example, if data is forwarded to +18005551212 and voice is forwarded
2899 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07002900 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002901 * If, however, both data and voice are forwarded to +18005551212, then
2902 * a single RIL_CallForwardInfo can be returned with the service class
2903 * set to "data + voice = 3")
2904 *
2905 * Valid errors:
2906 * SUCCESS
2907 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002908 * SS_MODIFIED_TO_DIAL
2909 * SS_MODIFIED_TO_USSD
2910 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002911 * INVALID_ARGUMENTS
2912 * NO_MEMORY
2913 * SYSTEM_ERR
2914 * MODEM_ERR
2915 * INTERNAL_ERR
2916 * NO_MEMORY
2917 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002918 */
2919#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2920
2921
2922/**
2923 * RIL_REQUEST_SET_CALL_FORWARD
2924 *
2925 * Configure call forward rule
2926 *
2927 * "data" is const RIL_CallForwardInfo *
2928 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002929 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002930 * Valid errors:
2931 * SUCCESS
2932 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002933 * SS_MODIFIED_TO_DIAL
2934 * SS_MODIFIED_TO_USSD
2935 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002936 * INVALID_ARGUMENTS
2937 * NO_MEMORY
2938 * SYSTEM_ERR
2939 * MODEM_ERR
2940 * INTERNAL_ERR
2941 * INVALID_STATE
2942 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002943 */
2944#define RIL_REQUEST_SET_CALL_FORWARD 34
2945
2946
2947/**
2948 * RIL_REQUEST_QUERY_CALL_WAITING
2949 *
2950 * Query current call waiting state
2951 *
2952 * "data" is const int *
2953 * ((const int *)data)[0] is the TS 27.007 service class to query.
2954 * "response" is a const int *
2955 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2956 *
2957 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2958 * must follow, with the TS 27.007 service class bit vector of services
2959 * for which call waiting is enabled.
2960 *
Wink Saville7f856802009-06-09 10:23:37 -07002961 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002962 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2963 * and voice and disabled for everything else
2964 *
2965 * Valid errors:
2966 * SUCCESS
2967 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002968 * SS_MODIFIED_TO_DIAL
2969 * SS_MODIFIED_TO_USSD
2970 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002971 * NO_MEMORY
2972 * MODEM_ERR
2973 * INTERNAL_ERR
2974 * NO_MEMORY
2975 * FDN_CHECK_FAILURE
2976 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002977 */
2978#define RIL_REQUEST_QUERY_CALL_WAITING 35
2979
2980
2981/**
2982 * RIL_REQUEST_SET_CALL_WAITING
2983 *
2984 * Configure current call waiting state
2985 *
2986 * "data" is const int *
2987 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2988 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2989 * services to modify
2990 * "response" is NULL
2991 *
2992 * Valid errors:
2993 * SUCCESS
2994 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002995 * SS_MODIFIED_TO_DIAL
2996 * SS_MODIFIED_TO_USSD
2997 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002998 * INVALID_ARGUMENTS
2999 * NO_MEMORY
3000 * MODEM_ERR
3001 * INTERNAL_ERR
3002 * INVALID_STATE
3003 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003004 */
3005#define RIL_REQUEST_SET_CALL_WAITING 36
3006
3007/**
3008 * RIL_REQUEST_SMS_ACKNOWLEDGE
3009 *
3010 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07003011 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003012 *
3013 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07003014 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003015 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07003016 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003017 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07003018 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
3019 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
3020 * capacity exceeded) and 0xFF (unspecified error) are
3021 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003022 *
3023 * "response" is NULL
3024 *
3025 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
3026 *
3027 * Valid errors:
3028 * SUCCESS
3029 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003030 */
3031#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
3032
3033/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003034 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003035 *
3036 * Get the device IMEI, including check digit
3037 *
johnwangf8bc1672009-05-14 19:19:47 -07003038 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003039 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
3040 *
3041 * "data" is NULL
3042 * "response" is a const char * containing the IMEI
3043 *
3044 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003045 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003046 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003047 */
3048
3049#define RIL_REQUEST_GET_IMEI 38
3050
3051/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003052 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003053 *
3054 * Get the device IMEISV, which should be two decimal digits
3055 *
johnwangf8bc1672009-05-14 19:19:47 -07003056 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003057 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
3058 *
3059 * "data" is NULL
3060 * "response" is a const char * containing the IMEISV
3061 *
3062 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003063 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003064 * RADIO_NOT_AVAILABLE (radio resetting)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003065 */
3066
3067#define RIL_REQUEST_GET_IMEISV 39
3068
3069
3070/**
3071 * RIL_REQUEST_ANSWER
3072 *
3073 * Answer incoming call
3074 *
3075 * Will not be called for WAITING calls.
3076 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
3077 * instead
3078 *
3079 * "data" is NULL
3080 * "response" is NULL
3081 *
3082 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003083 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003084 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003085 * INVALID_STATE
3086 * NO_MEMORY
3087 * SYSTEM_ERR
3088 * MODEM_ERR
3089 * INTERNAL_ERR
3090 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003091 */
3092
3093#define RIL_REQUEST_ANSWER 40
3094
3095/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003096 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003097 *
Wink Saville29487ef2011-04-15 09:15:31 -07003098 * Deactivate packet data connection and remove from the
3099 * data call list if SUCCESS is returned. Any other return
3100 * values should also try to remove the call from the list,
3101 * but that may not be possible. In any event a
3102 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
3103 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
3104 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003105 *
3106 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07003107 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06003108 * ((char**)data)[1] indicating Disconnect Reason
3109 * 0 => No specific reason specified
3110 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07003111 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003112 * "response" is NULL
3113 *
3114 * Valid errors:
3115 * SUCCESS
3116 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003117 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003118 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003119 */
Wink Savillef4c4d362009-04-02 01:37:03 -07003120#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003121
3122/**
3123 * RIL_REQUEST_QUERY_FACILITY_LOCK
3124 *
3125 * Query the status of a facility lock state
3126 *
3127 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07003128 * ((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 -08003129 * (eg "AO" for BAOC, "SC" for SIM lock)
3130 * ((const char **)data)[1] is the password, or "" if not required
3131 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
3132 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08003133 * ((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 -08003134 * This is only applicable in the case of Fixed Dialing Numbers
3135 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003136 *
3137 * "response" is an int *
3138 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07003139 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003140 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07003141 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003142 *
3143 * Valid errors:
3144 * SUCCESS
3145 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003146 * SS_MODIFIED_TO_DIAL
3147 * SS_MODIFIED_TO_USSD
3148 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003149 * INVALID_ARGUMENTS
3150 * NO_MEMORY
3151 * INTERNAL_ERR
3152 * SYSTEM_ERR
3153 * MODEM_ERR
3154 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003155 *
3156 */
3157#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
3158
3159/**
3160 * RIL_REQUEST_SET_FACILITY_LOCK
3161 *
3162 * Enable/disable one facility lock
3163 *
3164 * "data" is const char **
3165 *
3166 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3167 * (eg "AO" for BAOC)
3168 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
3169 * ((const char **)data)[2] = password
3170 * ((const char **)data)[3] = string representation of decimal TS 27.007
3171 * service class bit vector. Eg, the string
3172 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08003173 * ((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 -08003174 * This is only applicable in the case of Fixed Dialing Numbers
3175 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003176 *
jsh593c9102009-06-24 16:13:44 -07003177 * "response" is int *
3178 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003179 *
3180 * Valid errors:
3181 * SUCCESS
3182 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003183 * SS_MODIFIED_TO_DIAL
3184 * SS_MODIFIED_TO_USSD
3185 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003186 * INVALID_ARGUMENTS
3187 * INTERNAL_ERR
3188 * NO_MEMORY
3189 * MODEM_ERR
3190 * INVALID_STATE
3191 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003192 *
3193 */
3194#define RIL_REQUEST_SET_FACILITY_LOCK 43
3195
3196/**
3197 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
3198 *
3199 * Change call barring facility password
3200 *
3201 * "data" is const char **
3202 *
3203 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3204 * (eg "AO" for BAOC)
3205 * ((const char **)data)[1] = old password
3206 * ((const char **)data)[2] = new password
3207 *
Wink Saville7f856802009-06-09 10:23:37 -07003208 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003209 *
3210 * Valid errors:
3211 * SUCCESS
3212 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003213 * SS_MODIFIED_TO_DIAL
3214 * SS_MODIFIED_TO_USSD
3215 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003216 * INVALID_ARGUMENTS
3217 * NO_MEMORY
3218 * MODEM_ERR
3219 * INTERNAL_ERR
3220 * SYSTEM_ERR
3221 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003222 *
3223 */
3224#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
3225
3226/**
3227 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
3228 *
3229 * Query current network selectin mode
3230 *
3231 * "data" is NULL
3232 *
3233 * "response" is int *
3234 * ((const int *)response)[0] is
3235 * 0 for automatic selection
3236 * 1 for manual selection
3237 *
3238 * Valid errors:
3239 * SUCCESS
3240 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003241 *
3242 */
3243#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
3244
3245/**
3246 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
3247 *
3248 * Specify that the network should be selected automatically
3249 *
3250 * "data" is NULL
3251 * "response" is NULL
3252 *
Wink Saville7f856802009-06-09 10:23:37 -07003253 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003254 * and registered
3255 *
3256 * Valid errors:
3257 * SUCCESS
3258 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003259 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003260 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003261 *
John Wang75534472010-04-20 15:11:42 -07003262 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3263 * no retries needed, such as illegal SIM or ME.
3264 * Returns GENERIC_FAILURE for all other causes that might be
3265 * fixed by retries.
3266 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003267 */
3268#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
3269
3270/**
3271 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
3272 *
3273 * Manually select a specified network.
3274 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003275 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
3276 * "response" is NULL
3277 *
Wink Saville7f856802009-06-09 10:23:37 -07003278 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003279 * and registered
3280 *
3281 * Valid errors:
3282 * SUCCESS
3283 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003284 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003285 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003286 *
John Wang75534472010-04-20 15:11:42 -07003287 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3288 * no retries needed, such as illegal SIM or ME.
3289 * Returns GENERIC_FAILURE for all other causes that might be
3290 * fixed by retries.
3291 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003292 */
3293#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
3294
3295/**
3296 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
3297 *
3298 * Scans for available networks
3299 *
3300 * "data" is NULL
3301 * "response" is const char ** that should be an array of n*4 strings, where
3302 * n is the number of available networks
3303 * For each available network:
3304 *
Wink Saville7f856802009-06-09 10:23:37 -07003305 * ((const char **)response)[n+0] is long alpha ONS or EONS
3306 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003307 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
3308 * ((const char **)response)[n+3] is a string value of the status:
3309 * "unknown"
3310 * "available"
3311 * "current"
3312 * "forbidden"
3313 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003314 * Valid errors:
3315 * SUCCESS
3316 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003317 * OPERATION_NOT_ALLOWED
Jayachandran Cb0cba832017-03-13 19:17:18 -07003318 * ABORTED
3319 * DEVICE_IN_USE
3320 * INTERNAL_ERR
3321 * NO_MEMORY
3322 * MODEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003323 *
3324 */
3325#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
3326
3327/**
3328 * RIL_REQUEST_DTMF_START
3329 *
Wink Saville7f856802009-06-09 10:23:37 -07003330 * Start playing a DTMF tone. Continue playing DTMF tone until
3331 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003332 *
3333 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
3334 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07003335 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003336 * "data" is a char *
3337 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
3338 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003339 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003340 * Valid errors:
3341 * SUCCESS
3342 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003343 * INVALID_ARGUMENTS
3344 * NO_RESOURCES
3345 * NO_MEMORY
3346 * SYSTEM_ERR
3347 * MODEM_ERR
3348 * INTERNAL_ERR
3349 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003350 *
3351 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
3352 */
3353#define RIL_REQUEST_DTMF_START 49
3354
3355/**
3356 * RIL_REQUEST_DTMF_STOP
3357 *
3358 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07003359 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003360 * "data" is NULL
3361 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003362 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003363 * Valid errors:
3364 * SUCCESS
3365 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003366 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07003367 * NO_RESOURCES
3368 * NO_MEMORY
3369 * INVALID_ARGUMENTS
3370 * SYSTEM_ERR
3371 * MODEM_ERR
3372 * INTERNAL_ERR
3373 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003374 *
3375 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
3376 */
3377#define RIL_REQUEST_DTMF_STOP 50
3378
3379/**
3380 * RIL_REQUEST_BASEBAND_VERSION
3381 *
3382 * Return string value indicating baseband version, eg
3383 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07003384 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003385 * "data" is NULL
3386 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07003387 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003388 * Valid errors:
3389 * SUCCESS
3390 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003391 * EMPTY_RECORD
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003392 *
3393 */
3394#define RIL_REQUEST_BASEBAND_VERSION 51
3395
3396/**
3397 * RIL_REQUEST_SEPARATE_CONNECTION
3398 *
3399 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07003400 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003401 * as the only other member of the current (active) call
3402 *
3403 * Like AT+CHLD=2x
3404 *
3405 * See TS 22.084 1.3.8.2 (iii)
3406 * TS 22.030 6.5.5 "Entering "2X followed by send"
3407 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07003408 *
3409 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07003410 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
3411 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003412 * "response" is NULL
3413 *
3414 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003415 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003416 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003417 * INVALID_ARGUMENTS
3418 * INVALID_STATE
3419 * NO_RESOURCES
3420 * NO_MEMORY
3421 * SYSTEM_ERR
3422 * MODEM_ERR
3423 * INTERNAL_ERR
3424 * INVALID_CALL_ID
3425 * INVALID_STATE
3426 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003427 */
3428#define RIL_REQUEST_SEPARATE_CONNECTION 52
3429
3430
3431/**
3432 * RIL_REQUEST_SET_MUTE
3433 *
3434 * Turn on or off uplink (microphone) mute.
3435 *
3436 * Will only be sent while voice call is active.
3437 * Will always be reset to "disable mute" when a new voice call is initiated
3438 *
3439 * "data" is an int *
3440 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
3441 *
3442 * "response" is NULL
3443 *
3444 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003445 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003446 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi68900f52016-03-11 12:02:55 -08003447 * INVALID_ARGUMENTS
3448 * NO_MEMORY
3449 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003450 */
3451
3452#define RIL_REQUEST_SET_MUTE 53
3453
3454/**
3455 * RIL_REQUEST_GET_MUTE
3456 *
3457 * Queries the current state of the uplink mute setting
3458 *
3459 * "data" is NULL
3460 * "response" is an int *
3461 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
3462 *
3463 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003464 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003465 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00003466 * SS_MODIFIED_TO_DIAL
3467 * SS_MODIFIED_TO_USSD
3468 * SS_MODIFIED_TO_SS
Ajay Nambi68900f52016-03-11 12:02:55 -08003469 * NO_MEMORY
3470 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003471 */
3472
3473#define RIL_REQUEST_GET_MUTE 54
3474
3475/**
3476 * RIL_REQUEST_QUERY_CLIP
3477 *
3478 * Queries the status of the CLIP supplementary service
3479 *
3480 * (for MMI code "*#30#")
3481 *
3482 * "data" is NULL
3483 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07003484 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003485 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07003486 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003487 *
3488 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003489 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003490 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003491 * NO_MEMORY
3492 * SYSTEM_ERR
3493 * MODEM_ERR
3494 * INTERNAL_ERR
3495 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003496 */
3497
3498#define RIL_REQUEST_QUERY_CLIP 55
3499
3500/**
Wink Savillec0114b32011-02-18 10:14:07 -08003501 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
3502 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003503 *
3504 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07003505 * context or CDMA data connection active
3506 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003507 *
3508 * "data" is NULL
3509 *
3510 * "response" is a "int *"
3511 * ((int *)response)[0] is an integer cause code defined in TS 24.008
3512 * section 6.1.3.1.3 or close approximation
3513 *
3514 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07003515 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08003516 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003517 * cases for error notification
3518 * and potential retries.
3519 *
3520 * Valid errors:
3521 * SUCCESS
3522 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003523 *
3524 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08003525 *
3526 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003527 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003528
Wink Savillef4c4d362009-04-02 01:37:03 -07003529#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003530
3531/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003532 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003533 *
Wink Saville29487ef2011-04-15 09:15:31 -07003534 * Returns the data call list. An entry is added when a
3535 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
3536 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
3537 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003538 *
3539 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08003540 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003541 *
3542 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003543 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003544 * RADIO_NOT_AVAILABLE (radio resetting)
Wink Saville29487ef2011-04-15 09:15:31 -07003545 *
3546 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003547 */
3548
Wink Savillef4c4d362009-04-02 01:37:03 -07003549#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003550
3551/**
johnwangf8bc1672009-05-14 19:19:47 -07003552 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003553 *
3554 * Request a radio reset. The RIL implementation may postpone
3555 * the reset until after this request is responded to if the baseband
3556 * is presently busy.
3557 *
johnwangf8bc1672009-05-14 19:19:47 -07003558 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
3559 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003560 * "data" is NULL
3561 * "response" is NULL
3562 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003563 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003564 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003565 * RADIO_NOT_AVAILABLE (radio resetting)
johnwangf8bc1672009-05-14 19:19:47 -07003566 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003567 */
3568
3569#define RIL_REQUEST_RESET_RADIO 58
3570
3571/**
3572 * RIL_REQUEST_OEM_HOOK_RAW
3573 *
3574 * This request reserved for OEM-specific uses. It passes raw byte arrays
3575 * back and forth.
3576 *
Wink Saville7f856802009-06-09 10:23:37 -07003577 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003578 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
3579 *
3580 * "data" is a char * of bytes copied from the byte[] data argument in java
3581 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07003582 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003583 * (byte[])(((AsyncResult)response.obj).result)
3584 *
Wink Saville7f856802009-06-09 10:23:37 -07003585 * An error response here will result in
3586 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003587 * (((AsyncResult)response.obj).exception) being an instance of
3588 * com.android.internal.telephony.gsm.CommandException
3589 *
3590 * Valid errors:
3591 * All
3592 */
3593
3594#define RIL_REQUEST_OEM_HOOK_RAW 59
3595
3596/**
3597 * RIL_REQUEST_OEM_HOOK_STRINGS
3598 *
3599 * This request reserved for OEM-specific uses. It passes strings
3600 * back and forth.
3601 *
Wink Saville7f856802009-06-09 10:23:37 -07003602 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003603 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
3604 *
3605 * "data" is a const char **, representing an array of null-terminated UTF-8
3606 * strings copied from the "String[] strings" argument to
3607 * invokeOemRilRequestStrings()
3608 *
3609 * "response" is a const char **, representing an array of null-terminated UTF-8
3610 * stings that will be returned via the caller's response message here:
3611 *
3612 * (String[])(((AsyncResult)response.obj).result)
3613 *
Wink Saville7f856802009-06-09 10:23:37 -07003614 * An error response here will result in
3615 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003616 * (((AsyncResult)response.obj).exception) being an instance of
3617 * com.android.internal.telephony.gsm.CommandException
3618 *
3619 * Valid errors:
3620 * All
3621 */
3622
3623#define RIL_REQUEST_OEM_HOOK_STRINGS 60
3624
3625/**
Jack Yude8c8552017-01-24 12:03:52 -08003626 * RIL_REQUEST_SCREEN_STATE - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003627 *
3628 * Indicates the current state of the screen. When the screen is off, the
3629 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07003630 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
3631 * in an effort to conserve power. These notifications should resume when the
3632 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003633 *
Jack Yude8c8552017-01-24 12:03:52 -08003634 * Note this request is deprecated. Use RIL_REQUEST_SEND_DEVICE_STATE to report the device state
3635 * to the modem and use RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER to turn on/off unsolicited
3636 * response from the modem in different scenarios.
3637 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003638 * "data" is int *
3639 * ((int *)data)[0] is == 1 for "Screen On"
3640 * ((int *)data)[0] is == 0 for "Screen Off"
3641 *
3642 * "response" is NULL
3643 *
3644 * Valid errors:
3645 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003646 */
3647#define RIL_REQUEST_SCREEN_STATE 61
3648
3649
3650/**
3651 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
3652 *
3653 * Enables/disables supplementary service related notifications
3654 * from the network.
3655 *
3656 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3657 *
3658 * "data" is int *
3659 * ((int *)data)[0] is == 1 for notifications enabled
3660 * ((int *)data)[0] is == 0 for notifications disabled
3661 *
3662 * "response" is NULL
3663 *
3664 * Valid errors:
3665 * SUCCESS
3666 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003667 * SIM_BUSY
Ajay Nambi10345892016-03-19 09:02:28 -07003668 * INVALID_ARGUMENTS
3669 * NO_MEMORY
3670 * SYSTEM_ERR
3671 * MODEM_ERR
3672 * INTERNAL_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003673 *
3674 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3675 */
3676#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
3677
3678/**
3679 * RIL_REQUEST_WRITE_SMS_TO_SIM
3680 *
3681 * Stores a SMS message to SIM memory.
3682 *
3683 * "data" is RIL_SMS_WriteArgs *
3684 *
3685 * "response" is int *
3686 * ((const int *)response)[0] is the record index where the message is stored.
3687 *
3688 * Valid errors:
3689 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003690 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003691 * INVALID_ARGUMENTS
3692 * INVALID_SMS_FORMAT
3693 * INTERNAL_ERR
3694 * MODEM_ERR
3695 * ENCODING_ERR
3696 * NO_MEMORY
3697 * NO_RESOURCES
3698 * INVALID_MODEM_STATE
3699 * MODE_NOT_SUPPORTED
3700 * INVALID_SMSC_ADDRESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003701 *
3702 */
3703#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
3704
3705/**
3706 * RIL_REQUEST_DELETE_SMS_ON_SIM
3707 *
3708 * Deletes a SMS message from SIM memory.
3709 *
3710 * "data" is int *
3711 * ((int *)data)[0] is the record index of the message to delete.
3712 *
3713 * "response" is NULL
3714 *
3715 * Valid errors:
3716 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003717 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003718 * INVALID_ARGUMENTS
3719 * NO_MEMORY
3720 * REQUEST_RATE_LIMITED
3721 * SYSTEM_ERR
3722 * MODEM_ERR
3723 * NO_SUCH_ENTRY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003724 *
3725 */
3726#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
3727
3728/**
3729 * RIL_REQUEST_SET_BAND_MODE
3730 *
3731 * Assign a specified band for RF configuration.
3732 *
3733 * "data" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003734 * ((int *)data)[0] is a RIL_RadioBandMode
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003735 *
3736 * "response" is NULL
3737 *
3738 * Valid errors:
3739 * SUCCESS
3740 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003741 * OPERATION_NOT_ALLOWED
Nathan Harold92839f12016-02-12 10:02:28 -08003742 *
3743 * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003744 */
3745#define RIL_REQUEST_SET_BAND_MODE 65
3746
3747/**
3748 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3749 *
3750 * Query the list of band mode supported by RF.
3751 *
3752 * "data" is NULL
3753 *
3754 * "response" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003755 * "response" points to an array of int's, the int[0] is the size of array;
3756 * subsequent values are a list of RIL_RadioBandMode listing supported modes.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003757 *
3758 * Valid errors:
3759 * SUCCESS
3760 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003761 *
3762 * See also: RIL_REQUEST_SET_BAND_MODE
3763 */
3764#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
3765
3766/**
3767 * RIL_REQUEST_STK_GET_PROFILE
3768 *
3769 * Requests the profile of SIM tool kit.
3770 * The profile indicates the SAT/USAT features supported by ME.
3771 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
3772 *
3773 * "data" is NULL
3774 *
3775 * "response" is a const char * containing SAT/USAT profile
3776 * in hexadecimal format string starting with first byte of terminal profile
3777 *
3778 * Valid errors:
3779 * RIL_E_SUCCESS
3780 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3781 * RIL_E_GENERIC_FAILURE
3782 */
3783#define RIL_REQUEST_STK_GET_PROFILE 67
3784
3785/**
3786 * RIL_REQUEST_STK_SET_PROFILE
3787 *
3788 * Download the STK terminal profile as part of SIM initialization
3789 * procedure
3790 *
3791 * "data" is a const char * containing SAT/USAT profile
3792 * in hexadecimal format string starting with first byte of terminal profile
3793 *
3794 * "response" is NULL
3795 *
3796 * Valid errors:
3797 * RIL_E_SUCCESS
3798 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3799 * RIL_E_GENERIC_FAILURE
3800 */
3801#define RIL_REQUEST_STK_SET_PROFILE 68
3802
3803/**
3804 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
3805 *
3806 * Requests to send a SAT/USAT envelope command to SIM.
3807 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
3808 *
3809 * "data" is a const char * containing SAT/USAT command
3810 * in hexadecimal format string starting with command tag
3811 *
3812 * "response" is a const char * containing SAT/USAT response
3813 * in hexadecimal format string starting with first byte of response
3814 * (May be NULL)
3815 *
3816 * Valid errors:
3817 * RIL_E_SUCCESS
3818 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003819 * SIM_BUSY
3820 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003821 * RIL_E_GENERIC_FAILURE
3822 */
3823#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
3824
3825/**
3826 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
3827 *
3828 * Requests to send a terminal response to SIM for a received
3829 * proactive command
3830 *
3831 * "data" is a const char * containing SAT/USAT response
3832 * in hexadecimal format string starting with first byte of response data
3833 *
3834 * "response" is NULL
3835 *
3836 * Valid errors:
3837 * RIL_E_SUCCESS
3838 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003839 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003840 * RIL_E_GENERIC_FAILURE
3841 */
3842#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3843
3844/**
3845 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3846 *
3847 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3848 * been initialized by ME already. (We could see the call has been in the 'call
3849 * list') So, STK application needs to accept/reject the call according as user
3850 * operations.
3851 *
3852 * "data" is int *
3853 * ((int *)data)[0] is > 0 for "accept" the call setup
3854 * ((int *)data)[0] is == 0 for "reject" the call setup
3855 *
3856 * "response" is NULL
3857 *
3858 * Valid errors:
3859 * RIL_E_SUCCESS
3860 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003861 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003862 * RIL_E_GENERIC_FAILURE
3863 */
3864#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3865
3866/**
3867 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3868 *
3869 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07003870 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003871 * "data" is NULL
3872 * "response" is NULL
3873 *
3874 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003875 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003876 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003877 * INVALID_STATE
3878 * NO_RESOURCES
3879 * NO_MEMORY
3880 * INVALID_ARGUMENTS
3881 * SYSTEM_ERR
3882 * MODEM_ERR
3883 * INTERNAL_ERR
3884 * INVALID_CALL_ID
3885 * INVALID_STATE
3886 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003887 */
3888#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3889
3890/**
3891 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3892 *
3893 * Requests to set the preferred network type for searching and registering
3894 * (CS/PS domain, RAT, and operation mode)
3895 *
Wink Savillec0114b32011-02-18 10:14:07 -08003896 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003897 *
3898 * "response" is NULL
3899 *
3900 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07003901 * SUCCESS
3902 * RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003903 * OPERATION_NOT_ALLOWED
Wink Savillef4c4d362009-04-02 01:37:03 -07003904 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003905 */
3906#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3907
3908/**
3909 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
3910 *
3911 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
3912 * for searching and registering
3913 *
3914 * "data" is NULL
3915 *
3916 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003917 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003918 *
3919 * Valid errors:
3920 * SUCCESS
3921 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003922 *
3923 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3924 */
3925#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
3926
3927/**
3928 * RIL_REQUEST_NEIGHBORING_CELL_IDS
3929 *
3930 * Request neighboring cell id in GSM network
3931 *
3932 * "data" is NULL
3933 * "response" must be a " const RIL_NeighboringCell** "
3934 *
3935 * Valid errors:
3936 * SUCCESS
3937 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003938 */
3939#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3940
3941/**
3942 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07003943 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003944 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07003945 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3946 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003947 *
3948 * Note: The RIL implementation should default to "updates enabled"
3949 * when the screen is on and "updates disabled" when the screen is off.
3950 *
3951 * "data" is int *
3952 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3953 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3954 *
3955 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07003956 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003957 * Valid errors:
3958 * SUCCESS
3959 * RADIO_NOT_AVAILABLE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003960 *
3961 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3962 */
3963#define RIL_REQUEST_SET_LOCATION_UPDATES 76
3964
Wink Savillef4c4d362009-04-02 01:37:03 -07003965/**
Wink Savillec0114b32011-02-18 10:14:07 -08003966 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07003967 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003968 * Request to set the location where the CDMA subscription shall
3969 * be retrieved
3970 *
3971 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003972 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07003973 *
3974 * "response" is NULL
3975 *
3976 * Valid errors:
3977 * SUCCESS
3978 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07003979 * SIM_ABSENT
3980 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08003981 *
3982 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07003983 */
Wink Savillec0114b32011-02-18 10:14:07 -08003984#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07003985
3986/**
3987 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003988 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003989 * Request to set the roaming preferences in CDMA
3990 *
3991 * "data" is int *
3992 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3993 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3994 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003995 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003996 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003997 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003998 * Valid errors:
3999 * SUCCESS
4000 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07004001 */
4002#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
4003
4004/**
4005 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07004006 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004007 * Request the actual setting of the roaming preferences in CDMA in the modem
4008 *
4009 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004010 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004011 * "response" is int *
4012 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
4013 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
4014 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07004015 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004016 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004017 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004018 * Valid errors:
4019 * SUCCESS
4020 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07004021 */
4022#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
4023
4024/**
4025 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07004026 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004027 * Request to set the TTY mode
4028 *
4029 * "data" is int *
4030 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07004031 * ((int *)data)[0] is == 1 for TTY Full
4032 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
4033 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07004034 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004035 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004036 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004037 * Valid errors:
4038 * SUCCESS
4039 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004040 * INVALID_ARGUMENTS
4041 * MODEM_ERR
4042 * INTERNAL_ERR
4043 * NO_MEMOR
4044 * INVALID_ARGUMENTS
4045 * MODEM_ERR
4046 * INTERNAL_ERR
4047 * NO_MEMORYY
Wink Savillef4c4d362009-04-02 01:37:03 -07004048 */
4049#define RIL_REQUEST_SET_TTY_MODE 80
4050
4051/**
4052 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07004053 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004054 * Request the setting of TTY mode
4055 *
4056 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004057 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004058 * "response" is int *
4059 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07004060 * ((int *)response)[0] is == 1 for TTY Full
4061 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
4062 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07004063 *
4064 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004065 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004066 * Valid errors:
4067 * SUCCESS
4068 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004069 * MODEM_ERR
4070 * INTERNAL_ERR
4071 * NO_MEMORY
4072 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07004073 */
4074#define RIL_REQUEST_QUERY_TTY_MODE 81
4075
4076/**
4077 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
4078 *
4079 * Request to set the preferred voice privacy mode used in voice
4080 * scrambling
4081 *
4082 * "data" is int *
4083 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
4084 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07004085 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004086 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004087 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004088 * Valid errors:
4089 * SUCCESS
4090 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004091 * INVALID_ARGUMENTS
4092 * SYSTEM_ERR
4093 * MODEM_ERR
4094 * INTERNAL_ERR
4095 * NO_MEMORY
4096 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07004097 */
4098#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
4099
4100/**
4101 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07004102 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004103 * Request the setting of preferred voice privacy mode
4104 *
4105 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004106 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004107 * "response" is int *
4108 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
4109 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07004110 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004111 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004112 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004113 * Valid errors:
4114 * SUCCESS
4115 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004116 * MODEM_ERR
4117 * INTERNAL_ERR
4118 * NO_MEMORY
4119 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07004120 */
4121#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
4122
4123/**
4124 * RIL_REQUEST_CDMA_FLASH
4125 *
4126 * Send FLASH
4127 *
4128 * "data" is const char *
4129 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07004130 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004131 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004132 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004133 * Valid errors:
4134 * SUCCESS
4135 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004136 * INVALID_ARGUMENTS
4137 * NO_MEMORY
4138 * SYSTEM_ERR
4139 * MODEM_ERR
4140 * INTERNAL_ERR
4141 * INVALID_CALL_ID
4142 * INVALID_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004143 *
4144 */
4145#define RIL_REQUEST_CDMA_FLASH 84
4146
4147/**
4148 * RIL_REQUEST_CDMA_BURST_DTMF
4149 *
4150 * Send DTMF string
4151 *
jsh602f80f2009-07-10 15:44:37 -07004152 * "data" is const char **
4153 * ((const char **)data)[0] is a DTMF string
4154 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
4155 * default
4156 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
4157 * default
Wink Saville7f856802009-06-09 10:23:37 -07004158 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004159 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004160 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004161 * Valid errors:
4162 * SUCCESS
4163 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004164 * INVALID_ARGUMENTS
4165 * NO_MEMORY
4166 * SYSTEM_ERR
4167 * MODEM_ERR
4168 * INTERNAL_ERR
4169 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07004170 *
4171 */
4172#define RIL_REQUEST_CDMA_BURST_DTMF 85
4173
4174/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004175 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07004176 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004177 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
4178 * If the checksum is valid the 20 digit AKEY is written to NV,
4179 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07004180 *
4181 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004182 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
4183 * where the last 6 digits are a checksum of the
4184 * first 20, as specified in TR45.AHAG
4185 * "Common Cryptographic Algorithms, Revision D.1
4186 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07004187 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004188 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004189 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004190 * Valid errors:
4191 * SUCCESS
4192 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07004193 *
4194 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004195#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07004196
4197/**
4198 * RIL_REQUEST_CDMA_SEND_SMS
4199 *
4200 * Send a CDMA SMS message
4201 *
4202 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07004203 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004204 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07004205 *
johnwangbfb151b2009-09-11 15:20:38 -07004206 * Based on the return error, caller decides to resend if sending sms
4207 * fails. The CDMA error class is derived as follows,
4208 * SUCCESS is error class 0 (no error)
4209 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
4210 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
4211 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004212 * Valid errors:
4213 * SUCCESS
4214 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07004215 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08004216 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004217 * INVALID_STATE
4218 * INVALID_ARGUMENTS
4219 * NO_MEMORY
4220 * REQUEST_RATE_LIMITED
4221 * INVALID_SMS_FORMAT
4222 * SYSTEM_ERR
4223 * FDN_CHECK_FAILURE
4224 * MODEM_ERR
4225 * NETWORK_ERR
4226 * ENCODING_ERR
4227 * INVALID_SMSC_ADDRESS
4228 * MODE_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004229 *
4230 */
4231#define RIL_REQUEST_CDMA_SEND_SMS 87
4232
4233/**
4234 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4235 *
4236 * Acknowledge the success or failure in the receipt of SMS
4237 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4238 *
4239 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07004240 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004241 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004242 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004243 * Valid errors:
4244 * SUCCESS
4245 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004246 * INVALID_ARGUMENTS
4247 * NO_SMS_TO_ACK
4248 * INVALID_STATE
4249 * NO_MEMORY
4250 * REQUEST_RATE_LIMITED
4251 * SYSTEM_ERR
4252 * MODEM_ERR
4253 * INVALID_STATE
4254 * MODE_NOT_SUPPORTED
4255 * NETWORK_NOT_READY
4256 * INVALID_MODEM_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004257 *
4258 */
4259#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
4260
4261/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004262 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004263 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004264 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
4265 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004266 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004267 *
4268 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
4269 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
4270 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004271 * Valid errors:
4272 * SUCCESS
4273 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004274 * INVALID_STATE
4275 * NO_MEMORY
4276 * REQUEST_RATE_LIMITED
4277 * SYSTEM_ERR
4278 * NO_RESOURCES
4279 * MODEM_ERR
4280 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004281 *
4282 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004283#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07004284
4285/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004286 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004287 *
4288 * Set GSM/WCDMA Cell Broadcast SMS config
4289 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004290 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
4291 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
4292 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004293 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004294 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004295 * Valid errors:
4296 * SUCCESS
4297 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004298 * INVALID_STATE
4299 * INVALID_ARGUMENTS
4300 * NO_MEMORY
4301 * SYSTEM_ERR
4302 * REQUEST_RATE_LIMITED
4303 * MODEM_ERR
4304 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004305 *
4306 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004307#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07004308
4309/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004310 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004311 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004312* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07004313 *
4314 * "data" is const int *
4315 * (const int *)data[0] indicates to activate or turn off the
4316 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
4317 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004318 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004319 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004320 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004321 * Valid errors:
4322 * SUCCESS
4323 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004324 * INVALID_STATE
4325 * INVALID_ARGUMENTS
4326 * NO_MEMORY
4327 * SYSTEM_ERR
4328 * REQUEST_RATE_LIMITED
4329 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004330 *
4331 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004332#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07004333
4334/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004335 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004336 *
4337 * Request the setting of CDMA Broadcast SMS config
4338 *
4339 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004340 *
4341 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
4342 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
4343 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004344 * Valid errors:
4345 * SUCCESS
4346 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004347 * INVALID_STATE
4348 * NO_MEMORY
4349 * REQUEST_RATE_LIMITED
4350 * SYSTEM_ERR
4351 * NO_RESOURCES
4352 * MODEM_ERR
4353 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004354 *
4355 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004356#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07004357
4358/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004359 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004360 *
4361 * Set CDMA Broadcast SMS config
4362 *
Jack Yude8c8552017-01-24 12:03:52 -08004363 * "data" is a const RIL_CDMA_BroadcastSmsConfigInfo **
Wink Savillea592eeb2009-05-22 13:26:36 -07004364 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
4365 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004366 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004367 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004368 * Valid errors:
4369 * SUCCESS
4370 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004371 * INVALID_STATE
4372 * INVALID_ARGUMENTS
4373 * NO_MEMORY
4374 * SYSTEM_ERR
4375 * REQUEST_RATE_LIMITED
4376 * MODEM_ERR
4377 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004378 *
4379 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004380#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07004381
4382/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004383 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004384 *
4385 * Enable or disable the reception of CDMA Broadcast SMS
4386 *
4387 * "data" is const int *
4388 * (const int *)data[0] indicates to activate or turn off the
4389 * reception of CDMA Broadcast SMS, 0-1,
4390 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004391 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004392 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004393 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004394 * Valid errors:
4395 * SUCCESS
4396 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004397 * INVALID_STATE
4398 * INVALID_ARGUMENTS
4399 * NO_MEMORY
4400 * SYSTEM_ERR
4401 * REQUEST_RATE_LIMITED
4402 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004403 *
4404 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004405#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07004406
4407/**
4408 * RIL_REQUEST_CDMA_SUBSCRIPTION
4409 *
4410 * Request the device MDN / H_SID / H_NID.
4411 *
4412 * The request is only allowed when CDMA subscription is available. When CDMA
4413 * subscription is changed, application layer should re-issue the request to
4414 * update the subscription information.
4415 *
4416 * If a NULL value is returned for any of the device id, it means that error
4417 * accessing the device.
4418 *
4419 * "response" is const char **
4420 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07004421 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
4422 * CDMA subscription is available, in decimal format
4423 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
4424 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07004425 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07004426 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07004427 *
4428 * Valid errors:
4429 * SUCCESS
4430 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
4431 */
4432
Wink Savilleeafe79d2009-04-03 18:02:34 -07004433#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07004434
4435/**
4436 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
4437 *
4438 * Stores a CDMA SMS message to RUIM memory.
4439 *
4440 * "data" is RIL_CDMA_SMS_WriteArgs *
4441 *
4442 * "response" is int *
4443 * ((const int *)response)[0] is the record index where the message is stored.
4444 *
4445 * Valid errors:
4446 * SUCCESS
4447 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004448 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08004449 * INVALID_ARGUMENTS
4450 * INVALID_SMS_FORMAT
4451 * INTERNAL_ERR
4452 * MODEM_ERR
4453 * ENCODING_ERR
4454 * NO_MEMORY
4455 * NO_RESOURCES
4456 * INVALID_MODEM_STATE
4457 * MODE_NOT_SUPPORTED
4458 * INVALID_SMSC_ADDRESS
Wink Savillef4c4d362009-04-02 01:37:03 -07004459 *
4460 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004461#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07004462
4463/**
4464 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
4465 *
4466 * Deletes a CDMA SMS message from RUIM memory.
4467 *
4468 * "data" is int *
4469 * ((int *)data)[0] is the record index of the message to delete.
4470 *
4471 * "response" is NULL
4472 *
4473 * Valid errors:
4474 * SUCCESS
4475 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004476 * INVALID_ARGUMENTS
4477 * NO_MEMORY
4478 * REQUEST_RATE_LIMITED
4479 * SYSTEM_ERR
4480 * MODEM_ERR
4481 * NO_SUCH_ENTRY
Wink Savillef4c4d362009-04-02 01:37:03 -07004482 *
4483 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004484#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07004485
4486/**
4487 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07004488 *
4489 * Request the device ESN / MEID / IMEI / IMEISV.
4490 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004491 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07004492 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07004493 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004494 *
4495 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07004496 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004497 *
4498 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07004499 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004500 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004501 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07004502 * ((const char **)response)[0] is IMEI if GSM subscription is available
4503 * ((const char **)response)[1] is IMEISV if GSM subscription is available
4504 * ((const char **)response)[2] is ESN if CDMA subscription is available
4505 * ((const char **)response)[3] is MEID if CDMA subscription is available
4506 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004507 * Valid errors:
4508 * SUCCESS
4509 * RADIO_NOT_AVAILABLE
Wink Savillef4c4d362009-04-02 01:37:03 -07004510 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004511#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07004512
Wink Saville1b5fd232009-04-22 14:50:00 -07004513/**
4514 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
4515 *
4516 * Request the radio's system selection module to exit emergency
4517 * callback mode. RIL will not respond with SUCCESS until the modem has
4518 * completely exited from Emergency Callback Mode.
4519 *
4520 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004521 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004522 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004523 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004524 * Valid errors:
4525 * SUCCESS
4526 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004527 * OPERATION_NOT_ALLOWED
Wink Saville1b5fd232009-04-22 14:50:00 -07004528 *
4529 */
4530#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07004531
jsh000a9fe2009-05-11 14:52:35 -07004532/**
4533 * RIL_REQUEST_GET_SMSC_ADDRESS
4534 *
4535 * Queries the default Short Message Service Center address on the device.
4536 *
4537 * "data" is NULL
4538 *
4539 * "response" is const char * containing the SMSC address.
4540 *
4541 * Valid errors:
4542 * SUCCESS
4543 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004544 * NO_MEMORY
4545 * REQUEST_RATE_LIMITED
4546 * SYSTEM_ERR
4547 * INTERNAL_ERR
4548 * MODEM_ERR
4549 * INVALID_ARGUMENTS
4550 * INVALID_MODEM_STATE
4551 * NOT_PROVISIONED
jsh000a9fe2009-05-11 14:52:35 -07004552 *
4553 */
4554#define RIL_REQUEST_GET_SMSC_ADDRESS 100
4555
4556/**
4557 * RIL_REQUEST_SET_SMSC_ADDRESS
4558 *
4559 * Sets the default Short Message Service Center address on the device.
4560 *
4561 * "data" is const char * containing the SMSC address.
4562 *
4563 * "response" is NULL
4564 *
4565 * Valid errors:
4566 * SUCCESS
4567 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004568 * INVALID_ARGUMENTS
4569 * INVALID_SMS_FORMAT
4570 * NO_MEMORY
4571 * SYSTEM_ERR
4572 * REQUEST_RATE_LIMITED
4573 * MODEM_ERR
4574 * NO_RESOURCES
jsh000a9fe2009-05-11 14:52:35 -07004575 *
4576 */
4577#define RIL_REQUEST_SET_SMSC_ADDRESS 101
4578
jshb60444e2009-05-29 11:09:17 -07004579/**
4580 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
4581 *
4582 * Indicates whether there is storage available for new SMS messages.
4583 *
4584 * "data" is int *
4585 * ((int *)data)[0] is 1 if memory is available for storing new messages
4586 * is 0 if memory capacity is exceeded
4587 *
4588 * "response" is NULL
4589 *
4590 * Valid errors:
4591 * SUCCESS
4592 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004593 * INVALID_ARGUMENTS
4594 * NO_MEMORY
4595 * INVALID_STATE
4596 * SYSTEM_ERR
4597 * REQUEST_RATE_LIMITED
4598 * MODEM_ERR
jshb60444e2009-05-29 11:09:17 -07004599 *
4600 */
4601#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
4602
Wink Saville2641d5b2009-06-08 17:40:42 -07004603/**
4604 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
4605 *
4606 * Indicates that the StkSerivce is running and is
4607 * ready to receive RIL_UNSOL_STK_XXXXX commands.
4608 *
4609 * "data" is NULL
4610 * "response" is NULL
4611 *
4612 * Valid errors:
4613 * SUCCESS
4614 * RADIO_NOT_AVAILABLE
Wink Saville2641d5b2009-06-08 17:40:42 -07004615 *
4616 */
4617#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
4618
Wink Savillec0114b32011-02-18 10:14:07 -08004619/**
4620 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
4621 *
4622 * Request to query the location where the CDMA subscription shall
4623 * be retrieved
4624 *
4625 * "data" is NULL
4626 *
4627 * "response" is int *
4628 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4629 *
4630 * Valid errors:
4631 * SUCCESS
4632 * RADIO_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08004633 * SUBSCRIPTION_NOT_AVAILABLE
4634 *
4635 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
4636 */
4637#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
4638
Jake Hambyfa8d5842011-08-19 16:22:18 -07004639/**
4640 * RIL_REQUEST_ISIM_AUTHENTICATION
4641 *
4642 * Request the ISIM application on the UICC to perform AKA
4643 * challenge/response algorithm for IMS authentication
4644 *
4645 * "data" is a const char * containing the challenge string in Base64 format
4646 * "response" is a const char * containing the response in Base64 format
4647 *
4648 * Valid errors:
4649 * SUCCESS
4650 * RADIO_NOT_AVAILABLE
Jake Hambyfa8d5842011-08-19 16:22:18 -07004651 */
4652#define RIL_REQUEST_ISIM_AUTHENTICATION 105
4653
Jake Hamby300105d2011-09-26 01:01:44 -07004654/**
4655 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
4656 *
4657 * Acknowledge successful or failed receipt of SMS previously indicated
4658 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
4659 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
4660 *
4661 * "data" is const char **
4662 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
4663 * is "0" on failed receipt (send RP-ERROR)
4664 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
4665 *
4666 * "response" is NULL
4667 *
4668 * Valid errors:
4669 * SUCCESS
4670 * RADIO_NOT_AVAILABLE
Jake Hamby300105d2011-09-26 01:01:44 -07004671 */
4672#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
4673
4674/**
4675 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
4676 *
4677 * Requests to send a SAT/USAT envelope command to SIM.
4678 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
4679 *
4680 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
4681 * the SW1 and SW2 status bytes from the UICC response are returned along with
4682 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
4683 *
4684 * The RIL implementation shall perform the normal processing of a '91XX'
4685 * response in SW1/SW2 to retrieve the pending proactive command and send it
4686 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
4687 *
4688 * "data" is a const char * containing the SAT/USAT command
4689 * in hexadecimal format starting with command tag
4690 *
4691 * "response" is a const RIL_SIM_IO_Response *
4692 *
4693 * Valid errors:
4694 * RIL_E_SUCCESS
4695 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08004696 * SIM_BUSY
4697 * OPERATION_NOT_ALLOWED
Jake Hamby300105d2011-09-26 01:01:44 -07004698 * RIL_E_GENERIC_FAILURE
4699 */
4700#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
4701
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004702/**
4703 * RIL_REQUEST_VOICE_RADIO_TECH
4704 *
4705 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
Sooraj Sasindranb80acba2015-10-08 16:03:16 -07004706 * when radio state is not RADIO_STATE_UNAVAILABLE
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004707 *
4708 * "data" is NULL
4709 * "response" is int *
4710 * ((int *) response)[0] is of type const RIL_RadioTechnology
4711 *
4712 * Valid errors:
4713 * SUCCESS
4714 * RADIO_NOT_AVAILABLE
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004715 */
4716#define RIL_REQUEST_VOICE_RADIO_TECH 108
4717
Wink Saville8a9e0212013-04-09 12:11:38 -07004718/**
4719 * RIL_REQUEST_GET_CELL_INFO_LIST
4720 *
4721 * Request all of the current cell information known to the radio. The radio
4722 * must a list of all current cells, including the neighboring cells. If for a particular
4723 * cell information isn't known then the appropriate unknown value will be returned.
4724 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
4725 *
4726 * "data" is NULL
4727 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08004728 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07004729 */
4730#define RIL_REQUEST_GET_CELL_INFO_LIST 109
4731
4732/**
4733 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
4734 *
4735 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
Wink Savillec57b3eb2013-04-17 12:51:41 -07004736 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
Wink Saville8a9e0212013-04-09 12:11:38 -07004737 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
4738 * a RIL_UNSOL_CELL_INFO_LIST.
4739 *
4740 * "data" is int *
4741 * ((int *)data)[0] is minimum time in milliseconds
4742 *
4743 * "response" is NULL
4744 *
4745 * Valid errors:
4746 * SUCCESS
4747 * RADIO_NOT_AVAILABLE
Wink Saville8a9e0212013-04-09 12:11:38 -07004748 */
4749#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
Jake Hamby300105d2011-09-26 01:01:44 -07004750
Sungmin Choi75697532013-04-26 15:04:45 -07004751/**
4752 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
4753 *
4754 * Set an apn to initial attach network
Ankit Nbc37e512016-12-07 21:05:43 +05304755 *
4756 * "data" is a const char **
4757 * ((const char **)data)[0] is the APN to connect if radio technology is LTE
4758 * ((const char **)data)[1] is the connection type to request must be one of the
4759 * PDP_type values in TS 27.007 section 10.1.1.
4760 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
4761 * ((const char **)data)[2] is the PAP / CHAP auth type. Values:
4762 * 0 => PAP and CHAP is never performed.
4763 * 1 => PAP may be performed; CHAP is never performed.
4764 * 2 => CHAP may be performed; PAP is never performed.
4765 * 3 => PAP / CHAP may be performed - baseband dependent.
4766 * ((const char **)data)[3] is the username for APN, or NULL
4767 * ((const char **)data)[4] is the password for APN, or NULL
4768 *
Sungmin Choi75697532013-04-26 15:04:45 -07004769 * "response" is NULL
4770 *
4771 * Valid errors:
4772 * SUCCESS
4773 * RADIO_NOT_AVAILABLE (radio resetting)
Sungmin Choi75697532013-04-26 15:04:45 -07004774 * SUBSCRIPTION_NOT_AVAILABLE
4775 */
4776#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
4777
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004778/**
4779 * RIL_REQUEST_IMS_REGISTRATION_STATE
4780 *
Nathan Harold0eb43c22016-12-19 12:04:32 -08004781 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
4782 * instead, provide IMS registration status via an IMS Service.
4783 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004784 * Request current IMS registration state
4785 *
4786 * "data" is NULL
4787 *
4788 * "response" is int *
4789 * ((int *)response)[0] is registration state:
4790 * 0 - Not registered
4791 * 1 - Registered
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004792 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004793 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004794 * must follow with IMS SMS format:
4795 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004796 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
4797 *
4798 * Valid errors:
4799 * SUCCESS
4800 * RADIO_NOT_AVAILABLE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004801 */
4802#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
4803
4804/**
4805 * RIL_REQUEST_IMS_SEND_SMS
4806 *
4807 * Send a SMS message over IMS
4808 *
4809 * "data" is const RIL_IMS_SMS_Message *
4810 *
4811 * "response" is a const RIL_SMS_Response *
4812 *
4813 * Based on the return error, caller decides to resend if sending sms
4814 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
4815 * In case of retry, data is encoded based on Voice Technology available.
4816 *
4817 * Valid errors:
4818 * SUCCESS
4819 * RADIO_NOT_AVAILABLE
4820 * SMS_SEND_FAIL_RETRY
4821 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08004822 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004823 * INVALID_ARGUMENTS
4824 * INVALID_STATE
4825 * NO_MEMORY
4826 * INVALID_SMS_FORMAT
4827 * SYSTEM_ERR
4828 * REQUEST_RATE_LIMITED
4829 * MODEM_ERR
4830 * NETWORK_ERR
4831 * ENCODING_ERR
4832 * INVALID_SMSC_ADDRESS
4833 * MODE_NOT_SUPPORTED
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004834 *
4835 */
4836#define RIL_REQUEST_IMS_SEND_SMS 113
4837
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004838/**
4839 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
4840 *
4841 * Request APDU exchange on the basic channel. This command reflects TS 27.007
4842 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
4843 * of GSM/CDMA, and filter commands appropriately. It should filter
4844 * channel management and SELECT by DF name commands.
4845 *
4846 * "data" is a const RIL_SIM_APDU *
4847 * "sessionid" field should be ignored.
4848 *
4849 * "response" is a const RIL_SIM_IO_Response *
4850 *
4851 * Valid errors:
4852 * SUCCESS
4853 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004854 */
4855#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
4856
4857/**
4858 * RIL_REQUEST_SIM_OPEN_CHANNEL
4859 *
4860 * Open a new logical channel and select the given application. This command
4861 * reflects TS 27.007 "open logical channel" operation (+CCHO).
4862 *
4863 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
4864 *
4865 * "response" is int *
4866 * ((int *)data)[0] contains the session id of the logical channel.
Shishir Agrawal760123f2014-10-14 09:14:57 -07004867 * ((int *)data)[1] onwards may optionally contain the select response for the
4868 * open channel command with one byte per integer.
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004869 *
4870 * Valid errors:
4871 * SUCCESS
4872 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004873 * MISSING_RESOURCE
4874 * NO_SUCH_ELEMENT
4875 */
4876#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
4877
4878/**
4879 * RIL_REQUEST_SIM_CLOSE_CHANNEL
4880 *
4881 * Close a previously opened logical channel. This command reflects TS 27.007
4882 * "close logical channel" operation (+CCHC).
4883 *
4884 * "data" is int *
4885 * ((int *)data)[0] is the session id of logical the channel to close.
4886 *
4887 * "response" is NULL
4888 *
4889 * Valid errors:
4890 * SUCCESS
4891 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004892 */
4893#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
4894
4895/**
4896 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
4897 *
4898 * Exchange APDUs with a UICC over a previously opened logical channel. This
4899 * command reflects TS 27.007 "generic logical channel access" operation
4900 * (+CGLA). The modem should filter channel management and SELECT by DF name
4901 * commands.
4902 *
4903 * "data" is a const RIL_SIM_APDU*
4904 *
4905 * "response" is a const RIL_SIM_IO_Response *
4906 *
4907 * Valid errors:
4908 * SUCCESS
4909 * RADIO_NOT_AVAILABLE
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004910 */
4911#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
4912
Jake Hamby8a4a2332014-01-15 13:12:05 -08004913/**
4914 * RIL_REQUEST_NV_READ_ITEM
4915 *
4916 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4917 * This is used for device configuration by some CDMA operators.
4918 *
4919 * "data" is a const RIL_NV_ReadItem *
4920 *
4921 * "response" is const char * containing the contents of the NV item
4922 *
4923 * Valid errors:
4924 * SUCCESS
4925 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004926 */
4927#define RIL_REQUEST_NV_READ_ITEM 118
4928
4929/**
4930 * RIL_REQUEST_NV_WRITE_ITEM
4931 *
4932 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4933 * This is used for device configuration by some CDMA operators.
4934 *
4935 * "data" is a const RIL_NV_WriteItem *
4936 *
4937 * "response" is NULL
4938 *
4939 * Valid errors:
4940 * SUCCESS
4941 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004942 */
4943#define RIL_REQUEST_NV_WRITE_ITEM 119
4944
4945/**
4946 * RIL_REQUEST_NV_WRITE_CDMA_PRL
4947 *
4948 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
4949 * This is used for device configuration by some CDMA operators.
4950 *
4951 * "data" is a const char * containing the PRL as a byte array
4952 *
4953 * "response" is NULL
4954 *
4955 * Valid errors:
4956 * SUCCESS
4957 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004958 */
4959#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
4960
4961/**
4962 * RIL_REQUEST_NV_RESET_CONFIG
4963 *
4964 * Reset the radio NV configuration to the factory state.
4965 * This is used for device configuration by some CDMA operators.
4966 *
4967 * "data" is int *
Jake Hambyd27c9d52014-02-06 14:52:05 -08004968 * ((int *)data)[0] is 1 to reload all NV items
4969 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
4970 * ((int *)data)[0] is 3 for factory reset (RTN)
Jake Hamby8a4a2332014-01-15 13:12:05 -08004971 *
4972 * "response" is NULL
4973 *
4974 * Valid errors:
4975 * SUCCESS
4976 * RADIO_NOT_AVAILABLE
Jake Hamby8a4a2332014-01-15 13:12:05 -08004977 */
4978#define RIL_REQUEST_NV_RESET_CONFIG 121
4979
Etan Cohend3652192014-06-20 08:28:44 -07004980 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
4981 * FIXME This API needs to have more documentation.
4982 *
4983 * Selection/de-selection of a subscription from a SIM card
4984 * "data" is const RIL_SelectUiccSub*
4985
4986 *
4987 * "response" is NULL
4988 *
4989 * Valid errors:
4990 * SUCCESS
4991 * RADIO_NOT_AVAILABLE (radio resetting)
Etan Cohend3652192014-06-20 08:28:44 -07004992 * SUBSCRIPTION_NOT_SUPPORTED
4993 *
4994 */
4995#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
4996
4997/**
4998 * RIL_REQUEST_ALLOW_DATA
4999 *
5000 * Tells the modem whether data calls are allowed or not
5001 *
5002 * "data" is int *
5003 * FIXME slotId and aid will be added.
5004 * ((int *)data)[0] is == 0 to allow data calls
5005 * ((int *)data)[0] is == 1 to disallow data calls
5006 *
5007 * "response" is NULL
5008 *
5009 * Valid errors:
5010 *
5011 * SUCCESS
5012 * RADIO_NOT_AVAILABLE (radio resetting)
Etan Cohend3652192014-06-20 08:28:44 -07005013 *
5014 */
5015#define RIL_REQUEST_ALLOW_DATA 123
5016
5017/**
5018 * RIL_REQUEST_GET_HARDWARE_CONFIG
5019 *
5020 * Request all of the current hardware (modem and sim) associated
5021 * with the RIL.
5022 *
5023 * "data" is NULL
5024 *
5025 * "response" is an array of RIL_HardwareConfig.
5026 */
5027#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
5028
5029/**
Amit Mahajan2b772032014-06-26 14:20:11 -07005030 * RIL_REQUEST_SIM_AUTHENTICATION
Etan Cohend3652192014-06-20 08:28:44 -07005031 *
5032 * Returns the response of SIM Authentication through RIL to a
5033 * challenge request.
5034 *
5035 * "data" Base64 encoded string containing challenge:
5036 * int authContext; P2 value of authentication command, see P2 parameter in
5037 * 3GPP TS 31.102 7.1.2
5038 * char *authData; the challenge string in Base64 format, see 3GPP
5039 * TS 31.102 7.1.2
5040 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
5041 * NULL if no value
5042 *
5043 * "response" Base64 encoded strings containing response:
5044 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
5045 * int sw2;
5046 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
5047 */
Amit Mahajan2b772032014-06-26 14:20:11 -07005048#define RIL_REQUEST_SIM_AUTHENTICATION 125
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08005049
Wink Savillec29360a2014-07-13 05:17:28 -07005050/**
5051 * RIL_REQUEST_GET_DC_RT_INFO
5052 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005053 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005054 * Requests the Data Connection Real Time Info
5055 *
5056 * "data" is NULL
5057 *
5058 * "response" is the most recent RIL_DcRtInfo
5059 *
5060 * Valid errors:
5061 * SUCCESS
5062 * RADIO_NOT_AVAILABLE
Wink Savillec29360a2014-07-13 05:17:28 -07005063 *
5064 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
5065 */
5066#define RIL_REQUEST_GET_DC_RT_INFO 126
5067
5068/**
5069 * RIL_REQUEST_SET_DC_RT_INFO_RATE
5070 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005071 * The request is DEPRECATED
Wink Savillec29360a2014-07-13 05:17:28 -07005072 * This is the minimum number of milliseconds between successive
5073 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
5074 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
5075 * 0 means send as fast as possible.
5076 *
5077 * "data" The number of milliseconds as an int
5078 *
5079 * "response" is null
5080 *
5081 * Valid errors:
5082 * SUCCESS must not fail
5083 */
5084#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
5085
Amit Mahajanc796e222014-08-13 16:54:01 +00005086/**
5087 * RIL_REQUEST_SET_DATA_PROFILE
5088 *
5089 * Set data profile in modem
Hui Wang8d679622014-10-16 14:59:27 -05005090 * Modem should erase existed profiles from framework, and apply new profiles
Jack Yude8c8552017-01-24 12:03:52 -08005091 * "data" is a const RIL_DataProfileInfo **
Amit Mahajanc796e222014-08-13 16:54:01 +00005092 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
5093 * "response" is NULL
5094 *
5095 * Valid errors:
5096 * SUCCESS
5097 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajanc796e222014-08-13 16:54:01 +00005098 * SUBSCRIPTION_NOT_AVAILABLE
5099 */
5100#define RIL_REQUEST_SET_DATA_PROFILE 128
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005101
5102/**
5103 * RIL_REQUEST_SHUTDOWN
5104 *
5105 * Device is shutting down. All further commands are ignored
5106 * and RADIO_NOT_AVAILABLE must be returned.
5107 *
5108 * "data" is null
5109 * "response" is NULL
5110 *
5111 * Valid errors:
5112 * SUCCESS
5113 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005114 * OPERATION_NOT_ALLOWED
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005115 */
5116#define RIL_REQUEST_SHUTDOWN 129
5117
Wink Saville8b4e4f72014-10-17 15:01:45 -07005118/**
5119 * RIL_REQUEST_GET_RADIO_CAPABILITY
5120 *
5121 * Used to get phone radio capablility.
5122 *
Abhishek Adappa772c0d22015-02-09 11:11:12 -08005123 * "data" is the RIL_RadioCapability structure
Wink Saville8b4e4f72014-10-17 15:01:45 -07005124 *
5125 * Valid errors:
5126 * SUCCESS
5127 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005128 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005129 */
5130#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
5131
5132/**
5133 * RIL_REQUEST_SET_RADIO_CAPABILITY
5134 *
5135 * Used to set the phones radio capability. Be VERY careful
5136 * using this request as it may cause some vendor modems to reset. Because
5137 * of the possible modem reset any RIL commands after this one may not be
5138 * processed.
5139 *
5140 * "data" is the RIL_RadioCapability structure
5141 *
5142 * "response" is the RIL_RadioCapability structure, used to feedback return status
5143 *
5144 * Valid errors:
5145 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
5146 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005147 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005148 */
5149#define RIL_REQUEST_SET_RADIO_CAPABILITY 131
5150
fengluf7408292015-04-14 14:53:55 -07005151/**
5152 * RIL_REQUEST_START_LCE
5153 *
5154 * Start Link Capacity Estimate (LCE) service if supported by the radio.
5155 *
5156 * "data" is const int *
5157 * ((const int*)data)[0] specifies the desired reporting interval (ms).
fenglu290add32015-05-01 17:05:15 -07005158 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
fengluf7408292015-04-14 14:53:55 -07005159 *
fenglu290add32015-05-01 17:05:15 -07005160 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005161 *
5162 * Valid errors:
5163 * SUCCESS
5164 * RADIO_NOT_AVAILABLE
5165 * LCE_NOT_SUPPORTED
5166 */
5167#define RIL_REQUEST_START_LCE 132
5168
5169/**
5170 * RIL_REQUEST_STOP_LCE
5171 *
5172 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
5173 * idempotent for the radio modem.
5174 *
fenglu290add32015-05-01 17:05:15 -07005175 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005176 *
5177 * Valid errors:
5178 * SUCCESS
5179 * RADIO_NOT_AVAILABLE
5180 * LCE_NOT_SUPPORTED
5181 */
5182#define RIL_REQUEST_STOP_LCE 133
5183
5184/**
5185 * RIL_REQUEST_PULL_LCEDATA
5186 *
5187 * Pull LCE service for capacity information.
5188 *
fenglu290add32015-05-01 17:05:15 -07005189 * "response" is the RIL_LceDataInfo.
fengluf7408292015-04-14 14:53:55 -07005190 *
5191 * Valid errors:
5192 * SUCCESS
5193 * RADIO_NOT_AVAILABLE
5194 * LCE_NOT_SUPPORTED
5195 */
5196#define RIL_REQUEST_PULL_LCEDATA 134
5197
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005198/**
5199 * RIL_REQUEST_GET_ACTIVITY_INFO
5200 *
Nathan Haroldc8635212016-10-10 11:15:21 -07005201 * Get modem activity information for power consumption estimation.
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005202 *
Nathan Haroldc8635212016-10-10 11:15:21 -07005203 * Request clear-on-read statistics information that is used for
5204 * estimating the per-millisecond power consumption of the cellular
5205 * modem.
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005206 *
5207 * "data" is null
5208 * "response" is const RIL_ActivityStatsInfo *
5209 *
5210 * Valid errors:
5211 *
5212 * SUCCESS
5213 * RADIO_NOT_AVAILABLE (radio resetting)
5214 * GENERIC_FAILURE
5215 */
5216#define RIL_REQUEST_GET_ACTIVITY_INFO 135
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005217
Meng Wangb4e34312016-05-12 14:54:36 -07005218/**
5219 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS
5220 *
Meng Wangd5c540f2016-07-15 15:41:19 -07005221 * Set carrier restrictions for this sim slot. Expected modem behavior:
5222 * If never receives this command
5223 * - Must allow all carriers
5224 * Receives this command with data being NULL
5225 * - Must allow all carriers. If a previously allowed SIM is present, modem must not reload
5226 * the SIM. If a previously disallowed SIM is present, reload the SIM and notify Android.
5227 * Receives this command with a list of carriers
5228 * - Only allow specified carriers, persist across power cycles and FDR. If a present SIM
5229 * is in the allowed list, modem must not reload the SIM. If a present SIM is *not* in
5230 * the allowed list, modem must detach from the registered network and only keep emergency
5231 * service, and notify Android SIM refresh reset with new SIM state being
5232 * RIL_CARDSTATE_RESTRICTED. Emergency service must be enabled.
Meng Wangb4e34312016-05-12 14:54:36 -07005233 *
5234 * "data" is const RIL_CarrierRestrictions *
5235 * A list of allowed carriers and possibly a list of excluded carriers.
5236 * If data is NULL, means to clear previous carrier restrictions and allow all carriers
5237 *
5238 * "response" is int *
5239 * ((int *)data)[0] contains the number of allowed carriers which have been set correctly.
5240 * On success, it should match the length of list data->allowed_carriers.
5241 * If data is NULL, the value must be 0.
5242 *
5243 * Valid errors:
5244 * RIL_E_SUCCESS
5245 * RIL_E_INVALID_ARGUMENTS
5246 * RIL_E_RADIO_NOT_AVAILABLE
5247 * RIL_E_REQUEST_NOT_SUPPORTED
5248 */
5249#define RIL_REQUEST_SET_CARRIER_RESTRICTIONS 136
5250
5251/**
5252 * RIL_REQUEST_GET_CARRIER_RESTRICTIONS
5253 *
Meng Wangd5c540f2016-07-15 15:41:19 -07005254 * Get carrier restrictions for this sim slot. Expected modem behavior:
5255 * Return list of allowed carriers, or null if all carriers are allowed.
Meng Wangb4e34312016-05-12 14:54:36 -07005256 *
5257 * "data" is NULL
5258 *
5259 * "response" is const RIL_CarrierRestrictions *.
5260 * If response is NULL, it means all carriers are allowed.
5261 *
5262 * Valid errors:
5263 * RIL_E_SUCCESS
5264 * RIL_E_RADIO_NOT_AVAILABLE
5265 * RIL_E_REQUEST_NOT_SUPPORTED
5266 */
5267#define RIL_REQUEST_GET_CARRIER_RESTRICTIONS 137
5268
Jack Yude8c8552017-01-24 12:03:52 -08005269/**
5270 * RIL_REQUEST_SEND_DEVICE_STATE
5271 *
5272 * Send the updated device state.
5273 * Modem can perform power saving based on the provided device state.
5274 * "data" is const int *
5275 * ((const int*)data)[0] A RIL_DeviceStateType that specifies the device state type.
5276 * ((const int*)data)[1] Specifies the state. See RIL_DeviceStateType for the definition of each
5277 * type.
5278 *
5279 * "datalen" is count * sizeof(const RIL_DeviceState *)
5280 * "response" is NULL
5281 *
5282 * Valid errors:
5283 * SUCCESS
5284 * RADIO_NOT_AVAILABLE (radio resetting)
5285 */
5286#define RIL_REQUEST_SEND_DEVICE_STATE 138
5287
5288/**
5289 * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER
5290 *
5291 * Set the unsolicited response filter
5292 * This is used to prevent unnecessary application processor
5293 * wake up for power saving purposes by suppressing the
5294 * unsolicited responses in certain scenarios.
5295 *
5296 * "data" is an int *
5297 *
5298 * ((int *)data)[0] is a 32-bit bitmask of RIL_UnsolicitedResponseFilter
5299 *
5300 * "response" is NULL
5301 *
5302 * Valid errors:
5303 * SUCCESS
5304 * INVALID_ARGUMENTS (e.g. the requested filter doesn't exist)
5305 * RADIO_NOT_AVAILABLE (radio resetting)
5306 */
5307#define RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER 139
5308
Wileen Chiu35380a32017-01-04 11:37:19 -08005309 /**
5310 * RIL_REQUEST_SET_SIM_CARD_POWER
5311 *
5312 * Set SIM card power up or down
5313 *
5314 * Request is equivalent to inserting and removing the card, with
5315 * an additional effect where the ability to detect card removal/insertion
5316 * is disabled when the SIM card is powered down.
5317 *
5318 * This will generate RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5319 * as if the SIM had been inserted or removed.
5320 *
5321 * "data" is int *
5322 * ((int *)data)[0] is 1 for "SIM POWER UP"
5323 * ((int *)data)[0] is 0 for "SIM POWER DOWN"
5324 *
5325 * "response" is NULL
5326 *
5327 * Valid errors:
5328 * SUCCESS
5329 * RADIO_NOT_AVAILABLE
5330 * REQUEST_NOT_SUPPORTED
5331 * SIM_ABSENT
5332 * INVALID_ARGUMENTS
5333 */
5334#define RIL_REQUEST_SET_SIM_CARD_POWER 140
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005335/***********************************************************************/
5336
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005337/**
5338 * RIL_RESPONSE_ACKNOWLEDGEMENT
5339 *
5340 * This is used by Asynchronous solicited messages and Unsolicited messages
5341 * to acknowledge the receipt of those messages in RIL.java so that the ack
5342 * can be used to let ril.cpp to release wakelock.
5343 *
5344 * Valid errors
5345 * SUCCESS
5346 * RADIO_NOT_AVAILABLE
5347 */
5348
5349#define RIL_RESPONSE_ACKNOWLEDGEMENT 800
5350
5351/***********************************************************************/
5352
Wink Savillef4c4d362009-04-02 01:37:03 -07005353
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005354#define RIL_UNSOL_RESPONSE_BASE 1000
5355
5356/**
5357 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
5358 *
5359 * Indicate when value of RIL_RadioState has changed.
5360 *
5361 * Callee will invoke RIL_RadioStateRequest method on main thread
5362 *
5363 * "data" is NULL
5364 */
5365
5366#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
5367
5368
5369/**
5370 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
5371 *
5372 * Indicate when call state has changed
5373 *
5374 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
5375 *
5376 * "data" is NULL
5377 *
Wink Saville7f856802009-06-09 10:23:37 -07005378 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005379 * "RING", "BUSY", "NO CARRIER", and also call state
5380 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
5381 *
5382 * Redundent or extraneous invocations are tolerated
5383 */
5384#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
5385
5386
5387/**
Wink Savillec0114b32011-02-18 10:14:07 -08005388 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005389 *
Wink Savillec0114b32011-02-18 10:14:07 -08005390 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005391 *
5392 * Callee will invoke the following requests on main thread:
5393 *
Wink Savillec0114b32011-02-18 10:14:07 -08005394 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005395 * RIL_REQUEST_OPERATOR
5396 *
5397 * "data" is NULL
5398 *
5399 * FIXME should this happen when SIM records are loaded? (eg, for
5400 * EONS)
5401 */
Wink Savillec0114b32011-02-18 10:14:07 -08005402#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005403
5404/**
5405 * RIL_UNSOL_RESPONSE_NEW_SMS
5406 *
5407 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07005408 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005409 * "data" is const char *
5410 * This is a pointer to a string containing the PDU of an SMS-DELIVER
5411 * as an ascii string of hex digits. The PDU starts with the SMSC address
5412 * per TS 27.005 (+CMT:)
5413 *
5414 * Callee will subsequently confirm the receipt of thei SMS with a
5415 * RIL_REQUEST_SMS_ACKNOWLEDGE
5416 *
Wink Saville7f856802009-06-09 10:23:37 -07005417 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005418 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5419 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5420 */
5421
5422#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
5423
5424/**
5425 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
5426 *
5427 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07005428 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005429 * "data" is const char *
5430 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
5431 * as an ascii string of hex digits. The PDU starts with the SMSC address
5432 * per TS 27.005 (+CDS:).
5433 *
5434 * Callee will subsequently confirm the receipt of the SMS with a
5435 * RIL_REQUEST_SMS_ACKNOWLEDGE
5436 *
Wink Saville7f856802009-06-09 10:23:37 -07005437 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005438 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5439 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5440 */
5441
5442#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
5443
5444/**
5445 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
5446 *
5447 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07005448 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005449 * "data" is const int *
5450 * ((const int *)data)[0] contains the slot index on the SIM that contains
5451 * the new message
5452 */
5453
5454#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
5455
5456/**
5457 * RIL_UNSOL_ON_USSD
5458 *
5459 * Called when a new USSD message is received.
5460 *
5461 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07005462 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005463 * one of these string values:
5464 * "0" USSD-Notify -- text in ((const char **)data)[1]
5465 * "1" USSD-Request -- text in ((const char **)data)[1]
5466 * "2" Session terminated by network
5467 * "3" other local client (eg, SIM Toolkit) has responded
5468 * "4" Operation not supported
5469 * "5" Network timeout
5470 *
5471 * The USSD session is assumed to persist if the type code is "1", otherwise
5472 * the current session (if any) is assumed to have terminated.
5473 *
5474 * ((const char **)data)[1] points to a message string if applicable, which
5475 * should always be in UTF-8.
5476 */
5477#define RIL_UNSOL_ON_USSD 1006
5478/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
5479
5480/**
5481 * RIL_UNSOL_ON_USSD_REQUEST
5482 *
5483 * Obsolete. Send via RIL_UNSOL_ON_USSD
5484 */
Wink Saville7f856802009-06-09 10:23:37 -07005485#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005486
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005487/**
5488 * RIL_UNSOL_NITZ_TIME_RECEIVED
5489 *
5490 * Called when radio has received a NITZ time message
5491 *
5492 * "data" is const char * pointing to NITZ time string
5493 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
5494 */
5495#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
5496
5497/**
5498 * RIL_UNSOL_SIGNAL_STRENGTH
5499 *
5500 * Radio may report signal strength rather han have it polled.
5501 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005502 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005503 */
5504#define RIL_UNSOL_SIGNAL_STRENGTH 1009
5505
5506
5507/**
Wink Savillef4c4d362009-04-02 01:37:03 -07005508 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005509 *
Wink Savillec0114b32011-02-18 10:14:07 -08005510 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07005511 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
5512 * of current data contexts including new contexts that have been
5513 * activated. A data call is only removed from this list when the
5514 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
5515 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005516 *
Wink Savillef4c4d362009-04-02 01:37:03 -07005517 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005518 */
5519
Wink Savillef4c4d362009-04-02 01:37:03 -07005520#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005521
5522/**
5523 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
5524 *
5525 * Reports supplementary service related notification from the network.
5526 *
5527 * "data" is a const RIL_SuppSvcNotification *
5528 *
5529 */
5530
5531#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
5532
5533/**
5534 * RIL_UNSOL_STK_SESSION_END
5535 *
5536 * Indicate when STK session is terminated by SIM.
5537 *
5538 * "data" is NULL
5539 */
5540#define RIL_UNSOL_STK_SESSION_END 1012
5541
5542/**
5543 * RIL_UNSOL_STK_PROACTIVE_COMMAND
5544 *
5545 * Indicate when SIM issue a STK proactive command to applications
5546 *
5547 * "data" is a const char * containing SAT/USAT proactive command
5548 * in hexadecimal format string starting with command tag
5549 *
5550 */
5551#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
5552
5553/**
5554 * RIL_UNSOL_STK_EVENT_NOTIFY
5555 *
5556 * Indicate when SIM notifies applcations some event happens.
5557 * Generally, application does not need to have any feedback to
5558 * SIM but shall be able to indicate appropriate messages to users.
5559 *
5560 * "data" is a const char * containing SAT/USAT commands or responses
5561 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
5562 * starting with first byte of response data or command tag
5563 *
5564 */
5565#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
5566
5567/**
5568 * RIL_UNSOL_STK_CALL_SETUP
5569 *
5570 * Indicate when SIM wants application to setup a voice call.
5571 *
5572 * "data" is const int *
5573 * ((const int *)data)[0] contains timeout value (in milliseconds)
5574 */
5575#define RIL_UNSOL_STK_CALL_SETUP 1015
5576
5577/**
5578 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
5579 *
5580 * Indicates that SMS storage on the SIM is full. Sent when the network
5581 * attempts to deliver a new SMS message. Messages cannot be saved on the
5582 * SIM until space is freed. In particular, incoming Class 2 messages
5583 * cannot be stored.
5584 *
5585 * "data" is null
5586 *
5587 */
5588#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
5589
5590/**
5591 * RIL_UNSOL_SIM_REFRESH
5592 *
5593 * Indicates that file(s) on the SIM have been updated, or the SIM
5594 * has been reinitialized.
5595 *
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005596 * In the case where RIL is version 6 or older:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005597 * "data" is an int *
5598 * ((int *)data)[0] is a RIL_SimRefreshResult.
5599 * ((int *)data)[1] is the EFID of the updated file if the result is
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005600 * SIM_FILE_UPDATE or NULL for any other result.
5601 *
5602 * In the case where RIL is version 7:
5603 * "data" is a RIL_SimRefreshResponse_v7 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005604 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005605 * Note: If the SIM state changes as a result of the SIM refresh (eg,
5606 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005607 * should be sent.
5608 */
5609#define RIL_UNSOL_SIM_REFRESH 1017
5610
5611/**
5612 * RIL_UNSOL_CALL_RING
5613 *
5614 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07005615 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
5616 * of a call and sending multiple is optional. If the system property
5617 * ro.telephony.call_ring.multiple is false then the upper layers
5618 * will generate the multiple events internally. Otherwise the vendor
5619 * ril must generate multiple RIL_UNSOL_CALL_RING if
5620 * ro.telephony.call_ring.multiple is true or if it is absent.
5621 *
5622 * The rate of these events is controlled by ro.telephony.call_ring.delay
5623 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005624 *
Wink Saville3d54e742009-05-18 18:00:44 -07005625 * "data" is null for GSM
5626 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005627 */
5628#define RIL_UNSOL_CALL_RING 1018
5629
The Android Open Source Project34a51082009-03-05 14:34:37 -08005630/**
5631 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5632 *
5633 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07005634 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005635 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07005636
The Android Open Source Project34a51082009-03-05 14:34:37 -08005637 * "data" is null
5638 */
5639#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
5640
5641/**
5642 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
5643 *
5644 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07005645 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005646 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07005647 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005648 * Callee will subsequently confirm the receipt of the SMS with
5649 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07005650 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005651 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
5652 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07005653 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005654 */
5655#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
5656
5657/**
5658 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
5659 *
5660 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07005661 *
Henrik Hall0eba2022010-11-25 10:20:56 +01005662 * "data" can be one of the following:
5663 * If received from GSM network, "data" is const char of 88 bytes
5664 * which indicates each page of a CBS Message sent to the MS by the
5665 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
5666 * If received from UMTS network, "data" is const char of 90 up to 1252
5667 * bytes which contain between 1 and 15 CBS Message pages sent as one
5668 * 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 -07005669 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005670 */
5671#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07005672
The Android Open Source Project34a51082009-03-05 14:34:37 -08005673/**
5674 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
5675 *
5676 * Indicates that SMS storage on the RUIM is full. Messages
5677 * cannot be saved on the RUIM until space is freed.
5678 *
5679 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07005680 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005681 */
Wink Savillef4c4d362009-04-02 01:37:03 -07005682#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
5683
The Android Open Source Project34a51082009-03-05 14:34:37 -08005684/**
5685 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
5686 *
5687 * Indicates a restricted state change (eg, for Domain Specific Access Control).
5688 *
5689 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
5690 *
5691 * "data" is an int *
5692 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
5693 */
5694#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
5695
Wink Saville1b5fd232009-04-22 14:50:00 -07005696/**
5697 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
5698 *
5699 * Indicates that the radio system selection module has
5700 * autonomously entered emergency callback mode.
5701 *
5702 * "data" is null
5703 *
5704 */
5705#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08005706
Wink Saville1b5fd232009-04-22 14:50:00 -07005707/**
5708 * RIL_UNSOL_CDMA_CALL_WAITING
5709 *
5710 * Called when CDMA radio receives a call waiting indication.
5711 *
5712 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07005713 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005714 */
5715#define RIL_UNSOL_CDMA_CALL_WAITING 1025
5716
5717/**
5718 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
5719 *
5720 * Called when CDMA radio receives an update of the progress of an
5721 * OTASP/OTAPA call.
5722 *
5723 * "data" is const int *
5724 * For CDMA this is an integer OTASP/OTAPA status listed in
5725 * RIL_CDMA_OTA_ProvisionStatus.
5726 *
5727 */
5728#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
5729
5730/**
5731 * RIL_UNSOL_CDMA_INFO_REC
5732 *
5733 * Called when CDMA radio receives one or more info recs.
5734 *
5735 * "data" is const RIL_CDMA_InformationRecords *
5736 *
5737 */
5738#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08005739
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07005740/**
5741 * RIL_UNSOL_OEM_HOOK_RAW
5742 *
5743 * This is for OEM specific use.
5744 *
5745 * "data" is a byte[]
5746 */
5747#define RIL_UNSOL_OEM_HOOK_RAW 1028
5748
John Wang5d621da2009-09-18 17:17:48 -07005749/**
5750 * RIL_UNSOL_RINGBACK_TONE
5751 *
5752 * Indicates that nework doesn't have in-band information, need to
5753 * play out-band tone.
5754 *
5755 * "data" is an int *
5756 * ((int *)data)[0] == 0 for stop play ringback tone.
5757 * ((int *)data)[0] == 1 for start play ringback tone.
5758 */
5759#define RIL_UNSOL_RINGBACK_TONE 1029
5760
John Wang5909cf82010-01-29 00:18:54 -08005761/**
5762 * RIL_UNSOL_RESEND_INCALL_MUTE
5763 *
5764 * Indicates that framework/application need reset the uplink mute state.
5765 *
5766 * There may be situations where the mute state becomes out of sync
5767 * between the application and device in some GSM infrastructures.
5768 *
5769 * "data" is null
5770 */
5771#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08005772
5773/**
5774 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
5775 *
5776 * Called when CDMA subscription source changed.
5777 *
5778 * "data" is int *
5779 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
5780 */
Wink Saville29487ef2011-04-15 09:15:31 -07005781#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08005782
5783/**
5784 * RIL_UNSOL_CDMA_PRL_CHANGED
5785 *
5786 * Called when PRL (preferred roaming list) changes.
5787 *
5788 * "data" is int *
5789 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
5790 */
5791#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
5792
5793/**
5794 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
5795 *
5796 * Called when Emergency Callback Mode Ends
5797 *
5798 * Indicates that the radio system selection module has
5799 * proactively exited emergency callback mode.
5800 *
5801 * "data" is NULL
5802 *
5803 */
5804#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
5805
Wink Saville5b9df332011-04-06 16:24:21 -07005806/**
5807 * RIL_UNSOL_RIL_CONNECTED
5808 *
5809 * Called the ril connects and returns the version
5810 *
5811 * "data" is int *
5812 * ((int *)data)[0] is RIL_VERSION
5813 */
5814#define RIL_UNSOL_RIL_CONNECTED 1034
5815
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005816/**
5817 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
5818 *
5819 * Indicates that voice technology has changed. Contains new radio technology
5820 * as a data in the message.
5821 *
5822 * "data" is int *
5823 * ((int *)data)[0] is of type const RIL_RadioTechnology
5824 *
5825 */
5826#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
5827
Wink Saville8a9e0212013-04-09 12:11:38 -07005828/**
5829 * RIL_UNSOL_CELL_INFO_LIST
5830 *
5831 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
5832 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
5833 *
5834 * "data" is NULL
5835 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08005836 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07005837 */
5838#define RIL_UNSOL_CELL_INFO_LIST 1036
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005839
Wink Saville865ce3b2013-11-08 16:37:01 -08005840/**
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005841 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
5842 *
Nathan Harold0eb43c22016-12-19 12:04:32 -08005843 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
5844 * instead, provide IMS registration status via an IMS Service.
5845 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005846 * Called when IMS registration state has changed
5847 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005848 * To get IMS registration state and IMS SMS format, callee needs to invoke the
5849 * following request on main thread:
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005850 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005851 * RIL_REQUEST_IMS_REGISTRATION_STATE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005852 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005853 * "data" is NULL
5854 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005855 */
5856#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
5857
Etan Cohend3652192014-06-20 08:28:44 -07005858/**
5859 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
5860 *
5861 * Indicated when there is a change in subscription status.
5862 * This event will be sent in the following scenarios
5863 * - subscription readiness at modem, which was selected by telephony layer
5864 * - when subscription is deactivated by modem due to UICC card removal
5865 * - When network invalidates the subscription i.e. attach reject due to authentication reject
5866 *
5867 * "data" is const int *
5868 * ((const int *)data)[0] == 0 for Subscription Deactivated
5869 * ((const int *)data)[0] == 1 for Subscription Activated
5870 *
5871 */
5872#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
5873
5874/**
5875 * RIL_UNSOL_SRVCC_STATE_NOTIFY
5876 *
5877 * Called when Single Radio Voice Call Continuity(SRVCC)
5878 * progress state has changed
5879 *
5880 * "data" is int *
5881 * ((int *)data)[0] is of type const RIL_SrvccState
5882 *
5883 */
5884
5885#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
5886
5887/**
5888 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
5889 *
5890 * Called when the hardware configuration associated with the RILd changes
5891 *
5892 * "data" is an array of RIL_HardwareConfig
5893 *
5894 */
5895#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
5896
Wink Savillec29360a2014-07-13 05:17:28 -07005897/**
5898 * RIL_UNSOL_DC_RT_INFO_CHANGED
5899 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005900 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005901 * Sent when the DC_RT_STATE changes but the time
5902 * between these messages must not be less than the
5903 * value set by RIL_REQUEST_SET_DC_RT_RATE.
5904 *
5905 * "data" is the most recent RIL_DcRtInfo
5906 *
5907 */
5908#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
5909
Wink Saville8b4e4f72014-10-17 15:01:45 -07005910/**
5911 * RIL_UNSOL_RADIO_CAPABILITY
5912 *
5913 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
5914 * Returns the phone radio capability exactly as
5915 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
5916 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
5917 *
5918 * "data" is the RIL_RadioCapability structure
5919 */
5920#define RIL_UNSOL_RADIO_CAPABILITY 1042
5921
Amit Mahajan54563d32014-11-22 00:54:49 +00005922/*
5923 * RIL_UNSOL_ON_SS
5924 *
5925 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
5926 * call control.
5927 *
5928 * "data" is const RIL_StkCcUnsolSsResponse *
5929 *
5930 */
5931#define RIL_UNSOL_ON_SS 1043
5932
5933/**
5934 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
5935 *
5936 * Called when there is an ALPHA from UICC during Call Control.
5937 *
5938 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
5939 *
5940 */
5941#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
5942
fengluf7408292015-04-14 14:53:55 -07005943/**
5944 * RIL_UNSOL_LCEDATA_RECV
5945 *
5946 * Called when there is an incoming Link Capacity Estimate (LCE) info report.
5947 *
fenglu290add32015-05-01 17:05:15 -07005948 * "data" is the RIL_LceDataInfo structure.
fengluf7408292015-04-14 14:53:55 -07005949 *
5950 */
5951#define RIL_UNSOL_LCEDATA_RECV 1045
5952
Robert Greenwalt27e99c52016-06-01 16:31:38 -07005953 /**
5954 * RIL_UNSOL_PCO_DATA
5955 *
5956 * Called when there is new Carrier PCO data received for a data call. Ideally
5957 * only new data will be forwarded, though this is not required. Multiple
5958 * boxes of carrier PCO data for a given call should result in a series of
5959 * RIL_UNSOL_PCO_DATA calls.
5960 *
5961 * "data" is the RIL_PCO_Data structure.
5962 *
5963 */
5964#define RIL_UNSOL_PCO_DATA 1046
5965
Naveen Kalla90ddf072016-09-14 13:41:04 -07005966 /**
5967 * RIL_UNSOL_MODEM_RESTART
5968 *
5969 * Called when there is a modem reset.
5970 *
5971 * "reason" is "const char *" containing the reason for the reset. It
5972 * could be a crash signature if the restart was due to a crash or some
5973 * string such as "user-initiated restart" or "AT command initiated
5974 * restart" that explains the cause of the modem restart.
5975 *
5976 * When modem restarts, one of the following radio state transitions will happen
5977 * 1) RADIO_STATE_ON->RADIO_STATE_UNAVAILABLE->RADIO_STATE_ON or
5978 * 2) RADIO_STATE_OFF->RADIO_STATE_UNAVAILABLE->RADIO_STATE_OFF
5979 * This message can be sent either just before the RADIO_STATE changes to RADIO_STATE_UNAVAILABLE
5980 * or just after but should never be sent after the RADIO_STATE changes from UNAVAILABLE to
5981 * AVAILABLE(RADIO_STATE_ON/RADIO_STATE_OFF) again.
5982 *
5983 * It should NOT be sent after the RADIO_STATE changes to AVAILABLE after the
5984 * modem restart as that could be interpreted as a second modem reset by the
5985 * framework.
5986 */
5987#define RIL_UNSOL_MODEM_RESTART 1047
5988
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005989/***********************************************************************/
5990
Amit Mahajan54563d32014-11-22 00:54:49 +00005991
Etan Cohend3652192014-06-20 08:28:44 -07005992#if defined(ANDROID_MULTI_SIM)
5993/**
5994 * RIL_Request Function pointer
5995 *
5996 * @param request is one of RIL_REQUEST_*
5997 * @param data is pointer to data defined for that RIL_REQUEST_*
5998 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07005999 * structures passed as data may contain pointers to non-contiguous memory
Etan Cohend3652192014-06-20 08:28:44 -07006000 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07006001 * @param datalen is the length of "data" which is defined as other argument. It may or may
6002 * not be equal to sizeof(data). Refer to the documentation of individual structures
6003 * to find if pointers listed in the structure are contiguous and counted in the datalen
6004 * length or not.
6005 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
Etan Cohend3652192014-06-20 08:28:44 -07006006 *
6007 */
6008typedef void (*RIL_RequestFunc) (int request, void *data,
6009 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
6010
6011/**
6012 * This function should return the current radio state synchronously
6013 */
6014typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
6015
6016#else
6017/* Backward compatible */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006018
6019/**
6020 * RIL_Request Function pointer
6021 *
6022 * @param request is one of RIL_REQUEST_*
6023 * @param data is pointer to data defined for that RIL_REQUEST_*
6024 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07006025 * structures passed as data may contain pointers to non-contiguous memory
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006026 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07006027 * @param datalen is the length of "data" which is defined as other argument. It may or may
6028 * not be equal to sizeof(data). Refer to the documentation of individual structures
6029 * to find if pointers listed in the structure are contiguous and counted in the datalen
6030 * length or not.
6031 * (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 -08006032 *
6033 */
Wink Saville7f856802009-06-09 10:23:37 -07006034typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006035 size_t datalen, RIL_Token t);
6036
6037/**
6038 * This function should return the current radio state synchronously
6039 */
6040typedef RIL_RadioState (*RIL_RadioStateRequest)();
6041
Etan Cohend3652192014-06-20 08:28:44 -07006042#endif
6043
6044
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006045/**
6046 * This function returns "1" if the specified RIL_REQUEST code is
6047 * supported and 0 if it is not
6048 *
6049 * @param requestCode is one of RIL_REQUEST codes
6050 */
6051
6052typedef int (*RIL_Supports)(int requestCode);
6053
6054/**
Wink Saville7f856802009-06-09 10:23:37 -07006055 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006056 * thread that calls RIL_RequestFunc--and indicates that a pending
6057 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07006058 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006059 * On cancel, the callee should do its best to abandon the request and
6060 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
6061 *
6062 * Subsequent calls to RIL_onRequestComplete for this request with
6063 * other results will be tolerated but ignored. (That is, it is valid
6064 * to ignore the cancellation request)
6065 *
6066 * RIL_Cancel calls should return immediately, and not wait for cancellation
6067 *
Wink Saville7f856802009-06-09 10:23:37 -07006068 * 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 -08006069 * interface
6070 *
6071 * @param t token wants to be canceled
6072 */
6073
6074typedef void (*RIL_Cancel)(RIL_Token t);
6075
6076typedef void (*RIL_TimedCallback) (void *param);
6077
6078/**
6079 * Return a version string for your RIL implementation
6080 */
6081typedef const char * (*RIL_GetVersion) (void);
6082
6083typedef struct {
6084 int version; /* set to RIL_VERSION */
6085 RIL_RequestFunc onRequest;
6086 RIL_RadioStateRequest onStateRequest;
6087 RIL_Supports supports;
6088 RIL_Cancel onCancel;
6089 RIL_GetVersion getVersion;
6090} RIL_RadioFunctions;
6091
Sungmin Choi75697532013-04-26 15:04:45 -07006092typedef struct {
Jack Yude8c8552017-01-24 12:03:52 -08006093 char *apn; /* the APN to connect to */
6094 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
6095 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/
6096 int authtype; /* authentication protocol used for this PDP context
6097 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */
6098 char *username; /* the username for APN, or NULL */
6099 char *password; /* the password for APN, or NULL */
Sungmin Choi75697532013-04-26 15:04:45 -07006100} RIL_InitialAttachApn;
6101
Amit Mahajan2b772032014-06-26 14:20:11 -07006102typedef struct {
Jack Yude8c8552017-01-24 12:03:52 -08006103 char *apn; /* the APN to connect to */
6104 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
6105 home network. For example, "IP", "IPV6", "IPV4V6", or "PPP". */
6106 char *roamingProtocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
6107 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/
6108 int authtype; /* authentication protocol used for this PDP context
6109 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */
6110 char *username; /* the username for APN, or NULL */
6111 char *password; /* the password for APN, or NULL */
6112 int supportedTypesBitmask; /* supported APN types bitmask. See RIL_ApnTypes for the value of
6113 each bit. */
6114 int bearerBitmask; /* the bearer bitmask. See RIL_RadioAccessFamily for the value of
6115 each bit. */
6116 int modemCognitive; /* indicating the APN setting was sent to the modem through
6117 setDataProfile earlier. */
6118 int mtu; /* maximum transmission unit (MTU) size in bytes */
6119 char *mvnoType; /* the MVNO type: possible values are "imsi", "gid", "spn" */
6120 char *mvnoMatchData; /* MVNO match data. Can be anything defined by the carrier.
6121 For example,
6122 SPN like: "A MOBILE", "BEN NL", etc...
6123 IMSI like: "302720x94", "2060188", etc...
6124 GID like: "4E", "33", etc... */
6125} RIL_InitialAttachApn_v15;
6126
6127typedef struct {
Amit Mahajan2b772032014-06-26 14:20:11 -07006128 int authContext; /* P2 value of authentication command, see P2 parameter in
6129 3GPP TS 31.102 7.1.2 */
6130 char *authData; /* the challenge string in Base64 format, see 3GPP
6131 TS 31.102 7.1.2 */
6132 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
6133 NULL if no value. */
6134} RIL_SimAuthentication;
6135
Robert Greenwalt17ea3fa2016-06-15 14:59:38 -07006136typedef struct {
Jack Yude8c8552017-01-24 12:03:52 -08006137 int cid; /* Context ID, uniquely identifies this call */
6138 char *bearer_proto; /* One of the PDP_type values in TS 27.007 section 10.1.1.
6139 For example, "IP", "IPV6", "IPV4V6". */
6140 int pco_id; /* The protocol ID for this box. Note that only IDs from
6141 FF00H - FFFFH are accepted. If more than one is included
6142 from the network, multiple calls should be made to send all
6143 of them. */
6144 int contents_length; /* The number of octets in the contents. */
6145 char *contents; /* Carrier-defined content. It is binary, opaque and
6146 loosely defined in LTE Layer 3 spec 24.008 */
Robert Greenwalt17ea3fa2016-06-15 14:59:38 -07006147} RIL_PCO_Data;
6148
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006149#ifdef RIL_SHLIB
6150struct RIL_Env {
6151 /**
6152 * "t" is parameter passed in on previous call to RIL_Notification
6153 * routine.
6154 *
6155 * If "e" != SUCCESS, then response can be null/is ignored
6156 *
Wink Saville7f856802009-06-09 10:23:37 -07006157 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006158 * freed by callee
6159 *
6160 * RIL_onRequestComplete will return as soon as possible
6161 */
Wink Saville7f856802009-06-09 10:23:37 -07006162 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006163 void *response, size_t responselen);
6164
Etan Cohend3652192014-06-20 08:28:44 -07006165#if defined(ANDROID_MULTI_SIM)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006166 /**
6167 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
6168 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6169 *
6170 * "data" is owned by caller, and should not be modified or freed by callee
6171 */
Etan Cohend3652192014-06-20 08:28:44 -07006172 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
6173#else
6174 /**
6175 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
6176 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6177 *
6178 * "data" is owned by caller, and should not be modified or freed by callee
6179 */
6180 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
6181#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006182 /**
Wink Saville7f856802009-06-09 10:23:37 -07006183 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006184 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6185 * a relative time value at which the callback is invoked. If relativeTime is
6186 * NULL or points to a 0-filled structure, the callback will be invoked as
6187 * soon as possible
6188 */
6189
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07006190 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07006191 void *param, const struct timeval *relativeTime);
Sanket Padawe6ff9a872016-01-27 15:09:12 -08006192 /**
6193 * "t" is parameter passed in on previous call RIL_Notification routine
6194 *
6195 * RIL_onRequestAck will be called by vendor when an Async RIL request was received
6196 * by them and an ack needs to be sent back to java ril.
6197 */
6198 void (*OnRequestAck) (RIL_Token t);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006199};
6200
6201
Wink Saville7f856802009-06-09 10:23:37 -07006202/**
6203 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006204 * argc and argv will be command line arguments intended for the RIL implementation
6205 * Return NULL on error
6206 *
6207 * @param env is environment point defined as RIL_Env
6208 * @param argc number of arguments
6209 * @param argv list fo arguments
6210 *
6211 */
6212const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
6213
Sanket Padawe1be49ba2016-03-31 17:37:23 -07006214/**
6215 * If BT SAP(SIM Access Profile) is supported, then RIL implementations must define RIL_SAP_Init
6216 * for initializing RIL_RadioFunctions used for BT SAP communcations. It is called whenever RILD
6217 * starts or modem restarts. Returns handlers for SAP related request that are made on SAP
6218 * sepecific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init
6219 * and used on the general RIL socket.
6220 * argc and argv will be command line arguments intended for the RIL implementation
6221 * Return NULL on error.
6222 *
6223 * @param env is environment point defined as RIL_Env
6224 * @param argc number of arguments
6225 * @param argv list fo arguments
6226 *
6227 */
6228const RIL_RadioFunctions *RIL_SAP_Init(const struct RIL_Env *env, int argc, char **argv);
6229
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006230#else /* RIL_SHLIB */
6231
6232/**
6233 * Call this once at startup to register notification routine
6234 *
6235 * @param callbacks user-specifed callback function
6236 */
6237void RIL_register (const RIL_RadioFunctions *callbacks);
6238
Amit Mahajan18fe36b2016-08-25 11:19:21 -07006239void rilc_thread_pool();
6240
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006241
6242/**
6243 *
6244 * RIL_onRequestComplete will return as soon as possible
6245 *
6246 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07006247 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006248 * @param e error code
6249 * if "e" != SUCCESS, then response can be null/is ignored
6250 * @param response is owned by caller, and should not be modified or
6251 * freed by callee
6252 * @param responselen the length of response in byte
6253 */
Wink Saville7f856802009-06-09 10:23:37 -07006254void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006255 void *response, size_t responselen);
6256
Sanket Padawe6ff9a872016-01-27 15:09:12 -08006257/**
6258 * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and
6259 * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's
6260 * results, just that the command was received and will take a while. After sending this Ack
6261 * its vendor's responsibility to make sure that AP is up whenever needed while command is
6262 * being processed.
6263 *
6264 * @param t is parameter passed in on previous call to RIL_Notification
6265 * routine.
6266 */
6267void RIL_onRequestAck(RIL_Token t);
6268
Etan Cohend3652192014-06-20 08:28:44 -07006269#if defined(ANDROID_MULTI_SIM)
6270/**
6271 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6272 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6273 * "data" is owned by caller, and should not be modified or freed by callee
6274 * @param datalen the length of data in byte
6275 */
6276
6277void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
6278 size_t datalen, RIL_SOCKET_ID socket_id);
6279#else
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006280/**
6281 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6282 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6283 * "data" is owned by caller, and should not be modified or freed by callee
6284 * @param datalen the length of data in byte
6285 */
6286
Wink Saville7f856802009-06-09 10:23:37 -07006287void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006288 size_t datalen);
Etan Cohend3652192014-06-20 08:28:44 -07006289#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006290
6291/**
Wink Saville7f856802009-06-09 10:23:37 -07006292 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006293 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6294 * a relative time value at which the callback is invoked. If relativeTime is
6295 * NULL or points to a 0-filled structure, the callback will be invoked as
6296 * soon as possible
6297 *
6298 * @param callback user-specifed callback function
6299 * @param param parameter list
6300 * @param relativeTime a relative time value at which the callback is invoked
6301 */
6302
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07006303void RIL_requestTimedCallback (RIL_TimedCallback callback,
6304 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006305
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006306#endif /* RIL_SHLIB */
6307
6308#ifdef __cplusplus
6309}
6310#endif
6311
6312#endif /*ANDROID_RIL_H*/