blob: 47b4f4776a5988cb3fd2dd446836b840649f9cd9 [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
Meng Wangb4e34312016-05-12 14:54:36 -070068 * strongly versioned version it enforces structure use. New
69 * data structures are added, namely RIL_CarrierMatchType,
70 * RIL_Carrier, RIL_CarrierRestrictions. New commands added:
71 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS, RIL_REQUEST_SET_CARRIER_RESTRICTIONS
Sanket Padawe88cf6a52016-01-11 12:45:43 -080072 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -080073#define RIL_VERSION 12
74#define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
Alex Yakavenka45e740e2012-01-31 11:48:27 -080075#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080076
Wink Savillea592eeb2009-05-22 13:26:36 -070077#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
78#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
79
Etan Cohend3652192014-06-20 08:28:44 -070080#define MAX_RILDS 3
81#define MAX_SOCKET_NAME_LENGTH 6
82#define MAX_CLIENT_ID_LENGTH 2
83#define MAX_DEBUG_SOCKET_NAME_LENGTH 12
84#define MAX_QEMU_PIPE_NAME_LENGTH 11
Wink Saville8b4e4f72014-10-17 15:01:45 -070085#define MAX_UUID_LENGTH 64
86
Etan Cohend3652192014-06-20 08:28:44 -070087
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080088typedef void * RIL_Token;
89
90typedef enum {
Etan Cohend3652192014-06-20 08:28:44 -070091 RIL_SOCKET_1,
92#if (SIM_COUNT >= 2)
93 RIL_SOCKET_2,
94#if (SIM_COUNT >= 3)
95 RIL_SOCKET_3,
96#endif
97#if (SIM_COUNT >= 4)
98 RIL_SOCKET_4,
99#endif
100#endif
101 RIL_SOCKET_NUM
102} RIL_SOCKET_ID;
103
104
105typedef enum {
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800106 RIL_E_SUCCESS = 0,
107 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
108 RIL_E_GENERIC_FAILURE = 2,
109 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
110 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
111 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
112 RIL_E_REQUEST_NOT_SUPPORTED = 6,
113 RIL_E_CANCELLED = 7,
114 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
115 call on a Class C GPRS device */
116 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
117 registers in network */
Wink Saville3d54e742009-05-18 18:00:44 -0700118 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
119 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
120 shall be retrieved because of SIM or RUIM
Wink Savillef4c4d362009-04-02 01:37:03 -0700121 card absent */
Wink Saville3d54e742009-05-18 18:00:44 -0700122 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
Wink Savillef4c4d362009-04-02 01:37:03 -0700123 location */
jsh602f80f2009-07-10 15:44:37 -0700124 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
John Wang75534472010-04-20 15:11:42 -0700125 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800126 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
John Wang75534472010-04-20 15:11:42 -0700127 illegal SIM or ME */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800128 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
Amit Mahajan54563d32014-11-22 00:54:49 +0000129 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
130 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
131 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
132 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
133 data */
134 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
135 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
136 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
137 request */
138 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
139 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
140 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
fengluf7408292015-04-14 14:53:55 -0700141 RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800142 RIL_E_LCE_NOT_SUPPORTED = 36, /* LCE service not supported(36 in RILConstants.java) */
143 RIL_E_NO_MEMORY = 37, /* Not sufficient memory to process the request */
144 RIL_E_INTERNAL_ERR = 38, /* Hit unexpected vendor internal error scenario */
145 RIL_E_SYSTEM_ERR = 39, /* Hit platform or system error */
146 RIL_E_MODEM_ERR = 40, /* Hit unexpected modem error */
Ajay Nambi10345892016-03-19 09:02:28 -0700147 RIL_E_INVALID_STATE = 41, /* Unexpected request for the current state */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800148 RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */
149 RIL_E_SIM_ERR = 43, /* Received error from SIM card */
150 RIL_E_INVALID_ARGUMENTS = 44, /* Received invalid arguments in request */
151 RIL_E_INVALID_SIM_STATE = 45, /* Can not process the request in current SIM state */
152 RIL_E_INVALID_MODEM_STATE = 46, /* Can not process the request in current Modem state */
153 RIL_E_INVALID_CALL_ID = 47, /* Received invalid call id in request */
154 RIL_E_NO_SMS_TO_ACK = 48, /* ACK received when there is no SMS to ack */
Nathan Haroldc97b2842016-02-02 12:04:35 -0800155 RIL_E_NETWORK_ERR = 49, /* Received error from network */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800156 RIL_E_REQUEST_RATE_LIMITED = 50, /* Operation denied due to overly-frequent requests */
twen.changdf7add02016-03-04 18:27:48 +0800157 RIL_E_SIM_BUSY = 51, /* SIM is busy */
158 RIL_E_SIM_FULL = 52, /* The target EF is full */
159 RIL_E_NETWORK_REJECT = 53, /* Request is rejected by network */
160 RIL_E_OPERATION_NOT_ALLOWED = 54, /* Not allowed the request now */
161 RIL_E_EMPTY_RECORD = 55, /* The request record is empty */
Ajay Nambi68900f52016-03-11 12:02:55 -0800162 RIL_E_INVALID_SMS_FORMAT = 56, /* Invalid sms format */
163 RIL_E_ENCODING_ERR = 57, /* Message not encoded properly */
164 RIL_E_INVALID_SMSC_ADDRESS = 58, /* SMSC address specified is invalid */
165 RIL_E_NO_SUCH_ENTRY = 59, /* No such entry present to perform the request */
166 RIL_E_NETWORK_NOT_READY = 60, /* Network is not ready to perform the request */
167 RIL_E_NOT_PROVISIONED = 61, /* Device doesnot have this value provisioned */
Ajay Nambi10345892016-03-19 09:02:28 -0700168 RIL_E_NO_SUBSCRIPTION = 62, /* Device doesnot have subscription */
169 RIL_E_NO_NETWORK_FOUND = 63, /* Network cannot be found */
170 RIL_E_DEVICE_IN_USE = 64, /* Operation cannot be performed because the device
171 is currently in use */
172 RIL_E_ABORTED = 65, /* Operation aborted */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800173 // OEM specific error codes. To be used by OEM when they don't want to reveal
174 // specific error codes which would be replaced by Generic failure.
175 RIL_E_OEM_ERROR_1 = 501,
176 RIL_E_OEM_ERROR_2 = 502,
177 RIL_E_OEM_ERROR_3 = 503,
178 RIL_E_OEM_ERROR_4 = 504,
179 RIL_E_OEM_ERROR_5 = 505,
180 RIL_E_OEM_ERROR_6 = 506,
181 RIL_E_OEM_ERROR_7 = 507,
182 RIL_E_OEM_ERROR_8 = 508,
183 RIL_E_OEM_ERROR_9 = 509,
184 RIL_E_OEM_ERROR_10 = 510,
185 RIL_E_OEM_ERROR_11 = 511,
186 RIL_E_OEM_ERROR_12 = 512,
187 RIL_E_OEM_ERROR_13 = 513,
188 RIL_E_OEM_ERROR_14 = 514,
189 RIL_E_OEM_ERROR_15 = 515,
190 RIL_E_OEM_ERROR_16 = 516,
191 RIL_E_OEM_ERROR_17 = 517,
192 RIL_E_OEM_ERROR_18 = 518,
193 RIL_E_OEM_ERROR_19 = 519,
194 RIL_E_OEM_ERROR_20 = 520,
195 RIL_E_OEM_ERROR_21 = 521,
196 RIL_E_OEM_ERROR_22 = 522,
197 RIL_E_OEM_ERROR_23 = 523,
198 RIL_E_OEM_ERROR_24 = 524,
199 RIL_E_OEM_ERROR_25 = 525
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800200} RIL_Errno;
201
202typedef enum {
203 RIL_CALL_ACTIVE = 0,
204 RIL_CALL_HOLDING = 1,
205 RIL_CALL_DIALING = 2, /* MO call only */
206 RIL_CALL_ALERTING = 3, /* MO call only */
207 RIL_CALL_INCOMING = 4, /* MT call only */
208 RIL_CALL_WAITING = 5 /* MT call only */
209} RIL_CallState;
210
211typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -0700212 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
213 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800214 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
Wink Savillef4c4d362009-04-02 01:37:03 -0700215 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
Wink Saville7f856802009-06-09 10:23:37 -0700216 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -0700217 personalization locked, or SIM absent */
218 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
219 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
220 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
Wink Saville7f856802009-06-09 10:23:37 -0700221 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -0700222 personalization locked, or RUIM absent */
223 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800224 RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */
225 RADIO_STATE_ON = 10 /* Radio is on */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800226} RIL_RadioState;
227
Wink Saville43808972011-01-13 17:39:51 -0800228typedef enum {
229 RADIO_TECH_UNKNOWN = 0,
230 RADIO_TECH_GPRS = 1,
231 RADIO_TECH_EDGE = 2,
232 RADIO_TECH_UMTS = 3,
233 RADIO_TECH_IS95A = 4,
234 RADIO_TECH_IS95B = 5,
235 RADIO_TECH_1xRTT = 6,
236 RADIO_TECH_EVDO_0 = 7,
237 RADIO_TECH_EVDO_A = 8,
238 RADIO_TECH_HSDPA = 9,
239 RADIO_TECH_HSUPA = 10,
240 RADIO_TECH_HSPA = 11,
241 RADIO_TECH_EVDO_B = 12,
242 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800243 RADIO_TECH_LTE = 14,
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800244 RADIO_TECH_HSPAP = 15, // HSPA+
Etan Cohend3652192014-06-20 08:28:44 -0700245 RADIO_TECH_GSM = 16, // Only supports voice
Yashdev Singh3c8f37c2015-02-23 13:04:28 -0800246 RADIO_TECH_TD_SCDMA = 17,
247 RADIO_TECH_IWLAN = 18
Wink Saville43808972011-01-13 17:39:51 -0800248} RIL_RadioTechnology;
249
Wink Saville8b4e4f72014-10-17 15:01:45 -0700250typedef enum {
251 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
252 RAF_GPRS = (1 << RADIO_TECH_GPRS),
253 RAF_EDGE = (1 << RADIO_TECH_EDGE),
254 RAF_UMTS = (1 << RADIO_TECH_UMTS),
255 RAF_IS95A = (1 << RADIO_TECH_IS95A),
256 RAF_IS95B = (1 << RADIO_TECH_IS95B),
257 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
258 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
259 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
260 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
261 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
262 RAF_HSPA = (1 << RADIO_TECH_HSPA),
263 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
264 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
265 RAF_LTE = (1 << RADIO_TECH_LTE),
266 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
267 RAF_GSM = (1 << RADIO_TECH_GSM),
268 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
269} RIL_RadioAccessFamily;
270
271typedef enum {
Nathan Harold92839f12016-02-12 10:02:28 -0800272 BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically)
273 BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
274 BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
275 BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000)
276 BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
277 BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
278 BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band)
279 BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band)
280 BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band)
281 BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band)
282 BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band)
283 BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band)
284 BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band)
285 BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band)
286 BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band)
287 BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band)
288 BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band)
289 BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band)
290 BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band)
291} RIL_RadioBandMode;
292
293typedef enum {
Wink Saville8b4e4f72014-10-17 15:01:45 -0700294 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
295 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
296 // forthcoming with these same parameters
297 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
298 // RIL_RadioCapability.status = 0, if any START's fail no
299 // APPLY will be sent
300 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
301 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
302 // occurs in any previous command the RIL_RadioAccessesFamily and
Legler Wu8caf06f2014-10-29 14:02:14 +0800303 // logicalModemUuid fields will be the prior configuration thus
Wink Saville8b4e4f72014-10-17 15:01:45 -0700304 // restoring the configuration to the previous value. An error
305 // returned by this command will generally be ignored or may
306 // cause that logical modem to be removed from service.
307} RadioCapabilityPhase;
308
309typedef enum {
310 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
311 // RC_PHASE_APPLY
312 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
313 // capability was success with RC_PHASE_FINISH
314 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
315 // capability is fail with RC_PHASE_FINISH.
316} RadioCapabilityStatus;
317
318#define RIL_RADIO_CAPABILITY_VERSION 1
319typedef struct {
Legler Wu8caf06f2014-10-29 14:02:14 +0800320 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
Wink Saville8b4e4f72014-10-17 15:01:45 -0700321 int session; // Unique session value defined by framework returned in all "responses/unsol"
322 int phase; // CONFIGURED, START, APPLY, FINISH
323 int rat; // RIL_RadioAccessFamily for the radio
324 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
325 int status; // Return status and an input parameter for RC_PHASE_FINISH
326} RIL_RadioCapability;
327
Wink Savillec0114b32011-02-18 10:14:07 -0800328// Do we want to split Data from Voice and the use
329// RIL_RadioTechnology for get/setPreferredVoice/Data ?
330typedef enum {
331 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
332 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
333 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
334 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
335 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
336 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
337 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
338 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
339 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
340 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
341 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
Uma Maheswari Ramalingam0e094872011-09-28 13:25:48 -0700342 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
343 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
Wink Savillec0114b32011-02-18 10:14:07 -0800344} RIL_PreferredNetworkType;
345
346/* Source for cdma subscription */
347typedef enum {
348 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
349 CDMA_SUBSCRIPTION_SOURCE_NV = 1
350} RIL_CdmaSubscriptionSource;
351
Wink Saville74fa3882009-12-22 15:35:41 -0800352/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
353typedef enum {
354 RIL_UUS_TYPE1_IMPLICIT = 0,
355 RIL_UUS_TYPE1_REQUIRED = 1,
356 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
357 RIL_UUS_TYPE2_REQUIRED = 3,
358 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
359 RIL_UUS_TYPE3_REQUIRED = 5,
360 RIL_UUS_TYPE3_NOT_REQUIRED = 6
361} RIL_UUS_Type;
362
363/* User-to-User Signaling Information data coding schemes. Possible values for
364 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
365 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
366typedef enum {
367 RIL_UUS_DCS_USP = 0, /* User specified protocol */
368 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
369 RIL_UUS_DCS_X244 = 2, /* X.244 */
370 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
371 convergence function */
372 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
373} RIL_UUS_DCS;
374
375/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
376 * This data is passed in RIL_ExtensionRecord and rec contains this
377 * structure when type is RIL_UUS_INFO_EXT_REC */
378typedef struct {
379 RIL_UUS_Type uusType; /* UUS Type */
380 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
381 int uusLength; /* Length of UUS Data */
382 char * uusData; /* UUS Data */
383} RIL_UUS_Info;
384
385/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700386typedef struct {
387 char isPresent; /* non-zero if signal information record is present */
388 char signalType; /* as defined 3.7.5.5-1 */
389 char alertPitch; /* as defined 3.7.5.5-2 */
390 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
391} RIL_CDMA_SignalInfoRecord;
392
Wink Saville1b5fd232009-04-22 14:50:00 -0700393typedef struct {
394 RIL_CallState state;
395 int index; /* Connection Index for use with, eg, AT+CHLD */
396 int toa; /* type of address, eg 145 = intl */
397 char isMpty; /* nonzero if is mpty call */
398 char isMT; /* nonzero if call is mobile terminated */
399 char als; /* ALS line indicator if available
400 (0 = line 1) */
401 char isVoice; /* nonzero if this is is a voice call */
402 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
403 char * number; /* Remote party number */
404 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
405 char * name; /* Remote party name */
406 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800407 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800408} RIL_Call;
409
Wink Savillec0114b32011-02-18 10:14:07 -0800410/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800411typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800412 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700413 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700414 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
415 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800416 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800417 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
418} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800419
420/*
421 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
422 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
423 */
424typedef struct {
425 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500426 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
427 back-off timer value RIL wants to override the one
428 pre-configured in FW.
429 The unit is miliseconds.
430 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700431 The value 0 means retry should be done ASAP.
Wink Saville8a9e0212013-04-09 12:11:38 -0700432 The value of INT_MAX(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800433 int cid; /* Context ID, uniquely identifies this call */
434 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
435 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
436 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
437 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
438 such as "IP" or "IPV6" */
439 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800440 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
441 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800442 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800443 one of each. If the prefix length is absent the addresses
444 are assumed to be point to point with IPv4 having a prefix
445 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800446 char * dnses; /* A space-delimited list of DNS server addresses,
447 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
448 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800449 char * gateways; /* A space-delimited list of default gateway addresses,
450 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
451 May be empty in which case the addresses represent point
452 to point connections. */
453} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800454
Etan Cohend3652192014-06-20 08:28:44 -0700455typedef struct {
456 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
457 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
458 back-off timer value RIL wants to override the one
459 pre-configured in FW.
460 The unit is miliseconds.
461 The value < 0 means no value is suggested.
462 The value 0 means retry should be done ASAP.
463 The value of INT_MAX(0x7fffffff) means no retry. */
464 int cid; /* Context ID, uniquely identifies this call */
465 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
466 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
467 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
468 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
469 such as "IP" or "IPV6" */
470 char * ifname; /* The network interface name */
471 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
472 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
473 May not be empty, typically 1 IPv4 or 1 IPv6 or
474 one of each. If the prefix length is absent the addresses
475 are assumed to be point to point with IPv4 having a prefix
476 length of 32 and IPv6 128. */
477 char * dnses; /* A space-delimited list of DNS server addresses,
478 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
479 May be empty. */
480 char * gateways; /* A space-delimited list of default gateway addresses,
481 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
482 May be empty in which case the addresses represent point
483 to point connections. */
484 char * pcscf; /* the Proxy Call State Control Function address
485 via PCO(Protocol Configuration Option) for IMS client. */
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -0700486} RIL_Data_Call_Response_v9;
487
488typedef struct {
489 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
490 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
491 back-off timer value RIL wants to override the one
492 pre-configured in FW.
493 The unit is miliseconds.
494 The value < 0 means no value is suggested.
495 The value 0 means retry should be done ASAP.
496 The value of INT_MAX(0x7fffffff) means no retry. */
497 int cid; /* Context ID, uniquely identifies this call */
498 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
499 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
500 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
501 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
502 such as "IP" or "IPV6" */
503 char * ifname; /* The network interface name */
504 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
505 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
506 May not be empty, typically 1 IPv4 or 1 IPv6 or
507 one of each. If the prefix length is absent the addresses
508 are assumed to be point to point with IPv4 having a prefix
509 length of 32 and IPv6 128. */
510 char * dnses; /* A space-delimited list of DNS server addresses,
511 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
512 May be empty. */
513 char * gateways; /* A space-delimited list of default gateway addresses,
514 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
515 May be empty in which case the addresses represent point
516 to point connections. */
517 char * pcscf; /* the Proxy Call State Control Function address
518 via PCO(Protocol Configuration Option) for IMS client. */
519 int mtu; /* MTU received from network
520 Value <= 0 means network has either not sent a value or
521 sent an invalid value */
522} RIL_Data_Call_Response_v11;
Etan Cohend3652192014-06-20 08:28:44 -0700523
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700524typedef enum {
525 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
526 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
527} RIL_RadioTechnologyFamily;
528
529typedef struct {
530 RIL_RadioTechnologyFamily tech;
531 unsigned char retry; /* 0 == not retry, nonzero == retry */
532 int messageRef; /* Valid field if retry is set to nonzero.
533 Contains messageRef from RIL_SMS_Response
534 corresponding to failed MO SMS.
535 */
536
537 union {
538 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
539 RIL_CDMA_SMS_Message* cdmaMessage;
540
541 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
542 char** gsmMessage;
543 } message;
544} RIL_IMS_SMS_Message;
545
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800546typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800547 int messageRef; /* TP-Message-Reference for GSM,
548 and BearerData MessageId for CDMA
549 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800550 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700551 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
552 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
553 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800554} RIL_SMS_Response;
555
556/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
557typedef struct {
558 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
559 /* 0 = "REC UNREAD" */
560 /* 1 = "REC READ" */
561 /* 2 = "STO UNSENT" */
562 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700563 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
564 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800565 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
566 (as expected by TS 27.005) or NULL for default SMSC */
567} RIL_SMS_WriteArgs;
568
569/** Used by RIL_REQUEST_DIAL */
570typedef struct {
571 char * address;
572 int clir;
573 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
574 * clir == 0 on "use subscription default value"
575 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
576 * clir == 2 on "CLIR suppression" (allow CLI presentation)
577 */
Wink Saville74fa3882009-12-22 15:35:41 -0800578 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800579} RIL_Dial;
580
581typedef struct {
582 int command; /* one of the commands listed for TS 27.007 +CRSM*/
583 int fileid; /* EF id */
584 char *path; /* "pathid" from TS 27.007 +CRSM command.
585 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700586 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800587 */
588 int p1;
589 int p2;
590 int p3;
591 char *data; /* May be NULL*/
592 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800593} RIL_SIM_IO_v5;
594
595typedef struct {
596 int command; /* one of the commands listed for TS 27.007 +CRSM*/
597 int fileid; /* EF id */
598 char *path; /* "pathid" from TS 27.007 +CRSM command.
599 Path is in hex asciii format eg "7f205f70"
600 Path must always be provided.
601 */
602 int p1;
603 int p2;
604 int p3;
605 char *data; /* May be NULL*/
606 char *pin2; /* May be NULL*/
607 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
608} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800609
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800610/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
611 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
612typedef struct {
613 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
614 ignored for +CSIM command. */
615
616 /* Following fields are used to derive the APDU ("command" and "length"
617 values in TS 27.007 +CSIM and +CGLA commands). */
618 int cla;
619 int instruction;
620 int p1;
621 int p2;
622 int p3; /* A negative P3 implies a 4 byte APDU. */
623 char *data; /* May be NULL. In hex string format. */
624} RIL_SIM_APDU;
625
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800626typedef struct {
627 int sw1;
628 int sw2;
Amit Mahajan2875bc22014-08-06 10:03:15 -0700629 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
630 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 -0800631} RIL_SIM_IO_Response;
632
633/* See also com.android.internal.telephony.gsm.CallForwardInfo */
634
635typedef struct {
636 int status; /*
637 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
638 * status 1 = active, 0 = not active
639 *
640 * For RIL_REQUEST_SET_CALL_FORWARD:
641 * status is:
642 * 0 = disable
643 * 1 = enable
644 * 2 = interrogate
645 * 3 = registeration
646 * 4 = erasure
647 */
648
Wink Saville3d54e742009-05-18 18:00:44 -0700649 int reason; /* from TS 27.007 7.11 "reason" */
650 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
651 See table for Android mapping from
652 MMI service code
653 0 means user doesn't input class */
654 int toa; /* "type" from TS 27.007 7.11 */
655 char * number; /* "number" from TS 27.007 7.11. May be NULL */
656 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800657}RIL_CallForwardInfo;
658
659typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700660 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
661 * Upper 16 bits is LAC and lower 16 bits
662 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800663 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700664 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700665 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800666 */
johnwange0ba6a92009-09-11 19:14:52 -0700667 int rssi; /* Received RSSI in GSM,
668 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800669 */
670} RIL_NeighboringCell;
671
fengluf7408292015-04-14 14:53:55 -0700672typedef struct {
673 char lce_status; /* LCE service status:
674 * -1 = not supported;
675 * 0 = stopped;
676 * 1 = active.
677 */
678 unsigned int actual_interval_ms; /* actual LCE reporting interval,
679 * meaningful only if LCEStatus = 1.
680 */
681} RIL_LceStatusInfo;
682
683typedef struct {
fenglu290add32015-05-01 17:05:15 -0700684 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
fengluf7408292015-04-14 14:53:55 -0700685 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
686 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
687 * moves to inactive state or network type change)
688 * 1 = suspended;
689 * 0 = not suspended.
690 */
691} RIL_LceDataInfo;
692
Meng Wangb4e34312016-05-12 14:54:36 -0700693typedef enum {
694 RIL_MATCH_ALL = 0, /* Apply to all carriers with the same mcc/mnc */
695 RIL_MATCH_SPN = 1, /* Use SPN and mcc/mnc to identify the carrier */
696 RIL_MATCH_IMSI_PREFIX = 2, /* Use IMSI prefix and mcc/mnc to identify the carrier */
697 RIL_MATCH_GID1 = 3, /* Use GID1 and mcc/mnc to identify the carrier */
698 RIL_MATCH_GID2 = 4, /* Use GID2 and mcc/mnc to identify the carrier */
699} RIL_CarrierMatchType;
700
701typedef struct {
702 const char * mcc;
703 const char * mnc;
704 RIL_CarrierMatchType match_type; /* Specify match type for the carrier.
705 * If it’s RIL_MATCH_ALL, match_data is null;
706 * otherwise, match_data is the value for the match type.
707 */
708 const char * match_data;
709} RIL_Carrier;
710
711typedef struct {
712 int32_t len_allowed_carriers; /* length of array allowed_carriers */
713 int32_t len_excluded_carriers; /* length of array excluded_carriers */
714 RIL_Carrier * allowed_carriers; /* whitelist for allowed carriers */
715 RIL_Carrier * excluded_carriers; /* blacklist for explicitly excluded carriers
716 * which match allowed_carriers. Eg. allowed_carriers match
717 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1
718 * is ABCD. It means except the carrier whose gid1 is ABCD,
719 * all carriers with the same mcc/mnc are allowed.
720 */
721} RIL_CarrierRestrictions;
722
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800723/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
724typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700725 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800726 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
727 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
728 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800729 CALL_FAIL_NORMAL = 16,
730 CALL_FAIL_BUSY = 17,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800731 CALL_FAIL_NO_USER_RESPONDING = 18,
732 CALL_FAIL_NO_ANSWER_FROM_USER = 19,
733 CALL_FAIL_CALL_REJECTED = 21,
734 CALL_FAIL_NUMBER_CHANGED = 22,
735 CALL_FAIL_PREEMPTION = 25,
736 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
737 CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
738 CALL_FAIL_FACILITY_REJECTED = 29,
739 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
740 CALL_FAIL_NORMAL_UNSPECIFIED = 31,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800741 CALL_FAIL_CONGESTION = 34,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800742 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
743 CALL_FAIL_TEMPORARY_FAILURE = 41,
744 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
745 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
746 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
747 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
748 CALL_FAIL_QOS_UNAVAILABLE = 49,
749 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
750 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
751 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
752 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
753 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
754 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800755 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800756 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
757 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
758 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
759 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
760 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
761 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
762 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
763 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
764 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
765 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
766 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
767 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
768 CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
769 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
770 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
771 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
772 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800773 CALL_FAIL_CALL_BARRED = 240,
774 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700775 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
776 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Amit Mahajan54563d32014-11-22 00:54:49 +0000777 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
778 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
779 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
Wink Saville1b5fd232009-04-22 14:50:00 -0700780 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
781 CALL_FAIL_CDMA_DROP = 1001,
782 CALL_FAIL_CDMA_INTERCEPT = 1002,
783 CALL_FAIL_CDMA_REORDER = 1003,
784 CALL_FAIL_CDMA_SO_REJECT = 1004,
785 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
786 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
787 CALL_FAIL_CDMA_PREEMPTED = 1007,
788 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
789 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700790 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800791 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
792 vendor code should make sure to map error
793 code to specific error */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800794} RIL_LastCallFailCause;
795
Chao Liu548a81e2015-05-14 16:13:46 -0700796typedef struct {
797 RIL_LastCallFailCause cause_code;
798 char * vendor_cause;
799} RIL_LastCallFailCauseInfo;
800
Wink Savillef4c4d362009-04-02 01:37:03 -0700801/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800802typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800803 PDP_FAIL_NONE = 0, /* No error, connection ok */
804
805 /* an integer cause code defined in TS 24.008
806 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
807 If the implementation does not have access to the exact cause codes,
808 then it should return one of the following values,
809 as the UI layer needs to distinguish these
810 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700811 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
Sanket Padaweac308b92016-01-07 14:41:17 -0800812 PDP_FAIL_NAS_SIGNALLING = 0x0E,
813 PDP_FAIL_LLC_SNDCP = 0x19,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700814 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
815 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
816 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
817 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
818 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
819 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
820 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
821 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
822 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800823 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
Hui Wang11e8b232014-09-19 16:40:17 -0500824 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
825 based on framework config */
Sanket Padaweac308b92016-01-07 14:41:17 -0800826 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
827 PDP_FAIL_NETWORK_FAILURE = 0x26,
828 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
829 PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
830 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
831 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
832 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
833 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
834 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
835 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
Wink Saville43808972011-01-13 17:39:51 -0800836 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
837 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
838 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Sanket Padaweac308b92016-01-07 14:41:17 -0800839 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
840 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
841 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
842 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
843 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
844 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
845 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
846 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
847 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
848 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
849 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
850 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
851 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
852 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
853 PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
854 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
855 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
856 PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
857 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
858 PDP_FAIL_IFACE_MISMATCH = 0x75,
859 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
860 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
861 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
862 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
863 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
Wink Saville43808972011-01-13 17:39:51 -0800864
Sanket Padawe0106aed2016-02-09 09:56:31 -0800865 // OEM specific error codes. To be used by OEMs when they don't want to
866 // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
867 PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001,
868 PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002,
869 PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003,
870 PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004,
871 PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005,
872 PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006,
873 PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007,
874 PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008,
875 PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009,
876 PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A,
877 PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B,
878 PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C,
879 PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D,
880 PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E,
881 PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F,
882
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700883 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800884 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
885 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800886
887 /* reasons for data call drop - network/modem disconnect */
Wink Saville3492c6e2013-10-03 13:53:27 -0700888 PDP_FAIL_SIGNAL_LOST = -3,
Wink Saville43808972011-01-13 17:39:51 -0800889 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
890 with parameters appropriate for new technology */
891 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
892 powered off - no retry */
893 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
894 mode was up on same APN/data profile - no retry until
895 tethered call is off */
896
Sanket Padaweac308b92016-01-07 14:41:17 -0800897 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
898 new error codes are added making this unnecessary */
Wink Saville43808972011-01-13 17:39:51 -0800899} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800900
jsh602f80f2009-07-10 15:44:37 -0700901/* See RIL_REQUEST_SETUP_DATA_CALL */
902typedef enum {
903 RIL_DATA_PROFILE_DEFAULT = 0,
904 RIL_DATA_PROFILE_TETHERED = 1,
Hui Wang8d679622014-10-16 14:59:27 -0500905 RIL_DATA_PROFILE_IMS = 2,
906 RIL_DATA_PROFILE_FOTA = 3,
907 RIL_DATA_PROFILE_CBS = 4,
908 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
909 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
jsh602f80f2009-07-10 15:44:37 -0700910} RIL_DataProfile;
911
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800912/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
913typedef struct {
914 int notificationType; /*
915 * 0 = MO intermediate result code
916 * 1 = MT unsolicited result code
917 */
918 int code; /* See 27.007 7.17
919 "code1" for MO
920 "code2" for MT. */
921 int index; /* CUG index. See 27.007 7.17. */
922 int type; /* "type" from 27.007 7.17 (MT only). */
923 char * number; /* "number" from 27.007 7.17
924 (MT only, may be NULL). */
925} RIL_SuppSvcNotification;
926
Wink Savillef4c4d362009-04-02 01:37:03 -0700927#define RIL_CARD_MAX_APPS 8
928
929typedef enum {
Meng Wangb4e34312016-05-12 14:54:36 -0700930 RIL_CARDSTATE_ABSENT = 0,
931 RIL_CARDSTATE_PRESENT = 1,
932 RIL_CARDSTATE_ERROR = 2,
933 RIL_CARDSTATE_RESTRICTED = 3 /* card is present but not usable due to carrier restrictions.*/
Wink Savillef4c4d362009-04-02 01:37:03 -0700934} RIL_CardState;
935
936typedef enum {
937 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
938 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700939 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
940 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700941 involved */
942 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
943 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
944 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
945 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
946 RIL_PERSOSUBSTATE_SIM_SIM = 7,
947 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
948 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
949 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
950 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
951 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
952 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
953 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
954 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
955 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
956 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
957 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
958 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
959 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
960 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
961 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
962 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
963 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
964} RIL_PersoSubstate;
965
966typedef enum {
967 RIL_APPSTATE_UNKNOWN = 0,
968 RIL_APPSTATE_DETECTED = 1,
969 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
970 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700971 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700972 when app_state is assigned to this value */
973 RIL_APPSTATE_READY = 5
974} RIL_AppState;
975
976typedef enum {
977 RIL_PINSTATE_UNKNOWN = 0,
978 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
979 RIL_PINSTATE_ENABLED_VERIFIED = 2,
980 RIL_PINSTATE_DISABLED = 3,
981 RIL_PINSTATE_ENABLED_BLOCKED = 4,
982 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
983} RIL_PinState;
984
985typedef enum {
986 RIL_APPTYPE_UNKNOWN = 0,
987 RIL_APPTYPE_SIM = 1,
988 RIL_APPTYPE_USIM = 2,
989 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -0800990 RIL_APPTYPE_CSIM = 4,
991 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -0700992} RIL_AppType;
993
994typedef struct
995{
Wink Saville7f856802009-06-09 10:23:37 -0700996 RIL_AppType app_type;
997 RIL_AppState app_state;
998 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -0700999 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -07001000 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -07001001 0x30, 0x30, 0x30 */
1002 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -08001003 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -07001004 RIL_PinState pin1;
1005 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -07001006} RIL_AppStatus;
1007
Wink Savillec0114b32011-02-18 10:14:07 -08001008/* Deprecated, use RIL_CardStatus_v6 */
1009typedef struct
1010{
1011 RIL_CardState card_state;
1012 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
1013 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1014 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1015 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1016 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
1017} RIL_CardStatus_v5;
1018
Wink Savillef4c4d362009-04-02 01:37:03 -07001019typedef struct
1020{
Wink Saville7f856802009-06-09 10:23:37 -07001021 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -07001022 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -08001023 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1024 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1025 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -07001026 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1027 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -08001028} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -07001029
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001030/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
1031 * or as part of RIL_SimRefreshResponse_v7
1032 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001033typedef enum {
1034 /* A file on SIM has been updated. data[1] contains the EFID. */
1035 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001036 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001037 SIM_INIT = 1,
1038 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
1039 SIM_RESET = 2
1040} RIL_SimRefreshResult;
1041
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001042typedef struct {
1043 RIL_SimRefreshResult result;
1044 int ef_id; /* is the EFID of the updated file if the result is */
1045 /* SIM_FILE_UPDATE or 0 for any other result. */
1046 char * aid; /* is AID(application ID) of the card application */
1047 /* See ETSI 102.221 8.1 and 101.220 4 */
1048 /* For SIM_FILE_UPDATE result it can be set to AID of */
1049 /* application in which updated EF resides or it can be */
1050 /* NULL if EF is outside of an application. */
1051 /* For SIM_INIT result this field is set to AID of */
1052 /* application that caused REFRESH */
1053 /* For SIM_RESET result it is NULL. */
1054} RIL_SimRefreshResponse_v7;
1055
Wink Savillec0114b32011-02-18 10:14:07 -08001056/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
1057typedef struct {
1058 char * number; /* Remote party number */
1059 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1060 char * name; /* Remote party name */
1061 RIL_CDMA_SignalInfoRecord signalInfoRecord;
1062} RIL_CDMA_CallWaiting_v5;
1063
Wink Saville1b5fd232009-04-22 14:50:00 -07001064typedef struct {
1065 char * number; /* Remote party number */
1066 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1067 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -07001068 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -08001069 /* Number type/Number plan required to support International Call Waiting */
1070 int number_type; /* 0=Unknown, 1=International, 2=National,
1071 3=Network specific, 4=subscriber */
1072 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
1073} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001074
Wink Savillea592eeb2009-05-22 13:26:36 -07001075/**
1076 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
1077 *
1078 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
1079 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
1080 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
1081 * CBM message ID.
1082 *
1083 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
1084 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
1085 * and 9.4.4.2.3 for UMTS.
1086 * All other values can be treated as empty CBM data coding scheme.
1087 *
1088 * selected 0 means message types specified in <fromServiceId, toServiceId>
1089 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
1090 *
1091 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
1092 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
1093 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001094typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -07001095 int fromServiceId;
1096 int toServiceId;
1097 int fromCodeScheme;
1098 int toCodeScheme;
1099 unsigned char selected;
1100} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -07001101
The Android Open Source Project34a51082009-03-05 14:34:37 -08001102/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
1103#define RIL_RESTRICTED_STATE_NONE 0x00
1104/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
1105#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
1106/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
1107#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -07001108/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -08001109#define RIL_RESTRICTED_STATE_CS_ALL 0x04
1110/* Block packet data access due to restriction. */
1111#define RIL_RESTRICTED_STATE_PS_ALL 0x10
1112
Wink Saville1b5fd232009-04-22 14:50:00 -07001113/* The status for an OTASP/OTAPA session */
1114typedef enum {
1115 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
1116 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
1117 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
1118 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
1119 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
1120 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
1121 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
1122 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
1123 CDMA_OTA_PROVISION_STATUS_COMMITTED,
1124 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
1125 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
1126 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
1127} RIL_CDMA_OTA_ProvisionStatus;
1128
1129typedef struct {
1130 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1131 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1132} RIL_GW_SignalStrength;
1133
Wink Savillec57b3eb2013-04-17 12:51:41 -07001134typedef struct {
1135 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1136 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001137 int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us.
1138 * INT_MAX denotes invalid value */
1139} RIL_GSM_SignalStrength_v12;
1140
1141typedef struct {
1142 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1143 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Wink Savillec57b3eb2013-04-17 12:51:41 -07001144} RIL_SignalStrengthWcdma;
Wink Saville1b5fd232009-04-22 14:50:00 -07001145
1146typedef struct {
1147 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1148 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1149 * value will be 75.
1150 */
1151 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1152 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1153 * will be 125.
1154 */
1155} RIL_CDMA_SignalStrength;
1156
1157
1158typedef struct {
1159 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1160 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1161 * value will be 75.
1162 */
1163 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1164 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1165 * will be 125.
1166 */
1167 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
1168} RIL_EVDO_SignalStrength;
1169
Wink Savillec0114b32011-02-18 10:14:07 -08001170typedef struct {
1171 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -07001172 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1173 * Range: 44 to 140 dBm
1174 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1175 * Reference: 3GPP TS 36.133 9.1.4 */
1176 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1177 * Range: 20 to 3 dB.
1178 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1179 * Reference: 3GPP TS 36.133 9.1.7 */
1180 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1181 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1182 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1183 * Reference: 3GPP TS 36.101 8.1.1 */
1184 int cqi; /* The current Channel Quality Indicator.
1185 * Range: 0 to 15.
1186 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1187 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -08001188} RIL_LTE_SignalStrength;
1189
Wink Saville8a9e0212013-04-09 12:11:38 -07001190typedef struct {
1191 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1192 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1193 * Range: 44 to 140 dBm
1194 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1195 * Reference: 3GPP TS 36.133 9.1.4 */
1196 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1197 * Range: 20 to 3 dB.
1198 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1199 * Reference: 3GPP TS 36.133 9.1.7 */
1200 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1201 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1202 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1203 * Reference: 3GPP TS 36.101 8.1.1 */
1204 int cqi; /* The current Channel Quality Indicator.
1205 * Range: 0 to 15.
1206 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1207 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1208 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
1209 * Approximate distance can be calculated using 300m/us * timingAdvance.
1210 * Range: 0 to 0x7FFFFFFE
1211 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1212 * Reference: 3GPP 36.321 section 6.1.3.5
1213 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1214} RIL_LTE_SignalStrength_v8;
1215
Etan Cohend3652192014-06-20 08:28:44 -07001216typedef struct {
1217 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
1218 * Range : 25 to 120
1219 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1220 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1221} RIL_TD_SCDMA_SignalStrength;
1222
Wink Savillec0114b32011-02-18 10:14:07 -08001223/* Deprecated, use RIL_SignalStrength_v6 */
1224typedef struct {
1225 RIL_GW_SignalStrength GW_SignalStrength;
1226 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1227 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1228} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -07001229
1230typedef struct {
1231 RIL_GW_SignalStrength GW_SignalStrength;
1232 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1233 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -08001234 RIL_LTE_SignalStrength LTE_SignalStrength;
1235} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001236
Wink Saville8a9e0212013-04-09 12:11:38 -07001237typedef struct {
1238 RIL_GW_SignalStrength GW_SignalStrength;
1239 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1240 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1241 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1242} RIL_SignalStrength_v8;
1243
Etan Cohend3652192014-06-20 08:28:44 -07001244typedef struct {
1245 RIL_GW_SignalStrength GW_SignalStrength;
1246 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1247 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1248 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1249 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1250} RIL_SignalStrength_v10;
1251
Wink Saville8a9e0212013-04-09 12:11:38 -07001252typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001253 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1254 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1255 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1256 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 -07001257} RIL_CellIdentityGsm;
1258
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001259typedef struct {
1260 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1261 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1262 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1263 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
1264 int arfcn; /* 16-bit GSM Absolute RF channel number, INT_MAX if unknown */
Nathan Haroldf3769da2016-05-05 12:19:39 -07001265 uint8_t bsic;/* 6-bit Base Station Identity Code, 0xFF if unknown */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001266} RIL_CellIdentityGsm_v12;
1267
Wink Savillec57b3eb2013-04-17 12:51:41 -07001268typedef struct {
1269 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1270 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1271 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1272 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1273 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1274} RIL_CellIdentityWcdma;
1275
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001276typedef struct {
1277 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1278 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1279 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1280 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1281 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1282 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number, INT_MAX if unknown */
1283} RIL_CellIdentityWcdma_v12;
1284
Wink Saville8a9e0212013-04-09 12:11:38 -07001285typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001286 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1287 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1288 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001289 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1290 * It is represented in units of 0.25 seconds and ranges from -2592000
1291 * to 2592000, both values inclusive (corresponding to a range of -180
Wink Savillec57b3eb2013-04-17 12:51:41 -07001292 * to +180 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001293
1294 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1295 * It is represented in units of 0.25 seconds and ranges from -1296000
1296 * to 1296000, both values inclusive (corresponding to a range of -90
Wink Savillec57b3eb2013-04-17 12:51:41 -07001297 * to +90 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001298} RIL_CellIdentityCdma;
1299
Wink Saville8a9e0212013-04-09 12:11:38 -07001300typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001301 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1302 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1303 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1304 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1305 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001306} RIL_CellIdentityLte;
1307
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001308typedef struct {
1309 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1310 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1311 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1312 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1313 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1314 int earfcn; /* 18-bit LTE Absolute RC Channel Number, INT_MAX if unknown */
1315} RIL_CellIdentityLte_v12;
1316
Etan Cohend3652192014-06-20 08:28:44 -07001317typedef struct {
1318 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1319 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1320 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1321 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1322 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1323} RIL_CellIdentityTdscdma;
1324
Wink Saville8a9e0212013-04-09 12:11:38 -07001325typedef struct {
1326 RIL_CellIdentityGsm cellIdentityGsm;
1327 RIL_GW_SignalStrength signalStrengthGsm;
1328} RIL_CellInfoGsm;
1329
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001330typedef struct {
1331 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1332 RIL_GSM_SignalStrength_v12 signalStrengthGsm;
1333} RIL_CellInfoGsm_v12;
1334
Wink Savillec57b3eb2013-04-17 12:51:41 -07001335typedef struct {
1336 RIL_CellIdentityWcdma cellIdentityWcdma;
1337 RIL_SignalStrengthWcdma signalStrengthWcdma;
1338} RIL_CellInfoWcdma;
1339
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001340typedef struct {
1341 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1342 RIL_SignalStrengthWcdma signalStrengthWcdma;
1343} RIL_CellInfoWcdma_v12;
1344
Wink Saville8a9e0212013-04-09 12:11:38 -07001345typedef struct {
1346 RIL_CellIdentityCdma cellIdentityCdma;
1347 RIL_CDMA_SignalStrength signalStrengthCdma;
1348 RIL_EVDO_SignalStrength signalStrengthEvdo;
1349} RIL_CellInfoCdma;
1350
Wink Saville8a9e0212013-04-09 12:11:38 -07001351typedef struct {
1352 RIL_CellIdentityLte cellIdentityLte;
1353 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1354} RIL_CellInfoLte;
1355
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001356typedef struct {
1357 RIL_CellIdentityLte_v12 cellIdentityLte;
1358 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1359} RIL_CellInfoLte_v12;
1360
Etan Cohend3652192014-06-20 08:28:44 -07001361typedef struct {
1362 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1363 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1364} RIL_CellInfoTdscdma;
1365
Wink Saville8a9e0212013-04-09 12:11:38 -07001366// Must be the same as CellInfo.TYPE_XXX
1367typedef enum {
1368 RIL_CELL_INFO_TYPE_GSM = 1,
1369 RIL_CELL_INFO_TYPE_CDMA = 2,
1370 RIL_CELL_INFO_TYPE_LTE = 3,
Wink Savillec57b3eb2013-04-17 12:51:41 -07001371 RIL_CELL_INFO_TYPE_WCDMA = 4,
Etan Cohend3652192014-06-20 08:28:44 -07001372 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
Wink Saville8a9e0212013-04-09 12:11:38 -07001373} RIL_CellInfoType;
1374
1375// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1376typedef enum {
1377 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1378 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1379 RIL_TIMESTAMP_TYPE_MODEM = 2,
1380 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1381 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1382} RIL_TimeStampType;
1383
1384typedef struct {
1385 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1386 int registered; /* !0 if this cell is registered 0 if not registered */
1387 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1388 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1389 union {
1390 RIL_CellInfoGsm gsm;
1391 RIL_CellInfoCdma cdma;
1392 RIL_CellInfoLte lte;
Wink Savillec57b3eb2013-04-17 12:51:41 -07001393 RIL_CellInfoWcdma wcdma;
Etan Cohend3652192014-06-20 08:28:44 -07001394 RIL_CellInfoTdscdma tdscdma;
Wink Saville8a9e0212013-04-09 12:11:38 -07001395 } CellInfo;
1396} RIL_CellInfo;
1397
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001398typedef struct {
1399 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1400 int registered; /* !0 if this cell is registered 0 if not registered */
1401 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1402 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1403 union {
1404 RIL_CellInfoGsm_v12 gsm;
1405 RIL_CellInfoCdma cdma;
1406 RIL_CellInfoLte_v12 lte;
1407 RIL_CellInfoWcdma_v12 wcdma;
1408 RIL_CellInfoTdscdma tdscdma;
1409 } CellInfo;
1410} RIL_CellInfo_v12;
1411
Wink Saville1b5fd232009-04-22 14:50:00 -07001412/* Names of the CDMA info records (C.S0005 section 3.7.5) */
1413typedef enum {
1414 RIL_CDMA_DISPLAY_INFO_REC,
1415 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1416 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1417 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1418 RIL_CDMA_SIGNAL_INFO_REC,
1419 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1420 RIL_CDMA_LINE_CONTROL_INFO_REC,
1421 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1422 RIL_CDMA_T53_CLIR_INFO_REC,
1423 RIL_CDMA_T53_RELEASE_INFO_REC,
1424 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1425} RIL_CDMA_InfoRecName;
1426
1427/* Display Info Rec as defined in C.S0005 section 3.7.5.1
1428 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1429 Note: the Extended Display info rec contains multiple records of the
1430 form: display_tag, display_len, and display_len occurrences of the
1431 chari field if the display_tag is not 10000000 or 10000001.
1432 To save space, the records are stored consecutively in a byte buffer.
1433 The display_tag, display_len and chari fields are all 1 byte.
1434*/
1435
1436typedef struct {
1437 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001438 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001439} RIL_CDMA_DisplayInfoRecord;
1440
1441/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1442 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1443 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1444*/
1445
1446typedef struct {
1447 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001448 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001449 char number_type;
1450 char number_plan;
1451 char pi;
1452 char si;
1453} RIL_CDMA_NumberInfoRecord;
1454
1455/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1456typedef enum {
1457 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1458 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1459 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1460 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1461 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1462 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1463 RIL_REDIRECTING_REASON_RESERVED
1464} RIL_CDMA_RedirectingReason;
1465
1466typedef struct {
1467 RIL_CDMA_NumberInfoRecord redirectingNumber;
1468 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1469 RIL_CDMA_RedirectingReason redirectingReason;
1470} RIL_CDMA_RedirectingNumberInfoRecord;
1471
1472/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1473typedef struct {
1474 char lineCtrlPolarityIncluded;
1475 char lineCtrlToggle;
1476 char lineCtrlReverse;
1477 char lineCtrlPowerDenial;
1478} RIL_CDMA_LineControlInfoRecord;
1479
1480/* T53 CLIR Information Record */
1481typedef struct {
1482 char cause;
1483} RIL_CDMA_T53_CLIRInfoRecord;
1484
1485/* T53 Audio Control Information Record */
1486typedef struct {
1487 char upLink;
1488 char downLink;
1489} RIL_CDMA_T53_AudioControlInfoRecord;
1490
1491typedef struct {
1492
1493 RIL_CDMA_InfoRecName name;
1494
1495 union {
1496 /* Display and Extended Display Info Rec */
1497 RIL_CDMA_DisplayInfoRecord display;
1498
1499 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1500 RIL_CDMA_NumberInfoRecord number;
1501
1502 /* Signal Info Rec */
1503 RIL_CDMA_SignalInfoRecord signal;
1504
1505 /* Redirecting Number Info Rec */
1506 RIL_CDMA_RedirectingNumberInfoRecord redir;
1507
1508 /* Line Control Info Rec */
1509 RIL_CDMA_LineControlInfoRecord lineCtrl;
1510
1511 /* T53 CLIR Info Rec */
1512 RIL_CDMA_T53_CLIRInfoRecord clir;
1513
1514 /* T53 Audio Control Info Rec */
1515 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1516 } rec;
1517} RIL_CDMA_InformationRecord;
1518
1519#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1520
1521typedef struct {
1522 char numberOfInfoRecs;
1523 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1524} RIL_CDMA_InformationRecords;
1525
Jake Hamby8a4a2332014-01-15 13:12:05 -08001526/* See RIL_REQUEST_NV_READ_ITEM */
1527typedef struct {
1528 RIL_NV_Item itemID;
1529} RIL_NV_ReadItem;
1530
1531/* See RIL_REQUEST_NV_WRITE_ITEM */
1532typedef struct {
1533 RIL_NV_Item itemID;
1534 char * value;
1535} RIL_NV_WriteItem;
1536
Etan Cohend3652192014-06-20 08:28:44 -07001537typedef enum {
1538 HANDOVER_STARTED = 0,
1539 HANDOVER_COMPLETED = 1,
1540 HANDOVER_FAILED = 2,
1541 HANDOVER_CANCELED = 3
1542} RIL_SrvccState;
1543
1544/* hardware configuration reported to RILJ. */
1545typedef enum {
1546 RIL_HARDWARE_CONFIG_MODEM = 0,
1547 RIL_HARDWARE_CONFIG_SIM = 1,
1548} RIL_HardwareConfig_Type;
1549
1550typedef enum {
1551 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1552 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1553 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1554} RIL_HardwareConfig_State;
1555
1556typedef struct {
1557 int rilModel;
1558 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1559 int maxVoice;
1560 int maxData;
1561 int maxStandby;
1562} RIL_HardwareConfig_Modem;
1563
1564typedef struct {
Wink Saville8b4e4f72014-10-17 15:01:45 -07001565 char modemUuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001566} RIL_HardwareConfig_Sim;
1567
1568typedef struct {
1569 RIL_HardwareConfig_Type type;
Wink Saville8b4e4f72014-10-17 15:01:45 -07001570 char uuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001571 RIL_HardwareConfig_State state;
1572 union {
1573 RIL_HardwareConfig_Modem modem;
1574 RIL_HardwareConfig_Sim sim;
1575 } cfg;
1576} RIL_HardwareConfig;
1577
Amit Mahajan54563d32014-11-22 00:54:49 +00001578typedef enum {
1579 SS_CFU,
1580 SS_CF_BUSY,
1581 SS_CF_NO_REPLY,
1582 SS_CF_NOT_REACHABLE,
1583 SS_CF_ALL,
1584 SS_CF_ALL_CONDITIONAL,
1585 SS_CLIP,
1586 SS_CLIR,
1587 SS_COLP,
1588 SS_COLR,
1589 SS_WAIT,
1590 SS_BAOC,
1591 SS_BAOIC,
1592 SS_BAOIC_EXC_HOME,
1593 SS_BAIC,
1594 SS_BAIC_ROAMING,
1595 SS_ALL_BARRING,
1596 SS_OUTGOING_BARRING,
1597 SS_INCOMING_BARRING
1598} RIL_SsServiceType;
1599
1600typedef enum {
1601 SS_ACTIVATION,
1602 SS_DEACTIVATION,
1603 SS_INTERROGATION,
1604 SS_REGISTRATION,
1605 SS_ERASURE
1606} RIL_SsRequestType;
1607
1608typedef enum {
1609 SS_ALL_TELE_AND_BEARER_SERVICES,
1610 SS_ALL_TELESEVICES,
1611 SS_TELEPHONY,
1612 SS_ALL_DATA_TELESERVICES,
1613 SS_SMS_SERVICES,
1614 SS_ALL_TELESERVICES_EXCEPT_SMS
1615} RIL_SsTeleserviceType;
1616
1617#define SS_INFO_MAX 4
1618#define NUM_SERVICE_CLASSES 7
1619
1620typedef struct {
1621 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1622 For example if voice is forwarded to one number and data
1623 is forwarded to a different one then numValidIndexes will be
1624 2 indicating total number of valid values in cfInfo.
1625 Similarly if all the services are forwarded to the same
1626 number then the value of numValidIndexes will be 1. */
1627
1628 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1629 for SS request to query call
1630 forward status. see
1631 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1632} RIL_CfData;
1633
1634typedef struct {
1635 RIL_SsServiceType serviceType;
1636 RIL_SsRequestType requestType;
1637 RIL_SsTeleserviceType teleserviceType;
1638 int serviceClass;
1639 RIL_Errno result;
1640
1641 union {
1642 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1643 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1644 two ints, so first two values of ssInfo[] will be
1645 used for response if serviceType is SS_CLIR and
1646 requestType is SS_INTERROGATION */
1647
1648 RIL_CfData cfData;
1649 };
1650} RIL_StkCcUnsolSsResponse;
1651
Wink Saville7f856802009-06-09 10:23:37 -07001652/**
Wink Savillec29360a2014-07-13 05:17:28 -07001653 * Data connection power state
1654 */
1655typedef enum {
1656 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1657 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1658 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1659 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1660} RIL_DcPowerStates;
1661
1662/**
1663 * Data connection real time info
1664 */
1665typedef struct {
1666 uint64_t time; // Time in nanos as returned by ril_nano_time
1667 RIL_DcPowerStates powerState; // Current power state
1668} RIL_DcRtInfo;
1669
Amit Mahajanc796e222014-08-13 16:54:01 +00001670/**
1671 * Data profile to modem
1672 */
1673typedef struct {
1674 /* id of the data profile */
1675 int profileId;
1676 /* the APN to connect to */
1677 char* apn;
1678 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1679 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1680 */
1681 char* protocol;
1682 /** authentication protocol used for this PDP context
1683 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1684 */
1685 int authType;
1686 /* the username for APN, or NULL */
1687 char* user;
1688 /* the password for APN, or NULL */
1689 char* password;
1690 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1691 int type;
1692 /* the period in seconds to limit the maximum connections */
1693 int maxConnsTime;
1694 /* the maximum connections during maxConnsTime */
1695 int maxConns;
1696 /** the required wait time in seconds after a successful UE initiated
1697 * disconnect of a given PDN connection before the device can send
1698 * a new PDN connection request for that given PDN
1699 */
1700 int waitTime;
1701 /* true to enable the profile, 0 to disable, 1 to enable */
1702 int enabled;
1703} RIL_DataProfileInfo;
Wink Savillec29360a2014-07-13 05:17:28 -07001704
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001705/* Tx Power Levels */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001706#define RIL_NUM_TX_POWER_LEVELS 5
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001707
1708typedef struct {
1709
1710 /* period (in ms) when modem is power collapsed */
1711 uint32_t sleep_mode_time_ms;
1712
1713 /* period (in ms) when modem is awake and in idle mode*/
1714 uint32_t idle_mode_time_ms;
1715
1716 /* period (in ms) for which Tx is active */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001717 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001718
1719 /* period (in ms) for which Rx is active */
1720 uint32_t rx_mode_time_ms;
1721} RIL_ActivityStatsInfo;
1722
Wink Savillec29360a2014-07-13 05:17:28 -07001723/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001724 * RIL_REQUEST_GET_SIM_STATUS
1725 *
1726 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -07001727 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001728 * "data" is NULL
1729 *
Wink Savillefd729372011-02-22 16:19:39 -08001730 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001731 *
1732 * Valid errors:
1733 * Must never fail
1734 */
1735#define RIL_REQUEST_GET_SIM_STATUS 1
1736
1737/**
1738 * RIL_REQUEST_ENTER_SIM_PIN
1739 *
John Wang309ac292009-07-30 14:53:23 -07001740 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001741 *
1742 * "data" is const char **
1743 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001744 * ((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 -08001745 *
jsh593c9102009-06-24 16:13:44 -07001746 * "response" is int *
1747 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001748 *
1749 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001750 *
1751 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001752 * RADIO_NOT_AVAILABLE (radio resetting)
1753 * GENERIC_FAILURE
1754 * PASSWORD_INCORRECT
1755 */
1756
1757#define RIL_REQUEST_ENTER_SIM_PIN 2
1758
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001759/**
1760 * RIL_REQUEST_ENTER_SIM_PUK
1761 *
Wink Saville7f856802009-06-09 10:23:37 -07001762 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001763 *
1764 * "data" is const char **
1765 * ((const char **)data)[0] is PUK value
1766 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001767 * ((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 -08001768 *
jsh593c9102009-06-24 16:13:44 -07001769 * "response" is int *
1770 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001771 *
1772 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001773 *
1774 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001775 * RADIO_NOT_AVAILABLE (radio resetting)
1776 * GENERIC_FAILURE
1777 * PASSWORD_INCORRECT
1778 * (PUK is invalid)
1779 */
1780
1781#define RIL_REQUEST_ENTER_SIM_PUK 3
1782
1783/**
1784 * RIL_REQUEST_ENTER_SIM_PIN2
1785 *
1786 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
1787 * returned as a a failure from a previous operation.
1788 *
1789 * "data" is const char **
1790 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001791 * ((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 -08001792 *
jsh593c9102009-06-24 16:13:44 -07001793 * "response" is int *
1794 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001795 *
1796 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001797 *
1798 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001799 * RADIO_NOT_AVAILABLE (radio resetting)
1800 * GENERIC_FAILURE
1801 * PASSWORD_INCORRECT
1802 */
1803
1804#define RIL_REQUEST_ENTER_SIM_PIN2 4
1805
1806/**
1807 * RIL_REQUEST_ENTER_SIM_PUK2
1808 *
Wink Saville7f856802009-06-09 10:23:37 -07001809 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001810 *
1811 * "data" is const char **
1812 * ((const char **)data)[0] is PUK2 value
1813 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001814 * ((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 -08001815 *
jsh593c9102009-06-24 16:13:44 -07001816 * "response" is int *
1817 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001818 *
1819 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001820 *
1821 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001822 * RADIO_NOT_AVAILABLE (radio resetting)
1823 * GENERIC_FAILURE
1824 * PASSWORD_INCORRECT
1825 * (PUK2 is invalid)
1826 */
1827
1828#define RIL_REQUEST_ENTER_SIM_PUK2 5
1829
1830/**
1831 * RIL_REQUEST_CHANGE_SIM_PIN
1832 *
Wink Saville7f856802009-06-09 10:23:37 -07001833 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001834 *
1835 * "data" is const char **
1836 * ((const char **)data)[0] is old PIN value
1837 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001838 * ((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 -08001839 *
jsh593c9102009-06-24 16:13:44 -07001840 * "response" is int *
1841 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001842 *
1843 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001844 *
1845 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001846 * RADIO_NOT_AVAILABLE (radio resetting)
1847 * GENERIC_FAILURE
1848 * PASSWORD_INCORRECT
1849 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001850 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001851 */
1852
1853#define RIL_REQUEST_CHANGE_SIM_PIN 6
1854
1855
1856/**
1857 * RIL_REQUEST_CHANGE_SIM_PIN2
1858 *
Wink Saville7f856802009-06-09 10:23:37 -07001859 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001860 *
1861 * "data" is const char **
1862 * ((const char **)data)[0] is old PIN2 value
1863 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001864 * ((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 -08001865 *
jsh593c9102009-06-24 16:13:44 -07001866 * "response" is int *
1867 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001868 *
1869 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001870 *
1871 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001872 * RADIO_NOT_AVAILABLE (radio resetting)
1873 * GENERIC_FAILURE
1874 * PASSWORD_INCORRECT
1875 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001876 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001877 */
1878
1879#define RIL_REQUEST_CHANGE_SIM_PIN2 7
1880
1881/**
1882 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
1883 *
1884 * Requests that network personlization be deactivated
1885 *
1886 * "data" is const char **
1887 * ((const char **)(data))[0]] is network depersonlization code
1888 *
jsh593c9102009-06-24 16:13:44 -07001889 * "response" is int *
1890 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001891 *
1892 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001893 *
1894 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001895 * RADIO_NOT_AVAILABLE (radio resetting)
1896 * GENERIC_FAILURE
1897 * PASSWORD_INCORRECT
1898 * (code is invalid)
1899 */
1900
1901#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
1902
1903/**
Wink Saville7f856802009-06-09 10:23:37 -07001904 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001905 *
1906 * Requests current call list
1907 *
1908 * "data" is NULL
1909 *
1910 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07001911 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001912 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001913 *
1914 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001915 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07001916 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001917 * GENERIC_FAILURE
1918 * (request will be made again in a few hundred msec)
1919 */
1920
1921#define RIL_REQUEST_GET_CURRENT_CALLS 9
1922
1923
Wink Saville7f856802009-06-09 10:23:37 -07001924/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001925 * RIL_REQUEST_DIAL
1926 *
1927 * Initiate voice call
1928 *
1929 * "data" is const RIL_Dial *
1930 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001931 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001932 * This method is never used for supplementary service codes
1933 *
1934 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001935 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001936 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00001937 * DIAL_MODIFIED_TO_USSD
1938 * DIAL_MODIFIED_TO_SS
1939 * DIAL_MODIFIED_TO_DIAL
Ajay Nambi10345892016-03-19 09:02:28 -07001940 * INVALID_ARGUMENTS
1941 * NO_MEMORY
1942 * INVALID_STATE
1943 * NO_RESOURCES
1944 * INTERNAL_ERR
1945 * FDN_CHECK_FAILURE
1946 * MODEM_ERR
1947 * NO_SUBSCRIPTION
1948 * NO_NETWORK_FOUND
1949 * INVALID_CALL_ID
1950 * DEVICE_IN_USE
1951 * MODE_NOT_SUPPORTED
1952 * ABORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001953 * GENERIC_FAILURE
1954 */
1955#define RIL_REQUEST_DIAL 10
1956
1957/**
1958 * RIL_REQUEST_GET_IMSI
1959 *
1960 * Get the SIM IMSI
1961 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08001962 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001963 *
Wink Savillec0114b32011-02-18 10:14:07 -08001964 * "data" is const char **
1965 * ((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 -08001966 * "response" is a const char * containing the IMSI
1967 *
1968 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001969 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001970 * RADIO_NOT_AVAILABLE (radio resetting)
1971 * GENERIC_FAILURE
1972 */
1973
1974#define RIL_REQUEST_GET_IMSI 11
1975
1976/**
1977 * RIL_REQUEST_HANGUP
1978 *
1979 * Hang up a specific line (like AT+CHLD=1x)
1980 *
John Wang06bae4b2010-11-18 16:37:09 -08001981 * After this HANGUP request returns, RIL should show the connection is NOT
1982 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1983 *
Wink Saville7f856802009-06-09 10:23:37 -07001984 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001985 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001986 *
1987 * "response" is NULL
1988 *
1989 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001990 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001991 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07001992 * INVALID_ARGUMENTS
1993 * NO_MEMORY
1994 * INVALID_STATE
1995 * MODEM_ERR
1996 * INTERNAL_ERR
1997 * NO_MEMORY
1998 * INVALID_CALL_ID
1999 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002000 * GENERIC_FAILURE
2001 */
2002
2003#define RIL_REQUEST_HANGUP 12
2004
2005/**
2006 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
2007 *
2008 * Hang up waiting or held (like AT+CHLD=0)
2009 *
John Wang06bae4b2010-11-18 16:37:09 -08002010 * After this HANGUP request returns, RIL should show the connection is NOT
2011 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2012 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002013 * "data" is NULL
2014 * "response" is NULL
2015 *
2016 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002017 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002018 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002019 * INVALID_STATE
2020 * NO_MEMORY
2021 * MODEM_ERR
2022 * INTERNAL_ERR
2023 * NO_MEMORY
2024 * INVALID_CALL_ID
2025 * NO_RESOURCES
2026 * OPERATION_NOT_ALLOWED
2027 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002028 * GENERIC_FAILURE
2029 */
2030
2031#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
2032
2033/**
2034 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
2035 *
2036 * Hang up waiting or held (like AT+CHLD=1)
2037 *
John Wang06bae4b2010-11-18 16:37:09 -08002038 * After this HANGUP request returns, RIL should show the connection is NOT
2039 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2040 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002041 * "data" is NULL
2042 * "response" is NULL
2043 *
2044 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002045 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002046 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002047 * INVALID_STATE
2048 * NO_MEMORY
2049 * MODEM_ERR
2050 * INTERNAL_ERR
2051 * INVALID_CALL_ID
2052 * OPERATION_NOT_ALLOWED
2053 * INVALID_ARGUMENTS
2054 * NO_RESOURCES
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002055 * GENERIC_FAILURE
2056 */
2057
2058#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
2059
2060/**
2061 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
2062 *
2063 * Switch waiting or holding call and active call (like AT+CHLD=2)
2064 *
2065 * State transitions should be is follows:
2066 *
2067 * If call 1 is waiting and call 2 is active, then if this re
2068 *
2069 * BEFORE AFTER
2070 * Call 1 Call 2 Call 1 Call 2
2071 * ACTIVE HOLDING HOLDING ACTIVE
2072 * ACTIVE WAITING HOLDING ACTIVE
2073 * HOLDING WAITING HOLDING ACTIVE
2074 * ACTIVE IDLE HOLDING IDLE
2075 * IDLE IDLE IDLE IDLE
2076 *
2077 * "data" is NULL
2078 * "response" is NULL
2079 *
2080 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002081 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002082 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002083 * INVALID_STATE
2084 * NO_MEMORY
2085 * MODEM_ERR
2086 * INTERNAL_ERR
2087 * INVALID_STATE
2088 * INVALID_ARGUMENTS
2089 * INVALID_CALL_ID
2090 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002091 * GENERIC_FAILURE
2092 */
2093
2094#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
2095#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
2096
2097/**
2098 * RIL_REQUEST_CONFERENCE
2099 *
2100 * Conference holding and active (like AT+CHLD=3)
2101
2102 * "data" is NULL
2103 * "response" is NULL
2104 *
2105 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002106 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002107 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002108 * NO_MEMORY
2109 * MODEM_ERR
2110 * INTERNAL_ERR
2111 * INVALID_STATE
2112 * INVALID_CALL_ID
2113 * INVALID_ARGUMENTS
2114 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002115 * GENERIC_FAILURE
2116 */
2117#define RIL_REQUEST_CONFERENCE 16
2118
2119/**
2120 * RIL_REQUEST_UDUB
2121 *
Wink Saville7f856802009-06-09 10:23:37 -07002122 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002123 * waiting call answer)(RIL_BasicRequest r);
2124 *
2125 * "data" is NULL
2126 * "response" is NULL
2127 *
2128 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002129 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002130 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002131 * INVALID_STATE
2132 * NO_RESOURCES
2133 * NO_MEMORY
2134 * MODEM_ERR
2135 * INTERNAL_ERR
2136 * INVALID_CALL_ID
2137 * OPERATION_NOT_ALLOWED
2138 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002139 * GENERIC_FAILURE
2140 */
2141#define RIL_REQUEST_UDUB 17
2142
2143/**
2144 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2145 *
2146 * Requests the failure cause code for the most recently terminated call
2147 *
2148 * "data" is NULL
2149 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -07002150 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002151 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
2152 * failure reasons are derived from the possible call failure scenarios
2153 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002154 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08002155 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
2156 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
2157 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002158 * If the implementation does not have access to the exact cause codes,
2159 * then it should return one of the values listed in RIL_LastCallFailCause,
2160 * as the UI layer needs to distinguish these cases for tone generation or
2161 * error notification.
2162 *
2163 * Valid errors:
2164 * SUCCESS
2165 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002166 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002167 * GENERIC_FAILURE
2168 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002169 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002170 */
2171#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
2172
2173/**
2174 * RIL_REQUEST_SIGNAL_STRENGTH
2175 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002176 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002177 *
2178 * Must succeed if radio is on.
2179 *
2180 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07002181 *
2182 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002183 *
2184 * Valid errors:
2185 * SUCCESS
2186 * RADIO_NOT_AVAILABLE
2187 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002188#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07002189
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002190/**
Wink Savillec0114b32011-02-18 10:14:07 -08002191 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002192 *
2193 * Request current registration state
2194 *
2195 * "data" is NULL
2196 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -07002197 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -07002198 * 0 - Not registered, MT is not currently searching
2199 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07002200 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -07002201 * 2 - Not registered, but MT is currently searching
2202 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07002203 * 3 - Registration denied
2204 * 4 - Unknown
2205 * 5 - Registered, roaming
John Wang7f8ded12010-01-21 15:07:28 -08002206 * 10 - Same as 0, but indicates that emergency calls
2207 * are enabled.
2208 * 12 - Same as 2, but indicates that emergency calls
2209 * are enabled.
2210 * 13 - Same as 3, but indicates that emergency calls
2211 * are enabled.
2212 * 14 - Same as 4, but indicates that emergency calls
2213 * are enabled.
2214 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002215 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
2216 * NULL if not.Valid LAC are 0x0000 - 0xffff
2217 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
2218 * NULL if not.
2219 * Valid CID are 0x00000000 - 0xffffffff
2220 * In GSM, CID is Cell ID (see TS 27.007)
2221 * in 16 bits
2222 * In UMTS, CID is UMTS Cell Identity
2223 * (see TS 25.331) in 28 bits
Wink Saville43808972011-01-13 17:39:51 -08002224 * ((const char **)response)[3] indicates the available voice radio technology,
2225 * valid values as defined by RIL_RadioTechnology.
Wink Saville1b5fd232009-04-22 14:50:00 -07002226 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
2227 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07002228 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07002229 * ((const char **)response)[5] is Base Station latitude if registered on a
2230 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07002231 * latitude is a decimal number as specified in
2232 * 3GPP2 C.S0005-A v6.0. It is represented in
2233 * units of 0.25 seconds and ranges from -1296000
2234 * to 1296000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08002235 * to a range of -90 to +90 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07002236 * ((const char **)response)[6] is Base Station longitude if registered on a
2237 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07002238 * longitude 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 -2592000
2241 * to 2592000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08002242 * to a range of -180 to +180 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07002243 * ((const char **)response)[7] is concurrent services support indicator if
2244 * registered on a CDMA system 0-1.
2245 * 0 - Concurrent services not supported,
2246 * 1 - Concurrent services supported
2247 * ((const char **)response)[8] is System ID if registered on a CDMA system or
2248 * NULL if not. Valid System ID are 0 - 32767
2249 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
2250 * NULL if not. Valid System ID are 0 - 65535
2251 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002252 * on a CDMA or EVDO system or NULL if not. Valid values
Wink Saville1b5fd232009-04-22 14:50:00 -07002253 * are 0-255.
2254 * ((const char **)response)[11] indicates whether the current system is in the
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002255 * PRL if registered on a CDMA or EVDO system or NULL if
Wink Saville1b5fd232009-04-22 14:50:00 -07002256 * not. 0=not in the PRL, 1=in the PRL
2257 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002258 * if registered on a CDMA or EVDO system or NULL if not.
Wink Saville1b5fd232009-04-22 14:50:00 -07002259 * Valid values are 0-255.
2260 * ((const char **)response)[13] if registration state is 3 (Registration
2261 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07002262 * registration was denied. See 3GPP TS 24.008,
2263 * 10.5.3.6 and Annex G.
2264 * 0 - General
2265 * 1 - Authentication Failure
2266 * 2 - IMSI unknown in HLR
2267 * 3 - Illegal MS
2268 * 4 - Illegal ME
2269 * 5 - PLMN not allowed
2270 * 6 - Location area not allowed
2271 * 7 - Roaming not allowed
2272 * 8 - No Suitable Cells in this Location Area
2273 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07002274 * 10 - Persistent location update reject
Wink Savillec0114b32011-02-18 10:14:07 -08002275 * 11 - PLMN not allowed
2276 * 12 - Location area not allowed
2277 * 13 - Roaming not allowed in this Location Area
2278 * 15 - No Suitable Cells in this Location Area
2279 * 17 - Network Failure
2280 * 20 - MAC Failure
2281 * 21 - Sync Failure
2282 * 22 - Congestion
2283 * 23 - GSM Authentication unacceptable
2284 * 25 - Not Authorized for this CSG
2285 * 32 - Service option not supported
2286 * 33 - Requested service option not subscribed
2287 * 34 - Service option temporarily out of order
2288 * 38 - Call cannot be identified
2289 * 48-63 - Retry upon entry into a new cell
2290 * 95 - Semantically incorrect message
2291 * 96 - Invalid mandatory information
2292 * 97 - Message type non-existent or not implemented
2293 * 98 - Message not compatible with protocol state
2294 * 99 - Information element non-existent or not implemented
2295 * 100 - Conditional IE error
2296 * 101 - Message not compatible with protocol state
2297 * 111 - Protocol error, unspecified
jshca5e3472010-06-23 21:53:24 -07002298 * ((const char **)response)[14] is the Primary Scrambling Code of the current
2299 * cell as described in TS 25.331, in hexadecimal
2300 * format, or NULL if unknown or not registered
2301 * to a UMTS network.
Wink Saville1b5fd232009-04-22 14:50:00 -07002302 *
2303 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002304 * as "out of service" in the Android telephony system
2305 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002306 * Registration state 3 can be returned if Location Update Reject
2307 * (with cause 17 - Network Failure) is received repeatedly from the network,
2308 * to facilitate "managed roaming"
2309 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002310 * Valid errors:
2311 * SUCCESS
2312 * RADIO_NOT_AVAILABLE
2313 * GENERIC_FAILURE
2314 */
Wink Savillec0114b32011-02-18 10:14:07 -08002315#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002316
2317/**
Wink Savillec0114b32011-02-18 10:14:07 -08002318 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002319 *
Wink Savillec0114b32011-02-18 10:14:07 -08002320 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002321 *
2322 * "data" is NULL
2323 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08002324 * ((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 -08002325 * ((const char **)response)[1] is LAC if registered or NULL if not
2326 * ((const char **)response)[2] is CID if registered or NULL if not
Wink Saville43808972011-01-13 17:39:51 -08002327 * ((const char **)response)[3] indicates the available data radio technology,
2328 * valid values as defined by RIL_RadioTechnology.
Wink Savillec0114b32011-02-18 10:14:07 -08002329 * ((const char **)response)[4] if registration state is 3 (Registration
2330 * denied) this is an enumerated reason why
2331 * registration was denied. See 3GPP TS 24.008,
2332 * Annex G.6 "Additonal cause codes for GMM".
2333 * 7 == GPRS services not allowed
2334 * 8 == GPRS services and non-GPRS services not allowed
2335 * 9 == MS identity cannot be derived by the network
2336 * 10 == Implicitly detached
2337 * 14 == GPRS services not allowed in this PLMN
2338 * 16 == MSC temporarily not reachable
2339 * 40 == No PDP context activated
2340 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
2341 * established using RIL_REQUEST_SETUP_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002342 *
Wink Savilleae679532012-12-03 14:59:45 -08002343 * The values at offsets 6..10 are optional LTE location information in decimal.
2344 * If a value is unknown that value may be NULL. If all values are NULL,
2345 * none need to be present.
Wink Savilleea51a9d2012-09-15 07:54:06 -07002346 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
2347 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
2348 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
2349 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
2350 * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
2351 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002352 * LAC and CID are in hexadecimal format.
2353 * valid LAC are 0x0000 - 0xffff
2354 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07002355 *
2356 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002357 * as "out of service" in the Android telephony system
2358 *
2359 * Valid errors:
2360 * SUCCESS
2361 * RADIO_NOT_AVAILABLE
2362 * GENERIC_FAILURE
2363 */
Wink Savillec0114b32011-02-18 10:14:07 -08002364#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002365
2366/**
2367 * RIL_REQUEST_OPERATOR
2368 *
2369 * Request current operator ONS or EONS
2370 *
2371 * "data" is NULL
2372 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07002373 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002374 * or NULL if unregistered
2375 *
Wink Saville7f856802009-06-09 10:23:37 -07002376 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002377 * or NULL if unregistered
2378 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2379 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07002380 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002381 * Valid errors:
2382 * SUCCESS
2383 * RADIO_NOT_AVAILABLE
2384 * GENERIC_FAILURE
2385 */
2386#define RIL_REQUEST_OPERATOR 22
2387
2388/**
2389 * RIL_REQUEST_RADIO_POWER
2390 *
2391 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07002392 * If the radio is is turned off/on the radio modem subsystem
2393 * is expected return to an initialized state. For instance,
2394 * any voice and data calls will be terminated and all associated
2395 * lists emptied.
2396 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002397 * "data" is int *
2398 * ((int *)data)[0] is > 0 for "Radio On"
2399 * ((int *)data)[0] is == 0 for "Radio Off"
2400 *
2401 * "response" is NULL
2402 *
2403 * Turn radio on if "on" > 0
2404 * Turn radio off if "on" == 0
2405 *
2406 * Valid errors:
2407 * SUCCESS
2408 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002409 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002410 * GENERIC_FAILURE
2411 */
2412#define RIL_REQUEST_RADIO_POWER 23
2413
2414/**
2415 * RIL_REQUEST_DTMF
2416 *
2417 * Send a DTMF tone
2418 *
2419 * If the implementation is currently playing a tone requested via
2420 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2421 * should be played instead
2422 *
jsh602f80f2009-07-10 15:44:37 -07002423 * "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 -08002424 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002425 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002426 * FIXME should this block/mute microphone?
2427 * How does this interact with local DTMF feedback?
2428 *
2429 * Valid errors:
2430 * SUCCESS
2431 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002432 * INVALID_ARGUMENTS
2433 * NO_RESOURCES
2434 * NO_MEMORY
2435 * MODEM_ERR
2436 * INTERNAL_ERR
2437 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002438 * GENERIC_FAILURE
2439 *
2440 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2441 *
2442 */
2443#define RIL_REQUEST_DTMF 24
2444
2445/**
2446 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07002447 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002448 * Send an SMS message
2449 *
2450 * "data" is const char **
2451 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2452 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2453 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2454 * less the SMSC address
2455 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2456 *
2457 * "response" is a const RIL_SMS_Response *
2458 *
2459 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002460 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002461 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2462 *
2463 * Valid errors:
2464 * SUCCESS
2465 * RADIO_NOT_AVAILABLE
2466 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07002467 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08002468 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002469 * INVALID_STATE
2470 * INVALID_ARGUMENTS
2471 * NO_MEMORY
2472 * REQUEST_RATE_LIMITED
2473 * INVALID_SMS_FORMAT
2474 * SYSTEM_ERR
2475 * ENCODING_ERR
2476 * INVALID_SMSC_ADDRESS
2477 * MODEM_ERR
2478 * NETWORK_ERR
2479 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002480 * GENERIC_FAILURE
2481 *
2482 * FIXME how do we specify TP-Message-Reference if we need to resend?
2483 */
2484#define RIL_REQUEST_SEND_SMS 25
2485
2486
2487/**
2488 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07002489 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002490 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2491 * except that more messages are expected to be sent soon. If possible,
2492 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2493 *
2494 * "data" is const char **
2495 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2496 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2497 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2498 * less the SMSC address
2499 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2500 *
2501 * "response" is a const RIL_SMS_Response *
2502 *
2503 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002504 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002505 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2506 *
2507 * Valid errors:
2508 * SUCCESS
2509 * RADIO_NOT_AVAILABLE
2510 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08002511 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002512 * INVALID_STATE
2513 * INVALID_ARGUMENTS
2514 * NO_MEMORY
2515 * INVALID_SMS_FORMAT
2516 * SYSTEM_ERR
2517 * REQUEST_RATE_LIMITED
2518 * FDN_CHECK_FAILURE
2519 * MODEM_ERR
2520 * NETWORK_ERR
2521 * ENCODING_ERR
2522 * INVALID_SMSC_ADDRESS
2523 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002524 * GENERIC_FAILURE
2525 *
2526 */
2527#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2528
2529
2530/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002531 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002532 *
Wink Saville29487ef2011-04-15 09:15:31 -07002533 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2534 * return success it is added to the list of data calls and a
2535 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2536 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2537 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2538 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002539 *
Wink Saville43808972011-01-13 17:39:51 -08002540 * The RIL is expected to:
2541 * - Create one data call context.
2542 * - Create and configure a dedicated interface for the context
2543 * - The interface must be point to point.
2544 * - The interface is configured with one or more addresses and
2545 * is capable of sending and receiving packets. The prefix length
2546 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2547 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08002548 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08002549 * number of simultaneous data call contexts.
2550 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002551 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08002552 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2553 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07002554 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07002555 * ((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 -07002556 * override the one in the profile. NULL indicates no APN overrride.
2557 * ((const char **)data)[3] is the username for APN, or NULL
2558 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07002559 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2560 * 0 => PAP and CHAP is never performed.
2561 * 1 => PAP may be performed; CHAP is never performed.
2562 * 2 => CHAP may be performed; PAP is never performed.
2563 * 3 => PAP / CHAP may be performed - baseband dependent.
Wink Savillec0114b32011-02-18 10:14:07 -08002564 * ((const char **)data)[6] is the connection type to request must be one of the
2565 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07002566 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Wink Savillec0114b32011-02-18 10:14:07 -08002567 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002568 *
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -07002569 * "response" is a RIL_Data_Call_Response_v11
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002570 *
2571 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07002572 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002573 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08002574 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08002575 * the RIL_Data_Call_Response_v6.status containing the actual status.
2576 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08002577 *
2578 * Other errors could include:
2579 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2580 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002581 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002582 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002583 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002584#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002585
2586
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002587/**
2588 * RIL_REQUEST_SIM_IO
2589 *
2590 * Request SIM I/O operation.
2591 * This is similar to the TS 27.007 "restricted SIM" operation
2592 * where it assumes all of the EF selection will be done by the
2593 * callee.
2594 *
Wink Savillefd729372011-02-22 16:19:39 -08002595 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002596 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2597 * or may specify a PIN2 for operations that require a PIN2 (eg
2598 * updating FDN records)
2599 *
2600 * "response" is a const RIL_SIM_IO_Response *
2601 *
2602 * Arguments and responses that are unused for certain
2603 * values of "command" should be ignored or set to NULL
2604 *
2605 * Valid errors:
2606 * SUCCESS
2607 * RADIO_NOT_AVAILABLE
2608 * GENERIC_FAILURE
2609 * SIM_PIN2
2610 * SIM_PUK2
2611 */
2612#define RIL_REQUEST_SIM_IO 28
2613
2614/**
2615 * RIL_REQUEST_SEND_USSD
2616 *
2617 * Send a USSD message
2618 *
2619 * If a USSD session already exists, the message should be sent in the
2620 * context of that session. Otherwise, a new session should be created.
2621 *
2622 * The network reply should be reported via RIL_UNSOL_ON_USSD
2623 *
2624 * Only one USSD session may exist at a time, and the session is assumed
2625 * to exist until:
2626 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2627 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2628 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2629 *
2630 * "data" is a const char * containing the USSD request in UTF-8 format
2631 * "response" is NULL
2632 *
2633 * Valid errors:
2634 * SUCCESS
2635 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07002636 * FDN_CHECK_FAILURE
Amit Mahajan54563d32014-11-22 00:54:49 +00002637 * USSD_MODIFIED_TO_DIAL
2638 * USSD_MODIFIED_TO_SS
2639 * USSD_MODIFIED_TO_USSD
twen.changdf7add02016-03-04 18:27:48 +08002640 * SIM_BUSY
2641 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002642 * INVALID_ARGUMENTS
2643 * NO_MEMORY
2644 * MODEM_ERR
2645 * INTERNAL_ERR
2646 * ABORTED
2647 * SYSTEM_ERR
2648 * INVALID_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002649 * GENERIC_FAILURE
2650 *
2651 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2652 */
2653
2654#define RIL_REQUEST_SEND_USSD 29
2655
2656/**
2657 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07002658 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002659 * Cancel the current USSD session if one exists
2660 *
2661 * "data" is null
2662 * "response" is NULL
2663 *
2664 * Valid errors:
2665 * SUCCESS
2666 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002667 * SIM_BUSY
2668 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002669 * MODEM_ERR
2670 * INTERNAL_ERR
2671 * NO_MEMORY
2672 * INVALID_STATE
Wink Saville7f856802009-06-09 10:23:37 -07002673 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002674 */
2675
2676#define RIL_REQUEST_CANCEL_USSD 30
2677
Wink Saville7f856802009-06-09 10:23:37 -07002678/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002679 * RIL_REQUEST_GET_CLIR
2680 *
2681 * Gets current CLIR status
2682 * "data" is NULL
2683 * "response" is int *
2684 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2685 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2686 *
2687 * Valid errors:
2688 * SUCCESS
2689 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002690 * SS_MODIFIED_TO_DIAL
2691 * SS_MODIFIED_TO_USSD
2692 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002693 * NO_MEMORY
2694 * MODEM_ERR
2695 * INTERNAL_ERR
2696 * FDN_CHECK_FAILURE
2697 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002698 * GENERIC_FAILURE
2699 */
2700#define RIL_REQUEST_GET_CLIR 31
2701
2702/**
2703 * RIL_REQUEST_SET_CLIR
2704 *
2705 * "data" is int *
2706 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2707 *
2708 * "response" is NULL
2709 *
2710 * Valid errors:
2711 * SUCCESS
2712 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002713 * SS_MODIFIED_TO_DIAL
2714 * SS_MODIFIED_TO_USSD
2715 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002716 * INVALID_ARGUMENTS
2717 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002718 * GENERIC_FAILURE
2719 */
2720#define RIL_REQUEST_SET_CLIR 32
2721
2722/**
2723 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2724 *
2725 * "data" is const RIL_CallForwardInfo *
2726 *
2727 * "response" is const RIL_CallForwardInfo **
2728 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2729 * each distinct registered phone number.
2730 *
2731 * For example, if data is forwarded to +18005551212 and voice is forwarded
2732 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07002733 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002734 * If, however, both data and voice are forwarded to +18005551212, then
2735 * a single RIL_CallForwardInfo can be returned with the service class
2736 * set to "data + voice = 3")
2737 *
2738 * Valid errors:
2739 * SUCCESS
2740 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002741 * SS_MODIFIED_TO_DIAL
2742 * SS_MODIFIED_TO_USSD
2743 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002744 * INVALID_ARGUMENTS
2745 * NO_MEMORY
2746 * SYSTEM_ERR
2747 * MODEM_ERR
2748 * INTERNAL_ERR
2749 * NO_MEMORY
2750 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002751 * GENERIC_FAILURE
2752 */
2753#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2754
2755
2756/**
2757 * RIL_REQUEST_SET_CALL_FORWARD
2758 *
2759 * Configure call forward rule
2760 *
2761 * "data" is const RIL_CallForwardInfo *
2762 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002763 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002764 * Valid errors:
2765 * SUCCESS
2766 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002767 * SS_MODIFIED_TO_DIAL
2768 * SS_MODIFIED_TO_USSD
2769 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002770 * INVALID_ARGUMENTS
2771 * NO_MEMORY
2772 * SYSTEM_ERR
2773 * MODEM_ERR
2774 * INTERNAL_ERR
2775 * INVALID_STATE
2776 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002777 * GENERIC_FAILURE
2778 */
2779#define RIL_REQUEST_SET_CALL_FORWARD 34
2780
2781
2782/**
2783 * RIL_REQUEST_QUERY_CALL_WAITING
2784 *
2785 * Query current call waiting state
2786 *
2787 * "data" is const int *
2788 * ((const int *)data)[0] is the TS 27.007 service class to query.
2789 * "response" is a const int *
2790 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2791 *
2792 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2793 * must follow, with the TS 27.007 service class bit vector of services
2794 * for which call waiting is enabled.
2795 *
Wink Saville7f856802009-06-09 10:23:37 -07002796 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002797 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2798 * and voice and disabled for everything else
2799 *
2800 * Valid errors:
2801 * SUCCESS
2802 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002803 * SS_MODIFIED_TO_DIAL
2804 * SS_MODIFIED_TO_USSD
2805 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002806 * NO_MEMORY
2807 * MODEM_ERR
2808 * INTERNAL_ERR
2809 * NO_MEMORY
2810 * FDN_CHECK_FAILURE
2811 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002812 * GENERIC_FAILURE
2813 */
2814#define RIL_REQUEST_QUERY_CALL_WAITING 35
2815
2816
2817/**
2818 * RIL_REQUEST_SET_CALL_WAITING
2819 *
2820 * Configure current call waiting state
2821 *
2822 * "data" is const int *
2823 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2824 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2825 * services to modify
2826 * "response" is NULL
2827 *
2828 * Valid errors:
2829 * SUCCESS
2830 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002831 * SS_MODIFIED_TO_DIAL
2832 * SS_MODIFIED_TO_USSD
2833 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002834 * INVALID_ARGUMENTS
2835 * NO_MEMORY
2836 * MODEM_ERR
2837 * INTERNAL_ERR
2838 * INVALID_STATE
2839 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002840 * GENERIC_FAILURE
2841 */
2842#define RIL_REQUEST_SET_CALL_WAITING 36
2843
2844/**
2845 * RIL_REQUEST_SMS_ACKNOWLEDGE
2846 *
2847 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07002848 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002849 *
2850 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07002851 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002852 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07002853 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002854 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07002855 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
2856 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
2857 * capacity exceeded) and 0xFF (unspecified error) are
2858 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002859 *
2860 * "response" is NULL
2861 *
2862 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
2863 *
2864 * Valid errors:
2865 * SUCCESS
2866 * RADIO_NOT_AVAILABLE
2867 * GENERIC_FAILURE
2868 */
2869#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
2870
2871/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002872 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002873 *
2874 * Get the device IMEI, including check digit
2875 *
johnwangf8bc1672009-05-14 19:19:47 -07002876 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002877 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2878 *
2879 * "data" is NULL
2880 * "response" is a const char * containing the IMEI
2881 *
2882 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002883 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002884 * RADIO_NOT_AVAILABLE (radio resetting)
2885 * GENERIC_FAILURE
2886 */
2887
2888#define RIL_REQUEST_GET_IMEI 38
2889
2890/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002891 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002892 *
2893 * Get the device IMEISV, which should be two decimal digits
2894 *
johnwangf8bc1672009-05-14 19:19:47 -07002895 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002896 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2897 *
2898 * "data" is NULL
2899 * "response" is a const char * containing the IMEISV
2900 *
2901 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002902 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002903 * RADIO_NOT_AVAILABLE (radio resetting)
2904 * GENERIC_FAILURE
2905 */
2906
2907#define RIL_REQUEST_GET_IMEISV 39
2908
2909
2910/**
2911 * RIL_REQUEST_ANSWER
2912 *
2913 * Answer incoming call
2914 *
2915 * Will not be called for WAITING calls.
2916 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
2917 * instead
2918 *
2919 * "data" is NULL
2920 * "response" is NULL
2921 *
2922 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002923 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002924 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002925 * INVALID_STATE
2926 * NO_MEMORY
2927 * SYSTEM_ERR
2928 * MODEM_ERR
2929 * INTERNAL_ERR
2930 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002931 * GENERIC_FAILURE
2932 */
2933
2934#define RIL_REQUEST_ANSWER 40
2935
2936/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002937 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002938 *
Wink Saville29487ef2011-04-15 09:15:31 -07002939 * Deactivate packet data connection and remove from the
2940 * data call list if SUCCESS is returned. Any other return
2941 * values should also try to remove the call from the list,
2942 * but that may not be possible. In any event a
2943 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
2944 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
2945 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002946 *
2947 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07002948 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06002949 * ((char**)data)[1] indicating Disconnect Reason
2950 * 0 => No specific reason specified
2951 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07002952 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002953 * "response" is NULL
2954 *
2955 * Valid errors:
2956 * SUCCESS
2957 * RADIO_NOT_AVAILABLE
2958 * GENERIC_FAILURE
2959 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002960 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002961 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002962#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002963
2964/**
2965 * RIL_REQUEST_QUERY_FACILITY_LOCK
2966 *
2967 * Query the status of a facility lock state
2968 *
2969 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07002970 * ((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 -08002971 * (eg "AO" for BAOC, "SC" for SIM lock)
2972 * ((const char **)data)[1] is the password, or "" if not required
2973 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
2974 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08002975 * ((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 -08002976 * This is only applicable in the case of Fixed Dialing Numbers
2977 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002978 *
2979 * "response" is an int *
2980 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07002981 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002982 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07002983 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002984 *
2985 * Valid errors:
2986 * SUCCESS
2987 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002988 * SS_MODIFIED_TO_DIAL
2989 * SS_MODIFIED_TO_USSD
2990 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002991 * INVALID_ARGUMENTS
2992 * NO_MEMORY
2993 * INTERNAL_ERR
2994 * SYSTEM_ERR
2995 * MODEM_ERR
2996 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002997 * GENERIC_FAILURE
2998 *
2999 */
3000#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
3001
3002/**
3003 * RIL_REQUEST_SET_FACILITY_LOCK
3004 *
3005 * Enable/disable one facility lock
3006 *
3007 * "data" is const char **
3008 *
3009 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3010 * (eg "AO" for BAOC)
3011 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
3012 * ((const char **)data)[2] = password
3013 * ((const char **)data)[3] = string representation of decimal TS 27.007
3014 * service class bit vector. Eg, the string
3015 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08003016 * ((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 -08003017 * This is only applicable in the case of Fixed Dialing Numbers
3018 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003019 *
jsh593c9102009-06-24 16:13:44 -07003020 * "response" is int *
3021 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003022 *
3023 * Valid errors:
3024 * SUCCESS
3025 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003026 * SS_MODIFIED_TO_DIAL
3027 * SS_MODIFIED_TO_USSD
3028 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003029 * INVALID_ARGUMENTS
3030 * INTERNAL_ERR
3031 * NO_MEMORY
3032 * MODEM_ERR
3033 * INVALID_STATE
3034 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003035 * GENERIC_FAILURE
3036 *
3037 */
3038#define RIL_REQUEST_SET_FACILITY_LOCK 43
3039
3040/**
3041 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
3042 *
3043 * Change call barring facility password
3044 *
3045 * "data" is const char **
3046 *
3047 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3048 * (eg "AO" for BAOC)
3049 * ((const char **)data)[1] = old password
3050 * ((const char **)data)[2] = new password
3051 *
Wink Saville7f856802009-06-09 10:23:37 -07003052 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003053 *
3054 * Valid errors:
3055 * SUCCESS
3056 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003057 * SS_MODIFIED_TO_DIAL
3058 * SS_MODIFIED_TO_USSD
3059 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003060 * INVALID_ARGUMENTS
3061 * NO_MEMORY
3062 * MODEM_ERR
3063 * INTERNAL_ERR
3064 * SYSTEM_ERR
3065 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003066 * GENERIC_FAILURE
3067 *
3068 */
3069#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
3070
3071/**
3072 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
3073 *
3074 * Query current network selectin mode
3075 *
3076 * "data" is NULL
3077 *
3078 * "response" is int *
3079 * ((const int *)response)[0] is
3080 * 0 for automatic selection
3081 * 1 for manual selection
3082 *
3083 * Valid errors:
3084 * SUCCESS
3085 * RADIO_NOT_AVAILABLE
3086 * GENERIC_FAILURE
3087 *
3088 */
3089#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
3090
3091/**
3092 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
3093 *
3094 * Specify that the network should be selected automatically
3095 *
3096 * "data" is NULL
3097 * "response" is NULL
3098 *
Wink Saville7f856802009-06-09 10:23:37 -07003099 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003100 * and registered
3101 *
3102 * Valid errors:
3103 * SUCCESS
3104 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003105 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003106 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003107 * GENERIC_FAILURE
3108 *
John Wang75534472010-04-20 15:11:42 -07003109 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3110 * no retries needed, such as illegal SIM or ME.
3111 * Returns GENERIC_FAILURE for all other causes that might be
3112 * fixed by retries.
3113 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003114 */
3115#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
3116
3117/**
3118 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
3119 *
3120 * Manually select a specified network.
3121 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003122 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
3123 * "response" is NULL
3124 *
Wink Saville7f856802009-06-09 10:23:37 -07003125 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003126 * and registered
3127 *
3128 * Valid errors:
3129 * SUCCESS
3130 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003131 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003132 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003133 * GENERIC_FAILURE
3134 *
John Wang75534472010-04-20 15:11:42 -07003135 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3136 * no retries needed, such as illegal SIM or ME.
3137 * Returns GENERIC_FAILURE for all other causes that might be
3138 * fixed by retries.
3139 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003140 */
3141#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
3142
3143/**
3144 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
3145 *
3146 * Scans for available networks
3147 *
3148 * "data" is NULL
3149 * "response" is const char ** that should be an array of n*4 strings, where
3150 * n is the number of available networks
3151 * For each available network:
3152 *
Wink Saville7f856802009-06-09 10:23:37 -07003153 * ((const char **)response)[n+0] is long alpha ONS or EONS
3154 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003155 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
3156 * ((const char **)response)[n+3] is a string value of the status:
3157 * "unknown"
3158 * "available"
3159 * "current"
3160 * "forbidden"
3161 *
Wink Saville7f856802009-06-09 10:23:37 -07003162 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003163 * and registered
3164 *
3165 * Valid errors:
3166 * SUCCESS
3167 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003168 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003169 * GENERIC_FAILURE
3170 *
3171 */
3172#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
3173
3174/**
3175 * RIL_REQUEST_DTMF_START
3176 *
Wink Saville7f856802009-06-09 10:23:37 -07003177 * Start playing a DTMF tone. Continue playing DTMF tone until
3178 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003179 *
3180 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
3181 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07003182 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003183 * "data" is a char *
3184 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
3185 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003186 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003187 * Valid errors:
3188 * SUCCESS
3189 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003190 * INVALID_ARGUMENTS
3191 * NO_RESOURCES
3192 * NO_MEMORY
3193 * SYSTEM_ERR
3194 * MODEM_ERR
3195 * INTERNAL_ERR
3196 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003197 * GENERIC_FAILURE
3198 *
3199 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
3200 */
3201#define RIL_REQUEST_DTMF_START 49
3202
3203/**
3204 * RIL_REQUEST_DTMF_STOP
3205 *
3206 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07003207 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003208 * "data" is NULL
3209 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003210 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003211 * Valid errors:
3212 * SUCCESS
3213 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003214 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07003215 * NO_RESOURCES
3216 * NO_MEMORY
3217 * INVALID_ARGUMENTS
3218 * SYSTEM_ERR
3219 * MODEM_ERR
3220 * INTERNAL_ERR
3221 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003222 * GENERIC_FAILURE
3223 *
3224 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
3225 */
3226#define RIL_REQUEST_DTMF_STOP 50
3227
3228/**
3229 * RIL_REQUEST_BASEBAND_VERSION
3230 *
3231 * Return string value indicating baseband version, eg
3232 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07003233 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003234 * "data" is NULL
3235 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07003236 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003237 * Valid errors:
3238 * SUCCESS
3239 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003240 * EMPTY_RECORD
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003241 * GENERIC_FAILURE
3242 *
3243 */
3244#define RIL_REQUEST_BASEBAND_VERSION 51
3245
3246/**
3247 * RIL_REQUEST_SEPARATE_CONNECTION
3248 *
3249 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07003250 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003251 * as the only other member of the current (active) call
3252 *
3253 * Like AT+CHLD=2x
3254 *
3255 * See TS 22.084 1.3.8.2 (iii)
3256 * TS 22.030 6.5.5 "Entering "2X followed by send"
3257 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07003258 *
3259 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07003260 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
3261 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003262 * "response" is NULL
3263 *
3264 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003265 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003266 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003267 * INVALID_ARGUMENTS
3268 * INVALID_STATE
3269 * NO_RESOURCES
3270 * NO_MEMORY
3271 * SYSTEM_ERR
3272 * MODEM_ERR
3273 * INTERNAL_ERR
3274 * INVALID_CALL_ID
3275 * INVALID_STATE
3276 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003277 * GENERIC_FAILURE
3278 */
3279#define RIL_REQUEST_SEPARATE_CONNECTION 52
3280
3281
3282/**
3283 * RIL_REQUEST_SET_MUTE
3284 *
3285 * Turn on or off uplink (microphone) mute.
3286 *
3287 * Will only be sent while voice call is active.
3288 * Will always be reset to "disable mute" when a new voice call is initiated
3289 *
3290 * "data" is an int *
3291 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
3292 *
3293 * "response" is NULL
3294 *
3295 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003296 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003297 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi68900f52016-03-11 12:02:55 -08003298 * INVALID_ARGUMENTS
3299 * NO_MEMORY
3300 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003301 * GENERIC_FAILURE
3302 */
3303
3304#define RIL_REQUEST_SET_MUTE 53
3305
3306/**
3307 * RIL_REQUEST_GET_MUTE
3308 *
3309 * Queries the current state of the uplink mute setting
3310 *
3311 * "data" is NULL
3312 * "response" is an int *
3313 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
3314 *
3315 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003316 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003317 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00003318 * SS_MODIFIED_TO_DIAL
3319 * SS_MODIFIED_TO_USSD
3320 * SS_MODIFIED_TO_SS
Ajay Nambi68900f52016-03-11 12:02:55 -08003321 * NO_MEMORY
3322 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003323 * GENERIC_FAILURE
3324 */
3325
3326#define RIL_REQUEST_GET_MUTE 54
3327
3328/**
3329 * RIL_REQUEST_QUERY_CLIP
3330 *
3331 * Queries the status of the CLIP supplementary service
3332 *
3333 * (for MMI code "*#30#")
3334 *
3335 * "data" is NULL
3336 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07003337 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003338 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07003339 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003340 *
3341 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003342 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003343 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003344 * NO_MEMORY
3345 * SYSTEM_ERR
3346 * MODEM_ERR
3347 * INTERNAL_ERR
3348 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003349 * GENERIC_FAILURE
3350 */
3351
3352#define RIL_REQUEST_QUERY_CLIP 55
3353
3354/**
Wink Savillec0114b32011-02-18 10:14:07 -08003355 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
3356 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003357 *
3358 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07003359 * context or CDMA data connection active
3360 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003361 *
3362 * "data" is NULL
3363 *
3364 * "response" is a "int *"
3365 * ((int *)response)[0] is an integer cause code defined in TS 24.008
3366 * section 6.1.3.1.3 or close approximation
3367 *
3368 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07003369 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08003370 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003371 * cases for error notification
3372 * and potential retries.
3373 *
3374 * Valid errors:
3375 * SUCCESS
3376 * RADIO_NOT_AVAILABLE
3377 * GENERIC_FAILURE
3378 *
3379 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08003380 *
3381 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003382 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003383
Wink Savillef4c4d362009-04-02 01:37:03 -07003384#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003385
3386/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003387 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003388 *
Wink Saville29487ef2011-04-15 09:15:31 -07003389 * Returns the data call list. An entry is added when a
3390 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
3391 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
3392 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003393 *
3394 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08003395 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003396 *
3397 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003398 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003399 * RADIO_NOT_AVAILABLE (radio resetting)
3400 * GENERIC_FAILURE
Wink Saville29487ef2011-04-15 09:15:31 -07003401 *
3402 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003403 */
3404
Wink Savillef4c4d362009-04-02 01:37:03 -07003405#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003406
3407/**
johnwangf8bc1672009-05-14 19:19:47 -07003408 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003409 *
3410 * Request a radio reset. The RIL implementation may postpone
3411 * the reset until after this request is responded to if the baseband
3412 * is presently busy.
3413 *
johnwangf8bc1672009-05-14 19:19:47 -07003414 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
3415 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003416 * "data" is NULL
3417 * "response" is NULL
3418 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003419 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003420 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003421 * RADIO_NOT_AVAILABLE (radio resetting)
3422 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07003423 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003424 */
3425
3426#define RIL_REQUEST_RESET_RADIO 58
3427
3428/**
3429 * RIL_REQUEST_OEM_HOOK_RAW
3430 *
3431 * This request reserved for OEM-specific uses. It passes raw byte arrays
3432 * back and forth.
3433 *
Wink Saville7f856802009-06-09 10:23:37 -07003434 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003435 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
3436 *
3437 * "data" is a char * of bytes copied from the byte[] data argument in java
3438 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07003439 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003440 * (byte[])(((AsyncResult)response.obj).result)
3441 *
Wink Saville7f856802009-06-09 10:23:37 -07003442 * An error response here will result in
3443 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003444 * (((AsyncResult)response.obj).exception) being an instance of
3445 * com.android.internal.telephony.gsm.CommandException
3446 *
3447 * Valid errors:
3448 * All
3449 */
3450
3451#define RIL_REQUEST_OEM_HOOK_RAW 59
3452
3453/**
3454 * RIL_REQUEST_OEM_HOOK_STRINGS
3455 *
3456 * This request reserved for OEM-specific uses. It passes strings
3457 * back and forth.
3458 *
Wink Saville7f856802009-06-09 10:23:37 -07003459 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003460 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
3461 *
3462 * "data" is a const char **, representing an array of null-terminated UTF-8
3463 * strings copied from the "String[] strings" argument to
3464 * invokeOemRilRequestStrings()
3465 *
3466 * "response" is a const char **, representing an array of null-terminated UTF-8
3467 * stings that will be returned via the caller's response message here:
3468 *
3469 * (String[])(((AsyncResult)response.obj).result)
3470 *
Wink Saville7f856802009-06-09 10:23:37 -07003471 * An error response here will result in
3472 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003473 * (((AsyncResult)response.obj).exception) being an instance of
3474 * com.android.internal.telephony.gsm.CommandException
3475 *
3476 * Valid errors:
3477 * All
3478 */
3479
3480#define RIL_REQUEST_OEM_HOOK_STRINGS 60
3481
3482/**
3483 * RIL_REQUEST_SCREEN_STATE
3484 *
3485 * Indicates the current state of the screen. When the screen is off, the
3486 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07003487 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
3488 * in an effort to conserve power. These notifications should resume when the
3489 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003490 *
3491 * "data" is int *
3492 * ((int *)data)[0] is == 1 for "Screen On"
3493 * ((int *)data)[0] is == 0 for "Screen Off"
3494 *
3495 * "response" is NULL
3496 *
3497 * Valid errors:
3498 * SUCCESS
3499 * GENERIC_FAILURE
3500 */
3501#define RIL_REQUEST_SCREEN_STATE 61
3502
3503
3504/**
3505 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
3506 *
3507 * Enables/disables supplementary service related notifications
3508 * from the network.
3509 *
3510 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3511 *
3512 * "data" is int *
3513 * ((int *)data)[0] is == 1 for notifications enabled
3514 * ((int *)data)[0] is == 0 for notifications disabled
3515 *
3516 * "response" is NULL
3517 *
3518 * Valid errors:
3519 * SUCCESS
3520 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003521 * SIM_BUSY
Ajay Nambi10345892016-03-19 09:02:28 -07003522 * INVALID_ARGUMENTS
3523 * NO_MEMORY
3524 * SYSTEM_ERR
3525 * MODEM_ERR
3526 * INTERNAL_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003527 * GENERIC_FAILURE
3528 *
3529 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3530 */
3531#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
3532
3533/**
3534 * RIL_REQUEST_WRITE_SMS_TO_SIM
3535 *
3536 * Stores a SMS message to SIM memory.
3537 *
3538 * "data" is RIL_SMS_WriteArgs *
3539 *
3540 * "response" is int *
3541 * ((const int *)response)[0] is the record index where the message is stored.
3542 *
3543 * Valid errors:
3544 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003545 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003546 * INVALID_ARGUMENTS
3547 * INVALID_SMS_FORMAT
3548 * INTERNAL_ERR
3549 * MODEM_ERR
3550 * ENCODING_ERR
3551 * NO_MEMORY
3552 * NO_RESOURCES
3553 * INVALID_MODEM_STATE
3554 * MODE_NOT_SUPPORTED
3555 * INVALID_SMSC_ADDRESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003556 * GENERIC_FAILURE
3557 *
3558 */
3559#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
3560
3561/**
3562 * RIL_REQUEST_DELETE_SMS_ON_SIM
3563 *
3564 * Deletes a SMS message from SIM memory.
3565 *
3566 * "data" is int *
3567 * ((int *)data)[0] is the record index of the message to delete.
3568 *
3569 * "response" is NULL
3570 *
3571 * Valid errors:
3572 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003573 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003574 * INVALID_ARGUMENTS
3575 * NO_MEMORY
3576 * REQUEST_RATE_LIMITED
3577 * SYSTEM_ERR
3578 * MODEM_ERR
3579 * NO_SUCH_ENTRY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003580 * GENERIC_FAILURE
3581 *
3582 */
3583#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
3584
3585/**
3586 * RIL_REQUEST_SET_BAND_MODE
3587 *
3588 * Assign a specified band for RF configuration.
3589 *
3590 * "data" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003591 * ((int *)data)[0] is a RIL_RadioBandMode
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003592 *
3593 * "response" is NULL
3594 *
3595 * Valid errors:
3596 * SUCCESS
3597 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003598 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003599 * GENERIC_FAILURE
Nathan Harold92839f12016-02-12 10:02:28 -08003600 *
3601 * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003602 */
3603#define RIL_REQUEST_SET_BAND_MODE 65
3604
3605/**
3606 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3607 *
3608 * Query the list of band mode supported by RF.
3609 *
3610 * "data" is NULL
3611 *
3612 * "response" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003613 * "response" points to an array of int's, the int[0] is the size of array;
3614 * subsequent values are a list of RIL_RadioBandMode listing supported modes.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003615 *
3616 * Valid errors:
3617 * SUCCESS
3618 * RADIO_NOT_AVAILABLE
3619 * GENERIC_FAILURE
3620 *
3621 * See also: RIL_REQUEST_SET_BAND_MODE
3622 */
3623#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
3624
3625/**
3626 * RIL_REQUEST_STK_GET_PROFILE
3627 *
3628 * Requests the profile of SIM tool kit.
3629 * The profile indicates the SAT/USAT features supported by ME.
3630 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
3631 *
3632 * "data" is NULL
3633 *
3634 * "response" is a const char * containing SAT/USAT profile
3635 * in hexadecimal format string starting with first byte of terminal profile
3636 *
3637 * Valid errors:
3638 * RIL_E_SUCCESS
3639 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3640 * RIL_E_GENERIC_FAILURE
3641 */
3642#define RIL_REQUEST_STK_GET_PROFILE 67
3643
3644/**
3645 * RIL_REQUEST_STK_SET_PROFILE
3646 *
3647 * Download the STK terminal profile as part of SIM initialization
3648 * procedure
3649 *
3650 * "data" is a const char * containing SAT/USAT profile
3651 * in hexadecimal format string starting with first byte of terminal profile
3652 *
3653 * "response" is NULL
3654 *
3655 * Valid errors:
3656 * RIL_E_SUCCESS
3657 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3658 * RIL_E_GENERIC_FAILURE
3659 */
3660#define RIL_REQUEST_STK_SET_PROFILE 68
3661
3662/**
3663 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
3664 *
3665 * Requests to send a SAT/USAT envelope command to SIM.
3666 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
3667 *
3668 * "data" is a const char * containing SAT/USAT command
3669 * in hexadecimal format string starting with command tag
3670 *
3671 * "response" is a const char * containing SAT/USAT response
3672 * in hexadecimal format string starting with first byte of response
3673 * (May be NULL)
3674 *
3675 * Valid errors:
3676 * RIL_E_SUCCESS
3677 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003678 * SIM_BUSY
3679 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003680 * RIL_E_GENERIC_FAILURE
3681 */
3682#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
3683
3684/**
3685 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
3686 *
3687 * Requests to send a terminal response to SIM for a received
3688 * proactive command
3689 *
3690 * "data" is a const char * containing SAT/USAT response
3691 * in hexadecimal format string starting with first byte of response data
3692 *
3693 * "response" is NULL
3694 *
3695 * Valid errors:
3696 * RIL_E_SUCCESS
3697 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003698 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003699 * RIL_E_GENERIC_FAILURE
3700 */
3701#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3702
3703/**
3704 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3705 *
3706 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3707 * been initialized by ME already. (We could see the call has been in the 'call
3708 * list') So, STK application needs to accept/reject the call according as user
3709 * operations.
3710 *
3711 * "data" is int *
3712 * ((int *)data)[0] is > 0 for "accept" the call setup
3713 * ((int *)data)[0] is == 0 for "reject" the call setup
3714 *
3715 * "response" is NULL
3716 *
3717 * Valid errors:
3718 * RIL_E_SUCCESS
3719 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003720 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003721 * RIL_E_GENERIC_FAILURE
3722 */
3723#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3724
3725/**
3726 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3727 *
3728 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07003729 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003730 * "data" is NULL
3731 * "response" is NULL
3732 *
3733 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003734 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003735 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003736 * INVALID_STATE
3737 * NO_RESOURCES
3738 * NO_MEMORY
3739 * INVALID_ARGUMENTS
3740 * SYSTEM_ERR
3741 * MODEM_ERR
3742 * INTERNAL_ERR
3743 * INVALID_CALL_ID
3744 * INVALID_STATE
3745 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003746 * GENERIC_FAILURE
3747 */
3748#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3749
3750/**
3751 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3752 *
3753 * Requests to set the preferred network type for searching and registering
3754 * (CS/PS domain, RAT, and operation mode)
3755 *
Wink Savillec0114b32011-02-18 10:14:07 -08003756 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003757 *
3758 * "response" is NULL
3759 *
3760 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07003761 * SUCCESS
3762 * RADIO_NOT_AVAILABLE (radio resetting)
3763 * GENERIC_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08003764 * OPERATION_NOT_ALLOWED
Wink Savillef4c4d362009-04-02 01:37:03 -07003765 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003766 */
3767#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3768
3769/**
3770 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
3771 *
3772 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
3773 * for searching and registering
3774 *
3775 * "data" is NULL
3776 *
3777 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003778 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003779 *
3780 * Valid errors:
3781 * SUCCESS
3782 * RADIO_NOT_AVAILABLE
3783 * GENERIC_FAILURE
3784 *
3785 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3786 */
3787#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
3788
3789/**
3790 * RIL_REQUEST_NEIGHBORING_CELL_IDS
3791 *
3792 * Request neighboring cell id in GSM network
3793 *
3794 * "data" is NULL
3795 * "response" must be a " const RIL_NeighboringCell** "
3796 *
3797 * Valid errors:
3798 * SUCCESS
3799 * RADIO_NOT_AVAILABLE
3800 * GENERIC_FAILURE
3801 */
3802#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3803
3804/**
3805 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07003806 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003807 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07003808 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3809 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003810 *
3811 * Note: The RIL implementation should default to "updates enabled"
3812 * when the screen is on and "updates disabled" when the screen is off.
3813 *
3814 * "data" is int *
3815 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3816 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3817 *
3818 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07003819 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003820 * Valid errors:
3821 * SUCCESS
3822 * RADIO_NOT_AVAILABLE
3823 * GENERIC_FAILURE
3824 *
3825 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3826 */
3827#define RIL_REQUEST_SET_LOCATION_UPDATES 76
3828
Wink Savillef4c4d362009-04-02 01:37:03 -07003829/**
Wink Savillec0114b32011-02-18 10:14:07 -08003830 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07003831 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003832 * Request to set the location where the CDMA subscription shall
3833 * be retrieved
3834 *
3835 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003836 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07003837 *
3838 * "response" is NULL
3839 *
3840 * Valid errors:
3841 * SUCCESS
3842 * RADIO_NOT_AVAILABLE
3843 * GENERIC_FAILURE
3844 * SIM_ABSENT
3845 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08003846 *
3847 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07003848 */
Wink Savillec0114b32011-02-18 10:14:07 -08003849#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07003850
3851/**
3852 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003853 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003854 * Request to set the roaming preferences in CDMA
3855 *
3856 * "data" is int *
3857 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3858 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3859 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003860 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003861 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003862 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003863 * Valid errors:
3864 * SUCCESS
3865 * RADIO_NOT_AVAILABLE
3866 * GENERIC_FAILURE
3867 */
3868#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
3869
3870/**
3871 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003872 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003873 * Request the actual setting of the roaming preferences in CDMA in the modem
3874 *
3875 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003876 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003877 * "response" is int *
3878 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
3879 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3880 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003881 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003882 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003883 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003884 * Valid errors:
3885 * SUCCESS
3886 * RADIO_NOT_AVAILABLE
3887 * GENERIC_FAILURE
3888 */
3889#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
3890
3891/**
3892 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003893 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003894 * Request to set the TTY mode
3895 *
3896 * "data" is int *
3897 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003898 * ((int *)data)[0] is == 1 for TTY Full
3899 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
3900 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07003901 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003902 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003903 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003904 * Valid errors:
3905 * SUCCESS
3906 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003907 * INVALID_ARGUMENTS
3908 * MODEM_ERR
3909 * INTERNAL_ERR
3910 * NO_MEMOR
3911 * INVALID_ARGUMENTS
3912 * MODEM_ERR
3913 * INTERNAL_ERR
3914 * NO_MEMORYY
Wink Savillef4c4d362009-04-02 01:37:03 -07003915 * GENERIC_FAILURE
3916 */
3917#define RIL_REQUEST_SET_TTY_MODE 80
3918
3919/**
3920 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003921 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003922 * Request the setting of TTY mode
3923 *
3924 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003925 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003926 * "response" is int *
3927 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003928 * ((int *)response)[0] is == 1 for TTY Full
3929 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
3930 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07003931 *
3932 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003933 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003934 * Valid errors:
3935 * SUCCESS
3936 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003937 * MODEM_ERR
3938 * INTERNAL_ERR
3939 * NO_MEMORY
3940 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07003941 * GENERIC_FAILURE
3942 */
3943#define RIL_REQUEST_QUERY_TTY_MODE 81
3944
3945/**
3946 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
3947 *
3948 * Request to set the preferred voice privacy mode used in voice
3949 * scrambling
3950 *
3951 * "data" is int *
3952 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3953 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003954 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003955 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003956 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003957 * Valid errors:
3958 * SUCCESS
3959 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003960 * INVALID_ARGUMENTS
3961 * SYSTEM_ERR
3962 * MODEM_ERR
3963 * INTERNAL_ERR
3964 * NO_MEMORY
3965 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07003966 * GENERIC_FAILURE
3967 */
3968#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
3969
3970/**
3971 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003972 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003973 * Request the setting of preferred voice privacy mode
3974 *
3975 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003976 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003977 * "response" is int *
3978 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3979 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003980 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003981 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003982 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003983 * Valid errors:
3984 * SUCCESS
3985 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003986 * MODEM_ERR
3987 * INTERNAL_ERR
3988 * NO_MEMORY
3989 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07003990 * GENERIC_FAILURE
3991 */
3992#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
3993
3994/**
3995 * RIL_REQUEST_CDMA_FLASH
3996 *
3997 * Send FLASH
3998 *
3999 * "data" is const char *
4000 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07004001 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004002 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004003 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004004 * Valid errors:
4005 * SUCCESS
4006 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004007 * INVALID_ARGUMENTS
4008 * NO_MEMORY
4009 * SYSTEM_ERR
4010 * MODEM_ERR
4011 * INTERNAL_ERR
4012 * INVALID_CALL_ID
4013 * INVALID_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004014 * GENERIC_FAILURE
4015 *
4016 */
4017#define RIL_REQUEST_CDMA_FLASH 84
4018
4019/**
4020 * RIL_REQUEST_CDMA_BURST_DTMF
4021 *
4022 * Send DTMF string
4023 *
jsh602f80f2009-07-10 15:44:37 -07004024 * "data" is const char **
4025 * ((const char **)data)[0] is a DTMF string
4026 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
4027 * default
4028 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
4029 * default
Wink Saville7f856802009-06-09 10:23:37 -07004030 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004031 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004032 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004033 * Valid errors:
4034 * SUCCESS
4035 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004036 * INVALID_ARGUMENTS
4037 * NO_MEMORY
4038 * SYSTEM_ERR
4039 * MODEM_ERR
4040 * INTERNAL_ERR
4041 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07004042 * GENERIC_FAILURE
4043 *
4044 */
4045#define RIL_REQUEST_CDMA_BURST_DTMF 85
4046
4047/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004048 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07004049 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004050 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
4051 * If the checksum is valid the 20 digit AKEY is written to NV,
4052 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07004053 *
4054 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004055 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
4056 * where the last 6 digits are a checksum of the
4057 * first 20, as specified in TR45.AHAG
4058 * "Common Cryptographic Algorithms, Revision D.1
4059 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07004060 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004061 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004062 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004063 * Valid errors:
4064 * SUCCESS
4065 * RADIO_NOT_AVAILABLE
4066 * GENERIC_FAILURE
4067 *
4068 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004069#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07004070
4071/**
4072 * RIL_REQUEST_CDMA_SEND_SMS
4073 *
4074 * Send a CDMA SMS message
4075 *
4076 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07004077 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004078 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07004079 *
johnwangbfb151b2009-09-11 15:20:38 -07004080 * Based on the return error, caller decides to resend if sending sms
4081 * fails. The CDMA error class is derived as follows,
4082 * SUCCESS is error class 0 (no error)
4083 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
4084 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
4085 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004086 * Valid errors:
4087 * SUCCESS
4088 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07004089 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08004090 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004091 * INVALID_STATE
4092 * INVALID_ARGUMENTS
4093 * NO_MEMORY
4094 * REQUEST_RATE_LIMITED
4095 * INVALID_SMS_FORMAT
4096 * SYSTEM_ERR
4097 * FDN_CHECK_FAILURE
4098 * MODEM_ERR
4099 * NETWORK_ERR
4100 * ENCODING_ERR
4101 * INVALID_SMSC_ADDRESS
4102 * MODE_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004103 * GENERIC_FAILURE
4104 *
4105 */
4106#define RIL_REQUEST_CDMA_SEND_SMS 87
4107
4108/**
4109 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4110 *
4111 * Acknowledge the success or failure in the receipt of SMS
4112 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4113 *
4114 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07004115 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004116 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004117 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004118 * Valid errors:
4119 * SUCCESS
4120 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004121 * INVALID_ARGUMENTS
4122 * NO_SMS_TO_ACK
4123 * INVALID_STATE
4124 * NO_MEMORY
4125 * REQUEST_RATE_LIMITED
4126 * SYSTEM_ERR
4127 * MODEM_ERR
4128 * INVALID_STATE
4129 * MODE_NOT_SUPPORTED
4130 * NETWORK_NOT_READY
4131 * INVALID_MODEM_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004132 * GENERIC_FAILURE
4133 *
4134 */
4135#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
4136
4137/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004138 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004139 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004140 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
4141 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004142 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004143 *
4144 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
4145 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
4146 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004147 * Valid errors:
4148 * SUCCESS
4149 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004150 * INVALID_STATE
4151 * NO_MEMORY
4152 * REQUEST_RATE_LIMITED
4153 * SYSTEM_ERR
4154 * NO_RESOURCES
4155 * MODEM_ERR
4156 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004157 * GENERIC_FAILURE
4158 *
4159 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004160#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07004161
4162/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004163 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004164 *
4165 * Set GSM/WCDMA Cell Broadcast SMS config
4166 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004167 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
4168 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
4169 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004170 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004171 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004172 * Valid errors:
4173 * SUCCESS
4174 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004175 * INVALID_STATE
4176 * INVALID_ARGUMENTS
4177 * NO_MEMORY
4178 * SYSTEM_ERR
4179 * REQUEST_RATE_LIMITED
4180 * MODEM_ERR
4181 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004182 * GENERIC_FAILURE
4183 *
4184 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004185#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07004186
4187/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004188 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004189 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004190* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07004191 *
4192 * "data" is const int *
4193 * (const int *)data[0] indicates to activate or turn off the
4194 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
4195 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004196 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004197 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004198 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004199 * Valid errors:
4200 * SUCCESS
4201 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004202 * INVALID_STATE
4203 * INVALID_ARGUMENTS
4204 * NO_MEMORY
4205 * SYSTEM_ERR
4206 * REQUEST_RATE_LIMITED
4207 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004208 * GENERIC_FAILURE
4209 *
4210 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004211#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07004212
4213/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004214 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004215 *
4216 * Request the setting of CDMA Broadcast SMS config
4217 *
4218 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004219 *
4220 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
4221 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
4222 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004223 * Valid errors:
4224 * SUCCESS
4225 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004226 * INVALID_STATE
4227 * NO_MEMORY
4228 * REQUEST_RATE_LIMITED
4229 * SYSTEM_ERR
4230 * NO_RESOURCES
4231 * MODEM_ERR
4232 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004233 * GENERIC_FAILURE
4234 *
4235 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004236#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07004237
4238/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004239 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004240 *
4241 * Set CDMA Broadcast SMS config
4242 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004243 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
4244 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
4245 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004246 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004247 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004248 * Valid errors:
4249 * SUCCESS
4250 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004251 * INVALID_STATE
4252 * INVALID_ARGUMENTS
4253 * NO_MEMORY
4254 * SYSTEM_ERR
4255 * REQUEST_RATE_LIMITED
4256 * MODEM_ERR
4257 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004258 * GENERIC_FAILURE
4259 *
4260 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004261#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07004262
4263/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004264 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004265 *
4266 * Enable or disable the reception of CDMA Broadcast SMS
4267 *
4268 * "data" is const int *
4269 * (const int *)data[0] indicates to activate or turn off the
4270 * reception of CDMA Broadcast SMS, 0-1,
4271 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004272 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004273 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004274 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004275 * Valid errors:
4276 * SUCCESS
4277 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004278 * INVALID_STATE
4279 * INVALID_ARGUMENTS
4280 * NO_MEMORY
4281 * SYSTEM_ERR
4282 * REQUEST_RATE_LIMITED
4283 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004284 * GENERIC_FAILURE
4285 *
4286 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004287#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07004288
4289/**
4290 * RIL_REQUEST_CDMA_SUBSCRIPTION
4291 *
4292 * Request the device MDN / H_SID / H_NID.
4293 *
4294 * The request is only allowed when CDMA subscription is available. When CDMA
4295 * subscription is changed, application layer should re-issue the request to
4296 * update the subscription information.
4297 *
4298 * If a NULL value is returned for any of the device id, it means that error
4299 * accessing the device.
4300 *
4301 * "response" is const char **
4302 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07004303 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
4304 * CDMA subscription is available, in decimal format
4305 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
4306 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07004307 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07004308 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07004309 *
4310 * Valid errors:
4311 * SUCCESS
4312 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
4313 */
4314
Wink Savilleeafe79d2009-04-03 18:02:34 -07004315#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07004316
4317/**
4318 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
4319 *
4320 * Stores a CDMA SMS message to RUIM memory.
4321 *
4322 * "data" is RIL_CDMA_SMS_WriteArgs *
4323 *
4324 * "response" is int *
4325 * ((const int *)response)[0] is the record index where the message is stored.
4326 *
4327 * Valid errors:
4328 * SUCCESS
4329 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004330 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08004331 * INVALID_ARGUMENTS
4332 * INVALID_SMS_FORMAT
4333 * INTERNAL_ERR
4334 * MODEM_ERR
4335 * ENCODING_ERR
4336 * NO_MEMORY
4337 * NO_RESOURCES
4338 * INVALID_MODEM_STATE
4339 * MODE_NOT_SUPPORTED
4340 * INVALID_SMSC_ADDRESS
Wink Savillef4c4d362009-04-02 01:37:03 -07004341 * GENERIC_FAILURE
4342 *
4343 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004344#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07004345
4346/**
4347 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
4348 *
4349 * Deletes a CDMA SMS message from RUIM memory.
4350 *
4351 * "data" is int *
4352 * ((int *)data)[0] is the record index of the message to delete.
4353 *
4354 * "response" is NULL
4355 *
4356 * Valid errors:
4357 * SUCCESS
4358 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004359 * INVALID_ARGUMENTS
4360 * NO_MEMORY
4361 * REQUEST_RATE_LIMITED
4362 * SYSTEM_ERR
4363 * MODEM_ERR
4364 * NO_SUCH_ENTRY
Wink Savillef4c4d362009-04-02 01:37:03 -07004365 * GENERIC_FAILURE
4366 *
4367 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004368#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07004369
4370/**
4371 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07004372 *
4373 * Request the device ESN / MEID / IMEI / IMEISV.
4374 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004375 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07004376 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07004377 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004378 *
4379 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07004380 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004381 *
4382 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07004383 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004384 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004385 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07004386 * ((const char **)response)[0] is IMEI if GSM subscription is available
4387 * ((const char **)response)[1] is IMEISV if GSM subscription is available
4388 * ((const char **)response)[2] is ESN if CDMA subscription is available
4389 * ((const char **)response)[3] is MEID if CDMA subscription is available
4390 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004391 * Valid errors:
4392 * SUCCESS
4393 * RADIO_NOT_AVAILABLE
4394 * GENERIC_FAILURE
4395 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004396#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07004397
Wink Saville1b5fd232009-04-22 14:50:00 -07004398/**
4399 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
4400 *
4401 * Request the radio's system selection module to exit emergency
4402 * callback mode. RIL will not respond with SUCCESS until the modem has
4403 * completely exited from Emergency Callback Mode.
4404 *
4405 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004406 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004407 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004408 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004409 * Valid errors:
4410 * SUCCESS
4411 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004412 * OPERATION_NOT_ALLOWED
Wink Saville1b5fd232009-04-22 14:50:00 -07004413 * GENERIC_FAILURE
4414 *
4415 */
4416#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07004417
jsh000a9fe2009-05-11 14:52:35 -07004418/**
4419 * RIL_REQUEST_GET_SMSC_ADDRESS
4420 *
4421 * Queries the default Short Message Service Center address on the device.
4422 *
4423 * "data" is NULL
4424 *
4425 * "response" is const char * containing the SMSC address.
4426 *
4427 * Valid errors:
4428 * SUCCESS
4429 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004430 * NO_MEMORY
4431 * REQUEST_RATE_LIMITED
4432 * SYSTEM_ERR
4433 * INTERNAL_ERR
4434 * MODEM_ERR
4435 * INVALID_ARGUMENTS
4436 * INVALID_MODEM_STATE
4437 * NOT_PROVISIONED
jsh000a9fe2009-05-11 14:52:35 -07004438 * GENERIC_FAILURE
4439 *
4440 */
4441#define RIL_REQUEST_GET_SMSC_ADDRESS 100
4442
4443/**
4444 * RIL_REQUEST_SET_SMSC_ADDRESS
4445 *
4446 * Sets the default Short Message Service Center address on the device.
4447 *
4448 * "data" is const char * containing the SMSC address.
4449 *
4450 * "response" is NULL
4451 *
4452 * Valid errors:
4453 * SUCCESS
4454 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004455 * INVALID_ARGUMENTS
4456 * INVALID_SMS_FORMAT
4457 * NO_MEMORY
4458 * SYSTEM_ERR
4459 * REQUEST_RATE_LIMITED
4460 * MODEM_ERR
4461 * NO_RESOURCES
jsh000a9fe2009-05-11 14:52:35 -07004462 * GENERIC_FAILURE
4463 *
4464 */
4465#define RIL_REQUEST_SET_SMSC_ADDRESS 101
4466
jshb60444e2009-05-29 11:09:17 -07004467/**
4468 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
4469 *
4470 * Indicates whether there is storage available for new SMS messages.
4471 *
4472 * "data" is int *
4473 * ((int *)data)[0] is 1 if memory is available for storing new messages
4474 * is 0 if memory capacity is exceeded
4475 *
4476 * "response" is NULL
4477 *
4478 * Valid errors:
4479 * SUCCESS
4480 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004481 * INVALID_ARGUMENTS
4482 * NO_MEMORY
4483 * INVALID_STATE
4484 * SYSTEM_ERR
4485 * REQUEST_RATE_LIMITED
4486 * MODEM_ERR
jshb60444e2009-05-29 11:09:17 -07004487 * GENERIC_FAILURE
4488 *
4489 */
4490#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
4491
Wink Saville2641d5b2009-06-08 17:40:42 -07004492/**
4493 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
4494 *
4495 * Indicates that the StkSerivce is running and is
4496 * ready to receive RIL_UNSOL_STK_XXXXX commands.
4497 *
4498 * "data" is NULL
4499 * "response" is NULL
4500 *
4501 * Valid errors:
4502 * SUCCESS
4503 * RADIO_NOT_AVAILABLE
4504 * GENERIC_FAILURE
4505 *
4506 */
4507#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
4508
Wink Savillec0114b32011-02-18 10:14:07 -08004509/**
4510 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
4511 *
4512 * Request to query the location where the CDMA subscription shall
4513 * be retrieved
4514 *
4515 * "data" is NULL
4516 *
4517 * "response" is int *
4518 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4519 *
4520 * Valid errors:
4521 * SUCCESS
4522 * RADIO_NOT_AVAILABLE
4523 * GENERIC_FAILURE
4524 * SUBSCRIPTION_NOT_AVAILABLE
4525 *
4526 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
4527 */
4528#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
4529
Jake Hambyfa8d5842011-08-19 16:22:18 -07004530/**
4531 * RIL_REQUEST_ISIM_AUTHENTICATION
4532 *
4533 * Request the ISIM application on the UICC to perform AKA
4534 * challenge/response algorithm for IMS authentication
4535 *
4536 * "data" is a const char * containing the challenge string in Base64 format
4537 * "response" is a const char * containing the response in Base64 format
4538 *
4539 * Valid errors:
4540 * SUCCESS
4541 * RADIO_NOT_AVAILABLE
4542 * GENERIC_FAILURE
4543 */
4544#define RIL_REQUEST_ISIM_AUTHENTICATION 105
4545
Jake Hamby300105d2011-09-26 01:01:44 -07004546/**
4547 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
4548 *
4549 * Acknowledge successful or failed receipt of SMS previously indicated
4550 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
4551 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
4552 *
4553 * "data" is const char **
4554 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
4555 * is "0" on failed receipt (send RP-ERROR)
4556 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
4557 *
4558 * "response" is NULL
4559 *
4560 * Valid errors:
4561 * SUCCESS
4562 * RADIO_NOT_AVAILABLE
4563 * GENERIC_FAILURE
4564 */
4565#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
4566
4567/**
4568 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
4569 *
4570 * Requests to send a SAT/USAT envelope command to SIM.
4571 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
4572 *
4573 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
4574 * the SW1 and SW2 status bytes from the UICC response are returned along with
4575 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
4576 *
4577 * The RIL implementation shall perform the normal processing of a '91XX'
4578 * response in SW1/SW2 to retrieve the pending proactive command and send it
4579 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
4580 *
4581 * "data" is a const char * containing the SAT/USAT command
4582 * in hexadecimal format starting with command tag
4583 *
4584 * "response" is a const RIL_SIM_IO_Response *
4585 *
4586 * Valid errors:
4587 * RIL_E_SUCCESS
4588 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08004589 * SIM_BUSY
4590 * OPERATION_NOT_ALLOWED
Jake Hamby300105d2011-09-26 01:01:44 -07004591 * RIL_E_GENERIC_FAILURE
4592 */
4593#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
4594
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004595/**
4596 * RIL_REQUEST_VOICE_RADIO_TECH
4597 *
4598 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
4599 * when radio state is RADIO_STATE_ON
4600 *
4601 * "data" is NULL
4602 * "response" is int *
4603 * ((int *) response)[0] is of type const RIL_RadioTechnology
4604 *
4605 * Valid errors:
4606 * SUCCESS
4607 * RADIO_NOT_AVAILABLE
4608 * GENERIC_FAILURE
4609 */
4610#define RIL_REQUEST_VOICE_RADIO_TECH 108
4611
Wink Saville8a9e0212013-04-09 12:11:38 -07004612/**
4613 * RIL_REQUEST_GET_CELL_INFO_LIST
4614 *
4615 * Request all of the current cell information known to the radio. The radio
4616 * must a list of all current cells, including the neighboring cells. If for a particular
4617 * cell information isn't known then the appropriate unknown value will be returned.
4618 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
4619 *
4620 * "data" is NULL
4621 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08004622 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07004623 */
4624#define RIL_REQUEST_GET_CELL_INFO_LIST 109
4625
4626/**
4627 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
4628 *
4629 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
Wink Savillec57b3eb2013-04-17 12:51:41 -07004630 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
Wink Saville8a9e0212013-04-09 12:11:38 -07004631 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
4632 * a RIL_UNSOL_CELL_INFO_LIST.
4633 *
4634 * "data" is int *
4635 * ((int *)data)[0] is minimum time in milliseconds
4636 *
4637 * "response" is NULL
4638 *
4639 * Valid errors:
4640 * SUCCESS
4641 * RADIO_NOT_AVAILABLE
4642 * GENERIC_FAILURE
4643 */
4644#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
Jake Hamby300105d2011-09-26 01:01:44 -07004645
Sungmin Choi75697532013-04-26 15:04:45 -07004646/**
4647 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
4648 *
4649 * Set an apn to initial attach network
4650 * "response" is NULL
4651 *
4652 * Valid errors:
4653 * SUCCESS
4654 * RADIO_NOT_AVAILABLE (radio resetting)
4655 * GENERIC_FAILURE
4656 * SUBSCRIPTION_NOT_AVAILABLE
4657 */
4658#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
4659
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004660/**
4661 * RIL_REQUEST_IMS_REGISTRATION_STATE
4662 *
4663 * Request current IMS registration state
4664 *
4665 * "data" is NULL
4666 *
4667 * "response" is int *
4668 * ((int *)response)[0] is registration state:
4669 * 0 - Not registered
4670 * 1 - Registered
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004671 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004672 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004673 * must follow with IMS SMS format:
4674 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004675 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
4676 *
4677 * Valid errors:
4678 * SUCCESS
4679 * RADIO_NOT_AVAILABLE
4680 * GENERIC_FAILURE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004681 */
4682#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
4683
4684/**
4685 * RIL_REQUEST_IMS_SEND_SMS
4686 *
4687 * Send a SMS message over IMS
4688 *
4689 * "data" is const RIL_IMS_SMS_Message *
4690 *
4691 * "response" is a const RIL_SMS_Response *
4692 *
4693 * Based on the return error, caller decides to resend if sending sms
4694 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
4695 * In case of retry, data is encoded based on Voice Technology available.
4696 *
4697 * Valid errors:
4698 * SUCCESS
4699 * RADIO_NOT_AVAILABLE
4700 * SMS_SEND_FAIL_RETRY
4701 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08004702 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004703 * INVALID_ARGUMENTS
4704 * INVALID_STATE
4705 * NO_MEMORY
4706 * INVALID_SMS_FORMAT
4707 * SYSTEM_ERR
4708 * REQUEST_RATE_LIMITED
4709 * MODEM_ERR
4710 * NETWORK_ERR
4711 * ENCODING_ERR
4712 * INVALID_SMSC_ADDRESS
4713 * MODE_NOT_SUPPORTED
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004714 * GENERIC_FAILURE
4715 *
4716 */
4717#define RIL_REQUEST_IMS_SEND_SMS 113
4718
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004719/**
4720 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
4721 *
4722 * Request APDU exchange on the basic channel. This command reflects TS 27.007
4723 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
4724 * of GSM/CDMA, and filter commands appropriately. It should filter
4725 * channel management and SELECT by DF name commands.
4726 *
4727 * "data" is a const RIL_SIM_APDU *
4728 * "sessionid" field should be ignored.
4729 *
4730 * "response" is a const RIL_SIM_IO_Response *
4731 *
4732 * Valid errors:
4733 * SUCCESS
4734 * RADIO_NOT_AVAILABLE
4735 * GENERIC_FAILURE
4736 */
4737#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
4738
4739/**
4740 * RIL_REQUEST_SIM_OPEN_CHANNEL
4741 *
4742 * Open a new logical channel and select the given application. This command
4743 * reflects TS 27.007 "open logical channel" operation (+CCHO).
4744 *
4745 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
4746 *
4747 * "response" is int *
4748 * ((int *)data)[0] contains the session id of the logical channel.
Shishir Agrawal760123f2014-10-14 09:14:57 -07004749 * ((int *)data)[1] onwards may optionally contain the select response for the
4750 * open channel command with one byte per integer.
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004751 *
4752 * Valid errors:
4753 * SUCCESS
4754 * RADIO_NOT_AVAILABLE
4755 * GENERIC_FAILURE
4756 * MISSING_RESOURCE
4757 * NO_SUCH_ELEMENT
4758 */
4759#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
4760
4761/**
4762 * RIL_REQUEST_SIM_CLOSE_CHANNEL
4763 *
4764 * Close a previously opened logical channel. This command reflects TS 27.007
4765 * "close logical channel" operation (+CCHC).
4766 *
4767 * "data" is int *
4768 * ((int *)data)[0] is the session id of logical the channel to close.
4769 *
4770 * "response" is NULL
4771 *
4772 * Valid errors:
4773 * SUCCESS
4774 * RADIO_NOT_AVAILABLE
4775 * GENERIC_FAILURE
4776 */
4777#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
4778
4779/**
4780 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
4781 *
4782 * Exchange APDUs with a UICC over a previously opened logical channel. This
4783 * command reflects TS 27.007 "generic logical channel access" operation
4784 * (+CGLA). The modem should filter channel management and SELECT by DF name
4785 * commands.
4786 *
4787 * "data" is a const RIL_SIM_APDU*
4788 *
4789 * "response" is a const RIL_SIM_IO_Response *
4790 *
4791 * Valid errors:
4792 * SUCCESS
4793 * RADIO_NOT_AVAILABLE
4794 * GENERIC_FAILURE
4795 */
4796#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
4797
Jake Hamby8a4a2332014-01-15 13:12:05 -08004798/**
4799 * RIL_REQUEST_NV_READ_ITEM
4800 *
4801 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4802 * This is used for device configuration by some CDMA operators.
4803 *
4804 * "data" is a const RIL_NV_ReadItem *
4805 *
4806 * "response" is const char * containing the contents of the NV item
4807 *
4808 * Valid errors:
4809 * SUCCESS
4810 * RADIO_NOT_AVAILABLE
4811 * GENERIC_FAILURE
4812 */
4813#define RIL_REQUEST_NV_READ_ITEM 118
4814
4815/**
4816 * RIL_REQUEST_NV_WRITE_ITEM
4817 *
4818 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4819 * This is used for device configuration by some CDMA operators.
4820 *
4821 * "data" is a const RIL_NV_WriteItem *
4822 *
4823 * "response" is NULL
4824 *
4825 * Valid errors:
4826 * SUCCESS
4827 * RADIO_NOT_AVAILABLE
4828 * GENERIC_FAILURE
4829 */
4830#define RIL_REQUEST_NV_WRITE_ITEM 119
4831
4832/**
4833 * RIL_REQUEST_NV_WRITE_CDMA_PRL
4834 *
4835 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
4836 * This is used for device configuration by some CDMA operators.
4837 *
4838 * "data" is a const char * containing the PRL as a byte array
4839 *
4840 * "response" is NULL
4841 *
4842 * Valid errors:
4843 * SUCCESS
4844 * RADIO_NOT_AVAILABLE
4845 * GENERIC_FAILURE
4846 */
4847#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
4848
4849/**
4850 * RIL_REQUEST_NV_RESET_CONFIG
4851 *
4852 * Reset the radio NV configuration to the factory state.
4853 * This is used for device configuration by some CDMA operators.
4854 *
4855 * "data" is int *
Jake Hambyd27c9d52014-02-06 14:52:05 -08004856 * ((int *)data)[0] is 1 to reload all NV items
4857 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
4858 * ((int *)data)[0] is 3 for factory reset (RTN)
Jake Hamby8a4a2332014-01-15 13:12:05 -08004859 *
4860 * "response" is NULL
4861 *
4862 * Valid errors:
4863 * SUCCESS
4864 * RADIO_NOT_AVAILABLE
4865 * GENERIC_FAILURE
4866 */
4867#define RIL_REQUEST_NV_RESET_CONFIG 121
4868
Etan Cohend3652192014-06-20 08:28:44 -07004869 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
4870 * FIXME This API needs to have more documentation.
4871 *
4872 * Selection/de-selection of a subscription from a SIM card
4873 * "data" is const RIL_SelectUiccSub*
4874
4875 *
4876 * "response" is NULL
4877 *
4878 * Valid errors:
4879 * SUCCESS
4880 * RADIO_NOT_AVAILABLE (radio resetting)
4881 * GENERIC_FAILURE
4882 * SUBSCRIPTION_NOT_SUPPORTED
4883 *
4884 */
4885#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
4886
4887/**
4888 * RIL_REQUEST_ALLOW_DATA
4889 *
4890 * Tells the modem whether data calls are allowed or not
4891 *
4892 * "data" is int *
4893 * FIXME slotId and aid will be added.
4894 * ((int *)data)[0] is == 0 to allow data calls
4895 * ((int *)data)[0] is == 1 to disallow data calls
4896 *
4897 * "response" is NULL
4898 *
4899 * Valid errors:
4900 *
4901 * SUCCESS
4902 * RADIO_NOT_AVAILABLE (radio resetting)
4903 * GENERIC_FAILURE
4904 *
4905 */
4906#define RIL_REQUEST_ALLOW_DATA 123
4907
4908/**
4909 * RIL_REQUEST_GET_HARDWARE_CONFIG
4910 *
4911 * Request all of the current hardware (modem and sim) associated
4912 * with the RIL.
4913 *
4914 * "data" is NULL
4915 *
4916 * "response" is an array of RIL_HardwareConfig.
4917 */
4918#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
4919
4920/**
Amit Mahajan2b772032014-06-26 14:20:11 -07004921 * RIL_REQUEST_SIM_AUTHENTICATION
Etan Cohend3652192014-06-20 08:28:44 -07004922 *
4923 * Returns the response of SIM Authentication through RIL to a
4924 * challenge request.
4925 *
4926 * "data" Base64 encoded string containing challenge:
4927 * int authContext; P2 value of authentication command, see P2 parameter in
4928 * 3GPP TS 31.102 7.1.2
4929 * char *authData; the challenge string in Base64 format, see 3GPP
4930 * TS 31.102 7.1.2
4931 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
4932 * NULL if no value
4933 *
4934 * "response" Base64 encoded strings containing response:
4935 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
4936 * int sw2;
4937 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
4938 */
Amit Mahajan2b772032014-06-26 14:20:11 -07004939#define RIL_REQUEST_SIM_AUTHENTICATION 125
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004940
Wink Savillec29360a2014-07-13 05:17:28 -07004941/**
4942 * RIL_REQUEST_GET_DC_RT_INFO
4943 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004944 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07004945 * Requests the Data Connection Real Time Info
4946 *
4947 * "data" is NULL
4948 *
4949 * "response" is the most recent RIL_DcRtInfo
4950 *
4951 * Valid errors:
4952 * SUCCESS
4953 * RADIO_NOT_AVAILABLE
4954 * GENERIC_FAILURE
4955 *
4956 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
4957 */
4958#define RIL_REQUEST_GET_DC_RT_INFO 126
4959
4960/**
4961 * RIL_REQUEST_SET_DC_RT_INFO_RATE
4962 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004963 * The request is DEPRECATED
Wink Savillec29360a2014-07-13 05:17:28 -07004964 * This is the minimum number of milliseconds between successive
4965 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
4966 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
4967 * 0 means send as fast as possible.
4968 *
4969 * "data" The number of milliseconds as an int
4970 *
4971 * "response" is null
4972 *
4973 * Valid errors:
4974 * SUCCESS must not fail
4975 */
4976#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
4977
Amit Mahajanc796e222014-08-13 16:54:01 +00004978/**
4979 * RIL_REQUEST_SET_DATA_PROFILE
4980 *
4981 * Set data profile in modem
Hui Wang8d679622014-10-16 14:59:27 -05004982 * Modem should erase existed profiles from framework, and apply new profiles
Amit Mahajanc796e222014-08-13 16:54:01 +00004983 * "data" is an const RIL_DataProfileInfo **
4984 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
4985 * "response" is NULL
4986 *
4987 * Valid errors:
4988 * SUCCESS
4989 * RADIO_NOT_AVAILABLE (radio resetting)
4990 * GENERIC_FAILURE
4991 * SUBSCRIPTION_NOT_AVAILABLE
4992 */
4993#define RIL_REQUEST_SET_DATA_PROFILE 128
Naveen Kallaa65a16a2014-07-31 16:48:31 -07004994
4995/**
4996 * RIL_REQUEST_SHUTDOWN
4997 *
4998 * Device is shutting down. All further commands are ignored
4999 * and RADIO_NOT_AVAILABLE must be returned.
5000 *
5001 * "data" is null
5002 * "response" is NULL
5003 *
5004 * Valid errors:
5005 * SUCCESS
5006 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005007 * OPERATION_NOT_ALLOWED
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005008 * GENERIC_FAILURE
5009 */
5010#define RIL_REQUEST_SHUTDOWN 129
5011
Wink Saville8b4e4f72014-10-17 15:01:45 -07005012/**
5013 * RIL_REQUEST_GET_RADIO_CAPABILITY
5014 *
5015 * Used to get phone radio capablility.
5016 *
Abhishek Adappa772c0d22015-02-09 11:11:12 -08005017 * "data" is the RIL_RadioCapability structure
Wink Saville8b4e4f72014-10-17 15:01:45 -07005018 *
5019 * Valid errors:
5020 * SUCCESS
5021 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005022 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005023 * GENERIC_FAILURE
5024 */
5025#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
5026
5027/**
5028 * RIL_REQUEST_SET_RADIO_CAPABILITY
5029 *
5030 * Used to set the phones radio capability. Be VERY careful
5031 * using this request as it may cause some vendor modems to reset. Because
5032 * of the possible modem reset any RIL commands after this one may not be
5033 * processed.
5034 *
5035 * "data" is the RIL_RadioCapability structure
5036 *
5037 * "response" is the RIL_RadioCapability structure, used to feedback return status
5038 *
5039 * Valid errors:
5040 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
5041 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005042 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005043 * GENERIC_FAILURE
5044 */
5045#define RIL_REQUEST_SET_RADIO_CAPABILITY 131
5046
fengluf7408292015-04-14 14:53:55 -07005047/**
5048 * RIL_REQUEST_START_LCE
5049 *
5050 * Start Link Capacity Estimate (LCE) service if supported by the radio.
5051 *
5052 * "data" is const int *
5053 * ((const int*)data)[0] specifies the desired reporting interval (ms).
fenglu290add32015-05-01 17:05:15 -07005054 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
fengluf7408292015-04-14 14:53:55 -07005055 *
fenglu290add32015-05-01 17:05:15 -07005056 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005057 *
5058 * Valid errors:
5059 * SUCCESS
5060 * RADIO_NOT_AVAILABLE
5061 * LCE_NOT_SUPPORTED
5062 */
5063#define RIL_REQUEST_START_LCE 132
5064
5065/**
5066 * RIL_REQUEST_STOP_LCE
5067 *
5068 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
5069 * idempotent for the radio modem.
5070 *
fenglu290add32015-05-01 17:05:15 -07005071 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005072 *
5073 * Valid errors:
5074 * SUCCESS
5075 * RADIO_NOT_AVAILABLE
5076 * LCE_NOT_SUPPORTED
5077 */
5078#define RIL_REQUEST_STOP_LCE 133
5079
5080/**
5081 * RIL_REQUEST_PULL_LCEDATA
5082 *
5083 * Pull LCE service for capacity information.
5084 *
fenglu290add32015-05-01 17:05:15 -07005085 * "response" is the RIL_LceDataInfo.
fengluf7408292015-04-14 14:53:55 -07005086 *
5087 * Valid errors:
5088 * SUCCESS
5089 * RADIO_NOT_AVAILABLE
5090 * LCE_NOT_SUPPORTED
5091 */
5092#define RIL_REQUEST_PULL_LCEDATA 134
5093
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005094/**
5095 * RIL_REQUEST_GET_ACTIVITY_INFO
5096 *
5097 * Get modem activity statisitics info.
5098 *
5099 * There can be multiple RIL_REQUEST_GET_ACTIVITY_INFO calls to modem.
5100 * Once the response for the request is sent modem will clear
5101 * current statistics information.
5102 *
5103 * "data" is null
5104 * "response" is const RIL_ActivityStatsInfo *
5105 *
5106 * Valid errors:
5107 *
5108 * SUCCESS
5109 * RADIO_NOT_AVAILABLE (radio resetting)
5110 * GENERIC_FAILURE
5111 */
5112#define RIL_REQUEST_GET_ACTIVITY_INFO 135
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005113
Meng Wangb4e34312016-05-12 14:54:36 -07005114/**
5115 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS
5116 *
5117 * Set carrier restrictions for this sim slot
5118 *
5119 * "data" is const RIL_CarrierRestrictions *
5120 * A list of allowed carriers and possibly a list of excluded carriers.
5121 * If data is NULL, means to clear previous carrier restrictions and allow all carriers
5122 *
5123 * "response" is int *
5124 * ((int *)data)[0] contains the number of allowed carriers which have been set correctly.
5125 * On success, it should match the length of list data->allowed_carriers.
5126 * If data is NULL, the value must be 0.
5127 *
5128 * Valid errors:
5129 * RIL_E_SUCCESS
5130 * RIL_E_INVALID_ARGUMENTS
5131 * RIL_E_RADIO_NOT_AVAILABLE
5132 * RIL_E_REQUEST_NOT_SUPPORTED
5133 */
5134#define RIL_REQUEST_SET_CARRIER_RESTRICTIONS 136
5135
5136/**
5137 * RIL_REQUEST_GET_CARRIER_RESTRICTIONS
5138 *
5139 * Get carrier restrictions for this sim slot
5140 *
5141 * "data" is NULL
5142 *
5143 * "response" is const RIL_CarrierRestrictions *.
5144 * If response is NULL, it means all carriers are allowed.
5145 *
5146 * Valid errors:
5147 * RIL_E_SUCCESS
5148 * RIL_E_RADIO_NOT_AVAILABLE
5149 * RIL_E_REQUEST_NOT_SUPPORTED
5150 */
5151#define RIL_REQUEST_GET_CARRIER_RESTRICTIONS 137
5152
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005153/***********************************************************************/
5154
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005155/**
5156 * RIL_RESPONSE_ACKNOWLEDGEMENT
5157 *
5158 * This is used by Asynchronous solicited messages and Unsolicited messages
5159 * to acknowledge the receipt of those messages in RIL.java so that the ack
5160 * can be used to let ril.cpp to release wakelock.
5161 *
5162 * Valid errors
5163 * SUCCESS
5164 * RADIO_NOT_AVAILABLE
5165 */
5166
5167#define RIL_RESPONSE_ACKNOWLEDGEMENT 800
5168
5169/***********************************************************************/
5170
Wink Savillef4c4d362009-04-02 01:37:03 -07005171
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005172#define RIL_UNSOL_RESPONSE_BASE 1000
5173
5174/**
5175 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
5176 *
5177 * Indicate when value of RIL_RadioState has changed.
5178 *
5179 * Callee will invoke RIL_RadioStateRequest method on main thread
5180 *
5181 * "data" is NULL
5182 */
5183
5184#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
5185
5186
5187/**
5188 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
5189 *
5190 * Indicate when call state has changed
5191 *
5192 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
5193 *
5194 * "data" is NULL
5195 *
Wink Saville7f856802009-06-09 10:23:37 -07005196 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005197 * "RING", "BUSY", "NO CARRIER", and also call state
5198 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
5199 *
5200 * Redundent or extraneous invocations are tolerated
5201 */
5202#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
5203
5204
5205/**
Wink Savillec0114b32011-02-18 10:14:07 -08005206 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005207 *
Wink Savillec0114b32011-02-18 10:14:07 -08005208 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005209 *
5210 * Callee will invoke the following requests on main thread:
5211 *
Wink Savillec0114b32011-02-18 10:14:07 -08005212 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005213 * RIL_REQUEST_OPERATOR
5214 *
5215 * "data" is NULL
5216 *
5217 * FIXME should this happen when SIM records are loaded? (eg, for
5218 * EONS)
5219 */
Wink Savillec0114b32011-02-18 10:14:07 -08005220#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005221
5222/**
5223 * RIL_UNSOL_RESPONSE_NEW_SMS
5224 *
5225 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07005226 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005227 * "data" is const char *
5228 * This is a pointer to a string containing the PDU of an SMS-DELIVER
5229 * as an ascii string of hex digits. The PDU starts with the SMSC address
5230 * per TS 27.005 (+CMT:)
5231 *
5232 * Callee will subsequently confirm the receipt of thei SMS with a
5233 * RIL_REQUEST_SMS_ACKNOWLEDGE
5234 *
Wink Saville7f856802009-06-09 10:23:37 -07005235 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005236 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5237 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5238 */
5239
5240#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
5241
5242/**
5243 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
5244 *
5245 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07005246 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005247 * "data" is const char *
5248 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
5249 * as an ascii string of hex digits. The PDU starts with the SMSC address
5250 * per TS 27.005 (+CDS:).
5251 *
5252 * Callee will subsequently confirm the receipt of the SMS with a
5253 * RIL_REQUEST_SMS_ACKNOWLEDGE
5254 *
Wink Saville7f856802009-06-09 10:23:37 -07005255 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005256 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5257 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5258 */
5259
5260#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
5261
5262/**
5263 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
5264 *
5265 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07005266 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005267 * "data" is const int *
5268 * ((const int *)data)[0] contains the slot index on the SIM that contains
5269 * the new message
5270 */
5271
5272#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
5273
5274/**
5275 * RIL_UNSOL_ON_USSD
5276 *
5277 * Called when a new USSD message is received.
5278 *
5279 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07005280 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005281 * one of these string values:
5282 * "0" USSD-Notify -- text in ((const char **)data)[1]
5283 * "1" USSD-Request -- text in ((const char **)data)[1]
5284 * "2" Session terminated by network
5285 * "3" other local client (eg, SIM Toolkit) has responded
5286 * "4" Operation not supported
5287 * "5" Network timeout
5288 *
5289 * The USSD session is assumed to persist if the type code is "1", otherwise
5290 * the current session (if any) is assumed to have terminated.
5291 *
5292 * ((const char **)data)[1] points to a message string if applicable, which
5293 * should always be in UTF-8.
5294 */
5295#define RIL_UNSOL_ON_USSD 1006
5296/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
5297
5298/**
5299 * RIL_UNSOL_ON_USSD_REQUEST
5300 *
5301 * Obsolete. Send via RIL_UNSOL_ON_USSD
5302 */
Wink Saville7f856802009-06-09 10:23:37 -07005303#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005304
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005305/**
5306 * RIL_UNSOL_NITZ_TIME_RECEIVED
5307 *
5308 * Called when radio has received a NITZ time message
5309 *
5310 * "data" is const char * pointing to NITZ time string
5311 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
5312 */
5313#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
5314
5315/**
5316 * RIL_UNSOL_SIGNAL_STRENGTH
5317 *
5318 * Radio may report signal strength rather han have it polled.
5319 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005320 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005321 */
5322#define RIL_UNSOL_SIGNAL_STRENGTH 1009
5323
5324
5325/**
Wink Savillef4c4d362009-04-02 01:37:03 -07005326 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005327 *
Wink Savillec0114b32011-02-18 10:14:07 -08005328 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07005329 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
5330 * of current data contexts including new contexts that have been
5331 * activated. A data call is only removed from this list when the
5332 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
5333 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005334 *
Wink Savillef4c4d362009-04-02 01:37:03 -07005335 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005336 */
5337
Wink Savillef4c4d362009-04-02 01:37:03 -07005338#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005339
5340/**
5341 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
5342 *
5343 * Reports supplementary service related notification from the network.
5344 *
5345 * "data" is a const RIL_SuppSvcNotification *
5346 *
5347 */
5348
5349#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
5350
5351/**
5352 * RIL_UNSOL_STK_SESSION_END
5353 *
5354 * Indicate when STK session is terminated by SIM.
5355 *
5356 * "data" is NULL
5357 */
5358#define RIL_UNSOL_STK_SESSION_END 1012
5359
5360/**
5361 * RIL_UNSOL_STK_PROACTIVE_COMMAND
5362 *
5363 * Indicate when SIM issue a STK proactive command to applications
5364 *
5365 * "data" is a const char * containing SAT/USAT proactive command
5366 * in hexadecimal format string starting with command tag
5367 *
5368 */
5369#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
5370
5371/**
5372 * RIL_UNSOL_STK_EVENT_NOTIFY
5373 *
5374 * Indicate when SIM notifies applcations some event happens.
5375 * Generally, application does not need to have any feedback to
5376 * SIM but shall be able to indicate appropriate messages to users.
5377 *
5378 * "data" is a const char * containing SAT/USAT commands or responses
5379 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
5380 * starting with first byte of response data or command tag
5381 *
5382 */
5383#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
5384
5385/**
5386 * RIL_UNSOL_STK_CALL_SETUP
5387 *
5388 * Indicate when SIM wants application to setup a voice call.
5389 *
5390 * "data" is const int *
5391 * ((const int *)data)[0] contains timeout value (in milliseconds)
5392 */
5393#define RIL_UNSOL_STK_CALL_SETUP 1015
5394
5395/**
5396 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
5397 *
5398 * Indicates that SMS storage on the SIM is full. Sent when the network
5399 * attempts to deliver a new SMS message. Messages cannot be saved on the
5400 * SIM until space is freed. In particular, incoming Class 2 messages
5401 * cannot be stored.
5402 *
5403 * "data" is null
5404 *
5405 */
5406#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
5407
5408/**
5409 * RIL_UNSOL_SIM_REFRESH
5410 *
5411 * Indicates that file(s) on the SIM have been updated, or the SIM
5412 * has been reinitialized.
5413 *
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005414 * In the case where RIL is version 6 or older:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005415 * "data" is an int *
5416 * ((int *)data)[0] is a RIL_SimRefreshResult.
5417 * ((int *)data)[1] is the EFID of the updated file if the result is
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005418 * SIM_FILE_UPDATE or NULL for any other result.
5419 *
5420 * In the case where RIL is version 7:
5421 * "data" is a RIL_SimRefreshResponse_v7 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005422 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005423 * Note: If the SIM state changes as a result of the SIM refresh (eg,
5424 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005425 * should be sent.
5426 */
5427#define RIL_UNSOL_SIM_REFRESH 1017
5428
5429/**
5430 * RIL_UNSOL_CALL_RING
5431 *
5432 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07005433 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
5434 * of a call and sending multiple is optional. If the system property
5435 * ro.telephony.call_ring.multiple is false then the upper layers
5436 * will generate the multiple events internally. Otherwise the vendor
5437 * ril must generate multiple RIL_UNSOL_CALL_RING if
5438 * ro.telephony.call_ring.multiple is true or if it is absent.
5439 *
5440 * The rate of these events is controlled by ro.telephony.call_ring.delay
5441 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005442 *
Wink Saville3d54e742009-05-18 18:00:44 -07005443 * "data" is null for GSM
5444 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005445 */
5446#define RIL_UNSOL_CALL_RING 1018
5447
The Android Open Source Project34a51082009-03-05 14:34:37 -08005448/**
5449 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5450 *
5451 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07005452 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005453 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07005454
The Android Open Source Project34a51082009-03-05 14:34:37 -08005455 * "data" is null
5456 */
5457#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
5458
5459/**
5460 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
5461 *
5462 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07005463 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005464 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07005465 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005466 * Callee will subsequently confirm the receipt of the SMS with
5467 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07005468 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005469 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
5470 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07005471 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005472 */
5473#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
5474
5475/**
5476 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
5477 *
5478 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07005479 *
Henrik Hall0eba2022010-11-25 10:20:56 +01005480 * "data" can be one of the following:
5481 * If received from GSM network, "data" is const char of 88 bytes
5482 * which indicates each page of a CBS Message sent to the MS by the
5483 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
5484 * If received from UMTS network, "data" is const char of 90 up to 1252
5485 * bytes which contain between 1 and 15 CBS Message pages sent as one
5486 * 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 -07005487 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005488 */
5489#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07005490
The Android Open Source Project34a51082009-03-05 14:34:37 -08005491/**
5492 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
5493 *
5494 * Indicates that SMS storage on the RUIM is full. Messages
5495 * cannot be saved on the RUIM until space is freed.
5496 *
5497 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07005498 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005499 */
Wink Savillef4c4d362009-04-02 01:37:03 -07005500#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
5501
The Android Open Source Project34a51082009-03-05 14:34:37 -08005502/**
5503 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
5504 *
5505 * Indicates a restricted state change (eg, for Domain Specific Access Control).
5506 *
5507 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
5508 *
5509 * "data" is an int *
5510 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
5511 */
5512#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
5513
Wink Saville1b5fd232009-04-22 14:50:00 -07005514/**
5515 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
5516 *
5517 * Indicates that the radio system selection module has
5518 * autonomously entered emergency callback mode.
5519 *
5520 * "data" is null
5521 *
5522 */
5523#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08005524
Wink Saville1b5fd232009-04-22 14:50:00 -07005525/**
5526 * RIL_UNSOL_CDMA_CALL_WAITING
5527 *
5528 * Called when CDMA radio receives a call waiting indication.
5529 *
5530 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07005531 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005532 */
5533#define RIL_UNSOL_CDMA_CALL_WAITING 1025
5534
5535/**
5536 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
5537 *
5538 * Called when CDMA radio receives an update of the progress of an
5539 * OTASP/OTAPA call.
5540 *
5541 * "data" is const int *
5542 * For CDMA this is an integer OTASP/OTAPA status listed in
5543 * RIL_CDMA_OTA_ProvisionStatus.
5544 *
5545 */
5546#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
5547
5548/**
5549 * RIL_UNSOL_CDMA_INFO_REC
5550 *
5551 * Called when CDMA radio receives one or more info recs.
5552 *
5553 * "data" is const RIL_CDMA_InformationRecords *
5554 *
5555 */
5556#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08005557
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07005558/**
5559 * RIL_UNSOL_OEM_HOOK_RAW
5560 *
5561 * This is for OEM specific use.
5562 *
5563 * "data" is a byte[]
5564 */
5565#define RIL_UNSOL_OEM_HOOK_RAW 1028
5566
John Wang5d621da2009-09-18 17:17:48 -07005567/**
5568 * RIL_UNSOL_RINGBACK_TONE
5569 *
5570 * Indicates that nework doesn't have in-band information, need to
5571 * play out-band tone.
5572 *
5573 * "data" is an int *
5574 * ((int *)data)[0] == 0 for stop play ringback tone.
5575 * ((int *)data)[0] == 1 for start play ringback tone.
5576 */
5577#define RIL_UNSOL_RINGBACK_TONE 1029
5578
John Wang5909cf82010-01-29 00:18:54 -08005579/**
5580 * RIL_UNSOL_RESEND_INCALL_MUTE
5581 *
5582 * Indicates that framework/application need reset the uplink mute state.
5583 *
5584 * There may be situations where the mute state becomes out of sync
5585 * between the application and device in some GSM infrastructures.
5586 *
5587 * "data" is null
5588 */
5589#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08005590
5591/**
5592 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
5593 *
5594 * Called when CDMA subscription source changed.
5595 *
5596 * "data" is int *
5597 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
5598 */
Wink Saville29487ef2011-04-15 09:15:31 -07005599#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08005600
5601/**
5602 * RIL_UNSOL_CDMA_PRL_CHANGED
5603 *
5604 * Called when PRL (preferred roaming list) changes.
5605 *
5606 * "data" is int *
5607 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
5608 */
5609#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
5610
5611/**
5612 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
5613 *
5614 * Called when Emergency Callback Mode Ends
5615 *
5616 * Indicates that the radio system selection module has
5617 * proactively exited emergency callback mode.
5618 *
5619 * "data" is NULL
5620 *
5621 */
5622#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
5623
Wink Saville5b9df332011-04-06 16:24:21 -07005624/**
5625 * RIL_UNSOL_RIL_CONNECTED
5626 *
5627 * Called the ril connects and returns the version
5628 *
5629 * "data" is int *
5630 * ((int *)data)[0] is RIL_VERSION
5631 */
5632#define RIL_UNSOL_RIL_CONNECTED 1034
5633
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005634/**
5635 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
5636 *
5637 * Indicates that voice technology has changed. Contains new radio technology
5638 * as a data in the message.
5639 *
5640 * "data" is int *
5641 * ((int *)data)[0] is of type const RIL_RadioTechnology
5642 *
5643 */
5644#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
5645
Wink Saville8a9e0212013-04-09 12:11:38 -07005646/**
5647 * RIL_UNSOL_CELL_INFO_LIST
5648 *
5649 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
5650 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
5651 *
5652 * "data" is NULL
5653 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08005654 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07005655 */
5656#define RIL_UNSOL_CELL_INFO_LIST 1036
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005657
Wink Saville865ce3b2013-11-08 16:37:01 -08005658/**
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005659 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
5660 *
5661 * Called when IMS registration state has changed
5662 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005663 * To get IMS registration state and IMS SMS format, callee needs to invoke the
5664 * following request on main thread:
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005665 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005666 * RIL_REQUEST_IMS_REGISTRATION_STATE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005667 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005668 * "data" is NULL
5669 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005670 */
5671#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
5672
Etan Cohend3652192014-06-20 08:28:44 -07005673/**
5674 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
5675 *
5676 * Indicated when there is a change in subscription status.
5677 * This event will be sent in the following scenarios
5678 * - subscription readiness at modem, which was selected by telephony layer
5679 * - when subscription is deactivated by modem due to UICC card removal
5680 * - When network invalidates the subscription i.e. attach reject due to authentication reject
5681 *
5682 * "data" is const int *
5683 * ((const int *)data)[0] == 0 for Subscription Deactivated
5684 * ((const int *)data)[0] == 1 for Subscription Activated
5685 *
5686 */
5687#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
5688
5689/**
5690 * RIL_UNSOL_SRVCC_STATE_NOTIFY
5691 *
5692 * Called when Single Radio Voice Call Continuity(SRVCC)
5693 * progress state has changed
5694 *
5695 * "data" is int *
5696 * ((int *)data)[0] is of type const RIL_SrvccState
5697 *
5698 */
5699
5700#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
5701
5702/**
5703 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
5704 *
5705 * Called when the hardware configuration associated with the RILd changes
5706 *
5707 * "data" is an array of RIL_HardwareConfig
5708 *
5709 */
5710#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
5711
Wink Savillec29360a2014-07-13 05:17:28 -07005712/**
5713 * RIL_UNSOL_DC_RT_INFO_CHANGED
5714 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005715 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005716 * Sent when the DC_RT_STATE changes but the time
5717 * between these messages must not be less than the
5718 * value set by RIL_REQUEST_SET_DC_RT_RATE.
5719 *
5720 * "data" is the most recent RIL_DcRtInfo
5721 *
5722 */
5723#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
5724
Wink Saville8b4e4f72014-10-17 15:01:45 -07005725/**
5726 * RIL_UNSOL_RADIO_CAPABILITY
5727 *
5728 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
5729 * Returns the phone radio capability exactly as
5730 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
5731 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
5732 *
5733 * "data" is the RIL_RadioCapability structure
5734 */
5735#define RIL_UNSOL_RADIO_CAPABILITY 1042
5736
Amit Mahajan54563d32014-11-22 00:54:49 +00005737/*
5738 * RIL_UNSOL_ON_SS
5739 *
5740 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
5741 * call control.
5742 *
5743 * "data" is const RIL_StkCcUnsolSsResponse *
5744 *
5745 */
5746#define RIL_UNSOL_ON_SS 1043
5747
5748/**
5749 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
5750 *
5751 * Called when there is an ALPHA from UICC during Call Control.
5752 *
5753 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
5754 *
5755 */
5756#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
5757
fengluf7408292015-04-14 14:53:55 -07005758/**
5759 * RIL_UNSOL_LCEDATA_RECV
5760 *
5761 * Called when there is an incoming Link Capacity Estimate (LCE) info report.
5762 *
fenglu290add32015-05-01 17:05:15 -07005763 * "data" is the RIL_LceDataInfo structure.
fengluf7408292015-04-14 14:53:55 -07005764 *
5765 */
5766#define RIL_UNSOL_LCEDATA_RECV 1045
5767
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005768/***********************************************************************/
5769
Amit Mahajan54563d32014-11-22 00:54:49 +00005770
Etan Cohend3652192014-06-20 08:28:44 -07005771#if defined(ANDROID_MULTI_SIM)
5772/**
5773 * RIL_Request Function pointer
5774 *
5775 * @param request is one of RIL_REQUEST_*
5776 * @param data is pointer to data defined for that RIL_REQUEST_*
5777 * data is owned by caller, and should not be modified or freed by callee
5778 * @param t should be used in subsequent call to RIL_onResponse
5779 * @param datalen the length of data
5780 *
5781 */
5782typedef void (*RIL_RequestFunc) (int request, void *data,
5783 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
5784
5785/**
5786 * This function should return the current radio state synchronously
5787 */
5788typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
5789
5790#else
5791/* Backward compatible */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005792
5793/**
5794 * RIL_Request Function pointer
5795 *
5796 * @param request is one of RIL_REQUEST_*
5797 * @param data is pointer to data defined for that RIL_REQUEST_*
5798 * data is owned by caller, and should not be modified or freed by callee
5799 * @param t should be used in subsequent call to RIL_onResponse
5800 * @param datalen the length of data
5801 *
5802 */
Wink Saville7f856802009-06-09 10:23:37 -07005803typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005804 size_t datalen, RIL_Token t);
5805
5806/**
5807 * This function should return the current radio state synchronously
5808 */
5809typedef RIL_RadioState (*RIL_RadioStateRequest)();
5810
Etan Cohend3652192014-06-20 08:28:44 -07005811#endif
5812
5813
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005814/**
5815 * This function returns "1" if the specified RIL_REQUEST code is
5816 * supported and 0 if it is not
5817 *
5818 * @param requestCode is one of RIL_REQUEST codes
5819 */
5820
5821typedef int (*RIL_Supports)(int requestCode);
5822
5823/**
Wink Saville7f856802009-06-09 10:23:37 -07005824 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005825 * thread that calls RIL_RequestFunc--and indicates that a pending
5826 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07005827 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005828 * On cancel, the callee should do its best to abandon the request and
5829 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
5830 *
5831 * Subsequent calls to RIL_onRequestComplete for this request with
5832 * other results will be tolerated but ignored. (That is, it is valid
5833 * to ignore the cancellation request)
5834 *
5835 * RIL_Cancel calls should return immediately, and not wait for cancellation
5836 *
Wink Saville7f856802009-06-09 10:23:37 -07005837 * 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 -08005838 * interface
5839 *
5840 * @param t token wants to be canceled
5841 */
5842
5843typedef void (*RIL_Cancel)(RIL_Token t);
5844
5845typedef void (*RIL_TimedCallback) (void *param);
5846
5847/**
5848 * Return a version string for your RIL implementation
5849 */
5850typedef const char * (*RIL_GetVersion) (void);
5851
5852typedef struct {
5853 int version; /* set to RIL_VERSION */
5854 RIL_RequestFunc onRequest;
5855 RIL_RadioStateRequest onStateRequest;
5856 RIL_Supports supports;
5857 RIL_Cancel onCancel;
5858 RIL_GetVersion getVersion;
5859} RIL_RadioFunctions;
5860
Sungmin Choi75697532013-04-26 15:04:45 -07005861typedef struct {
5862 char *apn;
5863 char *protocol;
5864 int authtype;
5865 char *username;
5866 char *password;
5867} RIL_InitialAttachApn;
5868
Amit Mahajan2b772032014-06-26 14:20:11 -07005869typedef struct {
5870 int authContext; /* P2 value of authentication command, see P2 parameter in
5871 3GPP TS 31.102 7.1.2 */
5872 char *authData; /* the challenge string in Base64 format, see 3GPP
5873 TS 31.102 7.1.2 */
5874 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
5875 NULL if no value. */
5876} RIL_SimAuthentication;
5877
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005878#ifdef RIL_SHLIB
5879struct RIL_Env {
5880 /**
5881 * "t" is parameter passed in on previous call to RIL_Notification
5882 * routine.
5883 *
5884 * If "e" != SUCCESS, then response can be null/is ignored
5885 *
Wink Saville7f856802009-06-09 10:23:37 -07005886 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005887 * freed by callee
5888 *
5889 * RIL_onRequestComplete will return as soon as possible
5890 */
Wink Saville7f856802009-06-09 10:23:37 -07005891 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005892 void *response, size_t responselen);
5893
Etan Cohend3652192014-06-20 08:28:44 -07005894#if defined(ANDROID_MULTI_SIM)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005895 /**
5896 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5897 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5898 *
5899 * "data" is owned by caller, and should not be modified or freed by callee
5900 */
Etan Cohend3652192014-06-20 08:28:44 -07005901 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
5902#else
5903 /**
5904 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5905 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5906 *
5907 * "data" is owned by caller, and should not be modified or freed by callee
5908 */
5909 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
5910#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005911 /**
Wink Saville7f856802009-06-09 10:23:37 -07005912 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005913 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
5914 * a relative time value at which the callback is invoked. If relativeTime is
5915 * NULL or points to a 0-filled structure, the callback will be invoked as
5916 * soon as possible
5917 */
5918
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07005919 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07005920 void *param, const struct timeval *relativeTime);
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005921 /**
5922 * "t" is parameter passed in on previous call RIL_Notification routine
5923 *
5924 * RIL_onRequestAck will be called by vendor when an Async RIL request was received
5925 * by them and an ack needs to be sent back to java ril.
5926 */
5927 void (*OnRequestAck) (RIL_Token t);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005928};
5929
5930
Wink Saville7f856802009-06-09 10:23:37 -07005931/**
5932 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005933 * argc and argv will be command line arguments intended for the RIL implementation
5934 * Return NULL on error
5935 *
5936 * @param env is environment point defined as RIL_Env
5937 * @param argc number of arguments
5938 * @param argv list fo arguments
5939 *
5940 */
5941const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
5942
Sanket Padawe1be49ba2016-03-31 17:37:23 -07005943/**
5944 * If BT SAP(SIM Access Profile) is supported, then RIL implementations must define RIL_SAP_Init
5945 * for initializing RIL_RadioFunctions used for BT SAP communcations. It is called whenever RILD
5946 * starts or modem restarts. Returns handlers for SAP related request that are made on SAP
5947 * sepecific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init
5948 * and used on the general RIL socket.
5949 * argc and argv will be command line arguments intended for the RIL implementation
5950 * Return NULL on error.
5951 *
5952 * @param env is environment point defined as RIL_Env
5953 * @param argc number of arguments
5954 * @param argv list fo arguments
5955 *
5956 */
5957const RIL_RadioFunctions *RIL_SAP_Init(const struct RIL_Env *env, int argc, char **argv);
5958
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005959#else /* RIL_SHLIB */
5960
5961/**
5962 * Call this once at startup to register notification routine
5963 *
5964 * @param callbacks user-specifed callback function
5965 */
5966void RIL_register (const RIL_RadioFunctions *callbacks);
5967
5968
5969/**
5970 *
5971 * RIL_onRequestComplete will return as soon as possible
5972 *
5973 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07005974 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005975 * @param e error code
5976 * if "e" != SUCCESS, then response can be null/is ignored
5977 * @param response is owned by caller, and should not be modified or
5978 * freed by callee
5979 * @param responselen the length of response in byte
5980 */
Wink Saville7f856802009-06-09 10:23:37 -07005981void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005982 void *response, size_t responselen);
5983
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005984/**
5985 * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and
5986 * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's
5987 * results, just that the command was received and will take a while. After sending this Ack
5988 * its vendor's responsibility to make sure that AP is up whenever needed while command is
5989 * being processed.
5990 *
5991 * @param t is parameter passed in on previous call to RIL_Notification
5992 * routine.
5993 */
5994void RIL_onRequestAck(RIL_Token t);
5995
Etan Cohend3652192014-06-20 08:28:44 -07005996#if defined(ANDROID_MULTI_SIM)
5997/**
5998 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
5999 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6000 * "data" is owned by caller, and should not be modified or freed by callee
6001 * @param datalen the length of data in byte
6002 */
6003
6004void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
6005 size_t datalen, RIL_SOCKET_ID socket_id);
6006#else
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006007/**
6008 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6009 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6010 * "data" is owned by caller, and should not be modified or freed by callee
6011 * @param datalen the length of data in byte
6012 */
6013
Wink Saville7f856802009-06-09 10:23:37 -07006014void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006015 size_t datalen);
Etan Cohend3652192014-06-20 08:28:44 -07006016#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006017
6018/**
Wink Saville7f856802009-06-09 10:23:37 -07006019 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006020 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6021 * a relative time value at which the callback is invoked. If relativeTime is
6022 * NULL or points to a 0-filled structure, the callback will be invoked as
6023 * soon as possible
6024 *
6025 * @param callback user-specifed callback function
6026 * @param param parameter list
6027 * @param relativeTime a relative time value at which the callback is invoked
6028 */
6029
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07006030void RIL_requestTimedCallback (RIL_TimedCallback callback,
6031 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006032
6033
6034#endif /* RIL_SHLIB */
6035
6036#ifdef __cplusplus
6037}
6038#endif
6039
6040#endif /*ANDROID_RIL_H*/