blob: e034b2f07c1ccde6e3a02195aa9558fcb6f81855 [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
68 * strongly versioned version it enforces structure use.
Sanket Padawe88cf6a52016-01-11 12:45:43 -080069 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -080070#define RIL_VERSION 12
71#define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
Alex Yakavenka45e740e2012-01-31 11:48:27 -080072#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080073
Wink Savillea592eeb2009-05-22 13:26:36 -070074#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
75#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
76
Etan Cohend3652192014-06-20 08:28:44 -070077#define MAX_RILDS 3
78#define MAX_SOCKET_NAME_LENGTH 6
79#define MAX_CLIENT_ID_LENGTH 2
80#define MAX_DEBUG_SOCKET_NAME_LENGTH 12
81#define MAX_QEMU_PIPE_NAME_LENGTH 11
Wink Saville8b4e4f72014-10-17 15:01:45 -070082#define MAX_UUID_LENGTH 64
83
Etan Cohend3652192014-06-20 08:28:44 -070084
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080085typedef void * RIL_Token;
86
87typedef enum {
Etan Cohend3652192014-06-20 08:28:44 -070088 RIL_SOCKET_1,
89#if (SIM_COUNT >= 2)
90 RIL_SOCKET_2,
91#if (SIM_COUNT >= 3)
92 RIL_SOCKET_3,
93#endif
94#if (SIM_COUNT >= 4)
95 RIL_SOCKET_4,
96#endif
97#endif
98 RIL_SOCKET_NUM
99} RIL_SOCKET_ID;
100
101
102typedef enum {
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800103 RIL_E_SUCCESS = 0,
104 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
105 RIL_E_GENERIC_FAILURE = 2,
106 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
107 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
108 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
109 RIL_E_REQUEST_NOT_SUPPORTED = 6,
110 RIL_E_CANCELLED = 7,
111 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
112 call on a Class C GPRS device */
113 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
114 registers in network */
Wink Saville3d54e742009-05-18 18:00:44 -0700115 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
116 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
117 shall be retrieved because of SIM or RUIM
Wink Savillef4c4d362009-04-02 01:37:03 -0700118 card absent */
Wink Saville3d54e742009-05-18 18:00:44 -0700119 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
Wink Savillef4c4d362009-04-02 01:37:03 -0700120 location */
jsh602f80f2009-07-10 15:44:37 -0700121 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
John Wang75534472010-04-20 15:11:42 -0700122 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800123 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
John Wang75534472010-04-20 15:11:42 -0700124 illegal SIM or ME */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800125 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
Amit Mahajan54563d32014-11-22 00:54:49 +0000126 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
127 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
128 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
129 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
130 data */
131 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
132 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
133 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
134 request */
135 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
136 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
137 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
fengluf7408292015-04-14 14:53:55 -0700138 RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800139 RIL_E_LCE_NOT_SUPPORTED = 36, /* LCE service not supported(36 in RILConstants.java) */
140 RIL_E_NO_MEMORY = 37, /* Not sufficient memory to process the request */
141 RIL_E_INTERNAL_ERR = 38, /* Hit unexpected vendor internal error scenario */
142 RIL_E_SYSTEM_ERR = 39, /* Hit platform or system error */
143 RIL_E_MODEM_ERR = 40, /* Hit unexpected modem error */
Ajay Nambi10345892016-03-19 09:02:28 -0700144 RIL_E_INVALID_STATE = 41, /* Unexpected request for the current state */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800145 RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */
146 RIL_E_SIM_ERR = 43, /* Received error from SIM card */
147 RIL_E_INVALID_ARGUMENTS = 44, /* Received invalid arguments in request */
148 RIL_E_INVALID_SIM_STATE = 45, /* Can not process the request in current SIM state */
149 RIL_E_INVALID_MODEM_STATE = 46, /* Can not process the request in current Modem state */
150 RIL_E_INVALID_CALL_ID = 47, /* Received invalid call id in request */
151 RIL_E_NO_SMS_TO_ACK = 48, /* ACK received when there is no SMS to ack */
Nathan Haroldc97b2842016-02-02 12:04:35 -0800152 RIL_E_NETWORK_ERR = 49, /* Received error from network */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800153 RIL_E_REQUEST_RATE_LIMITED = 50, /* Operation denied due to overly-frequent requests */
twen.changdf7add02016-03-04 18:27:48 +0800154 RIL_E_SIM_BUSY = 51, /* SIM is busy */
155 RIL_E_SIM_FULL = 52, /* The target EF is full */
156 RIL_E_NETWORK_REJECT = 53, /* Request is rejected by network */
157 RIL_E_OPERATION_NOT_ALLOWED = 54, /* Not allowed the request now */
158 RIL_E_EMPTY_RECORD = 55, /* The request record is empty */
Ajay Nambi68900f52016-03-11 12:02:55 -0800159 RIL_E_INVALID_SMS_FORMAT = 56, /* Invalid sms format */
160 RIL_E_ENCODING_ERR = 57, /* Message not encoded properly */
161 RIL_E_INVALID_SMSC_ADDRESS = 58, /* SMSC address specified is invalid */
162 RIL_E_NO_SUCH_ENTRY = 59, /* No such entry present to perform the request */
163 RIL_E_NETWORK_NOT_READY = 60, /* Network is not ready to perform the request */
164 RIL_E_NOT_PROVISIONED = 61, /* Device doesnot have this value provisioned */
Ajay Nambi10345892016-03-19 09:02:28 -0700165 RIL_E_NO_SUBSCRIPTION = 62, /* Device doesnot have subscription */
166 RIL_E_NO_NETWORK_FOUND = 63, /* Network cannot be found */
167 RIL_E_DEVICE_IN_USE = 64, /* Operation cannot be performed because the device
168 is currently in use */
169 RIL_E_ABORTED = 65, /* Operation aborted */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800170 // OEM specific error codes. To be used by OEM when they don't want to reveal
171 // specific error codes which would be replaced by Generic failure.
172 RIL_E_OEM_ERROR_1 = 501,
173 RIL_E_OEM_ERROR_2 = 502,
174 RIL_E_OEM_ERROR_3 = 503,
175 RIL_E_OEM_ERROR_4 = 504,
176 RIL_E_OEM_ERROR_5 = 505,
177 RIL_E_OEM_ERROR_6 = 506,
178 RIL_E_OEM_ERROR_7 = 507,
179 RIL_E_OEM_ERROR_8 = 508,
180 RIL_E_OEM_ERROR_9 = 509,
181 RIL_E_OEM_ERROR_10 = 510,
182 RIL_E_OEM_ERROR_11 = 511,
183 RIL_E_OEM_ERROR_12 = 512,
184 RIL_E_OEM_ERROR_13 = 513,
185 RIL_E_OEM_ERROR_14 = 514,
186 RIL_E_OEM_ERROR_15 = 515,
187 RIL_E_OEM_ERROR_16 = 516,
188 RIL_E_OEM_ERROR_17 = 517,
189 RIL_E_OEM_ERROR_18 = 518,
190 RIL_E_OEM_ERROR_19 = 519,
191 RIL_E_OEM_ERROR_20 = 520,
192 RIL_E_OEM_ERROR_21 = 521,
193 RIL_E_OEM_ERROR_22 = 522,
194 RIL_E_OEM_ERROR_23 = 523,
195 RIL_E_OEM_ERROR_24 = 524,
196 RIL_E_OEM_ERROR_25 = 525
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800197} RIL_Errno;
198
199typedef enum {
200 RIL_CALL_ACTIVE = 0,
201 RIL_CALL_HOLDING = 1,
202 RIL_CALL_DIALING = 2, /* MO call only */
203 RIL_CALL_ALERTING = 3, /* MO call only */
204 RIL_CALL_INCOMING = 4, /* MT call only */
205 RIL_CALL_WAITING = 5 /* MT call only */
206} RIL_CallState;
207
208typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -0700209 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
210 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800211 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
Wink Savillef4c4d362009-04-02 01:37:03 -0700212 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
Wink Saville7f856802009-06-09 10:23:37 -0700213 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -0700214 personalization locked, or SIM absent */
215 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
216 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
217 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
Wink Saville7f856802009-06-09 10:23:37 -0700218 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -0700219 personalization locked, or RUIM absent */
220 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800221 RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */
222 RADIO_STATE_ON = 10 /* Radio is on */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800223} RIL_RadioState;
224
Wink Saville43808972011-01-13 17:39:51 -0800225typedef enum {
226 RADIO_TECH_UNKNOWN = 0,
227 RADIO_TECH_GPRS = 1,
228 RADIO_TECH_EDGE = 2,
229 RADIO_TECH_UMTS = 3,
230 RADIO_TECH_IS95A = 4,
231 RADIO_TECH_IS95B = 5,
232 RADIO_TECH_1xRTT = 6,
233 RADIO_TECH_EVDO_0 = 7,
234 RADIO_TECH_EVDO_A = 8,
235 RADIO_TECH_HSDPA = 9,
236 RADIO_TECH_HSUPA = 10,
237 RADIO_TECH_HSPA = 11,
238 RADIO_TECH_EVDO_B = 12,
239 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800240 RADIO_TECH_LTE = 14,
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800241 RADIO_TECH_HSPAP = 15, // HSPA+
Etan Cohend3652192014-06-20 08:28:44 -0700242 RADIO_TECH_GSM = 16, // Only supports voice
Yashdev Singh3c8f37c2015-02-23 13:04:28 -0800243 RADIO_TECH_TD_SCDMA = 17,
244 RADIO_TECH_IWLAN = 18
Wink Saville43808972011-01-13 17:39:51 -0800245} RIL_RadioTechnology;
246
Wink Saville8b4e4f72014-10-17 15:01:45 -0700247typedef enum {
248 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
249 RAF_GPRS = (1 << RADIO_TECH_GPRS),
250 RAF_EDGE = (1 << RADIO_TECH_EDGE),
251 RAF_UMTS = (1 << RADIO_TECH_UMTS),
252 RAF_IS95A = (1 << RADIO_TECH_IS95A),
253 RAF_IS95B = (1 << RADIO_TECH_IS95B),
254 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
255 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
256 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
257 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
258 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
259 RAF_HSPA = (1 << RADIO_TECH_HSPA),
260 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
261 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
262 RAF_LTE = (1 << RADIO_TECH_LTE),
263 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
264 RAF_GSM = (1 << RADIO_TECH_GSM),
265 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
266} RIL_RadioAccessFamily;
267
268typedef enum {
Nathan Harold92839f12016-02-12 10:02:28 -0800269 BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically)
270 BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
271 BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
272 BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000)
273 BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
274 BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
275 BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band)
276 BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band)
277 BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band)
278 BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band)
279 BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band)
280 BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band)
281 BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band)
282 BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band)
283 BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band)
284 BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band)
285 BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band)
286 BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band)
287 BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band)
288} RIL_RadioBandMode;
289
290typedef enum {
Wink Saville8b4e4f72014-10-17 15:01:45 -0700291 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
292 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
293 // forthcoming with these same parameters
294 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
295 // RIL_RadioCapability.status = 0, if any START's fail no
296 // APPLY will be sent
297 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
298 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
299 // occurs in any previous command the RIL_RadioAccessesFamily and
Legler Wu8caf06f2014-10-29 14:02:14 +0800300 // logicalModemUuid fields will be the prior configuration thus
Wink Saville8b4e4f72014-10-17 15:01:45 -0700301 // restoring the configuration to the previous value. An error
302 // returned by this command will generally be ignored or may
303 // cause that logical modem to be removed from service.
304} RadioCapabilityPhase;
305
306typedef enum {
307 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
308 // RC_PHASE_APPLY
309 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
310 // capability was success with RC_PHASE_FINISH
311 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
312 // capability is fail with RC_PHASE_FINISH.
313} RadioCapabilityStatus;
314
315#define RIL_RADIO_CAPABILITY_VERSION 1
316typedef struct {
Legler Wu8caf06f2014-10-29 14:02:14 +0800317 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
Wink Saville8b4e4f72014-10-17 15:01:45 -0700318 int session; // Unique session value defined by framework returned in all "responses/unsol"
319 int phase; // CONFIGURED, START, APPLY, FINISH
320 int rat; // RIL_RadioAccessFamily for the radio
321 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
322 int status; // Return status and an input parameter for RC_PHASE_FINISH
323} RIL_RadioCapability;
324
Wink Savillec0114b32011-02-18 10:14:07 -0800325// Do we want to split Data from Voice and the use
326// RIL_RadioTechnology for get/setPreferredVoice/Data ?
327typedef enum {
328 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
329 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
330 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
331 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
332 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
333 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
334 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
335 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
336 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
337 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
338 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
Uma Maheswari Ramalingam0e094872011-09-28 13:25:48 -0700339 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
340 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
Wink Savillec0114b32011-02-18 10:14:07 -0800341} RIL_PreferredNetworkType;
342
343/* Source for cdma subscription */
344typedef enum {
345 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
346 CDMA_SUBSCRIPTION_SOURCE_NV = 1
347} RIL_CdmaSubscriptionSource;
348
Wink Saville74fa3882009-12-22 15:35:41 -0800349/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
350typedef enum {
351 RIL_UUS_TYPE1_IMPLICIT = 0,
352 RIL_UUS_TYPE1_REQUIRED = 1,
353 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
354 RIL_UUS_TYPE2_REQUIRED = 3,
355 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
356 RIL_UUS_TYPE3_REQUIRED = 5,
357 RIL_UUS_TYPE3_NOT_REQUIRED = 6
358} RIL_UUS_Type;
359
360/* User-to-User Signaling Information data coding schemes. Possible values for
361 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
362 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
363typedef enum {
364 RIL_UUS_DCS_USP = 0, /* User specified protocol */
365 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
366 RIL_UUS_DCS_X244 = 2, /* X.244 */
367 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
368 convergence function */
369 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
370} RIL_UUS_DCS;
371
372/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
373 * This data is passed in RIL_ExtensionRecord and rec contains this
374 * structure when type is RIL_UUS_INFO_EXT_REC */
375typedef struct {
376 RIL_UUS_Type uusType; /* UUS Type */
377 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
378 int uusLength; /* Length of UUS Data */
379 char * uusData; /* UUS Data */
380} RIL_UUS_Info;
381
382/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700383typedef struct {
384 char isPresent; /* non-zero if signal information record is present */
385 char signalType; /* as defined 3.7.5.5-1 */
386 char alertPitch; /* as defined 3.7.5.5-2 */
387 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
388} RIL_CDMA_SignalInfoRecord;
389
Wink Saville1b5fd232009-04-22 14:50:00 -0700390typedef struct {
391 RIL_CallState state;
392 int index; /* Connection Index for use with, eg, AT+CHLD */
393 int toa; /* type of address, eg 145 = intl */
394 char isMpty; /* nonzero if is mpty call */
395 char isMT; /* nonzero if call is mobile terminated */
396 char als; /* ALS line indicator if available
397 (0 = line 1) */
398 char isVoice; /* nonzero if this is is a voice call */
399 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
400 char * number; /* Remote party number */
401 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
402 char * name; /* Remote party name */
403 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800404 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800405} RIL_Call;
406
Wink Savillec0114b32011-02-18 10:14:07 -0800407/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800408typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800409 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700410 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700411 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
412 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800413 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800414 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
415} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800416
417/*
418 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
419 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
420 */
421typedef struct {
422 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500423 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
424 back-off timer value RIL wants to override the one
425 pre-configured in FW.
426 The unit is miliseconds.
427 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700428 The value 0 means retry should be done ASAP.
Wink Saville8a9e0212013-04-09 12:11:38 -0700429 The value of INT_MAX(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800430 int cid; /* Context ID, uniquely identifies this call */
431 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
432 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
433 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
434 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
435 such as "IP" or "IPV6" */
436 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800437 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
438 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800439 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800440 one of each. If the prefix length is absent the addresses
441 are assumed to be point to point with IPv4 having a prefix
442 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800443 char * dnses; /* A space-delimited list of DNS server addresses,
444 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
445 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800446 char * gateways; /* A space-delimited list of default gateway addresses,
447 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
448 May be empty in which case the addresses represent point
449 to point connections. */
450} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800451
Etan Cohend3652192014-06-20 08:28:44 -0700452typedef struct {
453 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
454 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
455 back-off timer value RIL wants to override the one
456 pre-configured in FW.
457 The unit is miliseconds.
458 The value < 0 means no value is suggested.
459 The value 0 means retry should be done ASAP.
460 The value of INT_MAX(0x7fffffff) means no retry. */
461 int cid; /* Context ID, uniquely identifies this call */
462 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
463 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
464 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
465 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
466 such as "IP" or "IPV6" */
467 char * ifname; /* The network interface name */
468 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
469 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
470 May not be empty, typically 1 IPv4 or 1 IPv6 or
471 one of each. If the prefix length is absent the addresses
472 are assumed to be point to point with IPv4 having a prefix
473 length of 32 and IPv6 128. */
474 char * dnses; /* A space-delimited list of DNS server addresses,
475 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
476 May be empty. */
477 char * gateways; /* A space-delimited list of default gateway addresses,
478 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
479 May be empty in which case the addresses represent point
480 to point connections. */
481 char * pcscf; /* the Proxy Call State Control Function address
482 via PCO(Protocol Configuration Option) for IMS client. */
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -0700483} RIL_Data_Call_Response_v9;
484
485typedef struct {
486 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
487 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
488 back-off timer value RIL wants to override the one
489 pre-configured in FW.
490 The unit is miliseconds.
491 The value < 0 means no value is suggested.
492 The value 0 means retry should be done ASAP.
493 The value of INT_MAX(0x7fffffff) means no retry. */
494 int cid; /* Context ID, uniquely identifies this call */
495 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
496 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
497 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
498 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
499 such as "IP" or "IPV6" */
500 char * ifname; /* The network interface name */
501 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
502 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
503 May not be empty, typically 1 IPv4 or 1 IPv6 or
504 one of each. If the prefix length is absent the addresses
505 are assumed to be point to point with IPv4 having a prefix
506 length of 32 and IPv6 128. */
507 char * dnses; /* A space-delimited list of DNS server addresses,
508 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
509 May be empty. */
510 char * gateways; /* A space-delimited list of default gateway addresses,
511 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
512 May be empty in which case the addresses represent point
513 to point connections. */
514 char * pcscf; /* the Proxy Call State Control Function address
515 via PCO(Protocol Configuration Option) for IMS client. */
516 int mtu; /* MTU received from network
517 Value <= 0 means network has either not sent a value or
518 sent an invalid value */
519} RIL_Data_Call_Response_v11;
Etan Cohend3652192014-06-20 08:28:44 -0700520
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700521typedef enum {
522 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
523 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
524} RIL_RadioTechnologyFamily;
525
526typedef struct {
527 RIL_RadioTechnologyFamily tech;
528 unsigned char retry; /* 0 == not retry, nonzero == retry */
529 int messageRef; /* Valid field if retry is set to nonzero.
530 Contains messageRef from RIL_SMS_Response
531 corresponding to failed MO SMS.
532 */
533
534 union {
535 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
536 RIL_CDMA_SMS_Message* cdmaMessage;
537
538 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
539 char** gsmMessage;
540 } message;
541} RIL_IMS_SMS_Message;
542
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800543typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800544 int messageRef; /* TP-Message-Reference for GSM,
545 and BearerData MessageId for CDMA
546 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800547 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700548 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
549 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
550 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800551} RIL_SMS_Response;
552
553/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
554typedef struct {
555 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
556 /* 0 = "REC UNREAD" */
557 /* 1 = "REC READ" */
558 /* 2 = "STO UNSENT" */
559 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700560 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
561 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800562 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
563 (as expected by TS 27.005) or NULL for default SMSC */
564} RIL_SMS_WriteArgs;
565
566/** Used by RIL_REQUEST_DIAL */
567typedef struct {
568 char * address;
569 int clir;
570 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
571 * clir == 0 on "use subscription default value"
572 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
573 * clir == 2 on "CLIR suppression" (allow CLI presentation)
574 */
Wink Saville74fa3882009-12-22 15:35:41 -0800575 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800576} RIL_Dial;
577
578typedef struct {
579 int command; /* one of the commands listed for TS 27.007 +CRSM*/
580 int fileid; /* EF id */
581 char *path; /* "pathid" from TS 27.007 +CRSM command.
582 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700583 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800584 */
585 int p1;
586 int p2;
587 int p3;
588 char *data; /* May be NULL*/
589 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800590} RIL_SIM_IO_v5;
591
592typedef struct {
593 int command; /* one of the commands listed for TS 27.007 +CRSM*/
594 int fileid; /* EF id */
595 char *path; /* "pathid" from TS 27.007 +CRSM command.
596 Path is in hex asciii format eg "7f205f70"
597 Path must always be provided.
598 */
599 int p1;
600 int p2;
601 int p3;
602 char *data; /* May be NULL*/
603 char *pin2; /* May be NULL*/
604 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
605} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800606
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800607/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
608 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
609typedef struct {
610 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
611 ignored for +CSIM command. */
612
613 /* Following fields are used to derive the APDU ("command" and "length"
614 values in TS 27.007 +CSIM and +CGLA commands). */
615 int cla;
616 int instruction;
617 int p1;
618 int p2;
619 int p3; /* A negative P3 implies a 4 byte APDU. */
620 char *data; /* May be NULL. In hex string format. */
621} RIL_SIM_APDU;
622
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800623typedef struct {
624 int sw1;
625 int sw2;
Amit Mahajan2875bc22014-08-06 10:03:15 -0700626 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
627 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 -0800628} RIL_SIM_IO_Response;
629
630/* See also com.android.internal.telephony.gsm.CallForwardInfo */
631
632typedef struct {
633 int status; /*
634 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
635 * status 1 = active, 0 = not active
636 *
637 * For RIL_REQUEST_SET_CALL_FORWARD:
638 * status is:
639 * 0 = disable
640 * 1 = enable
641 * 2 = interrogate
642 * 3 = registeration
643 * 4 = erasure
644 */
645
Wink Saville3d54e742009-05-18 18:00:44 -0700646 int reason; /* from TS 27.007 7.11 "reason" */
647 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
648 See table for Android mapping from
649 MMI service code
650 0 means user doesn't input class */
651 int toa; /* "type" from TS 27.007 7.11 */
652 char * number; /* "number" from TS 27.007 7.11. May be NULL */
653 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800654}RIL_CallForwardInfo;
655
656typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700657 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
658 * Upper 16 bits is LAC and lower 16 bits
659 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800660 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700661 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700662 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800663 */
johnwange0ba6a92009-09-11 19:14:52 -0700664 int rssi; /* Received RSSI in GSM,
665 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800666 */
667} RIL_NeighboringCell;
668
fengluf7408292015-04-14 14:53:55 -0700669typedef struct {
670 char lce_status; /* LCE service status:
671 * -1 = not supported;
672 * 0 = stopped;
673 * 1 = active.
674 */
675 unsigned int actual_interval_ms; /* actual LCE reporting interval,
676 * meaningful only if LCEStatus = 1.
677 */
678} RIL_LceStatusInfo;
679
680typedef struct {
fenglu290add32015-05-01 17:05:15 -0700681 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
fengluf7408292015-04-14 14:53:55 -0700682 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
683 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
684 * moves to inactive state or network type change)
685 * 1 = suspended;
686 * 0 = not suspended.
687 */
688} RIL_LceDataInfo;
689
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800690/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
691typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700692 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800693 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
694 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
695 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800696 CALL_FAIL_NORMAL = 16,
697 CALL_FAIL_BUSY = 17,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800698 CALL_FAIL_NO_USER_RESPONDING = 18,
699 CALL_FAIL_NO_ANSWER_FROM_USER = 19,
700 CALL_FAIL_CALL_REJECTED = 21,
701 CALL_FAIL_NUMBER_CHANGED = 22,
702 CALL_FAIL_PREEMPTION = 25,
703 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
704 CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
705 CALL_FAIL_FACILITY_REJECTED = 29,
706 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
707 CALL_FAIL_NORMAL_UNSPECIFIED = 31,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800708 CALL_FAIL_CONGESTION = 34,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800709 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
710 CALL_FAIL_TEMPORARY_FAILURE = 41,
711 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
712 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
713 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
714 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
715 CALL_FAIL_QOS_UNAVAILABLE = 49,
716 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
717 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
718 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
719 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
720 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
721 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800722 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800723 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
724 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
725 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
726 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
727 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
728 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
729 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
730 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
731 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
732 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
733 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
734 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
735 CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
736 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
737 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
738 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
739 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800740 CALL_FAIL_CALL_BARRED = 240,
741 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700742 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
743 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Amit Mahajan54563d32014-11-22 00:54:49 +0000744 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
745 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
746 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
Wink Saville1b5fd232009-04-22 14:50:00 -0700747 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
748 CALL_FAIL_CDMA_DROP = 1001,
749 CALL_FAIL_CDMA_INTERCEPT = 1002,
750 CALL_FAIL_CDMA_REORDER = 1003,
751 CALL_FAIL_CDMA_SO_REJECT = 1004,
752 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
753 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
754 CALL_FAIL_CDMA_PREEMPTED = 1007,
755 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
756 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700757 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800758 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
759 vendor code should make sure to map error
760 code to specific error */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800761} RIL_LastCallFailCause;
762
Chao Liu548a81e2015-05-14 16:13:46 -0700763typedef struct {
764 RIL_LastCallFailCause cause_code;
765 char * vendor_cause;
766} RIL_LastCallFailCauseInfo;
767
Wink Savillef4c4d362009-04-02 01:37:03 -0700768/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800769typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800770 PDP_FAIL_NONE = 0, /* No error, connection ok */
771
772 /* an integer cause code defined in TS 24.008
773 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
774 If the implementation does not have access to the exact cause codes,
775 then it should return one of the following values,
776 as the UI layer needs to distinguish these
777 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700778 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
Sanket Padaweac308b92016-01-07 14:41:17 -0800779 PDP_FAIL_NAS_SIGNALLING = 0x0E,
780 PDP_FAIL_LLC_SNDCP = 0x19,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700781 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
782 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
783 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
784 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
785 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
786 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
787 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
788 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
789 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800790 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
Hui Wang11e8b232014-09-19 16:40:17 -0500791 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
792 based on framework config */
Sanket Padaweac308b92016-01-07 14:41:17 -0800793 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
794 PDP_FAIL_NETWORK_FAILURE = 0x26,
795 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
796 PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
797 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
798 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
799 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
800 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
801 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
802 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
Wink Saville43808972011-01-13 17:39:51 -0800803 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
804 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
805 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Sanket Padaweac308b92016-01-07 14:41:17 -0800806 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
807 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
808 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
809 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
810 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
811 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
812 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
813 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
814 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
815 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
816 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
817 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
818 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
819 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
820 PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
821 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
822 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
823 PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
824 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
825 PDP_FAIL_IFACE_MISMATCH = 0x75,
826 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
827 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
828 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
829 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
830 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
Wink Saville43808972011-01-13 17:39:51 -0800831
Sanket Padawe0106aed2016-02-09 09:56:31 -0800832 // OEM specific error codes. To be used by OEMs when they don't want to
833 // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
834 PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001,
835 PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002,
836 PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003,
837 PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004,
838 PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005,
839 PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006,
840 PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007,
841 PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008,
842 PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009,
843 PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A,
844 PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B,
845 PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C,
846 PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D,
847 PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E,
848 PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F,
849
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700850 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800851 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
852 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800853
854 /* reasons for data call drop - network/modem disconnect */
Wink Saville3492c6e2013-10-03 13:53:27 -0700855 PDP_FAIL_SIGNAL_LOST = -3,
Wink Saville43808972011-01-13 17:39:51 -0800856 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
857 with parameters appropriate for new technology */
858 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
859 powered off - no retry */
860 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
861 mode was up on same APN/data profile - no retry until
862 tethered call is off */
863
Sanket Padaweac308b92016-01-07 14:41:17 -0800864 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
865 new error codes are added making this unnecessary */
Wink Saville43808972011-01-13 17:39:51 -0800866} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800867
jsh602f80f2009-07-10 15:44:37 -0700868/* See RIL_REQUEST_SETUP_DATA_CALL */
869typedef enum {
870 RIL_DATA_PROFILE_DEFAULT = 0,
871 RIL_DATA_PROFILE_TETHERED = 1,
Hui Wang8d679622014-10-16 14:59:27 -0500872 RIL_DATA_PROFILE_IMS = 2,
873 RIL_DATA_PROFILE_FOTA = 3,
874 RIL_DATA_PROFILE_CBS = 4,
875 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
876 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
jsh602f80f2009-07-10 15:44:37 -0700877} RIL_DataProfile;
878
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800879/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
880typedef struct {
881 int notificationType; /*
882 * 0 = MO intermediate result code
883 * 1 = MT unsolicited result code
884 */
885 int code; /* See 27.007 7.17
886 "code1" for MO
887 "code2" for MT. */
888 int index; /* CUG index. See 27.007 7.17. */
889 int type; /* "type" from 27.007 7.17 (MT only). */
890 char * number; /* "number" from 27.007 7.17
891 (MT only, may be NULL). */
892} RIL_SuppSvcNotification;
893
Wink Savillef4c4d362009-04-02 01:37:03 -0700894#define RIL_CARD_MAX_APPS 8
895
896typedef enum {
897 RIL_CARDSTATE_ABSENT = 0,
898 RIL_CARDSTATE_PRESENT = 1,
899 RIL_CARDSTATE_ERROR = 2
900} RIL_CardState;
901
902typedef enum {
903 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
904 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700905 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
906 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700907 involved */
908 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
909 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
910 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
911 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
912 RIL_PERSOSUBSTATE_SIM_SIM = 7,
913 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
914 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
915 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
916 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
917 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
918 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
919 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
920 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
921 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
922 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
923 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
924 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
925 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
926 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
927 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
928 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
929 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
930} RIL_PersoSubstate;
931
932typedef enum {
933 RIL_APPSTATE_UNKNOWN = 0,
934 RIL_APPSTATE_DETECTED = 1,
935 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
936 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700937 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700938 when app_state is assigned to this value */
939 RIL_APPSTATE_READY = 5
940} RIL_AppState;
941
942typedef enum {
943 RIL_PINSTATE_UNKNOWN = 0,
944 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
945 RIL_PINSTATE_ENABLED_VERIFIED = 2,
946 RIL_PINSTATE_DISABLED = 3,
947 RIL_PINSTATE_ENABLED_BLOCKED = 4,
948 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
949} RIL_PinState;
950
951typedef enum {
952 RIL_APPTYPE_UNKNOWN = 0,
953 RIL_APPTYPE_SIM = 1,
954 RIL_APPTYPE_USIM = 2,
955 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -0800956 RIL_APPTYPE_CSIM = 4,
957 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -0700958} RIL_AppType;
959
960typedef struct
961{
Wink Saville7f856802009-06-09 10:23:37 -0700962 RIL_AppType app_type;
963 RIL_AppState app_state;
964 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -0700965 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -0700966 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -0700967 0x30, 0x30, 0x30 */
968 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -0800969 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -0700970 RIL_PinState pin1;
971 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -0700972} RIL_AppStatus;
973
Wink Savillec0114b32011-02-18 10:14:07 -0800974/* Deprecated, use RIL_CardStatus_v6 */
975typedef struct
976{
977 RIL_CardState card_state;
978 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
979 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
980 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
981 int num_applications; /* value <= RIL_CARD_MAX_APPS */
982 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
983} RIL_CardStatus_v5;
984
Wink Savillef4c4d362009-04-02 01:37:03 -0700985typedef struct
986{
Wink Saville7f856802009-06-09 10:23:37 -0700987 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -0700988 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -0800989 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
990 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
991 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -0700992 int num_applications; /* value <= RIL_CARD_MAX_APPS */
993 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -0800994} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -0700995
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800996/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
997 * or as part of RIL_SimRefreshResponse_v7
998 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800999typedef enum {
1000 /* A file on SIM has been updated. data[1] contains the EFID. */
1001 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001002 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001003 SIM_INIT = 1,
1004 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
1005 SIM_RESET = 2
1006} RIL_SimRefreshResult;
1007
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001008typedef struct {
1009 RIL_SimRefreshResult result;
1010 int ef_id; /* is the EFID of the updated file if the result is */
1011 /* SIM_FILE_UPDATE or 0 for any other result. */
1012 char * aid; /* is AID(application ID) of the card application */
1013 /* See ETSI 102.221 8.1 and 101.220 4 */
1014 /* For SIM_FILE_UPDATE result it can be set to AID of */
1015 /* application in which updated EF resides or it can be */
1016 /* NULL if EF is outside of an application. */
1017 /* For SIM_INIT result this field is set to AID of */
1018 /* application that caused REFRESH */
1019 /* For SIM_RESET result it is NULL. */
1020} RIL_SimRefreshResponse_v7;
1021
Wink Savillec0114b32011-02-18 10:14:07 -08001022/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
1023typedef struct {
1024 char * number; /* Remote party number */
1025 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1026 char * name; /* Remote party name */
1027 RIL_CDMA_SignalInfoRecord signalInfoRecord;
1028} RIL_CDMA_CallWaiting_v5;
1029
Wink Saville1b5fd232009-04-22 14:50:00 -07001030typedef struct {
1031 char * number; /* Remote party number */
1032 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1033 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -07001034 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -08001035 /* Number type/Number plan required to support International Call Waiting */
1036 int number_type; /* 0=Unknown, 1=International, 2=National,
1037 3=Network specific, 4=subscriber */
1038 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
1039} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001040
Wink Savillea592eeb2009-05-22 13:26:36 -07001041/**
1042 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
1043 *
1044 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
1045 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
1046 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
1047 * CBM message ID.
1048 *
1049 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
1050 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
1051 * and 9.4.4.2.3 for UMTS.
1052 * All other values can be treated as empty CBM data coding scheme.
1053 *
1054 * selected 0 means message types specified in <fromServiceId, toServiceId>
1055 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
1056 *
1057 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
1058 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
1059 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001060typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -07001061 int fromServiceId;
1062 int toServiceId;
1063 int fromCodeScheme;
1064 int toCodeScheme;
1065 unsigned char selected;
1066} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -07001067
The Android Open Source Project34a51082009-03-05 14:34:37 -08001068/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
1069#define RIL_RESTRICTED_STATE_NONE 0x00
1070/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
1071#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
1072/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
1073#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -07001074/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -08001075#define RIL_RESTRICTED_STATE_CS_ALL 0x04
1076/* Block packet data access due to restriction. */
1077#define RIL_RESTRICTED_STATE_PS_ALL 0x10
1078
Wink Saville1b5fd232009-04-22 14:50:00 -07001079/* The status for an OTASP/OTAPA session */
1080typedef enum {
1081 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
1082 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
1083 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
1084 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
1085 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
1086 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
1087 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
1088 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
1089 CDMA_OTA_PROVISION_STATUS_COMMITTED,
1090 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
1091 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
1092 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
1093} RIL_CDMA_OTA_ProvisionStatus;
1094
1095typedef struct {
1096 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1097 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1098} RIL_GW_SignalStrength;
1099
Wink Savillec57b3eb2013-04-17 12:51:41 -07001100typedef struct {
1101 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1102 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001103 int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us.
1104 * INT_MAX denotes invalid value */
1105} RIL_GSM_SignalStrength_v12;
1106
1107typedef struct {
1108 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1109 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Wink Savillec57b3eb2013-04-17 12:51:41 -07001110} RIL_SignalStrengthWcdma;
Wink Saville1b5fd232009-04-22 14:50:00 -07001111
1112typedef struct {
1113 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1114 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1115 * value will be 75.
1116 */
1117 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1118 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1119 * will be 125.
1120 */
1121} RIL_CDMA_SignalStrength;
1122
1123
1124typedef struct {
1125 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1126 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1127 * value will be 75.
1128 */
1129 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1130 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1131 * will be 125.
1132 */
1133 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
1134} RIL_EVDO_SignalStrength;
1135
Wink Savillec0114b32011-02-18 10:14:07 -08001136typedef struct {
1137 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -07001138 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1139 * Range: 44 to 140 dBm
1140 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1141 * Reference: 3GPP TS 36.133 9.1.4 */
1142 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1143 * Range: 20 to 3 dB.
1144 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1145 * Reference: 3GPP TS 36.133 9.1.7 */
1146 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1147 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1148 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1149 * Reference: 3GPP TS 36.101 8.1.1 */
1150 int cqi; /* The current Channel Quality Indicator.
1151 * Range: 0 to 15.
1152 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1153 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -08001154} RIL_LTE_SignalStrength;
1155
Wink Saville8a9e0212013-04-09 12:11:38 -07001156typedef struct {
1157 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1158 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1159 * Range: 44 to 140 dBm
1160 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1161 * Reference: 3GPP TS 36.133 9.1.4 */
1162 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1163 * Range: 20 to 3 dB.
1164 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1165 * Reference: 3GPP TS 36.133 9.1.7 */
1166 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1167 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1168 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1169 * Reference: 3GPP TS 36.101 8.1.1 */
1170 int cqi; /* The current Channel Quality Indicator.
1171 * Range: 0 to 15.
1172 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1173 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1174 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
1175 * Approximate distance can be calculated using 300m/us * timingAdvance.
1176 * Range: 0 to 0x7FFFFFFE
1177 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1178 * Reference: 3GPP 36.321 section 6.1.3.5
1179 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1180} RIL_LTE_SignalStrength_v8;
1181
Etan Cohend3652192014-06-20 08:28:44 -07001182typedef struct {
1183 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
1184 * Range : 25 to 120
1185 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1186 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1187} RIL_TD_SCDMA_SignalStrength;
1188
Wink Savillec0114b32011-02-18 10:14:07 -08001189/* Deprecated, use RIL_SignalStrength_v6 */
1190typedef struct {
1191 RIL_GW_SignalStrength GW_SignalStrength;
1192 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1193 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1194} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -07001195
1196typedef struct {
1197 RIL_GW_SignalStrength GW_SignalStrength;
1198 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1199 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -08001200 RIL_LTE_SignalStrength LTE_SignalStrength;
1201} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001202
Wink Saville8a9e0212013-04-09 12:11:38 -07001203typedef struct {
1204 RIL_GW_SignalStrength GW_SignalStrength;
1205 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1206 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1207 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1208} RIL_SignalStrength_v8;
1209
Etan Cohend3652192014-06-20 08:28:44 -07001210typedef struct {
1211 RIL_GW_SignalStrength GW_SignalStrength;
1212 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1213 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1214 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1215 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1216} RIL_SignalStrength_v10;
1217
Wink Saville8a9e0212013-04-09 12:11:38 -07001218typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001219 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1220 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1221 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1222 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 -07001223} RIL_CellIdentityGsm;
1224
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001225typedef struct {
1226 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1227 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1228 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1229 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
1230 int arfcn; /* 16-bit GSM Absolute RF channel number, INT_MAX if unknown */
1231 uint8_t bsic;/* 6-bit Base Station Identity Code */
1232} RIL_CellIdentityGsm_v12;
1233
Wink Savillec57b3eb2013-04-17 12:51:41 -07001234typedef struct {
1235 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1236 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1237 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1238 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1239 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1240} RIL_CellIdentityWcdma;
1241
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001242typedef struct {
1243 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1244 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1245 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1246 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1247 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1248 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number, INT_MAX if unknown */
1249} RIL_CellIdentityWcdma_v12;
1250
Wink Saville8a9e0212013-04-09 12:11:38 -07001251typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001252 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1253 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1254 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001255 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1256 * It is represented in units of 0.25 seconds and ranges from -2592000
1257 * to 2592000, both values inclusive (corresponding to a range of -180
Wink Savillec57b3eb2013-04-17 12:51:41 -07001258 * to +180 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001259
1260 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1261 * It is represented in units of 0.25 seconds and ranges from -1296000
1262 * to 1296000, both values inclusive (corresponding to a range of -90
Wink Savillec57b3eb2013-04-17 12:51:41 -07001263 * to +90 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001264} RIL_CellIdentityCdma;
1265
Wink Saville8a9e0212013-04-09 12:11:38 -07001266typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001267 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1268 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1269 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1270 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1271 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001272} RIL_CellIdentityLte;
1273
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001274typedef struct {
1275 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1276 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1277 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1278 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1279 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1280 int earfcn; /* 18-bit LTE Absolute RC Channel Number, INT_MAX if unknown */
1281} RIL_CellIdentityLte_v12;
1282
Etan Cohend3652192014-06-20 08:28:44 -07001283typedef struct {
1284 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1285 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1286 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1287 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1288 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1289} RIL_CellIdentityTdscdma;
1290
Wink Saville8a9e0212013-04-09 12:11:38 -07001291typedef struct {
1292 RIL_CellIdentityGsm cellIdentityGsm;
1293 RIL_GW_SignalStrength signalStrengthGsm;
1294} RIL_CellInfoGsm;
1295
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001296typedef struct {
1297 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1298 RIL_GSM_SignalStrength_v12 signalStrengthGsm;
1299} RIL_CellInfoGsm_v12;
1300
Wink Savillec57b3eb2013-04-17 12:51:41 -07001301typedef struct {
1302 RIL_CellIdentityWcdma cellIdentityWcdma;
1303 RIL_SignalStrengthWcdma signalStrengthWcdma;
1304} RIL_CellInfoWcdma;
1305
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001306typedef struct {
1307 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1308 RIL_SignalStrengthWcdma signalStrengthWcdma;
1309} RIL_CellInfoWcdma_v12;
1310
Wink Saville8a9e0212013-04-09 12:11:38 -07001311typedef struct {
1312 RIL_CellIdentityCdma cellIdentityCdma;
1313 RIL_CDMA_SignalStrength signalStrengthCdma;
1314 RIL_EVDO_SignalStrength signalStrengthEvdo;
1315} RIL_CellInfoCdma;
1316
Wink Saville8a9e0212013-04-09 12:11:38 -07001317typedef struct {
1318 RIL_CellIdentityLte cellIdentityLte;
1319 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1320} RIL_CellInfoLte;
1321
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001322typedef struct {
1323 RIL_CellIdentityLte_v12 cellIdentityLte;
1324 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1325} RIL_CellInfoLte_v12;
1326
Etan Cohend3652192014-06-20 08:28:44 -07001327typedef struct {
1328 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1329 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1330} RIL_CellInfoTdscdma;
1331
Wink Saville8a9e0212013-04-09 12:11:38 -07001332// Must be the same as CellInfo.TYPE_XXX
1333typedef enum {
1334 RIL_CELL_INFO_TYPE_GSM = 1,
1335 RIL_CELL_INFO_TYPE_CDMA = 2,
1336 RIL_CELL_INFO_TYPE_LTE = 3,
Wink Savillec57b3eb2013-04-17 12:51:41 -07001337 RIL_CELL_INFO_TYPE_WCDMA = 4,
Etan Cohend3652192014-06-20 08:28:44 -07001338 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
Wink Saville8a9e0212013-04-09 12:11:38 -07001339} RIL_CellInfoType;
1340
1341// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1342typedef enum {
1343 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1344 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1345 RIL_TIMESTAMP_TYPE_MODEM = 2,
1346 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1347 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1348} RIL_TimeStampType;
1349
1350typedef struct {
1351 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1352 int registered; /* !0 if this cell is registered 0 if not registered */
1353 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1354 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1355 union {
1356 RIL_CellInfoGsm gsm;
1357 RIL_CellInfoCdma cdma;
1358 RIL_CellInfoLte lte;
Wink Savillec57b3eb2013-04-17 12:51:41 -07001359 RIL_CellInfoWcdma wcdma;
Etan Cohend3652192014-06-20 08:28:44 -07001360 RIL_CellInfoTdscdma tdscdma;
Wink Saville8a9e0212013-04-09 12:11:38 -07001361 } CellInfo;
1362} RIL_CellInfo;
1363
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001364typedef struct {
1365 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1366 int registered; /* !0 if this cell is registered 0 if not registered */
1367 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1368 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1369 union {
1370 RIL_CellInfoGsm_v12 gsm;
1371 RIL_CellInfoCdma cdma;
1372 RIL_CellInfoLte_v12 lte;
1373 RIL_CellInfoWcdma_v12 wcdma;
1374 RIL_CellInfoTdscdma tdscdma;
1375 } CellInfo;
1376} RIL_CellInfo_v12;
1377
Wink Saville1b5fd232009-04-22 14:50:00 -07001378/* Names of the CDMA info records (C.S0005 section 3.7.5) */
1379typedef enum {
1380 RIL_CDMA_DISPLAY_INFO_REC,
1381 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1382 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1383 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1384 RIL_CDMA_SIGNAL_INFO_REC,
1385 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1386 RIL_CDMA_LINE_CONTROL_INFO_REC,
1387 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1388 RIL_CDMA_T53_CLIR_INFO_REC,
1389 RIL_CDMA_T53_RELEASE_INFO_REC,
1390 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1391} RIL_CDMA_InfoRecName;
1392
1393/* Display Info Rec as defined in C.S0005 section 3.7.5.1
1394 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1395 Note: the Extended Display info rec contains multiple records of the
1396 form: display_tag, display_len, and display_len occurrences of the
1397 chari field if the display_tag is not 10000000 or 10000001.
1398 To save space, the records are stored consecutively in a byte buffer.
1399 The display_tag, display_len and chari fields are all 1 byte.
1400*/
1401
1402typedef struct {
1403 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001404 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001405} RIL_CDMA_DisplayInfoRecord;
1406
1407/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1408 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1409 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1410*/
1411
1412typedef struct {
1413 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001414 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001415 char number_type;
1416 char number_plan;
1417 char pi;
1418 char si;
1419} RIL_CDMA_NumberInfoRecord;
1420
1421/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1422typedef enum {
1423 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1424 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1425 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1426 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1427 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1428 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1429 RIL_REDIRECTING_REASON_RESERVED
1430} RIL_CDMA_RedirectingReason;
1431
1432typedef struct {
1433 RIL_CDMA_NumberInfoRecord redirectingNumber;
1434 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1435 RIL_CDMA_RedirectingReason redirectingReason;
1436} RIL_CDMA_RedirectingNumberInfoRecord;
1437
1438/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1439typedef struct {
1440 char lineCtrlPolarityIncluded;
1441 char lineCtrlToggle;
1442 char lineCtrlReverse;
1443 char lineCtrlPowerDenial;
1444} RIL_CDMA_LineControlInfoRecord;
1445
1446/* T53 CLIR Information Record */
1447typedef struct {
1448 char cause;
1449} RIL_CDMA_T53_CLIRInfoRecord;
1450
1451/* T53 Audio Control Information Record */
1452typedef struct {
1453 char upLink;
1454 char downLink;
1455} RIL_CDMA_T53_AudioControlInfoRecord;
1456
1457typedef struct {
1458
1459 RIL_CDMA_InfoRecName name;
1460
1461 union {
1462 /* Display and Extended Display Info Rec */
1463 RIL_CDMA_DisplayInfoRecord display;
1464
1465 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1466 RIL_CDMA_NumberInfoRecord number;
1467
1468 /* Signal Info Rec */
1469 RIL_CDMA_SignalInfoRecord signal;
1470
1471 /* Redirecting Number Info Rec */
1472 RIL_CDMA_RedirectingNumberInfoRecord redir;
1473
1474 /* Line Control Info Rec */
1475 RIL_CDMA_LineControlInfoRecord lineCtrl;
1476
1477 /* T53 CLIR Info Rec */
1478 RIL_CDMA_T53_CLIRInfoRecord clir;
1479
1480 /* T53 Audio Control Info Rec */
1481 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1482 } rec;
1483} RIL_CDMA_InformationRecord;
1484
1485#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1486
1487typedef struct {
1488 char numberOfInfoRecs;
1489 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1490} RIL_CDMA_InformationRecords;
1491
Jake Hamby8a4a2332014-01-15 13:12:05 -08001492/* See RIL_REQUEST_NV_READ_ITEM */
1493typedef struct {
1494 RIL_NV_Item itemID;
1495} RIL_NV_ReadItem;
1496
1497/* See RIL_REQUEST_NV_WRITE_ITEM */
1498typedef struct {
1499 RIL_NV_Item itemID;
1500 char * value;
1501} RIL_NV_WriteItem;
1502
Etan Cohend3652192014-06-20 08:28:44 -07001503typedef enum {
1504 HANDOVER_STARTED = 0,
1505 HANDOVER_COMPLETED = 1,
1506 HANDOVER_FAILED = 2,
1507 HANDOVER_CANCELED = 3
1508} RIL_SrvccState;
1509
1510/* hardware configuration reported to RILJ. */
1511typedef enum {
1512 RIL_HARDWARE_CONFIG_MODEM = 0,
1513 RIL_HARDWARE_CONFIG_SIM = 1,
1514} RIL_HardwareConfig_Type;
1515
1516typedef enum {
1517 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1518 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1519 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1520} RIL_HardwareConfig_State;
1521
1522typedef struct {
1523 int rilModel;
1524 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1525 int maxVoice;
1526 int maxData;
1527 int maxStandby;
1528} RIL_HardwareConfig_Modem;
1529
1530typedef struct {
Wink Saville8b4e4f72014-10-17 15:01:45 -07001531 char modemUuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001532} RIL_HardwareConfig_Sim;
1533
1534typedef struct {
1535 RIL_HardwareConfig_Type type;
Wink Saville8b4e4f72014-10-17 15:01:45 -07001536 char uuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001537 RIL_HardwareConfig_State state;
1538 union {
1539 RIL_HardwareConfig_Modem modem;
1540 RIL_HardwareConfig_Sim sim;
1541 } cfg;
1542} RIL_HardwareConfig;
1543
Amit Mahajan54563d32014-11-22 00:54:49 +00001544typedef enum {
1545 SS_CFU,
1546 SS_CF_BUSY,
1547 SS_CF_NO_REPLY,
1548 SS_CF_NOT_REACHABLE,
1549 SS_CF_ALL,
1550 SS_CF_ALL_CONDITIONAL,
1551 SS_CLIP,
1552 SS_CLIR,
1553 SS_COLP,
1554 SS_COLR,
1555 SS_WAIT,
1556 SS_BAOC,
1557 SS_BAOIC,
1558 SS_BAOIC_EXC_HOME,
1559 SS_BAIC,
1560 SS_BAIC_ROAMING,
1561 SS_ALL_BARRING,
1562 SS_OUTGOING_BARRING,
1563 SS_INCOMING_BARRING
1564} RIL_SsServiceType;
1565
1566typedef enum {
1567 SS_ACTIVATION,
1568 SS_DEACTIVATION,
1569 SS_INTERROGATION,
1570 SS_REGISTRATION,
1571 SS_ERASURE
1572} RIL_SsRequestType;
1573
1574typedef enum {
1575 SS_ALL_TELE_AND_BEARER_SERVICES,
1576 SS_ALL_TELESEVICES,
1577 SS_TELEPHONY,
1578 SS_ALL_DATA_TELESERVICES,
1579 SS_SMS_SERVICES,
1580 SS_ALL_TELESERVICES_EXCEPT_SMS
1581} RIL_SsTeleserviceType;
1582
1583#define SS_INFO_MAX 4
1584#define NUM_SERVICE_CLASSES 7
1585
1586typedef struct {
1587 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1588 For example if voice is forwarded to one number and data
1589 is forwarded to a different one then numValidIndexes will be
1590 2 indicating total number of valid values in cfInfo.
1591 Similarly if all the services are forwarded to the same
1592 number then the value of numValidIndexes will be 1. */
1593
1594 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1595 for SS request to query call
1596 forward status. see
1597 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1598} RIL_CfData;
1599
1600typedef struct {
1601 RIL_SsServiceType serviceType;
1602 RIL_SsRequestType requestType;
1603 RIL_SsTeleserviceType teleserviceType;
1604 int serviceClass;
1605 RIL_Errno result;
1606
1607 union {
1608 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1609 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1610 two ints, so first two values of ssInfo[] will be
1611 used for response if serviceType is SS_CLIR and
1612 requestType is SS_INTERROGATION */
1613
1614 RIL_CfData cfData;
1615 };
1616} RIL_StkCcUnsolSsResponse;
1617
Wink Saville7f856802009-06-09 10:23:37 -07001618/**
Wink Savillec29360a2014-07-13 05:17:28 -07001619 * Data connection power state
1620 */
1621typedef enum {
1622 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1623 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1624 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1625 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1626} RIL_DcPowerStates;
1627
1628/**
1629 * Data connection real time info
1630 */
1631typedef struct {
1632 uint64_t time; // Time in nanos as returned by ril_nano_time
1633 RIL_DcPowerStates powerState; // Current power state
1634} RIL_DcRtInfo;
1635
Amit Mahajanc796e222014-08-13 16:54:01 +00001636/**
1637 * Data profile to modem
1638 */
1639typedef struct {
1640 /* id of the data profile */
1641 int profileId;
1642 /* the APN to connect to */
1643 char* apn;
1644 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1645 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1646 */
1647 char* protocol;
1648 /** authentication protocol used for this PDP context
1649 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1650 */
1651 int authType;
1652 /* the username for APN, or NULL */
1653 char* user;
1654 /* the password for APN, or NULL */
1655 char* password;
1656 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1657 int type;
1658 /* the period in seconds to limit the maximum connections */
1659 int maxConnsTime;
1660 /* the maximum connections during maxConnsTime */
1661 int maxConns;
1662 /** the required wait time in seconds after a successful UE initiated
1663 * disconnect of a given PDN connection before the device can send
1664 * a new PDN connection request for that given PDN
1665 */
1666 int waitTime;
1667 /* true to enable the profile, 0 to disable, 1 to enable */
1668 int enabled;
1669} RIL_DataProfileInfo;
Wink Savillec29360a2014-07-13 05:17:28 -07001670
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001671/* Tx Power Levels */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001672#define RIL_NUM_TX_POWER_LEVELS 5
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001673
1674typedef struct {
1675
1676 /* period (in ms) when modem is power collapsed */
1677 uint32_t sleep_mode_time_ms;
1678
1679 /* period (in ms) when modem is awake and in idle mode*/
1680 uint32_t idle_mode_time_ms;
1681
1682 /* period (in ms) for which Tx is active */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001683 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001684
1685 /* period (in ms) for which Rx is active */
1686 uint32_t rx_mode_time_ms;
1687} RIL_ActivityStatsInfo;
1688
Wink Savillec29360a2014-07-13 05:17:28 -07001689/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001690 * RIL_REQUEST_GET_SIM_STATUS
1691 *
1692 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -07001693 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001694 * "data" is NULL
1695 *
Wink Savillefd729372011-02-22 16:19:39 -08001696 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001697 *
1698 * Valid errors:
1699 * Must never fail
1700 */
1701#define RIL_REQUEST_GET_SIM_STATUS 1
1702
1703/**
1704 * RIL_REQUEST_ENTER_SIM_PIN
1705 *
John Wang309ac292009-07-30 14:53:23 -07001706 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001707 *
1708 * "data" is const char **
1709 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001710 * ((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 -08001711 *
jsh593c9102009-06-24 16:13:44 -07001712 * "response" is int *
1713 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001714 *
1715 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001716 *
1717 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001718 * RADIO_NOT_AVAILABLE (radio resetting)
1719 * GENERIC_FAILURE
1720 * PASSWORD_INCORRECT
1721 */
1722
1723#define RIL_REQUEST_ENTER_SIM_PIN 2
1724
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001725/**
1726 * RIL_REQUEST_ENTER_SIM_PUK
1727 *
Wink Saville7f856802009-06-09 10:23:37 -07001728 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001729 *
1730 * "data" is const char **
1731 * ((const char **)data)[0] is PUK value
1732 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001733 * ((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 -08001734 *
jsh593c9102009-06-24 16:13:44 -07001735 * "response" is int *
1736 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001737 *
1738 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001739 *
1740 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001741 * RADIO_NOT_AVAILABLE (radio resetting)
1742 * GENERIC_FAILURE
1743 * PASSWORD_INCORRECT
1744 * (PUK is invalid)
1745 */
1746
1747#define RIL_REQUEST_ENTER_SIM_PUK 3
1748
1749/**
1750 * RIL_REQUEST_ENTER_SIM_PIN2
1751 *
1752 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
1753 * returned as a a failure from a previous operation.
1754 *
1755 * "data" is const char **
1756 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001757 * ((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 -08001758 *
jsh593c9102009-06-24 16:13:44 -07001759 * "response" is int *
1760 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001761 *
1762 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001763 *
1764 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001765 * RADIO_NOT_AVAILABLE (radio resetting)
1766 * GENERIC_FAILURE
1767 * PASSWORD_INCORRECT
1768 */
1769
1770#define RIL_REQUEST_ENTER_SIM_PIN2 4
1771
1772/**
1773 * RIL_REQUEST_ENTER_SIM_PUK2
1774 *
Wink Saville7f856802009-06-09 10:23:37 -07001775 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001776 *
1777 * "data" is const char **
1778 * ((const char **)data)[0] is PUK2 value
1779 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001780 * ((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 -08001781 *
jsh593c9102009-06-24 16:13:44 -07001782 * "response" is int *
1783 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001784 *
1785 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001786 *
1787 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001788 * RADIO_NOT_AVAILABLE (radio resetting)
1789 * GENERIC_FAILURE
1790 * PASSWORD_INCORRECT
1791 * (PUK2 is invalid)
1792 */
1793
1794#define RIL_REQUEST_ENTER_SIM_PUK2 5
1795
1796/**
1797 * RIL_REQUEST_CHANGE_SIM_PIN
1798 *
Wink Saville7f856802009-06-09 10:23:37 -07001799 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001800 *
1801 * "data" is const char **
1802 * ((const char **)data)[0] is old PIN value
1803 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001804 * ((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 -08001805 *
jsh593c9102009-06-24 16:13:44 -07001806 * "response" is int *
1807 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001808 *
1809 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001810 *
1811 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001812 * RADIO_NOT_AVAILABLE (radio resetting)
1813 * GENERIC_FAILURE
1814 * PASSWORD_INCORRECT
1815 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001816 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001817 */
1818
1819#define RIL_REQUEST_CHANGE_SIM_PIN 6
1820
1821
1822/**
1823 * RIL_REQUEST_CHANGE_SIM_PIN2
1824 *
Wink Saville7f856802009-06-09 10:23:37 -07001825 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001826 *
1827 * "data" is const char **
1828 * ((const char **)data)[0] is old PIN2 value
1829 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001830 * ((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 -08001831 *
jsh593c9102009-06-24 16:13:44 -07001832 * "response" is int *
1833 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001834 *
1835 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001836 *
1837 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001838 * RADIO_NOT_AVAILABLE (radio resetting)
1839 * GENERIC_FAILURE
1840 * PASSWORD_INCORRECT
1841 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001842 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001843 */
1844
1845#define RIL_REQUEST_CHANGE_SIM_PIN2 7
1846
1847/**
1848 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
1849 *
1850 * Requests that network personlization be deactivated
1851 *
1852 * "data" is const char **
1853 * ((const char **)(data))[0]] is network depersonlization code
1854 *
jsh593c9102009-06-24 16:13:44 -07001855 * "response" is int *
1856 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001857 *
1858 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001859 *
1860 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001861 * RADIO_NOT_AVAILABLE (radio resetting)
1862 * GENERIC_FAILURE
1863 * PASSWORD_INCORRECT
1864 * (code is invalid)
1865 */
1866
1867#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
1868
1869/**
Wink Saville7f856802009-06-09 10:23:37 -07001870 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001871 *
1872 * Requests current call list
1873 *
1874 * "data" is NULL
1875 *
1876 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07001877 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001878 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001879 *
1880 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001881 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07001882 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001883 * GENERIC_FAILURE
1884 * (request will be made again in a few hundred msec)
1885 */
1886
1887#define RIL_REQUEST_GET_CURRENT_CALLS 9
1888
1889
Wink Saville7f856802009-06-09 10:23:37 -07001890/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001891 * RIL_REQUEST_DIAL
1892 *
1893 * Initiate voice call
1894 *
1895 * "data" is const RIL_Dial *
1896 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001897 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001898 * This method is never used for supplementary service codes
1899 *
1900 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001901 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001902 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00001903 * DIAL_MODIFIED_TO_USSD
1904 * DIAL_MODIFIED_TO_SS
1905 * DIAL_MODIFIED_TO_DIAL
Ajay Nambi10345892016-03-19 09:02:28 -07001906 * INVALID_ARGUMENTS
1907 * NO_MEMORY
1908 * INVALID_STATE
1909 * NO_RESOURCES
1910 * INTERNAL_ERR
1911 * FDN_CHECK_FAILURE
1912 * MODEM_ERR
1913 * NO_SUBSCRIPTION
1914 * NO_NETWORK_FOUND
1915 * INVALID_CALL_ID
1916 * DEVICE_IN_USE
1917 * MODE_NOT_SUPPORTED
1918 * ABORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001919 * GENERIC_FAILURE
1920 */
1921#define RIL_REQUEST_DIAL 10
1922
1923/**
1924 * RIL_REQUEST_GET_IMSI
1925 *
1926 * Get the SIM IMSI
1927 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08001928 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001929 *
Wink Savillec0114b32011-02-18 10:14:07 -08001930 * "data" is const char **
1931 * ((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 -08001932 * "response" is a const char * containing the IMSI
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)
1937 * GENERIC_FAILURE
1938 */
1939
1940#define RIL_REQUEST_GET_IMSI 11
1941
1942/**
1943 * RIL_REQUEST_HANGUP
1944 *
1945 * Hang up a specific line (like AT+CHLD=1x)
1946 *
John Wang06bae4b2010-11-18 16:37:09 -08001947 * After this HANGUP request returns, RIL should show the connection is NOT
1948 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1949 *
Wink Saville7f856802009-06-09 10:23:37 -07001950 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001951 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001952 *
1953 * "response" is NULL
1954 *
1955 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001956 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001957 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07001958 * INVALID_ARGUMENTS
1959 * NO_MEMORY
1960 * INVALID_STATE
1961 * MODEM_ERR
1962 * INTERNAL_ERR
1963 * NO_MEMORY
1964 * INVALID_CALL_ID
1965 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001966 * GENERIC_FAILURE
1967 */
1968
1969#define RIL_REQUEST_HANGUP 12
1970
1971/**
1972 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
1973 *
1974 * Hang up waiting or held (like AT+CHLD=0)
1975 *
John Wang06bae4b2010-11-18 16:37:09 -08001976 * After this HANGUP request returns, RIL should show the connection is NOT
1977 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1978 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001979 * "data" is NULL
1980 * "response" is NULL
1981 *
1982 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001983 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001984 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07001985 * INVALID_STATE
1986 * NO_MEMORY
1987 * MODEM_ERR
1988 * INTERNAL_ERR
1989 * NO_MEMORY
1990 * INVALID_CALL_ID
1991 * NO_RESOURCES
1992 * OPERATION_NOT_ALLOWED
1993 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001994 * GENERIC_FAILURE
1995 */
1996
1997#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
1998
1999/**
2000 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
2001 *
2002 * Hang up waiting or held (like AT+CHLD=1)
2003 *
John Wang06bae4b2010-11-18 16:37:09 -08002004 * After this HANGUP request returns, RIL should show the connection is NOT
2005 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2006 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002007 * "data" is NULL
2008 * "response" is NULL
2009 *
2010 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002011 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002012 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002013 * INVALID_STATE
2014 * NO_MEMORY
2015 * MODEM_ERR
2016 * INTERNAL_ERR
2017 * INVALID_CALL_ID
2018 * OPERATION_NOT_ALLOWED
2019 * INVALID_ARGUMENTS
2020 * NO_RESOURCES
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002021 * GENERIC_FAILURE
2022 */
2023
2024#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
2025
2026/**
2027 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
2028 *
2029 * Switch waiting or holding call and active call (like AT+CHLD=2)
2030 *
2031 * State transitions should be is follows:
2032 *
2033 * If call 1 is waiting and call 2 is active, then if this re
2034 *
2035 * BEFORE AFTER
2036 * Call 1 Call 2 Call 1 Call 2
2037 * ACTIVE HOLDING HOLDING ACTIVE
2038 * ACTIVE WAITING HOLDING ACTIVE
2039 * HOLDING WAITING HOLDING ACTIVE
2040 * ACTIVE IDLE HOLDING IDLE
2041 * IDLE IDLE IDLE IDLE
2042 *
2043 * "data" is NULL
2044 * "response" is NULL
2045 *
2046 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002047 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002048 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002049 * INVALID_STATE
2050 * NO_MEMORY
2051 * MODEM_ERR
2052 * INTERNAL_ERR
2053 * INVALID_STATE
2054 * INVALID_ARGUMENTS
2055 * INVALID_CALL_ID
2056 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002057 * GENERIC_FAILURE
2058 */
2059
2060#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
2061#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
2062
2063/**
2064 * RIL_REQUEST_CONFERENCE
2065 *
2066 * Conference holding and active (like AT+CHLD=3)
2067
2068 * "data" is NULL
2069 * "response" is NULL
2070 *
2071 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002072 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002073 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002074 * NO_MEMORY
2075 * MODEM_ERR
2076 * INTERNAL_ERR
2077 * INVALID_STATE
2078 * INVALID_CALL_ID
2079 * INVALID_ARGUMENTS
2080 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002081 * GENERIC_FAILURE
2082 */
2083#define RIL_REQUEST_CONFERENCE 16
2084
2085/**
2086 * RIL_REQUEST_UDUB
2087 *
Wink Saville7f856802009-06-09 10:23:37 -07002088 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002089 * waiting call answer)(RIL_BasicRequest r);
2090 *
2091 * "data" is NULL
2092 * "response" is NULL
2093 *
2094 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002095 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002096 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002097 * INVALID_STATE
2098 * NO_RESOURCES
2099 * NO_MEMORY
2100 * MODEM_ERR
2101 * INTERNAL_ERR
2102 * INVALID_CALL_ID
2103 * OPERATION_NOT_ALLOWED
2104 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002105 * GENERIC_FAILURE
2106 */
2107#define RIL_REQUEST_UDUB 17
2108
2109/**
2110 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2111 *
2112 * Requests the failure cause code for the most recently terminated call
2113 *
2114 * "data" is NULL
2115 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -07002116 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002117 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
2118 * failure reasons are derived from the possible call failure scenarios
2119 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002120 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08002121 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
2122 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
2123 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002124 * If the implementation does not have access to the exact cause codes,
2125 * then it should return one of the values listed in RIL_LastCallFailCause,
2126 * as the UI layer needs to distinguish these cases for tone generation or
2127 * error notification.
2128 *
2129 * Valid errors:
2130 * SUCCESS
2131 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002132 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002133 * GENERIC_FAILURE
2134 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002135 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002136 */
2137#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
2138
2139/**
2140 * RIL_REQUEST_SIGNAL_STRENGTH
2141 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002142 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002143 *
2144 * Must succeed if radio is on.
2145 *
2146 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07002147 *
2148 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002149 *
2150 * Valid errors:
2151 * SUCCESS
2152 * RADIO_NOT_AVAILABLE
2153 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002154#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07002155
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002156/**
Wink Savillec0114b32011-02-18 10:14:07 -08002157 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002158 *
2159 * Request current registration state
2160 *
2161 * "data" is NULL
2162 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -07002163 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -07002164 * 0 - Not registered, MT is not currently searching
2165 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07002166 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -07002167 * 2 - Not registered, but MT is currently searching
2168 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07002169 * 3 - Registration denied
2170 * 4 - Unknown
2171 * 5 - Registered, roaming
John Wang7f8ded12010-01-21 15:07:28 -08002172 * 10 - Same as 0, but indicates that emergency calls
2173 * are enabled.
2174 * 12 - Same as 2, but indicates that emergency calls
2175 * are enabled.
2176 * 13 - Same as 3, but indicates that emergency calls
2177 * are enabled.
2178 * 14 - Same as 4, but indicates that emergency calls
2179 * are enabled.
2180 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002181 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
2182 * NULL if not.Valid LAC are 0x0000 - 0xffff
2183 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
2184 * NULL if not.
2185 * Valid CID are 0x00000000 - 0xffffffff
2186 * In GSM, CID is Cell ID (see TS 27.007)
2187 * in 16 bits
2188 * In UMTS, CID is UMTS Cell Identity
2189 * (see TS 25.331) in 28 bits
Wink Saville43808972011-01-13 17:39:51 -08002190 * ((const char **)response)[3] indicates the available voice radio technology,
2191 * valid values as defined by RIL_RadioTechnology.
Wink Saville1b5fd232009-04-22 14:50:00 -07002192 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
2193 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07002194 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07002195 * ((const char **)response)[5] is Base Station latitude if registered on a
2196 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07002197 * latitude is a decimal number as specified in
2198 * 3GPP2 C.S0005-A v6.0. It is represented in
2199 * units of 0.25 seconds and ranges from -1296000
2200 * to 1296000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08002201 * to a range of -90 to +90 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07002202 * ((const char **)response)[6] is Base Station longitude if registered on a
2203 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07002204 * longitude is a decimal number as specified in
2205 * 3GPP2 C.S0005-A v6.0. It is represented in
2206 * units of 0.25 seconds and ranges from -2592000
2207 * to 2592000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08002208 * to a range of -180 to +180 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07002209 * ((const char **)response)[7] is concurrent services support indicator if
2210 * registered on a CDMA system 0-1.
2211 * 0 - Concurrent services not supported,
2212 * 1 - Concurrent services supported
2213 * ((const char **)response)[8] is System ID if registered on a CDMA system or
2214 * NULL if not. Valid System ID are 0 - 32767
2215 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
2216 * NULL if not. Valid System ID are 0 - 65535
2217 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002218 * on a CDMA or EVDO system or NULL if not. Valid values
Wink Saville1b5fd232009-04-22 14:50:00 -07002219 * are 0-255.
2220 * ((const char **)response)[11] indicates whether the current system is in the
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002221 * PRL if registered on a CDMA or EVDO system or NULL if
Wink Saville1b5fd232009-04-22 14:50:00 -07002222 * not. 0=not in the PRL, 1=in the PRL
2223 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002224 * if registered on a CDMA or EVDO system or NULL if not.
Wink Saville1b5fd232009-04-22 14:50:00 -07002225 * Valid values are 0-255.
2226 * ((const char **)response)[13] if registration state is 3 (Registration
2227 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07002228 * registration was denied. See 3GPP TS 24.008,
2229 * 10.5.3.6 and Annex G.
2230 * 0 - General
2231 * 1 - Authentication Failure
2232 * 2 - IMSI unknown in HLR
2233 * 3 - Illegal MS
2234 * 4 - Illegal ME
2235 * 5 - PLMN not allowed
2236 * 6 - Location area not allowed
2237 * 7 - Roaming not allowed
2238 * 8 - No Suitable Cells in this Location Area
2239 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07002240 * 10 - Persistent location update reject
Wink Savillec0114b32011-02-18 10:14:07 -08002241 * 11 - PLMN not allowed
2242 * 12 - Location area not allowed
2243 * 13 - Roaming not allowed in this Location Area
2244 * 15 - No Suitable Cells in this Location Area
2245 * 17 - Network Failure
2246 * 20 - MAC Failure
2247 * 21 - Sync Failure
2248 * 22 - Congestion
2249 * 23 - GSM Authentication unacceptable
2250 * 25 - Not Authorized for this CSG
2251 * 32 - Service option not supported
2252 * 33 - Requested service option not subscribed
2253 * 34 - Service option temporarily out of order
2254 * 38 - Call cannot be identified
2255 * 48-63 - Retry upon entry into a new cell
2256 * 95 - Semantically incorrect message
2257 * 96 - Invalid mandatory information
2258 * 97 - Message type non-existent or not implemented
2259 * 98 - Message not compatible with protocol state
2260 * 99 - Information element non-existent or not implemented
2261 * 100 - Conditional IE error
2262 * 101 - Message not compatible with protocol state
2263 * 111 - Protocol error, unspecified
jshca5e3472010-06-23 21:53:24 -07002264 * ((const char **)response)[14] is the Primary Scrambling Code of the current
2265 * cell as described in TS 25.331, in hexadecimal
2266 * format, or NULL if unknown or not registered
2267 * to a UMTS network.
Wink Saville1b5fd232009-04-22 14:50:00 -07002268 *
2269 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002270 * as "out of service" in the Android telephony system
2271 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002272 * Registration state 3 can be returned if Location Update Reject
2273 * (with cause 17 - Network Failure) is received repeatedly from the network,
2274 * to facilitate "managed roaming"
2275 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002276 * Valid errors:
2277 * SUCCESS
2278 * RADIO_NOT_AVAILABLE
2279 * GENERIC_FAILURE
2280 */
Wink Savillec0114b32011-02-18 10:14:07 -08002281#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002282
2283/**
Wink Savillec0114b32011-02-18 10:14:07 -08002284 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002285 *
Wink Savillec0114b32011-02-18 10:14:07 -08002286 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002287 *
2288 * "data" is NULL
2289 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08002290 * ((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 -08002291 * ((const char **)response)[1] is LAC if registered or NULL if not
2292 * ((const char **)response)[2] is CID if registered or NULL if not
Wink Saville43808972011-01-13 17:39:51 -08002293 * ((const char **)response)[3] indicates the available data radio technology,
2294 * valid values as defined by RIL_RadioTechnology.
Wink Savillec0114b32011-02-18 10:14:07 -08002295 * ((const char **)response)[4] if registration state is 3 (Registration
2296 * denied) this is an enumerated reason why
2297 * registration was denied. See 3GPP TS 24.008,
2298 * Annex G.6 "Additonal cause codes for GMM".
2299 * 7 == GPRS services not allowed
2300 * 8 == GPRS services and non-GPRS services not allowed
2301 * 9 == MS identity cannot be derived by the network
2302 * 10 == Implicitly detached
2303 * 14 == GPRS services not allowed in this PLMN
2304 * 16 == MSC temporarily not reachable
2305 * 40 == No PDP context activated
2306 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
2307 * established using RIL_REQUEST_SETUP_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002308 *
Wink Savilleae679532012-12-03 14:59:45 -08002309 * The values at offsets 6..10 are optional LTE location information in decimal.
2310 * If a value is unknown that value may be NULL. If all values are NULL,
2311 * none need to be present.
Wink Savilleea51a9d2012-09-15 07:54:06 -07002312 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
2313 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
2314 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
2315 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
2316 * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
2317 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002318 * LAC and CID are in hexadecimal format.
2319 * valid LAC are 0x0000 - 0xffff
2320 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07002321 *
2322 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002323 * as "out of service" in the Android telephony system
2324 *
2325 * Valid errors:
2326 * SUCCESS
2327 * RADIO_NOT_AVAILABLE
2328 * GENERIC_FAILURE
2329 */
Wink Savillec0114b32011-02-18 10:14:07 -08002330#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002331
2332/**
2333 * RIL_REQUEST_OPERATOR
2334 *
2335 * Request current operator ONS or EONS
2336 *
2337 * "data" is NULL
2338 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07002339 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002340 * or NULL if unregistered
2341 *
Wink Saville7f856802009-06-09 10:23:37 -07002342 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002343 * or NULL if unregistered
2344 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2345 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07002346 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002347 * Valid errors:
2348 * SUCCESS
2349 * RADIO_NOT_AVAILABLE
2350 * GENERIC_FAILURE
2351 */
2352#define RIL_REQUEST_OPERATOR 22
2353
2354/**
2355 * RIL_REQUEST_RADIO_POWER
2356 *
2357 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07002358 * If the radio is is turned off/on the radio modem subsystem
2359 * is expected return to an initialized state. For instance,
2360 * any voice and data calls will be terminated and all associated
2361 * lists emptied.
2362 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002363 * "data" is int *
2364 * ((int *)data)[0] is > 0 for "Radio On"
2365 * ((int *)data)[0] is == 0 for "Radio Off"
2366 *
2367 * "response" is NULL
2368 *
2369 * Turn radio on if "on" > 0
2370 * Turn radio off if "on" == 0
2371 *
2372 * Valid errors:
2373 * SUCCESS
2374 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002375 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002376 * GENERIC_FAILURE
2377 */
2378#define RIL_REQUEST_RADIO_POWER 23
2379
2380/**
2381 * RIL_REQUEST_DTMF
2382 *
2383 * Send a DTMF tone
2384 *
2385 * If the implementation is currently playing a tone requested via
2386 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2387 * should be played instead
2388 *
jsh602f80f2009-07-10 15:44:37 -07002389 * "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 -08002390 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002391 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002392 * FIXME should this block/mute microphone?
2393 * How does this interact with local DTMF feedback?
2394 *
2395 * Valid errors:
2396 * SUCCESS
2397 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002398 * INVALID_ARGUMENTS
2399 * NO_RESOURCES
2400 * NO_MEMORY
2401 * MODEM_ERR
2402 * INTERNAL_ERR
2403 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002404 * GENERIC_FAILURE
2405 *
2406 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2407 *
2408 */
2409#define RIL_REQUEST_DTMF 24
2410
2411/**
2412 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07002413 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002414 * Send an SMS message
2415 *
2416 * "data" is const char **
2417 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2418 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2419 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2420 * less the SMSC address
2421 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2422 *
2423 * "response" is a const RIL_SMS_Response *
2424 *
2425 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002426 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002427 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2428 *
2429 * Valid errors:
2430 * SUCCESS
2431 * RADIO_NOT_AVAILABLE
2432 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07002433 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08002434 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002435 * INVALID_STATE
2436 * INVALID_ARGUMENTS
2437 * NO_MEMORY
2438 * REQUEST_RATE_LIMITED
2439 * INVALID_SMS_FORMAT
2440 * SYSTEM_ERR
2441 * ENCODING_ERR
2442 * INVALID_SMSC_ADDRESS
2443 * MODEM_ERR
2444 * NETWORK_ERR
2445 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002446 * GENERIC_FAILURE
2447 *
2448 * FIXME how do we specify TP-Message-Reference if we need to resend?
2449 */
2450#define RIL_REQUEST_SEND_SMS 25
2451
2452
2453/**
2454 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07002455 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002456 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2457 * except that more messages are expected to be sent soon. If possible,
2458 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2459 *
2460 * "data" is const char **
2461 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2462 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2463 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2464 * less the SMSC address
2465 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2466 *
2467 * "response" is a const RIL_SMS_Response *
2468 *
2469 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002470 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002471 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2472 *
2473 * Valid errors:
2474 * SUCCESS
2475 * RADIO_NOT_AVAILABLE
2476 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08002477 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002478 * INVALID_STATE
2479 * INVALID_ARGUMENTS
2480 * NO_MEMORY
2481 * INVALID_SMS_FORMAT
2482 * SYSTEM_ERR
2483 * REQUEST_RATE_LIMITED
2484 * FDN_CHECK_FAILURE
2485 * MODEM_ERR
2486 * NETWORK_ERR
2487 * ENCODING_ERR
2488 * INVALID_SMSC_ADDRESS
2489 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002490 * GENERIC_FAILURE
2491 *
2492 */
2493#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2494
2495
2496/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002497 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002498 *
Wink Saville29487ef2011-04-15 09:15:31 -07002499 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2500 * return success it is added to the list of data calls and a
2501 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2502 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2503 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2504 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002505 *
Wink Saville43808972011-01-13 17:39:51 -08002506 * The RIL is expected to:
2507 * - Create one data call context.
2508 * - Create and configure a dedicated interface for the context
2509 * - The interface must be point to point.
2510 * - The interface is configured with one or more addresses and
2511 * is capable of sending and receiving packets. The prefix length
2512 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2513 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08002514 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08002515 * number of simultaneous data call contexts.
2516 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002517 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08002518 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2519 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07002520 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07002521 * ((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 -07002522 * override the one in the profile. NULL indicates no APN overrride.
2523 * ((const char **)data)[3] is the username for APN, or NULL
2524 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07002525 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2526 * 0 => PAP and CHAP is never performed.
2527 * 1 => PAP may be performed; CHAP is never performed.
2528 * 2 => CHAP may be performed; PAP is never performed.
2529 * 3 => PAP / CHAP may be performed - baseband dependent.
Wink Savillec0114b32011-02-18 10:14:07 -08002530 * ((const char **)data)[6] is the connection type to request must be one of the
2531 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07002532 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Wink Savillec0114b32011-02-18 10:14:07 -08002533 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002534 *
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -07002535 * "response" is a RIL_Data_Call_Response_v11
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002536 *
2537 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07002538 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002539 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08002540 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08002541 * the RIL_Data_Call_Response_v6.status containing the actual status.
2542 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08002543 *
2544 * Other errors could include:
2545 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2546 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002547 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002548 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002549 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002550#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002551
2552
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002553/**
2554 * RIL_REQUEST_SIM_IO
2555 *
2556 * Request SIM I/O operation.
2557 * This is similar to the TS 27.007 "restricted SIM" operation
2558 * where it assumes all of the EF selection will be done by the
2559 * callee.
2560 *
Wink Savillefd729372011-02-22 16:19:39 -08002561 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002562 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2563 * or may specify a PIN2 for operations that require a PIN2 (eg
2564 * updating FDN records)
2565 *
2566 * "response" is a const RIL_SIM_IO_Response *
2567 *
2568 * Arguments and responses that are unused for certain
2569 * values of "command" should be ignored or set to NULL
2570 *
2571 * Valid errors:
2572 * SUCCESS
2573 * RADIO_NOT_AVAILABLE
2574 * GENERIC_FAILURE
2575 * SIM_PIN2
2576 * SIM_PUK2
2577 */
2578#define RIL_REQUEST_SIM_IO 28
2579
2580/**
2581 * RIL_REQUEST_SEND_USSD
2582 *
2583 * Send a USSD message
2584 *
2585 * If a USSD session already exists, the message should be sent in the
2586 * context of that session. Otherwise, a new session should be created.
2587 *
2588 * The network reply should be reported via RIL_UNSOL_ON_USSD
2589 *
2590 * Only one USSD session may exist at a time, and the session is assumed
2591 * to exist until:
2592 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2593 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2594 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2595 *
2596 * "data" is a const char * containing the USSD request in UTF-8 format
2597 * "response" is NULL
2598 *
2599 * Valid errors:
2600 * SUCCESS
2601 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07002602 * FDN_CHECK_FAILURE
Amit Mahajan54563d32014-11-22 00:54:49 +00002603 * USSD_MODIFIED_TO_DIAL
2604 * USSD_MODIFIED_TO_SS
2605 * USSD_MODIFIED_TO_USSD
twen.changdf7add02016-03-04 18:27:48 +08002606 * SIM_BUSY
2607 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002608 * INVALID_ARGUMENTS
2609 * NO_MEMORY
2610 * MODEM_ERR
2611 * INTERNAL_ERR
2612 * ABORTED
2613 * SYSTEM_ERR
2614 * INVALID_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002615 * GENERIC_FAILURE
2616 *
2617 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2618 */
2619
2620#define RIL_REQUEST_SEND_USSD 29
2621
2622/**
2623 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07002624 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002625 * Cancel the current USSD session if one exists
2626 *
2627 * "data" is null
2628 * "response" is NULL
2629 *
2630 * Valid errors:
2631 * SUCCESS
2632 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002633 * SIM_BUSY
2634 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002635 * MODEM_ERR
2636 * INTERNAL_ERR
2637 * NO_MEMORY
2638 * INVALID_STATE
Wink Saville7f856802009-06-09 10:23:37 -07002639 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002640 */
2641
2642#define RIL_REQUEST_CANCEL_USSD 30
2643
Wink Saville7f856802009-06-09 10:23:37 -07002644/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002645 * RIL_REQUEST_GET_CLIR
2646 *
2647 * Gets current CLIR status
2648 * "data" is NULL
2649 * "response" is int *
2650 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2651 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2652 *
2653 * Valid errors:
2654 * SUCCESS
2655 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002656 * SS_MODIFIED_TO_DIAL
2657 * SS_MODIFIED_TO_USSD
2658 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002659 * NO_MEMORY
2660 * MODEM_ERR
2661 * INTERNAL_ERR
2662 * FDN_CHECK_FAILURE
2663 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002664 * GENERIC_FAILURE
2665 */
2666#define RIL_REQUEST_GET_CLIR 31
2667
2668/**
2669 * RIL_REQUEST_SET_CLIR
2670 *
2671 * "data" is int *
2672 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2673 *
2674 * "response" is NULL
2675 *
2676 * Valid errors:
2677 * SUCCESS
2678 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002679 * SS_MODIFIED_TO_DIAL
2680 * SS_MODIFIED_TO_USSD
2681 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002682 * INVALID_ARGUMENTS
2683 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002684 * GENERIC_FAILURE
2685 */
2686#define RIL_REQUEST_SET_CLIR 32
2687
2688/**
2689 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2690 *
2691 * "data" is const RIL_CallForwardInfo *
2692 *
2693 * "response" is const RIL_CallForwardInfo **
2694 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2695 * each distinct registered phone number.
2696 *
2697 * For example, if data is forwarded to +18005551212 and voice is forwarded
2698 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07002699 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002700 * If, however, both data and voice are forwarded to +18005551212, then
2701 * a single RIL_CallForwardInfo can be returned with the service class
2702 * set to "data + voice = 3")
2703 *
2704 * Valid errors:
2705 * SUCCESS
2706 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002707 * SS_MODIFIED_TO_DIAL
2708 * SS_MODIFIED_TO_USSD
2709 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002710 * INVALID_ARGUMENTS
2711 * NO_MEMORY
2712 * SYSTEM_ERR
2713 * MODEM_ERR
2714 * INTERNAL_ERR
2715 * NO_MEMORY
2716 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002717 * GENERIC_FAILURE
2718 */
2719#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2720
2721
2722/**
2723 * RIL_REQUEST_SET_CALL_FORWARD
2724 *
2725 * Configure call forward rule
2726 *
2727 * "data" is const RIL_CallForwardInfo *
2728 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002729 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002730 * Valid errors:
2731 * SUCCESS
2732 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002733 * SS_MODIFIED_TO_DIAL
2734 * SS_MODIFIED_TO_USSD
2735 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002736 * INVALID_ARGUMENTS
2737 * NO_MEMORY
2738 * SYSTEM_ERR
2739 * MODEM_ERR
2740 * INTERNAL_ERR
2741 * INVALID_STATE
2742 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002743 * GENERIC_FAILURE
2744 */
2745#define RIL_REQUEST_SET_CALL_FORWARD 34
2746
2747
2748/**
2749 * RIL_REQUEST_QUERY_CALL_WAITING
2750 *
2751 * Query current call waiting state
2752 *
2753 * "data" is const int *
2754 * ((const int *)data)[0] is the TS 27.007 service class to query.
2755 * "response" is a const int *
2756 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2757 *
2758 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2759 * must follow, with the TS 27.007 service class bit vector of services
2760 * for which call waiting is enabled.
2761 *
Wink Saville7f856802009-06-09 10:23:37 -07002762 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002763 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2764 * and voice and disabled for everything else
2765 *
2766 * Valid errors:
2767 * SUCCESS
2768 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002769 * SS_MODIFIED_TO_DIAL
2770 * SS_MODIFIED_TO_USSD
2771 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002772 * NO_MEMORY
2773 * MODEM_ERR
2774 * INTERNAL_ERR
2775 * NO_MEMORY
2776 * FDN_CHECK_FAILURE
2777 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002778 * GENERIC_FAILURE
2779 */
2780#define RIL_REQUEST_QUERY_CALL_WAITING 35
2781
2782
2783/**
2784 * RIL_REQUEST_SET_CALL_WAITING
2785 *
2786 * Configure current call waiting state
2787 *
2788 * "data" is const int *
2789 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2790 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2791 * services to modify
2792 * "response" is NULL
2793 *
2794 * Valid errors:
2795 * SUCCESS
2796 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002797 * SS_MODIFIED_TO_DIAL
2798 * SS_MODIFIED_TO_USSD
2799 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002800 * INVALID_ARGUMENTS
2801 * NO_MEMORY
2802 * MODEM_ERR
2803 * INTERNAL_ERR
2804 * INVALID_STATE
2805 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002806 * GENERIC_FAILURE
2807 */
2808#define RIL_REQUEST_SET_CALL_WAITING 36
2809
2810/**
2811 * RIL_REQUEST_SMS_ACKNOWLEDGE
2812 *
2813 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07002814 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002815 *
2816 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07002817 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002818 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07002819 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002820 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07002821 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
2822 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
2823 * capacity exceeded) and 0xFF (unspecified error) are
2824 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002825 *
2826 * "response" is NULL
2827 *
2828 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
2829 *
2830 * Valid errors:
2831 * SUCCESS
2832 * RADIO_NOT_AVAILABLE
2833 * GENERIC_FAILURE
2834 */
2835#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
2836
2837/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002838 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002839 *
2840 * Get the device IMEI, including check digit
2841 *
johnwangf8bc1672009-05-14 19:19:47 -07002842 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002843 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2844 *
2845 * "data" is NULL
2846 * "response" is a const char * containing the IMEI
2847 *
2848 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002849 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002850 * RADIO_NOT_AVAILABLE (radio resetting)
2851 * GENERIC_FAILURE
2852 */
2853
2854#define RIL_REQUEST_GET_IMEI 38
2855
2856/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002857 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002858 *
2859 * Get the device IMEISV, which should be two decimal digits
2860 *
johnwangf8bc1672009-05-14 19:19:47 -07002861 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002862 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2863 *
2864 * "data" is NULL
2865 * "response" is a const char * containing the IMEISV
2866 *
2867 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002868 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002869 * RADIO_NOT_AVAILABLE (radio resetting)
2870 * GENERIC_FAILURE
2871 */
2872
2873#define RIL_REQUEST_GET_IMEISV 39
2874
2875
2876/**
2877 * RIL_REQUEST_ANSWER
2878 *
2879 * Answer incoming call
2880 *
2881 * Will not be called for WAITING calls.
2882 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
2883 * instead
2884 *
2885 * "data" is NULL
2886 * "response" is NULL
2887 *
2888 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002889 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002890 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002891 * INVALID_STATE
2892 * NO_MEMORY
2893 * SYSTEM_ERR
2894 * MODEM_ERR
2895 * INTERNAL_ERR
2896 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002897 * GENERIC_FAILURE
2898 */
2899
2900#define RIL_REQUEST_ANSWER 40
2901
2902/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002903 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002904 *
Wink Saville29487ef2011-04-15 09:15:31 -07002905 * Deactivate packet data connection and remove from the
2906 * data call list if SUCCESS is returned. Any other return
2907 * values should also try to remove the call from the list,
2908 * but that may not be possible. In any event a
2909 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
2910 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
2911 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002912 *
2913 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07002914 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06002915 * ((char**)data)[1] indicating Disconnect Reason
2916 * 0 => No specific reason specified
2917 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07002918 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002919 * "response" is NULL
2920 *
2921 * Valid errors:
2922 * SUCCESS
2923 * RADIO_NOT_AVAILABLE
2924 * GENERIC_FAILURE
2925 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002926 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002927 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002928#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002929
2930/**
2931 * RIL_REQUEST_QUERY_FACILITY_LOCK
2932 *
2933 * Query the status of a facility lock state
2934 *
2935 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07002936 * ((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 -08002937 * (eg "AO" for BAOC, "SC" for SIM lock)
2938 * ((const char **)data)[1] is the password, or "" if not required
2939 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
2940 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08002941 * ((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 -08002942 * This is only applicable in the case of Fixed Dialing Numbers
2943 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002944 *
2945 * "response" is an int *
2946 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07002947 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002948 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07002949 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002950 *
2951 * Valid errors:
2952 * SUCCESS
2953 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002954 * SS_MODIFIED_TO_DIAL
2955 * SS_MODIFIED_TO_USSD
2956 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002957 * INVALID_ARGUMENTS
2958 * NO_MEMORY
2959 * INTERNAL_ERR
2960 * SYSTEM_ERR
2961 * MODEM_ERR
2962 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002963 * GENERIC_FAILURE
2964 *
2965 */
2966#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
2967
2968/**
2969 * RIL_REQUEST_SET_FACILITY_LOCK
2970 *
2971 * Enable/disable one facility lock
2972 *
2973 * "data" is const char **
2974 *
2975 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2976 * (eg "AO" for BAOC)
2977 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
2978 * ((const char **)data)[2] = password
2979 * ((const char **)data)[3] = string representation of decimal TS 27.007
2980 * service class bit vector. Eg, the string
2981 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08002982 * ((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 -08002983 * This is only applicable in the case of Fixed Dialing Numbers
2984 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002985 *
jsh593c9102009-06-24 16:13:44 -07002986 * "response" is int *
2987 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002988 *
2989 * Valid errors:
2990 * SUCCESS
2991 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002992 * SS_MODIFIED_TO_DIAL
2993 * SS_MODIFIED_TO_USSD
2994 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002995 * INVALID_ARGUMENTS
2996 * INTERNAL_ERR
2997 * NO_MEMORY
2998 * MODEM_ERR
2999 * INVALID_STATE
3000 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003001 * GENERIC_FAILURE
3002 *
3003 */
3004#define RIL_REQUEST_SET_FACILITY_LOCK 43
3005
3006/**
3007 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
3008 *
3009 * Change call barring facility password
3010 *
3011 * "data" is const char **
3012 *
3013 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3014 * (eg "AO" for BAOC)
3015 * ((const char **)data)[1] = old password
3016 * ((const char **)data)[2] = new password
3017 *
Wink Saville7f856802009-06-09 10:23:37 -07003018 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003019 *
3020 * Valid errors:
3021 * SUCCESS
3022 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003023 * SS_MODIFIED_TO_DIAL
3024 * SS_MODIFIED_TO_USSD
3025 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003026 * INVALID_ARGUMENTS
3027 * NO_MEMORY
3028 * MODEM_ERR
3029 * INTERNAL_ERR
3030 * SYSTEM_ERR
3031 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003032 * GENERIC_FAILURE
3033 *
3034 */
3035#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
3036
3037/**
3038 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
3039 *
3040 * Query current network selectin mode
3041 *
3042 * "data" is NULL
3043 *
3044 * "response" is int *
3045 * ((const int *)response)[0] is
3046 * 0 for automatic selection
3047 * 1 for manual selection
3048 *
3049 * Valid errors:
3050 * SUCCESS
3051 * RADIO_NOT_AVAILABLE
3052 * GENERIC_FAILURE
3053 *
3054 */
3055#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
3056
3057/**
3058 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
3059 *
3060 * Specify that the network should be selected automatically
3061 *
3062 * "data" is NULL
3063 * "response" is NULL
3064 *
Wink Saville7f856802009-06-09 10:23:37 -07003065 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003066 * and registered
3067 *
3068 * Valid errors:
3069 * SUCCESS
3070 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003071 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003072 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003073 * GENERIC_FAILURE
3074 *
John Wang75534472010-04-20 15:11:42 -07003075 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3076 * no retries needed, such as illegal SIM or ME.
3077 * Returns GENERIC_FAILURE for all other causes that might be
3078 * fixed by retries.
3079 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003080 */
3081#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
3082
3083/**
3084 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
3085 *
3086 * Manually select a specified network.
3087 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003088 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
3089 * "response" is NULL
3090 *
Wink Saville7f856802009-06-09 10:23:37 -07003091 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003092 * and registered
3093 *
3094 * Valid errors:
3095 * SUCCESS
3096 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003097 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003098 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003099 * GENERIC_FAILURE
3100 *
John Wang75534472010-04-20 15:11:42 -07003101 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3102 * no retries needed, such as illegal SIM or ME.
3103 * Returns GENERIC_FAILURE for all other causes that might be
3104 * fixed by retries.
3105 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003106 */
3107#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
3108
3109/**
3110 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
3111 *
3112 * Scans for available networks
3113 *
3114 * "data" is NULL
3115 * "response" is const char ** that should be an array of n*4 strings, where
3116 * n is the number of available networks
3117 * For each available network:
3118 *
Wink Saville7f856802009-06-09 10:23:37 -07003119 * ((const char **)response)[n+0] is long alpha ONS or EONS
3120 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003121 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
3122 * ((const char **)response)[n+3] is a string value of the status:
3123 * "unknown"
3124 * "available"
3125 * "current"
3126 * "forbidden"
3127 *
Wink Saville7f856802009-06-09 10:23:37 -07003128 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003129 * and registered
3130 *
3131 * Valid errors:
3132 * SUCCESS
3133 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003134 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003135 * GENERIC_FAILURE
3136 *
3137 */
3138#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
3139
3140/**
3141 * RIL_REQUEST_DTMF_START
3142 *
Wink Saville7f856802009-06-09 10:23:37 -07003143 * Start playing a DTMF tone. Continue playing DTMF tone until
3144 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003145 *
3146 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
3147 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07003148 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003149 * "data" is a char *
3150 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
3151 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003152 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003153 * Valid errors:
3154 * SUCCESS
3155 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003156 * INVALID_ARGUMENTS
3157 * NO_RESOURCES
3158 * NO_MEMORY
3159 * SYSTEM_ERR
3160 * MODEM_ERR
3161 * INTERNAL_ERR
3162 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003163 * GENERIC_FAILURE
3164 *
3165 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
3166 */
3167#define RIL_REQUEST_DTMF_START 49
3168
3169/**
3170 * RIL_REQUEST_DTMF_STOP
3171 *
3172 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07003173 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003174 * "data" is NULL
3175 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003176 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003177 * Valid errors:
3178 * SUCCESS
3179 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003180 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07003181 * NO_RESOURCES
3182 * NO_MEMORY
3183 * INVALID_ARGUMENTS
3184 * SYSTEM_ERR
3185 * MODEM_ERR
3186 * INTERNAL_ERR
3187 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003188 * GENERIC_FAILURE
3189 *
3190 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
3191 */
3192#define RIL_REQUEST_DTMF_STOP 50
3193
3194/**
3195 * RIL_REQUEST_BASEBAND_VERSION
3196 *
3197 * Return string value indicating baseband version, eg
3198 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07003199 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003200 * "data" is NULL
3201 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07003202 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003203 * Valid errors:
3204 * SUCCESS
3205 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003206 * EMPTY_RECORD
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003207 * GENERIC_FAILURE
3208 *
3209 */
3210#define RIL_REQUEST_BASEBAND_VERSION 51
3211
3212/**
3213 * RIL_REQUEST_SEPARATE_CONNECTION
3214 *
3215 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07003216 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003217 * as the only other member of the current (active) call
3218 *
3219 * Like AT+CHLD=2x
3220 *
3221 * See TS 22.084 1.3.8.2 (iii)
3222 * TS 22.030 6.5.5 "Entering "2X followed by send"
3223 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07003224 *
3225 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07003226 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
3227 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003228 * "response" is NULL
3229 *
3230 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003231 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003232 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003233 * INVALID_ARGUMENTS
3234 * INVALID_STATE
3235 * NO_RESOURCES
3236 * NO_MEMORY
3237 * SYSTEM_ERR
3238 * MODEM_ERR
3239 * INTERNAL_ERR
3240 * INVALID_CALL_ID
3241 * INVALID_STATE
3242 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003243 * GENERIC_FAILURE
3244 */
3245#define RIL_REQUEST_SEPARATE_CONNECTION 52
3246
3247
3248/**
3249 * RIL_REQUEST_SET_MUTE
3250 *
3251 * Turn on or off uplink (microphone) mute.
3252 *
3253 * Will only be sent while voice call is active.
3254 * Will always be reset to "disable mute" when a new voice call is initiated
3255 *
3256 * "data" is an int *
3257 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
3258 *
3259 * "response" is NULL
3260 *
3261 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003262 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003263 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi68900f52016-03-11 12:02:55 -08003264 * INVALID_ARGUMENTS
3265 * NO_MEMORY
3266 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003267 * GENERIC_FAILURE
3268 */
3269
3270#define RIL_REQUEST_SET_MUTE 53
3271
3272/**
3273 * RIL_REQUEST_GET_MUTE
3274 *
3275 * Queries the current state of the uplink mute setting
3276 *
3277 * "data" is NULL
3278 * "response" is an int *
3279 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
3280 *
3281 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003282 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003283 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00003284 * SS_MODIFIED_TO_DIAL
3285 * SS_MODIFIED_TO_USSD
3286 * SS_MODIFIED_TO_SS
Ajay Nambi68900f52016-03-11 12:02:55 -08003287 * NO_MEMORY
3288 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003289 * GENERIC_FAILURE
3290 */
3291
3292#define RIL_REQUEST_GET_MUTE 54
3293
3294/**
3295 * RIL_REQUEST_QUERY_CLIP
3296 *
3297 * Queries the status of the CLIP supplementary service
3298 *
3299 * (for MMI code "*#30#")
3300 *
3301 * "data" is NULL
3302 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07003303 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003304 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07003305 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003306 *
3307 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003308 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003309 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003310 * NO_MEMORY
3311 * SYSTEM_ERR
3312 * MODEM_ERR
3313 * INTERNAL_ERR
3314 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003315 * GENERIC_FAILURE
3316 */
3317
3318#define RIL_REQUEST_QUERY_CLIP 55
3319
3320/**
Wink Savillec0114b32011-02-18 10:14:07 -08003321 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
3322 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003323 *
3324 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07003325 * context or CDMA data connection active
3326 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003327 *
3328 * "data" is NULL
3329 *
3330 * "response" is a "int *"
3331 * ((int *)response)[0] is an integer cause code defined in TS 24.008
3332 * section 6.1.3.1.3 or close approximation
3333 *
3334 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07003335 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08003336 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003337 * cases for error notification
3338 * and potential retries.
3339 *
3340 * Valid errors:
3341 * SUCCESS
3342 * RADIO_NOT_AVAILABLE
3343 * GENERIC_FAILURE
3344 *
3345 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08003346 *
3347 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003348 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003349
Wink Savillef4c4d362009-04-02 01:37:03 -07003350#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003351
3352/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003353 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003354 *
Wink Saville29487ef2011-04-15 09:15:31 -07003355 * Returns the data call list. An entry is added when a
3356 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
3357 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
3358 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003359 *
3360 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08003361 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003362 *
3363 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003364 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003365 * RADIO_NOT_AVAILABLE (radio resetting)
3366 * GENERIC_FAILURE
Wink Saville29487ef2011-04-15 09:15:31 -07003367 *
3368 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003369 */
3370
Wink Savillef4c4d362009-04-02 01:37:03 -07003371#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003372
3373/**
johnwangf8bc1672009-05-14 19:19:47 -07003374 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003375 *
3376 * Request a radio reset. The RIL implementation may postpone
3377 * the reset until after this request is responded to if the baseband
3378 * is presently busy.
3379 *
johnwangf8bc1672009-05-14 19:19:47 -07003380 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
3381 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003382 * "data" is NULL
3383 * "response" is NULL
3384 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003385 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003386 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003387 * RADIO_NOT_AVAILABLE (radio resetting)
3388 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07003389 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003390 */
3391
3392#define RIL_REQUEST_RESET_RADIO 58
3393
3394/**
3395 * RIL_REQUEST_OEM_HOOK_RAW
3396 *
3397 * This request reserved for OEM-specific uses. It passes raw byte arrays
3398 * back and forth.
3399 *
Wink Saville7f856802009-06-09 10:23:37 -07003400 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003401 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
3402 *
3403 * "data" is a char * of bytes copied from the byte[] data argument in java
3404 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07003405 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003406 * (byte[])(((AsyncResult)response.obj).result)
3407 *
Wink Saville7f856802009-06-09 10:23:37 -07003408 * An error response here will result in
3409 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003410 * (((AsyncResult)response.obj).exception) being an instance of
3411 * com.android.internal.telephony.gsm.CommandException
3412 *
3413 * Valid errors:
3414 * All
3415 */
3416
3417#define RIL_REQUEST_OEM_HOOK_RAW 59
3418
3419/**
3420 * RIL_REQUEST_OEM_HOOK_STRINGS
3421 *
3422 * This request reserved for OEM-specific uses. It passes strings
3423 * back and forth.
3424 *
Wink Saville7f856802009-06-09 10:23:37 -07003425 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003426 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
3427 *
3428 * "data" is a const char **, representing an array of null-terminated UTF-8
3429 * strings copied from the "String[] strings" argument to
3430 * invokeOemRilRequestStrings()
3431 *
3432 * "response" is a const char **, representing an array of null-terminated UTF-8
3433 * stings that will be returned via the caller's response message here:
3434 *
3435 * (String[])(((AsyncResult)response.obj).result)
3436 *
Wink Saville7f856802009-06-09 10:23:37 -07003437 * An error response here will result in
3438 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003439 * (((AsyncResult)response.obj).exception) being an instance of
3440 * com.android.internal.telephony.gsm.CommandException
3441 *
3442 * Valid errors:
3443 * All
3444 */
3445
3446#define RIL_REQUEST_OEM_HOOK_STRINGS 60
3447
3448/**
3449 * RIL_REQUEST_SCREEN_STATE
3450 *
3451 * Indicates the current state of the screen. When the screen is off, the
3452 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07003453 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
3454 * in an effort to conserve power. These notifications should resume when the
3455 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003456 *
3457 * "data" is int *
3458 * ((int *)data)[0] is == 1 for "Screen On"
3459 * ((int *)data)[0] is == 0 for "Screen Off"
3460 *
3461 * "response" is NULL
3462 *
3463 * Valid errors:
3464 * SUCCESS
3465 * GENERIC_FAILURE
3466 */
3467#define RIL_REQUEST_SCREEN_STATE 61
3468
3469
3470/**
3471 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
3472 *
3473 * Enables/disables supplementary service related notifications
3474 * from the network.
3475 *
3476 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3477 *
3478 * "data" is int *
3479 * ((int *)data)[0] is == 1 for notifications enabled
3480 * ((int *)data)[0] is == 0 for notifications disabled
3481 *
3482 * "response" is NULL
3483 *
3484 * Valid errors:
3485 * SUCCESS
3486 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003487 * SIM_BUSY
Ajay Nambi10345892016-03-19 09:02:28 -07003488 * INVALID_ARGUMENTS
3489 * NO_MEMORY
3490 * SYSTEM_ERR
3491 * MODEM_ERR
3492 * INTERNAL_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003493 * GENERIC_FAILURE
3494 *
3495 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3496 */
3497#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
3498
3499/**
3500 * RIL_REQUEST_WRITE_SMS_TO_SIM
3501 *
3502 * Stores a SMS message to SIM memory.
3503 *
3504 * "data" is RIL_SMS_WriteArgs *
3505 *
3506 * "response" is int *
3507 * ((const int *)response)[0] is the record index where the message is stored.
3508 *
3509 * Valid errors:
3510 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003511 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003512 * INVALID_ARGUMENTS
3513 * INVALID_SMS_FORMAT
3514 * INTERNAL_ERR
3515 * MODEM_ERR
3516 * ENCODING_ERR
3517 * NO_MEMORY
3518 * NO_RESOURCES
3519 * INVALID_MODEM_STATE
3520 * MODE_NOT_SUPPORTED
3521 * INVALID_SMSC_ADDRESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003522 * GENERIC_FAILURE
3523 *
3524 */
3525#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
3526
3527/**
3528 * RIL_REQUEST_DELETE_SMS_ON_SIM
3529 *
3530 * Deletes a SMS message from SIM memory.
3531 *
3532 * "data" is int *
3533 * ((int *)data)[0] is the record index of the message to delete.
3534 *
3535 * "response" is NULL
3536 *
3537 * Valid errors:
3538 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003539 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003540 * INVALID_ARGUMENTS
3541 * NO_MEMORY
3542 * REQUEST_RATE_LIMITED
3543 * SYSTEM_ERR
3544 * MODEM_ERR
3545 * NO_SUCH_ENTRY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003546 * GENERIC_FAILURE
3547 *
3548 */
3549#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
3550
3551/**
3552 * RIL_REQUEST_SET_BAND_MODE
3553 *
3554 * Assign a specified band for RF configuration.
3555 *
3556 * "data" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003557 * ((int *)data)[0] is a RIL_RadioBandMode
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003558 *
3559 * "response" is NULL
3560 *
3561 * Valid errors:
3562 * SUCCESS
3563 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003564 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003565 * GENERIC_FAILURE
Nathan Harold92839f12016-02-12 10:02:28 -08003566 *
3567 * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003568 */
3569#define RIL_REQUEST_SET_BAND_MODE 65
3570
3571/**
3572 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3573 *
3574 * Query the list of band mode supported by RF.
3575 *
3576 * "data" is NULL
3577 *
3578 * "response" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003579 * "response" points to an array of int's, the int[0] is the size of array;
3580 * subsequent values are a list of RIL_RadioBandMode listing supported modes.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003581 *
3582 * Valid errors:
3583 * SUCCESS
3584 * RADIO_NOT_AVAILABLE
3585 * GENERIC_FAILURE
3586 *
3587 * See also: RIL_REQUEST_SET_BAND_MODE
3588 */
3589#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
3590
3591/**
3592 * RIL_REQUEST_STK_GET_PROFILE
3593 *
3594 * Requests the profile of SIM tool kit.
3595 * The profile indicates the SAT/USAT features supported by ME.
3596 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
3597 *
3598 * "data" is NULL
3599 *
3600 * "response" is a const char * containing SAT/USAT profile
3601 * in hexadecimal format string starting with first byte of terminal profile
3602 *
3603 * Valid errors:
3604 * RIL_E_SUCCESS
3605 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3606 * RIL_E_GENERIC_FAILURE
3607 */
3608#define RIL_REQUEST_STK_GET_PROFILE 67
3609
3610/**
3611 * RIL_REQUEST_STK_SET_PROFILE
3612 *
3613 * Download the STK terminal profile as part of SIM initialization
3614 * procedure
3615 *
3616 * "data" is a const char * containing SAT/USAT profile
3617 * in hexadecimal format string starting with first byte of terminal profile
3618 *
3619 * "response" is NULL
3620 *
3621 * Valid errors:
3622 * RIL_E_SUCCESS
3623 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3624 * RIL_E_GENERIC_FAILURE
3625 */
3626#define RIL_REQUEST_STK_SET_PROFILE 68
3627
3628/**
3629 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
3630 *
3631 * Requests to send a SAT/USAT envelope command to SIM.
3632 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
3633 *
3634 * "data" is a const char * containing SAT/USAT command
3635 * in hexadecimal format string starting with command tag
3636 *
3637 * "response" is a const char * containing SAT/USAT response
3638 * in hexadecimal format string starting with first byte of response
3639 * (May be NULL)
3640 *
3641 * Valid errors:
3642 * RIL_E_SUCCESS
3643 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003644 * SIM_BUSY
3645 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003646 * RIL_E_GENERIC_FAILURE
3647 */
3648#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
3649
3650/**
3651 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
3652 *
3653 * Requests to send a terminal response to SIM for a received
3654 * proactive command
3655 *
3656 * "data" is a const char * containing SAT/USAT response
3657 * in hexadecimal format string starting with first byte of response data
3658 *
3659 * "response" is NULL
3660 *
3661 * Valid errors:
3662 * RIL_E_SUCCESS
3663 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003664 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003665 * RIL_E_GENERIC_FAILURE
3666 */
3667#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3668
3669/**
3670 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3671 *
3672 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3673 * been initialized by ME already. (We could see the call has been in the 'call
3674 * list') So, STK application needs to accept/reject the call according as user
3675 * operations.
3676 *
3677 * "data" is int *
3678 * ((int *)data)[0] is > 0 for "accept" the call setup
3679 * ((int *)data)[0] is == 0 for "reject" the call setup
3680 *
3681 * "response" is NULL
3682 *
3683 * Valid errors:
3684 * RIL_E_SUCCESS
3685 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003686 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003687 * RIL_E_GENERIC_FAILURE
3688 */
3689#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3690
3691/**
3692 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3693 *
3694 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07003695 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003696 * "data" is NULL
3697 * "response" is NULL
3698 *
3699 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003700 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003701 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003702 * INVALID_STATE
3703 * NO_RESOURCES
3704 * NO_MEMORY
3705 * INVALID_ARGUMENTS
3706 * SYSTEM_ERR
3707 * MODEM_ERR
3708 * INTERNAL_ERR
3709 * INVALID_CALL_ID
3710 * INVALID_STATE
3711 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003712 * GENERIC_FAILURE
3713 */
3714#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3715
3716/**
3717 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3718 *
3719 * Requests to set the preferred network type for searching and registering
3720 * (CS/PS domain, RAT, and operation mode)
3721 *
Wink Savillec0114b32011-02-18 10:14:07 -08003722 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003723 *
3724 * "response" is NULL
3725 *
3726 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07003727 * SUCCESS
3728 * RADIO_NOT_AVAILABLE (radio resetting)
3729 * GENERIC_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08003730 * OPERATION_NOT_ALLOWED
Wink Savillef4c4d362009-04-02 01:37:03 -07003731 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003732 */
3733#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3734
3735/**
3736 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
3737 *
3738 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
3739 * for searching and registering
3740 *
3741 * "data" is NULL
3742 *
3743 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003744 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003745 *
3746 * Valid errors:
3747 * SUCCESS
3748 * RADIO_NOT_AVAILABLE
3749 * GENERIC_FAILURE
3750 *
3751 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3752 */
3753#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
3754
3755/**
3756 * RIL_REQUEST_NEIGHBORING_CELL_IDS
3757 *
3758 * Request neighboring cell id in GSM network
3759 *
3760 * "data" is NULL
3761 * "response" must be a " const RIL_NeighboringCell** "
3762 *
3763 * Valid errors:
3764 * SUCCESS
3765 * RADIO_NOT_AVAILABLE
3766 * GENERIC_FAILURE
3767 */
3768#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3769
3770/**
3771 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07003772 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003773 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07003774 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3775 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003776 *
3777 * Note: The RIL implementation should default to "updates enabled"
3778 * when the screen is on and "updates disabled" when the screen is off.
3779 *
3780 * "data" is int *
3781 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3782 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3783 *
3784 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07003785 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003786 * Valid errors:
3787 * SUCCESS
3788 * RADIO_NOT_AVAILABLE
3789 * GENERIC_FAILURE
3790 *
3791 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3792 */
3793#define RIL_REQUEST_SET_LOCATION_UPDATES 76
3794
Wink Savillef4c4d362009-04-02 01:37:03 -07003795/**
Wink Savillec0114b32011-02-18 10:14:07 -08003796 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07003797 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003798 * Request to set the location where the CDMA subscription shall
3799 * be retrieved
3800 *
3801 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003802 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07003803 *
3804 * "response" is NULL
3805 *
3806 * Valid errors:
3807 * SUCCESS
3808 * RADIO_NOT_AVAILABLE
3809 * GENERIC_FAILURE
3810 * SIM_ABSENT
3811 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08003812 *
3813 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07003814 */
Wink Savillec0114b32011-02-18 10:14:07 -08003815#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07003816
3817/**
3818 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003819 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003820 * Request to set the roaming preferences in CDMA
3821 *
3822 * "data" is int *
3823 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3824 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3825 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003826 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003827 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003828 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003829 * Valid errors:
3830 * SUCCESS
3831 * RADIO_NOT_AVAILABLE
3832 * GENERIC_FAILURE
3833 */
3834#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
3835
3836/**
3837 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003838 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003839 * Request the actual setting of the roaming preferences in CDMA in the modem
3840 *
3841 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003842 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003843 * "response" is int *
3844 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
3845 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3846 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003847 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003848 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003849 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003850 * Valid errors:
3851 * SUCCESS
3852 * RADIO_NOT_AVAILABLE
3853 * GENERIC_FAILURE
3854 */
3855#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
3856
3857/**
3858 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003859 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003860 * Request to set the TTY mode
3861 *
3862 * "data" is int *
3863 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003864 * ((int *)data)[0] is == 1 for TTY Full
3865 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
3866 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07003867 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003868 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003869 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003870 * Valid errors:
3871 * SUCCESS
3872 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003873 * INVALID_ARGUMENTS
3874 * MODEM_ERR
3875 * INTERNAL_ERR
3876 * NO_MEMOR
3877 * INVALID_ARGUMENTS
3878 * MODEM_ERR
3879 * INTERNAL_ERR
3880 * NO_MEMORYY
Wink Savillef4c4d362009-04-02 01:37:03 -07003881 * GENERIC_FAILURE
3882 */
3883#define RIL_REQUEST_SET_TTY_MODE 80
3884
3885/**
3886 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003887 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003888 * Request the setting of TTY mode
3889 *
3890 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003891 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003892 * "response" is int *
3893 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003894 * ((int *)response)[0] is == 1 for TTY Full
3895 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
3896 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07003897 *
3898 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003899 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003900 * Valid errors:
3901 * SUCCESS
3902 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003903 * MODEM_ERR
3904 * INTERNAL_ERR
3905 * NO_MEMORY
3906 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07003907 * GENERIC_FAILURE
3908 */
3909#define RIL_REQUEST_QUERY_TTY_MODE 81
3910
3911/**
3912 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
3913 *
3914 * Request to set the preferred voice privacy mode used in voice
3915 * scrambling
3916 *
3917 * "data" is int *
3918 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3919 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003920 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003921 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003922 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003923 * Valid errors:
3924 * SUCCESS
3925 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003926 * INVALID_ARGUMENTS
3927 * SYSTEM_ERR
3928 * MODEM_ERR
3929 * INTERNAL_ERR
3930 * NO_MEMORY
3931 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07003932 * GENERIC_FAILURE
3933 */
3934#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
3935
3936/**
3937 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003938 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003939 * Request the setting of preferred voice privacy mode
3940 *
3941 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003942 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003943 * "response" is int *
3944 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3945 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003946 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003947 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003948 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003949 * Valid errors:
3950 * SUCCESS
3951 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003952 * MODEM_ERR
3953 * INTERNAL_ERR
3954 * NO_MEMORY
3955 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07003956 * GENERIC_FAILURE
3957 */
3958#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
3959
3960/**
3961 * RIL_REQUEST_CDMA_FLASH
3962 *
3963 * Send FLASH
3964 *
3965 * "data" is const char *
3966 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07003967 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003968 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003969 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003970 * Valid errors:
3971 * SUCCESS
3972 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003973 * INVALID_ARGUMENTS
3974 * NO_MEMORY
3975 * SYSTEM_ERR
3976 * MODEM_ERR
3977 * INTERNAL_ERR
3978 * INVALID_CALL_ID
3979 * INVALID_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07003980 * GENERIC_FAILURE
3981 *
3982 */
3983#define RIL_REQUEST_CDMA_FLASH 84
3984
3985/**
3986 * RIL_REQUEST_CDMA_BURST_DTMF
3987 *
3988 * Send DTMF string
3989 *
jsh602f80f2009-07-10 15:44:37 -07003990 * "data" is const char **
3991 * ((const char **)data)[0] is a DTMF string
3992 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
3993 * default
3994 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
3995 * default
Wink Saville7f856802009-06-09 10:23:37 -07003996 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003997 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003998 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003999 * Valid errors:
4000 * SUCCESS
4001 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004002 * INVALID_ARGUMENTS
4003 * NO_MEMORY
4004 * SYSTEM_ERR
4005 * MODEM_ERR
4006 * INTERNAL_ERR
4007 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07004008 * GENERIC_FAILURE
4009 *
4010 */
4011#define RIL_REQUEST_CDMA_BURST_DTMF 85
4012
4013/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004014 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07004015 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004016 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
4017 * If the checksum is valid the 20 digit AKEY is written to NV,
4018 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07004019 *
4020 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004021 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
4022 * where the last 6 digits are a checksum of the
4023 * first 20, as specified in TR45.AHAG
4024 * "Common Cryptographic Algorithms, Revision D.1
4025 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07004026 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004027 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004028 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004029 * Valid errors:
4030 * SUCCESS
4031 * RADIO_NOT_AVAILABLE
4032 * GENERIC_FAILURE
4033 *
4034 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004035#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07004036
4037/**
4038 * RIL_REQUEST_CDMA_SEND_SMS
4039 *
4040 * Send a CDMA SMS message
4041 *
4042 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07004043 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004044 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07004045 *
johnwangbfb151b2009-09-11 15:20:38 -07004046 * Based on the return error, caller decides to resend if sending sms
4047 * fails. The CDMA error class is derived as follows,
4048 * SUCCESS is error class 0 (no error)
4049 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
4050 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
4051 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004052 * Valid errors:
4053 * SUCCESS
4054 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07004055 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08004056 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004057 * INVALID_STATE
4058 * INVALID_ARGUMENTS
4059 * NO_MEMORY
4060 * REQUEST_RATE_LIMITED
4061 * INVALID_SMS_FORMAT
4062 * SYSTEM_ERR
4063 * FDN_CHECK_FAILURE
4064 * MODEM_ERR
4065 * NETWORK_ERR
4066 * ENCODING_ERR
4067 * INVALID_SMSC_ADDRESS
4068 * MODE_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004069 * GENERIC_FAILURE
4070 *
4071 */
4072#define RIL_REQUEST_CDMA_SEND_SMS 87
4073
4074/**
4075 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4076 *
4077 * Acknowledge the success or failure in the receipt of SMS
4078 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4079 *
4080 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07004081 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004082 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004083 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004084 * Valid errors:
4085 * SUCCESS
4086 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004087 * INVALID_ARGUMENTS
4088 * NO_SMS_TO_ACK
4089 * INVALID_STATE
4090 * NO_MEMORY
4091 * REQUEST_RATE_LIMITED
4092 * SYSTEM_ERR
4093 * MODEM_ERR
4094 * INVALID_STATE
4095 * MODE_NOT_SUPPORTED
4096 * NETWORK_NOT_READY
4097 * INVALID_MODEM_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004098 * GENERIC_FAILURE
4099 *
4100 */
4101#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
4102
4103/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004104 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004105 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004106 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
4107 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004108 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004109 *
4110 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
4111 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
4112 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004113 * Valid errors:
4114 * SUCCESS
4115 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004116 * INVALID_STATE
4117 * NO_MEMORY
4118 * REQUEST_RATE_LIMITED
4119 * SYSTEM_ERR
4120 * NO_RESOURCES
4121 * MODEM_ERR
4122 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004123 * GENERIC_FAILURE
4124 *
4125 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004126#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07004127
4128/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004129 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004130 *
4131 * Set GSM/WCDMA Cell Broadcast SMS config
4132 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004133 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
4134 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
4135 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004136 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004137 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004138 * Valid errors:
4139 * SUCCESS
4140 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004141 * INVALID_STATE
4142 * INVALID_ARGUMENTS
4143 * NO_MEMORY
4144 * SYSTEM_ERR
4145 * REQUEST_RATE_LIMITED
4146 * MODEM_ERR
4147 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004148 * GENERIC_FAILURE
4149 *
4150 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004151#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07004152
4153/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004154 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004155 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004156* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07004157 *
4158 * "data" is const int *
4159 * (const int *)data[0] indicates to activate or turn off the
4160 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
4161 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004162 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004163 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004164 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004165 * Valid errors:
4166 * SUCCESS
4167 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004168 * INVALID_STATE
4169 * INVALID_ARGUMENTS
4170 * NO_MEMORY
4171 * SYSTEM_ERR
4172 * REQUEST_RATE_LIMITED
4173 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004174 * GENERIC_FAILURE
4175 *
4176 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004177#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07004178
4179/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004180 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004181 *
4182 * Request the setting of CDMA Broadcast SMS config
4183 *
4184 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004185 *
4186 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
4187 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
4188 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004189 * Valid errors:
4190 * SUCCESS
4191 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004192 * INVALID_STATE
4193 * NO_MEMORY
4194 * REQUEST_RATE_LIMITED
4195 * SYSTEM_ERR
4196 * NO_RESOURCES
4197 * MODEM_ERR
4198 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004199 * GENERIC_FAILURE
4200 *
4201 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004202#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07004203
4204/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004205 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004206 *
4207 * Set CDMA Broadcast SMS config
4208 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004209 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
4210 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
4211 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004212 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004213 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004214 * Valid errors:
4215 * SUCCESS
4216 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004217 * INVALID_STATE
4218 * INVALID_ARGUMENTS
4219 * NO_MEMORY
4220 * SYSTEM_ERR
4221 * REQUEST_RATE_LIMITED
4222 * MODEM_ERR
4223 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004224 * GENERIC_FAILURE
4225 *
4226 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004227#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07004228
4229/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004230 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004231 *
4232 * Enable or disable the reception of CDMA Broadcast SMS
4233 *
4234 * "data" is const int *
4235 * (const int *)data[0] indicates to activate or turn off the
4236 * reception of CDMA Broadcast SMS, 0-1,
4237 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004238 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004239 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004240 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004241 * Valid errors:
4242 * SUCCESS
4243 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004244 * INVALID_STATE
4245 * INVALID_ARGUMENTS
4246 * NO_MEMORY
4247 * SYSTEM_ERR
4248 * REQUEST_RATE_LIMITED
4249 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004250 * GENERIC_FAILURE
4251 *
4252 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004253#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07004254
4255/**
4256 * RIL_REQUEST_CDMA_SUBSCRIPTION
4257 *
4258 * Request the device MDN / H_SID / H_NID.
4259 *
4260 * The request is only allowed when CDMA subscription is available. When CDMA
4261 * subscription is changed, application layer should re-issue the request to
4262 * update the subscription information.
4263 *
4264 * If a NULL value is returned for any of the device id, it means that error
4265 * accessing the device.
4266 *
4267 * "response" is const char **
4268 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07004269 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
4270 * CDMA subscription is available, in decimal format
4271 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
4272 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07004273 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07004274 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07004275 *
4276 * Valid errors:
4277 * SUCCESS
4278 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
4279 */
4280
Wink Savilleeafe79d2009-04-03 18:02:34 -07004281#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07004282
4283/**
4284 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
4285 *
4286 * Stores a CDMA SMS message to RUIM memory.
4287 *
4288 * "data" is RIL_CDMA_SMS_WriteArgs *
4289 *
4290 * "response" is int *
4291 * ((const int *)response)[0] is the record index where the message is stored.
4292 *
4293 * Valid errors:
4294 * SUCCESS
4295 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004296 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08004297 * INVALID_ARGUMENTS
4298 * INVALID_SMS_FORMAT
4299 * INTERNAL_ERR
4300 * MODEM_ERR
4301 * ENCODING_ERR
4302 * NO_MEMORY
4303 * NO_RESOURCES
4304 * INVALID_MODEM_STATE
4305 * MODE_NOT_SUPPORTED
4306 * INVALID_SMSC_ADDRESS
Wink Savillef4c4d362009-04-02 01:37:03 -07004307 * GENERIC_FAILURE
4308 *
4309 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004310#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07004311
4312/**
4313 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
4314 *
4315 * Deletes a CDMA SMS message from RUIM memory.
4316 *
4317 * "data" is int *
4318 * ((int *)data)[0] is the record index of the message to delete.
4319 *
4320 * "response" is NULL
4321 *
4322 * Valid errors:
4323 * SUCCESS
4324 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004325 * INVALID_ARGUMENTS
4326 * NO_MEMORY
4327 * REQUEST_RATE_LIMITED
4328 * SYSTEM_ERR
4329 * MODEM_ERR
4330 * NO_SUCH_ENTRY
Wink Savillef4c4d362009-04-02 01:37:03 -07004331 * GENERIC_FAILURE
4332 *
4333 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004334#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07004335
4336/**
4337 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07004338 *
4339 * Request the device ESN / MEID / IMEI / IMEISV.
4340 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004341 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07004342 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07004343 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004344 *
4345 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07004346 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004347 *
4348 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07004349 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004350 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004351 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07004352 * ((const char **)response)[0] is IMEI if GSM subscription is available
4353 * ((const char **)response)[1] is IMEISV if GSM subscription is available
4354 * ((const char **)response)[2] is ESN if CDMA subscription is available
4355 * ((const char **)response)[3] is MEID if CDMA subscription is available
4356 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004357 * Valid errors:
4358 * SUCCESS
4359 * RADIO_NOT_AVAILABLE
4360 * GENERIC_FAILURE
4361 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004362#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07004363
Wink Saville1b5fd232009-04-22 14:50:00 -07004364/**
4365 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
4366 *
4367 * Request the radio's system selection module to exit emergency
4368 * callback mode. RIL will not respond with SUCCESS until the modem has
4369 * completely exited from Emergency Callback Mode.
4370 *
4371 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004372 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004373 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004374 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004375 * Valid errors:
4376 * SUCCESS
4377 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004378 * OPERATION_NOT_ALLOWED
Wink Saville1b5fd232009-04-22 14:50:00 -07004379 * GENERIC_FAILURE
4380 *
4381 */
4382#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07004383
jsh000a9fe2009-05-11 14:52:35 -07004384/**
4385 * RIL_REQUEST_GET_SMSC_ADDRESS
4386 *
4387 * Queries the default Short Message Service Center address on the device.
4388 *
4389 * "data" is NULL
4390 *
4391 * "response" is const char * containing the SMSC address.
4392 *
4393 * Valid errors:
4394 * SUCCESS
4395 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004396 * NO_MEMORY
4397 * REQUEST_RATE_LIMITED
4398 * SYSTEM_ERR
4399 * INTERNAL_ERR
4400 * MODEM_ERR
4401 * INVALID_ARGUMENTS
4402 * INVALID_MODEM_STATE
4403 * NOT_PROVISIONED
jsh000a9fe2009-05-11 14:52:35 -07004404 * GENERIC_FAILURE
4405 *
4406 */
4407#define RIL_REQUEST_GET_SMSC_ADDRESS 100
4408
4409/**
4410 * RIL_REQUEST_SET_SMSC_ADDRESS
4411 *
4412 * Sets the default Short Message Service Center address on the device.
4413 *
4414 * "data" is const char * containing the SMSC address.
4415 *
4416 * "response" is NULL
4417 *
4418 * Valid errors:
4419 * SUCCESS
4420 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004421 * INVALID_ARGUMENTS
4422 * INVALID_SMS_FORMAT
4423 * NO_MEMORY
4424 * SYSTEM_ERR
4425 * REQUEST_RATE_LIMITED
4426 * MODEM_ERR
4427 * NO_RESOURCES
jsh000a9fe2009-05-11 14:52:35 -07004428 * GENERIC_FAILURE
4429 *
4430 */
4431#define RIL_REQUEST_SET_SMSC_ADDRESS 101
4432
jshb60444e2009-05-29 11:09:17 -07004433/**
4434 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
4435 *
4436 * Indicates whether there is storage available for new SMS messages.
4437 *
4438 * "data" is int *
4439 * ((int *)data)[0] is 1 if memory is available for storing new messages
4440 * is 0 if memory capacity is exceeded
4441 *
4442 * "response" is NULL
4443 *
4444 * Valid errors:
4445 * SUCCESS
4446 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004447 * INVALID_ARGUMENTS
4448 * NO_MEMORY
4449 * INVALID_STATE
4450 * SYSTEM_ERR
4451 * REQUEST_RATE_LIMITED
4452 * MODEM_ERR
jshb60444e2009-05-29 11:09:17 -07004453 * GENERIC_FAILURE
4454 *
4455 */
4456#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
4457
Wink Saville2641d5b2009-06-08 17:40:42 -07004458/**
4459 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
4460 *
4461 * Indicates that the StkSerivce is running and is
4462 * ready to receive RIL_UNSOL_STK_XXXXX commands.
4463 *
4464 * "data" is NULL
4465 * "response" is NULL
4466 *
4467 * Valid errors:
4468 * SUCCESS
4469 * RADIO_NOT_AVAILABLE
4470 * GENERIC_FAILURE
4471 *
4472 */
4473#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
4474
Wink Savillec0114b32011-02-18 10:14:07 -08004475/**
4476 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
4477 *
4478 * Request to query the location where the CDMA subscription shall
4479 * be retrieved
4480 *
4481 * "data" is NULL
4482 *
4483 * "response" is int *
4484 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4485 *
4486 * Valid errors:
4487 * SUCCESS
4488 * RADIO_NOT_AVAILABLE
4489 * GENERIC_FAILURE
4490 * SUBSCRIPTION_NOT_AVAILABLE
4491 *
4492 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
4493 */
4494#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
4495
Jake Hambyfa8d5842011-08-19 16:22:18 -07004496/**
4497 * RIL_REQUEST_ISIM_AUTHENTICATION
4498 *
4499 * Request the ISIM application on the UICC to perform AKA
4500 * challenge/response algorithm for IMS authentication
4501 *
4502 * "data" is a const char * containing the challenge string in Base64 format
4503 * "response" is a const char * containing the response in Base64 format
4504 *
4505 * Valid errors:
4506 * SUCCESS
4507 * RADIO_NOT_AVAILABLE
4508 * GENERIC_FAILURE
4509 */
4510#define RIL_REQUEST_ISIM_AUTHENTICATION 105
4511
Jake Hamby300105d2011-09-26 01:01:44 -07004512/**
4513 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
4514 *
4515 * Acknowledge successful or failed receipt of SMS previously indicated
4516 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
4517 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
4518 *
4519 * "data" is const char **
4520 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
4521 * is "0" on failed receipt (send RP-ERROR)
4522 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
4523 *
4524 * "response" is NULL
4525 *
4526 * Valid errors:
4527 * SUCCESS
4528 * RADIO_NOT_AVAILABLE
4529 * GENERIC_FAILURE
4530 */
4531#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
4532
4533/**
4534 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
4535 *
4536 * Requests to send a SAT/USAT envelope command to SIM.
4537 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
4538 *
4539 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
4540 * the SW1 and SW2 status bytes from the UICC response are returned along with
4541 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
4542 *
4543 * The RIL implementation shall perform the normal processing of a '91XX'
4544 * response in SW1/SW2 to retrieve the pending proactive command and send it
4545 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
4546 *
4547 * "data" is a const char * containing the SAT/USAT command
4548 * in hexadecimal format starting with command tag
4549 *
4550 * "response" is a const RIL_SIM_IO_Response *
4551 *
4552 * Valid errors:
4553 * RIL_E_SUCCESS
4554 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08004555 * SIM_BUSY
4556 * OPERATION_NOT_ALLOWED
Jake Hamby300105d2011-09-26 01:01:44 -07004557 * RIL_E_GENERIC_FAILURE
4558 */
4559#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
4560
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004561/**
4562 * RIL_REQUEST_VOICE_RADIO_TECH
4563 *
4564 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
4565 * when radio state is RADIO_STATE_ON
4566 *
4567 * "data" is NULL
4568 * "response" is int *
4569 * ((int *) response)[0] is of type const RIL_RadioTechnology
4570 *
4571 * Valid errors:
4572 * SUCCESS
4573 * RADIO_NOT_AVAILABLE
4574 * GENERIC_FAILURE
4575 */
4576#define RIL_REQUEST_VOICE_RADIO_TECH 108
4577
Wink Saville8a9e0212013-04-09 12:11:38 -07004578/**
4579 * RIL_REQUEST_GET_CELL_INFO_LIST
4580 *
4581 * Request all of the current cell information known to the radio. The radio
4582 * must a list of all current cells, including the neighboring cells. If for a particular
4583 * cell information isn't known then the appropriate unknown value will be returned.
4584 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
4585 *
4586 * "data" is NULL
4587 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08004588 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07004589 */
4590#define RIL_REQUEST_GET_CELL_INFO_LIST 109
4591
4592/**
4593 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
4594 *
4595 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
Wink Savillec57b3eb2013-04-17 12:51:41 -07004596 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
Wink Saville8a9e0212013-04-09 12:11:38 -07004597 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
4598 * a RIL_UNSOL_CELL_INFO_LIST.
4599 *
4600 * "data" is int *
4601 * ((int *)data)[0] is minimum time in milliseconds
4602 *
4603 * "response" is NULL
4604 *
4605 * Valid errors:
4606 * SUCCESS
4607 * RADIO_NOT_AVAILABLE
4608 * GENERIC_FAILURE
4609 */
4610#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
Jake Hamby300105d2011-09-26 01:01:44 -07004611
Sungmin Choi75697532013-04-26 15:04:45 -07004612/**
4613 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
4614 *
4615 * Set an apn to initial attach network
4616 * "response" is NULL
4617 *
4618 * Valid errors:
4619 * SUCCESS
4620 * RADIO_NOT_AVAILABLE (radio resetting)
4621 * GENERIC_FAILURE
4622 * SUBSCRIPTION_NOT_AVAILABLE
4623 */
4624#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
4625
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004626/**
4627 * RIL_REQUEST_IMS_REGISTRATION_STATE
4628 *
4629 * Request current IMS registration state
4630 *
4631 * "data" is NULL
4632 *
4633 * "response" is int *
4634 * ((int *)response)[0] is registration state:
4635 * 0 - Not registered
4636 * 1 - Registered
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004637 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004638 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004639 * must follow with IMS SMS format:
4640 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004641 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
4642 *
4643 * Valid errors:
4644 * SUCCESS
4645 * RADIO_NOT_AVAILABLE
4646 * GENERIC_FAILURE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004647 */
4648#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
4649
4650/**
4651 * RIL_REQUEST_IMS_SEND_SMS
4652 *
4653 * Send a SMS message over IMS
4654 *
4655 * "data" is const RIL_IMS_SMS_Message *
4656 *
4657 * "response" is a const RIL_SMS_Response *
4658 *
4659 * Based on the return error, caller decides to resend if sending sms
4660 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
4661 * In case of retry, data is encoded based on Voice Technology available.
4662 *
4663 * Valid errors:
4664 * SUCCESS
4665 * RADIO_NOT_AVAILABLE
4666 * SMS_SEND_FAIL_RETRY
4667 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08004668 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004669 * INVALID_ARGUMENTS
4670 * INVALID_STATE
4671 * NO_MEMORY
4672 * INVALID_SMS_FORMAT
4673 * SYSTEM_ERR
4674 * REQUEST_RATE_LIMITED
4675 * MODEM_ERR
4676 * NETWORK_ERR
4677 * ENCODING_ERR
4678 * INVALID_SMSC_ADDRESS
4679 * MODE_NOT_SUPPORTED
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004680 * GENERIC_FAILURE
4681 *
4682 */
4683#define RIL_REQUEST_IMS_SEND_SMS 113
4684
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004685/**
4686 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
4687 *
4688 * Request APDU exchange on the basic channel. This command reflects TS 27.007
4689 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
4690 * of GSM/CDMA, and filter commands appropriately. It should filter
4691 * channel management and SELECT by DF name commands.
4692 *
4693 * "data" is a const RIL_SIM_APDU *
4694 * "sessionid" field should be ignored.
4695 *
4696 * "response" is a const RIL_SIM_IO_Response *
4697 *
4698 * Valid errors:
4699 * SUCCESS
4700 * RADIO_NOT_AVAILABLE
4701 * GENERIC_FAILURE
4702 */
4703#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
4704
4705/**
4706 * RIL_REQUEST_SIM_OPEN_CHANNEL
4707 *
4708 * Open a new logical channel and select the given application. This command
4709 * reflects TS 27.007 "open logical channel" operation (+CCHO).
4710 *
4711 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
4712 *
4713 * "response" is int *
4714 * ((int *)data)[0] contains the session id of the logical channel.
Shishir Agrawal760123f2014-10-14 09:14:57 -07004715 * ((int *)data)[1] onwards may optionally contain the select response for the
4716 * open channel command with one byte per integer.
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004717 *
4718 * Valid errors:
4719 * SUCCESS
4720 * RADIO_NOT_AVAILABLE
4721 * GENERIC_FAILURE
4722 * MISSING_RESOURCE
4723 * NO_SUCH_ELEMENT
4724 */
4725#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
4726
4727/**
4728 * RIL_REQUEST_SIM_CLOSE_CHANNEL
4729 *
4730 * Close a previously opened logical channel. This command reflects TS 27.007
4731 * "close logical channel" operation (+CCHC).
4732 *
4733 * "data" is int *
4734 * ((int *)data)[0] is the session id of logical the channel to close.
4735 *
4736 * "response" is NULL
4737 *
4738 * Valid errors:
4739 * SUCCESS
4740 * RADIO_NOT_AVAILABLE
4741 * GENERIC_FAILURE
4742 */
4743#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
4744
4745/**
4746 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
4747 *
4748 * Exchange APDUs with a UICC over a previously opened logical channel. This
4749 * command reflects TS 27.007 "generic logical channel access" operation
4750 * (+CGLA). The modem should filter channel management and SELECT by DF name
4751 * commands.
4752 *
4753 * "data" is a const RIL_SIM_APDU*
4754 *
4755 * "response" is a const RIL_SIM_IO_Response *
4756 *
4757 * Valid errors:
4758 * SUCCESS
4759 * RADIO_NOT_AVAILABLE
4760 * GENERIC_FAILURE
4761 */
4762#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
4763
Jake Hamby8a4a2332014-01-15 13:12:05 -08004764/**
4765 * RIL_REQUEST_NV_READ_ITEM
4766 *
4767 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4768 * This is used for device configuration by some CDMA operators.
4769 *
4770 * "data" is a const RIL_NV_ReadItem *
4771 *
4772 * "response" is const char * containing the contents of the NV item
4773 *
4774 * Valid errors:
4775 * SUCCESS
4776 * RADIO_NOT_AVAILABLE
4777 * GENERIC_FAILURE
4778 */
4779#define RIL_REQUEST_NV_READ_ITEM 118
4780
4781/**
4782 * RIL_REQUEST_NV_WRITE_ITEM
4783 *
4784 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4785 * This is used for device configuration by some CDMA operators.
4786 *
4787 * "data" is a const RIL_NV_WriteItem *
4788 *
4789 * "response" is NULL
4790 *
4791 * Valid errors:
4792 * SUCCESS
4793 * RADIO_NOT_AVAILABLE
4794 * GENERIC_FAILURE
4795 */
4796#define RIL_REQUEST_NV_WRITE_ITEM 119
4797
4798/**
4799 * RIL_REQUEST_NV_WRITE_CDMA_PRL
4800 *
4801 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
4802 * This is used for device configuration by some CDMA operators.
4803 *
4804 * "data" is a const char * containing the PRL as a byte array
4805 *
4806 * "response" is NULL
4807 *
4808 * Valid errors:
4809 * SUCCESS
4810 * RADIO_NOT_AVAILABLE
4811 * GENERIC_FAILURE
4812 */
4813#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
4814
4815/**
4816 * RIL_REQUEST_NV_RESET_CONFIG
4817 *
4818 * Reset the radio NV configuration to the factory state.
4819 * This is used for device configuration by some CDMA operators.
4820 *
4821 * "data" is int *
Jake Hambyd27c9d52014-02-06 14:52:05 -08004822 * ((int *)data)[0] is 1 to reload all NV items
4823 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
4824 * ((int *)data)[0] is 3 for factory reset (RTN)
Jake Hamby8a4a2332014-01-15 13:12:05 -08004825 *
4826 * "response" is NULL
4827 *
4828 * Valid errors:
4829 * SUCCESS
4830 * RADIO_NOT_AVAILABLE
4831 * GENERIC_FAILURE
4832 */
4833#define RIL_REQUEST_NV_RESET_CONFIG 121
4834
Etan Cohend3652192014-06-20 08:28:44 -07004835 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
4836 * FIXME This API needs to have more documentation.
4837 *
4838 * Selection/de-selection of a subscription from a SIM card
4839 * "data" is const RIL_SelectUiccSub*
4840
4841 *
4842 * "response" is NULL
4843 *
4844 * Valid errors:
4845 * SUCCESS
4846 * RADIO_NOT_AVAILABLE (radio resetting)
4847 * GENERIC_FAILURE
4848 * SUBSCRIPTION_NOT_SUPPORTED
4849 *
4850 */
4851#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
4852
4853/**
4854 * RIL_REQUEST_ALLOW_DATA
4855 *
4856 * Tells the modem whether data calls are allowed or not
4857 *
4858 * "data" is int *
4859 * FIXME slotId and aid will be added.
4860 * ((int *)data)[0] is == 0 to allow data calls
4861 * ((int *)data)[0] is == 1 to disallow data calls
4862 *
4863 * "response" is NULL
4864 *
4865 * Valid errors:
4866 *
4867 * SUCCESS
4868 * RADIO_NOT_AVAILABLE (radio resetting)
4869 * GENERIC_FAILURE
4870 *
4871 */
4872#define RIL_REQUEST_ALLOW_DATA 123
4873
4874/**
4875 * RIL_REQUEST_GET_HARDWARE_CONFIG
4876 *
4877 * Request all of the current hardware (modem and sim) associated
4878 * with the RIL.
4879 *
4880 * "data" is NULL
4881 *
4882 * "response" is an array of RIL_HardwareConfig.
4883 */
4884#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
4885
4886/**
Amit Mahajan2b772032014-06-26 14:20:11 -07004887 * RIL_REQUEST_SIM_AUTHENTICATION
Etan Cohend3652192014-06-20 08:28:44 -07004888 *
4889 * Returns the response of SIM Authentication through RIL to a
4890 * challenge request.
4891 *
4892 * "data" Base64 encoded string containing challenge:
4893 * int authContext; P2 value of authentication command, see P2 parameter in
4894 * 3GPP TS 31.102 7.1.2
4895 * char *authData; the challenge string in Base64 format, see 3GPP
4896 * TS 31.102 7.1.2
4897 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
4898 * NULL if no value
4899 *
4900 * "response" Base64 encoded strings containing response:
4901 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
4902 * int sw2;
4903 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
4904 */
Amit Mahajan2b772032014-06-26 14:20:11 -07004905#define RIL_REQUEST_SIM_AUTHENTICATION 125
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004906
Wink Savillec29360a2014-07-13 05:17:28 -07004907/**
4908 * RIL_REQUEST_GET_DC_RT_INFO
4909 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004910 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07004911 * Requests the Data Connection Real Time Info
4912 *
4913 * "data" is NULL
4914 *
4915 * "response" is the most recent RIL_DcRtInfo
4916 *
4917 * Valid errors:
4918 * SUCCESS
4919 * RADIO_NOT_AVAILABLE
4920 * GENERIC_FAILURE
4921 *
4922 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
4923 */
4924#define RIL_REQUEST_GET_DC_RT_INFO 126
4925
4926/**
4927 * RIL_REQUEST_SET_DC_RT_INFO_RATE
4928 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004929 * The request is DEPRECATED
Wink Savillec29360a2014-07-13 05:17:28 -07004930 * This is the minimum number of milliseconds between successive
4931 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
4932 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
4933 * 0 means send as fast as possible.
4934 *
4935 * "data" The number of milliseconds as an int
4936 *
4937 * "response" is null
4938 *
4939 * Valid errors:
4940 * SUCCESS must not fail
4941 */
4942#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
4943
Amit Mahajanc796e222014-08-13 16:54:01 +00004944/**
4945 * RIL_REQUEST_SET_DATA_PROFILE
4946 *
4947 * Set data profile in modem
Hui Wang8d679622014-10-16 14:59:27 -05004948 * Modem should erase existed profiles from framework, and apply new profiles
Amit Mahajanc796e222014-08-13 16:54:01 +00004949 * "data" is an const RIL_DataProfileInfo **
4950 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
4951 * "response" is NULL
4952 *
4953 * Valid errors:
4954 * SUCCESS
4955 * RADIO_NOT_AVAILABLE (radio resetting)
4956 * GENERIC_FAILURE
4957 * SUBSCRIPTION_NOT_AVAILABLE
4958 */
4959#define RIL_REQUEST_SET_DATA_PROFILE 128
Naveen Kallaa65a16a2014-07-31 16:48:31 -07004960
4961/**
4962 * RIL_REQUEST_SHUTDOWN
4963 *
4964 * Device is shutting down. All further commands are ignored
4965 * and RADIO_NOT_AVAILABLE must be returned.
4966 *
4967 * "data" is null
4968 * "response" is NULL
4969 *
4970 * Valid errors:
4971 * SUCCESS
4972 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004973 * OPERATION_NOT_ALLOWED
Naveen Kallaa65a16a2014-07-31 16:48:31 -07004974 * GENERIC_FAILURE
4975 */
4976#define RIL_REQUEST_SHUTDOWN 129
4977
Wink Saville8b4e4f72014-10-17 15:01:45 -07004978/**
4979 * RIL_REQUEST_GET_RADIO_CAPABILITY
4980 *
4981 * Used to get phone radio capablility.
4982 *
Abhishek Adappa772c0d22015-02-09 11:11:12 -08004983 * "data" is the RIL_RadioCapability structure
Wink Saville8b4e4f72014-10-17 15:01:45 -07004984 *
4985 * Valid errors:
4986 * SUCCESS
4987 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004988 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07004989 * GENERIC_FAILURE
4990 */
4991#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
4992
4993/**
4994 * RIL_REQUEST_SET_RADIO_CAPABILITY
4995 *
4996 * Used to set the phones radio capability. Be VERY careful
4997 * using this request as it may cause some vendor modems to reset. Because
4998 * of the possible modem reset any RIL commands after this one may not be
4999 * processed.
5000 *
5001 * "data" is the RIL_RadioCapability structure
5002 *
5003 * "response" is the RIL_RadioCapability structure, used to feedback return status
5004 *
5005 * Valid errors:
5006 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
5007 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005008 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005009 * GENERIC_FAILURE
5010 */
5011#define RIL_REQUEST_SET_RADIO_CAPABILITY 131
5012
fengluf7408292015-04-14 14:53:55 -07005013/**
5014 * RIL_REQUEST_START_LCE
5015 *
5016 * Start Link Capacity Estimate (LCE) service if supported by the radio.
5017 *
5018 * "data" is const int *
5019 * ((const int*)data)[0] specifies the desired reporting interval (ms).
fenglu290add32015-05-01 17:05:15 -07005020 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
fengluf7408292015-04-14 14:53:55 -07005021 *
fenglu290add32015-05-01 17:05:15 -07005022 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005023 *
5024 * Valid errors:
5025 * SUCCESS
5026 * RADIO_NOT_AVAILABLE
5027 * LCE_NOT_SUPPORTED
5028 */
5029#define RIL_REQUEST_START_LCE 132
5030
5031/**
5032 * RIL_REQUEST_STOP_LCE
5033 *
5034 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
5035 * idempotent for the radio modem.
5036 *
fenglu290add32015-05-01 17:05:15 -07005037 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005038 *
5039 * Valid errors:
5040 * SUCCESS
5041 * RADIO_NOT_AVAILABLE
5042 * LCE_NOT_SUPPORTED
5043 */
5044#define RIL_REQUEST_STOP_LCE 133
5045
5046/**
5047 * RIL_REQUEST_PULL_LCEDATA
5048 *
5049 * Pull LCE service for capacity information.
5050 *
fenglu290add32015-05-01 17:05:15 -07005051 * "response" is the RIL_LceDataInfo.
fengluf7408292015-04-14 14:53:55 -07005052 *
5053 * Valid errors:
5054 * SUCCESS
5055 * RADIO_NOT_AVAILABLE
5056 * LCE_NOT_SUPPORTED
5057 */
5058#define RIL_REQUEST_PULL_LCEDATA 134
5059
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005060/**
5061 * RIL_REQUEST_GET_ACTIVITY_INFO
5062 *
5063 * Get modem activity statisitics info.
5064 *
5065 * There can be multiple RIL_REQUEST_GET_ACTIVITY_INFO calls to modem.
5066 * Once the response for the request is sent modem will clear
5067 * current statistics information.
5068 *
5069 * "data" is null
5070 * "response" is const RIL_ActivityStatsInfo *
5071 *
5072 * Valid errors:
5073 *
5074 * SUCCESS
5075 * RADIO_NOT_AVAILABLE (radio resetting)
5076 * GENERIC_FAILURE
5077 */
5078#define RIL_REQUEST_GET_ACTIVITY_INFO 135
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005079
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005080/***********************************************************************/
5081
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005082/**
5083 * RIL_RESPONSE_ACKNOWLEDGEMENT
5084 *
5085 * This is used by Asynchronous solicited messages and Unsolicited messages
5086 * to acknowledge the receipt of those messages in RIL.java so that the ack
5087 * can be used to let ril.cpp to release wakelock.
5088 *
5089 * Valid errors
5090 * SUCCESS
5091 * RADIO_NOT_AVAILABLE
5092 */
5093
5094#define RIL_RESPONSE_ACKNOWLEDGEMENT 800
5095
5096/***********************************************************************/
5097
Wink Savillef4c4d362009-04-02 01:37:03 -07005098
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005099#define RIL_UNSOL_RESPONSE_BASE 1000
5100
5101/**
5102 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
5103 *
5104 * Indicate when value of RIL_RadioState has changed.
5105 *
5106 * Callee will invoke RIL_RadioStateRequest method on main thread
5107 *
5108 * "data" is NULL
5109 */
5110
5111#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
5112
5113
5114/**
5115 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
5116 *
5117 * Indicate when call state has changed
5118 *
5119 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
5120 *
5121 * "data" is NULL
5122 *
Wink Saville7f856802009-06-09 10:23:37 -07005123 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005124 * "RING", "BUSY", "NO CARRIER", and also call state
5125 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
5126 *
5127 * Redundent or extraneous invocations are tolerated
5128 */
5129#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
5130
5131
5132/**
Wink Savillec0114b32011-02-18 10:14:07 -08005133 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005134 *
Wink Savillec0114b32011-02-18 10:14:07 -08005135 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005136 *
5137 * Callee will invoke the following requests on main thread:
5138 *
Wink Savillec0114b32011-02-18 10:14:07 -08005139 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005140 * RIL_REQUEST_OPERATOR
5141 *
5142 * "data" is NULL
5143 *
5144 * FIXME should this happen when SIM records are loaded? (eg, for
5145 * EONS)
5146 */
Wink Savillec0114b32011-02-18 10:14:07 -08005147#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005148
5149/**
5150 * RIL_UNSOL_RESPONSE_NEW_SMS
5151 *
5152 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07005153 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005154 * "data" is const char *
5155 * This is a pointer to a string containing the PDU of an SMS-DELIVER
5156 * as an ascii string of hex digits. The PDU starts with the SMSC address
5157 * per TS 27.005 (+CMT:)
5158 *
5159 * Callee will subsequently confirm the receipt of thei SMS with a
5160 * RIL_REQUEST_SMS_ACKNOWLEDGE
5161 *
Wink Saville7f856802009-06-09 10:23:37 -07005162 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005163 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5164 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5165 */
5166
5167#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
5168
5169/**
5170 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
5171 *
5172 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07005173 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005174 * "data" is const char *
5175 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
5176 * as an ascii string of hex digits. The PDU starts with the SMSC address
5177 * per TS 27.005 (+CDS:).
5178 *
5179 * Callee will subsequently confirm the receipt of the SMS with a
5180 * RIL_REQUEST_SMS_ACKNOWLEDGE
5181 *
Wink Saville7f856802009-06-09 10:23:37 -07005182 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005183 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5184 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5185 */
5186
5187#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
5188
5189/**
5190 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
5191 *
5192 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07005193 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005194 * "data" is const int *
5195 * ((const int *)data)[0] contains the slot index on the SIM that contains
5196 * the new message
5197 */
5198
5199#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
5200
5201/**
5202 * RIL_UNSOL_ON_USSD
5203 *
5204 * Called when a new USSD message is received.
5205 *
5206 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07005207 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005208 * one of these string values:
5209 * "0" USSD-Notify -- text in ((const char **)data)[1]
5210 * "1" USSD-Request -- text in ((const char **)data)[1]
5211 * "2" Session terminated by network
5212 * "3" other local client (eg, SIM Toolkit) has responded
5213 * "4" Operation not supported
5214 * "5" Network timeout
5215 *
5216 * The USSD session is assumed to persist if the type code is "1", otherwise
5217 * the current session (if any) is assumed to have terminated.
5218 *
5219 * ((const char **)data)[1] points to a message string if applicable, which
5220 * should always be in UTF-8.
5221 */
5222#define RIL_UNSOL_ON_USSD 1006
5223/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
5224
5225/**
5226 * RIL_UNSOL_ON_USSD_REQUEST
5227 *
5228 * Obsolete. Send via RIL_UNSOL_ON_USSD
5229 */
Wink Saville7f856802009-06-09 10:23:37 -07005230#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005231
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005232/**
5233 * RIL_UNSOL_NITZ_TIME_RECEIVED
5234 *
5235 * Called when radio has received a NITZ time message
5236 *
5237 * "data" is const char * pointing to NITZ time string
5238 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
5239 */
5240#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
5241
5242/**
5243 * RIL_UNSOL_SIGNAL_STRENGTH
5244 *
5245 * Radio may report signal strength rather han have it polled.
5246 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005247 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005248 */
5249#define RIL_UNSOL_SIGNAL_STRENGTH 1009
5250
5251
5252/**
Wink Savillef4c4d362009-04-02 01:37:03 -07005253 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005254 *
Wink Savillec0114b32011-02-18 10:14:07 -08005255 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07005256 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
5257 * of current data contexts including new contexts that have been
5258 * activated. A data call is only removed from this list when the
5259 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
5260 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005261 *
Wink Savillef4c4d362009-04-02 01:37:03 -07005262 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005263 */
5264
Wink Savillef4c4d362009-04-02 01:37:03 -07005265#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005266
5267/**
5268 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
5269 *
5270 * Reports supplementary service related notification from the network.
5271 *
5272 * "data" is a const RIL_SuppSvcNotification *
5273 *
5274 */
5275
5276#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
5277
5278/**
5279 * RIL_UNSOL_STK_SESSION_END
5280 *
5281 * Indicate when STK session is terminated by SIM.
5282 *
5283 * "data" is NULL
5284 */
5285#define RIL_UNSOL_STK_SESSION_END 1012
5286
5287/**
5288 * RIL_UNSOL_STK_PROACTIVE_COMMAND
5289 *
5290 * Indicate when SIM issue a STK proactive command to applications
5291 *
5292 * "data" is a const char * containing SAT/USAT proactive command
5293 * in hexadecimal format string starting with command tag
5294 *
5295 */
5296#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
5297
5298/**
5299 * RIL_UNSOL_STK_EVENT_NOTIFY
5300 *
5301 * Indicate when SIM notifies applcations some event happens.
5302 * Generally, application does not need to have any feedback to
5303 * SIM but shall be able to indicate appropriate messages to users.
5304 *
5305 * "data" is a const char * containing SAT/USAT commands or responses
5306 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
5307 * starting with first byte of response data or command tag
5308 *
5309 */
5310#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
5311
5312/**
5313 * RIL_UNSOL_STK_CALL_SETUP
5314 *
5315 * Indicate when SIM wants application to setup a voice call.
5316 *
5317 * "data" is const int *
5318 * ((const int *)data)[0] contains timeout value (in milliseconds)
5319 */
5320#define RIL_UNSOL_STK_CALL_SETUP 1015
5321
5322/**
5323 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
5324 *
5325 * Indicates that SMS storage on the SIM is full. Sent when the network
5326 * attempts to deliver a new SMS message. Messages cannot be saved on the
5327 * SIM until space is freed. In particular, incoming Class 2 messages
5328 * cannot be stored.
5329 *
5330 * "data" is null
5331 *
5332 */
5333#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
5334
5335/**
5336 * RIL_UNSOL_SIM_REFRESH
5337 *
5338 * Indicates that file(s) on the SIM have been updated, or the SIM
5339 * has been reinitialized.
5340 *
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005341 * In the case where RIL is version 6 or older:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005342 * "data" is an int *
5343 * ((int *)data)[0] is a RIL_SimRefreshResult.
5344 * ((int *)data)[1] is the EFID of the updated file if the result is
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005345 * SIM_FILE_UPDATE or NULL for any other result.
5346 *
5347 * In the case where RIL is version 7:
5348 * "data" is a RIL_SimRefreshResponse_v7 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005349 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005350 * Note: If the SIM state changes as a result of the SIM refresh (eg,
5351 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005352 * should be sent.
5353 */
5354#define RIL_UNSOL_SIM_REFRESH 1017
5355
5356/**
5357 * RIL_UNSOL_CALL_RING
5358 *
5359 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07005360 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
5361 * of a call and sending multiple is optional. If the system property
5362 * ro.telephony.call_ring.multiple is false then the upper layers
5363 * will generate the multiple events internally. Otherwise the vendor
5364 * ril must generate multiple RIL_UNSOL_CALL_RING if
5365 * ro.telephony.call_ring.multiple is true or if it is absent.
5366 *
5367 * The rate of these events is controlled by ro.telephony.call_ring.delay
5368 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005369 *
Wink Saville3d54e742009-05-18 18:00:44 -07005370 * "data" is null for GSM
5371 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005372 */
5373#define RIL_UNSOL_CALL_RING 1018
5374
The Android Open Source Project34a51082009-03-05 14:34:37 -08005375/**
5376 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5377 *
5378 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07005379 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005380 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07005381
The Android Open Source Project34a51082009-03-05 14:34:37 -08005382 * "data" is null
5383 */
5384#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
5385
5386/**
5387 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
5388 *
5389 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07005390 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005391 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07005392 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005393 * Callee will subsequently confirm the receipt of the SMS with
5394 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07005395 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005396 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
5397 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07005398 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005399 */
5400#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
5401
5402/**
5403 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
5404 *
5405 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07005406 *
Henrik Hall0eba2022010-11-25 10:20:56 +01005407 * "data" can be one of the following:
5408 * If received from GSM network, "data" is const char of 88 bytes
5409 * which indicates each page of a CBS Message sent to the MS by the
5410 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
5411 * If received from UMTS network, "data" is const char of 90 up to 1252
5412 * bytes which contain between 1 and 15 CBS Message pages sent as one
5413 * 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 -07005414 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005415 */
5416#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07005417
The Android Open Source Project34a51082009-03-05 14:34:37 -08005418/**
5419 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
5420 *
5421 * Indicates that SMS storage on the RUIM is full. Messages
5422 * cannot be saved on the RUIM until space is freed.
5423 *
5424 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07005425 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005426 */
Wink Savillef4c4d362009-04-02 01:37:03 -07005427#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
5428
The Android Open Source Project34a51082009-03-05 14:34:37 -08005429/**
5430 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
5431 *
5432 * Indicates a restricted state change (eg, for Domain Specific Access Control).
5433 *
5434 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
5435 *
5436 * "data" is an int *
5437 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
5438 */
5439#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
5440
Wink Saville1b5fd232009-04-22 14:50:00 -07005441/**
5442 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
5443 *
5444 * Indicates that the radio system selection module has
5445 * autonomously entered emergency callback mode.
5446 *
5447 * "data" is null
5448 *
5449 */
5450#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08005451
Wink Saville1b5fd232009-04-22 14:50:00 -07005452/**
5453 * RIL_UNSOL_CDMA_CALL_WAITING
5454 *
5455 * Called when CDMA radio receives a call waiting indication.
5456 *
5457 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07005458 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005459 */
5460#define RIL_UNSOL_CDMA_CALL_WAITING 1025
5461
5462/**
5463 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
5464 *
5465 * Called when CDMA radio receives an update of the progress of an
5466 * OTASP/OTAPA call.
5467 *
5468 * "data" is const int *
5469 * For CDMA this is an integer OTASP/OTAPA status listed in
5470 * RIL_CDMA_OTA_ProvisionStatus.
5471 *
5472 */
5473#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
5474
5475/**
5476 * RIL_UNSOL_CDMA_INFO_REC
5477 *
5478 * Called when CDMA radio receives one or more info recs.
5479 *
5480 * "data" is const RIL_CDMA_InformationRecords *
5481 *
5482 */
5483#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08005484
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07005485/**
5486 * RIL_UNSOL_OEM_HOOK_RAW
5487 *
5488 * This is for OEM specific use.
5489 *
5490 * "data" is a byte[]
5491 */
5492#define RIL_UNSOL_OEM_HOOK_RAW 1028
5493
John Wang5d621da2009-09-18 17:17:48 -07005494/**
5495 * RIL_UNSOL_RINGBACK_TONE
5496 *
5497 * Indicates that nework doesn't have in-band information, need to
5498 * play out-band tone.
5499 *
5500 * "data" is an int *
5501 * ((int *)data)[0] == 0 for stop play ringback tone.
5502 * ((int *)data)[0] == 1 for start play ringback tone.
5503 */
5504#define RIL_UNSOL_RINGBACK_TONE 1029
5505
John Wang5909cf82010-01-29 00:18:54 -08005506/**
5507 * RIL_UNSOL_RESEND_INCALL_MUTE
5508 *
5509 * Indicates that framework/application need reset the uplink mute state.
5510 *
5511 * There may be situations where the mute state becomes out of sync
5512 * between the application and device in some GSM infrastructures.
5513 *
5514 * "data" is null
5515 */
5516#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08005517
5518/**
5519 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
5520 *
5521 * Called when CDMA subscription source changed.
5522 *
5523 * "data" is int *
5524 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
5525 */
Wink Saville29487ef2011-04-15 09:15:31 -07005526#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08005527
5528/**
5529 * RIL_UNSOL_CDMA_PRL_CHANGED
5530 *
5531 * Called when PRL (preferred roaming list) changes.
5532 *
5533 * "data" is int *
5534 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
5535 */
5536#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
5537
5538/**
5539 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
5540 *
5541 * Called when Emergency Callback Mode Ends
5542 *
5543 * Indicates that the radio system selection module has
5544 * proactively exited emergency callback mode.
5545 *
5546 * "data" is NULL
5547 *
5548 */
5549#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
5550
Wink Saville5b9df332011-04-06 16:24:21 -07005551/**
5552 * RIL_UNSOL_RIL_CONNECTED
5553 *
5554 * Called the ril connects and returns the version
5555 *
5556 * "data" is int *
5557 * ((int *)data)[0] is RIL_VERSION
5558 */
5559#define RIL_UNSOL_RIL_CONNECTED 1034
5560
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005561/**
5562 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
5563 *
5564 * Indicates that voice technology has changed. Contains new radio technology
5565 * as a data in the message.
5566 *
5567 * "data" is int *
5568 * ((int *)data)[0] is of type const RIL_RadioTechnology
5569 *
5570 */
5571#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
5572
Wink Saville8a9e0212013-04-09 12:11:38 -07005573/**
5574 * RIL_UNSOL_CELL_INFO_LIST
5575 *
5576 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
5577 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
5578 *
5579 * "data" is NULL
5580 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08005581 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07005582 */
5583#define RIL_UNSOL_CELL_INFO_LIST 1036
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005584
Wink Saville865ce3b2013-11-08 16:37:01 -08005585/**
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005586 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
5587 *
5588 * Called when IMS registration state has changed
5589 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005590 * To get IMS registration state and IMS SMS format, callee needs to invoke the
5591 * following request on main thread:
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005592 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005593 * RIL_REQUEST_IMS_REGISTRATION_STATE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005594 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005595 * "data" is NULL
5596 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005597 */
5598#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
5599
Etan Cohend3652192014-06-20 08:28:44 -07005600/**
5601 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
5602 *
5603 * Indicated when there is a change in subscription status.
5604 * This event will be sent in the following scenarios
5605 * - subscription readiness at modem, which was selected by telephony layer
5606 * - when subscription is deactivated by modem due to UICC card removal
5607 * - When network invalidates the subscription i.e. attach reject due to authentication reject
5608 *
5609 * "data" is const int *
5610 * ((const int *)data)[0] == 0 for Subscription Deactivated
5611 * ((const int *)data)[0] == 1 for Subscription Activated
5612 *
5613 */
5614#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
5615
5616/**
5617 * RIL_UNSOL_SRVCC_STATE_NOTIFY
5618 *
5619 * Called when Single Radio Voice Call Continuity(SRVCC)
5620 * progress state has changed
5621 *
5622 * "data" is int *
5623 * ((int *)data)[0] is of type const RIL_SrvccState
5624 *
5625 */
5626
5627#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
5628
5629/**
5630 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
5631 *
5632 * Called when the hardware configuration associated with the RILd changes
5633 *
5634 * "data" is an array of RIL_HardwareConfig
5635 *
5636 */
5637#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
5638
Wink Savillec29360a2014-07-13 05:17:28 -07005639/**
5640 * RIL_UNSOL_DC_RT_INFO_CHANGED
5641 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005642 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005643 * Sent when the DC_RT_STATE changes but the time
5644 * between these messages must not be less than the
5645 * value set by RIL_REQUEST_SET_DC_RT_RATE.
5646 *
5647 * "data" is the most recent RIL_DcRtInfo
5648 *
5649 */
5650#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
5651
Wink Saville8b4e4f72014-10-17 15:01:45 -07005652/**
5653 * RIL_UNSOL_RADIO_CAPABILITY
5654 *
5655 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
5656 * Returns the phone radio capability exactly as
5657 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
5658 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
5659 *
5660 * "data" is the RIL_RadioCapability structure
5661 */
5662#define RIL_UNSOL_RADIO_CAPABILITY 1042
5663
Amit Mahajan54563d32014-11-22 00:54:49 +00005664/*
5665 * RIL_UNSOL_ON_SS
5666 *
5667 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
5668 * call control.
5669 *
5670 * "data" is const RIL_StkCcUnsolSsResponse *
5671 *
5672 */
5673#define RIL_UNSOL_ON_SS 1043
5674
5675/**
5676 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
5677 *
5678 * Called when there is an ALPHA from UICC during Call Control.
5679 *
5680 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
5681 *
5682 */
5683#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
5684
fengluf7408292015-04-14 14:53:55 -07005685/**
5686 * RIL_UNSOL_LCEDATA_RECV
5687 *
5688 * Called when there is an incoming Link Capacity Estimate (LCE) info report.
5689 *
fenglu290add32015-05-01 17:05:15 -07005690 * "data" is the RIL_LceDataInfo structure.
fengluf7408292015-04-14 14:53:55 -07005691 *
5692 */
5693#define RIL_UNSOL_LCEDATA_RECV 1045
5694
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005695/***********************************************************************/
5696
Amit Mahajan54563d32014-11-22 00:54:49 +00005697
Etan Cohend3652192014-06-20 08:28:44 -07005698#if defined(ANDROID_MULTI_SIM)
5699/**
5700 * RIL_Request Function pointer
5701 *
5702 * @param request is one of RIL_REQUEST_*
5703 * @param data is pointer to data defined for that RIL_REQUEST_*
5704 * data is owned by caller, and should not be modified or freed by callee
5705 * @param t should be used in subsequent call to RIL_onResponse
5706 * @param datalen the length of data
5707 *
5708 */
5709typedef void (*RIL_RequestFunc) (int request, void *data,
5710 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
5711
5712/**
5713 * This function should return the current radio state synchronously
5714 */
5715typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
5716
5717#else
5718/* Backward compatible */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005719
5720/**
5721 * RIL_Request Function pointer
5722 *
5723 * @param request is one of RIL_REQUEST_*
5724 * @param data is pointer to data defined for that RIL_REQUEST_*
5725 * data is owned by caller, and should not be modified or freed by callee
5726 * @param t should be used in subsequent call to RIL_onResponse
5727 * @param datalen the length of data
5728 *
5729 */
Wink Saville7f856802009-06-09 10:23:37 -07005730typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005731 size_t datalen, RIL_Token t);
5732
5733/**
5734 * This function should return the current radio state synchronously
5735 */
5736typedef RIL_RadioState (*RIL_RadioStateRequest)();
5737
Etan Cohend3652192014-06-20 08:28:44 -07005738#endif
5739
5740
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005741/**
5742 * This function returns "1" if the specified RIL_REQUEST code is
5743 * supported and 0 if it is not
5744 *
5745 * @param requestCode is one of RIL_REQUEST codes
5746 */
5747
5748typedef int (*RIL_Supports)(int requestCode);
5749
5750/**
Wink Saville7f856802009-06-09 10:23:37 -07005751 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005752 * thread that calls RIL_RequestFunc--and indicates that a pending
5753 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07005754 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005755 * On cancel, the callee should do its best to abandon the request and
5756 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
5757 *
5758 * Subsequent calls to RIL_onRequestComplete for this request with
5759 * other results will be tolerated but ignored. (That is, it is valid
5760 * to ignore the cancellation request)
5761 *
5762 * RIL_Cancel calls should return immediately, and not wait for cancellation
5763 *
Wink Saville7f856802009-06-09 10:23:37 -07005764 * 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 -08005765 * interface
5766 *
5767 * @param t token wants to be canceled
5768 */
5769
5770typedef void (*RIL_Cancel)(RIL_Token t);
5771
5772typedef void (*RIL_TimedCallback) (void *param);
5773
5774/**
5775 * Return a version string for your RIL implementation
5776 */
5777typedef const char * (*RIL_GetVersion) (void);
5778
5779typedef struct {
5780 int version; /* set to RIL_VERSION */
5781 RIL_RequestFunc onRequest;
5782 RIL_RadioStateRequest onStateRequest;
5783 RIL_Supports supports;
5784 RIL_Cancel onCancel;
5785 RIL_GetVersion getVersion;
5786} RIL_RadioFunctions;
5787
Sungmin Choi75697532013-04-26 15:04:45 -07005788typedef struct {
5789 char *apn;
5790 char *protocol;
5791 int authtype;
5792 char *username;
5793 char *password;
5794} RIL_InitialAttachApn;
5795
Amit Mahajan2b772032014-06-26 14:20:11 -07005796typedef struct {
5797 int authContext; /* P2 value of authentication command, see P2 parameter in
5798 3GPP TS 31.102 7.1.2 */
5799 char *authData; /* the challenge string in Base64 format, see 3GPP
5800 TS 31.102 7.1.2 */
5801 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
5802 NULL if no value. */
5803} RIL_SimAuthentication;
5804
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005805#ifdef RIL_SHLIB
5806struct RIL_Env {
5807 /**
5808 * "t" is parameter passed in on previous call to RIL_Notification
5809 * routine.
5810 *
5811 * If "e" != SUCCESS, then response can be null/is ignored
5812 *
Wink Saville7f856802009-06-09 10:23:37 -07005813 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005814 * freed by callee
5815 *
5816 * RIL_onRequestComplete will return as soon as possible
5817 */
Wink Saville7f856802009-06-09 10:23:37 -07005818 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005819 void *response, size_t responselen);
5820
Etan Cohend3652192014-06-20 08:28:44 -07005821#if defined(ANDROID_MULTI_SIM)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005822 /**
5823 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5824 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5825 *
5826 * "data" is owned by caller, and should not be modified or freed by callee
5827 */
Etan Cohend3652192014-06-20 08:28:44 -07005828 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
5829#else
5830 /**
5831 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5832 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5833 *
5834 * "data" is owned by caller, and should not be modified or freed by callee
5835 */
5836 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
5837#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005838 /**
Wink Saville7f856802009-06-09 10:23:37 -07005839 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005840 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
5841 * a relative time value at which the callback is invoked. If relativeTime is
5842 * NULL or points to a 0-filled structure, the callback will be invoked as
5843 * soon as possible
5844 */
5845
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07005846 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07005847 void *param, const struct timeval *relativeTime);
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005848 /**
5849 * "t" is parameter passed in on previous call RIL_Notification routine
5850 *
5851 * RIL_onRequestAck will be called by vendor when an Async RIL request was received
5852 * by them and an ack needs to be sent back to java ril.
5853 */
5854 void (*OnRequestAck) (RIL_Token t);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005855};
5856
5857
Wink Saville7f856802009-06-09 10:23:37 -07005858/**
5859 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005860 * argc and argv will be command line arguments intended for the RIL implementation
5861 * Return NULL on error
5862 *
5863 * @param env is environment point defined as RIL_Env
5864 * @param argc number of arguments
5865 * @param argv list fo arguments
5866 *
5867 */
5868const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
5869
5870#else /* RIL_SHLIB */
5871
5872/**
5873 * Call this once at startup to register notification routine
5874 *
5875 * @param callbacks user-specifed callback function
5876 */
5877void RIL_register (const RIL_RadioFunctions *callbacks);
5878
5879
5880/**
5881 *
5882 * RIL_onRequestComplete will return as soon as possible
5883 *
5884 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07005885 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005886 * @param e error code
5887 * if "e" != SUCCESS, then response can be null/is ignored
5888 * @param response is owned by caller, and should not be modified or
5889 * freed by callee
5890 * @param responselen the length of response in byte
5891 */
Wink Saville7f856802009-06-09 10:23:37 -07005892void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005893 void *response, size_t responselen);
5894
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005895/**
5896 * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and
5897 * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's
5898 * results, just that the command was received and will take a while. After sending this Ack
5899 * its vendor's responsibility to make sure that AP is up whenever needed while command is
5900 * being processed.
5901 *
5902 * @param t is parameter passed in on previous call to RIL_Notification
5903 * routine.
5904 */
5905void RIL_onRequestAck(RIL_Token t);
5906
Etan Cohend3652192014-06-20 08:28:44 -07005907#if defined(ANDROID_MULTI_SIM)
5908/**
5909 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
5910 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5911 * "data" is owned by caller, and should not be modified or freed by callee
5912 * @param datalen the length of data in byte
5913 */
5914
5915void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
5916 size_t datalen, RIL_SOCKET_ID socket_id);
5917#else
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005918/**
5919 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
5920 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5921 * "data" is owned by caller, and should not be modified or freed by callee
5922 * @param datalen the length of data in byte
5923 */
5924
Wink Saville7f856802009-06-09 10:23:37 -07005925void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005926 size_t datalen);
Etan Cohend3652192014-06-20 08:28:44 -07005927#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005928
5929/**
Wink Saville7f856802009-06-09 10:23:37 -07005930 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005931 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
5932 * a relative time value at which the callback is invoked. If relativeTime is
5933 * NULL or points to a 0-filled structure, the callback will be invoked as
5934 * soon as possible
5935 *
5936 * @param callback user-specifed callback function
5937 * @param param parameter list
5938 * @param relativeTime a relative time value at which the callback is invoked
5939 */
5940
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07005941void RIL_requestTimedCallback (RIL_TimedCallback callback,
5942 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005943
5944
5945#endif /* RIL_SHLIB */
5946
5947#ifdef __cplusplus
5948}
5949#endif
5950
5951#endif /*ANDROID_RIL_H*/