blob: ccc40d95ddacccdb67d745d8a5596429b8fefaab [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
Shishir Agrawal2458d8d2013-11-27 14:53:05 -080049#define RIL_VERSION 10 /* 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 */
116 RIL_E_SS_MODIFIED_TO_SS = 27 /* SS request modified to different SS request */
117
118
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800119} RIL_Errno;
120
121typedef enum {
122 RIL_CALL_ACTIVE = 0,
123 RIL_CALL_HOLDING = 1,
124 RIL_CALL_DIALING = 2, /* MO call only */
125 RIL_CALL_ALERTING = 3, /* MO call only */
126 RIL_CALL_INCOMING = 4, /* MT call only */
127 RIL_CALL_WAITING = 5 /* MT call only */
128} RIL_CallState;
129
130typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -0700131 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
132 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800133 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
Wink Savillef4c4d362009-04-02 01:37:03 -0700134 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
Wink Saville7f856802009-06-09 10:23:37 -0700135 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -0700136 personalization locked, or SIM absent */
137 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
138 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
139 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
Wink Saville7f856802009-06-09 10:23:37 -0700140 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -0700141 personalization locked, or RUIM absent */
142 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800143 RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */
144 RADIO_STATE_ON = 10 /* Radio is on */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800145} RIL_RadioState;
146
Wink Saville43808972011-01-13 17:39:51 -0800147typedef enum {
148 RADIO_TECH_UNKNOWN = 0,
149 RADIO_TECH_GPRS = 1,
150 RADIO_TECH_EDGE = 2,
151 RADIO_TECH_UMTS = 3,
152 RADIO_TECH_IS95A = 4,
153 RADIO_TECH_IS95B = 5,
154 RADIO_TECH_1xRTT = 6,
155 RADIO_TECH_EVDO_0 = 7,
156 RADIO_TECH_EVDO_A = 8,
157 RADIO_TECH_HSDPA = 9,
158 RADIO_TECH_HSUPA = 10,
159 RADIO_TECH_HSPA = 11,
160 RADIO_TECH_EVDO_B = 12,
161 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800162 RADIO_TECH_LTE = 14,
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800163 RADIO_TECH_HSPAP = 15, // HSPA+
Etan Cohend3652192014-06-20 08:28:44 -0700164 RADIO_TECH_GSM = 16, // Only supports voice
165 RADIO_TECH_TD_SCDMA = 17
Wink Saville43808972011-01-13 17:39:51 -0800166} RIL_RadioTechnology;
167
Wink Saville8b4e4f72014-10-17 15:01:45 -0700168typedef enum {
169 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
170 RAF_GPRS = (1 << RADIO_TECH_GPRS),
171 RAF_EDGE = (1 << RADIO_TECH_EDGE),
172 RAF_UMTS = (1 << RADIO_TECH_UMTS),
173 RAF_IS95A = (1 << RADIO_TECH_IS95A),
174 RAF_IS95B = (1 << RADIO_TECH_IS95B),
175 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
176 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
177 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
178 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
179 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
180 RAF_HSPA = (1 << RADIO_TECH_HSPA),
181 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
182 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
183 RAF_LTE = (1 << RADIO_TECH_LTE),
184 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
185 RAF_GSM = (1 << RADIO_TECH_GSM),
186 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
187} RIL_RadioAccessFamily;
188
189typedef enum {
190 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
191 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
192 // forthcoming with these same parameters
193 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
194 // RIL_RadioCapability.status = 0, if any START's fail no
195 // APPLY will be sent
196 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
197 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
198 // occurs in any previous command the RIL_RadioAccessesFamily and
Legler Wu8caf06f2014-10-29 14:02:14 +0800199 // logicalModemUuid fields will be the prior configuration thus
Wink Saville8b4e4f72014-10-17 15:01:45 -0700200 // restoring the configuration to the previous value. An error
201 // returned by this command will generally be ignored or may
202 // cause that logical modem to be removed from service.
203} RadioCapabilityPhase;
204
205typedef enum {
206 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
207 // RC_PHASE_APPLY
208 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
209 // capability was success with RC_PHASE_FINISH
210 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
211 // capability is fail with RC_PHASE_FINISH.
212} RadioCapabilityStatus;
213
214#define RIL_RADIO_CAPABILITY_VERSION 1
215typedef struct {
Legler Wu8caf06f2014-10-29 14:02:14 +0800216 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
Wink Saville8b4e4f72014-10-17 15:01:45 -0700217 int session; // Unique session value defined by framework returned in all "responses/unsol"
218 int phase; // CONFIGURED, START, APPLY, FINISH
219 int rat; // RIL_RadioAccessFamily for the radio
220 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
221 int status; // Return status and an input parameter for RC_PHASE_FINISH
222} RIL_RadioCapability;
223
Wink Savillec0114b32011-02-18 10:14:07 -0800224// Do we want to split Data from Voice and the use
225// RIL_RadioTechnology for get/setPreferredVoice/Data ?
226typedef enum {
227 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
228 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
229 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
230 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
231 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
232 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
233 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
234 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
235 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
236 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
237 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
Uma Maheswari Ramalingam0e094872011-09-28 13:25:48 -0700238 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
239 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
Wink Savillec0114b32011-02-18 10:14:07 -0800240} RIL_PreferredNetworkType;
241
242/* Source for cdma subscription */
243typedef enum {
244 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
245 CDMA_SUBSCRIPTION_SOURCE_NV = 1
246} RIL_CdmaSubscriptionSource;
247
Wink Saville74fa3882009-12-22 15:35:41 -0800248/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
249typedef enum {
250 RIL_UUS_TYPE1_IMPLICIT = 0,
251 RIL_UUS_TYPE1_REQUIRED = 1,
252 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
253 RIL_UUS_TYPE2_REQUIRED = 3,
254 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
255 RIL_UUS_TYPE3_REQUIRED = 5,
256 RIL_UUS_TYPE3_NOT_REQUIRED = 6
257} RIL_UUS_Type;
258
259/* User-to-User Signaling Information data coding schemes. Possible values for
260 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
261 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
262typedef enum {
263 RIL_UUS_DCS_USP = 0, /* User specified protocol */
264 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
265 RIL_UUS_DCS_X244 = 2, /* X.244 */
266 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
267 convergence function */
268 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
269} RIL_UUS_DCS;
270
271/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
272 * This data is passed in RIL_ExtensionRecord and rec contains this
273 * structure when type is RIL_UUS_INFO_EXT_REC */
274typedef struct {
275 RIL_UUS_Type uusType; /* UUS Type */
276 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
277 int uusLength; /* Length of UUS Data */
278 char * uusData; /* UUS Data */
279} RIL_UUS_Info;
280
281/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700282typedef struct {
283 char isPresent; /* non-zero if signal information record is present */
284 char signalType; /* as defined 3.7.5.5-1 */
285 char alertPitch; /* as defined 3.7.5.5-2 */
286 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
287} RIL_CDMA_SignalInfoRecord;
288
Wink Saville1b5fd232009-04-22 14:50:00 -0700289typedef struct {
290 RIL_CallState state;
291 int index; /* Connection Index for use with, eg, AT+CHLD */
292 int toa; /* type of address, eg 145 = intl */
293 char isMpty; /* nonzero if is mpty call */
294 char isMT; /* nonzero if call is mobile terminated */
295 char als; /* ALS line indicator if available
296 (0 = line 1) */
297 char isVoice; /* nonzero if this is is a voice call */
298 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
299 char * number; /* Remote party number */
300 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
301 char * name; /* Remote party name */
302 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800303 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800304} RIL_Call;
305
Wink Savillec0114b32011-02-18 10:14:07 -0800306/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800307typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800308 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700309 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700310 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
311 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800312 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800313 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
314} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800315
316/*
317 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
318 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
319 */
320typedef struct {
321 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500322 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
323 back-off timer value RIL wants to override the one
324 pre-configured in FW.
325 The unit is miliseconds.
326 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700327 The value 0 means retry should be done ASAP.
Wink Saville8a9e0212013-04-09 12:11:38 -0700328 The value of INT_MAX(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800329 int cid; /* Context ID, uniquely identifies this call */
330 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
331 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
332 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
333 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
334 such as "IP" or "IPV6" */
335 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800336 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
337 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800338 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800339 one of each. If the prefix length is absent the addresses
340 are assumed to be point to point with IPv4 having a prefix
341 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800342 char * dnses; /* A space-delimited list of DNS server addresses,
343 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
344 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800345 char * gateways; /* A space-delimited list of default gateway addresses,
346 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
347 May be empty in which case the addresses represent point
348 to point connections. */
349} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800350
Etan Cohend3652192014-06-20 08:28:44 -0700351typedef struct {
352 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
353 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
354 back-off timer value RIL wants to override the one
355 pre-configured in FW.
356 The unit is miliseconds.
357 The value < 0 means no value is suggested.
358 The value 0 means retry should be done ASAP.
359 The value of INT_MAX(0x7fffffff) means no retry. */
360 int cid; /* Context ID, uniquely identifies this call */
361 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
362 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
363 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
364 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
365 such as "IP" or "IPV6" */
366 char * ifname; /* The network interface name */
367 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
368 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
369 May not be empty, typically 1 IPv4 or 1 IPv6 or
370 one of each. If the prefix length is absent the addresses
371 are assumed to be point to point with IPv4 having a prefix
372 length of 32 and IPv6 128. */
373 char * dnses; /* A space-delimited list of DNS server addresses,
374 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
375 May be empty. */
376 char * gateways; /* A space-delimited list of default gateway addresses,
377 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
378 May be empty in which case the addresses represent point
379 to point connections. */
380 char * pcscf; /* the Proxy Call State Control Function address
381 via PCO(Protocol Configuration Option) for IMS client. */
382} RIL_Data_Call_Response_v9; // FIXME: Change to v10
383
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700384typedef enum {
385 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
386 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
387} RIL_RadioTechnologyFamily;
388
389typedef struct {
390 RIL_RadioTechnologyFamily tech;
391 unsigned char retry; /* 0 == not retry, nonzero == retry */
392 int messageRef; /* Valid field if retry is set to nonzero.
393 Contains messageRef from RIL_SMS_Response
394 corresponding to failed MO SMS.
395 */
396
397 union {
398 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
399 RIL_CDMA_SMS_Message* cdmaMessage;
400
401 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
402 char** gsmMessage;
403 } message;
404} RIL_IMS_SMS_Message;
405
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800406typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800407 int messageRef; /* TP-Message-Reference for GSM,
408 and BearerData MessageId for CDMA
409 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800410 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700411 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
412 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
413 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800414} RIL_SMS_Response;
415
416/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
417typedef struct {
418 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
419 /* 0 = "REC UNREAD" */
420 /* 1 = "REC READ" */
421 /* 2 = "STO UNSENT" */
422 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700423 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
424 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800425 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
426 (as expected by TS 27.005) or NULL for default SMSC */
427} RIL_SMS_WriteArgs;
428
429/** Used by RIL_REQUEST_DIAL */
430typedef struct {
431 char * address;
432 int clir;
433 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
434 * clir == 0 on "use subscription default value"
435 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
436 * clir == 2 on "CLIR suppression" (allow CLI presentation)
437 */
Wink Saville74fa3882009-12-22 15:35:41 -0800438 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800439} RIL_Dial;
440
441typedef struct {
442 int command; /* one of the commands listed for TS 27.007 +CRSM*/
443 int fileid; /* EF id */
444 char *path; /* "pathid" from TS 27.007 +CRSM command.
445 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700446 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800447 */
448 int p1;
449 int p2;
450 int p3;
451 char *data; /* May be NULL*/
452 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800453} RIL_SIM_IO_v5;
454
455typedef struct {
456 int command; /* one of the commands listed for TS 27.007 +CRSM*/
457 int fileid; /* EF id */
458 char *path; /* "pathid" from TS 27.007 +CRSM command.
459 Path is in hex asciii format eg "7f205f70"
460 Path must always be provided.
461 */
462 int p1;
463 int p2;
464 int p3;
465 char *data; /* May be NULL*/
466 char *pin2; /* May be NULL*/
467 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
468} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800469
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800470/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
471 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
472typedef struct {
473 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
474 ignored for +CSIM command. */
475
476 /* Following fields are used to derive the APDU ("command" and "length"
477 values in TS 27.007 +CSIM and +CGLA commands). */
478 int cla;
479 int instruction;
480 int p1;
481 int p2;
482 int p3; /* A negative P3 implies a 4 byte APDU. */
483 char *data; /* May be NULL. In hex string format. */
484} RIL_SIM_APDU;
485
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800486typedef struct {
487 int sw1;
488 int sw2;
Amit Mahajan2875bc22014-08-06 10:03:15 -0700489 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
490 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 -0800491} RIL_SIM_IO_Response;
492
493/* See also com.android.internal.telephony.gsm.CallForwardInfo */
494
495typedef struct {
496 int status; /*
497 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
498 * status 1 = active, 0 = not active
499 *
500 * For RIL_REQUEST_SET_CALL_FORWARD:
501 * status is:
502 * 0 = disable
503 * 1 = enable
504 * 2 = interrogate
505 * 3 = registeration
506 * 4 = erasure
507 */
508
Wink Saville3d54e742009-05-18 18:00:44 -0700509 int reason; /* from TS 27.007 7.11 "reason" */
510 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
511 See table for Android mapping from
512 MMI service code
513 0 means user doesn't input class */
514 int toa; /* "type" from TS 27.007 7.11 */
515 char * number; /* "number" from TS 27.007 7.11. May be NULL */
516 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800517}RIL_CallForwardInfo;
518
519typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700520 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
521 * Upper 16 bits is LAC and lower 16 bits
522 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800523 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700524 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700525 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800526 */
johnwange0ba6a92009-09-11 19:14:52 -0700527 int rssi; /* Received RSSI in GSM,
528 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800529 */
530} RIL_NeighboringCell;
531
532/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
533typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700534 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800535 CALL_FAIL_NORMAL = 16,
536 CALL_FAIL_BUSY = 17,
537 CALL_FAIL_CONGESTION = 34,
538 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
539 CALL_FAIL_CALL_BARRED = 240,
540 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700541 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
542 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Amit Mahajan54563d32014-11-22 00:54:49 +0000543 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
544 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
545 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
Wink Saville1b5fd232009-04-22 14:50:00 -0700546 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
547 CALL_FAIL_CDMA_DROP = 1001,
548 CALL_FAIL_CDMA_INTERCEPT = 1002,
549 CALL_FAIL_CDMA_REORDER = 1003,
550 CALL_FAIL_CDMA_SO_REJECT = 1004,
551 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
552 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
553 CALL_FAIL_CDMA_PREEMPTED = 1007,
554 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
555 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700556 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800557 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
558} RIL_LastCallFailCause;
559
Wink Savillef4c4d362009-04-02 01:37:03 -0700560/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800561typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800562 PDP_FAIL_NONE = 0, /* No error, connection ok */
563
564 /* an integer cause code defined in TS 24.008
565 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
566 If the implementation does not have access to the exact cause codes,
567 then it should return one of the following values,
568 as the UI layer needs to distinguish these
569 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700570 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
571 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
572 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
573 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
574 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
575 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
576 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
577 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
578 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
579 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800580 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
Hui Wang11e8b232014-09-19 16:40:17 -0500581 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
582 based on framework config */
Wink Saville43808972011-01-13 17:39:51 -0800583 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
584 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
585 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700586 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
Wink Saville43808972011-01-13 17:39:51 -0800587
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700588 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800589 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
590 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800591
592 /* reasons for data call drop - network/modem disconnect */
Wink Saville3492c6e2013-10-03 13:53:27 -0700593 PDP_FAIL_SIGNAL_LOST = -3,
Wink Saville43808972011-01-13 17:39:51 -0800594 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
595 with parameters appropriate for new technology */
596 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
597 powered off - no retry */
598 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
599 mode was up on same APN/data profile - no retry until
600 tethered call is off */
601
602 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */
603} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800604
jsh602f80f2009-07-10 15:44:37 -0700605/* See RIL_REQUEST_SETUP_DATA_CALL */
606typedef enum {
607 RIL_DATA_PROFILE_DEFAULT = 0,
608 RIL_DATA_PROFILE_TETHERED = 1,
Hui Wang8d679622014-10-16 14:59:27 -0500609 RIL_DATA_PROFILE_IMS = 2,
610 RIL_DATA_PROFILE_FOTA = 3,
611 RIL_DATA_PROFILE_CBS = 4,
612 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
613 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
jsh602f80f2009-07-10 15:44:37 -0700614} RIL_DataProfile;
615
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800616/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
617typedef struct {
618 int notificationType; /*
619 * 0 = MO intermediate result code
620 * 1 = MT unsolicited result code
621 */
622 int code; /* See 27.007 7.17
623 "code1" for MO
624 "code2" for MT. */
625 int index; /* CUG index. See 27.007 7.17. */
626 int type; /* "type" from 27.007 7.17 (MT only). */
627 char * number; /* "number" from 27.007 7.17
628 (MT only, may be NULL). */
629} RIL_SuppSvcNotification;
630
Wink Savillef4c4d362009-04-02 01:37:03 -0700631#define RIL_CARD_MAX_APPS 8
632
633typedef enum {
634 RIL_CARDSTATE_ABSENT = 0,
635 RIL_CARDSTATE_PRESENT = 1,
636 RIL_CARDSTATE_ERROR = 2
637} RIL_CardState;
638
639typedef enum {
640 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
641 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700642 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
643 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700644 involved */
645 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
646 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
647 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
648 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
649 RIL_PERSOSUBSTATE_SIM_SIM = 7,
650 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
651 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
652 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
653 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
654 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
655 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
656 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
657 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
658 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
659 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
660 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
661 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
662 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
663 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
664 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
665 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
666 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
667} RIL_PersoSubstate;
668
669typedef enum {
670 RIL_APPSTATE_UNKNOWN = 0,
671 RIL_APPSTATE_DETECTED = 1,
672 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
673 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700674 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700675 when app_state is assigned to this value */
676 RIL_APPSTATE_READY = 5
677} RIL_AppState;
678
679typedef enum {
680 RIL_PINSTATE_UNKNOWN = 0,
681 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
682 RIL_PINSTATE_ENABLED_VERIFIED = 2,
683 RIL_PINSTATE_DISABLED = 3,
684 RIL_PINSTATE_ENABLED_BLOCKED = 4,
685 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
686} RIL_PinState;
687
688typedef enum {
689 RIL_APPTYPE_UNKNOWN = 0,
690 RIL_APPTYPE_SIM = 1,
691 RIL_APPTYPE_USIM = 2,
692 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -0800693 RIL_APPTYPE_CSIM = 4,
694 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -0700695} RIL_AppType;
696
697typedef struct
698{
Wink Saville7f856802009-06-09 10:23:37 -0700699 RIL_AppType app_type;
700 RIL_AppState app_state;
701 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -0700702 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -0700703 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -0700704 0x30, 0x30, 0x30 */
705 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -0800706 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -0700707 RIL_PinState pin1;
708 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -0700709} RIL_AppStatus;
710
Wink Savillec0114b32011-02-18 10:14:07 -0800711/* Deprecated, use RIL_CardStatus_v6 */
712typedef struct
713{
714 RIL_CardState card_state;
715 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
716 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
717 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
718 int num_applications; /* value <= RIL_CARD_MAX_APPS */
719 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
720} RIL_CardStatus_v5;
721
Wink Savillef4c4d362009-04-02 01:37:03 -0700722typedef struct
723{
Wink Saville7f856802009-06-09 10:23:37 -0700724 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -0700725 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -0800726 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
727 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
728 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -0700729 int num_applications; /* value <= RIL_CARD_MAX_APPS */
730 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -0800731} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -0700732
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800733/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
734 * or as part of RIL_SimRefreshResponse_v7
735 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800736typedef enum {
737 /* A file on SIM has been updated. data[1] contains the EFID. */
738 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800739 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800740 SIM_INIT = 1,
741 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
742 SIM_RESET = 2
743} RIL_SimRefreshResult;
744
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800745typedef struct {
746 RIL_SimRefreshResult result;
747 int ef_id; /* is the EFID of the updated file if the result is */
748 /* SIM_FILE_UPDATE or 0 for any other result. */
749 char * aid; /* is AID(application ID) of the card application */
750 /* See ETSI 102.221 8.1 and 101.220 4 */
751 /* For SIM_FILE_UPDATE result it can be set to AID of */
752 /* application in which updated EF resides or it can be */
753 /* NULL if EF is outside of an application. */
754 /* For SIM_INIT result this field is set to AID of */
755 /* application that caused REFRESH */
756 /* For SIM_RESET result it is NULL. */
757} RIL_SimRefreshResponse_v7;
758
Wink Savillec0114b32011-02-18 10:14:07 -0800759/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
760typedef struct {
761 char * number; /* Remote party number */
762 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
763 char * name; /* Remote party name */
764 RIL_CDMA_SignalInfoRecord signalInfoRecord;
765} RIL_CDMA_CallWaiting_v5;
766
Wink Saville1b5fd232009-04-22 14:50:00 -0700767typedef struct {
768 char * number; /* Remote party number */
769 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
770 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -0700771 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -0800772 /* Number type/Number plan required to support International Call Waiting */
773 int number_type; /* 0=Unknown, 1=International, 2=National,
774 3=Network specific, 4=subscriber */
775 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
776} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -0700777
Wink Savillea592eeb2009-05-22 13:26:36 -0700778/**
779 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
780 *
781 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
782 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
783 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
784 * CBM message ID.
785 *
786 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
787 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
788 * and 9.4.4.2.3 for UMTS.
789 * All other values can be treated as empty CBM data coding scheme.
790 *
791 * selected 0 means message types specified in <fromServiceId, toServiceId>
792 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
793 *
794 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
795 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
796 */
Wink Savillef4c4d362009-04-02 01:37:03 -0700797typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -0700798 int fromServiceId;
799 int toServiceId;
800 int fromCodeScheme;
801 int toCodeScheme;
802 unsigned char selected;
803} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -0700804
The Android Open Source Project34a51082009-03-05 14:34:37 -0800805/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
806#define RIL_RESTRICTED_STATE_NONE 0x00
807/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
808#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
809/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
810#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -0700811/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -0800812#define RIL_RESTRICTED_STATE_CS_ALL 0x04
813/* Block packet data access due to restriction. */
814#define RIL_RESTRICTED_STATE_PS_ALL 0x10
815
Wink Saville1b5fd232009-04-22 14:50:00 -0700816/* The status for an OTASP/OTAPA session */
817typedef enum {
818 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
819 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
820 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
821 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
822 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
823 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
824 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
825 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
826 CDMA_OTA_PROVISION_STATUS_COMMITTED,
827 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
828 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
829 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
830} RIL_CDMA_OTA_ProvisionStatus;
831
832typedef struct {
833 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
834 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
835} RIL_GW_SignalStrength;
836
Wink Savillec57b3eb2013-04-17 12:51:41 -0700837typedef struct {
838 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
839 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
840} RIL_SignalStrengthWcdma;
Wink Saville1b5fd232009-04-22 14:50:00 -0700841
842typedef struct {
843 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
844 * multiplied by -1. Example: If the actual RSSI is -75, then this response
845 * value will be 75.
846 */
847 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
848 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
849 * will be 125.
850 */
851} RIL_CDMA_SignalStrength;
852
853
854typedef struct {
855 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
856 * multiplied by -1. Example: If the actual RSSI is -75, then this response
857 * value will be 75.
858 */
859 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
860 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
861 * will be 125.
862 */
863 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
864} RIL_EVDO_SignalStrength;
865
Wink Savillec0114b32011-02-18 10:14:07 -0800866typedef struct {
867 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -0700868 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
869 * Range: 44 to 140 dBm
870 * INT_MAX: 0x7FFFFFFF denotes invalid value.
871 * Reference: 3GPP TS 36.133 9.1.4 */
872 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
873 * Range: 20 to 3 dB.
874 * INT_MAX: 0x7FFFFFFF denotes invalid value.
875 * Reference: 3GPP TS 36.133 9.1.7 */
876 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
877 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
878 * INT_MAX : 0x7FFFFFFF denotes invalid value.
879 * Reference: 3GPP TS 36.101 8.1.1 */
880 int cqi; /* The current Channel Quality Indicator.
881 * Range: 0 to 15.
882 * INT_MAX : 0x7FFFFFFF denotes invalid value.
883 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -0800884} RIL_LTE_SignalStrength;
885
Wink Saville8a9e0212013-04-09 12:11:38 -0700886typedef struct {
887 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
888 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
889 * Range: 44 to 140 dBm
890 * INT_MAX: 0x7FFFFFFF denotes invalid value.
891 * Reference: 3GPP TS 36.133 9.1.4 */
892 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
893 * Range: 20 to 3 dB.
894 * INT_MAX: 0x7FFFFFFF denotes invalid value.
895 * Reference: 3GPP TS 36.133 9.1.7 */
896 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
897 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
898 * INT_MAX : 0x7FFFFFFF denotes invalid value.
899 * Reference: 3GPP TS 36.101 8.1.1 */
900 int cqi; /* The current Channel Quality Indicator.
901 * Range: 0 to 15.
902 * INT_MAX : 0x7FFFFFFF denotes invalid value.
903 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
904 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
905 * Approximate distance can be calculated using 300m/us * timingAdvance.
906 * Range: 0 to 0x7FFFFFFE
907 * INT_MAX : 0x7FFFFFFF denotes invalid value.
908 * Reference: 3GPP 36.321 section 6.1.3.5
909 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
910} RIL_LTE_SignalStrength_v8;
911
Etan Cohend3652192014-06-20 08:28:44 -0700912typedef struct {
913 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
914 * Range : 25 to 120
915 * INT_MAX: 0x7FFFFFFF denotes invalid value.
916 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
917} RIL_TD_SCDMA_SignalStrength;
918
Wink Savillec0114b32011-02-18 10:14:07 -0800919/* Deprecated, use RIL_SignalStrength_v6 */
920typedef struct {
921 RIL_GW_SignalStrength GW_SignalStrength;
922 RIL_CDMA_SignalStrength CDMA_SignalStrength;
923 RIL_EVDO_SignalStrength EVDO_SignalStrength;
924} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -0700925
926typedef struct {
927 RIL_GW_SignalStrength GW_SignalStrength;
928 RIL_CDMA_SignalStrength CDMA_SignalStrength;
929 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -0800930 RIL_LTE_SignalStrength LTE_SignalStrength;
931} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -0700932
Wink Saville8a9e0212013-04-09 12:11:38 -0700933typedef struct {
934 RIL_GW_SignalStrength GW_SignalStrength;
935 RIL_CDMA_SignalStrength CDMA_SignalStrength;
936 RIL_EVDO_SignalStrength EVDO_SignalStrength;
937 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
938} RIL_SignalStrength_v8;
939
Etan Cohend3652192014-06-20 08:28:44 -0700940typedef struct {
941 RIL_GW_SignalStrength GW_SignalStrength;
942 RIL_CDMA_SignalStrength CDMA_SignalStrength;
943 RIL_EVDO_SignalStrength EVDO_SignalStrength;
944 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
945 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
946} RIL_SignalStrength_v10;
947
Wink Saville8a9e0212013-04-09 12:11:38 -0700948/** RIL_CellIdentityGsm */
949typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -0700950 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
951 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
952 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
953 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 -0700954} RIL_CellIdentityGsm;
955
Wink Savillec57b3eb2013-04-17 12:51:41 -0700956/** RIL_CellIdentityWcdma */
957typedef struct {
958 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
959 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
960 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
961 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
962 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
963} RIL_CellIdentityWcdma;
964
Wink Saville8a9e0212013-04-09 12:11:38 -0700965/** RIL_CellIdentityCdma */
966typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -0700967 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
968 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
969 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -0700970 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
971 * It is represented in units of 0.25 seconds and ranges from -2592000
972 * to 2592000, both values inclusive (corresponding to a range of -180
Wink Savillec57b3eb2013-04-17 12:51:41 -0700973 * to +180 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -0700974
975 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
976 * It is represented in units of 0.25 seconds and ranges from -1296000
977 * to 1296000, both values inclusive (corresponding to a range of -90
Wink Savillec57b3eb2013-04-17 12:51:41 -0700978 * to +90 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -0700979} RIL_CellIdentityCdma;
980
981/** RIL_CellIdentityLte */
982typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -0700983 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
984 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
985 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
986 int pci; /* physical cell id 0..503, INT_MAX if unknown */
987 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -0700988} RIL_CellIdentityLte;
989
Etan Cohend3652192014-06-20 08:28:44 -0700990/** RIL_CellIdentityTdscdma */
991typedef struct {
992 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
993 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
994 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
995 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
996 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
997} RIL_CellIdentityTdscdma;
998
Wink Saville8a9e0212013-04-09 12:11:38 -0700999/** RIL_CellInfoGsm */
1000typedef struct {
1001 RIL_CellIdentityGsm cellIdentityGsm;
1002 RIL_GW_SignalStrength signalStrengthGsm;
1003} RIL_CellInfoGsm;
1004
Wink Savillec57b3eb2013-04-17 12:51:41 -07001005/** RIL_CellInfoWcdma */
1006typedef struct {
1007 RIL_CellIdentityWcdma cellIdentityWcdma;
1008 RIL_SignalStrengthWcdma signalStrengthWcdma;
1009} RIL_CellInfoWcdma;
1010
Wink Saville8a9e0212013-04-09 12:11:38 -07001011/** RIL_CellInfoCdma */
1012typedef struct {
1013 RIL_CellIdentityCdma cellIdentityCdma;
1014 RIL_CDMA_SignalStrength signalStrengthCdma;
1015 RIL_EVDO_SignalStrength signalStrengthEvdo;
1016} RIL_CellInfoCdma;
1017
1018/** RIL_CellInfoLte */
1019typedef struct {
1020 RIL_CellIdentityLte cellIdentityLte;
1021 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1022} RIL_CellInfoLte;
1023
Etan Cohend3652192014-06-20 08:28:44 -07001024/** RIL_CellInfoTdscdma */
1025typedef struct {
1026 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1027 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1028} RIL_CellInfoTdscdma;
1029
Wink Saville8a9e0212013-04-09 12:11:38 -07001030// Must be the same as CellInfo.TYPE_XXX
1031typedef enum {
1032 RIL_CELL_INFO_TYPE_GSM = 1,
1033 RIL_CELL_INFO_TYPE_CDMA = 2,
1034 RIL_CELL_INFO_TYPE_LTE = 3,
Wink Savillec57b3eb2013-04-17 12:51:41 -07001035 RIL_CELL_INFO_TYPE_WCDMA = 4,
Etan Cohend3652192014-06-20 08:28:44 -07001036 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
Wink Saville8a9e0212013-04-09 12:11:38 -07001037} RIL_CellInfoType;
1038
1039// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1040typedef enum {
1041 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1042 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1043 RIL_TIMESTAMP_TYPE_MODEM = 2,
1044 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1045 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1046} RIL_TimeStampType;
1047
1048typedef struct {
1049 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1050 int registered; /* !0 if this cell is registered 0 if not registered */
1051 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1052 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1053 union {
1054 RIL_CellInfoGsm gsm;
1055 RIL_CellInfoCdma cdma;
1056 RIL_CellInfoLte lte;
Wink Savillec57b3eb2013-04-17 12:51:41 -07001057 RIL_CellInfoWcdma wcdma;
Etan Cohend3652192014-06-20 08:28:44 -07001058 RIL_CellInfoTdscdma tdscdma;
Wink Saville8a9e0212013-04-09 12:11:38 -07001059 } CellInfo;
1060} RIL_CellInfo;
1061
Wink Saville1b5fd232009-04-22 14:50:00 -07001062/* Names of the CDMA info records (C.S0005 section 3.7.5) */
1063typedef enum {
1064 RIL_CDMA_DISPLAY_INFO_REC,
1065 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1066 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1067 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1068 RIL_CDMA_SIGNAL_INFO_REC,
1069 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1070 RIL_CDMA_LINE_CONTROL_INFO_REC,
1071 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1072 RIL_CDMA_T53_CLIR_INFO_REC,
1073 RIL_CDMA_T53_RELEASE_INFO_REC,
1074 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1075} RIL_CDMA_InfoRecName;
1076
1077/* Display Info Rec as defined in C.S0005 section 3.7.5.1
1078 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1079 Note: the Extended Display info rec contains multiple records of the
1080 form: display_tag, display_len, and display_len occurrences of the
1081 chari field if the display_tag is not 10000000 or 10000001.
1082 To save space, the records are stored consecutively in a byte buffer.
1083 The display_tag, display_len and chari fields are all 1 byte.
1084*/
1085
1086typedef struct {
1087 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001088 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001089} RIL_CDMA_DisplayInfoRecord;
1090
1091/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1092 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1093 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1094*/
1095
1096typedef struct {
1097 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001098 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001099 char number_type;
1100 char number_plan;
1101 char pi;
1102 char si;
1103} RIL_CDMA_NumberInfoRecord;
1104
1105/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1106typedef enum {
1107 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1108 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1109 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1110 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1111 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1112 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1113 RIL_REDIRECTING_REASON_RESERVED
1114} RIL_CDMA_RedirectingReason;
1115
1116typedef struct {
1117 RIL_CDMA_NumberInfoRecord redirectingNumber;
1118 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1119 RIL_CDMA_RedirectingReason redirectingReason;
1120} RIL_CDMA_RedirectingNumberInfoRecord;
1121
1122/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1123typedef struct {
1124 char lineCtrlPolarityIncluded;
1125 char lineCtrlToggle;
1126 char lineCtrlReverse;
1127 char lineCtrlPowerDenial;
1128} RIL_CDMA_LineControlInfoRecord;
1129
1130/* T53 CLIR Information Record */
1131typedef struct {
1132 char cause;
1133} RIL_CDMA_T53_CLIRInfoRecord;
1134
1135/* T53 Audio Control Information Record */
1136typedef struct {
1137 char upLink;
1138 char downLink;
1139} RIL_CDMA_T53_AudioControlInfoRecord;
1140
1141typedef struct {
1142
1143 RIL_CDMA_InfoRecName name;
1144
1145 union {
1146 /* Display and Extended Display Info Rec */
1147 RIL_CDMA_DisplayInfoRecord display;
1148
1149 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1150 RIL_CDMA_NumberInfoRecord number;
1151
1152 /* Signal Info Rec */
1153 RIL_CDMA_SignalInfoRecord signal;
1154
1155 /* Redirecting Number Info Rec */
1156 RIL_CDMA_RedirectingNumberInfoRecord redir;
1157
1158 /* Line Control Info Rec */
1159 RIL_CDMA_LineControlInfoRecord lineCtrl;
1160
1161 /* T53 CLIR Info Rec */
1162 RIL_CDMA_T53_CLIRInfoRecord clir;
1163
1164 /* T53 Audio Control Info Rec */
1165 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1166 } rec;
1167} RIL_CDMA_InformationRecord;
1168
1169#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1170
1171typedef struct {
1172 char numberOfInfoRecs;
1173 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1174} RIL_CDMA_InformationRecords;
1175
Jake Hamby8a4a2332014-01-15 13:12:05 -08001176/* See RIL_REQUEST_NV_READ_ITEM */
1177typedef struct {
1178 RIL_NV_Item itemID;
1179} RIL_NV_ReadItem;
1180
1181/* See RIL_REQUEST_NV_WRITE_ITEM */
1182typedef struct {
1183 RIL_NV_Item itemID;
1184 char * value;
1185} RIL_NV_WriteItem;
1186
Etan Cohend3652192014-06-20 08:28:44 -07001187typedef enum {
1188 HANDOVER_STARTED = 0,
1189 HANDOVER_COMPLETED = 1,
1190 HANDOVER_FAILED = 2,
1191 HANDOVER_CANCELED = 3
1192} RIL_SrvccState;
1193
1194/* hardware configuration reported to RILJ. */
1195typedef enum {
1196 RIL_HARDWARE_CONFIG_MODEM = 0,
1197 RIL_HARDWARE_CONFIG_SIM = 1,
1198} RIL_HardwareConfig_Type;
1199
1200typedef enum {
1201 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1202 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1203 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1204} RIL_HardwareConfig_State;
1205
1206typedef struct {
1207 int rilModel;
1208 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1209 int maxVoice;
1210 int maxData;
1211 int maxStandby;
1212} RIL_HardwareConfig_Modem;
1213
1214typedef struct {
Wink Saville8b4e4f72014-10-17 15:01:45 -07001215 char modemUuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001216} RIL_HardwareConfig_Sim;
1217
1218typedef struct {
1219 RIL_HardwareConfig_Type type;
Wink Saville8b4e4f72014-10-17 15:01:45 -07001220 char uuid[MAX_UUID_LENGTH];
Etan Cohend3652192014-06-20 08:28:44 -07001221 RIL_HardwareConfig_State state;
1222 union {
1223 RIL_HardwareConfig_Modem modem;
1224 RIL_HardwareConfig_Sim sim;
1225 } cfg;
1226} RIL_HardwareConfig;
1227
Amit Mahajan54563d32014-11-22 00:54:49 +00001228typedef enum {
1229 SS_CFU,
1230 SS_CF_BUSY,
1231 SS_CF_NO_REPLY,
1232 SS_CF_NOT_REACHABLE,
1233 SS_CF_ALL,
1234 SS_CF_ALL_CONDITIONAL,
1235 SS_CLIP,
1236 SS_CLIR,
1237 SS_COLP,
1238 SS_COLR,
1239 SS_WAIT,
1240 SS_BAOC,
1241 SS_BAOIC,
1242 SS_BAOIC_EXC_HOME,
1243 SS_BAIC,
1244 SS_BAIC_ROAMING,
1245 SS_ALL_BARRING,
1246 SS_OUTGOING_BARRING,
1247 SS_INCOMING_BARRING
1248} RIL_SsServiceType;
1249
1250typedef enum {
1251 SS_ACTIVATION,
1252 SS_DEACTIVATION,
1253 SS_INTERROGATION,
1254 SS_REGISTRATION,
1255 SS_ERASURE
1256} RIL_SsRequestType;
1257
1258typedef enum {
1259 SS_ALL_TELE_AND_BEARER_SERVICES,
1260 SS_ALL_TELESEVICES,
1261 SS_TELEPHONY,
1262 SS_ALL_DATA_TELESERVICES,
1263 SS_SMS_SERVICES,
1264 SS_ALL_TELESERVICES_EXCEPT_SMS
1265} RIL_SsTeleserviceType;
1266
1267#define SS_INFO_MAX 4
1268#define NUM_SERVICE_CLASSES 7
1269
1270typedef struct {
1271 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1272 For example if voice is forwarded to one number and data
1273 is forwarded to a different one then numValidIndexes will be
1274 2 indicating total number of valid values in cfInfo.
1275 Similarly if all the services are forwarded to the same
1276 number then the value of numValidIndexes will be 1. */
1277
1278 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1279 for SS request to query call
1280 forward status. see
1281 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1282} RIL_CfData;
1283
1284typedef struct {
1285 RIL_SsServiceType serviceType;
1286 RIL_SsRequestType requestType;
1287 RIL_SsTeleserviceType teleserviceType;
1288 int serviceClass;
1289 RIL_Errno result;
1290
1291 union {
1292 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1293 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1294 two ints, so first two values of ssInfo[] will be
1295 used for response if serviceType is SS_CLIR and
1296 requestType is SS_INTERROGATION */
1297
1298 RIL_CfData cfData;
1299 };
1300} RIL_StkCcUnsolSsResponse;
1301
Wink Saville7f856802009-06-09 10:23:37 -07001302/**
Wink Savillec29360a2014-07-13 05:17:28 -07001303 * Data connection power state
1304 */
1305typedef enum {
1306 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1307 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1308 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1309 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1310} RIL_DcPowerStates;
1311
1312/**
1313 * Data connection real time info
1314 */
1315typedef struct {
1316 uint64_t time; // Time in nanos as returned by ril_nano_time
1317 RIL_DcPowerStates powerState; // Current power state
1318} RIL_DcRtInfo;
1319
Amit Mahajanc796e222014-08-13 16:54:01 +00001320/**
1321 * Data profile to modem
1322 */
1323typedef struct {
1324 /* id of the data profile */
1325 int profileId;
1326 /* the APN to connect to */
1327 char* apn;
1328 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1329 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1330 */
1331 char* protocol;
1332 /** authentication protocol used for this PDP context
1333 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1334 */
1335 int authType;
1336 /* the username for APN, or NULL */
1337 char* user;
1338 /* the password for APN, or NULL */
1339 char* password;
1340 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1341 int type;
1342 /* the period in seconds to limit the maximum connections */
1343 int maxConnsTime;
1344 /* the maximum connections during maxConnsTime */
1345 int maxConns;
1346 /** the required wait time in seconds after a successful UE initiated
1347 * disconnect of a given PDN connection before the device can send
1348 * a new PDN connection request for that given PDN
1349 */
1350 int waitTime;
1351 /* true to enable the profile, 0 to disable, 1 to enable */
1352 int enabled;
1353} RIL_DataProfileInfo;
Wink Savillec29360a2014-07-13 05:17:28 -07001354
1355/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001356 * RIL_REQUEST_GET_SIM_STATUS
1357 *
1358 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -07001359 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001360 * "data" is NULL
1361 *
Wink Savillefd729372011-02-22 16:19:39 -08001362 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001363 *
1364 * Valid errors:
1365 * Must never fail
1366 */
1367#define RIL_REQUEST_GET_SIM_STATUS 1
1368
1369/**
1370 * RIL_REQUEST_ENTER_SIM_PIN
1371 *
John Wang309ac292009-07-30 14:53:23 -07001372 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001373 *
1374 * "data" is const char **
1375 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001376 * ((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 -08001377 *
jsh593c9102009-06-24 16:13:44 -07001378 * "response" is int *
1379 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001380 *
1381 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001382 *
1383 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001384 * RADIO_NOT_AVAILABLE (radio resetting)
1385 * GENERIC_FAILURE
1386 * PASSWORD_INCORRECT
1387 */
1388
1389#define RIL_REQUEST_ENTER_SIM_PIN 2
1390
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001391/**
1392 * RIL_REQUEST_ENTER_SIM_PUK
1393 *
Wink Saville7f856802009-06-09 10:23:37 -07001394 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001395 *
1396 * "data" is const char **
1397 * ((const char **)data)[0] is PUK value
1398 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001399 * ((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 -08001400 *
jsh593c9102009-06-24 16:13:44 -07001401 * "response" is int *
1402 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001403 *
1404 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001405 *
1406 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001407 * RADIO_NOT_AVAILABLE (radio resetting)
1408 * GENERIC_FAILURE
1409 * PASSWORD_INCORRECT
1410 * (PUK is invalid)
1411 */
1412
1413#define RIL_REQUEST_ENTER_SIM_PUK 3
1414
1415/**
1416 * RIL_REQUEST_ENTER_SIM_PIN2
1417 *
1418 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
1419 * returned as a a failure from a previous operation.
1420 *
1421 * "data" is const char **
1422 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001423 * ((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 -08001424 *
jsh593c9102009-06-24 16:13:44 -07001425 * "response" is int *
1426 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001427 *
1428 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001429 *
1430 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001431 * RADIO_NOT_AVAILABLE (radio resetting)
1432 * GENERIC_FAILURE
1433 * PASSWORD_INCORRECT
1434 */
1435
1436#define RIL_REQUEST_ENTER_SIM_PIN2 4
1437
1438/**
1439 * RIL_REQUEST_ENTER_SIM_PUK2
1440 *
Wink Saville7f856802009-06-09 10:23:37 -07001441 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001442 *
1443 * "data" is const char **
1444 * ((const char **)data)[0] is PUK2 value
1445 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001446 * ((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 -08001447 *
jsh593c9102009-06-24 16:13:44 -07001448 * "response" is int *
1449 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001450 *
1451 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001452 *
1453 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001454 * RADIO_NOT_AVAILABLE (radio resetting)
1455 * GENERIC_FAILURE
1456 * PASSWORD_INCORRECT
1457 * (PUK2 is invalid)
1458 */
1459
1460#define RIL_REQUEST_ENTER_SIM_PUK2 5
1461
1462/**
1463 * RIL_REQUEST_CHANGE_SIM_PIN
1464 *
Wink Saville7f856802009-06-09 10:23:37 -07001465 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001466 *
1467 * "data" is const char **
1468 * ((const char **)data)[0] is old PIN value
1469 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001470 * ((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 -08001471 *
jsh593c9102009-06-24 16:13:44 -07001472 * "response" is int *
1473 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001474 *
1475 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001476 *
1477 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001478 * RADIO_NOT_AVAILABLE (radio resetting)
1479 * GENERIC_FAILURE
1480 * PASSWORD_INCORRECT
1481 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001482 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001483 */
1484
1485#define RIL_REQUEST_CHANGE_SIM_PIN 6
1486
1487
1488/**
1489 * RIL_REQUEST_CHANGE_SIM_PIN2
1490 *
Wink Saville7f856802009-06-09 10:23:37 -07001491 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001492 *
1493 * "data" is const char **
1494 * ((const char **)data)[0] is old PIN2 value
1495 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001496 * ((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 -08001497 *
jsh593c9102009-06-24 16:13:44 -07001498 * "response" is int *
1499 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001500 *
1501 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001502 *
1503 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001504 * RADIO_NOT_AVAILABLE (radio resetting)
1505 * GENERIC_FAILURE
1506 * PASSWORD_INCORRECT
1507 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001508 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001509 */
1510
1511#define RIL_REQUEST_CHANGE_SIM_PIN2 7
1512
1513/**
1514 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
1515 *
1516 * Requests that network personlization be deactivated
1517 *
1518 * "data" is const char **
1519 * ((const char **)(data))[0]] is network depersonlization code
1520 *
jsh593c9102009-06-24 16:13:44 -07001521 * "response" is int *
1522 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001523 *
1524 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001525 *
1526 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001527 * RADIO_NOT_AVAILABLE (radio resetting)
1528 * GENERIC_FAILURE
1529 * PASSWORD_INCORRECT
1530 * (code is invalid)
1531 */
1532
1533#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
1534
1535/**
Wink Saville7f856802009-06-09 10:23:37 -07001536 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001537 *
1538 * Requests current call list
1539 *
1540 * "data" is NULL
1541 *
1542 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07001543 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001544 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001545 *
1546 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001547 * RADIO_NOT_AVAILABLE (radio resetting)
1548 * GENERIC_FAILURE
1549 * (request will be made again in a few hundred msec)
1550 */
1551
1552#define RIL_REQUEST_GET_CURRENT_CALLS 9
1553
1554
Wink Saville7f856802009-06-09 10:23:37 -07001555/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001556 * RIL_REQUEST_DIAL
1557 *
1558 * Initiate voice call
1559 *
1560 * "data" is const RIL_Dial *
1561 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001562 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001563 * This method is never used for supplementary service codes
1564 *
1565 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001566 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001567 * RADIO_NOT_AVAILABLE (radio resetting)
Amit Mahajan54563d32014-11-22 00:54:49 +00001568 * DIAL_MODIFIED_TO_USSD
1569 * DIAL_MODIFIED_TO_SS
1570 * DIAL_MODIFIED_TO_DIAL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001571 * GENERIC_FAILURE
1572 */
1573#define RIL_REQUEST_DIAL 10
1574
1575/**
1576 * RIL_REQUEST_GET_IMSI
1577 *
1578 * Get the SIM IMSI
1579 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08001580 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001581 *
Wink Savillec0114b32011-02-18 10:14:07 -08001582 * "data" is const char **
1583 * ((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 -08001584 * "response" is a const char * containing the IMSI
1585 *
1586 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001587 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001588 * RADIO_NOT_AVAILABLE (radio resetting)
1589 * GENERIC_FAILURE
1590 */
1591
1592#define RIL_REQUEST_GET_IMSI 11
1593
1594/**
1595 * RIL_REQUEST_HANGUP
1596 *
1597 * Hang up a specific line (like AT+CHLD=1x)
1598 *
John Wang06bae4b2010-11-18 16:37:09 -08001599 * After this HANGUP request returns, RIL should show the connection is NOT
1600 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1601 *
Wink Saville7f856802009-06-09 10:23:37 -07001602 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001603 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001604 *
1605 * "response" is NULL
1606 *
1607 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001608 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001609 * RADIO_NOT_AVAILABLE (radio resetting)
1610 * GENERIC_FAILURE
1611 */
1612
1613#define RIL_REQUEST_HANGUP 12
1614
1615/**
1616 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
1617 *
1618 * Hang up waiting or held (like AT+CHLD=0)
1619 *
John Wang06bae4b2010-11-18 16:37:09 -08001620 * After this HANGUP request returns, RIL should show the connection is NOT
1621 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1622 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001623 * "data" is NULL
1624 * "response" is NULL
1625 *
1626 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001627 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001628 * RADIO_NOT_AVAILABLE (radio resetting)
1629 * GENERIC_FAILURE
1630 */
1631
1632#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
1633
1634/**
1635 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
1636 *
1637 * Hang up waiting or held (like AT+CHLD=1)
1638 *
John Wang06bae4b2010-11-18 16:37:09 -08001639 * After this HANGUP request returns, RIL should show the connection is NOT
1640 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1641 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001642 * "data" is NULL
1643 * "response" is NULL
1644 *
1645 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001646 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001647 * RADIO_NOT_AVAILABLE (radio resetting)
1648 * GENERIC_FAILURE
1649 */
1650
1651#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
1652
1653/**
1654 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
1655 *
1656 * Switch waiting or holding call and active call (like AT+CHLD=2)
1657 *
1658 * State transitions should be is follows:
1659 *
1660 * If call 1 is waiting and call 2 is active, then if this re
1661 *
1662 * BEFORE AFTER
1663 * Call 1 Call 2 Call 1 Call 2
1664 * ACTIVE HOLDING HOLDING ACTIVE
1665 * ACTIVE WAITING HOLDING ACTIVE
1666 * HOLDING WAITING HOLDING ACTIVE
1667 * ACTIVE IDLE HOLDING IDLE
1668 * IDLE IDLE IDLE IDLE
1669 *
1670 * "data" is NULL
1671 * "response" is NULL
1672 *
1673 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001674 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001675 * RADIO_NOT_AVAILABLE (radio resetting)
1676 * GENERIC_FAILURE
1677 */
1678
1679#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
1680#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
1681
1682/**
1683 * RIL_REQUEST_CONFERENCE
1684 *
1685 * Conference holding and active (like AT+CHLD=3)
1686
1687 * "data" is NULL
1688 * "response" is NULL
1689 *
1690 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001691 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001692 * RADIO_NOT_AVAILABLE (radio resetting)
1693 * GENERIC_FAILURE
1694 */
1695#define RIL_REQUEST_CONFERENCE 16
1696
1697/**
1698 * RIL_REQUEST_UDUB
1699 *
Wink Saville7f856802009-06-09 10:23:37 -07001700 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001701 * waiting call answer)(RIL_BasicRequest r);
1702 *
1703 * "data" is NULL
1704 * "response" is NULL
1705 *
1706 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001707 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001708 * RADIO_NOT_AVAILABLE (radio resetting)
1709 * GENERIC_FAILURE
1710 */
1711#define RIL_REQUEST_UDUB 17
1712
1713/**
1714 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1715 *
1716 * Requests the failure cause code for the most recently terminated call
1717 *
1718 * "data" is NULL
1719 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -07001720 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001721 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
1722 * failure reasons are derived from the possible call failure scenarios
1723 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001724 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08001725 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
1726 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
1727 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001728 * If the implementation does not have access to the exact cause codes,
1729 * then it should return one of the values listed in RIL_LastCallFailCause,
1730 * as the UI layer needs to distinguish these cases for tone generation or
1731 * error notification.
1732 *
1733 * Valid errors:
1734 * SUCCESS
1735 * RADIO_NOT_AVAILABLE
1736 * GENERIC_FAILURE
1737 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001738 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001739 */
1740#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
1741
1742/**
1743 * RIL_REQUEST_SIGNAL_STRENGTH
1744 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001745 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001746 *
1747 * Must succeed if radio is on.
1748 *
1749 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07001750 *
1751 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001752 *
1753 * Valid errors:
1754 * SUCCESS
1755 * RADIO_NOT_AVAILABLE
1756 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001757#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07001758
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001759/**
Wink Savillec0114b32011-02-18 10:14:07 -08001760 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001761 *
1762 * Request current registration state
1763 *
1764 * "data" is NULL
1765 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -07001766 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -07001767 * 0 - Not registered, MT is not currently searching
1768 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001769 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -07001770 * 2 - Not registered, but MT is currently searching
1771 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001772 * 3 - Registration denied
1773 * 4 - Unknown
1774 * 5 - Registered, roaming
John Wang7f8ded12010-01-21 15:07:28 -08001775 * 10 - Same as 0, but indicates that emergency calls
1776 * are enabled.
1777 * 12 - Same as 2, but indicates that emergency calls
1778 * are enabled.
1779 * 13 - Same as 3, but indicates that emergency calls
1780 * are enabled.
1781 * 14 - Same as 4, but indicates that emergency calls
1782 * are enabled.
1783 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001784 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1785 * NULL if not.Valid LAC are 0x0000 - 0xffff
1786 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1787 * NULL if not.
1788 * Valid CID are 0x00000000 - 0xffffffff
1789 * In GSM, CID is Cell ID (see TS 27.007)
1790 * in 16 bits
1791 * In UMTS, CID is UMTS Cell Identity
1792 * (see TS 25.331) in 28 bits
Wink Saville43808972011-01-13 17:39:51 -08001793 * ((const char **)response)[3] indicates the available voice radio technology,
1794 * valid values as defined by RIL_RadioTechnology.
Wink Saville1b5fd232009-04-22 14:50:00 -07001795 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1796 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07001797 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07001798 * ((const char **)response)[5] is Base Station latitude if registered on a
1799 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001800 * latitude is a decimal number as specified in
1801 * 3GPP2 C.S0005-A v6.0. It is represented in
1802 * units of 0.25 seconds and ranges from -1296000
1803 * to 1296000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08001804 * to a range of -90 to +90 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07001805 * ((const char **)response)[6] is Base Station longitude if registered on a
1806 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001807 * longitude is a decimal number as specified in
1808 * 3GPP2 C.S0005-A v6.0. It is represented in
1809 * units of 0.25 seconds and ranges from -2592000
1810 * to 2592000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08001811 * to a range of -180 to +180 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07001812 * ((const char **)response)[7] is concurrent services support indicator if
1813 * registered on a CDMA system 0-1.
1814 * 0 - Concurrent services not supported,
1815 * 1 - Concurrent services supported
1816 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1817 * NULL if not. Valid System ID are 0 - 32767
1818 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1819 * NULL if not. Valid System ID are 0 - 65535
1820 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001821 * on a CDMA or EVDO system or NULL if not. Valid values
Wink Saville1b5fd232009-04-22 14:50:00 -07001822 * are 0-255.
1823 * ((const char **)response)[11] indicates whether the current system is in the
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001824 * PRL if registered on a CDMA or EVDO system or NULL if
Wink Saville1b5fd232009-04-22 14:50:00 -07001825 * not. 0=not in the PRL, 1=in the PRL
1826 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001827 * if registered on a CDMA or EVDO system or NULL if not.
Wink Saville1b5fd232009-04-22 14:50:00 -07001828 * Valid values are 0-255.
1829 * ((const char **)response)[13] if registration state is 3 (Registration
1830 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07001831 * registration was denied. See 3GPP TS 24.008,
1832 * 10.5.3.6 and Annex G.
1833 * 0 - General
1834 * 1 - Authentication Failure
1835 * 2 - IMSI unknown in HLR
1836 * 3 - Illegal MS
1837 * 4 - Illegal ME
1838 * 5 - PLMN not allowed
1839 * 6 - Location area not allowed
1840 * 7 - Roaming not allowed
1841 * 8 - No Suitable Cells in this Location Area
1842 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07001843 * 10 - Persistent location update reject
Wink Savillec0114b32011-02-18 10:14:07 -08001844 * 11 - PLMN not allowed
1845 * 12 - Location area not allowed
1846 * 13 - Roaming not allowed in this Location Area
1847 * 15 - No Suitable Cells in this Location Area
1848 * 17 - Network Failure
1849 * 20 - MAC Failure
1850 * 21 - Sync Failure
1851 * 22 - Congestion
1852 * 23 - GSM Authentication unacceptable
1853 * 25 - Not Authorized for this CSG
1854 * 32 - Service option not supported
1855 * 33 - Requested service option not subscribed
1856 * 34 - Service option temporarily out of order
1857 * 38 - Call cannot be identified
1858 * 48-63 - Retry upon entry into a new cell
1859 * 95 - Semantically incorrect message
1860 * 96 - Invalid mandatory information
1861 * 97 - Message type non-existent or not implemented
1862 * 98 - Message not compatible with protocol state
1863 * 99 - Information element non-existent or not implemented
1864 * 100 - Conditional IE error
1865 * 101 - Message not compatible with protocol state
1866 * 111 - Protocol error, unspecified
jshca5e3472010-06-23 21:53:24 -07001867 * ((const char **)response)[14] is the Primary Scrambling Code of the current
1868 * cell as described in TS 25.331, in hexadecimal
1869 * format, or NULL if unknown or not registered
1870 * to a UMTS network.
Wink Saville1b5fd232009-04-22 14:50:00 -07001871 *
1872 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001873 * as "out of service" in the Android telephony system
1874 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001875 * Registration state 3 can be returned if Location Update Reject
1876 * (with cause 17 - Network Failure) is received repeatedly from the network,
1877 * to facilitate "managed roaming"
1878 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001879 * Valid errors:
1880 * SUCCESS
1881 * RADIO_NOT_AVAILABLE
1882 * GENERIC_FAILURE
1883 */
Wink Savillec0114b32011-02-18 10:14:07 -08001884#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001885
1886/**
Wink Savillec0114b32011-02-18 10:14:07 -08001887 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001888 *
Wink Savillec0114b32011-02-18 10:14:07 -08001889 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001890 *
1891 * "data" is NULL
1892 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08001893 * ((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 -08001894 * ((const char **)response)[1] is LAC if registered or NULL if not
1895 * ((const char **)response)[2] is CID if registered or NULL if not
Wink Saville43808972011-01-13 17:39:51 -08001896 * ((const char **)response)[3] indicates the available data radio technology,
1897 * valid values as defined by RIL_RadioTechnology.
Wink Savillec0114b32011-02-18 10:14:07 -08001898 * ((const char **)response)[4] if registration state is 3 (Registration
1899 * denied) this is an enumerated reason why
1900 * registration was denied. See 3GPP TS 24.008,
1901 * Annex G.6 "Additonal cause codes for GMM".
1902 * 7 == GPRS services not allowed
1903 * 8 == GPRS services and non-GPRS services not allowed
1904 * 9 == MS identity cannot be derived by the network
1905 * 10 == Implicitly detached
1906 * 14 == GPRS services not allowed in this PLMN
1907 * 16 == MSC temporarily not reachable
1908 * 40 == No PDP context activated
1909 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
1910 * established using RIL_REQUEST_SETUP_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001911 *
Wink Savilleae679532012-12-03 14:59:45 -08001912 * The values at offsets 6..10 are optional LTE location information in decimal.
1913 * If a value is unknown that value may be NULL. If all values are NULL,
1914 * none need to be present.
Wink Savilleea51a9d2012-09-15 07:54:06 -07001915 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
1916 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
1917 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
1918 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
1919 * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
1920 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001921 * LAC and CID are in hexadecimal format.
1922 * valid LAC are 0x0000 - 0xffff
1923 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07001924 *
1925 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001926 * as "out of service" in the Android telephony system
1927 *
1928 * Valid errors:
1929 * SUCCESS
1930 * RADIO_NOT_AVAILABLE
1931 * GENERIC_FAILURE
1932 */
Wink Savillec0114b32011-02-18 10:14:07 -08001933#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001934
1935/**
1936 * RIL_REQUEST_OPERATOR
1937 *
1938 * Request current operator ONS or EONS
1939 *
1940 * "data" is NULL
1941 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07001942 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001943 * or NULL if unregistered
1944 *
Wink Saville7f856802009-06-09 10:23:37 -07001945 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001946 * or NULL if unregistered
1947 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1948 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07001949 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001950 * Valid errors:
1951 * SUCCESS
1952 * RADIO_NOT_AVAILABLE
1953 * GENERIC_FAILURE
1954 */
1955#define RIL_REQUEST_OPERATOR 22
1956
1957/**
1958 * RIL_REQUEST_RADIO_POWER
1959 *
1960 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07001961 * If the radio is is turned off/on the radio modem subsystem
1962 * is expected return to an initialized state. For instance,
1963 * any voice and data calls will be terminated and all associated
1964 * lists emptied.
1965 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001966 * "data" is int *
1967 * ((int *)data)[0] is > 0 for "Radio On"
1968 * ((int *)data)[0] is == 0 for "Radio Off"
1969 *
1970 * "response" is NULL
1971 *
1972 * Turn radio on if "on" > 0
1973 * Turn radio off if "on" == 0
1974 *
1975 * Valid errors:
1976 * SUCCESS
1977 * RADIO_NOT_AVAILABLE
1978 * GENERIC_FAILURE
1979 */
1980#define RIL_REQUEST_RADIO_POWER 23
1981
1982/**
1983 * RIL_REQUEST_DTMF
1984 *
1985 * Send a DTMF tone
1986 *
1987 * If the implementation is currently playing a tone requested via
1988 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1989 * should be played instead
1990 *
jsh602f80f2009-07-10 15:44:37 -07001991 * "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 -08001992 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001993 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001994 * FIXME should this block/mute microphone?
1995 * How does this interact with local DTMF feedback?
1996 *
1997 * Valid errors:
1998 * SUCCESS
1999 * RADIO_NOT_AVAILABLE
2000 * GENERIC_FAILURE
2001 *
2002 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2003 *
2004 */
2005#define RIL_REQUEST_DTMF 24
2006
2007/**
2008 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07002009 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002010 * Send an SMS message
2011 *
2012 * "data" is const char **
2013 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2014 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2015 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2016 * less the SMSC address
2017 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2018 *
2019 * "response" is a const RIL_SMS_Response *
2020 *
2021 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002022 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002023 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2024 *
2025 * Valid errors:
2026 * SUCCESS
2027 * RADIO_NOT_AVAILABLE
2028 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07002029 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002030 * GENERIC_FAILURE
2031 *
2032 * FIXME how do we specify TP-Message-Reference if we need to resend?
2033 */
2034#define RIL_REQUEST_SEND_SMS 25
2035
2036
2037/**
2038 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07002039 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002040 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2041 * except that more messages are expected to be sent soon. If possible,
2042 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2043 *
2044 * "data" is const char **
2045 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2046 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2047 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2048 * less the SMSC address
2049 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2050 *
2051 * "response" is a const RIL_SMS_Response *
2052 *
2053 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07002054 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002055 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
2056 *
2057 * Valid errors:
2058 * SUCCESS
2059 * RADIO_NOT_AVAILABLE
2060 * SMS_SEND_FAIL_RETRY
2061 * GENERIC_FAILURE
2062 *
2063 */
2064#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2065
2066
2067/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002068 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002069 *
Wink Saville29487ef2011-04-15 09:15:31 -07002070 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2071 * return success it is added to the list of data calls and a
2072 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2073 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2074 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2075 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002076 *
Wink Saville43808972011-01-13 17:39:51 -08002077 * The RIL is expected to:
2078 * - Create one data call context.
2079 * - Create and configure a dedicated interface for the context
2080 * - The interface must be point to point.
2081 * - The interface is configured with one or more addresses and
2082 * is capable of sending and receiving packets. The prefix length
2083 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2084 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08002085 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08002086 * number of simultaneous data call contexts.
2087 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002088 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08002089 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2090 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07002091 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07002092 * ((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 -07002093 * override the one in the profile. NULL indicates no APN overrride.
2094 * ((const char **)data)[3] is the username for APN, or NULL
2095 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07002096 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2097 * 0 => PAP and CHAP is never performed.
2098 * 1 => PAP may be performed; CHAP is never performed.
2099 * 2 => CHAP may be performed; PAP is never performed.
2100 * 3 => PAP / CHAP may be performed - baseband dependent.
Wink Savillec0114b32011-02-18 10:14:07 -08002101 * ((const char **)data)[6] is the connection type to request must be one of the
2102 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07002103 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Wink Savillec0114b32011-02-18 10:14:07 -08002104 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002105 *
Wink Savillec0114b32011-02-18 10:14:07 -08002106 * "response" is a RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002107 *
2108 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07002109 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002110 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08002111 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08002112 * the RIL_Data_Call_Response_v6.status containing the actual status.
2113 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08002114 *
2115 * Other errors could include:
2116 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2117 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002118 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002119 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002120 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002121#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002122
2123
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002124/**
2125 * RIL_REQUEST_SIM_IO
2126 *
2127 * Request SIM I/O operation.
2128 * This is similar to the TS 27.007 "restricted SIM" operation
2129 * where it assumes all of the EF selection will be done by the
2130 * callee.
2131 *
Wink Savillefd729372011-02-22 16:19:39 -08002132 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002133 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2134 * or may specify a PIN2 for operations that require a PIN2 (eg
2135 * updating FDN records)
2136 *
2137 * "response" is a const RIL_SIM_IO_Response *
2138 *
2139 * Arguments and responses that are unused for certain
2140 * values of "command" should be ignored or set to NULL
2141 *
2142 * Valid errors:
2143 * SUCCESS
2144 * RADIO_NOT_AVAILABLE
2145 * GENERIC_FAILURE
2146 * SIM_PIN2
2147 * SIM_PUK2
2148 */
2149#define RIL_REQUEST_SIM_IO 28
2150
2151/**
2152 * RIL_REQUEST_SEND_USSD
2153 *
2154 * Send a USSD message
2155 *
2156 * If a USSD session already exists, the message should be sent in the
2157 * context of that session. Otherwise, a new session should be created.
2158 *
2159 * The network reply should be reported via RIL_UNSOL_ON_USSD
2160 *
2161 * Only one USSD session may exist at a time, and the session is assumed
2162 * to exist until:
2163 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2164 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2165 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2166 *
2167 * "data" is a const char * containing the USSD request in UTF-8 format
2168 * "response" is NULL
2169 *
2170 * Valid errors:
2171 * SUCCESS
2172 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07002173 * FDN_CHECK_FAILURE
Amit Mahajan54563d32014-11-22 00:54:49 +00002174 * USSD_MODIFIED_TO_DIAL
2175 * USSD_MODIFIED_TO_SS
2176 * USSD_MODIFIED_TO_USSD
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002177 * GENERIC_FAILURE
2178 *
2179 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2180 */
2181
2182#define RIL_REQUEST_SEND_USSD 29
2183
2184/**
2185 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07002186 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002187 * Cancel the current USSD session if one exists
2188 *
2189 * "data" is null
2190 * "response" is NULL
2191 *
2192 * Valid errors:
2193 * SUCCESS
2194 * RADIO_NOT_AVAILABLE
Wink Saville7f856802009-06-09 10:23:37 -07002195 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002196 */
2197
2198#define RIL_REQUEST_CANCEL_USSD 30
2199
Wink Saville7f856802009-06-09 10:23:37 -07002200/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002201 * RIL_REQUEST_GET_CLIR
2202 *
2203 * Gets current CLIR status
2204 * "data" is NULL
2205 * "response" is int *
2206 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2207 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2208 *
2209 * Valid errors:
2210 * SUCCESS
2211 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002212 * SS_MODIFIED_TO_DIAL
2213 * SS_MODIFIED_TO_USSD
2214 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002215 * GENERIC_FAILURE
2216 */
2217#define RIL_REQUEST_GET_CLIR 31
2218
2219/**
2220 * RIL_REQUEST_SET_CLIR
2221 *
2222 * "data" is int *
2223 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2224 *
2225 * "response" is NULL
2226 *
2227 * Valid errors:
2228 * SUCCESS
2229 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002230 * SS_MODIFIED_TO_DIAL
2231 * SS_MODIFIED_TO_USSD
2232 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002233 * GENERIC_FAILURE
2234 */
2235#define RIL_REQUEST_SET_CLIR 32
2236
2237/**
2238 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2239 *
2240 * "data" is const RIL_CallForwardInfo *
2241 *
2242 * "response" is const RIL_CallForwardInfo **
2243 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2244 * each distinct registered phone number.
2245 *
2246 * For example, if data is forwarded to +18005551212 and voice is forwarded
2247 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07002248 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002249 * If, however, both data and voice are forwarded to +18005551212, then
2250 * a single RIL_CallForwardInfo can be returned with the service class
2251 * set to "data + voice = 3")
2252 *
2253 * Valid errors:
2254 * SUCCESS
2255 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002256 * SS_MODIFIED_TO_DIAL
2257 * SS_MODIFIED_TO_USSD
2258 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002259 * GENERIC_FAILURE
2260 */
2261#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2262
2263
2264/**
2265 * RIL_REQUEST_SET_CALL_FORWARD
2266 *
2267 * Configure call forward rule
2268 *
2269 * "data" is const RIL_CallForwardInfo *
2270 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002271 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002272 * Valid errors:
2273 * SUCCESS
2274 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002275 * SS_MODIFIED_TO_DIAL
2276 * SS_MODIFIED_TO_USSD
2277 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002278 * GENERIC_FAILURE
2279 */
2280#define RIL_REQUEST_SET_CALL_FORWARD 34
2281
2282
2283/**
2284 * RIL_REQUEST_QUERY_CALL_WAITING
2285 *
2286 * Query current call waiting state
2287 *
2288 * "data" is const int *
2289 * ((const int *)data)[0] is the TS 27.007 service class to query.
2290 * "response" is a const int *
2291 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2292 *
2293 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2294 * must follow, with the TS 27.007 service class bit vector of services
2295 * for which call waiting is enabled.
2296 *
Wink Saville7f856802009-06-09 10:23:37 -07002297 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002298 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2299 * and voice and disabled for everything else
2300 *
2301 * Valid errors:
2302 * SUCCESS
2303 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002304 * SS_MODIFIED_TO_DIAL
2305 * SS_MODIFIED_TO_USSD
2306 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002307 * GENERIC_FAILURE
2308 */
2309#define RIL_REQUEST_QUERY_CALL_WAITING 35
2310
2311
2312/**
2313 * RIL_REQUEST_SET_CALL_WAITING
2314 *
2315 * Configure current call waiting state
2316 *
2317 * "data" is const int *
2318 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2319 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2320 * services to modify
2321 * "response" is NULL
2322 *
2323 * Valid errors:
2324 * SUCCESS
2325 * RADIO_NOT_AVAILABLE
Amit Mahajan54563d32014-11-22 00:54:49 +00002326 * SS_MODIFIED_TO_DIAL
2327 * SS_MODIFIED_TO_USSD
2328 * SS_MODIFIED_TO_SS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002329 * GENERIC_FAILURE
2330 */
2331#define RIL_REQUEST_SET_CALL_WAITING 36
2332
2333/**
2334 * RIL_REQUEST_SMS_ACKNOWLEDGE
2335 *
2336 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07002337 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002338 *
2339 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07002340 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002341 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07002342 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002343 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07002344 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
2345 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
2346 * capacity exceeded) and 0xFF (unspecified error) are
2347 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002348 *
2349 * "response" is NULL
2350 *
2351 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
2352 *
2353 * Valid errors:
2354 * SUCCESS
2355 * RADIO_NOT_AVAILABLE
2356 * GENERIC_FAILURE
2357 */
2358#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
2359
2360/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002361 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002362 *
2363 * Get the device IMEI, including check digit
2364 *
johnwangf8bc1672009-05-14 19:19:47 -07002365 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002366 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2367 *
2368 * "data" is NULL
2369 * "response" is a const char * containing the IMEI
2370 *
2371 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002372 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002373 * RADIO_NOT_AVAILABLE (radio resetting)
2374 * GENERIC_FAILURE
2375 */
2376
2377#define RIL_REQUEST_GET_IMEI 38
2378
2379/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002380 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002381 *
2382 * Get the device IMEISV, which should be two decimal digits
2383 *
johnwangf8bc1672009-05-14 19:19:47 -07002384 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002385 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2386 *
2387 * "data" is NULL
2388 * "response" is a const char * containing the IMEISV
2389 *
2390 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002391 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002392 * RADIO_NOT_AVAILABLE (radio resetting)
2393 * GENERIC_FAILURE
2394 */
2395
2396#define RIL_REQUEST_GET_IMEISV 39
2397
2398
2399/**
2400 * RIL_REQUEST_ANSWER
2401 *
2402 * Answer incoming call
2403 *
2404 * Will not be called for WAITING calls.
2405 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
2406 * instead
2407 *
2408 * "data" is NULL
2409 * "response" is NULL
2410 *
2411 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002412 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002413 * RADIO_NOT_AVAILABLE (radio resetting)
2414 * GENERIC_FAILURE
2415 */
2416
2417#define RIL_REQUEST_ANSWER 40
2418
2419/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002420 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002421 *
Wink Saville29487ef2011-04-15 09:15:31 -07002422 * Deactivate packet data connection and remove from the
2423 * data call list if SUCCESS is returned. Any other return
2424 * values should also try to remove the call from the list,
2425 * but that may not be possible. In any event a
2426 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
2427 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
2428 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002429 *
2430 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07002431 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06002432 * ((char**)data)[1] indicating Disconnect Reason
2433 * 0 => No specific reason specified
2434 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07002435 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002436 * "response" is NULL
2437 *
2438 * Valid errors:
2439 * SUCCESS
2440 * RADIO_NOT_AVAILABLE
2441 * GENERIC_FAILURE
2442 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002443 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002444 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002445#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002446
2447/**
2448 * RIL_REQUEST_QUERY_FACILITY_LOCK
2449 *
2450 * Query the status of a facility lock state
2451 *
2452 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07002453 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
The Android Open Source Project