blob: 6e7cab081830ea7c50f9c627f8903dbe0d920852 [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 RADIO_STATE_ON = 10 /* Radio is on */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800217} RIL_RadioState;
218
Wink Saville43808972011-01-13 17:39:51 -0800219typedef enum {
220 RADIO_TECH_UNKNOWN = 0,
221 RADIO_TECH_GPRS = 1,
222 RADIO_TECH_EDGE = 2,
223 RADIO_TECH_UMTS = 3,
224 RADIO_TECH_IS95A = 4,
225 RADIO_TECH_IS95B = 5,
226 RADIO_TECH_1xRTT = 6,
227 RADIO_TECH_EVDO_0 = 7,
228 RADIO_TECH_EVDO_A = 8,
229 RADIO_TECH_HSDPA = 9,
230 RADIO_TECH_HSUPA = 10,
231 RADIO_TECH_HSPA = 11,
232 RADIO_TECH_EVDO_B = 12,
233 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800234 RADIO_TECH_LTE = 14,
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800235 RADIO_TECH_HSPAP = 15, // HSPA+
Etan Cohend3652192014-06-20 08:28:44 -0700236 RADIO_TECH_GSM = 16, // Only supports voice
Yashdev Singh3c8f37c2015-02-23 13:04:28 -0800237 RADIO_TECH_TD_SCDMA = 17,
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700238 RADIO_TECH_IWLAN = 18,
239 RADIO_TECH_LTE_CA = 19
Wink Saville43808972011-01-13 17:39:51 -0800240} RIL_RadioTechnology;
241
Wink Saville8b4e4f72014-10-17 15:01:45 -0700242typedef enum {
243 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
244 RAF_GPRS = (1 << RADIO_TECH_GPRS),
245 RAF_EDGE = (1 << RADIO_TECH_EDGE),
246 RAF_UMTS = (1 << RADIO_TECH_UMTS),
247 RAF_IS95A = (1 << RADIO_TECH_IS95A),
248 RAF_IS95B = (1 << RADIO_TECH_IS95B),
249 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
250 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
251 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
252 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
253 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
254 RAF_HSPA = (1 << RADIO_TECH_HSPA),
255 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
256 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
257 RAF_LTE = (1 << RADIO_TECH_LTE),
258 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
259 RAF_GSM = (1 << RADIO_TECH_GSM),
260 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700261 RAF_LTE_CA = (1 << RADIO_TECH_LTE_CA)
Wink Saville8b4e4f72014-10-17 15:01:45 -0700262} RIL_RadioAccessFamily;
263
264typedef enum {
Nathan Harold92839f12016-02-12 10:02:28 -0800265 BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically)
266 BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
267 BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
268 BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000)
269 BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
270 BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
271 BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band)
272 BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band)
273 BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band)
274 BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band)
275 BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band)
276 BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band)
277 BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band)
278 BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band)
279 BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band)
280 BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band)
281 BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band)
282 BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band)
283 BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band)
284} RIL_RadioBandMode;
285
286typedef enum {
Wink Saville8b4e4f72014-10-17 15:01:45 -0700287 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
288 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
289 // forthcoming with these same parameters
290 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
291 // RIL_RadioCapability.status = 0, if any START's fail no
292 // APPLY will be sent
293 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
294 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
295 // occurs in any previous command the RIL_RadioAccessesFamily and
Legler Wu8caf06f2014-10-29 14:02:14 +0800296 // logicalModemUuid fields will be the prior configuration thus
Wink Saville8b4e4f72014-10-17 15:01:45 -0700297 // restoring the configuration to the previous value. An error
298 // returned by this command will generally be ignored or may
299 // cause that logical modem to be removed from service.
300} RadioCapabilityPhase;
301
302typedef enum {
303 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
304 // RC_PHASE_APPLY
305 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
306 // capability was success with RC_PHASE_FINISH
307 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
308 // capability is fail with RC_PHASE_FINISH.
309} RadioCapabilityStatus;
310
311#define RIL_RADIO_CAPABILITY_VERSION 1
312typedef struct {
Legler Wu8caf06f2014-10-29 14:02:14 +0800313 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
Wink Saville8b4e4f72014-10-17 15:01:45 -0700314 int session; // Unique session value defined by framework returned in all "responses/unsol"
315 int phase; // CONFIGURED, START, APPLY, FINISH
316 int rat; // RIL_RadioAccessFamily for the radio
317 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
318 int status; // Return status and an input parameter for RC_PHASE_FINISH
319} RIL_RadioCapability;
320
Wink Savillec0114b32011-02-18 10:14:07 -0800321// Do we want to split Data from Voice and the use
322// RIL_RadioTechnology for get/setPreferredVoice/Data ?
323typedef enum {
324 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
325 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
326 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
327 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
328 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
329 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
330 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
331 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
332 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
333 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
334 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
Uma Maheswari Ramalingam0e094872011-09-28 13:25:48 -0700335 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
336 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
Wink Savillec0114b32011-02-18 10:14:07 -0800337} RIL_PreferredNetworkType;
338
339/* Source for cdma subscription */
340typedef enum {
341 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
342 CDMA_SUBSCRIPTION_SOURCE_NV = 1
343} RIL_CdmaSubscriptionSource;
344
Wink Saville74fa3882009-12-22 15:35:41 -0800345/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
346typedef enum {
347 RIL_UUS_TYPE1_IMPLICIT = 0,
348 RIL_UUS_TYPE1_REQUIRED = 1,
349 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
350 RIL_UUS_TYPE2_REQUIRED = 3,
351 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
352 RIL_UUS_TYPE3_REQUIRED = 5,
353 RIL_UUS_TYPE3_NOT_REQUIRED = 6
354} RIL_UUS_Type;
355
356/* User-to-User Signaling Information data coding schemes. Possible values for
357 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
358 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
359typedef enum {
360 RIL_UUS_DCS_USP = 0, /* User specified protocol */
361 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
362 RIL_UUS_DCS_X244 = 2, /* X.244 */
363 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
364 convergence function */
365 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
366} RIL_UUS_DCS;
367
368/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
369 * This data is passed in RIL_ExtensionRecord and rec contains this
370 * structure when type is RIL_UUS_INFO_EXT_REC */
371typedef struct {
372 RIL_UUS_Type uusType; /* UUS Type */
373 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
374 int uusLength; /* Length of UUS Data */
375 char * uusData; /* UUS Data */
376} RIL_UUS_Info;
377
378/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700379typedef struct {
380 char isPresent; /* non-zero if signal information record is present */
381 char signalType; /* as defined 3.7.5.5-1 */
382 char alertPitch; /* as defined 3.7.5.5-2 */
383 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
384} RIL_CDMA_SignalInfoRecord;
385
Wink Saville1b5fd232009-04-22 14:50:00 -0700386typedef struct {
387 RIL_CallState state;
388 int index; /* Connection Index for use with, eg, AT+CHLD */
389 int toa; /* type of address, eg 145 = intl */
390 char isMpty; /* nonzero if is mpty call */
391 char isMT; /* nonzero if call is mobile terminated */
392 char als; /* ALS line indicator if available
393 (0 = line 1) */
394 char isVoice; /* nonzero if this is is a voice call */
395 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
396 char * number; /* Remote party number */
397 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
398 char * name; /* Remote party name */
399 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800400 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800401} RIL_Call;
402
Wink Savillec0114b32011-02-18 10:14:07 -0800403/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800404typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800405 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700406 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700407 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
408 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800409 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800410 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
411} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800412
413/*
414 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
415 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
416 */
417typedef struct {
418 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500419 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
420 back-off timer value RIL wants to override the one
421 pre-configured in FW.
422 The unit is miliseconds.
423 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700424 The value 0 means retry should be done ASAP.
Wink Saville8a9e0212013-04-09 12:11:38 -0700425 The value of INT_MAX(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800426 int cid; /* Context ID, uniquely identifies this call */
427 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
428 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
429 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
430 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
431 such as "IP" or "IPV6" */
432 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800433 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
434 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800435 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800436 one of each. If the prefix length is absent the addresses
437 are assumed to be point to point with IPv4 having a prefix
438 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800439 char * dnses; /* A space-delimited list of DNS server addresses,
440 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
441 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800442 char * gateways; /* A space-delimited list of default gateway addresses,
443 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
444 May be empty in which case the addresses represent point
445 to point connections. */
446} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800447
Etan Cohend3652192014-06-20 08:28:44 -0700448typedef struct {
449 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
450 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
451 back-off timer value RIL wants to override the one
452 pre-configured in FW.
453 The unit is miliseconds.
454 The value < 0 means no value is suggested.
455 The value 0 means retry should be done ASAP.
456 The value of INT_MAX(0x7fffffff) means no retry. */
457 int cid; /* Context ID, uniquely identifies this call */
458 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
459 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
460 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
461 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
462 such as "IP" or "IPV6" */
463 char * ifname; /* The network interface name */
464 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
465 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
466 May not be empty, typically 1 IPv4 or 1 IPv6 or
467 one of each. If the prefix length is absent the addresses
468 are assumed to be point to point with IPv4 having a prefix
469 length of 32 and IPv6 128. */
470 char * dnses; /* A space-delimited list of DNS server addresses,
471 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
472 May be empty. */
473 char * gateways; /* A space-delimited list of default gateway addresses,
474 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
475 May be empty in which case the addresses represent point
476 to point connections. */
477 char * pcscf; /* the Proxy Call State Control Function address
478 via PCO(Protocol Configuration Option) for IMS client. */
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -0700479} RIL_Data_Call_Response_v9;
480
481typedef struct {
482 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
483 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
484 back-off timer value RIL wants to override the one
485 pre-configured in FW.
486 The unit is miliseconds.
487 The value < 0 means no value is suggested.
488 The value 0 means retry should be done ASAP.
489 The value of INT_MAX(0x7fffffff) means no retry. */
490 int cid; /* Context ID, uniquely identifies this call */
491 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
492 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
493 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
494 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
495 such as "IP" or "IPV6" */
496 char * ifname; /* The network interface name */
497 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
498 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
499 May not be empty, typically 1 IPv4 or 1 IPv6 or
500 one of each. If the prefix length is absent the addresses
501 are assumed to be point to point with IPv4 having a prefix
502 length of 32 and IPv6 128. */
503 char * dnses; /* A space-delimited list of DNS server addresses,
504 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
505 May be empty. */
506 char * gateways; /* A space-delimited list of default gateway addresses,
507 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
508 May be empty in which case the addresses represent point
509 to point connections. */
510 char * pcscf; /* the Proxy Call State Control Function address
511 via PCO(Protocol Configuration Option) for IMS client. */
512 int mtu; /* MTU received from network
513 Value <= 0 means network has either not sent a value or
514 sent an invalid value */
515} RIL_Data_Call_Response_v11;
Etan Cohend3652192014-06-20 08:28:44 -0700516
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700517typedef enum {
518 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
519 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
520} RIL_RadioTechnologyFamily;
521
522typedef struct {
523 RIL_RadioTechnologyFamily tech;
524 unsigned char retry; /* 0 == not retry, nonzero == retry */
525 int messageRef; /* Valid field if retry is set to nonzero.
526 Contains messageRef from RIL_SMS_Response
527 corresponding to failed MO SMS.
528 */
529
530 union {
531 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
532 RIL_CDMA_SMS_Message* cdmaMessage;
533
534 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
Sanket Padawe05c23072016-08-08 15:42:17 -0700535 char** gsmMessage; /* This is an array of pointers where pointers
536 are contiguous but elements pointed by those pointers
537 are not contiguous
538 */
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700539 } message;
540} RIL_IMS_SMS_Message;
541
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800542typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800543 int messageRef; /* TP-Message-Reference for GSM,
544 and BearerData MessageId for CDMA
545 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800546 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700547 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
548 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
549 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800550} RIL_SMS_Response;
551
552/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
553typedef struct {
554 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
555 /* 0 = "REC UNREAD" */
556 /* 1 = "REC READ" */
557 /* 2 = "STO UNSENT" */
558 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700559 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
560 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800561 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
562 (as expected by TS 27.005) or NULL for default SMSC */
563} RIL_SMS_WriteArgs;
564
565/** Used by RIL_REQUEST_DIAL */
566typedef struct {
567 char * address;
568 int clir;
569 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
570 * clir == 0 on "use subscription default value"
571 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
572 * clir == 2 on "CLIR suppression" (allow CLI presentation)
573 */
Wink Saville74fa3882009-12-22 15:35:41 -0800574 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800575} RIL_Dial;
576
577typedef struct {
578 int command; /* one of the commands listed for TS 27.007 +CRSM*/
579 int fileid; /* EF id */
580 char *path; /* "pathid" from TS 27.007 +CRSM command.
581 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700582 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800583 */
584 int p1;
585 int p2;
586 int p3;
587 char *data; /* May be NULL*/
588 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800589} RIL_SIM_IO_v5;
590
591typedef struct {
592 int command; /* one of the commands listed for TS 27.007 +CRSM*/
593 int fileid; /* EF id */
594 char *path; /* "pathid" from TS 27.007 +CRSM command.
595 Path is in hex asciii format eg "7f205f70"
596 Path must always be provided.
597 */
598 int p1;
599 int p2;
600 int p3;
601 char *data; /* May be NULL*/
602 char *pin2; /* May be NULL*/
603 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
604} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800605
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800606/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
607 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
608typedef struct {
609 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
610 ignored for +CSIM command. */
611
612 /* Following fields are used to derive the APDU ("command" and "length"
613 values in TS 27.007 +CSIM and +CGLA commands). */
614 int cla;
615 int instruction;
616 int p1;
617 int p2;
618 int p3; /* A negative P3 implies a 4 byte APDU. */
619 char *data; /* May be NULL. In hex string format. */
620} RIL_SIM_APDU;
621
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800622typedef struct {
623 int sw1;
624 int sw2;
Amit Mahajan2875bc22014-08-06 10:03:15 -0700625 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
626 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 -0800627} RIL_SIM_IO_Response;
628
629/* See also com.android.internal.telephony.gsm.CallForwardInfo */
630
631typedef struct {
632 int status; /*
633 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
634 * status 1 = active, 0 = not active
635 *
636 * For RIL_REQUEST_SET_CALL_FORWARD:
637 * status is:
638 * 0 = disable
639 * 1 = enable
640 * 2 = interrogate
641 * 3 = registeration
642 * 4 = erasure
643 */
644
Wink Saville3d54e742009-05-18 18:00:44 -0700645 int reason; /* from TS 27.007 7.11 "reason" */
646 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
647 See table for Android mapping from
648 MMI service code
649 0 means user doesn't input class */
650 int toa; /* "type" from TS 27.007 7.11 */
651 char * number; /* "number" from TS 27.007 7.11. May be NULL */
652 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800653}RIL_CallForwardInfo;
654
655typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700656 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
657 * Upper 16 bits is LAC and lower 16 bits
658 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800659 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700660 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700661 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800662 */
johnwange0ba6a92009-09-11 19:14:52 -0700663 int rssi; /* Received RSSI in GSM,
664 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800665 */
666} RIL_NeighboringCell;
667
fengluf7408292015-04-14 14:53:55 -0700668typedef struct {
669 char lce_status; /* LCE service status:
670 * -1 = not supported;
671 * 0 = stopped;
672 * 1 = active.
673 */
674 unsigned int actual_interval_ms; /* actual LCE reporting interval,
675 * meaningful only if LCEStatus = 1.
676 */
677} RIL_LceStatusInfo;
678
679typedef struct {
fenglu290add32015-05-01 17:05:15 -0700680 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
fengluf7408292015-04-14 14:53:55 -0700681 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
682 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
683 * moves to inactive state or network type change)
684 * 1 = suspended;
685 * 0 = not suspended.
686 */
687} RIL_LceDataInfo;
688
Meng Wangb4e34312016-05-12 14:54:36 -0700689typedef enum {
690 RIL_MATCH_ALL = 0, /* Apply to all carriers with the same mcc/mnc */
691 RIL_MATCH_SPN = 1, /* Use SPN and mcc/mnc to identify the carrier */
692 RIL_MATCH_IMSI_PREFIX = 2, /* Use IMSI prefix and mcc/mnc to identify the carrier */
693 RIL_MATCH_GID1 = 3, /* Use GID1 and mcc/mnc to identify the carrier */
694 RIL_MATCH_GID2 = 4, /* Use GID2 and mcc/mnc to identify the carrier */
695} RIL_CarrierMatchType;
696
697typedef struct {
698 const char * mcc;
699 const char * mnc;
700 RIL_CarrierMatchType match_type; /* Specify match type for the carrier.
701 * If it’s RIL_MATCH_ALL, match_data is null;
702 * otherwise, match_data is the value for the match type.
703 */
704 const char * match_data;
705} RIL_Carrier;
706
707typedef struct {
708 int32_t len_allowed_carriers; /* length of array allowed_carriers */
709 int32_t len_excluded_carriers; /* length of array excluded_carriers */
710 RIL_Carrier * allowed_carriers; /* whitelist for allowed carriers */
711 RIL_Carrier * excluded_carriers; /* blacklist for explicitly excluded carriers
712 * which match allowed_carriers. Eg. allowed_carriers match
713 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1
714 * is ABCD. It means except the carrier whose gid1 is ABCD,
715 * all carriers with the same mcc/mnc are allowed.
716 */
717} RIL_CarrierRestrictions;
718
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800719/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
720typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700721 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800722 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
723 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
724 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800725 CALL_FAIL_NORMAL = 16,
726 CALL_FAIL_BUSY = 17,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800727 CALL_FAIL_NO_USER_RESPONDING = 18,
728 CALL_FAIL_NO_ANSWER_FROM_USER = 19,
729 CALL_FAIL_CALL_REJECTED = 21,
730 CALL_FAIL_NUMBER_CHANGED = 22,
731 CALL_FAIL_PREEMPTION = 25,
732 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
733 CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
734 CALL_FAIL_FACILITY_REJECTED = 29,
735 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
736 CALL_FAIL_NORMAL_UNSPECIFIED = 31,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800737 CALL_FAIL_CONGESTION = 34,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800738 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
739 CALL_FAIL_TEMPORARY_FAILURE = 41,
740 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
741 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
742 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
743 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
744 CALL_FAIL_QOS_UNAVAILABLE = 49,
745 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
746 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
747 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
748 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
749 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
750 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800751 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800752 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
753 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
754 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
755 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
756 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
757 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
758 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
759 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
760 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
761 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
762 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
763 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
764 CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
765 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
766 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
767 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
768 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800769 CALL_FAIL_CALL_BARRED = 240,
770 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700771 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
772 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Amit Mahajan54563d32014-11-22 00:54:49 +0000773 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
774 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
775 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
Wink Saville1b5fd232009-04-22 14:50:00 -0700776 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
777 CALL_FAIL_CDMA_DROP = 1001,
778 CALL_FAIL_CDMA_INTERCEPT = 1002,
779 CALL_FAIL_CDMA_REORDER = 1003,
780 CALL_FAIL_CDMA_SO_REJECT = 1004,
781 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
782 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
783 CALL_FAIL_CDMA_PREEMPTED = 1007,
784 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
785 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700786 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800787 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
788 vendor code should make sure to map error
789 code to specific error */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800790} RIL_LastCallFailCause;
791
Chao Liu548a81e2015-05-14 16:13:46 -0700792typedef struct {
793 RIL_LastCallFailCause cause_code;
794 char * vendor_cause;
795} RIL_LastCallFailCauseInfo;
796
Wink Savillef4c4d362009-04-02 01:37:03 -0700797/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800798typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800799 PDP_FAIL_NONE = 0, /* No error, connection ok */
800
801 /* an integer cause code defined in TS 24.008
802 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
803 If the implementation does not have access to the exact cause codes,
804 then it should return one of the following values,
805 as the UI layer needs to distinguish these
806 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700807 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
Sanket Padaweac308b92016-01-07 14:41:17 -0800808 PDP_FAIL_NAS_SIGNALLING = 0x0E,
809 PDP_FAIL_LLC_SNDCP = 0x19,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700810 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
811 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
812 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
813 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
814 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
815 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
816 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
817 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
818 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800819 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
Hui Wang11e8b232014-09-19 16:40:17 -0500820 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
821 based on framework config */
Sanket Padaweac308b92016-01-07 14:41:17 -0800822 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
823 PDP_FAIL_NETWORK_FAILURE = 0x26,
824 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
825 PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
826 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
827 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
828 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
829 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
830 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
831 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
Wink Saville43808972011-01-13 17:39:51 -0800832 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
833 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
834 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Sanket Padaweac308b92016-01-07 14:41:17 -0800835 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
836 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
837 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
838 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
839 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
840 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
841 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
842 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
843 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
844 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
845 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
846 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
847 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
848 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
849 PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
850 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
851 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
852 PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
853 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
854 PDP_FAIL_IFACE_MISMATCH = 0x75,
855 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
856 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
857 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
858 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
859 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
Wink Saville43808972011-01-13 17:39:51 -0800860
Sanket Padawe0106aed2016-02-09 09:56:31 -0800861 // OEM specific error codes. To be used by OEMs when they don't want to
862 // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
863 PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001,
864 PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002,
865 PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003,
866 PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004,
867 PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005,
868 PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006,
869 PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007,
870 PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008,
871 PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009,
872 PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A,
873 PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B,
874 PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C,
875 PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D,
876 PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E,
877 PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F,
878
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700879 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800880 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
881 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800882
883 /* reasons for data call drop - network/modem disconnect */
Wink Saville3492c6e2013-10-03 13:53:27 -0700884 PDP_FAIL_SIGNAL_LOST = -3,
Wink Saville43808972011-01-13 17:39:51 -0800885 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
886 with parameters appropriate for new technology */
887 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
888 powered off - no retry */
889 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
890 mode was up on same APN/data profile - no retry until
891 tethered call is off */
892
Sanket Padaweac308b92016-01-07 14:41:17 -0800893 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
894 new error codes are added making this unnecessary */
Wink Saville43808972011-01-13 17:39:51 -0800895} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800896
jsh602f80f2009-07-10 15:44:37 -0700897/* See RIL_REQUEST_SETUP_DATA_CALL */
898typedef enum {
899 RIL_DATA_PROFILE_DEFAULT = 0,
900 RIL_DATA_PROFILE_TETHERED = 1,
Hui Wang8d679622014-10-16 14:59:27 -0500901 RIL_DATA_PROFILE_IMS = 2,
902 RIL_DATA_PROFILE_FOTA = 3,
903 RIL_DATA_PROFILE_CBS = 4,
904 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
905 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
jsh602f80f2009-07-10 15:44:37 -0700906} RIL_DataProfile;
907
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800908/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
909typedef struct {
910 int notificationType; /*
911 * 0 = MO intermediate result code
912 * 1 = MT unsolicited result code
913 */
914 int code; /* See 27.007 7.17
915 "code1" for MO
916 "code2" for MT. */
917 int index; /* CUG index. See 27.007 7.17. */
918 int type; /* "type" from 27.007 7.17 (MT only). */
919 char * number; /* "number" from 27.007 7.17
920 (MT only, may be NULL). */
921} RIL_SuppSvcNotification;
922
Wink Savillef4c4d362009-04-02 01:37:03 -0700923#define RIL_CARD_MAX_APPS 8
924
925typedef enum {
Meng Wangb4e34312016-05-12 14:54:36 -0700926 RIL_CARDSTATE_ABSENT = 0,
927 RIL_CARDSTATE_PRESENT = 1,
928 RIL_CARDSTATE_ERROR = 2,
929 RIL_CARDSTATE_RESTRICTED = 3 /* card is present but not usable due to carrier restrictions.*/
Wink Savillef4c4d362009-04-02 01:37:03 -0700930} RIL_CardState;
931
932typedef enum {
933 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
934 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700935 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
936 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700937 involved */
938 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
939 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
940 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
941 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
942 RIL_PERSOSUBSTATE_SIM_SIM = 7,
943 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
944 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
945 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
946 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
947 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
948 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
949 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
950 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
951 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
952 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
953 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
954 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
955 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
956 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
957 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
958 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
959 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
960} RIL_PersoSubstate;
961
962typedef enum {
963 RIL_APPSTATE_UNKNOWN = 0,
964 RIL_APPSTATE_DETECTED = 1,
965 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
966 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700967 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700968 when app_state is assigned to this value */
969 RIL_APPSTATE_READY = 5
970} RIL_AppState;
971
972typedef enum {
973 RIL_PINSTATE_UNKNOWN = 0,
974 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
975 RIL_PINSTATE_ENABLED_VERIFIED = 2,
976 RIL_PINSTATE_DISABLED = 3,
977 RIL_PINSTATE_ENABLED_BLOCKED = 4,
978 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
979} RIL_PinState;
980
981typedef enum {
982 RIL_APPTYPE_UNKNOWN = 0,
983 RIL_APPTYPE_SIM = 1,
984 RIL_APPTYPE_USIM = 2,
985 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -0800986 RIL_APPTYPE_CSIM = 4,
987 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -0700988} RIL_AppType;
989
990typedef struct
991{
Wink Saville7f856802009-06-09 10:23:37 -0700992 RIL_AppType app_type;
993 RIL_AppState app_state;
994 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -0700995 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -0700996 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -0700997 0x30, 0x30, 0x30 */
998 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -0800999 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -07001000 RIL_PinState pin1;
1001 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -07001002} RIL_AppStatus;
1003
Wink Savillec0114b32011-02-18 10:14:07 -08001004/* Deprecated, use RIL_CardStatus_v6 */
1005typedef struct
1006{
1007 RIL_CardState card_state;
1008 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
1009 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1010 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1011 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1012 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
1013} RIL_CardStatus_v5;
1014
Wink Savillef4c4d362009-04-02 01:37:03 -07001015typedef struct
1016{
Wink Saville7f856802009-06-09 10:23:37 -07001017 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -07001018 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -08001019 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1020 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1021 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -07001022 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1023 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -08001024} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -07001025
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001026/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
1027 * or as part of RIL_SimRefreshResponse_v7
1028 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001029typedef enum {
1030 /* A file on SIM has been updated. data[1] contains the EFID. */
1031 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001032 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001033 SIM_INIT = 1,
1034 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
1035 SIM_RESET = 2
1036} RIL_SimRefreshResult;
1037
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001038typedef struct {
1039 RIL_SimRefreshResult result;
1040 int ef_id; /* is the EFID of the updated file if the result is */
1041 /* SIM_FILE_UPDATE or 0 for any other result. */
1042 char * aid; /* is AID(application ID) of the card application */
1043 /* See ETSI 102.221 8.1 and 101.220 4 */
1044 /* For SIM_FILE_UPDATE result it can be set to AID of */
1045 /* application in which updated EF resides or it can be */
1046 /* NULL if EF is outside of an application. */
1047 /* For SIM_INIT result this field is set to AID of */
1048 /* application that caused REFRESH */
1049 /* For SIM_RESET result it is NULL. */
1050} RIL_SimRefreshResponse_v7;
1051
Wink Savillec0114b32011-02-18 10:14:07 -08001052/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
1053typedef struct {
1054 char * number; /* Remote party number */
1055 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1056 char * name; /* Remote party name */
1057 RIL_CDMA_SignalInfoRecord signalInfoRecord;
1058} RIL_CDMA_CallWaiting_v5;
1059
Wink Saville1b5fd232009-04-22 14:50:00 -07001060typedef struct {
1061 char * number; /* Remote party number */
1062 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1063 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -07001064 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -08001065 /* Number type/Number plan required to support International Call Waiting */
1066 int number_type; /* 0=Unknown, 1=International, 2=National,
1067 3=Network specific, 4=subscriber */
1068 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
1069} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001070
Wink Savillea592eeb2009-05-22 13:26:36 -07001071/**
1072 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
1073 *
1074 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
1075 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
1076 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
1077 * CBM message ID.
1078 *
1079 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
1080 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
1081 * and 9.4.4.2.3 for UMTS.
1082 * All other values can be treated as empty CBM data coding scheme.
1083 *
1084 * selected 0 means message types specified in <fromServiceId, toServiceId>
1085 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
1086 *
1087 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
1088 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
1089 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001090typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -07001091 int fromServiceId;
1092 int toServiceId;
1093 int fromCodeScheme;
1094 int toCodeScheme;
1095 unsigned char selected;
1096} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -07001097
The Android Open Source Project34a51082009-03-05 14:34:37 -08001098/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
1099#define RIL_RESTRICTED_STATE_NONE 0x00
1100/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
1101#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
1102/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
1103#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -07001104/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -08001105#define RIL_RESTRICTED_STATE_CS_ALL 0x04
1106/* Block packet data access due to restriction. */
1107#define RIL_RESTRICTED_STATE_PS_ALL 0x10
1108
Wink Saville1b5fd232009-04-22 14:50:00 -07001109/* The status for an OTASP/OTAPA session */
1110typedef enum {
1111 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
1112 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
1113 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
1114 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
1115 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
1116 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
1117 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
1118 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
1119 CDMA_OTA_PROVISION_STATUS_COMMITTED,
1120 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
1121 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
1122 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
1123} RIL_CDMA_OTA_ProvisionStatus;
1124
1125typedef struct {
1126 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1127 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1128} RIL_GW_SignalStrength;
1129
Wink Savillec57b3eb2013-04-17 12:51:41 -07001130typedef struct {
1131 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1132 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001133 int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us.
1134 * INT_MAX denotes invalid value */
1135} RIL_GSM_SignalStrength_v12;
1136
1137typedef struct {
1138 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1139 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Wink Savillec57b3eb2013-04-17 12:51:41 -07001140} RIL_SignalStrengthWcdma;
Wink Saville1b5fd232009-04-22 14:50:00 -07001141
1142typedef struct {
1143 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1144 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1145 * value will be 75.
1146 */
1147 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1148 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1149 * will be 125.
1150 */
1151} RIL_CDMA_SignalStrength;
1152
1153
1154typedef struct {
1155 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1156 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1157 * value will be 75.
1158 */
1159 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1160 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1161 * will be 125.
1162 */
1163 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
1164} RIL_EVDO_SignalStrength;
1165
Wink Savillec0114b32011-02-18 10:14:07 -08001166typedef struct {
1167 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -07001168 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1169 * Range: 44 to 140 dBm
1170 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1171 * Reference: 3GPP TS 36.133 9.1.4 */
1172 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1173 * Range: 20 to 3 dB.
1174 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1175 * Reference: 3GPP TS 36.133 9.1.7 */
1176 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1177 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1178 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1179 * Reference: 3GPP TS 36.101 8.1.1 */
1180 int cqi; /* The current Channel Quality Indicator.
1181 * Range: 0 to 15.
1182 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1183 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -08001184} RIL_LTE_SignalStrength;
1185
Wink Saville8a9e0212013-04-09 12:11:38 -07001186typedef struct {
1187 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1188 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1189 * Range: 44 to 140 dBm
1190 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1191 * Reference: 3GPP TS 36.133 9.1.4 */
1192 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1193 * Range: 20 to 3 dB.
1194 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1195 * Reference: 3GPP TS 36.133 9.1.7 */
1196 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1197 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1198 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1199 * Reference: 3GPP TS 36.101 8.1.1 */
1200 int cqi; /* The current Channel Quality Indicator.
1201 * Range: 0 to 15.
1202 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1203 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1204 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
1205 * Approximate distance can be calculated using 300m/us * timingAdvance.
1206 * Range: 0 to 0x7FFFFFFE
1207 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1208 * Reference: 3GPP 36.321 section 6.1.3.5
1209 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1210} RIL_LTE_SignalStrength_v8;
1211
Etan Cohend3652192014-06-20 08:28:44 -07001212typedef struct {
1213 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
1214 * Range : 25 to 120
1215 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1216 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1217} RIL_TD_SCDMA_SignalStrength;
1218
Wink Savillec0114b32011-02-18 10:14:07 -08001219/* Deprecated, use RIL_SignalStrength_v6 */
1220typedef struct {
1221 RIL_GW_SignalStrength GW_SignalStrength;
1222 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1223 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1224} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -07001225
1226typedef struct {
1227 RIL_GW_SignalStrength GW_SignalStrength;
1228 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1229 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -08001230 RIL_LTE_SignalStrength LTE_SignalStrength;
1231} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001232
Wink Saville8a9e0212013-04-09 12:11:38 -07001233typedef struct {
1234 RIL_GW_SignalStrength GW_SignalStrength;
1235 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1236 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1237 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1238} RIL_SignalStrength_v8;
1239
Etan Cohend3652192014-06-20 08:28:44 -07001240typedef struct {
1241 RIL_GW_SignalStrength GW_SignalStrength;
1242 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1243 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1244 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1245 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1246} RIL_SignalStrength_v10;
1247
Wink Saville8a9e0212013-04-09 12:11:38 -07001248typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001249 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1250 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1251 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1252 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 -07001253} RIL_CellIdentityGsm;
1254
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001255typedef struct {
1256 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1257 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1258 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1259 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
1260 int arfcn; /* 16-bit GSM Absolute RF channel number, INT_MAX if unknown */
Nathan Haroldf3769da2016-05-05 12:19:39 -07001261 uint8_t bsic;/* 6-bit Base Station Identity Code, 0xFF if unknown */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001262} RIL_CellIdentityGsm_v12;
1263
Wink Savillec57b3eb2013-04-17 12:51:41 -07001264typedef struct {
1265 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1266 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1267 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1268 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1269 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1270} RIL_CellIdentityWcdma;
1271
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001272typedef struct {
1273 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1274 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1275 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1276 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1277 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1278 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number, INT_MAX if unknown */
1279} RIL_CellIdentityWcdma_v12;
1280
Wink Saville8a9e0212013-04-09 12:11:38 -07001281typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001282 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1283 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1284 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001285 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1286 * It is represented in units of 0.25 seconds and ranges from -2592000
1287 * to 2592000, both values inclusive (corresponding to a range of -180
Wink Savillec57b3eb2013-04-17 12:51:41 -07001288 * to +180 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001289
1290 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1291 * It is represented in units of 0.25 seconds and ranges from -1296000
1292 * to 1296000, both values inclusive (corresponding to a range of -90
Wink Savillec57b3eb2013-04-17 12:51:41 -07001293 * to +90 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001294} RIL_CellIdentityCdma;
1295
Wink Saville8a9e0212013-04-09 12:11:38 -07001296typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001297 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1298 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1299 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1300 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1301 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001302} RIL_CellIdentityLte;
1303
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001304typedef struct {
1305 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1306 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1307 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1308 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1309 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1310 int earfcn; /* 18-bit LTE Absolute RC Channel Number, INT_MAX if unknown */
1311} RIL_CellIdentityLte_v12;
1312
Etan Cohend3652192014-06-20 08:28:44 -07001313typedef struct {
1314 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1315 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1316 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1317 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1318 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1319} RIL_CellIdentityTdscdma;
1320
Wink Saville8a9e0212013-04-09 12:11:38 -07001321typedef struct {
1322 RIL_CellIdentityGsm cellIdentityGsm;
1323 RIL_GW_SignalStrength signalStrengthGsm;
1324} RIL_CellInfoGsm;
1325
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001326typedef struct {
1327 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1328 RIL_GSM_SignalStrength_v12 signalStrengthGsm;
1329} RIL_CellInfoGsm_v12;
1330
Wink Savillec57b3eb2013-04-17 12:51:41 -07001331typedef struct {
1332 RIL_CellIdentityWcdma cellIdentityWcdma;
1333 RIL_SignalStrengthWcdma signalStrengthWcdma;
1334} RIL_CellInfoWcdma;
1335
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001336typedef struct {
1337 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1338 RIL_SignalStrengthWcdma signalStrengthWcdma;
1339} RIL_CellInfoWcdma_v12;
1340
Wink Saville8a9e0212013-04-09 12:11:38 -07001341typedef struct {
1342 RIL_CellIdentityCdma cellIdentityCdma;
1343 RIL_CDMA_SignalStrength signalStrengthCdma;
1344 RIL_EVDO_SignalStrength signalStrengthEvdo;
1345} RIL_CellInfoCdma;
1346
Wink Saville8a9e0212013-04-09 12:11:38 -07001347typedef struct {
1348 RIL_CellIdentityLte cellIdentityLte;
1349 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1350} RIL_CellInfoLte;
1351
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001352typedef struct {
1353 RIL_CellIdentityLte_v12 cellIdentityLte;
1354 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1355} RIL_CellInfoLte_v12;
1356
Etan Cohend3652192014-06-20 08:28:44 -07001357typedef struct {
1358 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1359 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1360} RIL_CellInfoTdscdma;
1361
Wink Saville8a9e0212013-04-09 12:11:38 -07001362// Must be the same as CellInfo.TYPE_XXX
1363typedef enum {
1364 RIL_CELL_INFO_TYPE_GSM = 1,
1365 RIL_CELL_INFO_TYPE_CDMA = 2,
1366 RIL_CELL_INFO_TYPE_LTE = 3,
Wink Savillec57b3eb2013-04-17 12:51:41 -07001367 RIL_CELL_INFO_TYPE_WCDMA = 4,
Etan Cohend3652192014-06-20 08:28:44 -07001368 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
Wink Saville8a9e0212013-04-09 12:11:38 -07001369} RIL_CellInfoType;
1370
1371// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1372typedef enum {
1373 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1374 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1375 RIL_TIMESTAMP_TYPE_MODEM = 2,
1376 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1377 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1378} RIL_TimeStampType;
1379
1380typedef struct {
1381 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1382 int registered; /* !0 if this cell is registered 0 if not registered */
1383 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1384 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1385 union {
1386 RIL_CellInfoGsm gsm;
1387 RIL_CellInfoCdma cdma;
1388 RIL_CellInfoLte lte;
Wink Savillec57b3eb2013-04-17 12:51:41 -07001389 RIL_CellInfoWcdma wcdma;
Etan Cohend3652192014-06-20 08:28:44 -07001390 RIL_CellInfoTdscdma tdscdma;
Wink Saville8a9e0212013-04-09 12:11:38 -07001391 } CellInfo;
1392} RIL_CellInfo;
1393
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001394typedef struct {
1395 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1396 int registered; /* !0 if this cell is registered 0 if not registered */
1397 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1398 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1399 union {
1400 RIL_CellInfoGsm_v12 gsm;
1401 RIL_CellInfoCdma cdma;
1402 RIL_CellInfoLte_v12 lte;
1403 RIL_CellInfoWcdma_v12 wcdma;
1404 RIL_CellInfoTdscdma tdscdma;
1405 } CellInfo;
1406} RIL_CellInfo_v12;
1407
Wink Saville1b5fd232009-04-22 14:50:00 -07001408/* Names of the CDMA info records (C.S0005 section 3.7.5) */
1409typedef enum {
1410 RIL_CDMA_DISPLAY_INFO_REC,
1411 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1412 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1413 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1414 RIL_CDMA_SIGNAL_INFO_REC,
1415 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1416 RIL_CDMA_LINE_CONTROL_INFO_REC,
1417 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1418 RIL_CDMA_T53_CLIR_INFO_REC,
1419 RIL_CDMA_T53_RELEASE_INFO_REC,
1420 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1421} RIL_CDMA_InfoRecName;
1422
1423/* Display Info Rec as defined in C.S0005 section 3.7.5.1
1424 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1425 Note: the Extended Display info rec contains multiple records of the
1426 form: display_tag, display_len, and display_len occurrences of the
1427 chari field if the display_tag is not 10000000 or 10000001.
1428 To save space, the records are stored consecutively in a byte buffer.
1429 The display_tag, display_len and chari fields are all 1 byte.
1430*/
1431
1432typedef struct {
1433 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001434 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001435} RIL_CDMA_DisplayInfoRecord;
1436
1437/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1438 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1439 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1440*/
1441
1442typedef struct {
1443 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001444 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001445 char number_type;
1446 char number_plan;
1447 char pi;
1448 char si;
1449} RIL_CDMA_NumberInfoRecord;
1450
1451/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1452typedef enum {
1453 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1454 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1455 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1456 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1457 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1458 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1459 RIL_REDIRECTING_REASON_RESERVED
1460} RIL_CDMA_RedirectingReason;
1461
1462typedef struct {
1463 RIL_CDMA_NumberInfoRecord redirectingNumber;
1464 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1465 RIL_CDMA_RedirectingReason redirectingReason;
1466} RIL_CDMA_RedirectingNumberInfoRecord;
1467
1468/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1469typedef struct {
1470 char lineCtrlPolarityIncluded;
1471 char lineCtrlToggle;
1472 char lineCtrlReverse;
1473 char lineCtrlPowerDenial;
1474} RIL_CDMA_LineControlInfoRecord;
1475
1476/* T53 CLIR Information Record */
1477typedef struct {
1478 char cause;
1479} RIL_CDMA_T53_CLIRInfoRecord;
1480
1481/* T53 Audio Control Information Record */
1482typedef struct {
1483 char upLink;
1484 char downLink;
1485} RIL_CDMA_T53_AudioControlInfoRecord;
1486
1487typedef struct {
1488
1489 RIL_CDMA_InfoRecName name;
1490
1491 union {
1492 /* Display and Extended Display Info Rec */
1493 RIL_CDMA_DisplayInfoRecord display;
1494
1495 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1496 RIL_CDMA_NumberInfoRecord number;
1497
1498 /* Signal Info Rec */
1499 RIL_CDMA_SignalInfoRecord signal;
1500
1501 /* Redirecting Number Info Rec */
1502 RIL_CDMA_RedirectingNumberInfoRecord redir;
1503
1504 /* Line Control Info Rec */
1505 RIL_CDMA_LineControlInfoRecord lineCtrl;
1506
1507 /* T53 CLIR Info Rec */
1508 RIL_CDMA_T53_CLIRInfoRecord clir;
1509
1510 /* T53 Audio Control Info Rec */
1511 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1512 } rec;
1513} RIL_CDMA_InformationRecord;
1514
1515#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1516
1517typedef struct {
1518 char numberOfInfoRecs;
1519 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1520} RIL_CDMA_InformationRecords;
1521
Jake Hamby8a4a2332014-01-15 13:12:05 -08001522/* See RIL_REQUEST_NV_READ_ITEM */
1523typedef struct {
1524 RIL_NV_Item itemID;
1525} RIL_NV_ReadItem;
1526
1527/* See RIL_REQUEST_NV_WRITE_ITEM */
1528typedef struct {
1529 RIL_NV_Item itemID;
1530 char * value;
1531} RIL_NV_WriteItem;
1532
Etan Cohend3652192014-06-20 08:28:44 -07001533typedef enum {
1534 HANDOVER_STARTED = 0,
1535 HANDOVER_COMPLETED = 1,
1536 HANDOVER_FAILED = 2,
1537 HANDOVER_CANCELED = 3
1538} RIL_SrvccState;
1539
1540/* hardware configuration reported to RILJ. */
1541typedef enum {
1542 RIL_HARDWARE_CONFIG_MODEM = 0,
1543 RIL_HARDWARE_CONFIG_SIM = 1,
1544} RIL_HardwareConfig_Type;
1545
1546typedef enum {
1547 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1548 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1549 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1550} RIL_HardwareConfig_State;
1551
1552typedef struct {
1553 int rilModel;
1554 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1555 int maxVoice;
1556 int maxData;
1557 int maxStandby;
1558} RIL_HardwareConfig_Modem;
1559
1560typedef struct {
Wink Saville8b4e4f72014-10-17 15:01:45 -07001561 char modemUuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001562} RIL_HardwareConfig_Sim;
1563
1564typedef struct {
1565 RIL_HardwareConfig_Type type;
Wink Saville8b4e4f72014-10-17 15:01:45 -07001566 char uuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001567 RIL_HardwareConfig_State state;
1568 union {
1569 RIL_HardwareConfig_Modem modem;
1570 RIL_HardwareConfig_Sim sim;
1571 } cfg;
1572} RIL_HardwareConfig;
1573
Amit Mahajan54563d32014-11-22 00:54:49 +00001574typedef enum {
1575 SS_CFU,
1576 SS_CF_BUSY,
1577 SS_CF_NO_REPLY,
1578 SS_CF_NOT_REACHABLE,
1579 SS_CF_ALL,
1580 SS_CF_ALL_CONDITIONAL,
1581 SS_CLIP,
1582 SS_CLIR,
1583 SS_COLP,
1584 SS_COLR,
1585 SS_WAIT,
1586 SS_BAOC,
1587 SS_BAOIC,
1588 SS_BAOIC_EXC_HOME,
1589 SS_BAIC,
1590 SS_BAIC_ROAMING,
1591 SS_ALL_BARRING,
1592 SS_OUTGOING_BARRING,
1593 SS_INCOMING_BARRING
1594} RIL_SsServiceType;
1595
1596typedef enum {
1597 SS_ACTIVATION,
1598 SS_DEACTIVATION,
1599 SS_INTERROGATION,
1600 SS_REGISTRATION,
1601 SS_ERASURE
1602} RIL_SsRequestType;
1603
1604typedef enum {
1605 SS_ALL_TELE_AND_BEARER_SERVICES,
1606 SS_ALL_TELESEVICES,
1607 SS_TELEPHONY,
1608 SS_ALL_DATA_TELESERVICES,
1609 SS_SMS_SERVICES,
1610 SS_ALL_TELESERVICES_EXCEPT_SMS
1611} RIL_SsTeleserviceType;
1612
1613#define SS_INFO_MAX 4
1614#define NUM_SERVICE_CLASSES 7
1615
1616typedef struct {
1617 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1618 For example if voice is forwarded to one number and data
1619 is forwarded to a different one then numValidIndexes will be
1620 2 indicating total number of valid values in cfInfo.
1621 Similarly if all the services are forwarded to the same
1622 number then the value of numValidIndexes will be 1. */
1623
1624 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1625 for SS request to query call
1626 forward status. see
1627 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1628} RIL_CfData;
1629
1630typedef struct {
1631 RIL_SsServiceType serviceType;
1632 RIL_SsRequestType requestType;
1633 RIL_SsTeleserviceType teleserviceType;
1634 int serviceClass;
1635 RIL_Errno result;
1636
1637 union {
1638 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1639 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1640 two ints, so first two values of ssInfo[] will be
1641 used for response if serviceType is SS_CLIR and
1642 requestType is SS_INTERROGATION */
1643
1644 RIL_CfData cfData;
1645 };
1646} RIL_StkCcUnsolSsResponse;
1647
Wink Saville7f856802009-06-09 10:23:37 -07001648/**
Wink Savillec29360a2014-07-13 05:17:28 -07001649 * Data connection power state
1650 */
1651typedef enum {
1652 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1653 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1654 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1655 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1656} RIL_DcPowerStates;
1657
1658/**
1659 * Data connection real time info
1660 */
1661typedef struct {
1662 uint64_t time; // Time in nanos as returned by ril_nano_time
1663 RIL_DcPowerStates powerState; // Current power state
1664} RIL_DcRtInfo;
1665
Amit Mahajanc796e222014-08-13 16:54:01 +00001666/**
1667 * Data profile to modem
1668 */
1669typedef struct {
1670 /* id of the data profile */
1671 int profileId;
1672 /* the APN to connect to */
1673 char* apn;
1674 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1675 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1676 */
1677 char* protocol;
1678 /** authentication protocol used for this PDP context
1679 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1680 */
1681 int authType;
1682 /* the username for APN, or NULL */
1683 char* user;
1684 /* the password for APN, or NULL */
1685 char* password;
1686 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1687 int type;
1688 /* the period in seconds to limit the maximum connections */
1689 int maxConnsTime;
1690 /* the maximum connections during maxConnsTime */
1691 int maxConns;
1692 /** the required wait time in seconds after a successful UE initiated
1693 * disconnect of a given PDN connection before the device can send
1694 * a new PDN connection request for that given PDN
1695 */
1696 int waitTime;
1697 /* true to enable the profile, 0 to disable, 1 to enable */
1698 int enabled;
1699} RIL_DataProfileInfo;
Wink Savillec29360a2014-07-13 05:17:28 -07001700
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001701/* Tx Power Levels */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001702#define RIL_NUM_TX_POWER_LEVELS 5
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001703
Nathan Haroldc8635212016-10-10 11:15:21 -07001704/**
1705 * Aggregate modem activity information
1706 */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001707typedef struct {
1708
Nathan Haroldc8635212016-10-10 11:15:21 -07001709 /* total time (in ms) when modem is in a low power or
1710 * sleep state
1711 */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001712 uint32_t sleep_mode_time_ms;
1713
Nathan Haroldc8635212016-10-10 11:15:21 -07001714 /* total time (in ms) when modem is awake but neither
1715 * the transmitter nor receiver are active/awake */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001716 uint32_t idle_mode_time_ms;
1717
Nathan Haroldc8635212016-10-10 11:15:21 -07001718 /* total time (in ms) during which the transmitter is active/awake,
1719 * subdivided by manufacturer-defined device-specific
1720 * contiguous increasing ranges of transmit power between
1721 * 0 and the transmitter's maximum transmit power.
1722 */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001723 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001724
Nathan Haroldc8635212016-10-10 11:15:21 -07001725 /* total time (in ms) for which receiver is active/awake and
1726 * the transmitter is inactive */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001727 uint32_t rx_mode_time_ms;
1728} RIL_ActivityStatsInfo;
1729
Wink Savillec29360a2014-07-13 05:17:28 -07001730/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001731 * RIL_REQUEST_GET_SIM_STATUS
1732 *
1733 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -07001734 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001735 * "data" is NULL
1736 *
Wink Savillefd729372011-02-22 16:19:39 -08001737 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001738 *
1739 * Valid errors:
1740 * Must never fail
1741 */
1742#define RIL_REQUEST_GET_SIM_STATUS 1
1743
1744/**
1745 * RIL_REQUEST_ENTER_SIM_PIN
1746 *
John Wang309ac292009-07-30 14:53:23 -07001747 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001748 *
1749 * "data" is const char **
1750 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001751 * ((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 -08001752 *
jsh593c9102009-06-24 16:13:44 -07001753 * "response" is int *
1754 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001755 *
1756 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001757 *
1758 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001759 * RADIO_NOT_AVAILABLE (radio resetting)
1760 * GENERIC_FAILURE
1761 * PASSWORD_INCORRECT
1762 */
1763
1764#define RIL_REQUEST_ENTER_SIM_PIN 2
1765
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001766/**
1767 * RIL_REQUEST_ENTER_SIM_PUK
1768 *
Wink Saville7f856802009-06-09 10:23:37 -07001769 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001770 *
1771 * "data" is const char **
1772 * ((const char **)data)[0] is PUK value
1773 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001774 * ((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 -08001775 *
jsh593c9102009-06-24 16:13:44 -07001776 * "response" is int *
1777 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001778 *
1779 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001780 *
1781 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001782 * RADIO_NOT_AVAILABLE (radio resetting)
1783 * GENERIC_FAILURE
1784 * PASSWORD_INCORRECT
1785 * (PUK is invalid)
1786 */
1787
1788#define RIL_REQUEST_ENTER_SIM_PUK 3
1789
1790/**
1791 * RIL_REQUEST_ENTER_SIM_PIN2
1792 *
1793 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
1794 * returned as a a failure from a previous operation.
1795 *
1796 * "data" is const char **
1797 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001798 * ((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 -08001799 *
jsh593c9102009-06-24 16:13:44 -07001800 * "response" is int *
1801 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001802 *
1803 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001804 *
1805 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001806 * RADIO_NOT_AVAILABLE (radio resetting)
1807 * GENERIC_FAILURE
1808 * PASSWORD_INCORRECT
1809 */
1810
1811#define RIL_REQUEST_ENTER_SIM_PIN2 4
1812
1813/**
1814 * RIL_REQUEST_ENTER_SIM_PUK2
1815 *
Wink Saville7f856802009-06-09 10:23:37 -07001816 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001817 *
1818 * "data" is const char **
1819 * ((const char **)data)[0] is PUK2 value
1820 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001821 * ((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 -08001822 *
jsh593c9102009-06-24 16:13:44 -07001823 * "response" is int *
1824 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001825 *
1826 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001827 *
1828 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001829 * RADIO_NOT_AVAILABLE (radio resetting)
1830 * GENERIC_FAILURE
1831 * PASSWORD_INCORRECT
1832 * (PUK2 is invalid)
1833 */
1834
1835#define RIL_REQUEST_ENTER_SIM_PUK2 5
1836
1837/**
1838 * RIL_REQUEST_CHANGE_SIM_PIN
1839 *
Wink Saville7f856802009-06-09 10:23:37 -07001840 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001841 *
1842 * "data" is const char **
1843 * ((const char **)data)[0] is old PIN value
1844 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001845 * ((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 -08001846 *
jsh593c9102009-06-24 16:13:44 -07001847 * "response" is int *
1848 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001849 *
1850 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001851 *
1852 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001853 * RADIO_NOT_AVAILABLE (radio resetting)
1854 * GENERIC_FAILURE
1855 * PASSWORD_INCORRECT
1856 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001857 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001858 */
1859
1860#define RIL_REQUEST_CHANGE_SIM_PIN 6
1861
1862
1863/**
1864 * RIL_REQUEST_CHANGE_SIM_PIN2
1865 *
Wink Saville7f856802009-06-09 10:23:37 -07001866 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001867 *
1868 * "data" is const char **
1869 * ((const char **)data)[0] is old PIN2 value
1870 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001871 * ((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 -08001872 *
jsh593c9102009-06-24 16:13:44 -07001873 * "response" is int *
1874 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001875 *
1876 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001877 *
1878 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001879 * RADIO_NOT_AVAILABLE (radio resetting)
1880 * GENERIC_FAILURE
1881 * PASSWORD_INCORRECT
1882 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001883 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001884 */
1885
1886#define RIL_REQUEST_CHANGE_SIM_PIN2 7
1887
1888/**
1889 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
1890 *
1891 * Requests that network personlization be deactivated
1892 *
1893 * "data" is const char **
1894 * ((const char **)(data))[0]] is network depersonlization code
1895 *
jsh593c9102009-06-24 16:13:44 -07001896 * "response" is int *
1897 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001898 *
1899 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001900 *
1901 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001902 * RADIO_NOT_AVAILABLE (radio resetting)
1903 * GENERIC_FAILURE
1904 * PASSWORD_INCORRECT
1905 * (code is invalid)
1906 */
1907
1908#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
1909
1910/**
Wink Saville7f856802009-06-09 10:23:37 -07001911 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001912 *
1913 * Requests current call list
1914 *
1915 * "data" is NULL
1916 *
1917 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07001918 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001919 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001920 *
1921 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001922 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07001923 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001924 * GENERIC_FAILURE
1925 * (request will be made again in a few hundred msec)
1926 */
1927
1928#define RIL_REQUEST_GET_CURRENT_CALLS 9
1929
1930
Wink Saville7f856802009-06-09 10:23:37 -07001931/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001932 * RIL_REQUEST_DIAL
1933 *
1934 * Initiate voice call
1935 *
1936 * "data" is const RIL_Dial *
1937 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001938 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001939 * This method is never used for supplementary service codes
1940 *
1941 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001942 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001943 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00001944 * DIAL_MODIFIED_TO_USSD
1945 * DIAL_MODIFIED_TO_SS
1946 * DIAL_MODIFIED_TO_DIAL
Ajay Nambi10345892016-03-19 09:02:28 -07001947 * INVALID_ARGUMENTS
1948 * NO_MEMORY
1949 * INVALID_STATE
1950 * NO_RESOURCES
1951 * INTERNAL_ERR
1952 * FDN_CHECK_FAILURE
1953 * MODEM_ERR
1954 * NO_SUBSCRIPTION
1955 * NO_NETWORK_FOUND
1956 * INVALID_CALL_ID
1957 * DEVICE_IN_USE
1958 * MODE_NOT_SUPPORTED
1959 * ABORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001960 * GENERIC_FAILURE
1961 */
1962#define RIL_REQUEST_DIAL 10
1963
1964/**
1965 * RIL_REQUEST_GET_IMSI
1966 *
1967 * Get the SIM IMSI
1968 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08001969 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001970 *
Wink Savillec0114b32011-02-18 10:14:07 -08001971 * "data" is const char **
1972 * ((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 -08001973 * "response" is a const char * containing the IMSI
1974 *
1975 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001976 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001977 * RADIO_NOT_AVAILABLE (radio resetting)
1978 * GENERIC_FAILURE
1979 */
1980
1981#define RIL_REQUEST_GET_IMSI 11
1982
1983/**
1984 * RIL_REQUEST_HANGUP
1985 *
1986 * Hang up a specific line (like AT+CHLD=1x)
1987 *
John Wang06bae4b2010-11-18 16:37:09 -08001988 * After this HANGUP request returns, RIL should show the connection is NOT
1989 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1990 *
Wink Saville7f856802009-06-09 10:23:37 -07001991 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001992 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001993 *
1994 * "response" is NULL
1995 *
1996 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001997 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001998 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07001999 * INVALID_ARGUMENTS
2000 * NO_MEMORY
2001 * INVALID_STATE
2002 * MODEM_ERR
2003 * INTERNAL_ERR
2004 * NO_MEMORY
2005 * INVALID_CALL_ID
2006 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002007 * GENERIC_FAILURE
2008 */
2009
2010#define RIL_REQUEST_HANGUP 12
2011
2012/**
2013 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
2014 *
2015 * Hang up waiting or held (like AT+CHLD=0)
2016 *
John Wang06bae4b2010-11-18 16:37:09 -08002017 * After this HANGUP request returns, RIL should show the connection is NOT
2018 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2019 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002020 * "data" is NULL
2021 * "response" is NULL
2022 *
2023 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002024 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002025 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002026 * INVALID_STATE
2027 * NO_MEMORY
2028 * MODEM_ERR
2029 * INTERNAL_ERR
2030 * NO_MEMORY
2031 * INVALID_CALL_ID
2032 * NO_RESOURCES
2033 * OPERATION_NOT_ALLOWED
2034 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002035 * GENERIC_FAILURE
2036 */
2037
2038#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
2039
2040/**
2041 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
2042 *
2043 * Hang up waiting or held (like AT+CHLD=1)
2044 *
John Wang06bae4b2010-11-18 16:37:09 -08002045 * After this HANGUP request returns, RIL should show the connection is NOT
2046 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2047 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002048 * "data" is NULL
2049 * "response" is NULL
2050 *
2051 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002052 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002053 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002054 * INVALID_STATE
2055 * NO_MEMORY
2056 * MODEM_ERR
2057 * INTERNAL_ERR
2058 * INVALID_CALL_ID
2059 * OPERATION_NOT_ALLOWED
2060 * INVALID_ARGUMENTS
2061 * NO_RESOURCES
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002062 * GENERIC_FAILURE
2063 */
2064
2065#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
2066
2067/**
2068 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
2069 *
2070 * Switch waiting or holding call and active call (like AT+CHLD=2)
2071 *
2072 * State transitions should be is follows:
2073 *
2074 * If call 1 is waiting and call 2 is active, then if this re
2075 *
2076 * BEFORE AFTER
2077 * Call 1 Call 2 Call 1 Call 2
2078 * ACTIVE HOLDING HOLDING ACTIVE
2079 * ACTIVE WAITING HOLDING ACTIVE
2080 * HOLDING WAITING HOLDING ACTIVE
2081 * ACTIVE IDLE HOLDING IDLE
2082 * IDLE IDLE IDLE IDLE
2083 *
2084 * "data" is NULL
2085 * "response" is NULL
2086 *
2087 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002088 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002089 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002090 * INVALID_STATE
2091 * NO_MEMORY
2092 * MODEM_ERR
2093 * INTERNAL_ERR
2094 * INVALID_STATE
2095 * INVALID_ARGUMENTS
2096 * INVALID_CALL_ID
2097 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002098 * GENERIC_FAILURE
2099 */
2100
2101#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
2102#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
2103
2104/**
2105 * RIL_REQUEST_CONFERENCE
2106 *
2107 * Conference holding and active (like AT+CHLD=3)
2108
2109 * "data" is NULL
2110 * "response" is NULL
2111 *
2112 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002113 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002114 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002115 * NO_MEMORY
2116 * MODEM_ERR
2117 * INTERNAL_ERR
2118 * INVALID_STATE
2119 * INVALID_CALL_ID
2120 * INVALID_ARGUMENTS
2121 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002122 * GENERIC_FAILURE
2123 */
2124#define RIL_REQUEST_CONFERENCE 16
2125
2126/**
2127 * RIL_REQUEST_UDUB
2128 *
Wink Saville7f856802009-06-09 10:23:37 -07002129 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002130 * waiting call answer)(RIL_BasicRequest r);
2131 *
2132 * "data" is NULL
2133 * "response" is NULL
2134 *
2135 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002136 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002137 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002138 * INVALID_STATE
2139 * NO_RESOURCES
2140 * NO_MEMORY
2141 * MODEM_ERR
2142 * INTERNAL_ERR
2143 * INVALID_CALL_ID
2144 * OPERATION_NOT_ALLOWED
2145 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002146 * GENERIC_FAILURE
2147 */
2148#define RIL_REQUEST_UDUB 17
2149
2150/**
2151 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2152 *
2153 * Requests the failure cause code for the most recently terminated call
2154 *
2155 * "data" is NULL
2156 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -07002157 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002158 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
2159 * failure reasons are derived from the possible call failure scenarios
2160 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002161 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08002162 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
2163 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
2164 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002165 * If the implementation does not have access to the exact cause codes,
2166 * then it should return one of the values listed in RIL_LastCallFailCause,
2167 * as the UI layer needs to distinguish these cases for tone generation or
2168 * error notification.
2169 *
2170 * Valid errors:
2171 * SUCCESS
2172 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002173 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002174 * GENERIC_FAILURE
2175 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002176 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002177 */
2178#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
2179
2180/**
2181 * RIL_REQUEST_SIGNAL_STRENGTH
2182 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002183 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002184 *
2185 * Must succeed if radio is on.
2186 *
2187 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07002188 *
2189 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002190 *
2191 * Valid errors:
2192 * SUCCESS
2193 * RADIO_NOT_AVAILABLE
2194 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002195#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07002196
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002197/**
Wink Savillec0114b32011-02-18 10:14:07 -08002198 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002199 *
2200 * Request current registration state
2201 *
2202 * "data" is NULL
2203 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -07002204 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -07002205 * 0 - Not registered, MT is not currently searching
2206 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07002207 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -07002208 * 2 - Not registered, but MT is currently searching
2209 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07002210 * 3 - Registration denied
2211 * 4 - Unknown
2212 * 5 - Registered, roaming
John Wang7f8ded12010-01-21 15:07:28 -08002213 * 10 - Same as 0, but indicates that emergency calls
2214 * are enabled.
2215 * 12 - Same as 2, but indicates that emergency calls
2216 * are enabled.
2217 * 13 - Same as 3, but indicates that emergency calls
2218 * are enabled.
2219 * 14 - Same as 4, but indicates that emergency calls
2220 * are enabled.
2221 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002222 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
2223 * NULL if not.Valid LAC are 0x0000 - 0xffff
2224 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
2225 * NULL if not.
2226 * Valid CID are 0x00000000 - 0xffffffff
2227 * In GSM, CID is Cell ID (see TS 27.007)
2228 * in 16 bits
2229 * In UMTS, CID is UMTS Cell Identity
2230 * (see TS 25.331) in 28 bits
Wink Saville43808972011-01-13 17:39:51 -08002231 * ((const char **)response)[3] indicates the available voice radio technology,
2232 * valid values as defined by RIL_RadioTechnology.
Wink Saville1b5fd232009-04-22 14:50:00 -07002233 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
2234 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07002235 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07002236 * ((const char **)response)[5] is Base Station latitude if registered on a
2237 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07002238 * latitude is a decimal number as specified in
2239 * 3GPP2 C.S0005-A v6.0. It is represented in
2240 * units of 0.25 seconds and ranges from -1296000
2241 * to 1296000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08002242 * to a range of -90 to +90 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07002243 * ((const char **)response)[6] is Base Station longitude if registered on a
2244 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07002245 * longitude is a decimal number as specified in
2246 * 3GPP2 C.S0005-A v6.0. It is represented in
2247 * units of 0.25 seconds and ranges from -2592000
2248 * to 2592000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08002249 * to a range of -180 to +180 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07002250 * ((const char **)response)[7] is concurrent services support indicator if
2251 * registered on a CDMA system 0-1.
2252 * 0 - Concurrent services not supported,
2253 * 1 - Concurrent services supported
2254 * ((const char **)response)[8] is System ID if registered on a CDMA system or
2255 * NULL if not. Valid System ID are 0 - 32767
2256 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
2257 * NULL if not. Valid System ID are 0 - 65535
2258 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002259 * on a CDMA or EVDO system or NULL if not. Valid values
Wink Saville1b5fd232009-04-22 14:50:00 -07002260 * are 0-255.
2261 * ((const char **)response)[11] indicates whether the current system is in the
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002262 * PRL if registered on a CDMA or EVDO system or NULL if
Wink Saville1b5fd232009-04-22 14:50:00 -07002263 * not. 0=not in the PRL, 1=in the PRL
2264 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002265 * if registered on a CDMA or EVDO system or NULL if not.
Wink Saville1b5fd232009-04-22 14:50:00 -07002266 * Valid values are 0-255.
2267 * ((const char **)response)[13] if registration state is 3 (Registration
2268 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07002269 * registration was denied. See 3GPP TS 24.008,
2270 * 10.5.3.6 and Annex G.
2271 * 0 - General
2272 * 1 - Authentication Failure
2273 * 2 - IMSI unknown in HLR
2274 * 3 - Illegal MS
2275 * 4 - Illegal ME
2276 * 5 - PLMN not allowed
2277 * 6 - Location area not allowed
2278 * 7 - Roaming not allowed
2279 * 8 - No Suitable Cells in this Location Area
2280 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07002281 * 10 - Persistent location update reject
Wink Savillec0114b32011-02-18 10:14:07 -08002282 * 11 - PLMN not allowed
2283 * 12 - Location area not allowed
2284 * 13 - Roaming not allowed in this Location Area
2285 * 15 - No Suitable Cells in this Location Area
2286 * 17 - Network Failure
2287 * 20 - MAC Failure
2288 * 21 - Sync Failure
2289 * 22 - Congestion
2290 * 23 - GSM Authentication unacceptable
2291 * 25 - Not Authorized for this CSG
2292 * 32 - Service option not supported
2293 * 33 - Requested service option not subscribed
2294 * 34 - Service option temporarily out of order
2295 * 38 - Call cannot be identified
2296 * 48-63 - Retry upon entry into a new cell
2297 * 95 - Semantically incorrect message
2298 * 96 - Invalid mandatory information
2299 * 97 - Message type non-existent or not implemented
2300 * 98 - Message not compatible with protocol state
2301 * 99 - Information element non-existent or not implemented
2302 * 100 - Conditional IE error
2303 * 101 - Message not compatible with protocol state
2304 * 111 - Protocol error, unspecified
jshca5e3472010-06-23 21:53:24 -07002305 * ((const char **)response)[14] is the Primary Scrambling Code of the current
2306 * cell as described in TS 25.331, in hexadecimal
2307 * format, or NULL if unknown or not registered
2308 * to a UMTS network.
Wink Saville1b5fd232009-04-22 14:50:00 -07002309 *
2310 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002311 * as "out of service" in the Android telephony system
2312 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002313 * Registration state 3 can be returned if Location Update Reject
2314 * (with cause 17 - Network Failure) is received repeatedly from the network,
2315 * to facilitate "managed roaming"
2316 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002317 * Valid errors:
2318 * SUCCESS
2319 * RADIO_NOT_AVAILABLE
2320 * GENERIC_FAILURE
2321 */
Wink Savillec0114b32011-02-18 10:14:07 -08002322#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002323
2324/**
Wink Savillec0114b32011-02-18 10:14:07 -08002325 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002326 *
Wink Savillec0114b32011-02-18 10:14:07 -08002327 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002328 *
2329 * "data" is NULL
2330 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08002331 * ((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 -08002332 * ((const char **)response)[1] is LAC if registered or NULL if not
2333 * ((const char **)response)[2] is CID if registered or NULL if not
Wink Saville43808972011-01-13 17:39:51 -08002334 * ((const char **)response)[3] indicates the available data radio technology,
2335 * valid values as defined by RIL_RadioTechnology.
Wink Savillec0114b32011-02-18 10:14:07 -08002336 * ((const char **)response)[4] if registration state is 3 (Registration
2337 * denied) this is an enumerated reason why
2338 * registration was denied. See 3GPP TS 24.008,
2339 * Annex G.6 "Additonal cause codes for GMM".
2340 * 7 == GPRS services not allowed
2341 * 8 == GPRS services and non-GPRS services not allowed
2342 * 9 == MS identity cannot be derived by the network
2343 * 10 == Implicitly detached
2344 * 14 == GPRS services not allowed in this PLMN
2345 * 16 == MSC temporarily not reachable
2346 * 40 == No PDP context activated
2347 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
2348 * established using RIL_REQUEST_SETUP_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002349 *
Wink Savilleae679532012-12-03 14:59:45 -08002350 * The values at offsets 6..10 are optional LTE location information in decimal.
2351 * If a value is unknown that value may be NULL. If all values are NULL,
2352 * none need to be present.
Wink Savilleea51a9d2012-09-15 07:54:06 -07002353 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
2354 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
2355 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
2356 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
2357 * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
2358 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002359 * LAC and CID are in hexadecimal format.
2360 * valid LAC are 0x0000 - 0xffff
2361 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07002362 *
2363 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002364 * as "out of service" in the Android telephony system
2365 *
2366 * Valid errors:
2367 * SUCCESS
2368 * RADIO_NOT_AVAILABLE
2369 * GENERIC_FAILURE
2370 */
Wink Savillec0114b32011-02-18 10:14:07 -08002371#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002372
2373/**
2374 * RIL_REQUEST_OPERATOR
2375 *
2376 * Request current operator ONS or EONS
2377 *
2378 * "data" is NULL
2379 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07002380 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002381 * or NULL if unregistered
2382 *
Wink Saville7f856802009-06-09 10:23:37 -07002383 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002384 * or NULL if unregistered
2385 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2386 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07002387 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002388 * Valid errors:
2389 * SUCCESS
2390 * RADIO_NOT_AVAILABLE
2391 * GENERIC_FAILURE
2392 */
2393#define RIL_REQUEST_OPERATOR 22
2394
2395/**
2396 * RIL_REQUEST_RADIO_POWER
2397 *
2398 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07002399 * If the radio is is turned off/on the radio modem subsystem
2400 * is expected return to an initialized state. For instance,
2401 * any voice and data calls will be terminated and all associated
2402 * lists emptied.
2403 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002404 * "data" is int *
2405 * ((int *)data)[0] is > 0 for "Radio On"
2406 * ((int *)data)[0] is == 0 for "Radio Off"
2407 *
2408 * "response" is NULL
2409 *
2410 * Turn radio on if "on" > 0
2411 * Turn radio off if "on" == 0
2412 *
2413 * Valid errors:
2414 * SUCCESS
2415 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002416 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002417 * GENERIC_FAILURE
2418 */
2419#define RIL_REQUEST_RADIO_POWER 23
2420
2421/**
2422 * RIL_REQUEST_DTMF
2423 *
2424 * Send a DTMF tone
2425 *
2426 * If the implementation is currently playing a tone requested via
2427 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2428 * should be played instead
2429 *
jsh602f80f2009-07-10 15:44:37 -07002430 * "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 -08002431 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002432 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002433 * FIXME should this block/mute microphone?
2434 * How does this interact with local DTMF feedback?
2435 *
2436 * Valid errors:
2437 * SUCCESS
2438 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002439 * INVALID_ARGUMENTS
2440 * NO_RESOURCES
2441 * NO_MEMORY
2442 * MODEM_ERR
2443 * INTERNAL_ERR
2444 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002445 * GENERIC_FAILURE
2446 *
2447 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2448 *
2449 */
2450#define RIL_REQUEST_DTMF 24
2451
2452/**
2453 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07002454 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002455 * Send an SMS message
2456 *
2457 * "data" is const char **
2458 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2459 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2460 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2461 * less the SMSC address
2462 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2463 *
2464 * "response" is a const RIL_SMS_Response *
2465 *
2466 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002467 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002468 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2469 *
2470 * Valid errors:
2471 * SUCCESS
2472 * RADIO_NOT_AVAILABLE
2473 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07002474 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08002475 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002476 * INVALID_STATE
2477 * INVALID_ARGUMENTS
2478 * NO_MEMORY
2479 * REQUEST_RATE_LIMITED
2480 * INVALID_SMS_FORMAT
2481 * SYSTEM_ERR
2482 * ENCODING_ERR
2483 * INVALID_SMSC_ADDRESS
2484 * MODEM_ERR
2485 * NETWORK_ERR
2486 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002487 * GENERIC_FAILURE
2488 *
2489 * FIXME how do we specify TP-Message-Reference if we need to resend?
2490 */
2491#define RIL_REQUEST_SEND_SMS 25
2492
2493
2494/**
2495 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07002496 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002497 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2498 * except that more messages are expected to be sent soon. If possible,
2499 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2500 *
2501 * "data" is const char **
2502 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2503 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2504 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2505 * less the SMSC address
2506 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2507 *
2508 * "response" is a const RIL_SMS_Response *
2509 *
2510 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002511 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002512 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2513 *
2514 * Valid errors:
2515 * SUCCESS
2516 * RADIO_NOT_AVAILABLE
2517 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08002518 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002519 * INVALID_STATE
2520 * INVALID_ARGUMENTS
2521 * NO_MEMORY
2522 * INVALID_SMS_FORMAT
2523 * SYSTEM_ERR
2524 * REQUEST_RATE_LIMITED
2525 * FDN_CHECK_FAILURE
2526 * MODEM_ERR
2527 * NETWORK_ERR
2528 * ENCODING_ERR
2529 * INVALID_SMSC_ADDRESS
2530 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002531 * GENERIC_FAILURE
2532 *
2533 */
2534#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2535
2536
2537/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002538 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002539 *
Wink Saville29487ef2011-04-15 09:15:31 -07002540 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2541 * return success it is added to the list of data calls and a
2542 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2543 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2544 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2545 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002546 *
Wink Saville43808972011-01-13 17:39:51 -08002547 * The RIL is expected to:
2548 * - Create one data call context.
2549 * - Create and configure a dedicated interface for the context
2550 * - The interface must be point to point.
2551 * - The interface is configured with one or more addresses and
2552 * is capable of sending and receiving packets. The prefix length
2553 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2554 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08002555 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08002556 * number of simultaneous data call contexts.
2557 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002558 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08002559 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2560 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07002561 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07002562 * ((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 -07002563 * override the one in the profile. NULL indicates no APN overrride.
2564 * ((const char **)data)[3] is the username for APN, or NULL
2565 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07002566 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2567 * 0 => PAP and CHAP is never performed.
2568 * 1 => PAP may be performed; CHAP is never performed.
2569 * 2 => CHAP may be performed; PAP is never performed.
2570 * 3 => PAP / CHAP may be performed - baseband dependent.
Wink Savillec0114b32011-02-18 10:14:07 -08002571 * ((const char **)data)[6] is the connection type to request must be one of the
2572 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07002573 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Wink Savillec0114b32011-02-18 10:14:07 -08002574 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002575 *
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -07002576 * "response" is a RIL_Data_Call_Response_v11
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002577 *
2578 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07002579 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002580 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08002581 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08002582 * the RIL_Data_Call_Response_v6.status containing the actual status.
2583 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08002584 *
2585 * Other errors could include:
2586 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2587 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002588 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002589 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002590 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002591#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002592
2593
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002594/**
2595 * RIL_REQUEST_SIM_IO
2596 *
2597 * Request SIM I/O operation.
2598 * This is similar to the TS 27.007 "restricted SIM" operation
2599 * where it assumes all of the EF selection will be done by the
2600 * callee.
2601 *
Wink Savillefd729372011-02-22 16:19:39 -08002602 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002603 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2604 * or may specify a PIN2 for operations that require a PIN2 (eg
2605 * updating FDN records)
2606 *
2607 * "response" is a const RIL_SIM_IO_Response *
2608 *
2609 * Arguments and responses that are unused for certain
2610 * values of "command" should be ignored or set to NULL
2611 *
2612 * Valid errors:
2613 * SUCCESS
2614 * RADIO_NOT_AVAILABLE
2615 * GENERIC_FAILURE
2616 * SIM_PIN2
2617 * SIM_PUK2
2618 */
2619#define RIL_REQUEST_SIM_IO 28
2620
2621/**
2622 * RIL_REQUEST_SEND_USSD
2623 *
2624 * Send a USSD message
2625 *
2626 * If a USSD session already exists, the message should be sent in the
2627 * context of that session. Otherwise, a new session should be created.
2628 *
2629 * The network reply should be reported via RIL_UNSOL_ON_USSD
2630 *
2631 * Only one USSD session may exist at a time, and the session is assumed
2632 * to exist until:
2633 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2634 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2635 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2636 *
2637 * "data" is a const char * containing the USSD request in UTF-8 format
2638 * "response" is NULL
2639 *
2640 * Valid errors:
2641 * SUCCESS
2642 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07002643 * FDN_CHECK_FAILURE
Amit Mahajan54563d32014-11-22 00:54:49 +00002644 * USSD_MODIFIED_TO_DIAL
2645 * USSD_MODIFIED_TO_SS
2646 * USSD_MODIFIED_TO_USSD
twen.changdf7add02016-03-04 18:27:48 +08002647 * SIM_BUSY
2648 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002649 * INVALID_ARGUMENTS
2650 * NO_MEMORY
2651 * MODEM_ERR
2652 * INTERNAL_ERR
2653 * ABORTED
2654 * SYSTEM_ERR
2655 * INVALID_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002656 * GENERIC_FAILURE
2657 *
2658 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2659 */
2660
2661#define RIL_REQUEST_SEND_USSD 29
2662
2663/**
2664 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07002665 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002666 * Cancel the current USSD session if one exists
2667 *
2668 * "data" is null
2669 * "response" is NULL
2670 *
2671 * Valid errors:
2672 * SUCCESS
2673 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002674 * SIM_BUSY
2675 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002676 * MODEM_ERR
2677 * INTERNAL_ERR
2678 * NO_MEMORY
2679 * INVALID_STATE
Wink Saville7f856802009-06-09 10:23:37 -07002680 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002681 */
2682
2683#define RIL_REQUEST_CANCEL_USSD 30
2684
Wink Saville7f856802009-06-09 10:23:37 -07002685/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002686 * RIL_REQUEST_GET_CLIR
2687 *
2688 * Gets current CLIR status
2689 * "data" is NULL
2690 * "response" is int *
2691 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2692 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2693 *
2694 * Valid errors:
2695 * SUCCESS
2696 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002697 * SS_MODIFIED_TO_DIAL
2698 * SS_MODIFIED_TO_USSD
2699 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002700 * NO_MEMORY
2701 * MODEM_ERR
2702 * INTERNAL_ERR
2703 * FDN_CHECK_FAILURE
2704 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002705 * GENERIC_FAILURE
2706 */
2707#define RIL_REQUEST_GET_CLIR 31
2708
2709/**
2710 * RIL_REQUEST_SET_CLIR
2711 *
2712 * "data" is int *
2713 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2714 *
2715 * "response" is NULL
2716 *
2717 * Valid errors:
2718 * SUCCESS
2719 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002720 * SS_MODIFIED_TO_DIAL
2721 * SS_MODIFIED_TO_USSD
2722 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002723 * INVALID_ARGUMENTS
2724 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002725 * GENERIC_FAILURE
2726 */
2727#define RIL_REQUEST_SET_CLIR 32
2728
2729/**
2730 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2731 *
2732 * "data" is const RIL_CallForwardInfo *
2733 *
2734 * "response" is const RIL_CallForwardInfo **
2735 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2736 * each distinct registered phone number.
2737 *
2738 * For example, if data is forwarded to +18005551212 and voice is forwarded
2739 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07002740 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002741 * If, however, both data and voice are forwarded to +18005551212, then
2742 * a single RIL_CallForwardInfo can be returned with the service class
2743 * set to "data + voice = 3")
2744 *
2745 * Valid errors:
2746 * SUCCESS
2747 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002748 * SS_MODIFIED_TO_DIAL
2749 * SS_MODIFIED_TO_USSD
2750 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002751 * INVALID_ARGUMENTS
2752 * NO_MEMORY
2753 * SYSTEM_ERR
2754 * MODEM_ERR
2755 * INTERNAL_ERR
2756 * NO_MEMORY
2757 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002758 * GENERIC_FAILURE
2759 */
2760#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2761
2762
2763/**
2764 * RIL_REQUEST_SET_CALL_FORWARD
2765 *
2766 * Configure call forward rule
2767 *
2768 * "data" is const RIL_CallForwardInfo *
2769 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002770 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002771 * Valid errors:
2772 * SUCCESS
2773 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002774 * SS_MODIFIED_TO_DIAL
2775 * SS_MODIFIED_TO_USSD
2776 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002777 * INVALID_ARGUMENTS
2778 * NO_MEMORY
2779 * SYSTEM_ERR
2780 * MODEM_ERR
2781 * INTERNAL_ERR
2782 * INVALID_STATE
2783 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002784 * GENERIC_FAILURE
2785 */
2786#define RIL_REQUEST_SET_CALL_FORWARD 34
2787
2788
2789/**
2790 * RIL_REQUEST_QUERY_CALL_WAITING
2791 *
2792 * Query current call waiting state
2793 *
2794 * "data" is const int *
2795 * ((const int *)data)[0] is the TS 27.007 service class to query.
2796 * "response" is a const int *
2797 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2798 *
2799 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2800 * must follow, with the TS 27.007 service class bit vector of services
2801 * for which call waiting is enabled.
2802 *
Wink Saville7f856802009-06-09 10:23:37 -07002803 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002804 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2805 * and voice and disabled for everything else
2806 *
2807 * Valid errors:
2808 * SUCCESS
2809 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002810 * SS_MODIFIED_TO_DIAL
2811 * SS_MODIFIED_TO_USSD
2812 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002813 * NO_MEMORY
2814 * MODEM_ERR
2815 * INTERNAL_ERR
2816 * NO_MEMORY
2817 * FDN_CHECK_FAILURE
2818 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002819 * GENERIC_FAILURE
2820 */
2821#define RIL_REQUEST_QUERY_CALL_WAITING 35
2822
2823
2824/**
2825 * RIL_REQUEST_SET_CALL_WAITING
2826 *
2827 * Configure current call waiting state
2828 *
2829 * "data" is const int *
2830 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2831 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2832 * services to modify
2833 * "response" is NULL
2834 *
2835 * Valid errors:
2836 * SUCCESS
2837 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002838 * SS_MODIFIED_TO_DIAL
2839 * SS_MODIFIED_TO_USSD
2840 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002841 * INVALID_ARGUMENTS
2842 * NO_MEMORY
2843 * MODEM_ERR
2844 * INTERNAL_ERR
2845 * INVALID_STATE
2846 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002847 * GENERIC_FAILURE
2848 */
2849#define RIL_REQUEST_SET_CALL_WAITING 36
2850
2851/**
2852 * RIL_REQUEST_SMS_ACKNOWLEDGE
2853 *
2854 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07002855 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002856 *
2857 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07002858 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002859 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07002860 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002861 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07002862 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
2863 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
2864 * capacity exceeded) and 0xFF (unspecified error) are
2865 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002866 *
2867 * "response" is NULL
2868 *
2869 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
2870 *
2871 * Valid errors:
2872 * SUCCESS
2873 * RADIO_NOT_AVAILABLE
2874 * GENERIC_FAILURE
2875 */
2876#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
2877
2878/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002879 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002880 *
2881 * Get the device IMEI, including check digit
2882 *
johnwangf8bc1672009-05-14 19:19:47 -07002883 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002884 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2885 *
2886 * "data" is NULL
2887 * "response" is a const char * containing the IMEI
2888 *
2889 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002890 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002891 * RADIO_NOT_AVAILABLE (radio resetting)
2892 * GENERIC_FAILURE
2893 */
2894
2895#define RIL_REQUEST_GET_IMEI 38
2896
2897/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002898 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002899 *
2900 * Get the device IMEISV, which should be two decimal digits
2901 *
johnwangf8bc1672009-05-14 19:19:47 -07002902 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002903 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2904 *
2905 * "data" is NULL
2906 * "response" is a const char * containing the IMEISV
2907 *
2908 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002909 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002910 * RADIO_NOT_AVAILABLE (radio resetting)
2911 * GENERIC_FAILURE
2912 */
2913
2914#define RIL_REQUEST_GET_IMEISV 39
2915
2916
2917/**
2918 * RIL_REQUEST_ANSWER
2919 *
2920 * Answer incoming call
2921 *
2922 * Will not be called for WAITING calls.
2923 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
2924 * instead
2925 *
2926 * "data" is NULL
2927 * "response" is NULL
2928 *
2929 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002930 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002931 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002932 * INVALID_STATE
2933 * NO_MEMORY
2934 * SYSTEM_ERR
2935 * MODEM_ERR
2936 * INTERNAL_ERR
2937 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002938 * GENERIC_FAILURE
2939 */
2940
2941#define RIL_REQUEST_ANSWER 40
2942
2943/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002944 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002945 *
Wink Saville29487ef2011-04-15 09:15:31 -07002946 * Deactivate packet data connection and remove from the
2947 * data call list if SUCCESS is returned. Any other return
2948 * values should also try to remove the call from the list,
2949 * but that may not be possible. In any event a
2950 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
2951 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
2952 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002953 *
2954 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07002955 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06002956 * ((char**)data)[1] indicating Disconnect Reason
2957 * 0 => No specific reason specified
2958 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07002959 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002960 * "response" is NULL
2961 *
2962 * Valid errors:
2963 * SUCCESS
2964 * RADIO_NOT_AVAILABLE
2965 * GENERIC_FAILURE
2966 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002967 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002968 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002969#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002970
2971/**
2972 * RIL_REQUEST_QUERY_FACILITY_LOCK
2973 *
2974 * Query the status of a facility lock state
2975 *
2976 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07002977 * ((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 -08002978 * (eg "AO" for BAOC, "SC" for SIM lock)
2979 * ((const char **)data)[1] is the password, or "" if not required
2980 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
2981 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08002982 * ((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 -08002983 * This is only applicable in the case of Fixed Dialing Numbers
2984 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002985 *
2986 * "response" is an int *
2987 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07002988 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002989 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07002990 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002991 *
2992 * Valid errors:
2993 * SUCCESS
2994 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002995 * SS_MODIFIED_TO_DIAL
2996 * SS_MODIFIED_TO_USSD
2997 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002998 * INVALID_ARGUMENTS
2999 * NO_MEMORY
3000 * INTERNAL_ERR
3001 * SYSTEM_ERR
3002 * MODEM_ERR
3003 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003004 * GENERIC_FAILURE
3005 *
3006 */
3007#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
3008
3009/**
3010 * RIL_REQUEST_SET_FACILITY_LOCK
3011 *
3012 * Enable/disable one facility lock
3013 *
3014 * "data" is const char **
3015 *
3016 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3017 * (eg "AO" for BAOC)
3018 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
3019 * ((const char **)data)[2] = password
3020 * ((const char **)data)[3] = string representation of decimal TS 27.007
3021 * service class bit vector. Eg, the string
3022 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08003023 * ((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 -08003024 * This is only applicable in the case of Fixed Dialing Numbers
3025 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003026 *
jsh593c9102009-06-24 16:13:44 -07003027 * "response" is int *
3028 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003029 *
3030 * Valid errors:
3031 * SUCCESS
3032 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003033 * SS_MODIFIED_TO_DIAL
3034 * SS_MODIFIED_TO_USSD
3035 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003036 * INVALID_ARGUMENTS
3037 * INTERNAL_ERR
3038 * NO_MEMORY
3039 * MODEM_ERR
3040 * INVALID_STATE
3041 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003042 * GENERIC_FAILURE
3043 *
3044 */
3045#define RIL_REQUEST_SET_FACILITY_LOCK 43
3046
3047/**
3048 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
3049 *
3050 * Change call barring facility password
3051 *
3052 * "data" is const char **
3053 *
3054 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3055 * (eg "AO" for BAOC)
3056 * ((const char **)data)[1] = old password
3057 * ((const char **)data)[2] = new password
3058 *
Wink Saville7f856802009-06-09 10:23:37 -07003059 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003060 *
3061 * Valid errors:
3062 * SUCCESS
3063 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003064 * SS_MODIFIED_TO_DIAL
3065 * SS_MODIFIED_TO_USSD
3066 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003067 * INVALID_ARGUMENTS
3068 * NO_MEMORY
3069 * MODEM_ERR
3070 * INTERNAL_ERR
3071 * SYSTEM_ERR
3072 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003073 * GENERIC_FAILURE
3074 *
3075 */
3076#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
3077
3078/**
3079 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
3080 *
3081 * Query current network selectin mode
3082 *
3083 * "data" is NULL
3084 *
3085 * "response" is int *
3086 * ((const int *)response)[0] is
3087 * 0 for automatic selection
3088 * 1 for manual selection
3089 *
3090 * Valid errors:
3091 * SUCCESS
3092 * RADIO_NOT_AVAILABLE
3093 * GENERIC_FAILURE
3094 *
3095 */
3096#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
3097
3098/**
3099 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
3100 *
3101 * Specify that the network should be selected automatically
3102 *
3103 * "data" is NULL
3104 * "response" is NULL
3105 *
Wink Saville7f856802009-06-09 10:23:37 -07003106 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003107 * and registered
3108 *
3109 * Valid errors:
3110 * SUCCESS
3111 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003112 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003113 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003114 * GENERIC_FAILURE
3115 *
John Wang75534472010-04-20 15:11:42 -07003116 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3117 * no retries needed, such as illegal SIM or ME.
3118 * Returns GENERIC_FAILURE for all other causes that might be
3119 * fixed by retries.
3120 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003121 */
3122#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
3123
3124/**
3125 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
3126 *
3127 * Manually select a specified network.
3128 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003129 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
3130 * "response" is NULL
3131 *
Wink Saville7f856802009-06-09 10:23:37 -07003132 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003133 * and registered
3134 *
3135 * Valid errors:
3136 * SUCCESS
3137 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003138 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003139 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003140 * GENERIC_FAILURE
3141 *
John Wang75534472010-04-20 15:11:42 -07003142 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3143 * no retries needed, such as illegal SIM or ME.
3144 * Returns GENERIC_FAILURE for all other causes that might be
3145 * fixed by retries.
3146 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003147 */
3148#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
3149
3150/**
3151 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
3152 *
3153 * Scans for available networks
3154 *
3155 * "data" is NULL
3156 * "response" is const char ** that should be an array of n*4 strings, where
3157 * n is the number of available networks
3158 * For each available network:
3159 *
Wink Saville7f856802009-06-09 10:23:37 -07003160 * ((const char **)response)[n+0] is long alpha ONS or EONS
3161 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003162 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
3163 * ((const char **)response)[n+3] is a string value of the status:
3164 * "unknown"
3165 * "available"
3166 * "current"
3167 * "forbidden"
3168 *
Wink Saville7f856802009-06-09 10:23:37 -07003169 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003170 * and registered
3171 *
3172 * Valid errors:
3173 * SUCCESS
3174 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003175 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003176 * GENERIC_FAILURE
3177 *
3178 */
3179#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
3180
3181/**
3182 * RIL_REQUEST_DTMF_START
3183 *
Wink Saville7f856802009-06-09 10:23:37 -07003184 * Start playing a DTMF tone. Continue playing DTMF tone until
3185 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003186 *
3187 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
3188 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07003189 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003190 * "data" is a char *
3191 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
3192 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003193 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003194 * Valid errors:
3195 * SUCCESS
3196 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003197 * INVALID_ARGUMENTS
3198 * NO_RESOURCES
3199 * NO_MEMORY
3200 * SYSTEM_ERR
3201 * MODEM_ERR
3202 * INTERNAL_ERR
3203 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003204 * GENERIC_FAILURE
3205 *
3206 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
3207 */
3208#define RIL_REQUEST_DTMF_START 49
3209
3210/**
3211 * RIL_REQUEST_DTMF_STOP
3212 *
3213 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07003214 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003215 * "data" is NULL
3216 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003217 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003218 * Valid errors:
3219 * SUCCESS
3220 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003221 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07003222 * NO_RESOURCES
3223 * NO_MEMORY
3224 * INVALID_ARGUMENTS
3225 * SYSTEM_ERR
3226 * MODEM_ERR
3227 * INTERNAL_ERR
3228 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003229 * GENERIC_FAILURE
3230 *
3231 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
3232 */
3233#define RIL_REQUEST_DTMF_STOP 50
3234
3235/**
3236 * RIL_REQUEST_BASEBAND_VERSION
3237 *
3238 * Return string value indicating baseband version, eg
3239 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07003240 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003241 * "data" is NULL
3242 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07003243 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003244 * Valid errors:
3245 * SUCCESS
3246 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003247 * EMPTY_RECORD
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003248 * GENERIC_FAILURE
3249 *
3250 */
3251#define RIL_REQUEST_BASEBAND_VERSION 51
3252
3253/**
3254 * RIL_REQUEST_SEPARATE_CONNECTION
3255 *
3256 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07003257 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003258 * as the only other member of the current (active) call
3259 *
3260 * Like AT+CHLD=2x
3261 *
3262 * See TS 22.084 1.3.8.2 (iii)
3263 * TS 22.030 6.5.5 "Entering "2X followed by send"
3264 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07003265 *
3266 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07003267 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
3268 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003269 * "response" is NULL
3270 *
3271 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003272 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003273 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003274 * INVALID_ARGUMENTS
3275 * INVALID_STATE
3276 * NO_RESOURCES
3277 * NO_MEMORY
3278 * SYSTEM_ERR
3279 * MODEM_ERR
3280 * INTERNAL_ERR
3281 * INVALID_CALL_ID
3282 * INVALID_STATE
3283 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003284 * GENERIC_FAILURE
3285 */
3286#define RIL_REQUEST_SEPARATE_CONNECTION 52
3287
3288
3289/**
3290 * RIL_REQUEST_SET_MUTE
3291 *
3292 * Turn on or off uplink (microphone) mute.
3293 *
3294 * Will only be sent while voice call is active.
3295 * Will always be reset to "disable mute" when a new voice call is initiated
3296 *
3297 * "data" is an int *
3298 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
3299 *
3300 * "response" is NULL
3301 *
3302 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003303 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003304 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi68900f52016-03-11 12:02:55 -08003305 * INVALID_ARGUMENTS
3306 * NO_MEMORY
3307 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003308 * GENERIC_FAILURE
3309 */
3310
3311#define RIL_REQUEST_SET_MUTE 53
3312
3313/**
3314 * RIL_REQUEST_GET_MUTE
3315 *
3316 * Queries the current state of the uplink mute setting
3317 *
3318 * "data" is NULL
3319 * "response" is an int *
3320 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
3321 *
3322 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003323 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003324 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00003325 * SS_MODIFIED_TO_DIAL
3326 * SS_MODIFIED_TO_USSD
3327 * SS_MODIFIED_TO_SS
Ajay Nambi68900f52016-03-11 12:02:55 -08003328 * NO_MEMORY
3329 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003330 * GENERIC_FAILURE
3331 */
3332
3333#define RIL_REQUEST_GET_MUTE 54
3334
3335/**
3336 * RIL_REQUEST_QUERY_CLIP
3337 *
3338 * Queries the status of the CLIP supplementary service
3339 *
3340 * (for MMI code "*#30#")
3341 *
3342 * "data" is NULL
3343 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07003344 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003345 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07003346 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003347 *
3348 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003349 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003350 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003351 * NO_MEMORY
3352 * SYSTEM_ERR
3353 * MODEM_ERR
3354 * INTERNAL_ERR
3355 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003356 * GENERIC_FAILURE
3357 */
3358
3359#define RIL_REQUEST_QUERY_CLIP 55
3360
3361/**
Wink Savillec0114b32011-02-18 10:14:07 -08003362 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
3363 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003364 *
3365 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07003366 * context or CDMA data connection active
3367 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003368 *
3369 * "data" is NULL
3370 *
3371 * "response" is a "int *"
3372 * ((int *)response)[0] is an integer cause code defined in TS 24.008
3373 * section 6.1.3.1.3 or close approximation
3374 *
3375 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07003376 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08003377 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003378 * cases for error notification
3379 * and potential retries.
3380 *
3381 * Valid errors:
3382 * SUCCESS
3383 * RADIO_NOT_AVAILABLE
3384 * GENERIC_FAILURE
3385 *
3386 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08003387 *
3388 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003389 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003390
Wink Savillef4c4d362009-04-02 01:37:03 -07003391#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003392
3393/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003394 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003395 *
Wink Saville29487ef2011-04-15 09:15:31 -07003396 * Returns the data call list. An entry is added when a
3397 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
3398 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
3399 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003400 *
3401 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08003402 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003403 *
3404 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003405 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003406 * RADIO_NOT_AVAILABLE (radio resetting)
3407 * GENERIC_FAILURE
Wink Saville29487ef2011-04-15 09:15:31 -07003408 *
3409 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003410 */
3411
Wink Savillef4c4d362009-04-02 01:37:03 -07003412#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003413
3414/**
johnwangf8bc1672009-05-14 19:19:47 -07003415 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003416 *
3417 * Request a radio reset. The RIL implementation may postpone
3418 * the reset until after this request is responded to if the baseband
3419 * is presently busy.
3420 *
johnwangf8bc1672009-05-14 19:19:47 -07003421 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
3422 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003423 * "data" is NULL
3424 * "response" is NULL
3425 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003426 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003427 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003428 * RADIO_NOT_AVAILABLE (radio resetting)
3429 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07003430 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003431 */
3432
3433#define RIL_REQUEST_RESET_RADIO 58
3434
3435/**
3436 * RIL_REQUEST_OEM_HOOK_RAW
3437 *
3438 * This request reserved for OEM-specific uses. It passes raw byte arrays
3439 * back and forth.
3440 *
Wink Saville7f856802009-06-09 10:23:37 -07003441 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003442 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
3443 *
3444 * "data" is a char * of bytes copied from the byte[] data argument in java
3445 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07003446 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003447 * (byte[])(((AsyncResult)response.obj).result)
3448 *
Wink Saville7f856802009-06-09 10:23:37 -07003449 * An error response here will result in
3450 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003451 * (((AsyncResult)response.obj).exception) being an instance of
3452 * com.android.internal.telephony.gsm.CommandException
3453 *
3454 * Valid errors:
3455 * All
3456 */
3457
3458#define RIL_REQUEST_OEM_HOOK_RAW 59
3459
3460/**
3461 * RIL_REQUEST_OEM_HOOK_STRINGS
3462 *
3463 * This request reserved for OEM-specific uses. It passes strings
3464 * back and forth.
3465 *
Wink Saville7f856802009-06-09 10:23:37 -07003466 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003467 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
3468 *
3469 * "data" is a const char **, representing an array of null-terminated UTF-8
3470 * strings copied from the "String[] strings" argument to
3471 * invokeOemRilRequestStrings()
3472 *
3473 * "response" is a const char **, representing an array of null-terminated UTF-8
3474 * stings that will be returned via the caller's response message here:
3475 *
3476 * (String[])(((AsyncResult)response.obj).result)
3477 *
Wink Saville7f856802009-06-09 10:23:37 -07003478 * An error response here will result in
3479 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003480 * (((AsyncResult)response.obj).exception) being an instance of
3481 * com.android.internal.telephony.gsm.CommandException
3482 *
3483 * Valid errors:
3484 * All
3485 */
3486
3487#define RIL_REQUEST_OEM_HOOK_STRINGS 60
3488
3489/**
3490 * RIL_REQUEST_SCREEN_STATE
3491 *
3492 * Indicates the current state of the screen. When the screen is off, the
3493 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07003494 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
3495 * in an effort to conserve power. These notifications should resume when the
3496 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003497 *
3498 * "data" is int *
3499 * ((int *)data)[0] is == 1 for "Screen On"
3500 * ((int *)data)[0] is == 0 for "Screen Off"
3501 *
3502 * "response" is NULL
3503 *
3504 * Valid errors:
3505 * SUCCESS
3506 * GENERIC_FAILURE
3507 */
3508#define RIL_REQUEST_SCREEN_STATE 61
3509
3510
3511/**
3512 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
3513 *
3514 * Enables/disables supplementary service related notifications
3515 * from the network.
3516 *
3517 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3518 *
3519 * "data" is int *
3520 * ((int *)data)[0] is == 1 for notifications enabled
3521 * ((int *)data)[0] is == 0 for notifications disabled
3522 *
3523 * "response" is NULL
3524 *
3525 * Valid errors:
3526 * SUCCESS
3527 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003528 * SIM_BUSY
Ajay Nambi10345892016-03-19 09:02:28 -07003529 * INVALID_ARGUMENTS
3530 * NO_MEMORY
3531 * SYSTEM_ERR
3532 * MODEM_ERR
3533 * INTERNAL_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003534 * GENERIC_FAILURE
3535 *
3536 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3537 */
3538#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
3539
3540/**
3541 * RIL_REQUEST_WRITE_SMS_TO_SIM
3542 *
3543 * Stores a SMS message to SIM memory.
3544 *
3545 * "data" is RIL_SMS_WriteArgs *
3546 *
3547 * "response" is int *
3548 * ((const int *)response)[0] is the record index where the message is stored.
3549 *
3550 * Valid errors:
3551 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003552 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003553 * INVALID_ARGUMENTS
3554 * INVALID_SMS_FORMAT
3555 * INTERNAL_ERR
3556 * MODEM_ERR
3557 * ENCODING_ERR
3558 * NO_MEMORY
3559 * NO_RESOURCES
3560 * INVALID_MODEM_STATE
3561 * MODE_NOT_SUPPORTED
3562 * INVALID_SMSC_ADDRESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003563 * GENERIC_FAILURE
3564 *
3565 */
3566#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
3567
3568/**
3569 * RIL_REQUEST_DELETE_SMS_ON_SIM
3570 *
3571 * Deletes a SMS message from SIM memory.
3572 *
3573 * "data" is int *
3574 * ((int *)data)[0] is the record index of the message to delete.
3575 *
3576 * "response" is NULL
3577 *
3578 * Valid errors:
3579 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003580 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003581 * INVALID_ARGUMENTS
3582 * NO_MEMORY
3583 * REQUEST_RATE_LIMITED
3584 * SYSTEM_ERR
3585 * MODEM_ERR
3586 * NO_SUCH_ENTRY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003587 * GENERIC_FAILURE
3588 *
3589 */
3590#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
3591
3592/**
3593 * RIL_REQUEST_SET_BAND_MODE
3594 *
3595 * Assign a specified band for RF configuration.
3596 *
3597 * "data" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003598 * ((int *)data)[0] is a RIL_RadioBandMode
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003599 *
3600 * "response" is NULL
3601 *
3602 * Valid errors:
3603 * SUCCESS
3604 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003605 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003606 * GENERIC_FAILURE
Nathan Harold92839f12016-02-12 10:02:28 -08003607 *
3608 * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003609 */
3610#define RIL_REQUEST_SET_BAND_MODE 65
3611
3612/**
3613 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3614 *
3615 * Query the list of band mode supported by RF.
3616 *
3617 * "data" is NULL
3618 *
3619 * "response" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003620 * "response" points to an array of int's, the int[0] is the size of array;
3621 * subsequent values are a list of RIL_RadioBandMode listing supported modes.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003622 *
3623 * Valid errors:
3624 * SUCCESS
3625 * RADIO_NOT_AVAILABLE
3626 * GENERIC_FAILURE
3627 *
3628 * See also: RIL_REQUEST_SET_BAND_MODE
3629 */
3630#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
3631
3632/**
3633 * RIL_REQUEST_STK_GET_PROFILE
3634 *
3635 * Requests the profile of SIM tool kit.
3636 * The profile indicates the SAT/USAT features supported by ME.
3637 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
3638 *
3639 * "data" is NULL
3640 *
3641 * "response" is a const char * containing SAT/USAT profile
3642 * in hexadecimal format string starting with first byte of terminal profile
3643 *
3644 * Valid errors:
3645 * RIL_E_SUCCESS
3646 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3647 * RIL_E_GENERIC_FAILURE
3648 */
3649#define RIL_REQUEST_STK_GET_PROFILE 67
3650
3651/**
3652 * RIL_REQUEST_STK_SET_PROFILE
3653 *
3654 * Download the STK terminal profile as part of SIM initialization
3655 * procedure
3656 *
3657 * "data" is a const char * containing SAT/USAT profile
3658 * in hexadecimal format string starting with first byte of terminal profile
3659 *
3660 * "response" is NULL
3661 *
3662 * Valid errors:
3663 * RIL_E_SUCCESS
3664 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3665 * RIL_E_GENERIC_FAILURE
3666 */
3667#define RIL_REQUEST_STK_SET_PROFILE 68
3668
3669/**
3670 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
3671 *
3672 * Requests to send a SAT/USAT envelope command to SIM.
3673 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
3674 *
3675 * "data" is a const char * containing SAT/USAT command
3676 * in hexadecimal format string starting with command tag
3677 *
3678 * "response" is a const char * containing SAT/USAT response
3679 * in hexadecimal format string starting with first byte of response
3680 * (May be NULL)
3681 *
3682 * Valid errors:
3683 * RIL_E_SUCCESS
3684 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003685 * SIM_BUSY
3686 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003687 * RIL_E_GENERIC_FAILURE
3688 */
3689#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
3690
3691/**
3692 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
3693 *
3694 * Requests to send a terminal response to SIM for a received
3695 * proactive command
3696 *
3697 * "data" is a const char * containing SAT/USAT response
3698 * in hexadecimal format string starting with first byte of response data
3699 *
3700 * "response" is NULL
3701 *
3702 * Valid errors:
3703 * RIL_E_SUCCESS
3704 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003705 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003706 * RIL_E_GENERIC_FAILURE
3707 */
3708#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3709
3710/**
3711 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3712 *
3713 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3714 * been initialized by ME already. (We could see the call has been in the 'call
3715 * list') So, STK application needs to accept/reject the call according as user
3716 * operations.
3717 *
3718 * "data" is int *
3719 * ((int *)data)[0] is > 0 for "accept" the call setup
3720 * ((int *)data)[0] is == 0 for "reject" the call setup
3721 *
3722 * "response" is NULL
3723 *
3724 * Valid errors:
3725 * RIL_E_SUCCESS
3726 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003727 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003728 * RIL_E_GENERIC_FAILURE
3729 */
3730#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3731
3732/**
3733 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3734 *
3735 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07003736 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003737 * "data" is NULL
3738 * "response" is NULL
3739 *
3740 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003741 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003742 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003743 * INVALID_STATE
3744 * NO_RESOURCES
3745 * NO_MEMORY
3746 * INVALID_ARGUMENTS
3747 * SYSTEM_ERR
3748 * MODEM_ERR
3749 * INTERNAL_ERR
3750 * INVALID_CALL_ID
3751 * INVALID_STATE
3752 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003753 * GENERIC_FAILURE
3754 */
3755#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3756
3757/**
3758 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3759 *
3760 * Requests to set the preferred network type for searching and registering
3761 * (CS/PS domain, RAT, and operation mode)
3762 *
Wink Savillec0114b32011-02-18 10:14:07 -08003763 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003764 *
3765 * "response" is NULL
3766 *
3767 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07003768 * SUCCESS
3769 * RADIO_NOT_AVAILABLE (radio resetting)
3770 * GENERIC_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08003771 * OPERATION_NOT_ALLOWED
Wink Savillef4c4d362009-04-02 01:37:03 -07003772 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003773 */
3774#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3775
3776/**
3777 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
3778 *
3779 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
3780 * for searching and registering
3781 *
3782 * "data" is NULL
3783 *
3784 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003785 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003786 *
3787 * Valid errors:
3788 * SUCCESS
3789 * RADIO_NOT_AVAILABLE
3790 * GENERIC_FAILURE
3791 *
3792 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3793 */
3794#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
3795
3796/**
3797 * RIL_REQUEST_NEIGHBORING_CELL_IDS
3798 *
3799 * Request neighboring cell id in GSM network
3800 *
3801 * "data" is NULL
3802 * "response" must be a " const RIL_NeighboringCell** "
3803 *
3804 * Valid errors:
3805 * SUCCESS
3806 * RADIO_NOT_AVAILABLE
3807 * GENERIC_FAILURE
3808 */
3809#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3810
3811/**
3812 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07003813 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003814 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07003815 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3816 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003817 *
3818 * Note: The RIL implementation should default to "updates enabled"
3819 * when the screen is on and "updates disabled" when the screen is off.
3820 *
3821 * "data" is int *
3822 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3823 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3824 *
3825 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07003826 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003827 * Valid errors:
3828 * SUCCESS
3829 * RADIO_NOT_AVAILABLE
3830 * GENERIC_FAILURE
3831 *
3832 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3833 */
3834#define RIL_REQUEST_SET_LOCATION_UPDATES 76
3835
Wink Savillef4c4d362009-04-02 01:37:03 -07003836/**
Wink Savillec0114b32011-02-18 10:14:07 -08003837 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07003838 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003839 * Request to set the location where the CDMA subscription shall
3840 * be retrieved
3841 *
3842 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003843 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07003844 *
3845 * "response" is NULL
3846 *
3847 * Valid errors:
3848 * SUCCESS
3849 * RADIO_NOT_AVAILABLE
3850 * GENERIC_FAILURE
3851 * SIM_ABSENT
3852 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08003853 *
3854 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07003855 */
Wink Savillec0114b32011-02-18 10:14:07 -08003856#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07003857
3858/**
3859 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003860 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003861 * Request to set the roaming preferences in CDMA
3862 *
3863 * "data" is int *
3864 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3865 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3866 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003867 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003868 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003869 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003870 * Valid errors:
3871 * SUCCESS
3872 * RADIO_NOT_AVAILABLE
3873 * GENERIC_FAILURE
3874 */
3875#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
3876
3877/**
3878 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003879 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003880 * Request the actual setting of the roaming preferences in CDMA in the modem
3881 *
3882 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003883 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003884 * "response" is int *
3885 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
3886 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3887 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003888 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003889 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003890 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003891 * Valid errors:
3892 * SUCCESS
3893 * RADIO_NOT_AVAILABLE
3894 * GENERIC_FAILURE
3895 */
3896#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
3897
3898/**
3899 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003900 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003901 * Request to set the TTY mode
3902 *
3903 * "data" is int *
3904 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003905 * ((int *)data)[0] is == 1 for TTY Full
3906 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
3907 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07003908 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003909 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003910 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003911 * Valid errors:
3912 * SUCCESS
3913 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003914 * INVALID_ARGUMENTS
3915 * MODEM_ERR
3916 * INTERNAL_ERR
3917 * NO_MEMOR
3918 * INVALID_ARGUMENTS
3919 * MODEM_ERR
3920 * INTERNAL_ERR
3921 * NO_MEMORYY
Wink Savillef4c4d362009-04-02 01:37:03 -07003922 * GENERIC_FAILURE
3923 */
3924#define RIL_REQUEST_SET_TTY_MODE 80
3925
3926/**
3927 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003928 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003929 * Request the setting of TTY mode
3930 *
3931 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003932 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003933 * "response" is int *
3934 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003935 * ((int *)response)[0] is == 1 for TTY Full
3936 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
3937 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07003938 *
3939 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003940 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003941 * Valid errors:
3942 * SUCCESS
3943 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003944 * MODEM_ERR
3945 * INTERNAL_ERR
3946 * NO_MEMORY
3947 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07003948 * GENERIC_FAILURE
3949 */
3950#define RIL_REQUEST_QUERY_TTY_MODE 81
3951
3952/**
3953 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
3954 *
3955 * Request to set the preferred voice privacy mode used in voice
3956 * scrambling
3957 *
3958 * "data" is int *
3959 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3960 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003961 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003962 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003963 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003964 * Valid errors:
3965 * SUCCESS
3966 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003967 * INVALID_ARGUMENTS
3968 * SYSTEM_ERR
3969 * MODEM_ERR
3970 * INTERNAL_ERR
3971 * NO_MEMORY
3972 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07003973 * GENERIC_FAILURE
3974 */
3975#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
3976
3977/**
3978 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003979 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003980 * Request the setting of preferred voice privacy mode
3981 *
3982 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003983 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003984 * "response" is int *
3985 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3986 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003987 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003988 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003989 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003990 * Valid errors:
3991 * SUCCESS
3992 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003993 * MODEM_ERR
3994 * INTERNAL_ERR
3995 * NO_MEMORY
3996 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07003997 * GENERIC_FAILURE
3998 */
3999#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
4000
4001/**
4002 * RIL_REQUEST_CDMA_FLASH
4003 *
4004 * Send FLASH
4005 *
4006 * "data" is const char *
4007 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07004008 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004009 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004010 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004011 * Valid errors:
4012 * SUCCESS
4013 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004014 * INVALID_ARGUMENTS
4015 * NO_MEMORY
4016 * SYSTEM_ERR
4017 * MODEM_ERR
4018 * INTERNAL_ERR
4019 * INVALID_CALL_ID
4020 * INVALID_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004021 * GENERIC_FAILURE
4022 *
4023 */
4024#define RIL_REQUEST_CDMA_FLASH 84
4025
4026/**
4027 * RIL_REQUEST_CDMA_BURST_DTMF
4028 *
4029 * Send DTMF string
4030 *
jsh602f80f2009-07-10 15:44:37 -07004031 * "data" is const char **
4032 * ((const char **)data)[0] is a DTMF string
4033 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
4034 * default
4035 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
4036 * default
Wink Saville7f856802009-06-09 10:23:37 -07004037 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004038 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004039 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004040 * Valid errors:
4041 * SUCCESS
4042 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004043 * INVALID_ARGUMENTS
4044 * NO_MEMORY
4045 * SYSTEM_ERR
4046 * MODEM_ERR
4047 * INTERNAL_ERR
4048 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07004049 * GENERIC_FAILURE
4050 *
4051 */
4052#define RIL_REQUEST_CDMA_BURST_DTMF 85
4053
4054/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004055 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07004056 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004057 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
4058 * If the checksum is valid the 20 digit AKEY is written to NV,
4059 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07004060 *
4061 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004062 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
4063 * where the last 6 digits are a checksum of the
4064 * first 20, as specified in TR45.AHAG
4065 * "Common Cryptographic Algorithms, Revision D.1
4066 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07004067 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004068 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004069 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004070 * Valid errors:
4071 * SUCCESS
4072 * RADIO_NOT_AVAILABLE
4073 * GENERIC_FAILURE
4074 *
4075 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004076#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07004077
4078/**
4079 * RIL_REQUEST_CDMA_SEND_SMS
4080 *
4081 * Send a CDMA SMS message
4082 *
4083 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07004084 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004085 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07004086 *
johnwangbfb151b2009-09-11 15:20:38 -07004087 * Based on the return error, caller decides to resend if sending sms
4088 * fails. The CDMA error class is derived as follows,
4089 * SUCCESS is error class 0 (no error)
4090 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
4091 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
4092 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004093 * Valid errors:
4094 * SUCCESS
4095 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07004096 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08004097 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004098 * INVALID_STATE
4099 * INVALID_ARGUMENTS
4100 * NO_MEMORY
4101 * REQUEST_RATE_LIMITED
4102 * INVALID_SMS_FORMAT
4103 * SYSTEM_ERR
4104 * FDN_CHECK_FAILURE
4105 * MODEM_ERR
4106 * NETWORK_ERR
4107 * ENCODING_ERR
4108 * INVALID_SMSC_ADDRESS
4109 * MODE_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004110 * GENERIC_FAILURE
4111 *
4112 */
4113#define RIL_REQUEST_CDMA_SEND_SMS 87
4114
4115/**
4116 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4117 *
4118 * Acknowledge the success or failure in the receipt of SMS
4119 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4120 *
4121 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07004122 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004123 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004124 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004125 * Valid errors:
4126 * SUCCESS
4127 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004128 * INVALID_ARGUMENTS
4129 * NO_SMS_TO_ACK
4130 * INVALID_STATE
4131 * NO_MEMORY
4132 * REQUEST_RATE_LIMITED
4133 * SYSTEM_ERR
4134 * MODEM_ERR
4135 * INVALID_STATE
4136 * MODE_NOT_SUPPORTED
4137 * NETWORK_NOT_READY
4138 * INVALID_MODEM_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004139 * GENERIC_FAILURE
4140 *
4141 */
4142#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
4143
4144/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004145 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004146 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004147 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
4148 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004149 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004150 *
4151 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
4152 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
4153 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004154 * Valid errors:
4155 * SUCCESS
4156 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004157 * INVALID_STATE
4158 * NO_MEMORY
4159 * REQUEST_RATE_LIMITED
4160 * SYSTEM_ERR
4161 * NO_RESOURCES
4162 * MODEM_ERR
4163 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004164 * GENERIC_FAILURE
4165 *
4166 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004167#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07004168
4169/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004170 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004171 *
4172 * Set GSM/WCDMA Cell Broadcast SMS config
4173 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004174 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
4175 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
4176 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004177 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004178 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004179 * Valid errors:
4180 * SUCCESS
4181 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004182 * INVALID_STATE
4183 * INVALID_ARGUMENTS
4184 * NO_MEMORY
4185 * SYSTEM_ERR
4186 * REQUEST_RATE_LIMITED
4187 * MODEM_ERR
4188 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004189 * GENERIC_FAILURE
4190 *
4191 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004192#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07004193
4194/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004195 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004196 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004197* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07004198 *
4199 * "data" is const int *
4200 * (const int *)data[0] indicates to activate or turn off the
4201 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
4202 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004203 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004204 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004205 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004206 * Valid errors:
4207 * SUCCESS
4208 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004209 * INVALID_STATE
4210 * INVALID_ARGUMENTS
4211 * NO_MEMORY
4212 * SYSTEM_ERR
4213 * REQUEST_RATE_LIMITED
4214 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004215 * GENERIC_FAILURE
4216 *
4217 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004218#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07004219
4220/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004221 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004222 *
4223 * Request the setting of CDMA Broadcast SMS config
4224 *
4225 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004226 *
4227 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
4228 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
4229 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004230 * Valid errors:
4231 * SUCCESS
4232 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004233 * INVALID_STATE
4234 * NO_MEMORY
4235 * REQUEST_RATE_LIMITED
4236 * SYSTEM_ERR
4237 * NO_RESOURCES
4238 * MODEM_ERR
4239 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004240 * GENERIC_FAILURE
4241 *
4242 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004243#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07004244
4245/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004246 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004247 *
4248 * Set CDMA Broadcast SMS config
4249 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004250 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
4251 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
4252 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004253 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004254 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004255 * Valid errors:
4256 * SUCCESS
4257 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004258 * INVALID_STATE
4259 * INVALID_ARGUMENTS
4260 * NO_MEMORY
4261 * SYSTEM_ERR
4262 * REQUEST_RATE_LIMITED
4263 * MODEM_ERR
4264 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004265 * GENERIC_FAILURE
4266 *
4267 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004268#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07004269
4270/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004271 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004272 *
4273 * Enable or disable the reception of CDMA Broadcast SMS
4274 *
4275 * "data" is const int *
4276 * (const int *)data[0] indicates to activate or turn off the
4277 * reception of CDMA Broadcast SMS, 0-1,
4278 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004279 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004280 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004281 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004282 * Valid errors:
4283 * SUCCESS
4284 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004285 * INVALID_STATE
4286 * INVALID_ARGUMENTS
4287 * NO_MEMORY
4288 * SYSTEM_ERR
4289 * REQUEST_RATE_LIMITED
4290 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004291 * GENERIC_FAILURE
4292 *
4293 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004294#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07004295
4296/**
4297 * RIL_REQUEST_CDMA_SUBSCRIPTION
4298 *
4299 * Request the device MDN / H_SID / H_NID.
4300 *
4301 * The request is only allowed when CDMA subscription is available. When CDMA
4302 * subscription is changed, application layer should re-issue the request to
4303 * update the subscription information.
4304 *
4305 * If a NULL value is returned for any of the device id, it means that error
4306 * accessing the device.
4307 *
4308 * "response" is const char **
4309 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07004310 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
4311 * CDMA subscription is available, in decimal format
4312 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
4313 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07004314 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07004315 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07004316 *
4317 * Valid errors:
4318 * SUCCESS
4319 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
4320 */
4321
Wink Savilleeafe79d2009-04-03 18:02:34 -07004322#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07004323
4324/**
4325 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
4326 *
4327 * Stores a CDMA SMS message to RUIM memory.
4328 *
4329 * "data" is RIL_CDMA_SMS_WriteArgs *
4330 *
4331 * "response" is int *
4332 * ((const int *)response)[0] is the record index where the message is stored.
4333 *
4334 * Valid errors:
4335 * SUCCESS
4336 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004337 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08004338 * INVALID_ARGUMENTS
4339 * INVALID_SMS_FORMAT
4340 * INTERNAL_ERR
4341 * MODEM_ERR
4342 * ENCODING_ERR
4343 * NO_MEMORY
4344 * NO_RESOURCES
4345 * INVALID_MODEM_STATE
4346 * MODE_NOT_SUPPORTED
4347 * INVALID_SMSC_ADDRESS
Wink Savillef4c4d362009-04-02 01:37:03 -07004348 * GENERIC_FAILURE
4349 *
4350 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004351#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07004352
4353/**
4354 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
4355 *
4356 * Deletes a CDMA SMS message from RUIM memory.
4357 *
4358 * "data" is int *
4359 * ((int *)data)[0] is the record index of the message to delete.
4360 *
4361 * "response" is NULL
4362 *
4363 * Valid errors:
4364 * SUCCESS
4365 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004366 * INVALID_ARGUMENTS
4367 * NO_MEMORY
4368 * REQUEST_RATE_LIMITED
4369 * SYSTEM_ERR
4370 * MODEM_ERR
4371 * NO_SUCH_ENTRY
Wink Savillef4c4d362009-04-02 01:37:03 -07004372 * GENERIC_FAILURE
4373 *
4374 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004375#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07004376
4377/**
4378 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07004379 *
4380 * Request the device ESN / MEID / IMEI / IMEISV.
4381 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004382 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07004383 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07004384 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004385 *
4386 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07004387 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004388 *
4389 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07004390 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004391 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004392 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07004393 * ((const char **)response)[0] is IMEI if GSM subscription is available
4394 * ((const char **)response)[1] is IMEISV if GSM subscription is available
4395 * ((const char **)response)[2] is ESN if CDMA subscription is available
4396 * ((const char **)response)[3] is MEID if CDMA subscription is available
4397 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004398 * Valid errors:
4399 * SUCCESS
4400 * RADIO_NOT_AVAILABLE
4401 * GENERIC_FAILURE
4402 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004403#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07004404
Wink Saville1b5fd232009-04-22 14:50:00 -07004405/**
4406 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
4407 *
4408 * Request the radio's system selection module to exit emergency
4409 * callback mode. RIL will not respond with SUCCESS until the modem has
4410 * completely exited from Emergency Callback Mode.
4411 *
4412 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004413 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004414 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004415 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004416 * Valid errors:
4417 * SUCCESS
4418 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004419 * OPERATION_NOT_ALLOWED
Wink Saville1b5fd232009-04-22 14:50:00 -07004420 * GENERIC_FAILURE
4421 *
4422 */
4423#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07004424
jsh000a9fe2009-05-11 14:52:35 -07004425/**
4426 * RIL_REQUEST_GET_SMSC_ADDRESS
4427 *
4428 * Queries the default Short Message Service Center address on the device.
4429 *
4430 * "data" is NULL
4431 *
4432 * "response" is const char * containing the SMSC address.
4433 *
4434 * Valid errors:
4435 * SUCCESS
4436 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004437 * NO_MEMORY
4438 * REQUEST_RATE_LIMITED
4439 * SYSTEM_ERR
4440 * INTERNAL_ERR
4441 * MODEM_ERR
4442 * INVALID_ARGUMENTS
4443 * INVALID_MODEM_STATE
4444 * NOT_PROVISIONED
jsh000a9fe2009-05-11 14:52:35 -07004445 * GENERIC_FAILURE
4446 *
4447 */
4448#define RIL_REQUEST_GET_SMSC_ADDRESS 100
4449
4450/**
4451 * RIL_REQUEST_SET_SMSC_ADDRESS
4452 *
4453 * Sets the default Short Message Service Center address on the device.
4454 *
4455 * "data" is const char * containing the SMSC address.
4456 *
4457 * "response" is NULL
4458 *
4459 * Valid errors:
4460 * SUCCESS
4461 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004462 * INVALID_ARGUMENTS
4463 * INVALID_SMS_FORMAT
4464 * NO_MEMORY
4465 * SYSTEM_ERR
4466 * REQUEST_RATE_LIMITED
4467 * MODEM_ERR
4468 * NO_RESOURCES
jsh000a9fe2009-05-11 14:52:35 -07004469 * GENERIC_FAILURE
4470 *
4471 */
4472#define RIL_REQUEST_SET_SMSC_ADDRESS 101
4473
jshb60444e2009-05-29 11:09:17 -07004474/**
4475 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
4476 *
4477 * Indicates whether there is storage available for new SMS messages.
4478 *
4479 * "data" is int *
4480 * ((int *)data)[0] is 1 if memory is available for storing new messages
4481 * is 0 if memory capacity is exceeded
4482 *
4483 * "response" is NULL
4484 *
4485 * Valid errors:
4486 * SUCCESS
4487 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004488 * INVALID_ARGUMENTS
4489 * NO_MEMORY
4490 * INVALID_STATE
4491 * SYSTEM_ERR
4492 * REQUEST_RATE_LIMITED
4493 * MODEM_ERR
jshb60444e2009-05-29 11:09:17 -07004494 * GENERIC_FAILURE
4495 *
4496 */
4497#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
4498
Wink Saville2641d5b2009-06-08 17:40:42 -07004499/**
4500 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
4501 *
4502 * Indicates that the StkSerivce is running and is
4503 * ready to receive RIL_UNSOL_STK_XXXXX commands.
4504 *
4505 * "data" is NULL
4506 * "response" is NULL
4507 *
4508 * Valid errors:
4509 * SUCCESS
4510 * RADIO_NOT_AVAILABLE
4511 * GENERIC_FAILURE
4512 *
4513 */
4514#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
4515
Wink Savillec0114b32011-02-18 10:14:07 -08004516/**
4517 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
4518 *
4519 * Request to query the location where the CDMA subscription shall
4520 * be retrieved
4521 *
4522 * "data" is NULL
4523 *
4524 * "response" is int *
4525 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4526 *
4527 * Valid errors:
4528 * SUCCESS
4529 * RADIO_NOT_AVAILABLE
4530 * GENERIC_FAILURE
4531 * SUBSCRIPTION_NOT_AVAILABLE
4532 *
4533 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
4534 */
4535#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
4536
Jake Hambyfa8d5842011-08-19 16:22:18 -07004537/**
4538 * RIL_REQUEST_ISIM_AUTHENTICATION
4539 *
4540 * Request the ISIM application on the UICC to perform AKA
4541 * challenge/response algorithm for IMS authentication
4542 *
4543 * "data" is a const char * containing the challenge string in Base64 format
4544 * "response" is a const char * containing the response in Base64 format
4545 *
4546 * Valid errors:
4547 * SUCCESS
4548 * RADIO_NOT_AVAILABLE
4549 * GENERIC_FAILURE
4550 */
4551#define RIL_REQUEST_ISIM_AUTHENTICATION 105
4552
Jake Hamby300105d2011-09-26 01:01:44 -07004553/**
4554 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
4555 *
4556 * Acknowledge successful or failed receipt of SMS previously indicated
4557 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
4558 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
4559 *
4560 * "data" is const char **
4561 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
4562 * is "0" on failed receipt (send RP-ERROR)
4563 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
4564 *
4565 * "response" is NULL
4566 *
4567 * Valid errors:
4568 * SUCCESS
4569 * RADIO_NOT_AVAILABLE
4570 * GENERIC_FAILURE
4571 */
4572#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
4573
4574/**
4575 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
4576 *
4577 * Requests to send a SAT/USAT envelope command to SIM.
4578 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
4579 *
4580 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
4581 * the SW1 and SW2 status bytes from the UICC response are returned along with
4582 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
4583 *
4584 * The RIL implementation shall perform the normal processing of a '91XX'
4585 * response in SW1/SW2 to retrieve the pending proactive command and send it
4586 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
4587 *
4588 * "data" is a const char * containing the SAT/USAT command
4589 * in hexadecimal format starting with command tag
4590 *
4591 * "response" is a const RIL_SIM_IO_Response *
4592 *
4593 * Valid errors:
4594 * RIL_E_SUCCESS
4595 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08004596 * SIM_BUSY
4597 * OPERATION_NOT_ALLOWED
Jake Hamby300105d2011-09-26 01:01:44 -07004598 * RIL_E_GENERIC_FAILURE
4599 */
4600#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
4601
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004602/**
4603 * RIL_REQUEST_VOICE_RADIO_TECH
4604 *
4605 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
4606 * when radio state is RADIO_STATE_ON
4607 *
4608 * "data" is NULL
4609 * "response" is int *
4610 * ((int *) response)[0] is of type const RIL_RadioTechnology
4611 *
4612 * Valid errors:
4613 * SUCCESS
4614 * RADIO_NOT_AVAILABLE
4615 * GENERIC_FAILURE
4616 */
4617#define RIL_REQUEST_VOICE_RADIO_TECH 108
4618
Wink Saville8a9e0212013-04-09 12:11:38 -07004619/**
4620 * RIL_REQUEST_GET_CELL_INFO_LIST
4621 *
4622 * Request all of the current cell information known to the radio. The radio
4623 * must a list of all current cells, including the neighboring cells. If for a particular
4624 * cell information isn't known then the appropriate unknown value will be returned.
4625 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
4626 *
4627 * "data" is NULL
4628 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08004629 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07004630 */
4631#define RIL_REQUEST_GET_CELL_INFO_LIST 109
4632
4633/**
4634 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
4635 *
4636 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
Wink Savillec57b3eb2013-04-17 12:51:41 -07004637 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
Wink Saville8a9e0212013-04-09 12:11:38 -07004638 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
4639 * a RIL_UNSOL_CELL_INFO_LIST.
4640 *
4641 * "data" is int *
4642 * ((int *)data)[0] is minimum time in milliseconds
4643 *
4644 * "response" is NULL
4645 *
4646 * Valid errors:
4647 * SUCCESS
4648 * RADIO_NOT_AVAILABLE
4649 * GENERIC_FAILURE
4650 */
4651#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
Jake Hamby300105d2011-09-26 01:01:44 -07004652
Sungmin Choi75697532013-04-26 15:04:45 -07004653/**
4654 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
4655 *
4656 * Set an apn to initial attach network
Ankit Nbc37e512016-12-07 21:05:43 +05304657 *
4658 * "data" is a const char **
4659 * ((const char **)data)[0] is the APN to connect if radio technology is LTE
4660 * ((const char **)data)[1] is the connection type to request must be one of the
4661 * PDP_type values in TS 27.007 section 10.1.1.
4662 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
4663 * ((const char **)data)[2] is the PAP / CHAP auth type. Values:
4664 * 0 => PAP and CHAP is never performed.
4665 * 1 => PAP may be performed; CHAP is never performed.
4666 * 2 => CHAP may be performed; PAP is never performed.
4667 * 3 => PAP / CHAP may be performed - baseband dependent.
4668 * ((const char **)data)[3] is the username for APN, or NULL
4669 * ((const char **)data)[4] is the password for APN, or NULL
4670 *
Sungmin Choi75697532013-04-26 15:04:45 -07004671 * "response" is NULL
4672 *
4673 * Valid errors:
4674 * SUCCESS
4675 * RADIO_NOT_AVAILABLE (radio resetting)
4676 * GENERIC_FAILURE
4677 * SUBSCRIPTION_NOT_AVAILABLE
4678 */
4679#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
4680
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004681/**
4682 * RIL_REQUEST_IMS_REGISTRATION_STATE
4683 *
Nathan Harold0eb43c22016-12-19 12:04:32 -08004684 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
4685 * instead, provide IMS registration status via an IMS Service.
4686 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004687 * Request current IMS registration state
4688 *
4689 * "data" is NULL
4690 *
4691 * "response" is int *
4692 * ((int *)response)[0] is registration state:
4693 * 0 - Not registered
4694 * 1 - Registered
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004695 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004696 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004697 * must follow with IMS SMS format:
4698 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004699 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
4700 *
4701 * Valid errors:
4702 * SUCCESS
4703 * RADIO_NOT_AVAILABLE
4704 * GENERIC_FAILURE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004705 */
4706#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
4707
4708/**
4709 * RIL_REQUEST_IMS_SEND_SMS
4710 *
4711 * Send a SMS message over IMS
4712 *
4713 * "data" is const RIL_IMS_SMS_Message *
4714 *
4715 * "response" is a const RIL_SMS_Response *
4716 *
4717 * Based on the return error, caller decides to resend if sending sms
4718 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
4719 * In case of retry, data is encoded based on Voice Technology available.
4720 *
4721 * Valid errors:
4722 * SUCCESS
4723 * RADIO_NOT_AVAILABLE
4724 * SMS_SEND_FAIL_RETRY
4725 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08004726 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004727 * INVALID_ARGUMENTS
4728 * INVALID_STATE
4729 * NO_MEMORY
4730 * INVALID_SMS_FORMAT
4731 * SYSTEM_ERR
4732 * REQUEST_RATE_LIMITED
4733 * MODEM_ERR
4734 * NETWORK_ERR
4735 * ENCODING_ERR
4736 * INVALID_SMSC_ADDRESS
4737 * MODE_NOT_SUPPORTED
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004738 * GENERIC_FAILURE
4739 *
4740 */
4741#define RIL_REQUEST_IMS_SEND_SMS 113
4742
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004743/**
4744 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
4745 *
4746 * Request APDU exchange on the basic channel. This command reflects TS 27.007
4747 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
4748 * of GSM/CDMA, and filter commands appropriately. It should filter
4749 * channel management and SELECT by DF name commands.
4750 *
4751 * "data" is a const RIL_SIM_APDU *
4752 * "sessionid" field should be ignored.
4753 *
4754 * "response" is a const RIL_SIM_IO_Response *
4755 *
4756 * Valid errors:
4757 * SUCCESS
4758 * RADIO_NOT_AVAILABLE
4759 * GENERIC_FAILURE
4760 */
4761#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
4762
4763/**
4764 * RIL_REQUEST_SIM_OPEN_CHANNEL
4765 *
4766 * Open a new logical channel and select the given application. This command
4767 * reflects TS 27.007 "open logical channel" operation (+CCHO).
4768 *
4769 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
4770 *
4771 * "response" is int *
4772 * ((int *)data)[0] contains the session id of the logical channel.
Shishir Agrawal760123f2014-10-14 09:14:57 -07004773 * ((int *)data)[1] onwards may optionally contain the select response for the
4774 * open channel command with one byte per integer.
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004775 *
4776 * Valid errors:
4777 * SUCCESS
4778 * RADIO_NOT_AVAILABLE
4779 * GENERIC_FAILURE
4780 * MISSING_RESOURCE
4781 * NO_SUCH_ELEMENT
4782 */
4783#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
4784
4785/**
4786 * RIL_REQUEST_SIM_CLOSE_CHANNEL
4787 *
4788 * Close a previously opened logical channel. This command reflects TS 27.007
4789 * "close logical channel" operation (+CCHC).
4790 *
4791 * "data" is int *
4792 * ((int *)data)[0] is the session id of logical the channel to close.
4793 *
4794 * "response" is NULL
4795 *
4796 * Valid errors:
4797 * SUCCESS
4798 * RADIO_NOT_AVAILABLE
4799 * GENERIC_FAILURE
4800 */
4801#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
4802
4803/**
4804 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
4805 *
4806 * Exchange APDUs with a UICC over a previously opened logical channel. This
4807 * command reflects TS 27.007 "generic logical channel access" operation
4808 * (+CGLA). The modem should filter channel management and SELECT by DF name
4809 * commands.
4810 *
4811 * "data" is a const RIL_SIM_APDU*
4812 *
4813 * "response" is a const RIL_SIM_IO_Response *
4814 *
4815 * Valid errors:
4816 * SUCCESS
4817 * RADIO_NOT_AVAILABLE
4818 * GENERIC_FAILURE
4819 */
4820#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
4821
Jake Hamby8a4a2332014-01-15 13:12:05 -08004822/**
4823 * RIL_REQUEST_NV_READ_ITEM
4824 *
4825 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4826 * This is used for device configuration by some CDMA operators.
4827 *
4828 * "data" is a const RIL_NV_ReadItem *
4829 *
4830 * "response" is const char * containing the contents of the NV item
4831 *
4832 * Valid errors:
4833 * SUCCESS
4834 * RADIO_NOT_AVAILABLE
4835 * GENERIC_FAILURE
4836 */
4837#define RIL_REQUEST_NV_READ_ITEM 118
4838
4839/**
4840 * RIL_REQUEST_NV_WRITE_ITEM
4841 *
4842 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4843 * This is used for device configuration by some CDMA operators.
4844 *
4845 * "data" is a const RIL_NV_WriteItem *
4846 *
4847 * "response" is NULL
4848 *
4849 * Valid errors:
4850 * SUCCESS
4851 * RADIO_NOT_AVAILABLE
4852 * GENERIC_FAILURE
4853 */
4854#define RIL_REQUEST_NV_WRITE_ITEM 119
4855
4856/**
4857 * RIL_REQUEST_NV_WRITE_CDMA_PRL
4858 *
4859 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
4860 * This is used for device configuration by some CDMA operators.
4861 *
4862 * "data" is a const char * containing the PRL as a byte array
4863 *
4864 * "response" is NULL
4865 *
4866 * Valid errors:
4867 * SUCCESS
4868 * RADIO_NOT_AVAILABLE
4869 * GENERIC_FAILURE
4870 */
4871#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
4872
4873/**
4874 * RIL_REQUEST_NV_RESET_CONFIG
4875 *
4876 * Reset the radio NV configuration to the factory state.
4877 * This is used for device configuration by some CDMA operators.
4878 *
4879 * "data" is int *
Jake Hambyd27c9d52014-02-06 14:52:05 -08004880 * ((int *)data)[0] is 1 to reload all NV items
4881 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
4882 * ((int *)data)[0] is 3 for factory reset (RTN)
Jake Hamby8a4a2332014-01-15 13:12:05 -08004883 *
4884 * "response" is NULL
4885 *
4886 * Valid errors:
4887 * SUCCESS
4888 * RADIO_NOT_AVAILABLE
4889 * GENERIC_FAILURE
4890 */
4891#define RIL_REQUEST_NV_RESET_CONFIG 121
4892
Etan Cohend3652192014-06-20 08:28:44 -07004893 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
4894 * FIXME This API needs to have more documentation.
4895 *
4896 * Selection/de-selection of a subscription from a SIM card
4897 * "data" is const RIL_SelectUiccSub*
4898
4899 *
4900 * "response" is NULL
4901 *
4902 * Valid errors:
4903 * SUCCESS
4904 * RADIO_NOT_AVAILABLE (radio resetting)
4905 * GENERIC_FAILURE
4906 * SUBSCRIPTION_NOT_SUPPORTED
4907 *
4908 */
4909#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
4910
4911/**
4912 * RIL_REQUEST_ALLOW_DATA
4913 *
4914 * Tells the modem whether data calls are allowed or not
4915 *
4916 * "data" is int *
4917 * FIXME slotId and aid will be added.
4918 * ((int *)data)[0] is == 0 to allow data calls
4919 * ((int *)data)[0] is == 1 to disallow data calls
4920 *
4921 * "response" is NULL
4922 *
4923 * Valid errors:
4924 *
4925 * SUCCESS
4926 * RADIO_NOT_AVAILABLE (radio resetting)
4927 * GENERIC_FAILURE
4928 *
4929 */
4930#define RIL_REQUEST_ALLOW_DATA 123
4931
4932/**
4933 * RIL_REQUEST_GET_HARDWARE_CONFIG
4934 *
4935 * Request all of the current hardware (modem and sim) associated
4936 * with the RIL.
4937 *
4938 * "data" is NULL
4939 *
4940 * "response" is an array of RIL_HardwareConfig.
4941 */
4942#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
4943
4944/**
Amit Mahajan2b772032014-06-26 14:20:11 -07004945 * RIL_REQUEST_SIM_AUTHENTICATION
Etan Cohend3652192014-06-20 08:28:44 -07004946 *
4947 * Returns the response of SIM Authentication through RIL to a
4948 * challenge request.
4949 *
4950 * "data" Base64 encoded string containing challenge:
4951 * int authContext; P2 value of authentication command, see P2 parameter in
4952 * 3GPP TS 31.102 7.1.2
4953 * char *authData; the challenge string in Base64 format, see 3GPP
4954 * TS 31.102 7.1.2
4955 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
4956 * NULL if no value
4957 *
4958 * "response" Base64 encoded strings containing response:
4959 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
4960 * int sw2;
4961 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
4962 */
Amit Mahajan2b772032014-06-26 14:20:11 -07004963#define RIL_REQUEST_SIM_AUTHENTICATION 125
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004964
Wink Savillec29360a2014-07-13 05:17:28 -07004965/**
4966 * RIL_REQUEST_GET_DC_RT_INFO
4967 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004968 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07004969 * Requests the Data Connection Real Time Info
4970 *
4971 * "data" is NULL
4972 *
4973 * "response" is the most recent RIL_DcRtInfo
4974 *
4975 * Valid errors:
4976 * SUCCESS
4977 * RADIO_NOT_AVAILABLE
4978 * GENERIC_FAILURE
4979 *
4980 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
4981 */
4982#define RIL_REQUEST_GET_DC_RT_INFO 126
4983
4984/**
4985 * RIL_REQUEST_SET_DC_RT_INFO_RATE
4986 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004987 * The request is DEPRECATED
Wink Savillec29360a2014-07-13 05:17:28 -07004988 * This is the minimum number of milliseconds between successive
4989 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
4990 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
4991 * 0 means send as fast as possible.
4992 *
4993 * "data" The number of milliseconds as an int
4994 *
4995 * "response" is null
4996 *
4997 * Valid errors:
4998 * SUCCESS must not fail
4999 */
5000#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
5001
Amit Mahajanc796e222014-08-13 16:54:01 +00005002/**
5003 * RIL_REQUEST_SET_DATA_PROFILE
5004 *
5005 * Set data profile in modem
Hui Wang8d679622014-10-16 14:59:27 -05005006 * Modem should erase existed profiles from framework, and apply new profiles
Amit Mahajanc796e222014-08-13 16:54:01 +00005007 * "data" is an const RIL_DataProfileInfo **
5008 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
5009 * "response" is NULL
5010 *
5011 * Valid errors:
5012 * SUCCESS
5013 * RADIO_NOT_AVAILABLE (radio resetting)
5014 * GENERIC_FAILURE
5015 * SUBSCRIPTION_NOT_AVAILABLE
5016 */
5017#define RIL_REQUEST_SET_DATA_PROFILE 128
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005018
5019/**
5020 * RIL_REQUEST_SHUTDOWN
5021 *
5022 * Device is shutting down. All further commands are ignored
5023 * and RADIO_NOT_AVAILABLE must be returned.
5024 *
5025 * "data" is null
5026 * "response" is NULL
5027 *
5028 * Valid errors:
5029 * SUCCESS
5030 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005031 * OPERATION_NOT_ALLOWED
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005032 * GENERIC_FAILURE
5033 */
5034#define RIL_REQUEST_SHUTDOWN 129
5035
Wink Saville8b4e4f72014-10-17 15:01:45 -07005036/**
5037 * RIL_REQUEST_GET_RADIO_CAPABILITY
5038 *
5039 * Used to get phone radio capablility.
5040 *
Abhishek Adappa772c0d22015-02-09 11:11:12 -08005041 * "data" is the RIL_RadioCapability structure
Wink Saville8b4e4f72014-10-17 15:01:45 -07005042 *
5043 * Valid errors:
5044 * SUCCESS
5045 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005046 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005047 * GENERIC_FAILURE
5048 */
5049#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
5050
5051/**
5052 * RIL_REQUEST_SET_RADIO_CAPABILITY
5053 *
5054 * Used to set the phones radio capability. Be VERY careful
5055 * using this request as it may cause some vendor modems to reset. Because
5056 * of the possible modem reset any RIL commands after this one may not be
5057 * processed.
5058 *
5059 * "data" is the RIL_RadioCapability structure
5060 *
5061 * "response" is the RIL_RadioCapability structure, used to feedback return status
5062 *
5063 * Valid errors:
5064 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
5065 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005066 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005067 * GENERIC_FAILURE
5068 */
5069#define RIL_REQUEST_SET_RADIO_CAPABILITY 131
5070
fengluf7408292015-04-14 14:53:55 -07005071/**
5072 * RIL_REQUEST_START_LCE
5073 *
5074 * Start Link Capacity Estimate (LCE) service if supported by the radio.
5075 *
5076 * "data" is const int *
5077 * ((const int*)data)[0] specifies the desired reporting interval (ms).
fenglu290add32015-05-01 17:05:15 -07005078 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
fengluf7408292015-04-14 14:53:55 -07005079 *
fenglu290add32015-05-01 17:05:15 -07005080 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005081 *
5082 * Valid errors:
5083 * SUCCESS
5084 * RADIO_NOT_AVAILABLE
5085 * LCE_NOT_SUPPORTED
5086 */
5087#define RIL_REQUEST_START_LCE 132
5088
5089/**
5090 * RIL_REQUEST_STOP_LCE
5091 *
5092 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
5093 * idempotent for the radio modem.
5094 *
fenglu290add32015-05-01 17:05:15 -07005095 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005096 *
5097 * Valid errors:
5098 * SUCCESS
5099 * RADIO_NOT_AVAILABLE
5100 * LCE_NOT_SUPPORTED
5101 */
5102#define RIL_REQUEST_STOP_LCE 133
5103
5104/**
5105 * RIL_REQUEST_PULL_LCEDATA
5106 *
5107 * Pull LCE service for capacity information.
5108 *
fenglu290add32015-05-01 17:05:15 -07005109 * "response" is the RIL_LceDataInfo.
fengluf7408292015-04-14 14:53:55 -07005110 *
5111 * Valid errors:
5112 * SUCCESS
5113 * RADIO_NOT_AVAILABLE
5114 * LCE_NOT_SUPPORTED
5115 */
5116#define RIL_REQUEST_PULL_LCEDATA 134
5117
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005118/**
5119 * RIL_REQUEST_GET_ACTIVITY_INFO
5120 *
Nathan Haroldc8635212016-10-10 11:15:21 -07005121 * Get modem activity information for power consumption estimation.
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005122 *
Nathan Haroldc8635212016-10-10 11:15:21 -07005123 * Request clear-on-read statistics information that is used for
5124 * estimating the per-millisecond power consumption of the cellular
5125 * modem.
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005126 *
5127 * "data" is null
5128 * "response" is const RIL_ActivityStatsInfo *
5129 *
5130 * Valid errors:
5131 *
5132 * SUCCESS
5133 * RADIO_NOT_AVAILABLE (radio resetting)
5134 * GENERIC_FAILURE
5135 */
5136#define RIL_REQUEST_GET_ACTIVITY_INFO 135
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005137
Meng Wangb4e34312016-05-12 14:54:36 -07005138/**
5139 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS
5140 *
Meng Wangd5c540f2016-07-15 15:41:19 -07005141 * Set carrier restrictions for this sim slot. Expected modem behavior:
5142 * If never receives this command
5143 * - Must allow all carriers
5144 * Receives this command with data being NULL
5145 * - Must allow all carriers. If a previously allowed SIM is present, modem must not reload
5146 * the SIM. If a previously disallowed SIM is present, reload the SIM and notify Android.
5147 * Receives this command with a list of carriers
5148 * - Only allow specified carriers, persist across power cycles and FDR. If a present SIM
5149 * is in the allowed list, modem must not reload the SIM. If a present SIM is *not* in
5150 * the allowed list, modem must detach from the registered network and only keep emergency
5151 * service, and notify Android SIM refresh reset with new SIM state being
5152 * RIL_CARDSTATE_RESTRICTED. Emergency service must be enabled.
Meng Wangb4e34312016-05-12 14:54:36 -07005153 *
5154 * "data" is const RIL_CarrierRestrictions *
5155 * A list of allowed carriers and possibly a list of excluded carriers.
5156 * If data is NULL, means to clear previous carrier restrictions and allow all carriers
5157 *
5158 * "response" is int *
5159 * ((int *)data)[0] contains the number of allowed carriers which have been set correctly.
5160 * On success, it should match the length of list data->allowed_carriers.
5161 * If data is NULL, the value must be 0.
5162 *
5163 * Valid errors:
5164 * RIL_E_SUCCESS
5165 * RIL_E_INVALID_ARGUMENTS
5166 * RIL_E_RADIO_NOT_AVAILABLE
5167 * RIL_E_REQUEST_NOT_SUPPORTED
5168 */
5169#define RIL_REQUEST_SET_CARRIER_RESTRICTIONS 136
5170
5171/**
5172 * RIL_REQUEST_GET_CARRIER_RESTRICTIONS
5173 *
Meng Wangd5c540f2016-07-15 15:41:19 -07005174 * Get carrier restrictions for this sim slot. Expected modem behavior:
5175 * Return list of allowed carriers, or null if all carriers are allowed.
Meng Wangb4e34312016-05-12 14:54:36 -07005176 *
5177 * "data" is NULL
5178 *
5179 * "response" is const RIL_CarrierRestrictions *.
5180 * If response is NULL, it means all carriers are allowed.
5181 *
5182 * Valid errors:
5183 * RIL_E_SUCCESS
5184 * RIL_E_RADIO_NOT_AVAILABLE
5185 * RIL_E_REQUEST_NOT_SUPPORTED
5186 */
5187#define RIL_REQUEST_GET_CARRIER_RESTRICTIONS 137
5188
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005189/***********************************************************************/
5190
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005191/**
5192 * RIL_RESPONSE_ACKNOWLEDGEMENT
5193 *
5194 * This is used by Asynchronous solicited messages and Unsolicited messages
5195 * to acknowledge the receipt of those messages in RIL.java so that the ack
5196 * can be used to let ril.cpp to release wakelock.
5197 *
5198 * Valid errors
5199 * SUCCESS
5200 * RADIO_NOT_AVAILABLE
5201 */
5202
5203#define RIL_RESPONSE_ACKNOWLEDGEMENT 800
5204
5205/***********************************************************************/
5206
Wink Savillef4c4d362009-04-02 01:37:03 -07005207
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005208#define RIL_UNSOL_RESPONSE_BASE 1000
5209
5210/**
5211 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
5212 *
5213 * Indicate when value of RIL_RadioState has changed.
5214 *
5215 * Callee will invoke RIL_RadioStateRequest method on main thread
5216 *
5217 * "data" is NULL
5218 */
5219
5220#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
5221
5222
5223/**
5224 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
5225 *
5226 * Indicate when call state has changed
5227 *
5228 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
5229 *
5230 * "data" is NULL
5231 *
Wink Saville7f856802009-06-09 10:23:37 -07005232 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005233 * "RING", "BUSY", "NO CARRIER", and also call state
5234 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
5235 *
5236 * Redundent or extraneous invocations are tolerated
5237 */
5238#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
5239
5240
5241/**
Wink Savillec0114b32011-02-18 10:14:07 -08005242 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005243 *
Wink Savillec0114b32011-02-18 10:14:07 -08005244 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005245 *
5246 * Callee will invoke the following requests on main thread:
5247 *
Wink Savillec0114b32011-02-18 10:14:07 -08005248 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005249 * RIL_REQUEST_OPERATOR
5250 *
5251 * "data" is NULL
5252 *
5253 * FIXME should this happen when SIM records are loaded? (eg, for
5254 * EONS)
5255 */
Wink Savillec0114b32011-02-18 10:14:07 -08005256#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005257
5258/**
5259 * RIL_UNSOL_RESPONSE_NEW_SMS
5260 *
5261 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07005262 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005263 * "data" is const char *
5264 * This is a pointer to a string containing the PDU of an SMS-DELIVER
5265 * as an ascii string of hex digits. The PDU starts with the SMSC address
5266 * per TS 27.005 (+CMT:)
5267 *
5268 * Callee will subsequently confirm the receipt of thei SMS with a
5269 * RIL_REQUEST_SMS_ACKNOWLEDGE
5270 *
Wink Saville7f856802009-06-09 10:23:37 -07005271 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005272 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5273 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5274 */
5275
5276#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
5277
5278/**
5279 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
5280 *
5281 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07005282 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005283 * "data" is const char *
5284 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
5285 * as an ascii string of hex digits. The PDU starts with the SMSC address
5286 * per TS 27.005 (+CDS:).
5287 *
5288 * Callee will subsequently confirm the receipt of the SMS with a
5289 * RIL_REQUEST_SMS_ACKNOWLEDGE
5290 *
Wink Saville7f856802009-06-09 10:23:37 -07005291 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005292 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5293 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5294 */
5295
5296#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
5297
5298/**
5299 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
5300 *
5301 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07005302 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005303 * "data" is const int *
5304 * ((const int *)data)[0] contains the slot index on the SIM that contains
5305 * the new message
5306 */
5307
5308#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
5309
5310/**
5311 * RIL_UNSOL_ON_USSD
5312 *
5313 * Called when a new USSD message is received.
5314 *
5315 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07005316 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005317 * one of these string values:
5318 * "0" USSD-Notify -- text in ((const char **)data)[1]
5319 * "1" USSD-Request -- text in ((const char **)data)[1]
5320 * "2" Session terminated by network
5321 * "3" other local client (eg, SIM Toolkit) has responded
5322 * "4" Operation not supported
5323 * "5" Network timeout
5324 *
5325 * The USSD session is assumed to persist if the type code is "1", otherwise
5326 * the current session (if any) is assumed to have terminated.
5327 *
5328 * ((const char **)data)[1] points to a message string if applicable, which
5329 * should always be in UTF-8.
5330 */
5331#define RIL_UNSOL_ON_USSD 1006
5332/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
5333
5334/**
5335 * RIL_UNSOL_ON_USSD_REQUEST
5336 *
5337 * Obsolete. Send via RIL_UNSOL_ON_USSD
5338 */
Wink Saville7f856802009-06-09 10:23:37 -07005339#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005340
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005341/**
5342 * RIL_UNSOL_NITZ_TIME_RECEIVED
5343 *
5344 * Called when radio has received a NITZ time message
5345 *
5346 * "data" is const char * pointing to NITZ time string
5347 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
5348 */
5349#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
5350
5351/**
5352 * RIL_UNSOL_SIGNAL_STRENGTH
5353 *
5354 * Radio may report signal strength rather han have it polled.
5355 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005356 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005357 */
5358#define RIL_UNSOL_SIGNAL_STRENGTH 1009
5359
5360
5361/**
Wink Savillef4c4d362009-04-02 01:37:03 -07005362 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005363 *
Wink Savillec0114b32011-02-18 10:14:07 -08005364 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07005365 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
5366 * of current data contexts including new contexts that have been
5367 * activated. A data call is only removed from this list when the
5368 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
5369 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005370 *
Wink Savillef4c4d362009-04-02 01:37:03 -07005371 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005372 */
5373
Wink Savillef4c4d362009-04-02 01:37:03 -07005374#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005375
5376/**
5377 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
5378 *
5379 * Reports supplementary service related notification from the network.
5380 *
5381 * "data" is a const RIL_SuppSvcNotification *
5382 *
5383 */
5384
5385#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
5386
5387/**
5388 * RIL_UNSOL_STK_SESSION_END
5389 *
5390 * Indicate when STK session is terminated by SIM.
5391 *
5392 * "data" is NULL
5393 */
5394#define RIL_UNSOL_STK_SESSION_END 1012
5395
5396/**
5397 * RIL_UNSOL_STK_PROACTIVE_COMMAND
5398 *
5399 * Indicate when SIM issue a STK proactive command to applications
5400 *
5401 * "data" is a const char * containing SAT/USAT proactive command
5402 * in hexadecimal format string starting with command tag
5403 *
5404 */
5405#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
5406
5407/**
5408 * RIL_UNSOL_STK_EVENT_NOTIFY
5409 *
5410 * Indicate when SIM notifies applcations some event happens.
5411 * Generally, application does not need to have any feedback to
5412 * SIM but shall be able to indicate appropriate messages to users.
5413 *
5414 * "data" is a const char * containing SAT/USAT commands or responses
5415 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
5416 * starting with first byte of response data or command tag
5417 *
5418 */
5419#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
5420
5421/**
5422 * RIL_UNSOL_STK_CALL_SETUP
5423 *
5424 * Indicate when SIM wants application to setup a voice call.
5425 *
5426 * "data" is const int *
5427 * ((const int *)data)[0] contains timeout value (in milliseconds)
5428 */
5429#define RIL_UNSOL_STK_CALL_SETUP 1015
5430
5431/**
5432 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
5433 *
5434 * Indicates that SMS storage on the SIM is full. Sent when the network
5435 * attempts to deliver a new SMS message. Messages cannot be saved on the
5436 * SIM until space is freed. In particular, incoming Class 2 messages
5437 * cannot be stored.
5438 *
5439 * "data" is null
5440 *
5441 */
5442#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
5443
5444/**
5445 * RIL_UNSOL_SIM_REFRESH
5446 *
5447 * Indicates that file(s) on the SIM have been updated, or the SIM
5448 * has been reinitialized.
5449 *
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005450 * In the case where RIL is version 6 or older:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005451 * "data" is an int *
5452 * ((int *)data)[0] is a RIL_SimRefreshResult.
5453 * ((int *)data)[1] is the EFID of the updated file if the result is
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005454 * SIM_FILE_UPDATE or NULL for any other result.
5455 *
5456 * In the case where RIL is version 7:
5457 * "data" is a RIL_SimRefreshResponse_v7 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005458 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005459 * Note: If the SIM state changes as a result of the SIM refresh (eg,
5460 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005461 * should be sent.
5462 */
5463#define RIL_UNSOL_SIM_REFRESH 1017
5464
5465/**
5466 * RIL_UNSOL_CALL_RING
5467 *
5468 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07005469 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
5470 * of a call and sending multiple is optional. If the system property
5471 * ro.telephony.call_ring.multiple is false then the upper layers
5472 * will generate the multiple events internally. Otherwise the vendor
5473 * ril must generate multiple RIL_UNSOL_CALL_RING if
5474 * ro.telephony.call_ring.multiple is true or if it is absent.
5475 *
5476 * The rate of these events is controlled by ro.telephony.call_ring.delay
5477 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005478 *
Wink Saville3d54e742009-05-18 18:00:44 -07005479 * "data" is null for GSM
5480 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005481 */
5482#define RIL_UNSOL_CALL_RING 1018
5483
The Android Open Source Project34a51082009-03-05 14:34:37 -08005484/**
5485 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5486 *
5487 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07005488 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005489 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07005490
The Android Open Source Project34a51082009-03-05 14:34:37 -08005491 * "data" is null
5492 */
5493#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
5494
5495/**
5496 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
5497 *
5498 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07005499 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005500 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07005501 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005502 * Callee will subsequently confirm the receipt of the SMS with
5503 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07005504 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005505 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
5506 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07005507 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005508 */
5509#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
5510
5511/**
5512 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
5513 *
5514 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07005515 *
Henrik Hall0eba2022010-11-25 10:20:56 +01005516 * "data" can be one of the following:
5517 * If received from GSM network, "data" is const char of 88 bytes
5518 * which indicates each page of a CBS Message sent to the MS by the
5519 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
5520 * If received from UMTS network, "data" is const char of 90 up to 1252
5521 * bytes which contain between 1 and 15 CBS Message pages sent as one
5522 * 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 -07005523 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005524 */
5525#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07005526
The Android Open Source Project34a51082009-03-05 14:34:37 -08005527/**
5528 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
5529 *
5530 * Indicates that SMS storage on the RUIM is full. Messages
5531 * cannot be saved on the RUIM until space is freed.
5532 *
5533 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07005534 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005535 */
Wink Savillef4c4d362009-04-02 01:37:03 -07005536#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
5537
The Android Open Source Project34a51082009-03-05 14:34:37 -08005538/**
5539 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
5540 *
5541 * Indicates a restricted state change (eg, for Domain Specific Access Control).
5542 *
5543 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
5544 *
5545 * "data" is an int *
5546 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
5547 */
5548#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
5549
Wink Saville1b5fd232009-04-22 14:50:00 -07005550/**
5551 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
5552 *
5553 * Indicates that the radio system selection module has
5554 * autonomously entered emergency callback mode.
5555 *
5556 * "data" is null
5557 *
5558 */
5559#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08005560
Wink Saville1b5fd232009-04-22 14:50:00 -07005561/**
5562 * RIL_UNSOL_CDMA_CALL_WAITING
5563 *
5564 * Called when CDMA radio receives a call waiting indication.
5565 *
5566 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07005567 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005568 */
5569#define RIL_UNSOL_CDMA_CALL_WAITING 1025
5570
5571/**
5572 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
5573 *
5574 * Called when CDMA radio receives an update of the progress of an
5575 * OTASP/OTAPA call.
5576 *
5577 * "data" is const int *
5578 * For CDMA this is an integer OTASP/OTAPA status listed in
5579 * RIL_CDMA_OTA_ProvisionStatus.
5580 *
5581 */
5582#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
5583
5584/**
5585 * RIL_UNSOL_CDMA_INFO_REC
5586 *
5587 * Called when CDMA radio receives one or more info recs.
5588 *
5589 * "data" is const RIL_CDMA_InformationRecords *
5590 *
5591 */
5592#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08005593
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07005594/**
5595 * RIL_UNSOL_OEM_HOOK_RAW
5596 *
5597 * This is for OEM specific use.
5598 *
5599 * "data" is a byte[]
5600 */
5601#define RIL_UNSOL_OEM_HOOK_RAW 1028
5602
John Wang5d621da2009-09-18 17:17:48 -07005603/**
5604 * RIL_UNSOL_RINGBACK_TONE
5605 *
5606 * Indicates that nework doesn't have in-band information, need to
5607 * play out-band tone.
5608 *
5609 * "data" is an int *
5610 * ((int *)data)[0] == 0 for stop play ringback tone.
5611 * ((int *)data)[0] == 1 for start play ringback tone.
5612 */
5613#define RIL_UNSOL_RINGBACK_TONE 1029
5614
John Wang5909cf82010-01-29 00:18:54 -08005615/**
5616 * RIL_UNSOL_RESEND_INCALL_MUTE
5617 *
5618 * Indicates that framework/application need reset the uplink mute state.
5619 *
5620 * There may be situations where the mute state becomes out of sync
5621 * between the application and device in some GSM infrastructures.
5622 *
5623 * "data" is null
5624 */
5625#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08005626
5627/**
5628 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
5629 *
5630 * Called when CDMA subscription source changed.
5631 *
5632 * "data" is int *
5633 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
5634 */
Wink Saville29487ef2011-04-15 09:15:31 -07005635#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08005636
5637/**
5638 * RIL_UNSOL_CDMA_PRL_CHANGED
5639 *
5640 * Called when PRL (preferred roaming list) changes.
5641 *
5642 * "data" is int *
5643 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
5644 */
5645#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
5646
5647/**
5648 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
5649 *
5650 * Called when Emergency Callback Mode Ends
5651 *
5652 * Indicates that the radio system selection module has
5653 * proactively exited emergency callback mode.
5654 *
5655 * "data" is NULL
5656 *
5657 */
5658#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
5659
Wink Saville5b9df332011-04-06 16:24:21 -07005660/**
5661 * RIL_UNSOL_RIL_CONNECTED
5662 *
5663 * Called the ril connects and returns the version
5664 *
5665 * "data" is int *
5666 * ((int *)data)[0] is RIL_VERSION
5667 */
5668#define RIL_UNSOL_RIL_CONNECTED 1034
5669
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005670/**
5671 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
5672 *
5673 * Indicates that voice technology has changed. Contains new radio technology
5674 * as a data in the message.
5675 *
5676 * "data" is int *
5677 * ((int *)data)[0] is of type const RIL_RadioTechnology
5678 *
5679 */
5680#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
5681
Wink Saville8a9e0212013-04-09 12:11:38 -07005682/**
5683 * RIL_UNSOL_CELL_INFO_LIST
5684 *
5685 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
5686 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
5687 *
5688 * "data" is NULL
5689 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08005690 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07005691 */
5692#define RIL_UNSOL_CELL_INFO_LIST 1036
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005693
Wink Saville865ce3b2013-11-08 16:37:01 -08005694/**
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005695 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
5696 *
Nathan Harold0eb43c22016-12-19 12:04:32 -08005697 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
5698 * instead, provide IMS registration status via an IMS Service.
5699 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005700 * Called when IMS registration state has changed
5701 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005702 * To get IMS registration state and IMS SMS format, callee needs to invoke the
5703 * following request on main thread:
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005704 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005705 * RIL_REQUEST_IMS_REGISTRATION_STATE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005706 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005707 * "data" is NULL
5708 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005709 */
5710#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
5711
Etan Cohend3652192014-06-20 08:28:44 -07005712/**
5713 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
5714 *
5715 * Indicated when there is a change in subscription status.
5716 * This event will be sent in the following scenarios
5717 * - subscription readiness at modem, which was selected by telephony layer
5718 * - when subscription is deactivated by modem due to UICC card removal
5719 * - When network invalidates the subscription i.e. attach reject due to authentication reject
5720 *
5721 * "data" is const int *
5722 * ((const int *)data)[0] == 0 for Subscription Deactivated
5723 * ((const int *)data)[0] == 1 for Subscription Activated
5724 *
5725 */
5726#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
5727
5728/**
5729 * RIL_UNSOL_SRVCC_STATE_NOTIFY
5730 *
5731 * Called when Single Radio Voice Call Continuity(SRVCC)
5732 * progress state has changed
5733 *
5734 * "data" is int *
5735 * ((int *)data)[0] is of type const RIL_SrvccState
5736 *
5737 */
5738
5739#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
5740
5741/**
5742 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
5743 *
5744 * Called when the hardware configuration associated with the RILd changes
5745 *
5746 * "data" is an array of RIL_HardwareConfig
5747 *
5748 */
5749#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
5750
Wink Savillec29360a2014-07-13 05:17:28 -07005751/**
5752 * RIL_UNSOL_DC_RT_INFO_CHANGED
5753 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005754 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005755 * Sent when the DC_RT_STATE changes but the time
5756 * between these messages must not be less than the
5757 * value set by RIL_REQUEST_SET_DC_RT_RATE.
5758 *
5759 * "data" is the most recent RIL_DcRtInfo
5760 *
5761 */
5762#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
5763
Wink Saville8b4e4f72014-10-17 15:01:45 -07005764/**
5765 * RIL_UNSOL_RADIO_CAPABILITY
5766 *
5767 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
5768 * Returns the phone radio capability exactly as
5769 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
5770 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
5771 *
5772 * "data" is the RIL_RadioCapability structure
5773 */
5774#define RIL_UNSOL_RADIO_CAPABILITY 1042
5775
Amit Mahajan54563d32014-11-22 00:54:49 +00005776/*
5777 * RIL_UNSOL_ON_SS
5778 *
5779 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
5780 * call control.
5781 *
5782 * "data" is const RIL_StkCcUnsolSsResponse *
5783 *
5784 */
5785#define RIL_UNSOL_ON_SS 1043
5786
5787/**
5788 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
5789 *
5790 * Called when there is an ALPHA from UICC during Call Control.
5791 *
5792 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
5793 *
5794 */
5795#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
5796
fengluf7408292015-04-14 14:53:55 -07005797/**
5798 * RIL_UNSOL_LCEDATA_RECV
5799 *
5800 * Called when there is an incoming Link Capacity Estimate (LCE) info report.
5801 *
fenglu290add32015-05-01 17:05:15 -07005802 * "data" is the RIL_LceDataInfo structure.
fengluf7408292015-04-14 14:53:55 -07005803 *
5804 */
5805#define RIL_UNSOL_LCEDATA_RECV 1045
5806
Robert Greenwalt27e99c52016-06-01 16:31:38 -07005807 /**
5808 * RIL_UNSOL_PCO_DATA
5809 *
5810 * Called when there is new Carrier PCO data received for a data call. Ideally
5811 * only new data will be forwarded, though this is not required. Multiple
5812 * boxes of carrier PCO data for a given call should result in a series of
5813 * RIL_UNSOL_PCO_DATA calls.
5814 *
5815 * "data" is the RIL_PCO_Data structure.
5816 *
5817 */
5818#define RIL_UNSOL_PCO_DATA 1046
5819
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005820/***********************************************************************/
5821
Amit Mahajan54563d32014-11-22 00:54:49 +00005822
Etan Cohend3652192014-06-20 08:28:44 -07005823#if defined(ANDROID_MULTI_SIM)
5824/**
5825 * RIL_Request Function pointer
5826 *
5827 * @param request is one of RIL_REQUEST_*
5828 * @param data is pointer to data defined for that RIL_REQUEST_*
5829 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07005830 * structures passed as data may contain pointers to non-contiguous memory
Etan Cohend3652192014-06-20 08:28:44 -07005831 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07005832 * @param datalen is the length of "data" which is defined as other argument. It may or may
5833 * not be equal to sizeof(data). Refer to the documentation of individual structures
5834 * to find if pointers listed in the structure are contiguous and counted in the datalen
5835 * length or not.
5836 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
Etan Cohend3652192014-06-20 08:28:44 -07005837 *
5838 */
5839typedef void (*RIL_RequestFunc) (int request, void *data,
5840 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
5841
5842/**
5843 * This function should return the current radio state synchronously
5844 */
5845typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
5846
5847#else
5848/* Backward compatible */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005849
5850/**
5851 * RIL_Request Function pointer
5852 *
5853 * @param request is one of RIL_REQUEST_*
5854 * @param data is pointer to data defined for that RIL_REQUEST_*
5855 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07005856 * structures passed as data may contain pointers to non-contiguous memory
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005857 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07005858 * @param datalen is the length of "data" which is defined as other argument. It may or may
5859 * not be equal to sizeof(data). Refer to the documentation of individual structures
5860 * to find if pointers listed in the structure are contiguous and counted in the datalen
5861 * length or not.
5862 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005863 *
5864 */
Wink Saville7f856802009-06-09 10:23:37 -07005865typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005866 size_t datalen, RIL_Token t);
5867
5868/**
5869 * This function should return the current radio state synchronously
5870 */
5871typedef RIL_RadioState (*RIL_RadioStateRequest)();
5872
Etan Cohend3652192014-06-20 08:28:44 -07005873#endif
5874
5875
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005876/**
5877 * This function returns "1" if the specified RIL_REQUEST code is
5878 * supported and 0 if it is not
5879 *
5880 * @param requestCode is one of RIL_REQUEST codes
5881 */
5882
5883typedef int (*RIL_Supports)(int requestCode);
5884
5885/**
Wink Saville7f856802009-06-09 10:23:37 -07005886 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005887 * thread that calls RIL_RequestFunc--and indicates that a pending
5888 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07005889 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005890 * On cancel, the callee should do its best to abandon the request and
5891 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
5892 *
5893 * Subsequent calls to RIL_onRequestComplete for this request with
5894 * other results will be tolerated but ignored. (That is, it is valid
5895 * to ignore the cancellation request)
5896 *
5897 * RIL_Cancel calls should return immediately, and not wait for cancellation
5898 *
Wink Saville7f856802009-06-09 10:23:37 -07005899 * 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 -08005900 * interface
5901 *
5902 * @param t token wants to be canceled
5903 */
5904
5905typedef void (*RIL_Cancel)(RIL_Token t);
5906
5907typedef void (*RIL_TimedCallback) (void *param);
5908
5909/**
5910 * Return a version string for your RIL implementation
5911 */
5912typedef const char * (*RIL_GetVersion) (void);
5913
5914typedef struct {
5915 int version; /* set to RIL_VERSION */
5916 RIL_RequestFunc onRequest;
5917 RIL_RadioStateRequest onStateRequest;
5918 RIL_Supports supports;
5919 RIL_Cancel onCancel;
5920 RIL_GetVersion getVersion;
5921} RIL_RadioFunctions;
5922
Sungmin Choi75697532013-04-26 15:04:45 -07005923typedef struct {
5924 char *apn;
5925 char *protocol;
5926 int authtype;
5927 char *username;
5928 char *password;
5929} RIL_InitialAttachApn;
5930
Amit Mahajan2b772032014-06-26 14:20:11 -07005931typedef struct {
5932 int authContext; /* P2 value of authentication command, see P2 parameter in
5933 3GPP TS 31.102 7.1.2 */
5934 char *authData; /* the challenge string in Base64 format, see 3GPP
5935 TS 31.102 7.1.2 */
5936 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
5937 NULL if no value. */
5938} RIL_SimAuthentication;
5939
Robert Greenwalt17ea3fa2016-06-15 14:59:38 -07005940typedef struct {
5941 int cid; /* Context ID, uniquely identifies this call */
5942 char *bearer_proto; /* One of the PDP_type values in TS 27.007 section 10.1.1.
5943 For example, "IP", "IPV6", "IPV4V6" */
5944 int pco_id; /* The protocol ID for this box. Note that only IDs from
5945 FF00H - FFFFH are accepted. If more than one is included
5946 from the network, multiple calls should be made to send all
5947 of them. */
5948 int contents_length; /* The number of octets in the contents. */
5949 char *contents; /* Carrier-defined content. It is binary, opaque and
5950 loosely defined in LTE Layer 3 spec 24.008 */
5951} RIL_PCO_Data;
5952
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005953#ifdef RIL_SHLIB
5954struct RIL_Env {
5955 /**
5956 * "t" is parameter passed in on previous call to RIL_Notification
5957 * routine.
5958 *
5959 * If "e" != SUCCESS, then response can be null/is ignored
5960 *
Wink Saville7f856802009-06-09 10:23:37 -07005961 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005962 * freed by callee
5963 *
5964 * RIL_onRequestComplete will return as soon as possible
5965 */
Wink Saville7f856802009-06-09 10:23:37 -07005966 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005967 void *response, size_t responselen);
5968
Etan Cohend3652192014-06-20 08:28:44 -07005969#if defined(ANDROID_MULTI_SIM)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005970 /**
5971 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5972 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5973 *
5974 * "data" is owned by caller, and should not be modified or freed by callee
5975 */
Etan Cohend3652192014-06-20 08:28:44 -07005976 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
5977#else
5978 /**
5979 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5980 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5981 *
5982 * "data" is owned by caller, and should not be modified or freed by callee
5983 */
5984 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
5985#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005986 /**
Wink Saville7f856802009-06-09 10:23:37 -07005987 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005988 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
5989 * a relative time value at which the callback is invoked. If relativeTime is
5990 * NULL or points to a 0-filled structure, the callback will be invoked as
5991 * soon as possible
5992 */
5993
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07005994 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07005995 void *param, const struct timeval *relativeTime);
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005996 /**
5997 * "t" is parameter passed in on previous call RIL_Notification routine
5998 *
5999 * RIL_onRequestAck will be called by vendor when an Async RIL request was received
6000 * by them and an ack needs to be sent back to java ril.
6001 */
6002 void (*OnRequestAck) (RIL_Token t);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006003};
6004
6005
Wink Saville7f856802009-06-09 10:23:37 -07006006/**
6007 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006008 * argc and argv will be command line arguments intended for the RIL implementation
6009 * Return NULL on error
6010 *
6011 * @param env is environment point defined as RIL_Env
6012 * @param argc number of arguments
6013 * @param argv list fo arguments
6014 *
6015 */
6016const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
6017
Sanket Padawe1be49ba2016-03-31 17:37:23 -07006018/**
6019 * If BT SAP(SIM Access Profile) is supported, then RIL implementations must define RIL_SAP_Init
6020 * for initializing RIL_RadioFunctions used for BT SAP communcations. It is called whenever RILD
6021 * starts or modem restarts. Returns handlers for SAP related request that are made on SAP
6022 * sepecific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init
6023 * and used on the general RIL socket.
6024 * argc and argv will be command line arguments intended for the RIL implementation
6025 * Return NULL on error.
6026 *
6027 * @param env is environment point defined as RIL_Env
6028 * @param argc number of arguments
6029 * @param argv list fo arguments
6030 *
6031 */
6032const RIL_RadioFunctions *RIL_SAP_Init(const struct RIL_Env *env, int argc, char **argv);
6033
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006034#else /* RIL_SHLIB */
6035
6036/**
6037 * Call this once at startup to register notification routine
6038 *
6039 * @param callbacks user-specifed callback function
6040 */
6041void RIL_register (const RIL_RadioFunctions *callbacks);
6042
Amit Mahajancd77a5b2016-08-25 11:19:21 -07006043void rilc_thread_pool();
6044
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006045
6046/**
6047 *
6048 * RIL_onRequestComplete will return as soon as possible
6049 *
6050 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07006051 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006052 * @param e error code
6053 * if "e" != SUCCESS, then response can be null/is ignored
6054 * @param response is owned by caller, and should not be modified or
6055 * freed by callee
6056 * @param responselen the length of response in byte
6057 */
Wink Saville7f856802009-06-09 10:23:37 -07006058void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006059 void *response, size_t responselen);
6060
Sanket Padawe6ff9a872016-01-27 15:09:12 -08006061/**
6062 * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and
6063 * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's
6064 * results, just that the command was received and will take a while. After sending this Ack
6065 * its vendor's responsibility to make sure that AP is up whenever needed while command is
6066 * being processed.
6067 *
6068 * @param t is parameter passed in on previous call to RIL_Notification
6069 * routine.
6070 */
6071void RIL_onRequestAck(RIL_Token t);
6072
Etan Cohend3652192014-06-20 08:28:44 -07006073#if defined(ANDROID_MULTI_SIM)
6074/**
6075 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6076 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6077 * "data" is owned by caller, and should not be modified or freed by callee
6078 * @param datalen the length of data in byte
6079 */
6080
6081void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
6082 size_t datalen, RIL_SOCKET_ID socket_id);
6083#else
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006084/**
6085 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6086 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6087 * "data" is owned by caller, and should not be modified or freed by callee
6088 * @param datalen the length of data in byte
6089 */
6090
Wink Saville7f856802009-06-09 10:23:37 -07006091void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006092 size_t datalen);
Etan Cohend3652192014-06-20 08:28:44 -07006093#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006094
6095/**
Wink Saville7f856802009-06-09 10:23:37 -07006096 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006097 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6098 * a relative time value at which the callback is invoked. If relativeTime is
6099 * NULL or points to a 0-filled structure, the callback will be invoked as
6100 * soon as possible
6101 *
6102 * @param callback user-specifed callback function
6103 * @param param parameter list
6104 * @param relativeTime a relative time value at which the callback is invoked
6105 */
6106
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07006107void RIL_requestTimedCallback (RIL_TimedCallback callback,
6108 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006109
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006110#endif /* RIL_SHLIB */
6111
6112#ifdef __cplusplus
6113}
6114#endif
6115
6116#endif /*ANDROID_RIL_H*/