blob: fd5ddaf3f84bd6962b293e553803be19e390222d [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
Narayan Kamath2e8e6692016-01-26 09:45:05 +000060 * RIL_VERSION = 11 : 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,
Narayan Kamath2e8e6692016-01-26 09:45:05 +000063 * RIL_LTE_SignalStrength_v8 & RIL_SignalStrength_v10.
Sanket Padawe88cf6a52016-01-11 12:45:43 -080064 *
Narayan Kamath2e8e6692016-01-26 09:45:05 +000065 * RIL_VERSION = 12 : This version includes new wakelock semantics.
Sanket Padawe88cf6a52016-01-11 12:45:43 -080066 */
Narayan Kamath2e8e6692016-01-26 09:45:05 +000067#define RIL_VERSION 11
68#define LAST_IMPRECISE_RIL_VERSION 11 // Better self-documented name
Alex Yakavenka45e740e2012-01-31 11:48:27 -080069#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080070
Wink Savillea592eeb2009-05-22 13:26:36 -070071#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
72#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
73
Etan Cohend3652192014-06-20 08:28:44 -070074#define MAX_RILDS 3
75#define MAX_SOCKET_NAME_LENGTH 6
76#define MAX_CLIENT_ID_LENGTH 2
77#define MAX_DEBUG_SOCKET_NAME_LENGTH 12
78#define MAX_QEMU_PIPE_NAME_LENGTH 11
Wink Saville8b4e4f72014-10-17 15:01:45 -070079#define MAX_UUID_LENGTH 64
80
Etan Cohend3652192014-06-20 08:28:44 -070081
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080082typedef void * RIL_Token;
83
84typedef enum {
Etan Cohend3652192014-06-20 08:28:44 -070085 RIL_SOCKET_1,
86#if (SIM_COUNT >= 2)
87 RIL_SOCKET_2,
88#if (SIM_COUNT >= 3)
89 RIL_SOCKET_3,
90#endif
91#if (SIM_COUNT >= 4)
92 RIL_SOCKET_4,
93#endif
94#endif
95 RIL_SOCKET_NUM
96} RIL_SOCKET_ID;
97
98
99typedef enum {
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800100 RIL_E_SUCCESS = 0,
101 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
102 RIL_E_GENERIC_FAILURE = 2,
103 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
104 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
105 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
106 RIL_E_REQUEST_NOT_SUPPORTED = 6,
107 RIL_E_CANCELLED = 7,
108 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
109 call on a Class C GPRS device */
110 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
111 registers in network */
Wink Saville3d54e742009-05-18 18:00:44 -0700112 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
113 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
114 shall be retrieved because of SIM or RUIM
Wink Savillef4c4d362009-04-02 01:37:03 -0700115 card absent */
Wink Saville3d54e742009-05-18 18:00:44 -0700116 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
Wink Savillef4c4d362009-04-02 01:37:03 -0700117 location */
jsh602f80f2009-07-10 15:44:37 -0700118 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
John Wang75534472010-04-20 15:11:42 -0700119 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800120 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
John Wang75534472010-04-20 15:11:42 -0700121 illegal SIM or ME */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800122 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
Amit Mahajan54563d32014-11-22 00:54:49 +0000123 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
124 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
125 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
126 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
127 data */
128 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
129 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
130 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
131 request */
132 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
133 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
134 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
fengluf7408292015-04-14 14:53:55 -0700135 RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */
Sooraj Sasindran7e333b32016-01-27 14:30:45 -0800136 RIL_E_LCE_NOT_SUPPORTED = 36, /* LCE service not supported(36 in RILConstants.java) */
137 RIL_E_NO_MEMORY = 37, /* Not sufficient memory to process the request */
138 RIL_E_INTERNAL_ERR = 38, /* Hit unexpected vendor internal error scenario */
139 RIL_E_SYSTEM_ERR = 39, /* Hit platform or system error */
140 RIL_E_MODEM_ERR = 40, /* Hit unexpected modem error */
141 RIL_E_INVALID_STATE = 41, /* Can not process the request as vendor RIL is in
142 invalid state. */
143 RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */
144 RIL_E_SIM_ERR = 43, /* Received error from SIM card */
145 RIL_E_INVALID_ARGUMENTS = 44, /* Received invalid arguments in request */
146 RIL_E_INVALID_SIM_STATE = 45, /* Can not process the request in current SIM state */
147 RIL_E_INVALID_MODEM_STATE = 46, /* Can not process the request in current Modem state */
148 RIL_E_INVALID_CALL_ID = 47, /* Received invalid call id in request */
149 RIL_E_NO_SMS_TO_ACK = 48, /* ACK received when there is no SMS to ack */
150 RIL_E_NETWORK_ERR = 49 /* Received error from network */
Amit Mahajan54563d32014-11-22 00:54:49 +0000151
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800152} RIL_Errno;
153
154typedef enum {
155 RIL_CALL_ACTIVE = 0,
156 RIL_CALL_HOLDING = 1,
157 RIL_CALL_DIALING = 2, /* MO call only */
158 RIL_CALL_ALERTING = 3, /* MO call only */
159 RIL_CALL_INCOMING = 4, /* MT call only */
160 RIL_CALL_WAITING = 5 /* MT call only */
161} RIL_CallState;
162
163typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -0700164 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
165 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800166 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
Wink Savillef4c4d362009-04-02 01:37:03 -0700167 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
Wink Saville7f856802009-06-09 10:23:37 -0700168 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -0700169 personalization locked, or SIM absent */
170 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
171 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
172 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
Wink Saville7f856802009-06-09 10:23:37 -0700173 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -0700174 personalization locked, or RUIM absent */
175 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800176 RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */
177 RADIO_STATE_ON = 10 /* Radio is on */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800178} RIL_RadioState;
179
Wink Saville43808972011-01-13 17:39:51 -0800180typedef enum {
181 RADIO_TECH_UNKNOWN = 0,
182 RADIO_TECH_GPRS = 1,
183 RADIO_TECH_EDGE = 2,
184 RADIO_TECH_UMTS = 3,
185 RADIO_TECH_IS95A = 4,
186 RADIO_TECH_IS95B = 5,
187 RADIO_TECH_1xRTT = 6,
188 RADIO_TECH_EVDO_0 = 7,
189 RADIO_TECH_EVDO_A = 8,
190 RADIO_TECH_HSDPA = 9,
191 RADIO_TECH_HSUPA = 10,
192 RADIO_TECH_HSPA = 11,
193 RADIO_TECH_EVDO_B = 12,
194 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800195 RADIO_TECH_LTE = 14,
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800196 RADIO_TECH_HSPAP = 15, // HSPA+
Etan Cohend3652192014-06-20 08:28:44 -0700197 RADIO_TECH_GSM = 16, // Only supports voice
Yashdev Singh3c8f37c2015-02-23 13:04:28 -0800198 RADIO_TECH_TD_SCDMA = 17,
199 RADIO_TECH_IWLAN = 18
Wink Saville43808972011-01-13 17:39:51 -0800200} RIL_RadioTechnology;
201
Wink Saville8b4e4f72014-10-17 15:01:45 -0700202typedef enum {
203 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
204 RAF_GPRS = (1 << RADIO_TECH_GPRS),
205 RAF_EDGE = (1 << RADIO_TECH_EDGE),
206 RAF_UMTS = (1 << RADIO_TECH_UMTS),
207 RAF_IS95A = (1 << RADIO_TECH_IS95A),
208 RAF_IS95B = (1 << RADIO_TECH_IS95B),
209 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
210 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
211 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
212 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
213 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
214 RAF_HSPA = (1 << RADIO_TECH_HSPA),
215 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
216 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
217 RAF_LTE = (1 << RADIO_TECH_LTE),
218 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
219 RAF_GSM = (1 << RADIO_TECH_GSM),
220 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
221} RIL_RadioAccessFamily;
222
223typedef enum {
224 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
225 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
226 // forthcoming with these same parameters
227 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
228 // RIL_RadioCapability.status = 0, if any START's fail no
229 // APPLY will be sent
230 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
231 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
232 // occurs in any previous command the RIL_RadioAccessesFamily and
Legler Wu8caf06f2014-10-29 14:02:14 +0800233 // logicalModemUuid fields will be the prior configuration thus
Wink Saville8b4e4f72014-10-17 15:01:45 -0700234 // restoring the configuration to the previous value. An error
235 // returned by this command will generally be ignored or may
236 // cause that logical modem to be removed from service.
237} RadioCapabilityPhase;
238
239typedef enum {
240 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
241 // RC_PHASE_APPLY
242 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
243 // capability was success with RC_PHASE_FINISH
244 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
245 // capability is fail with RC_PHASE_FINISH.
246} RadioCapabilityStatus;
247
248#define RIL_RADIO_CAPABILITY_VERSION 1
249typedef struct {
Legler Wu8caf06f2014-10-29 14:02:14 +0800250 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
Wink Saville8b4e4f72014-10-17 15:01:45 -0700251 int session; // Unique session value defined by framework returned in all "responses/unsol"
252 int phase; // CONFIGURED, START, APPLY, FINISH
253 int rat; // RIL_RadioAccessFamily for the radio
254 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
255 int status; // Return status and an input parameter for RC_PHASE_FINISH
256} RIL_RadioCapability;
257
Wink Savillec0114b32011-02-18 10:14:07 -0800258// Do we want to split Data from Voice and the use
259// RIL_RadioTechnology for get/setPreferredVoice/Data ?
260typedef enum {
261 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
262 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
263 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
264 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
265 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
266 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
267 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
268 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
269 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
270 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
271 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
Uma Maheswari Ramalingam0e094872011-09-28 13:25:48 -0700272 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
273 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
Wink Savillec0114b32011-02-18 10:14:07 -0800274} RIL_PreferredNetworkType;
275
276/* Source for cdma subscription */
277typedef enum {
278 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
279 CDMA_SUBSCRIPTION_SOURCE_NV = 1
280} RIL_CdmaSubscriptionSource;
281
Wink Saville74fa3882009-12-22 15:35:41 -0800282/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
283typedef enum {
284 RIL_UUS_TYPE1_IMPLICIT = 0,
285 RIL_UUS_TYPE1_REQUIRED = 1,
286 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
287 RIL_UUS_TYPE2_REQUIRED = 3,
288 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
289 RIL_UUS_TYPE3_REQUIRED = 5,
290 RIL_UUS_TYPE3_NOT_REQUIRED = 6
291} RIL_UUS_Type;
292
293/* User-to-User Signaling Information data coding schemes. Possible values for
294 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
295 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
296typedef enum {
297 RIL_UUS_DCS_USP = 0, /* User specified protocol */
298 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
299 RIL_UUS_DCS_X244 = 2, /* X.244 */
300 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
301 convergence function */
302 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
303} RIL_UUS_DCS;
304
305/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
306 * This data is passed in RIL_ExtensionRecord and rec contains this
307 * structure when type is RIL_UUS_INFO_EXT_REC */
308typedef struct {
309 RIL_UUS_Type uusType; /* UUS Type */
310 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
311 int uusLength; /* Length of UUS Data */
312 char * uusData; /* UUS Data */
313} RIL_UUS_Info;
314
315/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700316typedef struct {
317 char isPresent; /* non-zero if signal information record is present */
318 char signalType; /* as defined 3.7.5.5-1 */
319 char alertPitch; /* as defined 3.7.5.5-2 */
320 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
321} RIL_CDMA_SignalInfoRecord;
322
Wink Saville1b5fd232009-04-22 14:50:00 -0700323typedef struct {
324 RIL_CallState state;
325 int index; /* Connection Index for use with, eg, AT+CHLD */
326 int toa; /* type of address, eg 145 = intl */
327 char isMpty; /* nonzero if is mpty call */
328 char isMT; /* nonzero if call is mobile terminated */
329 char als; /* ALS line indicator if available
330 (0 = line 1) */
331 char isVoice; /* nonzero if this is is a voice call */
332 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
333 char * number; /* Remote party number */
334 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
335 char * name; /* Remote party name */
336 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800337 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800338} RIL_Call;
339
Wink Savillec0114b32011-02-18 10:14:07 -0800340/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800341typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800342 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700343 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700344 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
345 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800346 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800347 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
348} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800349
350/*
351 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
352 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
353 */
354typedef struct {
355 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500356 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
357 back-off timer value RIL wants to override the one
358 pre-configured in FW.
359 The unit is miliseconds.
360 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700361 The value 0 means retry should be done ASAP.
Wink Saville8a9e0212013-04-09 12:11:38 -0700362 The value of INT_MAX(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800363 int cid; /* Context ID, uniquely identifies this call */
364 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
365 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
366 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
367 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
368 such as "IP" or "IPV6" */
369 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800370 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
371 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800372 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800373 one of each. If the prefix length is absent the addresses
374 are assumed to be point to point with IPv4 having a prefix
375 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800376 char * dnses; /* A space-delimited list of DNS server addresses,
377 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
378 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800379 char * gateways; /* A space-delimited list of default gateway addresses,
380 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
381 May be empty in which case the addresses represent point
382 to point connections. */
383} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800384
Etan Cohend3652192014-06-20 08:28:44 -0700385typedef struct {
386 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
387 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
388 back-off timer value RIL wants to override the one
389 pre-configured in FW.
390 The unit is miliseconds.
391 The value < 0 means no value is suggested.
392 The value 0 means retry should be done ASAP.
393 The value of INT_MAX(0x7fffffff) means no retry. */
394 int cid; /* Context ID, uniquely identifies this call */
395 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
396 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
397 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
398 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
399 such as "IP" or "IPV6" */
400 char * ifname; /* The network interface name */
401 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
402 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
403 May not be empty, typically 1 IPv4 or 1 IPv6 or
404 one of each. If the prefix length is absent the addresses
405 are assumed to be point to point with IPv4 having a prefix
406 length of 32 and IPv6 128. */
407 char * dnses; /* A space-delimited list of DNS server addresses,
408 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
409 May be empty. */
410 char * gateways; /* A space-delimited list of default gateway addresses,
411 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
412 May be empty in which case the addresses represent point
413 to point connections. */
414 char * pcscf; /* the Proxy Call State Control Function address
415 via PCO(Protocol Configuration Option) for IMS client. */
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -0700416} RIL_Data_Call_Response_v9;
417
418typedef struct {
419 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
420 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
421 back-off timer value RIL wants to override the one
422 pre-configured in FW.
423 The unit is miliseconds.
424 The value < 0 means no value is suggested.
425 The value 0 means retry should be done ASAP.
426 The value of INT_MAX(0x7fffffff) means no retry. */
427 int cid; /* Context ID, uniquely identifies this call */
428 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
429 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
430 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
431 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
432 such as "IP" or "IPV6" */
433 char * ifname; /* The network interface name */
434 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
435 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
436 May not be empty, typically 1 IPv4 or 1 IPv6 or
437 one of each. If the prefix length is absent the addresses
438 are assumed to be point to point with IPv4 having a prefix
439 length of 32 and IPv6 128. */
440 char * dnses; /* A space-delimited list of DNS server addresses,
441 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
442 May be empty. */
443 char * gateways; /* A space-delimited list of default gateway addresses,
444 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
445 May be empty in which case the addresses represent point
446 to point connections. */
447 char * pcscf; /* the Proxy Call State Control Function address
448 via PCO(Protocol Configuration Option) for IMS client. */
449 int mtu; /* MTU received from network
450 Value <= 0 means network has either not sent a value or
451 sent an invalid value */
452} RIL_Data_Call_Response_v11;
Etan Cohend3652192014-06-20 08:28:44 -0700453
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700454typedef enum {
455 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
456 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
457} RIL_RadioTechnologyFamily;
458
459typedef struct {
460 RIL_RadioTechnologyFamily tech;
461 unsigned char retry; /* 0 == not retry, nonzero == retry */
462 int messageRef; /* Valid field if retry is set to nonzero.
463 Contains messageRef from RIL_SMS_Response
464 corresponding to failed MO SMS.
465 */
466
467 union {
468 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
469 RIL_CDMA_SMS_Message* cdmaMessage;
470
471 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
472 char** gsmMessage;
473 } message;
474} RIL_IMS_SMS_Message;
475
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800476typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800477 int messageRef; /* TP-Message-Reference for GSM,
478 and BearerData MessageId for CDMA
479 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800480 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700481 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
482 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
483 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800484} RIL_SMS_Response;
485
486/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
487typedef struct {
488 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
489 /* 0 = "REC UNREAD" */
490 /* 1 = "REC READ" */
491 /* 2 = "STO UNSENT" */
492 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700493 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
494 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800495 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
496 (as expected by TS 27.005) or NULL for default SMSC */
497} RIL_SMS_WriteArgs;
498
499/** Used by RIL_REQUEST_DIAL */
500typedef struct {
501 char * address;
502 int clir;
503 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
504 * clir == 0 on "use subscription default value"
505 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
506 * clir == 2 on "CLIR suppression" (allow CLI presentation)
507 */
Wink Saville74fa3882009-12-22 15:35:41 -0800508 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800509} RIL_Dial;
510
511typedef struct {
512 int command; /* one of the commands listed for TS 27.007 +CRSM*/
513 int fileid; /* EF id */
514 char *path; /* "pathid" from TS 27.007 +CRSM command.
515 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700516 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800517 */
518 int p1;
519 int p2;
520 int p3;
521 char *data; /* May be NULL*/
522 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800523} RIL_SIM_IO_v5;
524
525typedef struct {
526 int command; /* one of the commands listed for TS 27.007 +CRSM*/
527 int fileid; /* EF id */
528 char *path; /* "pathid" from TS 27.007 +CRSM command.
529 Path is in hex asciii format eg "7f205f70"
530 Path must always be provided.
531 */
532 int p1;
533 int p2;
534 int p3;
535 char *data; /* May be NULL*/
536 char *pin2; /* May be NULL*/
537 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
538} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800539
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800540/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
541 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
542typedef struct {
543 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
544 ignored for +CSIM command. */
545
546 /* Following fields are used to derive the APDU ("command" and "length"
547 values in TS 27.007 +CSIM and +CGLA commands). */
548 int cla;
549 int instruction;
550 int p1;
551 int p2;
552 int p3; /* A negative P3 implies a 4 byte APDU. */
553 char *data; /* May be NULL. In hex string format. */
554} RIL_SIM_APDU;
555
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800556typedef struct {
557 int sw1;
558 int sw2;
Amit Mahajan2875bc22014-08-06 10:03:15 -0700559 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
560 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 -0800561} RIL_SIM_IO_Response;
562
563/* See also com.android.internal.telephony.gsm.CallForwardInfo */
564
565typedef struct {
566 int status; /*
567 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
568 * status 1 = active, 0 = not active
569 *
570 * For RIL_REQUEST_SET_CALL_FORWARD:
571 * status is:
572 * 0 = disable
573 * 1 = enable
574 * 2 = interrogate
575 * 3 = registeration
576 * 4 = erasure
577 */
578
Wink Saville3d54e742009-05-18 18:00:44 -0700579 int reason; /* from TS 27.007 7.11 "reason" */
580 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
581 See table for Android mapping from
582 MMI service code
583 0 means user doesn't input class */
584 int toa; /* "type" from TS 27.007 7.11 */
585 char * number; /* "number" from TS 27.007 7.11. May be NULL */
586 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800587}RIL_CallForwardInfo;
588
589typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700590 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
591 * Upper 16 bits is LAC and lower 16 bits
592 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800593 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700594 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700595 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800596 */
johnwange0ba6a92009-09-11 19:14:52 -0700597 int rssi; /* Received RSSI in GSM,
598 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800599 */
600} RIL_NeighboringCell;
601
fengluf7408292015-04-14 14:53:55 -0700602typedef struct {
603 char lce_status; /* LCE service status:
604 * -1 = not supported;
605 * 0 = stopped;
606 * 1 = active.
607 */
608 unsigned int actual_interval_ms; /* actual LCE reporting interval,
609 * meaningful only if LCEStatus = 1.
610 */
611} RIL_LceStatusInfo;
612
613typedef struct {
fenglu290add32015-05-01 17:05:15 -0700614 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
fengluf7408292015-04-14 14:53:55 -0700615 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
616 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
617 * moves to inactive state or network type change)
618 * 1 = suspended;
619 * 0 = not suspended.
620 */
621} RIL_LceDataInfo;
622
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800623/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
624typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700625 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800626 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
627 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
628 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800629 CALL_FAIL_NORMAL = 16,
630 CALL_FAIL_BUSY = 17,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800631 CALL_FAIL_NO_USER_RESPONDING = 18,
632 CALL_FAIL_NO_ANSWER_FROM_USER = 19,
633 CALL_FAIL_CALL_REJECTED = 21,
634 CALL_FAIL_NUMBER_CHANGED = 22,
635 CALL_FAIL_PREEMPTION = 25,
636 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
637 CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
638 CALL_FAIL_FACILITY_REJECTED = 29,
639 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
640 CALL_FAIL_NORMAL_UNSPECIFIED = 31,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800641 CALL_FAIL_CONGESTION = 34,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800642 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
643 CALL_FAIL_TEMPORARY_FAILURE = 41,
644 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
645 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
646 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
647 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
648 CALL_FAIL_QOS_UNAVAILABLE = 49,
649 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
650 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
651 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
652 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
653 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
654 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800655 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800656 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
657 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
658 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
659 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
660 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
661 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
662 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
663 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
664 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
665 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
666 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
667 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
668 CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
669 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
670 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
671 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
672 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800673 CALL_FAIL_CALL_BARRED = 240,
674 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700675 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
676 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Amit Mahajan54563d32014-11-22 00:54:49 +0000677 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
678 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
679 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
Wink Saville1b5fd232009-04-22 14:50:00 -0700680 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
681 CALL_FAIL_CDMA_DROP = 1001,
682 CALL_FAIL_CDMA_INTERCEPT = 1002,
683 CALL_FAIL_CDMA_REORDER = 1003,
684 CALL_FAIL_CDMA_SO_REJECT = 1004,
685 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
686 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
687 CALL_FAIL_CDMA_PREEMPTED = 1007,
688 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
689 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700690 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
Sooraj Sasindrand2102792014-09-12 17:00:03 +0800691 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
692 vendor code should make sure to map error
693 code to specific error */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800694} RIL_LastCallFailCause;
695
Chao Liu548a81e2015-05-14 16:13:46 -0700696typedef struct {
697 RIL_LastCallFailCause cause_code;
698 char * vendor_cause;
699} RIL_LastCallFailCauseInfo;
700
Wink Savillef4c4d362009-04-02 01:37:03 -0700701/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800702typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800703 PDP_FAIL_NONE = 0, /* No error, connection ok */
704
705 /* an integer cause code defined in TS 24.008
706 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
707 If the implementation does not have access to the exact cause codes,
708 then it should return one of the following values,
709 as the UI layer needs to distinguish these
710 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700711 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
Sanket Padaweac308b92016-01-07 14:41:17 -0800712 PDP_FAIL_NAS_SIGNALLING = 0x0E,
713 PDP_FAIL_LLC_SNDCP = 0x19,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700714 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
715 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
716 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
717 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
718 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
719 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
720 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
721 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
722 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800723 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
Hui Wang11e8b232014-09-19 16:40:17 -0500724 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
725 based on framework config */
Sanket Padaweac308b92016-01-07 14:41:17 -0800726 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
727 PDP_FAIL_NETWORK_FAILURE = 0x26,
728 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
729 PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
730 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
731 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
732 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
733 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
734 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
735 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
Wink Saville43808972011-01-13 17:39:51 -0800736 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
737 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
738 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Sanket Padaweac308b92016-01-07 14:41:17 -0800739 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
740 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
741 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
742 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
743 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
744 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
745 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
746 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
747 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
748 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
749 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
750 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
751 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
752 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
753 PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
754 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
755 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
756 PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
757 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
758 PDP_FAIL_IFACE_MISMATCH = 0x75,
759 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
760 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
761 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
762 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
763 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
Wink Saville43808972011-01-13 17:39:51 -0800764
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700765 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800766 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
767 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800768
769 /* reasons for data call drop - network/modem disconnect */
Wink Saville3492c6e2013-10-03 13:53:27 -0700770 PDP_FAIL_SIGNAL_LOST = -3,
Wink Saville43808972011-01-13 17:39:51 -0800771 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
772 with parameters appropriate for new technology */
773 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
774 powered off - no retry */
775 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
776 mode was up on same APN/data profile - no retry until
777 tethered call is off */
778
Sanket Padaweac308b92016-01-07 14:41:17 -0800779 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
780 new error codes are added making this unnecessary */
Wink Saville43808972011-01-13 17:39:51 -0800781} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800782
jsh602f80f2009-07-10 15:44:37 -0700783/* See RIL_REQUEST_SETUP_DATA_CALL */
784typedef enum {
785 RIL_DATA_PROFILE_DEFAULT = 0,
786 RIL_DATA_PROFILE_TETHERED = 1,
Hui Wang8d679622014-10-16 14:59:27 -0500787 RIL_DATA_PROFILE_IMS = 2,
788 RIL_DATA_PROFILE_FOTA = 3,
789 RIL_DATA_PROFILE_CBS = 4,
790 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
791 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
jsh602f80f2009-07-10 15:44:37 -0700792} RIL_DataProfile;
793
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800794/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
795typedef struct {
796 int notificationType; /*
797 * 0 = MO intermediate result code
798 * 1 = MT unsolicited result code
799 */
800 int code; /* See 27.007 7.17
801 "code1" for MO
802 "code2" for MT. */
803 int index; /* CUG index. See 27.007 7.17. */
804 int type; /* "type" from 27.007 7.17 (MT only). */
805 char * number; /* "number" from 27.007 7.17
806 (MT only, may be NULL). */
807} RIL_SuppSvcNotification;
808
Wink Savillef4c4d362009-04-02 01:37:03 -0700809#define RIL_CARD_MAX_APPS 8
810
811typedef enum {
812 RIL_CARDSTATE_ABSENT = 0,
813 RIL_CARDSTATE_PRESENT = 1,
814 RIL_CARDSTATE_ERROR = 2
815} RIL_CardState;
816
817typedef enum {
818 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
819 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700820 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
821 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700822 involved */
823 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
824 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
825 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
826 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
827 RIL_PERSOSUBSTATE_SIM_SIM = 7,
828 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
829 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
830 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
831 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
832 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
833 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
834 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
835 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
836 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
837 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
838 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
839 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
840 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
841 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
842 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
843 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
844 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
845} RIL_PersoSubstate;
846
847typedef enum {
848 RIL_APPSTATE_UNKNOWN = 0,
849 RIL_APPSTATE_DETECTED = 1,
850 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
851 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700852 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700853 when app_state is assigned to this value */
854 RIL_APPSTATE_READY = 5
855} RIL_AppState;
856
857typedef enum {
858 RIL_PINSTATE_UNKNOWN = 0,
859 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
860 RIL_PINSTATE_ENABLED_VERIFIED = 2,
861 RIL_PINSTATE_DISABLED = 3,
862 RIL_PINSTATE_ENABLED_BLOCKED = 4,
863 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
864} RIL_PinState;
865
866typedef enum {
867 RIL_APPTYPE_UNKNOWN = 0,
868 RIL_APPTYPE_SIM = 1,
869 RIL_APPTYPE_USIM = 2,
870 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -0800871 RIL_APPTYPE_CSIM = 4,
872 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -0700873} RIL_AppType;
874
875typedef struct
876{
Wink Saville7f856802009-06-09 10:23:37 -0700877 RIL_AppType app_type;
878 RIL_AppState app_state;
879 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -0700880 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -0700881 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -0700882 0x30, 0x30, 0x30 */
883 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -0800884 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -0700885 RIL_PinState pin1;
886 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -0700887} RIL_AppStatus;
888
Wink Savillec0114b32011-02-18 10:14:07 -0800889/* Deprecated, use RIL_CardStatus_v6 */
890typedef struct
891{
892 RIL_CardState card_state;
893 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
894 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
895 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
896 int num_applications; /* value <= RIL_CARD_MAX_APPS */
897 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
898} RIL_CardStatus_v5;
899
Wink Savillef4c4d362009-04-02 01:37:03 -0700900typedef struct
901{
Wink Saville7f856802009-06-09 10:23:37 -0700902 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -0700903 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -0800904 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
905 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
906 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -0700907 int num_applications; /* value <= RIL_CARD_MAX_APPS */
908 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -0800909} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -0700910
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800911/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
912 * or as part of RIL_SimRefreshResponse_v7
913 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800914typedef enum {
915 /* A file on SIM has been updated. data[1] contains the EFID. */
916 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800917 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800918 SIM_INIT = 1,
919 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
920 SIM_RESET = 2
921} RIL_SimRefreshResult;
922
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800923typedef struct {
924 RIL_SimRefreshResult result;
925 int ef_id; /* is the EFID of the updated file if the result is */
926 /* SIM_FILE_UPDATE or 0 for any other result. */
927 char * aid; /* is AID(application ID) of the card application */
928 /* See ETSI 102.221 8.1 and 101.220 4 */
929 /* For SIM_FILE_UPDATE result it can be set to AID of */
930 /* application in which updated EF resides or it can be */
931 /* NULL if EF is outside of an application. */
932 /* For SIM_INIT result this field is set to AID of */
933 /* application that caused REFRESH */
934 /* For SIM_RESET result it is NULL. */
935} RIL_SimRefreshResponse_v7;
936
Wink Savillec0114b32011-02-18 10:14:07 -0800937/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
938typedef struct {
939 char * number; /* Remote party number */
940 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
941 char * name; /* Remote party name */
942 RIL_CDMA_SignalInfoRecord signalInfoRecord;
943} RIL_CDMA_CallWaiting_v5;
944
Wink Saville1b5fd232009-04-22 14:50:00 -0700945typedef struct {
946 char * number; /* Remote party number */
947 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
948 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -0700949 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -0800950 /* Number type/Number plan required to support International Call Waiting */
951 int number_type; /* 0=Unknown, 1=International, 2=National,
952 3=Network specific, 4=subscriber */
953 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
954} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -0700955
Wink Savillea592eeb2009-05-22 13:26:36 -0700956/**
957 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
958 *
959 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
960 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
961 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
962 * CBM message ID.
963 *
964 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
965 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
966 * and 9.4.4.2.3 for UMTS.
967 * All other values can be treated as empty CBM data coding scheme.
968 *
969 * selected 0 means message types specified in <fromServiceId, toServiceId>
970 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
971 *
972 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
973 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
974 */
Wink Savillef4c4d362009-04-02 01:37:03 -0700975typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -0700976 int fromServiceId;
977 int toServiceId;
978 int fromCodeScheme;
979 int toCodeScheme;
980 unsigned char selected;
981} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -0700982
The Android Open Source Project34a51082009-03-05 14:34:37 -0800983/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
984#define RIL_RESTRICTED_STATE_NONE 0x00
985/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
986#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
987/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
988#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -0700989/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -0800990#define RIL_RESTRICTED_STATE_CS_ALL 0x04
991/* Block packet data access due to restriction. */
992#define RIL_RESTRICTED_STATE_PS_ALL 0x10
993
Wink Saville1b5fd232009-04-22 14:50:00 -0700994/* The status for an OTASP/OTAPA session */
995typedef enum {
996 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
997 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
998 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
999 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
1000 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
1001 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
1002 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
1003 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
1004 CDMA_OTA_PROVISION_STATUS_COMMITTED,
1005 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
1006 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
1007 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
1008} RIL_CDMA_OTA_ProvisionStatus;
1009
1010typedef struct {
1011 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1012 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1013} RIL_GW_SignalStrength;
1014
Wink Savillec57b3eb2013-04-17 12:51:41 -07001015typedef struct {
1016 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1017 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1018} RIL_SignalStrengthWcdma;
Wink Saville1b5fd232009-04-22 14:50:00 -07001019
1020typedef struct {
1021 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1022 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1023 * value will be 75.
1024 */
1025 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1026 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1027 * will be 125.
1028 */
1029} RIL_CDMA_SignalStrength;
1030
1031
1032typedef struct {
1033 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1034 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1035 * value will be 75.
1036 */
1037 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1038 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1039 * will be 125.
1040 */
1041 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
1042} RIL_EVDO_SignalStrength;
1043
Wink Savillec0114b32011-02-18 10:14:07 -08001044typedef struct {
1045 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -07001046 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1047 * Range: 44 to 140 dBm
1048 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1049 * Reference: 3GPP TS 36.133 9.1.4 */
1050 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1051 * Range: 20 to 3 dB.
1052 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1053 * Reference: 3GPP TS 36.133 9.1.7 */
1054 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1055 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1056 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1057 * Reference: 3GPP TS 36.101 8.1.1 */
1058 int cqi; /* The current Channel Quality Indicator.
1059 * Range: 0 to 15.
1060 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1061 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -08001062} RIL_LTE_SignalStrength;
1063
Wink Saville8a9e0212013-04-09 12:11:38 -07001064typedef struct {
1065 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1066 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1067 * Range: 44 to 140 dBm
1068 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1069 * Reference: 3GPP TS 36.133 9.1.4 */
1070 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1071 * Range: 20 to 3 dB.
1072 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1073 * Reference: 3GPP TS 36.133 9.1.7 */
1074 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1075 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1076 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1077 * Reference: 3GPP TS 36.101 8.1.1 */
1078 int cqi; /* The current Channel Quality Indicator.
1079 * Range: 0 to 15.
1080 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1081 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1082 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
1083 * Approximate distance can be calculated using 300m/us * timingAdvance.
1084 * Range: 0 to 0x7FFFFFFE
1085 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1086 * Reference: 3GPP 36.321 section 6.1.3.5
1087 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1088} RIL_LTE_SignalStrength_v8;
1089
Etan Cohend3652192014-06-20 08:28:44 -07001090typedef struct {
1091 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
1092 * Range : 25 to 120
1093 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1094 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1095} RIL_TD_SCDMA_SignalStrength;
1096
Wink Savillec0114b32011-02-18 10:14:07 -08001097/* Deprecated, use RIL_SignalStrength_v6 */
1098typedef struct {
1099 RIL_GW_SignalStrength GW_SignalStrength;
1100 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1101 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1102} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -07001103
1104typedef struct {
1105 RIL_GW_SignalStrength GW_SignalStrength;
1106 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1107 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -08001108 RIL_LTE_SignalStrength LTE_SignalStrength;
1109} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001110
Wink Saville8a9e0212013-04-09 12:11:38 -07001111typedef struct {
1112 RIL_GW_SignalStrength GW_SignalStrength;
1113 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1114 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1115 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1116} RIL_SignalStrength_v8;
1117
Etan Cohend3652192014-06-20 08:28:44 -07001118typedef struct {
1119 RIL_GW_SignalStrength GW_SignalStrength;
1120 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1121 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1122 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1123 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1124} RIL_SignalStrength_v10;
1125
Narayan Kamath2e8e6692016-01-26 09:45:05 +00001126/** RIL_CellIdentityGsm */
Wink Saville8a9e0212013-04-09 12:11:38 -07001127typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001128 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1129 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1130 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1131 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 -07001132} RIL_CellIdentityGsm;
1133
Narayan Kamath2e8e6692016-01-26 09:45:05 +00001134/** RIL_CellIdentityWcdma */
Wink Savillec57b3eb2013-04-17 12:51:41 -07001135typedef struct {
1136 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1137 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1138 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1139 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1140 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1141} RIL_CellIdentityWcdma;
1142
Narayan Kamath2e8e6692016-01-26 09:45:05 +00001143/** RIL_CellIdentityCdma */
Wink Saville8a9e0212013-04-09 12:11:38 -07001144typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001145 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1146 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1147 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001148 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1149 * It is represented in units of 0.25 seconds and ranges from -2592000
1150 * to 2592000, both values inclusive (corresponding to a range of -180
Wink Savillec57b3eb2013-04-17 12:51:41 -07001151 * to +180 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001152
1153 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1154 * It is represented in units of 0.25 seconds and ranges from -1296000
1155 * to 1296000, both values inclusive (corresponding to a range of -90
Wink Savillec57b3eb2013-04-17 12:51:41 -07001156 * to +90 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001157} RIL_CellIdentityCdma;
1158
Narayan Kamath2e8e6692016-01-26 09:45:05 +00001159/** RIL_CellIdentityLte */
Wink Saville8a9e0212013-04-09 12:11:38 -07001160typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001161 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1162 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1163 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1164 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1165 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001166} RIL_CellIdentityLte;
1167
Narayan Kamath2e8e6692016-01-26 09:45:05 +00001168/** RIL_CellIdentityTdscdma */
Etan Cohend3652192014-06-20 08:28:44 -07001169typedef struct {
1170 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1171 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1172 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1173 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1174 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1175} RIL_CellIdentityTdscdma;
1176
Narayan Kamath2e8e6692016-01-26 09:45:05 +00001177/** RIL_CellInfoGsm */
Wink Saville8a9e0212013-04-09 12:11:38 -07001178typedef struct {
1179 RIL_CellIdentityGsm cellIdentityGsm;
1180 RIL_GW_SignalStrength signalStrengthGsm;
1181} RIL_CellInfoGsm;
1182
Narayan Kamath2e8e6692016-01-26 09:45:05 +00001183/** RIL_CellInfoWcdma */
Wink Savillec57b3eb2013-04-17 12:51:41 -07001184typedef struct {
1185 RIL_CellIdentityWcdma cellIdentityWcdma;
1186 RIL_SignalStrengthWcdma signalStrengthWcdma;
1187} RIL_CellInfoWcdma;
1188
Narayan Kamath2e8e6692016-01-26 09:45:05 +00001189/** RIL_CellInfoCdma */
Wink Saville8a9e0212013-04-09 12:11:38 -07001190typedef struct {
1191 RIL_CellIdentityCdma cellIdentityCdma;
1192 RIL_CDMA_SignalStrength signalStrengthCdma;
1193 RIL_EVDO_SignalStrength signalStrengthEvdo;
1194} RIL_CellInfoCdma;
1195
Narayan Kamath2e8e6692016-01-26 09:45:05 +00001196/** RIL_CellInfoLte */
Wink Saville8a9e0212013-04-09 12:11:38 -07001197typedef struct {
1198 RIL_CellIdentityLte cellIdentityLte;
1199 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1200} RIL_CellInfoLte;
1201
Narayan Kamath2e8e6692016-01-26 09:45:05 +00001202/** RIL_CellInfoTdscdma */
Etan Cohend3652192014-06-20 08:28:44 -07001203typedef struct {
1204 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1205 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1206} RIL_CellInfoTdscdma;
1207
Wink Saville8a9e0212013-04-09 12:11:38 -07001208// Must be the same as CellInfo.TYPE_XXX
1209typedef enum {
1210 RIL_CELL_INFO_TYPE_GSM = 1,
1211 RIL_CELL_INFO_TYPE_CDMA = 2,
1212 RIL_CELL_INFO_TYPE_LTE = 3,
Wink Savillec57b3eb2013-04-17 12:51:41 -07001213 RIL_CELL_INFO_TYPE_WCDMA = 4,
Etan Cohend3652192014-06-20 08:28:44 -07001214 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
Wink Saville8a9e0212013-04-09 12:11:38 -07001215} RIL_CellInfoType;
1216
1217// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1218typedef enum {
1219 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1220 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1221 RIL_TIMESTAMP_TYPE_MODEM = 2,
1222 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1223 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1224} RIL_TimeStampType;
1225
1226typedef struct {
1227 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1228 int registered; /* !0 if this cell is registered 0 if not registered */
1229 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1230 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1231 union {
1232 RIL_CellInfoGsm gsm;
1233 RIL_CellInfoCdma cdma;
1234 RIL_CellInfoLte lte;
Wink Savillec57b3eb2013-04-17 12:51:41 -07001235 RIL_CellInfoWcdma wcdma;
Etan Cohend3652192014-06-20 08:28:44 -07001236 RIL_CellInfoTdscdma tdscdma;
Wink Saville8a9e0212013-04-09 12:11:38 -07001237 } CellInfo;
1238} RIL_CellInfo;
1239
Wink Saville1b5fd232009-04-22 14:50:00 -07001240/* Names of the CDMA info records (C.S0005 section 3.7.5) */
1241typedef enum {
1242 RIL_CDMA_DISPLAY_INFO_REC,
1243 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1244 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1245 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1246 RIL_CDMA_SIGNAL_INFO_REC,
1247 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1248 RIL_CDMA_LINE_CONTROL_INFO_REC,
1249 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1250 RIL_CDMA_T53_CLIR_INFO_REC,
1251 RIL_CDMA_T53_RELEASE_INFO_REC,
1252 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1253} RIL_CDMA_InfoRecName;
1254
1255/* Display Info Rec as defined in C.S0005 section 3.7.5.1
1256 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1257 Note: the Extended Display info rec contains multiple records of the
1258 form: display_tag, display_len, and display_len occurrences of the
1259 chari field if the display_tag is not 10000000 or 10000001.
1260 To save space, the records are stored consecutively in a byte buffer.
1261 The display_tag, display_len and chari fields are all 1 byte.
1262*/
1263
1264typedef struct {
1265 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001266 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001267} RIL_CDMA_DisplayInfoRecord;
1268
1269/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1270 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1271 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1272*/
1273
1274typedef struct {
1275 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001276 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001277 char number_type;
1278 char number_plan;
1279 char pi;
1280 char si;
1281} RIL_CDMA_NumberInfoRecord;
1282
1283/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1284typedef enum {
1285 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1286 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1287 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1288 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1289 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1290 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1291 RIL_REDIRECTING_REASON_RESERVED
1292} RIL_CDMA_RedirectingReason;
1293
1294typedef struct {
1295 RIL_CDMA_NumberInfoRecord redirectingNumber;
1296 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1297 RIL_CDMA_RedirectingReason redirectingReason;
1298} RIL_CDMA_RedirectingNumberInfoRecord;
1299
1300/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1301typedef struct {
1302 char lineCtrlPolarityIncluded;
1303 char lineCtrlToggle;
1304 char lineCtrlReverse;
1305 char lineCtrlPowerDenial;
1306} RIL_CDMA_LineControlInfoRecord;
1307
1308/* T53 CLIR Information Record */
1309typedef struct {
1310 char cause;
1311} RIL_CDMA_T53_CLIRInfoRecord;
1312
1313/* T53 Audio Control Information Record */
1314typedef struct {
1315 char upLink;
1316 char downLink;
1317} RIL_CDMA_T53_AudioControlInfoRecord;
1318
1319typedef struct {
1320
1321 RIL_CDMA_InfoRecName name;
1322
1323 union {
1324 /* Display and Extended Display Info Rec */
1325 RIL_CDMA_DisplayInfoRecord display;
1326
1327 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1328 RIL_CDMA_NumberInfoRecord number;
1329
1330 /* Signal Info Rec */
1331 RIL_CDMA_SignalInfoRecord signal;
1332
1333 /* Redirecting Number Info Rec */
1334 RIL_CDMA_RedirectingNumberInfoRecord redir;
1335
1336 /* Line Control Info Rec */
1337 RIL_CDMA_LineControlInfoRecord lineCtrl;
1338
1339 /* T53 CLIR Info Rec */
1340 RIL_CDMA_T53_CLIRInfoRecord clir;
1341
1342 /* T53 Audio Control Info Rec */
1343 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1344 } rec;
1345} RIL_CDMA_InformationRecord;
1346
1347#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1348
1349typedef struct {
1350 char numberOfInfoRecs;
1351 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1352} RIL_CDMA_InformationRecords;
1353
Jake Hamby8a4a2332014-01-15 13:12:05 -08001354/* See RIL_REQUEST_NV_READ_ITEM */
1355typedef struct {
1356 RIL_NV_Item itemID;
1357} RIL_NV_ReadItem;
1358
1359/* See RIL_REQUEST_NV_WRITE_ITEM */
1360typedef struct {
1361 RIL_NV_Item itemID;
1362 char * value;
1363} RIL_NV_WriteItem;
1364
Etan Cohend3652192014-06-20 08:28:44 -07001365typedef enum {
1366 HANDOVER_STARTED = 0,
1367 HANDOVER_COMPLETED = 1,
1368 HANDOVER_FAILED = 2,
1369 HANDOVER_CANCELED = 3
1370} RIL_SrvccState;
1371
1372/* hardware configuration reported to RILJ. */
1373typedef enum {
1374 RIL_HARDWARE_CONFIG_MODEM = 0,
1375 RIL_HARDWARE_CONFIG_SIM = 1,
1376} RIL_HardwareConfig_Type;
1377
1378typedef enum {
1379 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1380 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1381 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1382} RIL_HardwareConfig_State;
1383
1384typedef struct {
1385 int rilModel;
1386 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1387 int maxVoice;
1388 int maxData;
1389 int maxStandby;
1390} RIL_HardwareConfig_Modem;
1391
1392typedef struct {
Wink Saville8b4e4f72014-10-17 15:01:45 -07001393 char modemUuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001394} RIL_HardwareConfig_Sim;
1395
1396typedef struct {
1397 RIL_HardwareConfig_Type type;
Wink Saville8b4e4f72014-10-17 15:01:45 -07001398 char uuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001399 RIL_HardwareConfig_State state;
1400 union {
1401 RIL_HardwareConfig_Modem modem;
1402 RIL_HardwareConfig_Sim sim;
1403 } cfg;
1404} RIL_HardwareConfig;
1405
Amit Mahajan54563d32014-11-22 00:54:49 +00001406typedef enum {
1407 SS_CFU,
1408 SS_CF_BUSY,
1409 SS_CF_NO_REPLY,
1410 SS_CF_NOT_REACHABLE,
1411 SS_CF_ALL,
1412 SS_CF_ALL_CONDITIONAL,
1413 SS_CLIP,
1414 SS_CLIR,
1415 SS_COLP,
1416 SS_COLR,
1417 SS_WAIT,
1418 SS_BAOC,
1419 SS_BAOIC,
1420 SS_BAOIC_EXC_HOME,
1421 SS_BAIC,
1422 SS_BAIC_ROAMING,
1423 SS_ALL_BARRING,
1424 SS_OUTGOING_BARRING,
1425 SS_INCOMING_BARRING
1426} RIL_SsServiceType;
1427
1428typedef enum {
1429 SS_ACTIVATION,
1430 SS_DEACTIVATION,
1431 SS_INTERROGATION,
1432 SS_REGISTRATION,
1433 SS_ERASURE
1434} RIL_SsRequestType;
1435
1436typedef enum {
1437 SS_ALL_TELE_AND_BEARER_SERVICES,
1438 SS_ALL_TELESEVICES,
1439 SS_TELEPHONY,
1440 SS_ALL_DATA_TELESERVICES,
1441 SS_SMS_SERVICES,
1442 SS_ALL_TELESERVICES_EXCEPT_SMS
1443} RIL_SsTeleserviceType;
1444
1445#define SS_INFO_MAX 4
1446#define NUM_SERVICE_CLASSES 7
1447
1448typedef struct {
1449 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1450 For example if voice is forwarded to one number and data
1451 is forwarded to a different one then numValidIndexes will be
1452 2 indicating total number of valid values in cfInfo.
1453 Similarly if all the services are forwarded to the same
1454 number then the value of numValidIndexes will be 1. */
1455
1456 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1457 for SS request to query call
1458 forward status. see
1459 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1460} RIL_CfData;
1461
1462typedef struct {
1463 RIL_SsServiceType serviceType;
1464 RIL_SsRequestType requestType;
1465 RIL_SsTeleserviceType teleserviceType;
1466 int serviceClass;
1467 RIL_Errno result;
1468
1469 union {
1470 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1471 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1472 two ints, so first two values of ssInfo[] will be
1473 used for response if serviceType is SS_CLIR and
1474 requestType is SS_INTERROGATION */
1475
1476 RIL_CfData cfData;
1477 };
1478} RIL_StkCcUnsolSsResponse;
1479
Wink Saville7f856802009-06-09 10:23:37 -07001480/**
Wink Savillec29360a2014-07-13 05:17:28 -07001481 * Data connection power state
1482 */
1483typedef enum {
1484 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1485 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1486 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1487 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1488} RIL_DcPowerStates;
1489
1490/**
1491 * Data connection real time info
1492 */
1493typedef struct {
1494 uint64_t time; // Time in nanos as returned by ril_nano_time
1495 RIL_DcPowerStates powerState; // Current power state
1496} RIL_DcRtInfo;
1497
Amit Mahajanc796e222014-08-13 16:54:01 +00001498/**
1499 * Data profile to modem
1500 */
1501typedef struct {
1502 /* id of the data profile */
1503 int profileId;
1504 /* the APN to connect to */
1505 char* apn;
1506 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1507 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1508 */
1509 char* protocol;
1510 /** authentication protocol used for this PDP context
1511 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1512 */
1513 int authType;
1514 /* the username for APN, or NULL */
1515 char* user;
1516 /* the password for APN, or NULL */
1517 char* password;
1518 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1519 int type;
1520 /* the period in seconds to limit the maximum connections */
1521 int maxConnsTime;
1522 /* the maximum connections during maxConnsTime */
1523 int maxConns;
1524 /** the required wait time in seconds after a successful UE initiated
1525 * disconnect of a given PDN connection before the device can send
1526 * a new PDN connection request for that given PDN
1527 */
1528 int waitTime;
1529 /* true to enable the profile, 0 to disable, 1 to enable */
1530 int enabled;
1531} RIL_DataProfileInfo;
Wink Savillec29360a2014-07-13 05:17:28 -07001532
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001533/* Tx Power Levels */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001534#define RIL_NUM_TX_POWER_LEVELS 5
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001535
1536typedef struct {
1537
1538 /* period (in ms) when modem is power collapsed */
1539 uint32_t sleep_mode_time_ms;
1540
1541 /* period (in ms) when modem is awake and in idle mode*/
1542 uint32_t idle_mode_time_ms;
1543
1544 /* period (in ms) for which Tx is active */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001545 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001546
1547 /* period (in ms) for which Rx is active */
1548 uint32_t rx_mode_time_ms;
1549} RIL_ActivityStatsInfo;
1550
Wink Savillec29360a2014-07-13 05:17:28 -07001551/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001552 * RIL_REQUEST_GET_SIM_STATUS
1553 *
1554 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -07001555 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001556 * "data" is NULL
1557 *
Wink Savillefd729372011-02-22 16:19:39 -08001558 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001559 *
1560 * Valid errors:
1561 * Must never fail
1562 */
1563#define RIL_REQUEST_GET_SIM_STATUS 1
1564
1565/**
1566 * RIL_REQUEST_ENTER_SIM_PIN
1567 *
John Wang309ac292009-07-30 14:53:23 -07001568 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001569 *
1570 * "data" is const char **
1571 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001572 * ((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 -08001573 *
jsh593c9102009-06-24 16:13:44 -07001574 * "response" is int *
1575 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001576 *
1577 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001578 *
1579 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001580 * RADIO_NOT_AVAILABLE (radio resetting)
1581 * GENERIC_FAILURE
1582 * PASSWORD_INCORRECT
1583 */
1584
1585#define RIL_REQUEST_ENTER_SIM_PIN 2
1586
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001587/**
1588 * RIL_REQUEST_ENTER_SIM_PUK
1589 *
Wink Saville7f856802009-06-09 10:23:37 -07001590 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001591 *
1592 * "data" is const char **
1593 * ((const char **)data)[0] is PUK value
1594 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001595 * ((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 -08001596 *
jsh593c9102009-06-24 16:13:44 -07001597 * "response" is int *
1598 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001599 *
1600 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001601 *
1602 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001603 * RADIO_NOT_AVAILABLE (radio resetting)
1604 * GENERIC_FAILURE
1605 * PASSWORD_INCORRECT
1606 * (PUK is invalid)
1607 */
1608
1609#define RIL_REQUEST_ENTER_SIM_PUK 3
1610
1611/**
1612 * RIL_REQUEST_ENTER_SIM_PIN2
1613 *
1614 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
1615 * returned as a a failure from a previous operation.
1616 *
1617 * "data" is const char **
1618 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001619 * ((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 -08001620 *
jsh593c9102009-06-24 16:13:44 -07001621 * "response" is int *
1622 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001623 *
1624 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001625 *
1626 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001627 * RADIO_NOT_AVAILABLE (radio resetting)
1628 * GENERIC_FAILURE
1629 * PASSWORD_INCORRECT
1630 */
1631
1632#define RIL_REQUEST_ENTER_SIM_PIN2 4
1633
1634/**
1635 * RIL_REQUEST_ENTER_SIM_PUK2
1636 *
Wink Saville7f856802009-06-09 10:23:37 -07001637 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001638 *
1639 * "data" is const char **
1640 * ((const char **)data)[0] is PUK2 value
1641 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001642 * ((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 -08001643 *
jsh593c9102009-06-24 16:13:44 -07001644 * "response" is int *
1645 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001646 *
1647 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001648 *
1649 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001650 * RADIO_NOT_AVAILABLE (radio resetting)
1651 * GENERIC_FAILURE
1652 * PASSWORD_INCORRECT
1653 * (PUK2 is invalid)
1654 */
1655
1656#define RIL_REQUEST_ENTER_SIM_PUK2 5
1657
1658/**
1659 * RIL_REQUEST_CHANGE_SIM_PIN
1660 *
Wink Saville7f856802009-06-09 10:23:37 -07001661 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001662 *
1663 * "data" is const char **
1664 * ((const char **)data)[0] is old PIN value
1665 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001666 * ((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 -08001667 *
jsh593c9102009-06-24 16:13:44 -07001668 * "response" is int *
1669 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001670 *
1671 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001672 *
1673 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001674 * RADIO_NOT_AVAILABLE (radio resetting)
1675 * GENERIC_FAILURE
1676 * PASSWORD_INCORRECT
1677 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001678 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001679 */
1680
1681#define RIL_REQUEST_CHANGE_SIM_PIN 6
1682
1683
1684/**
1685 * RIL_REQUEST_CHANGE_SIM_PIN2
1686 *
Wink Saville7f856802009-06-09 10:23:37 -07001687 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001688 *
1689 * "data" is const char **
1690 * ((const char **)data)[0] is old PIN2 value
1691 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001692 * ((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 -08001693 *
jsh593c9102009-06-24 16:13:44 -07001694 * "response" is int *
1695 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001696 *
1697 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001698 *
1699 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001700 * RADIO_NOT_AVAILABLE (radio resetting)
1701 * GENERIC_FAILURE
1702 * PASSWORD_INCORRECT
1703 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001704 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001705 */
1706
1707#define RIL_REQUEST_CHANGE_SIM_PIN2 7
1708
1709/**
1710 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
1711 *
1712 * Requests that network personlization be deactivated
1713 *
1714 * "data" is const char **
1715 * ((const char **)(data))[0]] is network depersonlization code
1716 *
jsh593c9102009-06-24 16:13:44 -07001717 * "response" is int *
1718 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001719 *
1720 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001721 *
1722 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001723 * RADIO_NOT_AVAILABLE (radio resetting)
1724 * GENERIC_FAILURE
1725 * PASSWORD_INCORRECT
1726 * (code is invalid)
1727 */
1728
1729#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
1730
1731/**
Wink Saville7f856802009-06-09 10:23:37 -07001732 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001733 *
1734 * Requests current call list
1735 *
1736 * "data" is NULL
1737 *
1738 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07001739 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001740 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001741 *
1742 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001743 * RADIO_NOT_AVAILABLE (radio resetting)
1744 * GENERIC_FAILURE
1745 * (request will be made again in a few hundred msec)
1746 */
1747
1748#define RIL_REQUEST_GET_CURRENT_CALLS 9
1749
1750
Wink Saville7f856802009-06-09 10:23:37 -07001751/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001752 * RIL_REQUEST_DIAL
1753 *
1754 * Initiate voice call
1755 *
1756 * "data" is const RIL_Dial *
1757 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001758 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001759 * This method is never used for supplementary service codes
1760 *
1761 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001762 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001763 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00001764 * DIAL_MODIFIED_TO_USSD
1765 * DIAL_MODIFIED_TO_SS
1766 * DIAL_MODIFIED_TO_DIAL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001767 * GENERIC_FAILURE
1768 */
1769#define RIL_REQUEST_DIAL 10
1770
1771/**
1772 * RIL_REQUEST_GET_IMSI
1773 *
1774 * Get the SIM IMSI
1775 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08001776 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001777 *
Wink Savillec0114b32011-02-18 10:14:07 -08001778 * "data" is const char **
1779 * ((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 -08001780 * "response" is a const char * containing the IMSI
1781 *
1782 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001783 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001784 * RADIO_NOT_AVAILABLE (radio resetting)
1785 * GENERIC_FAILURE
1786 */
1787
1788#define RIL_REQUEST_GET_IMSI 11
1789
1790/**
1791 * RIL_REQUEST_HANGUP
1792 *
1793 * Hang up a specific line (like AT+CHLD=1x)
1794 *
John Wang06bae4b2010-11-18 16:37:09 -08001795 * After this HANGUP request returns, RIL should show the connection is NOT
1796 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1797 *
Wink Saville7f856802009-06-09 10:23:37 -07001798 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001799 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001800 *
1801 * "response" is NULL
1802 *
1803 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001804 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001805 * RADIO_NOT_AVAILABLE (radio resetting)
1806 * GENERIC_FAILURE
1807 */
1808
1809#define RIL_REQUEST_HANGUP 12
1810
1811/**
1812 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
1813 *
1814 * Hang up waiting or held (like AT+CHLD=0)
1815 *
John Wang06bae4b2010-11-18 16:37:09 -08001816 * After this HANGUP request returns, RIL should show the connection is NOT
1817 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1818 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001819 * "data" is NULL
1820 * "response" is NULL
1821 *
1822 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001823 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001824 * RADIO_NOT_AVAILABLE (radio resetting)
1825 * GENERIC_FAILURE
1826 */
1827
1828#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
1829
1830/**
1831 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
1832 *
1833 * Hang up waiting or held (like AT+CHLD=1)
1834 *
John Wang06bae4b2010-11-18 16:37:09 -08001835 * After this HANGUP request returns, RIL should show the connection is NOT
1836 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1837 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001838 * "data" is NULL
1839 * "response" is NULL
1840 *
1841 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001842 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001843 * RADIO_NOT_AVAILABLE (radio resetting)
1844 * GENERIC_FAILURE
1845 */
1846
1847#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
1848
1849/**
1850 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
1851 *
1852 * Switch waiting or holding call and active call (like AT+CHLD=2)
1853 *
1854 * State transitions should be is follows:
1855 *
1856 * If call 1 is waiting and call 2 is active, then if this re
1857 *
1858 * BEFORE AFTER
1859 * Call 1 Call 2 Call 1 Call 2
1860 * ACTIVE HOLDING HOLDING ACTIVE
1861 * ACTIVE WAITING HOLDING ACTIVE
1862 * HOLDING WAITING HOLDING ACTIVE
1863 * ACTIVE IDLE HOLDING IDLE
1864 * IDLE IDLE IDLE IDLE
1865 *
1866 * "data" is NULL
1867 * "response" is NULL
1868 *
1869 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001870 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001871 * RADIO_NOT_AVAILABLE (radio resetting)
1872 * GENERIC_FAILURE
1873 */
1874
1875#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
1876#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
1877
1878/**
1879 * RIL_REQUEST_CONFERENCE
1880 *
1881 * Conference holding and active (like AT+CHLD=3)
1882
1883 * "data" is NULL
1884 * "response" is NULL
1885 *
1886 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001887 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001888 * RADIO_NOT_AVAILABLE (radio resetting)
1889 * GENERIC_FAILURE
1890 */
1891#define RIL_REQUEST_CONFERENCE 16
1892
1893/**
1894 * RIL_REQUEST_UDUB
1895 *
Wink Saville7f856802009-06-09 10:23:37 -07001896 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001897 * waiting call answer)(RIL_BasicRequest r);
1898 *
1899 * "data" is NULL
1900 * "response" is NULL
1901 *
1902 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001903 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001904 * RADIO_NOT_AVAILABLE (radio resetting)
1905 * GENERIC_FAILURE
1906 */
1907#define RIL_REQUEST_UDUB 17
1908
1909/**
1910 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1911 *
1912 * Requests the failure cause code for the most recently terminated call
1913 *
1914 * "data" is NULL
1915 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -07001916 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001917 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
1918 * failure reasons are derived from the possible call failure scenarios
1919 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001920 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08001921 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
1922 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
1923 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001924 * If the implementation does not have access to the exact cause codes,
1925 * then it should return one of the values listed in RIL_LastCallFailCause,
1926 * as the UI layer needs to distinguish these cases for tone generation or
1927 * error notification.
1928 *
1929 * Valid errors:
1930 * SUCCESS
1931 * RADIO_NOT_AVAILABLE
1932 * GENERIC_FAILURE
1933 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001934 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001935 */
1936#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
1937
1938/**
1939 * RIL_REQUEST_SIGNAL_STRENGTH
1940 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001941 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001942 *
1943 * Must succeed if radio is on.
1944 *
1945 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07001946 *
1947 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001948 *
1949 * Valid errors:
1950 * SUCCESS
1951 * RADIO_NOT_AVAILABLE
1952 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001953#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07001954
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001955/**
Wink Savillec0114b32011-02-18 10:14:07 -08001956 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001957 *
1958 * Request current registration state
1959 *
1960 * "data" is NULL
1961 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -07001962 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -07001963 * 0 - Not registered, MT is not currently searching
1964 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001965 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -07001966 * 2 - Not registered, but MT is currently searching
1967 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001968 * 3 - Registration denied
1969 * 4 - Unknown
1970 * 5 - Registered, roaming
John Wang7f8ded12010-01-21 15:07:28 -08001971 * 10 - Same as 0, but indicates that emergency calls
1972 * are enabled.
1973 * 12 - Same as 2, but indicates that emergency calls
1974 * are enabled.
1975 * 13 - Same as 3, but indicates that emergency calls
1976 * are enabled.
1977 * 14 - Same as 4, but indicates that emergency calls
1978 * are enabled.
1979 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001980 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1981 * NULL if not.Valid LAC are 0x0000 - 0xffff
1982 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1983 * NULL if not.
1984 * Valid CID are 0x00000000 - 0xffffffff
1985 * In GSM, CID is Cell ID (see TS 27.007)
1986 * in 16 bits
1987 * In UMTS, CID is UMTS Cell Identity
1988 * (see TS 25.331) in 28 bits
Wink Saville43808972011-01-13 17:39:51 -08001989 * ((const char **)response)[3] indicates the available voice radio technology,
1990 * valid values as defined by RIL_RadioTechnology.
Wink Saville1b5fd232009-04-22 14:50:00 -07001991 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1992 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07001993 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07001994 * ((const char **)response)[5] is Base Station latitude if registered on a
1995 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001996 * latitude is a decimal number as specified in
1997 * 3GPP2 C.S0005-A v6.0. It is represented in
1998 * units of 0.25 seconds and ranges from -1296000
1999 * to 1296000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08002000 * to a range of -90 to +90 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07002001 * ((const char **)response)[6] is Base Station longitude if registered on a
2002 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07002003 * longitude is a decimal number as specified in
2004 * 3GPP2 C.S0005-A v6.0. It is represented in
2005 * units of 0.25 seconds and ranges from -2592000
2006 * to 2592000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08002007 * to a range of -180 to +180 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07002008 * ((const char **)response)[7] is concurrent services support indicator if
2009 * registered on a CDMA system 0-1.
2010 * 0 - Concurrent services not supported,
2011 * 1 - Concurrent services supported
2012 * ((const char **)response)[8] is System ID if registered on a CDMA system or
2013 * NULL if not. Valid System ID are 0 - 32767
2014 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
2015 * NULL if not. Valid System ID are 0 - 65535
2016 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002017 * on a CDMA or EVDO system or NULL if not. Valid values
Wink Saville1b5fd232009-04-22 14:50:00 -07002018 * are 0-255.
2019 * ((const char **)response)[11] indicates whether the current system is in the
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002020 * PRL if registered on a CDMA or EVDO system or NULL if
Wink Saville1b5fd232009-04-22 14:50:00 -07002021 * not. 0=not in the PRL, 1=in the PRL
2022 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002023 * if registered on a CDMA or EVDO system or NULL if not.
Wink Saville1b5fd232009-04-22 14:50:00 -07002024 * Valid values are 0-255.
2025 * ((const char **)response)[13] if registration state is 3 (Registration
2026 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07002027 * registration was denied. See 3GPP TS 24.008,
2028 * 10.5.3.6 and Annex G.
2029 * 0 - General
2030 * 1 - Authentication Failure
2031 * 2 - IMSI unknown in HLR
2032 * 3 - Illegal MS
2033 * 4 - Illegal ME
2034 * 5 - PLMN not allowed
2035 * 6 - Location area not allowed
2036 * 7 - Roaming not allowed
2037 * 8 - No Suitable Cells in this Location Area
2038 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07002039 * 10 - Persistent location update reject
Wink Savillec0114b32011-02-18 10:14:07 -08002040 * 11 - PLMN not allowed
2041 * 12 - Location area not allowed
2042 * 13 - Roaming not allowed in this Location Area
2043 * 15 - No Suitable Cells in this Location Area
2044 * 17 - Network Failure
2045 * 20 - MAC Failure
2046 * 21 - Sync Failure
2047 * 22 - Congestion
2048 * 23 - GSM Authentication unacceptable
2049 * 25 - Not Authorized for this CSG
2050 * 32 - Service option not supported
2051 * 33 - Requested service option not subscribed
2052 * 34 - Service option temporarily out of order
2053 * 38 - Call cannot be identified
2054 * 48-63 - Retry upon entry into a new cell
2055 * 95 - Semantically incorrect message
2056 * 96 - Invalid mandatory information
2057 * 97 - Message type non-existent or not implemented
2058 * 98 - Message not compatible with protocol state
2059 * 99 - Information element non-existent or not implemented
2060 * 100 - Conditional IE error
2061 * 101 - Message not compatible with protocol state
2062 * 111 - Protocol error, unspecified
jshca5e3472010-06-23 21:53:24 -07002063 * ((const char **)response)[14] is the Primary Scrambling Code of the current
2064 * cell as described in TS 25.331, in hexadecimal
2065 * format, or NULL if unknown or not registered
2066 * to a UMTS network.
Wink Saville1b5fd232009-04-22 14:50:00 -07002067 *
2068 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002069 * as "out of service" in the Android telephony system
2070 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002071 * Registration state 3 can be returned if Location Update Reject
2072 * (with cause 17 - Network Failure) is received repeatedly from the network,
2073 * to facilitate "managed roaming"
2074 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002075 * Valid errors:
2076 * SUCCESS
2077 * RADIO_NOT_AVAILABLE
2078 * GENERIC_FAILURE
2079 */
Wink Savillec0114b32011-02-18 10:14:07 -08002080#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002081
2082/**
Wink Savillec0114b32011-02-18 10:14:07 -08002083 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002084 *
Wink Savillec0114b32011-02-18 10:14:07 -08002085 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002086 *
2087 * "data" is NULL
2088 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08002089 * ((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 -08002090 * ((const char **)response)[1] is LAC if registered or NULL if not
2091 * ((const char **)response)[2] is CID if registered or NULL if not
Wink Saville43808972011-01-13 17:39:51 -08002092 * ((const char **)response)[3] indicates the available data radio technology,
2093 * valid values as defined by RIL_RadioTechnology.
Wink Savillec0114b32011-02-18 10:14:07 -08002094 * ((const char **)response)[4] if registration state is 3 (Registration
2095 * denied) this is an enumerated reason why
2096 * registration was denied. See 3GPP TS 24.008,
2097 * Annex G.6 "Additonal cause codes for GMM".
2098 * 7 == GPRS services not allowed
2099 * 8 == GPRS services and non-GPRS services not allowed
2100 * 9 == MS identity cannot be derived by the network
2101 * 10 == Implicitly detached
2102 * 14 == GPRS services not allowed in this PLMN
2103 * 16 == MSC temporarily not reachable
2104 * 40 == No PDP context activated
2105 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
2106 * established using RIL_REQUEST_SETUP_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002107 *
Wink Savilleae679532012-12-03 14:59:45 -08002108 * The values at offsets 6..10 are optional LTE location information in decimal.
2109 * If a value is unknown that value may be NULL. If all values are NULL,
2110 * none need to be present.
Wink Savilleea51a9d2012-09-15 07:54:06 -07002111 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
2112 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
2113 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
2114 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
2115 * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
2116 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002117 * LAC and CID are in hexadecimal format.
2118 * valid LAC are 0x0000 - 0xffff
2119 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07002120 *
2121 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002122 * as "out of service" in the Android telephony system
2123 *
2124 * Valid errors:
2125 * SUCCESS
2126 * RADIO_NOT_AVAILABLE
2127 * GENERIC_FAILURE
2128 */
Wink Savillec0114b32011-02-18 10:14:07 -08002129#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002130
2131/**
2132 * RIL_REQUEST_OPERATOR
2133 *
2134 * Request current operator ONS or EONS
2135 *
2136 * "data" is NULL
2137 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07002138 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002139 * or NULL if unregistered
2140 *
Wink Saville7f856802009-06-09 10:23:37 -07002141 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002142 * or NULL if unregistered
2143 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2144 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07002145 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002146 * Valid errors:
2147 * SUCCESS
2148 * RADIO_NOT_AVAILABLE
2149 * GENERIC_FAILURE
2150 */
2151#define RIL_REQUEST_OPERATOR 22
2152
2153/**
2154 * RIL_REQUEST_RADIO_POWER
2155 *
2156 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07002157 * If the radio is is turned off/on the radio modem subsystem
2158 * is expected return to an initialized state. For instance,
2159 * any voice and data calls will be terminated and all associated
2160 * lists emptied.
2161 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002162 * "data" is int *
2163 * ((int *)data)[0] is > 0 for "Radio On"
2164 * ((int *)data)[0] is == 0 for "Radio Off"
2165 *
2166 * "response" is NULL
2167 *
2168 * Turn radio on if "on" > 0
2169 * Turn radio off if "on" == 0
2170 *
2171 * Valid errors:
2172 * SUCCESS
2173 * RADIO_NOT_AVAILABLE
2174 * GENERIC_FAILURE
2175 */
2176#define RIL_REQUEST_RADIO_POWER 23
2177
2178/**
2179 * RIL_REQUEST_DTMF
2180 *
2181 * Send a DTMF tone
2182 *
2183 * If the implementation is currently playing a tone requested via
2184 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2185 * should be played instead
2186 *
jsh602f80f2009-07-10 15:44:37 -07002187 * "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 -08002188 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002189 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002190 * FIXME should this block/mute microphone?
2191 * How does this interact with local DTMF feedback?
2192 *
2193 * Valid errors:
2194 * SUCCESS
2195 * RADIO_NOT_AVAILABLE
2196 * GENERIC_FAILURE
2197 *
2198 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2199 *
2200 */
2201#define RIL_REQUEST_DTMF 24
2202
2203/**
2204 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07002205 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002206 * Send an SMS message
2207 *
2208 * "data" is const char **
2209 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2210 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2211 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2212 * less the SMSC address
2213 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2214 *
2215 * "response" is a const RIL_SMS_Response *
2216 *
2217 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002218 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002219 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2220 *
2221 * Valid errors:
2222 * SUCCESS
2223 * RADIO_NOT_AVAILABLE
2224 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07002225 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002226 * GENERIC_FAILURE
2227 *
2228 * FIXME how do we specify TP-Message-Reference if we need to resend?
2229 */
2230#define RIL_REQUEST_SEND_SMS 25
2231
2232
2233/**
2234 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07002235 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002236 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2237 * except that more messages are expected to be sent soon. If possible,
2238 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2239 *
2240 * "data" is const char **
2241 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2242 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2243 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2244 * less the SMSC address
2245 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2246 *
2247 * "response" is a const RIL_SMS_Response *
2248 *
2249 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002250 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002251 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2252 *
2253 * Valid errors:
2254 * SUCCESS
2255 * RADIO_NOT_AVAILABLE
2256 * SMS_SEND_FAIL_RETRY
2257 * GENERIC_FAILURE
2258 *
2259 */
2260#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2261
2262
2263/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002264 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002265 *
Wink Saville29487ef2011-04-15 09:15:31 -07002266 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2267 * return success it is added to the list of data calls and a
2268 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2269 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2270 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2271 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002272 *
Wink Saville43808972011-01-13 17:39:51 -08002273 * The RIL is expected to:
2274 * - Create one data call context.
2275 * - Create and configure a dedicated interface for the context
2276 * - The interface must be point to point.
2277 * - The interface is configured with one or more addresses and
2278 * is capable of sending and receiving packets. The prefix length
2279 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2280 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08002281 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08002282 * number of simultaneous data call contexts.
2283 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002284 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08002285 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2286 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07002287 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07002288 * ((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 -07002289 * override the one in the profile. NULL indicates no APN overrride.
2290 * ((const char **)data)[3] is the username for APN, or NULL
2291 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07002292 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2293 * 0 => PAP and CHAP is never performed.
2294 * 1 => PAP may be performed; CHAP is never performed.
2295 * 2 => CHAP may be performed; PAP is never performed.
2296 * 3 => PAP / CHAP may be performed - baseband dependent.
Wink Savillec0114b32011-02-18 10:14:07 -08002297 * ((const char **)data)[6] is the connection type to request must be one of the
2298 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07002299 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Wink Savillec0114b32011-02-18 10:14:07 -08002300 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002301 *
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -07002302 * "response" is a RIL_Data_Call_Response_v11
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002303 *
2304 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07002305 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002306 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08002307 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08002308 * the RIL_Data_Call_Response_v6.status containing the actual status.
2309 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08002310 *
2311 * Other errors could include:
2312 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2313 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002314 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002315 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002316 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002317#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002318
2319
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002320/**
2321 * RIL_REQUEST_SIM_IO
2322 *
2323 * Request SIM I/O operation.
2324 * This is similar to the TS 27.007 "restricted SIM" operation
2325 * where it assumes all of the EF selection will be done by the
2326 * callee.
2327 *
Wink Savillefd729372011-02-22 16:19:39 -08002328 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002329 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2330 * or may specify a PIN2 for operations that require a PIN2 (eg
2331 * updating FDN records)
2332 *
2333 * "response" is a const RIL_SIM_IO_Response *
2334 *
2335 * Arguments and responses that are unused for certain
2336 * values of "command" should be ignored or set to NULL
2337 *
2338 * Valid errors:
2339 * SUCCESS
2340 * RADIO_NOT_AVAILABLE
2341 * GENERIC_FAILURE
2342 * SIM_PIN2
2343 * SIM_PUK2
2344 */
2345#define RIL_REQUEST_SIM_IO 28
2346
2347/**
2348 * RIL_REQUEST_SEND_USSD
2349 *
2350 * Send a USSD message
2351 *
2352 * If a USSD session already exists, the message should be sent in the
2353 * context of that session. Otherwise, a new session should be created.
2354 *
2355 * The network reply should be reported via RIL_UNSOL_ON_USSD
2356 *
2357 * Only one USSD session may exist at a time, and the session is assumed
2358 * to exist until:
2359 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2360 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2361 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2362 *
2363 * "data" is a const char * containing the USSD request in UTF-8 format
2364 * "response" is NULL
2365 *
2366 * Valid errors:
2367 * SUCCESS
2368 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07002369 * FDN_CHECK_FAILURE
Amit Mahajan54563d32014-11-22 00:54:49 +00002370 * USSD_MODIFIED_TO_DIAL
2371 * USSD_MODIFIED_TO_SS
2372 * USSD_MODIFIED_TO_USSD
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002373 * GENERIC_FAILURE
2374 *
2375 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2376 */
2377
2378#define RIL_REQUEST_SEND_USSD 29
2379
2380/**
2381 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07002382 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002383 * Cancel the current USSD session if one exists
2384 *
2385 * "data" is null
2386 * "response" is NULL
2387 *
2388 * Valid errors:
2389 * SUCCESS
2390 * RADIO_NOT_AVAILABLE
Wink Saville7f856802009-06-09 10:23:37 -07002391 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002392 */
2393
2394#define RIL_REQUEST_CANCEL_USSD 30
2395
Wink Saville7f856802009-06-09 10:23:37 -07002396/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002397 * RIL_REQUEST_GET_CLIR
2398 *
2399 * Gets current CLIR status
2400 * "data" is NULL
2401 * "response" is int *
2402 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2403 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2404 *
2405 * Valid errors:
2406 * SUCCESS
2407 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002408 * SS_MODIFIED_TO_DIAL
2409 * SS_MODIFIED_TO_USSD
2410 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002411 * GENERIC_FAILURE
2412 */
2413#define RIL_REQUEST_GET_CLIR 31
2414
2415/**
2416 * RIL_REQUEST_SET_CLIR
2417 *
2418 * "data" is int *
2419 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2420 *
2421 * "response" is NULL
2422 *
2423 * Valid errors:
2424 * SUCCESS
2425 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002426 * SS_MODIFIED_TO_DIAL
2427 * SS_MODIFIED_TO_USSD
2428 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002429 * GENERIC_FAILURE
2430 */
2431#define RIL_REQUEST_SET_CLIR 32
2432
2433/**
2434 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2435 *
2436 * "data" is const RIL_CallForwardInfo *
2437 *
2438 * "response" is const RIL_CallForwardInfo **
2439 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2440 * each distinct registered phone number.
2441 *
2442 * For example, if data is forwarded to +18005551212 and voice is forwarded
2443 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07002444 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002445 * If, however, both data and voice are forwarded to +18005551212, then
2446 * a single RIL_CallForwardInfo can be returned with the service class
2447 * set to "data + voice = 3")
2448 *
2449 * Valid errors:
2450 * SUCCESS
2451 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002452 * SS_MODIFIED_TO_DIAL
2453 * SS_MODIFIED_TO_USSD
2454 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002455 * GENERIC_FAILURE
2456 */
2457#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2458
2459
2460/**
2461 * RIL_REQUEST_SET_CALL_FORWARD
2462 *
2463 * Configure call forward rule
2464 *
2465 * "data" is const RIL_CallForwardInfo *
2466 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002467 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002468 * Valid errors:
2469 * SUCCESS
2470 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002471 * SS_MODIFIED_TO_DIAL
2472 * SS_MODIFIED_TO_USSD
2473 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002474 * GENERIC_FAILURE
2475 */
2476#define RIL_REQUEST_SET_CALL_FORWARD 34
2477
2478
2479/**
2480 * RIL_REQUEST_QUERY_CALL_WAITING
2481 *
2482 * Query current call waiting state
2483 *
2484 * "data" is const int *
2485 * ((const int *)data)[0] is the TS 27.007 service class to query.
2486 * "response" is a const int *
2487 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2488 *
2489 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2490 * must follow, with the TS 27.007 service class bit vector of services
2491 * for which call waiting is enabled.
2492 *
Wink Saville7f856802009-06-09 10:23:37 -07002493 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002494 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2495 * and voice and disabled for everything else
2496 *
2497 * Valid errors:
2498 * SUCCESS
2499 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002500 * SS_MODIFIED_TO_DIAL
2501 * SS_MODIFIED_TO_USSD
2502 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002503 * GENERIC_FAILURE
2504 */
2505#define RIL_REQUEST_QUERY_CALL_WAITING 35
2506
2507
2508/**
2509 * RIL_REQUEST_SET_CALL_WAITING
2510 *
2511 * Configure current call waiting state
2512 *
2513 * "data" is const int *
2514 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2515 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2516 * services to modify
2517 * "response" is NULL
2518 *
2519 * Valid errors:
2520 * SUCCESS
2521 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002522 * SS_MODIFIED_TO_DIAL
2523 * SS_MODIFIED_TO_USSD
2524 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002525 * GENERIC_FAILURE
2526 */
2527#define RIL_REQUEST_SET_CALL_WAITING 36
2528
2529/**
2530 * RIL_REQUEST_SMS_ACKNOWLEDGE
2531 *
2532 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07002533 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002534 *
2535 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07002536 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002537 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07002538 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002539 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07002540 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
2541 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
2542 * capacity exceeded) and 0xFF (unspecified error) are
2543 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002544 *
2545 * "response" is NULL
2546 *
2547 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
2548 *
2549 * Valid errors:
2550 * SUCCESS
2551 * RADIO_NOT_AVAILABLE
2552 * GENERIC_FAILURE
2553 */
2554#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
2555
2556/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002557 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002558 *
2559 * Get the device IMEI, including check digit
2560 *
johnwangf8bc1672009-05-14 19:19:47 -07002561 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002562 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2563 *
2564 * "data" is NULL
2565 * "response" is a const char * containing the IMEI
2566 *
2567 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002568 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002569 * RADIO_NOT_AVAILABLE (radio resetting)
2570 * GENERIC_FAILURE
2571 */
2572
2573#define RIL_REQUEST_GET_IMEI 38
2574
2575/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002576 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002577 *
2578 * Get the device IMEISV, which should be two decimal digits
2579 *
johnwangf8bc1672009-05-14 19:19:47 -07002580 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002581 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2582 *
2583 * "data" is NULL
2584 * "response" is a const char * containing the IMEISV
2585 *
2586 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002587 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002588 * RADIO_NOT_AVAILABLE (radio resetting)
2589 * GENERIC_FAILURE
2590 */
2591
2592#define RIL_REQUEST_GET_IMEISV 39
2593
2594
2595/**
2596 * RIL_REQUEST_ANSWER
2597 *
2598 * Answer incoming call
2599 *
2600 * Will not be called for WAITING calls.
2601 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
2602 * instead
2603 *
2604 * "data" is NULL
2605 * "response" is NULL
2606 *
2607 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002608 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002609 * RADIO_NOT_AVAILABLE (radio resetting)
2610 * GENERIC_FAILURE
2611 */
2612
2613#define RIL_REQUEST_ANSWER 40
2614
2615/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002616 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002617 *
Wink Saville29487ef2011-04-15 09:15:31 -07002618 * Deactivate packet data connection and remove from the
2619 * data call list if SUCCESS is returned. Any other return
2620 * values should also try to remove the call from the list,
2621 * but that may not be possible. In any event a
2622 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
2623 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
2624 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002625 *
2626 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07002627 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06002628 * ((char**)data)[1] indicating Disconnect Reason
2629 * 0 => No specific reason specified
2630 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07002631 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002632 * "response" is NULL
2633 *
2634 * Valid errors:
2635 * SUCCESS
2636 * RADIO_NOT_AVAILABLE
2637 * GENERIC_FAILURE
2638 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002639 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002640 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002641#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002642
2643/**
2644 * RIL_REQUEST_QUERY_FACILITY_LOCK
2645 *
2646 * Query the status of a facility lock state
2647 *
2648 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07002649 * ((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 -08002650 * (eg "AO" for BAOC, "SC" for SIM lock)
2651 * ((const char **)data)[1] is the password, or "" if not required
2652 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
2653 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08002654 * ((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 -08002655 * This is only applicable in the case of Fixed Dialing Numbers
2656 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002657 *
2658 * "response" is an int *
2659 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07002660 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002661 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07002662 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002663 *
2664 * Valid errors:
2665 * SUCCESS
2666 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002667 * SS_MODIFIED_TO_DIAL
2668 * SS_MODIFIED_TO_USSD
2669 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002670 * GENERIC_FAILURE
2671 *
2672 */
2673#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
2674
2675/**
2676 * RIL_REQUEST_SET_FACILITY_LOCK
2677 *
2678 * Enable/disable one facility lock
2679 *
2680 * "data" is const char **
2681 *
2682 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2683 * (eg "AO" for BAOC)
2684 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
2685 * ((const char **)data)[2] = password
2686 * ((const char **)data)[3] = string representation of decimal TS 27.007
2687 * service class bit vector. Eg, the string
2688 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08002689 * ((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 -08002690 * This is only applicable in the case of Fixed Dialing Numbers
2691 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002692 *
jsh593c9102009-06-24 16:13:44 -07002693 * "response" is int *
2694 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002695 *
2696 * Valid errors:
2697 * SUCCESS
2698 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002699 * SS_MODIFIED_TO_DIAL
2700 * SS_MODIFIED_TO_USSD
2701 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002702 * GENERIC_FAILURE
2703 *
2704 */
2705#define RIL_REQUEST_SET_FACILITY_LOCK 43
2706
2707/**
2708 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
2709 *
2710 * Change call barring facility password
2711 *
2712 * "data" is const char **
2713 *
2714 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2715 * (eg "AO" for BAOC)
2716 * ((const char **)data)[1] = old password
2717 * ((const char **)data)[2] = new password
2718 *
Wink Saville7f856802009-06-09 10:23:37 -07002719 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002720 *
2721 * Valid errors:
2722 * SUCCESS
2723 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002724 * SS_MODIFIED_TO_DIAL
2725 * SS_MODIFIED_TO_USSD
2726 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002727 * GENERIC_FAILURE
2728 *
2729 */
2730#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
2731
2732/**
2733 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
2734 *
2735 * Query current network selectin mode
2736 *
2737 * "data" is NULL
2738 *
2739 * "response" is int *
2740 * ((const int *)response)[0] is
2741 * 0 for automatic selection
2742 * 1 for manual selection
2743 *
2744 * Valid errors:
2745 * SUCCESS
2746 * RADIO_NOT_AVAILABLE
2747 * GENERIC_FAILURE
2748 *
2749 */
2750#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
2751
2752/**
2753 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
2754 *
2755 * Specify that the network should be selected automatically
2756 *
2757 * "data" is NULL
2758 * "response" is NULL
2759 *
Wink Saville7f856802009-06-09 10:23:37 -07002760 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002761 * and registered
2762 *
2763 * Valid errors:
2764 * SUCCESS
2765 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07002766 * ILLEGAL_SIM_OR_ME
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002767 * GENERIC_FAILURE
2768 *
John Wang75534472010-04-20 15:11:42 -07002769 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2770 * no retries needed, such as illegal SIM or ME.
2771 * Returns GENERIC_FAILURE for all other causes that might be
2772 * fixed by retries.
2773 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002774 */
2775#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
2776
2777/**
2778 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
2779 *
2780 * Manually select a specified network.
2781 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002782 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
2783 * "response" is NULL
2784 *
Wink Saville7f856802009-06-09 10:23:37 -07002785 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002786 * and registered
2787 *
2788 * Valid errors:
2789 * SUCCESS
2790 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07002791 * ILLEGAL_SIM_OR_ME
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002792 * GENERIC_FAILURE
2793 *
John Wang75534472010-04-20 15:11:42 -07002794 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2795 * no retries needed, such as illegal SIM or ME.
2796 * Returns GENERIC_FAILURE for all other causes that might be
2797 * fixed by retries.
2798 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002799 */
2800#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
2801
2802/**
2803 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
2804 *
2805 * Scans for available networks
2806 *
2807 * "data" is NULL
2808 * "response" is const char ** that should be an array of n*4 strings, where
2809 * n is the number of available networks
2810 * For each available network:
2811 *
Wink Saville7f856802009-06-09 10:23:37 -07002812 * ((const char **)response)[n+0] is long alpha ONS or EONS
2813 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002814 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
2815 * ((const char **)response)[n+3] is a string value of the status:
2816 * "unknown"
2817 * "available"
2818 * "current"
2819 * "forbidden"
2820 *
Wink Saville7f856802009-06-09 10:23:37 -07002821 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002822 * and registered
2823 *
2824 * Valid errors:
2825 * SUCCESS
2826 * RADIO_NOT_AVAILABLE
2827 * GENERIC_FAILURE
2828 *
2829 */
2830#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
2831
2832/**
2833 * RIL_REQUEST_DTMF_START
2834 *
Wink Saville7f856802009-06-09 10:23:37 -07002835 * Start playing a DTMF tone. Continue playing DTMF tone until
2836 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002837 *
2838 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
2839 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07002840 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002841 * "data" is a char *
2842 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
2843 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002844 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002845 * Valid errors:
2846 * SUCCESS
2847 * RADIO_NOT_AVAILABLE
2848 * GENERIC_FAILURE
2849 *
2850 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
2851 */
2852#define RIL_REQUEST_DTMF_START 49
2853
2854/**
2855 * RIL_REQUEST_DTMF_STOP
2856 *
2857 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07002858 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002859 * "data" is NULL
2860 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002861 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002862 * Valid errors:
2863 * SUCCESS
2864 * RADIO_NOT_AVAILABLE
2865 * GENERIC_FAILURE
2866 *
2867 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
2868 */
2869#define RIL_REQUEST_DTMF_STOP 50
2870
2871/**
2872 * RIL_REQUEST_BASEBAND_VERSION
2873 *
2874 * Return string value indicating baseband version, eg
2875 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07002876 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002877 * "data" is NULL
2878 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07002879 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002880 * Valid errors:
2881 * SUCCESS
2882 * RADIO_NOT_AVAILABLE
2883 * GENERIC_FAILURE
2884 *
2885 */
2886#define RIL_REQUEST_BASEBAND_VERSION 51
2887
2888/**
2889 * RIL_REQUEST_SEPARATE_CONNECTION
2890 *
2891 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07002892 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002893 * as the only other member of the current (active) call
2894 *
2895 * Like AT+CHLD=2x
2896 *
2897 * See TS 22.084 1.3.8.2 (iii)
2898 * TS 22.030 6.5.5 "Entering "2X followed by send"
2899 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07002900 *
2901 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002902 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
2903 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002904 * "response" is NULL
2905 *
2906 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002907 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002908 * RADIO_NOT_AVAILABLE (radio resetting)
2909 * GENERIC_FAILURE
2910 */
2911#define RIL_REQUEST_SEPARATE_CONNECTION 52
2912
2913
2914/**
2915 * RIL_REQUEST_SET_MUTE
2916 *
2917 * Turn on or off uplink (microphone) mute.
2918 *
2919 * Will only be sent while voice call is active.
2920 * Will always be reset to "disable mute" when a new voice call is initiated
2921 *
2922 * "data" is an int *
2923 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
2924 *
2925 * "response" is NULL
2926 *
2927 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002928 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002929 * RADIO_NOT_AVAILABLE (radio resetting)
2930 * GENERIC_FAILURE
2931 */
2932
2933#define RIL_REQUEST_SET_MUTE 53
2934
2935/**
2936 * RIL_REQUEST_GET_MUTE
2937 *
2938 * Queries the current state of the uplink mute setting
2939 *
2940 * "data" is NULL
2941 * "response" is an int *
2942 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
2943 *
2944 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002945 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002946 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00002947 * SS_MODIFIED_TO_DIAL
2948 * SS_MODIFIED_TO_USSD
2949 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002950 * GENERIC_FAILURE
2951 */
2952
2953#define RIL_REQUEST_GET_MUTE 54
2954
2955/**
2956 * RIL_REQUEST_QUERY_CLIP
2957 *
2958 * Queries the status of the CLIP supplementary service
2959 *
2960 * (for MMI code "*#30#")
2961 *
2962 * "data" is NULL
2963 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07002964 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002965 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07002966 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002967 *
2968 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002969 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002970 * RADIO_NOT_AVAILABLE (radio resetting)
2971 * GENERIC_FAILURE
2972 */
2973
2974#define RIL_REQUEST_QUERY_CLIP 55
2975
2976/**
Wink Savillec0114b32011-02-18 10:14:07 -08002977 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
2978 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07002979 *
2980 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07002981 * context or CDMA data connection active
2982 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002983 *
2984 * "data" is NULL
2985 *
2986 * "response" is a "int *"
2987 * ((int *)response)[0] is an integer cause code defined in TS 24.008
2988 * section 6.1.3.1.3 or close approximation
2989 *
2990 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07002991 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08002992 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002993 * cases for error notification
2994 * and potential retries.
2995 *
2996 * Valid errors:
2997 * SUCCESS
2998 * RADIO_NOT_AVAILABLE
2999 * GENERIC_FAILURE
3000 *
3001 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08003002 *
3003 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07003004 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003005
Wink Savillef4c4d362009-04-02 01:37:03 -07003006#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003007
3008/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003009 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003010 *
Wink Saville29487ef2011-04-15 09:15:31 -07003011 * Returns the data call list. An entry is added when a
3012 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
3013 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
3014 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003015 *
3016 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08003017 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003018 *
3019 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003020 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003021 * RADIO_NOT_AVAILABLE (radio resetting)
3022 * GENERIC_FAILURE
Wink Saville29487ef2011-04-15 09:15:31 -07003023 *
3024 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003025 */
3026
Wink Savillef4c4d362009-04-02 01:37:03 -07003027#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003028
3029/**
johnwangf8bc1672009-05-14 19:19:47 -07003030 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003031 *
3032 * Request a radio reset. The RIL implementation may postpone
3033 * the reset until after this request is responded to if the baseband
3034 * is presently busy.
3035 *
johnwangf8bc1672009-05-14 19:19:47 -07003036 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
3037 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003038 * "data" is NULL
3039 * "response" is NULL
3040 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003041 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003042 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003043 * RADIO_NOT_AVAILABLE (radio resetting)
3044 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07003045 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003046 */
3047
3048#define RIL_REQUEST_RESET_RADIO 58
3049
3050/**
3051 * RIL_REQUEST_OEM_HOOK_RAW
3052 *
3053 * This request reserved for OEM-specific uses. It passes raw byte arrays
3054 * back and forth.
3055 *
Wink Saville7f856802009-06-09 10:23:37 -07003056 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003057 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
3058 *
3059 * "data" is a char * of bytes copied from the byte[] data argument in java
3060 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07003061 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003062 * (byte[])(((AsyncResult)response.obj).result)
3063 *
Wink Saville7f856802009-06-09 10:23:37 -07003064 * An error response here will result in
3065 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003066 * (((AsyncResult)response.obj).exception) being an instance of
3067 * com.android.internal.telephony.gsm.CommandException
3068 *
3069 * Valid errors:
3070 * All
3071 */
3072
3073#define RIL_REQUEST_OEM_HOOK_RAW 59
3074
3075/**
3076 * RIL_REQUEST_OEM_HOOK_STRINGS
3077 *
3078 * This request reserved for OEM-specific uses. It passes strings
3079 * back and forth.
3080 *
Wink Saville7f856802009-06-09 10:23:37 -07003081 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003082 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
3083 *
3084 * "data" is a const char **, representing an array of null-terminated UTF-8
3085 * strings copied from the "String[] strings" argument to
3086 * invokeOemRilRequestStrings()
3087 *
3088 * "response" is a const char **, representing an array of null-terminated UTF-8
3089 * stings that will be returned via the caller's response message here:
3090 *
3091 * (String[])(((AsyncResult)response.obj).result)
3092 *
Wink Saville7f856802009-06-09 10:23:37 -07003093 * An error response here will result in
3094 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003095 * (((AsyncResult)response.obj).exception) being an instance of
3096 * com.android.internal.telephony.gsm.CommandException
3097 *
3098 * Valid errors:
3099 * All
3100 */
3101
3102#define RIL_REQUEST_OEM_HOOK_STRINGS 60
3103
3104/**
3105 * RIL_REQUEST_SCREEN_STATE
3106 *
3107 * Indicates the current state of the screen. When the screen is off, the
3108 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07003109 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
3110 * in an effort to conserve power. These notifications should resume when the
3111 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003112 *
3113 * "data" is int *
3114 * ((int *)data)[0] is == 1 for "Screen On"
3115 * ((int *)data)[0] is == 0 for "Screen Off"
3116 *
3117 * "response" is NULL
3118 *
3119 * Valid errors:
3120 * SUCCESS
3121 * GENERIC_FAILURE
3122 */
3123#define RIL_REQUEST_SCREEN_STATE 61
3124
3125
3126/**
3127 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
3128 *
3129 * Enables/disables supplementary service related notifications
3130 * from the network.
3131 *
3132 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3133 *
3134 * "data" is int *
3135 * ((int *)data)[0] is == 1 for notifications enabled
3136 * ((int *)data)[0] is == 0 for notifications disabled
3137 *
3138 * "response" is NULL
3139 *
3140 * Valid errors:
3141 * SUCCESS
3142 * RADIO_NOT_AVAILABLE
3143 * GENERIC_FAILURE
3144 *
3145 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3146 */
3147#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
3148
3149/**
3150 * RIL_REQUEST_WRITE_SMS_TO_SIM
3151 *
3152 * Stores a SMS message to SIM memory.
3153 *
3154 * "data" is RIL_SMS_WriteArgs *
3155 *
3156 * "response" is int *
3157 * ((const int *)response)[0] is the record index where the message is stored.
3158 *
3159 * Valid errors:
3160 * SUCCESS
3161 * GENERIC_FAILURE
3162 *
3163 */
3164#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
3165
3166/**
3167 * RIL_REQUEST_DELETE_SMS_ON_SIM
3168 *
3169 * Deletes a SMS message from SIM memory.
3170 *
3171 * "data" is int *
3172 * ((int *)data)[0] is the record index of the message to delete.
3173 *
3174 * "response" is NULL
3175 *
3176 * Valid errors:
3177 * SUCCESS
3178 * GENERIC_FAILURE
3179 *
3180 */
3181#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
3182
3183/**
3184 * RIL_REQUEST_SET_BAND_MODE
3185 *
3186 * Assign a specified band for RF configuration.
3187 *
3188 * "data" is int *
3189 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
3190 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
3191 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
3192 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
3193 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
3194 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07003195 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
3196 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
3197 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
3198 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
3199 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
3200 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
3201 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
3202 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
3203 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
3204 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
3205 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
3206 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
3207 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003208 *
3209 * "response" is NULL
3210 *
3211 * Valid errors:
3212 * SUCCESS
3213 * RADIO_NOT_AVAILABLE
3214 * GENERIC_FAILURE
3215 */
3216#define RIL_REQUEST_SET_BAND_MODE 65
3217
3218/**
3219 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3220 *
3221 * Query the list of band mode supported by RF.
3222 *
3223 * "data" is NULL
3224 *
3225 * "response" is int *
3226 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
3227 * each available band mode.
3228 *
3229 * 0 for "unspecified" (selected by baseband automatically)
3230 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
3231 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
3232 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
3233 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
3234 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07003235 * 6 for "Cellular (800-MHz Band)"
3236 * 7 for "PCS (1900-MHz Band)"
3237 * 8 for "Band Class 3 (JTACS Band)"
3238 * 9 for "Band Class 4 (Korean PCS Band)"
3239 * 10 for "Band Class 5 (450-MHz Band)"
3240 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
3241 * 12 for "Band Class 7 (Upper 700-MHz Band)"
3242 * 13 for "Band Class 8 (1800-MHz Band)"
3243 * 14 for "Band Class 9 (900-MHz Band)"
3244 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
3245 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
3246 * 17 for "Band Class 15 (AWS Band)"
3247 * 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003248 *
3249 * Valid errors:
3250 * SUCCESS
3251 * RADIO_NOT_AVAILABLE
3252 * GENERIC_FAILURE
3253 *
3254 * See also: RIL_REQUEST_SET_BAND_MODE
3255 */
3256#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
3257
3258/**
3259 * RIL_REQUEST_STK_GET_PROFILE
3260 *
3261 * Requests the profile of SIM tool kit.
3262 * The profile indicates the SAT/USAT features supported by ME.
3263 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
3264 *
3265 * "data" is NULL
3266 *
3267 * "response" is a const char * containing SAT/USAT profile
3268 * in hexadecimal format string starting with first byte of terminal profile
3269 *
3270 * Valid errors:
3271 * RIL_E_SUCCESS
3272 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3273 * RIL_E_GENERIC_FAILURE
3274 */
3275#define RIL_REQUEST_STK_GET_PROFILE 67
3276
3277/**
3278 * RIL_REQUEST_STK_SET_PROFILE
3279 *
3280 * Download the STK terminal profile as part of SIM initialization
3281 * procedure
3282 *
3283 * "data" is a const char * containing SAT/USAT profile
3284 * in hexadecimal format string starting with first byte of terminal profile
3285 *
3286 * "response" is NULL
3287 *
3288 * Valid errors:
3289 * RIL_E_SUCCESS
3290 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3291 * RIL_E_GENERIC_FAILURE
3292 */
3293#define RIL_REQUEST_STK_SET_PROFILE 68
3294
3295/**
3296 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
3297 *
3298 * Requests to send a SAT/USAT envelope command to SIM.
3299 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
3300 *
3301 * "data" is a const char * containing SAT/USAT command
3302 * in hexadecimal format string starting with command tag
3303 *
3304 * "response" is a const char * containing SAT/USAT response
3305 * in hexadecimal format string starting with first byte of response
3306 * (May be NULL)
3307 *
3308 * Valid errors:
3309 * RIL_E_SUCCESS
3310 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3311 * RIL_E_GENERIC_FAILURE
3312 */
3313#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
3314
3315/**
3316 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
3317 *
3318 * Requests to send a terminal response to SIM for a received
3319 * proactive command
3320 *
3321 * "data" is a const char * containing SAT/USAT response
3322 * in hexadecimal format string starting with first byte of response data
3323 *
3324 * "response" is NULL
3325 *
3326 * Valid errors:
3327 * RIL_E_SUCCESS
3328 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3329 * RIL_E_GENERIC_FAILURE
3330 */
3331#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3332
3333/**
3334 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3335 *
3336 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3337 * been initialized by ME already. (We could see the call has been in the 'call
3338 * list') So, STK application needs to accept/reject the call according as user
3339 * operations.
3340 *
3341 * "data" is int *
3342 * ((int *)data)[0] is > 0 for "accept" the call setup
3343 * ((int *)data)[0] is == 0 for "reject" the call setup
3344 *
3345 * "response" is NULL
3346 *
3347 * Valid errors:
3348 * RIL_E_SUCCESS
3349 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3350 * RIL_E_GENERIC_FAILURE
3351 */
3352#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3353
3354/**
3355 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3356 *
3357 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07003358 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003359 * "data" is NULL
3360 * "response" is NULL
3361 *
3362 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003363 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003364 * RADIO_NOT_AVAILABLE (radio resetting)
3365 * GENERIC_FAILURE
3366 */
3367#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3368
3369/**
3370 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3371 *
3372 * Requests to set the preferred network type for searching and registering
3373 * (CS/PS domain, RAT, and operation mode)
3374 *
Wink Savillec0114b32011-02-18 10:14:07 -08003375 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003376 *
3377 * "response" is NULL
3378 *
3379 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07003380 * SUCCESS
3381 * RADIO_NOT_AVAILABLE (radio resetting)
3382 * GENERIC_FAILURE
3383 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003384 */
3385#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3386
3387/**
3388 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
3389 *
3390 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
3391 * for searching and registering
3392 *
3393 * "data" is NULL
3394 *
3395 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003396 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003397 *
3398 * Valid errors:
3399 * SUCCESS
3400 * RADIO_NOT_AVAILABLE
3401 * GENERIC_FAILURE
3402 *
3403 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3404 */
3405#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
3406
3407/**
3408 * RIL_REQUEST_NEIGHBORING_CELL_IDS
3409 *
3410 * Request neighboring cell id in GSM network
3411 *
3412 * "data" is NULL
3413 * "response" must be a " const RIL_NeighboringCell** "
3414 *
3415 * Valid errors:
3416 * SUCCESS
3417 * RADIO_NOT_AVAILABLE
3418 * GENERIC_FAILURE
3419 */
3420#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3421
3422/**
3423 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07003424 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003425 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07003426 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3427 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003428 *
3429 * Note: The RIL implementation should default to "updates enabled"
3430 * when the screen is on and "updates disabled" when the screen is off.
3431 *
3432 * "data" is int *
3433 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3434 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3435 *
3436 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07003437 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003438 * Valid errors:
3439 * SUCCESS
3440 * RADIO_NOT_AVAILABLE
3441 * GENERIC_FAILURE
3442 *
3443 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3444 */
3445#define RIL_REQUEST_SET_LOCATION_UPDATES 76
3446
Wink Savillef4c4d362009-04-02 01:37:03 -07003447/**
Wink Savillec0114b32011-02-18 10:14:07 -08003448 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07003449 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003450 * Request to set the location where the CDMA subscription shall
3451 * be retrieved
3452 *
3453 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003454 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07003455 *
3456 * "response" is NULL
3457 *
3458 * Valid errors:
3459 * SUCCESS
3460 * RADIO_NOT_AVAILABLE
3461 * GENERIC_FAILURE
3462 * SIM_ABSENT
3463 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08003464 *
3465 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07003466 */
Wink Savillec0114b32011-02-18 10:14:07 -08003467#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07003468
3469/**
3470 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003471 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003472 * Request to set the roaming preferences in CDMA
3473 *
3474 * "data" is int *
3475 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3476 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3477 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003478 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003479 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003480 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003481 * Valid errors:
3482 * SUCCESS
3483 * RADIO_NOT_AVAILABLE
3484 * GENERIC_FAILURE
3485 */
3486#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
3487
3488/**
3489 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003490 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003491 * Request the actual setting of the roaming preferences in CDMA in the modem
3492 *
3493 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003494 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003495 * "response" is int *
3496 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
3497 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3498 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003499 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003500 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003501 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003502 * Valid errors:
3503 * SUCCESS
3504 * RADIO_NOT_AVAILABLE
3505 * GENERIC_FAILURE
3506 */
3507#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
3508
3509/**
3510 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003511 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003512 * Request to set the TTY mode
3513 *
3514 * "data" is int *
3515 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003516 * ((int *)data)[0] is == 1 for TTY Full
3517 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
3518 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07003519 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003520 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003521 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003522 * Valid errors:
3523 * SUCCESS
3524 * RADIO_NOT_AVAILABLE
3525 * GENERIC_FAILURE
3526 */
3527#define RIL_REQUEST_SET_TTY_MODE 80
3528
3529/**
3530 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003531 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003532 * Request the setting of TTY mode
3533 *
3534 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003535 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003536 * "response" is int *
3537 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003538 * ((int *)response)[0] is == 1 for TTY Full
3539 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
3540 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07003541 *
3542 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003543 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003544 * Valid errors:
3545 * SUCCESS
3546 * RADIO_NOT_AVAILABLE
3547 * GENERIC_FAILURE
3548 */
3549#define RIL_REQUEST_QUERY_TTY_MODE 81
3550
3551/**
3552 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
3553 *
3554 * Request to set the preferred voice privacy mode used in voice
3555 * scrambling
3556 *
3557 * "data" is int *
3558 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3559 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003560 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003561 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003562 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003563 * Valid errors:
3564 * SUCCESS
3565 * RADIO_NOT_AVAILABLE
3566 * GENERIC_FAILURE
3567 */
3568#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
3569
3570/**
3571 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003572 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003573 * Request the setting of preferred voice privacy mode
3574 *
3575 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003576 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003577 * "response" is int *
3578 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3579 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003580 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003581 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003582 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003583 * Valid errors:
3584 * SUCCESS
3585 * RADIO_NOT_AVAILABLE
3586 * GENERIC_FAILURE
3587 */
3588#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
3589
3590/**
3591 * RIL_REQUEST_CDMA_FLASH
3592 *
3593 * Send FLASH
3594 *
3595 * "data" is const char *
3596 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07003597 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003598 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003599 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003600 * Valid errors:
3601 * SUCCESS
3602 * RADIO_NOT_AVAILABLE
3603 * GENERIC_FAILURE
3604 *
3605 */
3606#define RIL_REQUEST_CDMA_FLASH 84
3607
3608/**
3609 * RIL_REQUEST_CDMA_BURST_DTMF
3610 *
3611 * Send DTMF string
3612 *
jsh602f80f2009-07-10 15:44:37 -07003613 * "data" is const char **
3614 * ((const char **)data)[0] is a DTMF string
3615 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
3616 * default
3617 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
3618 * default
Wink Saville7f856802009-06-09 10:23:37 -07003619 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003620 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003621 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003622 * Valid errors:
3623 * SUCCESS
3624 * RADIO_NOT_AVAILABLE
3625 * GENERIC_FAILURE
3626 *
3627 */
3628#define RIL_REQUEST_CDMA_BURST_DTMF 85
3629
3630/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07003631 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07003632 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07003633 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
3634 * If the checksum is valid the 20 digit AKEY is written to NV,
3635 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07003636 *
3637 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07003638 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
3639 * where the last 6 digits are a checksum of the
3640 * first 20, as specified in TR45.AHAG
3641 * "Common Cryptographic Algorithms, Revision D.1
3642 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07003643 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003644 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003645 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003646 * Valid errors:
3647 * SUCCESS
3648 * RADIO_NOT_AVAILABLE
3649 * GENERIC_FAILURE
3650 *
3651 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07003652#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07003653
3654/**
3655 * RIL_REQUEST_CDMA_SEND_SMS
3656 *
3657 * Send a CDMA SMS message
3658 *
3659 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07003660 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003661 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07003662 *
johnwangbfb151b2009-09-11 15:20:38 -07003663 * Based on the return error, caller decides to resend if sending sms
3664 * fails. The CDMA error class is derived as follows,
3665 * SUCCESS is error class 0 (no error)
3666 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
3667 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
3668 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003669 * Valid errors:
3670 * SUCCESS
3671 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07003672 * SMS_SEND_FAIL_RETRY
Wink Savillef4c4d362009-04-02 01:37:03 -07003673 * GENERIC_FAILURE
3674 *
3675 */
3676#define RIL_REQUEST_CDMA_SEND_SMS 87
3677
3678/**
3679 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
3680 *
3681 * Acknowledge the success or failure in the receipt of SMS
3682 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3683 *
3684 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07003685 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003686 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003687 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003688 * Valid errors:
3689 * SUCCESS
3690 * RADIO_NOT_AVAILABLE
3691 * GENERIC_FAILURE
3692 *
3693 */
3694#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
3695
3696/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003697 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07003698 *
Wink Savillea592eeb2009-05-22 13:26:36 -07003699 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
3700 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003701 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003702 *
3703 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
3704 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
3705 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003706 * Valid errors:
3707 * SUCCESS
3708 * RADIO_NOT_AVAILABLE
3709 * GENERIC_FAILURE
3710 *
3711 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003712#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07003713
3714/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003715 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07003716 *
3717 * Set GSM/WCDMA Cell Broadcast SMS config
3718 *
Wink Savillea592eeb2009-05-22 13:26:36 -07003719 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
3720 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
3721 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003722 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003723 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003724 * Valid errors:
3725 * SUCCESS
3726 * RADIO_NOT_AVAILABLE
3727 * GENERIC_FAILURE
3728 *
3729 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003730#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07003731
3732/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003733 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07003734 *
Wink Savillea592eeb2009-05-22 13:26:36 -07003735* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07003736 *
3737 * "data" is const int *
3738 * (const int *)data[0] indicates to activate or turn off the
3739 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
3740 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07003741 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003742 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003743 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003744 * Valid errors:
3745 * SUCCESS
3746 * RADIO_NOT_AVAILABLE
3747 * GENERIC_FAILURE
3748 *
3749 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003750#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07003751
3752/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003753 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07003754 *
3755 * Request the setting of CDMA Broadcast SMS config
3756 *
3757 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003758 *
3759 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
3760 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
3761 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003762 * Valid errors:
3763 * SUCCESS
3764 * RADIO_NOT_AVAILABLE
3765 * GENERIC_FAILURE
3766 *
3767 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003768#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07003769
3770/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003771 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07003772 *
3773 * Set CDMA Broadcast SMS config
3774 *
Wink Savillea592eeb2009-05-22 13:26:36 -07003775 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
3776 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
3777 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003778 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003779 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003780 * Valid errors:
3781 * SUCCESS
3782 * RADIO_NOT_AVAILABLE
3783 * GENERIC_FAILURE
3784 *
3785 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003786#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07003787
3788/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003789 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07003790 *
3791 * Enable or disable the reception of CDMA Broadcast SMS
3792 *
3793 * "data" is const int *
3794 * (const int *)data[0] indicates to activate or turn off the
3795 * reception of CDMA Broadcast SMS, 0-1,
3796 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07003797 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003798 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003799 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003800 * Valid errors:
3801 * SUCCESS
3802 * RADIO_NOT_AVAILABLE
3803 * GENERIC_FAILURE
3804 *
3805 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003806#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07003807
3808/**
3809 * RIL_REQUEST_CDMA_SUBSCRIPTION
3810 *
3811 * Request the device MDN / H_SID / H_NID.
3812 *
3813 * The request is only allowed when CDMA subscription is available. When CDMA
3814 * subscription is changed, application layer should re-issue the request to
3815 * update the subscription information.
3816 *
3817 * If a NULL value is returned for any of the device id, it means that error
3818 * accessing the device.
3819 *
3820 * "response" is const char **
3821 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07003822 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
3823 * CDMA subscription is available, in decimal format
3824 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
3825 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07003826 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07003827 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07003828 *
3829 * Valid errors:
3830 * SUCCESS
3831 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
3832 */
3833
Wink Savilleeafe79d2009-04-03 18:02:34 -07003834#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07003835
3836/**
3837 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
3838 *
3839 * Stores a CDMA SMS message to RUIM memory.
3840 *
3841 * "data" is RIL_CDMA_SMS_WriteArgs *
3842 *
3843 * "response" is int *
3844 * ((const int *)response)[0] is the record index where the message is stored.
3845 *
3846 * Valid errors:
3847 * SUCCESS
3848 * RADIO_NOT_AVAILABLE
3849 * GENERIC_FAILURE
3850 *
3851 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003852#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07003853
3854/**
3855 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
3856 *
3857 * Deletes a CDMA SMS message from RUIM memory.
3858 *
3859 * "data" is int *
3860 * ((int *)data)[0] is the record index of the message to delete.
3861 *
3862 * "response" is NULL
3863 *
3864 * Valid errors:
3865 * SUCCESS
3866 * RADIO_NOT_AVAILABLE
3867 * GENERIC_FAILURE
3868 *
3869 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003870#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07003871
3872/**
3873 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07003874 *
3875 * Request the device ESN / MEID / IMEI / IMEISV.
3876 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003877 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07003878 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07003879 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003880 *
3881 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07003882 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003883 *
3884 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07003885 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003886 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003887 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07003888 * ((const char **)response)[0] is IMEI if GSM subscription is available
3889 * ((const char **)response)[1] is IMEISV if GSM subscription is available
3890 * ((const char **)response)[2] is ESN if CDMA subscription is available
3891 * ((const char **)response)[3] is MEID if CDMA subscription is available
3892 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003893 * Valid errors:
3894 * SUCCESS
3895 * RADIO_NOT_AVAILABLE
3896 * GENERIC_FAILURE
3897 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003898#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07003899
Wink Saville1b5fd232009-04-22 14:50:00 -07003900/**
3901 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
3902 *
3903 * Request the radio's system selection module to exit emergency
3904 * callback mode. RIL will not respond with SUCCESS until the modem has
3905 * completely exited from Emergency Callback Mode.
3906 *
3907 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003908 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003909 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003910 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003911 * Valid errors:
3912 * SUCCESS
3913 * RADIO_NOT_AVAILABLE
3914 * GENERIC_FAILURE
3915 *
3916 */
3917#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07003918
jsh000a9fe2009-05-11 14:52:35 -07003919/**
3920 * RIL_REQUEST_GET_SMSC_ADDRESS
3921 *
3922 * Queries the default Short Message Service Center address on the device.
3923 *
3924 * "data" is NULL
3925 *
3926 * "response" is const char * containing the SMSC address.
3927 *
3928 * Valid errors:
3929 * SUCCESS
3930 * RADIO_NOT_AVAILABLE
3931 * GENERIC_FAILURE
3932 *
3933 */
3934#define RIL_REQUEST_GET_SMSC_ADDRESS 100
3935
3936/**
3937 * RIL_REQUEST_SET_SMSC_ADDRESS
3938 *
3939 * Sets the default Short Message Service Center address on the device.
3940 *
3941 * "data" is const char * containing the SMSC address.
3942 *
3943 * "response" is NULL
3944 *
3945 * Valid errors:
3946 * SUCCESS
3947 * RADIO_NOT_AVAILABLE
3948 * GENERIC_FAILURE
3949 *
3950 */
3951#define RIL_REQUEST_SET_SMSC_ADDRESS 101
3952
jshb60444e2009-05-29 11:09:17 -07003953/**
3954 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
3955 *
3956 * Indicates whether there is storage available for new SMS messages.
3957 *
3958 * "data" is int *
3959 * ((int *)data)[0] is 1 if memory is available for storing new messages
3960 * is 0 if memory capacity is exceeded
3961 *
3962 * "response" is NULL
3963 *
3964 * Valid errors:
3965 * SUCCESS
3966 * RADIO_NOT_AVAILABLE
3967 * GENERIC_FAILURE
3968 *
3969 */
3970#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
3971
Wink Saville2641d5b2009-06-08 17:40:42 -07003972/**
3973 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
3974 *
3975 * Indicates that the StkSerivce is running and is
3976 * ready to receive RIL_UNSOL_STK_XXXXX commands.
3977 *
3978 * "data" is NULL
3979 * "response" is NULL
3980 *
3981 * Valid errors:
3982 * SUCCESS
3983 * RADIO_NOT_AVAILABLE
3984 * GENERIC_FAILURE
3985 *
3986 */
3987#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
3988
Wink Savillec0114b32011-02-18 10:14:07 -08003989/**
3990 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3991 *
3992 * Request to query the location where the CDMA subscription shall
3993 * be retrieved
3994 *
3995 * "data" is NULL
3996 *
3997 * "response" is int *
3998 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3999 *
4000 * Valid errors:
4001 * SUCCESS
4002 * RADIO_NOT_AVAILABLE
4003 * GENERIC_FAILURE
4004 * SUBSCRIPTION_NOT_AVAILABLE
4005 *
4006 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
4007 */
4008#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
4009
Jake Hambyfa8d5842011-08-19 16:22:18 -07004010/**
4011 * RIL_REQUEST_ISIM_AUTHENTICATION
4012 *
4013 * Request the ISIM application on the UICC to perform AKA
4014 * challenge/response algorithm for IMS authentication
4015 *
4016 * "data" is a const char * containing the challenge string in Base64 format
4017 * "response" is a const char * containing the response in Base64 format
4018 *
4019 * Valid errors:
4020 * SUCCESS
4021 * RADIO_NOT_AVAILABLE
4022 * GENERIC_FAILURE
4023 */
4024#define RIL_REQUEST_ISIM_AUTHENTICATION 105
4025
Jake Hamby300105d2011-09-26 01:01:44 -07004026/**
4027 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
4028 *
4029 * Acknowledge successful or failed receipt of SMS previously indicated
4030 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
4031 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
4032 *
4033 * "data" is const char **
4034 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
4035 * is "0" on failed receipt (send RP-ERROR)
4036 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
4037 *
4038 * "response" is NULL
4039 *
4040 * Valid errors:
4041 * SUCCESS
4042 * RADIO_NOT_AVAILABLE
4043 * GENERIC_FAILURE
4044 */
4045#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
4046
4047/**
4048 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
4049 *
4050 * Requests to send a SAT/USAT envelope command to SIM.
4051 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
4052 *
4053 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
4054 * the SW1 and SW2 status bytes from the UICC response are returned along with
4055 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
4056 *
4057 * The RIL implementation shall perform the normal processing of a '91XX'
4058 * response in SW1/SW2 to retrieve the pending proactive command and send it
4059 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
4060 *
4061 * "data" is a const char * containing the SAT/USAT command
4062 * in hexadecimal format starting with command tag
4063 *
4064 * "response" is a const RIL_SIM_IO_Response *
4065 *
4066 * Valid errors:
4067 * RIL_E_SUCCESS
4068 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
4069 * RIL_E_GENERIC_FAILURE
4070 */
4071#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
4072
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004073/**
4074 * RIL_REQUEST_VOICE_RADIO_TECH
4075 *
4076 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
4077 * when radio state is RADIO_STATE_ON
4078 *
4079 * "data" is NULL
4080 * "response" is int *
4081 * ((int *) response)[0] is of type const RIL_RadioTechnology
4082 *
4083 * Valid errors:
4084 * SUCCESS
4085 * RADIO_NOT_AVAILABLE
4086 * GENERIC_FAILURE
4087 */
4088#define RIL_REQUEST_VOICE_RADIO_TECH 108
4089
Wink Saville8a9e0212013-04-09 12:11:38 -07004090/**
4091 * RIL_REQUEST_GET_CELL_INFO_LIST
4092 *
4093 * Request all of the current cell information known to the radio. The radio
4094 * must a list of all current cells, including the neighboring cells. If for a particular
4095 * cell information isn't known then the appropriate unknown value will be returned.
4096 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
4097 *
4098 * "data" is NULL
4099 *
Narayan Kamath2e8e6692016-01-26 09:45:05 +00004100 * "response" is an array of RIL_CellInfo.
Wink Saville8a9e0212013-04-09 12:11:38 -07004101 */
4102#define RIL_REQUEST_GET_CELL_INFO_LIST 109
4103
4104/**
4105 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
4106 *
4107 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
Wink Savillec57b3eb2013-04-17 12:51:41 -07004108 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
Wink Saville8a9e0212013-04-09 12:11:38 -07004109 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
4110 * a RIL_UNSOL_CELL_INFO_LIST.
4111 *
4112 * "data" is int *
4113 * ((int *)data)[0] is minimum time in milliseconds
4114 *
4115 * "response" is NULL
4116 *
4117 * Valid errors:
4118 * SUCCESS
4119 * RADIO_NOT_AVAILABLE
4120 * GENERIC_FAILURE
4121 */
4122#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
Jake Hamby300105d2011-09-26 01:01:44 -07004123
Sungmin Choi75697532013-04-26 15:04:45 -07004124/**
4125 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
4126 *
4127 * Set an apn to initial attach network
4128 * "response" is NULL
4129 *
4130 * Valid errors:
4131 * SUCCESS
4132 * RADIO_NOT_AVAILABLE (radio resetting)
4133 * GENERIC_FAILURE
4134 * SUBSCRIPTION_NOT_AVAILABLE
4135 */
4136#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
4137
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004138/**
4139 * RIL_REQUEST_IMS_REGISTRATION_STATE
4140 *
4141 * Request current IMS registration state
4142 *
4143 * "data" is NULL
4144 *
4145 * "response" is int *
4146 * ((int *)response)[0] is registration state:
4147 * 0 - Not registered
4148 * 1 - Registered
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004149 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004150 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004151 * must follow with IMS SMS format:
4152 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004153 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
4154 *
4155 * Valid errors:
4156 * SUCCESS
4157 * RADIO_NOT_AVAILABLE
4158 * GENERIC_FAILURE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004159 */
4160#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
4161
4162/**
4163 * RIL_REQUEST_IMS_SEND_SMS
4164 *
4165 * Send a SMS message over IMS
4166 *
4167 * "data" is const RIL_IMS_SMS_Message *
4168 *
4169 * "response" is a const RIL_SMS_Response *
4170 *
4171 * Based on the return error, caller decides to resend if sending sms
4172 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
4173 * In case of retry, data is encoded based on Voice Technology available.
4174 *
4175 * Valid errors:
4176 * SUCCESS
4177 * RADIO_NOT_AVAILABLE
4178 * SMS_SEND_FAIL_RETRY
4179 * FDN_CHECK_FAILURE
4180 * GENERIC_FAILURE
4181 *
4182 */
4183#define RIL_REQUEST_IMS_SEND_SMS 113
4184
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004185/**
4186 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
4187 *
4188 * Request APDU exchange on the basic channel. This command reflects TS 27.007
4189 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
4190 * of GSM/CDMA, and filter commands appropriately. It should filter
4191 * channel management and SELECT by DF name commands.
4192 *
4193 * "data" is a const RIL_SIM_APDU *
4194 * "sessionid" field should be ignored.
4195 *
4196 * "response" is a const RIL_SIM_IO_Response *
4197 *
4198 * Valid errors:
4199 * SUCCESS
4200 * RADIO_NOT_AVAILABLE
4201 * GENERIC_FAILURE
4202 */
4203#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
4204
4205/**
4206 * RIL_REQUEST_SIM_OPEN_CHANNEL
4207 *
4208 * Open a new logical channel and select the given application. This command
4209 * reflects TS 27.007 "open logical channel" operation (+CCHO).
4210 *
4211 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
4212 *
4213 * "response" is int *
4214 * ((int *)data)[0] contains the session id of the logical channel.
Shishir Agrawal760123f2014-10-14 09:14:57 -07004215 * ((int *)data)[1] onwards may optionally contain the select response for the
4216 * open channel command with one byte per integer.
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004217 *
4218 * Valid errors:
4219 * SUCCESS
4220 * RADIO_NOT_AVAILABLE
4221 * GENERIC_FAILURE
4222 * MISSING_RESOURCE
4223 * NO_SUCH_ELEMENT
4224 */
4225#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
4226
4227/**
4228 * RIL_REQUEST_SIM_CLOSE_CHANNEL
4229 *
4230 * Close a previously opened logical channel. This command reflects TS 27.007
4231 * "close logical channel" operation (+CCHC).
4232 *
4233 * "data" is int *
4234 * ((int *)data)[0] is the session id of logical the channel to close.
4235 *
4236 * "response" is NULL
4237 *
4238 * Valid errors:
4239 * SUCCESS
4240 * RADIO_NOT_AVAILABLE
4241 * GENERIC_FAILURE
4242 */
4243#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
4244
4245/**
4246 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
4247 *
4248 * Exchange APDUs with a UICC over a previously opened logical channel. This
4249 * command reflects TS 27.007 "generic logical channel access" operation
4250 * (+CGLA). The modem should filter channel management and SELECT by DF name
4251 * commands.
4252 *
4253 * "data" is a const RIL_SIM_APDU*
4254 *
4255 * "response" is a const RIL_SIM_IO_Response *
4256 *
4257 * Valid errors:
4258 * SUCCESS
4259 * RADIO_NOT_AVAILABLE
4260 * GENERIC_FAILURE
4261 */
4262#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
4263
Jake Hamby8a4a2332014-01-15 13:12:05 -08004264/**
4265 * RIL_REQUEST_NV_READ_ITEM
4266 *
4267 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4268 * This is used for device configuration by some CDMA operators.
4269 *
4270 * "data" is a const RIL_NV_ReadItem *
4271 *
4272 * "response" is const char * containing the contents of the NV item
4273 *
4274 * Valid errors:
4275 * SUCCESS
4276 * RADIO_NOT_AVAILABLE
4277 * GENERIC_FAILURE
4278 */
4279#define RIL_REQUEST_NV_READ_ITEM 118
4280
4281/**
4282 * RIL_REQUEST_NV_WRITE_ITEM
4283 *
4284 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4285 * This is used for device configuration by some CDMA operators.
4286 *
4287 * "data" is a const RIL_NV_WriteItem *
4288 *
4289 * "response" is NULL
4290 *
4291 * Valid errors:
4292 * SUCCESS
4293 * RADIO_NOT_AVAILABLE
4294 * GENERIC_FAILURE
4295 */
4296#define RIL_REQUEST_NV_WRITE_ITEM 119
4297
4298/**
4299 * RIL_REQUEST_NV_WRITE_CDMA_PRL
4300 *
4301 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
4302 * This is used for device configuration by some CDMA operators.
4303 *
4304 * "data" is a const char * containing the PRL as a byte array
4305 *
4306 * "response" is NULL
4307 *
4308 * Valid errors:
4309 * SUCCESS
4310 * RADIO_NOT_AVAILABLE
4311 * GENERIC_FAILURE
4312 */
4313#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
4314
4315/**
4316 * RIL_REQUEST_NV_RESET_CONFIG
4317 *
4318 * Reset the radio NV configuration to the factory state.
4319 * This is used for device configuration by some CDMA operators.
4320 *
4321 * "data" is int *
Jake Hambyd27c9d52014-02-06 14:52:05 -08004322 * ((int *)data)[0] is 1 to reload all NV items
4323 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
4324 * ((int *)data)[0] is 3 for factory reset (RTN)
Jake Hamby8a4a2332014-01-15 13:12:05 -08004325 *
4326 * "response" is NULL
4327 *
4328 * Valid errors:
4329 * SUCCESS
4330 * RADIO_NOT_AVAILABLE
4331 * GENERIC_FAILURE
4332 */
4333#define RIL_REQUEST_NV_RESET_CONFIG 121
4334
Etan Cohend3652192014-06-20 08:28:44 -07004335 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
4336 * FIXME This API needs to have more documentation.
4337 *
4338 * Selection/de-selection of a subscription from a SIM card
4339 * "data" is const RIL_SelectUiccSub*
4340
4341 *
4342 * "response" is NULL
4343 *
4344 * Valid errors:
4345 * SUCCESS
4346 * RADIO_NOT_AVAILABLE (radio resetting)
4347 * GENERIC_FAILURE
4348 * SUBSCRIPTION_NOT_SUPPORTED
4349 *
4350 */
4351#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
4352
4353/**
4354 * RIL_REQUEST_ALLOW_DATA
4355 *
4356 * Tells the modem whether data calls are allowed or not
4357 *
4358 * "data" is int *
4359 * FIXME slotId and aid will be added.
4360 * ((int *)data)[0] is == 0 to allow data calls
4361 * ((int *)data)[0] is == 1 to disallow data calls
4362 *
4363 * "response" is NULL
4364 *
4365 * Valid errors:
4366 *
4367 * SUCCESS
4368 * RADIO_NOT_AVAILABLE (radio resetting)
4369 * GENERIC_FAILURE
4370 *
4371 */
4372#define RIL_REQUEST_ALLOW_DATA 123
4373
4374/**
4375 * RIL_REQUEST_GET_HARDWARE_CONFIG
4376 *
4377 * Request all of the current hardware (modem and sim) associated
4378 * with the RIL.
4379 *
4380 * "data" is NULL
4381 *
4382 * "response" is an array of RIL_HardwareConfig.
4383 */
4384#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
4385
4386/**
Amit Mahajan2b772032014-06-26 14:20:11 -07004387 * RIL_REQUEST_SIM_AUTHENTICATION
Etan Cohend3652192014-06-20 08:28:44 -07004388 *
4389 * Returns the response of SIM Authentication through RIL to a
4390 * challenge request.
4391 *
4392 * "data" Base64 encoded string containing challenge:
4393 * int authContext; P2 value of authentication command, see P2 parameter in
4394 * 3GPP TS 31.102 7.1.2
4395 * char *authData; the challenge string in Base64 format, see 3GPP
4396 * TS 31.102 7.1.2
4397 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
4398 * NULL if no value
4399 *
4400 * "response" Base64 encoded strings containing response:
4401 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
4402 * int sw2;
4403 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
4404 */
Amit Mahajan2b772032014-06-26 14:20:11 -07004405#define RIL_REQUEST_SIM_AUTHENTICATION 125
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004406
Wink Savillec29360a2014-07-13 05:17:28 -07004407/**
4408 * RIL_REQUEST_GET_DC_RT_INFO
4409 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004410 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07004411 * Requests the Data Connection Real Time Info
4412 *
4413 * "data" is NULL
4414 *
4415 * "response" is the most recent RIL_DcRtInfo
4416 *
4417 * Valid errors:
4418 * SUCCESS
4419 * RADIO_NOT_AVAILABLE
4420 * GENERIC_FAILURE
4421 *
4422 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
4423 */
4424#define RIL_REQUEST_GET_DC_RT_INFO 126
4425
4426/**
4427 * RIL_REQUEST_SET_DC_RT_INFO_RATE
4428 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004429 * The request is DEPRECATED
Wink Savillec29360a2014-07-13 05:17:28 -07004430 * This is the minimum number of milliseconds between successive
4431 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
4432 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
4433 * 0 means send as fast as possible.
4434 *
4435 * "data" The number of milliseconds as an int
4436 *
4437 * "response" is null
4438 *
4439 * Valid errors:
4440 * SUCCESS must not fail
4441 */
4442#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
4443
Amit Mahajanc796e222014-08-13 16:54:01 +00004444/**
4445 * RIL_REQUEST_SET_DATA_PROFILE
4446 *
4447 * Set data profile in modem
Hui Wang8d679622014-10-16 14:59:27 -05004448 * Modem should erase existed profiles from framework, and apply new profiles
Amit Mahajanc796e222014-08-13 16:54:01 +00004449 * "data" is an const RIL_DataProfileInfo **
4450 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
4451 * "response" is NULL
4452 *
4453 * Valid errors:
4454 * SUCCESS
4455 * RADIO_NOT_AVAILABLE (radio resetting)
4456 * GENERIC_FAILURE
4457 * SUBSCRIPTION_NOT_AVAILABLE
4458 */
4459#define RIL_REQUEST_SET_DATA_PROFILE 128
Naveen Kallaa65a16a2014-07-31 16:48:31 -07004460
4461/**
4462 * RIL_REQUEST_SHUTDOWN
4463 *
4464 * Device is shutting down. All further commands are ignored
4465 * and RADIO_NOT_AVAILABLE must be returned.
4466 *
4467 * "data" is null
4468 * "response" is NULL
4469 *
4470 * Valid errors:
4471 * SUCCESS
4472 * RADIO_NOT_AVAILABLE
4473 * GENERIC_FAILURE
4474 */
4475#define RIL_REQUEST_SHUTDOWN 129
4476
Wink Saville8b4e4f72014-10-17 15:01:45 -07004477/**
4478 * RIL_REQUEST_GET_RADIO_CAPABILITY
4479 *
4480 * Used to get phone radio capablility.
4481 *
Abhishek Adappa772c0d22015-02-09 11:11:12 -08004482 * "data" is the RIL_RadioCapability structure
Wink Saville8b4e4f72014-10-17 15:01:45 -07004483 *
4484 * Valid errors:
4485 * SUCCESS
4486 * RADIO_NOT_AVAILABLE
4487 * GENERIC_FAILURE
4488 */
4489#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
4490
4491/**
4492 * RIL_REQUEST_SET_RADIO_CAPABILITY
4493 *
4494 * Used to set the phones radio capability. Be VERY careful
4495 * using this request as it may cause some vendor modems to reset. Because
4496 * of the possible modem reset any RIL commands after this one may not be
4497 * processed.
4498 *
4499 * "data" is the RIL_RadioCapability structure
4500 *
4501 * "response" is the RIL_RadioCapability structure, used to feedback return status
4502 *
4503 * Valid errors:
4504 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
4505 * RADIO_NOT_AVAILABLE
4506 * GENERIC_FAILURE
4507 */
4508#define RIL_REQUEST_SET_RADIO_CAPABILITY 131
4509
fengluf7408292015-04-14 14:53:55 -07004510/**
4511 * RIL_REQUEST_START_LCE
4512 *
4513 * Start Link Capacity Estimate (LCE) service if supported by the radio.
4514 *
4515 * "data" is const int *
4516 * ((const int*)data)[0] specifies the desired reporting interval (ms).
fenglu290add32015-05-01 17:05:15 -07004517 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
fengluf7408292015-04-14 14:53:55 -07004518 *
fenglu290add32015-05-01 17:05:15 -07004519 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07004520 *
4521 * Valid errors:
4522 * SUCCESS
4523 * RADIO_NOT_AVAILABLE
4524 * LCE_NOT_SUPPORTED
4525 */
4526#define RIL_REQUEST_START_LCE 132
4527
4528/**
4529 * RIL_REQUEST_STOP_LCE
4530 *
4531 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
4532 * idempotent for the radio modem.
4533 *
fenglu290add32015-05-01 17:05:15 -07004534 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07004535 *
4536 * Valid errors:
4537 * SUCCESS
4538 * RADIO_NOT_AVAILABLE
4539 * LCE_NOT_SUPPORTED
4540 */
4541#define RIL_REQUEST_STOP_LCE 133
4542
4543/**
4544 * RIL_REQUEST_PULL_LCEDATA
4545 *
4546 * Pull LCE service for capacity information.
4547 *
fenglu290add32015-05-01 17:05:15 -07004548 * "response" is the RIL_LceDataInfo.
fengluf7408292015-04-14 14:53:55 -07004549 *
4550 * Valid errors:
4551 * SUCCESS
4552 * RADIO_NOT_AVAILABLE
4553 * LCE_NOT_SUPPORTED
4554 */
4555#define RIL_REQUEST_PULL_LCEDATA 134
4556
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004557/**
4558 * RIL_REQUEST_GET_ACTIVITY_INFO
4559 *
4560 * Get modem activity statisitics info.
4561 *
4562 * There can be multiple RIL_REQUEST_GET_ACTIVITY_INFO calls to modem.
4563 * Once the response for the request is sent modem will clear
4564 * current statistics information.
4565 *
4566 * "data" is null
4567 * "response" is const RIL_ActivityStatsInfo *
4568 *
4569 * Valid errors:
4570 *
4571 * SUCCESS
4572 * RADIO_NOT_AVAILABLE (radio resetting)
4573 * GENERIC_FAILURE
4574 */
4575#define RIL_REQUEST_GET_ACTIVITY_INFO 135
Naveen Kallaa65a16a2014-07-31 16:48:31 -07004576
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004577/***********************************************************************/
4578
Wink Savillef4c4d362009-04-02 01:37:03 -07004579
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004580#define RIL_UNSOL_RESPONSE_BASE 1000
4581
4582/**
4583 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
4584 *
4585 * Indicate when value of RIL_RadioState has changed.
4586 *
4587 * Callee will invoke RIL_RadioStateRequest method on main thread
4588 *
4589 * "data" is NULL
4590 */
4591
4592#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
4593
4594
4595/**
4596 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
4597 *
4598 * Indicate when call state has changed
4599 *
4600 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
4601 *
4602 * "data" is NULL
4603 *
Wink Saville7f856802009-06-09 10:23:37 -07004604 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004605 * "RING", "BUSY", "NO CARRIER", and also call state
4606 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
4607 *
4608 * Redundent or extraneous invocations are tolerated
4609 */
4610#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
4611
4612
4613/**
Wink Savillec0114b32011-02-18 10:14:07 -08004614 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004615 *
Wink Savillec0114b32011-02-18 10:14:07 -08004616 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004617 *
4618 * Callee will invoke the following requests on main thread:
4619 *
Wink Savillec0114b32011-02-18 10:14:07 -08004620 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004621 * RIL_REQUEST_OPERATOR
4622 *
4623 * "data" is NULL
4624 *
4625 * FIXME should this happen when SIM records are loaded? (eg, for
4626 * EONS)
4627 */
Wink Savillec0114b32011-02-18 10:14:07 -08004628#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004629
4630/**
4631 * RIL_UNSOL_RESPONSE_NEW_SMS
4632 *
4633 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07004634 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004635 * "data" is const char *
4636 * This is a pointer to a string containing the PDU of an SMS-DELIVER
4637 * as an ascii string of hex digits. The PDU starts with the SMSC address
4638 * per TS 27.005 (+CMT:)
4639 *
4640 * Callee will subsequently confirm the receipt of thei SMS with a
4641 * RIL_REQUEST_SMS_ACKNOWLEDGE
4642 *
Wink Saville7f856802009-06-09 10:23:37 -07004643 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004644 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
4645 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
4646 */
4647
4648#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
4649
4650/**
4651 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
4652 *
4653 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07004654 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004655 * "data" is const char *
4656 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
4657 * as an ascii string of hex digits. The PDU starts with the SMSC address
4658 * per TS 27.005 (+CDS:).
4659 *
4660 * Callee will subsequently confirm the receipt of the SMS with a
4661 * RIL_REQUEST_SMS_ACKNOWLEDGE
4662 *
Wink Saville7f856802009-06-09 10:23:37 -07004663 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004664 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
4665 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
4666 */
4667
4668#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
4669
4670/**
4671 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
4672 *
4673 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07004674 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004675 * "data" is const int *
4676 * ((const int *)data)[0] contains the slot index on the SIM that contains
4677 * the new message
4678 */
4679
4680#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
4681
4682/**
4683 * RIL_UNSOL_ON_USSD
4684 *
4685 * Called when a new USSD message is received.
4686 *
4687 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07004688 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004689 * one of these string values:
4690 * "0" USSD-Notify -- text in ((const char **)data)[1]
4691 * "1" USSD-Request -- text in ((const char **)data)[1]
4692 * "2" Session terminated by network
4693 * "3" other local client (eg, SIM Toolkit) has responded
4694 * "4" Operation not supported
4695 * "5" Network timeout
4696 *
4697 * The USSD session is assumed to persist if the type code is "1", otherwise
4698 * the current session (if any) is assumed to have terminated.
4699 *
4700 * ((const char **)data)[1] points to a message string if applicable, which
4701 * should always be in UTF-8.
4702 */
4703#define RIL_UNSOL_ON_USSD 1006
4704/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
4705
4706/**
4707 * RIL_UNSOL_ON_USSD_REQUEST
4708 *
4709 * Obsolete. Send via RIL_UNSOL_ON_USSD
4710 */
Wink Saville7f856802009-06-09 10:23:37 -07004711#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004712
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004713/**
4714 * RIL_UNSOL_NITZ_TIME_RECEIVED
4715 *
4716 * Called when radio has received a NITZ time message
4717 *
4718 * "data" is const char * pointing to NITZ time string
4719 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
4720 */
4721#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
4722
4723/**
4724 * RIL_UNSOL_SIGNAL_STRENGTH
4725 *
4726 * Radio may report signal strength rather han have it polled.
4727 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004728 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004729 */
4730#define RIL_UNSOL_SIGNAL_STRENGTH 1009
4731
4732
4733/**
Wink Savillef4c4d362009-04-02 01:37:03 -07004734 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004735 *
Wink Savillec0114b32011-02-18 10:14:07 -08004736 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07004737 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
4738 * of current data contexts including new contexts that have been
4739 * activated. A data call is only removed from this list when the
4740 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
4741 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004742 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004743 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004744 */
4745
Wink Savillef4c4d362009-04-02 01:37:03 -07004746#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004747
4748/**
4749 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
4750 *
4751 * Reports supplementary service related notification from the network.
4752 *
4753 * "data" is a const RIL_SuppSvcNotification *
4754 *
4755 */
4756
4757#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
4758
4759/**
4760 * RIL_UNSOL_STK_SESSION_END
4761 *
4762 * Indicate when STK session is terminated by SIM.
4763 *
4764 * "data" is NULL
4765 */
4766#define RIL_UNSOL_STK_SESSION_END 1012
4767
4768/**
4769 * RIL_UNSOL_STK_PROACTIVE_COMMAND
4770 *
4771 * Indicate when SIM issue a STK proactive command to applications
4772 *
4773 * "data" is a const char * containing SAT/USAT proactive command
4774 * in hexadecimal format string starting with command tag
4775 *
4776 */
4777#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
4778
4779/**
4780 * RIL_UNSOL_STK_EVENT_NOTIFY
4781 *
4782 * Indicate when SIM notifies applcations some event happens.
4783 * Generally, application does not need to have any feedback to
4784 * SIM but shall be able to indicate appropriate messages to users.
4785 *
4786 * "data" is a const char * containing SAT/USAT commands or responses
4787 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
4788 * starting with first byte of response data or command tag
4789 *
4790 */
4791#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
4792
4793/**
4794 * RIL_UNSOL_STK_CALL_SETUP
4795 *
4796 * Indicate when SIM wants application to setup a voice call.
4797 *
4798 * "data" is const int *
4799 * ((const int *)data)[0] contains timeout value (in milliseconds)
4800 */
4801#define RIL_UNSOL_STK_CALL_SETUP 1015
4802
4803/**
4804 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
4805 *
4806 * Indicates that SMS storage on the SIM is full. Sent when the network
4807 * attempts to deliver a new SMS message. Messages cannot be saved on the
4808 * SIM until space is freed. In particular, incoming Class 2 messages
4809 * cannot be stored.
4810 *
4811 * "data" is null
4812 *
4813 */
4814#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
4815
4816/**
4817 * RIL_UNSOL_SIM_REFRESH
4818 *
4819 * Indicates that file(s) on the SIM have been updated, or the SIM
4820 * has been reinitialized.
4821 *
Alex Yakavenka45e740e2012-01-31 11:48:27 -08004822 * In the case where RIL is version 6 or older:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004823 * "data" is an int *
4824 * ((int *)data)[0] is a RIL_SimRefreshResult.
4825 * ((int *)data)[1] is the EFID of the updated file if the result is
Alex Yakavenka45e740e2012-01-31 11:48:27 -08004826 * SIM_FILE_UPDATE or NULL for any other result.
4827 *
4828 * In the case where RIL is version 7:
4829 * "data" is a RIL_SimRefreshResponse_v7 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004830 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004831 * Note: If the SIM state changes as a result of the SIM refresh (eg,
4832 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004833 * should be sent.
4834 */
4835#define RIL_UNSOL_SIM_REFRESH 1017
4836
4837/**
4838 * RIL_UNSOL_CALL_RING
4839 *
4840 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07004841 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
4842 * of a call and sending multiple is optional. If the system property
4843 * ro.telephony.call_ring.multiple is false then the upper layers
4844 * will generate the multiple events internally. Otherwise the vendor
4845 * ril must generate multiple RIL_UNSOL_CALL_RING if
4846 * ro.telephony.call_ring.multiple is true or if it is absent.
4847 *
4848 * The rate of these events is controlled by ro.telephony.call_ring.delay
4849 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004850 *
Wink Saville3d54e742009-05-18 18:00:44 -07004851 * "data" is null for GSM
4852 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004853 */
4854#define RIL_UNSOL_CALL_RING 1018
4855
The Android Open Source Project34a51082009-03-05 14:34:37 -08004856/**
4857 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
4858 *
4859 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07004860 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004861 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07004862
The Android Open Source Project34a51082009-03-05 14:34:37 -08004863 * "data" is null
4864 */
4865#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
4866
4867/**
4868 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4869 *
4870 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07004871 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004872 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07004873 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004874 * Callee will subsequently confirm the receipt of the SMS with
4875 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07004876 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004877 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
4878 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07004879 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004880 */
4881#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
4882
4883/**
4884 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
4885 *
4886 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07004887 *
Henrik Hall0eba2022010-11-25 10:20:56 +01004888 * "data" can be one of the following:
4889 * If received from GSM network, "data" is const char of 88 bytes
4890 * which indicates each page of a CBS Message sent to the MS by the
4891 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
4892 * If received from UMTS network, "data" is const char of 90 up to 1252
4893 * bytes which contain between 1 and 15 CBS Message pages sent as one
4894 * 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 -07004895 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004896 */
4897#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07004898
The Android Open Source Project34a51082009-03-05 14:34:37 -08004899/**
4900 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
4901 *
4902 * Indicates that SMS storage on the RUIM is full. Messages
4903 * cannot be saved on the RUIM until space is freed.
4904 *
4905 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07004906 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004907 */
Wink Savillef4c4d362009-04-02 01:37:03 -07004908#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
4909
The Android Open Source Project34a51082009-03-05 14:34:37 -08004910/**
4911 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
4912 *
4913 * Indicates a restricted state change (eg, for Domain Specific Access Control).
4914 *
4915 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
4916 *
4917 * "data" is an int *
4918 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
4919 */
4920#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
4921
Wink Saville1b5fd232009-04-22 14:50:00 -07004922/**
4923 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
4924 *
4925 * Indicates that the radio system selection module has
4926 * autonomously entered emergency callback mode.
4927 *
4928 * "data" is null
4929 *
4930 */
4931#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08004932
Wink Saville1b5fd232009-04-22 14:50:00 -07004933/**
4934 * RIL_UNSOL_CDMA_CALL_WAITING
4935 *
4936 * Called when CDMA radio receives a call waiting indication.
4937 *
4938 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07004939 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004940 */
4941#define RIL_UNSOL_CDMA_CALL_WAITING 1025
4942
4943/**
4944 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
4945 *
4946 * Called when CDMA radio receives an update of the progress of an
4947 * OTASP/OTAPA call.
4948 *
4949 * "data" is const int *
4950 * For CDMA this is an integer OTASP/OTAPA status listed in
4951 * RIL_CDMA_OTA_ProvisionStatus.
4952 *
4953 */
4954#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
4955
4956/**
4957 * RIL_UNSOL_CDMA_INFO_REC
4958 *
4959 * Called when CDMA radio receives one or more info recs.
4960 *
4961 * "data" is const RIL_CDMA_InformationRecords *
4962 *
4963 */
4964#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08004965
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07004966/**
4967 * RIL_UNSOL_OEM_HOOK_RAW
4968 *
4969 * This is for OEM specific use.
4970 *
4971 * "data" is a byte[]
4972 */
4973#define RIL_UNSOL_OEM_HOOK_RAW 1028
4974
John Wang5d621da2009-09-18 17:17:48 -07004975/**
4976 * RIL_UNSOL_RINGBACK_TONE
4977 *
4978 * Indicates that nework doesn't have in-band information, need to
4979 * play out-band tone.
4980 *
4981 * "data" is an int *
4982 * ((int *)data)[0] == 0 for stop play ringback tone.
4983 * ((int *)data)[0] == 1 for start play ringback tone.
4984 */
4985#define RIL_UNSOL_RINGBACK_TONE 1029
4986
John Wang5909cf82010-01-29 00:18:54 -08004987/**
4988 * RIL_UNSOL_RESEND_INCALL_MUTE
4989 *
4990 * Indicates that framework/application need reset the uplink mute state.
4991 *
4992 * There may be situations where the mute state becomes out of sync
4993 * between the application and device in some GSM infrastructures.
4994 *
4995 * "data" is null
4996 */
4997#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08004998
4999/**
5000 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
5001 *
5002 * Called when CDMA subscription source changed.
5003 *
5004 * "data" is int *
5005 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
5006 */
Wink Saville29487ef2011-04-15 09:15:31 -07005007#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08005008
5009/**
5010 * RIL_UNSOL_CDMA_PRL_CHANGED
5011 *
5012 * Called when PRL (preferred roaming list) changes.
5013 *
5014 * "data" is int *
5015 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
5016 */
5017#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
5018
5019/**
5020 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
5021 *
5022 * Called when Emergency Callback Mode Ends
5023 *
5024 * Indicates that the radio system selection module has
5025 * proactively exited emergency callback mode.
5026 *
5027 * "data" is NULL
5028 *
5029 */
5030#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
5031
Wink Saville5b9df332011-04-06 16:24:21 -07005032/**
5033 * RIL_UNSOL_RIL_CONNECTED
5034 *
5035 * Called the ril connects and returns the version
5036 *
5037 * "data" is int *
5038 * ((int *)data)[0] is RIL_VERSION
5039 */
5040#define RIL_UNSOL_RIL_CONNECTED 1034
5041
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005042/**
5043 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
5044 *
5045 * Indicates that voice technology has changed. Contains new radio technology
5046 * as a data in the message.
5047 *
5048 * "data" is int *
5049 * ((int *)data)[0] is of type const RIL_RadioTechnology
5050 *
5051 */
5052#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
5053
Wink Saville8a9e0212013-04-09 12:11:38 -07005054/**
5055 * RIL_UNSOL_CELL_INFO_LIST
5056 *
5057 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
5058 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
5059 *
5060 * "data" is NULL
5061 *
Narayan Kamath2e8e6692016-01-26 09:45:05 +00005062 * "response" is an array of RIL_CellInfo.
Wink Saville8a9e0212013-04-09 12:11:38 -07005063 */
5064#define RIL_UNSOL_CELL_INFO_LIST 1036
Naveen Kalla2bc78d62011-12-07 16:22:53 -08005065
Wink Saville865ce3b2013-11-08 16:37:01 -08005066/**
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005067 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
5068 *
5069 * Called when IMS registration state has changed
5070 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005071 * To get IMS registration state and IMS SMS format, callee needs to invoke the
5072 * following request on main thread:
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005073 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005074 * RIL_REQUEST_IMS_REGISTRATION_STATE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005075 *
Wink Saville865ce3b2013-11-08 16:37:01 -08005076 * "data" is NULL
5077 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005078 */
5079#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
5080
Etan Cohend3652192014-06-20 08:28:44 -07005081/**
5082 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
5083 *
5084 * Indicated when there is a change in subscription status.
5085 * This event will be sent in the following scenarios
5086 * - subscription readiness at modem, which was selected by telephony layer
5087 * - when subscription is deactivated by modem due to UICC card removal
5088 * - When network invalidates the subscription i.e. attach reject due to authentication reject
5089 *
5090 * "data" is const int *
5091 * ((const int *)data)[0] == 0 for Subscription Deactivated
5092 * ((const int *)data)[0] == 1 for Subscription Activated
5093 *
5094 */
5095#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
5096
5097/**
5098 * RIL_UNSOL_SRVCC_STATE_NOTIFY
5099 *
5100 * Called when Single Radio Voice Call Continuity(SRVCC)
5101 * progress state has changed
5102 *
5103 * "data" is int *
5104 * ((int *)data)[0] is of type const RIL_SrvccState
5105 *
5106 */
5107
5108#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
5109
5110/**
5111 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
5112 *
5113 * Called when the hardware configuration associated with the RILd changes
5114 *
5115 * "data" is an array of RIL_HardwareConfig
5116 *
5117 */
5118#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
5119
Wink Savillec29360a2014-07-13 05:17:28 -07005120/**
5121 * RIL_UNSOL_DC_RT_INFO_CHANGED
5122 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005123 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005124 * Sent when the DC_RT_STATE changes but the time
5125 * between these messages must not be less than the
5126 * value set by RIL_REQUEST_SET_DC_RT_RATE.
5127 *
5128 * "data" is the most recent RIL_DcRtInfo
5129 *
5130 */
5131#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
5132
Wink Saville8b4e4f72014-10-17 15:01:45 -07005133/**
5134 * RIL_UNSOL_RADIO_CAPABILITY
5135 *
5136 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
5137 * Returns the phone radio capability exactly as
5138 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
5139 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
5140 *
5141 * "data" is the RIL_RadioCapability structure
5142 */
5143#define RIL_UNSOL_RADIO_CAPABILITY 1042
5144
Amit Mahajan54563d32014-11-22 00:54:49 +00005145/*
5146 * RIL_UNSOL_ON_SS
5147 *
5148 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
5149 * call control.
5150 *
5151 * "data" is const RIL_StkCcUnsolSsResponse *
5152 *
5153 */
5154#define RIL_UNSOL_ON_SS 1043
5155
5156/**
5157 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
5158 *
5159 * Called when there is an ALPHA from UICC during Call Control.
5160 *
5161 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
5162 *
5163 */
5164#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
5165
fengluf7408292015-04-14 14:53:55 -07005166/**
5167 * RIL_UNSOL_LCEDATA_RECV
5168 *
5169 * Called when there is an incoming Link Capacity Estimate (LCE) info report.
5170 *
fenglu290add32015-05-01 17:05:15 -07005171 * "data" is the RIL_LceDataInfo structure.
fengluf7408292015-04-14 14:53:55 -07005172 *
5173 */
5174#define RIL_UNSOL_LCEDATA_RECV 1045
5175
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005176/***********************************************************************/
5177
Amit Mahajan54563d32014-11-22 00:54:49 +00005178
Etan Cohend3652192014-06-20 08:28:44 -07005179#if defined(ANDROID_MULTI_SIM)
5180/**
5181 * RIL_Request Function pointer
5182 *
5183 * @param request is one of RIL_REQUEST_*
5184 * @param data is pointer to data defined for that RIL_REQUEST_*
5185 * data is owned by caller, and should not be modified or freed by callee
5186 * @param t should be used in subsequent call to RIL_onResponse
5187 * @param datalen the length of data
5188 *
5189 */
5190typedef void (*RIL_RequestFunc) (int request, void *data,
5191 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
5192
5193/**
5194 * This function should return the current radio state synchronously
5195 */
5196typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
5197
5198#else
5199/* Backward compatible */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005200
5201/**
5202 * RIL_Request Function pointer
5203 *
5204 * @param request is one of RIL_REQUEST_*
5205 * @param data is pointer to data defined for that RIL_REQUEST_*
5206 * data is owned by caller, and should not be modified or freed by callee
5207 * @param t should be used in subsequent call to RIL_onResponse
5208 * @param datalen the length of data
5209 *
5210 */
Wink Saville7f856802009-06-09 10:23:37 -07005211typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005212 size_t datalen, RIL_Token t);
5213
5214/**
5215 * This function should return the current radio state synchronously
5216 */
5217typedef RIL_RadioState (*RIL_RadioStateRequest)();
5218
Etan Cohend3652192014-06-20 08:28:44 -07005219#endif
5220
5221
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005222/**
5223 * This function returns "1" if the specified RIL_REQUEST code is
5224 * supported and 0 if it is not
5225 *
5226 * @param requestCode is one of RIL_REQUEST codes
5227 */
5228
5229typedef int (*RIL_Supports)(int requestCode);
5230
5231/**
Wink Saville7f856802009-06-09 10:23:37 -07005232 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005233 * thread that calls RIL_RequestFunc--and indicates that a pending
5234 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07005235 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005236 * On cancel, the callee should do its best to abandon the request and
5237 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
5238 *
5239 * Subsequent calls to RIL_onRequestComplete for this request with
5240 * other results will be tolerated but ignored. (That is, it is valid
5241 * to ignore the cancellation request)
5242 *
5243 * RIL_Cancel calls should return immediately, and not wait for cancellation
5244 *
Wink Saville7f856802009-06-09 10:23:37 -07005245 * 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 -08005246 * interface
5247 *
5248 * @param t token wants to be canceled
5249 */
5250
5251typedef void (*RIL_Cancel)(RIL_Token t);
5252
5253typedef void (*RIL_TimedCallback) (void *param);
5254
5255/**
5256 * Return a version string for your RIL implementation
5257 */
5258typedef const char * (*RIL_GetVersion) (void);
5259
5260typedef struct {
5261 int version; /* set to RIL_VERSION */
5262 RIL_RequestFunc onRequest;
5263 RIL_RadioStateRequest onStateRequest;
5264 RIL_Supports supports;
5265 RIL_Cancel onCancel;
5266 RIL_GetVersion getVersion;
5267} RIL_RadioFunctions;
5268
Sungmin Choi75697532013-04-26 15:04:45 -07005269typedef struct {
5270 char *apn;
5271 char *protocol;
5272 int authtype;
5273 char *username;
5274 char *password;
5275} RIL_InitialAttachApn;
5276
Amit Mahajan2b772032014-06-26 14:20:11 -07005277typedef struct {
5278 int authContext; /* P2 value of authentication command, see P2 parameter in
5279 3GPP TS 31.102 7.1.2 */
5280 char *authData; /* the challenge string in Base64 format, see 3GPP
5281 TS 31.102 7.1.2 */
5282 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
5283 NULL if no value. */
5284} RIL_SimAuthentication;
5285
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005286#ifdef RIL_SHLIB
5287struct RIL_Env {
5288 /**
5289 * "t" is parameter passed in on previous call to RIL_Notification
5290 * routine.
5291 *
5292 * If "e" != SUCCESS, then response can be null/is ignored
5293 *
Wink Saville7f856802009-06-09 10:23:37 -07005294 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005295 * freed by callee
5296 *
5297 * RIL_onRequestComplete will return as soon as possible
5298 */
Wink Saville7f856802009-06-09 10:23:37 -07005299 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005300 void *response, size_t responselen);
5301
Etan Cohend3652192014-06-20 08:28:44 -07005302#if defined(ANDROID_MULTI_SIM)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005303 /**
5304 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5305 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5306 *
5307 * "data" is owned by caller, and should not be modified or freed by callee
5308 */
Etan Cohend3652192014-06-20 08:28:44 -07005309 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
5310#else
5311 /**
5312 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5313 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5314 *
5315 * "data" is owned by caller, and should not be modified or freed by callee
5316 */
5317 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
5318#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005319 /**
Wink Saville7f856802009-06-09 10:23:37 -07005320 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005321 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
5322 * a relative time value at which the callback is invoked. If relativeTime is
5323 * NULL or points to a 0-filled structure, the callback will be invoked as
5324 * soon as possible
5325 */
5326
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07005327 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07005328 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005329};
5330
5331
Wink Saville7f856802009-06-09 10:23:37 -07005332/**
5333 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005334 * argc and argv will be command line arguments intended for the RIL implementation
5335 * Return NULL on error
5336 *
5337 * @param env is environment point defined as RIL_Env
5338 * @param argc number of arguments
5339 * @param argv list fo arguments
5340 *
5341 */
5342const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
5343
5344#else /* RIL_SHLIB */
5345
5346/**
5347 * Call this once at startup to register notification routine
5348 *
5349 * @param callbacks user-specifed callback function
5350 */
5351void RIL_register (const RIL_RadioFunctions *callbacks);
5352
5353
5354/**
5355 *
5356 * RIL_onRequestComplete will return as soon as possible
5357 *
5358 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07005359 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005360 * @param e error code
5361 * if "e" != SUCCESS, then response can be null/is ignored
5362 * @param response is owned by caller, and should not be modified or
5363 * freed by callee
5364 * @param responselen the length of response in byte
5365 */
Wink Saville7f856802009-06-09 10:23:37 -07005366void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005367 void *response, size_t responselen);
5368
Etan Cohend3652192014-06-20 08:28:44 -07005369#if defined(ANDROID_MULTI_SIM)
5370/**
5371 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
5372 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5373 * "data" is owned by caller, and should not be modified or freed by callee
5374 * @param datalen the length of data in byte
5375 */
5376
5377void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
5378 size_t datalen, RIL_SOCKET_ID socket_id);
5379#else
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005380/**
5381 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
5382 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5383 * "data" is owned by caller, and should not be modified or freed by callee
5384 * @param datalen the length of data in byte
5385 */
5386
Wink Saville7f856802009-06-09 10:23:37 -07005387void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005388 size_t datalen);
Etan Cohend3652192014-06-20 08:28:44 -07005389#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005390
5391/**
Wink Saville7f856802009-06-09 10:23:37 -07005392 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005393 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
5394 * a relative time value at which the callback is invoked. If relativeTime is
5395 * NULL or points to a 0-filled structure, the callback will be invoked as
5396 * soon as possible
5397 *
5398 * @param callback user-specifed callback function
5399 * @param param parameter list
5400 * @param relativeTime a relative time value at which the callback is invoked
5401 */
5402
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07005403void RIL_requestTimedCallback (RIL_TimedCallback callback,
5404 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005405
5406
5407#endif /* RIL_SHLIB */
5408
5409#ifdef __cplusplus
5410}
5411#endif
5412
5413#endif /*ANDROID_RIL_H*/