blob: 342377d140347dd5155072135d0cb8bdc6c3d735 [file] [log] [blame]
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001/*
2 * Copyright (C) 2006 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Wink Saville7f856802009-06-09 10:23:37 -070017#ifndef ANDROID_RIL_H
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080018#define ANDROID_RIL_H 1
19
20#include <stdlib.h>
Wink Saville8a9e0212013-04-09 12:11:38 -070021#include <stdint.h>
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -070022#include <telephony/ril_cdma_sms.h>
Jake Hamby8a4a2332014-01-15 13:12:05 -080023#include <telephony/ril_nv_items.h>
Etan Cohend3652192014-06-20 08:28:44 -070024#include <telephony/ril_msim.h>
Jake Hamby8a4a2332014-01-15 13:12:05 -080025
Wink Savillef4c4d362009-04-02 01:37:03 -070026#ifndef FEATURE_UNIT_TEST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080027#include <sys/time.h>
Wink Savillef4c4d362009-04-02 01:37:03 -070028#endif /* !FEATURE_UNIT_TEST */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080029
30#ifdef __cplusplus
31extern "C" {
32#endif
33
Etan Cohend3652192014-06-20 08:28:44 -070034
35#if defined(ANDROID_SIM_COUNT_2)
36#define SIM_COUNT 2
37#elif defined(ANDROID_SIM_COUNT_3)
38#define SIM_COUNT 3
39#elif defined(ANDROID_SIM_COUNT_4)
40#define SIM_COUNT 4
41#else
42#define SIM_COUNT 1
43#endif
44
45#ifndef ANDROID_MULTI_SIM
46#define SIM_COUNT 1
47#endif
48
Sanket Padawe88cf6a52016-01-11 12:45:43 -080049/*
50 * RIL version.
51 * Value of RIL_VERSION should not be changed in future. Here onwards,
52 * when a new change is supposed to be introduced which could involve new
53 * schemes added like Wakelocks, data structures added/updated, etc, we would
54 * just document RIL version associated with that change below. When OEM updates its
55 * RIL with those changes, they would return that new RIL version during RIL_REGISTER.
56 * We should make use of the returned version by vendor to identify appropriate scheme
57 * or data structure version to use.
58 *
59 * Documentation of RIL version and associated changes
Sanket Padawef53c5fa2016-01-27 10:00:38 -080060 * RIL_VERSION = 12 : This version corresponds to updated data structures namely
Sanket Padawe88cf6a52016-01-11 12:45:43 -080061 * RIL_Data_Call_Response_v11, RIL_SIM_IO_v6, RIL_CardStatus_v6,
62 * RIL_SimRefreshResponse_v7, RIL_CDMA_CallWaiting_v6,
Sanket Padawe6ff9a872016-01-27 15:09:12 -080063 * RIL_LTE_SignalStrength_v8, RIL_SignalStrength_v10, RIL_CellIdentityGsm_v12
64 * RIL_CellIdentityWcdma_v12, RIL_CellIdentityLte_v12,RIL_CellInfoGsm_v12,
65 * RIL_CellInfoWcdma_v12, RIL_CellInfoLte_v12, RIL_CellInfo_v12.
Sanket Padawe88cf6a52016-01-11 12:45:43 -080066 *
Sanket Padawe6ff9a872016-01-27 15:09:12 -080067 * RIL_VERSION = 13 : This version includes new wakelock semantics and as the first
Robert Greenwalt27e99c52016-06-01 16:31:38 -070068 * strongly versioned version it enforces structure use.
69 * RIL_VERSION = 14 : New data structures are added, namely RIL_CarrierMatchType,
70 * RIL_Carrier, RIL_CarrierRestrictions and RIL_PCO_Data.
71 * New commands added: RIL_REQUEST_SET_CARRIER_RESTRICTIONS,
Naveen Kalla90ddf072016-09-14 13:41:04 -070072 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS and RIL_UNSOL_PCO_DATA.
73 * RIL_VERSION = 15 : New commands added: RIL_UNSOL_MODEM_RESTART
Sanket Padawe88cf6a52016-01-11 12:45:43 -080074 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -080075#define RIL_VERSION 12
76#define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
Alex Yakavenka45e740e2012-01-31 11:48:27 -080077#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080078
Wink Savillea592eeb2009-05-22 13:26:36 -070079#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
80#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
81
Etan Cohend3652192014-06-20 08:28:44 -070082#define MAX_RILDS 3
83#define MAX_SOCKET_NAME_LENGTH 6
84#define MAX_CLIENT_ID_LENGTH 2
85#define MAX_DEBUG_SOCKET_NAME_LENGTH 12
86#define MAX_QEMU_PIPE_NAME_LENGTH 11
Wink Saville8b4e4f72014-10-17 15:01:45 -070087#define MAX_UUID_LENGTH 64
88
Etan Cohend3652192014-06-20 08:28:44 -070089
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080090typedef void * RIL_Token;
91
92typedef enum {
Etan Cohend3652192014-06-20 08:28:44 -070093 RIL_SOCKET_1,
94#if (SIM_COUNT >= 2)
95 RIL_SOCKET_2,
96#if (SIM_COUNT >= 3)
97 RIL_SOCKET_3,
98#endif
99#if (SIM_COUNT >= 4)
100 RIL_SOCKET_4,
101#endif
102#endif
103 RIL_SOCKET_NUM
104} RIL_SOCKET_ID;
105
106
107typedef enum {
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800108 RIL_E_SUCCESS = 0,
109 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
110 RIL_E_GENERIC_FAILURE = 2,
111 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
112 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
113 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
114 RIL_E_REQUEST_NOT_SUPPORTED = 6,
115 RIL_E_CANCELLED = 7,
116 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
117 call on a Class C GPRS device */
118 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
119 registers in network */
Wink Saville3d54e742009-05-18 18:00:44 -0700120 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
121 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
122 shall be retrieved because of SIM or RUIM
Wink Savillef4c4d362009-04-02 01:37:03 -0700123 card absent */
Wink Saville3d54e742009-05-18 18:00:44 -0700124 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
Wink Savillef4c4d362009-04-02 01:37:03 -0700125 location */
jsh602f80f2009-07-10 15:44:37 -0700126 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
John Wang75534472010-04-20 15:11:42 -0700127 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800128 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
John Wang75534472010-04-20 15:11:42 -0700129 illegal SIM or ME */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800130 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
Amit Mahajan54563d32014-11-22 00:54:49 +0000131 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
132 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
133 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
134 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
135 data */
136 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
137 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
138 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
139 request */
140 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
141 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
142 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
fengluf7408292015-04-14 14:53:55 -0700143 RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800144 RIL_E_LCE_NOT_SUPPORTED = 36, /* LCE service not supported(36 in RILConstants.java) */
145 RIL_E_NO_MEMORY = 37, /* Not sufficient memory to process the request */
146 RIL_E_INTERNAL_ERR = 38, /* Hit unexpected vendor internal error scenario */
147 RIL_E_SYSTEM_ERR = 39, /* Hit platform or system error */
148 RIL_E_MODEM_ERR = 40, /* Hit unexpected modem error */
Ajay Nambi10345892016-03-19 09:02:28 -0700149 RIL_E_INVALID_STATE = 41, /* Unexpected request for the current state */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800150 RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */
151 RIL_E_SIM_ERR = 43, /* Received error from SIM card */
152 RIL_E_INVALID_ARGUMENTS = 44, /* Received invalid arguments in request */
153 RIL_E_INVALID_SIM_STATE = 45, /* Can not process the request in current SIM state */
154 RIL_E_INVALID_MODEM_STATE = 46, /* Can not process the request in current Modem state */
155 RIL_E_INVALID_CALL_ID = 47, /* Received invalid call id in request */
156 RIL_E_NO_SMS_TO_ACK = 48, /* ACK received when there is no SMS to ack */
Nathan Haroldc97b2842016-02-02 12:04:35 -0800157 RIL_E_NETWORK_ERR = 49, /* Received error from network */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800158 RIL_E_REQUEST_RATE_LIMITED = 50, /* Operation denied due to overly-frequent requests */
twen.changdf7add02016-03-04 18:27:48 +0800159 RIL_E_SIM_BUSY = 51, /* SIM is busy */
160 RIL_E_SIM_FULL = 52, /* The target EF is full */
161 RIL_E_NETWORK_REJECT = 53, /* Request is rejected by network */
162 RIL_E_OPERATION_NOT_ALLOWED = 54, /* Not allowed the request now */
163 RIL_E_EMPTY_RECORD = 55, /* The request record is empty */
Ajay Nambi68900f52016-03-11 12:02:55 -0800164 RIL_E_INVALID_SMS_FORMAT = 56, /* Invalid sms format */
165 RIL_E_ENCODING_ERR = 57, /* Message not encoded properly */
166 RIL_E_INVALID_SMSC_ADDRESS = 58, /* SMSC address specified is invalid */
167 RIL_E_NO_SUCH_ENTRY = 59, /* No such entry present to perform the request */
168 RIL_E_NETWORK_NOT_READY = 60, /* Network is not ready to perform the request */
169 RIL_E_NOT_PROVISIONED = 61, /* Device doesnot have this value provisioned */
Ajay Nambi10345892016-03-19 09:02:28 -0700170 RIL_E_NO_SUBSCRIPTION = 62, /* Device doesnot have subscription */
171 RIL_E_NO_NETWORK_FOUND = 63, /* Network cannot be found */
172 RIL_E_DEVICE_IN_USE = 64, /* Operation cannot be performed because the device
173 is currently in use */
174 RIL_E_ABORTED = 65, /* Operation aborted */
Sanket Padawe85f952a2017-01-02 23:46:00 -0800175 RIL_E_INVALID_RESPONSE = 66, /* Invalid response sent by vendor code */
Sanket Padawe0106aed2016-02-09 09:56:31 -0800176 // OEM specific error codes. To be used by OEM when they don't want to reveal
177 // specific error codes which would be replaced by Generic failure.
178 RIL_E_OEM_ERROR_1 = 501,
179 RIL_E_OEM_ERROR_2 = 502,
180 RIL_E_OEM_ERROR_3 = 503,
181 RIL_E_OEM_ERROR_4 = 504,
182 RIL_E_OEM_ERROR_5 = 505,
183 RIL_E_OEM_ERROR_6 = 506,
184 RIL_E_OEM_ERROR_7 = 507,
185 RIL_E_OEM_ERROR_8 = 508,
186 RIL_E_OEM_ERROR_9 = 509,
187 RIL_E_OEM_ERROR_10 = 510,
188 RIL_E_OEM_ERROR_11 = 511,
189 RIL_E_OEM_ERROR_12 = 512,
190 RIL_E_OEM_ERROR_13 = 513,
191 RIL_E_OEM_ERROR_14 = 514,
192 RIL_E_OEM_ERROR_15 = 515,
193 RIL_E_OEM_ERROR_16 = 516,
194 RIL_E_OEM_ERROR_17 = 517,
195 RIL_E_OEM_ERROR_18 = 518,
196 RIL_E_OEM_ERROR_19 = 519,
197 RIL_E_OEM_ERROR_20 = 520,
198 RIL_E_OEM_ERROR_21 = 521,
199 RIL_E_OEM_ERROR_22 = 522,
200 RIL_E_OEM_ERROR_23 = 523,
201 RIL_E_OEM_ERROR_24 = 524,
202 RIL_E_OEM_ERROR_25 = 525
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800203} RIL_Errno;
204
205typedef enum {
206 RIL_CALL_ACTIVE = 0,
207 RIL_CALL_HOLDING = 1,
208 RIL_CALL_DIALING = 2, /* MO call only */
209 RIL_CALL_ALERTING = 3, /* MO call only */
210 RIL_CALL_INCOMING = 4, /* MT call only */
211 RIL_CALL_WAITING = 5 /* MT call only */
212} RIL_CallState;
213
214typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -0700215 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
216 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800217 RADIO_STATE_ON = 10 /* Radio is on */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800218} RIL_RadioState;
219
Wink Saville43808972011-01-13 17:39:51 -0800220typedef enum {
221 RADIO_TECH_UNKNOWN = 0,
222 RADIO_TECH_GPRS = 1,
223 RADIO_TECH_EDGE = 2,
224 RADIO_TECH_UMTS = 3,
225 RADIO_TECH_IS95A = 4,
226 RADIO_TECH_IS95B = 5,
227 RADIO_TECH_1xRTT = 6,
228 RADIO_TECH_EVDO_0 = 7,
229 RADIO_TECH_EVDO_A = 8,
230 RADIO_TECH_HSDPA = 9,
231 RADIO_TECH_HSUPA = 10,
232 RADIO_TECH_HSPA = 11,
233 RADIO_TECH_EVDO_B = 12,
234 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800235 RADIO_TECH_LTE = 14,
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800236 RADIO_TECH_HSPAP = 15, // HSPA+
Etan Cohend3652192014-06-20 08:28:44 -0700237 RADIO_TECH_GSM = 16, // Only supports voice
Yashdev Singh3c8f37c2015-02-23 13:04:28 -0800238 RADIO_TECH_TD_SCDMA = 17,
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700239 RADIO_TECH_IWLAN = 18,
240 RADIO_TECH_LTE_CA = 19
Wink Saville43808972011-01-13 17:39:51 -0800241} RIL_RadioTechnology;
242
Wink Saville8b4e4f72014-10-17 15:01:45 -0700243typedef enum {
244 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
245 RAF_GPRS = (1 << RADIO_TECH_GPRS),
246 RAF_EDGE = (1 << RADIO_TECH_EDGE),
247 RAF_UMTS = (1 << RADIO_TECH_UMTS),
248 RAF_IS95A = (1 << RADIO_TECH_IS95A),
249 RAF_IS95B = (1 << RADIO_TECH_IS95B),
250 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
251 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
252 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
253 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
254 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
255 RAF_HSPA = (1 << RADIO_TECH_HSPA),
256 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
257 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
258 RAF_LTE = (1 << RADIO_TECH_LTE),
259 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
260 RAF_GSM = (1 << RADIO_TECH_GSM),
261 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
Ajay Nambi6dbb43c2015-05-14 18:50:20 -0700262 RAF_LTE_CA = (1 << RADIO_TECH_LTE_CA)
Wink Saville8b4e4f72014-10-17 15:01:45 -0700263} RIL_RadioAccessFamily;
264
265typedef enum {
Nathan Harold92839f12016-02-12 10:02:28 -0800266 BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically)
267 BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
268 BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
269 BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000)
270 BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
271 BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
272 BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band)
273 BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band)
274 BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band)
275 BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band)
276 BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band)
277 BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band)
278 BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band)
279 BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band)
280 BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band)
281 BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band)
282 BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band)
283 BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band)
284 BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band)
285} RIL_RadioBandMode;
286
287typedef enum {
Wink Saville8b4e4f72014-10-17 15:01:45 -0700288 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
289 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
290 // forthcoming with these same parameters
291 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
292 // RIL_RadioCapability.status = 0, if any START's fail no
293 // APPLY will be sent
294 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
295 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
296 // occurs in any previous command the RIL_RadioAccessesFamily and
Legler Wu8caf06f2014-10-29 14:02:14 +0800297 // logicalModemUuid fields will be the prior configuration thus
Wink Saville8b4e4f72014-10-17 15:01:45 -0700298 // restoring the configuration to the previous value. An error
299 // returned by this command will generally be ignored or may
300 // cause that logical modem to be removed from service.
301} RadioCapabilityPhase;
302
303typedef enum {
304 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
305 // RC_PHASE_APPLY
306 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
307 // capability was success with RC_PHASE_FINISH
308 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
309 // capability is fail with RC_PHASE_FINISH.
310} RadioCapabilityStatus;
311
312#define RIL_RADIO_CAPABILITY_VERSION 1
313typedef struct {
Legler Wu8caf06f2014-10-29 14:02:14 +0800314 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
Wink Saville8b4e4f72014-10-17 15:01:45 -0700315 int session; // Unique session value defined by framework returned in all "responses/unsol"
316 int phase; // CONFIGURED, START, APPLY, FINISH
317 int rat; // RIL_RadioAccessFamily for the radio
318 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
319 int status; // Return status and an input parameter for RC_PHASE_FINISH
320} RIL_RadioCapability;
321
Wink Savillec0114b32011-02-18 10:14:07 -0800322// Do we want to split Data from Voice and the use
323// RIL_RadioTechnology for get/setPreferredVoice/Data ?
324typedef enum {
325 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
326 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
327 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
328 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
329 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
330 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
331 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
332 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
333 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
334 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
335 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
Uma Maheswari Ramalingam0e094872011-09-28 13:25:48 -0700336 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
Rakesh Pallerla8c20ebe2015-03-31 14:52:49 -0700337 PREF_NET_TYPE_LTE_WCDMA = 12, /* LTE/WCDMA */
338 PREF_NET_TYPE_TD_SCDMA_ONLY = 13, /* TD-SCDMA only */
339 PREF_NET_TYPE_TD_SCDMA_WCDMA = 14, /* TD-SCDMA and WCDMA */
340 PREF_NET_TYPE_TD_SCDMA_LTE = 15, /* TD-SCDMA and LTE */
341 PREF_NET_TYPE_TD_SCDMA_GSM = 16, /* TD-SCDMA and GSM */
342 PREF_NET_TYPE_TD_SCDMA_GSM_LTE = 17, /* TD-SCDMA,GSM and LTE */
343 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA = 18, /* TD-SCDMA, GSM/WCDMA */
344 PREF_NET_TYPE_TD_SCDMA_WCDMA_LTE = 19, /* TD-SCDMA, WCDMA and LTE */
345 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_LTE = 20, /* TD-SCDMA, GSM/WCDMA and LTE */
346 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_CDMA_EVDO_AUTO = 21, /* TD-SCDMA, GSM/WCDMA, CDMA and EvDo */
347 PREF_NET_TYPE_TD_SCDMA_LTE_CDMA_EVDO_GSM_WCDMA = 22 /* TD-SCDMA, LTE, CDMA, EvDo GSM/WCDMA */
Wink Savillec0114b32011-02-18 10:14:07 -0800348} RIL_PreferredNetworkType;
349
350/* Source for cdma subscription */
351typedef enum {
352 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
353 CDMA_SUBSCRIPTION_SOURCE_NV = 1
354} RIL_CdmaSubscriptionSource;
355
Wink Saville74fa3882009-12-22 15:35:41 -0800356/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
357typedef enum {
358 RIL_UUS_TYPE1_IMPLICIT = 0,
359 RIL_UUS_TYPE1_REQUIRED = 1,
360 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
361 RIL_UUS_TYPE2_REQUIRED = 3,
362 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
363 RIL_UUS_TYPE3_REQUIRED = 5,
364 RIL_UUS_TYPE3_NOT_REQUIRED = 6
365} RIL_UUS_Type;
366
367/* User-to-User Signaling Information data coding schemes. Possible values for
368 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
369 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
370typedef enum {
371 RIL_UUS_DCS_USP = 0, /* User specified protocol */
372 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
373 RIL_UUS_DCS_X244 = 2, /* X.244 */
374 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
375 convergence function */
376 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
377} RIL_UUS_DCS;
378
379/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
380 * This data is passed in RIL_ExtensionRecord and rec contains this
381 * structure when type is RIL_UUS_INFO_EXT_REC */
382typedef struct {
383 RIL_UUS_Type uusType; /* UUS Type */
384 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
385 int uusLength; /* Length of UUS Data */
386 char * uusData; /* UUS Data */
387} RIL_UUS_Info;
388
389/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700390typedef struct {
391 char isPresent; /* non-zero if signal information record is present */
392 char signalType; /* as defined 3.7.5.5-1 */
393 char alertPitch; /* as defined 3.7.5.5-2 */
394 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
395} RIL_CDMA_SignalInfoRecord;
396
Wink Saville1b5fd232009-04-22 14:50:00 -0700397typedef struct {
398 RIL_CallState state;
399 int index; /* Connection Index for use with, eg, AT+CHLD */
400 int toa; /* type of address, eg 145 = intl */
401 char isMpty; /* nonzero if is mpty call */
402 char isMT; /* nonzero if call is mobile terminated */
403 char als; /* ALS line indicator if available
404 (0 = line 1) */
405 char isVoice; /* nonzero if this is is a voice call */
406 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
407 char * number; /* Remote party number */
408 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
409 char * name; /* Remote party name */
410 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800411 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800412} RIL_Call;
413
Wink Savillec0114b32011-02-18 10:14:07 -0800414/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800415typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800416 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700417 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700418 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
419 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800420 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800421 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
422} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800423
424/*
425 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
426 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
427 */
428typedef struct {
429 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500430 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
431 back-off timer value RIL wants to override the one
432 pre-configured in FW.
433 The unit is miliseconds.
434 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700435 The value 0 means retry should be done ASAP.
Wink Saville8a9e0212013-04-09 12:11:38 -0700436 The value of INT_MAX(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800437 int cid; /* Context ID, uniquely identifies this call */
438 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
439 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
440 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
441 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
442 such as "IP" or "IPV6" */
443 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800444 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
445 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800446 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800447 one of each. If the prefix length is absent the addresses
448 are assumed to be point to point with IPv4 having a prefix
449 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800450 char * dnses; /* A space-delimited list of DNS server addresses,
451 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
452 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800453 char * gateways; /* A space-delimited list of default gateway addresses,
454 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
455 May be empty in which case the addresses represent point
456 to point connections. */
457} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800458
Etan Cohend3652192014-06-20 08:28:44 -0700459typedef struct {
460 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
461 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
462 back-off timer value RIL wants to override the one
463 pre-configured in FW.
464 The unit is miliseconds.
465 The value < 0 means no value is suggested.
466 The value 0 means retry should be done ASAP.
467 The value of INT_MAX(0x7fffffff) means no retry. */
468 int cid; /* Context ID, uniquely identifies this call */
469 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
470 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
471 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
472 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
473 such as "IP" or "IPV6" */
474 char * ifname; /* The network interface name */
475 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
476 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
477 May not be empty, typically 1 IPv4 or 1 IPv6 or
478 one of each. If the prefix length is absent the addresses
479 are assumed to be point to point with IPv4 having a prefix
480 length of 32 and IPv6 128. */
481 char * dnses; /* A space-delimited list of DNS server addresses,
482 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
483 May be empty. */
484 char * gateways; /* A space-delimited list of default gateway addresses,
485 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
486 May be empty in which case the addresses represent point
487 to point connections. */
488 char * pcscf; /* the Proxy Call State Control Function address
489 via PCO(Protocol Configuration Option) for IMS client. */
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -0700490} RIL_Data_Call_Response_v9;
491
492typedef struct {
493 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
494 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
495 back-off timer value RIL wants to override the one
496 pre-configured in FW.
497 The unit is miliseconds.
498 The value < 0 means no value is suggested.
499 The value 0 means retry should be done ASAP.
500 The value of INT_MAX(0x7fffffff) means no retry. */
501 int cid; /* Context ID, uniquely identifies this call */
502 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
503 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
504 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
505 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
506 such as "IP" or "IPV6" */
507 char * ifname; /* The network interface name */
508 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
509 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
510 May not be empty, typically 1 IPv4 or 1 IPv6 or
511 one of each. If the prefix length is absent the addresses
512 are assumed to be point to point with IPv4 having a prefix
513 length of 32 and IPv6 128. */
514 char * dnses; /* A space-delimited list of DNS server addresses,
515 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
516 May be empty. */
517 char * gateways; /* A space-delimited list of default gateway addresses,
518 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
519 May be empty in which case the addresses represent point
520 to point connections. */
521 char * pcscf; /* the Proxy Call State Control Function address
522 via PCO(Protocol Configuration Option) for IMS client. */
523 int mtu; /* MTU received from network
524 Value <= 0 means network has either not sent a value or
525 sent an invalid value */
526} RIL_Data_Call_Response_v11;
Etan Cohend3652192014-06-20 08:28:44 -0700527
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700528typedef enum {
529 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
530 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
531} RIL_RadioTechnologyFamily;
532
533typedef struct {
534 RIL_RadioTechnologyFamily tech;
535 unsigned char retry; /* 0 == not retry, nonzero == retry */
536 int messageRef; /* Valid field if retry is set to nonzero.
537 Contains messageRef from RIL_SMS_Response
538 corresponding to failed MO SMS.
539 */
540
541 union {
542 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
543 RIL_CDMA_SMS_Message* cdmaMessage;
544
545 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
Sanket Padawe05c23072016-08-08 15:42:17 -0700546 char** gsmMessage; /* This is an array of pointers where pointers
547 are contiguous but elements pointed by those pointers
548 are not contiguous
549 */
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700550 } message;
551} RIL_IMS_SMS_Message;
552
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800553typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800554 int messageRef; /* TP-Message-Reference for GSM,
555 and BearerData MessageId for CDMA
556 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800557 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700558 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
559 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
560 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800561} RIL_SMS_Response;
562
563/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
564typedef struct {
565 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
566 /* 0 = "REC UNREAD" */
567 /* 1 = "REC READ" */
568 /* 2 = "STO UNSENT" */
569 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700570 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
571 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800572 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
573 (as expected by TS 27.005) or NULL for default SMSC */
574} RIL_SMS_WriteArgs;
575
576/** Used by RIL_REQUEST_DIAL */
577typedef struct {
578 char * address;
579 int clir;
580 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
581 * clir == 0 on "use subscription default value"
582 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
583 * clir == 2 on "CLIR suppression" (allow CLI presentation)
584 */
Wink Saville74fa3882009-12-22 15:35:41 -0800585 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800586} RIL_Dial;
587
588typedef struct {
589 int command; /* one of the commands listed for TS 27.007 +CRSM*/
590 int fileid; /* EF id */
591 char *path; /* "pathid" from TS 27.007 +CRSM command.
592 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700593 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800594 */
595 int p1;
596 int p2;
597 int p3;
598 char *data; /* May be NULL*/
599 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800600} RIL_SIM_IO_v5;
601
602typedef struct {
603 int command; /* one of the commands listed for TS 27.007 +CRSM*/
604 int fileid; /* EF id */
605 char *path; /* "pathid" from TS 27.007 +CRSM command.
606 Path is in hex asciii format eg "7f205f70"
607 Path must always be provided.
608 */
609 int p1;
610 int p2;
611 int p3;
612 char *data; /* May be NULL*/
613 char *pin2; /* May be NULL*/
614 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
615} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800616
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800617/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
618 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
619typedef struct {
620 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
621 ignored for +CSIM command. */
622
623 /* Following fields are used to derive the APDU ("command" and "length"
624 values in TS 27.007 +CSIM and +CGLA commands). */
625 int cla;
626 int instruction;
627 int p1;
628 int p2;
629 int p3; /* A negative P3 implies a 4 byte APDU. */
630 char *data; /* May be NULL. In hex string format. */
631} RIL_SIM_APDU;
632
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800633typedef struct {
634 int sw1;
635 int sw2;
Amit Mahajan2875bc22014-08-06 10:03:15 -0700636 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
637 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 -0800638} RIL_SIM_IO_Response;
639
640/* See also com.android.internal.telephony.gsm.CallForwardInfo */
641
642typedef struct {
643 int status; /*
644 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
645 * status 1 = active, 0 = not active
646 *
647 * For RIL_REQUEST_SET_CALL_FORWARD:
648 * status is:
649 * 0 = disable
650 * 1 = enable
651 * 2 = interrogate
652 * 3 = registeration
653 * 4 = erasure
654 */
655
Wink Saville3d54e742009-05-18 18:00:44 -0700656 int reason; /* from TS 27.007 7.11 "reason" */
657 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
658 See table for Android mapping from
659 MMI service code
660 0 means user doesn't input class */
661 int toa; /* "type" from TS 27.007 7.11 */
662 char * number; /* "number" from TS 27.007 7.11. May be NULL */
663 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800664}RIL_CallForwardInfo;
665
666typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700667 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
668 * Upper 16 bits is LAC and lower 16 bits
669 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800670 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700671 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700672 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800673 */
johnwange0ba6a92009-09-11 19:14:52 -0700674 int rssi; /* Received RSSI in GSM,
675 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800676 */
677} RIL_NeighboringCell;
678
fengluf7408292015-04-14 14:53:55 -0700679typedef struct {
680 char lce_status; /* LCE service status:
681 * -1 = not supported;
682 * 0 = stopped;
683 * 1 = active.
684 */
685 unsigned int actual_interval_ms; /* actual LCE reporting interval,
686 * meaningful only if LCEStatus = 1.
687 */
688} RIL_LceStatusInfo;
689
690typedef struct {
fenglu290add32015-05-01 17:05:15 -0700691 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
fengluf7408292015-04-14 14:53:55 -0700692 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
693 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
694 * moves to inactive state or network type change)
695 * 1 = suspended;
696 * 0 = not suspended.
697 */
698} RIL_LceDataInfo;
699
Meng Wangb4e34312016-05-12 14:54:36 -0700700typedef enum {
701 RIL_MATCH_ALL = 0, /* Apply to all carriers with the same mcc/mnc */
702 RIL_MATCH_SPN = 1, /* Use SPN and mcc/mnc to identify the carrier */
703 RIL_MATCH_IMSI_PREFIX = 2, /* Use IMSI prefix and mcc/mnc to identify the carrier */
704 RIL_MATCH_GID1 = 3, /* Use GID1 and mcc/mnc to identify the carrier */
705 RIL_MATCH_GID2 = 4, /* Use GID2 and mcc/mnc to identify the carrier */
706} RIL_CarrierMatchType;
707
708typedef struct {
709 const char * mcc;
710 const char * mnc;
711 RIL_CarrierMatchType match_type; /* Specify match type for the carrier.
712 * If it’s RIL_MATCH_ALL, match_data is null;
713 * otherwise, match_data is the value for the match type.
714 */
715 const char * match_data;
716} RIL_Carrier;
717
718typedef struct {
719 int32_t len_allowed_carriers; /* length of array allowed_carriers */
720 int32_t len_excluded_carriers; /* length of array excluded_carriers */
721 RIL_Carrier * allowed_carriers; /* whitelist for allowed carriers */
722 RIL_Carrier * excluded_carriers; /* blacklist for explicitly excluded carriers
723 * which match allowed_carriers. Eg. allowed_carriers match
724 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1
725 * is ABCD. It means except the carrier whose gid1 is ABCD,
726 * all carriers with the same mcc/mnc are allowed.
727 */
728} RIL_CarrierRestrictions;
729
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800730/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
731typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700732 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800733 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
734 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
735 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800736 CALL_FAIL_NORMAL = 16,
737 CALL_FAIL_BUSY = 17,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800738 CALL_FAIL_NO_USER_RESPONDING = 18,
739 CALL_FAIL_NO_ANSWER_FROM_USER = 19,
740 CALL_FAIL_CALL_REJECTED = 21,
741 CALL_FAIL_NUMBER_CHANGED = 22,
742 CALL_FAIL_PREEMPTION = 25,
743 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
744 CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
745 CALL_FAIL_FACILITY_REJECTED = 29,
746 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
747 CALL_FAIL_NORMAL_UNSPECIFIED = 31,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800748 CALL_FAIL_CONGESTION = 34,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800749 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
750 CALL_FAIL_TEMPORARY_FAILURE = 41,
751 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
752 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
753 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
754 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
755 CALL_FAIL_QOS_UNAVAILABLE = 49,
756 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
757 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
758 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
759 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
760 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
761 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800762 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800763 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
764 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
765 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
766 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
767 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
768 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
769 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
770 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
771 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
772 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
773 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
774 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
775 CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
776 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
777 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
778 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
779 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800780 CALL_FAIL_CALL_BARRED = 240,
781 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700782 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
783 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Amit Mahajan54563d32014-11-22 00:54:49 +0000784 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
785 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
786 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
Wink Saville1b5fd232009-04-22 14:50:00 -0700787 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
788 CALL_FAIL_CDMA_DROP = 1001,
789 CALL_FAIL_CDMA_INTERCEPT = 1002,
790 CALL_FAIL_CDMA_REORDER = 1003,
791 CALL_FAIL_CDMA_SO_REJECT = 1004,
792 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
793 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
794 CALL_FAIL_CDMA_PREEMPTED = 1007,
795 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
796 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700797 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800798 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
799 vendor code should make sure to map error
800 code to specific error */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800801} RIL_LastCallFailCause;
802
Chao Liu548a81e2015-05-14 16:13:46 -0700803typedef struct {
804 RIL_LastCallFailCause cause_code;
805 char * vendor_cause;
806} RIL_LastCallFailCauseInfo;
807
Wink Savillef4c4d362009-04-02 01:37:03 -0700808/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800809typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800810 PDP_FAIL_NONE = 0, /* No error, connection ok */
811
812 /* an integer cause code defined in TS 24.008
813 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
814 If the implementation does not have access to the exact cause codes,
815 then it should return one of the following values,
816 as the UI layer needs to distinguish these
817 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700818 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
Sanket Padaweac308b92016-01-07 14:41:17 -0800819 PDP_FAIL_NAS_SIGNALLING = 0x0E,
820 PDP_FAIL_LLC_SNDCP = 0x19,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700821 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
822 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
823 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
824 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
825 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
826 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
827 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
828 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
829 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800830 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
Hui Wang11e8b232014-09-19 16:40:17 -0500831 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
832 based on framework config */
Sanket Padaweac308b92016-01-07 14:41:17 -0800833 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
834 PDP_FAIL_NETWORK_FAILURE = 0x26,
835 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
836 PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
837 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
838 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
839 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
840 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
841 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
842 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
Wink Saville43808972011-01-13 17:39:51 -0800843 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
844 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
845 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Sanket Padaweac308b92016-01-07 14:41:17 -0800846 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
847 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
848 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
849 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
850 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
851 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
852 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
853 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
854 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
855 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
856 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
857 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
858 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
859 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
860 PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
861 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
862 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
863 PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
864 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
865 PDP_FAIL_IFACE_MISMATCH = 0x75,
866 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
867 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
868 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
869 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
870 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
Wink Saville43808972011-01-13 17:39:51 -0800871
Sanket Padawe0106aed2016-02-09 09:56:31 -0800872 // OEM specific error codes. To be used by OEMs when they don't want to
873 // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
874 PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001,
875 PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002,
876 PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003,
877 PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004,
878 PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005,
879 PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006,
880 PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007,
881 PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008,
882 PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009,
883 PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A,
884 PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B,
885 PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C,
886 PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D,
887 PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E,
888 PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F,
889
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700890 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800891 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
892 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800893
894 /* reasons for data call drop - network/modem disconnect */
Wink Saville3492c6e2013-10-03 13:53:27 -0700895 PDP_FAIL_SIGNAL_LOST = -3,
Wink Saville43808972011-01-13 17:39:51 -0800896 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
897 with parameters appropriate for new technology */
898 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
899 powered off - no retry */
900 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
901 mode was up on same APN/data profile - no retry until
902 tethered call is off */
903
Sanket Padaweac308b92016-01-07 14:41:17 -0800904 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
905 new error codes are added making this unnecessary */
Wink Saville43808972011-01-13 17:39:51 -0800906} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800907
jsh602f80f2009-07-10 15:44:37 -0700908/* See RIL_REQUEST_SETUP_DATA_CALL */
909typedef enum {
910 RIL_DATA_PROFILE_DEFAULT = 0,
911 RIL_DATA_PROFILE_TETHERED = 1,
Hui Wang8d679622014-10-16 14:59:27 -0500912 RIL_DATA_PROFILE_IMS = 2,
913 RIL_DATA_PROFILE_FOTA = 3,
914 RIL_DATA_PROFILE_CBS = 4,
915 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
916 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
jsh602f80f2009-07-10 15:44:37 -0700917} RIL_DataProfile;
918
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800919/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
920typedef struct {
921 int notificationType; /*
922 * 0 = MO intermediate result code
923 * 1 = MT unsolicited result code
924 */
925 int code; /* See 27.007 7.17
926 "code1" for MO
927 "code2" for MT. */
928 int index; /* CUG index. See 27.007 7.17. */
929 int type; /* "type" from 27.007 7.17 (MT only). */
930 char * number; /* "number" from 27.007 7.17
931 (MT only, may be NULL). */
932} RIL_SuppSvcNotification;
933
Wink Savillef4c4d362009-04-02 01:37:03 -0700934#define RIL_CARD_MAX_APPS 8
935
936typedef enum {
Meng Wangb4e34312016-05-12 14:54:36 -0700937 RIL_CARDSTATE_ABSENT = 0,
938 RIL_CARDSTATE_PRESENT = 1,
939 RIL_CARDSTATE_ERROR = 2,
940 RIL_CARDSTATE_RESTRICTED = 3 /* card is present but not usable due to carrier restrictions.*/
Wink Savillef4c4d362009-04-02 01:37:03 -0700941} RIL_CardState;
942
943typedef enum {
944 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
945 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700946 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
947 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700948 involved */
949 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
950 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
951 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
952 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
953 RIL_PERSOSUBSTATE_SIM_SIM = 7,
954 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
955 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
956 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
957 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
958 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
959 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
960 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
961 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
962 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
963 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
964 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
965 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
966 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
967 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
968 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
969 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
970 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
971} RIL_PersoSubstate;
972
973typedef enum {
974 RIL_APPSTATE_UNKNOWN = 0,
975 RIL_APPSTATE_DETECTED = 1,
976 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
977 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700978 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700979 when app_state is assigned to this value */
980 RIL_APPSTATE_READY = 5
981} RIL_AppState;
982
983typedef enum {
984 RIL_PINSTATE_UNKNOWN = 0,
985 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
986 RIL_PINSTATE_ENABLED_VERIFIED = 2,
987 RIL_PINSTATE_DISABLED = 3,
988 RIL_PINSTATE_ENABLED_BLOCKED = 4,
989 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
990} RIL_PinState;
991
992typedef enum {
993 RIL_APPTYPE_UNKNOWN = 0,
994 RIL_APPTYPE_SIM = 1,
995 RIL_APPTYPE_USIM = 2,
996 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -0800997 RIL_APPTYPE_CSIM = 4,
998 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -0700999} RIL_AppType;
1000
1001typedef struct
1002{
Wink Saville7f856802009-06-09 10:23:37 -07001003 RIL_AppType app_type;
1004 RIL_AppState app_state;
1005 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -07001006 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -07001007 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -07001008 0x30, 0x30, 0x30 */
1009 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -08001010 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -07001011 RIL_PinState pin1;
1012 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -07001013} RIL_AppStatus;
1014
Wink Savillec0114b32011-02-18 10:14:07 -08001015/* Deprecated, use RIL_CardStatus_v6 */
1016typedef struct
1017{
1018 RIL_CardState card_state;
1019 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
1020 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1021 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1022 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1023 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
1024} RIL_CardStatus_v5;
1025
Wink Savillef4c4d362009-04-02 01:37:03 -07001026typedef struct
1027{
Wink Saville7f856802009-06-09 10:23:37 -07001028 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -07001029 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -08001030 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1031 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1032 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -07001033 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1034 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -08001035} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -07001036
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001037/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
1038 * or as part of RIL_SimRefreshResponse_v7
1039 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001040typedef enum {
1041 /* A file on SIM has been updated. data[1] contains the EFID. */
1042 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001043 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001044 SIM_INIT = 1,
1045 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
1046 SIM_RESET = 2
1047} RIL_SimRefreshResult;
1048
Alex Yakavenka45e740e2012-01-31 11:48:27 -08001049typedef struct {
1050 RIL_SimRefreshResult result;
1051 int ef_id; /* is the EFID of the updated file if the result is */
1052 /* SIM_FILE_UPDATE or 0 for any other result. */
1053 char * aid; /* is AID(application ID) of the card application */
1054 /* See ETSI 102.221 8.1 and 101.220 4 */
1055 /* For SIM_FILE_UPDATE result it can be set to AID of */
1056 /* application in which updated EF resides or it can be */
1057 /* NULL if EF is outside of an application. */
1058 /* For SIM_INIT result this field is set to AID of */
1059 /* application that caused REFRESH */
1060 /* For SIM_RESET result it is NULL. */
1061} RIL_SimRefreshResponse_v7;
1062
Wink Savillec0114b32011-02-18 10:14:07 -08001063/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
1064typedef struct {
1065 char * number; /* Remote party number */
1066 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1067 char * name; /* Remote party name */
1068 RIL_CDMA_SignalInfoRecord signalInfoRecord;
1069} RIL_CDMA_CallWaiting_v5;
1070
Wink Saville1b5fd232009-04-22 14:50:00 -07001071typedef struct {
1072 char * number; /* Remote party number */
1073 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1074 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -07001075 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -08001076 /* Number type/Number plan required to support International Call Waiting */
1077 int number_type; /* 0=Unknown, 1=International, 2=National,
1078 3=Network specific, 4=subscriber */
1079 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
1080} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001081
Wink Savillea592eeb2009-05-22 13:26:36 -07001082/**
1083 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
1084 *
1085 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
1086 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
1087 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
1088 * CBM message ID.
1089 *
1090 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
1091 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
1092 * and 9.4.4.2.3 for UMTS.
1093 * All other values can be treated as empty CBM data coding scheme.
1094 *
1095 * selected 0 means message types specified in <fromServiceId, toServiceId>
1096 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
1097 *
1098 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
1099 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
1100 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001101typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -07001102 int fromServiceId;
1103 int toServiceId;
1104 int fromCodeScheme;
1105 int toCodeScheme;
1106 unsigned char selected;
1107} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -07001108
The Android Open Source Project34a51082009-03-05 14:34:37 -08001109/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
1110#define RIL_RESTRICTED_STATE_NONE 0x00
1111/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
1112#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
1113/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
1114#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -07001115/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -08001116#define RIL_RESTRICTED_STATE_CS_ALL 0x04
1117/* Block packet data access due to restriction. */
1118#define RIL_RESTRICTED_STATE_PS_ALL 0x10
1119
Wink Saville1b5fd232009-04-22 14:50:00 -07001120/* The status for an OTASP/OTAPA session */
1121typedef enum {
1122 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
1123 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
1124 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
1125 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
1126 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
1127 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
1128 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
1129 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
1130 CDMA_OTA_PROVISION_STATUS_COMMITTED,
1131 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
1132 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
1133 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
1134} RIL_CDMA_OTA_ProvisionStatus;
1135
1136typedef struct {
1137 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1138 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1139} RIL_GW_SignalStrength;
1140
Wink Savillec57b3eb2013-04-17 12:51:41 -07001141typedef struct {
1142 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1143 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001144 int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us.
1145 * INT_MAX denotes invalid value */
1146} RIL_GSM_SignalStrength_v12;
1147
1148typedef struct {
1149 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1150 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
Wink Savillec57b3eb2013-04-17 12:51:41 -07001151} RIL_SignalStrengthWcdma;
Wink Saville1b5fd232009-04-22 14:50:00 -07001152
1153typedef struct {
1154 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1155 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1156 * value will be 75.
1157 */
1158 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1159 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1160 * will be 125.
1161 */
1162} RIL_CDMA_SignalStrength;
1163
1164
1165typedef struct {
1166 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1167 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1168 * value will be 75.
1169 */
1170 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1171 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1172 * will be 125.
1173 */
1174 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
1175} RIL_EVDO_SignalStrength;
1176
Wink Savillec0114b32011-02-18 10:14:07 -08001177typedef struct {
1178 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -07001179 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1180 * Range: 44 to 140 dBm
1181 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1182 * Reference: 3GPP TS 36.133 9.1.4 */
1183 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1184 * Range: 20 to 3 dB.
1185 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1186 * Reference: 3GPP TS 36.133 9.1.7 */
1187 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1188 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1189 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1190 * Reference: 3GPP TS 36.101 8.1.1 */
1191 int cqi; /* The current Channel Quality Indicator.
1192 * Range: 0 to 15.
1193 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1194 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -08001195} RIL_LTE_SignalStrength;
1196
Wink Saville8a9e0212013-04-09 12:11:38 -07001197typedef struct {
1198 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1199 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1200 * Range: 44 to 140 dBm
1201 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1202 * Reference: 3GPP TS 36.133 9.1.4 */
1203 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1204 * Range: 20 to 3 dB.
1205 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1206 * Reference: 3GPP TS 36.133 9.1.7 */
1207 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1208 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1209 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1210 * Reference: 3GPP TS 36.101 8.1.1 */
1211 int cqi; /* The current Channel Quality Indicator.
1212 * Range: 0 to 15.
1213 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1214 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1215 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
1216 * Approximate distance can be calculated using 300m/us * timingAdvance.
1217 * Range: 0 to 0x7FFFFFFE
1218 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1219 * Reference: 3GPP 36.321 section 6.1.3.5
1220 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1221} RIL_LTE_SignalStrength_v8;
1222
Etan Cohend3652192014-06-20 08:28:44 -07001223typedef struct {
1224 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
1225 * Range : 25 to 120
1226 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1227 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1228} RIL_TD_SCDMA_SignalStrength;
1229
Wink Savillec0114b32011-02-18 10:14:07 -08001230/* Deprecated, use RIL_SignalStrength_v6 */
1231typedef struct {
1232 RIL_GW_SignalStrength GW_SignalStrength;
1233 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1234 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1235} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -07001236
1237typedef struct {
1238 RIL_GW_SignalStrength GW_SignalStrength;
1239 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1240 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -08001241 RIL_LTE_SignalStrength LTE_SignalStrength;
1242} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001243
Wink Saville8a9e0212013-04-09 12:11:38 -07001244typedef struct {
1245 RIL_GW_SignalStrength GW_SignalStrength;
1246 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1247 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1248 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1249} RIL_SignalStrength_v8;
1250
Etan Cohend3652192014-06-20 08:28:44 -07001251typedef struct {
1252 RIL_GW_SignalStrength GW_SignalStrength;
1253 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1254 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1255 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1256 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1257} RIL_SignalStrength_v10;
1258
Wink Saville8a9e0212013-04-09 12:11:38 -07001259typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001260 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1261 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1262 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1263 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001264} RIL_CellIdentityGsm;
1265
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001266typedef struct {
1267 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 lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1270 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
1271 int arfcn; /* 16-bit GSM Absolute RF channel number, INT_MAX if unknown */
Nathan Haroldf3769da2016-05-05 12:19:39 -07001272 uint8_t bsic;/* 6-bit Base Station Identity Code, 0xFF if unknown */
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001273} RIL_CellIdentityGsm_v12;
1274
Wink Savillec57b3eb2013-04-17 12:51:41 -07001275typedef struct {
1276 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1277 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1278 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1279 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1280 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1281} RIL_CellIdentityWcdma;
1282
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001283typedef 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 psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1289 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number, INT_MAX if unknown */
1290} RIL_CellIdentityWcdma_v12;
1291
Wink Saville8a9e0212013-04-09 12:11:38 -07001292typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001293 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1294 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1295 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001296 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1297 * It is represented in units of 0.25 seconds and ranges from -2592000
1298 * to 2592000, both values inclusive (corresponding to a range of -180
Wink Savillec57b3eb2013-04-17 12:51:41 -07001299 * to +180 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001300
1301 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1302 * It is represented in units of 0.25 seconds and ranges from -1296000
1303 * to 1296000, both values inclusive (corresponding to a range of -90
Wink Savillec57b3eb2013-04-17 12:51:41 -07001304 * to +90 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001305} RIL_CellIdentityCdma;
1306
Wink Saville8a9e0212013-04-09 12:11:38 -07001307typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001308 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1309 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1310 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1311 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1312 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001313} RIL_CellIdentityLte;
1314
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001315typedef struct {
1316 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1317 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1318 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1319 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1320 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1321 int earfcn; /* 18-bit LTE Absolute RC Channel Number, INT_MAX if unknown */
1322} RIL_CellIdentityLte_v12;
1323
Etan Cohend3652192014-06-20 08:28:44 -07001324typedef struct {
1325 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1326 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1327 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1328 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1329 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1330} RIL_CellIdentityTdscdma;
1331
Wink Saville8a9e0212013-04-09 12:11:38 -07001332typedef struct {
1333 RIL_CellIdentityGsm cellIdentityGsm;
1334 RIL_GW_SignalStrength signalStrengthGsm;
1335} RIL_CellInfoGsm;
1336
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001337typedef struct {
1338 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1339 RIL_GSM_SignalStrength_v12 signalStrengthGsm;
1340} RIL_CellInfoGsm_v12;
1341
Wink Savillec57b3eb2013-04-17 12:51:41 -07001342typedef struct {
1343 RIL_CellIdentityWcdma cellIdentityWcdma;
1344 RIL_SignalStrengthWcdma signalStrengthWcdma;
1345} RIL_CellInfoWcdma;
1346
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001347typedef struct {
1348 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1349 RIL_SignalStrengthWcdma signalStrengthWcdma;
1350} RIL_CellInfoWcdma_v12;
1351
Wink Saville8a9e0212013-04-09 12:11:38 -07001352typedef struct {
1353 RIL_CellIdentityCdma cellIdentityCdma;
1354 RIL_CDMA_SignalStrength signalStrengthCdma;
1355 RIL_EVDO_SignalStrength signalStrengthEvdo;
1356} RIL_CellInfoCdma;
1357
Wink Saville8a9e0212013-04-09 12:11:38 -07001358typedef struct {
1359 RIL_CellIdentityLte cellIdentityLte;
1360 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1361} RIL_CellInfoLte;
1362
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001363typedef struct {
1364 RIL_CellIdentityLte_v12 cellIdentityLte;
1365 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1366} RIL_CellInfoLte_v12;
1367
Etan Cohend3652192014-06-20 08:28:44 -07001368typedef struct {
1369 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1370 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1371} RIL_CellInfoTdscdma;
1372
Wink Saville8a9e0212013-04-09 12:11:38 -07001373// Must be the same as CellInfo.TYPE_XXX
1374typedef enum {
1375 RIL_CELL_INFO_TYPE_GSM = 1,
1376 RIL_CELL_INFO_TYPE_CDMA = 2,
1377 RIL_CELL_INFO_TYPE_LTE = 3,
Wink Savillec57b3eb2013-04-17 12:51:41 -07001378 RIL_CELL_INFO_TYPE_WCDMA = 4,
Etan Cohend3652192014-06-20 08:28:44 -07001379 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
Wink Saville8a9e0212013-04-09 12:11:38 -07001380} RIL_CellInfoType;
1381
1382// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1383typedef enum {
1384 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1385 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1386 RIL_TIMESTAMP_TYPE_MODEM = 2,
1387 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1388 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1389} RIL_TimeStampType;
1390
1391typedef struct {
1392 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1393 int registered; /* !0 if this cell is registered 0 if not registered */
1394 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1395 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1396 union {
1397 RIL_CellInfoGsm gsm;
1398 RIL_CellInfoCdma cdma;
1399 RIL_CellInfoLte lte;
Wink Savillec57b3eb2013-04-17 12:51:41 -07001400 RIL_CellInfoWcdma wcdma;
Etan Cohend3652192014-06-20 08:28:44 -07001401 RIL_CellInfoTdscdma tdscdma;
Wink Saville8a9e0212013-04-09 12:11:38 -07001402 } CellInfo;
1403} RIL_CellInfo;
1404
Sanket Padawef53c5fa2016-01-27 10:00:38 -08001405typedef struct {
1406 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1407 int registered; /* !0 if this cell is registered 0 if not registered */
1408 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1409 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1410 union {
1411 RIL_CellInfoGsm_v12 gsm;
1412 RIL_CellInfoCdma cdma;
1413 RIL_CellInfoLte_v12 lte;
1414 RIL_CellInfoWcdma_v12 wcdma;
1415 RIL_CellInfoTdscdma tdscdma;
1416 } CellInfo;
1417} RIL_CellInfo_v12;
1418
Wink Saville1b5fd232009-04-22 14:50:00 -07001419/* Names of the CDMA info records (C.S0005 section 3.7.5) */
1420typedef enum {
1421 RIL_CDMA_DISPLAY_INFO_REC,
1422 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1423 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1424 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1425 RIL_CDMA_SIGNAL_INFO_REC,
1426 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1427 RIL_CDMA_LINE_CONTROL_INFO_REC,
1428 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1429 RIL_CDMA_T53_CLIR_INFO_REC,
1430 RIL_CDMA_T53_RELEASE_INFO_REC,
1431 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1432} RIL_CDMA_InfoRecName;
1433
1434/* Display Info Rec as defined in C.S0005 section 3.7.5.1
1435 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1436 Note: the Extended Display info rec contains multiple records of the
1437 form: display_tag, display_len, and display_len occurrences of the
1438 chari field if the display_tag is not 10000000 or 10000001.
1439 To save space, the records are stored consecutively in a byte buffer.
1440 The display_tag, display_len and chari fields are all 1 byte.
1441*/
1442
1443typedef struct {
1444 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001445 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001446} RIL_CDMA_DisplayInfoRecord;
1447
1448/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1449 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1450 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1451*/
1452
1453typedef struct {
1454 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001455 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001456 char number_type;
1457 char number_plan;
1458 char pi;
1459 char si;
1460} RIL_CDMA_NumberInfoRecord;
1461
1462/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1463typedef enum {
1464 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1465 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1466 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1467 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1468 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1469 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1470 RIL_REDIRECTING_REASON_RESERVED
1471} RIL_CDMA_RedirectingReason;
1472
1473typedef struct {
1474 RIL_CDMA_NumberInfoRecord redirectingNumber;
1475 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1476 RIL_CDMA_RedirectingReason redirectingReason;
1477} RIL_CDMA_RedirectingNumberInfoRecord;
1478
1479/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1480typedef struct {
1481 char lineCtrlPolarityIncluded;
1482 char lineCtrlToggle;
1483 char lineCtrlReverse;
1484 char lineCtrlPowerDenial;
1485} RIL_CDMA_LineControlInfoRecord;
1486
1487/* T53 CLIR Information Record */
1488typedef struct {
1489 char cause;
1490} RIL_CDMA_T53_CLIRInfoRecord;
1491
1492/* T53 Audio Control Information Record */
1493typedef struct {
1494 char upLink;
1495 char downLink;
1496} RIL_CDMA_T53_AudioControlInfoRecord;
1497
1498typedef struct {
1499
1500 RIL_CDMA_InfoRecName name;
1501
1502 union {
1503 /* Display and Extended Display Info Rec */
1504 RIL_CDMA_DisplayInfoRecord display;
1505
1506 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1507 RIL_CDMA_NumberInfoRecord number;
1508
1509 /* Signal Info Rec */
1510 RIL_CDMA_SignalInfoRecord signal;
1511
1512 /* Redirecting Number Info Rec */
1513 RIL_CDMA_RedirectingNumberInfoRecord redir;
1514
1515 /* Line Control Info Rec */
1516 RIL_CDMA_LineControlInfoRecord lineCtrl;
1517
1518 /* T53 CLIR Info Rec */
1519 RIL_CDMA_T53_CLIRInfoRecord clir;
1520
1521 /* T53 Audio Control Info Rec */
1522 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1523 } rec;
1524} RIL_CDMA_InformationRecord;
1525
1526#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1527
1528typedef struct {
1529 char numberOfInfoRecs;
1530 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1531} RIL_CDMA_InformationRecords;
1532
Jake Hamby8a4a2332014-01-15 13:12:05 -08001533/* See RIL_REQUEST_NV_READ_ITEM */
1534typedef struct {
1535 RIL_NV_Item itemID;
1536} RIL_NV_ReadItem;
1537
1538/* See RIL_REQUEST_NV_WRITE_ITEM */
1539typedef struct {
1540 RIL_NV_Item itemID;
1541 char * value;
1542} RIL_NV_WriteItem;
1543
Etan Cohend3652192014-06-20 08:28:44 -07001544typedef enum {
1545 HANDOVER_STARTED = 0,
1546 HANDOVER_COMPLETED = 1,
1547 HANDOVER_FAILED = 2,
1548 HANDOVER_CANCELED = 3
1549} RIL_SrvccState;
1550
1551/* hardware configuration reported to RILJ. */
1552typedef enum {
1553 RIL_HARDWARE_CONFIG_MODEM = 0,
1554 RIL_HARDWARE_CONFIG_SIM = 1,
1555} RIL_HardwareConfig_Type;
1556
1557typedef enum {
1558 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1559 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1560 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1561} RIL_HardwareConfig_State;
1562
1563typedef struct {
1564 int rilModel;
1565 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1566 int maxVoice;
1567 int maxData;
1568 int maxStandby;
1569} RIL_HardwareConfig_Modem;
1570
1571typedef struct {
Wink Saville8b4e4f72014-10-17 15:01:45 -07001572 char modemUuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001573} RIL_HardwareConfig_Sim;
1574
1575typedef struct {
1576 RIL_HardwareConfig_Type type;
Wink Saville8b4e4f72014-10-17 15:01:45 -07001577 char uuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001578 RIL_HardwareConfig_State state;
1579 union {
1580 RIL_HardwareConfig_Modem modem;
1581 RIL_HardwareConfig_Sim sim;
1582 } cfg;
1583} RIL_HardwareConfig;
1584
Amit Mahajan54563d32014-11-22 00:54:49 +00001585typedef enum {
1586 SS_CFU,
1587 SS_CF_BUSY,
1588 SS_CF_NO_REPLY,
1589 SS_CF_NOT_REACHABLE,
1590 SS_CF_ALL,
1591 SS_CF_ALL_CONDITIONAL,
1592 SS_CLIP,
1593 SS_CLIR,
1594 SS_COLP,
1595 SS_COLR,
1596 SS_WAIT,
1597 SS_BAOC,
1598 SS_BAOIC,
1599 SS_BAOIC_EXC_HOME,
1600 SS_BAIC,
1601 SS_BAIC_ROAMING,
1602 SS_ALL_BARRING,
1603 SS_OUTGOING_BARRING,
1604 SS_INCOMING_BARRING
1605} RIL_SsServiceType;
1606
1607typedef enum {
1608 SS_ACTIVATION,
1609 SS_DEACTIVATION,
1610 SS_INTERROGATION,
1611 SS_REGISTRATION,
1612 SS_ERASURE
1613} RIL_SsRequestType;
1614
1615typedef enum {
1616 SS_ALL_TELE_AND_BEARER_SERVICES,
1617 SS_ALL_TELESEVICES,
1618 SS_TELEPHONY,
1619 SS_ALL_DATA_TELESERVICES,
1620 SS_SMS_SERVICES,
1621 SS_ALL_TELESERVICES_EXCEPT_SMS
1622} RIL_SsTeleserviceType;
1623
1624#define SS_INFO_MAX 4
1625#define NUM_SERVICE_CLASSES 7
1626
1627typedef struct {
1628 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1629 For example if voice is forwarded to one number and data
1630 is forwarded to a different one then numValidIndexes will be
1631 2 indicating total number of valid values in cfInfo.
1632 Similarly if all the services are forwarded to the same
1633 number then the value of numValidIndexes will be 1. */
1634
1635 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1636 for SS request to query call
1637 forward status. see
1638 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1639} RIL_CfData;
1640
1641typedef struct {
1642 RIL_SsServiceType serviceType;
1643 RIL_SsRequestType requestType;
1644 RIL_SsTeleserviceType teleserviceType;
1645 int serviceClass;
1646 RIL_Errno result;
1647
1648 union {
1649 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1650 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1651 two ints, so first two values of ssInfo[] will be
1652 used for response if serviceType is SS_CLIR and
1653 requestType is SS_INTERROGATION */
1654
1655 RIL_CfData cfData;
1656 };
1657} RIL_StkCcUnsolSsResponse;
1658
Wink Saville7f856802009-06-09 10:23:37 -07001659/**
Wink Savillec29360a2014-07-13 05:17:28 -07001660 * Data connection power state
1661 */
1662typedef enum {
1663 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1664 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1665 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1666 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1667} RIL_DcPowerStates;
1668
1669/**
1670 * Data connection real time info
1671 */
1672typedef struct {
1673 uint64_t time; // Time in nanos as returned by ril_nano_time
1674 RIL_DcPowerStates powerState; // Current power state
1675} RIL_DcRtInfo;
1676
Amit Mahajanc796e222014-08-13 16:54:01 +00001677/**
1678 * Data profile to modem
1679 */
1680typedef struct {
1681 /* id of the data profile */
1682 int profileId;
1683 /* the APN to connect to */
1684 char* apn;
1685 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1686 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1687 */
1688 char* protocol;
1689 /** authentication protocol used for this PDP context
1690 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1691 */
1692 int authType;
1693 /* the username for APN, or NULL */
1694 char* user;
1695 /* the password for APN, or NULL */
1696 char* password;
1697 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1698 int type;
1699 /* the period in seconds to limit the maximum connections */
1700 int maxConnsTime;
1701 /* the maximum connections during maxConnsTime */
1702 int maxConns;
1703 /** the required wait time in seconds after a successful UE initiated
1704 * disconnect of a given PDN connection before the device can send
1705 * a new PDN connection request for that given PDN
1706 */
1707 int waitTime;
1708 /* true to enable the profile, 0 to disable, 1 to enable */
1709 int enabled;
1710} RIL_DataProfileInfo;
Wink Savillec29360a2014-07-13 05:17:28 -07001711
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001712/* Tx Power Levels */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001713#define RIL_NUM_TX_POWER_LEVELS 5
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001714
Nathan Haroldc8635212016-10-10 11:15:21 -07001715/**
1716 * Aggregate modem activity information
1717 */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001718typedef struct {
1719
Nathan Haroldc8635212016-10-10 11:15:21 -07001720 /* total time (in ms) when modem is in a low power or
1721 * sleep state
1722 */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001723 uint32_t sleep_mode_time_ms;
1724
Nathan Haroldc8635212016-10-10 11:15:21 -07001725 /* total time (in ms) when modem is awake but neither
1726 * the transmitter nor receiver are active/awake */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001727 uint32_t idle_mode_time_ms;
1728
Nathan Haroldc8635212016-10-10 11:15:21 -07001729 /* total time (in ms) during which the transmitter is active/awake,
1730 * subdivided by manufacturer-defined device-specific
1731 * contiguous increasing ranges of transmit power between
1732 * 0 and the transmitter's maximum transmit power.
1733 */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001734 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001735
Nathan Haroldc8635212016-10-10 11:15:21 -07001736 /* total time (in ms) for which receiver is active/awake and
1737 * the transmitter is inactive */
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001738 uint32_t rx_mode_time_ms;
1739} RIL_ActivityStatsInfo;
1740
Wink Savillec29360a2014-07-13 05:17:28 -07001741/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001742 * RIL_REQUEST_GET_SIM_STATUS
1743 *
1744 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -07001745 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001746 * "data" is NULL
1747 *
Wink Savillefd729372011-02-22 16:19:39 -08001748 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001749 *
1750 * Valid errors:
1751 * Must never fail
1752 */
1753#define RIL_REQUEST_GET_SIM_STATUS 1
1754
1755/**
1756 * RIL_REQUEST_ENTER_SIM_PIN
1757 *
John Wang309ac292009-07-30 14:53:23 -07001758 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001759 *
1760 * "data" is const char **
1761 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001762 * ((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 -08001763 *
jsh593c9102009-06-24 16:13:44 -07001764 * "response" is int *
1765 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001766 *
1767 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001768 *
1769 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001770 * RADIO_NOT_AVAILABLE (radio resetting)
1771 * GENERIC_FAILURE
1772 * PASSWORD_INCORRECT
1773 */
1774
1775#define RIL_REQUEST_ENTER_SIM_PIN 2
1776
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001777/**
1778 * RIL_REQUEST_ENTER_SIM_PUK
1779 *
Wink Saville7f856802009-06-09 10:23:37 -07001780 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001781 *
1782 * "data" is const char **
1783 * ((const char **)data)[0] is PUK value
1784 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001785 * ((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 -08001786 *
jsh593c9102009-06-24 16:13:44 -07001787 * "response" is int *
1788 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001789 *
1790 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001791 *
1792 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001793 * RADIO_NOT_AVAILABLE (radio resetting)
1794 * GENERIC_FAILURE
1795 * PASSWORD_INCORRECT
1796 * (PUK is invalid)
1797 */
1798
1799#define RIL_REQUEST_ENTER_SIM_PUK 3
1800
1801/**
1802 * RIL_REQUEST_ENTER_SIM_PIN2
1803 *
1804 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
1805 * returned as a a failure from a previous operation.
1806 *
1807 * "data" is const char **
1808 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001809 * ((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 -08001810 *
jsh593c9102009-06-24 16:13:44 -07001811 * "response" is int *
1812 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001813 *
1814 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001815 *
1816 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001817 * RADIO_NOT_AVAILABLE (radio resetting)
1818 * GENERIC_FAILURE
1819 * PASSWORD_INCORRECT
1820 */
1821
1822#define RIL_REQUEST_ENTER_SIM_PIN2 4
1823
1824/**
1825 * RIL_REQUEST_ENTER_SIM_PUK2
1826 *
Wink Saville7f856802009-06-09 10:23:37 -07001827 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001828 *
1829 * "data" is const char **
1830 * ((const char **)data)[0] is PUK2 value
1831 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001832 * ((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 -08001833 *
jsh593c9102009-06-24 16:13:44 -07001834 * "response" is int *
1835 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001836 *
1837 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001838 *
1839 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001840 * RADIO_NOT_AVAILABLE (radio resetting)
1841 * GENERIC_FAILURE
1842 * PASSWORD_INCORRECT
1843 * (PUK2 is invalid)
1844 */
1845
1846#define RIL_REQUEST_ENTER_SIM_PUK2 5
1847
1848/**
1849 * RIL_REQUEST_CHANGE_SIM_PIN
1850 *
Wink Saville7f856802009-06-09 10:23:37 -07001851 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001852 *
1853 * "data" is const char **
1854 * ((const char **)data)[0] is old PIN value
1855 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001856 * ((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 -08001857 *
jsh593c9102009-06-24 16:13:44 -07001858 * "response" is int *
1859 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001860 *
1861 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001862 *
1863 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001864 * RADIO_NOT_AVAILABLE (radio resetting)
1865 * GENERIC_FAILURE
1866 * PASSWORD_INCORRECT
1867 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001868 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001869 */
1870
1871#define RIL_REQUEST_CHANGE_SIM_PIN 6
1872
1873
1874/**
1875 * RIL_REQUEST_CHANGE_SIM_PIN2
1876 *
Wink Saville7f856802009-06-09 10:23:37 -07001877 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001878 *
1879 * "data" is const char **
1880 * ((const char **)data)[0] is old PIN2 value
1881 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001882 * ((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 -08001883 *
jsh593c9102009-06-24 16:13:44 -07001884 * "response" is int *
1885 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001886 *
1887 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001888 *
1889 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001890 * RADIO_NOT_AVAILABLE (radio resetting)
1891 * GENERIC_FAILURE
1892 * PASSWORD_INCORRECT
1893 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001894 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001895 */
1896
1897#define RIL_REQUEST_CHANGE_SIM_PIN2 7
1898
1899/**
1900 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
1901 *
1902 * Requests that network personlization be deactivated
1903 *
1904 * "data" is const char **
1905 * ((const char **)(data))[0]] is network depersonlization code
1906 *
jsh593c9102009-06-24 16:13:44 -07001907 * "response" is int *
1908 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001909 *
1910 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001911 *
1912 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001913 * RADIO_NOT_AVAILABLE (radio resetting)
1914 * GENERIC_FAILURE
1915 * PASSWORD_INCORRECT
1916 * (code is invalid)
1917 */
1918
1919#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
1920
1921/**
Wink Saville7f856802009-06-09 10:23:37 -07001922 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001923 *
1924 * Requests current call list
1925 *
1926 * "data" is NULL
1927 *
1928 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07001929 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001930 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001931 *
1932 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001933 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07001934 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001935 * GENERIC_FAILURE
1936 * (request will be made again in a few hundred msec)
1937 */
1938
1939#define RIL_REQUEST_GET_CURRENT_CALLS 9
1940
1941
Wink Saville7f856802009-06-09 10:23:37 -07001942/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001943 * RIL_REQUEST_DIAL
1944 *
1945 * Initiate voice call
1946 *
1947 * "data" is const RIL_Dial *
1948 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001949 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001950 * This method is never used for supplementary service codes
1951 *
1952 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001953 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001954 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00001955 * DIAL_MODIFIED_TO_USSD
1956 * DIAL_MODIFIED_TO_SS
1957 * DIAL_MODIFIED_TO_DIAL
Ajay Nambi10345892016-03-19 09:02:28 -07001958 * INVALID_ARGUMENTS
1959 * NO_MEMORY
1960 * INVALID_STATE
1961 * NO_RESOURCES
1962 * INTERNAL_ERR
1963 * FDN_CHECK_FAILURE
1964 * MODEM_ERR
1965 * NO_SUBSCRIPTION
1966 * NO_NETWORK_FOUND
1967 * INVALID_CALL_ID
1968 * DEVICE_IN_USE
1969 * MODE_NOT_SUPPORTED
1970 * ABORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001971 * GENERIC_FAILURE
1972 */
1973#define RIL_REQUEST_DIAL 10
1974
1975/**
1976 * RIL_REQUEST_GET_IMSI
1977 *
1978 * Get the SIM IMSI
1979 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08001980 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001981 *
Wink Savillec0114b32011-02-18 10:14:07 -08001982 * "data" is const char **
1983 * ((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 -08001984 * "response" is a const char * containing the IMSI
1985 *
1986 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001987 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001988 * RADIO_NOT_AVAILABLE (radio resetting)
1989 * GENERIC_FAILURE
1990 */
1991
1992#define RIL_REQUEST_GET_IMSI 11
1993
1994/**
1995 * RIL_REQUEST_HANGUP
1996 *
1997 * Hang up a specific line (like AT+CHLD=1x)
1998 *
John Wang06bae4b2010-11-18 16:37:09 -08001999 * After this HANGUP request returns, RIL should show the connection is NOT
2000 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2001 *
Wink Saville7f856802009-06-09 10:23:37 -07002002 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002003 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002004 *
2005 * "response" is NULL
2006 *
2007 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002008 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002009 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002010 * INVALID_ARGUMENTS
2011 * NO_MEMORY
2012 * INVALID_STATE
2013 * MODEM_ERR
2014 * INTERNAL_ERR
2015 * NO_MEMORY
2016 * INVALID_CALL_ID
2017 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002018 * GENERIC_FAILURE
2019 */
2020
2021#define RIL_REQUEST_HANGUP 12
2022
2023/**
2024 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
2025 *
2026 * Hang up waiting or held (like AT+CHLD=0)
2027 *
John Wang06bae4b2010-11-18 16:37:09 -08002028 * After this HANGUP request returns, RIL should show the connection is NOT
2029 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2030 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002031 * "data" is NULL
2032 * "response" is NULL
2033 *
2034 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002035 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002036 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002037 * INVALID_STATE
2038 * NO_MEMORY
2039 * MODEM_ERR
2040 * INTERNAL_ERR
2041 * NO_MEMORY
2042 * INVALID_CALL_ID
2043 * NO_RESOURCES
2044 * OPERATION_NOT_ALLOWED
2045 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002046 * GENERIC_FAILURE
2047 */
2048
2049#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
2050
2051/**
2052 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
2053 *
2054 * Hang up waiting or held (like AT+CHLD=1)
2055 *
John Wang06bae4b2010-11-18 16:37:09 -08002056 * After this HANGUP request returns, RIL should show the connection is NOT
2057 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2058 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002059 * "data" is NULL
2060 * "response" is NULL
2061 *
2062 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002063 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002064 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002065 * INVALID_STATE
2066 * NO_MEMORY
2067 * MODEM_ERR
2068 * INTERNAL_ERR
2069 * INVALID_CALL_ID
2070 * OPERATION_NOT_ALLOWED
2071 * INVALID_ARGUMENTS
2072 * NO_RESOURCES
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002073 * GENERIC_FAILURE
2074 */
2075
2076#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
2077
2078/**
2079 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
2080 *
2081 * Switch waiting or holding call and active call (like AT+CHLD=2)
2082 *
2083 * State transitions should be is follows:
2084 *
2085 * If call 1 is waiting and call 2 is active, then if this re
2086 *
2087 * BEFORE AFTER
2088 * Call 1 Call 2 Call 1 Call 2
2089 * ACTIVE HOLDING HOLDING ACTIVE
2090 * ACTIVE WAITING HOLDING ACTIVE
2091 * HOLDING WAITING HOLDING ACTIVE
2092 * ACTIVE IDLE HOLDING IDLE
2093 * IDLE IDLE IDLE IDLE
2094 *
2095 * "data" is NULL
2096 * "response" is NULL
2097 *
2098 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002099 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002100 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002101 * INVALID_STATE
2102 * NO_MEMORY
2103 * MODEM_ERR
2104 * INTERNAL_ERR
2105 * INVALID_STATE
2106 * INVALID_ARGUMENTS
2107 * INVALID_CALL_ID
2108 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002109 * GENERIC_FAILURE
2110 */
2111
2112#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
2113#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
2114
2115/**
2116 * RIL_REQUEST_CONFERENCE
2117 *
2118 * Conference holding and active (like AT+CHLD=3)
2119
2120 * "data" is NULL
2121 * "response" is NULL
2122 *
2123 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002124 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002125 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002126 * NO_MEMORY
2127 * MODEM_ERR
2128 * INTERNAL_ERR
2129 * INVALID_STATE
2130 * INVALID_CALL_ID
2131 * INVALID_ARGUMENTS
2132 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002133 * GENERIC_FAILURE
2134 */
2135#define RIL_REQUEST_CONFERENCE 16
2136
2137/**
2138 * RIL_REQUEST_UDUB
2139 *
Wink Saville7f856802009-06-09 10:23:37 -07002140 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002141 * waiting call answer)(RIL_BasicRequest r);
2142 *
2143 * "data" is NULL
2144 * "response" is NULL
2145 *
2146 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002147 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002148 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002149 * INVALID_STATE
2150 * NO_RESOURCES
2151 * NO_MEMORY
2152 * MODEM_ERR
2153 * INTERNAL_ERR
2154 * INVALID_CALL_ID
2155 * OPERATION_NOT_ALLOWED
2156 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002157 * GENERIC_FAILURE
2158 */
2159#define RIL_REQUEST_UDUB 17
2160
2161/**
2162 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2163 *
2164 * Requests the failure cause code for the most recently terminated call
2165 *
2166 * "data" is NULL
2167 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -07002168 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002169 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
2170 * failure reasons are derived from the possible call failure scenarios
2171 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002172 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08002173 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
2174 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
2175 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002176 * If the implementation does not have access to the exact cause codes,
2177 * then it should return one of the values listed in RIL_LastCallFailCause,
2178 * as the UI layer needs to distinguish these cases for tone generation or
2179 * error notification.
2180 *
2181 * Valid errors:
2182 * SUCCESS
2183 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002184 * NO_MEMORY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002185 * GENERIC_FAILURE
2186 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002187 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002188 */
2189#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
2190
2191/**
2192 * RIL_REQUEST_SIGNAL_STRENGTH
2193 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002194 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002195 *
2196 * Must succeed if radio is on.
2197 *
2198 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07002199 *
2200 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002201 *
2202 * Valid errors:
2203 * SUCCESS
2204 * RADIO_NOT_AVAILABLE
2205 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002206#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07002207
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002208/**
Wink Savillec0114b32011-02-18 10:14:07 -08002209 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002210 *
2211 * Request current registration state
2212 *
2213 * "data" is NULL
2214 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -07002215 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -07002216 * 0 - Not registered, MT is not currently searching
2217 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07002218 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -07002219 * 2 - Not registered, but MT is currently searching
2220 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07002221 * 3 - Registration denied
2222 * 4 - Unknown
2223 * 5 - Registered, roaming
John Wang7f8ded12010-01-21 15:07:28 -08002224 * 10 - Same as 0, but indicates that emergency calls
2225 * are enabled.
2226 * 12 - Same as 2, but indicates that emergency calls
2227 * are enabled.
2228 * 13 - Same as 3, but indicates that emergency calls
2229 * are enabled.
2230 * 14 - Same as 4, but indicates that emergency calls
2231 * are enabled.
2232 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002233 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
2234 * NULL if not.Valid LAC are 0x0000 - 0xffff
2235 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
2236 * NULL if not.
2237 * Valid CID are 0x00000000 - 0xffffffff
2238 * In GSM, CID is Cell ID (see TS 27.007)
2239 * in 16 bits
2240 * In UMTS, CID is UMTS Cell Identity
2241 * (see TS 25.331) in 28 bits
Wink Saville43808972011-01-13 17:39:51 -08002242 * ((const char **)response)[3] indicates the available voice radio technology,
2243 * valid values as defined by RIL_RadioTechnology.
Wink Saville1b5fd232009-04-22 14:50:00 -07002244 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
2245 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07002246 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07002247 * ((const char **)response)[5] is Base Station latitude if registered on a
2248 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07002249 * latitude is a decimal number as specified in
2250 * 3GPP2 C.S0005-A v6.0. It is represented in
2251 * units of 0.25 seconds and ranges from -1296000
2252 * to 1296000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08002253 * to a range of -90 to +90 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07002254 * ((const char **)response)[6] is Base Station longitude if registered on a
2255 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07002256 * longitude is a decimal number as specified in
2257 * 3GPP2 C.S0005-A v6.0. It is represented in
2258 * units of 0.25 seconds and ranges from -2592000
2259 * to 2592000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08002260 * to a range of -180 to +180 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07002261 * ((const char **)response)[7] is concurrent services support indicator if
2262 * registered on a CDMA system 0-1.
2263 * 0 - Concurrent services not supported,
2264 * 1 - Concurrent services supported
2265 * ((const char **)response)[8] is System ID if registered on a CDMA system or
2266 * NULL if not. Valid System ID are 0 - 32767
2267 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
2268 * NULL if not. Valid System ID are 0 - 65535
2269 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002270 * on a CDMA or EVDO system or NULL if not. Valid values
Wink Saville1b5fd232009-04-22 14:50:00 -07002271 * are 0-255.
2272 * ((const char **)response)[11] indicates whether the current system is in the
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002273 * PRL if registered on a CDMA or EVDO system or NULL if
Wink Saville1b5fd232009-04-22 14:50:00 -07002274 * not. 0=not in the PRL, 1=in the PRL
2275 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002276 * if registered on a CDMA or EVDO system or NULL if not.
Wink Saville1b5fd232009-04-22 14:50:00 -07002277 * Valid values are 0-255.
2278 * ((const char **)response)[13] if registration state is 3 (Registration
2279 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07002280 * registration was denied. See 3GPP TS 24.008,
2281 * 10.5.3.6 and Annex G.
2282 * 0 - General
2283 * 1 - Authentication Failure
2284 * 2 - IMSI unknown in HLR
2285 * 3 - Illegal MS
2286 * 4 - Illegal ME
2287 * 5 - PLMN not allowed
2288 * 6 - Location area not allowed
2289 * 7 - Roaming not allowed
2290 * 8 - No Suitable Cells in this Location Area
2291 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07002292 * 10 - Persistent location update reject
Wink Savillec0114b32011-02-18 10:14:07 -08002293 * 11 - PLMN not allowed
2294 * 12 - Location area not allowed
2295 * 13 - Roaming not allowed in this Location Area
2296 * 15 - No Suitable Cells in this Location Area
2297 * 17 - Network Failure
2298 * 20 - MAC Failure
2299 * 21 - Sync Failure
2300 * 22 - Congestion
2301 * 23 - GSM Authentication unacceptable
2302 * 25 - Not Authorized for this CSG
2303 * 32 - Service option not supported
2304 * 33 - Requested service option not subscribed
2305 * 34 - Service option temporarily out of order
2306 * 38 - Call cannot be identified
2307 * 48-63 - Retry upon entry into a new cell
2308 * 95 - Semantically incorrect message
2309 * 96 - Invalid mandatory information
2310 * 97 - Message type non-existent or not implemented
Jonathan Basseri903b8b22016-08-29 16:15:57 -07002311 * 98 - Message type not compatible with protocol state
Wink Savillec0114b32011-02-18 10:14:07 -08002312 * 99 - Information element non-existent or not implemented
2313 * 100 - Conditional IE error
2314 * 101 - Message not compatible with protocol state
2315 * 111 - Protocol error, unspecified
jshca5e3472010-06-23 21:53:24 -07002316 * ((const char **)response)[14] is the Primary Scrambling Code of the current
2317 * cell as described in TS 25.331, in hexadecimal
2318 * format, or NULL if unknown or not registered
2319 * to a UMTS network.
Wink Saville1b5fd232009-04-22 14:50:00 -07002320 *
2321 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002322 * as "out of service" in the Android telephony system
2323 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002324 * Registration state 3 can be returned if Location Update Reject
2325 * (with cause 17 - Network Failure) is received repeatedly from the network,
2326 * to facilitate "managed roaming"
2327 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002328 * Valid errors:
2329 * SUCCESS
2330 * RADIO_NOT_AVAILABLE
2331 * GENERIC_FAILURE
2332 */
Wink Savillec0114b32011-02-18 10:14:07 -08002333#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002334
2335/**
Wink Savillec0114b32011-02-18 10:14:07 -08002336 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002337 *
Wink Savillec0114b32011-02-18 10:14:07 -08002338 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002339 *
2340 * "data" is NULL
2341 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08002342 * ((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 -08002343 * ((const char **)response)[1] is LAC if registered or NULL if not
2344 * ((const char **)response)[2] is CID if registered or NULL if not
Wink Saville43808972011-01-13 17:39:51 -08002345 * ((const char **)response)[3] indicates the available data radio technology,
2346 * valid values as defined by RIL_RadioTechnology.
Wink Savillec0114b32011-02-18 10:14:07 -08002347 * ((const char **)response)[4] if registration state is 3 (Registration
2348 * denied) this is an enumerated reason why
2349 * registration was denied. See 3GPP TS 24.008,
2350 * Annex G.6 "Additonal cause codes for GMM".
2351 * 7 == GPRS services not allowed
2352 * 8 == GPRS services and non-GPRS services not allowed
2353 * 9 == MS identity cannot be derived by the network
2354 * 10 == Implicitly detached
2355 * 14 == GPRS services not allowed in this PLMN
2356 * 16 == MSC temporarily not reachable
2357 * 40 == No PDP context activated
2358 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
2359 * established using RIL_REQUEST_SETUP_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002360 *
Wink Savilleae679532012-12-03 14:59:45 -08002361 * The values at offsets 6..10 are optional LTE location information in decimal.
2362 * If a value is unknown that value may be NULL. If all values are NULL,
2363 * none need to be present.
Wink Savilleea51a9d2012-09-15 07:54:06 -07002364 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
2365 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
2366 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
2367 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
2368 * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
2369 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002370 * LAC and CID are in hexadecimal format.
2371 * valid LAC are 0x0000 - 0xffff
2372 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07002373 *
2374 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002375 * as "out of service" in the Android telephony system
2376 *
2377 * Valid errors:
2378 * SUCCESS
2379 * RADIO_NOT_AVAILABLE
2380 * GENERIC_FAILURE
2381 */
Wink Savillec0114b32011-02-18 10:14:07 -08002382#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002383
2384/**
2385 * RIL_REQUEST_OPERATOR
2386 *
2387 * Request current operator ONS or EONS
2388 *
2389 * "data" is NULL
2390 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07002391 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002392 * or NULL if unregistered
2393 *
Wink Saville7f856802009-06-09 10:23:37 -07002394 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002395 * or NULL if unregistered
2396 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2397 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07002398 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002399 * Valid errors:
2400 * SUCCESS
2401 * RADIO_NOT_AVAILABLE
2402 * GENERIC_FAILURE
2403 */
2404#define RIL_REQUEST_OPERATOR 22
2405
2406/**
2407 * RIL_REQUEST_RADIO_POWER
2408 *
2409 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07002410 * If the radio is is turned off/on the radio modem subsystem
2411 * is expected return to an initialized state. For instance,
2412 * any voice and data calls will be terminated and all associated
2413 * lists emptied.
2414 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002415 * "data" is int *
2416 * ((int *)data)[0] is > 0 for "Radio On"
2417 * ((int *)data)[0] is == 0 for "Radio Off"
2418 *
2419 * "response" is NULL
2420 *
2421 * Turn radio on if "on" > 0
2422 * Turn radio off if "on" == 0
2423 *
2424 * Valid errors:
2425 * SUCCESS
2426 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002427 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002428 * GENERIC_FAILURE
2429 */
2430#define RIL_REQUEST_RADIO_POWER 23
2431
2432/**
2433 * RIL_REQUEST_DTMF
2434 *
2435 * Send a DTMF tone
2436 *
2437 * If the implementation is currently playing a tone requested via
2438 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2439 * should be played instead
2440 *
jsh602f80f2009-07-10 15:44:37 -07002441 * "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 -08002442 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002443 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002444 * FIXME should this block/mute microphone?
2445 * How does this interact with local DTMF feedback?
2446 *
2447 * Valid errors:
2448 * SUCCESS
2449 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07002450 * INVALID_ARGUMENTS
2451 * NO_RESOURCES
2452 * NO_MEMORY
2453 * MODEM_ERR
2454 * INTERNAL_ERR
2455 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002456 * GENERIC_FAILURE
2457 *
2458 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2459 *
2460 */
2461#define RIL_REQUEST_DTMF 24
2462
2463/**
2464 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07002465 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002466 * Send an SMS message
2467 *
2468 * "data" is const char **
2469 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2470 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2471 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2472 * less the SMSC address
2473 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2474 *
2475 * "response" is a const RIL_SMS_Response *
2476 *
2477 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002478 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002479 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2480 *
2481 * Valid errors:
2482 * SUCCESS
2483 * RADIO_NOT_AVAILABLE
2484 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07002485 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08002486 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002487 * INVALID_STATE
2488 * INVALID_ARGUMENTS
2489 * NO_MEMORY
2490 * REQUEST_RATE_LIMITED
2491 * INVALID_SMS_FORMAT
2492 * SYSTEM_ERR
2493 * ENCODING_ERR
2494 * INVALID_SMSC_ADDRESS
2495 * MODEM_ERR
2496 * NETWORK_ERR
2497 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002498 * GENERIC_FAILURE
2499 *
2500 * FIXME how do we specify TP-Message-Reference if we need to resend?
2501 */
2502#define RIL_REQUEST_SEND_SMS 25
2503
2504
2505/**
2506 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07002507 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002508 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2509 * except that more messages are expected to be sent soon. If possible,
2510 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2511 *
2512 * "data" is const char **
2513 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2514 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2515 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2516 * less the SMSC address
2517 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2518 *
2519 * "response" is a const RIL_SMS_Response *
2520 *
2521 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002522 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002523 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2524 *
2525 * Valid errors:
2526 * SUCCESS
2527 * RADIO_NOT_AVAILABLE
2528 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08002529 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08002530 * INVALID_STATE
2531 * INVALID_ARGUMENTS
2532 * NO_MEMORY
2533 * INVALID_SMS_FORMAT
2534 * SYSTEM_ERR
2535 * REQUEST_RATE_LIMITED
2536 * FDN_CHECK_FAILURE
2537 * MODEM_ERR
2538 * NETWORK_ERR
2539 * ENCODING_ERR
2540 * INVALID_SMSC_ADDRESS
2541 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002542 * GENERIC_FAILURE
2543 *
2544 */
2545#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2546
2547
2548/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002549 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002550 *
Wink Saville29487ef2011-04-15 09:15:31 -07002551 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2552 * return success it is added to the list of data calls and a
2553 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2554 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2555 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2556 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002557 *
Wink Saville43808972011-01-13 17:39:51 -08002558 * The RIL is expected to:
2559 * - Create one data call context.
2560 * - Create and configure a dedicated interface for the context
2561 * - The interface must be point to point.
2562 * - The interface is configured with one or more addresses and
2563 * is capable of sending and receiving packets. The prefix length
2564 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2565 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08002566 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08002567 * number of simultaneous data call contexts.
2568 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002569 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08002570 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2571 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07002572 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07002573 * ((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 -07002574 * override the one in the profile. NULL indicates no APN overrride.
2575 * ((const char **)data)[3] is the username for APN, or NULL
2576 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07002577 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2578 * 0 => PAP and CHAP is never performed.
2579 * 1 => PAP may be performed; CHAP is never performed.
2580 * 2 => CHAP may be performed; PAP is never performed.
2581 * 3 => PAP / CHAP may be performed - baseband dependent.
Wink Savillec0114b32011-02-18 10:14:07 -08002582 * ((const char **)data)[6] is the connection type to request must be one of the
2583 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07002584 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Wink Savillec0114b32011-02-18 10:14:07 -08002585 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002586 *
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -07002587 * "response" is a RIL_Data_Call_Response_v11
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002588 *
2589 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07002590 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002591 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08002592 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08002593 * the RIL_Data_Call_Response_v6.status containing the actual status.
2594 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08002595 *
2596 * Other errors could include:
2597 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2598 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002599 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002600 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002601 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002602#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002603
2604
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002605/**
2606 * RIL_REQUEST_SIM_IO
2607 *
2608 * Request SIM I/O operation.
2609 * This is similar to the TS 27.007 "restricted SIM" operation
2610 * where it assumes all of the EF selection will be done by the
2611 * callee.
2612 *
Wink Savillefd729372011-02-22 16:19:39 -08002613 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002614 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2615 * or may specify a PIN2 for operations that require a PIN2 (eg
2616 * updating FDN records)
2617 *
2618 * "response" is a const RIL_SIM_IO_Response *
2619 *
2620 * Arguments and responses that are unused for certain
2621 * values of "command" should be ignored or set to NULL
2622 *
2623 * Valid errors:
2624 * SUCCESS
2625 * RADIO_NOT_AVAILABLE
2626 * GENERIC_FAILURE
2627 * SIM_PIN2
2628 * SIM_PUK2
2629 */
2630#define RIL_REQUEST_SIM_IO 28
2631
2632/**
2633 * RIL_REQUEST_SEND_USSD
2634 *
2635 * Send a USSD message
2636 *
2637 * If a USSD session already exists, the message should be sent in the
2638 * context of that session. Otherwise, a new session should be created.
2639 *
2640 * The network reply should be reported via RIL_UNSOL_ON_USSD
2641 *
2642 * Only one USSD session may exist at a time, and the session is assumed
2643 * to exist until:
2644 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2645 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2646 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2647 *
2648 * "data" is a const char * containing the USSD request in UTF-8 format
2649 * "response" is NULL
2650 *
2651 * Valid errors:
2652 * SUCCESS
2653 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07002654 * FDN_CHECK_FAILURE
Amit Mahajan54563d32014-11-22 00:54:49 +00002655 * USSD_MODIFIED_TO_DIAL
2656 * USSD_MODIFIED_TO_SS
2657 * USSD_MODIFIED_TO_USSD
twen.changdf7add02016-03-04 18:27:48 +08002658 * SIM_BUSY
2659 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002660 * INVALID_ARGUMENTS
2661 * NO_MEMORY
2662 * MODEM_ERR
2663 * INTERNAL_ERR
2664 * ABORTED
2665 * SYSTEM_ERR
2666 * INVALID_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002667 * GENERIC_FAILURE
2668 *
2669 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2670 */
2671
2672#define RIL_REQUEST_SEND_USSD 29
2673
2674/**
2675 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07002676 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002677 * Cancel the current USSD session if one exists
2678 *
2679 * "data" is null
2680 * "response" is NULL
2681 *
2682 * Valid errors:
2683 * SUCCESS
2684 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08002685 * SIM_BUSY
2686 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07002687 * MODEM_ERR
2688 * INTERNAL_ERR
2689 * NO_MEMORY
2690 * INVALID_STATE
Wink Saville7f856802009-06-09 10:23:37 -07002691 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002692 */
2693
2694#define RIL_REQUEST_CANCEL_USSD 30
2695
Wink Saville7f856802009-06-09 10:23:37 -07002696/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002697 * RIL_REQUEST_GET_CLIR
2698 *
2699 * Gets current CLIR status
2700 * "data" is NULL
2701 * "response" is int *
2702 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2703 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2704 *
2705 * Valid errors:
2706 * SUCCESS
2707 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002708 * SS_MODIFIED_TO_DIAL
2709 * SS_MODIFIED_TO_USSD
2710 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002711 * NO_MEMORY
2712 * MODEM_ERR
2713 * INTERNAL_ERR
2714 * FDN_CHECK_FAILURE
2715 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002716 * GENERIC_FAILURE
2717 */
2718#define RIL_REQUEST_GET_CLIR 31
2719
2720/**
2721 * RIL_REQUEST_SET_CLIR
2722 *
2723 * "data" is int *
2724 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2725 *
2726 * "response" is NULL
2727 *
2728 * Valid errors:
2729 * SUCCESS
2730 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002731 * SS_MODIFIED_TO_DIAL
2732 * SS_MODIFIED_TO_USSD
2733 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002734 * INVALID_ARGUMENTS
2735 * SYSTEM_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002736 * GENERIC_FAILURE
2737 */
2738#define RIL_REQUEST_SET_CLIR 32
2739
2740/**
2741 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2742 *
2743 * "data" is const RIL_CallForwardInfo *
2744 *
2745 * "response" is const RIL_CallForwardInfo **
2746 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2747 * each distinct registered phone number.
2748 *
2749 * For example, if data is forwarded to +18005551212 and voice is forwarded
2750 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07002751 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002752 * If, however, both data and voice are forwarded to +18005551212, then
2753 * a single RIL_CallForwardInfo can be returned with the service class
2754 * set to "data + voice = 3")
2755 *
2756 * Valid errors:
2757 * SUCCESS
2758 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002759 * SS_MODIFIED_TO_DIAL
2760 * SS_MODIFIED_TO_USSD
2761 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002762 * INVALID_ARGUMENTS
2763 * NO_MEMORY
2764 * SYSTEM_ERR
2765 * MODEM_ERR
2766 * INTERNAL_ERR
2767 * NO_MEMORY
2768 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002769 * GENERIC_FAILURE
2770 */
2771#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2772
2773
2774/**
2775 * RIL_REQUEST_SET_CALL_FORWARD
2776 *
2777 * Configure call forward rule
2778 *
2779 * "data" is const RIL_CallForwardInfo *
2780 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002781 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002782 * Valid errors:
2783 * SUCCESS
2784 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002785 * SS_MODIFIED_TO_DIAL
2786 * SS_MODIFIED_TO_USSD
2787 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002788 * INVALID_ARGUMENTS
2789 * NO_MEMORY
2790 * SYSTEM_ERR
2791 * MODEM_ERR
2792 * INTERNAL_ERR
2793 * INVALID_STATE
2794 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002795 * GENERIC_FAILURE
2796 */
2797#define RIL_REQUEST_SET_CALL_FORWARD 34
2798
2799
2800/**
2801 * RIL_REQUEST_QUERY_CALL_WAITING
2802 *
2803 * Query current call waiting state
2804 *
2805 * "data" is const int *
2806 * ((const int *)data)[0] is the TS 27.007 service class to query.
2807 * "response" is a const int *
2808 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2809 *
2810 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2811 * must follow, with the TS 27.007 service class bit vector of services
2812 * for which call waiting is enabled.
2813 *
Wink Saville7f856802009-06-09 10:23:37 -07002814 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002815 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2816 * and voice and disabled for everything else
2817 *
2818 * Valid errors:
2819 * SUCCESS
2820 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002821 * SS_MODIFIED_TO_DIAL
2822 * SS_MODIFIED_TO_USSD
2823 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002824 * NO_MEMORY
2825 * MODEM_ERR
2826 * INTERNAL_ERR
2827 * NO_MEMORY
2828 * FDN_CHECK_FAILURE
2829 * INVALID_ARGUMENTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002830 * GENERIC_FAILURE
2831 */
2832#define RIL_REQUEST_QUERY_CALL_WAITING 35
2833
2834
2835/**
2836 * RIL_REQUEST_SET_CALL_WAITING
2837 *
2838 * Configure current call waiting state
2839 *
2840 * "data" is const int *
2841 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2842 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2843 * services to modify
2844 * "response" is NULL
2845 *
2846 * Valid errors:
2847 * SUCCESS
2848 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002849 * SS_MODIFIED_TO_DIAL
2850 * SS_MODIFIED_TO_USSD
2851 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07002852 * INVALID_ARGUMENTS
2853 * NO_MEMORY
2854 * MODEM_ERR
2855 * INTERNAL_ERR
2856 * INVALID_STATE
2857 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002858 * GENERIC_FAILURE
2859 */
2860#define RIL_REQUEST_SET_CALL_WAITING 36
2861
2862/**
2863 * RIL_REQUEST_SMS_ACKNOWLEDGE
2864 *
2865 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07002866 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002867 *
2868 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07002869 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002870 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07002871 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002872 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07002873 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
2874 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
2875 * capacity exceeded) and 0xFF (unspecified error) are
2876 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002877 *
2878 * "response" is NULL
2879 *
2880 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
2881 *
2882 * Valid errors:
2883 * SUCCESS
2884 * RADIO_NOT_AVAILABLE
2885 * GENERIC_FAILURE
2886 */
2887#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
2888
2889/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002890 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002891 *
2892 * Get the device IMEI, including check digit
2893 *
johnwangf8bc1672009-05-14 19:19:47 -07002894 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002895 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2896 *
2897 * "data" is NULL
2898 * "response" is a const char * containing the IMEI
2899 *
2900 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002901 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002902 * RADIO_NOT_AVAILABLE (radio resetting)
2903 * GENERIC_FAILURE
2904 */
2905
2906#define RIL_REQUEST_GET_IMEI 38
2907
2908/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002909 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002910 *
2911 * Get the device IMEISV, which should be two decimal digits
2912 *
johnwangf8bc1672009-05-14 19:19:47 -07002913 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002914 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2915 *
2916 * "data" is NULL
2917 * "response" is a const char * containing the IMEISV
2918 *
2919 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002920 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002921 * RADIO_NOT_AVAILABLE (radio resetting)
2922 * GENERIC_FAILURE
2923 */
2924
2925#define RIL_REQUEST_GET_IMEISV 39
2926
2927
2928/**
2929 * RIL_REQUEST_ANSWER
2930 *
2931 * Answer incoming call
2932 *
2933 * Will not be called for WAITING calls.
2934 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
2935 * instead
2936 *
2937 * "data" is NULL
2938 * "response" is NULL
2939 *
2940 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002941 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002942 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07002943 * INVALID_STATE
2944 * NO_MEMORY
2945 * SYSTEM_ERR
2946 * MODEM_ERR
2947 * INTERNAL_ERR
2948 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002949 * GENERIC_FAILURE
2950 */
2951
2952#define RIL_REQUEST_ANSWER 40
2953
2954/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002955 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002956 *
Wink Saville29487ef2011-04-15 09:15:31 -07002957 * Deactivate packet data connection and remove from the
2958 * data call list if SUCCESS is returned. Any other return
2959 * values should also try to remove the call from the list,
2960 * but that may not be possible. In any event a
2961 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
2962 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
2963 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002964 *
2965 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07002966 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06002967 * ((char**)data)[1] indicating Disconnect Reason
2968 * 0 => No specific reason specified
2969 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07002970 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002971 * "response" is NULL
2972 *
2973 * Valid errors:
2974 * SUCCESS
2975 * RADIO_NOT_AVAILABLE
2976 * GENERIC_FAILURE
2977 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002978 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002979 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002980#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002981
2982/**
2983 * RIL_REQUEST_QUERY_FACILITY_LOCK
2984 *
2985 * Query the status of a facility lock state
2986 *
2987 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07002988 * ((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 -08002989 * (eg "AO" for BAOC, "SC" for SIM lock)
2990 * ((const char **)data)[1] is the password, or "" if not required
2991 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
2992 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08002993 * ((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 -08002994 * This is only applicable in the case of Fixed Dialing Numbers
2995 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002996 *
2997 * "response" is an int *
2998 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07002999 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003000 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07003001 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003002 *
3003 * Valid errors:
3004 * SUCCESS
3005 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003006 * SS_MODIFIED_TO_DIAL
3007 * SS_MODIFIED_TO_USSD
3008 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003009 * INVALID_ARGUMENTS
3010 * NO_MEMORY
3011 * INTERNAL_ERR
3012 * SYSTEM_ERR
3013 * MODEM_ERR
3014 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003015 * GENERIC_FAILURE
3016 *
3017 */
3018#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
3019
3020/**
3021 * RIL_REQUEST_SET_FACILITY_LOCK
3022 *
3023 * Enable/disable one facility lock
3024 *
3025 * "data" is const char **
3026 *
3027 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3028 * (eg "AO" for BAOC)
3029 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
3030 * ((const char **)data)[2] = password
3031 * ((const char **)data)[3] = string representation of decimal TS 27.007
3032 * service class bit vector. Eg, the string
3033 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08003034 * ((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 -08003035 * This is only applicable in the case of Fixed Dialing Numbers
3036 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003037 *
jsh593c9102009-06-24 16:13:44 -07003038 * "response" is int *
3039 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003040 *
3041 * Valid errors:
3042 * SUCCESS
3043 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003044 * SS_MODIFIED_TO_DIAL
3045 * SS_MODIFIED_TO_USSD
3046 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003047 * INVALID_ARGUMENTS
3048 * INTERNAL_ERR
3049 * NO_MEMORY
3050 * MODEM_ERR
3051 * INVALID_STATE
3052 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003053 * GENERIC_FAILURE
3054 *
3055 */
3056#define RIL_REQUEST_SET_FACILITY_LOCK 43
3057
3058/**
3059 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
3060 *
3061 * Change call barring facility password
3062 *
3063 * "data" is const char **
3064 *
3065 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3066 * (eg "AO" for BAOC)
3067 * ((const char **)data)[1] = old password
3068 * ((const char **)data)[2] = new password
3069 *
Wink Saville7f856802009-06-09 10:23:37 -07003070 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003071 *
3072 * Valid errors:
3073 * SUCCESS
3074 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00003075 * SS_MODIFIED_TO_DIAL
3076 * SS_MODIFIED_TO_USSD
3077 * SS_MODIFIED_TO_SS
Ajay Nambi10345892016-03-19 09:02:28 -07003078 * INVALID_ARGUMENTS
3079 * NO_MEMORY
3080 * MODEM_ERR
3081 * INTERNAL_ERR
3082 * SYSTEM_ERR
3083 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003084 * GENERIC_FAILURE
3085 *
3086 */
3087#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
3088
3089/**
3090 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
3091 *
3092 * Query current network selectin mode
3093 *
3094 * "data" is NULL
3095 *
3096 * "response" is int *
3097 * ((const int *)response)[0] is
3098 * 0 for automatic selection
3099 * 1 for manual selection
3100 *
3101 * Valid errors:
3102 * SUCCESS
3103 * RADIO_NOT_AVAILABLE
3104 * GENERIC_FAILURE
3105 *
3106 */
3107#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
3108
3109/**
3110 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
3111 *
3112 * Specify that the network should be selected automatically
3113 *
3114 * "data" is NULL
3115 * "response" is NULL
3116 *
Wink Saville7f856802009-06-09 10:23:37 -07003117 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003118 * and registered
3119 *
3120 * Valid errors:
3121 * SUCCESS
3122 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003123 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003124 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003125 * GENERIC_FAILURE
3126 *
John Wang75534472010-04-20 15:11:42 -07003127 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3128 * no retries needed, such as illegal SIM or ME.
3129 * Returns GENERIC_FAILURE for all other causes that might be
3130 * fixed by retries.
3131 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003132 */
3133#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
3134
3135/**
3136 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
3137 *
3138 * Manually select a specified network.
3139 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003140 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
3141 * "response" is NULL
3142 *
Wink Saville7f856802009-06-09 10:23:37 -07003143 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003144 * and registered
3145 *
3146 * Valid errors:
3147 * SUCCESS
3148 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07003149 * ILLEGAL_SIM_OR_ME
twen.changdf7add02016-03-04 18:27:48 +08003150 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003151 * GENERIC_FAILURE
3152 *
John Wang75534472010-04-20 15:11:42 -07003153 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3154 * no retries needed, such as illegal SIM or ME.
3155 * Returns GENERIC_FAILURE for all other causes that might be
3156 * fixed by retries.
3157 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003158 */
3159#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
3160
3161/**
3162 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
3163 *
3164 * Scans for available networks
3165 *
3166 * "data" is NULL
3167 * "response" is const char ** that should be an array of n*4 strings, where
3168 * n is the number of available networks
3169 * For each available network:
3170 *
Wink Saville7f856802009-06-09 10:23:37 -07003171 * ((const char **)response)[n+0] is long alpha ONS or EONS
3172 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003173 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
3174 * ((const char **)response)[n+3] is a string value of the status:
3175 * "unknown"
3176 * "available"
3177 * "current"
3178 * "forbidden"
3179 *
Wink Saville7f856802009-06-09 10:23:37 -07003180 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003181 * and registered
3182 *
3183 * Valid errors:
3184 * SUCCESS
3185 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003186 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003187 * GENERIC_FAILURE
3188 *
3189 */
3190#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
3191
3192/**
3193 * RIL_REQUEST_DTMF_START
3194 *
Wink Saville7f856802009-06-09 10:23:37 -07003195 * Start playing a DTMF tone. Continue playing DTMF tone until
3196 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003197 *
3198 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
3199 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07003200 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003201 * "data" is a char *
3202 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
3203 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003204 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003205 * Valid errors:
3206 * SUCCESS
3207 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003208 * INVALID_ARGUMENTS
3209 * NO_RESOURCES
3210 * NO_MEMORY
3211 * SYSTEM_ERR
3212 * MODEM_ERR
3213 * INTERNAL_ERR
3214 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003215 * GENERIC_FAILURE
3216 *
3217 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
3218 */
3219#define RIL_REQUEST_DTMF_START 49
3220
3221/**
3222 * RIL_REQUEST_DTMF_STOP
3223 *
3224 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07003225 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003226 * "data" is NULL
3227 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003228 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003229 * Valid errors:
3230 * SUCCESS
3231 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003232 * OPERATION_NOT_ALLOWED
Ajay Nambi10345892016-03-19 09:02:28 -07003233 * NO_RESOURCES
3234 * NO_MEMORY
3235 * INVALID_ARGUMENTS
3236 * SYSTEM_ERR
3237 * MODEM_ERR
3238 * INTERNAL_ERR
3239 * INVALID_CALL_ID
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003240 * GENERIC_FAILURE
3241 *
3242 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
3243 */
3244#define RIL_REQUEST_DTMF_STOP 50
3245
3246/**
3247 * RIL_REQUEST_BASEBAND_VERSION
3248 *
3249 * Return string value indicating baseband version, eg
3250 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07003251 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003252 * "data" is NULL
3253 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07003254 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003255 * Valid errors:
3256 * SUCCESS
3257 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003258 * EMPTY_RECORD
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003259 * GENERIC_FAILURE
3260 *
3261 */
3262#define RIL_REQUEST_BASEBAND_VERSION 51
3263
3264/**
3265 * RIL_REQUEST_SEPARATE_CONNECTION
3266 *
3267 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07003268 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003269 * as the only other member of the current (active) call
3270 *
3271 * Like AT+CHLD=2x
3272 *
3273 * See TS 22.084 1.3.8.2 (iii)
3274 * TS 22.030 6.5.5 "Entering "2X followed by send"
3275 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07003276 *
3277 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07003278 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
3279 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003280 * "response" is NULL
3281 *
3282 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003283 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003284 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003285 * INVALID_ARGUMENTS
3286 * INVALID_STATE
3287 * NO_RESOURCES
3288 * NO_MEMORY
3289 * SYSTEM_ERR
3290 * MODEM_ERR
3291 * INTERNAL_ERR
3292 * INVALID_CALL_ID
3293 * INVALID_STATE
3294 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003295 * GENERIC_FAILURE
3296 */
3297#define RIL_REQUEST_SEPARATE_CONNECTION 52
3298
3299
3300/**
3301 * RIL_REQUEST_SET_MUTE
3302 *
3303 * Turn on or off uplink (microphone) mute.
3304 *
3305 * Will only be sent while voice call is active.
3306 * Will always be reset to "disable mute" when a new voice call is initiated
3307 *
3308 * "data" is an int *
3309 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
3310 *
3311 * "response" is NULL
3312 *
3313 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003314 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003315 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi68900f52016-03-11 12:02:55 -08003316 * INVALID_ARGUMENTS
3317 * NO_MEMORY
3318 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003319 * GENERIC_FAILURE
3320 */
3321
3322#define RIL_REQUEST_SET_MUTE 53
3323
3324/**
3325 * RIL_REQUEST_GET_MUTE
3326 *
3327 * Queries the current state of the uplink mute setting
3328 *
3329 * "data" is NULL
3330 * "response" is an int *
3331 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
3332 *
3333 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003334 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003335 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00003336 * SS_MODIFIED_TO_DIAL
3337 * SS_MODIFIED_TO_USSD
3338 * SS_MODIFIED_TO_SS
Ajay Nambi68900f52016-03-11 12:02:55 -08003339 * NO_MEMORY
3340 * REQUEST_RATE_LIMITED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003341 * GENERIC_FAILURE
3342 */
3343
3344#define RIL_REQUEST_GET_MUTE 54
3345
3346/**
3347 * RIL_REQUEST_QUERY_CLIP
3348 *
3349 * Queries the status of the CLIP supplementary service
3350 *
3351 * (for MMI code "*#30#")
3352 *
3353 * "data" is NULL
3354 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07003355 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003356 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07003357 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003358 *
3359 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003360 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003361 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003362 * NO_MEMORY
3363 * SYSTEM_ERR
3364 * MODEM_ERR
3365 * INTERNAL_ERR
3366 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003367 * GENERIC_FAILURE
3368 */
3369
3370#define RIL_REQUEST_QUERY_CLIP 55
3371
3372/**
Wink Savillec0114b32011-02-18 10:14:07 -08003373 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
3374 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003375 *
3376 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07003377 * context or CDMA data connection active
3378 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003379 *
3380 * "data" is NULL
3381 *
3382 * "response" is a "int *"
3383 * ((int *)response)[0] is an integer cause code defined in TS 24.008
3384 * section 6.1.3.1.3 or close approximation
3385 *
3386 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07003387 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08003388 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003389 * cases for error notification
3390 * and potential retries.
3391 *
3392 * Valid errors:
3393 * SUCCESS
3394 * RADIO_NOT_AVAILABLE
3395 * GENERIC_FAILURE
3396 *
3397 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08003398 *
3399 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003400 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003401
Wink Savillef4c4d362009-04-02 01:37:03 -07003402#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003403
3404/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003405 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003406 *
Wink Saville29487ef2011-04-15 09:15:31 -07003407 * Returns the data call list. An entry is added when a
3408 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
3409 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
3410 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003411 *
3412 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08003413 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003414 *
3415 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003416 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003417 * RADIO_NOT_AVAILABLE (radio resetting)
3418 * GENERIC_FAILURE
Wink Saville29487ef2011-04-15 09:15:31 -07003419 *
3420 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003421 */
3422
Wink Savillef4c4d362009-04-02 01:37:03 -07003423#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003424
3425/**
johnwangf8bc1672009-05-14 19:19:47 -07003426 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003427 *
3428 * Request a radio reset. The RIL implementation may postpone
3429 * the reset until after this request is responded to if the baseband
3430 * is presently busy.
3431 *
johnwangf8bc1672009-05-14 19:19:47 -07003432 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
3433 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003434 * "data" is NULL
3435 * "response" is NULL
3436 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003437 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003438 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003439 * RADIO_NOT_AVAILABLE (radio resetting)
3440 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07003441 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003442 */
3443
3444#define RIL_REQUEST_RESET_RADIO 58
3445
3446/**
3447 * RIL_REQUEST_OEM_HOOK_RAW
3448 *
3449 * This request reserved for OEM-specific uses. It passes raw byte arrays
3450 * back and forth.
3451 *
Wink Saville7f856802009-06-09 10:23:37 -07003452 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003453 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
3454 *
3455 * "data" is a char * of bytes copied from the byte[] data argument in java
3456 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07003457 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003458 * (byte[])(((AsyncResult)response.obj).result)
3459 *
Wink Saville7f856802009-06-09 10:23:37 -07003460 * An error response here will result in
3461 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003462 * (((AsyncResult)response.obj).exception) being an instance of
3463 * com.android.internal.telephony.gsm.CommandException
3464 *
3465 * Valid errors:
3466 * All
3467 */
3468
3469#define RIL_REQUEST_OEM_HOOK_RAW 59
3470
3471/**
3472 * RIL_REQUEST_OEM_HOOK_STRINGS
3473 *
3474 * This request reserved for OEM-specific uses. It passes strings
3475 * back and forth.
3476 *
Wink Saville7f856802009-06-09 10:23:37 -07003477 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003478 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
3479 *
3480 * "data" is a const char **, representing an array of null-terminated UTF-8
3481 * strings copied from the "String[] strings" argument to
3482 * invokeOemRilRequestStrings()
3483 *
3484 * "response" is a const char **, representing an array of null-terminated UTF-8
3485 * stings that will be returned via the caller's response message here:
3486 *
3487 * (String[])(((AsyncResult)response.obj).result)
3488 *
Wink Saville7f856802009-06-09 10:23:37 -07003489 * An error response here will result in
3490 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003491 * (((AsyncResult)response.obj).exception) being an instance of
3492 * com.android.internal.telephony.gsm.CommandException
3493 *
3494 * Valid errors:
3495 * All
3496 */
3497
3498#define RIL_REQUEST_OEM_HOOK_STRINGS 60
3499
3500/**
3501 * RIL_REQUEST_SCREEN_STATE
3502 *
3503 * Indicates the current state of the screen. When the screen is off, the
3504 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07003505 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
3506 * in an effort to conserve power. These notifications should resume when the
3507 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003508 *
3509 * "data" is int *
3510 * ((int *)data)[0] is == 1 for "Screen On"
3511 * ((int *)data)[0] is == 0 for "Screen Off"
3512 *
3513 * "response" is NULL
3514 *
3515 * Valid errors:
3516 * SUCCESS
3517 * GENERIC_FAILURE
3518 */
3519#define RIL_REQUEST_SCREEN_STATE 61
3520
3521
3522/**
3523 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
3524 *
3525 * Enables/disables supplementary service related notifications
3526 * from the network.
3527 *
3528 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3529 *
3530 * "data" is int *
3531 * ((int *)data)[0] is == 1 for notifications enabled
3532 * ((int *)data)[0] is == 0 for notifications disabled
3533 *
3534 * "response" is NULL
3535 *
3536 * Valid errors:
3537 * SUCCESS
3538 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003539 * SIM_BUSY
Ajay Nambi10345892016-03-19 09:02:28 -07003540 * INVALID_ARGUMENTS
3541 * NO_MEMORY
3542 * SYSTEM_ERR
3543 * MODEM_ERR
3544 * INTERNAL_ERR
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003545 * GENERIC_FAILURE
3546 *
3547 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3548 */
3549#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
3550
3551/**
3552 * RIL_REQUEST_WRITE_SMS_TO_SIM
3553 *
3554 * Stores a SMS message to SIM memory.
3555 *
3556 * "data" is RIL_SMS_WriteArgs *
3557 *
3558 * "response" is int *
3559 * ((const int *)response)[0] is the record index where the message is stored.
3560 *
3561 * Valid errors:
3562 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003563 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003564 * INVALID_ARGUMENTS
3565 * INVALID_SMS_FORMAT
3566 * INTERNAL_ERR
3567 * MODEM_ERR
3568 * ENCODING_ERR
3569 * NO_MEMORY
3570 * NO_RESOURCES
3571 * INVALID_MODEM_STATE
3572 * MODE_NOT_SUPPORTED
3573 * INVALID_SMSC_ADDRESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003574 * GENERIC_FAILURE
3575 *
3576 */
3577#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
3578
3579/**
3580 * RIL_REQUEST_DELETE_SMS_ON_SIM
3581 *
3582 * Deletes a SMS message from SIM memory.
3583 *
3584 * "data" is int *
3585 * ((int *)data)[0] is the record index of the message to delete.
3586 *
3587 * "response" is NULL
3588 *
3589 * Valid errors:
3590 * SUCCESS
twen.changdf7add02016-03-04 18:27:48 +08003591 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08003592 * INVALID_ARGUMENTS
3593 * NO_MEMORY
3594 * REQUEST_RATE_LIMITED
3595 * SYSTEM_ERR
3596 * MODEM_ERR
3597 * NO_SUCH_ENTRY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003598 * GENERIC_FAILURE
3599 *
3600 */
3601#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
3602
3603/**
3604 * RIL_REQUEST_SET_BAND_MODE
3605 *
3606 * Assign a specified band for RF configuration.
3607 *
3608 * "data" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003609 * ((int *)data)[0] is a RIL_RadioBandMode
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003610 *
3611 * "response" is NULL
3612 *
3613 * Valid errors:
3614 * SUCCESS
3615 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08003616 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003617 * GENERIC_FAILURE
Nathan Harold92839f12016-02-12 10:02:28 -08003618 *
3619 * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003620 */
3621#define RIL_REQUEST_SET_BAND_MODE 65
3622
3623/**
3624 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3625 *
3626 * Query the list of band mode supported by RF.
3627 *
3628 * "data" is NULL
3629 *
3630 * "response" is int *
Nathan Harold92839f12016-02-12 10:02:28 -08003631 * "response" points to an array of int's, the int[0] is the size of array;
3632 * subsequent values are a list of RIL_RadioBandMode listing supported modes.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003633 *
3634 * Valid errors:
3635 * SUCCESS
3636 * RADIO_NOT_AVAILABLE
3637 * GENERIC_FAILURE
3638 *
3639 * See also: RIL_REQUEST_SET_BAND_MODE
3640 */
3641#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
3642
3643/**
3644 * RIL_REQUEST_STK_GET_PROFILE
3645 *
3646 * Requests the profile of SIM tool kit.
3647 * The profile indicates the SAT/USAT features supported by ME.
3648 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
3649 *
3650 * "data" is NULL
3651 *
3652 * "response" is a const char * containing SAT/USAT profile
3653 * in hexadecimal format string starting with first byte of terminal profile
3654 *
3655 * Valid errors:
3656 * RIL_E_SUCCESS
3657 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3658 * RIL_E_GENERIC_FAILURE
3659 */
3660#define RIL_REQUEST_STK_GET_PROFILE 67
3661
3662/**
3663 * RIL_REQUEST_STK_SET_PROFILE
3664 *
3665 * Download the STK terminal profile as part of SIM initialization
3666 * procedure
3667 *
3668 * "data" is a const char * containing SAT/USAT profile
3669 * in hexadecimal format string starting with first byte of terminal profile
3670 *
3671 * "response" is NULL
3672 *
3673 * Valid errors:
3674 * RIL_E_SUCCESS
3675 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3676 * RIL_E_GENERIC_FAILURE
3677 */
3678#define RIL_REQUEST_STK_SET_PROFILE 68
3679
3680/**
3681 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
3682 *
3683 * Requests to send a SAT/USAT envelope command to SIM.
3684 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
3685 *
3686 * "data" is a const char * containing SAT/USAT command
3687 * in hexadecimal format string starting with command tag
3688 *
3689 * "response" is a const char * containing SAT/USAT response
3690 * in hexadecimal format string starting with first byte of response
3691 * (May be NULL)
3692 *
3693 * Valid errors:
3694 * RIL_E_SUCCESS
3695 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003696 * SIM_BUSY
3697 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003698 * RIL_E_GENERIC_FAILURE
3699 */
3700#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
3701
3702/**
3703 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
3704 *
3705 * Requests to send a terminal response to SIM for a received
3706 * proactive command
3707 *
3708 * "data" is a const char * containing SAT/USAT response
3709 * in hexadecimal format string starting with first byte of response data
3710 *
3711 * "response" is NULL
3712 *
3713 * Valid errors:
3714 * RIL_E_SUCCESS
3715 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003716 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003717 * RIL_E_GENERIC_FAILURE
3718 */
3719#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3720
3721/**
3722 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3723 *
3724 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3725 * been initialized by ME already. (We could see the call has been in the 'call
3726 * list') So, STK application needs to accept/reject the call according as user
3727 * operations.
3728 *
3729 * "data" is int *
3730 * ((int *)data)[0] is > 0 for "accept" the call setup
3731 * ((int *)data)[0] is == 0 for "reject" the call setup
3732 *
3733 * "response" is NULL
3734 *
3735 * Valid errors:
3736 * RIL_E_SUCCESS
3737 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08003738 * RIL_E_OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003739 * RIL_E_GENERIC_FAILURE
3740 */
3741#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3742
3743/**
3744 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3745 *
3746 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07003747 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003748 * "data" is NULL
3749 * "response" is NULL
3750 *
3751 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003752 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003753 * RADIO_NOT_AVAILABLE (radio resetting)
Ajay Nambi10345892016-03-19 09:02:28 -07003754 * INVALID_STATE
3755 * NO_RESOURCES
3756 * NO_MEMORY
3757 * INVALID_ARGUMENTS
3758 * SYSTEM_ERR
3759 * MODEM_ERR
3760 * INTERNAL_ERR
3761 * INVALID_CALL_ID
3762 * INVALID_STATE
3763 * OPERATION_NOT_ALLOWED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003764 * GENERIC_FAILURE
3765 */
3766#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3767
3768/**
3769 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3770 *
3771 * Requests to set the preferred network type for searching and registering
3772 * (CS/PS domain, RAT, and operation mode)
3773 *
Wink Savillec0114b32011-02-18 10:14:07 -08003774 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003775 *
3776 * "response" is NULL
3777 *
3778 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07003779 * SUCCESS
3780 * RADIO_NOT_AVAILABLE (radio resetting)
3781 * GENERIC_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08003782 * OPERATION_NOT_ALLOWED
Wink Savillef4c4d362009-04-02 01:37:03 -07003783 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003784 */
3785#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3786
3787/**
3788 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
3789 *
3790 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
3791 * for searching and registering
3792 *
3793 * "data" is NULL
3794 *
3795 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003796 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003797 *
3798 * Valid errors:
3799 * SUCCESS
3800 * RADIO_NOT_AVAILABLE
3801 * GENERIC_FAILURE
3802 *
3803 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3804 */
3805#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
3806
3807/**
3808 * RIL_REQUEST_NEIGHBORING_CELL_IDS
3809 *
3810 * Request neighboring cell id in GSM network
3811 *
3812 * "data" is NULL
3813 * "response" must be a " const RIL_NeighboringCell** "
3814 *
3815 * Valid errors:
3816 * SUCCESS
3817 * RADIO_NOT_AVAILABLE
3818 * GENERIC_FAILURE
3819 */
3820#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3821
3822/**
3823 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07003824 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003825 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07003826 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3827 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003828 *
3829 * Note: The RIL implementation should default to "updates enabled"
3830 * when the screen is on and "updates disabled" when the screen is off.
3831 *
3832 * "data" is int *
3833 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3834 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3835 *
3836 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07003837 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003838 * Valid errors:
3839 * SUCCESS
3840 * RADIO_NOT_AVAILABLE
3841 * GENERIC_FAILURE
3842 *
3843 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3844 */
3845#define RIL_REQUEST_SET_LOCATION_UPDATES 76
3846
Wink Savillef4c4d362009-04-02 01:37:03 -07003847/**
Wink Savillec0114b32011-02-18 10:14:07 -08003848 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07003849 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003850 * Request to set the location where the CDMA subscription shall
3851 * be retrieved
3852 *
3853 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003854 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07003855 *
3856 * "response" is NULL
3857 *
3858 * Valid errors:
3859 * SUCCESS
3860 * RADIO_NOT_AVAILABLE
3861 * GENERIC_FAILURE
3862 * SIM_ABSENT
3863 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08003864 *
3865 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07003866 */
Wink Savillec0114b32011-02-18 10:14:07 -08003867#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07003868
3869/**
3870 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003871 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003872 * Request to set the roaming preferences in CDMA
3873 *
3874 * "data" is int *
3875 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3876 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3877 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003878 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003879 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003880 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003881 * Valid errors:
3882 * SUCCESS
3883 * RADIO_NOT_AVAILABLE
3884 * GENERIC_FAILURE
3885 */
3886#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
3887
3888/**
3889 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003890 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003891 * Request the actual setting of the roaming preferences in CDMA in the modem
3892 *
3893 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003894 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003895 * "response" is int *
3896 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
3897 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3898 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003899 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003900 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003901 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003902 * Valid errors:
3903 * SUCCESS
3904 * RADIO_NOT_AVAILABLE
3905 * GENERIC_FAILURE
3906 */
3907#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
3908
3909/**
3910 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003911 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003912 * Request to set the TTY mode
3913 *
3914 * "data" is int *
3915 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003916 * ((int *)data)[0] is == 1 for TTY Full
3917 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
3918 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07003919 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003920 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003921 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003922 * Valid errors:
3923 * SUCCESS
3924 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003925 * INVALID_ARGUMENTS
3926 * MODEM_ERR
3927 * INTERNAL_ERR
3928 * NO_MEMOR
3929 * INVALID_ARGUMENTS
3930 * MODEM_ERR
3931 * INTERNAL_ERR
3932 * NO_MEMORYY
Wink Savillef4c4d362009-04-02 01:37:03 -07003933 * GENERIC_FAILURE
3934 */
3935#define RIL_REQUEST_SET_TTY_MODE 80
3936
3937/**
3938 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003939 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003940 * Request the setting of TTY mode
3941 *
3942 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003943 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003944 * "response" is int *
3945 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003946 * ((int *)response)[0] is == 1 for TTY Full
3947 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
3948 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07003949 *
3950 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003951 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003952 * Valid errors:
3953 * SUCCESS
3954 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003955 * MODEM_ERR
3956 * INTERNAL_ERR
3957 * NO_MEMORY
3958 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07003959 * GENERIC_FAILURE
3960 */
3961#define RIL_REQUEST_QUERY_TTY_MODE 81
3962
3963/**
3964 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
3965 *
3966 * Request to set the preferred voice privacy mode used in voice
3967 * scrambling
3968 *
3969 * "data" is int *
3970 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3971 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003972 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003973 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003974 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003975 * Valid errors:
3976 * SUCCESS
3977 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07003978 * INVALID_ARGUMENTS
3979 * SYSTEM_ERR
3980 * MODEM_ERR
3981 * INTERNAL_ERR
3982 * NO_MEMORY
3983 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07003984 * GENERIC_FAILURE
3985 */
3986#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
3987
3988/**
3989 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003990 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003991 * Request the setting of preferred voice privacy mode
3992 *
3993 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003994 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003995 * "response" is int *
3996 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3997 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003998 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003999 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004000 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004001 * Valid errors:
4002 * SUCCESS
4003 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004004 * MODEM_ERR
4005 * INTERNAL_ERR
4006 * NO_MEMORY
4007 * INVALID_ARGUMENTS
Wink Savillef4c4d362009-04-02 01:37:03 -07004008 * GENERIC_FAILURE
4009 */
4010#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
4011
4012/**
4013 * RIL_REQUEST_CDMA_FLASH
4014 *
4015 * Send FLASH
4016 *
4017 * "data" is const char *
4018 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07004019 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004020 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004021 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004022 * Valid errors:
4023 * SUCCESS
4024 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004025 * INVALID_ARGUMENTS
4026 * NO_MEMORY
4027 * SYSTEM_ERR
4028 * MODEM_ERR
4029 * INTERNAL_ERR
4030 * INVALID_CALL_ID
4031 * INVALID_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004032 * GENERIC_FAILURE
4033 *
4034 */
4035#define RIL_REQUEST_CDMA_FLASH 84
4036
4037/**
4038 * RIL_REQUEST_CDMA_BURST_DTMF
4039 *
4040 * Send DTMF string
4041 *
jsh602f80f2009-07-10 15:44:37 -07004042 * "data" is const char **
4043 * ((const char **)data)[0] is a DTMF string
4044 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
4045 * default
4046 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
4047 * default
Wink Saville7f856802009-06-09 10:23:37 -07004048 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004049 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004050 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004051 * Valid errors:
4052 * SUCCESS
4053 * RADIO_NOT_AVAILABLE
Ajay Nambi10345892016-03-19 09:02:28 -07004054 * INVALID_ARGUMENTS
4055 * NO_MEMORY
4056 * SYSTEM_ERR
4057 * MODEM_ERR
4058 * INTERNAL_ERR
4059 * INVALID_CALL_ID
Wink Savillef4c4d362009-04-02 01:37:03 -07004060 * GENERIC_FAILURE
4061 *
4062 */
4063#define RIL_REQUEST_CDMA_BURST_DTMF 85
4064
4065/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004066 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07004067 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004068 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
4069 * If the checksum is valid the 20 digit AKEY is written to NV,
4070 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07004071 *
4072 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004073 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
4074 * where the last 6 digits are a checksum of the
4075 * first 20, as specified in TR45.AHAG
4076 * "Common Cryptographic Algorithms, Revision D.1
4077 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07004078 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004079 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004080 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004081 * Valid errors:
4082 * SUCCESS
4083 * RADIO_NOT_AVAILABLE
4084 * GENERIC_FAILURE
4085 *
4086 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07004087#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07004088
4089/**
4090 * RIL_REQUEST_CDMA_SEND_SMS
4091 *
4092 * Send a CDMA SMS message
4093 *
4094 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07004095 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004096 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07004097 *
johnwangbfb151b2009-09-11 15:20:38 -07004098 * Based on the return error, caller decides to resend if sending sms
4099 * fails. The CDMA error class is derived as follows,
4100 * SUCCESS is error class 0 (no error)
4101 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
4102 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
4103 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004104 * Valid errors:
4105 * SUCCESS
4106 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07004107 * SMS_SEND_FAIL_RETRY
twen.changdf7add02016-03-04 18:27:48 +08004108 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004109 * INVALID_STATE
4110 * INVALID_ARGUMENTS
4111 * NO_MEMORY
4112 * REQUEST_RATE_LIMITED
4113 * INVALID_SMS_FORMAT
4114 * SYSTEM_ERR
4115 * FDN_CHECK_FAILURE
4116 * MODEM_ERR
4117 * NETWORK_ERR
4118 * ENCODING_ERR
4119 * INVALID_SMSC_ADDRESS
4120 * MODE_NOT_SUPPORTED
Wink Savillef4c4d362009-04-02 01:37:03 -07004121 * GENERIC_FAILURE
4122 *
4123 */
4124#define RIL_REQUEST_CDMA_SEND_SMS 87
4125
4126/**
4127 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4128 *
4129 * Acknowledge the success or failure in the receipt of SMS
4130 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4131 *
4132 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07004133 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004134 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004135 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004136 * Valid errors:
4137 * SUCCESS
4138 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004139 * INVALID_ARGUMENTS
4140 * NO_SMS_TO_ACK
4141 * INVALID_STATE
4142 * NO_MEMORY
4143 * REQUEST_RATE_LIMITED
4144 * SYSTEM_ERR
4145 * MODEM_ERR
4146 * INVALID_STATE
4147 * MODE_NOT_SUPPORTED
4148 * NETWORK_NOT_READY
4149 * INVALID_MODEM_STATE
Wink Savillef4c4d362009-04-02 01:37:03 -07004150 * GENERIC_FAILURE
4151 *
4152 */
4153#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
4154
4155/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004156 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004157 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004158 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
4159 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004160 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004161 *
4162 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
4163 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
4164 *
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 * NO_MEMORY
4170 * REQUEST_RATE_LIMITED
4171 * SYSTEM_ERR
4172 * NO_RESOURCES
4173 * MODEM_ERR
4174 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004175 * GENERIC_FAILURE
4176 *
4177 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004178#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07004179
4180/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004181 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004182 *
4183 * Set GSM/WCDMA Cell Broadcast SMS config
4184 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004185 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
4186 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
4187 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004188 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004189 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004190 * Valid errors:
4191 * SUCCESS
4192 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004193 * INVALID_STATE
4194 * INVALID_ARGUMENTS
4195 * NO_MEMORY
4196 * SYSTEM_ERR
4197 * REQUEST_RATE_LIMITED
4198 * MODEM_ERR
4199 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004200 * GENERIC_FAILURE
4201 *
4202 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004203#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07004204
4205/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004206 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004207 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004208* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07004209 *
4210 * "data" is const int *
4211 * (const int *)data[0] indicates to activate or turn off the
4212 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
4213 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004214 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004215 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004216 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004217 * Valid errors:
4218 * SUCCESS
4219 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004220 * INVALID_STATE
4221 * INVALID_ARGUMENTS
4222 * NO_MEMORY
4223 * SYSTEM_ERR
4224 * REQUEST_RATE_LIMITED
4225 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004226 * GENERIC_FAILURE
4227 *
4228 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004229#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07004230
4231/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004232 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004233 *
4234 * Request the setting of CDMA Broadcast SMS config
4235 *
4236 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004237 *
4238 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
4239 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
4240 *
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 * NO_MEMORY
4246 * REQUEST_RATE_LIMITED
4247 * SYSTEM_ERR
4248 * NO_RESOURCES
4249 * MODEM_ERR
4250 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004251 * GENERIC_FAILURE
4252 *
4253 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004254#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07004255
4256/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004257 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07004258 *
4259 * Set CDMA Broadcast SMS config
4260 *
Wink Savillea592eeb2009-05-22 13:26:36 -07004261 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
4262 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
4263 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004264 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004265 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004266 * Valid errors:
4267 * SUCCESS
4268 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004269 * INVALID_STATE
4270 * INVALID_ARGUMENTS
4271 * NO_MEMORY
4272 * SYSTEM_ERR
4273 * REQUEST_RATE_LIMITED
4274 * MODEM_ERR
4275 * SYSTEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004276 * GENERIC_FAILURE
4277 *
4278 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004279#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07004280
4281/**
Wink Savillea592eeb2009-05-22 13:26:36 -07004282 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07004283 *
4284 * Enable or disable the reception of CDMA Broadcast SMS
4285 *
4286 * "data" is const int *
4287 * (const int *)data[0] indicates to activate or turn off the
4288 * reception of CDMA Broadcast SMS, 0-1,
4289 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07004290 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004291 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07004292 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004293 * Valid errors:
4294 * SUCCESS
4295 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004296 * INVALID_STATE
4297 * INVALID_ARGUMENTS
4298 * NO_MEMORY
4299 * SYSTEM_ERR
4300 * REQUEST_RATE_LIMITED
4301 * MODEM_ERR
Wink Savillef4c4d362009-04-02 01:37:03 -07004302 * GENERIC_FAILURE
4303 *
4304 */
Wink Savillea592eeb2009-05-22 13:26:36 -07004305#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07004306
4307/**
4308 * RIL_REQUEST_CDMA_SUBSCRIPTION
4309 *
4310 * Request the device MDN / H_SID / H_NID.
4311 *
4312 * The request is only allowed when CDMA subscription is available. When CDMA
4313 * subscription is changed, application layer should re-issue the request to
4314 * update the subscription information.
4315 *
4316 * If a NULL value is returned for any of the device id, it means that error
4317 * accessing the device.
4318 *
4319 * "response" is const char **
4320 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07004321 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
4322 * CDMA subscription is available, in decimal format
4323 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
4324 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07004325 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07004326 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07004327 *
4328 * Valid errors:
4329 * SUCCESS
4330 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
4331 */
4332
Wink Savilleeafe79d2009-04-03 18:02:34 -07004333#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07004334
4335/**
4336 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
4337 *
4338 * Stores a CDMA SMS message to RUIM memory.
4339 *
4340 * "data" is RIL_CDMA_SMS_WriteArgs *
4341 *
4342 * "response" is int *
4343 * ((const int *)response)[0] is the record index where the message is stored.
4344 *
4345 * Valid errors:
4346 * SUCCESS
4347 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004348 * SIM_FULL
Ajay Nambi68900f52016-03-11 12:02:55 -08004349 * INVALID_ARGUMENTS
4350 * INVALID_SMS_FORMAT
4351 * INTERNAL_ERR
4352 * MODEM_ERR
4353 * ENCODING_ERR
4354 * NO_MEMORY
4355 * NO_RESOURCES
4356 * INVALID_MODEM_STATE
4357 * MODE_NOT_SUPPORTED
4358 * INVALID_SMSC_ADDRESS
Wink Savillef4c4d362009-04-02 01:37:03 -07004359 * GENERIC_FAILURE
4360 *
4361 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004362#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07004363
4364/**
4365 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
4366 *
4367 * Deletes a CDMA SMS message from RUIM memory.
4368 *
4369 * "data" is int *
4370 * ((int *)data)[0] is the record index of the message to delete.
4371 *
4372 * "response" is NULL
4373 *
4374 * Valid errors:
4375 * SUCCESS
4376 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004377 * INVALID_ARGUMENTS
4378 * NO_MEMORY
4379 * REQUEST_RATE_LIMITED
4380 * SYSTEM_ERR
4381 * MODEM_ERR
4382 * NO_SUCH_ENTRY
Wink Savillef4c4d362009-04-02 01:37:03 -07004383 * GENERIC_FAILURE
4384 *
4385 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004386#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07004387
4388/**
4389 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07004390 *
4391 * Request the device ESN / MEID / IMEI / IMEISV.
4392 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004393 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07004394 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07004395 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004396 *
4397 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07004398 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004399 *
4400 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07004401 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07004402 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004403 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07004404 * ((const char **)response)[0] is IMEI if GSM subscription is available
4405 * ((const char **)response)[1] is IMEISV if GSM subscription is available
4406 * ((const char **)response)[2] is ESN if CDMA subscription is available
4407 * ((const char **)response)[3] is MEID if CDMA subscription is available
4408 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004409 * Valid errors:
4410 * SUCCESS
4411 * RADIO_NOT_AVAILABLE
4412 * GENERIC_FAILURE
4413 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07004414#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07004415
Wink Saville1b5fd232009-04-22 14:50:00 -07004416/**
4417 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
4418 *
4419 * Request the radio's system selection module to exit emergency
4420 * callback mode. RIL will not respond with SUCCESS until the modem has
4421 * completely exited from Emergency Callback Mode.
4422 *
4423 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004424 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004425 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07004426 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004427 * Valid errors:
4428 * SUCCESS
4429 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08004430 * OPERATION_NOT_ALLOWED
Wink Saville1b5fd232009-04-22 14:50:00 -07004431 * GENERIC_FAILURE
4432 *
4433 */
4434#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07004435
jsh000a9fe2009-05-11 14:52:35 -07004436/**
4437 * RIL_REQUEST_GET_SMSC_ADDRESS
4438 *
4439 * Queries the default Short Message Service Center address on the device.
4440 *
4441 * "data" is NULL
4442 *
4443 * "response" is const char * containing the SMSC address.
4444 *
4445 * Valid errors:
4446 * SUCCESS
4447 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004448 * NO_MEMORY
4449 * REQUEST_RATE_LIMITED
4450 * SYSTEM_ERR
4451 * INTERNAL_ERR
4452 * MODEM_ERR
4453 * INVALID_ARGUMENTS
4454 * INVALID_MODEM_STATE
4455 * NOT_PROVISIONED
jsh000a9fe2009-05-11 14:52:35 -07004456 * GENERIC_FAILURE
4457 *
4458 */
4459#define RIL_REQUEST_GET_SMSC_ADDRESS 100
4460
4461/**
4462 * RIL_REQUEST_SET_SMSC_ADDRESS
4463 *
4464 * Sets the default Short Message Service Center address on the device.
4465 *
4466 * "data" is const char * containing the SMSC address.
4467 *
4468 * "response" is NULL
4469 *
4470 * Valid errors:
4471 * SUCCESS
4472 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004473 * INVALID_ARGUMENTS
4474 * INVALID_SMS_FORMAT
4475 * NO_MEMORY
4476 * SYSTEM_ERR
4477 * REQUEST_RATE_LIMITED
4478 * MODEM_ERR
4479 * NO_RESOURCES
jsh000a9fe2009-05-11 14:52:35 -07004480 * GENERIC_FAILURE
4481 *
4482 */
4483#define RIL_REQUEST_SET_SMSC_ADDRESS 101
4484
jshb60444e2009-05-29 11:09:17 -07004485/**
4486 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
4487 *
4488 * Indicates whether there is storage available for new SMS messages.
4489 *
4490 * "data" is int *
4491 * ((int *)data)[0] is 1 if memory is available for storing new messages
4492 * is 0 if memory capacity is exceeded
4493 *
4494 * "response" is NULL
4495 *
4496 * Valid errors:
4497 * SUCCESS
4498 * RADIO_NOT_AVAILABLE
Ajay Nambi68900f52016-03-11 12:02:55 -08004499 * INVALID_ARGUMENTS
4500 * NO_MEMORY
4501 * INVALID_STATE
4502 * SYSTEM_ERR
4503 * REQUEST_RATE_LIMITED
4504 * MODEM_ERR
jshb60444e2009-05-29 11:09:17 -07004505 * GENERIC_FAILURE
4506 *
4507 */
4508#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
4509
Wink Saville2641d5b2009-06-08 17:40:42 -07004510/**
4511 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
4512 *
4513 * Indicates that the StkSerivce is running and is
4514 * ready to receive RIL_UNSOL_STK_XXXXX commands.
4515 *
4516 * "data" is NULL
4517 * "response" is NULL
4518 *
4519 * Valid errors:
4520 * SUCCESS
4521 * RADIO_NOT_AVAILABLE
4522 * GENERIC_FAILURE
4523 *
4524 */
4525#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
4526
Wink Savillec0114b32011-02-18 10:14:07 -08004527/**
4528 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
4529 *
4530 * Request to query the location where the CDMA subscription shall
4531 * be retrieved
4532 *
4533 * "data" is NULL
4534 *
4535 * "response" is int *
4536 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4537 *
4538 * Valid errors:
4539 * SUCCESS
4540 * RADIO_NOT_AVAILABLE
4541 * GENERIC_FAILURE
4542 * SUBSCRIPTION_NOT_AVAILABLE
4543 *
4544 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
4545 */
4546#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
4547
Jake Hambyfa8d5842011-08-19 16:22:18 -07004548/**
4549 * RIL_REQUEST_ISIM_AUTHENTICATION
4550 *
4551 * Request the ISIM application on the UICC to perform AKA
4552 * challenge/response algorithm for IMS authentication
4553 *
4554 * "data" is a const char * containing the challenge string in Base64 format
4555 * "response" is a const char * containing the response in Base64 format
4556 *
4557 * Valid errors:
4558 * SUCCESS
4559 * RADIO_NOT_AVAILABLE
4560 * GENERIC_FAILURE
4561 */
4562#define RIL_REQUEST_ISIM_AUTHENTICATION 105
4563
Jake Hamby300105d2011-09-26 01:01:44 -07004564/**
4565 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
4566 *
4567 * Acknowledge successful or failed receipt of SMS previously indicated
4568 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
4569 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
4570 *
4571 * "data" is const char **
4572 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
4573 * is "0" on failed receipt (send RP-ERROR)
4574 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
4575 *
4576 * "response" is NULL
4577 *
4578 * Valid errors:
4579 * SUCCESS
4580 * RADIO_NOT_AVAILABLE
4581 * GENERIC_FAILURE
4582 */
4583#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
4584
4585/**
4586 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
4587 *
4588 * Requests to send a SAT/USAT envelope command to SIM.
4589 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
4590 *
4591 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
4592 * the SW1 and SW2 status bytes from the UICC response are returned along with
4593 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
4594 *
4595 * The RIL implementation shall perform the normal processing of a '91XX'
4596 * response in SW1/SW2 to retrieve the pending proactive command and send it
4597 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
4598 *
4599 * "data" is a const char * containing the SAT/USAT command
4600 * in hexadecimal format starting with command tag
4601 *
4602 * "response" is a const RIL_SIM_IO_Response *
4603 *
4604 * Valid errors:
4605 * RIL_E_SUCCESS
4606 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
twen.changdf7add02016-03-04 18:27:48 +08004607 * SIM_BUSY
4608 * OPERATION_NOT_ALLOWED
Jake Hamby300105d2011-09-26 01:01:44 -07004609 * RIL_E_GENERIC_FAILURE
4610 */
4611#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
4612
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004613/**
4614 * RIL_REQUEST_VOICE_RADIO_TECH
4615 *
4616 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
Sooraj Sasindranb80acba2015-10-08 16:03:16 -07004617 * when radio state is not RADIO_STATE_UNAVAILABLE
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004618 *
4619 * "data" is NULL
4620 * "response" is int *
4621 * ((int *) response)[0] is of type const RIL_RadioTechnology
4622 *
4623 * Valid errors:
4624 * SUCCESS
4625 * RADIO_NOT_AVAILABLE
4626 * GENERIC_FAILURE
4627 */
4628#define RIL_REQUEST_VOICE_RADIO_TECH 108
4629
Wink Saville8a9e0212013-04-09 12:11:38 -07004630/**
4631 * RIL_REQUEST_GET_CELL_INFO_LIST
4632 *
4633 * Request all of the current cell information known to the radio. The radio
4634 * must a list of all current cells, including the neighboring cells. If for a particular
4635 * cell information isn't known then the appropriate unknown value will be returned.
4636 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
4637 *
4638 * "data" is NULL
4639 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08004640 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07004641 */
4642#define RIL_REQUEST_GET_CELL_INFO_LIST 109
4643
4644/**
4645 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
4646 *
4647 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
Wink Savillec57b3eb2013-04-17 12:51:41 -07004648 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
Wink Saville8a9e0212013-04-09 12:11:38 -07004649 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
4650 * a RIL_UNSOL_CELL_INFO_LIST.
4651 *
4652 * "data" is int *
4653 * ((int *)data)[0] is minimum time in milliseconds
4654 *
4655 * "response" is NULL
4656 *
4657 * Valid errors:
4658 * SUCCESS
4659 * RADIO_NOT_AVAILABLE
4660 * GENERIC_FAILURE
4661 */
4662#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
Jake Hamby300105d2011-09-26 01:01:44 -07004663
Sungmin Choi75697532013-04-26 15:04:45 -07004664/**
4665 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
4666 *
4667 * Set an apn to initial attach network
Ankit Nbc37e512016-12-07 21:05:43 +05304668 *
4669 * "data" is a const char **
4670 * ((const char **)data)[0] is the APN to connect if radio technology is LTE
4671 * ((const char **)data)[1] is the connection type to request must be one of the
4672 * PDP_type values in TS 27.007 section 10.1.1.
4673 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
4674 * ((const char **)data)[2] is the PAP / CHAP auth type. Values:
4675 * 0 => PAP and CHAP is never performed.
4676 * 1 => PAP may be performed; CHAP is never performed.
4677 * 2 => CHAP may be performed; PAP is never performed.
4678 * 3 => PAP / CHAP may be performed - baseband dependent.
4679 * ((const char **)data)[3] is the username for APN, or NULL
4680 * ((const char **)data)[4] is the password for APN, or NULL
4681 *
Sungmin Choi75697532013-04-26 15:04:45 -07004682 * "response" is NULL
4683 *
4684 * Valid errors:
4685 * SUCCESS
4686 * RADIO_NOT_AVAILABLE (radio resetting)
4687 * GENERIC_FAILURE
4688 * SUBSCRIPTION_NOT_AVAILABLE
4689 */
4690#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
4691
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004692/**
4693 * RIL_REQUEST_IMS_REGISTRATION_STATE
4694 *
Nathan Harold0eb43c22016-12-19 12:04:32 -08004695 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
4696 * instead, provide IMS registration status via an IMS Service.
4697 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004698 * Request current IMS registration state
4699 *
4700 * "data" is NULL
4701 *
4702 * "response" is int *
4703 * ((int *)response)[0] is registration state:
4704 * 0 - Not registered
4705 * 1 - Registered
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004706 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004707 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004708 * must follow with IMS SMS format:
4709 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004710 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
4711 *
4712 * Valid errors:
4713 * SUCCESS
4714 * RADIO_NOT_AVAILABLE
4715 * GENERIC_FAILURE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004716 */
4717#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
4718
4719/**
4720 * RIL_REQUEST_IMS_SEND_SMS
4721 *
4722 * Send a SMS message over IMS
4723 *
4724 * "data" is const RIL_IMS_SMS_Message *
4725 *
4726 * "response" is a const RIL_SMS_Response *
4727 *
4728 * Based on the return error, caller decides to resend if sending sms
4729 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
4730 * In case of retry, data is encoded based on Voice Technology available.
4731 *
4732 * Valid errors:
4733 * SUCCESS
4734 * RADIO_NOT_AVAILABLE
4735 * SMS_SEND_FAIL_RETRY
4736 * FDN_CHECK_FAILURE
twen.changdf7add02016-03-04 18:27:48 +08004737 * NETWORK_REJECT
Ajay Nambi68900f52016-03-11 12:02:55 -08004738 * INVALID_ARGUMENTS
4739 * INVALID_STATE
4740 * NO_MEMORY
4741 * INVALID_SMS_FORMAT
4742 * SYSTEM_ERR
4743 * REQUEST_RATE_LIMITED
4744 * MODEM_ERR
4745 * NETWORK_ERR
4746 * ENCODING_ERR
4747 * INVALID_SMSC_ADDRESS
4748 * MODE_NOT_SUPPORTED
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004749 * GENERIC_FAILURE
4750 *
4751 */
4752#define RIL_REQUEST_IMS_SEND_SMS 113
4753
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004754/**
4755 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
4756 *
4757 * Request APDU exchange on the basic channel. This command reflects TS 27.007
4758 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
4759 * of GSM/CDMA, and filter commands appropriately. It should filter
4760 * channel management and SELECT by DF name commands.
4761 *
4762 * "data" is a const RIL_SIM_APDU *
4763 * "sessionid" field should be ignored.
4764 *
4765 * "response" is a const RIL_SIM_IO_Response *
4766 *
4767 * Valid errors:
4768 * SUCCESS
4769 * RADIO_NOT_AVAILABLE
4770 * GENERIC_FAILURE
4771 */
4772#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
4773
4774/**
4775 * RIL_REQUEST_SIM_OPEN_CHANNEL
4776 *
4777 * Open a new logical channel and select the given application. This command
4778 * reflects TS 27.007 "open logical channel" operation (+CCHO).
4779 *
4780 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
4781 *
4782 * "response" is int *
4783 * ((int *)data)[0] contains the session id of the logical channel.
Shishir Agrawal760123f2014-10-14 09:14:57 -07004784 * ((int *)data)[1] onwards may optionally contain the select response for the
4785 * open channel command with one byte per integer.
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004786 *
4787 * Valid errors:
4788 * SUCCESS
4789 * RADIO_NOT_AVAILABLE
4790 * GENERIC_FAILURE
4791 * MISSING_RESOURCE
4792 * NO_SUCH_ELEMENT
4793 */
4794#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
4795
4796/**
4797 * RIL_REQUEST_SIM_CLOSE_CHANNEL
4798 *
4799 * Close a previously opened logical channel. This command reflects TS 27.007
4800 * "close logical channel" operation (+CCHC).
4801 *
4802 * "data" is int *
4803 * ((int *)data)[0] is the session id of logical the channel to close.
4804 *
4805 * "response" is NULL
4806 *
4807 * Valid errors:
4808 * SUCCESS
4809 * RADIO_NOT_AVAILABLE
4810 * GENERIC_FAILURE
4811 */
4812#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
4813
4814/**
4815 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
4816 *
4817 * Exchange APDUs with a UICC over a previously opened logical channel. This
4818 * command reflects TS 27.007 "generic logical channel access" operation
4819 * (+CGLA). The modem should filter channel management and SELECT by DF name
4820 * commands.
4821 *
4822 * "data" is a const RIL_SIM_APDU*
4823 *
4824 * "response" is a const RIL_SIM_IO_Response *
4825 *
4826 * Valid errors:
4827 * SUCCESS
4828 * RADIO_NOT_AVAILABLE
4829 * GENERIC_FAILURE
4830 */
4831#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
4832
Jake Hamby8a4a2332014-01-15 13:12:05 -08004833/**
4834 * RIL_REQUEST_NV_READ_ITEM
4835 *
4836 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4837 * This is used for device configuration by some CDMA operators.
4838 *
4839 * "data" is a const RIL_NV_ReadItem *
4840 *
4841 * "response" is const char * containing the contents of the NV item
4842 *
4843 * Valid errors:
4844 * SUCCESS
4845 * RADIO_NOT_AVAILABLE
4846 * GENERIC_FAILURE
4847 */
4848#define RIL_REQUEST_NV_READ_ITEM 118
4849
4850/**
4851 * RIL_REQUEST_NV_WRITE_ITEM
4852 *
4853 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4854 * This is used for device configuration by some CDMA operators.
4855 *
4856 * "data" is a const RIL_NV_WriteItem *
4857 *
4858 * "response" is NULL
4859 *
4860 * Valid errors:
4861 * SUCCESS
4862 * RADIO_NOT_AVAILABLE
4863 * GENERIC_FAILURE
4864 */
4865#define RIL_REQUEST_NV_WRITE_ITEM 119
4866
4867/**
4868 * RIL_REQUEST_NV_WRITE_CDMA_PRL
4869 *
4870 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
4871 * This is used for device configuration by some CDMA operators.
4872 *
4873 * "data" is a const char * containing the PRL as a byte array
4874 *
4875 * "response" is NULL
4876 *
4877 * Valid errors:
4878 * SUCCESS
4879 * RADIO_NOT_AVAILABLE
4880 * GENERIC_FAILURE
4881 */
4882#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
4883
4884/**
4885 * RIL_REQUEST_NV_RESET_CONFIG
4886 *
4887 * Reset the radio NV configuration to the factory state.
4888 * This is used for device configuration by some CDMA operators.
4889 *
4890 * "data" is int *
Jake Hambyd27c9d52014-02-06 14:52:05 -08004891 * ((int *)data)[0] is 1 to reload all NV items
4892 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
4893 * ((int *)data)[0] is 3 for factory reset (RTN)
Jake Hamby8a4a2332014-01-15 13:12:05 -08004894 *
4895 * "response" is NULL
4896 *
4897 * Valid errors:
4898 * SUCCESS
4899 * RADIO_NOT_AVAILABLE
4900 * GENERIC_FAILURE
4901 */
4902#define RIL_REQUEST_NV_RESET_CONFIG 121
4903
Etan Cohend3652192014-06-20 08:28:44 -07004904 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
4905 * FIXME This API needs to have more documentation.
4906 *
4907 * Selection/de-selection of a subscription from a SIM card
4908 * "data" is const RIL_SelectUiccSub*
4909
4910 *
4911 * "response" is NULL
4912 *
4913 * Valid errors:
4914 * SUCCESS
4915 * RADIO_NOT_AVAILABLE (radio resetting)
4916 * GENERIC_FAILURE
4917 * SUBSCRIPTION_NOT_SUPPORTED
4918 *
4919 */
4920#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
4921
4922/**
4923 * RIL_REQUEST_ALLOW_DATA
4924 *
4925 * Tells the modem whether data calls are allowed or not
4926 *
4927 * "data" is int *
4928 * FIXME slotId and aid will be added.
4929 * ((int *)data)[0] is == 0 to allow data calls
4930 * ((int *)data)[0] is == 1 to disallow data calls
4931 *
4932 * "response" is NULL
4933 *
4934 * Valid errors:
4935 *
4936 * SUCCESS
4937 * RADIO_NOT_AVAILABLE (radio resetting)
4938 * GENERIC_FAILURE
4939 *
4940 */
4941#define RIL_REQUEST_ALLOW_DATA 123
4942
4943/**
4944 * RIL_REQUEST_GET_HARDWARE_CONFIG
4945 *
4946 * Request all of the current hardware (modem and sim) associated
4947 * with the RIL.
4948 *
4949 * "data" is NULL
4950 *
4951 * "response" is an array of RIL_HardwareConfig.
4952 */
4953#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
4954
4955/**
Amit Mahajan2b772032014-06-26 14:20:11 -07004956 * RIL_REQUEST_SIM_AUTHENTICATION
Etan Cohend3652192014-06-20 08:28:44 -07004957 *
4958 * Returns the response of SIM Authentication through RIL to a
4959 * challenge request.
4960 *
4961 * "data" Base64 encoded string containing challenge:
4962 * int authContext; P2 value of authentication command, see P2 parameter in
4963 * 3GPP TS 31.102 7.1.2
4964 * char *authData; the challenge string in Base64 format, see 3GPP
4965 * TS 31.102 7.1.2
4966 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
4967 * NULL if no value
4968 *
4969 * "response" Base64 encoded strings containing response:
4970 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
4971 * int sw2;
4972 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
4973 */
Amit Mahajan2b772032014-06-26 14:20:11 -07004974#define RIL_REQUEST_SIM_AUTHENTICATION 125
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004975
Wink Savillec29360a2014-07-13 05:17:28 -07004976/**
4977 * RIL_REQUEST_GET_DC_RT_INFO
4978 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004979 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07004980 * Requests the Data Connection Real Time Info
4981 *
4982 * "data" is NULL
4983 *
4984 * "response" is the most recent RIL_DcRtInfo
4985 *
4986 * Valid errors:
4987 * SUCCESS
4988 * RADIO_NOT_AVAILABLE
4989 * GENERIC_FAILURE
4990 *
4991 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
4992 */
4993#define RIL_REQUEST_GET_DC_RT_INFO 126
4994
4995/**
4996 * RIL_REQUEST_SET_DC_RT_INFO_RATE
4997 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004998 * The request is DEPRECATED
Wink Savillec29360a2014-07-13 05:17:28 -07004999 * This is the minimum number of milliseconds between successive
5000 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
5001 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
5002 * 0 means send as fast as possible.
5003 *
5004 * "data" The number of milliseconds as an int
5005 *
5006 * "response" is null
5007 *
5008 * Valid errors:
5009 * SUCCESS must not fail
5010 */
5011#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
5012
Amit Mahajanc796e222014-08-13 16:54:01 +00005013/**
5014 * RIL_REQUEST_SET_DATA_PROFILE
5015 *
5016 * Set data profile in modem
Hui Wang8d679622014-10-16 14:59:27 -05005017 * Modem should erase existed profiles from framework, and apply new profiles
Amit Mahajanc796e222014-08-13 16:54:01 +00005018 * "data" is an const RIL_DataProfileInfo **
5019 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
5020 * "response" is NULL
5021 *
5022 * Valid errors:
5023 * SUCCESS
5024 * RADIO_NOT_AVAILABLE (radio resetting)
5025 * GENERIC_FAILURE
5026 * SUBSCRIPTION_NOT_AVAILABLE
5027 */
5028#define RIL_REQUEST_SET_DATA_PROFILE 128
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005029
5030/**
5031 * RIL_REQUEST_SHUTDOWN
5032 *
5033 * Device is shutting down. All further commands are ignored
5034 * and RADIO_NOT_AVAILABLE must be returned.
5035 *
5036 * "data" is null
5037 * "response" is NULL
5038 *
5039 * Valid errors:
5040 * SUCCESS
5041 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005042 * OPERATION_NOT_ALLOWED
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005043 * GENERIC_FAILURE
5044 */
5045#define RIL_REQUEST_SHUTDOWN 129
5046
Wink Saville8b4e4f72014-10-17 15:01:45 -07005047/**
5048 * RIL_REQUEST_GET_RADIO_CAPABILITY
5049 *
5050 * Used to get phone radio capablility.
5051 *
Abhishek Adappa772c0d22015-02-09 11:11:12 -08005052 * "data" is the RIL_RadioCapability structure
Wink Saville8b4e4f72014-10-17 15:01:45 -07005053 *
5054 * Valid errors:
5055 * SUCCESS
5056 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005057 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005058 * GENERIC_FAILURE
5059 */
5060#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
5061
5062/**
5063 * RIL_REQUEST_SET_RADIO_CAPABILITY
5064 *
5065 * Used to set the phones radio capability. Be VERY careful
5066 * using this request as it may cause some vendor modems to reset. Because
5067 * of the possible modem reset any RIL commands after this one may not be
5068 * processed.
5069 *
5070 * "data" is the RIL_RadioCapability structure
5071 *
5072 * "response" is the RIL_RadioCapability structure, used to feedback return status
5073 *
5074 * Valid errors:
5075 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
5076 * RADIO_NOT_AVAILABLE
twen.changdf7add02016-03-04 18:27:48 +08005077 * OPERATION_NOT_ALLOWED
Wink Saville8b4e4f72014-10-17 15:01:45 -07005078 * GENERIC_FAILURE
5079 */
5080#define RIL_REQUEST_SET_RADIO_CAPABILITY 131
5081
fengluf7408292015-04-14 14:53:55 -07005082/**
5083 * RIL_REQUEST_START_LCE
5084 *
5085 * Start Link Capacity Estimate (LCE) service if supported by the radio.
5086 *
5087 * "data" is const int *
5088 * ((const int*)data)[0] specifies the desired reporting interval (ms).
fenglu290add32015-05-01 17:05:15 -07005089 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
fengluf7408292015-04-14 14:53:55 -07005090 *
fenglu290add32015-05-01 17:05:15 -07005091 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005092 *
5093 * Valid errors:
5094 * SUCCESS
5095 * RADIO_NOT_AVAILABLE
5096 * LCE_NOT_SUPPORTED
5097 */
5098#define RIL_REQUEST_START_LCE 132
5099
5100/**
5101 * RIL_REQUEST_STOP_LCE
5102 *
5103 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
5104 * idempotent for the radio modem.
5105 *
fenglu290add32015-05-01 17:05:15 -07005106 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07005107 *
5108 * Valid errors:
5109 * SUCCESS
5110 * RADIO_NOT_AVAILABLE
5111 * LCE_NOT_SUPPORTED
5112 */
5113#define RIL_REQUEST_STOP_LCE 133
5114
5115/**
5116 * RIL_REQUEST_PULL_LCEDATA
5117 *
5118 * Pull LCE service for capacity information.
5119 *
fenglu290add32015-05-01 17:05:15 -07005120 * "response" is the RIL_LceDataInfo.
fengluf7408292015-04-14 14:53:55 -07005121 *
5122 * Valid errors:
5123 * SUCCESS
5124 * RADIO_NOT_AVAILABLE
5125 * LCE_NOT_SUPPORTED
5126 */
5127#define RIL_REQUEST_PULL_LCEDATA 134
5128
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005129/**
5130 * RIL_REQUEST_GET_ACTIVITY_INFO
5131 *
Nathan Haroldc8635212016-10-10 11:15:21 -07005132 * Get modem activity information for power consumption estimation.
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005133 *
Nathan Haroldc8635212016-10-10 11:15:21 -07005134 * Request clear-on-read statistics information that is used for
5135 * estimating the per-millisecond power consumption of the cellular
5136 * modem.
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005137 *
5138 * "data" is null
5139 * "response" is const RIL_ActivityStatsInfo *
5140 *
5141 * Valid errors:
5142 *
5143 * SUCCESS
5144 * RADIO_NOT_AVAILABLE (radio resetting)
5145 * GENERIC_FAILURE
5146 */
5147#define RIL_REQUEST_GET_ACTIVITY_INFO 135
Naveen Kallaa65a16a2014-07-31 16:48:31 -07005148
Meng Wangb4e34312016-05-12 14:54:36 -07005149/**
5150 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS
5151 *
Meng Wangd5c540f2016-07-15 15:41:19 -07005152 * Set carrier restrictions for this sim slot. Expected modem behavior:
5153 * If never receives this command
5154 * - Must allow all carriers
5155 * Receives this command with data being NULL
5156 * - Must allow all carriers. If a previously allowed SIM is present, modem must not reload
5157 * the SIM. If a previously disallowed SIM is present, reload the SIM and notify Android.
5158 * Receives this command with a list of carriers
5159 * - Only allow specified carriers, persist across power cycles and FDR. If a present SIM
5160 * is in the allowed list, modem must not reload the SIM. If a present SIM is *not* in
5161 * the allowed list, modem must detach from the registered network and only keep emergency
5162 * service, and notify Android SIM refresh reset with new SIM state being
5163 * RIL_CARDSTATE_RESTRICTED. Emergency service must be enabled.
Meng Wangb4e34312016-05-12 14:54:36 -07005164 *
5165 * "data" is const RIL_CarrierRestrictions *
5166 * A list of allowed carriers and possibly a list of excluded carriers.
5167 * If data is NULL, means to clear previous carrier restrictions and allow all carriers
5168 *
5169 * "response" is int *
5170 * ((int *)data)[0] contains the number of allowed carriers which have been set correctly.
5171 * On success, it should match the length of list data->allowed_carriers.
5172 * If data is NULL, the value must be 0.
5173 *
5174 * Valid errors:
5175 * RIL_E_SUCCESS
5176 * RIL_E_INVALID_ARGUMENTS
5177 * RIL_E_RADIO_NOT_AVAILABLE
5178 * RIL_E_REQUEST_NOT_SUPPORTED
5179 */
5180#define RIL_REQUEST_SET_CARRIER_RESTRICTIONS 136
5181
5182/**
5183 * RIL_REQUEST_GET_CARRIER_RESTRICTIONS
5184 *
Meng Wangd5c540f2016-07-15 15:41:19 -07005185 * Get carrier restrictions for this sim slot. Expected modem behavior:
5186 * Return list of allowed carriers, or null if all carriers are allowed.
Meng Wangb4e34312016-05-12 14:54:36 -07005187 *
5188 * "data" is NULL
5189 *
5190 * "response" is const RIL_CarrierRestrictions *.
5191 * If response is NULL, it means all carriers are allowed.
5192 *
5193 * Valid errors:
5194 * RIL_E_SUCCESS
5195 * RIL_E_RADIO_NOT_AVAILABLE
5196 * RIL_E_REQUEST_NOT_SUPPORTED
5197 */
5198#define RIL_REQUEST_GET_CARRIER_RESTRICTIONS 137
5199
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005200/***********************************************************************/
5201
Sanket Padawe6ff9a872016-01-27 15:09:12 -08005202/**
5203 * RIL_RESPONSE_ACKNOWLEDGEMENT
5204 *
5205 * This is used by Asynchronous solicited messages and Unsolicited messages
5206 * to acknowledge the receipt of those messages in RIL.java so that the ack
5207 * can be used to let ril.cpp to release wakelock.
5208 *
5209 * Valid errors
5210 * SUCCESS
5211 * RADIO_NOT_AVAILABLE
5212 */
5213
5214#define RIL_RESPONSE_ACKNOWLEDGEMENT 800
5215
5216/***********************************************************************/
5217
Wink Savillef4c4d362009-04-02 01:37:03 -07005218
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005219#define RIL_UNSOL_RESPONSE_BASE 1000
5220
5221/**
5222 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
5223 *
5224 * Indicate when value of RIL_RadioState has changed.
5225 *
5226 * Callee will invoke RIL_RadioStateRequest method on main thread
5227 *
5228 * "data" is NULL
5229 */
5230
5231#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
5232
5233
5234/**
5235 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
5236 *
5237 * Indicate when call state has changed
5238 *
5239 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
5240 *
5241 * "data" is NULL
5242 *
Wink Saville7f856802009-06-09 10:23:37 -07005243 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005244 * "RING", "BUSY", "NO CARRIER", and also call state
5245 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
5246 *
5247 * Redundent or extraneous invocations are tolerated
5248 */
5249#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
5250
5251
5252/**
Wink Savillec0114b32011-02-18 10:14:07 -08005253 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005254 *
Wink Savillec0114b32011-02-18 10:14:07 -08005255 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005256 *
5257 * Callee will invoke the following requests on main thread:
5258 *
Wink Savillec0114b32011-02-18 10:14:07 -08005259 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005260 * RIL_REQUEST_OPERATOR
5261 *
5262 * "data" is NULL
5263 *
5264 * FIXME should this happen when SIM records are loaded? (eg, for
5265 * EONS)
5266 */
Wink Savillec0114b32011-02-18 10:14:07 -08005267#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005268
5269/**
5270 * RIL_UNSOL_RESPONSE_NEW_SMS
5271 *
5272 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07005273 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005274 * "data" is const char *
5275 * This is a pointer to a string containing the PDU of an SMS-DELIVER
5276 * as an ascii string of hex digits. The PDU starts with the SMSC address
5277 * per TS 27.005 (+CMT:)
5278 *
5279 * Callee will subsequently confirm the receipt of thei SMS with a
5280 * RIL_REQUEST_SMS_ACKNOWLEDGE
5281 *
Wink Saville7f856802009-06-09 10:23:37 -07005282 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005283 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5284 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5285 */
5286
5287#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
5288
5289/**
5290 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
5291 *
5292 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07005293 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005294 * "data" is const char *
5295 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
5296 * as an ascii string of hex digits. The PDU starts with the SMSC address
5297 * per TS 27.005 (+CDS:).
5298 *
5299 * Callee will subsequently confirm the receipt of the SMS with a
5300 * RIL_REQUEST_SMS_ACKNOWLEDGE
5301 *
Wink Saville7f856802009-06-09 10:23:37 -07005302 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005303 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5304 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5305 */
5306
5307#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
5308
5309/**
5310 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
5311 *
5312 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07005313 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005314 * "data" is const int *
5315 * ((const int *)data)[0] contains the slot index on the SIM that contains
5316 * the new message
5317 */
5318
5319#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
5320
5321/**
5322 * RIL_UNSOL_ON_USSD
5323 *
5324 * Called when a new USSD message is received.
5325 *
5326 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07005327 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005328 * one of these string values:
5329 * "0" USSD-Notify -- text in ((const char **)data)[1]
5330 * "1" USSD-Request -- text in ((const char **)data)[1]
5331 * "2" Session terminated by network
5332 * "3" other local client (eg, SIM Toolkit) has responded
5333 * "4" Operation not supported
5334 * "5" Network timeout
5335 *
5336 * The USSD session is assumed to persist if the type code is "1", otherwise
5337 * the current session (if any) is assumed to have terminated.
5338 *
5339 * ((const char **)data)[1] points to a message string if applicable, which
5340 * should always be in UTF-8.
5341 */
5342#define RIL_UNSOL_ON_USSD 1006
5343/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
5344
5345/**
5346 * RIL_UNSOL_ON_USSD_REQUEST
5347 *
5348 * Obsolete. Send via RIL_UNSOL_ON_USSD
5349 */
Wink Saville7f856802009-06-09 10:23:37 -07005350#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005351
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005352/**
5353 * RIL_UNSOL_NITZ_TIME_RECEIVED
5354 *
5355 * Called when radio has received a NITZ time message
5356 *
5357 * "data" is const char * pointing to NITZ time string
5358 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
5359 */
5360#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
5361
5362/**
5363 * RIL_UNSOL_SIGNAL_STRENGTH
5364 *
5365 * Radio may report signal strength rather han have it polled.
5366 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005367 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005368 */
5369#define RIL_UNSOL_SIGNAL_STRENGTH 1009
5370
5371
5372/**
Wink Savillef4c4d362009-04-02 01:37:03 -07005373 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005374 *
Wink Savillec0114b32011-02-18 10:14:07 -08005375 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07005376 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
5377 * of current data contexts including new contexts that have been
5378 * activated. A data call is only removed from this list when the
5379 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
5380 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005381 *
Wink Savillef4c4d362009-04-02 01:37:03 -07005382 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005383 */
5384
Wink Savillef4c4d362009-04-02 01:37:03 -07005385#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005386
5387/**
5388 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
5389 *
5390 * Reports supplementary service related notification from the network.
5391 *
5392 * "data" is a const RIL_SuppSvcNotification *
5393 *
5394 */
5395
5396#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
5397
5398/**
5399 * RIL_UNSOL_STK_SESSION_END
5400 *
5401 * Indicate when STK session is terminated by SIM.
5402 *
5403 * "data" is NULL
5404 */
5405#define RIL_UNSOL_STK_SESSION_END 1012
5406
5407/**
5408 * RIL_UNSOL_STK_PROACTIVE_COMMAND
5409 *
5410 * Indicate when SIM issue a STK proactive command to applications
5411 *
5412 * "data" is a const char * containing SAT/USAT proactive command
5413 * in hexadecimal format string starting with command tag
5414 *
5415 */
5416#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
5417
5418/**
5419 * RIL_UNSOL_STK_EVENT_NOTIFY
5420 *
5421 * Indicate when SIM notifies applcations some event happens.
5422 * Generally, application does not need to have any feedback to
5423 * SIM but shall be able to indicate appropriate messages to users.
5424 *
5425 * "data" is a const char * containing SAT/USAT commands or responses
5426 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
5427 * starting with first byte of response data or command tag
5428 *
5429 */
5430#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
5431
5432/**
5433 * RIL_UNSOL_STK_CALL_SETUP
5434 *
5435 * Indicate when SIM wants application to setup a voice call.
5436 *
5437 * "data" is const int *
5438 * ((const int *)data)[0] contains timeout value (in milliseconds)
5439 */
5440#define RIL_UNSOL_STK_CALL_SETUP 1015
5441
5442/**
5443 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
5444 *
5445 * Indicates that SMS storage on the SIM is full. Sent when the network
5446 * attempts to deliver a new SMS message. Messages cannot be saved on the
5447 * SIM until space is freed. In particular, incoming Class 2 messages
5448 * cannot be stored.
5449 *
5450 * "data" is null
5451 *
5452 */
5453#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
5454
5455/**
5456 * RIL_UNSOL_SIM_REFRESH
5457 *
5458 * Indicates that file(s) on the SIM have been updated, or the SIM
5459 * has been reinitialized.
5460 *
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005461 * In the case where RIL is version 6 or older:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005462 * "data" is an int *
5463 * ((int *)data)[0] is a RIL_SimRefreshResult.
5464 * ((int *)data)[1] is the EFID of the updated file if the result is
Alex Yakavenka45e740e2012-01-31 11:48:27 -08005465 * SIM_FILE_UPDATE or NULL for any other result.
5466 *
5467 * In the case where RIL is version 7:
5468 * "data" is a RIL_SimRefreshResponse_v7 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005469 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005470 * Note: If the SIM state changes as a result of the SIM refresh (eg,
5471 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005472 * should be sent.
5473 */
5474#define RIL_UNSOL_SIM_REFRESH 1017
5475
5476/**
5477 * RIL_UNSOL_CALL_RING
5478 *
5479 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07005480 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
5481 * of a call and sending multiple is optional. If the system property
5482 * ro.telephony.call_ring.multiple is false then the upper layers
5483 * will generate the multiple events internally. Otherwise the vendor
5484 * ril must generate multiple RIL_UNSOL_CALL_RING if
5485 * ro.telephony.call_ring.multiple is true or if it is absent.
5486 *
5487 * The rate of these events is controlled by ro.telephony.call_ring.delay
5488 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005489 *
Wink Saville3d54e742009-05-18 18:00:44 -07005490 * "data" is null for GSM
5491 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005492 */
5493#define RIL_UNSOL_CALL_RING 1018
5494
The Android Open Source Project34a51082009-03-05 14:34:37 -08005495/**
5496 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5497 *
5498 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07005499 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005500 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07005501
The Android Open Source Project34a51082009-03-05 14:34:37 -08005502 * "data" is null
5503 */
5504#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
5505
5506/**
5507 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
5508 *
5509 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07005510 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005511 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07005512 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005513 * Callee will subsequently confirm the receipt of the SMS with
5514 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07005515 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005516 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
5517 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07005518 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005519 */
5520#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
5521
5522/**
5523 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
5524 *
5525 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07005526 *
Henrik Hall0eba2022010-11-25 10:20:56 +01005527 * "data" can be one of the following:
5528 * If received from GSM network, "data" is const char of 88 bytes
5529 * which indicates each page of a CBS Message sent to the MS by the
5530 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
5531 * If received from UMTS network, "data" is const char of 90 up to 1252
5532 * bytes which contain between 1 and 15 CBS Message pages sent as one
5533 * 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 -07005534 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005535 */
5536#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07005537
The Android Open Source Project34a51082009-03-05 14:34:37 -08005538/**
5539 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
5540 *
5541 * Indicates that SMS storage on the RUIM is full. Messages
5542 * cannot be saved on the RUIM until space is freed.
5543 *
5544 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07005545 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08005546 */
Wink Savillef4c4d362009-04-02 01:37:03 -07005547#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
5548
The Android Open Source Project34a51082009-03-05 14:34:37 -08005549/**
5550 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
5551 *
5552 * Indicates a restricted state change (eg, for Domain Specific Access Control).
5553 *
5554 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
5555 *
5556 * "data" is an int *
5557 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
5558 */
5559#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
5560
Wink Saville1b5fd232009-04-22 14:50:00 -07005561/**
5562 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
5563 *
5564 * Indicates that the radio system selection module has
5565 * autonomously entered emergency callback mode.
5566 *
5567 * "data" is null
5568 *
5569 */
5570#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08005571
Wink Saville1b5fd232009-04-22 14:50:00 -07005572/**
5573 * RIL_UNSOL_CDMA_CALL_WAITING
5574 *
5575 * Called when CDMA radio receives a call waiting indication.
5576 *
5577 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07005578 *
Wink Saville1b5fd232009-04-22 14:50:00 -07005579 */
5580#define RIL_UNSOL_CDMA_CALL_WAITING 1025
5581
5582/**
5583 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
5584 *
5585 * Called when CDMA radio receives an update of the progress of an
5586 * OTASP/OTAPA call.
5587 *
5588 * "data" is const int *
5589 * For CDMA this is an integer OTASP/OTAPA status listed in
5590 * RIL_CDMA_OTA_ProvisionStatus.
5591 *
5592 */
5593#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
5594
5595/**
5596 * RIL_UNSOL_CDMA_INFO_REC
5597 *
5598 * Called when CDMA radio receives one or more info recs.
5599 *
5600 * "data" is const RIL_CDMA_InformationRecords *
5601 *
5602 */
5603#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08005604
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07005605/**
5606 * RIL_UNSOL_OEM_HOOK_RAW
5607 *
5608 * This is for OEM specific use.
5609 *
5610 * "data" is a byte[]
5611 */
5612#define RIL_UNSOL_OEM_HOOK_RAW 1028
5613
John Wang5d621da2009-09-18 17:17:48 -07005614/**
5615 * RIL_UNSOL_RINGBACK_TONE
5616 *
5617 * Indicates that nework doesn't have in-band information, need to
5618 * play out-band tone.
5619 *
5620 * "data" is an int *
5621 * ((int *)data)[0] == 0 for stop play ringback tone.
5622 * ((int *)data)[0] == 1 for start play ringback tone.
5623 */
5624#define RIL_UNSOL_RINGBACK_TONE 1029
5625
John Wang5909cf82010-01-29 00:18:54 -08005626/**
5627 * RIL_UNSOL_RESEND_INCALL_MUTE
5628 *
5629 * Indicates that framework/application need reset the uplink mute state.
5630 *
5631 * There may be situations where the mute state becomes out of sync
5632 * between the application and device in some GSM infrastructures.
5633 *
5634 * "data" is null
5635 */
5636#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08005637
5638/**
5639 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
5640 *
5641 * Called when CDMA subscription source changed.
5642 *
5643 * "data" is int *
5644 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
5645 */
Wink Saville29487ef2011-04-15 09:15:31 -07005646#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08005647
5648/**
5649 * RIL_UNSOL_CDMA_PRL_CHANGED
5650 *
5651 * Called when PRL (preferred roaming list) changes.
5652 *
5653 * "data" is int *
5654 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
5655 */
5656#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
5657
5658/**
5659 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
5660 *
5661 * Called when Emergency Callback Mode Ends
5662 *
5663 * Indicates that the radio system selection module has
5664 * proactively exited emergency callback mode.
5665 *
5666 * "data" is NULL
5667 *
5668 */
5669#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
5670
Wink Saville5b9df332011-04-06 16:24:21 -07005671/**
5672 * RIL_UNSOL_RIL_CONNECTED
5673 *
5674 * Called the ril connects and returns the version
5675 *
5676 * "data" is int *
5677 * ((int *)data)[0] is RIL_VERSION
5678 */
5679#define RIL_UNSOL_RIL_CONNECTED 1034
5680
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005681/**
5682 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
5683 *
5684 * Indicates that voice technology has changed. Contains new radio technology
5685 * as a data in the message.
5686 *
5687 * "data" is int *
5688 * ((int *)data)[0] is of type const RIL_RadioTechnology
5689 *
5690 */
5691#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
5692
Wink Saville8a9e0212013-04-09 12:11:38 -07005693/**
5694 * RIL_UNSOL_CELL_INFO_LIST
5695 *
5696 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
5697 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
5698 *
5699 * "data" is NULL
5700 *
Sanket Padawef53c5fa2016-01-27 10:00:38 -08005701 * "response" is an array of RIL_CellInfo_v12.
Wink Saville8a9e0212013-04-09 12:11:38 -07005702 */
5703#define RIL_UNSOL_CELL_INFO_LIST 1036
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005704
Wink Saville865ce3b2013-11-08 16:37:01 -08005705/**
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005706 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
5707 *
Nathan Harold0eb43c22016-12-19 12:04:32 -08005708 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
5709 * instead, provide IMS registration status via an IMS Service.
5710 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005711 * Called when IMS registration state has changed
5712 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005713 * To get IMS registration state and IMS SMS format, callee needs to invoke the
5714 * following request on main thread:
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005715 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005716 * RIL_REQUEST_IMS_REGISTRATION_STATE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005717 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005718 * "data" is NULL
5719 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005720 */
5721#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
5722
Etan Cohend3652192014-06-20 08:28:44 -07005723/**
5724 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
5725 *
5726 * Indicated when there is a change in subscription status.
5727 * This event will be sent in the following scenarios
5728 * - subscription readiness at modem, which was selected by telephony layer
5729 * - when subscription is deactivated by modem due to UICC card removal
5730 * - When network invalidates the subscription i.e. attach reject due to authentication reject
5731 *
5732 * "data" is const int *
5733 * ((const int *)data)[0] == 0 for Subscription Deactivated
5734 * ((const int *)data)[0] == 1 for Subscription Activated
5735 *
5736 */
5737#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
5738
5739/**
5740 * RIL_UNSOL_SRVCC_STATE_NOTIFY
5741 *
5742 * Called when Single Radio Voice Call Continuity(SRVCC)
5743 * progress state has changed
5744 *
5745 * "data" is int *
5746 * ((int *)data)[0] is of type const RIL_SrvccState
5747 *
5748 */
5749
5750#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
5751
5752/**
5753 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
5754 *
5755 * Called when the hardware configuration associated with the RILd changes
5756 *
5757 * "data" is an array of RIL_HardwareConfig
5758 *
5759 */
5760#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
5761
Wink Savillec29360a2014-07-13 05:17:28 -07005762/**
5763 * RIL_UNSOL_DC_RT_INFO_CHANGED
5764 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005765 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005766 * Sent when the DC_RT_STATE changes but the time
5767 * between these messages must not be less than the
5768 * value set by RIL_REQUEST_SET_DC_RT_RATE.
5769 *
5770 * "data" is the most recent RIL_DcRtInfo
5771 *
5772 */
5773#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
5774
Wink Saville8b4e4f72014-10-17 15:01:45 -07005775/**
5776 * RIL_UNSOL_RADIO_CAPABILITY
5777 *
5778 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
5779 * Returns the phone radio capability exactly as
5780 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
5781 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
5782 *
5783 * "data" is the RIL_RadioCapability structure
5784 */
5785#define RIL_UNSOL_RADIO_CAPABILITY 1042
5786
Amit Mahajan54563d32014-11-22 00:54:49 +00005787/*
5788 * RIL_UNSOL_ON_SS
5789 *
5790 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
5791 * call control.
5792 *
5793 * "data" is const RIL_StkCcUnsolSsResponse *
5794 *
5795 */
5796#define RIL_UNSOL_ON_SS 1043
5797
5798/**
5799 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
5800 *
5801 * Called when there is an ALPHA from UICC during Call Control.
5802 *
5803 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
5804 *
5805 */
5806#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
5807
fengluf7408292015-04-14 14:53:55 -07005808/**
5809 * RIL_UNSOL_LCEDATA_RECV
5810 *
5811 * Called when there is an incoming Link Capacity Estimate (LCE) info report.
5812 *
fenglu290add32015-05-01 17:05:15 -07005813 * "data" is the RIL_LceDataInfo structure.
fengluf7408292015-04-14 14:53:55 -07005814 *
5815 */
5816#define RIL_UNSOL_LCEDATA_RECV 1045
5817
Robert Greenwalt27e99c52016-06-01 16:31:38 -07005818 /**
5819 * RIL_UNSOL_PCO_DATA
5820 *
5821 * Called when there is new Carrier PCO data received for a data call. Ideally
5822 * only new data will be forwarded, though this is not required. Multiple
5823 * boxes of carrier PCO data for a given call should result in a series of
5824 * RIL_UNSOL_PCO_DATA calls.
5825 *
5826 * "data" is the RIL_PCO_Data structure.
5827 *
5828 */
5829#define RIL_UNSOL_PCO_DATA 1046
5830
Naveen Kalla90ddf072016-09-14 13:41:04 -07005831 /**
5832 * RIL_UNSOL_MODEM_RESTART
5833 *
5834 * Called when there is a modem reset.
5835 *
5836 * "reason" is "const char *" containing the reason for the reset. It
5837 * could be a crash signature if the restart was due to a crash or some
5838 * string such as "user-initiated restart" or "AT command initiated
5839 * restart" that explains the cause of the modem restart.
5840 *
5841 * When modem restarts, one of the following radio state transitions will happen
5842 * 1) RADIO_STATE_ON->RADIO_STATE_UNAVAILABLE->RADIO_STATE_ON or
5843 * 2) RADIO_STATE_OFF->RADIO_STATE_UNAVAILABLE->RADIO_STATE_OFF
5844 * This message can be sent either just before the RADIO_STATE changes to RADIO_STATE_UNAVAILABLE
5845 * or just after but should never be sent after the RADIO_STATE changes from UNAVAILABLE to
5846 * AVAILABLE(RADIO_STATE_ON/RADIO_STATE_OFF) again.
5847 *
5848 * It should NOT be sent after the RADIO_STATE changes to AVAILABLE after the
5849 * modem restart as that could be interpreted as a second modem reset by the
5850 * framework.
5851 */
5852#define RIL_UNSOL_MODEM_RESTART 1047
5853
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005854/***********************************************************************/
5855
Amit Mahajan54563d32014-11-22 00:54:49 +00005856
Etan Cohend3652192014-06-20 08:28:44 -07005857#if defined(ANDROID_MULTI_SIM)
5858/**
5859 * RIL_Request Function pointer
5860 *
5861 * @param request is one of RIL_REQUEST_*
5862 * @param data is pointer to data defined for that RIL_REQUEST_*
5863 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07005864 * structures passed as data may contain pointers to non-contiguous memory
Etan Cohend3652192014-06-20 08:28:44 -07005865 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07005866 * @param datalen is the length of "data" which is defined as other argument. It may or may
5867 * not be equal to sizeof(data). Refer to the documentation of individual structures
5868 * to find if pointers listed in the structure are contiguous and counted in the datalen
5869 * length or not.
5870 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
Etan Cohend3652192014-06-20 08:28:44 -07005871 *
5872 */
5873typedef void (*RIL_RequestFunc) (int request, void *data,
5874 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
5875
5876/**
5877 * This function should return the current radio state synchronously
5878 */
5879typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
5880
5881#else
5882/* Backward compatible */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005883
5884/**
5885 * RIL_Request Function pointer
5886 *
5887 * @param request is one of RIL_REQUEST_*
5888 * @param data is pointer to data defined for that RIL_REQUEST_*
5889 * data is owned by caller, and should not be modified or freed by callee
Sanket Padawe05c23072016-08-08 15:42:17 -07005890 * structures passed as data may contain pointers to non-contiguous memory
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005891 * @param t should be used in subsequent call to RIL_onResponse
Sanket Padawe05c23072016-08-08 15:42:17 -07005892 * @param datalen is the length of "data" which is defined as other argument. It may or may
5893 * not be equal to sizeof(data). Refer to the documentation of individual structures
5894 * to find if pointers listed in the structure are contiguous and counted in the datalen
5895 * length or not.
5896 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005897 *
5898 */
Wink Saville7f856802009-06-09 10:23:37 -07005899typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005900 size_t datalen, RIL_Token t);
5901
5902/**
5903 * This function should return the current radio state synchronously
5904 */
5905typedef RIL_RadioState (*RIL_RadioStateRequest)();
5906
Etan Cohend3652192014-06-20 08:28:44 -07005907#endif
5908
5909
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005910/**
5911 * This function returns "1" if the specified RIL_REQUEST code is
5912 * supported and 0 if it is not
5913 *
5914 * @param requestCode is one of RIL_REQUEST codes
5915 */
5916
5917typedef int (*RIL_Supports)(int requestCode);
5918
5919/**
Wink Saville7f856802009-06-09 10:23:37 -07005920 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005921 * thread that calls RIL_RequestFunc--and indicates that a pending
5922 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07005923 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005924 * On cancel, the callee should do its best to abandon the request and
5925 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
5926 *
5927 * Subsequent calls to RIL_onRequestComplete for this request with
5928 * other results will be tolerated but ignored. (That is, it is valid
5929 * to ignore the cancellation request)
5930 *
5931 * RIL_Cancel calls should return immediately, and not wait for cancellation
5932 *
Wink Saville7f856802009-06-09 10:23:37 -07005933 * 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 -08005934 * interface
5935 *
5936 * @param t token wants to be canceled
5937 */
5938
5939typedef void (*RIL_Cancel)(RIL_Token t);
5940
5941typedef void (*RIL_TimedCallback) (void *param);
5942
5943/**
5944 * Return a version string for your RIL implementation
5945 */
5946typedef const char * (*RIL_GetVersion) (void);
5947
5948typedef struct {
5949 int version; /* set to RIL_VERSION */
5950 RIL_RequestFunc onRequest;
5951 RIL_RadioStateRequest onStateRequest;
5952 RIL_Supports supports;
5953 RIL_Cancel onCancel;
5954 RIL_GetVersion getVersion;
5955} RIL_RadioFunctions;
5956
Sungmin Choi75697532013-04-26 15:04:45 -07005957typedef struct {
5958 char *apn;
5959 char *protocol;
5960 int authtype;
5961 char *username;
5962 char *password;
5963} RIL_InitialAttachApn;
5964
Amit Mahajan2b772032014-06-26 14:20:11 -07005965typedef struct {
5966 int authContext; /* P2 value of authentication command, see P2 parameter in
5967 3GPP TS 31.102 7.1.2 */
5968 char *authData; /* the challenge string in Base64 format, see 3GPP
5969 TS 31.102 7.1.2 */
5970 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
5971 NULL if no value. */
5972} RIL_SimAuthentication;
5973
Robert Greenwalt17ea3fa2016-06-15 14:59:38 -07005974typedef struct {
5975 int cid; /* Context ID, uniquely identifies this call */
5976 char *bearer_proto; /* One of the PDP_type values in TS 27.007 section 10.1.1.
5977 For example, "IP", "IPV6", "IPV4V6" */
5978 int pco_id; /* The protocol ID for this box. Note that only IDs from
5979 FF00H - FFFFH are accepted. If more than one is included
5980 from the network, multiple calls should be made to send all
5981 of them. */
5982 int contents_length; /* The number of octets in the contents. */
5983 char *contents; /* Carrier-defined content. It is binary, opaque and
5984 loosely defined in LTE Layer 3 spec 24.008 */
5985} RIL_PCO_Data;
5986
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005987#ifdef RIL_SHLIB
5988struct RIL_Env {
5989 /**
5990 * "t" is parameter passed in on previous call to RIL_Notification
5991 * routine.
5992 *
5993 * If "e" != SUCCESS, then response can be null/is ignored
5994 *
Wink Saville7f856802009-06-09 10:23:37 -07005995 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005996 * freed by callee
5997 *
5998 * RIL_onRequestComplete will return as soon as possible
5999 */
Wink Saville7f856802009-06-09 10:23:37 -07006000 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006001 void *response, size_t responselen);
6002
Etan Cohend3652192014-06-20 08:28:44 -07006003#if defined(ANDROID_MULTI_SIM)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006004 /**
6005 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
6006 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6007 *
6008 * "data" is owned by caller, and should not be modified or freed by callee
6009 */
Etan Cohend3652192014-06-20 08:28:44 -07006010 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
6011#else
6012 /**
6013 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
6014 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6015 *
6016 * "data" is owned by caller, and should not be modified or freed by callee
6017 */
6018 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
6019#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006020 /**
Wink Saville7f856802009-06-09 10:23:37 -07006021 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006022 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6023 * a relative time value at which the callback is invoked. If relativeTime is
6024 * NULL or points to a 0-filled structure, the callback will be invoked as
6025 * soon as possible
6026 */
6027
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07006028 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07006029 void *param, const struct timeval *relativeTime);
Sanket Padawe6ff9a872016-01-27 15:09:12 -08006030 /**
6031 * "t" is parameter passed in on previous call RIL_Notification routine
6032 *
6033 * RIL_onRequestAck will be called by vendor when an Async RIL request was received
6034 * by them and an ack needs to be sent back to java ril.
6035 */
6036 void (*OnRequestAck) (RIL_Token t);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006037};
6038
6039
Wink Saville7f856802009-06-09 10:23:37 -07006040/**
6041 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006042 * argc and argv will be command line arguments intended for the RIL implementation
6043 * Return NULL on error
6044 *
6045 * @param env is environment point defined as RIL_Env
6046 * @param argc number of arguments
6047 * @param argv list fo arguments
6048 *
6049 */
6050const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
6051
Sanket Padawe1be49ba2016-03-31 17:37:23 -07006052/**
6053 * If BT SAP(SIM Access Profile) is supported, then RIL implementations must define RIL_SAP_Init
6054 * for initializing RIL_RadioFunctions used for BT SAP communcations. It is called whenever RILD
6055 * starts or modem restarts. Returns handlers for SAP related request that are made on SAP
6056 * sepecific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init
6057 * and used on the general RIL socket.
6058 * argc and argv will be command line arguments intended for the RIL implementation
6059 * Return NULL on error.
6060 *
6061 * @param env is environment point defined as RIL_Env
6062 * @param argc number of arguments
6063 * @param argv list fo arguments
6064 *
6065 */
6066const RIL_RadioFunctions *RIL_SAP_Init(const struct RIL_Env *env, int argc, char **argv);
6067
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006068#else /* RIL_SHLIB */
6069
6070/**
6071 * Call this once at startup to register notification routine
6072 *
6073 * @param callbacks user-specifed callback function
6074 */
6075void RIL_register (const RIL_RadioFunctions *callbacks);
6076
Amit Mahajan18fe36b2016-08-25 11:19:21 -07006077void rilc_thread_pool();
6078
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006079
6080/**
6081 *
6082 * RIL_onRequestComplete will return as soon as possible
6083 *
6084 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07006085 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006086 * @param e error code
6087 * if "e" != SUCCESS, then response can be null/is ignored
6088 * @param response is owned by caller, and should not be modified or
6089 * freed by callee
6090 * @param responselen the length of response in byte
6091 */
Wink Saville7f856802009-06-09 10:23:37 -07006092void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006093 void *response, size_t responselen);
6094
Sanket Padawe6ff9a872016-01-27 15:09:12 -08006095/**
6096 * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and
6097 * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's
6098 * results, just that the command was received and will take a while. After sending this Ack
6099 * its vendor's responsibility to make sure that AP is up whenever needed while command is
6100 * being processed.
6101 *
6102 * @param t is parameter passed in on previous call to RIL_Notification
6103 * routine.
6104 */
6105void RIL_onRequestAck(RIL_Token t);
6106
Etan Cohend3652192014-06-20 08:28:44 -07006107#if defined(ANDROID_MULTI_SIM)
6108/**
6109 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6110 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6111 * "data" is owned by caller, and should not be modified or freed by callee
6112 * @param datalen the length of data in byte
6113 */
6114
6115void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
6116 size_t datalen, RIL_SOCKET_ID socket_id);
6117#else
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006118/**
6119 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6120 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6121 * "data" is owned by caller, and should not be modified or freed by callee
6122 * @param datalen the length of data in byte
6123 */
6124
Wink Saville7f856802009-06-09 10:23:37 -07006125void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006126 size_t datalen);
Etan Cohend3652192014-06-20 08:28:44 -07006127#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006128
6129/**
Wink Saville7f856802009-06-09 10:23:37 -07006130 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006131 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6132 * a relative time value at which the callback is invoked. If relativeTime is
6133 * NULL or points to a 0-filled structure, the callback will be invoked as
6134 * soon as possible
6135 *
6136 * @param callback user-specifed callback function
6137 * @param param parameter list
6138 * @param relativeTime a relative time value at which the callback is invoked
6139 */
6140
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07006141void RIL_requestTimedCallback (RIL_TimedCallback callback,
6142 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006143
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08006144#endif /* RIL_SHLIB */
6145
6146#ifdef __cplusplus
6147}
6148#endif
6149
6150#endif /*ANDROID_RIL_H*/