blob: 5818c9291a499ac5694cbfef5c0cf9a2910e6312 [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.
69 * RIL_VERSION = 14 : New data structures are added, namely RIL_CarrierMatchType,
70 * RIL_Carrier, RIL_CarrierRestrictions and RIL_PCO_Data.
71 * New commands added: RIL_REQUEST_SET_CARRIER_RESTRICTIONS,
72 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS and
73 * RIL_UNSOL_PCO_DATA
Sanket Padawe88cf6a52016-01-11 12:45:43 -080074 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -080075#define RIL_VERSION 12
76#define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
Alex Yakavenka45e740e2012-01-31 11:48:27 -080077#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080078
Wink Savillea592eeb2009-05-22 13:26:36 -070079#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
80#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
81
Etan Cohend3652192014-06-20 08:28:44 -070082#define MAX_RILDS 3
83#define MAX_SOCKET_NAME_LENGTH 6
84#define MAX_CLIENT_ID_LENGTH 2
85#define MAX_DEBUG_SOCKET_NAME_LENGTH 12
86#define MAX_QEMU_PIPE_NAME_LENGTH 11
Wink Saville8b4e4f72014-10-17 15:01:45 -070087#define MAX_UUID_LENGTH 64
88
Etan Cohend3652192014-06-20 08:28:44 -070089
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080090typedef void * RIL_Token;
91
92typedef enum {
Etan Cohend3652192014-06-20 08:28:44 -070093 RIL_SOCKET_1,
94#if (SIM_COUNT >= 2)
95 RIL_SOCKET_2,
96#if (SIM_COUNT >= 3)
97 RIL_SOCKET_3,
98#endif
99#if (SIM_COUNT >= 4)
100 RIL_SOCKET_4,
101#endif
102#endif
103 RIL_SOCKET_NUM
104} RIL_SOCKET_ID;
105
106
107typedef enum {
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800108 RIL_E_SUCCESS = 0,
109 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
110 RIL_E_GENERIC_FAILURE = 2,
111 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
112 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
113 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
114 RIL_E_REQUEST_NOT_SUPPORTED = 6,
115 RIL_E_CANCELLED = 7,
116 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
117 call on a Class C GPRS device */
118 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
119 registers in network */
Wink Saville3d54e742009-05-18 18:00:44 -0700120 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
121 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
122 shall be retrieved because of SIM or RUIM
Wink Savillef4c4d362009-04-02 01:37:03 -0700123 card absent */
Wink Saville3d54e742009-05-18 18:00:44 -0700124 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
Wink Savillef4c4d362009-04-02 01:37:03 -0700125 location */
jsh602f80f2009-07-10 15:44:37 -0700126 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
John Wang75534472010-04-20 15:11:42 -0700127 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800128 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
John Wang75534472010-04-20 15:11:42 -0700129 illegal SIM or ME */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800130 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
Amit Mahajan54563d32014-11-22 00:54:49 +0000131 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
132 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
133 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
134 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
135 data */
136 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
137 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
138 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
139 request */
140 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
141 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
142 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
fengluf7408292015-04-14 14:53:55 -0700143 RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800144 RIL_E_LCE_NOT_SUPPORTED = 36, /* LCE service not supported(36 in RILConstants.java) */
145 RIL_E_NO_MEMORY = 37, /* Not sufficient memory to process the request */
146 RIL_E_INTERNAL_ERR = 38, /* Hit unexpected vendor internal error scenario */
147 RIL_E_SYSTEM_ERR = 39, /* Hit platform or system error */
148 RIL_E_MODEM_ERR = 40, /* Hit unexpected modem error */
Ajay Nambi10345892016-03-19 09:02:28 -0700149 RIL_E_INVALID_STATE = 41, /* Unexpected request for the current state */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800150 RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */
151 RIL_E_SIM_ERR = 43, /* Received error from SIM card */
152 RIL_E_INVALID_ARGUMENTS = 44, /* Received invalid arguments in request */
153 RIL_E_INVALID_SIM_STATE = 45, /* Can not process the request in current SIM state */
154 RIL_E_INVALID_MODEM_STATE = 46, /* Can not process the request in current Modem state */
155 RIL_E_INVALID_CALL_ID = 47, /* Received invalid call id in request */
156 RIL_E_NO_SMS_TO_ACK = 48, /* ACK received when there is no SMS to ack */
Nathan Haroldc97b2842016-02-02 12:04:35 -0800157 RIL_E_NETWORK_ERR = 49, /* Received error from network */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800158 RIL_E_REQUEST_RATE_LIMITED = 50, /* Operation denied due to overly-frequent requests */
twen.changdf7add02016-03-04 18:27:48 +0800159 RIL_E_SIM_BUSY = 51, /* SIM is busy */
160 RIL_E_SIM_FULL = 52, /* The target EF is full */
161 RIL_E_NETWORK_REJECT = 53, /* Request is rejected by network */
162 RIL_E_OPERATION_NOT_ALLOWED = 54, /* Not allowed the request now */
163 RIL_E_EMPTY_RECORD = 55, /* The request record is empty */
Ajay Nambi68900f52016-03-11 12:02:55 -0800164 RIL_E_INVALID_SMS_FORMAT = 56, /* Invalid sms format */
165 RIL_E_ENCODING_ERR = 57, /* Message not encoded properly */
166 RIL_E_INVALID_SMSC_ADDRESS = 58, /* SMSC address specified is invalid */
167 RIL_E_NO_SUCH_ENTRY = 59, /* No such entry present to perform the request */
168 RIL_E_NETWORK_NOT_READY = 60, /* Network is not ready to perform the request */
169 RIL_E_NOT_PROVISIONED = 61, /* Device doesnot have this value provisioned */
Ajay Nambi10345892016-03-19 09:02:28 -0700170 RIL_E_NO_SUBSCRIPTION = 62, /* Device doesnot have subscription */
171 RIL_E_NO_NETWORK_FOUND = 63, /* Network cannot be found */
172 RIL_E_DEVICE_IN_USE = 64, /* Operation cannot be performed because the device
173 is currently in use */
174 RIL_E_ABORTED = 65, /* Operation aborted */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800175 // OEM specific error codes. To be used by OEM when they don't want to reveal
176 // specific error codes which would be replaced by Generic failure.
177 RIL_E_OEM_ERROR_1 = 501,
178 RIL_E_OEM_ERROR_2 = 502,
179 RIL_E_OEM_ERROR_3 = 503,
180 RIL_E_OEM_ERROR_4 = 504,
181 RIL_E_OEM_ERROR_5 = 505,
182 RIL_E_OEM_ERROR_6 = 506,
183 RIL_E_OEM_ERROR_7 = 507,
184 RIL_E_OEM_ERROR_8 = 508,
185 RIL_E_OEM_ERROR_9 = 509,
186 RIL_E_OEM_ERROR_10 = 510,
187 RIL_E_OEM_ERROR_11 = 511,
188 RIL_E_OEM_ERROR_12 = 512,
189 RIL_E_OEM_ERROR_13 = 513,
190 RIL_E_OEM_ERROR_14 = 514,
191 RIL_E_OEM_ERROR_15 = 515,
192 RIL_E_OEM_ERROR_16 = 516,
193 RIL_E_OEM_ERROR_17 = 517,
194 RIL_E_OEM_ERROR_18 = 518,
195 RIL_E_OEM_ERROR_19 = 519,
196 RIL_E_OEM_ERROR_20 = 520,
197 RIL_E_OEM_ERROR_21 = 521,
198 RIL_E_OEM_ERROR_22 = 522,
199 RIL_E_OEM_ERROR_23 = 523,
200 RIL_E_OEM_ERROR_24 = 524,
201 RIL_E_OEM_ERROR_25 = 525
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800202} RIL_Errno;
203
204typedef enum {
205 RIL_CALL_ACTIVE = 0,
206 RIL_CALL_HOLDING = 1,
207 RIL_CALL_DIALING = 2, /* MO call only */
208 RIL_CALL_ALERTING = 3, /* MO call only */
209 RIL_CALL_INCOMING = 4, /* MT call only */
210 RIL_CALL_WAITING = 5 /* MT call only */
211} RIL_CallState;
212
213typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -0700214 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
215 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800216 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
Wink Savillef4c4d362009-04-02 01:37:03 -0700217 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
Wink Saville7f856802009-06-09 10:23:37 -0700218 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -0700219 personalization locked, or SIM absent */
220 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
221 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
222 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
Wink Saville7f856802009-06-09 10:23:37 -0700223 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -0700224 personalization locked, or RUIM absent */
225 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800226 RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */
227 RADIO_STATE_ON = 10 /* Radio is on */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800228} RIL_RadioState;
229
Wink Saville43808972011-01-13 17:39:51 -0800230typedef enum {
231 RADIO_TECH_UNKNOWN = 0,
232 RADIO_TECH_GPRS = 1,
233 RADIO_TECH_EDGE = 2,
234 RADIO_TECH_UMTS = 3,
235 RADIO_TECH_IS95A = 4,
236 RADIO_TECH_IS95B = 5,
237 RADIO_TECH_1xRTT = 6,
238 RADIO_TECH_EVDO_0 = 7,
239 RADIO_TECH_EVDO_A = 8,
240 RADIO_TECH_HSDPA = 9,
241 RADIO_TECH_HSUPA = 10,
242 RADIO_TECH_HSPA = 11,
243 RADIO_TECH_EVDO_B = 12,
244 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800245 RADIO_TECH_LTE = 14,
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800246 RADIO_TECH_HSPAP = 15, // HSPA+
Etan Cohend3652192014-06-20 08:28:44 -0700247 RADIO_TECH_GSM = 16, // Only supports voice
Yashdev Singh3c8f37c2015-02-23 13:04:28 -0800248 RADIO_TECH_TD_SCDMA = 17,
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700249 RADIO_TECH_IWLAN = 18,
250 RADIO_TECH_LTE_CA = 19
Wink Saville43808972011-01-13 17:39:51 -0800251} RIL_RadioTechnology;
252
Wink Saville8b4e4f72014-10-17 15:01:45 -0700253typedef enum {
254 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
255 RAF_GPRS = (1 << RADIO_TECH_GPRS),
256 RAF_EDGE = (1 << RADIO_TECH_EDGE),
257 RAF_UMTS = (1 << RADIO_TECH_UMTS),
258 RAF_IS95A = (1 << RADIO_TECH_IS95A),
259 RAF_IS95B = (1 << RADIO_TECH_IS95B),
260 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
261 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
262 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
263 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
264 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
265 RAF_HSPA = (1 << RADIO_TECH_HSPA),
266 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
267 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
268 RAF_LTE = (1 << RADIO_TECH_LTE),
269 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
270 RAF_GSM = (1 << RADIO_TECH_GSM),
271 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700272 RAF_LTE_CA = (1 << RADIO_TECH_LTE_CA)
Wink Saville8b4e4f72014-10-17 15:01:45 -0700273} RIL_RadioAccessFamily;
274
275typedef enum {
Nathan Harold92839f12016-02-12 10:02:28 -0800276 BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically)
277 BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
278 BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
279 BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000)
280 BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
281 BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
282 BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band)
283 BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band)
284 BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band)
285 BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band)
286 BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band)
287 BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band)
288 BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band)
289 BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band)
290 BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band)
291 BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band)
292 BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band)
293 BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band)
294 BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band)
295} RIL_RadioBandMode;
296
297typedef enum {
Wink Saville8b4e4f72014-10-17 15:01:45 -0700298 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
299 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
300 // forthcoming with these same parameters
301 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
302 // RIL_RadioCapability.status = 0, if any START's fail no
303 // APPLY will be sent
304 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
305 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
306 // occurs in any previous command the RIL_RadioAccessesFamily and
Legler Wu8caf06f2014-10-29 14:02:14 +0800307 // logicalModemUuid fields will be the prior configuration thus
Wink Saville8b4e4f72014-10-17 15:01:45 -0700308 // restoring the configuration to the previous value. An error
309 // returned by this command will generally be ignored or may
310 // cause that logical modem to be removed from service.
311} RadioCapabilityPhase;
312
313typedef enum {
314 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
315 // RC_PHASE_APPLY
316 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
317 // capability was success with RC_PHASE_FINISH
318 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
319 // capability is fail with RC_PHASE_FINISH.
320} RadioCapabilityStatus;
321
322#define RIL_RADIO_CAPABILITY_VERSION 1
323typedef struct {
Legler Wu8caf06f2014-10-29 14:02:14 +0800324 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
Wink Saville8b4e4f72014-10-17 15:01:45 -0700325 int session; // Unique session value defined by framework returned in all "responses/unsol"
326 int phase; // CONFIGURED, START, APPLY, FINISH
327 int rat; // RIL_RadioAccessFamily for the radio
328 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
329 int status; // Return status and an input parameter for RC_PHASE_FINISH
330} RIL_RadioCapability;
331
Wink Savillec0114b32011-02-18 10:14:07 -0800332// Do we want to split Data from Voice and the use
333// RIL_RadioTechnology for get/setPreferredVoice/Data ?
334typedef enum {
335 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
336 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
337 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
338 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
339 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
340 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
341 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
342 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
343 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
344 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
345 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
Uma Maheswari Ramalingam0e094872011-09-28 13:25:48 -0700346 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
Rakesh Pallerla8c20ebe2015-03-31 14:52:49 -0700347 PREF_NET_TYPE_LTE_WCDMA = 12, /* LTE/WCDMA */
348 PREF_NET_TYPE_TD_SCDMA_ONLY = 13, /* TD-SCDMA only */
349 PREF_NET_TYPE_TD_SCDMA_WCDMA = 14, /* TD-SCDMA and WCDMA */
350 PREF_NET_TYPE_TD_SCDMA_LTE = 15, /* TD-SCDMA and LTE */
351 PREF_NET_TYPE_TD_SCDMA_GSM = 16, /* TD-SCDMA and GSM */
352 PREF_NET_TYPE_TD_SCDMA_GSM_LTE = 17, /* TD-SCDMA,GSM and LTE */
353 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA = 18, /* TD-SCDMA, GSM/WCDMA */
354 PREF_NET_TYPE_TD_SCDMA_WCDMA_LTE = 19, /* TD-SCDMA, WCDMA and LTE */
355 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_LTE = 20, /* TD-SCDMA, GSM/WCDMA and LTE */
356 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_CDMA_EVDO_AUTO = 21, /* TD-SCDMA, GSM/WCDMA, CDMA and EvDo */
357 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 -0800358} RIL_PreferredNetworkType;
359
360/* Source for cdma subscription */
361typedef enum {
362 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
363 CDMA_SUBSCRIPTION_SOURCE_NV = 1
364} RIL_CdmaSubscriptionSource;
365
Wink Saville74fa3882009-12-22 15:35:41 -0800366/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
367typedef enum {
368 RIL_UUS_TYPE1_IMPLICIT = 0,
369 RIL_UUS_TYPE1_REQUIRED = 1,
370 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
371 RIL_UUS_TYPE2_REQUIRED = 3,
372 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
373 RIL_UUS_TYPE3_REQUIRED = 5,
374 RIL_UUS_TYPE3_NOT_REQUIRED = 6
375} RIL_UUS_Type;
376
377/* User-to-User Signaling Information data coding schemes. Possible values for
378 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
379 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
380typedef enum {
381 RIL_UUS_DCS_USP = 0, /* User specified protocol */
382 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
383 RIL_UUS_DCS_X244 = 2, /* X.244 */
384 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
385 convergence function */
386 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
387} RIL_UUS_DCS;
388
389/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
390 * This data is passed in RIL_ExtensionRecord and rec contains this
391 * structure when type is RIL_UUS_INFO_EXT_REC */
392typedef struct {
393 RIL_UUS_Type uusType; /* UUS Type */
394 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
395 int uusLength; /* Length of UUS Data */
396 char * uusData; /* UUS Data */
397} RIL_UUS_Info;
398
399/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700400typedef struct {
401 char isPresent; /* non-zero if signal information record is present */
402 char signalType; /* as defined 3.7.5.5-1 */
403 char alertPitch; /* as defined 3.7.5.5-2 */
404 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
405} RIL_CDMA_SignalInfoRecord;
406
Wink Saville1b5fd232009-04-22 14:50:00 -0700407typedef struct {
408 RIL_CallState state;
409 int index; /* Connection Index for use with, eg, AT+CHLD */
410 int toa; /* type of address, eg 145 = intl */
411 char isMpty; /* nonzero if is mpty call */
412 char isMT; /* nonzero if call is mobile terminated */
413 char als; /* ALS line indicator if available
414 (0 = line 1) */
415 char isVoice; /* nonzero if this is is a voice call */
416 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
417 char * number; /* Remote party number */
418 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
419 char * name; /* Remote party name */
420 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800421 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800422} RIL_Call;
423
Wink Savillec0114b32011-02-18 10:14:07 -0800424/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800425typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800426 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700427 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700428 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
429 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800430 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800431 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
432} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800433
434/*
435 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
436 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
437 */
438typedef struct {
439 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500440 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
441 back-off timer value RIL wants to override the one
442 pre-configured in FW.
443 The unit is miliseconds.
444 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700445 The value 0 means retry should be done ASAP.
Wink Saville8a9e0212013-04-09 12:11:38 -0700446 The value of INT_MAX(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800447 int cid; /* Context ID, uniquely identifies this call */
448 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
449 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
450 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
451 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
452 such as "IP" or "IPV6" */
453 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800454 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
455 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800456 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800457 one of each. If the prefix length is absent the addresses
458 are assumed to be point to point with IPv4 having a prefix
459 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800460 char * dnses; /* A space-delimited list of DNS server addresses,
461 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
462 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800463 char * gateways; /* A space-delimited list of default gateway addresses,
464 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
465 May be empty in which case the addresses represent point
466 to point connections. */
467} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800468
Etan Cohend3652192014-06-20 08:28:44 -0700469typedef struct {
470 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
471 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
472 back-off timer value RIL wants to override the one
473 pre-configured in FW.
474 The unit is miliseconds.
475 The value < 0 means no value is suggested.
476 The value 0 means retry should be done ASAP.
477 The value of INT_MAX(0x7fffffff) means no retry. */
478 int cid; /* Context ID, uniquely identifies this call */
479 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
480 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
481 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
482 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
483 such as "IP" or "IPV6" */
484 char * ifname; /* The network interface name */
485 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
486 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
487 May not be empty, typically 1 IPv4 or 1 IPv6 or
488 one of each. If the prefix length is absent the addresses
489 are assumed to be point to point with IPv4 having a prefix
490 length of 32 and IPv6 128. */
491 char * dnses; /* A space-delimited list of DNS server addresses,
492 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
493 May be empty. */
494 char * gateways; /* A space-delimited list of default gateway addresses,
495 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
496 May be empty in which case the addresses represent point
497 to point connections. */
498 char * pcscf; /* the Proxy Call State Control Function address
499 via PCO(Protocol Configuration Option) for IMS client. */
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -0700500} RIL_Data_Call_Response_v9;
501
502typedef struct {
503 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
504 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
505 back-off timer value RIL wants to override the one
506 pre-configured in FW.
507 The unit is miliseconds.
508 The value < 0 means no value is suggested.
509 The value 0 means retry should be done ASAP.
510 The value of INT_MAX(0x7fffffff) means no retry. */
511 int cid; /* Context ID, uniquely identifies this call */
512 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
513 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
514 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
515 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
516 such as "IP" or "IPV6" */
517 char * ifname; /* The network interface name */
518 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
519 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
520 May not be empty, typically 1 IPv4 or 1 IPv6 or
521 one of each. If the prefix length is absent the addresses
522 are assumed to be point to point with IPv4 having a prefix
523 length of 32 and IPv6 128. */
524 char * dnses; /* A space-delimited list of DNS server addresses,
525 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
526 May be empty. */
527 char * gateways; /* A space-delimited list of default gateway addresses,
528 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
529 May be empty in which case the addresses represent point
530 to point connections. */
531 char * pcscf; /* the Proxy Call State Control Function address
532 via PCO(Protocol Configuration Option) for IMS client. */
533 int mtu; /* MTU received from network
534 Value <= 0 means network has either not sent a value or
535 sent an invalid value */
536} RIL_Data_Call_Response_v11;
Etan Cohend3652192014-06-20 08:28:44 -0700537
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700538typedef enum {
539 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
540 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
541} RIL_RadioTechnologyFamily;
542
543typedef struct {
544 RIL_RadioTechnologyFamily tech;
545 unsigned char retry; /* 0 == not retry, nonzero == retry */
546 int messageRef; /* Valid field if retry is set to nonzero.
547 Contains messageRef from RIL_SMS_Response
548 corresponding to failed MO SMS.
549 */
550
551 union {
552 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
553 RIL_CDMA_SMS_Message* cdmaMessage;
554
555 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
Sanket Padawe05c23072016-08-08 15:42:17 -0700556 char** gsmMessage; /* This is an array of pointers where pointers
557 are contiguous but elements pointed by those pointers
558 are not contiguous
559 */
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700560 } message;
561} RIL_IMS_SMS_Message;
562
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800563typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800564 int messageRef; /* TP-Message-Reference for GSM,
565 and BearerData MessageId for CDMA
566 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800567 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700568 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
569 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
570 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800571} RIL_SMS_Response;
572
573/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
574typedef struct {
575 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
576 /* 0 = "REC UNREAD" */
577 /* 1 = "REC READ" */
578 /* 2 = "STO UNSENT" */
579 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700580 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
581 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800582 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
583 (as expected by TS 27.005) or NULL for default SMSC */
584} RIL_SMS_WriteArgs;
585
586/** Used by RIL_REQUEST_DIAL */
587typedef struct {
588 char * address;
589 int clir;
590 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
591 * clir == 0 on "use subscription default value"
592 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
593 * clir == 2 on "CLIR suppression" (allow CLI presentation)
594 */
Wink Saville74fa3882009-12-22 15:35:41 -0800595 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800596} RIL_Dial;
597
598typedef struct {
599 int command; /* one of the commands listed for TS 27.007 +CRSM*/
600 int fileid; /* EF id */
601 char *path; /* "pathid" from TS 27.007 +CRSM command.
602 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700603 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800604 */
605 int p1;
606 int p2;
607 int p3;
608 char *data; /* May be NULL*/
609 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800610} RIL_SIM_IO_v5;
611
612typedef struct {
613 int command; /* one of the commands listed for TS 27.007 +CRSM*/
614 int fileid; /* EF id */
615 char *path; /* "pathid" from TS 27.007 +CRSM command.
616 Path is in hex asciii format eg "7f205f70"
617 Path must always be provided.
618 */
619 int p1;
620 int p2;
621 int p3;
622 char *data; /* May be NULL*/
623 char *pin2; /* May be NULL*/
624 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
625} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800626
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800627/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
628 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
629typedef struct {
630 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
631 ignored for +CSIM command. */
632
633 /* Following fields are used to derive the APDU ("command" and "length"
634 values in TS 27.007 +CSIM and +CGLA commands). */
635 int cla;
636 int instruction;
637 int p1;
638 int p2;
639 int p3; /* A negative P3 implies a 4 byte APDU. */
640 char *data; /* May be NULL. In hex string format. */
641} RIL_SIM_APDU;
642
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800643typedef struct {
644 int sw1;
645 int sw2;
Amit Mahajan2875bc22014-08-06 10:03:15 -0700646 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
647 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 -0800648} RIL_SIM_IO_Response;
649
650/* See also com.android.internal.telephony.gsm.CallForwardInfo */
651
652typedef struct {
653 int status; /*
654 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
655 * status 1 = active, 0 = not active
656 *
657 * For RIL_REQUEST_SET_CALL_FORWARD:
658 * status is:
659 * 0 = disable
660 * 1 = enable
661 * 2 = interrogate
662 * 3 = registeration
663 * 4 = erasure
664 */
665
Wink Saville3d54e742009-05-18 18:00:44 -0700666 int reason; /* from TS 27.007 7.11 "reason" */
667 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
668 See table for Android mapping from
669 MMI service code
670 0 means user doesn't input class */
671 int toa; /* "type" from TS 27.007 7.11 */
672 char * number; /* "number" from TS 27.007 7.11. May be NULL */
673 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800674}RIL_CallForwardInfo;
675
676typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700677 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
678 * Upper 16 bits is LAC and lower 16 bits
679 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800680 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700681 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700682 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800683 */
johnwange0ba6a92009-09-11 19:14:52 -0700684 int rssi; /* Received RSSI in GSM,
685 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800686 */
687} RIL_NeighboringCell;
688
fengluf7408292015-04-14 14:53:55 -0700689typedef struct {
690 char lce_status; /* LCE service status:
691 * -1 = not supported;
692 * 0 = stopped;
693 * 1 = active.
694 */
695 unsigned int actual_interval_ms; /* actual LCE reporting interval,
696 * meaningful only if LCEStatus = 1.
697 */
698} RIL_LceStatusInfo;
699
700typedef struct {
fenglu290add32015-05-01 17:05:15 -0700701 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
fengluf7408292015-04-14 14:53:55 -0700702 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
703 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
704 * moves to inactive state or network type change)
705 * 1 = suspended;
706 * 0 = not suspended.
707 */
708} RIL_LceDataInfo;
709
Meng Wangb4e34312016-05-12 14:54:36 -0700710typedef enum {
711 RIL_MATCH_ALL = 0, /* Apply to all carriers with the same mcc/mnc */
712 RIL_MATCH_SPN = 1, /* Use SPN and mcc/mnc to identify the carrier */
713 RIL_MATCH_IMSI_PREFIX = 2, /* Use IMSI prefix and mcc/mnc to identify the carrier */
714 RIL_MATCH_GID1 = 3, /* Use GID1 and mcc/mnc to identify the carrier */
715 RIL_MATCH_GID2 = 4, /* Use GID2 and mcc/mnc to identify the carrier */
716} RIL_CarrierMatchType;
717
718typedef struct {
719 const char * mcc;
720 const char * mnc;
721 RIL_CarrierMatchType match_type; /* Specify match type for the carrier.
722 * If it’s RIL_MATCH_ALL, match_data is null;
723 * otherwise, match_data is the value for the match type.
724 */
725 const char * match_data;
726} RIL_Carrier;
727
728typedef struct {
729 int32_t len_allowed_carriers; /* length of array allowed_carriers */
730 int32_t len_excluded_carriers; /* length of array excluded_carriers */
731 RIL_Carrier * allowed_carriers; /* whitelist for allowed carriers */
732 RIL_Carrier * excluded_carriers; /* blacklist for explicitly excluded carriers
733 * which match allowed_carriers. Eg. allowed_carriers match
734 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1
735 * is ABCD. It means except the carrier whose gid1 is ABCD,
736 * all carriers with the same mcc/mnc are allowed.
737 */
738} RIL_CarrierRestrictions;
739
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800740/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
741typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700742 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800743 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
744 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
745 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800746 CALL_FAIL_NORMAL = 16,
747 CALL_FAIL_BUSY = 17,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800748 CALL_FAIL_NO_USER_RESPONDING = 18,
749 CALL_FAIL_NO_ANSWER_FROM_USER = 19,
750 CALL_FAIL_CALL_REJECTED = 21,
751 CALL_FAIL_NUMBER_CHANGED = 22,
752 CALL_FAIL_PREEMPTION = 25,
753 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
754 CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
755 CALL_FAIL_FACILITY_REJECTED = 29,
756 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
757 CALL_FAIL_NORMAL_UNSPECIFIED = 31,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800758 CALL_FAIL_CONGESTION = 34,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800759 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
760 CALL_FAIL_TEMPORARY_FAILURE = 41,
761 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
762 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
763 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
764 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
765 CALL_FAIL_QOS_UNAVAILABLE = 49,
766 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
767 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
768 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
769 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
770 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
771 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800772 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800773 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
774 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
775 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
776 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
777 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
778 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
779 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
780 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
781 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
782 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
783 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
784 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
785 CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
786 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
787 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
788 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
789 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800790 CALL_FAIL_CALL_BARRED = 240,
791 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700792 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
793 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Amit Mahajan54563d32014-11-22 00:54:49 +0000794 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
795 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
796 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
Wink Saville1b5fd232009-04-22 14:50:00 -0700797 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
798 CALL_FAIL_CDMA_DROP = 1001,
799 CALL_FAIL_CDMA_INTERCEPT = 1002,
800 CALL_FAIL_CDMA_REORDER = 1003,
801 CALL_FAIL_CDMA_SO_REJECT = 1004,
802 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
803 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
804 CALL_FAIL_CDMA_PREEMPTED = 1007,
805 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
806 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700807 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800808 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
809 vendor code should make sure to map error
810 code to specific error */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800811} RIL_LastCallFailCause;
812
Chao Liu548a81e2015-05-14 16:13:46 -0700813typedef struct {
814 RIL_LastCallFailCause cause_code;
815 char * vendor_cause;
816} RIL_LastCallFailCauseInfo;
817
Wink Savillef4c4d362009-04-02 01:37:03 -0700818/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800819typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800820 PDP_FAIL_NONE = 0, /* No error, connection ok */
821
822 /* an integer cause code defined in TS 24.008
823 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
824 If the implementation does not have access to the exact cause codes,
825 then it should return one of the following values,
826 as the UI layer needs to distinguish these
827 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700828 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
Sanket Padaweac308b92016-01-07 14:41:17 -0800829 PDP_FAIL_NAS_SIGNALLING = 0x0E,
830 PDP_FAIL_LLC_SNDCP = 0x19,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700831 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
832 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
833 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
834 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
835 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
836 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
837 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
838 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
839 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800840 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
Hui Wang11e8b232014-09-19 16:40:17 -0500841 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
842 based on framework config */
Sanket Padaweac308b92016-01-07 14:41:17 -0800843 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
844 PDP_FAIL_NETWORK_FAILURE = 0x26,
845 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
846 PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
847 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
848 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
849 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
850 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
851 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
852 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
Wink Saville43808972011-01-13 17:39:51 -0800853 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
854 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
855 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Sanket Padaweac308b92016-01-07 14:41:17 -0800856 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
857 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
858 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
859 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
860 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
861 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
862 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
863 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
864 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
865 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
866 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
867 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
868 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
869 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
870 PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
871 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
872 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
873 PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
874 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
875 PDP_FAIL_IFACE_MISMATCH = 0x75,
876 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
877 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
878 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
879 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
880 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
Wink Saville43808972011-01-13 17:39:51 -0800881
Sanket Padawe0106aed2016-02-09 09:56:31 -0800882 // OEM specific error codes. To be used by OEMs when they don't want to
883 // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
884 PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001,
885 PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002,
886 PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003,
887 PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004,
888 PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005,
889 PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006,
890 PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007,
891 PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008,
892 PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009,
893 PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A,
894 PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B,
895 PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C,
896 PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D,
897 PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E,
898 PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F,
899
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700900 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800901 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
902 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800903
904 /* reasons for data call drop - network/modem disconnect */
Wink Saville3492c6e2013-10-03 13:53:27 -0700905 PDP_FAIL_SIGNAL_LOST = -3,
Wink Saville43808972011-01-13 17:39:51 -0800906 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
907 with parameters appropriate for new technology */
908 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
909 powered off - no retry */
910 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
911 mode was up on same APN/data profile - no retry until
912 tethered call is off */
913
Sanket Padaweac308b92016-01-07 14:41:17 -0800914 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
915 new error codes are added making this unnecessary */
Wink Saville43808972011-01-13 17:39:51 -0800916} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800917
jsh602f80f2009-07-10 15:44:37 -0700918/* See RIL_REQUEST_SETUP_DATA_CALL */
919typedef enum {
920 RIL_DATA_PROFILE_DEFAULT = 0,
921 RIL_DATA_PROFILE_TETHERED = 1,
Hui Wang8d679622014-10-16 14:59:27 -0500922 RIL_DATA_PROFILE_IMS = 2,
923 RIL_DATA_PROFILE_FOTA = 3,
924 RIL_DATA_PROFILE_CBS = 4,
925 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
926 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
jsh602f80f2009-07-10 15:44:37 -0700927} RIL_DataProfile;
928
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800929/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
930typedef struct {
931 int notificationType; /*
932 * 0 = MO intermediate result code
933 * 1 = MT unsolicited result code
934 */
935 int code; /* See 27.007 7.17
936 "code1" for MO
937 "code2" for MT. */
938 int index; /* CUG index. See 27.007 7.17. */
939 int type; /* "type" from 27.007 7.17 (MT only). */
940 char * number; /* "number" from 27.007 7.17
941 (MT only, may be NULL). */
942} RIL_SuppSvcNotification;
943
Wink Savillef4c4d362009-04-02 01:37:03 -0700944#define RIL_CARD_MAX_APPS 8
945
946typedef enum {
Meng Wangb4e34312016-05-12 14:54:36 -0700947 RIL_CARDSTATE_ABSENT = 0,
948 RIL_CARDSTATE_PRESENT = 1,
949 RIL_CARDSTATE_ERROR = 2,
950 RIL_CARDSTATE_RESTRICTED = 3 /* card is present but not usable due to carrier restrictions.*/
Wink Savillef4c4d362009-04-02 01:37:03 -0700951} RIL_CardState;
952
953typedef enum {
954 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
955 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700956 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
957 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700958 involved */
959 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
960 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
961 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
962 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
963 RIL_PERSOSUBSTATE_SIM_SIM = 7,
964 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
965 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
966 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
967 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
968 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
969 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
970 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
971 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
972 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
973 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
974 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
975 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
976 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
977 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
978 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
979 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
980 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
981} RIL_PersoSubstate;
982
983typedef enum {
984 RIL_APPSTATE_UNKNOWN = 0,
985 RIL_APPSTATE_DETECTED = 1,
986 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
987 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700988 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700989 when app_state is assigned to this value */
990 RIL_APPSTATE_READY = 5
991} RIL_AppState;
992
993typedef enum {
994 RIL_PINSTATE_UNKNOWN = 0,
995 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
996 RIL_PINSTATE_ENABLED_VERIFIED = 2,
997 RIL_PINSTATE_DISABLED = 3,
998 RIL_PINSTATE_ENABLED_BLOCKED = 4,
999 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
1000} RIL_PinState;
1001
1002typedef enum {
1003 RIL_APPTYPE_UNKNOWN = 0,
1004 RIL_APPTYPE_SIM = 1,
1005 RIL_APPTYPE_USIM = 2,
1006 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -08001007 RIL_APPTYPE_CSIM = 4,
1008 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -07001009} RIL_AppType;
1010
1011typedef struct
1012{
Wink Saville7f856802009-06-09 10:23:37 -07001013 RIL_AppType app_type;
1014 RIL_AppState app_state;
1015 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -07001016 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -07001017 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -07001018 0x30, 0x30, 0x30 */
1019 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -08001020 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -07001021 RIL_PinState pin1;
1022 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -07001023} RIL_AppStatus;
1024
Wink Savillec0114b32011-02-18 10:14:07 -08001025/* Deprecated, use RIL_CardStatus_v6 */
1026typedef struct
1027{
1028 RIL_CardState card_state;
1029 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
1030 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1031 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1032 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1033 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
1034} RIL_CardStatus_v5;
1035
Wink Savillef4c4d362009-04-02 01:37:03 -07001036typedef struct
1037{
Wink Saville7f856802009-06-09 10:23:37 -07001038 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -07001039 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -08001040 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1041 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1042 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -07001043 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1044 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -08001045} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -07001046
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001047/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
1048 * or as part of RIL_SimRefreshResponse_v7
1049 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001050typedef enum {
1051 /* A file on SIM has been updated. data[1] contains the EFID. */
1052 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001053 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001054 SIM_INIT = 1,
1055 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
1056 SIM_RESET = 2
1057} RIL_SimRefreshResult;
1058
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001059typedef struct {
1060 RIL_SimRefreshResult result;
1061 int ef_id; /* is the EFID of the updated file if the result is */
1062 /* SIM_FILE_UPDATE or 0 for any other result. */
1063 char * aid; /* is AID(application ID) of the card application */
1064 /* See ETSI 102.221 8.1 and 101.220 4 */
1065 /* For SIM_FILE_UPDATE result it can be set to AID of */
1066 /* application in which updated EF resides or it can be */
1067 /* NULL if EF is outside of an application. */
1068 /* For SIM_INIT result this field is set to AID of */
1069 /* application that caused REFRESH */
1070 /* For SIM_RESET result it is NULL. */
1071} RIL_SimRefreshResponse_v7;
1072
Wink Savillec0114b32011-02-18 10:14:07 -08001073/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
1074typedef struct {
1075 char * number; /* Remote party number */
1076 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1077 char * name; /* Remote party name */
1078 RIL_CDMA_SignalInfoRecord signalInfoRecord;
1079} RIL_CDMA_CallWaiting_v5;
1080
Wink Saville1b5fd232009-04-22 14:50:00 -07001081typedef struct {
1082 char * number; /* Remote party number */
1083 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1084 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -07001085 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -08001086 /* Number type/Number plan required to support International Call Waiting */
1087 int number_type; /* 0=Unknown, 1=International, 2=National,
1088 3=Network specific, 4=subscriber */
1089 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
1090} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001091
Wink Savillea592eeb2009-05-22 13:26:36 -07001092/**
1093 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
1094 *
1095 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
1096 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
1097 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
1098 * CBM message ID.
1099 *
1100 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
1101 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
1102 * and 9.4.4.2.3 for UMTS.
1103 * All other values can be treated as empty CBM data coding scheme.
1104 *
1105 * selected 0 means message types specified in <fromServiceId, toServiceId>
1106 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
1107 *
1108 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
1109 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
1110 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001111typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -07001112 int fromServiceId;
1113 int toServiceId;
1114 int fromCodeScheme;
1115 int toCodeScheme;
1116 unsigned char selected;
1117} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -07001118
The Android Open Source Project34a51082009-03-05 14:34:37 -08001119/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
1120#define RIL_RESTRICTED_STATE_NONE 0x00
1121/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
1122#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
1123/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
1124#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -07001125/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -08001126#define RIL_RESTRICTED_STATE_CS_ALL 0x04
1127/* Block packet data access due to restriction. */
1128#define RIL_RESTRICTED_STATE_PS_ALL 0x10
1129
Wink Saville1b5fd232009-04-22 14:50:00 -07001130/* The status for an OTASP/OTAPA session */
1131typedef enum {
1132 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
1133 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
1134 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
1135 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
1136 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
1137 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
1138 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
1139 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
1140 CDMA_OTA_PROVISION_STATUS_COMMITTED,
1141 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
1142 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
1143 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
1144} RIL_CDMA_OTA_ProvisionStatus;
1145
1146typedef struct {
1147 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1148 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1149} RIL_GW_SignalStrength;
1150
Wink Savillec57b3eb2013-04-17 12:51:41 -07001151typedef struct {
1152 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1153 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001154 int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us.
1155 * INT_MAX denotes invalid value */
1156} RIL_GSM_SignalStrength_v12;
1157
1158typedef struct {
1159 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1160 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Wink Savillec57b3eb2013-04-17 12:51:41 -07001161} RIL_SignalStrengthWcdma;
Wink Saville1b5fd232009-04-22 14:50:00 -07001162
1163typedef struct {
1164 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1165 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1166 * value will be 75.
1167 */
1168 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1169 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1170 * will be 125.
1171 */
1172} RIL_CDMA_SignalStrength;
1173
1174
1175typedef struct {
1176 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1177 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1178 * value will be 75.
1179 */
1180 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1181 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1182 * will be 125.
1183 */
1184 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
1185} RIL_EVDO_SignalStrength;
1186
Wink Savillec0114b32011-02-18 10:14:07 -08001187typedef struct {
1188 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -07001189 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1190 * Range: 44 to 140 dBm
1191 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1192 * Reference: 3GPP TS 36.133 9.1.4 */
1193 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1194 * Range: 20 to 3 dB.
1195 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1196 * Reference: 3GPP TS 36.133 9.1.7 */
1197 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1198 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1199 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1200 * Reference: 3GPP TS 36.101 8.1.1 */
1201 int cqi; /* The current Channel Quality Indicator.
1202 * Range: 0 to 15.
1203 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1204 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -08001205} RIL_LTE_SignalStrength;
1206
Wink Saville8a9e0212013-04-09 12:11:38 -07001207typedef struct {
1208 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1209 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1210 * Range: 44 to 140 dBm
1211 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1212 * Reference: 3GPP TS 36.133 9.1.4 */
1213 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1214 * Range: 20 to 3 dB.
1215 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1216 * Reference: 3GPP TS 36.133 9.1.7 */
1217 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1218 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1219 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1220 * Reference: 3GPP TS 36.101 8.1.1 */
1221 int cqi; /* The current Channel Quality Indicator.
1222 * Range: 0 to 15.
1223 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1224 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1225 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
1226 * Approximate distance can be calculated using 300m/us * timingAdvance.
1227 * Range: 0 to 0x7FFFFFFE
1228 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1229 * Reference: 3GPP 36.321 section 6.1.3.5
1230 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1231} RIL_LTE_SignalStrength_v8;
1232
Etan Cohend3652192014-06-20 08:28:44 -07001233typedef struct {
1234 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
1235 * Range : 25 to 120
1236 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1237 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1238} RIL_TD_SCDMA_SignalStrength;
1239
Wink Savillec0114b32011-02-18 10:14:07 -08001240/* Deprecated, use RIL_SignalStrength_v6 */
1241typedef struct {
1242 RIL_GW_SignalStrength GW_SignalStrength;
1243 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1244 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1245} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -07001246
1247typedef struct {
1248 RIL_GW_SignalStrength GW_SignalStrength;
1249 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1250 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -08001251 RIL_LTE_SignalStrength LTE_SignalStrength;
1252} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001253
Wink Saville8a9e0212013-04-09 12:11:38 -07001254typedef struct {
1255 RIL_GW_SignalStrength GW_SignalStrength;
1256 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1257 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1258 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1259} RIL_SignalStrength_v8;
1260
Etan Cohend3652192014-06-20 08:28:44 -07001261typedef struct {
1262 RIL_GW_SignalStrength GW_SignalStrength;
1263 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1264 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1265 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1266 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1267} RIL_SignalStrength_v10;
1268
Wink Saville8a9e0212013-04-09 12:11:38 -07001269typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001270 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1271 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1272 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1273 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 -07001274} RIL_CellIdentityGsm;
1275
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001276typedef struct {
1277 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1278 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1279 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1280 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
1281 int arfcn; /* 16-bit GSM Absolute RF channel number, INT_MAX if unknown */
Nathan Haroldf3769da2016-05-05 12:19:39 -07001282 uint8_t bsic;/* 6-bit Base Station Identity Code, 0xFF if unknown */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001283} RIL_CellIdentityGsm_v12;
1284
Wink Savillec57b3eb2013-04-17 12:51:41 -07001285typedef struct {
1286 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1287 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1288 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1289 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1290 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1291} RIL_CellIdentityWcdma;
1292
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001293typedef struct {
1294 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1295 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1296 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1297 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1298 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1299 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number, INT_MAX if unknown */
1300} RIL_CellIdentityWcdma_v12;
1301
Wink Saville8a9e0212013-04-09 12:11:38 -07001302typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001303 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1304 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1305 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001306 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1307 * It is represented in units of 0.25 seconds and ranges from -2592000
1308 * to 2592000, both values inclusive (corresponding to a range of -180
Wink Savillec57b3eb2013-04-17 12:51:41 -07001309 * to +180 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001310
1311 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1312 * It is represented in units of 0.25 seconds and ranges from -1296000
1313 * to 1296000, both values inclusive (corresponding to a range of -90
Wink Savillec57b3eb2013-04-17 12:51:41 -07001314 * to +90 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001315} RIL_CellIdentityCdma;
1316
Wink Saville8a9e0212013-04-09 12:11:38 -07001317typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001318 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1319 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1320 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1321 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1322 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001323} RIL_CellIdentityLte;
1324
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001325typedef struct {
1326 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1327 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1328 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1329 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1330 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1331 int earfcn; /* 18-bit LTE Absolute RC Channel Number, INT_MAX if unknown */
1332} RIL_CellIdentityLte_v12;
1333
Etan Cohend3652192014-06-20 08:28:44 -07001334typedef struct {
1335 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1336 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1337 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1338 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1339 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1340} RIL_CellIdentityTdscdma;
1341
Wink Saville8a9e0212013-04-09 12:11:38 -07001342typedef struct {
1343 RIL_CellIdentityGsm cellIdentityGsm;
1344 RIL_GW_SignalStrength signalStrengthGsm;
1345} RIL_CellInfoGsm;
1346
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001347typedef struct {
1348 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1349 RIL_GSM_SignalStrength_v12 signalStrengthGsm;
1350} RIL_CellInfoGsm_v12;
1351
Wink Savillec57b3eb2013-04-17 12:51:41 -07001352typedef struct {
1353 RIL_CellIdentityWcdma cellIdentityWcdma;
1354 RIL_SignalStrengthWcdma signalStrengthWcdma;
1355} RIL_CellInfoWcdma;
1356
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001357typedef struct {
1358 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1359 RIL_SignalStrengthWcdma signalStrengthWcdma;
1360} RIL_CellInfoWcdma_v12;
1361
Wink Saville8a9e0212013-04-09 12:11:38 -07001362typedef struct {
1363 RIL_CellIdentityCdma cellIdentityCdma;
1364 RIL_CDMA_SignalStrength signalStrengthCdma;
1365 RIL_EVDO_SignalStrength signalStrengthEvdo;
1366} RIL_CellInfoCdma;
1367
Wink Saville8a9e0212013-04-09 12:11:38 -07001368typedef struct {
1369 RIL_CellIdentityLte cellIdentityLte;
1370 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1371} RIL_CellInfoLte;
1372
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001373typedef struct {
1374 RIL_CellIdentityLte_v12 cellIdentityLte;
1375 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1376} RIL_CellInfoLte_v12;
1377
Etan Cohend3652192014-06-20 08:28:44 -07001378typedef struct {
1379 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1380 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1381} RIL_CellInfoTdscdma;
1382
Wink Saville8a9e0212013-04-09 12:11:38 -07001383// Must be the same as CellInfo.TYPE_XXX
1384typedef enum {
1385 RIL_CELL_INFO_TYPE_GSM = 1,
1386 RIL_CELL_INFO_TYPE_CDMA = 2,
1387 RIL_CELL_INFO_TYPE_LTE = 3,
Wink Savillec57b3eb2013-04-17 12:51:41 -07001388 RIL_CELL_INFO_TYPE_WCDMA = 4,
Etan Cohend3652192014-06-20 08:28:44 -07001389 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
Wink Saville8a9e0212013-04-09 12:11:38 -07001390} RIL_CellInfoType;
1391
1392// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1393typedef enum {
1394 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1395 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1396 RIL_TIMESTAMP_TYPE_MODEM = 2,
1397 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1398 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1399} RIL_TimeStampType;
1400
1401typedef struct {
1402 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1403 int registered; /* !0 if this cell is registered 0 if not registered */
1404 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1405 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1406 union {
1407 RIL_CellInfoGsm gsm;
1408 RIL_CellInfoCdma cdma;
1409 RIL_CellInfoLte lte;
Wink Savillec57b3eb2013-04-17 12:51:41 -07001410 RIL_CellInfoWcdma wcdma;
Etan Cohend3652192014-06-20 08:28:44 -07001411 RIL_CellInfoTdscdma tdscdma;
Wink Saville8a9e0212013-04-09 12:11:38 -07001412 } CellInfo;
1413} RIL_CellInfo;
1414
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001415typedef struct {
1416 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1417 int registered; /* !0 if this cell is registered 0 if not registered */
1418 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1419 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1420 union {
1421 RIL_CellInfoGsm_v12 gsm;
1422 RIL_CellInfoCdma cdma;
1423 RIL_CellInfoLte_v12 lte;
1424 RIL_CellInfoWcdma_v12 wcdma;
1425 RIL_CellInfoTdscdma tdscdma;
1426 } CellInfo;
1427} RIL_CellInfo_v12;
1428
Wink Saville1b5fd232009-04-22 14:50:00 -07001429/* Names of the CDMA info records (C.S0005 section 3.7.5) */
1430typedef enum {
1431 RIL_CDMA_DISPLAY_INFO_REC,
1432 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1433 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1434 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1435 RIL_CDMA_SIGNAL_INFO_REC,
1436 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1437 RIL_CDMA_LINE_CONTROL_INFO_REC,
1438 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1439 RIL_CDMA_T53_CLIR_INFO_REC,
1440 RIL_CDMA_T53_RELEASE_INFO_REC,
1441 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1442} RIL_CDMA_InfoRecName;
1443
1444/* Display Info Rec as defined in C.S0005 section 3.7.5.1
1445 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1446 Note: the Extended Display info rec contains multiple records of the
1447 form: display_tag, display_len, and display_len occurrences of the
1448 chari field if the display_tag is not 10000000 or 10000001.
1449 To save space, the records are stored consecutively in a byte buffer.
1450 The display_tag, display_len and chari fields are all 1 byte.
1451*/
1452
1453typedef struct {
1454 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001455 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001456} RIL_CDMA_DisplayInfoRecord;
1457
1458/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1459 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1460 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1461*/
1462
1463typedef struct {
1464 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001465 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001466 char number_type;
1467 char number_plan;
1468 char pi;
1469 char si;
1470} RIL_CDMA_NumberInfoRecord;
1471
1472/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1473typedef enum {
1474 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1475 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1476 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1477 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1478 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1479 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1480 RIL_REDIRECTING_REASON_RESERVED
1481} RIL_CDMA_RedirectingReason;
1482
1483typedef struct {
1484 RIL_CDMA_NumberInfoRecord redirectingNumber;
1485 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1486 RIL_CDMA_RedirectingReason redirectingReason;
1487} RIL_CDMA_RedirectingNumberInfoRecord;
1488
1489/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1490typedef struct {
1491 char lineCtrlPolarityIncluded;
1492 char lineCtrlToggle;
1493 char lineCtrlReverse;
1494 char lineCtrlPowerDenial;
1495} RIL_CDMA_LineControlInfoRecord;
1496
1497/* T53 CLIR Information Record */
1498typedef struct {
1499 char cause;
1500} RIL_CDMA_T53_CLIRInfoRecord;
1501
1502/* T53 Audio Control Information Record */
1503typedef struct {
1504 char upLink;
1505 char downLink;
1506} RIL_CDMA_T53_AudioControlInfoRecord;
1507
1508typedef struct {
1509
1510 RIL_CDMA_InfoRecName name;
1511
1512 union {
1513 /* Display and Extended Display Info Rec */
1514 RIL_CDMA_DisplayInfoRecord display;
1515
1516 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1517 RIL_CDMA_NumberInfoRecord number;
1518
1519 /* Signal Info Rec */
1520 RIL_CDMA_SignalInfoRecord signal;
1521
1522 /* Redirecting Number Info Rec */
1523 RIL_CDMA_RedirectingNumberInfoRecord redir;
1524
1525 /* Line Control Info Rec */
1526 RIL_CDMA_LineControlInfoRecord lineCtrl;
1527
1528 /* T53 CLIR Info Rec */
1529 RIL_CDMA_T53_CLIRInfoRecord clir;
1530
1531 /* T53 Audio Control Info Rec */
1532 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1533 } rec;
1534} RIL_CDMA_InformationRecord;
1535
1536#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1537
1538typedef struct {
1539 char numberOfInfoRecs;
1540 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1541} RIL_CDMA_InformationRecords;
1542
Jake Hamby8a4a2332014-01-15 13:12:05 -08001543/* See RIL_REQUEST_NV_READ_ITEM */
1544typedef struct {
1545 RIL_NV_Item itemID;
1546} RIL_NV_ReadItem;
1547
1548/* See RIL_REQUEST_NV_WRITE_ITEM */
1549typedef struct {
1550 RIL_NV_Item itemID;
1551 char * value;
1552} RIL_NV_WriteItem;
1553
Etan Cohend3652192014-06-20 08:28:44 -07001554typedef enum {
1555 HANDOVER_STARTED = 0,
1556 HANDOVER_COMPLETED = 1,
1557 HANDOVER_FAILED = 2,
1558 HANDOVER_CANCELED = 3
1559} RIL_SrvccState;
1560
1561/* hardware configuration reported to RILJ. */
1562typedef enum {
1563 RIL_HARDWARE_CONFIG_MODEM = 0,
1564 RIL_HARDWARE_CONFIG_SIM = 1,
1565} RIL_HardwareConfig_Type;
1566
1567typedef enum {
1568 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1569 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1570 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1571} RIL_HardwareConfig_State;
1572
1573typedef struct {
1574 int rilModel;
1575 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1576 int maxVoice;
1577 int maxData;
1578 int maxStandby;
1579} RIL_HardwareConfig_Modem;
1580
1581typedef struct {
Wink Saville8b4e4f72014-10-17 15:01:45 -07001582 char modemUuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001583} RIL_HardwareConfig_Sim;
1584
1585typedef struct {
1586 RIL_HardwareConfig_Type type;
Wink Saville8b4e4f72014-10-17 15:01:45 -07001587 char uuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001588 RIL_HardwareConfig_State state;
1589 union {
1590 RIL_HardwareConfig_Modem modem;
1591 RIL_HardwareConfig_Sim sim;
1592 } cfg;
1593} RIL_HardwareConfig;
1594
Amit Mahajan54563d32014-11-22 00:54:49 +00001595typedef enum {
1596 SS_CFU,
1597 SS_CF_BUSY,
1598 SS_CF_NO_REPLY,
1599 SS_CF_NOT_REACHABLE,
1600 SS_CF_ALL,
1601 SS_CF_ALL_CONDITIONAL,
1602 SS_CLIP,
1603 SS_CLIR,
1604 SS_COLP,
1605 SS_COLR,
1606 SS_WAIT,
1607 SS_BAOC,
1608 SS_BAOIC,
1609 SS_BAOIC_EXC_HOME,
1610 SS_BAIC,
1611 SS_BAIC_ROAMING,
1612 SS_ALL_BARRING,
1613 SS_OUTGOING_BARRING,
1614 SS_INCOMING_BARRING
1615} RIL_SsServiceType;
1616
1617typedef enum {
1618 SS_ACTIVATION,
1619 SS_DEACTIVATION,
1620 SS_INTERROGATION,
1621 SS_REGISTRATION,
1622 SS_ERASURE
1623} RIL_SsRequestType;
1624
1625typedef enum {
1626 SS_ALL_TELE_AND_BEARER_SERVICES,
1627 SS_ALL_TELESEVICES,
1628 SS_TELEPHONY,
1629 SS_ALL_DATA_TELESERVICES,
1630 SS_SMS_SERVICES,
1631 SS_ALL_TELESERVICES_EXCEPT_SMS
1632} RIL_SsTeleserviceType;
1633
1634#define SS_INFO_MAX 4
1635#define NUM_SERVICE_CLASSES 7
1636
1637typedef struct {
1638 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1639 For example if voice is forwarded to one number and data
1640 is forwarded to a different one then numValidIndexes will be
1641 2 indicating total number of valid values in cfInfo.
1642 Similarly if all the services are forwarded to the same
1643 number then the value of numValidIndexes will be 1. */
1644
1645 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1646 for SS request to query call
1647 forward status. see
1648 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1649} RIL_CfData;
1650
1651typedef struct {
1652 RIL_SsServiceType serviceType;
1653 RIL_SsRequestType requestType;
1654 RIL_SsTeleserviceType teleserviceType;
1655 int serviceClass;
1656 RIL_Errno result;
1657
1658 union {
1659 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1660 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1661 two ints, so first two values of ssInfo[] will be
1662 used for response if serviceType is SS_CLIR and
1663 requestType is SS_INTERROGATION */
1664
1665 RIL_CfData cfData;
1666 };
1667} RIL_StkCcUnsolSsResponse;
1668
Wink Saville7f856802009-06-09 10:23:37 -07001669/**
Wink Savillec29360a2014-07-13 05:17:28 -07001670 * Data connection power state
1671 */
1672typedef enum {
1673 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1674 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1675 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1676 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1677} RIL_DcPowerStates;
1678
1679/**
1680 * Data connection real time info
1681 */
1682typedef struct {
1683 uint64_t time; // Time in nanos as returned by ril_nano_time
1684 RIL_DcPowerStates powerState; // Current power state
1685} RIL_DcRtInfo;
1686
Amit Mahajanc796e222014-08-13 16:54:01 +00001687/**
1688 * Data profile to modem
1689 */
1690typedef struct {
1691 /* id of the data profile */
1692 int profileId;
1693 /* the APN to connect to */
1694 char* apn;
1695 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1696 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1697 */
1698 char* protocol;
1699 /** authentication protocol used for this PDP context
1700 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1701 */
1702 int authType;
1703 /* the username for APN, or NULL */
1704 char* user;
1705 /* the password for APN, or NULL */
1706 char* password;
1707 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1708 int type;
1709 /* the period in seconds to limit the maximum connections */
1710 int maxConnsTime;
1711 /* the maximum connections during maxConnsTime */
1712 int maxConns;
1713 /** the required wait time in seconds after a successful UE initiated
1714 * disconnect of a given PDN connection before the device can send
1715 * a new PDN connection request for that given PDN
1716 */
1717 int waitTime;
1718 /* true to enable the profile, 0 to disable, 1 to enable */
1719 int enabled;
1720} RIL_DataProfileInfo;
Wink Savillec29360a2014-07-13 05:17:28 -07001721
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001722/* Tx Power Levels */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001723#define RIL_NUM_TX_POWER_LEVELS 5
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001724
1725typedef struct {
1726
1727 /* period (in ms) when modem is power collapsed */
1728 uint32_t sleep_mode_time_ms;
1729
1730 /* period (in ms) when modem is awake and in idle mode*/
1731 uint32_t idle_mode_time_ms;
1732
1733 /* period (in ms) for which Tx is active */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001734 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001735
1736 /* period (in ms) for which Rx is active */
1737 uint32_t rx_mode_time_ms;
1738} RIL_ActivityStatsInfo;
1739
Wink Savillec29360a2014-07-13 05:17:28 -07001740/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001741 * RIL_REQUEST_GET_SIM_STATUS
1742 *
1743 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -07001744 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001745 * "data" is NULL
1746 *
Wink Savillefd729372011-02-22 16:19:39 -08001747 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001748 *
1749 * Valid errors:
1750 * Must never fail
1751 */
1752#define RIL_REQUEST_GET_SIM_STATUS 1
1753
1754/**
1755 * RIL_REQUEST_ENTER_SIM_PIN
1756 *
John Wang309ac292009-07-30 14:53:23 -07001757 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001758 *
1759 * "data" is const char **
1760 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001761 * ((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 -08001762 *
jsh593c9102009-06-24 16:13:44 -07001763 * "response" is int *
1764 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001765 *
1766 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001767 *
1768 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001769 * RADIO_NOT_AVAILABLE (radio resetting)
1770 * GENERIC_FAILURE
1771 * PASSWORD_INCORRECT
1772 */
1773
1774#define RIL_REQUEST_ENTER_SIM_PIN 2
1775
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001776/**
1777 * RIL_REQUEST_ENTER_SIM_PUK
1778 *
Wink Saville7f856802009-06-09 10:23:37 -07001779 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001780 *
1781 * "data" is const char **
1782 * ((const char **)data)[0] is PUK value
1783 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001784 * ((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 -08001785 *
jsh593c9102009-06-24 16:13:44 -07001786 * "response" is int *
1787 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001788 *
1789 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001790 *
1791 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001792 * RADIO_NOT_AVAILABLE (radio resetting)
1793 * GENERIC_FAILURE
1794 * PASSWORD_INCORRECT
1795 * (PUK is invalid)
1796 */
1797
1798#define RIL_REQUEST_ENTER_SIM_PUK 3
1799
1800/**
1801 * RIL_REQUEST_ENTER_SIM_PIN2
1802 *
1803 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
1804 * returned as a a failure from a previous operation.
1805 *
1806 * "data" is const char **
1807 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001808 * ((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 -08001809 *
jsh593c9102009-06-24 16:13:44 -07001810 * "response" is int *
1811 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001812 *
1813 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001814 *
1815 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001816 * RADIO_NOT_AVAILABLE (radio resetting)
1817 * GENERIC_FAILURE
1818 * PASSWORD_INCORRECT
1819 */
1820
1821#define RIL_REQUEST_ENTER_SIM_PIN2 4
1822
1823/**
1824 * RIL_REQUEST_ENTER_SIM_PUK2
1825 *
Wink Saville7f856802009-06-09 10:23:37 -07001826 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001827 *
1828 * "data" is const char **
1829 * ((const char **)data)[0] is PUK2 value
1830 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001831 * ((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 -08001832 *
jsh593c9102009-06-24 16:13:44 -07001833 * "response" is int *
1834 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001835 *
1836 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001837 *
1838 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001839 * RADIO_NOT_AVAILABLE (radio resetting)
1840 * GENERIC_FAILURE
1841 * PASSWORD_INCORRECT
1842 * (PUK2 is invalid)
1843 */
1844
1845#define RIL_REQUEST_ENTER_SIM_PUK2 5
1846
1847/**
1848 * RIL_REQUEST_CHANGE_SIM_PIN
1849 *
Wink Saville7f856802009-06-09 10:23:37 -07001850 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001851 *
1852 * "data" is const char **
1853 * ((const char **)data)[0] is old PIN value
1854 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001855 * ((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 -08001856 *
jsh593c9102009-06-24 16:13:44 -07001857 * "response" is int *
1858 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001859 *
1860 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001861 *
1862 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001863 * RADIO_NOT_AVAILABLE (radio resetting)
1864 * GENERIC_FAILURE
1865 * PASSWORD_INCORRECT
1866 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001867 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001868 */
1869
1870#define RIL_REQUEST_CHANGE_SIM_PIN 6
1871
1872
1873/**
1874 * RIL_REQUEST_CHANGE_SIM_PIN2
1875 *
Wink Saville7f856802009-06-09 10:23:37 -07001876 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001877 *
1878 * "data" is const char **
1879 * ((const char **)data)[0] is old PIN2 value
1880 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001881 * ((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 -08001882 *
jsh593c9102009-06-24 16:13:44 -07001883 * "response" is int *
1884 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001885 *
1886 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001887 *
1888 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001889 * RADIO_NOT_AVAILABLE (radio resetting)
1890 * GENERIC_FAILURE
1891 * PASSWORD_INCORRECT
1892 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001893 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001894 */
1895
1896#define RIL_REQUEST_CHANGE_SIM_PIN2 7
1897
1898/**
1899 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
1900 *
1901 * Requests that network personlization be deactivated
1902 *
1903 * "data" is const char **
1904 * ((const char **)(data))[0]] is network depersonlization code
1905 *
jsh593c9102009-06-24 16:13:44 -07001906 * "response" is int *
1907 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001908 *
1909 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001910 *
1911 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001912 * RADIO_NOT_AVAILABLE (radio resetting)
1913 * GENERIC_FAILURE
1914 * PASSWORD_INCORRECT
1915 * (code is invalid)
1916 */
1917
1918#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
1919
1920/**
Wink Saville7f856802009-06-09 10:23:37 -07001921 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001922 *
1923 * Requests current call list
1924 *
1925 * "data" is NULL
1926 *
1927 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07001928 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001929 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001930 *
1931 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001932 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07001933 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001934 * GENERIC_FAILURE
1935 * (request will be made again in a few hundred msec)
1936 */
1937
1938#define RIL_REQUEST_GET_CURRENT_CALLS 9
1939
1940
Wink Saville7f856802009-06-09 10:23:37 -07001941/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001942 * RIL_REQUEST_DIAL
1943 *
1944 * Initiate voice call
1945 *
1946 * "data" is const RIL_Dial *
1947 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001948 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001949 * This method is never used for supplementary service codes
1950 *
1951 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001952 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001953 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00001954 * DIAL_MODIFIED_TO_USSD
1955 * DIAL_MODIFIED_TO_SS
1956 * DIAL_MODIFIED_TO_DIAL
Ajay Nambi10345892016-03-19 09:02:28 -07001957 * INVALID_ARGUMENTS
1958 * NO_MEMORY
1959 * INVALID_STATE
1960 * NO_RESOURCES
1961 * INTERNAL_ERR
1962 * FDN_CHECK_FAILURE
1963 * MODEM_ERR
1964 * NO_SUBSCRIPTION
1965 * NO_NETWORK_FOUND
1966 * INVALID_CALL_ID
1967 * DEVICE_IN_USE
1968 * MODE_NOT_SUPPORTED
1969 * ABORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001970 * GENERIC_FAILURE
1971 */
1972#define RIL_REQUEST_DIAL 10
1973
1974/**
1975 * RIL_REQUEST_GET_IMSI
1976 *
1977 * Get the SIM IMSI
1978 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08001979 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001980 *
Wink Savillec0114b32011-02-18 10:14:07 -08001981 * "data" is const char **
1982 * ((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 -08001983 * "response" is a const char * containing the IMSI
1984 *
1985 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001986 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001987 * RADIO_NOT_AVAILABLE (radio resetting)
1988 * GENERIC_FAILURE
1989 */
1990
1991#define RIL_REQUEST_GET_IMSI 11
1992
1993/**
1994 * RIL_REQUEST_HANGUP
1995 *
1996 * Hang up a specific line (like AT+CHLD=1x)
1997 *
John Wang06bae4b2010-11-18 16:37:09 -08001998 * After this HANGUP request returns, RIL should show the connection is NOT
1999 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2000 *
Wink Saville7f856802009-06-09 10:23:37 -07002001 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002002 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002003 *
2004 * "response" is NULL
2005 *
2006 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002007 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002008 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002009 * INVALID_ARGUMENTS
2010 * NO_MEMORY
2011 * INVALID_STATE
2012 * MODEM_ERR
2013 * INTERNAL_ERR
2014 * NO_MEMORY
2015 * INVALID_CALL_ID
2016 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002017 * GENERIC_FAILURE
2018 */
2019
2020#define RIL_REQUEST_HANGUP 12
2021
2022/**
2023 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
2024 *
2025 * Hang up waiting or held (like AT+CHLD=0)
2026 *
John Wang06bae4b2010-11-18 16:37:09 -08002027 * After this HANGUP request returns, RIL should show the connection is NOT
2028 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2029 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002030 * "data" is NULL
2031 * "response" is NULL
2032 *
2033 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002034 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002035 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002036 * INVALID_STATE
2037 * NO_MEMORY
2038 * MODEM_ERR
2039 * INTERNAL_ERR
2040 * NO_MEMORY
2041 * INVALID_CALL_ID
2042 * NO_RESOURCES
2043 * OPERATION_NOT_ALLOWED
2044 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002045 * GENERIC_FAILURE
2046 */
2047
2048#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
2049
2050/**
2051 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
2052 *
2053 * Hang up waiting or held (like AT+CHLD=1)
2054 *
John Wang06bae4b2010-11-18 16:37:09 -08002055 * After this HANGUP request returns, RIL should show the connection is NOT
2056 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2057 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002058 * "data" is NULL
2059 * "response" is NULL
2060 *
2061 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002062 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002063 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002064 * INVALID_STATE
2065 * NO_MEMORY
2066 * MODEM_ERR
2067 * INTERNAL_ERR
2068 * INVALID_CALL_ID
2069 * OPERATION_NOT_ALLOWED
2070 * INVALID_ARGUMENTS
2071 * NO_RESOURCES
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002072 * GENERIC_FAILURE
2073 */
2074
2075#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
2076
2077/**
2078 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
2079 *
2080 * Switch waiting or holding call and active call (like AT+CHLD=2)
2081 *
2082 * State transitions should be is follows:
2083 *
2084 * If call 1 is waiting and call 2 is active, then if this re
2085 *
2086 * BEFORE AFTER
2087 * Call 1 Call 2 Call 1 Call 2
2088 * ACTIVE HOLDING HOLDING ACTIVE
2089 * ACTIVE WAITING HOLDING ACTIVE
2090 * HOLDING WAITING HOLDING ACTIVE
2091 * ACTIVE IDLE HOLDING IDLE
2092 * IDLE IDLE IDLE IDLE
2093 *
2094 * "data" is NULL
2095 * "response" is NULL
2096 *
2097 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002098 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002099 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002100 * INVALID_STATE
2101 * NO_MEMORY
2102 * MODEM_ERR
2103 * INTERNAL_ERR
2104 * INVALID_STATE
2105 * INVALID_ARGUMENTS
2106 * INVALID_CALL_ID
2107 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002108 * GENERIC_FAILURE
2109 */
2110
2111#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
2112#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
2113
2114/**
2115 * RIL_REQUEST_CONFERENCE
2116 *
2117 * Conference holding and active (like AT+CHLD=3)
2118
2119 * "data" is NULL
2120 * "response" is NULL
2121 *
2122 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002123 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002124 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002125 * NO_MEMORY
2126 * MODEM_ERR
2127 * INTERNAL_ERR
2128 * INVALID_STATE
2129 * INVALID_CALL_ID
2130 * INVALID_ARGUMENTS
2131 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002132 * GENERIC_FAILURE
2133 */
2134#define RIL_REQUEST_CONFERENCE 16
2135
2136/**
2137 * RIL_REQUEST_UDUB
2138 *
Wink Saville7f856802009-06-09 10:23:37 -07002139 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002140 * waiting call answer)(RIL_BasicRequest r);
2141 *
2142 * "data" is NULL
2143 * "response" is NULL
2144 *
2145 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002146 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002147 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002148 * INVALID_STATE
2149 * NO_RESOURCES
2150 * NO_MEMORY
2151 * MODEM_ERR
2152 * INTERNAL_ERR
2153 * INVALID_CALL_ID
2154 * OPERATION_NOT_ALLOWED
2155 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002156 * GENERIC_FAILURE
2157 */
2158#define RIL_REQUEST_UDUB 17
2159
2160/**
2161 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2162 *
2163 * Requests the failure cause code for the most recently terminated call
2164 *
2165 * "data" is NULL
2166 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -07002167 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002168 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
2169 * failure reasons are derived from the possible call failure scenarios
2170 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002171 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08002172 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
2173 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
2174 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002175 * If the implementation does not have access to the exact cause codes,
2176 * then it should return one of the values listed in RIL_LastCallFailCause,
2177 * as the UI layer needs to distinguish these cases for tone generation or
2178 * error notification.
2179 *
2180 * Valid errors:
2181 * SUCCESS
2182 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002183 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002184 * GENERIC_FAILURE
2185 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002186 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002187 */
2188#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
2189
2190/**
2191 * RIL_REQUEST_SIGNAL_STRENGTH
2192 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002193 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002194 *
2195 * Must succeed if radio is on.
2196 *
2197 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07002198 *
2199 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002200 *
2201 * Valid errors:
2202 * SUCCESS
2203 * RADIO_NOT_AVAILABLE
2204 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002205#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07002206
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002207/**
Wink Savillec0114b32011-02-18 10:14:07 -08002208 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002209 *
2210 * Request current registration state
2211 *
2212 * "data" is NULL
2213 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -07002214 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -07002215 * 0 - Not registered, MT is not currently searching
2216 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07002217 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -07002218 * 2 - Not registered, but MT is currently searching
2219 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07002220 * 3 - Registration denied
2221 * 4 - Unknown
2222 * 5 - Registered, roaming
John Wang7f8ded12010-01-21 15:07:28 -08002223 * 10 - Same as 0, but indicates that emergency calls
2224 * are enabled.
2225 * 12 - Same as 2, but indicates that emergency calls
2226 * are enabled.
2227 * 13 - Same as 3, but indicates that emergency calls
2228 * are enabled.
2229 * 14 - Same as 4, but indicates that emergency calls
2230 * are enabled.
2231 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002232 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
2233 * NULL if not.Valid LAC are 0x0000 - 0xffff
2234 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
2235 * NULL if not.
2236 * Valid CID are 0x00000000 - 0xffffffff
2237 * In GSM, CID is Cell ID (see TS 27.007)
2238 * in 16 bits
2239 * In UMTS, CID is UMTS Cell Identity
2240 * (see TS 25.331) in 28 bits
Wink Saville43808972011-01-13 17:39:51 -08002241 * ((const char **)response)[3] indicates the available voice radio technology,
2242 * valid values as defined by RIL_RadioTechnology.
Wink Saville1b5fd232009-04-22 14:50:00 -07002243 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
2244 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07002245 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07002246 * ((const char **)response)[5] is Base Station latitude if registered on a
2247 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07002248 * latitude is a decimal number as specified in
2249 * 3GPP2 C.S0005-A v6.0. It is represented in
2250 * units of 0.25 seconds and ranges from -1296000
2251 * to 1296000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08002252 * to a range of -90 to +90 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07002253 * ((const char **)response)[6] is Base Station longitude if registered on a
2254 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07002255 * longitude is a decimal number as specified in
2256 * 3GPP2 C.S0005-A v6.0. It is represented in
2257 * units of 0.25 seconds and ranges from -2592000
2258 * to 2592000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08002259 * to a range of -180 to +180 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07002260 * ((const char **)response)[7] is concurrent services support indicator if
2261 * registered on a CDMA system 0-1.
2262 * 0 - Concurrent services not supported,
2263 * 1 - Concurrent services supported
2264 * ((const char **)response)[8] is System ID if registered on a CDMA system or
2265 * NULL if not. Valid System ID are 0 - 32767
2266 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
2267 * NULL if not. Valid System ID are 0 - 65535
2268 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002269 * on a CDMA or EVDO system or NULL if not. Valid values
Wink Saville1b5fd232009-04-22 14:50:00 -07002270 * are 0-255.
2271 * ((const char **)response)[11] indicates whether the current system is in the
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002272 * PRL if registered on a CDMA or EVDO system or NULL if
Wink Saville1b5fd232009-04-22 14:50:00 -07002273 * not. 0=not in the PRL, 1=in the PRL
2274 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002275 * if registered on a CDMA or EVDO system or NULL if not.
Wink Saville1b5fd232009-04-22 14:50:00 -07002276 * Valid values are 0-255.
2277 * ((const char **)response)[13] if registration state is 3 (Registration
2278 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07002279 * registration was denied. See 3GPP TS 24.008,
2280 * 10.5.3.6 and Annex G.
2281 * 0 - General
2282 * 1 - Authentication Failure
2283 * 2 - IMSI unknown in HLR
2284 * 3 - Illegal MS
2285 * 4 - Illegal ME
2286 * 5 - PLMN not allowed
2287 * 6 - Location area not allowed
2288 * 7 - Roaming not allowed
2289 * 8 - No Suitable Cells in this Location Area
2290 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07002291 * 10 - Persistent location update reject
Wink Savillec0114b32011-02-18 10:14:07 -08002292 * 11 - PLMN not allowed
2293 * 12 - Location area not allowed
2294 * 13 - Roaming not allowed in this Location Area
2295 * 15 - No Suitable Cells in this Location Area
2296 * 17 - Network Failure
2297 * 20 - MAC Failure
2298 * 21 - Sync Failure
2299 * 22 - Congestion
2300 * 23 - GSM Authentication unacceptable
2301 * 25 - Not Authorized for this CSG
2302 * 32 - Service option not supported
2303 * 33 - Requested service option not subscribed
2304 * 34 - Service option temporarily out of order
2305 * 38 - Call cannot be identified
2306 * 48-63 - Retry upon entry into a new cell
2307 * 95 - Semantically incorrect message
2308 * 96 - Invalid mandatory information
2309 * 97 - Message type non-existent or not implemented
Jonathan Basseri903b8b22016-08-29 16:15:57 -07002310 * 98 - Message type not compatible with protocol state
Wink Savillec0114b32011-02-18 10:14:07 -08002311 * 99 - Information element non-existent or not implemented
2312 * 100 - Conditional IE error
2313 * 101 - Message not compatible with protocol state
2314 * 111 - Protocol error, unspecified
jshca5e3472010-06-23 21:53:24 -07002315 * ((const char **)response)[14] is the Primary Scrambling Code of the current
2316 * cell as described in TS 25.331, in hexadecimal
2317 * format, or NULL if unknown or not registered
2318 * to a UMTS network.
Wink Saville1b5fd232009-04-22 14:50:00 -07002319 *
2320 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002321 * as "out of service" in the Android telephony system
2322 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002323 * Registration state 3 can be returned if Location Update Reject
2324 * (with cause 17 - Network Failure) is received repeatedly from the network,
2325 * to facilitate "managed roaming"
2326 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002327 * Valid errors:
2328 * SUCCESS
2329 * RADIO_NOT_AVAILABLE
2330 * GENERIC_FAILURE
2331 */
Wink Savillec0114b32011-02-18 10:14:07 -08002332#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002333
2334/**
Wink Savillec0114b32011-02-18 10:14:07 -08002335 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002336 *
Wink Savillec0114b32011-02-18 10:14:07 -08002337 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002338 *
2339 * "data" is NULL
2340 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08002341 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002342 * ((const char **)response)[1] is LAC if registered or NULL if not
2343 * ((const char **)response)[2] is CID if registered or NULL if not
Wink Saville43808972011-01-13 17:39:51 -08002344 * ((const char **)response)[3] indicates the available data radio technology,
2345 * valid values as defined by RIL_RadioTechnology.
Wink Savillec0114b32011-02-18 10:14:07 -08002346 * ((const char **)response)[4] if registration state is 3 (Registration
2347 * denied) this is an enumerated reason why
2348 * registration was denied. See 3GPP TS 24.008,
2349 * Annex G.6 "Additonal cause codes for GMM".
2350 * 7 == GPRS services not allowed
2351 * 8 == GPRS services and non-GPRS services not allowed
2352 * 9 == MS identity cannot be derived by the network
2353 * 10 == Implicitly detached
2354 * 14 == GPRS services not allowed in this PLMN
2355 * 16 == MSC temporarily not reachable
2356 * 40 == No PDP context activated
2357 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
2358 * established using RIL_REQUEST_SETUP_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002359 *
Wink Savilleae679532012-12-03 14:59:45 -08002360 * The values at offsets 6..10 are optional LTE location information in decimal.
2361 * If a value is unknown that value may be NULL. If all values are NULL,
2362 * none need to be present.
Wink Savilleea51a9d2012-09-15 07:54:06 -07002363 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
2364 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
2365 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
2366 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
2367 * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
2368 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002369 * LAC and CID are in hexadecimal format.
2370 * valid LAC are 0x0000 - 0xffff
2371 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07002372 *
2373 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002374 * as "out of service" in the Android telephony system
2375 *
2376 * Valid errors:
2377 * SUCCESS
2378 * RADIO_NOT_AVAILABLE
2379 * GENERIC_FAILURE
2380 */
Wink Savillec0114b32011-02-18 10:14:07 -08002381#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002382
2383/**
2384 * RIL_REQUEST_OPERATOR
2385 *
2386 * Request current operator ONS or EONS
2387 *
2388 * "data" is NULL
2389 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07002390 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002391 * or NULL if unregistered
2392 *
Wink Saville7f856802009-06-09 10:23:37 -07002393 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002394 * or NULL if unregistered
2395 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2396 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07002397 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002398 * Valid errors:
2399 * SUCCESS
2400 * RADIO_NOT_AVAILABLE
2401 * GENERIC_FAILURE
2402 */
2403#define RIL_REQUEST_OPERATOR 22
2404
2405/**
2406 * RIL_REQUEST_RADIO_POWER
2407 *
2408 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07002409 * If the radio is is turned off/on the radio modem subsystem
2410 * is expected return to an initialized state. For instance,
2411 * any voice and data calls will be terminated and all associated
2412 * lists emptied.
2413 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002414 * "data" is int *
2415 * ((int *)data)[0] is > 0 for "Radio On"
2416 * ((int *)data)[0] is == 0 for "Radio Off"
2417 *
2418 * "response" is NULL
2419 *
2420 * Turn radio on if "on" > 0
2421 * Turn radio off if "on" == 0
2422 *
2423 * Valid errors:
2424 * SUCCESS
2425 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002426 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002427 * GENERIC_FAILURE
2428 */
2429#define RIL_REQUEST_RADIO_POWER 23
2430
2431/**
2432 * RIL_REQUEST_DTMF
2433 *
2434 * Send a DTMF tone
2435 *
2436 * If the implementation is currently playing a tone requested via
2437 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2438 * should be played instead
2439 *
jsh602f80f2009-07-10 15:44:37 -07002440 * "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 -08002441 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002442 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002443 * FIXME should this block/mute microphone?
2444 * How does this interact with local DTMF feedback?
2445 *
2446 * Valid errors:
2447 * SUCCESS
2448 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002449 * INVALID_ARGUMENTS
2450 * NO_RESOURCES
2451 * NO_MEMORY
2452 * MODEM_ERR
2453 * INTERNAL_ERR
2454 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002455 * GENERIC_FAILURE
2456 *
2457 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2458 *
2459 */
2460#define RIL_REQUEST_DTMF 24
2461
2462/**
2463 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07002464 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002465 * Send an SMS message
2466 *
2467 * "data" is const char **
2468 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2469 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2470 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2471 * less the SMSC address
2472 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2473 *
2474 * "response" is a const RIL_SMS_Response *
2475 *
2476 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002477 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002478 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2479 *
2480 * Valid errors:
2481 * SUCCESS
2482 * RADIO_NOT_AVAILABLE
2483 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07002484 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08002485 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002486 * INVALID_STATE
2487 * INVALID_ARGUMENTS
2488 * NO_MEMORY
2489 * REQUEST_RATE_LIMITED
2490 * INVALID_SMS_FORMAT
2491 * SYSTEM_ERR
2492 * ENCODING_ERR
2493 * INVALID_SMSC_ADDRESS
2494 * MODEM_ERR
2495 * NETWORK_ERR
2496 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002497 * GENERIC_FAILURE
2498 *
2499 * FIXME how do we specify TP-Message-Reference if we need to resend?
2500 */
2501#define RIL_REQUEST_SEND_SMS 25
2502
2503
2504/**
2505 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07002506 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002507 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2508 * except that more messages are expected to be sent soon. If possible,
2509 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2510 *
2511 * "data" is const char **
2512 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2513 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2514 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2515 * less the SMSC address
2516 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2517 *
2518 * "response" is a const RIL_SMS_Response *
2519 *
2520 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002521 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002522 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2523 *
2524 * Valid errors:
2525 * SUCCESS
2526 * RADIO_NOT_AVAILABLE
2527 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08002528 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002529 * INVALID_STATE
2530 * INVALID_ARGUMENTS
2531 * NO_MEMORY
2532 * INVALID_SMS_FORMAT
2533 * SYSTEM_ERR
2534 * REQUEST_RATE_LIMITED
2535 * FDN_CHECK_FAILURE
2536 * MODEM_ERR
2537 * NETWORK_ERR
2538 * ENCODING_ERR
2539 * INVALID_SMSC_ADDRESS
2540 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002541 * GENERIC_FAILURE
2542 *
2543 */
2544#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2545
2546
2547/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002548 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002549 *
Wink Saville29487ef2011-04-15 09:15:31 -07002550 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2551 * return success it is added to the list of data calls and a
2552 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2553 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2554 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2555 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002556 *
Wink Saville43808972011-01-13 17:39:51 -08002557 * The RIL is expected to:
2558 * - Create one data call context.
2559 * - Create and configure a dedicated interface for the context
2560 * - The interface must be point to point.
2561 * - The interface is configured with one or more addresses and
2562 * is capable of sending and receiving packets. The prefix length
2563 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2564 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08002565 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08002566 * number of simultaneous data call contexts.
2567 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002568 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08002569 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2570 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07002571 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07002572 * ((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 -07002573 * override the one in the profile. NULL indicates no APN overrride.
2574 * ((const char **)data)[3] is the username for APN, or NULL
2575 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07002576 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2577 * 0 => PAP and CHAP is never performed.
2578 * 1 => PAP may be performed; CHAP is never performed.
2579 * 2 => CHAP may be performed; PAP is never performed.
2580 * 3 => PAP / CHAP may be performed - baseband dependent.
Wink Savillec0114b32011-02-18 10:14:07 -08002581 * ((const char **)data)[6] is the connection type to request must be one of the
2582 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07002583 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Wink Savillec0114b32011-02-18 10:14:07 -08002584 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002585 *
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -07002586 * "response" is a RIL_Data_Call_Response_v11
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002587 *
2588 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07002589 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002590 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08002591 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08002592 * the RIL_Data_Call_Response_v6.status containing the actual status.
2593 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08002594 *
2595 * Other errors could include:
2596 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2597 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002598 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002599 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002600 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002601#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002602
2603
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002604/**
2605 * RIL_REQUEST_SIM_IO
2606 *
2607 * Request SIM I/O operation.
2608 * This is similar to the TS 27.007 "restricted SIM" operation
2609 * where it assumes all of the EF selection will be done by the
2610 * callee.
2611 *
Wink Savillefd729372011-02-22 16:19:39 -08002612 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002613 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2614 * or may specify a PIN2 for operations that require a PIN2 (eg
2615 * updating FDN records)
2616 *
2617 * "response" is a const RIL_SIM_IO_Response *
2618 *
2619 * Arguments and responses that are unused for certain
2620 * values of "command" should be ignored or set to NULL
2621 *
2622 * Valid errors:
2623 * SUCCESS
2624 * RADIO_NOT_AVAILABLE
2625 * GENERIC_FAILURE
2626 * SIM_PIN2
2627 * SIM_PUK2
2628 */
2629#define RIL_REQUEST_SIM_IO 28
2630
2631/**
2632 * RIL_REQUEST_SEND_USSD
2633 *
2634 * Send a USSD message
2635 *
2636 * If a USSD session already exists, the message should be sent in the
2637 * context of that session. Otherwise, a new session should be created.
2638 *
2639 * The network reply should be reported via RIL_UNSOL_ON_USSD
2640 *
2641 * Only one USSD session may exist at a time, and the session is assumed
2642 * to exist until:
2643 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2644 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2645 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2646 *
2647 * "data" is a const char * containing the USSD request in UTF-8 format
2648 * "response" is NULL
2649 *
2650 * Valid errors:
2651 * SUCCESS
2652 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07002653 * FDN_CHECK_FAILURE
Amit Mahajan54563d32014-11-22 00:54:49 +00002654 * USSD_MODIFIED_TO_DIAL
2655 * USSD_MODIFIED_TO_SS
2656 * USSD_MODIFIED_TO_USSD
twen.changdf7add02016-03-04 18:27:48 +08002657 * SIM_BUSY
2658 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002659 * INVALID_ARGUMENTS
2660 * NO_MEMORY
2661 * MODEM_ERR
2662 * INTERNAL_ERR
2663 * ABORTED
2664 * SYSTEM_ERR
2665 * INVALID_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002666 * GENERIC_FAILURE
2667 *
2668 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2669 */
2670
2671#define RIL_REQUEST_SEND_USSD 29
2672
2673/**
2674 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07002675 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002676 * Cancel the current USSD session if one exists
2677 *
2678 * "data" is null
2679 * "response" is NULL
2680 *
2681 * Valid errors:
2682 * SUCCESS
2683 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002684 * SIM_BUSY
2685 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002686 * MODEM_ERR
2687 * INTERNAL_ERR
2688 * NO_MEMORY
2689 * INVALID_STATE
Wink Saville7f856802009-06-09 10:23:37 -07002690 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002691 */
2692
2693#define RIL_REQUEST_CANCEL_USSD 30
2694
Wink Saville7f856802009-06-09 10:23:37 -07002695/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002696 * RIL_REQUEST_GET_CLIR
2697 *
2698 * Gets current CLIR status
2699 * "data" is NULL
2700 * "response" is int *
2701 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2702 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2703 *
2704 * Valid errors:
2705 * SUCCESS
2706 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002707 * SS_MODIFIED_TO_DIAL
2708 * SS_MODIFIED_TO_USSD
2709 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002710 * NO_MEMORY
2711 * MODEM_ERR
2712 * INTERNAL_ERR
2713 * FDN_CHECK_FAILURE
2714 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002715 * GENERIC_FAILURE
2716 */
2717#define RIL_REQUEST_GET_CLIR 31
2718
2719/**
2720 * RIL_REQUEST_SET_CLIR
2721 *
2722 * "data" is int *
2723 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2724 *
2725 * "response" is NULL
2726 *
2727 * Valid errors:
2728 * SUCCESS
2729 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002730 * SS_MODIFIED_TO_DIAL
2731 * SS_MODIFIED_TO_USSD
2732 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002733 * INVALID_ARGUMENTS
2734 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002735 * GENERIC_FAILURE
2736 */
2737#define RIL_REQUEST_SET_CLIR 32
2738
2739/**
2740 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2741 *
2742 * "data" is const RIL_CallForwardInfo *
2743 *
2744 * "response" is const RIL_CallForwardInfo **
2745 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2746 * each distinct registered phone number.
2747 *
2748 * For example, if data is forwarded to +18005551212 and voice is forwarded
2749 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07002750 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002751 * If, however, both data and voice are forwarded to +18005551212, then
2752 * a single RIL_CallForwardInfo can be returned with the service class
2753 * set to "data + voice = 3")
2754 *
2755 * Valid errors:
2756 * SUCCESS
2757 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002758 * SS_MODIFIED_TO_DIAL
2759 * SS_MODIFIED_TO_USSD
2760 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002761 * INVALID_ARGUMENTS
2762 * NO_MEMORY
2763 * SYSTEM_ERR
2764 * MODEM_ERR
2765 * INTERNAL_ERR
2766 * NO_MEMORY
2767 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002768 * GENERIC_FAILURE
2769 */
2770#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2771
2772
2773/**
2774 * RIL_REQUEST_SET_CALL_FORWARD
2775 *
2776 * Configure call forward rule
2777 *
2778 * "data" is const RIL_CallForwardInfo *
2779 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002780 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002781 * Valid errors:
2782 * SUCCESS
2783 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002784 * SS_MODIFIED_TO_DIAL
2785 * SS_MODIFIED_TO_USSD
2786 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002787 * INVALID_ARGUMENTS
2788 * NO_MEMORY
2789 * SYSTEM_ERR
2790 * MODEM_ERR
2791 * INTERNAL_ERR
2792 * INVALID_STATE
2793 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002794 * GENERIC_FAILURE
2795 */
2796#define RIL_REQUEST_SET_CALL_FORWARD 34
2797
2798
2799/**
2800 * RIL_REQUEST_QUERY_CALL_WAITING
2801 *
2802 * Query current call waiting state
2803 *
2804 * "data" is const int *
2805 * ((const int *)data)[0] is the TS 27.007 service class to query.
2806 * "response" is a const int *
2807 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2808 *
2809 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2810 * must follow, with the TS 27.007 service class bit vector of services
2811 * for which call waiting is enabled.
2812 *
Wink Saville7f856802009-06-09 10:23:37 -07002813 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002814 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2815 * and voice and disabled for everything else
2816 *
2817 * Valid errors:
2818 * SUCCESS
2819 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002820 * SS_MODIFIED_TO_DIAL
2821 * SS_MODIFIED_TO_USSD
2822 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002823 * NO_MEMORY
2824 * MODEM_ERR
2825 * INTERNAL_ERR
2826 * NO_MEMORY
2827 * FDN_CHECK_FAILURE
2828 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002829 * GENERIC_FAILURE
2830 */
2831#define RIL_REQUEST_QUERY_CALL_WAITING 35
2832
2833
2834/**
2835 * RIL_REQUEST_SET_CALL_WAITING
2836 *
2837 * Configure current call waiting state
2838 *
2839 * "data" is const int *
2840 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2841 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2842 * services to modify
2843 * "response" is NULL
2844 *
2845 * Valid errors:
2846 * SUCCESS
2847 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002848 * SS_MODIFIED_TO_DIAL
2849 * SS_MODIFIED_TO_USSD
2850 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002851 * INVALID_ARGUMENTS
2852 * NO_MEMORY
2853 * MODEM_ERR
2854 * INTERNAL_ERR
2855 * INVALID_STATE
2856 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002857 * GENERIC_FAILURE
2858 */
2859#define RIL_REQUEST_SET_CALL_WAITING 36
2860
2861/**
2862 * RIL_REQUEST_SMS_ACKNOWLEDGE
2863 *
2864 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07002865 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002866 *
2867 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07002868 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002869 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07002870 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002871 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07002872 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
2873 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
2874 * capacity exceeded) and 0xFF (unspecified error) are
2875 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002876 *
2877 * "response" is NULL
2878 *
2879 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
2880 *
2881 * Valid errors:
2882 * SUCCESS
2883 * RADIO_NOT_AVAILABLE
2884 * GENERIC_FAILURE
2885 */
2886#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
2887
2888/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002889 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002890 *
2891 * Get the device IMEI, including check digit
2892 *
johnwangf8bc1672009-05-14 19:19:47 -07002893 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002894 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2895 *
2896 * "data" is NULL
2897 * "response" is a const char * containing the IMEI
2898 *
2899 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002900 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002901 * RADIO_NOT_AVAILABLE (radio resetting)
2902 * GENERIC_FAILURE
2903 */
2904
2905#define RIL_REQUEST_GET_IMEI 38
2906
2907/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002908 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002909 *
2910 * Get the device IMEISV, which should be two decimal digits
2911 *
johnwangf8bc1672009-05-14 19:19:47 -07002912 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002913 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2914 *
2915 * "data" is NULL
2916 * "response" is a const char * containing the IMEISV
2917 *
2918 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002919 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002920 * RADIO_NOT_AVAILABLE (radio resetting)
2921 * GENERIC_FAILURE
2922 */
2923
2924#define RIL_REQUEST_GET_IMEISV 39
2925
2926
2927/**
2928 * RIL_REQUEST_ANSWER
2929 *
2930 * Answer incoming call
2931 *
2932 * Will not be called for WAITING calls.
2933 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
2934 * instead
2935 *
2936 * "data" is NULL
2937 * "response" is NULL
2938 *
2939 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002940 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002941 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002942 * INVALID_STATE
2943 * NO_MEMORY
2944 * SYSTEM_ERR
2945 * MODEM_ERR
2946 * INTERNAL_ERR
2947 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002948 * GENERIC_FAILURE
2949 */
2950
2951#define RIL_REQUEST_ANSWER 40
2952
2953/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002954 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002955 *
Wink Saville29487ef2011-04-15 09:15:31 -07002956 * Deactivate packet data connection and remove from the
2957 * data call list if SUCCESS is returned. Any other return
2958 * values should also try to remove the call from the list,
2959 * but that may not be possible. In any event a
2960 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
2961 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
2962 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002963 *
2964 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07002965 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06002966 * ((char**)data)[1] indicating Disconnect Reason
2967 * 0 => No specific reason specified
2968 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07002969 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002970 * "response" is NULL
2971 *
2972 * Valid errors:
2973 * SUCCESS
2974 * RADIO_NOT_AVAILABLE
2975 * GENERIC_FAILURE
2976 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002977 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002978 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002979#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002980
2981/**
2982 * RIL_REQUEST_QUERY_FACILITY_LOCK
2983 *
2984 * Query the status of a facility lock state
2985 *
2986 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07002987 * ((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 -08002988 * (eg "AO" for BAOC, "SC" for SIM lock)
2989 * ((const char **)data)[1] is the password, or "" if not required
2990 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
2991 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08002992 * ((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 -08002993 * This is only applicable in the case of Fixed Dialing Numbers
2994 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002995 *
2996 * "response" is an int *
2997 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07002998 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002999 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07003000 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003001 *
3002 * Valid errors:
3003 * SUCCESS
3004 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003005 * SS_MODIFIED_TO_DIAL
3006 * SS_MODIFIED_TO_USSD
3007 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003008 * INVALID_ARGUMENTS
3009 * NO_MEMORY
3010 * INTERNAL_ERR
3011 * SYSTEM_ERR
3012 * MODEM_ERR
3013 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003014 * GENERIC_FAILURE
3015 *
3016 */
3017#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
3018
3019/**
3020 * RIL_REQUEST_SET_FACILITY_LOCK
3021 *
3022 * Enable/disable one facility lock
3023 *
3024 * "data" is const char **
3025 *
3026 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3027 * (eg "AO" for BAOC)
3028 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
3029 * ((const char **)data)[2] = password
3030 * ((const char **)data)[3] = string representation of decimal TS 27.007
3031 * service class bit vector. Eg, the string
3032 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08003033 * ((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 -08003034 * This is only applicable in the case of Fixed Dialing Numbers
3035 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003036 *
jsh593c9102009-06-24 16:13:44 -07003037 * "response" is int *
3038 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003039 *
3040 * Valid errors:
3041 * SUCCESS
3042 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003043 * SS_MODIFIED_TO_DIAL
3044 * SS_MODIFIED_TO_USSD
3045 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003046 * INVALID_ARGUMENTS
3047 * INTERNAL_ERR
3048 * NO_MEMORY
3049 * MODEM_ERR
3050 * INVALID_STATE
3051 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003052 * GENERIC_FAILURE
3053 *
3054 */
3055#define RIL_REQUEST_SET_FACILITY_LOCK 43
3056
3057/**
3058 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
3059 *
3060 * Change call barring facility password
3061 *
3062 * "data" is const char **
3063 *
3064 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3065 * (eg "AO" for BAOC)
3066 * ((const char **)data)[1] = old password
3067 * ((const char **)data)[2] = new password
3068 *
Wink Saville7f856802009-06-09 10:23:37 -07003069 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003070 *
3071 * Valid errors:
3072 * SUCCESS
3073 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003074 * SS_MODIFIED_TO_DIAL
3075 * SS_MODIFIED_TO_USSD
3076 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003077 * INVALID_ARGUMENTS
3078 * NO_MEMORY
3079 * MODEM_ERR
3080 * INTERNAL_ERR
3081 * SYSTEM_ERR
3082 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003083 * GENERIC_FAILURE
3084 *
3085 */
3086#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
3087
3088/**
3089 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
3090 *
3091 * Query current network selectin mode
3092 *
3093 * "data" is NULL
3094 *
3095 * "response" is int *
3096 * ((const int *)response)[0] is
3097 * 0 for automatic selection
3098 * 1 for manual selection
3099 *
3100 * Valid errors:
3101 * SUCCESS
3102 * RADIO_NOT_AVAILABLE
3103 * GENERIC_FAILURE
3104 *
3105 */
3106#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
3107
3108/**
3109 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
3110 *
3111 * Specify that the network should be selected automatically
3112 *
3113 * "data" is NULL
3114 * "response" is NULL
3115 *
Wink Saville7f856802009-06-09 10:23:37 -07003116 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003117 * and registered
3118 *
3119 * Valid errors:
3120 * SUCCESS
3121 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003122 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003123 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003124 * GENERIC_FAILURE
3125 *
John Wang75534472010-04-20 15:11:42 -07003126 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3127 * no retries needed, such as illegal SIM or ME.
3128 * Returns GENERIC_FAILURE for all other causes that might be
3129 * fixed by retries.
3130 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003131 */
3132#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
3133
3134/**
3135 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
3136 *
3137 * Manually select a specified network.
3138 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003139 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
3140 * "response" is NULL
3141 *
Wink Saville7f856802009-06-09 10:23:37 -07003142 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003143 * and registered
3144 *
3145 * Valid errors:
3146 * SUCCESS
3147 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003148 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003149 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003150 * GENERIC_FAILURE
3151 *
John Wang75534472010-04-20 15:11:42 -07003152 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3153 * no retries needed, such as illegal SIM or ME.
3154 * Returns GENERIC_FAILURE for all other causes that might be
3155 * fixed by retries.
3156 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003157 */
3158#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
3159
3160/**
3161 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
3162 *
3163 * Scans for available networks
3164 *
3165 * "data" is NULL
3166 * "response" is const char ** that should be an array of n*4 strings, where
3167 * n is the number of available networks
3168 * For each available network:
3169 *
Wink Saville7f856802009-06-09 10:23:37 -07003170 * ((const char **)response)[n+0] is long alpha ONS or EONS
3171 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003172 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
3173 * ((const char **)response)[n+3] is a string value of the status:
3174 * "unknown"
3175 * "available"
3176 * "current"
3177 * "forbidden"
3178 *
Wink Saville7f856802009-06-09 10:23:37 -07003179 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003180 * and registered
3181 *
3182 * Valid errors:
3183 * SUCCESS
3184 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003185 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003186 * GENERIC_FAILURE
3187 *
3188 */
3189#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
3190
3191/**
3192 * RIL_REQUEST_DTMF_START
3193 *
Wink Saville7f856802009-06-09 10:23:37 -07003194 * Start playing a DTMF tone. Continue playing DTMF tone until
3195 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003196 *
3197 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
3198 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07003199 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003200 * "data" is a char *
3201 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
3202 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003203 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003204 * Valid errors:
3205 * SUCCESS
3206 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003207 * INVALID_ARGUMENTS
3208 * NO_RESOURCES
3209 * NO_MEMORY
3210 * SYSTEM_ERR
3211 * MODEM_ERR
3212 * INTERNAL_ERR
3213 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003214 * GENERIC_FAILURE
3215 *
3216 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
3217 */
3218#define RIL_REQUEST_DTMF_START 49
3219
3220/**
3221 * RIL_REQUEST_DTMF_STOP
3222 *
3223 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07003224 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003225 * "data" is NULL
3226 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003227 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003228 * Valid errors:
3229 * SUCCESS
3230 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003231 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07003232 * NO_RESOURCES
3233 * NO_MEMORY
3234 * INVALID_ARGUMENTS
3235 * SYSTEM_ERR
3236 * MODEM_ERR
3237 * INTERNAL_ERR
3238 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003239 * GENERIC_FAILURE
3240 *
3241 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
3242 */
3243#define RIL_REQUEST_DTMF_STOP 50
3244
3245/**
3246 * RIL_REQUEST_BASEBAND_VERSION
3247 *
3248 * Return string value indicating baseband version, eg
3249 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07003250 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003251 * "data" is NULL
3252 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07003253 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003254 * Valid errors:
3255 * SUCCESS
3256 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003257 * EMPTY_RECORD
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003258 * GENERIC_FAILURE
3259 *
3260 */
3261#define RIL_REQUEST_BASEBAND_VERSION 51
3262
3263/**
3264 * RIL_REQUEST_SEPARATE_CONNECTION
3265 *
3266 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07003267 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003268 * as the only other member of the current (active) call
3269 *
3270 * Like AT+CHLD=2x
3271 *
3272 * See TS 22.084 1.3.8.2 (iii)
3273 * TS 22.030 6.5.5 "Entering "2X followed by send"
3274 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07003275 *
3276 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07003277 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
3278 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003279 * "response" is NULL
3280 *
3281 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003282 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003283 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003284 * INVALID_ARGUMENTS
3285 * INVALID_STATE
3286 * NO_RESOURCES
3287 * NO_MEMORY
3288 * SYSTEM_ERR
3289 * MODEM_ERR
3290 * INTERNAL_ERR
3291 * INVALID_CALL_ID
3292 * INVALID_STATE
3293 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003294 * GENERIC_FAILURE
3295 */
3296#define RIL_REQUEST_SEPARATE_CONNECTION 52
3297
3298
3299/**
3300 * RIL_REQUEST_SET_MUTE
3301 *
3302 * Turn on or off uplink (microphone) mute.
3303 *
3304 * Will only be sent while voice call is active.
3305 * Will always be reset to "disable mute" when a new voice call is initiated
3306 *
3307 * "data" is an int *
3308 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
3309 *
3310 * "response" is NULL
3311 *
3312 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003313 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003314 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi68900f52016-03-11 12:02:55 -08003315 * INVALID_ARGUMENTS
3316 * NO_MEMORY
3317 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003318 * GENERIC_FAILURE
3319 */
3320
3321#define RIL_REQUEST_SET_MUTE 53
3322
3323/**
3324 * RIL_REQUEST_GET_MUTE
3325 *
3326 * Queries the current state of the uplink mute setting
3327 *
3328 * "data" is NULL
3329 * "response" is an int *
3330 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
3331 *
3332 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003333 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003334 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00003335 * SS_MODIFIED_TO_DIAL
3336 * SS_MODIFIED_TO_USSD
3337 * SS_MODIFIED_TO_SS
Ajay Nambi68900f52016-03-11 12:02:55 -08003338 * NO_MEMORY
3339 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003340 * GENERIC_FAILURE
3341 */
3342
3343#define RIL_REQUEST_GET_MUTE 54
3344
3345/**
3346 * RIL_REQUEST_QUERY_CLIP
3347 *
3348 * Queries the status of the CLIP supplementary service
3349 *
3350 * (for MMI code "*#30#")
3351 *
3352 * "data" is NULL
3353 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07003354 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003355 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07003356 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003357 *
3358 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003359 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003360 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003361 * NO_MEMORY
3362 * SYSTEM_ERR
3363 * MODEM_ERR
3364 * INTERNAL_ERR
3365 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003366 * GENERIC_FAILURE
3367 */
3368
3369#define RIL_REQUEST_QUERY_CLIP 55
3370
3371/**
Wink Savillec0114b32011-02-18 10:14:07 -08003372 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
3373 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003374 *
3375 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07003376 * context or CDMA data connection active
3377 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003378 *
3379 * "data" is NULL
3380 *
3381 * "response" is a "int *"
3382 * ((int *)response)[0] is an integer cause code defined in TS 24.008
3383 * section 6.1.3.1.3 or close approximation
3384 *
3385 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07003386 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08003387 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003388 * cases for error notification
3389 * and potential retries.
3390 *
3391 * Valid errors:
3392 * SUCCESS
3393 * RADIO_NOT_AVAILABLE
3394 * GENERIC_FAILURE
3395 *
3396 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08003397 *
3398 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003399 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003400
Wink Savillef4c4d362009-04-02 01:37:03 -07003401#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003402
3403/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003404 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003405 *
Wink Saville29487ef2011-04-15 09:15:31 -07003406 * Returns the data call list. An entry is added when a
3407 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
3408 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
3409 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003410 *
3411 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08003412 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003413 *
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)
3417 * GENERIC_FAILURE
Wink Saville29487ef2011-04-15 09:15:31 -07003418 *
3419 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003420 */
3421
Wink Savillef4c4d362009-04-02 01:37:03 -07003422#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003423
3424/**
johnwangf8bc1672009-05-14 19:19:47 -07003425 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003426 *
3427 * Request a radio reset. The RIL implementation may postpone
3428 * the reset until after this request is responded to if the baseband
3429 * is presently busy.
3430 *
johnwangf8bc1672009-05-14 19:19:47 -07003431 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
3432 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003433 * "data" is NULL
3434 * "response" is NULL
3435 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003436 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003437 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003438 * RADIO_NOT_AVAILABLE (radio resetting)
3439 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07003440 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003441 */
3442
3443#define RIL_REQUEST_RESET_RADIO 58
3444
3445/**
3446 * RIL_REQUEST_OEM_HOOK_RAW
3447 *
3448 * This request reserved for OEM-specific uses. It passes raw byte arrays
3449 * back and forth.
3450 *
Wink Saville7f856802009-06-09 10:23:37 -07003451 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003452 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
3453 *
3454 * "data" is a char * of bytes copied from the byte[] data argument in java
3455 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07003456 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003457 * (byte[])(((AsyncResult)response.obj).result)
3458 *
Wink Saville7f856802009-06-09 10:23:37 -07003459 * An error response here will result in
3460 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003461 * (((AsyncResult)response.obj).exception) being an instance of
3462 * com.android.internal.telephony.gsm.CommandException
3463 *
3464 * Valid errors:
3465 * All
3466 */
3467
3468#define RIL_REQUEST_OEM_HOOK_RAW 59
3469
3470/**
3471 * RIL_REQUEST_OEM_HOOK_STRINGS
3472 *
3473 * This request reserved for OEM-specific uses. It passes strings
3474 * back and forth.
3475 *
Wink Saville7f856802009-06-09 10:23:37 -07003476 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003477 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
3478 *
3479 * "data" is a const char **, representing an array of null-terminated UTF-8
3480 * strings copied from the "String[] strings" argument to
3481 * invokeOemRilRequestStrings()
3482 *
3483 * "response" is a const char **, representing an array of null-terminated UTF-8
3484 * stings that will be returned via the caller's response message here:
3485 *
3486 * (String[])(((AsyncResult)response.obj).result)
3487 *
Wink Saville7f856802009-06-09 10:23:37 -07003488 * An error response here will result in
3489 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003490 * (((AsyncResult)response.obj).exception) being an instance of
3491 * com.android.internal.telephony.gsm.CommandException
3492 *
3493 * Valid errors:
3494 * All
3495 */
3496
3497#define RIL_REQUEST_OEM_HOOK_STRINGS 60
3498
3499/**
3500 * RIL_REQUEST_SCREEN_STATE
3501 *
3502 * Indicates the current state of the screen. When the screen is off, the
3503 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07003504 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
3505 * in an effort to conserve power. These notifications should resume when the
3506 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003507 *
3508 * "data" is int *
3509 * ((int *)data)[0] is == 1 for "Screen On"
3510 * ((int *)data)[0] is == 0 for "Screen Off"
3511 *
3512 * "response" is NULL
3513 *
3514 * Valid errors:
3515 * SUCCESS
3516 * GENERIC_FAILURE
3517 */
3518#define RIL_REQUEST_SCREEN_STATE 61
3519
3520
3521/**
3522 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
3523 *
3524 * Enables/disables supplementary service related notifications
3525 * from the network.
3526 *
3527 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3528 *
3529 * "data" is int *
3530 * ((int *)data)[0] is == 1 for notifications enabled
3531 * ((int *)data)[0] is == 0 for notifications disabled
3532 *
3533 * "response" is NULL
3534 *
3535 * Valid errors:
3536 * SUCCESS
3537 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003538 * SIM_BUSY
Ajay Nambi10345892016-03-19 09:02:28 -07003539 * INVALID_ARGUMENTS
3540 * NO_MEMORY
3541 * SYSTEM_ERR
3542 * MODEM_ERR
3543 * INTERNAL_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003544 * GENERIC_FAILURE
3545 *
3546 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3547 */
3548#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
3549
3550/**
3551 * RIL_REQUEST_WRITE_SMS_TO_SIM
3552 *
3553 * Stores a SMS message to SIM memory.
3554 *
3555 * "data" is RIL_SMS_WriteArgs *
3556 *
3557 * "response" is int *
3558 * ((const int *)response)[0] is the record index where the message is stored.
3559 *
3560 * Valid errors:
3561 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003562 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003563 * INVALID_ARGUMENTS
3564 * INVALID_SMS_FORMAT
3565 * INTERNAL_ERR
3566 * MODEM_ERR
3567 * ENCODING_ERR
3568 * NO_MEMORY
3569 * NO_RESOURCES
3570 * INVALID_MODEM_STATE
3571 * MODE_NOT_SUPPORTED
3572 * INVALID_SMSC_ADDRESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003573 * GENERIC_FAILURE
3574 *
3575 */
3576#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
3577
3578/**
3579 * RIL_REQUEST_DELETE_SMS_ON_SIM
3580 *
3581 * Deletes a SMS message from SIM memory.
3582 *
3583 * "data" is int *
3584 * ((int *)data)[0] is the record index of the message to delete.
3585 *
3586 * "response" is NULL
3587 *
3588 * Valid errors:
3589 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003590 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003591 * INVALID_ARGUMENTS
3592 * NO_MEMORY
3593 * REQUEST_RATE_LIMITED
3594 * SYSTEM_ERR
3595 * MODEM_ERR
3596 * NO_SUCH_ENTRY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003597 * GENERIC_FAILURE
3598 *
3599 */
3600#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
3601
3602/**
3603 * RIL_REQUEST_SET_BAND_MODE
3604 *
3605 * Assign a specified band for RF configuration.
3606 *
3607 * "data" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003608 * ((int *)data)[0] is a RIL_RadioBandMode
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003609 *
3610 * "response" is NULL
3611 *
3612 * Valid errors:
3613 * SUCCESS
3614 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003615 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003616 * GENERIC_FAILURE
Nathan Harold92839f12016-02-12 10:02:28 -08003617 *
3618 * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003619 */
3620#define RIL_REQUEST_SET_BAND_MODE 65
3621
3622/**
3623 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3624 *
3625 * Query the list of band mode supported by RF.
3626 *
3627 * "data" is NULL
3628 *
3629 * "response" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003630 * "response" points to an array of int's, the int[0] is the size of array;
3631 * subsequent values are a list of RIL_RadioBandMode listing supported modes.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003632 *
3633 * Valid errors:
3634 * SUCCESS
3635 * RADIO_NOT_AVAILABLE
3636 * GENERIC_FAILURE
3637 *
3638 * See also: RIL_REQUEST_SET_BAND_MODE
3639 */
3640#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
3641
3642/**
3643 * RIL_REQUEST_STK_GET_PROFILE
3644 *
3645 * Requests the profile of SIM tool kit.
3646 * The profile indicates the SAT/USAT features supported by ME.
3647 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
3648 *
3649 * "data" is NULL
3650 *
3651 * "response" is a const char * containing SAT/USAT profile
3652 * in hexadecimal format string starting with first byte of terminal profile
3653 *
3654 * Valid errors:
3655 * RIL_E_SUCCESS
3656 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3657 * RIL_E_GENERIC_FAILURE
3658 */
3659#define RIL_REQUEST_STK_GET_PROFILE 67
3660
3661/**
3662 * RIL_REQUEST_STK_SET_PROFILE
3663 *
3664 * Download the STK terminal profile as part of SIM initialization
3665 * procedure
3666 *
3667 * "data" is a const char * containing SAT/USAT profile
3668 * in hexadecimal format string starting with first byte of terminal profile
3669 *
3670 * "response" is NULL
3671 *
3672 * Valid errors:
3673 * RIL_E_SUCCESS
3674 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3675 * RIL_E_GENERIC_FAILURE
3676 */
3677#define RIL_REQUEST_STK_SET_PROFILE 68
3678
3679/**
3680 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
3681 *
3682 * Requests to send a SAT/USAT envelope command to SIM.
3683 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
3684 *
3685 * "data" is a const char * containing SAT/USAT command
3686 * in hexadecimal format string starting with command tag
3687 *
3688 * "response" is a const char * containing SAT/USAT response
3689 * in hexadecimal format string starting with first byte of response
3690 * (May be NULL)
3691 *
3692 * Valid errors:
3693 * RIL_E_SUCCESS
3694 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003695 * SIM_BUSY
3696 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003697 * RIL_E_GENERIC_FAILURE
3698 */
3699#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
3700
3701/**
3702 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
3703 *
3704 * Requests to send a terminal response to SIM for a received
3705 * proactive command
3706 *
3707 * "data" is a const char * containing SAT/USAT response
3708 * in hexadecimal format string starting with first byte of response data
3709 *
3710 * "response" is NULL
3711 *
3712 * Valid errors:
3713 * RIL_E_SUCCESS
3714 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003715 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003716 * RIL_E_GENERIC_FAILURE
3717 */
3718#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3719
3720/**
3721 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3722 *
3723 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3724 * been initialized by ME already. (We could see the call has been in the 'call
3725 * list') So, STK application needs to accept/reject the call according as user
3726 * operations.
3727 *
3728 * "data" is int *
3729 * ((int *)data)[0] is > 0 for "accept" the call setup
3730 * ((int *)data)[0] is == 0 for "reject" the call setup
3731 *
3732 * "response" is NULL
3733 *
3734 * Valid errors:
3735 * RIL_E_SUCCESS
3736 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003737 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003738 * RIL_E_GENERIC_FAILURE
3739 */
3740#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3741
3742/**
3743 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3744 *
3745 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07003746 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003747 * "data" is NULL
3748 * "response" is NULL
3749 *
3750 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003751 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003752 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003753 * INVALID_STATE
3754 * NO_RESOURCES
3755 * NO_MEMORY
3756 * INVALID_ARGUMENTS
3757 * SYSTEM_ERR
3758 * MODEM_ERR
3759 * INTERNAL_ERR
3760 * INVALID_CALL_ID
3761 * INVALID_STATE
3762 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003763 * GENERIC_FAILURE
3764 */
3765#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3766
3767/**
3768 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3769 *
3770 * Requests to set the preferred network type for searching and registering
3771 * (CS/PS domain, RAT, and operation mode)
3772 *
Wink Savillec0114b32011-02-18 10:14:07 -08003773 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003774 *
3775 * "response" is NULL
3776 *
3777 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07003778 * SUCCESS
3779 * RADIO_NOT_AVAILABLE (radio resetting)
3780 * GENERIC_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08003781 * OPERATION_NOT_ALLOWED
Wink Savillef4c4d362009-04-02 01:37:03 -07003782 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003783 */
3784#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3785
3786/**
3787 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
3788 *
3789 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
3790 * for searching and registering
3791 *
3792 * "data" is NULL
3793 *
3794 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003795 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003796 *
3797 * Valid errors:
3798 * SUCCESS
3799 * RADIO_NOT_AVAILABLE
3800 * GENERIC_FAILURE
3801 *
3802 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3803 */
3804#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
3805
3806/**
3807 * RIL_REQUEST_NEIGHBORING_CELL_IDS
3808 *
3809 * Request neighboring cell id in GSM network
3810 *
3811 * "data" is NULL
3812 * "response" must be a " const RIL_NeighboringCell** "
3813 *
3814 * Valid errors:
3815 * SUCCESS
3816 * RADIO_NOT_AVAILABLE
3817 * GENERIC_FAILURE
3818 */
3819#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3820
3821/**
3822 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07003823 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003824 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07003825 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3826 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003827 *
3828 * Note: The RIL implementation should default to "updates enabled"
3829 * when the screen is on and "updates disabled" when the screen is off.
3830 *
3831 * "data" is int *
3832 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3833 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3834 *
3835 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07003836 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003837 * Valid errors:
3838 * SUCCESS
3839 * RADIO_NOT_AVAILABLE
3840 * GENERIC_FAILURE
3841 *
3842 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3843 */
3844#define RIL_REQUEST_SET_LOCATION_UPDATES 76
3845
Wink Savillef4c4d362009-04-02 01:37:03 -07003846/**
Wink Savillec0114b32011-02-18 10:14:07 -08003847 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07003848 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003849 * Request to set the location where the CDMA subscription shall
3850 * be retrieved
3851 *
3852 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003853 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07003854 *
3855 * "response" is NULL
3856 *
3857 * Valid errors:
3858 * SUCCESS
3859 * RADIO_NOT_AVAILABLE
3860 * GENERIC_FAILURE
3861 * SIM_ABSENT
3862 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08003863 *
3864 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07003865 */
Wink Savillec0114b32011-02-18 10:14:07 -08003866#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07003867
3868/**
3869 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003870 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003871 * Request to set the roaming preferences in CDMA
3872 *
3873 * "data" is int *
3874 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3875 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3876 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003877 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003878 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003879 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003880 * Valid errors:
3881 * SUCCESS
3882 * RADIO_NOT_AVAILABLE
3883 * GENERIC_FAILURE
3884 */
3885#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
3886
3887/**
3888 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003889 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003890 * Request the actual setting of the roaming preferences in CDMA in the modem
3891 *
3892 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003893 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003894 * "response" is int *
3895 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
3896 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3897 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003898 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003899 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003900 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003901 * Valid errors:
3902 * SUCCESS
3903 * RADIO_NOT_AVAILABLE
3904 * GENERIC_FAILURE
3905 */
3906#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
3907
3908/**
3909 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003910 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003911 * Request to set the TTY mode
3912 *
3913 * "data" is int *
3914 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003915 * ((int *)data)[0] is == 1 for TTY Full
3916 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
3917 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07003918 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003919 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003920 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003921 * Valid errors:
3922 * SUCCESS
3923 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003924 * INVALID_ARGUMENTS
3925 * MODEM_ERR
3926 * INTERNAL_ERR
3927 * NO_MEMOR
3928 * INVALID_ARGUMENTS
3929 * MODEM_ERR
3930 * INTERNAL_ERR
3931 * NO_MEMORYY
Wink Savillef4c4d362009-04-02 01:37:03 -07003932 * GENERIC_FAILURE
3933 */
3934#define RIL_REQUEST_SET_TTY_MODE 80
3935
3936/**
3937 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003938 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003939 * Request the setting of TTY mode
3940 *
3941 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003942 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003943 * "response" is int *
3944 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003945 * ((int *)response)[0] is == 1 for TTY Full
3946 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
3947 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07003948 *
3949 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003950 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003951 * Valid errors:
3952 * SUCCESS
3953 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003954 * MODEM_ERR
3955 * INTERNAL_ERR
3956 * NO_MEMORY
3957 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07003958 * GENERIC_FAILURE
3959 */
3960#define RIL_REQUEST_QUERY_TTY_MODE 81
3961
3962/**
3963 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
3964 *
3965 * Request to set the preferred voice privacy mode used in voice
3966 * scrambling
3967 *
3968 * "data" is int *
3969 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3970 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003971 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003972 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003973 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003974 * Valid errors:
3975 * SUCCESS
3976 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003977 * INVALID_ARGUMENTS
3978 * SYSTEM_ERR
3979 * MODEM_ERR
3980 * INTERNAL_ERR
3981 * NO_MEMORY
3982 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07003983 * GENERIC_FAILURE
3984 */
3985#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
3986
3987/**
3988 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003989 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003990 * Request the setting of preferred voice privacy mode
3991 *
3992 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003993 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003994 * "response" is int *
3995 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3996 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003997 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003998 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003999 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004000 * Valid errors:
4001 * SUCCESS
4002 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004003 * MODEM_ERR
4004 * INTERNAL_ERR
4005 * NO_MEMORY
4006 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07004007 * GENERIC_FAILURE
4008 */
4009#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
4010
4011/**
4012 * RIL_REQUEST_CDMA_FLASH
4013 *
4014 * Send FLASH
4015 *
4016 * "data" is const char *
4017 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07004018 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004019 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004020 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004021 * Valid errors:
4022 * SUCCESS
4023 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004024 * INVALID_ARGUMENTS
4025 * NO_MEMORY
4026 * SYSTEM_ERR
4027 * MODEM_ERR
4028 * INTERNAL_ERR
4029 * INVALID_CALL_ID
4030 * INVALID_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004031 * GENERIC_FAILURE
4032 *
4033 */
4034#define RIL_REQUEST_CDMA_FLASH 84
4035
4036/**
4037 * RIL_REQUEST_CDMA_BURST_DTMF
4038 *
4039 * Send DTMF string
4040 *
jsh602f80f2009-07-10 15:44:37 -07004041 * "data" is const char **
4042 * ((const char **)data)[0] is a DTMF string
4043 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
4044 * default
4045 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
4046 * default
Wink Saville7f856802009-06-09 10:23:37 -07004047 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004048 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004049 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004050 * Valid errors:
4051 * SUCCESS
4052 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004053 * INVALID_ARGUMENTS
4054 * NO_MEMORY
4055 * SYSTEM_ERR
4056 * MODEM_ERR
4057 * INTERNAL_ERR
4058 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07004059 * GENERIC_FAILURE
4060 *
4061 */
4062#define RIL_REQUEST_CDMA_BURST_DTMF 85
4063
4064/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004065 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07004066 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004067 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
4068 * If the checksum is valid the 20 digit AKEY is written to NV,
4069 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07004070 *
4071 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004072 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
4073 * where the last 6 digits are a checksum of the
4074 * first 20, as specified in TR45.AHAG
4075 * "Common Cryptographic Algorithms, Revision D.1
4076 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07004077 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004078 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004079 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004080 * Valid errors:
4081 * SUCCESS
4082 * RADIO_NOT_AVAILABLE
4083 * GENERIC_FAILURE
4084 *
4085 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004086#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07004087
4088/**
4089 * RIL_REQUEST_CDMA_SEND_SMS
4090 *
4091 * Send a CDMA SMS message
4092 *
4093 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07004094 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004095 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07004096 *
johnwangbfb151b2009-09-11 15:20:38 -07004097 * Based on the return error, caller decides to resend if sending sms
4098 * fails. The CDMA error class is derived as follows,
4099 * SUCCESS is error class 0 (no error)
4100 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
4101 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
4102 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004103 * Valid errors:
4104 * SUCCESS
4105 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07004106 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08004107 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004108 * INVALID_STATE
4109 * INVALID_ARGUMENTS
4110 * NO_MEMORY
4111 * REQUEST_RATE_LIMITED
4112 * INVALID_SMS_FORMAT
4113 * SYSTEM_ERR
4114 * FDN_CHECK_FAILURE
4115 * MODEM_ERR
4116 * NETWORK_ERR
4117 * ENCODING_ERR
4118 * INVALID_SMSC_ADDRESS
4119 * MODE_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004120 * GENERIC_FAILURE
4121 *
4122 */
4123#define RIL_REQUEST_CDMA_SEND_SMS 87
4124
4125/**
4126 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4127 *
4128 * Acknowledge the success or failure in the receipt of SMS
4129 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4130 *
4131 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07004132 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004133 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004134 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004135 * Valid errors:
4136 * SUCCESS
4137 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004138 * INVALID_ARGUMENTS
4139 * NO_SMS_TO_ACK
4140 * INVALID_STATE
4141 * NO_MEMORY
4142 * REQUEST_RATE_LIMITED
4143 * SYSTEM_ERR
4144 * MODEM_ERR
4145 * INVALID_STATE
4146 * MODE_NOT_SUPPORTED
4147 * NETWORK_NOT_READY
4148 * INVALID_MODEM_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004149 * GENERIC_FAILURE
4150 *
4151 */
4152#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
4153
4154/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004155 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004156 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004157 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
4158 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004159 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004160 *
4161 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
4162 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
4163 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004164 * Valid errors:
4165 * SUCCESS
4166 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004167 * INVALID_STATE
4168 * NO_MEMORY
4169 * REQUEST_RATE_LIMITED
4170 * SYSTEM_ERR
4171 * NO_RESOURCES
4172 * MODEM_ERR
4173 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004174 * GENERIC_FAILURE
4175 *
4176 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004177#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07004178
4179/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004180 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004181 *
4182 * Set GSM/WCDMA Cell Broadcast SMS config
4183 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004184 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
4185 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
4186 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004187 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004188 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004189 * Valid errors:
4190 * SUCCESS
4191 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004192 * INVALID_STATE
4193 * INVALID_ARGUMENTS
4194 * NO_MEMORY
4195 * SYSTEM_ERR
4196 * REQUEST_RATE_LIMITED
4197 * MODEM_ERR
4198 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004199 * GENERIC_FAILURE
4200 *
4201 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004202#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07004203
4204/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004205 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004206 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004207* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07004208 *
4209 * "data" is const int *
4210 * (const int *)data[0] indicates to activate or turn off the
4211 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
4212 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004213 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004214 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004215 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004216 * Valid errors:
4217 * SUCCESS
4218 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004219 * INVALID_STATE
4220 * INVALID_ARGUMENTS
4221 * NO_MEMORY
4222 * SYSTEM_ERR
4223 * REQUEST_RATE_LIMITED
4224 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004225 * GENERIC_FAILURE
4226 *
4227 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004228#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07004229
4230/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004231 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004232 *
4233 * Request the setting of CDMA Broadcast SMS config
4234 *
4235 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004236 *
4237 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
4238 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
4239 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004240 * Valid errors:
4241 * SUCCESS
4242 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004243 * INVALID_STATE
4244 * NO_MEMORY
4245 * REQUEST_RATE_LIMITED
4246 * SYSTEM_ERR
4247 * NO_RESOURCES
4248 * MODEM_ERR
4249 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004250 * GENERIC_FAILURE
4251 *
4252 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004253#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07004254
4255/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004256 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004257 *
4258 * Set CDMA Broadcast SMS config
4259 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004260 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
4261 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
4262 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004263 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004264 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004265 * Valid errors:
4266 * SUCCESS
4267 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004268 * INVALID_STATE
4269 * INVALID_ARGUMENTS
4270 * NO_MEMORY
4271 * SYSTEM_ERR
4272 * REQUEST_RATE_LIMITED
4273 * MODEM_ERR
4274 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004275 * GENERIC_FAILURE
4276 *
4277 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004278#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07004279
4280/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004281 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004282 *
4283 * Enable or disable the reception of CDMA Broadcast SMS
4284 *
4285 * "data" is const int *
4286 * (const int *)data[0] indicates to activate or turn off the
4287 * reception of CDMA Broadcast SMS, 0-1,
4288 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004289 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004290 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004291 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004292 * Valid errors:
4293 * SUCCESS
4294 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004295 * INVALID_STATE
4296 * INVALID_ARGUMENTS
4297 * NO_MEMORY
4298 * SYSTEM_ERR
4299 * REQUEST_RATE_LIMITED
4300 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004301 * GENERIC_FAILURE
4302 *
4303 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004304#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07004305
4306/**
4307 * RIL_REQUEST_CDMA_SUBSCRIPTION
4308 *
4309 * Request the device MDN / H_SID / H_NID.
4310 *
4311 * The request is only allowed when CDMA subscription is available. When CDMA
4312 * subscription is changed, application layer should re-issue the request to
4313 * update the subscription information.
4314 *
4315 * If a NULL value is returned for any of the device id, it means that error
4316 * accessing the device.
4317 *
4318 * "response" is const char **
4319 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07004320 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
4321 * CDMA subscription is available, in decimal format
4322 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
4323 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07004324 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07004325 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07004326 *
4327 * Valid errors:
4328 * SUCCESS
4329 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
4330 */
4331
Wink Savilleeafe79d2009-04-03 18:02:34 -07004332#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07004333
4334/**
4335 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
4336 *
4337 * Stores a CDMA SMS message to RUIM memory.
4338 *
4339 * "data" is RIL_CDMA_SMS_WriteArgs *
4340 *
4341 * "response" is int *
4342 * ((const int *)response)[0] is the record index where the message is stored.
4343 *
4344 * Valid errors:
4345 * SUCCESS
4346 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004347 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08004348 * INVALID_ARGUMENTS
4349 * INVALID_SMS_FORMAT
4350 * INTERNAL_ERR
4351 * MODEM_ERR
4352 * ENCODING_ERR
4353 * NO_MEMORY
4354 * NO_RESOURCES
4355 * INVALID_MODEM_STATE
4356 * MODE_NOT_SUPPORTED
4357 * INVALID_SMSC_ADDRESS
Wink Savillef4c4d362009-04-02 01:37:03 -07004358 * GENERIC_FAILURE
4359 *
4360 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004361#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07004362
4363/**
4364 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
4365 *
4366 * Deletes a CDMA SMS message from RUIM memory.
4367 *
4368 * "data" is int *
4369 * ((int *)data)[0] is the record index of the message to delete.
4370 *
4371 * "response" is NULL
4372 *
4373 * Valid errors:
4374 * SUCCESS
4375 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004376 * INVALID_ARGUMENTS
4377 * NO_MEMORY
4378 * REQUEST_RATE_LIMITED
4379 * SYSTEM_ERR
4380 * MODEM_ERR
4381 * NO_SUCH_ENTRY
Wink Savillef4c4d362009-04-02 01:37:03 -07004382 * GENERIC_FAILURE
4383 *
4384 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004385#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07004386
4387/**
4388 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07004389 *
4390 * Request the device ESN / MEID / IMEI / IMEISV.
4391 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004392 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07004393 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07004394 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004395 *
4396 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07004397 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004398 *
4399 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07004400 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004401 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004402 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07004403 * ((const char **)response)[0] is IMEI if GSM subscription is available
4404 * ((const char **)response)[1] is IMEISV if GSM subscription is available
4405 * ((const char **)response)[2] is ESN if CDMA subscription is available
4406 * ((const char **)response)[3] is MEID if CDMA subscription is available
4407 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004408 * Valid errors:
4409 * SUCCESS
4410 * RADIO_NOT_AVAILABLE
4411 * GENERIC_FAILURE
4412 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004413#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07004414
Wink Saville1b5fd232009-04-22 14:50:00 -07004415/**
4416 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
4417 *
4418 * Request the radio's system selection module to exit emergency
4419 * callback mode. RIL will not respond with SUCCESS until the modem has
4420 * completely exited from Emergency Callback Mode.
4421 *
4422 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004423 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004424 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004425 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004426 * Valid errors:
4427 * SUCCESS
4428 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004429 * OPERATION_NOT_ALLOWED
Wink Saville1b5fd232009-04-22 14:50:00 -07004430 * GENERIC_FAILURE
4431 *
4432 */
4433#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07004434
jsh000a9fe2009-05-11 14:52:35 -07004435/**
4436 * RIL_REQUEST_GET_SMSC_ADDRESS
4437 *
4438 * Queries the default Short Message Service Center address on the device.
4439 *
4440 * "data" is NULL
4441 *
4442 * "response" is const char * containing the SMSC address.
4443 *
4444 * Valid errors:
4445 * SUCCESS
4446 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004447 * NO_MEMORY
4448 * REQUEST_RATE_LIMITED
4449 * SYSTEM_ERR
4450 * INTERNAL_ERR
4451 * MODEM_ERR
4452 * INVALID_ARGUMENTS
4453 * INVALID_MODEM_STATE
4454 * NOT_PROVISIONED
jsh000a9fe2009-05-11 14:52:35 -07004455 * GENERIC_FAILURE
4456 *
4457 */
4458#define RIL_REQUEST_GET_SMSC_ADDRESS 100
4459
4460/**
4461 * RIL_REQUEST_SET_SMSC_ADDRESS
4462 *
4463 * Sets the default Short Message Service Center address on the device.
4464 *
4465 * "data" is const char * containing the SMSC address.
4466 *
4467 * "response" is NULL
4468 *
4469 * Valid errors:
4470 * SUCCESS
4471 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004472 * INVALID_ARGUMENTS
4473 * INVALID_SMS_FORMAT
4474 * NO_MEMORY
4475 * SYSTEM_ERR
4476 * REQUEST_RATE_LIMITED
4477 * MODEM_ERR
4478 * NO_RESOURCES
jsh000a9fe2009-05-11 14:52:35 -07004479 * GENERIC_FAILURE
4480 *
4481 */
4482#define RIL_REQUEST_SET_SMSC_ADDRESS 101
4483
jshb60444e2009-05-29 11:09:17 -07004484/**
4485 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
4486 *
4487 * Indicates whether there is storage available for new SMS messages.
4488 *
4489 * "data" is int *
4490 * ((int *)data)[0] is 1 if memory is available for storing new messages
4491 * is 0 if memory capacity is exceeded
4492 *
4493 * "response" is NULL
4494 *
4495 * Valid errors:
4496 * SUCCESS
4497 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004498 * INVALID_ARGUMENTS
4499 * NO_MEMORY
4500 * INVALID_STATE
4501 * SYSTEM_ERR
4502 * REQUEST_RATE_LIMITED
4503 * MODEM_ERR
jshb60444e2009-05-29 11:09:17 -07004504 * GENERIC_FAILURE
4505 *
4506 */
4507#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
4508
Wink Saville2641d5b2009-06-08 17:40:42 -07004509/**
4510 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
4511 *
4512 * Indicates that the StkSerivce is running and is
4513 * ready to receive RIL_UNSOL_STK_XXXXX commands.
4514 *
4515 * "data" is NULL
4516 * "response" is NULL
4517 *
4518 * Valid errors:
4519 * SUCCESS
4520 * RADIO_NOT_AVAILABLE
4521 * GENERIC_FAILURE
4522 *
4523 */
4524#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
4525
Wink Savillec0114b32011-02-18 10:14:07 -08004526/**
4527 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
4528 *
4529 * Request to query the location where the CDMA subscription shall
4530 * be retrieved
4531 *
4532 * "data" is NULL
4533 *
4534 * "response" is int *
4535 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4536 *
4537 * Valid errors:
4538 * SUCCESS
4539 * RADIO_NOT_AVAILABLE
4540 * GENERIC_FAILURE
4541 * SUBSCRIPTION_NOT_AVAILABLE
4542 *
4543 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
4544 */
4545#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
4546
Jake Hambyfa8d5842011-08-19 16:22:18 -07004547/**
4548 * RIL_REQUEST_ISIM_AUTHENTICATION
4549 *
4550 * Request the ISIM application on the UICC to perform AKA
4551 * challenge/response algorithm for IMS authentication
4552 *
4553 * "data" is a const char * containing the challenge string in Base64 format
4554 * "response" is a const char * containing the response in Base64 format
4555 *
4556 * Valid errors:
4557 * SUCCESS
4558 * RADIO_NOT_AVAILABLE
4559 * GENERIC_FAILURE
4560 */
4561#define RIL_REQUEST_ISIM_AUTHENTICATION 105
4562
Jake Hamby300105d2011-09-26 01:01:44 -07004563/**
4564 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
4565 *
4566 * Acknowledge successful or failed receipt of SMS previously indicated
4567 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
4568 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
4569 *
4570 * "data" is const char **
4571 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
4572 * is "0" on failed receipt (send RP-ERROR)
4573 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
4574 *
4575 * "response" is NULL
4576 *
4577 * Valid errors:
4578 * SUCCESS
4579 * RADIO_NOT_AVAILABLE
4580 * GENERIC_FAILURE
4581 */
4582#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
4583
4584/**
4585 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
4586 *
4587 * Requests to send a SAT/USAT envelope command to SIM.
4588 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
4589 *
4590 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
4591 * the SW1 and SW2 status bytes from the UICC response are returned along with
4592 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
4593 *
4594 * The RIL implementation shall perform the normal processing of a '91XX'
4595 * response in SW1/SW2 to retrieve the pending proactive command and send it
4596 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
4597 *
4598 * "data" is a const char * containing the SAT/USAT command
4599 * in hexadecimal format starting with command tag
4600 *
4601 * "response" is a const RIL_SIM_IO_Response *
4602 *
4603 * Valid errors:
4604 * RIL_E_SUCCESS
4605 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08004606 * SIM_BUSY
4607 * OPERATION_NOT_ALLOWED
Jake Hamby300105d2011-09-26 01:01:44 -07004608 * RIL_E_GENERIC_FAILURE
4609 */
4610#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
4611
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004612/**
4613 * RIL_REQUEST_VOICE_RADIO_TECH
4614 *
4615 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
Sooraj Sasindranb80acba2015-10-08 16:03:16 -07004616 * when radio state is not RADIO_STATE_UNAVAILABLE
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004617 *
4618 * "data" is NULL
4619 * "response" is int *
4620 * ((int *) response)[0] is of type const RIL_RadioTechnology
4621 *
4622 * Valid errors:
4623 * SUCCESS
4624 * RADIO_NOT_AVAILABLE
4625 * GENERIC_FAILURE
4626 */
4627#define RIL_REQUEST_VOICE_RADIO_TECH 108
4628
Wink Saville8a9e0212013-04-09 12:11:38 -07004629/**
4630 * RIL_REQUEST_GET_CELL_INFO_LIST
4631 *
4632 * Request all of the current cell information known to the radio. The radio
4633 * must a list of all current cells, including the neighboring cells. If for a particular
4634 * cell information isn't known then the appropriate unknown value will be returned.
4635 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
4636 *
4637 * "data" is NULL
4638 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08004639 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07004640 */
4641#define RIL_REQUEST_GET_CELL_INFO_LIST 109
4642
4643/**
4644 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
4645 *
4646 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
Wink Savillec57b3eb2013-04-17 12:51:41 -07004647 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
Wink Saville8a9e0212013-04-09 12:11:38 -07004648 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
4649 * a RIL_UNSOL_CELL_INFO_LIST.
4650 *
4651 * "data" is int *
4652 * ((int *)data)[0] is minimum time in milliseconds
4653 *
4654 * "response" is NULL
4655 *
4656 * Valid errors:
4657 * SUCCESS
4658 * RADIO_NOT_AVAILABLE
4659 * GENERIC_FAILURE
4660 */
4661#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
Jake Hamby300105d2011-09-26 01:01:44 -07004662
Sungmin Choi75697532013-04-26 15:04:45 -07004663/**
4664 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
4665 *
4666 * Set an apn to initial attach network
4667 * "response" is NULL
4668 *
4669 * Valid errors:
4670 * SUCCESS
4671 * RADIO_NOT_AVAILABLE (radio resetting)
4672 * GENERIC_FAILURE
4673 * SUBSCRIPTION_NOT_AVAILABLE
4674 */
4675#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
4676
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004677/**
4678 * RIL_REQUEST_IMS_REGISTRATION_STATE
4679 *
4680 * Request current IMS registration state
4681 *
4682 * "data" is NULL
4683 *
4684 * "response" is int *
4685 * ((int *)response)[0] is registration state:
4686 * 0 - Not registered
4687 * 1 - Registered
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004688 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004689 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004690 * must follow with IMS SMS format:
4691 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004692 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
4693 *
4694 * Valid errors:
4695 * SUCCESS
4696 * RADIO_NOT_AVAILABLE
4697 * GENERIC_FAILURE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004698 */
4699#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
4700
4701/**
4702 * RIL_REQUEST_IMS_SEND_SMS
4703 *
4704 * Send a SMS message over IMS
4705 *
4706 * "data" is const RIL_IMS_SMS_Message *
4707 *
4708 * "response" is a const RIL_SMS_Response *
4709 *
4710 * Based on the return error, caller decides to resend if sending sms
4711 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
4712 * In case of retry, data is encoded based on Voice Technology available.
4713 *
4714 * Valid errors:
4715 * SUCCESS
4716 * RADIO_NOT_AVAILABLE
4717 * SMS_SEND_FAIL_RETRY
4718 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08004719 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004720 * INVALID_ARGUMENTS
4721 * INVALID_STATE
4722 * NO_MEMORY
4723 * INVALID_SMS_FORMAT
4724 * SYSTEM_ERR
4725 * REQUEST_RATE_LIMITED
4726 * MODEM_ERR
4727 * NETWORK_ERR
4728 * ENCODING_ERR
4729 * INVALID_SMSC_ADDRESS
4730 * MODE_NOT_SUPPORTED
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004731 * GENERIC_FAILURE
4732 *
4733 */
4734#define RIL_REQUEST_IMS_SEND_SMS 113
4735
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004736/**
4737 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
4738 *
4739 * Request APDU exchange on the basic channel. This command reflects TS 27.007
4740 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
4741 * of GSM/CDMA, and filter commands appropriately. It should filter
4742 * channel management and SELECT by DF name commands.
4743 *
4744 * "data" is a const RIL_SIM_APDU *
4745 * "sessionid" field should be ignored.
4746 *
4747 * "response" is a const RIL_SIM_IO_Response *
4748 *
4749 * Valid errors:
4750 * SUCCESS
4751 * RADIO_NOT_AVAILABLE
4752 * GENERIC_FAILURE
4753 */
4754#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
4755
4756/**
4757 * RIL_REQUEST_SIM_OPEN_CHANNEL
4758 *
4759 * Open a new logical channel and select the given application. This command
4760 * reflects TS 27.007 "open logical channel" operation (+CCHO).
4761 *
4762 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
4763 *
4764 * "response" is int *
4765 * ((int *)data)[0] contains the session id of the logical channel.
Shishir Agrawal760123f2014-10-14 09:14:57 -07004766 * ((int *)data)[1] onwards may optionally contain the select response for the
4767 * open channel command with one byte per integer.
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004768 *
4769 * Valid errors:
4770 * SUCCESS
4771 * RADIO_NOT_AVAILABLE
4772 * GENERIC_FAILURE
4773 * MISSING_RESOURCE
4774 * NO_SUCH_ELEMENT
4775 */
4776#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
4777
4778/**
4779 * RIL_REQUEST_SIM_CLOSE_CHANNEL
4780 *
4781 * Close a previously opened logical channel. This command reflects TS 27.007
4782 * "close logical channel" operation (+CCHC).
4783 *
4784 * "data" is int *
4785 * ((int *)data)[0] is the session id of logical the channel to close.
4786 *
4787 * "response" is NULL
4788 *
4789 * Valid errors:
4790 * SUCCESS
4791 * RADIO_NOT_AVAILABLE
4792 * GENERIC_FAILURE
4793 */
4794#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
4795
4796/**
4797 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
4798 *
4799 * Exchange APDUs with a UICC over a previously opened logical channel. This
4800 * command reflects TS 27.007 "generic logical channel access" operation
4801 * (+CGLA). The modem should filter channel management and SELECT by DF name
4802 * commands.
4803 *
4804 * "data" is a const RIL_SIM_APDU*
4805 *
4806 * "response" is a const RIL_SIM_IO_Response *
4807 *
4808 * Valid errors:
4809 * SUCCESS
4810 * RADIO_NOT_AVAILABLE
4811 * GENERIC_FAILURE
4812 */
4813#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
4814
Jake Hamby8a4a2332014-01-15 13:12:05 -08004815/**
4816 * RIL_REQUEST_NV_READ_ITEM
4817 *
4818 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4819 * This is used for device configuration by some CDMA operators.
4820 *
4821 * "data" is a const RIL_NV_ReadItem *
4822 *
4823 * "response" is const char * containing the contents of the NV item
4824 *
4825 * Valid errors:
4826 * SUCCESS
4827 * RADIO_NOT_AVAILABLE
4828 * GENERIC_FAILURE
4829 */
4830#define RIL_REQUEST_NV_READ_ITEM 118
4831
4832/**
4833 * RIL_REQUEST_NV_WRITE_ITEM
4834 *
4835 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4836 * This is used for device configuration by some CDMA operators.
4837 *
4838 * "data" is a const RIL_NV_WriteItem *
4839 *
4840 * "response" is NULL
4841 *
4842 * Valid errors:
4843 * SUCCESS
4844 * RADIO_NOT_AVAILABLE
4845 * GENERIC_FAILURE
4846 */
4847#define RIL_REQUEST_NV_WRITE_ITEM 119
4848
4849/**
4850 * RIL_REQUEST_NV_WRITE_CDMA_PRL
4851 *
4852 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
4853 * This is used for device configuration by some CDMA operators.
4854 *
4855 * "data" is a const char * containing the PRL as a byte array
4856 *
4857 * "response" is NULL
4858 *
4859 * Valid errors:
4860 * SUCCESS
4861 * RADIO_NOT_AVAILABLE
4862 * GENERIC_FAILURE
4863 */
4864#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
4865
4866/**
4867 * RIL_REQUEST_NV_RESET_CONFIG
4868 *
4869 * Reset the radio NV configuration to the factory state.
4870 * This is used for device configuration by some CDMA operators.
4871 *
4872 * "data" is int *
Jake Hambyd27c9d52014-02-06 14:52:05 -08004873 * ((int *)data)[0] is 1 to reload all NV items
4874 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
4875 * ((int *)data)[0] is 3 for factory reset (RTN)
Jake Hamby8a4a2332014-01-15 13:12:05 -08004876 *
4877 * "response" is NULL
4878 *
4879 * Valid errors:
4880 * SUCCESS
4881 * RADIO_NOT_AVAILABLE
4882 * GENERIC_FAILURE
4883 */
4884#define RIL_REQUEST_NV_RESET_CONFIG 121
4885
Etan Cohend3652192014-06-20 08:28:44 -07004886 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
4887 * FIXME This API needs to have more documentation.
4888 *
4889 * Selection/de-selection of a subscription from a SIM card
4890 * "data" is const RIL_SelectUiccSub*
4891
4892 *
4893 * "response" is NULL
4894 *
4895 * Valid errors:
4896 * SUCCESS
4897 * RADIO_NOT_AVAILABLE (radio resetting)
4898 * GENERIC_FAILURE
4899 * SUBSCRIPTION_NOT_SUPPORTED
4900 *
4901 */
4902#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
4903
4904/**
4905 * RIL_REQUEST_ALLOW_DATA
4906 *
4907 * Tells the modem whether data calls are allowed or not
4908 *
4909 * "data" is int *
4910 * FIXME slotId and aid will be added.
4911 * ((int *)data)[0] is == 0 to allow data calls
4912 * ((int *)data)[0] is == 1 to disallow data calls
4913 *
4914 * "response" is NULL
4915 *
4916 * Valid errors:
4917 *
4918 * SUCCESS
4919 * RADIO_NOT_AVAILABLE (radio resetting)
4920 * GENERIC_FAILURE
4921 *
4922 */
4923#define RIL_REQUEST_ALLOW_DATA 123
4924
4925/**
4926 * RIL_REQUEST_GET_HARDWARE_CONFIG
4927 *
4928 * Request all of the current hardware (modem and sim) associated
4929 * with the RIL.
4930 *
4931 * "data" is NULL
4932 *
4933 * "response" is an array of RIL_HardwareConfig.
4934 */
4935#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
4936
4937/**
Amit Mahajan2b772032014-06-26 14:20:11 -07004938 * RIL_REQUEST_SIM_AUTHENTICATION
Etan Cohend3652192014-06-20 08:28:44 -07004939 *
4940 * Returns the response of SIM Authentication through RIL to a
4941 * challenge request.
4942 *
4943 * "data" Base64 encoded string containing challenge:
4944 * int authContext; P2 value of authentication command, see P2 parameter in
4945 * 3GPP TS 31.102 7.1.2
4946 * char *authData; the challenge string in Base64 format, see 3GPP
4947 * TS 31.102 7.1.2
4948 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
4949 * NULL if no value
4950 *
4951 * "response" Base64 encoded strings containing response:
4952 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
4953 * int sw2;
4954 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
4955 */
Amit Mahajan2b772032014-06-26 14:20:11 -07004956#define RIL_REQUEST_SIM_AUTHENTICATION 125
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004957
Wink Savillec29360a2014-07-13 05:17:28 -07004958/**
4959 * RIL_REQUEST_GET_DC_RT_INFO
4960 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004961 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07004962 * Requests the Data Connection Real Time Info
4963 *
4964 * "data" is NULL
4965 *
4966 * "response" is the most recent RIL_DcRtInfo
4967 *
4968 * Valid errors:
4969 * SUCCESS
4970 * RADIO_NOT_AVAILABLE
4971 * GENERIC_FAILURE
4972 *
4973 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
4974 */
4975#define RIL_REQUEST_GET_DC_RT_INFO 126
4976
4977/**
4978 * RIL_REQUEST_SET_DC_RT_INFO_RATE
4979 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004980 * The request is DEPRECATED
Wink Savillec29360a2014-07-13 05:17:28 -07004981 * This is the minimum number of milliseconds between successive
4982 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
4983 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
4984 * 0 means send as fast as possible.
4985 *
4986 * "data" The number of milliseconds as an int
4987 *
4988 * "response" is null
4989 *
4990 * Valid errors:
4991 * SUCCESS must not fail
4992 */
4993#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
4994
Amit Mahajanc796e222014-08-13 16:54:01 +00004995/**
4996 * RIL_REQUEST_SET_DATA_PROFILE
4997 *
4998 * Set data profile in modem
Hui Wang8d679622014-10-16 14:59:27 -05004999 * Modem should erase existed profiles from framework, and apply new profiles
Amit Mahajanc796e222014-08-13 16:54:01 +00005000 * "data" is an const RIL_DataProfileInfo **
5001 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
5002 * "response" is NULL
5003 *
5004 * Valid errors:
5005 * SUCCESS
5006 * RADIO_NOT_AVAILABLE (radio resetting)
5007 * GENERIC_FAILURE
5008 * SUBSCRIPTION_NOT_AVAILABLE
5009 */
5010#define RIL_REQUEST_SET_DATA_PROFILE 128
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005011
5012/**
5013 * RIL_REQUEST_SHUTDOWN
5014 *
5015 * Device is shutting down. All further commands are ignored
5016 * and RADIO_NOT_AVAILABLE must be returned.
5017 *
5018 * "data" is null
5019 * "response" is NULL
5020 *
5021 * Valid errors:
5022 * SUCCESS
5023 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005024 * OPERATION_NOT_ALLOWED
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005025 * GENERIC_FAILURE
5026 */
5027#define RIL_REQUEST_SHUTDOWN 129
5028
Wink Saville8b4e4f72014-10-17 15:01:45 -07005029/**
5030 * RIL_REQUEST_GET_RADIO_CAPABILITY
5031 *
5032 * Used to get phone radio capablility.
5033 *
Abhishek Adappa772c0d22015-02-09 11:11:12 -08005034 * "data" is the RIL_RadioCapability structure
Wink Saville8b4e4f72014-10-17 15:01:45 -07005035 *
5036 * Valid errors:
5037 * SUCCESS
5038 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005039 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005040 * GENERIC_FAILURE
5041 */
5042#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
5043
5044/**
5045 * RIL_REQUEST_SET_RADIO_CAPABILITY
5046 *
5047 * Used to set the phones radio capability. Be VERY careful
5048 * using this request as it may cause some vendor modems to reset. Because
5049 * of the possible modem reset any RIL commands after this one may not be
5050 * processed.
5051 *
5052 * "data" is the RIL_RadioCapability structure
5053 *
5054 * "response" is the RIL_RadioCapability structure, used to feedback return status
5055 *
5056 * Valid errors:
5057 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
5058 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005059 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005060 * GENERIC_FAILURE
5061 */
5062#define RIL_REQUEST_SET_RADIO_CAPABILITY 131
5063
fengluf7408292015-04-14 14:53:55 -07005064/**
5065 * RIL_REQUEST_START_LCE
5066 *
5067 * Start Link Capacity Estimate (LCE) service if supported by the radio.
5068 *
5069 * "data" is const int *
5070 * ((const int*)data)[0] specifies the desired reporting interval (ms).
fenglu290add32015-05-01 17:05:15 -07005071 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
fengluf7408292015-04-14 14:53:55 -07005072 *
fenglu290add32015-05-01 17:05:15 -07005073 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005074 *
5075 * Valid errors:
5076 * SUCCESS
5077 * RADIO_NOT_AVAILABLE
5078 * LCE_NOT_SUPPORTED
5079 */
5080#define RIL_REQUEST_START_LCE 132
5081
5082/**
5083 * RIL_REQUEST_STOP_LCE
5084 *
5085 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
5086 * idempotent for the radio modem.
5087 *
fenglu290add32015-05-01 17:05:15 -07005088 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005089 *
5090 * Valid errors:
5091 * SUCCESS
5092 * RADIO_NOT_AVAILABLE
5093 * LCE_NOT_SUPPORTED
5094 */
5095#define RIL_REQUEST_STOP_LCE 133
5096
5097/**
5098 * RIL_REQUEST_PULL_LCEDATA
5099 *
5100 * Pull LCE service for capacity information.
5101 *
fenglu290add32015-05-01 17:05:15 -07005102 * "response" is the RIL_LceDataInfo.
fengluf7408292015-04-14 14:53:55 -07005103 *
5104 * Valid errors:
5105 * SUCCESS
5106 * RADIO_NOT_AVAILABLE
5107 * LCE_NOT_SUPPORTED
5108 */
5109#define RIL_REQUEST_PULL_LCEDATA 134
5110
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005111/**
5112 * RIL_REQUEST_GET_ACTIVITY_INFO
5113 *
5114 * Get modem activity statisitics info.
5115 *
5116 * There can be multiple RIL_REQUEST_GET_ACTIVITY_INFO calls to modem.
5117 * Once the response for the request is sent modem will clear
5118 * current statistics information.
5119 *
5120 * "data" is null
5121 * "response" is const RIL_ActivityStatsInfo *
5122 *
5123 * Valid errors:
5124 *
5125 * SUCCESS
5126 * RADIO_NOT_AVAILABLE (radio resetting)
5127 * GENERIC_FAILURE
5128 */
5129#define RIL_REQUEST_GET_ACTIVITY_INFO 135
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005130
Meng Wangb4e34312016-05-12 14:54:36 -07005131/**
5132 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS
5133 *
Meng Wangd5c540f2016-07-15 15:41:19 -07005134 * Set carrier restrictions for this sim slot. Expected modem behavior:
5135 * If never receives this command
5136 * - Must allow all carriers
5137 * Receives this command with data being NULL
5138 * - Must allow all carriers. If a previously allowed SIM is present, modem must not reload
5139 * the SIM. If a previously disallowed SIM is present, reload the SIM and notify Android.
5140 * Receives this command with a list of carriers
5141 * - Only allow specified carriers, persist across power cycles and FDR. If a present SIM
5142 * is in the allowed list, modem must not reload the SIM. If a present SIM is *not* in
5143 * the allowed list, modem must detach from the registered network and only keep emergency
5144 * service, and notify Android SIM refresh reset with new SIM state being
5145 * RIL_CARDSTATE_RESTRICTED. Emergency service must be enabled.
Meng Wangb4e34312016-05-12 14:54:36 -07005146 *
5147 * "data" is const RIL_CarrierRestrictions *
5148 * A list of allowed carriers and possibly a list of excluded carriers.
5149 * If data is NULL, means to clear previous carrier restrictions and allow all carriers
5150 *
5151 * "response" is int *
5152 * ((int *)data)[0] contains the number of allowed carriers which have been set correctly.
5153 * On success, it should match the length of list data->allowed_carriers.
5154 * If data is NULL, the value must be 0.
5155 *
5156 * Valid errors:
5157 * RIL_E_SUCCESS
5158 * RIL_E_INVALID_ARGUMENTS
5159 * RIL_E_RADIO_NOT_AVAILABLE
5160 * RIL_E_REQUEST_NOT_SUPPORTED
5161 */
5162#define RIL_REQUEST_SET_CARRIER_RESTRICTIONS 136
5163
5164/**
5165 * RIL_REQUEST_GET_CARRIER_RESTRICTIONS
5166 *
Meng Wangd5c540f2016-07-15 15:41:19 -07005167 * Get carrier restrictions for this sim slot. Expected modem behavior:
5168 * Return list of allowed carriers, or null if all carriers are allowed.
Meng Wangb4e34312016-05-12 14:54:36 -07005169 *
5170 * "data" is NULL
5171 *
5172 * "response" is const RIL_CarrierRestrictions *.
5173 * If response is NULL, it means all carriers are allowed.
5174 *
5175 * Valid errors:
5176 * RIL_E_SUCCESS
5177 * RIL_E_RADIO_NOT_AVAILABLE
5178 * RIL_E_REQUEST_NOT_SUPPORTED
5179 */
5180#define RIL_REQUEST_GET_CARRIER_RESTRICTIONS 137
5181
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005182/***********************************************************************/
5183
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005184/**
5185 * RIL_RESPONSE_ACKNOWLEDGEMENT
5186 *
5187 * This is used by Asynchronous solicited messages and Unsolicited messages
5188 * to acknowledge the receipt of those messages in RIL.java so that the ack
5189 * can be used to let ril.cpp to release wakelock.
5190 *
5191 * Valid errors
5192 * SUCCESS
5193 * RADIO_NOT_AVAILABLE
5194 */
5195
5196#define RIL_RESPONSE_ACKNOWLEDGEMENT 800
5197
5198/***********************************************************************/
5199
Wink Savillef4c4d362009-04-02 01:37:03 -07005200
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005201#define RIL_UNSOL_RESPONSE_BASE 1000
5202
5203/**
5204 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
5205 *
5206 * Indicate when value of RIL_RadioState has changed.
5207 *
5208 * Callee will invoke RIL_RadioStateRequest method on main thread
5209 *
5210 * "data" is NULL
5211 */
5212
5213#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
5214
5215
5216/**
5217 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
5218 *
5219 * Indicate when call state has changed
5220 *
5221 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
5222 *
5223 * "data" is NULL
5224 *
Wink Saville7f856802009-06-09 10:23:37 -07005225 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005226 * "RING", "BUSY", "NO CARRIER", and also call state
5227 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
5228 *
5229 * Redundent or extraneous invocations are tolerated
5230 */
5231#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
5232
5233
5234/**
Wink Savillec0114b32011-02-18 10:14:07 -08005235 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005236 *
Wink Savillec0114b32011-02-18 10:14:07 -08005237 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005238 *
5239 * Callee will invoke the following requests on main thread:
5240 *
Wink Savillec0114b32011-02-18 10:14:07 -08005241 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005242 * RIL_REQUEST_OPERATOR
5243 *
5244 * "data" is NULL
5245 *
5246 * FIXME should this happen when SIM records are loaded? (eg, for
5247 * EONS)
5248 */
Wink Savillec0114b32011-02-18 10:14:07 -08005249#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005250
5251/**
5252 * RIL_UNSOL_RESPONSE_NEW_SMS
5253 *
5254 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07005255 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005256 * "data" is const char *
5257 * This is a pointer to a string containing the PDU of an SMS-DELIVER
5258 * as an ascii string of hex digits. The PDU starts with the SMSC address
5259 * per TS 27.005 (+CMT:)
5260 *
5261 * Callee will subsequently confirm the receipt of thei SMS with a
5262 * RIL_REQUEST_SMS_ACKNOWLEDGE
5263 *
Wink Saville7f856802009-06-09 10:23:37 -07005264 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005265 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5266 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5267 */
5268
5269#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
5270
5271/**
5272 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
5273 *
5274 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07005275 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005276 * "data" is const char *
5277 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
5278 * as an ascii string of hex digits. The PDU starts with the SMSC address
5279 * per TS 27.005 (+CDS:).
5280 *
5281 * Callee will subsequently confirm the receipt of the SMS with a
5282 * RIL_REQUEST_SMS_ACKNOWLEDGE
5283 *
Wink Saville7f856802009-06-09 10:23:37 -07005284 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005285 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5286 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5287 */
5288
5289#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
5290
5291/**
5292 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
5293 *
5294 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07005295 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005296 * "data" is const int *
5297 * ((const int *)data)[0] contains the slot index on the SIM that contains
5298 * the new message
5299 */
5300
5301#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
5302
5303/**
5304 * RIL_UNSOL_ON_USSD
5305 *
5306 * Called when a new USSD message is received.
5307 *
5308 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07005309 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005310 * one of these string values:
5311 * "0" USSD-Notify -- text in ((const char **)data)[1]
5312 * "1" USSD-Request -- text in ((const char **)data)[1]
5313 * "2" Session terminated by network
5314 * "3" other local client (eg, SIM Toolkit) has responded
5315 * "4" Operation not supported
5316 * "5" Network timeout
5317 *
5318 * The USSD session is assumed to persist if the type code is "1", otherwise
5319 * the current session (if any) is assumed to have terminated.
5320 *
5321 * ((const char **)data)[1] points to a message string if applicable, which
5322 * should always be in UTF-8.
5323 */
5324#define RIL_UNSOL_ON_USSD 1006
5325/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
5326
5327/**
5328 * RIL_UNSOL_ON_USSD_REQUEST
5329 *
5330 * Obsolete. Send via RIL_UNSOL_ON_USSD
5331 */
Wink Saville7f856802009-06-09 10:23:37 -07005332#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005333
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005334/**
5335 * RIL_UNSOL_NITZ_TIME_RECEIVED
5336 *
5337 * Called when radio has received a NITZ time message
5338 *
5339 * "data" is const char * pointing to NITZ time string
5340 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
5341 */
5342#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
5343
5344/**
5345 * RIL_UNSOL_SIGNAL_STRENGTH
5346 *
5347 * Radio may report signal strength rather han have it polled.
5348 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005349 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005350 */
5351#define RIL_UNSOL_SIGNAL_STRENGTH 1009
5352
5353
5354/**
Wink Savillef4c4d362009-04-02 01:37:03 -07005355 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005356 *
Wink Savillec0114b32011-02-18 10:14:07 -08005357 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07005358 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
5359 * of current data contexts including new contexts that have been
5360 * activated. A data call is only removed from this list when the
5361 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
5362 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005363 *
Wink Savillef4c4d362009-04-02 01:37:03 -07005364 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005365 */
5366
Wink Savillef4c4d362009-04-02 01:37:03 -07005367#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005368
5369/**
5370 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
5371 *
5372 * Reports supplementary service related notification from the network.
5373 *
5374 * "data" is a const RIL_SuppSvcNotification *
5375 *
5376 */
5377
5378#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
5379
5380/**
5381 * RIL_UNSOL_STK_SESSION_END
5382 *
5383 * Indicate when STK session is terminated by SIM.
5384 *
5385 * "data" is NULL
5386 */
5387#define RIL_UNSOL_STK_SESSION_END 1012
5388
5389/**
5390 * RIL_UNSOL_STK_PROACTIVE_COMMAND
5391 *
5392 * Indicate when SIM issue a STK proactive command to applications
5393 *
5394 * "data" is a const char * containing SAT/USAT proactive command
5395 * in hexadecimal format string starting with command tag
5396 *
5397 */
5398#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
5399
5400/**
5401 * RIL_UNSOL_STK_EVENT_NOTIFY
5402 *
5403 * Indicate when SIM notifies applcations some event happens.
5404 * Generally, application does not need to have any feedback to
5405 * SIM but shall be able to indicate appropriate messages to users.
5406 *
5407 * "data" is a const char * containing SAT/USAT commands or responses
5408 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
5409 * starting with first byte of response data or command tag
5410 *
5411 */
5412#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
5413
5414/**
5415 * RIL_UNSOL_STK_CALL_SETUP
5416 *
5417 * Indicate when SIM wants application to setup a voice call.
5418 *
5419 * "data" is const int *
5420 * ((const int *)data)[0] contains timeout value (in milliseconds)
5421 */
5422#define RIL_UNSOL_STK_CALL_SETUP 1015
5423
5424/**
5425 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
5426 *
5427 * Indicates that SMS storage on the SIM is full. Sent when the network
5428 * attempts to deliver a new SMS message. Messages cannot be saved on the
5429 * SIM until space is freed. In particular, incoming Class 2 messages
5430 * cannot be stored.
5431 *
5432 * "data" is null
5433 *
5434 */
5435#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
5436
5437/**
5438 * RIL_UNSOL_SIM_REFRESH
5439 *
5440 * Indicates that file(s) on the SIM have been updated, or the SIM
5441 * has been reinitialized.
5442 *
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005443 * In the case where RIL is version 6 or older:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005444 * "data" is an int *
5445 * ((int *)data)[0] is a RIL_SimRefreshResult.
5446 * ((int *)data)[1] is the EFID of the updated file if the result is
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005447 * SIM_FILE_UPDATE or NULL for any other result.
5448 *
5449 * In the case where RIL is version 7:
5450 * "data" is a RIL_SimRefreshResponse_v7 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005451 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005452 * Note: If the SIM state changes as a result of the SIM refresh (eg,
5453 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005454 * should be sent.
5455 */
5456#define RIL_UNSOL_SIM_REFRESH 1017
5457
5458/**
5459 * RIL_UNSOL_CALL_RING
5460 *
5461 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07005462 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
5463 * of a call and sending multiple is optional. If the system property
5464 * ro.telephony.call_ring.multiple is false then the upper layers
5465 * will generate the multiple events internally. Otherwise the vendor
5466 * ril must generate multiple RIL_UNSOL_CALL_RING if
5467 * ro.telephony.call_ring.multiple is true or if it is absent.
5468 *
5469 * The rate of these events is controlled by ro.telephony.call_ring.delay
5470 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005471 *
Wink Saville3d54e742009-05-18 18:00:44 -07005472 * "data" is null for GSM
5473 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005474 */
5475#define RIL_UNSOL_CALL_RING 1018
5476
The Android Open Source Project34a51082009-03-05 14:34:37 -08005477/**
5478 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5479 *
5480 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07005481 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005482 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07005483
The Android Open Source Project34a51082009-03-05 14:34:37 -08005484 * "data" is null
5485 */
5486#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
5487
5488/**
5489 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
5490 *
5491 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07005492 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005493 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07005494 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005495 * Callee will subsequently confirm the receipt of the SMS with
5496 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07005497 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005498 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
5499 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07005500 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005501 */
5502#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
5503
5504/**
5505 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
5506 *
5507 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07005508 *
Henrik Hall0eba2022010-11-25 10:20:56 +01005509 * "data" can be one of the following:
5510 * If received from GSM network, "data" is const char of 88 bytes
5511 * which indicates each page of a CBS Message sent to the MS by the
5512 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
5513 * If received from UMTS network, "data" is const char of 90 up to 1252
5514 * bytes which contain between 1 and 15 CBS Message pages sent as one
5515 * 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 -07005516 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005517 */
5518#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07005519
The Android Open Source Project34a51082009-03-05 14:34:37 -08005520/**
5521 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
5522 *
5523 * Indicates that SMS storage on the RUIM is full. Messages
5524 * cannot be saved on the RUIM until space is freed.
5525 *
5526 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07005527 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005528 */
Wink Savillef4c4d362009-04-02 01:37:03 -07005529#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
5530
The Android Open Source Project34a51082009-03-05 14:34:37 -08005531/**
5532 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
5533 *
5534 * Indicates a restricted state change (eg, for Domain Specific Access Control).
5535 *
5536 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
5537 *
5538 * "data" is an int *
5539 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
5540 */
5541#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
5542
Wink Saville1b5fd232009-04-22 14:50:00 -07005543/**
5544 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
5545 *
5546 * Indicates that the radio system selection module has
5547 * autonomously entered emergency callback mode.
5548 *
5549 * "data" is null
5550 *
5551 */
5552#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08005553
Wink Saville1b5fd232009-04-22 14:50:00 -07005554/**
5555 * RIL_UNSOL_CDMA_CALL_WAITING
5556 *
5557 * Called when CDMA radio receives a call waiting indication.
5558 *
5559 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07005560 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005561 */
5562#define RIL_UNSOL_CDMA_CALL_WAITING 1025
5563
5564/**
5565 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
5566 *
5567 * Called when CDMA radio receives an update of the progress of an
5568 * OTASP/OTAPA call.
5569 *
5570 * "data" is const int *
5571 * For CDMA this is an integer OTASP/OTAPA status listed in
5572 * RIL_CDMA_OTA_ProvisionStatus.
5573 *
5574 */
5575#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
5576
5577/**
5578 * RIL_UNSOL_CDMA_INFO_REC
5579 *
5580 * Called when CDMA radio receives one or more info recs.
5581 *
5582 * "data" is const RIL_CDMA_InformationRecords *
5583 *
5584 */
5585#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08005586
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07005587/**
5588 * RIL_UNSOL_OEM_HOOK_RAW
5589 *
5590 * This is for OEM specific use.
5591 *
5592 * "data" is a byte[]
5593 */
5594#define RIL_UNSOL_OEM_HOOK_RAW 1028
5595
John Wang5d621da2009-09-18 17:17:48 -07005596/**
5597 * RIL_UNSOL_RINGBACK_TONE
5598 *
5599 * Indicates that nework doesn't have in-band information, need to
5600 * play out-band tone.
5601 *
5602 * "data" is an int *
5603 * ((int *)data)[0] == 0 for stop play ringback tone.
5604 * ((int *)data)[0] == 1 for start play ringback tone.
5605 */
5606#define RIL_UNSOL_RINGBACK_TONE 1029
5607
John Wang5909cf82010-01-29 00:18:54 -08005608/**
5609 * RIL_UNSOL_RESEND_INCALL_MUTE
5610 *
5611 * Indicates that framework/application need reset the uplink mute state.
5612 *
5613 * There may be situations where the mute state becomes out of sync
5614 * between the application and device in some GSM infrastructures.
5615 *
5616 * "data" is null
5617 */
5618#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08005619
5620/**
5621 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
5622 *
5623 * Called when CDMA subscription source changed.
5624 *
5625 * "data" is int *
5626 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
5627 */
Wink Saville29487ef2011-04-15 09:15:31 -07005628#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08005629
5630/**
5631 * RIL_UNSOL_CDMA_PRL_CHANGED
5632 *
5633 * Called when PRL (preferred roaming list) changes.
5634 *
5635 * "data" is int *
5636 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
5637 */
5638#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
5639
5640/**
5641 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
5642 *
5643 * Called when Emergency Callback Mode Ends
5644 *
5645 * Indicates that the radio system selection module has
5646 * proactively exited emergency callback mode.
5647 *
5648 * "data" is NULL
5649 *
5650 */
5651#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
5652
Wink Saville5b9df332011-04-06 16:24:21 -07005653/**
5654 * RIL_UNSOL_RIL_CONNECTED
5655 *
5656 * Called the ril connects and returns the version
5657 *
5658 * "data" is int *
5659 * ((int *)data)[0] is RIL_VERSION
5660 */
5661#define RIL_UNSOL_RIL_CONNECTED 1034
5662
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005663/**
5664 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
5665 *
5666 * Indicates that voice technology has changed. Contains new radio technology
5667 * as a data in the message.
5668 *
5669 * "data" is int *
5670 * ((int *)data)[0] is of type const RIL_RadioTechnology
5671 *
5672 */
5673#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
5674
Wink Saville8a9e0212013-04-09 12:11:38 -07005675/**
5676 * RIL_UNSOL_CELL_INFO_LIST
5677 *
5678 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
5679 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
5680 *
5681 * "data" is NULL
5682 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08005683 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07005684 */
5685#define RIL_UNSOL_CELL_INFO_LIST 1036
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005686
Wink Saville865ce3b2013-11-08 16:37:01 -08005687/**
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005688 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
5689 *
5690 * Called when IMS registration state has changed
5691 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005692 * To get IMS registration state and IMS SMS format, callee needs to invoke the
5693 * following request on main thread:
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005694 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005695 * RIL_REQUEST_IMS_REGISTRATION_STATE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005696 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005697 * "data" is NULL
5698 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005699 */
5700#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
5701
Etan Cohend3652192014-06-20 08:28:44 -07005702/**
5703 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
5704 *
5705 * Indicated when there is a change in subscription status.
5706 * This event will be sent in the following scenarios
5707 * - subscription readiness at modem, which was selected by telephony layer
5708 * - when subscription is deactivated by modem due to UICC card removal
5709 * - When network invalidates the subscription i.e. attach reject due to authentication reject
5710 *
5711 * "data" is const int *
5712 * ((const int *)data)[0] == 0 for Subscription Deactivated
5713 * ((const int *)data)[0] == 1 for Subscription Activated
5714 *
5715 */
5716#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
5717
5718/**
5719 * RIL_UNSOL_SRVCC_STATE_NOTIFY
5720 *
5721 * Called when Single Radio Voice Call Continuity(SRVCC)
5722 * progress state has changed
5723 *
5724 * "data" is int *
5725 * ((int *)data)[0] is of type const RIL_SrvccState
5726 *
5727 */
5728
5729#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
5730
5731/**
5732 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
5733 *
5734 * Called when the hardware configuration associated with the RILd changes
5735 *
5736 * "data" is an array of RIL_HardwareConfig
5737 *
5738 */
5739#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
5740
Wink Savillec29360a2014-07-13 05:17:28 -07005741/**
5742 * RIL_UNSOL_DC_RT_INFO_CHANGED
5743 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005744 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005745 * Sent when the DC_RT_STATE changes but the time
5746 * between these messages must not be less than the
5747 * value set by RIL_REQUEST_SET_DC_RT_RATE.
5748 *
5749 * "data" is the most recent RIL_DcRtInfo
5750 *
5751 */
5752#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
5753
Wink Saville8b4e4f72014-10-17 15:01:45 -07005754/**
5755 * RIL_UNSOL_RADIO_CAPABILITY
5756 *
5757 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
5758 * Returns the phone radio capability exactly as
5759 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
5760 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
5761 *
5762 * "data" is the RIL_RadioCapability structure
5763 */
5764#define RIL_UNSOL_RADIO_CAPABILITY 1042
5765
Amit Mahajan54563d32014-11-22 00:54:49 +00005766/*
5767 * RIL_UNSOL_ON_SS
5768 *
5769 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
5770 * call control.
5771 *
5772 * "data" is const RIL_StkCcUnsolSsResponse *
5773 *
5774 */
5775#define RIL_UNSOL_ON_SS 1043
5776
5777/**
5778 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
5779 *
5780 * Called when there is an ALPHA from UICC during Call Control.
5781 *
5782 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
5783 *
5784 */
5785#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
5786
fengluf7408292015-04-14 14:53:55 -07005787/**
5788 * RIL_UNSOL_LCEDATA_RECV
5789 *
5790 * Called when there is an incoming Link Capacity Estimate (LCE) info report.
5791 *
fenglu290add32015-05-01 17:05:15 -07005792 * "data" is the RIL_LceDataInfo structure.
fengluf7408292015-04-14 14:53:55 -07005793 *
5794 */
5795#define RIL_UNSOL_LCEDATA_RECV 1045
5796
Robert Greenwalt27e99c52016-06-01 16:31:38 -07005797 /**
5798 * RIL_UNSOL_PCO_DATA
5799 *
5800 * Called when there is new Carrier PCO data received for a data call. Ideally
5801 * only new data will be forwarded, though this is not required. Multiple
5802 * boxes of carrier PCO data for a given call should result in a series of
5803 * RIL_UNSOL_PCO_DATA calls.
5804 *
5805 * "data" is the RIL_PCO_Data structure.
5806 *
5807 */
5808#define RIL_UNSOL_PCO_DATA 1046
5809
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005810/***********************************************************************/
5811
Amit Mahajan54563d32014-11-22 00:54:49 +00005812
Etan Cohend3652192014-06-20 08:28:44 -07005813#if defined(ANDROID_MULTI_SIM)
5814/**
5815 * RIL_Request Function pointer
5816 *
5817 * @param request is one of RIL_REQUEST_*
5818 * @param data is pointer to data defined for that RIL_REQUEST_*
5819 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07005820 * structures passed as data may contain pointers to non-contiguous memory
Etan Cohend3652192014-06-20 08:28:44 -07005821 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07005822 * @param datalen is the length of "data" which is defined as other argument. It may or may
5823 * not be equal to sizeof(data). Refer to the documentation of individual structures
5824 * to find if pointers listed in the structure are contiguous and counted in the datalen
5825 * length or not.
5826 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
Etan Cohend3652192014-06-20 08:28:44 -07005827 *
5828 */
5829typedef void (*RIL_RequestFunc) (int request, void *data,
5830 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
5831
5832/**
5833 * This function should return the current radio state synchronously
5834 */
5835typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
5836
5837#else
5838/* Backward compatible */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005839
5840/**
5841 * RIL_Request Function pointer
5842 *
5843 * @param request is one of RIL_REQUEST_*
5844 * @param data is pointer to data defined for that RIL_REQUEST_*
5845 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07005846 * structures passed as data may contain pointers to non-contiguous memory
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005847 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07005848 * @param datalen is the length of "data" which is defined as other argument. It may or may
5849 * not be equal to sizeof(data). Refer to the documentation of individual structures
5850 * to find if pointers listed in the structure are contiguous and counted in the datalen
5851 * length or not.
5852 * (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 -08005853 *
5854 */
Wink Saville7f856802009-06-09 10:23:37 -07005855typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005856 size_t datalen, RIL_Token t);
5857
5858/**
5859 * This function should return the current radio state synchronously
5860 */
5861typedef RIL_RadioState (*RIL_RadioStateRequest)();
5862
Etan Cohend3652192014-06-20 08:28:44 -07005863#endif
5864
5865
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005866/**
5867 * This function returns "1" if the specified RIL_REQUEST code is
5868 * supported and 0 if it is not
5869 *
5870 * @param requestCode is one of RIL_REQUEST codes
5871 */
5872
5873typedef int (*RIL_Supports)(int requestCode);
5874
5875/**
Wink Saville7f856802009-06-09 10:23:37 -07005876 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005877 * thread that calls RIL_RequestFunc--and indicates that a pending
5878 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07005879 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005880 * On cancel, the callee should do its best to abandon the request and
5881 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
5882 *
5883 * Subsequent calls to RIL_onRequestComplete for this request with
5884 * other results will be tolerated but ignored. (That is, it is valid
5885 * to ignore the cancellation request)
5886 *
5887 * RIL_Cancel calls should return immediately, and not wait for cancellation
5888 *
Wink Saville7f856802009-06-09 10:23:37 -07005889 * 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 -08005890 * interface
5891 *
5892 * @param t token wants to be canceled
5893 */
5894
5895typedef void (*RIL_Cancel)(RIL_Token t);
5896
5897typedef void (*RIL_TimedCallback) (void *param);
5898
5899/**
5900 * Return a version string for your RIL implementation
5901 */
5902typedef const char * (*RIL_GetVersion) (void);
5903
5904typedef struct {
5905 int version; /* set to RIL_VERSION */
5906 RIL_RequestFunc onRequest;
5907 RIL_RadioStateRequest onStateRequest;
5908 RIL_Supports supports;
5909 RIL_Cancel onCancel;
5910 RIL_GetVersion getVersion;
5911} RIL_RadioFunctions;
5912
Sungmin Choi75697532013-04-26 15:04:45 -07005913typedef struct {
5914 char *apn;
5915 char *protocol;
5916 int authtype;
5917 char *username;
5918 char *password;
5919} RIL_InitialAttachApn;
5920
Amit Mahajan2b772032014-06-26 14:20:11 -07005921typedef struct {
5922 int authContext; /* P2 value of authentication command, see P2 parameter in
5923 3GPP TS 31.102 7.1.2 */
5924 char *authData; /* the challenge string in Base64 format, see 3GPP
5925 TS 31.102 7.1.2 */
5926 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
5927 NULL if no value. */
5928} RIL_SimAuthentication;
5929
Robert Greenwalt17ea3fa2016-06-15 14:59:38 -07005930typedef struct {
5931 int cid; /* Context ID, uniquely identifies this call */
5932 char *bearer_proto; /* One of the PDP_type values in TS 27.007 section 10.1.1.
5933 For example, "IP", "IPV6", "IPV4V6" */
5934 int pco_id; /* The protocol ID for this box. Note that only IDs from
5935 FF00H - FFFFH are accepted. If more than one is included
5936 from the network, multiple calls should be made to send all
5937 of them. */
5938 int contents_length; /* The number of octets in the contents. */
5939 char *contents; /* Carrier-defined content. It is binary, opaque and
5940 loosely defined in LTE Layer 3 spec 24.008 */
5941} RIL_PCO_Data;
5942
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005943#ifdef RIL_SHLIB
5944struct RIL_Env {
5945 /**
5946 * "t" is parameter passed in on previous call to RIL_Notification
5947 * routine.
5948 *
5949 * If "e" != SUCCESS, then response can be null/is ignored
5950 *
Wink Saville7f856802009-06-09 10:23:37 -07005951 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005952 * freed by callee
5953 *
5954 * RIL_onRequestComplete will return as soon as possible
5955 */
Wink Saville7f856802009-06-09 10:23:37 -07005956 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005957 void *response, size_t responselen);
5958
Etan Cohend3652192014-06-20 08:28:44 -07005959#if defined(ANDROID_MULTI_SIM)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005960 /**
5961 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5962 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5963 *
5964 * "data" is owned by caller, and should not be modified or freed by callee
5965 */
Etan Cohend3652192014-06-20 08:28:44 -07005966 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
5967#else
5968 /**
5969 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5970 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5971 *
5972 * "data" is owned by caller, and should not be modified or freed by callee
5973 */
5974 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
5975#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005976 /**
Wink Saville7f856802009-06-09 10:23:37 -07005977 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005978 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
5979 * a relative time value at which the callback is invoked. If relativeTime is
5980 * NULL or points to a 0-filled structure, the callback will be invoked as
5981 * soon as possible
5982 */
5983
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07005984 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07005985 void *param, const struct timeval *relativeTime);
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005986 /**
5987 * "t" is parameter passed in on previous call RIL_Notification routine
5988 *
5989 * RIL_onRequestAck will be called by vendor when an Async RIL request was received
5990 * by them and an ack needs to be sent back to java ril.
5991 */
5992 void (*OnRequestAck) (RIL_Token t);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005993};
5994
5995
Wink Saville7f856802009-06-09 10:23:37 -07005996/**
5997 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005998 * argc and argv will be command line arguments intended for the RIL implementation
5999 * Return NULL on error
6000 *
6001 * @param env is environment point defined as RIL_Env
6002 * @param argc number of arguments
6003 * @param argv list fo arguments
6004 *
6005 */
6006const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
6007
Sanket Padawe1be49ba2016-03-31 17:37:23 -07006008/**
6009 * If BT SAP(SIM Access Profile) is supported, then RIL implementations must define RIL_SAP_Init
6010 * for initializing RIL_RadioFunctions used for BT SAP communcations. It is called whenever RILD
6011 * starts or modem restarts. Returns handlers for SAP related request that are made on SAP
6012 * sepecific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init
6013 * and used on the general RIL socket.
6014 * argc and argv will be command line arguments intended for the RIL implementation
6015 * Return NULL on error.
6016 *
6017 * @param env is environment point defined as RIL_Env
6018 * @param argc number of arguments
6019 * @param argv list fo arguments
6020 *
6021 */
6022const RIL_RadioFunctions *RIL_SAP_Init(const struct RIL_Env *env, int argc, char **argv);
6023
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006024#else /* RIL_SHLIB */
6025
6026/**
6027 * Call this once at startup to register notification routine
6028 *
6029 * @param callbacks user-specifed callback function
6030 */
6031void RIL_register (const RIL_RadioFunctions *callbacks);
6032
6033
6034/**
6035 *
6036 * RIL_onRequestComplete will return as soon as possible
6037 *
6038 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07006039 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006040 * @param e error code
6041 * if "e" != SUCCESS, then response can be null/is ignored
6042 * @param response is owned by caller, and should not be modified or
6043 * freed by callee
6044 * @param responselen the length of response in byte
6045 */
Wink Saville7f856802009-06-09 10:23:37 -07006046void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006047 void *response, size_t responselen);
6048
Sanket Padawe6ff9a872016-01-27 15:09:12 -08006049/**
6050 * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and
6051 * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's
6052 * results, just that the command was received and will take a while. After sending this Ack
6053 * its vendor's responsibility to make sure that AP is up whenever needed while command is
6054 * being processed.
6055 *
6056 * @param t is parameter passed in on previous call to RIL_Notification
6057 * routine.
6058 */
6059void RIL_onRequestAck(RIL_Token t);
6060
Etan Cohend3652192014-06-20 08:28:44 -07006061#if defined(ANDROID_MULTI_SIM)
6062/**
6063 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6064 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6065 * "data" is owned by caller, and should not be modified or freed by callee
6066 * @param datalen the length of data in byte
6067 */
6068
6069void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
6070 size_t datalen, RIL_SOCKET_ID socket_id);
6071#else
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006072/**
6073 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6074 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6075 * "data" is owned by caller, and should not be modified or freed by callee
6076 * @param datalen the length of data in byte
6077 */
6078
Wink Saville7f856802009-06-09 10:23:37 -07006079void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006080 size_t datalen);
Etan Cohend3652192014-06-20 08:28:44 -07006081#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006082
6083/**
Wink Saville7f856802009-06-09 10:23:37 -07006084 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006085 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6086 * a relative time value at which the callback is invoked. If relativeTime is
6087 * NULL or points to a 0-filled structure, the callback will be invoked as
6088 * soon as possible
6089 *
6090 * @param callback user-specifed callback function
6091 * @param param parameter list
6092 * @param relativeTime a relative time value at which the callback is invoked
6093 */
6094
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07006095void RIL_requestTimedCallback (RIL_TimedCallback callback,
6096 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006097
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006098#endif /* RIL_SHLIB */
6099
6100#ifdef __cplusplus
6101}
6102#endif
6103
6104#endif /*ANDROID_RIL_H*/