blob: d88e168382688fc4571b4979b5467a47757d6edd [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,
249 RADIO_TECH_IWLAN = 18
Wink Saville43808972011-01-13 17:39:51 -0800250} RIL_RadioTechnology;
251
Wink Saville8b4e4f72014-10-17 15:01:45 -0700252typedef enum {
253 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
254 RAF_GPRS = (1 << RADIO_TECH_GPRS),
255 RAF_EDGE = (1 << RADIO_TECH_EDGE),
256 RAF_UMTS = (1 << RADIO_TECH_UMTS),
257 RAF_IS95A = (1 << RADIO_TECH_IS95A),
258 RAF_IS95B = (1 << RADIO_TECH_IS95B),
259 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
260 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
261 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
262 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
263 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
264 RAF_HSPA = (1 << RADIO_TECH_HSPA),
265 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
266 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
267 RAF_LTE = (1 << RADIO_TECH_LTE),
268 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
269 RAF_GSM = (1 << RADIO_TECH_GSM),
270 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
271} RIL_RadioAccessFamily;
272
273typedef enum {
Nathan Harold92839f12016-02-12 10:02:28 -0800274 BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically)
275 BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
276 BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
277 BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000)
278 BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
279 BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
280 BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band)
281 BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band)
282 BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band)
283 BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band)
284 BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band)
285 BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band)
286 BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band)
287 BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band)
288 BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band)
289 BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band)
290 BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band)
291 BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band)
292 BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band)
293} RIL_RadioBandMode;
294
295typedef enum {
Wink Saville8b4e4f72014-10-17 15:01:45 -0700296 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
297 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
298 // forthcoming with these same parameters
299 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
300 // RIL_RadioCapability.status = 0, if any START's fail no
301 // APPLY will be sent
302 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
303 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
304 // occurs in any previous command the RIL_RadioAccessesFamily and
Legler Wu8caf06f2014-10-29 14:02:14 +0800305 // logicalModemUuid fields will be the prior configuration thus
Wink Saville8b4e4f72014-10-17 15:01:45 -0700306 // restoring the configuration to the previous value. An error
307 // returned by this command will generally be ignored or may
308 // cause that logical modem to be removed from service.
309} RadioCapabilityPhase;
310
311typedef enum {
312 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
313 // RC_PHASE_APPLY
314 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
315 // capability was success with RC_PHASE_FINISH
316 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
317 // capability is fail with RC_PHASE_FINISH.
318} RadioCapabilityStatus;
319
320#define RIL_RADIO_CAPABILITY_VERSION 1
321typedef struct {
Legler Wu8caf06f2014-10-29 14:02:14 +0800322 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
Wink Saville8b4e4f72014-10-17 15:01:45 -0700323 int session; // Unique session value defined by framework returned in all "responses/unsol"
324 int phase; // CONFIGURED, START, APPLY, FINISH
325 int rat; // RIL_RadioAccessFamily for the radio
326 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
327 int status; // Return status and an input parameter for RC_PHASE_FINISH
328} RIL_RadioCapability;
329
Wink Savillec0114b32011-02-18 10:14:07 -0800330// Do we want to split Data from Voice and the use
331// RIL_RadioTechnology for get/setPreferredVoice/Data ?
332typedef enum {
333 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
334 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
335 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
336 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
337 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
338 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
339 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
340 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
341 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
342 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
343 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
Uma Maheswari Ramalingam0e094872011-09-28 13:25:48 -0700344 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
345 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
Wink Savillec0114b32011-02-18 10:14:07 -0800346} RIL_PreferredNetworkType;
347
348/* Source for cdma subscription */
349typedef enum {
350 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
351 CDMA_SUBSCRIPTION_SOURCE_NV = 1
352} RIL_CdmaSubscriptionSource;
353
Wink Saville74fa3882009-12-22 15:35:41 -0800354/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
355typedef enum {
356 RIL_UUS_TYPE1_IMPLICIT = 0,
357 RIL_UUS_TYPE1_REQUIRED = 1,
358 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
359 RIL_UUS_TYPE2_REQUIRED = 3,
360 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
361 RIL_UUS_TYPE3_REQUIRED = 5,
362 RIL_UUS_TYPE3_NOT_REQUIRED = 6
363} RIL_UUS_Type;
364
365/* User-to-User Signaling Information data coding schemes. Possible values for
366 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
367 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
368typedef enum {
369 RIL_UUS_DCS_USP = 0, /* User specified protocol */
370 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
371 RIL_UUS_DCS_X244 = 2, /* X.244 */
372 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
373 convergence function */
374 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
375} RIL_UUS_DCS;
376
377/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
378 * This data is passed in RIL_ExtensionRecord and rec contains this
379 * structure when type is RIL_UUS_INFO_EXT_REC */
380typedef struct {
381 RIL_UUS_Type uusType; /* UUS Type */
382 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
383 int uusLength; /* Length of UUS Data */
384 char * uusData; /* UUS Data */
385} RIL_UUS_Info;
386
387/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700388typedef struct {
389 char isPresent; /* non-zero if signal information record is present */
390 char signalType; /* as defined 3.7.5.5-1 */
391 char alertPitch; /* as defined 3.7.5.5-2 */
392 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
393} RIL_CDMA_SignalInfoRecord;
394
Wink Saville1b5fd232009-04-22 14:50:00 -0700395typedef struct {
396 RIL_CallState state;
397 int index; /* Connection Index for use with, eg, AT+CHLD */
398 int toa; /* type of address, eg 145 = intl */
399 char isMpty; /* nonzero if is mpty call */
400 char isMT; /* nonzero if call is mobile terminated */
401 char als; /* ALS line indicator if available
402 (0 = line 1) */
403 char isVoice; /* nonzero if this is is a voice call */
404 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
405 char * number; /* Remote party number */
406 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
407 char * name; /* Remote party name */
408 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800409 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800410} RIL_Call;
411
Wink Savillec0114b32011-02-18 10:14:07 -0800412/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800413typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800414 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700415 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700416 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
417 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800418 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800419 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
420} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800421
422/*
423 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
424 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
425 */
426typedef struct {
427 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500428 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
429 back-off timer value RIL wants to override the one
430 pre-configured in FW.
431 The unit is miliseconds.
432 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700433 The value 0 means retry should be done ASAP.
Wink Saville8a9e0212013-04-09 12:11:38 -0700434 The value of INT_MAX(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800435 int cid; /* Context ID, uniquely identifies this call */
436 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
437 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
438 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
439 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
440 such as "IP" or "IPV6" */
441 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800442 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
443 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800444 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800445 one of each. If the prefix length is absent the addresses
446 are assumed to be point to point with IPv4 having a prefix
447 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800448 char * dnses; /* A space-delimited list of DNS server addresses,
449 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
450 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800451 char * gateways; /* A space-delimited list of default gateway addresses,
452 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
453 May be empty in which case the addresses represent point
454 to point connections. */
455} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800456
Etan Cohend3652192014-06-20 08:28:44 -0700457typedef struct {
458 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
459 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
460 back-off timer value RIL wants to override the one
461 pre-configured in FW.
462 The unit is miliseconds.
463 The value < 0 means no value is suggested.
464 The value 0 means retry should be done ASAP.
465 The value of INT_MAX(0x7fffffff) means no retry. */
466 int cid; /* Context ID, uniquely identifies this call */
467 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
468 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
469 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
470 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
471 such as "IP" or "IPV6" */
472 char * ifname; /* The network interface name */
473 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
474 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
475 May not be empty, typically 1 IPv4 or 1 IPv6 or
476 one of each. If the prefix length is absent the addresses
477 are assumed to be point to point with IPv4 having a prefix
478 length of 32 and IPv6 128. */
479 char * dnses; /* A space-delimited list of DNS server addresses,
480 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
481 May be empty. */
482 char * gateways; /* A space-delimited list of default gateway addresses,
483 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
484 May be empty in which case the addresses represent point
485 to point connections. */
486 char * pcscf; /* the Proxy Call State Control Function address
487 via PCO(Protocol Configuration Option) for IMS client. */
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -0700488} RIL_Data_Call_Response_v9;
489
490typedef struct {
491 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
492 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
493 back-off timer value RIL wants to override the one
494 pre-configured in FW.
495 The unit is miliseconds.
496 The value < 0 means no value is suggested.
497 The value 0 means retry should be done ASAP.
498 The value of INT_MAX(0x7fffffff) means no retry. */
499 int cid; /* Context ID, uniquely identifies this call */
500 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
501 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
502 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
503 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
504 such as "IP" or "IPV6" */
505 char * ifname; /* The network interface name */
506 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
507 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
508 May not be empty, typically 1 IPv4 or 1 IPv6 or
509 one of each. If the prefix length is absent the addresses
510 are assumed to be point to point with IPv4 having a prefix
511 length of 32 and IPv6 128. */
512 char * dnses; /* A space-delimited list of DNS server addresses,
513 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
514 May be empty. */
515 char * gateways; /* A space-delimited list of default gateway addresses,
516 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
517 May be empty in which case the addresses represent point
518 to point connections. */
519 char * pcscf; /* the Proxy Call State Control Function address
520 via PCO(Protocol Configuration Option) for IMS client. */
521 int mtu; /* MTU received from network
522 Value <= 0 means network has either not sent a value or
523 sent an invalid value */
524} RIL_Data_Call_Response_v11;
Etan Cohend3652192014-06-20 08:28:44 -0700525
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700526typedef enum {
527 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
528 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
529} RIL_RadioTechnologyFamily;
530
531typedef struct {
532 RIL_RadioTechnologyFamily tech;
533 unsigned char retry; /* 0 == not retry, nonzero == retry */
534 int messageRef; /* Valid field if retry is set to nonzero.
535 Contains messageRef from RIL_SMS_Response
536 corresponding to failed MO SMS.
537 */
538
539 union {
540 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
541 RIL_CDMA_SMS_Message* cdmaMessage;
542
543 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
544 char** gsmMessage;
545 } message;
546} RIL_IMS_SMS_Message;
547
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800548typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800549 int messageRef; /* TP-Message-Reference for GSM,
550 and BearerData MessageId for CDMA
551 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800552 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700553 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
554 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
555 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800556} RIL_SMS_Response;
557
558/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
559typedef struct {
560 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
561 /* 0 = "REC UNREAD" */
562 /* 1 = "REC READ" */
563 /* 2 = "STO UNSENT" */
564 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700565 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
566 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800567 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
568 (as expected by TS 27.005) or NULL for default SMSC */
569} RIL_SMS_WriteArgs;
570
571/** Used by RIL_REQUEST_DIAL */
572typedef struct {
573 char * address;
574 int clir;
575 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
576 * clir == 0 on "use subscription default value"
577 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
578 * clir == 2 on "CLIR suppression" (allow CLI presentation)
579 */
Wink Saville74fa3882009-12-22 15:35:41 -0800580 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800581} RIL_Dial;
582
583typedef struct {
584 int command; /* one of the commands listed for TS 27.007 +CRSM*/
585 int fileid; /* EF id */
586 char *path; /* "pathid" from TS 27.007 +CRSM command.
587 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700588 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800589 */
590 int p1;
591 int p2;
592 int p3;
593 char *data; /* May be NULL*/
594 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800595} RIL_SIM_IO_v5;
596
597typedef struct {
598 int command; /* one of the commands listed for TS 27.007 +CRSM*/
599 int fileid; /* EF id */
600 char *path; /* "pathid" from TS 27.007 +CRSM command.
601 Path is in hex asciii format eg "7f205f70"
602 Path must always be provided.
603 */
604 int p1;
605 int p2;
606 int p3;
607 char *data; /* May be NULL*/
608 char *pin2; /* May be NULL*/
609 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
610} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800611
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800612/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
613 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
614typedef struct {
615 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
616 ignored for +CSIM command. */
617
618 /* Following fields are used to derive the APDU ("command" and "length"
619 values in TS 27.007 +CSIM and +CGLA commands). */
620 int cla;
621 int instruction;
622 int p1;
623 int p2;
624 int p3; /* A negative P3 implies a 4 byte APDU. */
625 char *data; /* May be NULL. In hex string format. */
626} RIL_SIM_APDU;
627
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800628typedef struct {
629 int sw1;
630 int sw2;
Amit Mahajan2875bc22014-08-06 10:03:15 -0700631 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
632 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 -0800633} RIL_SIM_IO_Response;
634
635/* See also com.android.internal.telephony.gsm.CallForwardInfo */
636
637typedef struct {
638 int status; /*
639 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
640 * status 1 = active, 0 = not active
641 *
642 * For RIL_REQUEST_SET_CALL_FORWARD:
643 * status is:
644 * 0 = disable
645 * 1 = enable
646 * 2 = interrogate
647 * 3 = registeration
648 * 4 = erasure
649 */
650
Wink Saville3d54e742009-05-18 18:00:44 -0700651 int reason; /* from TS 27.007 7.11 "reason" */
652 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
653 See table for Android mapping from
654 MMI service code
655 0 means user doesn't input class */
656 int toa; /* "type" from TS 27.007 7.11 */
657 char * number; /* "number" from TS 27.007 7.11. May be NULL */
658 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800659}RIL_CallForwardInfo;
660
661typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700662 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
663 * Upper 16 bits is LAC and lower 16 bits
664 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800665 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700666 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700667 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800668 */
johnwange0ba6a92009-09-11 19:14:52 -0700669 int rssi; /* Received RSSI in GSM,
670 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800671 */
672} RIL_NeighboringCell;
673
fengluf7408292015-04-14 14:53:55 -0700674typedef struct {
675 char lce_status; /* LCE service status:
676 * -1 = not supported;
677 * 0 = stopped;
678 * 1 = active.
679 */
680 unsigned int actual_interval_ms; /* actual LCE reporting interval,
681 * meaningful only if LCEStatus = 1.
682 */
683} RIL_LceStatusInfo;
684
685typedef struct {
fenglu290add32015-05-01 17:05:15 -0700686 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
fengluf7408292015-04-14 14:53:55 -0700687 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
688 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
689 * moves to inactive state or network type change)
690 * 1 = suspended;
691 * 0 = not suspended.
692 */
693} RIL_LceDataInfo;
694
Meng Wangb4e34312016-05-12 14:54:36 -0700695typedef enum {
696 RIL_MATCH_ALL = 0, /* Apply to all carriers with the same mcc/mnc */
697 RIL_MATCH_SPN = 1, /* Use SPN and mcc/mnc to identify the carrier */
698 RIL_MATCH_IMSI_PREFIX = 2, /* Use IMSI prefix and mcc/mnc to identify the carrier */
699 RIL_MATCH_GID1 = 3, /* Use GID1 and mcc/mnc to identify the carrier */
700 RIL_MATCH_GID2 = 4, /* Use GID2 and mcc/mnc to identify the carrier */
701} RIL_CarrierMatchType;
702
703typedef struct {
704 const char * mcc;
705 const char * mnc;
706 RIL_CarrierMatchType match_type; /* Specify match type for the carrier.
707 * If it’s RIL_MATCH_ALL, match_data is null;
708 * otherwise, match_data is the value for the match type.
709 */
710 const char * match_data;
711} RIL_Carrier;
712
713typedef struct {
714 int32_t len_allowed_carriers; /* length of array allowed_carriers */
715 int32_t len_excluded_carriers; /* length of array excluded_carriers */
716 RIL_Carrier * allowed_carriers; /* whitelist for allowed carriers */
717 RIL_Carrier * excluded_carriers; /* blacklist for explicitly excluded carriers
718 * which match allowed_carriers. Eg. allowed_carriers match
719 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1
720 * is ABCD. It means except the carrier whose gid1 is ABCD,
721 * all carriers with the same mcc/mnc are allowed.
722 */
723} RIL_CarrierRestrictions;
724
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800725/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
726typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700727 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800728 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
729 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
730 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800731 CALL_FAIL_NORMAL = 16,
732 CALL_FAIL_BUSY = 17,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800733 CALL_FAIL_NO_USER_RESPONDING = 18,
734 CALL_FAIL_NO_ANSWER_FROM_USER = 19,
735 CALL_FAIL_CALL_REJECTED = 21,
736 CALL_FAIL_NUMBER_CHANGED = 22,
737 CALL_FAIL_PREEMPTION = 25,
738 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
739 CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
740 CALL_FAIL_FACILITY_REJECTED = 29,
741 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
742 CALL_FAIL_NORMAL_UNSPECIFIED = 31,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800743 CALL_FAIL_CONGESTION = 34,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800744 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
745 CALL_FAIL_TEMPORARY_FAILURE = 41,
746 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
747 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
748 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
749 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
750 CALL_FAIL_QOS_UNAVAILABLE = 49,
751 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
752 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
753 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
754 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
755 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
756 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800757 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800758 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
759 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
760 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
761 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
762 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
763 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
764 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
765 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
766 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
767 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
768 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
769 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
770 CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
771 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
772 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
773 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
774 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800775 CALL_FAIL_CALL_BARRED = 240,
776 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700777 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
778 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Amit Mahajan54563d32014-11-22 00:54:49 +0000779 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
780 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
781 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
Wink Saville1b5fd232009-04-22 14:50:00 -0700782 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
783 CALL_FAIL_CDMA_DROP = 1001,
784 CALL_FAIL_CDMA_INTERCEPT = 1002,
785 CALL_FAIL_CDMA_REORDER = 1003,
786 CALL_FAIL_CDMA_SO_REJECT = 1004,
787 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
788 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
789 CALL_FAIL_CDMA_PREEMPTED = 1007,
790 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
791 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700792 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800793 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
794 vendor code should make sure to map error
795 code to specific error */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800796} RIL_LastCallFailCause;
797
Chao Liu548a81e2015-05-14 16:13:46 -0700798typedef struct {
799 RIL_LastCallFailCause cause_code;
800 char * vendor_cause;
801} RIL_LastCallFailCauseInfo;
802
Wink Savillef4c4d362009-04-02 01:37:03 -0700803/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800804typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800805 PDP_FAIL_NONE = 0, /* No error, connection ok */
806
807 /* an integer cause code defined in TS 24.008
808 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
809 If the implementation does not have access to the exact cause codes,
810 then it should return one of the following values,
811 as the UI layer needs to distinguish these
812 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700813 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
Sanket Padaweac308b92016-01-07 14:41:17 -0800814 PDP_FAIL_NAS_SIGNALLING = 0x0E,
815 PDP_FAIL_LLC_SNDCP = 0x19,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700816 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
817 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
818 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
819 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
820 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
821 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
822 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
823 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
824 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800825 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
Hui Wang11e8b232014-09-19 16:40:17 -0500826 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
827 based on framework config */
Sanket Padaweac308b92016-01-07 14:41:17 -0800828 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
829 PDP_FAIL_NETWORK_FAILURE = 0x26,
830 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
831 PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
832 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
833 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
834 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
835 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
836 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
837 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
Wink Saville43808972011-01-13 17:39:51 -0800838 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
839 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
840 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Sanket Padaweac308b92016-01-07 14:41:17 -0800841 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
842 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
843 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
844 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
845 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
846 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
847 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
848 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
849 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
850 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
851 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
852 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
853 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
854 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
855 PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
856 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
857 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
858 PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
859 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
860 PDP_FAIL_IFACE_MISMATCH = 0x75,
861 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
862 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
863 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
864 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
865 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
Wink Saville43808972011-01-13 17:39:51 -0800866
Sanket Padawe0106aed2016-02-09 09:56:31 -0800867 // OEM specific error codes. To be used by OEMs when they don't want to
868 // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
869 PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001,
870 PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002,
871 PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003,
872 PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004,
873 PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005,
874 PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006,
875 PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007,
876 PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008,
877 PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009,
878 PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A,
879 PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B,
880 PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C,
881 PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D,
882 PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E,
883 PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F,
884
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700885 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800886 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
887 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800888
889 /* reasons for data call drop - network/modem disconnect */
Wink Saville3492c6e2013-10-03 13:53:27 -0700890 PDP_FAIL_SIGNAL_LOST = -3,
Wink Saville43808972011-01-13 17:39:51 -0800891 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
892 with parameters appropriate for new technology */
893 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
894 powered off - no retry */
895 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
896 mode was up on same APN/data profile - no retry until
897 tethered call is off */
898
Sanket Padaweac308b92016-01-07 14:41:17 -0800899 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
900 new error codes are added making this unnecessary */
Wink Saville43808972011-01-13 17:39:51 -0800901} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800902
jsh602f80f2009-07-10 15:44:37 -0700903/* See RIL_REQUEST_SETUP_DATA_CALL */
904typedef enum {
905 RIL_DATA_PROFILE_DEFAULT = 0,
906 RIL_DATA_PROFILE_TETHERED = 1,
Hui Wang8d679622014-10-16 14:59:27 -0500907 RIL_DATA_PROFILE_IMS = 2,
908 RIL_DATA_PROFILE_FOTA = 3,
909 RIL_DATA_PROFILE_CBS = 4,
910 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
911 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
jsh602f80f2009-07-10 15:44:37 -0700912} RIL_DataProfile;
913
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800914/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
915typedef struct {
916 int notificationType; /*
917 * 0 = MO intermediate result code
918 * 1 = MT unsolicited result code
919 */
920 int code; /* See 27.007 7.17
921 "code1" for MO
922 "code2" for MT. */
923 int index; /* CUG index. See 27.007 7.17. */
924 int type; /* "type" from 27.007 7.17 (MT only). */
925 char * number; /* "number" from 27.007 7.17
926 (MT only, may be NULL). */
927} RIL_SuppSvcNotification;
928
Wink Savillef4c4d362009-04-02 01:37:03 -0700929#define RIL_CARD_MAX_APPS 8
930
931typedef enum {
Meng Wangb4e34312016-05-12 14:54:36 -0700932 RIL_CARDSTATE_ABSENT = 0,
933 RIL_CARDSTATE_PRESENT = 1,
934 RIL_CARDSTATE_ERROR = 2,
935 RIL_CARDSTATE_RESTRICTED = 3 /* card is present but not usable due to carrier restrictions.*/
Wink Savillef4c4d362009-04-02 01:37:03 -0700936} RIL_CardState;
937
938typedef enum {
939 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
940 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700941 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
942 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700943 involved */
944 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
945 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
946 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
947 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
948 RIL_PERSOSUBSTATE_SIM_SIM = 7,
949 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
950 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
951 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
952 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
953 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
954 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
955 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
956 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
957 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
958 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
959 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
960 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
961 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
962 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
963 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
964 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
965 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
966} RIL_PersoSubstate;
967
968typedef enum {
969 RIL_APPSTATE_UNKNOWN = 0,
970 RIL_APPSTATE_DETECTED = 1,
971 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
972 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700973 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700974 when app_state is assigned to this value */
975 RIL_APPSTATE_READY = 5
976} RIL_AppState;
977
978typedef enum {
979 RIL_PINSTATE_UNKNOWN = 0,
980 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
981 RIL_PINSTATE_ENABLED_VERIFIED = 2,
982 RIL_PINSTATE_DISABLED = 3,
983 RIL_PINSTATE_ENABLED_BLOCKED = 4,
984 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
985} RIL_PinState;
986
987typedef enum {
988 RIL_APPTYPE_UNKNOWN = 0,
989 RIL_APPTYPE_SIM = 1,
990 RIL_APPTYPE_USIM = 2,
991 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -0800992 RIL_APPTYPE_CSIM = 4,
993 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -0700994} RIL_AppType;
995
996typedef struct
997{
Wink Saville7f856802009-06-09 10:23:37 -0700998 RIL_AppType app_type;
999 RIL_AppState app_state;
1000 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -07001001 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -07001002 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -07001003 0x30, 0x30, 0x30 */
1004 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -08001005 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -07001006 RIL_PinState pin1;
1007 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -07001008} RIL_AppStatus;
1009
Wink Savillec0114b32011-02-18 10:14:07 -08001010/* Deprecated, use RIL_CardStatus_v6 */
1011typedef struct
1012{
1013 RIL_CardState card_state;
1014 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
1015 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1016 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1017 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1018 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
1019} RIL_CardStatus_v5;
1020
Wink Savillef4c4d362009-04-02 01:37:03 -07001021typedef struct
1022{
Wink Saville7f856802009-06-09 10:23:37 -07001023 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -07001024 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -08001025 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1026 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1027 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -07001028 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1029 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -08001030} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -07001031
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001032/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
1033 * or as part of RIL_SimRefreshResponse_v7
1034 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001035typedef enum {
1036 /* A file on SIM has been updated. data[1] contains the EFID. */
1037 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001038 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001039 SIM_INIT = 1,
1040 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
1041 SIM_RESET = 2
1042} RIL_SimRefreshResult;
1043
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001044typedef struct {
1045 RIL_SimRefreshResult result;
1046 int ef_id; /* is the EFID of the updated file if the result is */
1047 /* SIM_FILE_UPDATE or 0 for any other result. */
1048 char * aid; /* is AID(application ID) of the card application */
1049 /* See ETSI 102.221 8.1 and 101.220 4 */
1050 /* For SIM_FILE_UPDATE result it can be set to AID of */
1051 /* application in which updated EF resides or it can be */
1052 /* NULL if EF is outside of an application. */
1053 /* For SIM_INIT result this field is set to AID of */
1054 /* application that caused REFRESH */
1055 /* For SIM_RESET result it is NULL. */
1056} RIL_SimRefreshResponse_v7;
1057
Wink Savillec0114b32011-02-18 10:14:07 -08001058/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
1059typedef struct {
1060 char * number; /* Remote party number */
1061 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1062 char * name; /* Remote party name */
1063 RIL_CDMA_SignalInfoRecord signalInfoRecord;
1064} RIL_CDMA_CallWaiting_v5;
1065
Wink Saville1b5fd232009-04-22 14:50:00 -07001066typedef struct {
1067 char * number; /* Remote party number */
1068 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1069 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -07001070 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -08001071 /* Number type/Number plan required to support International Call Waiting */
1072 int number_type; /* 0=Unknown, 1=International, 2=National,
1073 3=Network specific, 4=subscriber */
1074 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
1075} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001076
Wink Savillea592eeb2009-05-22 13:26:36 -07001077/**
1078 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
1079 *
1080 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
1081 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
1082 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
1083 * CBM message ID.
1084 *
1085 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
1086 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
1087 * and 9.4.4.2.3 for UMTS.
1088 * All other values can be treated as empty CBM data coding scheme.
1089 *
1090 * selected 0 means message types specified in <fromServiceId, toServiceId>
1091 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
1092 *
1093 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
1094 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
1095 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001096typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -07001097 int fromServiceId;
1098 int toServiceId;
1099 int fromCodeScheme;
1100 int toCodeScheme;
1101 unsigned char selected;
1102} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -07001103
The Android Open Source Project34a51082009-03-05 14:34:37 -08001104/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
1105#define RIL_RESTRICTED_STATE_NONE 0x00
1106/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
1107#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
1108/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
1109#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -07001110/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -08001111#define RIL_RESTRICTED_STATE_CS_ALL 0x04
1112/* Block packet data access due to restriction. */
1113#define RIL_RESTRICTED_STATE_PS_ALL 0x10
1114
Wink Saville1b5fd232009-04-22 14:50:00 -07001115/* The status for an OTASP/OTAPA session */
1116typedef enum {
1117 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
1118 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
1119 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
1120 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
1121 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
1122 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
1123 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
1124 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
1125 CDMA_OTA_PROVISION_STATUS_COMMITTED,
1126 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
1127 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
1128 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
1129} RIL_CDMA_OTA_ProvisionStatus;
1130
1131typedef struct {
1132 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1133 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1134} RIL_GW_SignalStrength;
1135
Wink Savillec57b3eb2013-04-17 12:51:41 -07001136typedef struct {
1137 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1138 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001139 int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us.
1140 * INT_MAX denotes invalid value */
1141} RIL_GSM_SignalStrength_v12;
1142
1143typedef struct {
1144 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1145 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Wink Savillec57b3eb2013-04-17 12:51:41 -07001146} RIL_SignalStrengthWcdma;
Wink Saville1b5fd232009-04-22 14:50:00 -07001147
1148typedef struct {
1149 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1150 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1151 * value will be 75.
1152 */
1153 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1154 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1155 * will be 125.
1156 */
1157} RIL_CDMA_SignalStrength;
1158
1159
1160typedef struct {
1161 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1162 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1163 * value will be 75.
1164 */
1165 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1166 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1167 * will be 125.
1168 */
1169 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
1170} RIL_EVDO_SignalStrength;
1171
Wink Savillec0114b32011-02-18 10:14:07 -08001172typedef struct {
1173 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -07001174 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1175 * Range: 44 to 140 dBm
1176 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1177 * Reference: 3GPP TS 36.133 9.1.4 */
1178 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1179 * Range: 20 to 3 dB.
1180 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1181 * Reference: 3GPP TS 36.133 9.1.7 */
1182 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1183 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1184 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1185 * Reference: 3GPP TS 36.101 8.1.1 */
1186 int cqi; /* The current Channel Quality Indicator.
1187 * Range: 0 to 15.
1188 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1189 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -08001190} RIL_LTE_SignalStrength;
1191
Wink Saville8a9e0212013-04-09 12:11:38 -07001192typedef struct {
1193 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1194 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1195 * Range: 44 to 140 dBm
1196 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1197 * Reference: 3GPP TS 36.133 9.1.4 */
1198 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1199 * Range: 20 to 3 dB.
1200 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1201 * Reference: 3GPP TS 36.133 9.1.7 */
1202 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1203 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1204 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1205 * Reference: 3GPP TS 36.101 8.1.1 */
1206 int cqi; /* The current Channel Quality Indicator.
1207 * Range: 0 to 15.
1208 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1209 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1210 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
1211 * Approximate distance can be calculated using 300m/us * timingAdvance.
1212 * Range: 0 to 0x7FFFFFFE
1213 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1214 * Reference: 3GPP 36.321 section 6.1.3.5
1215 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1216} RIL_LTE_SignalStrength_v8;
1217
Etan Cohend3652192014-06-20 08:28:44 -07001218typedef struct {
1219 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
1220 * Range : 25 to 120
1221 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1222 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1223} RIL_TD_SCDMA_SignalStrength;
1224
Wink Savillec0114b32011-02-18 10:14:07 -08001225/* Deprecated, use RIL_SignalStrength_v6 */
1226typedef struct {
1227 RIL_GW_SignalStrength GW_SignalStrength;
1228 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1229 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1230} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -07001231
1232typedef struct {
1233 RIL_GW_SignalStrength GW_SignalStrength;
1234 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1235 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -08001236 RIL_LTE_SignalStrength LTE_SignalStrength;
1237} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001238
Wink Saville8a9e0212013-04-09 12:11:38 -07001239typedef struct {
1240 RIL_GW_SignalStrength GW_SignalStrength;
1241 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1242 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1243 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1244} RIL_SignalStrength_v8;
1245
Etan Cohend3652192014-06-20 08:28:44 -07001246typedef struct {
1247 RIL_GW_SignalStrength GW_SignalStrength;
1248 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1249 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1250 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1251 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1252} RIL_SignalStrength_v10;
1253
Wink Saville8a9e0212013-04-09 12:11:38 -07001254typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001255 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1256 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1257 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1258 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 -07001259} RIL_CellIdentityGsm;
1260
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001261typedef struct {
1262 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1263 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1264 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1265 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
1266 int arfcn; /* 16-bit GSM Absolute RF channel number, INT_MAX if unknown */
Nathan Haroldf3769da2016-05-05 12:19:39 -07001267 uint8_t bsic;/* 6-bit Base Station Identity Code, 0xFF if unknown */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001268} RIL_CellIdentityGsm_v12;
1269
Wink Savillec57b3eb2013-04-17 12:51:41 -07001270typedef struct {
1271 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1272 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1273 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1274 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1275 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1276} RIL_CellIdentityWcdma;
1277
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001278typedef struct {
1279 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1280 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1281 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1282 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1283 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1284 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number, INT_MAX if unknown */
1285} RIL_CellIdentityWcdma_v12;
1286
Wink Saville8a9e0212013-04-09 12:11:38 -07001287typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001288 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1289 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1290 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001291 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1292 * It is represented in units of 0.25 seconds and ranges from -2592000
1293 * to 2592000, both values inclusive (corresponding to a range of -180
Wink Savillec57b3eb2013-04-17 12:51:41 -07001294 * to +180 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001295
1296 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1297 * It is represented in units of 0.25 seconds and ranges from -1296000
1298 * to 1296000, both values inclusive (corresponding to a range of -90
Wink Savillec57b3eb2013-04-17 12:51:41 -07001299 * to +90 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001300} RIL_CellIdentityCdma;
1301
Wink Saville8a9e0212013-04-09 12:11:38 -07001302typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001303 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1304 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1305 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1306 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1307 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001308} RIL_CellIdentityLte;
1309
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001310typedef struct {
1311 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1312 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1313 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1314 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1315 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1316 int earfcn; /* 18-bit LTE Absolute RC Channel Number, INT_MAX if unknown */
1317} RIL_CellIdentityLte_v12;
1318
Etan Cohend3652192014-06-20 08:28:44 -07001319typedef struct {
1320 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1321 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1322 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1323 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1324 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1325} RIL_CellIdentityTdscdma;
1326
Wink Saville8a9e0212013-04-09 12:11:38 -07001327typedef struct {
1328 RIL_CellIdentityGsm cellIdentityGsm;
1329 RIL_GW_SignalStrength signalStrengthGsm;
1330} RIL_CellInfoGsm;
1331
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001332typedef struct {
1333 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1334 RIL_GSM_SignalStrength_v12 signalStrengthGsm;
1335} RIL_CellInfoGsm_v12;
1336
Wink Savillec57b3eb2013-04-17 12:51:41 -07001337typedef struct {
1338 RIL_CellIdentityWcdma cellIdentityWcdma;
1339 RIL_SignalStrengthWcdma signalStrengthWcdma;
1340} RIL_CellInfoWcdma;
1341
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001342typedef struct {
1343 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1344 RIL_SignalStrengthWcdma signalStrengthWcdma;
1345} RIL_CellInfoWcdma_v12;
1346
Wink Saville8a9e0212013-04-09 12:11:38 -07001347typedef struct {
1348 RIL_CellIdentityCdma cellIdentityCdma;
1349 RIL_CDMA_SignalStrength signalStrengthCdma;
1350 RIL_EVDO_SignalStrength signalStrengthEvdo;
1351} RIL_CellInfoCdma;
1352
Wink Saville8a9e0212013-04-09 12:11:38 -07001353typedef struct {
1354 RIL_CellIdentityLte cellIdentityLte;
1355 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1356} RIL_CellInfoLte;
1357
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001358typedef struct {
1359 RIL_CellIdentityLte_v12 cellIdentityLte;
1360 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1361} RIL_CellInfoLte_v12;
1362
Etan Cohend3652192014-06-20 08:28:44 -07001363typedef struct {
1364 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1365 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1366} RIL_CellInfoTdscdma;
1367
Wink Saville8a9e0212013-04-09 12:11:38 -07001368// Must be the same as CellInfo.TYPE_XXX
1369typedef enum {
1370 RIL_CELL_INFO_TYPE_GSM = 1,
1371 RIL_CELL_INFO_TYPE_CDMA = 2,
1372 RIL_CELL_INFO_TYPE_LTE = 3,
Wink Savillec57b3eb2013-04-17 12:51:41 -07001373 RIL_CELL_INFO_TYPE_WCDMA = 4,
Etan Cohend3652192014-06-20 08:28:44 -07001374 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
Wink Saville8a9e0212013-04-09 12:11:38 -07001375} RIL_CellInfoType;
1376
1377// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1378typedef enum {
1379 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1380 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1381 RIL_TIMESTAMP_TYPE_MODEM = 2,
1382 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1383 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1384} RIL_TimeStampType;
1385
1386typedef struct {
1387 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1388 int registered; /* !0 if this cell is registered 0 if not registered */
1389 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1390 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1391 union {
1392 RIL_CellInfoGsm gsm;
1393 RIL_CellInfoCdma cdma;
1394 RIL_CellInfoLte lte;
Wink Savillec57b3eb2013-04-17 12:51:41 -07001395 RIL_CellInfoWcdma wcdma;
Etan Cohend3652192014-06-20 08:28:44 -07001396 RIL_CellInfoTdscdma tdscdma;
Wink Saville8a9e0212013-04-09 12:11:38 -07001397 } CellInfo;
1398} RIL_CellInfo;
1399
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001400typedef struct {
1401 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1402 int registered; /* !0 if this cell is registered 0 if not registered */
1403 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1404 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1405 union {
1406 RIL_CellInfoGsm_v12 gsm;
1407 RIL_CellInfoCdma cdma;
1408 RIL_CellInfoLte_v12 lte;
1409 RIL_CellInfoWcdma_v12 wcdma;
1410 RIL_CellInfoTdscdma tdscdma;
1411 } CellInfo;
1412} RIL_CellInfo_v12;
1413
Wink Saville1b5fd232009-04-22 14:50:00 -07001414/* Names of the CDMA info records (C.S0005 section 3.7.5) */
1415typedef enum {
1416 RIL_CDMA_DISPLAY_INFO_REC,
1417 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1418 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1419 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1420 RIL_CDMA_SIGNAL_INFO_REC,
1421 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1422 RIL_CDMA_LINE_CONTROL_INFO_REC,
1423 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1424 RIL_CDMA_T53_CLIR_INFO_REC,
1425 RIL_CDMA_T53_RELEASE_INFO_REC,
1426 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1427} RIL_CDMA_InfoRecName;
1428
1429/* Display Info Rec as defined in C.S0005 section 3.7.5.1
1430 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1431 Note: the Extended Display info rec contains multiple records of the
1432 form: display_tag, display_len, and display_len occurrences of the
1433 chari field if the display_tag is not 10000000 or 10000001.
1434 To save space, the records are stored consecutively in a byte buffer.
1435 The display_tag, display_len and chari fields are all 1 byte.
1436*/
1437
1438typedef struct {
1439 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001440 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001441} RIL_CDMA_DisplayInfoRecord;
1442
1443/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1444 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1445 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1446*/
1447
1448typedef struct {
1449 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001450 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001451 char number_type;
1452 char number_plan;
1453 char pi;
1454 char si;
1455} RIL_CDMA_NumberInfoRecord;
1456
1457/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1458typedef enum {
1459 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1460 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1461 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1462 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1463 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1464 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1465 RIL_REDIRECTING_REASON_RESERVED
1466} RIL_CDMA_RedirectingReason;
1467
1468typedef struct {
1469 RIL_CDMA_NumberInfoRecord redirectingNumber;
1470 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1471 RIL_CDMA_RedirectingReason redirectingReason;
1472} RIL_CDMA_RedirectingNumberInfoRecord;
1473
1474/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1475typedef struct {
1476 char lineCtrlPolarityIncluded;
1477 char lineCtrlToggle;
1478 char lineCtrlReverse;
1479 char lineCtrlPowerDenial;
1480} RIL_CDMA_LineControlInfoRecord;
1481
1482/* T53 CLIR Information Record */
1483typedef struct {
1484 char cause;
1485} RIL_CDMA_T53_CLIRInfoRecord;
1486
1487/* T53 Audio Control Information Record */
1488typedef struct {
1489 char upLink;
1490 char downLink;
1491} RIL_CDMA_T53_AudioControlInfoRecord;
1492
1493typedef struct {
1494
1495 RIL_CDMA_InfoRecName name;
1496
1497 union {
1498 /* Display and Extended Display Info Rec */
1499 RIL_CDMA_DisplayInfoRecord display;
1500
1501 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1502 RIL_CDMA_NumberInfoRecord number;
1503
1504 /* Signal Info Rec */
1505 RIL_CDMA_SignalInfoRecord signal;
1506
1507 /* Redirecting Number Info Rec */
1508 RIL_CDMA_RedirectingNumberInfoRecord redir;
1509
1510 /* Line Control Info Rec */
1511 RIL_CDMA_LineControlInfoRecord lineCtrl;
1512
1513 /* T53 CLIR Info Rec */
1514 RIL_CDMA_T53_CLIRInfoRecord clir;
1515
1516 /* T53 Audio Control Info Rec */
1517 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1518 } rec;
1519} RIL_CDMA_InformationRecord;
1520
1521#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1522
1523typedef struct {
1524 char numberOfInfoRecs;
1525 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1526} RIL_CDMA_InformationRecords;
1527
Jake Hamby8a4a2332014-01-15 13:12:05 -08001528/* See RIL_REQUEST_NV_READ_ITEM */
1529typedef struct {
1530 RIL_NV_Item itemID;
1531} RIL_NV_ReadItem;
1532
1533/* See RIL_REQUEST_NV_WRITE_ITEM */
1534typedef struct {
1535 RIL_NV_Item itemID;
1536 char * value;
1537} RIL_NV_WriteItem;
1538
Etan Cohend3652192014-06-20 08:28:44 -07001539typedef enum {
1540 HANDOVER_STARTED = 0,
1541 HANDOVER_COMPLETED = 1,
1542 HANDOVER_FAILED = 2,
1543 HANDOVER_CANCELED = 3
1544} RIL_SrvccState;
1545
1546/* hardware configuration reported to RILJ. */
1547typedef enum {
1548 RIL_HARDWARE_CONFIG_MODEM = 0,
1549 RIL_HARDWARE_CONFIG_SIM = 1,
1550} RIL_HardwareConfig_Type;
1551
1552typedef enum {
1553 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1554 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1555 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1556} RIL_HardwareConfig_State;
1557
1558typedef struct {
1559 int rilModel;
1560 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1561 int maxVoice;
1562 int maxData;
1563 int maxStandby;
1564} RIL_HardwareConfig_Modem;
1565
1566typedef struct {
Wink Saville8b4e4f72014-10-17 15:01:45 -07001567 char modemUuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001568} RIL_HardwareConfig_Sim;
1569
1570typedef struct {
1571 RIL_HardwareConfig_Type type;
Wink Saville8b4e4f72014-10-17 15:01:45 -07001572 char uuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001573 RIL_HardwareConfig_State state;
1574 union {
1575 RIL_HardwareConfig_Modem modem;
1576 RIL_HardwareConfig_Sim sim;
1577 } cfg;
1578} RIL_HardwareConfig;
1579
Amit Mahajan54563d32014-11-22 00:54:49 +00001580typedef enum {
1581 SS_CFU,
1582 SS_CF_BUSY,
1583 SS_CF_NO_REPLY,
1584 SS_CF_NOT_REACHABLE,
1585 SS_CF_ALL,
1586 SS_CF_ALL_CONDITIONAL,
1587 SS_CLIP,
1588 SS_CLIR,
1589 SS_COLP,
1590 SS_COLR,
1591 SS_WAIT,
1592 SS_BAOC,
1593 SS_BAOIC,
1594 SS_BAOIC_EXC_HOME,
1595 SS_BAIC,
1596 SS_BAIC_ROAMING,
1597 SS_ALL_BARRING,
1598 SS_OUTGOING_BARRING,
1599 SS_INCOMING_BARRING
1600} RIL_SsServiceType;
1601
1602typedef enum {
1603 SS_ACTIVATION,
1604 SS_DEACTIVATION,
1605 SS_INTERROGATION,
1606 SS_REGISTRATION,
1607 SS_ERASURE
1608} RIL_SsRequestType;
1609
1610typedef enum {
1611 SS_ALL_TELE_AND_BEARER_SERVICES,
1612 SS_ALL_TELESEVICES,
1613 SS_TELEPHONY,
1614 SS_ALL_DATA_TELESERVICES,
1615 SS_SMS_SERVICES,
1616 SS_ALL_TELESERVICES_EXCEPT_SMS
1617} RIL_SsTeleserviceType;
1618
1619#define SS_INFO_MAX 4
1620#define NUM_SERVICE_CLASSES 7
1621
1622typedef struct {
1623 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1624 For example if voice is forwarded to one number and data
1625 is forwarded to a different one then numValidIndexes will be
1626 2 indicating total number of valid values in cfInfo.
1627 Similarly if all the services are forwarded to the same
1628 number then the value of numValidIndexes will be 1. */
1629
1630 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1631 for SS request to query call
1632 forward status. see
1633 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1634} RIL_CfData;
1635
1636typedef struct {
1637 RIL_SsServiceType serviceType;
1638 RIL_SsRequestType requestType;
1639 RIL_SsTeleserviceType teleserviceType;
1640 int serviceClass;
1641 RIL_Errno result;
1642
1643 union {
1644 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1645 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1646 two ints, so first two values of ssInfo[] will be
1647 used for response if serviceType is SS_CLIR and
1648 requestType is SS_INTERROGATION */
1649
1650 RIL_CfData cfData;
1651 };
1652} RIL_StkCcUnsolSsResponse;
1653
Wink Saville7f856802009-06-09 10:23:37 -07001654/**
Wink Savillec29360a2014-07-13 05:17:28 -07001655 * Data connection power state
1656 */
1657typedef enum {
1658 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1659 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1660 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1661 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1662} RIL_DcPowerStates;
1663
1664/**
1665 * Data connection real time info
1666 */
1667typedef struct {
1668 uint64_t time; // Time in nanos as returned by ril_nano_time
1669 RIL_DcPowerStates powerState; // Current power state
1670} RIL_DcRtInfo;
1671
Amit Mahajanc796e222014-08-13 16:54:01 +00001672/**
1673 * Data profile to modem
1674 */
1675typedef struct {
1676 /* id of the data profile */
1677 int profileId;
1678 /* the APN to connect to */
1679 char* apn;
1680 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1681 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1682 */
1683 char* protocol;
1684 /** authentication protocol used for this PDP context
1685 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1686 */
1687 int authType;
1688 /* the username for APN, or NULL */
1689 char* user;
1690 /* the password for APN, or NULL */
1691 char* password;
1692 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1693 int type;
1694 /* the period in seconds to limit the maximum connections */
1695 int maxConnsTime;
1696 /* the maximum connections during maxConnsTime */
1697 int maxConns;
1698 /** the required wait time in seconds after a successful UE initiated
1699 * disconnect of a given PDN connection before the device can send
1700 * a new PDN connection request for that given PDN
1701 */
1702 int waitTime;
1703 /* true to enable the profile, 0 to disable, 1 to enable */
1704 int enabled;
1705} RIL_DataProfileInfo;
Wink Savillec29360a2014-07-13 05:17:28 -07001706
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001707/* Tx Power Levels */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001708#define RIL_NUM_TX_POWER_LEVELS 5
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001709
1710typedef struct {
1711
1712 /* period (in ms) when modem is power collapsed */
1713 uint32_t sleep_mode_time_ms;
1714
1715 /* period (in ms) when modem is awake and in idle mode*/
1716 uint32_t idle_mode_time_ms;
1717
1718 /* period (in ms) for which Tx is active */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001719 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001720
1721 /* period (in ms) for which Rx is active */
1722 uint32_t rx_mode_time_ms;
1723} RIL_ActivityStatsInfo;
1724
Wink Savillec29360a2014-07-13 05:17:28 -07001725/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001726 * RIL_REQUEST_GET_SIM_STATUS
1727 *
1728 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -07001729 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001730 * "data" is NULL
1731 *
Wink Savillefd729372011-02-22 16:19:39 -08001732 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001733 *
1734 * Valid errors:
1735 * Must never fail
1736 */
1737#define RIL_REQUEST_GET_SIM_STATUS 1
1738
1739/**
1740 * RIL_REQUEST_ENTER_SIM_PIN
1741 *
John Wang309ac292009-07-30 14:53:23 -07001742 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001743 *
1744 * "data" is const char **
1745 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001746 * ((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 -08001747 *
jsh593c9102009-06-24 16:13:44 -07001748 * "response" is int *
1749 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001750 *
1751 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001752 *
1753 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001754 * RADIO_NOT_AVAILABLE (radio resetting)
1755 * GENERIC_FAILURE
1756 * PASSWORD_INCORRECT
1757 */
1758
1759#define RIL_REQUEST_ENTER_SIM_PIN 2
1760
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001761/**
1762 * RIL_REQUEST_ENTER_SIM_PUK
1763 *
Wink Saville7f856802009-06-09 10:23:37 -07001764 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001765 *
1766 * "data" is const char **
1767 * ((const char **)data)[0] is PUK value
1768 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001769 * ((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 -08001770 *
jsh593c9102009-06-24 16:13:44 -07001771 * "response" is int *
1772 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001773 *
1774 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001775 *
1776 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001777 * RADIO_NOT_AVAILABLE (radio resetting)
1778 * GENERIC_FAILURE
1779 * PASSWORD_INCORRECT
1780 * (PUK is invalid)
1781 */
1782
1783#define RIL_REQUEST_ENTER_SIM_PUK 3
1784
1785/**
1786 * RIL_REQUEST_ENTER_SIM_PIN2
1787 *
1788 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
1789 * returned as a a failure from a previous operation.
1790 *
1791 * "data" is const char **
1792 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001793 * ((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 -08001794 *
jsh593c9102009-06-24 16:13:44 -07001795 * "response" is int *
1796 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001797 *
1798 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001799 *
1800 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001801 * RADIO_NOT_AVAILABLE (radio resetting)
1802 * GENERIC_FAILURE
1803 * PASSWORD_INCORRECT
1804 */
1805
1806#define RIL_REQUEST_ENTER_SIM_PIN2 4
1807
1808/**
1809 * RIL_REQUEST_ENTER_SIM_PUK2
1810 *
Wink Saville7f856802009-06-09 10:23:37 -07001811 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001812 *
1813 * "data" is const char **
1814 * ((const char **)data)[0] is PUK2 value
1815 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001816 * ((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 -08001817 *
jsh593c9102009-06-24 16:13:44 -07001818 * "response" is int *
1819 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001820 *
1821 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001822 *
1823 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001824 * RADIO_NOT_AVAILABLE (radio resetting)
1825 * GENERIC_FAILURE
1826 * PASSWORD_INCORRECT
1827 * (PUK2 is invalid)
1828 */
1829
1830#define RIL_REQUEST_ENTER_SIM_PUK2 5
1831
1832/**
1833 * RIL_REQUEST_CHANGE_SIM_PIN
1834 *
Wink Saville7f856802009-06-09 10:23:37 -07001835 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001836 *
1837 * "data" is const char **
1838 * ((const char **)data)[0] is old PIN value
1839 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001840 * ((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 -08001841 *
jsh593c9102009-06-24 16:13:44 -07001842 * "response" is int *
1843 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001844 *
1845 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001846 *
1847 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001848 * RADIO_NOT_AVAILABLE (radio resetting)
1849 * GENERIC_FAILURE
1850 * PASSWORD_INCORRECT
1851 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001852 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001853 */
1854
1855#define RIL_REQUEST_CHANGE_SIM_PIN 6
1856
1857
1858/**
1859 * RIL_REQUEST_CHANGE_SIM_PIN2
1860 *
Wink Saville7f856802009-06-09 10:23:37 -07001861 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001862 *
1863 * "data" is const char **
1864 * ((const char **)data)[0] is old PIN2 value
1865 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001866 * ((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 -08001867 *
jsh593c9102009-06-24 16:13:44 -07001868 * "response" is int *
1869 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001870 *
1871 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001872 *
1873 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001874 * RADIO_NOT_AVAILABLE (radio resetting)
1875 * GENERIC_FAILURE
1876 * PASSWORD_INCORRECT
1877 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001878 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001879 */
1880
1881#define RIL_REQUEST_CHANGE_SIM_PIN2 7
1882
1883/**
1884 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
1885 *
1886 * Requests that network personlization be deactivated
1887 *
1888 * "data" is const char **
1889 * ((const char **)(data))[0]] is network depersonlization code
1890 *
jsh593c9102009-06-24 16:13:44 -07001891 * "response" is int *
1892 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001893 *
1894 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001895 *
1896 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001897 * RADIO_NOT_AVAILABLE (radio resetting)
1898 * GENERIC_FAILURE
1899 * PASSWORD_INCORRECT
1900 * (code is invalid)
1901 */
1902
1903#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
1904
1905/**
Wink Saville7f856802009-06-09 10:23:37 -07001906 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001907 *
1908 * Requests current call list
1909 *
1910 * "data" is NULL
1911 *
1912 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07001913 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001914 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001915 *
1916 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001917 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07001918 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001919 * GENERIC_FAILURE
1920 * (request will be made again in a few hundred msec)
1921 */
1922
1923#define RIL_REQUEST_GET_CURRENT_CALLS 9
1924
1925
Wink Saville7f856802009-06-09 10:23:37 -07001926/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001927 * RIL_REQUEST_DIAL
1928 *
1929 * Initiate voice call
1930 *
1931 * "data" is const RIL_Dial *
1932 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001933 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001934 * This method is never used for supplementary service codes
1935 *
1936 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001937 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001938 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00001939 * DIAL_MODIFIED_TO_USSD
1940 * DIAL_MODIFIED_TO_SS
1941 * DIAL_MODIFIED_TO_DIAL
Ajay Nambi10345892016-03-19 09:02:28 -07001942 * INVALID_ARGUMENTS
1943 * NO_MEMORY
1944 * INVALID_STATE
1945 * NO_RESOURCES
1946 * INTERNAL_ERR
1947 * FDN_CHECK_FAILURE
1948 * MODEM_ERR
1949 * NO_SUBSCRIPTION
1950 * NO_NETWORK_FOUND
1951 * INVALID_CALL_ID
1952 * DEVICE_IN_USE
1953 * MODE_NOT_SUPPORTED
1954 * ABORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001955 * GENERIC_FAILURE
1956 */
1957#define RIL_REQUEST_DIAL 10
1958
1959/**
1960 * RIL_REQUEST_GET_IMSI
1961 *
1962 * Get the SIM IMSI
1963 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08001964 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001965 *
Wink Savillec0114b32011-02-18 10:14:07 -08001966 * "data" is const char **
1967 * ((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 -08001968 * "response" is a const char * containing the IMSI
1969 *
1970 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001971 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001972 * RADIO_NOT_AVAILABLE (radio resetting)
1973 * GENERIC_FAILURE
1974 */
1975
1976#define RIL_REQUEST_GET_IMSI 11
1977
1978/**
1979 * RIL_REQUEST_HANGUP
1980 *
1981 * Hang up a specific line (like AT+CHLD=1x)
1982 *
John Wang06bae4b2010-11-18 16:37:09 -08001983 * After this HANGUP request returns, RIL should show the connection is NOT
1984 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1985 *
Wink Saville7f856802009-06-09 10:23:37 -07001986 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001987 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001988 *
1989 * "response" is NULL
1990 *
1991 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001992 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001993 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07001994 * INVALID_ARGUMENTS
1995 * NO_MEMORY
1996 * INVALID_STATE
1997 * MODEM_ERR
1998 * INTERNAL_ERR
1999 * NO_MEMORY
2000 * INVALID_CALL_ID
2001 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002002 * GENERIC_FAILURE
2003 */
2004
2005#define RIL_REQUEST_HANGUP 12
2006
2007/**
2008 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
2009 *
2010 * Hang up waiting or held (like AT+CHLD=0)
2011 *
John Wang06bae4b2010-11-18 16:37:09 -08002012 * After this HANGUP request returns, RIL should show the connection is NOT
2013 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2014 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002015 * "data" is NULL
2016 * "response" is NULL
2017 *
2018 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002019 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002020 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002021 * INVALID_STATE
2022 * NO_MEMORY
2023 * MODEM_ERR
2024 * INTERNAL_ERR
2025 * NO_MEMORY
2026 * INVALID_CALL_ID
2027 * NO_RESOURCES
2028 * OPERATION_NOT_ALLOWED
2029 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002030 * GENERIC_FAILURE
2031 */
2032
2033#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
2034
2035/**
2036 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
2037 *
2038 * Hang up waiting or held (like AT+CHLD=1)
2039 *
John Wang06bae4b2010-11-18 16:37:09 -08002040 * After this HANGUP request returns, RIL should show the connection is NOT
2041 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2042 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002043 * "data" is NULL
2044 * "response" is NULL
2045 *
2046 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002047 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002048 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002049 * INVALID_STATE
2050 * NO_MEMORY
2051 * MODEM_ERR
2052 * INTERNAL_ERR
2053 * INVALID_CALL_ID
2054 * OPERATION_NOT_ALLOWED
2055 * INVALID_ARGUMENTS
2056 * NO_RESOURCES
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002057 * GENERIC_FAILURE
2058 */
2059
2060#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
2061
2062/**
2063 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
2064 *
2065 * Switch waiting or holding call and active call (like AT+CHLD=2)
2066 *
2067 * State transitions should be is follows:
2068 *
2069 * If call 1 is waiting and call 2 is active, then if this re
2070 *
2071 * BEFORE AFTER
2072 * Call 1 Call 2 Call 1 Call 2
2073 * ACTIVE HOLDING HOLDING ACTIVE
2074 * ACTIVE WAITING HOLDING ACTIVE
2075 * HOLDING WAITING HOLDING ACTIVE
2076 * ACTIVE IDLE HOLDING IDLE
2077 * IDLE IDLE IDLE IDLE
2078 *
2079 * "data" is NULL
2080 * "response" is NULL
2081 *
2082 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002083 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002084 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002085 * INVALID_STATE
2086 * NO_MEMORY
2087 * MODEM_ERR
2088 * INTERNAL_ERR
2089 * INVALID_STATE
2090 * INVALID_ARGUMENTS
2091 * INVALID_CALL_ID
2092 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002093 * GENERIC_FAILURE
2094 */
2095
2096#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
2097#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
2098
2099/**
2100 * RIL_REQUEST_CONFERENCE
2101 *
2102 * Conference holding and active (like AT+CHLD=3)
2103
2104 * "data" is NULL
2105 * "response" is NULL
2106 *
2107 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002108 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002109 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002110 * NO_MEMORY
2111 * MODEM_ERR
2112 * INTERNAL_ERR
2113 * INVALID_STATE
2114 * INVALID_CALL_ID
2115 * INVALID_ARGUMENTS
2116 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002117 * GENERIC_FAILURE
2118 */
2119#define RIL_REQUEST_CONFERENCE 16
2120
2121/**
2122 * RIL_REQUEST_UDUB
2123 *
Wink Saville7f856802009-06-09 10:23:37 -07002124 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002125 * waiting call answer)(RIL_BasicRequest r);
2126 *
2127 * "data" is NULL
2128 * "response" is NULL
2129 *
2130 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002131 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002132 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002133 * INVALID_STATE
2134 * NO_RESOURCES
2135 * NO_MEMORY
2136 * MODEM_ERR
2137 * INTERNAL_ERR
2138 * INVALID_CALL_ID
2139 * OPERATION_NOT_ALLOWED
2140 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002141 * GENERIC_FAILURE
2142 */
2143#define RIL_REQUEST_UDUB 17
2144
2145/**
2146 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2147 *
2148 * Requests the failure cause code for the most recently terminated call
2149 *
2150 * "data" is NULL
2151 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -07002152 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002153 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
2154 * failure reasons are derived from the possible call failure scenarios
2155 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002156 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08002157 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
2158 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
2159 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002160 * If the implementation does not have access to the exact cause codes,
2161 * then it should return one of the values listed in RIL_LastCallFailCause,
2162 * as the UI layer needs to distinguish these cases for tone generation or
2163 * error notification.
2164 *
2165 * Valid errors:
2166 * SUCCESS
2167 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002168 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002169 * GENERIC_FAILURE
2170 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002171 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002172 */
2173#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
2174
2175/**
2176 * RIL_REQUEST_SIGNAL_STRENGTH
2177 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002178 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002179 *
2180 * Must succeed if radio is on.
2181 *
2182 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07002183 *
2184 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002185 *
2186 * Valid errors:
2187 * SUCCESS
2188 * RADIO_NOT_AVAILABLE
2189 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002190#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07002191
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002192/**
Wink Savillec0114b32011-02-18 10:14:07 -08002193 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002194 *
2195 * Request current registration state
2196 *
2197 * "data" is NULL
2198 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -07002199 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -07002200 * 0 - Not registered, MT is not currently searching
2201 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07002202 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -07002203 * 2 - Not registered, but MT is currently searching
2204 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07002205 * 3 - Registration denied
2206 * 4 - Unknown
2207 * 5 - Registered, roaming
John Wang7f8ded12010-01-21 15:07:28 -08002208 * 10 - Same as 0, but indicates that emergency calls
2209 * are enabled.
2210 * 12 - Same as 2, but indicates that emergency calls
2211 * are enabled.
2212 * 13 - Same as 3, but indicates that emergency calls
2213 * are enabled.
2214 * 14 - Same as 4, but indicates that emergency calls
2215 * are enabled.
2216 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002217 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
2218 * NULL if not.Valid LAC are 0x0000 - 0xffff
2219 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
2220 * NULL if not.
2221 * Valid CID are 0x00000000 - 0xffffffff
2222 * In GSM, CID is Cell ID (see TS 27.007)
2223 * in 16 bits
2224 * In UMTS, CID is UMTS Cell Identity
2225 * (see TS 25.331) in 28 bits
Wink Saville43808972011-01-13 17:39:51 -08002226 * ((const char **)response)[3] indicates the available voice radio technology,
2227 * valid values as defined by RIL_RadioTechnology.
Wink Saville1b5fd232009-04-22 14:50:00 -07002228 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
2229 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07002230 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07002231 * ((const char **)response)[5] is Base Station latitude if registered on a
2232 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07002233 * latitude is a decimal number as specified in
2234 * 3GPP2 C.S0005-A v6.0. It is represented in
2235 * units of 0.25 seconds and ranges from -1296000
2236 * to 1296000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08002237 * to a range of -90 to +90 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07002238 * ((const char **)response)[6] is Base Station longitude if registered on a
2239 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07002240 * longitude is a decimal number as specified in
2241 * 3GPP2 C.S0005-A v6.0. It is represented in
2242 * units of 0.25 seconds and ranges from -2592000
2243 * to 2592000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08002244 * to a range of -180 to +180 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07002245 * ((const char **)response)[7] is concurrent services support indicator if
2246 * registered on a CDMA system 0-1.
2247 * 0 - Concurrent services not supported,
2248 * 1 - Concurrent services supported
2249 * ((const char **)response)[8] is System ID if registered on a CDMA system or
2250 * NULL if not. Valid System ID are 0 - 32767
2251 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
2252 * NULL if not. Valid System ID are 0 - 65535
2253 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002254 * on a CDMA or EVDO system or NULL if not. Valid values
Wink Saville1b5fd232009-04-22 14:50:00 -07002255 * are 0-255.
2256 * ((const char **)response)[11] indicates whether the current system is in the
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002257 * PRL if registered on a CDMA or EVDO system or NULL if
Wink Saville1b5fd232009-04-22 14:50:00 -07002258 * not. 0=not in the PRL, 1=in the PRL
2259 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002260 * if registered on a CDMA or EVDO system or NULL if not.
Wink Saville1b5fd232009-04-22 14:50:00 -07002261 * Valid values are 0-255.
2262 * ((const char **)response)[13] if registration state is 3 (Registration
2263 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07002264 * registration was denied. See 3GPP TS 24.008,
2265 * 10.5.3.6 and Annex G.
2266 * 0 - General
2267 * 1 - Authentication Failure
2268 * 2 - IMSI unknown in HLR
2269 * 3 - Illegal MS
2270 * 4 - Illegal ME
2271 * 5 - PLMN not allowed
2272 * 6 - Location area not allowed
2273 * 7 - Roaming not allowed
2274 * 8 - No Suitable Cells in this Location Area
2275 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07002276 * 10 - Persistent location update reject
Wink Savillec0114b32011-02-18 10:14:07 -08002277 * 11 - PLMN not allowed
2278 * 12 - Location area not allowed
2279 * 13 - Roaming not allowed in this Location Area
2280 * 15 - No Suitable Cells in this Location Area
2281 * 17 - Network Failure
2282 * 20 - MAC Failure
2283 * 21 - Sync Failure
2284 * 22 - Congestion
2285 * 23 - GSM Authentication unacceptable
2286 * 25 - Not Authorized for this CSG
2287 * 32 - Service option not supported
2288 * 33 - Requested service option not subscribed
2289 * 34 - Service option temporarily out of order
2290 * 38 - Call cannot be identified
2291 * 48-63 - Retry upon entry into a new cell
2292 * 95 - Semantically incorrect message
2293 * 96 - Invalid mandatory information
2294 * 97 - Message type non-existent or not implemented
2295 * 98 - Message not compatible with protocol state
2296 * 99 - Information element non-existent or not implemented
2297 * 100 - Conditional IE error
2298 * 101 - Message not compatible with protocol state
2299 * 111 - Protocol error, unspecified
jshca5e3472010-06-23 21:53:24 -07002300 * ((const char **)response)[14] is the Primary Scrambling Code of the current
2301 * cell as described in TS 25.331, in hexadecimal
2302 * format, or NULL if unknown or not registered
2303 * to a UMTS network.
Wink Saville1b5fd232009-04-22 14:50:00 -07002304 *
2305 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002306 * as "out of service" in the Android telephony system
2307 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002308 * Registration state 3 can be returned if Location Update Reject
2309 * (with cause 17 - Network Failure) is received repeatedly from the network,
2310 * to facilitate "managed roaming"
2311 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002312 * Valid errors:
2313 * SUCCESS
2314 * RADIO_NOT_AVAILABLE
2315 * GENERIC_FAILURE
2316 */
Wink Savillec0114b32011-02-18 10:14:07 -08002317#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002318
2319/**
Wink Savillec0114b32011-02-18 10:14:07 -08002320 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002321 *
Wink Savillec0114b32011-02-18 10:14:07 -08002322 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002323 *
2324 * "data" is NULL
2325 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08002326 * ((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 -08002327 * ((const char **)response)[1] is LAC if registered or NULL if not
2328 * ((const char **)response)[2] is CID if registered or NULL if not
Wink Saville43808972011-01-13 17:39:51 -08002329 * ((const char **)response)[3] indicates the available data radio technology,
2330 * valid values as defined by RIL_RadioTechnology.
Wink Savillec0114b32011-02-18 10:14:07 -08002331 * ((const char **)response)[4] if registration state is 3 (Registration
2332 * denied) this is an enumerated reason why
2333 * registration was denied. See 3GPP TS 24.008,
2334 * Annex G.6 "Additonal cause codes for GMM".
2335 * 7 == GPRS services not allowed
2336 * 8 == GPRS services and non-GPRS services not allowed
2337 * 9 == MS identity cannot be derived by the network
2338 * 10 == Implicitly detached
2339 * 14 == GPRS services not allowed in this PLMN
2340 * 16 == MSC temporarily not reachable
2341 * 40 == No PDP context activated
2342 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
2343 * established using RIL_REQUEST_SETUP_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002344 *
Wink Savilleae679532012-12-03 14:59:45 -08002345 * The values at offsets 6..10 are optional LTE location information in decimal.
2346 * If a value is unknown that value may be NULL. If all values are NULL,
2347 * none need to be present.
Wink Savilleea51a9d2012-09-15 07:54:06 -07002348 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
2349 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
2350 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
2351 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
2352 * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
2353 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002354 * LAC and CID are in hexadecimal format.
2355 * valid LAC are 0x0000 - 0xffff
2356 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07002357 *
2358 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002359 * as "out of service" in the Android telephony system
2360 *
2361 * Valid errors:
2362 * SUCCESS
2363 * RADIO_NOT_AVAILABLE
2364 * GENERIC_FAILURE
2365 */
Wink Savillec0114b32011-02-18 10:14:07 -08002366#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002367
2368/**
2369 * RIL_REQUEST_OPERATOR
2370 *
2371 * Request current operator ONS or EONS
2372 *
2373 * "data" is NULL
2374 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07002375 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002376 * or NULL if unregistered
2377 *
Wink Saville7f856802009-06-09 10:23:37 -07002378 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002379 * or NULL if unregistered
2380 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2381 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07002382 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002383 * Valid errors:
2384 * SUCCESS
2385 * RADIO_NOT_AVAILABLE
2386 * GENERIC_FAILURE
2387 */
2388#define RIL_REQUEST_OPERATOR 22
2389
2390/**
2391 * RIL_REQUEST_RADIO_POWER
2392 *
2393 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07002394 * If the radio is is turned off/on the radio modem subsystem
2395 * is expected return to an initialized state. For instance,
2396 * any voice and data calls will be terminated and all associated
2397 * lists emptied.
2398 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002399 * "data" is int *
2400 * ((int *)data)[0] is > 0 for "Radio On"
2401 * ((int *)data)[0] is == 0 for "Radio Off"
2402 *
2403 * "response" is NULL
2404 *
2405 * Turn radio on if "on" > 0
2406 * Turn radio off if "on" == 0
2407 *
2408 * Valid errors:
2409 * SUCCESS
2410 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002411 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002412 * GENERIC_FAILURE
2413 */
2414#define RIL_REQUEST_RADIO_POWER 23
2415
2416/**
2417 * RIL_REQUEST_DTMF
2418 *
2419 * Send a DTMF tone
2420 *
2421 * If the implementation is currently playing a tone requested via
2422 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2423 * should be played instead
2424 *
jsh602f80f2009-07-10 15:44:37 -07002425 * "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 -08002426 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002427 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002428 * FIXME should this block/mute microphone?
2429 * How does this interact with local DTMF feedback?
2430 *
2431 * Valid errors:
2432 * SUCCESS
2433 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002434 * INVALID_ARGUMENTS
2435 * NO_RESOURCES
2436 * NO_MEMORY
2437 * MODEM_ERR
2438 * INTERNAL_ERR
2439 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002440 * GENERIC_FAILURE
2441 *
2442 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2443 *
2444 */
2445#define RIL_REQUEST_DTMF 24
2446
2447/**
2448 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07002449 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002450 * Send an SMS message
2451 *
2452 * "data" is const char **
2453 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2454 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2455 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2456 * less the SMSC address
2457 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2458 *
2459 * "response" is a const RIL_SMS_Response *
2460 *
2461 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002462 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002463 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2464 *
2465 * Valid errors:
2466 * SUCCESS
2467 * RADIO_NOT_AVAILABLE
2468 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07002469 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08002470 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002471 * INVALID_STATE
2472 * INVALID_ARGUMENTS
2473 * NO_MEMORY
2474 * REQUEST_RATE_LIMITED
2475 * INVALID_SMS_FORMAT
2476 * SYSTEM_ERR
2477 * ENCODING_ERR
2478 * INVALID_SMSC_ADDRESS
2479 * MODEM_ERR
2480 * NETWORK_ERR
2481 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002482 * GENERIC_FAILURE
2483 *
2484 * FIXME how do we specify TP-Message-Reference if we need to resend?
2485 */
2486#define RIL_REQUEST_SEND_SMS 25
2487
2488
2489/**
2490 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07002491 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002492 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2493 * except that more messages are expected to be sent soon. If possible,
2494 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2495 *
2496 * "data" is const char **
2497 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2498 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2499 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2500 * less the SMSC address
2501 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2502 *
2503 * "response" is a const RIL_SMS_Response *
2504 *
2505 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002506 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002507 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2508 *
2509 * Valid errors:
2510 * SUCCESS
2511 * RADIO_NOT_AVAILABLE
2512 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08002513 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002514 * INVALID_STATE
2515 * INVALID_ARGUMENTS
2516 * NO_MEMORY
2517 * INVALID_SMS_FORMAT
2518 * SYSTEM_ERR
2519 * REQUEST_RATE_LIMITED
2520 * FDN_CHECK_FAILURE
2521 * MODEM_ERR
2522 * NETWORK_ERR
2523 * ENCODING_ERR
2524 * INVALID_SMSC_ADDRESS
2525 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002526 * GENERIC_FAILURE
2527 *
2528 */
2529#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2530
2531
2532/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002533 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002534 *
Wink Saville29487ef2011-04-15 09:15:31 -07002535 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2536 * return success it is added to the list of data calls and a
2537 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2538 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2539 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2540 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002541 *
Wink Saville43808972011-01-13 17:39:51 -08002542 * The RIL is expected to:
2543 * - Create one data call context.
2544 * - Create and configure a dedicated interface for the context
2545 * - The interface must be point to point.
2546 * - The interface is configured with one or more addresses and
2547 * is capable of sending and receiving packets. The prefix length
2548 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2549 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08002550 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08002551 * number of simultaneous data call contexts.
2552 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002553 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08002554 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2555 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07002556 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07002557 * ((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 -07002558 * override the one in the profile. NULL indicates no APN overrride.
2559 * ((const char **)data)[3] is the username for APN, or NULL
2560 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07002561 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2562 * 0 => PAP and CHAP is never performed.
2563 * 1 => PAP may be performed; CHAP is never performed.
2564 * 2 => CHAP may be performed; PAP is never performed.
2565 * 3 => PAP / CHAP may be performed - baseband dependent.
Wink Savillec0114b32011-02-18 10:14:07 -08002566 * ((const char **)data)[6] is the connection type to request must be one of the
2567 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07002568 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Wink Savillec0114b32011-02-18 10:14:07 -08002569 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002570 *
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -07002571 * "response" is a RIL_Data_Call_Response_v11
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002572 *
2573 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07002574 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002575 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08002576 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08002577 * the RIL_Data_Call_Response_v6.status containing the actual status.
2578 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08002579 *
2580 * Other errors could include:
2581 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2582 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002583 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002584 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002585 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002586#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002587
2588
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002589/**
2590 * RIL_REQUEST_SIM_IO
2591 *
2592 * Request SIM I/O operation.
2593 * This is similar to the TS 27.007 "restricted SIM" operation
2594 * where it assumes all of the EF selection will be done by the
2595 * callee.
2596 *
Wink Savillefd729372011-02-22 16:19:39 -08002597 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002598 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2599 * or may specify a PIN2 for operations that require a PIN2 (eg
2600 * updating FDN records)
2601 *
2602 * "response" is a const RIL_SIM_IO_Response *
2603 *
2604 * Arguments and responses that are unused for certain
2605 * values of "command" should be ignored or set to NULL
2606 *
2607 * Valid errors:
2608 * SUCCESS
2609 * RADIO_NOT_AVAILABLE
2610 * GENERIC_FAILURE
2611 * SIM_PIN2
2612 * SIM_PUK2
2613 */
2614#define RIL_REQUEST_SIM_IO 28
2615
2616/**
2617 * RIL_REQUEST_SEND_USSD
2618 *
2619 * Send a USSD message
2620 *
2621 * If a USSD session already exists, the message should be sent in the
2622 * context of that session. Otherwise, a new session should be created.
2623 *
2624 * The network reply should be reported via RIL_UNSOL_ON_USSD
2625 *
2626 * Only one USSD session may exist at a time, and the session is assumed
2627 * to exist until:
2628 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2629 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2630 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2631 *
2632 * "data" is a const char * containing the USSD request in UTF-8 format
2633 * "response" is NULL
2634 *
2635 * Valid errors:
2636 * SUCCESS
2637 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07002638 * FDN_CHECK_FAILURE
Amit Mahajan54563d32014-11-22 00:54:49 +00002639 * USSD_MODIFIED_TO_DIAL
2640 * USSD_MODIFIED_TO_SS
2641 * USSD_MODIFIED_TO_USSD
twen.changdf7add02016-03-04 18:27:48 +08002642 * SIM_BUSY
2643 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002644 * INVALID_ARGUMENTS
2645 * NO_MEMORY
2646 * MODEM_ERR
2647 * INTERNAL_ERR
2648 * ABORTED
2649 * SYSTEM_ERR
2650 * INVALID_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002651 * GENERIC_FAILURE
2652 *
2653 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2654 */
2655
2656#define RIL_REQUEST_SEND_USSD 29
2657
2658/**
2659 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07002660 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002661 * Cancel the current USSD session if one exists
2662 *
2663 * "data" is null
2664 * "response" is NULL
2665 *
2666 * Valid errors:
2667 * SUCCESS
2668 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002669 * SIM_BUSY
2670 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002671 * MODEM_ERR
2672 * INTERNAL_ERR
2673 * NO_MEMORY
2674 * INVALID_STATE
Wink Saville7f856802009-06-09 10:23:37 -07002675 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002676 */
2677
2678#define RIL_REQUEST_CANCEL_USSD 30
2679
Wink Saville7f856802009-06-09 10:23:37 -07002680/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002681 * RIL_REQUEST_GET_CLIR
2682 *
2683 * Gets current CLIR status
2684 * "data" is NULL
2685 * "response" is int *
2686 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2687 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2688 *
2689 * Valid errors:
2690 * SUCCESS
2691 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002692 * SS_MODIFIED_TO_DIAL
2693 * SS_MODIFIED_TO_USSD
2694 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002695 * NO_MEMORY
2696 * MODEM_ERR
2697 * INTERNAL_ERR
2698 * FDN_CHECK_FAILURE
2699 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002700 * GENERIC_FAILURE
2701 */
2702#define RIL_REQUEST_GET_CLIR 31
2703
2704/**
2705 * RIL_REQUEST_SET_CLIR
2706 *
2707 * "data" is int *
2708 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2709 *
2710 * "response" is NULL
2711 *
2712 * Valid errors:
2713 * SUCCESS
2714 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002715 * SS_MODIFIED_TO_DIAL
2716 * SS_MODIFIED_TO_USSD
2717 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002718 * INVALID_ARGUMENTS
2719 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002720 * GENERIC_FAILURE
2721 */
2722#define RIL_REQUEST_SET_CLIR 32
2723
2724/**
2725 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2726 *
2727 * "data" is const RIL_CallForwardInfo *
2728 *
2729 * "response" is const RIL_CallForwardInfo **
2730 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2731 * each distinct registered phone number.
2732 *
2733 * For example, if data is forwarded to +18005551212 and voice is forwarded
2734 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07002735 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002736 * If, however, both data and voice are forwarded to +18005551212, then
2737 * a single RIL_CallForwardInfo can be returned with the service class
2738 * set to "data + voice = 3")
2739 *
2740 * Valid errors:
2741 * SUCCESS
2742 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002743 * SS_MODIFIED_TO_DIAL
2744 * SS_MODIFIED_TO_USSD
2745 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002746 * INVALID_ARGUMENTS
2747 * NO_MEMORY
2748 * SYSTEM_ERR
2749 * MODEM_ERR
2750 * INTERNAL_ERR
2751 * NO_MEMORY
2752 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002753 * GENERIC_FAILURE
2754 */
2755#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2756
2757
2758/**
2759 * RIL_REQUEST_SET_CALL_FORWARD
2760 *
2761 * Configure call forward rule
2762 *
2763 * "data" is const RIL_CallForwardInfo *
2764 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002765 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002766 * Valid errors:
2767 * SUCCESS
2768 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002769 * SS_MODIFIED_TO_DIAL
2770 * SS_MODIFIED_TO_USSD
2771 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002772 * INVALID_ARGUMENTS
2773 * NO_MEMORY
2774 * SYSTEM_ERR
2775 * MODEM_ERR
2776 * INTERNAL_ERR
2777 * INVALID_STATE
2778 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002779 * GENERIC_FAILURE
2780 */
2781#define RIL_REQUEST_SET_CALL_FORWARD 34
2782
2783
2784/**
2785 * RIL_REQUEST_QUERY_CALL_WAITING
2786 *
2787 * Query current call waiting state
2788 *
2789 * "data" is const int *
2790 * ((const int *)data)[0] is the TS 27.007 service class to query.
2791 * "response" is a const int *
2792 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2793 *
2794 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2795 * must follow, with the TS 27.007 service class bit vector of services
2796 * for which call waiting is enabled.
2797 *
Wink Saville7f856802009-06-09 10:23:37 -07002798 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002799 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2800 * and voice and disabled for everything else
2801 *
2802 * Valid errors:
2803 * SUCCESS
2804 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002805 * SS_MODIFIED_TO_DIAL
2806 * SS_MODIFIED_TO_USSD
2807 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002808 * NO_MEMORY
2809 * MODEM_ERR
2810 * INTERNAL_ERR
2811 * NO_MEMORY
2812 * FDN_CHECK_FAILURE
2813 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002814 * GENERIC_FAILURE
2815 */
2816#define RIL_REQUEST_QUERY_CALL_WAITING 35
2817
2818
2819/**
2820 * RIL_REQUEST_SET_CALL_WAITING
2821 *
2822 * Configure current call waiting state
2823 *
2824 * "data" is const int *
2825 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2826 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2827 * services to modify
2828 * "response" is NULL
2829 *
2830 * Valid errors:
2831 * SUCCESS
2832 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002833 * SS_MODIFIED_TO_DIAL
2834 * SS_MODIFIED_TO_USSD
2835 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002836 * INVALID_ARGUMENTS
2837 * NO_MEMORY
2838 * MODEM_ERR
2839 * INTERNAL_ERR
2840 * INVALID_STATE
2841 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002842 * GENERIC_FAILURE
2843 */
2844#define RIL_REQUEST_SET_CALL_WAITING 36
2845
2846/**
2847 * RIL_REQUEST_SMS_ACKNOWLEDGE
2848 *
2849 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07002850 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002851 *
2852 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07002853 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002854 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07002855 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002856 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07002857 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
2858 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
2859 * capacity exceeded) and 0xFF (unspecified error) are
2860 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002861 *
2862 * "response" is NULL
2863 *
2864 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
2865 *
2866 * Valid errors:
2867 * SUCCESS
2868 * RADIO_NOT_AVAILABLE
2869 * GENERIC_FAILURE
2870 */
2871#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
2872
2873/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002874 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002875 *
2876 * Get the device IMEI, including check digit
2877 *
johnwangf8bc1672009-05-14 19:19:47 -07002878 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002879 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2880 *
2881 * "data" is NULL
2882 * "response" is a const char * containing the IMEI
2883 *
2884 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002885 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002886 * RADIO_NOT_AVAILABLE (radio resetting)
2887 * GENERIC_FAILURE
2888 */
2889
2890#define RIL_REQUEST_GET_IMEI 38
2891
2892/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002893 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002894 *
2895 * Get the device IMEISV, which should be two decimal digits
2896 *
johnwangf8bc1672009-05-14 19:19:47 -07002897 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002898 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2899 *
2900 * "data" is NULL
2901 * "response" is a const char * containing the IMEISV
2902 *
2903 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002904 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002905 * RADIO_NOT_AVAILABLE (radio resetting)
2906 * GENERIC_FAILURE
2907 */
2908
2909#define RIL_REQUEST_GET_IMEISV 39
2910
2911
2912/**
2913 * RIL_REQUEST_ANSWER
2914 *
2915 * Answer incoming call
2916 *
2917 * Will not be called for WAITING calls.
2918 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
2919 * instead
2920 *
2921 * "data" is NULL
2922 * "response" is NULL
2923 *
2924 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002925 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002926 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002927 * INVALID_STATE
2928 * NO_MEMORY
2929 * SYSTEM_ERR
2930 * MODEM_ERR
2931 * INTERNAL_ERR
2932 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002933 * GENERIC_FAILURE
2934 */
2935
2936#define RIL_REQUEST_ANSWER 40
2937
2938/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002939 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002940 *
Wink Saville29487ef2011-04-15 09:15:31 -07002941 * Deactivate packet data connection and remove from the
2942 * data call list if SUCCESS is returned. Any other return
2943 * values should also try to remove the call from the list,
2944 * but that may not be possible. In any event a
2945 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
2946 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
2947 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002948 *
2949 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07002950 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06002951 * ((char**)data)[1] indicating Disconnect Reason
2952 * 0 => No specific reason specified
2953 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07002954 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002955 * "response" is NULL
2956 *
2957 * Valid errors:
2958 * SUCCESS
2959 * RADIO_NOT_AVAILABLE
2960 * GENERIC_FAILURE
2961 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002962 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002963 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002964#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002965
2966/**
2967 * RIL_REQUEST_QUERY_FACILITY_LOCK
2968 *
2969 * Query the status of a facility lock state
2970 *
2971 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07002972 * ((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 -08002973 * (eg "AO" for BAOC, "SC" for SIM lock)
2974 * ((const char **)data)[1] is the password, or "" if not required
2975 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
2976 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08002977 * ((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 -08002978 * This is only applicable in the case of Fixed Dialing Numbers
2979 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002980 *
2981 * "response" is an int *
2982 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07002983 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002984 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07002985 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002986 *
2987 * Valid errors:
2988 * SUCCESS
2989 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002990 * SS_MODIFIED_TO_DIAL
2991 * SS_MODIFIED_TO_USSD
2992 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002993 * INVALID_ARGUMENTS
2994 * NO_MEMORY
2995 * INTERNAL_ERR
2996 * SYSTEM_ERR
2997 * MODEM_ERR
2998 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002999 * GENERIC_FAILURE
3000 *
3001 */
3002#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
3003
3004/**
3005 * RIL_REQUEST_SET_FACILITY_LOCK
3006 *
3007 * Enable/disable one facility lock
3008 *
3009 * "data" is const char **
3010 *
3011 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3012 * (eg "AO" for BAOC)
3013 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
3014 * ((const char **)data)[2] = password
3015 * ((const char **)data)[3] = string representation of decimal TS 27.007
3016 * service class bit vector. Eg, the string
3017 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08003018 * ((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 -08003019 * This is only applicable in the case of Fixed Dialing Numbers
3020 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003021 *
jsh593c9102009-06-24 16:13:44 -07003022 * "response" is int *
3023 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003024 *
3025 * Valid errors:
3026 * SUCCESS
3027 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003028 * SS_MODIFIED_TO_DIAL
3029 * SS_MODIFIED_TO_USSD
3030 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003031 * INVALID_ARGUMENTS
3032 * INTERNAL_ERR
3033 * NO_MEMORY
3034 * MODEM_ERR
3035 * INVALID_STATE
3036 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003037 * GENERIC_FAILURE
3038 *
3039 */
3040#define RIL_REQUEST_SET_FACILITY_LOCK 43
3041
3042/**
3043 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
3044 *
3045 * Change call barring facility password
3046 *
3047 * "data" is const char **
3048 *
3049 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3050 * (eg "AO" for BAOC)
3051 * ((const char **)data)[1] = old password
3052 * ((const char **)data)[2] = new password
3053 *
Wink Saville7f856802009-06-09 10:23:37 -07003054 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003055 *
3056 * Valid errors:
3057 * SUCCESS
3058 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003059 * SS_MODIFIED_TO_DIAL
3060 * SS_MODIFIED_TO_USSD
3061 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003062 * INVALID_ARGUMENTS
3063 * NO_MEMORY
3064 * MODEM_ERR
3065 * INTERNAL_ERR
3066 * SYSTEM_ERR
3067 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003068 * GENERIC_FAILURE
3069 *
3070 */
3071#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
3072
3073/**
3074 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
3075 *
3076 * Query current network selectin mode
3077 *
3078 * "data" is NULL
3079 *
3080 * "response" is int *
3081 * ((const int *)response)[0] is
3082 * 0 for automatic selection
3083 * 1 for manual selection
3084 *
3085 * Valid errors:
3086 * SUCCESS
3087 * RADIO_NOT_AVAILABLE
3088 * GENERIC_FAILURE
3089 *
3090 */
3091#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
3092
3093/**
3094 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
3095 *
3096 * Specify that the network should be selected automatically
3097 *
3098 * "data" is NULL
3099 * "response" is NULL
3100 *
Wink Saville7f856802009-06-09 10:23:37 -07003101 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003102 * and registered
3103 *
3104 * Valid errors:
3105 * SUCCESS
3106 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003107 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003108 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003109 * GENERIC_FAILURE
3110 *
John Wang75534472010-04-20 15:11:42 -07003111 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3112 * no retries needed, such as illegal SIM or ME.
3113 * Returns GENERIC_FAILURE for all other causes that might be
3114 * fixed by retries.
3115 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003116 */
3117#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
3118
3119/**
3120 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
3121 *
3122 * Manually select a specified network.
3123 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003124 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
3125 * "response" is NULL
3126 *
Wink Saville7f856802009-06-09 10:23:37 -07003127 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003128 * and registered
3129 *
3130 * Valid errors:
3131 * SUCCESS
3132 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003133 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003134 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003135 * GENERIC_FAILURE
3136 *
John Wang75534472010-04-20 15:11:42 -07003137 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3138 * no retries needed, such as illegal SIM or ME.
3139 * Returns GENERIC_FAILURE for all other causes that might be
3140 * fixed by retries.
3141 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003142 */
3143#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
3144
3145/**
3146 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
3147 *
3148 * Scans for available networks
3149 *
3150 * "data" is NULL
3151 * "response" is const char ** that should be an array of n*4 strings, where
3152 * n is the number of available networks
3153 * For each available network:
3154 *
Wink Saville7f856802009-06-09 10:23:37 -07003155 * ((const char **)response)[n+0] is long alpha ONS or EONS
3156 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003157 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
3158 * ((const char **)response)[n+3] is a string value of the status:
3159 * "unknown"
3160 * "available"
3161 * "current"
3162 * "forbidden"
3163 *
Wink Saville7f856802009-06-09 10:23:37 -07003164 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003165 * and registered
3166 *
3167 * Valid errors:
3168 * SUCCESS
3169 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003170 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003171 * GENERIC_FAILURE
3172 *
3173 */
3174#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
3175
3176/**
3177 * RIL_REQUEST_DTMF_START
3178 *
Wink Saville7f856802009-06-09 10:23:37 -07003179 * Start playing a DTMF tone. Continue playing DTMF tone until
3180 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003181 *
3182 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
3183 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07003184 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003185 * "data" is a char *
3186 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
3187 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003188 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003189 * Valid errors:
3190 * SUCCESS
3191 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003192 * INVALID_ARGUMENTS
3193 * NO_RESOURCES
3194 * NO_MEMORY
3195 * SYSTEM_ERR
3196 * MODEM_ERR
3197 * INTERNAL_ERR
3198 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003199 * GENERIC_FAILURE
3200 *
3201 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
3202 */
3203#define RIL_REQUEST_DTMF_START 49
3204
3205/**
3206 * RIL_REQUEST_DTMF_STOP
3207 *
3208 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07003209 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003210 * "data" is NULL
3211 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003212 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003213 * Valid errors:
3214 * SUCCESS
3215 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003216 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07003217 * NO_RESOURCES
3218 * NO_MEMORY
3219 * INVALID_ARGUMENTS
3220 * SYSTEM_ERR
3221 * MODEM_ERR
3222 * INTERNAL_ERR
3223 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003224 * GENERIC_FAILURE
3225 *
3226 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
3227 */
3228#define RIL_REQUEST_DTMF_STOP 50
3229
3230/**
3231 * RIL_REQUEST_BASEBAND_VERSION
3232 *
3233 * Return string value indicating baseband version, eg
3234 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07003235 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003236 * "data" is NULL
3237 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07003238 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003239 * Valid errors:
3240 * SUCCESS
3241 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003242 * EMPTY_RECORD
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003243 * GENERIC_FAILURE
3244 *
3245 */
3246#define RIL_REQUEST_BASEBAND_VERSION 51
3247
3248/**
3249 * RIL_REQUEST_SEPARATE_CONNECTION
3250 *
3251 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07003252 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003253 * as the only other member of the current (active) call
3254 *
3255 * Like AT+CHLD=2x
3256 *
3257 * See TS 22.084 1.3.8.2 (iii)
3258 * TS 22.030 6.5.5 "Entering "2X followed by send"
3259 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07003260 *
3261 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07003262 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
3263 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003264 * "response" is NULL
3265 *
3266 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003267 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003268 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003269 * INVALID_ARGUMENTS
3270 * INVALID_STATE
3271 * NO_RESOURCES
3272 * NO_MEMORY
3273 * SYSTEM_ERR
3274 * MODEM_ERR
3275 * INTERNAL_ERR
3276 * INVALID_CALL_ID
3277 * INVALID_STATE
3278 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003279 * GENERIC_FAILURE
3280 */
3281#define RIL_REQUEST_SEPARATE_CONNECTION 52
3282
3283
3284/**
3285 * RIL_REQUEST_SET_MUTE
3286 *
3287 * Turn on or off uplink (microphone) mute.
3288 *
3289 * Will only be sent while voice call is active.
3290 * Will always be reset to "disable mute" when a new voice call is initiated
3291 *
3292 * "data" is an int *
3293 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
3294 *
3295 * "response" is NULL
3296 *
3297 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003298 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003299 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi68900f52016-03-11 12:02:55 -08003300 * INVALID_ARGUMENTS
3301 * NO_MEMORY
3302 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003303 * GENERIC_FAILURE
3304 */
3305
3306#define RIL_REQUEST_SET_MUTE 53
3307
3308/**
3309 * RIL_REQUEST_GET_MUTE
3310 *
3311 * Queries the current state of the uplink mute setting
3312 *
3313 * "data" is NULL
3314 * "response" is an int *
3315 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
3316 *
3317 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003318 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003319 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00003320 * SS_MODIFIED_TO_DIAL
3321 * SS_MODIFIED_TO_USSD
3322 * SS_MODIFIED_TO_SS
Ajay Nambi68900f52016-03-11 12:02:55 -08003323 * NO_MEMORY
3324 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003325 * GENERIC_FAILURE
3326 */
3327
3328#define RIL_REQUEST_GET_MUTE 54
3329
3330/**
3331 * RIL_REQUEST_QUERY_CLIP
3332 *
3333 * Queries the status of the CLIP supplementary service
3334 *
3335 * (for MMI code "*#30#")
3336 *
3337 * "data" is NULL
3338 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07003339 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003340 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07003341 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003342 *
3343 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003344 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003345 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003346 * NO_MEMORY
3347 * SYSTEM_ERR
3348 * MODEM_ERR
3349 * INTERNAL_ERR
3350 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003351 * GENERIC_FAILURE
3352 */
3353
3354#define RIL_REQUEST_QUERY_CLIP 55
3355
3356/**
Wink Savillec0114b32011-02-18 10:14:07 -08003357 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
3358 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003359 *
3360 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07003361 * context or CDMA data connection active
3362 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003363 *
3364 * "data" is NULL
3365 *
3366 * "response" is a "int *"
3367 * ((int *)response)[0] is an integer cause code defined in TS 24.008
3368 * section 6.1.3.1.3 or close approximation
3369 *
3370 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07003371 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08003372 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003373 * cases for error notification
3374 * and potential retries.
3375 *
3376 * Valid errors:
3377 * SUCCESS
3378 * RADIO_NOT_AVAILABLE
3379 * GENERIC_FAILURE
3380 *
3381 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08003382 *
3383 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003384 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003385
Wink Savillef4c4d362009-04-02 01:37:03 -07003386#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003387
3388/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003389 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003390 *
Wink Saville29487ef2011-04-15 09:15:31 -07003391 * Returns the data call list. An entry is added when a
3392 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
3393 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
3394 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003395 *
3396 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08003397 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003398 *
3399 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003400 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003401 * RADIO_NOT_AVAILABLE (radio resetting)
3402 * GENERIC_FAILURE
Wink Saville29487ef2011-04-15 09:15:31 -07003403 *
3404 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003405 */
3406
Wink Savillef4c4d362009-04-02 01:37:03 -07003407#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003408
3409/**
johnwangf8bc1672009-05-14 19:19:47 -07003410 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003411 *
3412 * Request a radio reset. The RIL implementation may postpone
3413 * the reset until after this request is responded to if the baseband
3414 * is presently busy.
3415 *
johnwangf8bc1672009-05-14 19:19:47 -07003416 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
3417 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003418 * "data" is NULL
3419 * "response" is NULL
3420 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003421 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003422 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003423 * RADIO_NOT_AVAILABLE (radio resetting)
3424 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07003425 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003426 */
3427
3428#define RIL_REQUEST_RESET_RADIO 58
3429
3430/**
3431 * RIL_REQUEST_OEM_HOOK_RAW
3432 *
3433 * This request reserved for OEM-specific uses. It passes raw byte arrays
3434 * back and forth.
3435 *
Wink Saville7f856802009-06-09 10:23:37 -07003436 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003437 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
3438 *
3439 * "data" is a char * of bytes copied from the byte[] data argument in java
3440 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07003441 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003442 * (byte[])(((AsyncResult)response.obj).result)
3443 *
Wink Saville7f856802009-06-09 10:23:37 -07003444 * An error response here will result in
3445 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003446 * (((AsyncResult)response.obj).exception) being an instance of
3447 * com.android.internal.telephony.gsm.CommandException
3448 *
3449 * Valid errors:
3450 * All
3451 */
3452
3453#define RIL_REQUEST_OEM_HOOK_RAW 59
3454
3455/**
3456 * RIL_REQUEST_OEM_HOOK_STRINGS
3457 *
3458 * This request reserved for OEM-specific uses. It passes strings
3459 * back and forth.
3460 *
Wink Saville7f856802009-06-09 10:23:37 -07003461 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003462 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
3463 *
3464 * "data" is a const char **, representing an array of null-terminated UTF-8
3465 * strings copied from the "String[] strings" argument to
3466 * invokeOemRilRequestStrings()
3467 *
3468 * "response" is a const char **, representing an array of null-terminated UTF-8
3469 * stings that will be returned via the caller's response message here:
3470 *
3471 * (String[])(((AsyncResult)response.obj).result)
3472 *
Wink Saville7f856802009-06-09 10:23:37 -07003473 * An error response here will result in
3474 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003475 * (((AsyncResult)response.obj).exception) being an instance of
3476 * com.android.internal.telephony.gsm.CommandException
3477 *
3478 * Valid errors:
3479 * All
3480 */
3481
3482#define RIL_REQUEST_OEM_HOOK_STRINGS 60
3483
3484/**
3485 * RIL_REQUEST_SCREEN_STATE
3486 *
3487 * Indicates the current state of the screen. When the screen is off, the
3488 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07003489 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
3490 * in an effort to conserve power. These notifications should resume when the
3491 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003492 *
3493 * "data" is int *
3494 * ((int *)data)[0] is == 1 for "Screen On"
3495 * ((int *)data)[0] is == 0 for "Screen Off"
3496 *
3497 * "response" is NULL
3498 *
3499 * Valid errors:
3500 * SUCCESS
3501 * GENERIC_FAILURE
3502 */
3503#define RIL_REQUEST_SCREEN_STATE 61
3504
3505
3506/**
3507 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
3508 *
3509 * Enables/disables supplementary service related notifications
3510 * from the network.
3511 *
3512 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3513 *
3514 * "data" is int *
3515 * ((int *)data)[0] is == 1 for notifications enabled
3516 * ((int *)data)[0] is == 0 for notifications disabled
3517 *
3518 * "response" is NULL
3519 *
3520 * Valid errors:
3521 * SUCCESS
3522 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003523 * SIM_BUSY
Ajay Nambi10345892016-03-19 09:02:28 -07003524 * INVALID_ARGUMENTS
3525 * NO_MEMORY
3526 * SYSTEM_ERR
3527 * MODEM_ERR
3528 * INTERNAL_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003529 * GENERIC_FAILURE
3530 *
3531 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3532 */
3533#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
3534
3535/**
3536 * RIL_REQUEST_WRITE_SMS_TO_SIM
3537 *
3538 * Stores a SMS message to SIM memory.
3539 *
3540 * "data" is RIL_SMS_WriteArgs *
3541 *
3542 * "response" is int *
3543 * ((const int *)response)[0] is the record index where the message is stored.
3544 *
3545 * Valid errors:
3546 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003547 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003548 * INVALID_ARGUMENTS
3549 * INVALID_SMS_FORMAT
3550 * INTERNAL_ERR
3551 * MODEM_ERR
3552 * ENCODING_ERR
3553 * NO_MEMORY
3554 * NO_RESOURCES
3555 * INVALID_MODEM_STATE
3556 * MODE_NOT_SUPPORTED
3557 * INVALID_SMSC_ADDRESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003558 * GENERIC_FAILURE
3559 *
3560 */
3561#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
3562
3563/**
3564 * RIL_REQUEST_DELETE_SMS_ON_SIM
3565 *
3566 * Deletes a SMS message from SIM memory.
3567 *
3568 * "data" is int *
3569 * ((int *)data)[0] is the record index of the message to delete.
3570 *
3571 * "response" is NULL
3572 *
3573 * Valid errors:
3574 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003575 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003576 * INVALID_ARGUMENTS
3577 * NO_MEMORY
3578 * REQUEST_RATE_LIMITED
3579 * SYSTEM_ERR
3580 * MODEM_ERR
3581 * NO_SUCH_ENTRY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003582 * GENERIC_FAILURE
3583 *
3584 */
3585#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
3586
3587/**
3588 * RIL_REQUEST_SET_BAND_MODE
3589 *
3590 * Assign a specified band for RF configuration.
3591 *
3592 * "data" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003593 * ((int *)data)[0] is a RIL_RadioBandMode
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003594 *
3595 * "response" is NULL
3596 *
3597 * Valid errors:
3598 * SUCCESS
3599 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003600 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003601 * GENERIC_FAILURE
Nathan Harold92839f12016-02-12 10:02:28 -08003602 *
3603 * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003604 */
3605#define RIL_REQUEST_SET_BAND_MODE 65
3606
3607/**
3608 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3609 *
3610 * Query the list of band mode supported by RF.
3611 *
3612 * "data" is NULL
3613 *
3614 * "response" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003615 * "response" points to an array of int's, the int[0] is the size of array;
3616 * subsequent values are a list of RIL_RadioBandMode listing supported modes.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003617 *
3618 * Valid errors:
3619 * SUCCESS
3620 * RADIO_NOT_AVAILABLE
3621 * GENERIC_FAILURE
3622 *
3623 * See also: RIL_REQUEST_SET_BAND_MODE
3624 */
3625#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
3626
3627/**
3628 * RIL_REQUEST_STK_GET_PROFILE
3629 *
3630 * Requests the profile of SIM tool kit.
3631 * The profile indicates the SAT/USAT features supported by ME.
3632 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
3633 *
3634 * "data" is NULL
3635 *
3636 * "response" is a const char * containing SAT/USAT profile
3637 * in hexadecimal format string starting with first byte of terminal profile
3638 *
3639 * Valid errors:
3640 * RIL_E_SUCCESS
3641 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3642 * RIL_E_GENERIC_FAILURE
3643 */
3644#define RIL_REQUEST_STK_GET_PROFILE 67
3645
3646/**
3647 * RIL_REQUEST_STK_SET_PROFILE
3648 *
3649 * Download the STK terminal profile as part of SIM initialization
3650 * procedure
3651 *
3652 * "data" is a const char * containing SAT/USAT profile
3653 * in hexadecimal format string starting with first byte of terminal profile
3654 *
3655 * "response" is NULL
3656 *
3657 * Valid errors:
3658 * RIL_E_SUCCESS
3659 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3660 * RIL_E_GENERIC_FAILURE
3661 */
3662#define RIL_REQUEST_STK_SET_PROFILE 68
3663
3664/**
3665 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
3666 *
3667 * Requests to send a SAT/USAT envelope command to SIM.
3668 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
3669 *
3670 * "data" is a const char * containing SAT/USAT command
3671 * in hexadecimal format string starting with command tag
3672 *
3673 * "response" is a const char * containing SAT/USAT response
3674 * in hexadecimal format string starting with first byte of response
3675 * (May be NULL)
3676 *
3677 * Valid errors:
3678 * RIL_E_SUCCESS
3679 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003680 * SIM_BUSY
3681 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003682 * RIL_E_GENERIC_FAILURE
3683 */
3684#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
3685
3686/**
3687 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
3688 *
3689 * Requests to send a terminal response to SIM for a received
3690 * proactive command
3691 *
3692 * "data" is a const char * containing SAT/USAT response
3693 * in hexadecimal format string starting with first byte of response data
3694 *
3695 * "response" is NULL
3696 *
3697 * Valid errors:
3698 * RIL_E_SUCCESS
3699 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003700 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003701 * RIL_E_GENERIC_FAILURE
3702 */
3703#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3704
3705/**
3706 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3707 *
3708 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3709 * been initialized by ME already. (We could see the call has been in the 'call
3710 * list') So, STK application needs to accept/reject the call according as user
3711 * operations.
3712 *
3713 * "data" is int *
3714 * ((int *)data)[0] is > 0 for "accept" the call setup
3715 * ((int *)data)[0] is == 0 for "reject" the call setup
3716 *
3717 * "response" is NULL
3718 *
3719 * Valid errors:
3720 * RIL_E_SUCCESS
3721 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003722 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003723 * RIL_E_GENERIC_FAILURE
3724 */
3725#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3726
3727/**
3728 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3729 *
3730 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07003731 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003732 * "data" is NULL
3733 * "response" is NULL
3734 *
3735 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003736 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003737 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003738 * INVALID_STATE
3739 * NO_RESOURCES
3740 * NO_MEMORY
3741 * INVALID_ARGUMENTS
3742 * SYSTEM_ERR
3743 * MODEM_ERR
3744 * INTERNAL_ERR
3745 * INVALID_CALL_ID
3746 * INVALID_STATE
3747 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003748 * GENERIC_FAILURE
3749 */
3750#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3751
3752/**
3753 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3754 *
3755 * Requests to set the preferred network type for searching and registering
3756 * (CS/PS domain, RAT, and operation mode)
3757 *
Wink Savillec0114b32011-02-18 10:14:07 -08003758 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003759 *
3760 * "response" is NULL
3761 *
3762 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07003763 * SUCCESS
3764 * RADIO_NOT_AVAILABLE (radio resetting)
3765 * GENERIC_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08003766 * OPERATION_NOT_ALLOWED
Wink Savillef4c4d362009-04-02 01:37:03 -07003767 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003768 */
3769#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3770
3771/**
3772 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
3773 *
3774 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
3775 * for searching and registering
3776 *
3777 * "data" is NULL
3778 *
3779 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003780 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003781 *
3782 * Valid errors:
3783 * SUCCESS
3784 * RADIO_NOT_AVAILABLE
3785 * GENERIC_FAILURE
3786 *
3787 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3788 */
3789#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
3790
3791/**
3792 * RIL_REQUEST_NEIGHBORING_CELL_IDS
3793 *
3794 * Request neighboring cell id in GSM network
3795 *
3796 * "data" is NULL
3797 * "response" must be a " const RIL_NeighboringCell** "
3798 *
3799 * Valid errors:
3800 * SUCCESS
3801 * RADIO_NOT_AVAILABLE
3802 * GENERIC_FAILURE
3803 */
3804#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3805
3806/**
3807 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07003808 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003809 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07003810 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3811 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003812 *
3813 * Note: The RIL implementation should default to "updates enabled"
3814 * when the screen is on and "updates disabled" when the screen is off.
3815 *
3816 * "data" is int *
3817 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3818 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3819 *
3820 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07003821 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003822 * Valid errors:
3823 * SUCCESS
3824 * RADIO_NOT_AVAILABLE
3825 * GENERIC_FAILURE
3826 *
3827 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3828 */
3829#define RIL_REQUEST_SET_LOCATION_UPDATES 76
3830
Wink Savillef4c4d362009-04-02 01:37:03 -07003831/**
Wink Savillec0114b32011-02-18 10:14:07 -08003832 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07003833 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003834 * Request to set the location where the CDMA subscription shall
3835 * be retrieved
3836 *
3837 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003838 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07003839 *
3840 * "response" is NULL
3841 *
3842 * Valid errors:
3843 * SUCCESS
3844 * RADIO_NOT_AVAILABLE
3845 * GENERIC_FAILURE
3846 * SIM_ABSENT
3847 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08003848 *
3849 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07003850 */
Wink Savillec0114b32011-02-18 10:14:07 -08003851#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07003852
3853/**
3854 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003855 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003856 * Request to set the roaming preferences in CDMA
3857 *
3858 * "data" is int *
3859 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3860 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3861 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003862 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003863 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003864 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003865 * Valid errors:
3866 * SUCCESS
3867 * RADIO_NOT_AVAILABLE
3868 * GENERIC_FAILURE
3869 */
3870#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
3871
3872/**
3873 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003874 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003875 * Request the actual setting of the roaming preferences in CDMA in the modem
3876 *
3877 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003878 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003879 * "response" is int *
3880 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
3881 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3882 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003883 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003884 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003885 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003886 * Valid errors:
3887 * SUCCESS
3888 * RADIO_NOT_AVAILABLE
3889 * GENERIC_FAILURE
3890 */
3891#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
3892
3893/**
3894 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003895 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003896 * Request to set the TTY mode
3897 *
3898 * "data" is int *
3899 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003900 * ((int *)data)[0] is == 1 for TTY Full
3901 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
3902 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07003903 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003904 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003905 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003906 * Valid errors:
3907 * SUCCESS
3908 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003909 * INVALID_ARGUMENTS
3910 * MODEM_ERR
3911 * INTERNAL_ERR
3912 * NO_MEMOR
3913 * INVALID_ARGUMENTS
3914 * MODEM_ERR
3915 * INTERNAL_ERR
3916 * NO_MEMORYY
Wink Savillef4c4d362009-04-02 01:37:03 -07003917 * GENERIC_FAILURE
3918 */
3919#define RIL_REQUEST_SET_TTY_MODE 80
3920
3921/**
3922 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003923 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003924 * Request the setting of TTY mode
3925 *
3926 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003927 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003928 * "response" is int *
3929 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003930 * ((int *)response)[0] is == 1 for TTY Full
3931 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
3932 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07003933 *
3934 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003935 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003936 * Valid errors:
3937 * SUCCESS
3938 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003939 * MODEM_ERR
3940 * INTERNAL_ERR
3941 * NO_MEMORY
3942 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07003943 * GENERIC_FAILURE
3944 */
3945#define RIL_REQUEST_QUERY_TTY_MODE 81
3946
3947/**
3948 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
3949 *
3950 * Request to set the preferred voice privacy mode used in voice
3951 * scrambling
3952 *
3953 * "data" is int *
3954 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3955 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003956 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003957 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003958 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003959 * Valid errors:
3960 * SUCCESS
3961 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003962 * INVALID_ARGUMENTS
3963 * SYSTEM_ERR
3964 * MODEM_ERR
3965 * INTERNAL_ERR
3966 * NO_MEMORY
3967 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07003968 * GENERIC_FAILURE
3969 */
3970#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
3971
3972/**
3973 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003974 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003975 * Request the setting of preferred voice privacy mode
3976 *
3977 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003978 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003979 * "response" is int *
3980 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3981 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003982 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003983 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003984 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003985 * Valid errors:
3986 * SUCCESS
3987 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003988 * MODEM_ERR
3989 * INTERNAL_ERR
3990 * NO_MEMORY
3991 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07003992 * GENERIC_FAILURE
3993 */
3994#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
3995
3996/**
3997 * RIL_REQUEST_CDMA_FLASH
3998 *
3999 * Send FLASH
4000 *
4001 * "data" is const char *
4002 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07004003 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004004 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004005 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004006 * Valid errors:
4007 * SUCCESS
4008 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004009 * INVALID_ARGUMENTS
4010 * NO_MEMORY
4011 * SYSTEM_ERR
4012 * MODEM_ERR
4013 * INTERNAL_ERR
4014 * INVALID_CALL_ID
4015 * INVALID_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004016 * GENERIC_FAILURE
4017 *
4018 */
4019#define RIL_REQUEST_CDMA_FLASH 84
4020
4021/**
4022 * RIL_REQUEST_CDMA_BURST_DTMF
4023 *
4024 * Send DTMF string
4025 *
jsh602f80f2009-07-10 15:44:37 -07004026 * "data" is const char **
4027 * ((const char **)data)[0] is a DTMF string
4028 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
4029 * default
4030 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
4031 * default
Wink Saville7f856802009-06-09 10:23:37 -07004032 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004033 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004034 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004035 * Valid errors:
4036 * SUCCESS
4037 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004038 * INVALID_ARGUMENTS
4039 * NO_MEMORY
4040 * SYSTEM_ERR
4041 * MODEM_ERR
4042 * INTERNAL_ERR
4043 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07004044 * GENERIC_FAILURE
4045 *
4046 */
4047#define RIL_REQUEST_CDMA_BURST_DTMF 85
4048
4049/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004050 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07004051 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004052 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
4053 * If the checksum is valid the 20 digit AKEY is written to NV,
4054 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07004055 *
4056 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004057 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
4058 * where the last 6 digits are a checksum of the
4059 * first 20, as specified in TR45.AHAG
4060 * "Common Cryptographic Algorithms, Revision D.1
4061 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07004062 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004063 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004064 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004065 * Valid errors:
4066 * SUCCESS
4067 * RADIO_NOT_AVAILABLE
4068 * GENERIC_FAILURE
4069 *
4070 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004071#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07004072
4073/**
4074 * RIL_REQUEST_CDMA_SEND_SMS
4075 *
4076 * Send a CDMA SMS message
4077 *
4078 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07004079 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004080 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07004081 *
johnwangbfb151b2009-09-11 15:20:38 -07004082 * Based on the return error, caller decides to resend if sending sms
4083 * fails. The CDMA error class is derived as follows,
4084 * SUCCESS is error class 0 (no error)
4085 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
4086 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
4087 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004088 * Valid errors:
4089 * SUCCESS
4090 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07004091 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08004092 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004093 * INVALID_STATE
4094 * INVALID_ARGUMENTS
4095 * NO_MEMORY
4096 * REQUEST_RATE_LIMITED
4097 * INVALID_SMS_FORMAT
4098 * SYSTEM_ERR
4099 * FDN_CHECK_FAILURE
4100 * MODEM_ERR
4101 * NETWORK_ERR
4102 * ENCODING_ERR
4103 * INVALID_SMSC_ADDRESS
4104 * MODE_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004105 * GENERIC_FAILURE
4106 *
4107 */
4108#define RIL_REQUEST_CDMA_SEND_SMS 87
4109
4110/**
4111 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4112 *
4113 * Acknowledge the success or failure in the receipt of SMS
4114 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4115 *
4116 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07004117 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004118 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004119 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004120 * Valid errors:
4121 * SUCCESS
4122 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004123 * INVALID_ARGUMENTS
4124 * NO_SMS_TO_ACK
4125 * INVALID_STATE
4126 * NO_MEMORY
4127 * REQUEST_RATE_LIMITED
4128 * SYSTEM_ERR
4129 * MODEM_ERR
4130 * INVALID_STATE
4131 * MODE_NOT_SUPPORTED
4132 * NETWORK_NOT_READY
4133 * INVALID_MODEM_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004134 * GENERIC_FAILURE
4135 *
4136 */
4137#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
4138
4139/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004140 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004141 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004142 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
4143 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004144 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004145 *
4146 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
4147 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
4148 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004149 * Valid errors:
4150 * SUCCESS
4151 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004152 * INVALID_STATE
4153 * NO_MEMORY
4154 * REQUEST_RATE_LIMITED
4155 * SYSTEM_ERR
4156 * NO_RESOURCES
4157 * MODEM_ERR
4158 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004159 * GENERIC_FAILURE
4160 *
4161 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004162#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07004163
4164/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004165 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004166 *
4167 * Set GSM/WCDMA Cell Broadcast SMS config
4168 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004169 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
4170 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
4171 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004172 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004173 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004174 * Valid errors:
4175 * SUCCESS
4176 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004177 * INVALID_STATE
4178 * INVALID_ARGUMENTS
4179 * NO_MEMORY
4180 * SYSTEM_ERR
4181 * REQUEST_RATE_LIMITED
4182 * MODEM_ERR
4183 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004184 * GENERIC_FAILURE
4185 *
4186 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004187#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07004188
4189/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004190 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004191 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004192* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07004193 *
4194 * "data" is const int *
4195 * (const int *)data[0] indicates to activate or turn off the
4196 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
4197 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004198 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004199 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004200 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004201 * Valid errors:
4202 * SUCCESS
4203 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004204 * INVALID_STATE
4205 * INVALID_ARGUMENTS
4206 * NO_MEMORY
4207 * SYSTEM_ERR
4208 * REQUEST_RATE_LIMITED
4209 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004210 * GENERIC_FAILURE
4211 *
4212 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004213#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07004214
4215/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004216 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004217 *
4218 * Request the setting of CDMA Broadcast SMS config
4219 *
4220 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004221 *
4222 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
4223 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
4224 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004225 * Valid errors:
4226 * SUCCESS
4227 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004228 * INVALID_STATE
4229 * NO_MEMORY
4230 * REQUEST_RATE_LIMITED
4231 * SYSTEM_ERR
4232 * NO_RESOURCES
4233 * MODEM_ERR
4234 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004235 * GENERIC_FAILURE
4236 *
4237 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004238#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07004239
4240/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004241 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004242 *
4243 * Set CDMA Broadcast SMS config
4244 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004245 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
4246 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
4247 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004248 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004249 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004250 * Valid errors:
4251 * SUCCESS
4252 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004253 * INVALID_STATE
4254 * INVALID_ARGUMENTS
4255 * NO_MEMORY
4256 * SYSTEM_ERR
4257 * REQUEST_RATE_LIMITED
4258 * MODEM_ERR
4259 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004260 * GENERIC_FAILURE
4261 *
4262 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004263#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07004264
4265/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004266 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004267 *
4268 * Enable or disable the reception of CDMA Broadcast SMS
4269 *
4270 * "data" is const int *
4271 * (const int *)data[0] indicates to activate or turn off the
4272 * reception of CDMA Broadcast SMS, 0-1,
4273 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004274 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004275 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004276 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004277 * Valid errors:
4278 * SUCCESS
4279 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004280 * INVALID_STATE
4281 * INVALID_ARGUMENTS
4282 * NO_MEMORY
4283 * SYSTEM_ERR
4284 * REQUEST_RATE_LIMITED
4285 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004286 * GENERIC_FAILURE
4287 *
4288 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004289#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07004290
4291/**
4292 * RIL_REQUEST_CDMA_SUBSCRIPTION
4293 *
4294 * Request the device MDN / H_SID / H_NID.
4295 *
4296 * The request is only allowed when CDMA subscription is available. When CDMA
4297 * subscription is changed, application layer should re-issue the request to
4298 * update the subscription information.
4299 *
4300 * If a NULL value is returned for any of the device id, it means that error
4301 * accessing the device.
4302 *
4303 * "response" is const char **
4304 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07004305 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
4306 * CDMA subscription is available, in decimal format
4307 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
4308 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07004309 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07004310 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07004311 *
4312 * Valid errors:
4313 * SUCCESS
4314 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
4315 */
4316
Wink Savilleeafe79d2009-04-03 18:02:34 -07004317#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07004318
4319/**
4320 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
4321 *
4322 * Stores a CDMA SMS message to RUIM memory.
4323 *
4324 * "data" is RIL_CDMA_SMS_WriteArgs *
4325 *
4326 * "response" is int *
4327 * ((const int *)response)[0] is the record index where the message is stored.
4328 *
4329 * Valid errors:
4330 * SUCCESS
4331 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004332 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08004333 * INVALID_ARGUMENTS
4334 * INVALID_SMS_FORMAT
4335 * INTERNAL_ERR
4336 * MODEM_ERR
4337 * ENCODING_ERR
4338 * NO_MEMORY
4339 * NO_RESOURCES
4340 * INVALID_MODEM_STATE
4341 * MODE_NOT_SUPPORTED
4342 * INVALID_SMSC_ADDRESS
Wink Savillef4c4d362009-04-02 01:37:03 -07004343 * GENERIC_FAILURE
4344 *
4345 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004346#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07004347
4348/**
4349 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
4350 *
4351 * Deletes a CDMA SMS message from RUIM memory.
4352 *
4353 * "data" is int *
4354 * ((int *)data)[0] is the record index of the message to delete.
4355 *
4356 * "response" is NULL
4357 *
4358 * Valid errors:
4359 * SUCCESS
4360 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004361 * INVALID_ARGUMENTS
4362 * NO_MEMORY
4363 * REQUEST_RATE_LIMITED
4364 * SYSTEM_ERR
4365 * MODEM_ERR
4366 * NO_SUCH_ENTRY
Wink Savillef4c4d362009-04-02 01:37:03 -07004367 * GENERIC_FAILURE
4368 *
4369 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004370#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07004371
4372/**
4373 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07004374 *
4375 * Request the device ESN / MEID / IMEI / IMEISV.
4376 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004377 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07004378 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07004379 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004380 *
4381 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07004382 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004383 *
4384 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07004385 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004386 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004387 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07004388 * ((const char **)response)[0] is IMEI if GSM subscription is available
4389 * ((const char **)response)[1] is IMEISV if GSM subscription is available
4390 * ((const char **)response)[2] is ESN if CDMA subscription is available
4391 * ((const char **)response)[3] is MEID if CDMA subscription is available
4392 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004393 * Valid errors:
4394 * SUCCESS
4395 * RADIO_NOT_AVAILABLE
4396 * GENERIC_FAILURE
4397 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004398#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07004399
Wink Saville1b5fd232009-04-22 14:50:00 -07004400/**
4401 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
4402 *
4403 * Request the radio's system selection module to exit emergency
4404 * callback mode. RIL will not respond with SUCCESS until the modem has
4405 * completely exited from Emergency Callback Mode.
4406 *
4407 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004408 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004409 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004410 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004411 * Valid errors:
4412 * SUCCESS
4413 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004414 * OPERATION_NOT_ALLOWED
Wink Saville1b5fd232009-04-22 14:50:00 -07004415 * GENERIC_FAILURE
4416 *
4417 */
4418#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07004419
jsh000a9fe2009-05-11 14:52:35 -07004420/**
4421 * RIL_REQUEST_GET_SMSC_ADDRESS
4422 *
4423 * Queries the default Short Message Service Center address on the device.
4424 *
4425 * "data" is NULL
4426 *
4427 * "response" is const char * containing the SMSC address.
4428 *
4429 * Valid errors:
4430 * SUCCESS
4431 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004432 * NO_MEMORY
4433 * REQUEST_RATE_LIMITED
4434 * SYSTEM_ERR
4435 * INTERNAL_ERR
4436 * MODEM_ERR
4437 * INVALID_ARGUMENTS
4438 * INVALID_MODEM_STATE
4439 * NOT_PROVISIONED
jsh000a9fe2009-05-11 14:52:35 -07004440 * GENERIC_FAILURE
4441 *
4442 */
4443#define RIL_REQUEST_GET_SMSC_ADDRESS 100
4444
4445/**
4446 * RIL_REQUEST_SET_SMSC_ADDRESS
4447 *
4448 * Sets the default Short Message Service Center address on the device.
4449 *
4450 * "data" is const char * containing the SMSC address.
4451 *
4452 * "response" is NULL
4453 *
4454 * Valid errors:
4455 * SUCCESS
4456 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004457 * INVALID_ARGUMENTS
4458 * INVALID_SMS_FORMAT
4459 * NO_MEMORY
4460 * SYSTEM_ERR
4461 * REQUEST_RATE_LIMITED
4462 * MODEM_ERR
4463 * NO_RESOURCES
jsh000a9fe2009-05-11 14:52:35 -07004464 * GENERIC_FAILURE
4465 *
4466 */
4467#define RIL_REQUEST_SET_SMSC_ADDRESS 101
4468
jshb60444e2009-05-29 11:09:17 -07004469/**
4470 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
4471 *
4472 * Indicates whether there is storage available for new SMS messages.
4473 *
4474 * "data" is int *
4475 * ((int *)data)[0] is 1 if memory is available for storing new messages
4476 * is 0 if memory capacity is exceeded
4477 *
4478 * "response" is NULL
4479 *
4480 * Valid errors:
4481 * SUCCESS
4482 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004483 * INVALID_ARGUMENTS
4484 * NO_MEMORY
4485 * INVALID_STATE
4486 * SYSTEM_ERR
4487 * REQUEST_RATE_LIMITED
4488 * MODEM_ERR
jshb60444e2009-05-29 11:09:17 -07004489 * GENERIC_FAILURE
4490 *
4491 */
4492#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
4493
Wink Saville2641d5b2009-06-08 17:40:42 -07004494/**
4495 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
4496 *
4497 * Indicates that the StkSerivce is running and is
4498 * ready to receive RIL_UNSOL_STK_XXXXX commands.
4499 *
4500 * "data" is NULL
4501 * "response" is NULL
4502 *
4503 * Valid errors:
4504 * SUCCESS
4505 * RADIO_NOT_AVAILABLE
4506 * GENERIC_FAILURE
4507 *
4508 */
4509#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
4510
Wink Savillec0114b32011-02-18 10:14:07 -08004511/**
4512 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
4513 *
4514 * Request to query the location where the CDMA subscription shall
4515 * be retrieved
4516 *
4517 * "data" is NULL
4518 *
4519 * "response" is int *
4520 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4521 *
4522 * Valid errors:
4523 * SUCCESS
4524 * RADIO_NOT_AVAILABLE
4525 * GENERIC_FAILURE
4526 * SUBSCRIPTION_NOT_AVAILABLE
4527 *
4528 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
4529 */
4530#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
4531
Jake Hambyfa8d5842011-08-19 16:22:18 -07004532/**
4533 * RIL_REQUEST_ISIM_AUTHENTICATION
4534 *
4535 * Request the ISIM application on the UICC to perform AKA
4536 * challenge/response algorithm for IMS authentication
4537 *
4538 * "data" is a const char * containing the challenge string in Base64 format
4539 * "response" is a const char * containing the response in Base64 format
4540 *
4541 * Valid errors:
4542 * SUCCESS
4543 * RADIO_NOT_AVAILABLE
4544 * GENERIC_FAILURE
4545 */
4546#define RIL_REQUEST_ISIM_AUTHENTICATION 105
4547
Jake Hamby300105d2011-09-26 01:01:44 -07004548/**
4549 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
4550 *
4551 * Acknowledge successful or failed receipt of SMS previously indicated
4552 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
4553 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
4554 *
4555 * "data" is const char **
4556 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
4557 * is "0" on failed receipt (send RP-ERROR)
4558 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
4559 *
4560 * "response" is NULL
4561 *
4562 * Valid errors:
4563 * SUCCESS
4564 * RADIO_NOT_AVAILABLE
4565 * GENERIC_FAILURE
4566 */
4567#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
4568
4569/**
4570 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
4571 *
4572 * Requests to send a SAT/USAT envelope command to SIM.
4573 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
4574 *
4575 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
4576 * the SW1 and SW2 status bytes from the UICC response are returned along with
4577 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
4578 *
4579 * The RIL implementation shall perform the normal processing of a '91XX'
4580 * response in SW1/SW2 to retrieve the pending proactive command and send it
4581 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
4582 *
4583 * "data" is a const char * containing the SAT/USAT command
4584 * in hexadecimal format starting with command tag
4585 *
4586 * "response" is a const RIL_SIM_IO_Response *
4587 *
4588 * Valid errors:
4589 * RIL_E_SUCCESS
4590 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08004591 * SIM_BUSY
4592 * OPERATION_NOT_ALLOWED
Jake Hamby300105d2011-09-26 01:01:44 -07004593 * RIL_E_GENERIC_FAILURE
4594 */
4595#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
4596
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004597/**
4598 * RIL_REQUEST_VOICE_RADIO_TECH
4599 *
4600 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
4601 * when radio state is RADIO_STATE_ON
4602 *
4603 * "data" is NULL
4604 * "response" is int *
4605 * ((int *) response)[0] is of type const RIL_RadioTechnology
4606 *
4607 * Valid errors:
4608 * SUCCESS
4609 * RADIO_NOT_AVAILABLE
4610 * GENERIC_FAILURE
4611 */
4612#define RIL_REQUEST_VOICE_RADIO_TECH 108
4613
Wink Saville8a9e0212013-04-09 12:11:38 -07004614/**
4615 * RIL_REQUEST_GET_CELL_INFO_LIST
4616 *
4617 * Request all of the current cell information known to the radio. The radio
4618 * must a list of all current cells, including the neighboring cells. If for a particular
4619 * cell information isn't known then the appropriate unknown value will be returned.
4620 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
4621 *
4622 * "data" is NULL
4623 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08004624 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07004625 */
4626#define RIL_REQUEST_GET_CELL_INFO_LIST 109
4627
4628/**
4629 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
4630 *
4631 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
Wink Savillec57b3eb2013-04-17 12:51:41 -07004632 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
Wink Saville8a9e0212013-04-09 12:11:38 -07004633 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
4634 * a RIL_UNSOL_CELL_INFO_LIST.
4635 *
4636 * "data" is int *
4637 * ((int *)data)[0] is minimum time in milliseconds
4638 *
4639 * "response" is NULL
4640 *
4641 * Valid errors:
4642 * SUCCESS
4643 * RADIO_NOT_AVAILABLE
4644 * GENERIC_FAILURE
4645 */
4646#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
Jake Hamby300105d2011-09-26 01:01:44 -07004647
Sungmin Choi75697532013-04-26 15:04:45 -07004648/**
4649 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
4650 *
4651 * Set an apn to initial attach network
4652 * "response" is NULL
4653 *
4654 * Valid errors:
4655 * SUCCESS
4656 * RADIO_NOT_AVAILABLE (radio resetting)
4657 * GENERIC_FAILURE
4658 * SUBSCRIPTION_NOT_AVAILABLE
4659 */
4660#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
4661
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004662/**
4663 * RIL_REQUEST_IMS_REGISTRATION_STATE
4664 *
4665 * Request current IMS registration state
4666 *
4667 * "data" is NULL
4668 *
4669 * "response" is int *
4670 * ((int *)response)[0] is registration state:
4671 * 0 - Not registered
4672 * 1 - Registered
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004673 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004674 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004675 * must follow with IMS SMS format:
4676 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004677 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
4678 *
4679 * Valid errors:
4680 * SUCCESS
4681 * RADIO_NOT_AVAILABLE
4682 * GENERIC_FAILURE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004683 */
4684#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
4685
4686/**
4687 * RIL_REQUEST_IMS_SEND_SMS
4688 *
4689 * Send a SMS message over IMS
4690 *
4691 * "data" is const RIL_IMS_SMS_Message *
4692 *
4693 * "response" is a const RIL_SMS_Response *
4694 *
4695 * Based on the return error, caller decides to resend if sending sms
4696 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
4697 * In case of retry, data is encoded based on Voice Technology available.
4698 *
4699 * Valid errors:
4700 * SUCCESS
4701 * RADIO_NOT_AVAILABLE
4702 * SMS_SEND_FAIL_RETRY
4703 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08004704 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004705 * INVALID_ARGUMENTS
4706 * INVALID_STATE
4707 * NO_MEMORY
4708 * INVALID_SMS_FORMAT
4709 * SYSTEM_ERR
4710 * REQUEST_RATE_LIMITED
4711 * MODEM_ERR
4712 * NETWORK_ERR
4713 * ENCODING_ERR
4714 * INVALID_SMSC_ADDRESS
4715 * MODE_NOT_SUPPORTED
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004716 * GENERIC_FAILURE
4717 *
4718 */
4719#define RIL_REQUEST_IMS_SEND_SMS 113
4720
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004721/**
4722 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
4723 *
4724 * Request APDU exchange on the basic channel. This command reflects TS 27.007
4725 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
4726 * of GSM/CDMA, and filter commands appropriately. It should filter
4727 * channel management and SELECT by DF name commands.
4728 *
4729 * "data" is a const RIL_SIM_APDU *
4730 * "sessionid" field should be ignored.
4731 *
4732 * "response" is a const RIL_SIM_IO_Response *
4733 *
4734 * Valid errors:
4735 * SUCCESS
4736 * RADIO_NOT_AVAILABLE
4737 * GENERIC_FAILURE
4738 */
4739#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
4740
4741/**
4742 * RIL_REQUEST_SIM_OPEN_CHANNEL
4743 *
4744 * Open a new logical channel and select the given application. This command
4745 * reflects TS 27.007 "open logical channel" operation (+CCHO).
4746 *
4747 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
4748 *
4749 * "response" is int *
4750 * ((int *)data)[0] contains the session id of the logical channel.
Shishir Agrawal760123f2014-10-14 09:14:57 -07004751 * ((int *)data)[1] onwards may optionally contain the select response for the
4752 * open channel command with one byte per integer.
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004753 *
4754 * Valid errors:
4755 * SUCCESS
4756 * RADIO_NOT_AVAILABLE
4757 * GENERIC_FAILURE
4758 * MISSING_RESOURCE
4759 * NO_SUCH_ELEMENT
4760 */
4761#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
4762
4763/**
4764 * RIL_REQUEST_SIM_CLOSE_CHANNEL
4765 *
4766 * Close a previously opened logical channel. This command reflects TS 27.007
4767 * "close logical channel" operation (+CCHC).
4768 *
4769 * "data" is int *
4770 * ((int *)data)[0] is the session id of logical the channel to close.
4771 *
4772 * "response" is NULL
4773 *
4774 * Valid errors:
4775 * SUCCESS
4776 * RADIO_NOT_AVAILABLE
4777 * GENERIC_FAILURE
4778 */
4779#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
4780
4781/**
4782 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
4783 *
4784 * Exchange APDUs with a UICC over a previously opened logical channel. This
4785 * command reflects TS 27.007 "generic logical channel access" operation
4786 * (+CGLA). The modem should filter channel management and SELECT by DF name
4787 * commands.
4788 *
4789 * "data" is a const RIL_SIM_APDU*
4790 *
4791 * "response" is a const RIL_SIM_IO_Response *
4792 *
4793 * Valid errors:
4794 * SUCCESS
4795 * RADIO_NOT_AVAILABLE
4796 * GENERIC_FAILURE
4797 */
4798#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
4799
Jake Hamby8a4a2332014-01-15 13:12:05 -08004800/**
4801 * RIL_REQUEST_NV_READ_ITEM
4802 *
4803 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4804 * This is used for device configuration by some CDMA operators.
4805 *
4806 * "data" is a const RIL_NV_ReadItem *
4807 *
4808 * "response" is const char * containing the contents of the NV item
4809 *
4810 * Valid errors:
4811 * SUCCESS
4812 * RADIO_NOT_AVAILABLE
4813 * GENERIC_FAILURE
4814 */
4815#define RIL_REQUEST_NV_READ_ITEM 118
4816
4817/**
4818 * RIL_REQUEST_NV_WRITE_ITEM
4819 *
4820 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4821 * This is used for device configuration by some CDMA operators.
4822 *
4823 * "data" is a const RIL_NV_WriteItem *
4824 *
4825 * "response" is NULL
4826 *
4827 * Valid errors:
4828 * SUCCESS
4829 * RADIO_NOT_AVAILABLE
4830 * GENERIC_FAILURE
4831 */
4832#define RIL_REQUEST_NV_WRITE_ITEM 119
4833
4834/**
4835 * RIL_REQUEST_NV_WRITE_CDMA_PRL
4836 *
4837 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
4838 * This is used for device configuration by some CDMA operators.
4839 *
4840 * "data" is a const char * containing the PRL as a byte array
4841 *
4842 * "response" is NULL
4843 *
4844 * Valid errors:
4845 * SUCCESS
4846 * RADIO_NOT_AVAILABLE
4847 * GENERIC_FAILURE
4848 */
4849#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
4850
4851/**
4852 * RIL_REQUEST_NV_RESET_CONFIG
4853 *
4854 * Reset the radio NV configuration to the factory state.
4855 * This is used for device configuration by some CDMA operators.
4856 *
4857 * "data" is int *
Jake Hambyd27c9d52014-02-06 14:52:05 -08004858 * ((int *)data)[0] is 1 to reload all NV items
4859 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
4860 * ((int *)data)[0] is 3 for factory reset (RTN)
Jake Hamby8a4a2332014-01-15 13:12:05 -08004861 *
4862 * "response" is NULL
4863 *
4864 * Valid errors:
4865 * SUCCESS
4866 * RADIO_NOT_AVAILABLE
4867 * GENERIC_FAILURE
4868 */
4869#define RIL_REQUEST_NV_RESET_CONFIG 121
4870
Etan Cohend3652192014-06-20 08:28:44 -07004871 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
4872 * FIXME This API needs to have more documentation.
4873 *
4874 * Selection/de-selection of a subscription from a SIM card
4875 * "data" is const RIL_SelectUiccSub*
4876
4877 *
4878 * "response" is NULL
4879 *
4880 * Valid errors:
4881 * SUCCESS
4882 * RADIO_NOT_AVAILABLE (radio resetting)
4883 * GENERIC_FAILURE
4884 * SUBSCRIPTION_NOT_SUPPORTED
4885 *
4886 */
4887#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
4888
4889/**
4890 * RIL_REQUEST_ALLOW_DATA
4891 *
4892 * Tells the modem whether data calls are allowed or not
4893 *
4894 * "data" is int *
4895 * FIXME slotId and aid will be added.
4896 * ((int *)data)[0] is == 0 to allow data calls
4897 * ((int *)data)[0] is == 1 to disallow data calls
4898 *
4899 * "response" is NULL
4900 *
4901 * Valid errors:
4902 *
4903 * SUCCESS
4904 * RADIO_NOT_AVAILABLE (radio resetting)
4905 * GENERIC_FAILURE
4906 *
4907 */
4908#define RIL_REQUEST_ALLOW_DATA 123
4909
4910/**
4911 * RIL_REQUEST_GET_HARDWARE_CONFIG
4912 *
4913 * Request all of the current hardware (modem and sim) associated
4914 * with the RIL.
4915 *
4916 * "data" is NULL
4917 *
4918 * "response" is an array of RIL_HardwareConfig.
4919 */
4920#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
4921
4922/**
Amit Mahajan2b772032014-06-26 14:20:11 -07004923 * RIL_REQUEST_SIM_AUTHENTICATION
Etan Cohend3652192014-06-20 08:28:44 -07004924 *
4925 * Returns the response of SIM Authentication through RIL to a
4926 * challenge request.
4927 *
4928 * "data" Base64 encoded string containing challenge:
4929 * int authContext; P2 value of authentication command, see P2 parameter in
4930 * 3GPP TS 31.102 7.1.2
4931 * char *authData; the challenge string in Base64 format, see 3GPP
4932 * TS 31.102 7.1.2
4933 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
4934 * NULL if no value
4935 *
4936 * "response" Base64 encoded strings containing response:
4937 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
4938 * int sw2;
4939 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
4940 */
Amit Mahajan2b772032014-06-26 14:20:11 -07004941#define RIL_REQUEST_SIM_AUTHENTICATION 125
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004942
Wink Savillec29360a2014-07-13 05:17:28 -07004943/**
4944 * RIL_REQUEST_GET_DC_RT_INFO
4945 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004946 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07004947 * Requests the Data Connection Real Time Info
4948 *
4949 * "data" is NULL
4950 *
4951 * "response" is the most recent RIL_DcRtInfo
4952 *
4953 * Valid errors:
4954 * SUCCESS
4955 * RADIO_NOT_AVAILABLE
4956 * GENERIC_FAILURE
4957 *
4958 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
4959 */
4960#define RIL_REQUEST_GET_DC_RT_INFO 126
4961
4962/**
4963 * RIL_REQUEST_SET_DC_RT_INFO_RATE
4964 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004965 * The request is DEPRECATED
Wink Savillec29360a2014-07-13 05:17:28 -07004966 * This is the minimum number of milliseconds between successive
4967 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
4968 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
4969 * 0 means send as fast as possible.
4970 *
4971 * "data" The number of milliseconds as an int
4972 *
4973 * "response" is null
4974 *
4975 * Valid errors:
4976 * SUCCESS must not fail
4977 */
4978#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
4979
Amit Mahajanc796e222014-08-13 16:54:01 +00004980/**
4981 * RIL_REQUEST_SET_DATA_PROFILE
4982 *
4983 * Set data profile in modem
Hui Wang8d679622014-10-16 14:59:27 -05004984 * Modem should erase existed profiles from framework, and apply new profiles
Amit Mahajanc796e222014-08-13 16:54:01 +00004985 * "data" is an const RIL_DataProfileInfo **
4986 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
4987 * "response" is NULL
4988 *
4989 * Valid errors:
4990 * SUCCESS
4991 * RADIO_NOT_AVAILABLE (radio resetting)
4992 * GENERIC_FAILURE
4993 * SUBSCRIPTION_NOT_AVAILABLE
4994 */
4995#define RIL_REQUEST_SET_DATA_PROFILE 128
Naveen Kallaa65a16a2014-07-31 16:48:31 -07004996
4997/**
4998 * RIL_REQUEST_SHUTDOWN
4999 *
5000 * Device is shutting down. All further commands are ignored
5001 * and RADIO_NOT_AVAILABLE must be returned.
5002 *
5003 * "data" is null
5004 * "response" is NULL
5005 *
5006 * Valid errors:
5007 * SUCCESS
5008 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005009 * OPERATION_NOT_ALLOWED
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005010 * GENERIC_FAILURE
5011 */
5012#define RIL_REQUEST_SHUTDOWN 129
5013
Wink Saville8b4e4f72014-10-17 15:01:45 -07005014/**
5015 * RIL_REQUEST_GET_RADIO_CAPABILITY
5016 *
5017 * Used to get phone radio capablility.
5018 *
Abhishek Adappa772c0d22015-02-09 11:11:12 -08005019 * "data" is the RIL_RadioCapability structure
Wink Saville8b4e4f72014-10-17 15:01:45 -07005020 *
5021 * Valid errors:
5022 * SUCCESS
5023 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005024 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005025 * GENERIC_FAILURE
5026 */
5027#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
5028
5029/**
5030 * RIL_REQUEST_SET_RADIO_CAPABILITY
5031 *
5032 * Used to set the phones radio capability. Be VERY careful
5033 * using this request as it may cause some vendor modems to reset. Because
5034 * of the possible modem reset any RIL commands after this one may not be
5035 * processed.
5036 *
5037 * "data" is the RIL_RadioCapability structure
5038 *
5039 * "response" is the RIL_RadioCapability structure, used to feedback return status
5040 *
5041 * Valid errors:
5042 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
5043 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005044 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005045 * GENERIC_FAILURE
5046 */
5047#define RIL_REQUEST_SET_RADIO_CAPABILITY 131
5048
fengluf7408292015-04-14 14:53:55 -07005049/**
5050 * RIL_REQUEST_START_LCE
5051 *
5052 * Start Link Capacity Estimate (LCE) service if supported by the radio.
5053 *
5054 * "data" is const int *
5055 * ((const int*)data)[0] specifies the desired reporting interval (ms).
fenglu290add32015-05-01 17:05:15 -07005056 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
fengluf7408292015-04-14 14:53:55 -07005057 *
fenglu290add32015-05-01 17:05:15 -07005058 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005059 *
5060 * Valid errors:
5061 * SUCCESS
5062 * RADIO_NOT_AVAILABLE
5063 * LCE_NOT_SUPPORTED
5064 */
5065#define RIL_REQUEST_START_LCE 132
5066
5067/**
5068 * RIL_REQUEST_STOP_LCE
5069 *
5070 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
5071 * idempotent for the radio modem.
5072 *
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_STOP_LCE 133
5081
5082/**
5083 * RIL_REQUEST_PULL_LCEDATA
5084 *
5085 * Pull LCE service for capacity information.
5086 *
fenglu290add32015-05-01 17:05:15 -07005087 * "response" is the RIL_LceDataInfo.
fengluf7408292015-04-14 14:53:55 -07005088 *
5089 * Valid errors:
5090 * SUCCESS
5091 * RADIO_NOT_AVAILABLE
5092 * LCE_NOT_SUPPORTED
5093 */
5094#define RIL_REQUEST_PULL_LCEDATA 134
5095
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005096/**
5097 * RIL_REQUEST_GET_ACTIVITY_INFO
5098 *
5099 * Get modem activity statisitics info.
5100 *
5101 * There can be multiple RIL_REQUEST_GET_ACTIVITY_INFO calls to modem.
5102 * Once the response for the request is sent modem will clear
5103 * current statistics information.
5104 *
5105 * "data" is null
5106 * "response" is const RIL_ActivityStatsInfo *
5107 *
5108 * Valid errors:
5109 *
5110 * SUCCESS
5111 * RADIO_NOT_AVAILABLE (radio resetting)
5112 * GENERIC_FAILURE
5113 */
5114#define RIL_REQUEST_GET_ACTIVITY_INFO 135
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005115
Meng Wangb4e34312016-05-12 14:54:36 -07005116/**
5117 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS
5118 *
5119 * Set carrier restrictions for this sim slot
5120 *
5121 * "data" is const RIL_CarrierRestrictions *
5122 * A list of allowed carriers and possibly a list of excluded carriers.
5123 * If data is NULL, means to clear previous carrier restrictions and allow all carriers
5124 *
5125 * "response" is int *
5126 * ((int *)data)[0] contains the number of allowed carriers which have been set correctly.
5127 * On success, it should match the length of list data->allowed_carriers.
5128 * If data is NULL, the value must be 0.
5129 *
5130 * Valid errors:
5131 * RIL_E_SUCCESS
5132 * RIL_E_INVALID_ARGUMENTS
5133 * RIL_E_RADIO_NOT_AVAILABLE
5134 * RIL_E_REQUEST_NOT_SUPPORTED
5135 */
5136#define RIL_REQUEST_SET_CARRIER_RESTRICTIONS 136
5137
5138/**
5139 * RIL_REQUEST_GET_CARRIER_RESTRICTIONS
5140 *
5141 * Get carrier restrictions for this sim slot
5142 *
5143 * "data" is NULL
5144 *
5145 * "response" is const RIL_CarrierRestrictions *.
5146 * If response is NULL, it means all carriers are allowed.
5147 *
5148 * Valid errors:
5149 * RIL_E_SUCCESS
5150 * RIL_E_RADIO_NOT_AVAILABLE
5151 * RIL_E_REQUEST_NOT_SUPPORTED
5152 */
5153#define RIL_REQUEST_GET_CARRIER_RESTRICTIONS 137
5154
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005155/***********************************************************************/
5156
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005157/**
5158 * RIL_RESPONSE_ACKNOWLEDGEMENT
5159 *
5160 * This is used by Asynchronous solicited messages and Unsolicited messages
5161 * to acknowledge the receipt of those messages in RIL.java so that the ack
5162 * can be used to let ril.cpp to release wakelock.
5163 *
5164 * Valid errors
5165 * SUCCESS
5166 * RADIO_NOT_AVAILABLE
5167 */
5168
5169#define RIL_RESPONSE_ACKNOWLEDGEMENT 800
5170
5171/***********************************************************************/
5172
Wink Savillef4c4d362009-04-02 01:37:03 -07005173
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005174#define RIL_UNSOL_RESPONSE_BASE 1000
5175
5176/**
5177 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
5178 *
5179 * Indicate when value of RIL_RadioState has changed.
5180 *
5181 * Callee will invoke RIL_RadioStateRequest method on main thread
5182 *
5183 * "data" is NULL
5184 */
5185
5186#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
5187
5188
5189/**
5190 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
5191 *
5192 * Indicate when call state has changed
5193 *
5194 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
5195 *
5196 * "data" is NULL
5197 *
Wink Saville7f856802009-06-09 10:23:37 -07005198 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005199 * "RING", "BUSY", "NO CARRIER", and also call state
5200 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
5201 *
5202 * Redundent or extraneous invocations are tolerated
5203 */
5204#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
5205
5206
5207/**
Wink Savillec0114b32011-02-18 10:14:07 -08005208 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005209 *
Wink Savillec0114b32011-02-18 10:14:07 -08005210 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005211 *
5212 * Callee will invoke the following requests on main thread:
5213 *
Wink Savillec0114b32011-02-18 10:14:07 -08005214 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005215 * RIL_REQUEST_OPERATOR
5216 *
5217 * "data" is NULL
5218 *
5219 * FIXME should this happen when SIM records are loaded? (eg, for
5220 * EONS)
5221 */
Wink Savillec0114b32011-02-18 10:14:07 -08005222#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005223
5224/**
5225 * RIL_UNSOL_RESPONSE_NEW_SMS
5226 *
5227 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07005228 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005229 * "data" is const char *
5230 * This is a pointer to a string containing the PDU of an SMS-DELIVER
5231 * as an ascii string of hex digits. The PDU starts with the SMSC address
5232 * per TS 27.005 (+CMT:)
5233 *
5234 * Callee will subsequently confirm the receipt of thei SMS with a
5235 * RIL_REQUEST_SMS_ACKNOWLEDGE
5236 *
Wink Saville7f856802009-06-09 10:23:37 -07005237 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005238 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5239 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5240 */
5241
5242#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
5243
5244/**
5245 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
5246 *
5247 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07005248 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005249 * "data" is const char *
5250 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
5251 * as an ascii string of hex digits. The PDU starts with the SMSC address
5252 * per TS 27.005 (+CDS:).
5253 *
5254 * Callee will subsequently confirm the receipt of the SMS with a
5255 * RIL_REQUEST_SMS_ACKNOWLEDGE
5256 *
Wink Saville7f856802009-06-09 10:23:37 -07005257 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005258 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5259 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5260 */
5261
5262#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
5263
5264/**
5265 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
5266 *
5267 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07005268 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005269 * "data" is const int *
5270 * ((const int *)data)[0] contains the slot index on the SIM that contains
5271 * the new message
5272 */
5273
5274#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
5275
5276/**
5277 * RIL_UNSOL_ON_USSD
5278 *
5279 * Called when a new USSD message is received.
5280 *
5281 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07005282 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005283 * one of these string values:
5284 * "0" USSD-Notify -- text in ((const char **)data)[1]
5285 * "1" USSD-Request -- text in ((const char **)data)[1]
5286 * "2" Session terminated by network
5287 * "3" other local client (eg, SIM Toolkit) has responded
5288 * "4" Operation not supported
5289 * "5" Network timeout
5290 *
5291 * The USSD session is assumed to persist if the type code is "1", otherwise
5292 * the current session (if any) is assumed to have terminated.
5293 *
5294 * ((const char **)data)[1] points to a message string if applicable, which
5295 * should always be in UTF-8.
5296 */
5297#define RIL_UNSOL_ON_USSD 1006
5298/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
5299
5300/**
5301 * RIL_UNSOL_ON_USSD_REQUEST
5302 *
5303 * Obsolete. Send via RIL_UNSOL_ON_USSD
5304 */
Wink Saville7f856802009-06-09 10:23:37 -07005305#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005306
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005307/**
5308 * RIL_UNSOL_NITZ_TIME_RECEIVED
5309 *
5310 * Called when radio has received a NITZ time message
5311 *
5312 * "data" is const char * pointing to NITZ time string
5313 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
5314 */
5315#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
5316
5317/**
5318 * RIL_UNSOL_SIGNAL_STRENGTH
5319 *
5320 * Radio may report signal strength rather han have it polled.
5321 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005322 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005323 */
5324#define RIL_UNSOL_SIGNAL_STRENGTH 1009
5325
5326
5327/**
Wink Savillef4c4d362009-04-02 01:37:03 -07005328 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005329 *
Wink Savillec0114b32011-02-18 10:14:07 -08005330 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07005331 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
5332 * of current data contexts including new contexts that have been
5333 * activated. A data call is only removed from this list when the
5334 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
5335 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005336 *
Wink Savillef4c4d362009-04-02 01:37:03 -07005337 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005338 */
5339
Wink Savillef4c4d362009-04-02 01:37:03 -07005340#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005341
5342/**
5343 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
5344 *
5345 * Reports supplementary service related notification from the network.
5346 *
5347 * "data" is a const RIL_SuppSvcNotification *
5348 *
5349 */
5350
5351#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
5352
5353/**
5354 * RIL_UNSOL_STK_SESSION_END
5355 *
5356 * Indicate when STK session is terminated by SIM.
5357 *
5358 * "data" is NULL
5359 */
5360#define RIL_UNSOL_STK_SESSION_END 1012
5361
5362/**
5363 * RIL_UNSOL_STK_PROACTIVE_COMMAND
5364 *
5365 * Indicate when SIM issue a STK proactive command to applications
5366 *
5367 * "data" is a const char * containing SAT/USAT proactive command
5368 * in hexadecimal format string starting with command tag
5369 *
5370 */
5371#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
5372
5373/**
5374 * RIL_UNSOL_STK_EVENT_NOTIFY
5375 *
5376 * Indicate when SIM notifies applcations some event happens.
5377 * Generally, application does not need to have any feedback to
5378 * SIM but shall be able to indicate appropriate messages to users.
5379 *
5380 * "data" is a const char * containing SAT/USAT commands or responses
5381 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
5382 * starting with first byte of response data or command tag
5383 *
5384 */
5385#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
5386
5387/**
5388 * RIL_UNSOL_STK_CALL_SETUP
5389 *
5390 * Indicate when SIM wants application to setup a voice call.
5391 *
5392 * "data" is const int *
5393 * ((const int *)data)[0] contains timeout value (in milliseconds)
5394 */
5395#define RIL_UNSOL_STK_CALL_SETUP 1015
5396
5397/**
5398 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
5399 *
5400 * Indicates that SMS storage on the SIM is full. Sent when the network
5401 * attempts to deliver a new SMS message. Messages cannot be saved on the
5402 * SIM until space is freed. In particular, incoming Class 2 messages
5403 * cannot be stored.
5404 *
5405 * "data" is null
5406 *
5407 */
5408#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
5409
5410/**
5411 * RIL_UNSOL_SIM_REFRESH
5412 *
5413 * Indicates that file(s) on the SIM have been updated, or the SIM
5414 * has been reinitialized.
5415 *
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005416 * In the case where RIL is version 6 or older:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005417 * "data" is an int *
5418 * ((int *)data)[0] is a RIL_SimRefreshResult.
5419 * ((int *)data)[1] is the EFID of the updated file if the result is
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005420 * SIM_FILE_UPDATE or NULL for any other result.
5421 *
5422 * In the case where RIL is version 7:
5423 * "data" is a RIL_SimRefreshResponse_v7 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005424 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005425 * Note: If the SIM state changes as a result of the SIM refresh (eg,
5426 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005427 * should be sent.
5428 */
5429#define RIL_UNSOL_SIM_REFRESH 1017
5430
5431/**
5432 * RIL_UNSOL_CALL_RING
5433 *
5434 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07005435 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
5436 * of a call and sending multiple is optional. If the system property
5437 * ro.telephony.call_ring.multiple is false then the upper layers
5438 * will generate the multiple events internally. Otherwise the vendor
5439 * ril must generate multiple RIL_UNSOL_CALL_RING if
5440 * ro.telephony.call_ring.multiple is true or if it is absent.
5441 *
5442 * The rate of these events is controlled by ro.telephony.call_ring.delay
5443 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005444 *
Wink Saville3d54e742009-05-18 18:00:44 -07005445 * "data" is null for GSM
5446 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005447 */
5448#define RIL_UNSOL_CALL_RING 1018
5449
The Android Open Source Project34a51082009-03-05 14:34:37 -08005450/**
5451 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5452 *
5453 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07005454 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005455 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07005456
The Android Open Source Project34a51082009-03-05 14:34:37 -08005457 * "data" is null
5458 */
5459#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
5460
5461/**
5462 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
5463 *
5464 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07005465 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005466 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07005467 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005468 * Callee will subsequently confirm the receipt of the SMS with
5469 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07005470 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005471 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
5472 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07005473 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005474 */
5475#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
5476
5477/**
5478 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
5479 *
5480 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07005481 *
Henrik Hall0eba2022010-11-25 10:20:56 +01005482 * "data" can be one of the following:
5483 * If received from GSM network, "data" is const char of 88 bytes
5484 * which indicates each page of a CBS Message sent to the MS by the
5485 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
5486 * If received from UMTS network, "data" is const char of 90 up to 1252
5487 * bytes which contain between 1 and 15 CBS Message pages sent as one
5488 * 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 -07005489 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005490 */
5491#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07005492
The Android Open Source Project34a51082009-03-05 14:34:37 -08005493/**
5494 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
5495 *
5496 * Indicates that SMS storage on the RUIM is full. Messages
5497 * cannot be saved on the RUIM until space is freed.
5498 *
5499 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07005500 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005501 */
Wink Savillef4c4d362009-04-02 01:37:03 -07005502#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
5503
The Android Open Source Project34a51082009-03-05 14:34:37 -08005504/**
5505 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
5506 *
5507 * Indicates a restricted state change (eg, for Domain Specific Access Control).
5508 *
5509 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
5510 *
5511 * "data" is an int *
5512 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
5513 */
5514#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
5515
Wink Saville1b5fd232009-04-22 14:50:00 -07005516/**
5517 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
5518 *
5519 * Indicates that the radio system selection module has
5520 * autonomously entered emergency callback mode.
5521 *
5522 * "data" is null
5523 *
5524 */
5525#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08005526
Wink Saville1b5fd232009-04-22 14:50:00 -07005527/**
5528 * RIL_UNSOL_CDMA_CALL_WAITING
5529 *
5530 * Called when CDMA radio receives a call waiting indication.
5531 *
5532 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07005533 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005534 */
5535#define RIL_UNSOL_CDMA_CALL_WAITING 1025
5536
5537/**
5538 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
5539 *
5540 * Called when CDMA radio receives an update of the progress of an
5541 * OTASP/OTAPA call.
5542 *
5543 * "data" is const int *
5544 * For CDMA this is an integer OTASP/OTAPA status listed in
5545 * RIL_CDMA_OTA_ProvisionStatus.
5546 *
5547 */
5548#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
5549
5550/**
5551 * RIL_UNSOL_CDMA_INFO_REC
5552 *
5553 * Called when CDMA radio receives one or more info recs.
5554 *
5555 * "data" is const RIL_CDMA_InformationRecords *
5556 *
5557 */
5558#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08005559
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07005560/**
5561 * RIL_UNSOL_OEM_HOOK_RAW
5562 *
5563 * This is for OEM specific use.
5564 *
5565 * "data" is a byte[]
5566 */
5567#define RIL_UNSOL_OEM_HOOK_RAW 1028
5568
John Wang5d621da2009-09-18 17:17:48 -07005569/**
5570 * RIL_UNSOL_RINGBACK_TONE
5571 *
5572 * Indicates that nework doesn't have in-band information, need to
5573 * play out-band tone.
5574 *
5575 * "data" is an int *
5576 * ((int *)data)[0] == 0 for stop play ringback tone.
5577 * ((int *)data)[0] == 1 for start play ringback tone.
5578 */
5579#define RIL_UNSOL_RINGBACK_TONE 1029
5580
John Wang5909cf82010-01-29 00:18:54 -08005581/**
5582 * RIL_UNSOL_RESEND_INCALL_MUTE
5583 *
5584 * Indicates that framework/application need reset the uplink mute state.
5585 *
5586 * There may be situations where the mute state becomes out of sync
5587 * between the application and device in some GSM infrastructures.
5588 *
5589 * "data" is null
5590 */
5591#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08005592
5593/**
5594 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
5595 *
5596 * Called when CDMA subscription source changed.
5597 *
5598 * "data" is int *
5599 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
5600 */
Wink Saville29487ef2011-04-15 09:15:31 -07005601#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08005602
5603/**
5604 * RIL_UNSOL_CDMA_PRL_CHANGED
5605 *
5606 * Called when PRL (preferred roaming list) changes.
5607 *
5608 * "data" is int *
5609 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
5610 */
5611#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
5612
5613/**
5614 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
5615 *
5616 * Called when Emergency Callback Mode Ends
5617 *
5618 * Indicates that the radio system selection module has
5619 * proactively exited emergency callback mode.
5620 *
5621 * "data" is NULL
5622 *
5623 */
5624#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
5625
Wink Saville5b9df332011-04-06 16:24:21 -07005626/**
5627 * RIL_UNSOL_RIL_CONNECTED
5628 *
5629 * Called the ril connects and returns the version
5630 *
5631 * "data" is int *
5632 * ((int *)data)[0] is RIL_VERSION
5633 */
5634#define RIL_UNSOL_RIL_CONNECTED 1034
5635
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005636/**
5637 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
5638 *
5639 * Indicates that voice technology has changed. Contains new radio technology
5640 * as a data in the message.
5641 *
5642 * "data" is int *
5643 * ((int *)data)[0] is of type const RIL_RadioTechnology
5644 *
5645 */
5646#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
5647
Wink Saville8a9e0212013-04-09 12:11:38 -07005648/**
5649 * RIL_UNSOL_CELL_INFO_LIST
5650 *
5651 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
5652 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
5653 *
5654 * "data" is NULL
5655 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08005656 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07005657 */
5658#define RIL_UNSOL_CELL_INFO_LIST 1036
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005659
Wink Saville865ce3b2013-11-08 16:37:01 -08005660/**
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005661 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
5662 *
5663 * Called when IMS registration state has changed
5664 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005665 * To get IMS registration state and IMS SMS format, callee needs to invoke the
5666 * following request on main thread:
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005667 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005668 * RIL_REQUEST_IMS_REGISTRATION_STATE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005669 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005670 * "data" is NULL
5671 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005672 */
5673#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
5674
Etan Cohend3652192014-06-20 08:28:44 -07005675/**
5676 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
5677 *
5678 * Indicated when there is a change in subscription status.
5679 * This event will be sent in the following scenarios
5680 * - subscription readiness at modem, which was selected by telephony layer
5681 * - when subscription is deactivated by modem due to UICC card removal
5682 * - When network invalidates the subscription i.e. attach reject due to authentication reject
5683 *
5684 * "data" is const int *
5685 * ((const int *)data)[0] == 0 for Subscription Deactivated
5686 * ((const int *)data)[0] == 1 for Subscription Activated
5687 *
5688 */
5689#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
5690
5691/**
5692 * RIL_UNSOL_SRVCC_STATE_NOTIFY
5693 *
5694 * Called when Single Radio Voice Call Continuity(SRVCC)
5695 * progress state has changed
5696 *
5697 * "data" is int *
5698 * ((int *)data)[0] is of type const RIL_SrvccState
5699 *
5700 */
5701
5702#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
5703
5704/**
5705 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
5706 *
5707 * Called when the hardware configuration associated with the RILd changes
5708 *
5709 * "data" is an array of RIL_HardwareConfig
5710 *
5711 */
5712#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
5713
Wink Savillec29360a2014-07-13 05:17:28 -07005714/**
5715 * RIL_UNSOL_DC_RT_INFO_CHANGED
5716 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005717 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005718 * Sent when the DC_RT_STATE changes but the time
5719 * between these messages must not be less than the
5720 * value set by RIL_REQUEST_SET_DC_RT_RATE.
5721 *
5722 * "data" is the most recent RIL_DcRtInfo
5723 *
5724 */
5725#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
5726
Wink Saville8b4e4f72014-10-17 15:01:45 -07005727/**
5728 * RIL_UNSOL_RADIO_CAPABILITY
5729 *
5730 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
5731 * Returns the phone radio capability exactly as
5732 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
5733 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
5734 *
5735 * "data" is the RIL_RadioCapability structure
5736 */
5737#define RIL_UNSOL_RADIO_CAPABILITY 1042
5738
Amit Mahajan54563d32014-11-22 00:54:49 +00005739/*
5740 * RIL_UNSOL_ON_SS
5741 *
5742 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
5743 * call control.
5744 *
5745 * "data" is const RIL_StkCcUnsolSsResponse *
5746 *
5747 */
5748#define RIL_UNSOL_ON_SS 1043
5749
5750/**
5751 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
5752 *
5753 * Called when there is an ALPHA from UICC during Call Control.
5754 *
5755 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
5756 *
5757 */
5758#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
5759
fengluf7408292015-04-14 14:53:55 -07005760/**
5761 * RIL_UNSOL_LCEDATA_RECV
5762 *
5763 * Called when there is an incoming Link Capacity Estimate (LCE) info report.
5764 *
fenglu290add32015-05-01 17:05:15 -07005765 * "data" is the RIL_LceDataInfo structure.
fengluf7408292015-04-14 14:53:55 -07005766 *
5767 */
5768#define RIL_UNSOL_LCEDATA_RECV 1045
5769
Robert Greenwalt27e99c52016-06-01 16:31:38 -07005770 /**
5771 * RIL_UNSOL_PCO_DATA
5772 *
5773 * Called when there is new Carrier PCO data received for a data call. Ideally
5774 * only new data will be forwarded, though this is not required. Multiple
5775 * boxes of carrier PCO data for a given call should result in a series of
5776 * RIL_UNSOL_PCO_DATA calls.
5777 *
5778 * "data" is the RIL_PCO_Data structure.
5779 *
5780 */
5781#define RIL_UNSOL_PCO_DATA 1046
5782
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005783/***********************************************************************/
5784
Amit Mahajan54563d32014-11-22 00:54:49 +00005785
Etan Cohend3652192014-06-20 08:28:44 -07005786#if defined(ANDROID_MULTI_SIM)
5787/**
5788 * RIL_Request Function pointer
5789 *
5790 * @param request is one of RIL_REQUEST_*
5791 * @param data is pointer to data defined for that RIL_REQUEST_*
5792 * data is owned by caller, and should not be modified or freed by callee
5793 * @param t should be used in subsequent call to RIL_onResponse
5794 * @param datalen the length of data
5795 *
5796 */
5797typedef void (*RIL_RequestFunc) (int request, void *data,
5798 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
5799
5800/**
5801 * This function should return the current radio state synchronously
5802 */
5803typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
5804
5805#else
5806/* Backward compatible */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005807
5808/**
5809 * RIL_Request Function pointer
5810 *
5811 * @param request is one of RIL_REQUEST_*
5812 * @param data is pointer to data defined for that RIL_REQUEST_*
5813 * data is owned by caller, and should not be modified or freed by callee
5814 * @param t should be used in subsequent call to RIL_onResponse
5815 * @param datalen the length of data
5816 *
5817 */
Wink Saville7f856802009-06-09 10:23:37 -07005818typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005819 size_t datalen, RIL_Token t);
5820
5821/**
5822 * This function should return the current radio state synchronously
5823 */
5824typedef RIL_RadioState (*RIL_RadioStateRequest)();
5825
Etan Cohend3652192014-06-20 08:28:44 -07005826#endif
5827
5828
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005829/**
5830 * This function returns "1" if the specified RIL_REQUEST code is
5831 * supported and 0 if it is not
5832 *
5833 * @param requestCode is one of RIL_REQUEST codes
5834 */
5835
5836typedef int (*RIL_Supports)(int requestCode);
5837
5838/**
Wink Saville7f856802009-06-09 10:23:37 -07005839 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005840 * thread that calls RIL_RequestFunc--and indicates that a pending
5841 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07005842 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005843 * On cancel, the callee should do its best to abandon the request and
5844 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
5845 *
5846 * Subsequent calls to RIL_onRequestComplete for this request with
5847 * other results will be tolerated but ignored. (That is, it is valid
5848 * to ignore the cancellation request)
5849 *
5850 * RIL_Cancel calls should return immediately, and not wait for cancellation
5851 *
Wink Saville7f856802009-06-09 10:23:37 -07005852 * 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 -08005853 * interface
5854 *
5855 * @param t token wants to be canceled
5856 */
5857
5858typedef void (*RIL_Cancel)(RIL_Token t);
5859
5860typedef void (*RIL_TimedCallback) (void *param);
5861
5862/**
5863 * Return a version string for your RIL implementation
5864 */
5865typedef const char * (*RIL_GetVersion) (void);
5866
5867typedef struct {
5868 int version; /* set to RIL_VERSION */
5869 RIL_RequestFunc onRequest;
5870 RIL_RadioStateRequest onStateRequest;
5871 RIL_Supports supports;
5872 RIL_Cancel onCancel;
5873 RIL_GetVersion getVersion;
5874} RIL_RadioFunctions;
5875
Sungmin Choi75697532013-04-26 15:04:45 -07005876typedef struct {
5877 char *apn;
5878 char *protocol;
5879 int authtype;
5880 char *username;
5881 char *password;
5882} RIL_InitialAttachApn;
5883
Amit Mahajan2b772032014-06-26 14:20:11 -07005884typedef struct {
5885 int authContext; /* P2 value of authentication command, see P2 parameter in
5886 3GPP TS 31.102 7.1.2 */
5887 char *authData; /* the challenge string in Base64 format, see 3GPP
5888 TS 31.102 7.1.2 */
5889 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
5890 NULL if no value. */
5891} RIL_SimAuthentication;
5892
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005893#ifdef RIL_SHLIB
5894struct RIL_Env {
5895 /**
5896 * "t" is parameter passed in on previous call to RIL_Notification
5897 * routine.
5898 *
5899 * If "e" != SUCCESS, then response can be null/is ignored
5900 *
Wink Saville7f856802009-06-09 10:23:37 -07005901 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005902 * freed by callee
5903 *
5904 * RIL_onRequestComplete will return as soon as possible
5905 */
Wink Saville7f856802009-06-09 10:23:37 -07005906 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005907 void *response, size_t responselen);
5908
Etan Cohend3652192014-06-20 08:28:44 -07005909#if defined(ANDROID_MULTI_SIM)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005910 /**
5911 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5912 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5913 *
5914 * "data" is owned by caller, and should not be modified or freed by callee
5915 */
Etan Cohend3652192014-06-20 08:28:44 -07005916 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
5917#else
5918 /**
5919 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5920 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5921 *
5922 * "data" is owned by caller, and should not be modified or freed by callee
5923 */
5924 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
5925#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005926 /**
Wink Saville7f856802009-06-09 10:23:37 -07005927 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005928 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
5929 * a relative time value at which the callback is invoked. If relativeTime is
5930 * NULL or points to a 0-filled structure, the callback will be invoked as
5931 * soon as possible
5932 */
5933
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07005934 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07005935 void *param, const struct timeval *relativeTime);
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005936 /**
5937 * "t" is parameter passed in on previous call RIL_Notification routine
5938 *
5939 * RIL_onRequestAck will be called by vendor when an Async RIL request was received
5940 * by them and an ack needs to be sent back to java ril.
5941 */
5942 void (*OnRequestAck) (RIL_Token t);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005943};
5944
5945
Wink Saville7f856802009-06-09 10:23:37 -07005946/**
5947 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005948 * argc and argv will be command line arguments intended for the RIL implementation
5949 * Return NULL on error
5950 *
5951 * @param env is environment point defined as RIL_Env
5952 * @param argc number of arguments
5953 * @param argv list fo arguments
5954 *
5955 */
5956const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
5957
Sanket Padawe1be49ba2016-03-31 17:37:23 -07005958/**
5959 * If BT SAP(SIM Access Profile) is supported, then RIL implementations must define RIL_SAP_Init
5960 * for initializing RIL_RadioFunctions used for BT SAP communcations. It is called whenever RILD
5961 * starts or modem restarts. Returns handlers for SAP related request that are made on SAP
5962 * sepecific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init
5963 * and used on the general RIL socket.
5964 * argc and argv will be command line arguments intended for the RIL implementation
5965 * Return NULL on error.
5966 *
5967 * @param env is environment point defined as RIL_Env
5968 * @param argc number of arguments
5969 * @param argv list fo arguments
5970 *
5971 */
5972const RIL_RadioFunctions *RIL_SAP_Init(const struct RIL_Env *env, int argc, char **argv);
5973
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005974#else /* RIL_SHLIB */
5975
5976/**
5977 * Call this once at startup to register notification routine
5978 *
5979 * @param callbacks user-specifed callback function
5980 */
5981void RIL_register (const RIL_RadioFunctions *callbacks);
5982
5983
5984/**
5985 *
5986 * RIL_onRequestComplete will return as soon as possible
5987 *
5988 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07005989 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005990 * @param e error code
5991 * if "e" != SUCCESS, then response can be null/is ignored
5992 * @param response is owned by caller, and should not be modified or
5993 * freed by callee
5994 * @param responselen the length of response in byte
5995 */
Wink Saville7f856802009-06-09 10:23:37 -07005996void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005997 void *response, size_t responselen);
5998
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005999/**
6000 * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and
6001 * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's
6002 * results, just that the command was received and will take a while. After sending this Ack
6003 * its vendor's responsibility to make sure that AP is up whenever needed while command is
6004 * being processed.
6005 *
6006 * @param t is parameter passed in on previous call to RIL_Notification
6007 * routine.
6008 */
6009void RIL_onRequestAck(RIL_Token t);
6010
Etan Cohend3652192014-06-20 08:28:44 -07006011#if defined(ANDROID_MULTI_SIM)
6012/**
6013 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6014 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6015 * "data" is owned by caller, and should not be modified or freed by callee
6016 * @param datalen the length of data in byte
6017 */
6018
6019void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
6020 size_t datalen, RIL_SOCKET_ID socket_id);
6021#else
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006022/**
6023 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6024 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6025 * "data" is owned by caller, and should not be modified or freed by callee
6026 * @param datalen the length of data in byte
6027 */
6028
Wink Saville7f856802009-06-09 10:23:37 -07006029void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006030 size_t datalen);
Etan Cohend3652192014-06-20 08:28:44 -07006031#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006032
6033/**
Wink Saville7f856802009-06-09 10:23:37 -07006034 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006035 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6036 * a relative time value at which the callback is invoked. If relativeTime is
6037 * NULL or points to a 0-filled structure, the callback will be invoked as
6038 * soon as possible
6039 *
6040 * @param callback user-specifed callback function
6041 * @param param parameter list
6042 * @param relativeTime a relative time value at which the callback is invoked
6043 */
6044
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07006045void RIL_requestTimedCallback (RIL_TimedCallback callback,
6046 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006047
Robert Greenwalt27e99c52016-06-01 16:31:38 -07006048typedef struct {
6049 int cid; /* Context ID, uniquely identifies this call */
6050 char *bearer_proto; /* One of the PDP_type values in TS 27.007 section 10.1.1.
6051 For example, "IP", "IPV6", "IPV4V6" */
6052 int pco_id; /* The protocol ID for this box. Note that only IDs from
6053 FF00H - FFFFH are accepted. If more than one is included
6054 from the network, multiple calls should be made to send all
6055 of them. */
6056 int contents_length; /* The number of octets in the contents. */
6057 char *contents; /* Carrier-defined content. It is binary, opaque and
6058 loosely defined in LTE Layer 3 spec 24.008 */
6059} RIL_PCO_Data;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006060
6061#endif /* RIL_SHLIB */
6062
6063#ifdef __cplusplus
6064}
6065#endif
6066
6067#endif /*ANDROID_RIL_H*/