blob: a86ec6b7d553b42db82da83ff061038f3874abfc [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
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -070049#define RIL_VERSION 11 /* Current version */
Alex Yakavenka45e740e2012-01-31 11:48:27 -080050#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080051
Wink Savillea592eeb2009-05-22 13:26:36 -070052#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
53#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
54
Etan Cohend3652192014-06-20 08:28:44 -070055#define MAX_RILDS 3
56#define MAX_SOCKET_NAME_LENGTH 6
57#define MAX_CLIENT_ID_LENGTH 2
58#define MAX_DEBUG_SOCKET_NAME_LENGTH 12
59#define MAX_QEMU_PIPE_NAME_LENGTH 11
Wink Saville8b4e4f72014-10-17 15:01:45 -070060#define MAX_UUID_LENGTH 64
61
Etan Cohend3652192014-06-20 08:28:44 -070062
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080063typedef void * RIL_Token;
64
65typedef enum {
Etan Cohend3652192014-06-20 08:28:44 -070066 RIL_SOCKET_1,
67#if (SIM_COUNT >= 2)
68 RIL_SOCKET_2,
69#if (SIM_COUNT >= 3)
70 RIL_SOCKET_3,
71#endif
72#if (SIM_COUNT >= 4)
73 RIL_SOCKET_4,
74#endif
75#endif
76 RIL_SOCKET_NUM
77} RIL_SOCKET_ID;
78
79
80typedef enum {
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080081 RIL_E_SUCCESS = 0,
82 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
83 RIL_E_GENERIC_FAILURE = 2,
84 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
85 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
86 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
87 RIL_E_REQUEST_NOT_SUPPORTED = 6,
88 RIL_E_CANCELLED = 7,
89 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
90 call on a Class C GPRS device */
91 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
92 registers in network */
Wink Saville3d54e742009-05-18 18:00:44 -070093 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
94 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
95 shall be retrieved because of SIM or RUIM
Wink Savillef4c4d362009-04-02 01:37:03 -070096 card absent */
Wink Saville3d54e742009-05-18 18:00:44 -070097 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
Wink Savillef4c4d362009-04-02 01:37:03 -070098 location */
jsh602f80f2009-07-10 15:44:37 -070099 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
John Wang75534472010-04-20 15:11:42 -0700100 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800101 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
John Wang75534472010-04-20 15:11:42 -0700102 illegal SIM or ME */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800103 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
Amit Mahajan54563d32014-11-22 00:54:49 +0000104 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
105 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
106 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
107 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
108 data */
109 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
110 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
111 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
112 request */
113 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
114 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
115 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
fengluf7408292015-04-14 14:53:55 -0700116 RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */
117 RIL_E_LCE_NOT_SUPPORTED = 36 /* LCE service not supported(36 in RILConstants.java) */
Amit Mahajan54563d32014-11-22 00:54:49 +0000118
119
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800120} RIL_Errno;
121
122typedef enum {
123 RIL_CALL_ACTIVE = 0,
124 RIL_CALL_HOLDING = 1,
125 RIL_CALL_DIALING = 2, /* MO call only */
126 RIL_CALL_ALERTING = 3, /* MO call only */
127 RIL_CALL_INCOMING = 4, /* MT call only */
128 RIL_CALL_WAITING = 5 /* MT call only */
129} RIL_CallState;
130
131typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -0700132 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
133 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800134 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
Wink Savillef4c4d362009-04-02 01:37:03 -0700135 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
Wink Saville7f856802009-06-09 10:23:37 -0700136 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -0700137 personalization locked, or SIM absent */
138 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
139 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
140 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
Wink Saville7f856802009-06-09 10:23:37 -0700141 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -0700142 personalization locked, or RUIM absent */
143 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800144 RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */
145 RADIO_STATE_ON = 10 /* Radio is on */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800146} RIL_RadioState;
147
Wink Saville43808972011-01-13 17:39:51 -0800148typedef enum {
149 RADIO_TECH_UNKNOWN = 0,
150 RADIO_TECH_GPRS = 1,
151 RADIO_TECH_EDGE = 2,
152 RADIO_TECH_UMTS = 3,
153 RADIO_TECH_IS95A = 4,
154 RADIO_TECH_IS95B = 5,
155 RADIO_TECH_1xRTT = 6,
156 RADIO_TECH_EVDO_0 = 7,
157 RADIO_TECH_EVDO_A = 8,
158 RADIO_TECH_HSDPA = 9,
159 RADIO_TECH_HSUPA = 10,
160 RADIO_TECH_HSPA = 11,
161 RADIO_TECH_EVDO_B = 12,
162 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800163 RADIO_TECH_LTE = 14,
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800164 RADIO_TECH_HSPAP = 15, // HSPA+
Etan Cohend3652192014-06-20 08:28:44 -0700165 RADIO_TECH_GSM = 16, // Only supports voice
Yashdev Singh3c8f37c2015-02-23 13:04:28 -0800166 RADIO_TECH_TD_SCDMA = 17,
167 RADIO_TECH_IWLAN = 18
Wink Saville43808972011-01-13 17:39:51 -0800168} RIL_RadioTechnology;
169
Wink Saville8b4e4f72014-10-17 15:01:45 -0700170typedef enum {
171 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
172 RAF_GPRS = (1 << RADIO_TECH_GPRS),
173 RAF_EDGE = (1 << RADIO_TECH_EDGE),
174 RAF_UMTS = (1 << RADIO_TECH_UMTS),
175 RAF_IS95A = (1 << RADIO_TECH_IS95A),
176 RAF_IS95B = (1 << RADIO_TECH_IS95B),
177 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
178 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
179 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
180 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
181 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
182 RAF_HSPA = (1 << RADIO_TECH_HSPA),
183 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
184 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
185 RAF_LTE = (1 << RADIO_TECH_LTE),
186 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
187 RAF_GSM = (1 << RADIO_TECH_GSM),
188 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
189} RIL_RadioAccessFamily;
190
191typedef enum {
192 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
193 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
194 // forthcoming with these same parameters
195 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
196 // RIL_RadioCapability.status = 0, if any START's fail no
197 // APPLY will be sent
198 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
199 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
200 // occurs in any previous command the RIL_RadioAccessesFamily and
Legler Wu8caf06f2014-10-29 14:02:14 +0800201 // logicalModemUuid fields will be the prior configuration thus
Wink Saville8b4e4f72014-10-17 15:01:45 -0700202 // restoring the configuration to the previous value. An error
203 // returned by this command will generally be ignored or may
204 // cause that logical modem to be removed from service.
205} RadioCapabilityPhase;
206
207typedef enum {
208 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
209 // RC_PHASE_APPLY
210 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
211 // capability was success with RC_PHASE_FINISH
212 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
213 // capability is fail with RC_PHASE_FINISH.
214} RadioCapabilityStatus;
215
216#define RIL_RADIO_CAPABILITY_VERSION 1
217typedef struct {
Legler Wu8caf06f2014-10-29 14:02:14 +0800218 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
Wink Saville8b4e4f72014-10-17 15:01:45 -0700219 int session; // Unique session value defined by framework returned in all "responses/unsol"
220 int phase; // CONFIGURED, START, APPLY, FINISH
221 int rat; // RIL_RadioAccessFamily for the radio
222 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
223 int status; // Return status and an input parameter for RC_PHASE_FINISH
224} RIL_RadioCapability;
225
Wink Savillec0114b32011-02-18 10:14:07 -0800226// Do we want to split Data from Voice and the use
227// RIL_RadioTechnology for get/setPreferredVoice/Data ?
228typedef enum {
229 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
230 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
231 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
232 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
233 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
234 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
235 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
236 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
237 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
238 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
239 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
Uma Maheswari Ramalingam0e094872011-09-28 13:25:48 -0700240 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
241 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
Wink Savillec0114b32011-02-18 10:14:07 -0800242} RIL_PreferredNetworkType;
243
244/* Source for cdma subscription */
245typedef enum {
246 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
247 CDMA_SUBSCRIPTION_SOURCE_NV = 1
248} RIL_CdmaSubscriptionSource;
249
Wink Saville74fa3882009-12-22 15:35:41 -0800250/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
251typedef enum {
252 RIL_UUS_TYPE1_IMPLICIT = 0,
253 RIL_UUS_TYPE1_REQUIRED = 1,
254 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
255 RIL_UUS_TYPE2_REQUIRED = 3,
256 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
257 RIL_UUS_TYPE3_REQUIRED = 5,
258 RIL_UUS_TYPE3_NOT_REQUIRED = 6
259} RIL_UUS_Type;
260
261/* User-to-User Signaling Information data coding schemes. Possible values for
262 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
263 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
264typedef enum {
265 RIL_UUS_DCS_USP = 0, /* User specified protocol */
266 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
267 RIL_UUS_DCS_X244 = 2, /* X.244 */
268 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
269 convergence function */
270 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
271} RIL_UUS_DCS;
272
273/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
274 * This data is passed in RIL_ExtensionRecord and rec contains this
275 * structure when type is RIL_UUS_INFO_EXT_REC */
276typedef struct {
277 RIL_UUS_Type uusType; /* UUS Type */
278 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
279 int uusLength; /* Length of UUS Data */
280 char * uusData; /* UUS Data */
281} RIL_UUS_Info;
282
283/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700284typedef struct {
285 char isPresent; /* non-zero if signal information record is present */
286 char signalType; /* as defined 3.7.5.5-1 */
287 char alertPitch; /* as defined 3.7.5.5-2 */
288 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
289} RIL_CDMA_SignalInfoRecord;
290
Wink Saville1b5fd232009-04-22 14:50:00 -0700291typedef struct {
292 RIL_CallState state;
293 int index; /* Connection Index for use with, eg, AT+CHLD */
294 int toa; /* type of address, eg 145 = intl */
295 char isMpty; /* nonzero if is mpty call */
296 char isMT; /* nonzero if call is mobile terminated */
297 char als; /* ALS line indicator if available
298 (0 = line 1) */
299 char isVoice; /* nonzero if this is is a voice call */
300 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
301 char * number; /* Remote party number */
302 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
303 char * name; /* Remote party name */
304 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800305 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800306} RIL_Call;
307
Wink Savillec0114b32011-02-18 10:14:07 -0800308/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800309typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800310 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700311 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700312 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
313 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800314 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800315 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
316} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800317
318/*
319 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
320 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
321 */
322typedef struct {
323 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500324 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
325 back-off timer value RIL wants to override the one
326 pre-configured in FW.
327 The unit is miliseconds.
328 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700329 The value 0 means retry should be done ASAP.
Wink Saville8a9e0212013-04-09 12:11:38 -0700330 The value of INT_MAX(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800331 int cid; /* Context ID, uniquely identifies this call */
332 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
333 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
334 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
335 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
336 such as "IP" or "IPV6" */
337 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800338 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
339 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800340 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800341 one of each. If the prefix length is absent the addresses
342 are assumed to be point to point with IPv4 having a prefix
343 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800344 char * dnses; /* A space-delimited list of DNS server addresses,
345 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
346 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800347 char * gateways; /* A space-delimited list of default gateway addresses,
348 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
349 May be empty in which case the addresses represent point
350 to point connections. */
351} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800352
Etan Cohend3652192014-06-20 08:28:44 -0700353typedef struct {
354 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
355 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
356 back-off timer value RIL wants to override the one
357 pre-configured in FW.
358 The unit is miliseconds.
359 The value < 0 means no value is suggested.
360 The value 0 means retry should be done ASAP.
361 The value of INT_MAX(0x7fffffff) means no retry. */
362 int cid; /* Context ID, uniquely identifies this call */
363 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
364 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
365 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
366 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
367 such as "IP" or "IPV6" */
368 char * ifname; /* The network interface name */
369 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
370 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
371 May not be empty, typically 1 IPv4 or 1 IPv6 or
372 one of each. If the prefix length is absent the addresses
373 are assumed to be point to point with IPv4 having a prefix
374 length of 32 and IPv6 128. */
375 char * dnses; /* A space-delimited list of DNS server addresses,
376 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
377 May be empty. */
378 char * gateways; /* A space-delimited list of default gateway addresses,
379 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
380 May be empty in which case the addresses represent point
381 to point connections. */
382 char * pcscf; /* the Proxy Call State Control Function address
383 via PCO(Protocol Configuration Option) for IMS client. */
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -0700384} RIL_Data_Call_Response_v9;
385
386typedef struct {
387 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
388 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
389 back-off timer value RIL wants to override the one
390 pre-configured in FW.
391 The unit is miliseconds.
392 The value < 0 means no value is suggested.
393 The value 0 means retry should be done ASAP.
394 The value of INT_MAX(0x7fffffff) means no retry. */
395 int cid; /* Context ID, uniquely identifies this call */
396 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
397 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
398 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
399 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
400 such as "IP" or "IPV6" */
401 char * ifname; /* The network interface name */
402 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
403 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
404 May not be empty, typically 1 IPv4 or 1 IPv6 or
405 one of each. If the prefix length is absent the addresses
406 are assumed to be point to point with IPv4 having a prefix
407 length of 32 and IPv6 128. */
408 char * dnses; /* A space-delimited list of DNS server addresses,
409 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
410 May be empty. */
411 char * gateways; /* A space-delimited list of default gateway addresses,
412 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
413 May be empty in which case the addresses represent point
414 to point connections. */
415 char * pcscf; /* the Proxy Call State Control Function address
416 via PCO(Protocol Configuration Option) for IMS client. */
417 int mtu; /* MTU received from network
418 Value <= 0 means network has either not sent a value or
419 sent an invalid value */
420} RIL_Data_Call_Response_v11;
Etan Cohend3652192014-06-20 08:28:44 -0700421
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700422typedef enum {
423 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
424 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
425} RIL_RadioTechnologyFamily;
426
427typedef struct {
428 RIL_RadioTechnologyFamily tech;
429 unsigned char retry; /* 0 == not retry, nonzero == retry */
430 int messageRef; /* Valid field if retry is set to nonzero.
431 Contains messageRef from RIL_SMS_Response
432 corresponding to failed MO SMS.
433 */
434
435 union {
436 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
437 RIL_CDMA_SMS_Message* cdmaMessage;
438
439 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
440 char** gsmMessage;
441 } message;
442} RIL_IMS_SMS_Message;
443
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800444typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800445 int messageRef; /* TP-Message-Reference for GSM,
446 and BearerData MessageId for CDMA
447 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800448 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700449 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
450 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
451 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800452} RIL_SMS_Response;
453
454/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
455typedef struct {
456 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
457 /* 0 = "REC UNREAD" */
458 /* 1 = "REC READ" */
459 /* 2 = "STO UNSENT" */
460 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700461 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
462 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800463 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
464 (as expected by TS 27.005) or NULL for default SMSC */
465} RIL_SMS_WriteArgs;
466
467/** Used by RIL_REQUEST_DIAL */
468typedef struct {
469 char * address;
470 int clir;
471 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
472 * clir == 0 on "use subscription default value"
473 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
474 * clir == 2 on "CLIR suppression" (allow CLI presentation)
475 */
Wink Saville74fa3882009-12-22 15:35:41 -0800476 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800477} RIL_Dial;
478
479typedef struct {
480 int command; /* one of the commands listed for TS 27.007 +CRSM*/
481 int fileid; /* EF id */
482 char *path; /* "pathid" from TS 27.007 +CRSM command.
483 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700484 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800485 */
486 int p1;
487 int p2;
488 int p3;
489 char *data; /* May be NULL*/
490 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800491} RIL_SIM_IO_v5;
492
493typedef struct {
494 int command; /* one of the commands listed for TS 27.007 +CRSM*/
495 int fileid; /* EF id */
496 char *path; /* "pathid" from TS 27.007 +CRSM command.
497 Path is in hex asciii format eg "7f205f70"
498 Path must always be provided.
499 */
500 int p1;
501 int p2;
502 int p3;
503 char *data; /* May be NULL*/
504 char *pin2; /* May be NULL*/
505 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
506} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800507
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800508/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
509 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
510typedef struct {
511 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
512 ignored for +CSIM command. */
513
514 /* Following fields are used to derive the APDU ("command" and "length"
515 values in TS 27.007 +CSIM and +CGLA commands). */
516 int cla;
517 int instruction;
518 int p1;
519 int p2;
520 int p3; /* A negative P3 implies a 4 byte APDU. */
521 char *data; /* May be NULL. In hex string format. */
522} RIL_SIM_APDU;
523
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800524typedef struct {
525 int sw1;
526 int sw2;
Amit Mahajan2875bc22014-08-06 10:03:15 -0700527 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
528 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 -0800529} RIL_SIM_IO_Response;
530
531/* See also com.android.internal.telephony.gsm.CallForwardInfo */
532
533typedef struct {
534 int status; /*
535 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
536 * status 1 = active, 0 = not active
537 *
538 * For RIL_REQUEST_SET_CALL_FORWARD:
539 * status is:
540 * 0 = disable
541 * 1 = enable
542 * 2 = interrogate
543 * 3 = registeration
544 * 4 = erasure
545 */
546
Wink Saville3d54e742009-05-18 18:00:44 -0700547 int reason; /* from TS 27.007 7.11 "reason" */
548 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
549 See table for Android mapping from
550 MMI service code
551 0 means user doesn't input class */
552 int toa; /* "type" from TS 27.007 7.11 */
553 char * number; /* "number" from TS 27.007 7.11. May be NULL */
554 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800555}RIL_CallForwardInfo;
556
557typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700558 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
559 * Upper 16 bits is LAC and lower 16 bits
560 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800561 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700562 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700563 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800564 */
johnwange0ba6a92009-09-11 19:14:52 -0700565 int rssi; /* Received RSSI in GSM,
566 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800567 */
568} RIL_NeighboringCell;
569
fengluf7408292015-04-14 14:53:55 -0700570typedef struct {
571 char lce_status; /* LCE service status:
572 * -1 = not supported;
573 * 0 = stopped;
574 * 1 = active.
575 */
576 unsigned int actual_interval_ms; /* actual LCE reporting interval,
577 * meaningful only if LCEStatus = 1.
578 */
579} RIL_LceStatusInfo;
580
581typedef struct {
fenglu290add32015-05-01 17:05:15 -0700582 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
fengluf7408292015-04-14 14:53:55 -0700583 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
584 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
585 * moves to inactive state or network type change)
586 * 1 = suspended;
587 * 0 = not suspended.
588 */
589} RIL_LceDataInfo;
590
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800591/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
592typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700593 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800594 CALL_FAIL_NORMAL = 16,
595 CALL_FAIL_BUSY = 17,
596 CALL_FAIL_CONGESTION = 34,
597 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
598 CALL_FAIL_CALL_BARRED = 240,
599 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700600 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
601 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Amit Mahajan54563d32014-11-22 00:54:49 +0000602 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
603 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
604 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
Wink Saville1b5fd232009-04-22 14:50:00 -0700605 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
606 CALL_FAIL_CDMA_DROP = 1001,
607 CALL_FAIL_CDMA_INTERCEPT = 1002,
608 CALL_FAIL_CDMA_REORDER = 1003,
609 CALL_FAIL_CDMA_SO_REJECT = 1004,
610 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
611 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
612 CALL_FAIL_CDMA_PREEMPTED = 1007,
613 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
614 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700615 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800616 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
617} RIL_LastCallFailCause;
618
Chao Liu548a81e2015-05-14 16:13:46 -0700619typedef struct {
620 RIL_LastCallFailCause cause_code;
621 char * vendor_cause;
622} RIL_LastCallFailCauseInfo;
623
Wink Savillef4c4d362009-04-02 01:37:03 -0700624/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800625typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800626 PDP_FAIL_NONE = 0, /* No error, connection ok */
627
628 /* an integer cause code defined in TS 24.008
629 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
630 If the implementation does not have access to the exact cause codes,
631 then it should return one of the following values,
632 as the UI layer needs to distinguish these
633 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700634 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
Sanket Padaweac308b92016-01-07 14:41:17 -0800635 PDP_FAIL_NAS_SIGNALLING = 0x0E,
636 PDP_FAIL_LLC_SNDCP = 0x19,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700637 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
638 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
639 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
640 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
641 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
642 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
643 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
644 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
645 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800646 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
Hui Wang11e8b232014-09-19 16:40:17 -0500647 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
648 based on framework config */
Sanket Padaweac308b92016-01-07 14:41:17 -0800649 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
650 PDP_FAIL_NETWORK_FAILURE = 0x26,
651 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
652 PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
653 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
654 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
655 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
656 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
657 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
658 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
Wink Saville43808972011-01-13 17:39:51 -0800659 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
660 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
661 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Sanket Padaweac308b92016-01-07 14:41:17 -0800662 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
663 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
664 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
665 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
666 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
667 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
668 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
669 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
670 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
671 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
672 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
673 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
674 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
675 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
676 PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
677 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
678 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
679 PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
680 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
681 PDP_FAIL_IFACE_MISMATCH = 0x75,
682 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
683 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
684 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
685 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
686 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
Wink Saville43808972011-01-13 17:39:51 -0800687
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700688 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800689 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
690 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800691
692 /* reasons for data call drop - network/modem disconnect */
Wink Saville3492c6e2013-10-03 13:53:27 -0700693 PDP_FAIL_SIGNAL_LOST = -3,
Wink Saville43808972011-01-13 17:39:51 -0800694 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
695 with parameters appropriate for new technology */
696 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
697 powered off - no retry */
698 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
699 mode was up on same APN/data profile - no retry until
700 tethered call is off */
701
Sanket Padaweac308b92016-01-07 14:41:17 -0800702 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
703 new error codes are added making this unnecessary */
Wink Saville43808972011-01-13 17:39:51 -0800704} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800705
jsh602f80f2009-07-10 15:44:37 -0700706/* See RIL_REQUEST_SETUP_DATA_CALL */
707typedef enum {
708 RIL_DATA_PROFILE_DEFAULT = 0,
709 RIL_DATA_PROFILE_TETHERED = 1,
Hui Wang8d679622014-10-16 14:59:27 -0500710 RIL_DATA_PROFILE_IMS = 2,
711 RIL_DATA_PROFILE_FOTA = 3,
712 RIL_DATA_PROFILE_CBS = 4,
713 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
714 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
jsh602f80f2009-07-10 15:44:37 -0700715} RIL_DataProfile;
716
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800717/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
718typedef struct {
719 int notificationType; /*
720 * 0 = MO intermediate result code
721 * 1 = MT unsolicited result code
722 */
723 int code; /* See 27.007 7.17
724 "code1" for MO
725 "code2" for MT. */
726 int index; /* CUG index. See 27.007 7.17. */
727 int type; /* "type" from 27.007 7.17 (MT only). */
728 char * number; /* "number" from 27.007 7.17
729 (MT only, may be NULL). */
730} RIL_SuppSvcNotification;
731
Wink Savillef4c4d362009-04-02 01:37:03 -0700732#define RIL_CARD_MAX_APPS 8
733
734typedef enum {
735 RIL_CARDSTATE_ABSENT = 0,
736 RIL_CARDSTATE_PRESENT = 1,
737 RIL_CARDSTATE_ERROR = 2
738} RIL_CardState;
739
740typedef enum {
741 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
742 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700743 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
744 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700745 involved */
746 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
747 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
748 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
749 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
750 RIL_PERSOSUBSTATE_SIM_SIM = 7,
751 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
752 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
753 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
754 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
755 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
756 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
757 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
758 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
759 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
760 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
761 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
762 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
763 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
764 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
765 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
766 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
767 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
768} RIL_PersoSubstate;
769
770typedef enum {
771 RIL_APPSTATE_UNKNOWN = 0,
772 RIL_APPSTATE_DETECTED = 1,
773 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
774 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700775 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700776 when app_state is assigned to this value */
777 RIL_APPSTATE_READY = 5
778} RIL_AppState;
779
780typedef enum {
781 RIL_PINSTATE_UNKNOWN = 0,
782 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
783 RIL_PINSTATE_ENABLED_VERIFIED = 2,
784 RIL_PINSTATE_DISABLED = 3,
785 RIL_PINSTATE_ENABLED_BLOCKED = 4,
786 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
787} RIL_PinState;
788
789typedef enum {
790 RIL_APPTYPE_UNKNOWN = 0,
791 RIL_APPTYPE_SIM = 1,
792 RIL_APPTYPE_USIM = 2,
793 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -0800794 RIL_APPTYPE_CSIM = 4,
795 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -0700796} RIL_AppType;
797
798typedef struct
799{
Wink Saville7f856802009-06-09 10:23:37 -0700800 RIL_AppType app_type;
801 RIL_AppState app_state;
802 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -0700803 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -0700804 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -0700805 0x30, 0x30, 0x30 */
806 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -0800807 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -0700808 RIL_PinState pin1;
809 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -0700810} RIL_AppStatus;
811
Wink Savillec0114b32011-02-18 10:14:07 -0800812/* Deprecated, use RIL_CardStatus_v6 */
813typedef struct
814{
815 RIL_CardState card_state;
816 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
817 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
818 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
819 int num_applications; /* value <= RIL_CARD_MAX_APPS */
820 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
821} RIL_CardStatus_v5;
822
Wink Savillef4c4d362009-04-02 01:37:03 -0700823typedef struct
824{
Wink Saville7f856802009-06-09 10:23:37 -0700825 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -0700826 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -0800827 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
828 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
829 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -0700830 int num_applications; /* value <= RIL_CARD_MAX_APPS */
831 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -0800832} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -0700833
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800834/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
835 * or as part of RIL_SimRefreshResponse_v7
836 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800837typedef enum {
838 /* A file on SIM has been updated. data[1] contains the EFID. */
839 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800840 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800841 SIM_INIT = 1,
842 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
843 SIM_RESET = 2
844} RIL_SimRefreshResult;
845
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800846typedef struct {
847 RIL_SimRefreshResult result;
848 int ef_id; /* is the EFID of the updated file if the result is */
849 /* SIM_FILE_UPDATE or 0 for any other result. */
850 char * aid; /* is AID(application ID) of the card application */
851 /* See ETSI 102.221 8.1 and 101.220 4 */
852 /* For SIM_FILE_UPDATE result it can be set to AID of */
853 /* application in which updated EF resides or it can be */
854 /* NULL if EF is outside of an application. */
855 /* For SIM_INIT result this field is set to AID of */
856 /* application that caused REFRESH */
857 /* For SIM_RESET result it is NULL. */
858} RIL_SimRefreshResponse_v7;
859
Wink Savillec0114b32011-02-18 10:14:07 -0800860/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
861typedef struct {
862 char * number; /* Remote party number */
863 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
864 char * name; /* Remote party name */
865 RIL_CDMA_SignalInfoRecord signalInfoRecord;
866} RIL_CDMA_CallWaiting_v5;
867
Wink Saville1b5fd232009-04-22 14:50:00 -0700868typedef struct {
869 char * number; /* Remote party number */
870 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
871 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -0700872 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -0800873 /* Number type/Number plan required to support International Call Waiting */
874 int number_type; /* 0=Unknown, 1=International, 2=National,
875 3=Network specific, 4=subscriber */
876 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
877} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -0700878
Wink Savillea592eeb2009-05-22 13:26:36 -0700879/**
880 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
881 *
882 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
883 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
884 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
885 * CBM message ID.
886 *
887 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
888 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
889 * and 9.4.4.2.3 for UMTS.
890 * All other values can be treated as empty CBM data coding scheme.
891 *
892 * selected 0 means message types specified in <fromServiceId, toServiceId>
893 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
894 *
895 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
896 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
897 */
Wink Savillef4c4d362009-04-02 01:37:03 -0700898typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -0700899 int fromServiceId;
900 int toServiceId;
901 int fromCodeScheme;
902 int toCodeScheme;
903 unsigned char selected;
904} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -0700905
The Android Open Source Project34a51082009-03-05 14:34:37 -0800906/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
907#define RIL_RESTRICTED_STATE_NONE 0x00
908/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
909#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
910/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
911#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -0700912/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -0800913#define RIL_RESTRICTED_STATE_CS_ALL 0x04
914/* Block packet data access due to restriction. */
915#define RIL_RESTRICTED_STATE_PS_ALL 0x10
916
Wink Saville1b5fd232009-04-22 14:50:00 -0700917/* The status for an OTASP/OTAPA session */
918typedef enum {
919 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
920 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
921 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
922 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
923 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
924 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
925 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
926 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
927 CDMA_OTA_PROVISION_STATUS_COMMITTED,
928 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
929 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
930 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
931} RIL_CDMA_OTA_ProvisionStatus;
932
933typedef struct {
934 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
935 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
936} RIL_GW_SignalStrength;
937
Wink Savillec57b3eb2013-04-17 12:51:41 -0700938typedef struct {
939 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
940 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
941} RIL_SignalStrengthWcdma;
Wink Saville1b5fd232009-04-22 14:50:00 -0700942
943typedef struct {
944 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
945 * multiplied by -1. Example: If the actual RSSI is -75, then this response
946 * value will be 75.
947 */
948 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
949 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
950 * will be 125.
951 */
952} RIL_CDMA_SignalStrength;
953
954
955typedef struct {
956 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
957 * multiplied by -1. Example: If the actual RSSI is -75, then this response
958 * value will be 75.
959 */
960 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
961 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
962 * will be 125.
963 */
964 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
965} RIL_EVDO_SignalStrength;
966
Wink Savillec0114b32011-02-18 10:14:07 -0800967typedef struct {
968 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -0700969 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
970 * Range: 44 to 140 dBm
971 * INT_MAX: 0x7FFFFFFF denotes invalid value.
972 * Reference: 3GPP TS 36.133 9.1.4 */
973 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
974 * Range: 20 to 3 dB.
975 * INT_MAX: 0x7FFFFFFF denotes invalid value.
976 * Reference: 3GPP TS 36.133 9.1.7 */
977 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
978 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
979 * INT_MAX : 0x7FFFFFFF denotes invalid value.
980 * Reference: 3GPP TS 36.101 8.1.1 */
981 int cqi; /* The current Channel Quality Indicator.
982 * Range: 0 to 15.
983 * INT_MAX : 0x7FFFFFFF denotes invalid value.
984 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -0800985} RIL_LTE_SignalStrength;
986
Wink Saville8a9e0212013-04-09 12:11:38 -0700987typedef struct {
988 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
989 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
990 * Range: 44 to 140 dBm
991 * INT_MAX: 0x7FFFFFFF denotes invalid value.
992 * Reference: 3GPP TS 36.133 9.1.4 */
993 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
994 * Range: 20 to 3 dB.
995 * INT_MAX: 0x7FFFFFFF denotes invalid value.
996 * Reference: 3GPP TS 36.133 9.1.7 */
997 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
998 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
999 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1000 * Reference: 3GPP TS 36.101 8.1.1 */
1001 int cqi; /* The current Channel Quality Indicator.
1002 * Range: 0 to 15.
1003 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1004 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1005 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
1006 * Approximate distance can be calculated using 300m/us * timingAdvance.
1007 * Range: 0 to 0x7FFFFFFE
1008 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1009 * Reference: 3GPP 36.321 section 6.1.3.5
1010 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1011} RIL_LTE_SignalStrength_v8;
1012
Etan Cohend3652192014-06-20 08:28:44 -07001013typedef struct {
1014 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
1015 * Range : 25 to 120
1016 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1017 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1018} RIL_TD_SCDMA_SignalStrength;
1019
Wink Savillec0114b32011-02-18 10:14:07 -08001020/* Deprecated, use RIL_SignalStrength_v6 */
1021typedef struct {
1022 RIL_GW_SignalStrength GW_SignalStrength;
1023 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1024 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1025} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -07001026
1027typedef struct {
1028 RIL_GW_SignalStrength GW_SignalStrength;
1029 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1030 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -08001031 RIL_LTE_SignalStrength LTE_SignalStrength;
1032} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -07001033
Wink Saville8a9e0212013-04-09 12:11:38 -07001034typedef struct {
1035 RIL_GW_SignalStrength GW_SignalStrength;
1036 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1037 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1038 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1039} RIL_SignalStrength_v8;
1040
Etan Cohend3652192014-06-20 08:28:44 -07001041typedef struct {
1042 RIL_GW_SignalStrength GW_SignalStrength;
1043 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1044 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1045 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1046 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1047} RIL_SignalStrength_v10;
1048
Wink Saville8a9e0212013-04-09 12:11:38 -07001049/** RIL_CellIdentityGsm */
1050typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001051 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1052 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1053 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1054 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 -07001055} RIL_CellIdentityGsm;
1056
Wink Savillec57b3eb2013-04-17 12:51:41 -07001057/** RIL_CellIdentityWcdma */
1058typedef struct {
1059 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1060 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1061 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1062 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1063 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1064} RIL_CellIdentityWcdma;
1065
Wink Saville8a9e0212013-04-09 12:11:38 -07001066/** RIL_CellIdentityCdma */
1067typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001068 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1069 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1070 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001071 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1072 * It is represented in units of 0.25 seconds and ranges from -2592000
1073 * to 2592000, both values inclusive (corresponding to a range of -180
Wink Savillec57b3eb2013-04-17 12:51:41 -07001074 * to +180 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001075
1076 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1077 * It is represented in units of 0.25 seconds and ranges from -1296000
1078 * to 1296000, both values inclusive (corresponding to a range of -90
Wink Savillec57b3eb2013-04-17 12:51:41 -07001079 * to +90 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001080} RIL_CellIdentityCdma;
1081
1082/** RIL_CellIdentityLte */
1083typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -07001084 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1085 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1086 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1087 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1088 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -07001089} RIL_CellIdentityLte;
1090
Etan Cohend3652192014-06-20 08:28:44 -07001091/** RIL_CellIdentityTdscdma */
1092typedef struct {
1093 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1094 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1095 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1096 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1097 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1098} RIL_CellIdentityTdscdma;
1099
Wink Saville8a9e0212013-04-09 12:11:38 -07001100/** RIL_CellInfoGsm */
1101typedef struct {
1102 RIL_CellIdentityGsm cellIdentityGsm;
1103 RIL_GW_SignalStrength signalStrengthGsm;
1104} RIL_CellInfoGsm;
1105
Wink Savillec57b3eb2013-04-17 12:51:41 -07001106/** RIL_CellInfoWcdma */
1107typedef struct {
1108 RIL_CellIdentityWcdma cellIdentityWcdma;
1109 RIL_SignalStrengthWcdma signalStrengthWcdma;
1110} RIL_CellInfoWcdma;
1111
Wink Saville8a9e0212013-04-09 12:11:38 -07001112/** RIL_CellInfoCdma */
1113typedef struct {
1114 RIL_CellIdentityCdma cellIdentityCdma;
1115 RIL_CDMA_SignalStrength signalStrengthCdma;
1116 RIL_EVDO_SignalStrength signalStrengthEvdo;
1117} RIL_CellInfoCdma;
1118
1119/** RIL_CellInfoLte */
1120typedef struct {
1121 RIL_CellIdentityLte cellIdentityLte;
1122 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1123} RIL_CellInfoLte;
1124
Etan Cohend3652192014-06-20 08:28:44 -07001125/** RIL_CellInfoTdscdma */
1126typedef struct {
1127 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1128 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1129} RIL_CellInfoTdscdma;
1130
Wink Saville8a9e0212013-04-09 12:11:38 -07001131// Must be the same as CellInfo.TYPE_XXX
1132typedef enum {
1133 RIL_CELL_INFO_TYPE_GSM = 1,
1134 RIL_CELL_INFO_TYPE_CDMA = 2,
1135 RIL_CELL_INFO_TYPE_LTE = 3,
Wink Savillec57b3eb2013-04-17 12:51:41 -07001136 RIL_CELL_INFO_TYPE_WCDMA = 4,
Etan Cohend3652192014-06-20 08:28:44 -07001137 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
Wink Saville8a9e0212013-04-09 12:11:38 -07001138} RIL_CellInfoType;
1139
1140// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1141typedef enum {
1142 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1143 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1144 RIL_TIMESTAMP_TYPE_MODEM = 2,
1145 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1146 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1147} RIL_TimeStampType;
1148
1149typedef struct {
1150 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1151 int registered; /* !0 if this cell is registered 0 if not registered */
1152 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1153 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1154 union {
1155 RIL_CellInfoGsm gsm;
1156 RIL_CellInfoCdma cdma;
1157 RIL_CellInfoLte lte;
Wink Savillec57b3eb2013-04-17 12:51:41 -07001158 RIL_CellInfoWcdma wcdma;
Etan Cohend3652192014-06-20 08:28:44 -07001159 RIL_CellInfoTdscdma tdscdma;
Wink Saville8a9e0212013-04-09 12:11:38 -07001160 } CellInfo;
1161} RIL_CellInfo;
1162
Wink Saville1b5fd232009-04-22 14:50:00 -07001163/* Names of the CDMA info records (C.S0005 section 3.7.5) */
1164typedef enum {
1165 RIL_CDMA_DISPLAY_INFO_REC,
1166 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1167 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1168 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1169 RIL_CDMA_SIGNAL_INFO_REC,
1170 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1171 RIL_CDMA_LINE_CONTROL_INFO_REC,
1172 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1173 RIL_CDMA_T53_CLIR_INFO_REC,
1174 RIL_CDMA_T53_RELEASE_INFO_REC,
1175 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1176} RIL_CDMA_InfoRecName;
1177
1178/* Display Info Rec as defined in C.S0005 section 3.7.5.1
1179 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1180 Note: the Extended Display info rec contains multiple records of the
1181 form: display_tag, display_len, and display_len occurrences of the
1182 chari field if the display_tag is not 10000000 or 10000001.
1183 To save space, the records are stored consecutively in a byte buffer.
1184 The display_tag, display_len and chari fields are all 1 byte.
1185*/
1186
1187typedef struct {
1188 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001189 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001190} RIL_CDMA_DisplayInfoRecord;
1191
1192/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1193 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1194 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1195*/
1196
1197typedef struct {
1198 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001199 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001200 char number_type;
1201 char number_plan;
1202 char pi;
1203 char si;
1204} RIL_CDMA_NumberInfoRecord;
1205
1206/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1207typedef enum {
1208 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1209 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1210 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1211 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1212 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1213 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1214 RIL_REDIRECTING_REASON_RESERVED
1215} RIL_CDMA_RedirectingReason;
1216
1217typedef struct {
1218 RIL_CDMA_NumberInfoRecord redirectingNumber;
1219 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1220 RIL_CDMA_RedirectingReason redirectingReason;
1221} RIL_CDMA_RedirectingNumberInfoRecord;
1222
1223/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1224typedef struct {
1225 char lineCtrlPolarityIncluded;
1226 char lineCtrlToggle;
1227 char lineCtrlReverse;
1228 char lineCtrlPowerDenial;
1229} RIL_CDMA_LineControlInfoRecord;
1230
1231/* T53 CLIR Information Record */
1232typedef struct {
1233 char cause;
1234} RIL_CDMA_T53_CLIRInfoRecord;
1235
1236/* T53 Audio Control Information Record */
1237typedef struct {
1238 char upLink;
1239 char downLink;
1240} RIL_CDMA_T53_AudioControlInfoRecord;
1241
1242typedef struct {
1243
1244 RIL_CDMA_InfoRecName name;
1245
1246 union {
1247 /* Display and Extended Display Info Rec */
1248 RIL_CDMA_DisplayInfoRecord display;
1249
1250 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1251 RIL_CDMA_NumberInfoRecord number;
1252
1253 /* Signal Info Rec */
1254 RIL_CDMA_SignalInfoRecord signal;
1255
1256 /* Redirecting Number Info Rec */
1257 RIL_CDMA_RedirectingNumberInfoRecord redir;
1258
1259 /* Line Control Info Rec */
1260 RIL_CDMA_LineControlInfoRecord lineCtrl;
1261
1262 /* T53 CLIR Info Rec */
1263 RIL_CDMA_T53_CLIRInfoRecord clir;
1264
1265 /* T53 Audio Control Info Rec */
1266 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1267 } rec;
1268} RIL_CDMA_InformationRecord;
1269
1270#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1271
1272typedef struct {
1273 char numberOfInfoRecs;
1274 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1275} RIL_CDMA_InformationRecords;
1276
Jake Hamby8a4a2332014-01-15 13:12:05 -08001277/* See RIL_REQUEST_NV_READ_ITEM */
1278typedef struct {
1279 RIL_NV_Item itemID;
1280} RIL_NV_ReadItem;
1281
1282/* See RIL_REQUEST_NV_WRITE_ITEM */
1283typedef struct {
1284 RIL_NV_Item itemID;
1285 char * value;
1286} RIL_NV_WriteItem;
1287
Etan Cohend3652192014-06-20 08:28:44 -07001288typedef enum {
1289 HANDOVER_STARTED = 0,
1290 HANDOVER_COMPLETED = 1,
1291 HANDOVER_FAILED = 2,
1292 HANDOVER_CANCELED = 3
1293} RIL_SrvccState;
1294
1295/* hardware configuration reported to RILJ. */
1296typedef enum {
1297 RIL_HARDWARE_CONFIG_MODEM = 0,
1298 RIL_HARDWARE_CONFIG_SIM = 1,
1299} RIL_HardwareConfig_Type;
1300
1301typedef enum {
1302 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1303 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1304 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1305} RIL_HardwareConfig_State;
1306
1307typedef struct {
1308 int rilModel;
1309 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1310 int maxVoice;
1311 int maxData;
1312 int maxStandby;
1313} RIL_HardwareConfig_Modem;
1314
1315typedef struct {
Wink Saville8b4e4f72014-10-17 15:01:45 -07001316 char modemUuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001317} RIL_HardwareConfig_Sim;
1318
1319typedef struct {
1320 RIL_HardwareConfig_Type type;
Wink Saville8b4e4f72014-10-17 15:01:45 -07001321 char uuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001322 RIL_HardwareConfig_State state;
1323 union {
1324 RIL_HardwareConfig_Modem modem;
1325 RIL_HardwareConfig_Sim sim;
1326 } cfg;
1327} RIL_HardwareConfig;
1328
Amit Mahajan54563d32014-11-22 00:54:49 +00001329typedef enum {
1330 SS_CFU,
1331 SS_CF_BUSY,
1332 SS_CF_NO_REPLY,
1333 SS_CF_NOT_REACHABLE,
1334 SS_CF_ALL,
1335 SS_CF_ALL_CONDITIONAL,
1336 SS_CLIP,
1337 SS_CLIR,
1338 SS_COLP,
1339 SS_COLR,
1340 SS_WAIT,
1341 SS_BAOC,
1342 SS_BAOIC,
1343 SS_BAOIC_EXC_HOME,
1344 SS_BAIC,
1345 SS_BAIC_ROAMING,
1346 SS_ALL_BARRING,
1347 SS_OUTGOING_BARRING,
1348 SS_INCOMING_BARRING
1349} RIL_SsServiceType;
1350
1351typedef enum {
1352 SS_ACTIVATION,
1353 SS_DEACTIVATION,
1354 SS_INTERROGATION,
1355 SS_REGISTRATION,
1356 SS_ERASURE
1357} RIL_SsRequestType;
1358
1359typedef enum {
1360 SS_ALL_TELE_AND_BEARER_SERVICES,
1361 SS_ALL_TELESEVICES,
1362 SS_TELEPHONY,
1363 SS_ALL_DATA_TELESERVICES,
1364 SS_SMS_SERVICES,
1365 SS_ALL_TELESERVICES_EXCEPT_SMS
1366} RIL_SsTeleserviceType;
1367
1368#define SS_INFO_MAX 4
1369#define NUM_SERVICE_CLASSES 7
1370
1371typedef struct {
1372 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1373 For example if voice is forwarded to one number and data
1374 is forwarded to a different one then numValidIndexes will be
1375 2 indicating total number of valid values in cfInfo.
1376 Similarly if all the services are forwarded to the same
1377 number then the value of numValidIndexes will be 1. */
1378
1379 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1380 for SS request to query call
1381 forward status. see
1382 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1383} RIL_CfData;
1384
1385typedef struct {
1386 RIL_SsServiceType serviceType;
1387 RIL_SsRequestType requestType;
1388 RIL_SsTeleserviceType teleserviceType;
1389 int serviceClass;
1390 RIL_Errno result;
1391
1392 union {
1393 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1394 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1395 two ints, so first two values of ssInfo[] will be
1396 used for response if serviceType is SS_CLIR and
1397 requestType is SS_INTERROGATION */
1398
1399 RIL_CfData cfData;
1400 };
1401} RIL_StkCcUnsolSsResponse;
1402
Wink Saville7f856802009-06-09 10:23:37 -07001403/**
Wink Savillec29360a2014-07-13 05:17:28 -07001404 * Data connection power state
1405 */
1406typedef enum {
1407 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1408 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1409 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1410 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1411} RIL_DcPowerStates;
1412
1413/**
1414 * Data connection real time info
1415 */
1416typedef struct {
1417 uint64_t time; // Time in nanos as returned by ril_nano_time
1418 RIL_DcPowerStates powerState; // Current power state
1419} RIL_DcRtInfo;
1420
Amit Mahajanc796e222014-08-13 16:54:01 +00001421/**
1422 * Data profile to modem
1423 */
1424typedef struct {
1425 /* id of the data profile */
1426 int profileId;
1427 /* the APN to connect to */
1428 char* apn;
1429 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1430 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1431 */
1432 char* protocol;
1433 /** authentication protocol used for this PDP context
1434 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1435 */
1436 int authType;
1437 /* the username for APN, or NULL */
1438 char* user;
1439 /* the password for APN, or NULL */
1440 char* password;
1441 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1442 int type;
1443 /* the period in seconds to limit the maximum connections */
1444 int maxConnsTime;
1445 /* the maximum connections during maxConnsTime */
1446 int maxConns;
1447 /** the required wait time in seconds after a successful UE initiated
1448 * disconnect of a given PDN connection before the device can send
1449 * a new PDN connection request for that given PDN
1450 */
1451 int waitTime;
1452 /* true to enable the profile, 0 to disable, 1 to enable */
1453 int enabled;
1454} RIL_DataProfileInfo;
Wink Savillec29360a2014-07-13 05:17:28 -07001455
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001456/* Tx Power Levels */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001457#define RIL_NUM_TX_POWER_LEVELS 5
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001458
1459typedef struct {
1460
1461 /* period (in ms) when modem is power collapsed */
1462 uint32_t sleep_mode_time_ms;
1463
1464 /* period (in ms) when modem is awake and in idle mode*/
1465 uint32_t idle_mode_time_ms;
1466
1467 /* period (in ms) for which Tx is active */
Prerepa Viswanadham73157492015-05-28 00:37:32 -07001468 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07001469
1470 /* period (in ms) for which Rx is active */
1471 uint32_t rx_mode_time_ms;
1472} RIL_ActivityStatsInfo;
1473
Wink Savillec29360a2014-07-13 05:17:28 -07001474/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001475 * RIL_REQUEST_GET_SIM_STATUS
1476 *
1477 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -07001478 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001479 * "data" is NULL
1480 *
Wink Savillefd729372011-02-22 16:19:39 -08001481 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001482 *
1483 * Valid errors:
1484 * Must never fail
1485 */
1486#define RIL_REQUEST_GET_SIM_STATUS 1
1487
1488/**
1489 * RIL_REQUEST_ENTER_SIM_PIN
1490 *
John Wang309ac292009-07-30 14:53:23 -07001491 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001492 *
1493 * "data" is const char **
1494 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001495 * ((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 -08001496 *
jsh593c9102009-06-24 16:13:44 -07001497 * "response" is int *
1498 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001499 *
1500 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001501 *
1502 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001503 * RADIO_NOT_AVAILABLE (radio resetting)
1504 * GENERIC_FAILURE
1505 * PASSWORD_INCORRECT
1506 */
1507
1508#define RIL_REQUEST_ENTER_SIM_PIN 2
1509
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001510/**
1511 * RIL_REQUEST_ENTER_SIM_PUK
1512 *
Wink Saville7f856802009-06-09 10:23:37 -07001513 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001514 *
1515 * "data" is const char **
1516 * ((const char **)data)[0] is PUK value
1517 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001518 * ((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 -08001519 *
jsh593c9102009-06-24 16:13:44 -07001520 * "response" is int *
1521 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001522 *
1523 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001524 *
1525 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001526 * RADIO_NOT_AVAILABLE (radio resetting)
1527 * GENERIC_FAILURE
1528 * PASSWORD_INCORRECT
1529 * (PUK is invalid)
1530 */
1531
1532#define RIL_REQUEST_ENTER_SIM_PUK 3
1533
1534/**
1535 * RIL_REQUEST_ENTER_SIM_PIN2
1536 *
1537 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
1538 * returned as a a failure from a previous operation.
1539 *
1540 * "data" is const char **
1541 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001542 * ((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 -08001543 *
jsh593c9102009-06-24 16:13:44 -07001544 * "response" is int *
1545 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001546 *
1547 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001548 *
1549 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001550 * RADIO_NOT_AVAILABLE (radio resetting)
1551 * GENERIC_FAILURE
1552 * PASSWORD_INCORRECT
1553 */
1554
1555#define RIL_REQUEST_ENTER_SIM_PIN2 4
1556
1557/**
1558 * RIL_REQUEST_ENTER_SIM_PUK2
1559 *
Wink Saville7f856802009-06-09 10:23:37 -07001560 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001561 *
1562 * "data" is const char **
1563 * ((const char **)data)[0] is PUK2 value
1564 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001565 * ((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 -08001566 *
jsh593c9102009-06-24 16:13:44 -07001567 * "response" is int *
1568 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001569 *
1570 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001571 *
1572 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001573 * RADIO_NOT_AVAILABLE (radio resetting)
1574 * GENERIC_FAILURE
1575 * PASSWORD_INCORRECT
1576 * (PUK2 is invalid)
1577 */
1578
1579#define RIL_REQUEST_ENTER_SIM_PUK2 5
1580
1581/**
1582 * RIL_REQUEST_CHANGE_SIM_PIN
1583 *
Wink Saville7f856802009-06-09 10:23:37 -07001584 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001585 *
1586 * "data" is const char **
1587 * ((const char **)data)[0] is old PIN value
1588 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001589 * ((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 -08001590 *
jsh593c9102009-06-24 16:13:44 -07001591 * "response" is int *
1592 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001593 *
1594 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001595 *
1596 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001597 * RADIO_NOT_AVAILABLE (radio resetting)
1598 * GENERIC_FAILURE
1599 * PASSWORD_INCORRECT
1600 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001601 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001602 */
1603
1604#define RIL_REQUEST_CHANGE_SIM_PIN 6
1605
1606
1607/**
1608 * RIL_REQUEST_CHANGE_SIM_PIN2
1609 *
Wink Saville7f856802009-06-09 10:23:37 -07001610 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001611 *
1612 * "data" is const char **
1613 * ((const char **)data)[0] is old PIN2 value
1614 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001615 * ((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 -08001616 *
jsh593c9102009-06-24 16:13:44 -07001617 * "response" is int *
1618 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001619 *
1620 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001621 *
1622 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001623 * RADIO_NOT_AVAILABLE (radio resetting)
1624 * GENERIC_FAILURE
1625 * PASSWORD_INCORRECT
1626 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001627 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001628 */
1629
1630#define RIL_REQUEST_CHANGE_SIM_PIN2 7
1631
1632/**
1633 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
1634 *
1635 * Requests that network personlization be deactivated
1636 *
1637 * "data" is const char **
1638 * ((const char **)(data))[0]] is network depersonlization code
1639 *
jsh593c9102009-06-24 16:13:44 -07001640 * "response" is int *
1641 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001642 *
1643 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001644 *
1645 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001646 * RADIO_NOT_AVAILABLE (radio resetting)
1647 * GENERIC_FAILURE
1648 * PASSWORD_INCORRECT
1649 * (code is invalid)
1650 */
1651
1652#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
1653
1654/**
Wink Saville7f856802009-06-09 10:23:37 -07001655 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001656 *
1657 * Requests current call list
1658 *
1659 * "data" is NULL
1660 *
1661 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07001662 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001663 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001664 *
1665 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001666 * RADIO_NOT_AVAILABLE (radio resetting)
1667 * GENERIC_FAILURE
1668 * (request will be made again in a few hundred msec)
1669 */
1670
1671#define RIL_REQUEST_GET_CURRENT_CALLS 9
1672
1673
Wink Saville7f856802009-06-09 10:23:37 -07001674/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001675 * RIL_REQUEST_DIAL
1676 *
1677 * Initiate voice call
1678 *
1679 * "data" is const RIL_Dial *
1680 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001681 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001682 * This method is never used for supplementary service codes
1683 *
1684 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001685 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001686 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00001687 * DIAL_MODIFIED_TO_USSD
1688 * DIAL_MODIFIED_TO_SS
1689 * DIAL_MODIFIED_TO_DIAL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001690 * GENERIC_FAILURE
1691 */
1692#define RIL_REQUEST_DIAL 10
1693
1694/**
1695 * RIL_REQUEST_GET_IMSI
1696 *
1697 * Get the SIM IMSI
1698 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08001699 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001700 *
Wink Savillec0114b32011-02-18 10:14:07 -08001701 * "data" is const char **
1702 * ((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 -08001703 * "response" is a const char * containing the IMSI
1704 *
1705 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001706 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001707 * RADIO_NOT_AVAILABLE (radio resetting)
1708 * GENERIC_FAILURE
1709 */
1710
1711#define RIL_REQUEST_GET_IMSI 11
1712
1713/**
1714 * RIL_REQUEST_HANGUP
1715 *
1716 * Hang up a specific line (like AT+CHLD=1x)
1717 *
John Wang06bae4b2010-11-18 16:37:09 -08001718 * After this HANGUP request returns, RIL should show the connection is NOT
1719 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1720 *
Wink Saville7f856802009-06-09 10:23:37 -07001721 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001722 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001723 *
1724 * "response" is NULL
1725 *
1726 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001727 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001728 * RADIO_NOT_AVAILABLE (radio resetting)
1729 * GENERIC_FAILURE
1730 */
1731
1732#define RIL_REQUEST_HANGUP 12
1733
1734/**
1735 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
1736 *
1737 * Hang up waiting or held (like AT+CHLD=0)
1738 *
John Wang06bae4b2010-11-18 16:37:09 -08001739 * After this HANGUP request returns, RIL should show the connection is NOT
1740 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1741 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001742 * "data" is NULL
1743 * "response" is NULL
1744 *
1745 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001746 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001747 * RADIO_NOT_AVAILABLE (radio resetting)
1748 * GENERIC_FAILURE
1749 */
1750
1751#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
1752
1753/**
1754 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
1755 *
1756 * Hang up waiting or held (like AT+CHLD=1)
1757 *
John Wang06bae4b2010-11-18 16:37:09 -08001758 * After this HANGUP request returns, RIL should show the connection is NOT
1759 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1760 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001761 * "data" is NULL
1762 * "response" is NULL
1763 *
1764 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001765 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001766 * RADIO_NOT_AVAILABLE (radio resetting)
1767 * GENERIC_FAILURE
1768 */
1769
1770#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
1771
1772/**
1773 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
1774 *
1775 * Switch waiting or holding call and active call (like AT+CHLD=2)
1776 *
1777 * State transitions should be is follows:
1778 *
1779 * If call 1 is waiting and call 2 is active, then if this re
1780 *
1781 * BEFORE AFTER
1782 * Call 1 Call 2 Call 1 Call 2
1783 * ACTIVE HOLDING HOLDING ACTIVE
1784 * ACTIVE WAITING HOLDING ACTIVE
1785 * HOLDING WAITING HOLDING ACTIVE
1786 * ACTIVE IDLE HOLDING IDLE
1787 * IDLE IDLE IDLE IDLE
1788 *
1789 * "data" is NULL
1790 * "response" is NULL
1791 *
1792 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001793 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001794 * RADIO_NOT_AVAILABLE (radio resetting)
1795 * GENERIC_FAILURE
1796 */
1797
1798#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
1799#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
1800
1801/**
1802 * RIL_REQUEST_CONFERENCE
1803 *
1804 * Conference holding and active (like AT+CHLD=3)
1805
1806 * "data" is NULL
1807 * "response" is NULL
1808 *
1809 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001810 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001811 * RADIO_NOT_AVAILABLE (radio resetting)
1812 * GENERIC_FAILURE
1813 */
1814#define RIL_REQUEST_CONFERENCE 16
1815
1816/**
1817 * RIL_REQUEST_UDUB
1818 *
Wink Saville7f856802009-06-09 10:23:37 -07001819 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001820 * waiting call answer)(RIL_BasicRequest r);
1821 *
1822 * "data" is NULL
1823 * "response" is NULL
1824 *
1825 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001826 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001827 * RADIO_NOT_AVAILABLE (radio resetting)
1828 * GENERIC_FAILURE
1829 */
1830#define RIL_REQUEST_UDUB 17
1831
1832/**
1833 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1834 *
1835 * Requests the failure cause code for the most recently terminated call
1836 *
1837 * "data" is NULL
1838 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -07001839 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001840 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
1841 * failure reasons are derived from the possible call failure scenarios
1842 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001843 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08001844 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
1845 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
1846 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001847 * If the implementation does not have access to the exact cause codes,
1848 * then it should return one of the values listed in RIL_LastCallFailCause,
1849 * as the UI layer needs to distinguish these cases for tone generation or
1850 * error notification.
1851 *
1852 * Valid errors:
1853 * SUCCESS
1854 * RADIO_NOT_AVAILABLE
1855 * GENERIC_FAILURE
1856 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001857 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001858 */
1859#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
1860
1861/**
1862 * RIL_REQUEST_SIGNAL_STRENGTH
1863 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001864 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001865 *
1866 * Must succeed if radio is on.
1867 *
1868 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07001869 *
1870 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001871 *
1872 * Valid errors:
1873 * SUCCESS
1874 * RADIO_NOT_AVAILABLE
1875 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001876#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07001877
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001878/**
Wink Savillec0114b32011-02-18 10:14:07 -08001879 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001880 *
1881 * Request current registration state
1882 *
1883 * "data" is NULL
1884 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -07001885 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -07001886 * 0 - Not registered, MT is not currently searching
1887 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001888 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -07001889 * 2 - Not registered, but MT is currently searching
1890 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001891 * 3 - Registration denied
1892 * 4 - Unknown
1893 * 5 - Registered, roaming
John Wang7f8ded12010-01-21 15:07:28 -08001894 * 10 - Same as 0, but indicates that emergency calls
1895 * are enabled.
1896 * 12 - Same as 2, but indicates that emergency calls
1897 * are enabled.
1898 * 13 - Same as 3, but indicates that emergency calls
1899 * are enabled.
1900 * 14 - Same as 4, but indicates that emergency calls
1901 * are enabled.
1902 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001903 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1904 * NULL if not.Valid LAC are 0x0000 - 0xffff
1905 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1906 * NULL if not.
1907 * Valid CID are 0x00000000 - 0xffffffff
1908 * In GSM, CID is Cell ID (see TS 27.007)
1909 * in 16 bits
1910 * In UMTS, CID is UMTS Cell Identity
1911 * (see TS 25.331) in 28 bits
Wink Saville43808972011-01-13 17:39:51 -08001912 * ((const char **)response)[3] indicates the available voice radio technology,
1913 * valid values as defined by RIL_RadioTechnology.
Wink Saville1b5fd232009-04-22 14:50:00 -07001914 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1915 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07001916 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07001917 * ((const char **)response)[5] is Base Station latitude if registered on a
1918 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001919 * latitude is a decimal number as specified in
1920 * 3GPP2 C.S0005-A v6.0. It is represented in
1921 * units of 0.25 seconds and ranges from -1296000
1922 * to 1296000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08001923 * to a range of -90 to +90 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07001924 * ((const char **)response)[6] is Base Station longitude if registered on a
1925 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001926 * longitude is a decimal number as specified in
1927 * 3GPP2 C.S0005-A v6.0. It is represented in
1928 * units of 0.25 seconds and ranges from -2592000
1929 * to 2592000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08001930 * to a range of -180 to +180 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07001931 * ((const char **)response)[7] is concurrent services support indicator if
1932 * registered on a CDMA system 0-1.
1933 * 0 - Concurrent services not supported,
1934 * 1 - Concurrent services supported
1935 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1936 * NULL if not. Valid System ID are 0 - 32767
1937 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1938 * NULL if not. Valid System ID are 0 - 65535
1939 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001940 * on a CDMA or EVDO system or NULL if not. Valid values
Wink Saville1b5fd232009-04-22 14:50:00 -07001941 * are 0-255.
1942 * ((const char **)response)[11] indicates whether the current system is in the
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001943 * PRL if registered on a CDMA or EVDO system or NULL if
Wink Saville1b5fd232009-04-22 14:50:00 -07001944 * not. 0=not in the PRL, 1=in the PRL
1945 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001946 * if registered on a CDMA or EVDO system or NULL if not.
Wink Saville1b5fd232009-04-22 14:50:00 -07001947 * Valid values are 0-255.
1948 * ((const char **)response)[13] if registration state is 3 (Registration
1949 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07001950 * registration was denied. See 3GPP TS 24.008,
1951 * 10.5.3.6 and Annex G.
1952 * 0 - General
1953 * 1 - Authentication Failure
1954 * 2 - IMSI unknown in HLR
1955 * 3 - Illegal MS
1956 * 4 - Illegal ME
1957 * 5 - PLMN not allowed
1958 * 6 - Location area not allowed
1959 * 7 - Roaming not allowed
1960 * 8 - No Suitable Cells in this Location Area
1961 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07001962 * 10 - Persistent location update reject
Wink Savillec0114b32011-02-18 10:14:07 -08001963 * 11 - PLMN not allowed
1964 * 12 - Location area not allowed
1965 * 13 - Roaming not allowed in this Location Area
1966 * 15 - No Suitable Cells in this Location Area
1967 * 17 - Network Failure
1968 * 20 - MAC Failure
1969 * 21 - Sync Failure
1970 * 22 - Congestion
1971 * 23 - GSM Authentication unacceptable
1972 * 25 - Not Authorized for this CSG
1973 * 32 - Service option not supported
1974 * 33 - Requested service option not subscribed
1975 * 34 - Service option temporarily out of order
1976 * 38 - Call cannot be identified
1977 * 48-63 - Retry upon entry into a new cell
1978 * 95 - Semantically incorrect message
1979 * 96 - Invalid mandatory information
1980 * 97 - Message type non-existent or not implemented
1981 * 98 - Message not compatible with protocol state
1982 * 99 - Information element non-existent or not implemented
1983 * 100 - Conditional IE error
1984 * 101 - Message not compatible with protocol state
1985 * 111 - Protocol error, unspecified
jshca5e3472010-06-23 21:53:24 -07001986 * ((const char **)response)[14] is the Primary Scrambling Code of the current
1987 * cell as described in TS 25.331, in hexadecimal
1988 * format, or NULL if unknown or not registered
1989 * to a UMTS network.
Wink Saville1b5fd232009-04-22 14:50:00 -07001990 *
1991 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001992 * as "out of service" in the Android telephony system
1993 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001994 * Registration state 3 can be returned if Location Update Reject
1995 * (with cause 17 - Network Failure) is received repeatedly from the network,
1996 * to facilitate "managed roaming"
1997 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001998 * Valid errors:
1999 * SUCCESS
2000 * RADIO_NOT_AVAILABLE
2001 * GENERIC_FAILURE
2002 */
Wink Savillec0114b32011-02-18 10:14:07 -08002003#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002004
2005/**
Wink Savillec0114b32011-02-18 10:14:07 -08002006 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002007 *
Wink Savillec0114b32011-02-18 10:14:07 -08002008 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002009 *
2010 * "data" is NULL
2011 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08002012 * ((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 -08002013 * ((const char **)response)[1] is LAC if registered or NULL if not
2014 * ((const char **)response)[2] is CID if registered or NULL if not
Wink Saville43808972011-01-13 17:39:51 -08002015 * ((const char **)response)[3] indicates the available data radio technology,
2016 * valid values as defined by RIL_RadioTechnology.
Wink Savillec0114b32011-02-18 10:14:07 -08002017 * ((const char **)response)[4] if registration state is 3 (Registration
2018 * denied) this is an enumerated reason why
2019 * registration was denied. See 3GPP TS 24.008,
2020 * Annex G.6 "Additonal cause codes for GMM".
2021 * 7 == GPRS services not allowed
2022 * 8 == GPRS services and non-GPRS services not allowed
2023 * 9 == MS identity cannot be derived by the network
2024 * 10 == Implicitly detached
2025 * 14 == GPRS services not allowed in this PLMN
2026 * 16 == MSC temporarily not reachable
2027 * 40 == No PDP context activated
2028 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
2029 * established using RIL_REQUEST_SETUP_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002030 *
Wink Savilleae679532012-12-03 14:59:45 -08002031 * The values at offsets 6..10 are optional LTE location information in decimal.
2032 * If a value is unknown that value may be NULL. If all values are NULL,
2033 * none need to be present.
Wink Savilleea51a9d2012-09-15 07:54:06 -07002034 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
2035 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
2036 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
2037 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
2038 * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
2039 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002040 * LAC and CID are in hexadecimal format.
2041 * valid LAC are 0x0000 - 0xffff
2042 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07002043 *
2044 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002045 * as "out of service" in the Android telephony system
2046 *
2047 * Valid errors:
2048 * SUCCESS
2049 * RADIO_NOT_AVAILABLE
2050 * GENERIC_FAILURE
2051 */
Wink Savillec0114b32011-02-18 10:14:07 -08002052#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002053
2054/**
2055 * RIL_REQUEST_OPERATOR
2056 *
2057 * Request current operator ONS or EONS
2058 *
2059 * "data" is NULL
2060 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07002061 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002062 * or NULL if unregistered
2063 *
Wink Saville7f856802009-06-09 10:23:37 -07002064 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002065 * or NULL if unregistered
2066 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2067 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07002068 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002069 * Valid errors:
2070 * SUCCESS
2071 * RADIO_NOT_AVAILABLE
2072 * GENERIC_FAILURE
2073 */
2074#define RIL_REQUEST_OPERATOR 22
2075
2076/**
2077 * RIL_REQUEST_RADIO_POWER
2078 *
2079 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07002080 * If the radio is is turned off/on the radio modem subsystem
2081 * is expected return to an initialized state. For instance,
2082 * any voice and data calls will be terminated and all associated
2083 * lists emptied.
2084 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002085 * "data" is int *
2086 * ((int *)data)[0] is > 0 for "Radio On"
2087 * ((int *)data)[0] is == 0 for "Radio Off"
2088 *
2089 * "response" is NULL
2090 *
2091 * Turn radio on if "on" > 0
2092 * Turn radio off if "on" == 0
2093 *
2094 * Valid errors:
2095 * SUCCESS
2096 * RADIO_NOT_AVAILABLE
2097 * GENERIC_FAILURE
2098 */
2099#define RIL_REQUEST_RADIO_POWER 23
2100
2101/**
2102 * RIL_REQUEST_DTMF
2103 *
2104 * Send a DTMF tone
2105 *
2106 * If the implementation is currently playing a tone requested via
2107 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2108 * should be played instead
2109 *
jsh602f80f2009-07-10 15:44:37 -07002110 * "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 -08002111 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002112 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002113 * FIXME should this block/mute microphone?
2114 * How does this interact with local DTMF feedback?
2115 *
2116 * Valid errors:
2117 * SUCCESS
2118 * RADIO_NOT_AVAILABLE
2119 * GENERIC_FAILURE
2120 *
2121 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2122 *
2123 */
2124#define RIL_REQUEST_DTMF 24
2125
2126/**
2127 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07002128 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002129 * Send an SMS message
2130 *
2131 * "data" is const char **
2132 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2133 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2134 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2135 * less the SMSC address
2136 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2137 *
2138 * "response" is a const RIL_SMS_Response *
2139 *
2140 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002141 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002142 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2143 *
2144 * Valid errors:
2145 * SUCCESS
2146 * RADIO_NOT_AVAILABLE
2147 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07002148 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002149 * GENERIC_FAILURE
2150 *
2151 * FIXME how do we specify TP-Message-Reference if we need to resend?
2152 */
2153#define RIL_REQUEST_SEND_SMS 25
2154
2155
2156/**
2157 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07002158 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002159 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2160 * except that more messages are expected to be sent soon. If possible,
2161 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2162 *
2163 * "data" is const char **
2164 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2165 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2166 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2167 * less the SMSC address
2168 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2169 *
2170 * "response" is a const RIL_SMS_Response *
2171 *
2172 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002173 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002174 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2175 *
2176 * Valid errors:
2177 * SUCCESS
2178 * RADIO_NOT_AVAILABLE
2179 * SMS_SEND_FAIL_RETRY
2180 * GENERIC_FAILURE
2181 *
2182 */
2183#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2184
2185
2186/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002187 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002188 *
Wink Saville29487ef2011-04-15 09:15:31 -07002189 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2190 * return success it is added to the list of data calls and a
2191 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2192 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2193 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2194 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002195 *
Wink Saville43808972011-01-13 17:39:51 -08002196 * The RIL is expected to:
2197 * - Create one data call context.
2198 * - Create and configure a dedicated interface for the context
2199 * - The interface must be point to point.
2200 * - The interface is configured with one or more addresses and
2201 * is capable of sending and receiving packets. The prefix length
2202 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2203 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08002204 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08002205 * number of simultaneous data call contexts.
2206 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002207 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08002208 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2209 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07002210 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07002211 * ((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 -07002212 * override the one in the profile. NULL indicates no APN overrride.
2213 * ((const char **)data)[3] is the username for APN, or NULL
2214 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07002215 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2216 * 0 => PAP and CHAP is never performed.
2217 * 1 => PAP may be performed; CHAP is never performed.
2218 * 2 => CHAP may be performed; PAP is never performed.
2219 * 3 => PAP / CHAP may be performed - baseband dependent.
Wink Savillec0114b32011-02-18 10:14:07 -08002220 * ((const char **)data)[6] is the connection type to request must be one of the
2221 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07002222 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Wink Savillec0114b32011-02-18 10:14:07 -08002223 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002224 *
Sukanya Rajkhowab44dda32014-06-02 14:03:44 -07002225 * "response" is a RIL_Data_Call_Response_v11
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002226 *
2227 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07002228 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002229 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08002230 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08002231 * the RIL_Data_Call_Response_v6.status containing the actual status.
2232 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08002233 *
2234 * Other errors could include:
2235 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2236 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002237 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002238 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002239 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002240#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002241
2242
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002243/**
2244 * RIL_REQUEST_SIM_IO
2245 *
2246 * Request SIM I/O operation.
2247 * This is similar to the TS 27.007 "restricted SIM" operation
2248 * where it assumes all of the EF selection will be done by the
2249 * callee.
2250 *
Wink Savillefd729372011-02-22 16:19:39 -08002251 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002252 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2253 * or may specify a PIN2 for operations that require a PIN2 (eg
2254 * updating FDN records)
2255 *
2256 * "response" is a const RIL_SIM_IO_Response *
2257 *
2258 * Arguments and responses that are unused for certain
2259 * values of "command" should be ignored or set to NULL
2260 *
2261 * Valid errors:
2262 * SUCCESS
2263 * RADIO_NOT_AVAILABLE
2264 * GENERIC_FAILURE
2265 * SIM_PIN2
2266 * SIM_PUK2
2267 */
2268#define RIL_REQUEST_SIM_IO 28
2269
2270/**
2271 * RIL_REQUEST_SEND_USSD
2272 *
2273 * Send a USSD message
2274 *
2275 * If a USSD session already exists, the message should be sent in the
2276 * context of that session. Otherwise, a new session should be created.
2277 *
2278 * The network reply should be reported via RIL_UNSOL_ON_USSD
2279 *
2280 * Only one USSD session may exist at a time, and the session is assumed
2281 * to exist until:
2282 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2283 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2284 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2285 *
2286 * "data" is a const char * containing the USSD request in UTF-8 format
2287 * "response" is NULL
2288 *
2289 * Valid errors:
2290 * SUCCESS
2291 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07002292 * FDN_CHECK_FAILURE
Amit Mahajan54563d32014-11-22 00:54:49 +00002293 * USSD_MODIFIED_TO_DIAL
2294 * USSD_MODIFIED_TO_SS
2295 * USSD_MODIFIED_TO_USSD
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002296 * GENERIC_FAILURE
2297 *
2298 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2299 */
2300
2301#define RIL_REQUEST_SEND_USSD 29
2302
2303/**
2304 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07002305 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002306 * Cancel the current USSD session if one exists
2307 *
2308 * "data" is null
2309 * "response" is NULL
2310 *
2311 * Valid errors:
2312 * SUCCESS
2313 * RADIO_NOT_AVAILABLE
Wink Saville7f856802009-06-09 10:23:37 -07002314 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002315 */
2316
2317#define RIL_REQUEST_CANCEL_USSD 30
2318
Wink Saville7f856802009-06-09 10:23:37 -07002319/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002320 * RIL_REQUEST_GET_CLIR
2321 *
2322 * Gets current CLIR status
2323 * "data" is NULL
2324 * "response" is int *
2325 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2326 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2327 *
2328 * Valid errors:
2329 * SUCCESS
2330 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002331 * SS_MODIFIED_TO_DIAL
2332 * SS_MODIFIED_TO_USSD
2333 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002334 * GENERIC_FAILURE
2335 */
2336#define RIL_REQUEST_GET_CLIR 31
2337
2338/**
2339 * RIL_REQUEST_SET_CLIR
2340 *
2341 * "data" is int *
2342 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2343 *
2344 * "response" is NULL
2345 *
2346 * Valid errors:
2347 * SUCCESS
2348 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002349 * SS_MODIFIED_TO_DIAL
2350 * SS_MODIFIED_TO_USSD
2351 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002352 * GENERIC_FAILURE
2353 */
2354#define RIL_REQUEST_SET_CLIR 32
2355
2356/**
2357 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2358 *
2359 * "data" is const RIL_CallForwardInfo *
2360 *
2361 * "response" is const RIL_CallForwardInfo **
2362 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2363 * each distinct registered phone number.
2364 *
2365 * For example, if data is forwarded to +18005551212 and voice is forwarded
2366 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07002367 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002368 * If, however, both data and voice are forwarded to +18005551212, then
2369 * a single RIL_CallForwardInfo can be returned with the service class
2370 * set to "data + voice = 3")
2371 *
2372 * Valid errors:
2373 * SUCCESS
2374 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002375 * SS_MODIFIED_TO_DIAL
2376 * SS_MODIFIED_TO_USSD
2377 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002378 * GENERIC_FAILURE
2379 */
2380#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2381
2382
2383/**
2384 * RIL_REQUEST_SET_CALL_FORWARD
2385 *
2386 * Configure call forward rule
2387 *
2388 * "data" is const RIL_CallForwardInfo *
2389 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002390 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002391 * Valid errors:
2392 * SUCCESS
2393 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002394 * SS_MODIFIED_TO_DIAL
2395 * SS_MODIFIED_TO_USSD
2396 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002397 * GENERIC_FAILURE
2398 */
2399#define RIL_REQUEST_SET_CALL_FORWARD 34
2400
2401
2402/**
2403 * RIL_REQUEST_QUERY_CALL_WAITING
2404 *
2405 * Query current call waiting state
2406 *
2407 * "data" is const int *
2408 * ((const int *)data)[0] is the TS 27.007 service class to query.
2409 * "response" is a const int *
2410 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2411 *
2412 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2413 * must follow, with the TS 27.007 service class bit vector of services
2414 * for which call waiting is enabled.
2415 *
Wink Saville7f856802009-06-09 10:23:37 -07002416 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002417 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2418 * and voice and disabled for everything else
2419 *
2420 * Valid errors:
2421 * SUCCESS
2422 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002423 * SS_MODIFIED_TO_DIAL
2424 * SS_MODIFIED_TO_USSD
2425 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002426 * GENERIC_FAILURE
2427 */
2428#define RIL_REQUEST_QUERY_CALL_WAITING 35
2429
2430
2431/**
2432 * RIL_REQUEST_SET_CALL_WAITING
2433 *
2434 * Configure current call waiting state
2435 *
2436 * "data" is const int *
2437 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2438 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2439 * services to modify
2440 * "response" is NULL
2441 *
2442 * Valid errors:
2443 * SUCCESS
2444 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002445 * SS_MODIFIED_TO_DIAL
2446 * SS_MODIFIED_TO_USSD
2447 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002448 * GENERIC_FAILURE
2449 */
2450#define RIL_REQUEST_SET_CALL_WAITING 36
2451
2452/**
2453 * RIL_REQUEST_SMS_ACKNOWLEDGE
2454 *
2455 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07002456 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002457 *
2458 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07002459 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002460 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07002461 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002462 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07002463 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
2464 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
2465 * capacity exceeded) and 0xFF (unspecified error) are
2466 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002467 *
2468 * "response" is NULL
2469 *
2470 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
2471 *
2472 * Valid errors:
2473 * SUCCESS
2474 * RADIO_NOT_AVAILABLE
2475 * GENERIC_FAILURE
2476 */
2477#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
2478
2479/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002480 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002481 *
2482 * Get the device IMEI, including check digit
2483 *
johnwangf8bc1672009-05-14 19:19:47 -07002484 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002485 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2486 *
2487 * "data" is NULL
2488 * "response" is a const char * containing the IMEI
2489 *
2490 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002491 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002492 * RADIO_NOT_AVAILABLE (radio resetting)
2493 * GENERIC_FAILURE
2494 */
2495
2496#define RIL_REQUEST_GET_IMEI 38
2497
2498/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002499 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002500 *
2501 * Get the device IMEISV, which should be two decimal digits
2502 *
johnwangf8bc1672009-05-14 19:19:47 -07002503 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002504 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2505 *
2506 * "data" is NULL
2507 * "response" is a const char * containing the IMEISV
2508 *
2509 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002510 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002511 * RADIO_NOT_AVAILABLE (radio resetting)
2512 * GENERIC_FAILURE
2513 */
2514
2515#define RIL_REQUEST_GET_IMEISV 39
2516
2517
2518/**
2519 * RIL_REQUEST_ANSWER
2520 *
2521 * Answer incoming call
2522 *
2523 * Will not be called for WAITING calls.
2524 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
2525 * instead
2526 *
2527 * "data" is NULL
2528 * "response" is NULL
2529 *
2530 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002531 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002532 * RADIO_NOT_AVAILABLE (radio resetting)
2533 * GENERIC_FAILURE
2534 */
2535
2536#define RIL_REQUEST_ANSWER 40
2537
2538/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002539 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002540 *
Wink Saville29487ef2011-04-15 09:15:31 -07002541 * Deactivate packet data connection and remove from the
2542 * data call list if SUCCESS is returned. Any other return
2543 * values should also try to remove the call from the list,
2544 * but that may not be possible. In any event a
2545 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
2546 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
2547 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002548 *
2549 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07002550 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06002551 * ((char**)data)[1] indicating Disconnect Reason
2552 * 0 => No specific reason specified
2553 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07002554 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002555 * "response" is NULL
2556 *
2557 * Valid errors:
2558 * SUCCESS
2559 * RADIO_NOT_AVAILABLE
2560 * GENERIC_FAILURE
2561 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002562 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002563 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002564#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002565
2566/**
2567 * RIL_REQUEST_QUERY_FACILITY_LOCK
2568 *
2569 * Query the status of a facility lock state
2570 *
2571 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07002572 * ((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 -08002573 * (eg "AO" for BAOC, "SC" for SIM lock)
2574 * ((const char **)data)[1] is the password, or "" if not required
2575 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
2576 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08002577 * ((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 -08002578 * This is only applicable in the case of Fixed Dialing Numbers
2579 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002580 *
2581 * "response" is an int *
2582 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07002583 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002584 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07002585 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002586 *
2587 * Valid errors:
2588 * SUCCESS
2589 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002590 * SS_MODIFIED_TO_DIAL
2591 * SS_MODIFIED_TO_USSD
2592 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002593 * GENERIC_FAILURE
2594 *
2595 */
2596#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
2597
2598/**
2599 * RIL_REQUEST_SET_FACILITY_LOCK
2600 *
2601 * Enable/disable one facility lock
2602 *
2603 * "data" is const char **
2604 *
2605 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2606 * (eg "AO" for BAOC)
2607 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
2608 * ((const char **)data)[2] = password
2609 * ((const char **)data)[3] = string representation of decimal TS 27.007
2610 * service class bit vector. Eg, the string
2611 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08002612 * ((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 -08002613 * This is only applicable in the case of Fixed Dialing Numbers
2614 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002615 *
jsh593c9102009-06-24 16:13:44 -07002616 * "response" is int *
2617 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002618 *
2619 * Valid errors:
2620 * SUCCESS
2621 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002622 * SS_MODIFIED_TO_DIAL
2623 * SS_MODIFIED_TO_USSD
2624 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002625 * GENERIC_FAILURE
2626 *
2627 */
2628#define RIL_REQUEST_SET_FACILITY_LOCK 43
2629
2630/**
2631 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
2632 *
2633 * Change call barring facility password
2634 *
2635 * "data" is const char **
2636 *
2637 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2638 * (eg "AO" for BAOC)
2639 * ((const char **)data)[1] = old password
2640 * ((const char **)data)[2] = new password
2641 *
Wink Saville7f856802009-06-09 10:23:37 -07002642 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002643 *
2644 * Valid errors:
2645 * SUCCESS
2646 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002647 * SS_MODIFIED_TO_DIAL
2648 * SS_MODIFIED_TO_USSD
2649 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002650 * GENERIC_FAILURE
2651 *
2652 */
2653#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
2654
2655/**
2656 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
2657 *
2658 * Query current network selectin mode
2659 *
2660 * "data" is NULL
2661 *
2662 * "response" is int *
2663 * ((const int *)response)[0] is
2664 * 0 for automatic selection
2665 * 1 for manual selection
2666 *
2667 * Valid errors:
2668 * SUCCESS
2669 * RADIO_NOT_AVAILABLE
2670 * GENERIC_FAILURE
2671 *
2672 */
2673#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
2674
2675/**
2676 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
2677 *
2678 * Specify that the network should be selected automatically
2679 *
2680 * "data" is NULL
2681 * "response" is NULL
2682 *
Wink Saville7f856802009-06-09 10:23:37 -07002683 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002684 * and registered
2685 *
2686 * Valid errors:
2687 * SUCCESS
2688 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07002689 * ILLEGAL_SIM_OR_ME
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002690 * GENERIC_FAILURE
2691 *
John Wang75534472010-04-20 15:11:42 -07002692 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2693 * no retries needed, such as illegal SIM or ME.
2694 * Returns GENERIC_FAILURE for all other causes that might be
2695 * fixed by retries.
2696 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002697 */
2698#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
2699
2700/**
2701 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
2702 *
2703 * Manually select a specified network.
2704 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002705 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
2706 * "response" is NULL
2707 *
Wink Saville7f856802009-06-09 10:23:37 -07002708 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002709 * and registered
2710 *
2711 * Valid errors:
2712 * SUCCESS
2713 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07002714 * ILLEGAL_SIM_OR_ME
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002715 * GENERIC_FAILURE
2716 *
John Wang75534472010-04-20 15:11:42 -07002717 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2718 * no retries needed, such as illegal SIM or ME.
2719 * Returns GENERIC_FAILURE for all other causes that might be
2720 * fixed by retries.
2721 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002722 */
2723#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
2724
2725/**
2726 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
2727 *
2728 * Scans for available networks
2729 *
2730 * "data" is NULL
2731 * "response" is const char ** that should be an array of n*4 strings, where
2732 * n is the number of available networks
2733 * For each available network:
2734 *
Wink Saville7f856802009-06-09 10:23:37 -07002735 * ((const char **)response)[n+0] is long alpha ONS or EONS
2736 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002737 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
2738 * ((const char **)response)[n+3] is a string value of the status:
2739 * "unknown"
2740 * "available"
2741 * "current"
2742 * "forbidden"
2743 *
Wink Saville7f856802009-06-09 10:23:37 -07002744 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002745 * and registered
2746 *
2747 * Valid errors:
2748 * SUCCESS
2749 * RADIO_NOT_AVAILABLE
2750 * GENERIC_FAILURE
2751 *
2752 */
2753#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
2754
2755/**
2756 * RIL_REQUEST_DTMF_START
2757 *
Wink Saville7f856802009-06-09 10:23:37 -07002758 * Start playing a DTMF tone. Continue playing DTMF tone until
2759 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002760 *
2761 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
2762 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07002763 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002764 * "data" is a char *
2765 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
2766 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002767 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002768 * Valid errors:
2769 * SUCCESS
2770 * RADIO_NOT_AVAILABLE
2771 * GENERIC_FAILURE
2772 *
2773 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
2774 */
2775#define RIL_REQUEST_DTMF_START 49
2776
2777/**
2778 * RIL_REQUEST_DTMF_STOP
2779 *
2780 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07002781 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002782 * "data" is NULL
2783 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002784 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002785 * Valid errors:
2786 * SUCCESS
2787 * RADIO_NOT_AVAILABLE
2788 * GENERIC_FAILURE
2789 *
2790 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
2791 */
2792#define RIL_REQUEST_DTMF_STOP 50
2793
2794/**
2795 * RIL_REQUEST_BASEBAND_VERSION
2796 *
2797 * Return string value indicating baseband version, eg
2798 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07002799 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002800 * "data" is NULL
2801 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07002802 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002803 * Valid errors:
2804 * SUCCESS
2805 * RADIO_NOT_AVAILABLE
2806 * GENERIC_FAILURE
2807 *
2808 */
2809#define RIL_REQUEST_BASEBAND_VERSION 51
2810
2811/**
2812 * RIL_REQUEST_SEPARATE_CONNECTION
2813 *
2814 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07002815 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002816 * as the only other member of the current (active) call
2817 *
2818 * Like AT+CHLD=2x
2819 *
2820 * See TS 22.084 1.3.8.2 (iii)
2821 * TS 22.030 6.5.5 "Entering "2X followed by send"
2822 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07002823 *
2824 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002825 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
2826 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002827 * "response" is NULL
2828 *
2829 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002830 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002831 * RADIO_NOT_AVAILABLE (radio resetting)
2832 * GENERIC_FAILURE
2833 */
2834#define RIL_REQUEST_SEPARATE_CONNECTION 52
2835
2836
2837/**
2838 * RIL_REQUEST_SET_MUTE
2839 *
2840 * Turn on or off uplink (microphone) mute.
2841 *
2842 * Will only be sent while voice call is active.
2843 * Will always be reset to "disable mute" when a new voice call is initiated
2844 *
2845 * "data" is an int *
2846 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
2847 *
2848 * "response" is NULL
2849 *
2850 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002851 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002852 * RADIO_NOT_AVAILABLE (radio resetting)
2853 * GENERIC_FAILURE
2854 */
2855
2856#define RIL_REQUEST_SET_MUTE 53
2857
2858/**
2859 * RIL_REQUEST_GET_MUTE
2860 *
2861 * Queries the current state of the uplink mute setting
2862 *
2863 * "data" is NULL
2864 * "response" is an int *
2865 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
2866 *
2867 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002868 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002869 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00002870 * SS_MODIFIED_TO_DIAL
2871 * SS_MODIFIED_TO_USSD
2872 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002873 * GENERIC_FAILURE
2874 */
2875
2876#define RIL_REQUEST_GET_MUTE 54
2877
2878/**
2879 * RIL_REQUEST_QUERY_CLIP
2880 *
2881 * Queries the status of the CLIP supplementary service
2882 *
2883 * (for MMI code "*#30#")
2884 *
2885 * "data" is NULL
2886 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07002887 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002888 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07002889 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002890 *
2891 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002892 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002893 * RADIO_NOT_AVAILABLE (radio resetting)
2894 * GENERIC_FAILURE
2895 */
2896
2897#define RIL_REQUEST_QUERY_CLIP 55
2898
2899/**
Wink Savillec0114b32011-02-18 10:14:07 -08002900 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
2901 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07002902 *
2903 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07002904 * context or CDMA data connection active
2905 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002906 *
2907 * "data" is NULL
2908 *
2909 * "response" is a "int *"
2910 * ((int *)response)[0] is an integer cause code defined in TS 24.008
2911 * section 6.1.3.1.3 or close approximation
2912 *
2913 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07002914 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08002915 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002916 * cases for error notification
2917 * and potential retries.
2918 *
2919 * Valid errors:
2920 * SUCCESS
2921 * RADIO_NOT_AVAILABLE
2922 * GENERIC_FAILURE
2923 *
2924 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08002925 *
2926 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07002927 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002928
Wink Savillef4c4d362009-04-02 01:37:03 -07002929#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002930
2931/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002932 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002933 *
Wink Saville29487ef2011-04-15 09:15:31 -07002934 * Returns the data call list. An entry is added when a
2935 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
2936 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
2937 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002938 *
2939 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08002940 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002941 *
2942 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002943 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002944 * RADIO_NOT_AVAILABLE (radio resetting)
2945 * GENERIC_FAILURE
Wink Saville29487ef2011-04-15 09:15:31 -07002946 *
2947 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002948 */
2949
Wink Savillef4c4d362009-04-02 01:37:03 -07002950#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002951
2952/**
johnwangf8bc1672009-05-14 19:19:47 -07002953 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002954 *
2955 * Request a radio reset. The RIL implementation may postpone
2956 * the reset until after this request is responded to if the baseband
2957 * is presently busy.
2958 *
johnwangf8bc1672009-05-14 19:19:47 -07002959 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
2960 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002961 * "data" is NULL
2962 * "response" is NULL
2963 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002964 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002965 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002966 * RADIO_NOT_AVAILABLE (radio resetting)
2967 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07002968 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002969 */
2970
2971#define RIL_REQUEST_RESET_RADIO 58
2972
2973/**
2974 * RIL_REQUEST_OEM_HOOK_RAW
2975 *
2976 * This request reserved for OEM-specific uses. It passes raw byte arrays
2977 * back and forth.
2978 *
Wink Saville7f856802009-06-09 10:23:37 -07002979 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002980 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
2981 *
2982 * "data" is a char * of bytes copied from the byte[] data argument in java
2983 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07002984 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002985 * (byte[])(((AsyncResult)response.obj).result)
2986 *
Wink Saville7f856802009-06-09 10:23:37 -07002987 * An error response here will result in
2988 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002989 * (((AsyncResult)response.obj).exception) being an instance of
2990 * com.android.internal.telephony.gsm.CommandException
2991 *
2992 * Valid errors:
2993 * All
2994 */
2995
2996#define RIL_REQUEST_OEM_HOOK_RAW 59
2997
2998/**
2999 * RIL_REQUEST_OEM_HOOK_STRINGS
3000 *
3001 * This request reserved for OEM-specific uses. It passes strings
3002 * back and forth.
3003 *
Wink Saville7f856802009-06-09 10:23:37 -07003004 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003005 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
3006 *
3007 * "data" is a const char **, representing an array of null-terminated UTF-8
3008 * strings copied from the "String[] strings" argument to
3009 * invokeOemRilRequestStrings()
3010 *
3011 * "response" is a const char **, representing an array of null-terminated UTF-8
3012 * stings that will be returned via the caller's response message here:
3013 *
3014 * (String[])(((AsyncResult)response.obj).result)
3015 *
Wink Saville7f856802009-06-09 10:23:37 -07003016 * An error response here will result in
3017 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003018 * (((AsyncResult)response.obj).exception) being an instance of
3019 * com.android.internal.telephony.gsm.CommandException
3020 *
3021 * Valid errors:
3022 * All
3023 */
3024
3025#define RIL_REQUEST_OEM_HOOK_STRINGS 60
3026
3027/**
3028 * RIL_REQUEST_SCREEN_STATE
3029 *
3030 * Indicates the current state of the screen. When the screen is off, the
3031 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07003032 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
3033 * in an effort to conserve power. These notifications should resume when the
3034 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003035 *
3036 * "data" is int *
3037 * ((int *)data)[0] is == 1 for "Screen On"
3038 * ((int *)data)[0] is == 0 for "Screen Off"
3039 *
3040 * "response" is NULL
3041 *
3042 * Valid errors:
3043 * SUCCESS
3044 * GENERIC_FAILURE
3045 */
3046#define RIL_REQUEST_SCREEN_STATE 61
3047
3048
3049/**
3050 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
3051 *
3052 * Enables/disables supplementary service related notifications
3053 * from the network.
3054 *
3055 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3056 *
3057 * "data" is int *
3058 * ((int *)data)[0] is == 1 for notifications enabled
3059 * ((int *)data)[0] is == 0 for notifications disabled
3060 *
3061 * "response" is NULL
3062 *
3063 * Valid errors:
3064 * SUCCESS
3065 * RADIO_NOT_AVAILABLE
3066 * GENERIC_FAILURE
3067 *
3068 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3069 */
3070#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
3071
3072/**
3073 * RIL_REQUEST_WRITE_SMS_TO_SIM
3074 *
3075 * Stores a SMS message to SIM memory.
3076 *
3077 * "data" is RIL_SMS_WriteArgs *
3078 *
3079 * "response" is int *
3080 * ((const int *)response)[0] is the record index where the message is stored.
3081 *
3082 * Valid errors:
3083 * SUCCESS
3084 * GENERIC_FAILURE
3085 *
3086 */
3087#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
3088
3089/**
3090 * RIL_REQUEST_DELETE_SMS_ON_SIM
3091 *
3092 * Deletes a SMS message from SIM memory.
3093 *
3094 * "data" is int *
3095 * ((int *)data)[0] is the record index of the message to delete.
3096 *
3097 * "response" is NULL
3098 *
3099 * Valid errors:
3100 * SUCCESS
3101 * GENERIC_FAILURE
3102 *
3103 */
3104#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
3105
3106/**
3107 * RIL_REQUEST_SET_BAND_MODE
3108 *
3109 * Assign a specified band for RF configuration.
3110 *
3111 * "data" is int *
3112 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
3113 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
3114 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
3115 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
3116 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
3117 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07003118 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
3119 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
3120 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
3121 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
3122 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
3123 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
3124 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
3125 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
3126 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
3127 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
3128 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
3129 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
3130 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003131 *
3132 * "response" is NULL
3133 *
3134 * Valid errors:
3135 * SUCCESS
3136 * RADIO_NOT_AVAILABLE
3137 * GENERIC_FAILURE
3138 */
3139#define RIL_REQUEST_SET_BAND_MODE 65
3140
3141/**
3142 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3143 *
3144 * Query the list of band mode supported by RF.
3145 *
3146 * "data" is NULL
3147 *
3148 * "response" is int *
3149 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
3150 * each available band mode.
3151 *
3152 * 0 for "unspecified" (selected by baseband automatically)
3153 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
3154 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
3155 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
3156 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
3157 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07003158 * 6 for "Cellular (800-MHz Band)"
3159 * 7 for "PCS (1900-MHz Band)"
3160 * 8 for "Band Class 3 (JTACS Band)"
3161 * 9 for "Band Class 4 (Korean PCS Band)"
3162 * 10 for "Band Class 5 (450-MHz Band)"
3163 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
3164 * 12 for "Band Class 7 (Upper 700-MHz Band)"
3165 * 13 for "Band Class 8 (1800-MHz Band)"
3166 * 14 for "Band Class 9 (900-MHz Band)"
3167 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
3168 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
3169 * 17 for "Band Class 15 (AWS Band)"
3170 * 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003171 *
3172 * Valid errors:
3173 * SUCCESS
3174 * RADIO_NOT_AVAILABLE
3175 * GENERIC_FAILURE
3176 *
3177 * See also: RIL_REQUEST_SET_BAND_MODE
3178 */
3179#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
3180
3181/**
3182 * RIL_REQUEST_STK_GET_PROFILE
3183 *
3184 * Requests the profile of SIM tool kit.
3185 * The profile indicates the SAT/USAT features supported by ME.
3186 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
3187 *
3188 * "data" is NULL
3189 *
3190 * "response" is a const char * containing SAT/USAT profile
3191 * in hexadecimal format string starting with first byte of terminal profile
3192 *
3193 * Valid errors:
3194 * RIL_E_SUCCESS
3195 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3196 * RIL_E_GENERIC_FAILURE
3197 */
3198#define RIL_REQUEST_STK_GET_PROFILE 67
3199
3200/**
3201 * RIL_REQUEST_STK_SET_PROFILE
3202 *
3203 * Download the STK terminal profile as part of SIM initialization
3204 * procedure
3205 *
3206 * "data" is a const char * containing SAT/USAT profile
3207 * in hexadecimal format string starting with first byte of terminal profile
3208 *
3209 * "response" is NULL
3210 *
3211 * Valid errors:
3212 * RIL_E_SUCCESS
3213 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3214 * RIL_E_GENERIC_FAILURE
3215 */
3216#define RIL_REQUEST_STK_SET_PROFILE 68
3217
3218/**
3219 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
3220 *
3221 * Requests to send a SAT/USAT envelope command to SIM.
3222 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
3223 *
3224 * "data" is a const char * containing SAT/USAT command
3225 * in hexadecimal format string starting with command tag
3226 *
3227 * "response" is a const char * containing SAT/USAT response
3228 * in hexadecimal format string starting with first byte of response
3229 * (May be NULL)
3230 *
3231 * Valid errors:
3232 * RIL_E_SUCCESS
3233 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3234 * RIL_E_GENERIC_FAILURE
3235 */
3236#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
3237
3238/**
3239 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
3240 *
3241 * Requests to send a terminal response to SIM for a received
3242 * proactive command
3243 *
3244 * "data" is a const char * containing SAT/USAT response
3245 * in hexadecimal format string starting with first byte of response data
3246 *
3247 * "response" is NULL
3248 *
3249 * Valid errors:
3250 * RIL_E_SUCCESS
3251 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3252 * RIL_E_GENERIC_FAILURE
3253 */
3254#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3255
3256/**
3257 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3258 *
3259 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3260 * been initialized by ME already. (We could see the call has been in the 'call
3261 * list') So, STK application needs to accept/reject the call according as user
3262 * operations.
3263 *
3264 * "data" is int *
3265 * ((int *)data)[0] is > 0 for "accept" the call setup
3266 * ((int *)data)[0] is == 0 for "reject" the call setup
3267 *
3268 * "response" is NULL
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_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3276
3277/**
3278 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3279 *
3280 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07003281 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003282 * "data" is NULL
3283 * "response" is NULL
3284 *
3285 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07003286 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003287 * RADIO_NOT_AVAILABLE (radio resetting)
3288 * GENERIC_FAILURE
3289 */
3290#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3291
3292/**
3293 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3294 *
3295 * Requests to set the preferred network type for searching and registering
3296 * (CS/PS domain, RAT, and operation mode)
3297 *
Wink Savillec0114b32011-02-18 10:14:07 -08003298 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003299 *
3300 * "response" is NULL
3301 *
3302 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07003303 * SUCCESS
3304 * RADIO_NOT_AVAILABLE (radio resetting)
3305 * GENERIC_FAILURE
3306 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003307 */
3308#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3309
3310/**
3311 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
3312 *
3313 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
3314 * for searching and registering
3315 *
3316 * "data" is NULL
3317 *
3318 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003319 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003320 *
3321 * Valid errors:
3322 * SUCCESS
3323 * RADIO_NOT_AVAILABLE
3324 * GENERIC_FAILURE
3325 *
3326 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3327 */
3328#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
3329
3330/**
3331 * RIL_REQUEST_NEIGHBORING_CELL_IDS
3332 *
3333 * Request neighboring cell id in GSM network
3334 *
3335 * "data" is NULL
3336 * "response" must be a " const RIL_NeighboringCell** "
3337 *
3338 * Valid errors:
3339 * SUCCESS
3340 * RADIO_NOT_AVAILABLE
3341 * GENERIC_FAILURE
3342 */
3343#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3344
3345/**
3346 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07003347 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003348 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07003349 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3350 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003351 *
3352 * Note: The RIL implementation should default to "updates enabled"
3353 * when the screen is on and "updates disabled" when the screen is off.
3354 *
3355 * "data" is int *
3356 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3357 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3358 *
3359 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07003360 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003361 * Valid errors:
3362 * SUCCESS
3363 * RADIO_NOT_AVAILABLE
3364 * GENERIC_FAILURE
3365 *
3366 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3367 */
3368#define RIL_REQUEST_SET_LOCATION_UPDATES 76
3369
Wink Savillef4c4d362009-04-02 01:37:03 -07003370/**
Wink Savillec0114b32011-02-18 10:14:07 -08003371 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07003372 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003373 * Request to set the location where the CDMA subscription shall
3374 * be retrieved
3375 *
3376 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003377 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07003378 *
3379 * "response" is NULL
3380 *
3381 * Valid errors:
3382 * SUCCESS
3383 * RADIO_NOT_AVAILABLE
3384 * GENERIC_FAILURE
3385 * SIM_ABSENT
3386 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08003387 *
3388 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07003389 */
Wink Savillec0114b32011-02-18 10:14:07 -08003390#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07003391
3392/**
3393 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003394 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003395 * Request to set the roaming preferences in CDMA
3396 *
3397 * "data" is int *
3398 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3399 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3400 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003401 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003402 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003403 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003404 * Valid errors:
3405 * SUCCESS
3406 * RADIO_NOT_AVAILABLE
3407 * GENERIC_FAILURE
3408 */
3409#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
3410
3411/**
3412 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003413 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003414 * Request the actual setting of the roaming preferences in CDMA in the modem
3415 *
3416 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003417 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003418 * "response" is int *
3419 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
3420 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3421 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003422 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003423 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003424 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003425 * Valid errors:
3426 * SUCCESS
3427 * RADIO_NOT_AVAILABLE
3428 * GENERIC_FAILURE
3429 */
3430#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
3431
3432/**
3433 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003434 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003435 * Request to set the TTY mode
3436 *
3437 * "data" is int *
3438 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003439 * ((int *)data)[0] is == 1 for TTY Full
3440 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
3441 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07003442 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003443 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003444 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003445 * Valid errors:
3446 * SUCCESS
3447 * RADIO_NOT_AVAILABLE
3448 * GENERIC_FAILURE
3449 */
3450#define RIL_REQUEST_SET_TTY_MODE 80
3451
3452/**
3453 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003454 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003455 * Request the setting of TTY mode
3456 *
3457 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003458 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003459 * "response" is int *
3460 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003461 * ((int *)response)[0] is == 1 for TTY Full
3462 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
3463 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07003464 *
3465 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003466 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003467 * Valid errors:
3468 * SUCCESS
3469 * RADIO_NOT_AVAILABLE
3470 * GENERIC_FAILURE
3471 */
3472#define RIL_REQUEST_QUERY_TTY_MODE 81
3473
3474/**
3475 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
3476 *
3477 * Request to set the preferred voice privacy mode used in voice
3478 * scrambling
3479 *
3480 * "data" is int *
3481 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3482 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003483 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003484 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003485 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003486 * Valid errors:
3487 * SUCCESS
3488 * RADIO_NOT_AVAILABLE
3489 * GENERIC_FAILURE
3490 */
3491#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
3492
3493/**
3494 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003495 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003496 * Request the setting of preferred voice privacy mode
3497 *
3498 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003499 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003500 * "response" is int *
3501 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3502 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003503 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003504 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003505 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003506 * Valid errors:
3507 * SUCCESS
3508 * RADIO_NOT_AVAILABLE
3509 * GENERIC_FAILURE
3510 */
3511#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
3512
3513/**
3514 * RIL_REQUEST_CDMA_FLASH
3515 *
3516 * Send FLASH
3517 *
3518 * "data" is const char *
3519 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07003520 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003521 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003522 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003523 * Valid errors:
3524 * SUCCESS
3525 * RADIO_NOT_AVAILABLE
3526 * GENERIC_FAILURE
3527 *
3528 */
3529#define RIL_REQUEST_CDMA_FLASH 84
3530
3531/**
3532 * RIL_REQUEST_CDMA_BURST_DTMF
3533 *
3534 * Send DTMF string
3535 *
jsh602f80f2009-07-10 15:44:37 -07003536 * "data" is const char **
3537 * ((const char **)data)[0] is a DTMF string
3538 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
3539 * default
3540 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
3541 * default
Wink Saville7f856802009-06-09 10:23:37 -07003542 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003543 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003544 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003545 * Valid errors:
3546 * SUCCESS
3547 * RADIO_NOT_AVAILABLE
3548 * GENERIC_FAILURE
3549 *
3550 */
3551#define RIL_REQUEST_CDMA_BURST_DTMF 85
3552
3553/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07003554 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07003555 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07003556 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
3557 * If the checksum is valid the 20 digit AKEY is written to NV,
3558 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07003559 *
3560 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07003561 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
3562 * where the last 6 digits are a checksum of the
3563 * first 20, as specified in TR45.AHAG
3564 * "Common Cryptographic Algorithms, Revision D.1
3565 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07003566 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003567 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003568 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003569 * Valid errors:
3570 * SUCCESS
3571 * RADIO_NOT_AVAILABLE
3572 * GENERIC_FAILURE
3573 *
3574 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07003575#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07003576
3577/**
3578 * RIL_REQUEST_CDMA_SEND_SMS
3579 *
3580 * Send a CDMA SMS message
3581 *
3582 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07003583 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003584 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07003585 *
johnwangbfb151b2009-09-11 15:20:38 -07003586 * Based on the return error, caller decides to resend if sending sms
3587 * fails. The CDMA error class is derived as follows,
3588 * SUCCESS is error class 0 (no error)
3589 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
3590 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
3591 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003592 * Valid errors:
3593 * SUCCESS
3594 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07003595 * SMS_SEND_FAIL_RETRY
Wink Savillef4c4d362009-04-02 01:37:03 -07003596 * GENERIC_FAILURE
3597 *
3598 */
3599#define RIL_REQUEST_CDMA_SEND_SMS 87
3600
3601/**
3602 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
3603 *
3604 * Acknowledge the success or failure in the receipt of SMS
3605 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3606 *
3607 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07003608 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003609 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003610 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003611 * Valid errors:
3612 * SUCCESS
3613 * RADIO_NOT_AVAILABLE
3614 * GENERIC_FAILURE
3615 *
3616 */
3617#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
3618
3619/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003620 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07003621 *
Wink Savillea592eeb2009-05-22 13:26:36 -07003622 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
3623 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003624 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003625 *
3626 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
3627 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
3628 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003629 * Valid errors:
3630 * SUCCESS
3631 * RADIO_NOT_AVAILABLE
3632 * GENERIC_FAILURE
3633 *
3634 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003635#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07003636
3637/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003638 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07003639 *
3640 * Set GSM/WCDMA Cell Broadcast SMS config
3641 *
Wink Savillea592eeb2009-05-22 13:26:36 -07003642 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
3643 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
3644 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003645 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003646 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003647 * Valid errors:
3648 * SUCCESS
3649 * RADIO_NOT_AVAILABLE
3650 * GENERIC_FAILURE
3651 *
3652 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003653#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07003654
3655/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003656 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07003657 *
Wink Savillea592eeb2009-05-22 13:26:36 -07003658* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07003659 *
3660 * "data" is const int *
3661 * (const int *)data[0] indicates to activate or turn off the
3662 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
3663 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07003664 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003665 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003666 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003667 * Valid errors:
3668 * SUCCESS
3669 * RADIO_NOT_AVAILABLE
3670 * GENERIC_FAILURE
3671 *
3672 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003673#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07003674
3675/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003676 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07003677 *
3678 * Request the setting of CDMA Broadcast SMS config
3679 *
3680 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003681 *
3682 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
3683 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
3684 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003685 * Valid errors:
3686 * SUCCESS
3687 * RADIO_NOT_AVAILABLE
3688 * GENERIC_FAILURE
3689 *
3690 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003691#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07003692
3693/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003694 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07003695 *
3696 * Set CDMA Broadcast SMS config
3697 *
Wink Savillea592eeb2009-05-22 13:26:36 -07003698 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
3699 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
3700 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003701 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003702 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003703 * Valid errors:
3704 * SUCCESS
3705 * RADIO_NOT_AVAILABLE
3706 * GENERIC_FAILURE
3707 *
3708 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003709#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07003710
3711/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003712 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07003713 *
3714 * Enable or disable the reception of CDMA Broadcast SMS
3715 *
3716 * "data" is const int *
3717 * (const int *)data[0] indicates to activate or turn off the
3718 * reception of CDMA Broadcast SMS, 0-1,
3719 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07003720 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003721 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003722 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003723 * Valid errors:
3724 * SUCCESS
3725 * RADIO_NOT_AVAILABLE
3726 * GENERIC_FAILURE
3727 *
3728 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003729#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07003730
3731/**
3732 * RIL_REQUEST_CDMA_SUBSCRIPTION
3733 *
3734 * Request the device MDN / H_SID / H_NID.
3735 *
3736 * The request is only allowed when CDMA subscription is available. When CDMA
3737 * subscription is changed, application layer should re-issue the request to
3738 * update the subscription information.
3739 *
3740 * If a NULL value is returned for any of the device id, it means that error
3741 * accessing the device.
3742 *
3743 * "response" is const char **
3744 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07003745 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
3746 * CDMA subscription is available, in decimal format
3747 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
3748 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07003749 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07003750 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07003751 *
3752 * Valid errors:
3753 * SUCCESS
3754 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
3755 */
3756
Wink Savilleeafe79d2009-04-03 18:02:34 -07003757#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07003758
3759/**
3760 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
3761 *
3762 * Stores a CDMA SMS message to RUIM memory.
3763 *
3764 * "data" is RIL_CDMA_SMS_WriteArgs *
3765 *
3766 * "response" is int *
3767 * ((const int *)response)[0] is the record index where the message is stored.
3768 *
3769 * Valid errors:
3770 * SUCCESS
3771 * RADIO_NOT_AVAILABLE
3772 * GENERIC_FAILURE
3773 *
3774 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003775#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07003776
3777/**
3778 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
3779 *
3780 * Deletes a CDMA SMS message from RUIM memory.
3781 *
3782 * "data" is int *
3783 * ((int *)data)[0] is the record index of the message to delete.
3784 *
3785 * "response" is NULL
3786 *
3787 * Valid errors:
3788 * SUCCESS
3789 * RADIO_NOT_AVAILABLE
3790 * GENERIC_FAILURE
3791 *
3792 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003793#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07003794
3795/**
3796 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07003797 *
3798 * Request the device ESN / MEID / IMEI / IMEISV.
3799 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003800 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07003801 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07003802 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003803 *
3804 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07003805 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003806 *
3807 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07003808 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003809 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003810 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07003811 * ((const char **)response)[0] is IMEI if GSM subscription is available
3812 * ((const char **)response)[1] is IMEISV if GSM subscription is available
3813 * ((const char **)response)[2] is ESN if CDMA subscription is available
3814 * ((const char **)response)[3] is MEID if CDMA subscription is available
3815 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003816 * Valid errors:
3817 * SUCCESS
3818 * RADIO_NOT_AVAILABLE
3819 * GENERIC_FAILURE
3820 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003821#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07003822
Wink Saville1b5fd232009-04-22 14:50:00 -07003823/**
3824 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
3825 *
3826 * Request the radio's system selection module to exit emergency
3827 * callback mode. RIL will not respond with SUCCESS until the modem has
3828 * completely exited from Emergency Callback Mode.
3829 *
3830 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003831 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003832 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003833 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003834 * Valid errors:
3835 * SUCCESS
3836 * RADIO_NOT_AVAILABLE
3837 * GENERIC_FAILURE
3838 *
3839 */
3840#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07003841
jsh000a9fe2009-05-11 14:52:35 -07003842/**
3843 * RIL_REQUEST_GET_SMSC_ADDRESS
3844 *
3845 * Queries the default Short Message Service Center address on the device.
3846 *
3847 * "data" is NULL
3848 *
3849 * "response" is const char * containing the SMSC address.
3850 *
3851 * Valid errors:
3852 * SUCCESS
3853 * RADIO_NOT_AVAILABLE
3854 * GENERIC_FAILURE
3855 *
3856 */
3857#define RIL_REQUEST_GET_SMSC_ADDRESS 100
3858
3859/**
3860 * RIL_REQUEST_SET_SMSC_ADDRESS
3861 *
3862 * Sets the default Short Message Service Center address on the device.
3863 *
3864 * "data" is const char * containing the SMSC address.
3865 *
3866 * "response" is NULL
3867 *
3868 * Valid errors:
3869 * SUCCESS
3870 * RADIO_NOT_AVAILABLE
3871 * GENERIC_FAILURE
3872 *
3873 */
3874#define RIL_REQUEST_SET_SMSC_ADDRESS 101
3875
jshb60444e2009-05-29 11:09:17 -07003876/**
3877 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
3878 *
3879 * Indicates whether there is storage available for new SMS messages.
3880 *
3881 * "data" is int *
3882 * ((int *)data)[0] is 1 if memory is available for storing new messages
3883 * is 0 if memory capacity is exceeded
3884 *
3885 * "response" is NULL
3886 *
3887 * Valid errors:
3888 * SUCCESS
3889 * RADIO_NOT_AVAILABLE
3890 * GENERIC_FAILURE
3891 *
3892 */
3893#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
3894
Wink Saville2641d5b2009-06-08 17:40:42 -07003895/**
3896 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
3897 *
3898 * Indicates that the StkSerivce is running and is
3899 * ready to receive RIL_UNSOL_STK_XXXXX commands.
3900 *
3901 * "data" is NULL
3902 * "response" is NULL
3903 *
3904 * Valid errors:
3905 * SUCCESS
3906 * RADIO_NOT_AVAILABLE
3907 * GENERIC_FAILURE
3908 *
3909 */
3910#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
3911
Wink Savillec0114b32011-02-18 10:14:07 -08003912/**
3913 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3914 *
3915 * Request to query the location where the CDMA subscription shall
3916 * be retrieved
3917 *
3918 * "data" is NULL
3919 *
3920 * "response" is int *
3921 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3922 *
3923 * Valid errors:
3924 * SUCCESS
3925 * RADIO_NOT_AVAILABLE
3926 * GENERIC_FAILURE
3927 * SUBSCRIPTION_NOT_AVAILABLE
3928 *
3929 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
3930 */
3931#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
3932
Jake Hambyfa8d5842011-08-19 16:22:18 -07003933/**
3934 * RIL_REQUEST_ISIM_AUTHENTICATION
3935 *
3936 * Request the ISIM application on the UICC to perform AKA
3937 * challenge/response algorithm for IMS authentication
3938 *
3939 * "data" is a const char * containing the challenge string in Base64 format
3940 * "response" is a const char * containing the response in Base64 format
3941 *
3942 * Valid errors:
3943 * SUCCESS
3944 * RADIO_NOT_AVAILABLE
3945 * GENERIC_FAILURE
3946 */
3947#define RIL_REQUEST_ISIM_AUTHENTICATION 105
3948
Jake Hamby300105d2011-09-26 01:01:44 -07003949/**
3950 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
3951 *
3952 * Acknowledge successful or failed receipt of SMS previously indicated
3953 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
3954 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
3955 *
3956 * "data" is const char **
3957 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
3958 * is "0" on failed receipt (send RP-ERROR)
3959 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
3960 *
3961 * "response" is NULL
3962 *
3963 * Valid errors:
3964 * SUCCESS
3965 * RADIO_NOT_AVAILABLE
3966 * GENERIC_FAILURE
3967 */
3968#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
3969
3970/**
3971 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
3972 *
3973 * Requests to send a SAT/USAT envelope command to SIM.
3974 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
3975 *
3976 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
3977 * the SW1 and SW2 status bytes from the UICC response are returned along with
3978 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
3979 *
3980 * The RIL implementation shall perform the normal processing of a '91XX'
3981 * response in SW1/SW2 to retrieve the pending proactive command and send it
3982 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
3983 *
3984 * "data" is a const char * containing the SAT/USAT command
3985 * in hexadecimal format starting with command tag
3986 *
3987 * "response" is a const RIL_SIM_IO_Response *
3988 *
3989 * Valid errors:
3990 * RIL_E_SUCCESS
3991 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3992 * RIL_E_GENERIC_FAILURE
3993 */
3994#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
3995
Naveen Kalla2bc78d62011-12-07 16:22:53 -08003996/**
3997 * RIL_REQUEST_VOICE_RADIO_TECH
3998 *
3999 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
4000 * when radio state is RADIO_STATE_ON
4001 *
4002 * "data" is NULL
4003 * "response" is int *
4004 * ((int *) response)[0] is of type const RIL_RadioTechnology
4005 *
4006 * Valid errors:
4007 * SUCCESS
4008 * RADIO_NOT_AVAILABLE
4009 * GENERIC_FAILURE
4010 */
4011#define RIL_REQUEST_VOICE_RADIO_TECH 108
4012
Wink Saville8a9e0212013-04-09 12:11:38 -07004013/**
4014 * RIL_REQUEST_GET_CELL_INFO_LIST
4015 *
4016 * Request all of the current cell information known to the radio. The radio
4017 * must a list of all current cells, including the neighboring cells. If for a particular
4018 * cell information isn't known then the appropriate unknown value will be returned.
4019 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
4020 *
4021 * "data" is NULL
4022 *
4023 * "response" is an array of RIL_CellInfo.
4024 */
4025#define RIL_REQUEST_GET_CELL_INFO_LIST 109
4026
4027/**
4028 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
4029 *
4030 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
Wink Savillec57b3eb2013-04-17 12:51:41 -07004031 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
Wink Saville8a9e0212013-04-09 12:11:38 -07004032 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
4033 * a RIL_UNSOL_CELL_INFO_LIST.
4034 *
4035 * "data" is int *
4036 * ((int *)data)[0] is minimum time in milliseconds
4037 *
4038 * "response" is NULL
4039 *
4040 * Valid errors:
4041 * SUCCESS
4042 * RADIO_NOT_AVAILABLE
4043 * GENERIC_FAILURE
4044 */
4045#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
Jake Hamby300105d2011-09-26 01:01:44 -07004046
Sungmin Choi75697532013-04-26 15:04:45 -07004047/**
4048 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
4049 *
4050 * Set an apn to initial attach network
4051 * "response" is NULL
4052 *
4053 * Valid errors:
4054 * SUCCESS
4055 * RADIO_NOT_AVAILABLE (radio resetting)
4056 * GENERIC_FAILURE
4057 * SUBSCRIPTION_NOT_AVAILABLE
4058 */
4059#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
4060
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004061/**
4062 * RIL_REQUEST_IMS_REGISTRATION_STATE
4063 *
4064 * Request current IMS registration state
4065 *
4066 * "data" is NULL
4067 *
4068 * "response" is int *
4069 * ((int *)response)[0] is registration state:
4070 * 0 - Not registered
4071 * 1 - Registered
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004072 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004073 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004074 * must follow with IMS SMS format:
4075 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004076 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
4077 *
4078 * Valid errors:
4079 * SUCCESS
4080 * RADIO_NOT_AVAILABLE
4081 * GENERIC_FAILURE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004082 */
4083#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
4084
4085/**
4086 * RIL_REQUEST_IMS_SEND_SMS
4087 *
4088 * Send a SMS message over IMS
4089 *
4090 * "data" is const RIL_IMS_SMS_Message *
4091 *
4092 * "response" is a const RIL_SMS_Response *
4093 *
4094 * Based on the return error, caller decides to resend if sending sms
4095 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
4096 * In case of retry, data is encoded based on Voice Technology available.
4097 *
4098 * Valid errors:
4099 * SUCCESS
4100 * RADIO_NOT_AVAILABLE
4101 * SMS_SEND_FAIL_RETRY
4102 * FDN_CHECK_FAILURE
4103 * GENERIC_FAILURE
4104 *
4105 */
4106#define RIL_REQUEST_IMS_SEND_SMS 113
4107
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004108/**
4109 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
4110 *
4111 * Request APDU exchange on the basic channel. This command reflects TS 27.007
4112 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
4113 * of GSM/CDMA, and filter commands appropriately. It should filter
4114 * channel management and SELECT by DF name commands.
4115 *
4116 * "data" is a const RIL_SIM_APDU *
4117 * "sessionid" field should be ignored.
4118 *
4119 * "response" is a const RIL_SIM_IO_Response *
4120 *
4121 * Valid errors:
4122 * SUCCESS
4123 * RADIO_NOT_AVAILABLE
4124 * GENERIC_FAILURE
4125 */
4126#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
4127
4128/**
4129 * RIL_REQUEST_SIM_OPEN_CHANNEL
4130 *
4131 * Open a new logical channel and select the given application. This command
4132 * reflects TS 27.007 "open logical channel" operation (+CCHO).
4133 *
4134 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
4135 *
4136 * "response" is int *
4137 * ((int *)data)[0] contains the session id of the logical channel.
Shishir Agrawal760123f2014-10-14 09:14:57 -07004138 * ((int *)data)[1] onwards may optionally contain the select response for the
4139 * open channel command with one byte per integer.
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004140 *
4141 * Valid errors:
4142 * SUCCESS
4143 * RADIO_NOT_AVAILABLE
4144 * GENERIC_FAILURE
4145 * MISSING_RESOURCE
4146 * NO_SUCH_ELEMENT
4147 */
4148#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
4149
4150/**
4151 * RIL_REQUEST_SIM_CLOSE_CHANNEL
4152 *
4153 * Close a previously opened logical channel. This command reflects TS 27.007
4154 * "close logical channel" operation (+CCHC).
4155 *
4156 * "data" is int *
4157 * ((int *)data)[0] is the session id of logical the channel to close.
4158 *
4159 * "response" is NULL
4160 *
4161 * Valid errors:
4162 * SUCCESS
4163 * RADIO_NOT_AVAILABLE
4164 * GENERIC_FAILURE
4165 */
4166#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
4167
4168/**
4169 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
4170 *
4171 * Exchange APDUs with a UICC over a previously opened logical channel. This
4172 * command reflects TS 27.007 "generic logical channel access" operation
4173 * (+CGLA). The modem should filter channel management and SELECT by DF name
4174 * commands.
4175 *
4176 * "data" is a const RIL_SIM_APDU*
4177 *
4178 * "response" is a const RIL_SIM_IO_Response *
4179 *
4180 * Valid errors:
4181 * SUCCESS
4182 * RADIO_NOT_AVAILABLE
4183 * GENERIC_FAILURE
4184 */
4185#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
4186
Jake Hamby8a4a2332014-01-15 13:12:05 -08004187/**
4188 * RIL_REQUEST_NV_READ_ITEM
4189 *
4190 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4191 * This is used for device configuration by some CDMA operators.
4192 *
4193 * "data" is a const RIL_NV_ReadItem *
4194 *
4195 * "response" is const char * containing the contents of the NV item
4196 *
4197 * Valid errors:
4198 * SUCCESS
4199 * RADIO_NOT_AVAILABLE
4200 * GENERIC_FAILURE
4201 */
4202#define RIL_REQUEST_NV_READ_ITEM 118
4203
4204/**
4205 * RIL_REQUEST_NV_WRITE_ITEM
4206 *
4207 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
4208 * This is used for device configuration by some CDMA operators.
4209 *
4210 * "data" is a const RIL_NV_WriteItem *
4211 *
4212 * "response" is NULL
4213 *
4214 * Valid errors:
4215 * SUCCESS
4216 * RADIO_NOT_AVAILABLE
4217 * GENERIC_FAILURE
4218 */
4219#define RIL_REQUEST_NV_WRITE_ITEM 119
4220
4221/**
4222 * RIL_REQUEST_NV_WRITE_CDMA_PRL
4223 *
4224 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
4225 * This is used for device configuration by some CDMA operators.
4226 *
4227 * "data" is a const char * containing the PRL as a byte array
4228 *
4229 * "response" is NULL
4230 *
4231 * Valid errors:
4232 * SUCCESS
4233 * RADIO_NOT_AVAILABLE
4234 * GENERIC_FAILURE
4235 */
4236#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
4237
4238/**
4239 * RIL_REQUEST_NV_RESET_CONFIG
4240 *
4241 * Reset the radio NV configuration to the factory state.
4242 * This is used for device configuration by some CDMA operators.
4243 *
4244 * "data" is int *
Jake Hambyd27c9d52014-02-06 14:52:05 -08004245 * ((int *)data)[0] is 1 to reload all NV items
4246 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
4247 * ((int *)data)[0] is 3 for factory reset (RTN)
Jake Hamby8a4a2332014-01-15 13:12:05 -08004248 *
4249 * "response" is NULL
4250 *
4251 * Valid errors:
4252 * SUCCESS
4253 * RADIO_NOT_AVAILABLE
4254 * GENERIC_FAILURE
4255 */
4256#define RIL_REQUEST_NV_RESET_CONFIG 121
4257
Etan Cohend3652192014-06-20 08:28:44 -07004258 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
4259 * FIXME This API needs to have more documentation.
4260 *
4261 * Selection/de-selection of a subscription from a SIM card
4262 * "data" is const RIL_SelectUiccSub*
4263
4264 *
4265 * "response" is NULL
4266 *
4267 * Valid errors:
4268 * SUCCESS
4269 * RADIO_NOT_AVAILABLE (radio resetting)
4270 * GENERIC_FAILURE
4271 * SUBSCRIPTION_NOT_SUPPORTED
4272 *
4273 */
4274#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
4275
4276/**
4277 * RIL_REQUEST_ALLOW_DATA
4278 *
4279 * Tells the modem whether data calls are allowed or not
4280 *
4281 * "data" is int *
4282 * FIXME slotId and aid will be added.
4283 * ((int *)data)[0] is == 0 to allow data calls
4284 * ((int *)data)[0] is == 1 to disallow data calls
4285 *
4286 * "response" is NULL
4287 *
4288 * Valid errors:
4289 *
4290 * SUCCESS
4291 * RADIO_NOT_AVAILABLE (radio resetting)
4292 * GENERIC_FAILURE
4293 *
4294 */
4295#define RIL_REQUEST_ALLOW_DATA 123
4296
4297/**
4298 * RIL_REQUEST_GET_HARDWARE_CONFIG
4299 *
4300 * Request all of the current hardware (modem and sim) associated
4301 * with the RIL.
4302 *
4303 * "data" is NULL
4304 *
4305 * "response" is an array of RIL_HardwareConfig.
4306 */
4307#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
4308
4309/**
Amit Mahajan2b772032014-06-26 14:20:11 -07004310 * RIL_REQUEST_SIM_AUTHENTICATION
Etan Cohend3652192014-06-20 08:28:44 -07004311 *
4312 * Returns the response of SIM Authentication through RIL to a
4313 * challenge request.
4314 *
4315 * "data" Base64 encoded string containing challenge:
4316 * int authContext; P2 value of authentication command, see P2 parameter in
4317 * 3GPP TS 31.102 7.1.2
4318 * char *authData; the challenge string in Base64 format, see 3GPP
4319 * TS 31.102 7.1.2
4320 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
4321 * NULL if no value
4322 *
4323 * "response" Base64 encoded strings containing response:
4324 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
4325 * int sw2;
4326 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
4327 */
Amit Mahajan2b772032014-06-26 14:20:11 -07004328#define RIL_REQUEST_SIM_AUTHENTICATION 125
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08004329
Wink Savillec29360a2014-07-13 05:17:28 -07004330/**
4331 * RIL_REQUEST_GET_DC_RT_INFO
4332 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004333 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07004334 * Requests the Data Connection Real Time Info
4335 *
4336 * "data" is NULL
4337 *
4338 * "response" is the most recent RIL_DcRtInfo
4339 *
4340 * Valid errors:
4341 * SUCCESS
4342 * RADIO_NOT_AVAILABLE
4343 * GENERIC_FAILURE
4344 *
4345 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
4346 */
4347#define RIL_REQUEST_GET_DC_RT_INFO 126
4348
4349/**
4350 * RIL_REQUEST_SET_DC_RT_INFO_RATE
4351 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004352 * The request is DEPRECATED
Wink Savillec29360a2014-07-13 05:17:28 -07004353 * This is the minimum number of milliseconds between successive
4354 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
4355 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
4356 * 0 means send as fast as possible.
4357 *
4358 * "data" The number of milliseconds as an int
4359 *
4360 * "response" is null
4361 *
4362 * Valid errors:
4363 * SUCCESS must not fail
4364 */
4365#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
4366
Amit Mahajanc796e222014-08-13 16:54:01 +00004367/**
4368 * RIL_REQUEST_SET_DATA_PROFILE
4369 *
4370 * Set data profile in modem
Hui Wang8d679622014-10-16 14:59:27 -05004371 * Modem should erase existed profiles from framework, and apply new profiles
Amit Mahajanc796e222014-08-13 16:54:01 +00004372 * "data" is an const RIL_DataProfileInfo **
4373 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
4374 * "response" is NULL
4375 *
4376 * Valid errors:
4377 * SUCCESS
4378 * RADIO_NOT_AVAILABLE (radio resetting)
4379 * GENERIC_FAILURE
4380 * SUBSCRIPTION_NOT_AVAILABLE
4381 */
4382#define RIL_REQUEST_SET_DATA_PROFILE 128
Naveen Kallaa65a16a2014-07-31 16:48:31 -07004383
4384/**
4385 * RIL_REQUEST_SHUTDOWN
4386 *
4387 * Device is shutting down. All further commands are ignored
4388 * and RADIO_NOT_AVAILABLE must be returned.
4389 *
4390 * "data" is null
4391 * "response" is NULL
4392 *
4393 * Valid errors:
4394 * SUCCESS
4395 * RADIO_NOT_AVAILABLE
4396 * GENERIC_FAILURE
4397 */
4398#define RIL_REQUEST_SHUTDOWN 129
4399
Wink Saville8b4e4f72014-10-17 15:01:45 -07004400/**
4401 * RIL_REQUEST_GET_RADIO_CAPABILITY
4402 *
4403 * Used to get phone radio capablility.
4404 *
Abhishek Adappa772c0d22015-02-09 11:11:12 -08004405 * "data" is the RIL_RadioCapability structure
Wink Saville8b4e4f72014-10-17 15:01:45 -07004406 *
4407 * Valid errors:
4408 * SUCCESS
4409 * RADIO_NOT_AVAILABLE
4410 * GENERIC_FAILURE
4411 */
4412#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
4413
4414/**
4415 * RIL_REQUEST_SET_RADIO_CAPABILITY
4416 *
4417 * Used to set the phones radio capability. Be VERY careful
4418 * using this request as it may cause some vendor modems to reset. Because
4419 * of the possible modem reset any RIL commands after this one may not be
4420 * processed.
4421 *
4422 * "data" is the RIL_RadioCapability structure
4423 *
4424 * "response" is the RIL_RadioCapability structure, used to feedback return status
4425 *
4426 * Valid errors:
4427 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
4428 * RADIO_NOT_AVAILABLE
4429 * GENERIC_FAILURE
4430 */
4431#define RIL_REQUEST_SET_RADIO_CAPABILITY 131
4432
fengluf7408292015-04-14 14:53:55 -07004433/**
4434 * RIL_REQUEST_START_LCE
4435 *
4436 * Start Link Capacity Estimate (LCE) service if supported by the radio.
4437 *
4438 * "data" is const int *
4439 * ((const int*)data)[0] specifies the desired reporting interval (ms).
fenglu290add32015-05-01 17:05:15 -07004440 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
fengluf7408292015-04-14 14:53:55 -07004441 *
fenglu290add32015-05-01 17:05:15 -07004442 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07004443 *
4444 * Valid errors:
4445 * SUCCESS
4446 * RADIO_NOT_AVAILABLE
4447 * LCE_NOT_SUPPORTED
4448 */
4449#define RIL_REQUEST_START_LCE 132
4450
4451/**
4452 * RIL_REQUEST_STOP_LCE
4453 *
4454 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
4455 * idempotent for the radio modem.
4456 *
fenglu290add32015-05-01 17:05:15 -07004457 * "response" is the RIL_LceStatusInfo.
fengluf7408292015-04-14 14:53:55 -07004458 *
4459 * Valid errors:
4460 * SUCCESS
4461 * RADIO_NOT_AVAILABLE
4462 * LCE_NOT_SUPPORTED
4463 */
4464#define RIL_REQUEST_STOP_LCE 133
4465
4466/**
4467 * RIL_REQUEST_PULL_LCEDATA
4468 *
4469 * Pull LCE service for capacity information.
4470 *
fenglu290add32015-05-01 17:05:15 -07004471 * "response" is the RIL_LceDataInfo.
fengluf7408292015-04-14 14:53:55 -07004472 *
4473 * Valid errors:
4474 * SUCCESS
4475 * RADIO_NOT_AVAILABLE
4476 * LCE_NOT_SUPPORTED
4477 */
4478#define RIL_REQUEST_PULL_LCEDATA 134
4479
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07004480/**
4481 * RIL_REQUEST_GET_ACTIVITY_INFO
4482 *
4483 * Get modem activity statisitics info.
4484 *
4485 * There can be multiple RIL_REQUEST_GET_ACTIVITY_INFO calls to modem.
4486 * Once the response for the request is sent modem will clear
4487 * current statistics information.
4488 *
4489 * "data" is null
4490 * "response" is const RIL_ActivityStatsInfo *
4491 *
4492 * Valid errors:
4493 *
4494 * SUCCESS
4495 * RADIO_NOT_AVAILABLE (radio resetting)
4496 * GENERIC_FAILURE
4497 */
4498#define RIL_REQUEST_GET_ACTIVITY_INFO 135
Naveen Kallaa65a16a2014-07-31 16:48:31 -07004499
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004500/***********************************************************************/
4501
Wink Savillef4c4d362009-04-02 01:37:03 -07004502
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004503#define RIL_UNSOL_RESPONSE_BASE 1000
4504
4505/**
4506 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
4507 *
4508 * Indicate when value of RIL_RadioState has changed.
4509 *
4510 * Callee will invoke RIL_RadioStateRequest method on main thread
4511 *
4512 * "data" is NULL
4513 */
4514
4515#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
4516
4517
4518/**
4519 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
4520 *
4521 * Indicate when call state has changed
4522 *
4523 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
4524 *
4525 * "data" is NULL
4526 *
Wink Saville7f856802009-06-09 10:23:37 -07004527 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004528 * "RING", "BUSY", "NO CARRIER", and also call state
4529 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
4530 *
4531 * Redundent or extraneous invocations are tolerated
4532 */
4533#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
4534
4535
4536/**
Wink Savillec0114b32011-02-18 10:14:07 -08004537 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004538 *
Wink Savillec0114b32011-02-18 10:14:07 -08004539 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004540 *
4541 * Callee will invoke the following requests on main thread:
4542 *
Wink Savillec0114b32011-02-18 10:14:07 -08004543 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004544 * RIL_REQUEST_OPERATOR
4545 *
4546 * "data" is NULL
4547 *
4548 * FIXME should this happen when SIM records are loaded? (eg, for
4549 * EONS)
4550 */
Wink Savillec0114b32011-02-18 10:14:07 -08004551#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004552
4553/**
4554 * RIL_UNSOL_RESPONSE_NEW_SMS
4555 *
4556 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07004557 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004558 * "data" is const char *
4559 * This is a pointer to a string containing the PDU of an SMS-DELIVER
4560 * as an ascii string of hex digits. The PDU starts with the SMSC address
4561 * per TS 27.005 (+CMT:)
4562 *
4563 * Callee will subsequently confirm the receipt of thei SMS with a
4564 * RIL_REQUEST_SMS_ACKNOWLEDGE
4565 *
Wink Saville7f856802009-06-09 10:23:37 -07004566 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004567 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
4568 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
4569 */
4570
4571#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
4572
4573/**
4574 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
4575 *
4576 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07004577 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004578 * "data" is const char *
4579 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
4580 * as an ascii string of hex digits. The PDU starts with the SMSC address
4581 * per TS 27.005 (+CDS:).
4582 *
4583 * Callee will subsequently confirm the receipt of the SMS with a
4584 * RIL_REQUEST_SMS_ACKNOWLEDGE
4585 *
Wink Saville7f856802009-06-09 10:23:37 -07004586 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004587 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
4588 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
4589 */
4590
4591#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
4592
4593/**
4594 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
4595 *
4596 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07004597 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004598 * "data" is const int *
4599 * ((const int *)data)[0] contains the slot index on the SIM that contains
4600 * the new message
4601 */
4602
4603#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
4604
4605/**
4606 * RIL_UNSOL_ON_USSD
4607 *
4608 * Called when a new USSD message is received.
4609 *
4610 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07004611 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004612 * one of these string values:
4613 * "0" USSD-Notify -- text in ((const char **)data)[1]
4614 * "1" USSD-Request -- text in ((const char **)data)[1]
4615 * "2" Session terminated by network
4616 * "3" other local client (eg, SIM Toolkit) has responded
4617 * "4" Operation not supported
4618 * "5" Network timeout
4619 *
4620 * The USSD session is assumed to persist if the type code is "1", otherwise
4621 * the current session (if any) is assumed to have terminated.
4622 *
4623 * ((const char **)data)[1] points to a message string if applicable, which
4624 * should always be in UTF-8.
4625 */
4626#define RIL_UNSOL_ON_USSD 1006
4627/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
4628
4629/**
4630 * RIL_UNSOL_ON_USSD_REQUEST
4631 *
4632 * Obsolete. Send via RIL_UNSOL_ON_USSD
4633 */
Wink Saville7f856802009-06-09 10:23:37 -07004634#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004635
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004636/**
4637 * RIL_UNSOL_NITZ_TIME_RECEIVED
4638 *
4639 * Called when radio has received a NITZ time message
4640 *
4641 * "data" is const char * pointing to NITZ time string
4642 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
4643 */
4644#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
4645
4646/**
4647 * RIL_UNSOL_SIGNAL_STRENGTH
4648 *
4649 * Radio may report signal strength rather han have it polled.
4650 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004651 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004652 */
4653#define RIL_UNSOL_SIGNAL_STRENGTH 1009
4654
4655
4656/**
Wink Savillef4c4d362009-04-02 01:37:03 -07004657 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004658 *
Wink Savillec0114b32011-02-18 10:14:07 -08004659 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07004660 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
4661 * of current data contexts including new contexts that have been
4662 * activated. A data call is only removed from this list when the
4663 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
4664 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004665 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004666 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004667 */
4668
Wink Savillef4c4d362009-04-02 01:37:03 -07004669#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004670
4671/**
4672 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
4673 *
4674 * Reports supplementary service related notification from the network.
4675 *
4676 * "data" is a const RIL_SuppSvcNotification *
4677 *
4678 */
4679
4680#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
4681
4682/**
4683 * RIL_UNSOL_STK_SESSION_END
4684 *
4685 * Indicate when STK session is terminated by SIM.
4686 *
4687 * "data" is NULL
4688 */
4689#define RIL_UNSOL_STK_SESSION_END 1012
4690
4691/**
4692 * RIL_UNSOL_STK_PROACTIVE_COMMAND
4693 *
4694 * Indicate when SIM issue a STK proactive command to applications
4695 *
4696 * "data" is a const char * containing SAT/USAT proactive command
4697 * in hexadecimal format string starting with command tag
4698 *
4699 */
4700#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
4701
4702/**
4703 * RIL_UNSOL_STK_EVENT_NOTIFY
4704 *
4705 * Indicate when SIM notifies applcations some event happens.
4706 * Generally, application does not need to have any feedback to
4707 * SIM but shall be able to indicate appropriate messages to users.
4708 *
4709 * "data" is a const char * containing SAT/USAT commands or responses
4710 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
4711 * starting with first byte of response data or command tag
4712 *
4713 */
4714#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
4715
4716/**
4717 * RIL_UNSOL_STK_CALL_SETUP
4718 *
4719 * Indicate when SIM wants application to setup a voice call.
4720 *
4721 * "data" is const int *
4722 * ((const int *)data)[0] contains timeout value (in milliseconds)
4723 */
4724#define RIL_UNSOL_STK_CALL_SETUP 1015
4725
4726/**
4727 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
4728 *
4729 * Indicates that SMS storage on the SIM is full. Sent when the network
4730 * attempts to deliver a new SMS message. Messages cannot be saved on the
4731 * SIM until space is freed. In particular, incoming Class 2 messages
4732 * cannot be stored.
4733 *
4734 * "data" is null
4735 *
4736 */
4737#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
4738
4739/**
4740 * RIL_UNSOL_SIM_REFRESH
4741 *
4742 * Indicates that file(s) on the SIM have been updated, or the SIM
4743 * has been reinitialized.
4744 *
Alex Yakavenka45e740e2012-01-31 11:48:27 -08004745 * In the case where RIL is version 6 or older:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004746 * "data" is an int *
4747 * ((int *)data)[0] is a RIL_SimRefreshResult.
4748 * ((int *)data)[1] is the EFID of the updated file if the result is
Alex Yakavenka45e740e2012-01-31 11:48:27 -08004749 * SIM_FILE_UPDATE or NULL for any other result.
4750 *
4751 * In the case where RIL is version 7:
4752 * "data" is a RIL_SimRefreshResponse_v7 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004753 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004754 * Note: If the SIM state changes as a result of the SIM refresh (eg,
4755 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004756 * should be sent.
4757 */
4758#define RIL_UNSOL_SIM_REFRESH 1017
4759
4760/**
4761 * RIL_UNSOL_CALL_RING
4762 *
4763 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07004764 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
4765 * of a call and sending multiple is optional. If the system property
4766 * ro.telephony.call_ring.multiple is false then the upper layers
4767 * will generate the multiple events internally. Otherwise the vendor
4768 * ril must generate multiple RIL_UNSOL_CALL_RING if
4769 * ro.telephony.call_ring.multiple is true or if it is absent.
4770 *
4771 * The rate of these events is controlled by ro.telephony.call_ring.delay
4772 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004773 *
Wink Saville3d54e742009-05-18 18:00:44 -07004774 * "data" is null for GSM
4775 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004776 */
4777#define RIL_UNSOL_CALL_RING 1018
4778
The Android Open Source Project34a51082009-03-05 14:34:37 -08004779/**
4780 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
4781 *
4782 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07004783 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004784 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07004785
The Android Open Source Project34a51082009-03-05 14:34:37 -08004786 * "data" is null
4787 */
4788#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
4789
4790/**
4791 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4792 *
4793 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07004794 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004795 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07004796 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004797 * Callee will subsequently confirm the receipt of the SMS with
4798 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07004799 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004800 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
4801 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07004802 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004803 */
4804#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
4805
4806/**
4807 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
4808 *
4809 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07004810 *
Henrik Hall0eba2022010-11-25 10:20:56 +01004811 * "data" can be one of the following:
4812 * If received from GSM network, "data" is const char of 88 bytes
4813 * which indicates each page of a CBS Message sent to the MS by the
4814 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
4815 * If received from UMTS network, "data" is const char of 90 up to 1252
4816 * bytes which contain between 1 and 15 CBS Message pages sent as one
4817 * 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 -07004818 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004819 */
4820#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07004821
The Android Open Source Project34a51082009-03-05 14:34:37 -08004822/**
4823 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
4824 *
4825 * Indicates that SMS storage on the RUIM is full. Messages
4826 * cannot be saved on the RUIM until space is freed.
4827 *
4828 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07004829 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004830 */
Wink Savillef4c4d362009-04-02 01:37:03 -07004831#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
4832
The Android Open Source Project34a51082009-03-05 14:34:37 -08004833/**
4834 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
4835 *
4836 * Indicates a restricted state change (eg, for Domain Specific Access Control).
4837 *
4838 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
4839 *
4840 * "data" is an int *
4841 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
4842 */
4843#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
4844
Wink Saville1b5fd232009-04-22 14:50:00 -07004845/**
4846 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
4847 *
4848 * Indicates that the radio system selection module has
4849 * autonomously entered emergency callback mode.
4850 *
4851 * "data" is null
4852 *
4853 */
4854#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08004855
Wink Saville1b5fd232009-04-22 14:50:00 -07004856/**
4857 * RIL_UNSOL_CDMA_CALL_WAITING
4858 *
4859 * Called when CDMA radio receives a call waiting indication.
4860 *
4861 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07004862 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004863 */
4864#define RIL_UNSOL_CDMA_CALL_WAITING 1025
4865
4866/**
4867 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
4868 *
4869 * Called when CDMA radio receives an update of the progress of an
4870 * OTASP/OTAPA call.
4871 *
4872 * "data" is const int *
4873 * For CDMA this is an integer OTASP/OTAPA status listed in
4874 * RIL_CDMA_OTA_ProvisionStatus.
4875 *
4876 */
4877#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
4878
4879/**
4880 * RIL_UNSOL_CDMA_INFO_REC
4881 *
4882 * Called when CDMA radio receives one or more info recs.
4883 *
4884 * "data" is const RIL_CDMA_InformationRecords *
4885 *
4886 */
4887#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08004888
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07004889/**
4890 * RIL_UNSOL_OEM_HOOK_RAW
4891 *
4892 * This is for OEM specific use.
4893 *
4894 * "data" is a byte[]
4895 */
4896#define RIL_UNSOL_OEM_HOOK_RAW 1028
4897
John Wang5d621da2009-09-18 17:17:48 -07004898/**
4899 * RIL_UNSOL_RINGBACK_TONE
4900 *
4901 * Indicates that nework doesn't have in-band information, need to
4902 * play out-band tone.
4903 *
4904 * "data" is an int *
4905 * ((int *)data)[0] == 0 for stop play ringback tone.
4906 * ((int *)data)[0] == 1 for start play ringback tone.
4907 */
4908#define RIL_UNSOL_RINGBACK_TONE 1029
4909
John Wang5909cf82010-01-29 00:18:54 -08004910/**
4911 * RIL_UNSOL_RESEND_INCALL_MUTE
4912 *
4913 * Indicates that framework/application need reset the uplink mute state.
4914 *
4915 * There may be situations where the mute state becomes out of sync
4916 * between the application and device in some GSM infrastructures.
4917 *
4918 * "data" is null
4919 */
4920#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08004921
4922/**
4923 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
4924 *
4925 * Called when CDMA subscription source changed.
4926 *
4927 * "data" is int *
4928 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4929 */
Wink Saville29487ef2011-04-15 09:15:31 -07004930#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08004931
4932/**
4933 * RIL_UNSOL_CDMA_PRL_CHANGED
4934 *
4935 * Called when PRL (preferred roaming list) changes.
4936 *
4937 * "data" is int *
4938 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
4939 */
4940#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
4941
4942/**
4943 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
4944 *
4945 * Called when Emergency Callback Mode Ends
4946 *
4947 * Indicates that the radio system selection module has
4948 * proactively exited emergency callback mode.
4949 *
4950 * "data" is NULL
4951 *
4952 */
4953#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
4954
Wink Saville5b9df332011-04-06 16:24:21 -07004955/**
4956 * RIL_UNSOL_RIL_CONNECTED
4957 *
4958 * Called the ril connects and returns the version
4959 *
4960 * "data" is int *
4961 * ((int *)data)[0] is RIL_VERSION
4962 */
4963#define RIL_UNSOL_RIL_CONNECTED 1034
4964
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004965/**
4966 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
4967 *
4968 * Indicates that voice technology has changed. Contains new radio technology
4969 * as a data in the message.
4970 *
4971 * "data" is int *
4972 * ((int *)data)[0] is of type const RIL_RadioTechnology
4973 *
4974 */
4975#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
4976
Wink Saville8a9e0212013-04-09 12:11:38 -07004977/**
4978 * RIL_UNSOL_CELL_INFO_LIST
4979 *
4980 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
4981 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
4982 *
4983 * "data" is NULL
4984 *
4985 * "response" is an array of RIL_CellInfo.
4986 */
4987#define RIL_UNSOL_CELL_INFO_LIST 1036
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004988
Wink Saville865ce3b2013-11-08 16:37:01 -08004989/**
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004990 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
4991 *
4992 * Called when IMS registration state has changed
4993 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004994 * To get IMS registration state and IMS SMS format, callee needs to invoke the
4995 * following request on main thread:
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004996 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004997 * RIL_REQUEST_IMS_REGISTRATION_STATE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004998 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004999 * "data" is NULL
5000 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07005001 */
5002#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
5003
Etan Cohend3652192014-06-20 08:28:44 -07005004/**
5005 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
5006 *
5007 * Indicated when there is a change in subscription status.
5008 * This event will be sent in the following scenarios
5009 * - subscription readiness at modem, which was selected by telephony layer
5010 * - when subscription is deactivated by modem due to UICC card removal
5011 * - When network invalidates the subscription i.e. attach reject due to authentication reject
5012 *
5013 * "data" is const int *
5014 * ((const int *)data)[0] == 0 for Subscription Deactivated
5015 * ((const int *)data)[0] == 1 for Subscription Activated
5016 *
5017 */
5018#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
5019
5020/**
5021 * RIL_UNSOL_SRVCC_STATE_NOTIFY
5022 *
5023 * Called when Single Radio Voice Call Continuity(SRVCC)
5024 * progress state has changed
5025 *
5026 * "data" is int *
5027 * ((int *)data)[0] is of type const RIL_SrvccState
5028 *
5029 */
5030
5031#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
5032
5033/**
5034 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
5035 *
5036 * Called when the hardware configuration associated with the RILd changes
5037 *
5038 * "data" is an array of RIL_HardwareConfig
5039 *
5040 */
5041#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
5042
Wink Savillec29360a2014-07-13 05:17:28 -07005043/**
5044 * RIL_UNSOL_DC_RT_INFO_CHANGED
5045 *
Sooraj Sasindran73f2ccb2015-04-08 17:23:07 -07005046 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
Wink Savillec29360a2014-07-13 05:17:28 -07005047 * Sent when the DC_RT_STATE changes but the time
5048 * between these messages must not be less than the
5049 * value set by RIL_REQUEST_SET_DC_RT_RATE.
5050 *
5051 * "data" is the most recent RIL_DcRtInfo
5052 *
5053 */
5054#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
5055
Wink Saville8b4e4f72014-10-17 15:01:45 -07005056/**
5057 * RIL_UNSOL_RADIO_CAPABILITY
5058 *
5059 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
5060 * Returns the phone radio capability exactly as
5061 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
5062 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
5063 *
5064 * "data" is the RIL_RadioCapability structure
5065 */
5066#define RIL_UNSOL_RADIO_CAPABILITY 1042
5067
Amit Mahajan54563d32014-11-22 00:54:49 +00005068/*
5069 * RIL_UNSOL_ON_SS
5070 *
5071 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
5072 * call control.
5073 *
5074 * "data" is const RIL_StkCcUnsolSsResponse *
5075 *
5076 */
5077#define RIL_UNSOL_ON_SS 1043
5078
5079/**
5080 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
5081 *
5082 * Called when there is an ALPHA from UICC during Call Control.
5083 *
5084 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
5085 *
5086 */
5087#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
5088
fengluf7408292015-04-14 14:53:55 -07005089/**
5090 * RIL_UNSOL_LCEDATA_RECV
5091 *
5092 * Called when there is an incoming Link Capacity Estimate (LCE) info report.
5093 *
fenglu290add32015-05-01 17:05:15 -07005094 * "data" is the RIL_LceDataInfo structure.
fengluf7408292015-04-14 14:53:55 -07005095 *
5096 */
5097#define RIL_UNSOL_LCEDATA_RECV 1045
5098
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005099/***********************************************************************/
5100
Amit Mahajan54563d32014-11-22 00:54:49 +00005101
Etan Cohend3652192014-06-20 08:28:44 -07005102#if defined(ANDROID_MULTI_SIM)
5103/**
5104 * RIL_Request Function pointer
5105 *
5106 * @param request is one of RIL_REQUEST_*
5107 * @param data is pointer to data defined for that RIL_REQUEST_*
5108 * data is owned by caller, and should not be modified or freed by callee
5109 * @param t should be used in subsequent call to RIL_onResponse
5110 * @param datalen the length of data
5111 *
5112 */
5113typedef void (*RIL_RequestFunc) (int request, void *data,
5114 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
5115
5116/**
5117 * This function should return the current radio state synchronously
5118 */
5119typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
5120
5121#else
5122/* Backward compatible */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005123
5124/**
5125 * RIL_Request Function pointer
5126 *
5127 * @param request is one of RIL_REQUEST_*
5128 * @param data is pointer to data defined for that RIL_REQUEST_*
5129 * data is owned by caller, and should not be modified or freed by callee
5130 * @param t should be used in subsequent call to RIL_onResponse
5131 * @param datalen the length of data
5132 *
5133 */
Wink Saville7f856802009-06-09 10:23:37 -07005134typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005135 size_t datalen, RIL_Token t);
5136
5137/**
5138 * This function should return the current radio state synchronously
5139 */
5140typedef RIL_RadioState (*RIL_RadioStateRequest)();
5141
Etan Cohend3652192014-06-20 08:28:44 -07005142#endif
5143
5144
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005145/**
5146 * This function returns "1" if the specified RIL_REQUEST code is
5147 * supported and 0 if it is not
5148 *
5149 * @param requestCode is one of RIL_REQUEST codes
5150 */
5151
5152typedef int (*RIL_Supports)(int requestCode);
5153
5154/**
Wink Saville7f856802009-06-09 10:23:37 -07005155 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005156 * thread that calls RIL_RequestFunc--and indicates that a pending
5157 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07005158 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005159 * On cancel, the callee should do its best to abandon the request and
5160 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
5161 *
5162 * Subsequent calls to RIL_onRequestComplete for this request with
5163 * other results will be tolerated but ignored. (That is, it is valid
5164 * to ignore the cancellation request)
5165 *
5166 * RIL_Cancel calls should return immediately, and not wait for cancellation
5167 *
Wink Saville7f856802009-06-09 10:23:37 -07005168 * 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 -08005169 * interface
5170 *
5171 * @param t token wants to be canceled
5172 */
5173
5174typedef void (*RIL_Cancel)(RIL_Token t);
5175
5176typedef void (*RIL_TimedCallback) (void *param);
5177
5178/**
5179 * Return a version string for your RIL implementation
5180 */
5181typedef const char * (*RIL_GetVersion) (void);
5182
5183typedef struct {
5184 int version; /* set to RIL_VERSION */
5185 RIL_RequestFunc onRequest;
5186 RIL_RadioStateRequest onStateRequest;
5187 RIL_Supports supports;
5188 RIL_Cancel onCancel;
5189 RIL_GetVersion getVersion;
5190} RIL_RadioFunctions;
5191
Sungmin Choi75697532013-04-26 15:04:45 -07005192typedef struct {
5193 char *apn;
5194 char *protocol;
5195 int authtype;
5196 char *username;
5197 char *password;
5198} RIL_InitialAttachApn;
5199
Amit Mahajan2b772032014-06-26 14:20:11 -07005200typedef struct {
5201 int authContext; /* P2 value of authentication command, see P2 parameter in
5202 3GPP TS 31.102 7.1.2 */
5203 char *authData; /* the challenge string in Base64 format, see 3GPP
5204 TS 31.102 7.1.2 */
5205 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
5206 NULL if no value. */
5207} RIL_SimAuthentication;
5208
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005209#ifdef RIL_SHLIB
5210struct RIL_Env {
5211 /**
5212 * "t" is parameter passed in on previous call to RIL_Notification
5213 * routine.
5214 *
5215 * If "e" != SUCCESS, then response can be null/is ignored
5216 *
Wink Saville7f856802009-06-09 10:23:37 -07005217 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005218 * freed by callee
5219 *
5220 * RIL_onRequestComplete will return as soon as possible
5221 */
Wink Saville7f856802009-06-09 10:23:37 -07005222 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005223 void *response, size_t responselen);
5224
Etan Cohend3652192014-06-20 08:28:44 -07005225#if defined(ANDROID_MULTI_SIM)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005226 /**
5227 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5228 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5229 *
5230 * "data" is owned by caller, and should not be modified or freed by callee
5231 */
Etan Cohend3652192014-06-20 08:28:44 -07005232 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
5233#else
5234 /**
5235 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
5236 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5237 *
5238 * "data" is owned by caller, and should not be modified or freed by callee
5239 */
5240 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
5241#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005242 /**
Wink Saville7f856802009-06-09 10:23:37 -07005243 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005244 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
5245 * a relative time value at which the callback is invoked. If relativeTime is
5246 * NULL or points to a 0-filled structure, the callback will be invoked as
5247 * soon as possible
5248 */
5249
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07005250 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07005251 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005252};
5253
5254
Wink Saville7f856802009-06-09 10:23:37 -07005255/**
5256 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005257 * argc and argv will be command line arguments intended for the RIL implementation
5258 * Return NULL on error
5259 *
5260 * @param env is environment point defined as RIL_Env
5261 * @param argc number of arguments
5262 * @param argv list fo arguments
5263 *
5264 */
5265const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
5266
5267#else /* RIL_SHLIB */
5268
5269/**
5270 * Call this once at startup to register notification routine
5271 *
5272 * @param callbacks user-specifed callback function
5273 */
5274void RIL_register (const RIL_RadioFunctions *callbacks);
5275
5276
5277/**
5278 *
5279 * RIL_onRequestComplete will return as soon as possible
5280 *
5281 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07005282 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005283 * @param e error code
5284 * if "e" != SUCCESS, then response can be null/is ignored
5285 * @param response is owned by caller, and should not be modified or
5286 * freed by callee
5287 * @param responselen the length of response in byte
5288 */
Wink Saville7f856802009-06-09 10:23:37 -07005289void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005290 void *response, size_t responselen);
5291
Etan Cohend3652192014-06-20 08:28:44 -07005292#if defined(ANDROID_MULTI_SIM)
5293/**
5294 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
5295 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5296 * "data" is owned by caller, and should not be modified or freed by callee
5297 * @param datalen the length of data in byte
5298 */
5299
5300void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
5301 size_t datalen, RIL_SOCKET_ID socket_id);
5302#else
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005303/**
5304 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
5305 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
5306 * "data" is owned by caller, and should not be modified or freed by callee
5307 * @param datalen the length of data in byte
5308 */
5309
Wink Saville7f856802009-06-09 10:23:37 -07005310void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005311 size_t datalen);
Etan Cohend3652192014-06-20 08:28:44 -07005312#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005313
5314/**
Wink Saville7f856802009-06-09 10:23:37 -07005315 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005316 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
5317 * a relative time value at which the callback is invoked. If relativeTime is
5318 * NULL or points to a 0-filled structure, the callback will be invoked as
5319 * soon as possible
5320 *
5321 * @param callback user-specifed callback function
5322 * @param param parameter list
5323 * @param relativeTime a relative time value at which the callback is invoked
5324 */
5325
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07005326void RIL_requestTimedCallback (RIL_TimedCallback callback,
5327 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08005328
5329
5330#endif /* RIL_SHLIB */
5331
5332#ifdef __cplusplus
5333}
5334#endif
5335
5336#endif /*ANDROID_RIL_H*/