blob: 19be24a53f5f7750892555d4fc57d0e1bdcef962 [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
60
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080061typedef void * RIL_Token;
62
63typedef enum {
Etan Cohend3652192014-06-20 08:28:44 -070064 RIL_SOCKET_1,
65#if (SIM_COUNT >= 2)
66 RIL_SOCKET_2,
67#if (SIM_COUNT >= 3)
68 RIL_SOCKET_3,
69#endif
70#if (SIM_COUNT >= 4)
71 RIL_SOCKET_4,
72#endif
73#endif
74 RIL_SOCKET_NUM
75} RIL_SOCKET_ID;
76
77
78typedef enum {
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080079 RIL_E_SUCCESS = 0,
80 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
81 RIL_E_GENERIC_FAILURE = 2,
82 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
83 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
84 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
85 RIL_E_REQUEST_NOT_SUPPORTED = 6,
86 RIL_E_CANCELLED = 7,
87 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
88 call on a Class C GPRS device */
89 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
90 registers in network */
Wink Saville3d54e742009-05-18 18:00:44 -070091 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
92 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
93 shall be retrieved because of SIM or RUIM
Wink Savillef4c4d362009-04-02 01:37:03 -070094 card absent */
Wink Saville3d54e742009-05-18 18:00:44 -070095 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
Wink Savillef4c4d362009-04-02 01:37:03 -070096 location */
jsh602f80f2009-07-10 15:44:37 -070097 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
John Wang75534472010-04-20 15:11:42 -070098 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -080099 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
John Wang75534472010-04-20 15:11:42 -0700100 illegal SIM or ME */
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800101 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
102 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800103} RIL_Errno;
104
105typedef enum {
106 RIL_CALL_ACTIVE = 0,
107 RIL_CALL_HOLDING = 1,
108 RIL_CALL_DIALING = 2, /* MO call only */
109 RIL_CALL_ALERTING = 3, /* MO call only */
110 RIL_CALL_INCOMING = 4, /* MT call only */
111 RIL_CALL_WAITING = 5 /* MT call only */
112} RIL_CallState;
113
114typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -0700115 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
116 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800117 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
Wink Savillef4c4d362009-04-02 01:37:03 -0700118 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
Wink Saville7f856802009-06-09 10:23:37 -0700119 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -0700120 personalization locked, or SIM absent */
121 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
122 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
123 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
Wink Saville7f856802009-06-09 10:23:37 -0700124 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -0700125 personalization locked, or RUIM absent */
126 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800127 RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */
128 RADIO_STATE_ON = 10 /* Radio is on */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800129} RIL_RadioState;
130
Wink Saville43808972011-01-13 17:39:51 -0800131typedef enum {
132 RADIO_TECH_UNKNOWN = 0,
133 RADIO_TECH_GPRS = 1,
134 RADIO_TECH_EDGE = 2,
135 RADIO_TECH_UMTS = 3,
136 RADIO_TECH_IS95A = 4,
137 RADIO_TECH_IS95B = 5,
138 RADIO_TECH_1xRTT = 6,
139 RADIO_TECH_EVDO_0 = 7,
140 RADIO_TECH_EVDO_A = 8,
141 RADIO_TECH_HSDPA = 9,
142 RADIO_TECH_HSUPA = 10,
143 RADIO_TECH_HSPA = 11,
144 RADIO_TECH_EVDO_B = 12,
145 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800146 RADIO_TECH_LTE = 14,
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800147 RADIO_TECH_HSPAP = 15, // HSPA+
Etan Cohend3652192014-06-20 08:28:44 -0700148 RADIO_TECH_GSM = 16, // Only supports voice
149 RADIO_TECH_TD_SCDMA = 17
Wink Saville43808972011-01-13 17:39:51 -0800150} RIL_RadioTechnology;
151
Wink Savillec0114b32011-02-18 10:14:07 -0800152// Do we want to split Data from Voice and the use
153// RIL_RadioTechnology for get/setPreferredVoice/Data ?
154typedef enum {
155 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
156 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
157 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
158 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
159 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
160 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
161 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
162 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
163 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
164 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
165 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
Uma Maheswari Ramalingam0e094872011-09-28 13:25:48 -0700166 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
167 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
Wink Savillec0114b32011-02-18 10:14:07 -0800168} RIL_PreferredNetworkType;
169
170/* Source for cdma subscription */
171typedef enum {
172 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
173 CDMA_SUBSCRIPTION_SOURCE_NV = 1
174} RIL_CdmaSubscriptionSource;
175
Wink Saville74fa3882009-12-22 15:35:41 -0800176/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
177typedef enum {
178 RIL_UUS_TYPE1_IMPLICIT = 0,
179 RIL_UUS_TYPE1_REQUIRED = 1,
180 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
181 RIL_UUS_TYPE2_REQUIRED = 3,
182 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
183 RIL_UUS_TYPE3_REQUIRED = 5,
184 RIL_UUS_TYPE3_NOT_REQUIRED = 6
185} RIL_UUS_Type;
186
187/* User-to-User Signaling Information data coding schemes. Possible values for
188 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
189 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
190typedef enum {
191 RIL_UUS_DCS_USP = 0, /* User specified protocol */
192 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
193 RIL_UUS_DCS_X244 = 2, /* X.244 */
194 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
195 convergence function */
196 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
197} RIL_UUS_DCS;
198
199/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
200 * This data is passed in RIL_ExtensionRecord and rec contains this
201 * structure when type is RIL_UUS_INFO_EXT_REC */
202typedef struct {
203 RIL_UUS_Type uusType; /* UUS Type */
204 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
205 int uusLength; /* Length of UUS Data */
206 char * uusData; /* UUS Data */
207} RIL_UUS_Info;
208
209/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700210typedef struct {
211 char isPresent; /* non-zero if signal information record is present */
212 char signalType; /* as defined 3.7.5.5-1 */
213 char alertPitch; /* as defined 3.7.5.5-2 */
214 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
215} RIL_CDMA_SignalInfoRecord;
216
Wink Saville1b5fd232009-04-22 14:50:00 -0700217typedef struct {
218 RIL_CallState state;
219 int index; /* Connection Index for use with, eg, AT+CHLD */
220 int toa; /* type of address, eg 145 = intl */
221 char isMpty; /* nonzero if is mpty call */
222 char isMT; /* nonzero if call is mobile terminated */
223 char als; /* ALS line indicator if available
224 (0 = line 1) */
225 char isVoice; /* nonzero if this is is a voice call */
226 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
227 char * number; /* Remote party number */
228 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
229 char * name; /* Remote party name */
230 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800231 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800232} RIL_Call;
233
Wink Savillec0114b32011-02-18 10:14:07 -0800234/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800235typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800236 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700237 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700238 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
239 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800240 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800241 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
242} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800243
244/*
245 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
246 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
247 */
248typedef struct {
249 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500250 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
251 back-off timer value RIL wants to override the one
252 pre-configured in FW.
253 The unit is miliseconds.
254 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700255 The value 0 means retry should be done ASAP.
Wink Saville8a9e0212013-04-09 12:11:38 -0700256 The value of INT_MAX(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800257 int cid; /* Context ID, uniquely identifies this call */
258 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
259 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
260 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
261 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
262 such as "IP" or "IPV6" */
263 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800264 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
265 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800266 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800267 one of each. If the prefix length is absent the addresses
268 are assumed to be point to point with IPv4 having a prefix
269 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800270 char * dnses; /* A space-delimited list of DNS server addresses,
271 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
272 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800273 char * gateways; /* A space-delimited list of default gateway addresses,
274 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
275 May be empty in which case the addresses represent point
276 to point connections. */
277} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800278
Etan Cohend3652192014-06-20 08:28:44 -0700279typedef struct {
280 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
281 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
282 back-off timer value RIL wants to override the one
283 pre-configured in FW.
284 The unit is miliseconds.
285 The value < 0 means no value is suggested.
286 The value 0 means retry should be done ASAP.
287 The value of INT_MAX(0x7fffffff) means no retry. */
288 int cid; /* Context ID, uniquely identifies this call */
289 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
290 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
291 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
292 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
293 such as "IP" or "IPV6" */
294 char * ifname; /* The network interface name */
295 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
296 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
297 May not be empty, typically 1 IPv4 or 1 IPv6 or
298 one of each. If the prefix length is absent the addresses
299 are assumed to be point to point with IPv4 having a prefix
300 length of 32 and IPv6 128. */
301 char * dnses; /* A space-delimited list of DNS server addresses,
302 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
303 May be empty. */
304 char * gateways; /* A space-delimited list of default gateway addresses,
305 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
306 May be empty in which case the addresses represent point
307 to point connections. */
308 char * pcscf; /* the Proxy Call State Control Function address
309 via PCO(Protocol Configuration Option) for IMS client. */
310} RIL_Data_Call_Response_v9; // FIXME: Change to v10
311
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -0700312typedef enum {
313 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
314 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
315} RIL_RadioTechnologyFamily;
316
317typedef struct {
318 RIL_RadioTechnologyFamily tech;
319 unsigned char retry; /* 0 == not retry, nonzero == retry */
320 int messageRef; /* Valid field if retry is set to nonzero.
321 Contains messageRef from RIL_SMS_Response
322 corresponding to failed MO SMS.
323 */
324
325 union {
326 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
327 RIL_CDMA_SMS_Message* cdmaMessage;
328
329 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
330 char** gsmMessage;
331 } message;
332} RIL_IMS_SMS_Message;
333
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800334typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800335 int messageRef; /* TP-Message-Reference for GSM,
336 and BearerData MessageId for CDMA
337 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800338 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700339 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
340 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
341 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800342} RIL_SMS_Response;
343
344/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
345typedef struct {
346 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
347 /* 0 = "REC UNREAD" */
348 /* 1 = "REC READ" */
349 /* 2 = "STO UNSENT" */
350 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700351 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
352 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800353 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
354 (as expected by TS 27.005) or NULL for default SMSC */
355} RIL_SMS_WriteArgs;
356
357/** Used by RIL_REQUEST_DIAL */
358typedef struct {
359 char * address;
360 int clir;
361 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
362 * clir == 0 on "use subscription default value"
363 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
364 * clir == 2 on "CLIR suppression" (allow CLI presentation)
365 */
Wink Saville74fa3882009-12-22 15:35:41 -0800366 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800367} RIL_Dial;
368
369typedef struct {
370 int command; /* one of the commands listed for TS 27.007 +CRSM*/
371 int fileid; /* EF id */
372 char *path; /* "pathid" from TS 27.007 +CRSM command.
373 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700374 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800375 */
376 int p1;
377 int p2;
378 int p3;
379 char *data; /* May be NULL*/
380 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800381} RIL_SIM_IO_v5;
382
383typedef struct {
384 int command; /* one of the commands listed for TS 27.007 +CRSM*/
385 int fileid; /* EF id */
386 char *path; /* "pathid" from TS 27.007 +CRSM command.
387 Path is in hex asciii format eg "7f205f70"
388 Path must always be provided.
389 */
390 int p1;
391 int p2;
392 int p3;
393 char *data; /* May be NULL*/
394 char *pin2; /* May be NULL*/
395 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
396} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800397
Shishir Agrawal2458d8d2013-11-27 14:53:05 -0800398/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
399 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
400typedef struct {
401 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
402 ignored for +CSIM command. */
403
404 /* Following fields are used to derive the APDU ("command" and "length"
405 values in TS 27.007 +CSIM and +CGLA commands). */
406 int cla;
407 int instruction;
408 int p1;
409 int p2;
410 int p3; /* A negative P3 implies a 4 byte APDU. */
411 char *data; /* May be NULL. In hex string format. */
412} RIL_SIM_APDU;
413
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800414typedef struct {
415 int sw1;
416 int sw2;
417 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
418} RIL_SIM_IO_Response;
419
420/* See also com.android.internal.telephony.gsm.CallForwardInfo */
421
422typedef struct {
423 int status; /*
424 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
425 * status 1 = active, 0 = not active
426 *
427 * For RIL_REQUEST_SET_CALL_FORWARD:
428 * status is:
429 * 0 = disable
430 * 1 = enable
431 * 2 = interrogate
432 * 3 = registeration
433 * 4 = erasure
434 */
435
Wink Saville3d54e742009-05-18 18:00:44 -0700436 int reason; /* from TS 27.007 7.11 "reason" */
437 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
438 See table for Android mapping from
439 MMI service code
440 0 means user doesn't input class */
441 int toa; /* "type" from TS 27.007 7.11 */
442 char * number; /* "number" from TS 27.007 7.11. May be NULL */
443 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800444}RIL_CallForwardInfo;
445
446typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700447 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
448 * Upper 16 bits is LAC and lower 16 bits
449 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800450 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700451 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700452 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800453 */
johnwange0ba6a92009-09-11 19:14:52 -0700454 int rssi; /* Received RSSI in GSM,
455 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800456 */
457} RIL_NeighboringCell;
458
459/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
460typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700461 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800462 CALL_FAIL_NORMAL = 16,
463 CALL_FAIL_BUSY = 17,
464 CALL_FAIL_CONGESTION = 34,
465 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
466 CALL_FAIL_CALL_BARRED = 240,
467 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700468 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
469 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Wink Saville1b5fd232009-04-22 14:50:00 -0700470 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
471 CALL_FAIL_CDMA_DROP = 1001,
472 CALL_FAIL_CDMA_INTERCEPT = 1002,
473 CALL_FAIL_CDMA_REORDER = 1003,
474 CALL_FAIL_CDMA_SO_REJECT = 1004,
475 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
476 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
477 CALL_FAIL_CDMA_PREEMPTED = 1007,
478 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
479 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700480 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800481 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
482} RIL_LastCallFailCause;
483
Wink Savillef4c4d362009-04-02 01:37:03 -0700484/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800485typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800486 PDP_FAIL_NONE = 0, /* No error, connection ok */
487
488 /* an integer cause code defined in TS 24.008
489 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
490 If the implementation does not have access to the exact cause codes,
491 then it should return one of the following values,
492 as the UI layer needs to distinguish these
493 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700494 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
495 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
496 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
497 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
498 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
499 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
500 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
501 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
502 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
503 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800504 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
Wink Saville3d14a712013-08-05 14:44:01 -0700505 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* restart radio */
Wink Saville43808972011-01-13 17:39:51 -0800506 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
507 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
508 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700509 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
Wink Saville43808972011-01-13 17:39:51 -0800510
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700511 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800512 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
513 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800514
515 /* reasons for data call drop - network/modem disconnect */
Wink Saville3492c6e2013-10-03 13:53:27 -0700516 PDP_FAIL_SIGNAL_LOST = -3,
Wink Saville43808972011-01-13 17:39:51 -0800517 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
518 with parameters appropriate for new technology */
519 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
520 powered off - no retry */
521 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
522 mode was up on same APN/data profile - no retry until
523 tethered call is off */
524
525 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */
526} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800527
jsh602f80f2009-07-10 15:44:37 -0700528/* See RIL_REQUEST_SETUP_DATA_CALL */
529typedef enum {
530 RIL_DATA_PROFILE_DEFAULT = 0,
531 RIL_DATA_PROFILE_TETHERED = 1,
532 RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */
533} RIL_DataProfile;
534
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800535/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
536typedef struct {
537 int notificationType; /*
538 * 0 = MO intermediate result code
539 * 1 = MT unsolicited result code
540 */
541 int code; /* See 27.007 7.17
542 "code1" for MO
543 "code2" for MT. */
544 int index; /* CUG index. See 27.007 7.17. */
545 int type; /* "type" from 27.007 7.17 (MT only). */
546 char * number; /* "number" from 27.007 7.17
547 (MT only, may be NULL). */
548} RIL_SuppSvcNotification;
549
Wink Savillef4c4d362009-04-02 01:37:03 -0700550#define RIL_CARD_MAX_APPS 8
551
552typedef enum {
553 RIL_CARDSTATE_ABSENT = 0,
554 RIL_CARDSTATE_PRESENT = 1,
555 RIL_CARDSTATE_ERROR = 2
556} RIL_CardState;
557
558typedef enum {
559 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
560 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700561 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
562 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700563 involved */
564 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
565 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
566 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
567 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
568 RIL_PERSOSUBSTATE_SIM_SIM = 7,
569 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
570 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
571 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
572 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
573 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
574 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
575 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
576 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
577 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
578 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
579 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
580 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
581 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
582 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
583 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
584 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
585 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
586} RIL_PersoSubstate;
587
588typedef enum {
589 RIL_APPSTATE_UNKNOWN = 0,
590 RIL_APPSTATE_DETECTED = 1,
591 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
592 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700593 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700594 when app_state is assigned to this value */
595 RIL_APPSTATE_READY = 5
596} RIL_AppState;
597
598typedef enum {
599 RIL_PINSTATE_UNKNOWN = 0,
600 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
601 RIL_PINSTATE_ENABLED_VERIFIED = 2,
602 RIL_PINSTATE_DISABLED = 3,
603 RIL_PINSTATE_ENABLED_BLOCKED = 4,
604 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
605} RIL_PinState;
606
607typedef enum {
608 RIL_APPTYPE_UNKNOWN = 0,
609 RIL_APPTYPE_SIM = 1,
610 RIL_APPTYPE_USIM = 2,
611 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -0800612 RIL_APPTYPE_CSIM = 4,
613 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -0700614} RIL_AppType;
615
616typedef struct
617{
Wink Saville7f856802009-06-09 10:23:37 -0700618 RIL_AppType app_type;
619 RIL_AppState app_state;
620 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -0700621 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -0700622 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -0700623 0x30, 0x30, 0x30 */
624 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -0800625 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -0700626 RIL_PinState pin1;
627 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -0700628} RIL_AppStatus;
629
Wink Savillec0114b32011-02-18 10:14:07 -0800630/* Deprecated, use RIL_CardStatus_v6 */
631typedef struct
632{
633 RIL_CardState card_state;
634 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
635 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
636 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
637 int num_applications; /* value <= RIL_CARD_MAX_APPS */
638 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
639} RIL_CardStatus_v5;
640
Wink Savillef4c4d362009-04-02 01:37:03 -0700641typedef struct
642{
Wink Saville7f856802009-06-09 10:23:37 -0700643 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -0700644 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -0800645 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
646 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
647 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -0700648 int num_applications; /* value <= RIL_CARD_MAX_APPS */
649 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -0800650} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -0700651
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800652/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
653 * or as part of RIL_SimRefreshResponse_v7
654 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800655typedef enum {
656 /* A file on SIM has been updated. data[1] contains the EFID. */
657 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800658 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800659 SIM_INIT = 1,
660 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
661 SIM_RESET = 2
662} RIL_SimRefreshResult;
663
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800664typedef struct {
665 RIL_SimRefreshResult result;
666 int ef_id; /* is the EFID of the updated file if the result is */
667 /* SIM_FILE_UPDATE or 0 for any other result. */
668 char * aid; /* is AID(application ID) of the card application */
669 /* See ETSI 102.221 8.1 and 101.220 4 */
670 /* For SIM_FILE_UPDATE result it can be set to AID of */
671 /* application in which updated EF resides or it can be */
672 /* NULL if EF is outside of an application. */
673 /* For SIM_INIT result this field is set to AID of */
674 /* application that caused REFRESH */
675 /* For SIM_RESET result it is NULL. */
676} RIL_SimRefreshResponse_v7;
677
Wink Savillec0114b32011-02-18 10:14:07 -0800678/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
679typedef struct {
680 char * number; /* Remote party number */
681 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
682 char * name; /* Remote party name */
683 RIL_CDMA_SignalInfoRecord signalInfoRecord;
684} RIL_CDMA_CallWaiting_v5;
685
Wink Saville1b5fd232009-04-22 14:50:00 -0700686typedef struct {
687 char * number; /* Remote party number */
688 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
689 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -0700690 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -0800691 /* Number type/Number plan required to support International Call Waiting */
692 int number_type; /* 0=Unknown, 1=International, 2=National,
693 3=Network specific, 4=subscriber */
694 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
695} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -0700696
Wink Savillea592eeb2009-05-22 13:26:36 -0700697/**
698 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
699 *
700 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
701 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
702 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
703 * CBM message ID.
704 *
705 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
706 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
707 * and 9.4.4.2.3 for UMTS.
708 * All other values can be treated as empty CBM data coding scheme.
709 *
710 * selected 0 means message types specified in <fromServiceId, toServiceId>
711 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
712 *
713 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
714 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
715 */
Wink Savillef4c4d362009-04-02 01:37:03 -0700716typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -0700717 int fromServiceId;
718 int toServiceId;
719 int fromCodeScheme;
720 int toCodeScheme;
721 unsigned char selected;
722} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -0700723
The Android Open Source Project34a51082009-03-05 14:34:37 -0800724/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
725#define RIL_RESTRICTED_STATE_NONE 0x00
726/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
727#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
728/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
729#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -0700730/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -0800731#define RIL_RESTRICTED_STATE_CS_ALL 0x04
732/* Block packet data access due to restriction. */
733#define RIL_RESTRICTED_STATE_PS_ALL 0x10
734
Wink Saville1b5fd232009-04-22 14:50:00 -0700735/* The status for an OTASP/OTAPA session */
736typedef enum {
737 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
738 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
739 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
740 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
741 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
742 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
743 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
744 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
745 CDMA_OTA_PROVISION_STATUS_COMMITTED,
746 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
747 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
748 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
749} RIL_CDMA_OTA_ProvisionStatus;
750
751typedef struct {
752 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
753 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
754} RIL_GW_SignalStrength;
755
Wink Savillec57b3eb2013-04-17 12:51:41 -0700756typedef struct {
757 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
758 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
759} RIL_SignalStrengthWcdma;
Wink Saville1b5fd232009-04-22 14:50:00 -0700760
761typedef struct {
762 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
763 * multiplied by -1. Example: If the actual RSSI is -75, then this response
764 * value will be 75.
765 */
766 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
767 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
768 * will be 125.
769 */
770} RIL_CDMA_SignalStrength;
771
772
773typedef struct {
774 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
775 * multiplied by -1. Example: If the actual RSSI is -75, then this response
776 * value will be 75.
777 */
778 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
779 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
780 * will be 125.
781 */
782 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
783} RIL_EVDO_SignalStrength;
784
Wink Savillec0114b32011-02-18 10:14:07 -0800785typedef struct {
786 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -0700787 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
788 * Range: 44 to 140 dBm
789 * INT_MAX: 0x7FFFFFFF denotes invalid value.
790 * Reference: 3GPP TS 36.133 9.1.4 */
791 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
792 * Range: 20 to 3 dB.
793 * INT_MAX: 0x7FFFFFFF denotes invalid value.
794 * Reference: 3GPP TS 36.133 9.1.7 */
795 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
796 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
797 * INT_MAX : 0x7FFFFFFF denotes invalid value.
798 * Reference: 3GPP TS 36.101 8.1.1 */
799 int cqi; /* The current Channel Quality Indicator.
800 * Range: 0 to 15.
801 * INT_MAX : 0x7FFFFFFF denotes invalid value.
802 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -0800803} RIL_LTE_SignalStrength;
804
Wink Saville8a9e0212013-04-09 12:11:38 -0700805typedef struct {
806 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
807 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
808 * Range: 44 to 140 dBm
809 * INT_MAX: 0x7FFFFFFF denotes invalid value.
810 * Reference: 3GPP TS 36.133 9.1.4 */
811 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
812 * Range: 20 to 3 dB.
813 * INT_MAX: 0x7FFFFFFF denotes invalid value.
814 * Reference: 3GPP TS 36.133 9.1.7 */
815 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
816 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
817 * INT_MAX : 0x7FFFFFFF denotes invalid value.
818 * Reference: 3GPP TS 36.101 8.1.1 */
819 int cqi; /* The current Channel Quality Indicator.
820 * Range: 0 to 15.
821 * INT_MAX : 0x7FFFFFFF denotes invalid value.
822 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
823 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
824 * Approximate distance can be calculated using 300m/us * timingAdvance.
825 * Range: 0 to 0x7FFFFFFE
826 * INT_MAX : 0x7FFFFFFF denotes invalid value.
827 * Reference: 3GPP 36.321 section 6.1.3.5
828 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
829} RIL_LTE_SignalStrength_v8;
830
Etan Cohend3652192014-06-20 08:28:44 -0700831typedef struct {
832 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
833 * Range : 25 to 120
834 * INT_MAX: 0x7FFFFFFF denotes invalid value.
835 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
836} RIL_TD_SCDMA_SignalStrength;
837
Wink Savillec0114b32011-02-18 10:14:07 -0800838/* Deprecated, use RIL_SignalStrength_v6 */
839typedef struct {
840 RIL_GW_SignalStrength GW_SignalStrength;
841 RIL_CDMA_SignalStrength CDMA_SignalStrength;
842 RIL_EVDO_SignalStrength EVDO_SignalStrength;
843} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -0700844
845typedef struct {
846 RIL_GW_SignalStrength GW_SignalStrength;
847 RIL_CDMA_SignalStrength CDMA_SignalStrength;
848 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -0800849 RIL_LTE_SignalStrength LTE_SignalStrength;
850} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -0700851
Wink Saville8a9e0212013-04-09 12:11:38 -0700852typedef struct {
853 RIL_GW_SignalStrength GW_SignalStrength;
854 RIL_CDMA_SignalStrength CDMA_SignalStrength;
855 RIL_EVDO_SignalStrength EVDO_SignalStrength;
856 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
857} RIL_SignalStrength_v8;
858
Etan Cohend3652192014-06-20 08:28:44 -0700859typedef struct {
860 RIL_GW_SignalStrength GW_SignalStrength;
861 RIL_CDMA_SignalStrength CDMA_SignalStrength;
862 RIL_EVDO_SignalStrength EVDO_SignalStrength;
863 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
864 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
865} RIL_SignalStrength_v10;
866
Wink Saville8a9e0212013-04-09 12:11:38 -0700867/** RIL_CellIdentityGsm */
868typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -0700869 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
870 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
871 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
872 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 -0700873} RIL_CellIdentityGsm;
874
Wink Savillec57b3eb2013-04-17 12:51:41 -0700875/** RIL_CellIdentityWcdma */
876typedef struct {
877 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
878 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
879 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
880 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
881 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
882} RIL_CellIdentityWcdma;
883
Wink Saville8a9e0212013-04-09 12:11:38 -0700884/** RIL_CellIdentityCdma */
885typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -0700886 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
887 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
888 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -0700889 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
890 * It is represented in units of 0.25 seconds and ranges from -2592000
891 * to 2592000, both values inclusive (corresponding to a range of -180
Wink Savillec57b3eb2013-04-17 12:51:41 -0700892 * to +180 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -0700893
894 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
895 * It is represented in units of 0.25 seconds and ranges from -1296000
896 * to 1296000, both values inclusive (corresponding to a range of -90
Wink Savillec57b3eb2013-04-17 12:51:41 -0700897 * to +90 degrees). INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -0700898} RIL_CellIdentityCdma;
899
900/** RIL_CellIdentityLte */
901typedef struct {
Wink Savillec57b3eb2013-04-17 12:51:41 -0700902 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
903 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
904 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
905 int pci; /* physical cell id 0..503, INT_MAX if unknown */
906 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
Wink Saville8a9e0212013-04-09 12:11:38 -0700907} RIL_CellIdentityLte;
908
Etan Cohend3652192014-06-20 08:28:44 -0700909/** RIL_CellIdentityTdscdma */
910typedef struct {
911 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
912 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
913 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
914 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
915 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
916} RIL_CellIdentityTdscdma;
917
Wink Saville8a9e0212013-04-09 12:11:38 -0700918/** RIL_CellInfoGsm */
919typedef struct {
920 RIL_CellIdentityGsm cellIdentityGsm;
921 RIL_GW_SignalStrength signalStrengthGsm;
922} RIL_CellInfoGsm;
923
Wink Savillec57b3eb2013-04-17 12:51:41 -0700924/** RIL_CellInfoWcdma */
925typedef struct {
926 RIL_CellIdentityWcdma cellIdentityWcdma;
927 RIL_SignalStrengthWcdma signalStrengthWcdma;
928} RIL_CellInfoWcdma;
929
Wink Saville8a9e0212013-04-09 12:11:38 -0700930/** RIL_CellInfoCdma */
931typedef struct {
932 RIL_CellIdentityCdma cellIdentityCdma;
933 RIL_CDMA_SignalStrength signalStrengthCdma;
934 RIL_EVDO_SignalStrength signalStrengthEvdo;
935} RIL_CellInfoCdma;
936
937/** RIL_CellInfoLte */
938typedef struct {
939 RIL_CellIdentityLte cellIdentityLte;
940 RIL_LTE_SignalStrength_v8 signalStrengthLte;
941} RIL_CellInfoLte;
942
Etan Cohend3652192014-06-20 08:28:44 -0700943/** RIL_CellInfoTdscdma */
944typedef struct {
945 RIL_CellIdentityTdscdma cellIdentityTdscdma;
946 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
947} RIL_CellInfoTdscdma;
948
Wink Saville8a9e0212013-04-09 12:11:38 -0700949// Must be the same as CellInfo.TYPE_XXX
950typedef enum {
951 RIL_CELL_INFO_TYPE_GSM = 1,
952 RIL_CELL_INFO_TYPE_CDMA = 2,
953 RIL_CELL_INFO_TYPE_LTE = 3,
Wink Savillec57b3eb2013-04-17 12:51:41 -0700954 RIL_CELL_INFO_TYPE_WCDMA = 4,
Etan Cohend3652192014-06-20 08:28:44 -0700955 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
Wink Saville8a9e0212013-04-09 12:11:38 -0700956} RIL_CellInfoType;
957
958// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
959typedef enum {
960 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
961 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
962 RIL_TIMESTAMP_TYPE_MODEM = 2,
963 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
964 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
965} RIL_TimeStampType;
966
967typedef struct {
968 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
969 int registered; /* !0 if this cell is registered 0 if not registered */
970 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
971 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
972 union {
973 RIL_CellInfoGsm gsm;
974 RIL_CellInfoCdma cdma;
975 RIL_CellInfoLte lte;
Wink Savillec57b3eb2013-04-17 12:51:41 -0700976 RIL_CellInfoWcdma wcdma;
Etan Cohend3652192014-06-20 08:28:44 -0700977 RIL_CellInfoTdscdma tdscdma;
Wink Saville8a9e0212013-04-09 12:11:38 -0700978 } CellInfo;
979} RIL_CellInfo;
980
Wink Saville1b5fd232009-04-22 14:50:00 -0700981/* Names of the CDMA info records (C.S0005 section 3.7.5) */
982typedef enum {
983 RIL_CDMA_DISPLAY_INFO_REC,
984 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
985 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
986 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
987 RIL_CDMA_SIGNAL_INFO_REC,
988 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
989 RIL_CDMA_LINE_CONTROL_INFO_REC,
990 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
991 RIL_CDMA_T53_CLIR_INFO_REC,
992 RIL_CDMA_T53_RELEASE_INFO_REC,
993 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
994} RIL_CDMA_InfoRecName;
995
996/* Display Info Rec as defined in C.S0005 section 3.7.5.1
997 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
998 Note: the Extended Display info rec contains multiple records of the
999 form: display_tag, display_len, and display_len occurrences of the
1000 chari field if the display_tag is not 10000000 or 10000001.
1001 To save space, the records are stored consecutively in a byte buffer.
1002 The display_tag, display_len and chari fields are all 1 byte.
1003*/
1004
1005typedef struct {
1006 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001007 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001008} RIL_CDMA_DisplayInfoRecord;
1009
1010/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1011 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1012 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1013*/
1014
1015typedef struct {
1016 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -07001017 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -07001018 char number_type;
1019 char number_plan;
1020 char pi;
1021 char si;
1022} RIL_CDMA_NumberInfoRecord;
1023
1024/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1025typedef enum {
1026 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1027 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1028 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1029 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1030 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1031 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1032 RIL_REDIRECTING_REASON_RESERVED
1033} RIL_CDMA_RedirectingReason;
1034
1035typedef struct {
1036 RIL_CDMA_NumberInfoRecord redirectingNumber;
1037 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1038 RIL_CDMA_RedirectingReason redirectingReason;
1039} RIL_CDMA_RedirectingNumberInfoRecord;
1040
1041/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1042typedef struct {
1043 char lineCtrlPolarityIncluded;
1044 char lineCtrlToggle;
1045 char lineCtrlReverse;
1046 char lineCtrlPowerDenial;
1047} RIL_CDMA_LineControlInfoRecord;
1048
1049/* T53 CLIR Information Record */
1050typedef struct {
1051 char cause;
1052} RIL_CDMA_T53_CLIRInfoRecord;
1053
1054/* T53 Audio Control Information Record */
1055typedef struct {
1056 char upLink;
1057 char downLink;
1058} RIL_CDMA_T53_AudioControlInfoRecord;
1059
1060typedef struct {
1061
1062 RIL_CDMA_InfoRecName name;
1063
1064 union {
1065 /* Display and Extended Display Info Rec */
1066 RIL_CDMA_DisplayInfoRecord display;
1067
1068 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1069 RIL_CDMA_NumberInfoRecord number;
1070
1071 /* Signal Info Rec */
1072 RIL_CDMA_SignalInfoRecord signal;
1073
1074 /* Redirecting Number Info Rec */
1075 RIL_CDMA_RedirectingNumberInfoRecord redir;
1076
1077 /* Line Control Info Rec */
1078 RIL_CDMA_LineControlInfoRecord lineCtrl;
1079
1080 /* T53 CLIR Info Rec */
1081 RIL_CDMA_T53_CLIRInfoRecord clir;
1082
1083 /* T53 Audio Control Info Rec */
1084 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1085 } rec;
1086} RIL_CDMA_InformationRecord;
1087
1088#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1089
Etan Cohend3652192014-06-20 08:28:44 -07001090#define RIL_HARDWARE_CONFIG_UUID_LENGTH 64
1091
Wink Saville1b5fd232009-04-22 14:50:00 -07001092typedef struct {
1093 char numberOfInfoRecs;
1094 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1095} RIL_CDMA_InformationRecords;
1096
Jake Hamby8a4a2332014-01-15 13:12:05 -08001097/* See RIL_REQUEST_NV_READ_ITEM */
1098typedef struct {
1099 RIL_NV_Item itemID;
1100} RIL_NV_ReadItem;
1101
1102/* See RIL_REQUEST_NV_WRITE_ITEM */
1103typedef struct {
1104 RIL_NV_Item itemID;
1105 char * value;
1106} RIL_NV_WriteItem;
1107
Etan Cohend3652192014-06-20 08:28:44 -07001108typedef enum {
1109 HANDOVER_STARTED = 0,
1110 HANDOVER_COMPLETED = 1,
1111 HANDOVER_FAILED = 2,
1112 HANDOVER_CANCELED = 3
1113} RIL_SrvccState;
1114
1115/* hardware configuration reported to RILJ. */
1116typedef enum {
1117 RIL_HARDWARE_CONFIG_MODEM = 0,
1118 RIL_HARDWARE_CONFIG_SIM = 1,
1119} RIL_HardwareConfig_Type;
1120
1121typedef enum {
1122 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1123 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1124 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1125} RIL_HardwareConfig_State;
1126
1127typedef struct {
1128 int rilModel;
1129 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1130 int maxVoice;
1131 int maxData;
1132 int maxStandby;
1133} RIL_HardwareConfig_Modem;
1134
1135typedef struct {
1136 char modemUuid[RIL_HARDWARE_CONFIG_UUID_LENGTH];
1137} RIL_HardwareConfig_Sim;
1138
1139typedef struct {
1140 RIL_HardwareConfig_Type type;
1141 char uuid[RIL_HARDWARE_CONFIG_UUID_LENGTH];
1142 RIL_HardwareConfig_State state;
1143 union {
1144 RIL_HardwareConfig_Modem modem;
1145 RIL_HardwareConfig_Sim sim;
1146 } cfg;
1147} RIL_HardwareConfig;
1148
Wink Saville7f856802009-06-09 10:23:37 -07001149/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001150 * RIL_REQUEST_GET_SIM_STATUS
1151 *
1152 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -07001153 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001154 * "data" is NULL
1155 *
Wink Savillefd729372011-02-22 16:19:39 -08001156 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001157 *
1158 * Valid errors:
1159 * Must never fail
1160 */
1161#define RIL_REQUEST_GET_SIM_STATUS 1
1162
1163/**
1164 * RIL_REQUEST_ENTER_SIM_PIN
1165 *
John Wang309ac292009-07-30 14:53:23 -07001166 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001167 *
1168 * "data" is const char **
1169 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001170 * ((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 -08001171 *
jsh593c9102009-06-24 16:13:44 -07001172 * "response" is int *
1173 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001174 *
1175 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001176 *
1177 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001178 * RADIO_NOT_AVAILABLE (radio resetting)
1179 * GENERIC_FAILURE
1180 * PASSWORD_INCORRECT
1181 */
1182
1183#define RIL_REQUEST_ENTER_SIM_PIN 2
1184
1185
1186/**
1187 * RIL_REQUEST_ENTER_SIM_PUK
1188 *
Wink Saville7f856802009-06-09 10:23:37 -07001189 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001190 *
1191 * "data" is const char **
1192 * ((const char **)data)[0] is PUK value
1193 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001194 * ((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 -08001195 *
jsh593c9102009-06-24 16:13:44 -07001196 * "response" is int *
1197 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001198 *
1199 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001200 *
1201 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001202 * RADIO_NOT_AVAILABLE (radio resetting)
1203 * GENERIC_FAILURE
1204 * PASSWORD_INCORRECT
1205 * (PUK is invalid)
1206 */
1207
1208#define RIL_REQUEST_ENTER_SIM_PUK 3
1209
1210/**
1211 * RIL_REQUEST_ENTER_SIM_PIN2
1212 *
1213 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
1214 * returned as a a failure from a previous operation.
1215 *
1216 * "data" is const char **
1217 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001218 * ((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 -08001219 *
jsh593c9102009-06-24 16:13:44 -07001220 * "response" is int *
1221 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001222 *
1223 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001224 *
1225 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001226 * RADIO_NOT_AVAILABLE (radio resetting)
1227 * GENERIC_FAILURE
1228 * PASSWORD_INCORRECT
1229 */
1230
1231#define RIL_REQUEST_ENTER_SIM_PIN2 4
1232
1233/**
1234 * RIL_REQUEST_ENTER_SIM_PUK2
1235 *
Wink Saville7f856802009-06-09 10:23:37 -07001236 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001237 *
1238 * "data" is const char **
1239 * ((const char **)data)[0] is PUK2 value
1240 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001241 * ((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 -08001242 *
jsh593c9102009-06-24 16:13:44 -07001243 * "response" is int *
1244 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001245 *
1246 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001247 *
1248 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001249 * RADIO_NOT_AVAILABLE (radio resetting)
1250 * GENERIC_FAILURE
1251 * PASSWORD_INCORRECT
1252 * (PUK2 is invalid)
1253 */
1254
1255#define RIL_REQUEST_ENTER_SIM_PUK2 5
1256
1257/**
1258 * RIL_REQUEST_CHANGE_SIM_PIN
1259 *
Wink Saville7f856802009-06-09 10:23:37 -07001260 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001261 *
1262 * "data" is const char **
1263 * ((const char **)data)[0] is old PIN value
1264 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -08001265 * ((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 -08001266 *
jsh593c9102009-06-24 16:13:44 -07001267 * "response" is int *
1268 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001269 *
1270 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001271 *
1272 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001273 * RADIO_NOT_AVAILABLE (radio resetting)
1274 * GENERIC_FAILURE
1275 * PASSWORD_INCORRECT
1276 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001277 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001278 */
1279
1280#define RIL_REQUEST_CHANGE_SIM_PIN 6
1281
1282
1283/**
1284 * RIL_REQUEST_CHANGE_SIM_PIN2
1285 *
Wink Saville7f856802009-06-09 10:23:37 -07001286 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001287 *
1288 * "data" is const char **
1289 * ((const char **)data)[0] is old PIN2 value
1290 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -08001291 * ((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 -08001292 *
jsh593c9102009-06-24 16:13:44 -07001293 * "response" is int *
1294 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001295 *
1296 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001297 *
1298 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001299 * RADIO_NOT_AVAILABLE (radio resetting)
1300 * GENERIC_FAILURE
1301 * PASSWORD_INCORRECT
1302 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -07001303 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001304 */
1305
1306#define RIL_REQUEST_CHANGE_SIM_PIN2 7
1307
1308/**
1309 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
1310 *
1311 * Requests that network personlization be deactivated
1312 *
1313 * "data" is const char **
1314 * ((const char **)(data))[0]] is network depersonlization code
1315 *
jsh593c9102009-06-24 16:13:44 -07001316 * "response" is int *
1317 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001318 *
1319 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001320 *
1321 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001322 * RADIO_NOT_AVAILABLE (radio resetting)
1323 * GENERIC_FAILURE
1324 * PASSWORD_INCORRECT
1325 * (code is invalid)
1326 */
1327
1328#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
1329
1330/**
Wink Saville7f856802009-06-09 10:23:37 -07001331 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001332 *
1333 * Requests current call list
1334 *
1335 * "data" is NULL
1336 *
1337 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07001338 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001339 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001340 *
1341 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001342 * RADIO_NOT_AVAILABLE (radio resetting)
1343 * GENERIC_FAILURE
1344 * (request will be made again in a few hundred msec)
1345 */
1346
1347#define RIL_REQUEST_GET_CURRENT_CALLS 9
1348
1349
Wink Saville7f856802009-06-09 10:23:37 -07001350/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001351 * RIL_REQUEST_DIAL
1352 *
1353 * Initiate voice call
1354 *
1355 * "data" is const RIL_Dial *
1356 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001357 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001358 * This method is never used for supplementary service codes
1359 *
1360 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001361 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001362 * RADIO_NOT_AVAILABLE (radio resetting)
1363 * GENERIC_FAILURE
1364 */
1365#define RIL_REQUEST_DIAL 10
1366
1367/**
1368 * RIL_REQUEST_GET_IMSI
1369 *
1370 * Get the SIM IMSI
1371 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08001372 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001373 *
Wink Savillec0114b32011-02-18 10:14:07 -08001374 * "data" is const char **
1375 * ((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 -08001376 * "response" is a const char * containing the IMSI
1377 *
1378 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001379 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001380 * RADIO_NOT_AVAILABLE (radio resetting)
1381 * GENERIC_FAILURE
1382 */
1383
1384#define RIL_REQUEST_GET_IMSI 11
1385
1386/**
1387 * RIL_REQUEST_HANGUP
1388 *
1389 * Hang up a specific line (like AT+CHLD=1x)
1390 *
John Wang06bae4b2010-11-18 16:37:09 -08001391 * After this HANGUP request returns, RIL should show the connection is NOT
1392 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1393 *
Wink Saville7f856802009-06-09 10:23:37 -07001394 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001395 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001396 *
1397 * "response" is NULL
1398 *
1399 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001400 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001401 * RADIO_NOT_AVAILABLE (radio resetting)
1402 * GENERIC_FAILURE
1403 */
1404
1405#define RIL_REQUEST_HANGUP 12
1406
1407/**
1408 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
1409 *
1410 * Hang up waiting or held (like AT+CHLD=0)
1411 *
John Wang06bae4b2010-11-18 16:37:09 -08001412 * After this HANGUP request returns, RIL should show the connection is NOT
1413 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1414 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001415 * "data" is NULL
1416 * "response" is NULL
1417 *
1418 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001419 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001420 * RADIO_NOT_AVAILABLE (radio resetting)
1421 * GENERIC_FAILURE
1422 */
1423
1424#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
1425
1426/**
1427 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
1428 *
1429 * Hang up waiting or held (like AT+CHLD=1)
1430 *
John Wang06bae4b2010-11-18 16:37:09 -08001431 * After this HANGUP request returns, RIL should show the connection is NOT
1432 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1433 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001434 * "data" is NULL
1435 * "response" is NULL
1436 *
1437 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001438 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001439 * RADIO_NOT_AVAILABLE (radio resetting)
1440 * GENERIC_FAILURE
1441 */
1442
1443#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
1444
1445/**
1446 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
1447 *
1448 * Switch waiting or holding call and active call (like AT+CHLD=2)
1449 *
1450 * State transitions should be is follows:
1451 *
1452 * If call 1 is waiting and call 2 is active, then if this re
1453 *
1454 * BEFORE AFTER
1455 * Call 1 Call 2 Call 1 Call 2
1456 * ACTIVE HOLDING HOLDING ACTIVE
1457 * ACTIVE WAITING HOLDING ACTIVE
1458 * HOLDING WAITING HOLDING ACTIVE
1459 * ACTIVE IDLE HOLDING IDLE
1460 * IDLE IDLE IDLE IDLE
1461 *
1462 * "data" is NULL
1463 * "response" is NULL
1464 *
1465 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001466 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001467 * RADIO_NOT_AVAILABLE (radio resetting)
1468 * GENERIC_FAILURE
1469 */
1470
1471#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
1472#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
1473
1474/**
1475 * RIL_REQUEST_CONFERENCE
1476 *
1477 * Conference holding and active (like AT+CHLD=3)
1478
1479 * "data" is NULL
1480 * "response" is NULL
1481 *
1482 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001483 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001484 * RADIO_NOT_AVAILABLE (radio resetting)
1485 * GENERIC_FAILURE
1486 */
1487#define RIL_REQUEST_CONFERENCE 16
1488
1489/**
1490 * RIL_REQUEST_UDUB
1491 *
Wink Saville7f856802009-06-09 10:23:37 -07001492 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001493 * waiting call answer)(RIL_BasicRequest r);
1494 *
1495 * "data" is NULL
1496 * "response" is NULL
1497 *
1498 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001499 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001500 * RADIO_NOT_AVAILABLE (radio resetting)
1501 * GENERIC_FAILURE
1502 */
1503#define RIL_REQUEST_UDUB 17
1504
1505/**
1506 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1507 *
1508 * Requests the failure cause code for the most recently terminated call
1509 *
1510 * "data" is NULL
1511 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -07001512 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001513 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
1514 * failure reasons are derived from the possible call failure scenarios
1515 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001516 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08001517 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
1518 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
1519 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001520 * If the implementation does not have access to the exact cause codes,
1521 * then it should return one of the values listed in RIL_LastCallFailCause,
1522 * as the UI layer needs to distinguish these cases for tone generation or
1523 * error notification.
1524 *
1525 * Valid errors:
1526 * SUCCESS
1527 * RADIO_NOT_AVAILABLE
1528 * GENERIC_FAILURE
1529 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001530 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001531 */
1532#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
1533
1534/**
1535 * RIL_REQUEST_SIGNAL_STRENGTH
1536 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001537 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001538 *
1539 * Must succeed if radio is on.
1540 *
1541 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07001542 *
1543 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001544 *
1545 * Valid errors:
1546 * SUCCESS
1547 * RADIO_NOT_AVAILABLE
1548 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001549#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07001550
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001551/**
Wink Savillec0114b32011-02-18 10:14:07 -08001552 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001553 *
1554 * Request current registration state
1555 *
1556 * "data" is NULL
1557 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -07001558 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -07001559 * 0 - Not registered, MT is not currently searching
1560 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001561 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -07001562 * 2 - Not registered, but MT is currently searching
1563 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001564 * 3 - Registration denied
1565 * 4 - Unknown
1566 * 5 - Registered, roaming
John Wang7f8ded12010-01-21 15:07:28 -08001567 * 10 - Same as 0, but indicates that emergency calls
1568 * are enabled.
1569 * 12 - Same as 2, but indicates that emergency calls
1570 * are enabled.
1571 * 13 - Same as 3, but indicates that emergency calls
1572 * are enabled.
1573 * 14 - Same as 4, but indicates that emergency calls
1574 * are enabled.
1575 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001576 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1577 * NULL if not.Valid LAC are 0x0000 - 0xffff
1578 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1579 * NULL if not.
1580 * Valid CID are 0x00000000 - 0xffffffff
1581 * In GSM, CID is Cell ID (see TS 27.007)
1582 * in 16 bits
1583 * In UMTS, CID is UMTS Cell Identity
1584 * (see TS 25.331) in 28 bits
Wink Saville43808972011-01-13 17:39:51 -08001585 * ((const char **)response)[3] indicates the available voice radio technology,
1586 * valid values as defined by RIL_RadioTechnology.
Wink Saville1b5fd232009-04-22 14:50:00 -07001587 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1588 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07001589 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07001590 * ((const char **)response)[5] is Base Station latitude if registered on a
1591 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001592 * latitude is a decimal number as specified in
1593 * 3GPP2 C.S0005-A v6.0. It is represented in
1594 * units of 0.25 seconds and ranges from -1296000
1595 * to 1296000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08001596 * to a range of -90 to +90 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07001597 * ((const char **)response)[6] is Base Station longitude if registered on a
1598 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001599 * longitude is a decimal number as specified in
1600 * 3GPP2 C.S0005-A v6.0. It is represented in
1601 * units of 0.25 seconds and ranges from -2592000
1602 * to 2592000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08001603 * to a range of -180 to +180 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07001604 * ((const char **)response)[7] is concurrent services support indicator if
1605 * registered on a CDMA system 0-1.
1606 * 0 - Concurrent services not supported,
1607 * 1 - Concurrent services supported
1608 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1609 * NULL if not. Valid System ID are 0 - 32767
1610 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1611 * NULL if not. Valid System ID are 0 - 65535
1612 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001613 * on a CDMA or EVDO system or NULL if not. Valid values
Wink Saville1b5fd232009-04-22 14:50:00 -07001614 * are 0-255.
1615 * ((const char **)response)[11] indicates whether the current system is in the
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001616 * PRL if registered on a CDMA or EVDO system or NULL if
Wink Saville1b5fd232009-04-22 14:50:00 -07001617 * not. 0=not in the PRL, 1=in the PRL
1618 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001619 * if registered on a CDMA or EVDO system or NULL if not.
Wink Saville1b5fd232009-04-22 14:50:00 -07001620 * Valid values are 0-255.
1621 * ((const char **)response)[13] if registration state is 3 (Registration
1622 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07001623 * registration was denied. See 3GPP TS 24.008,
1624 * 10.5.3.6 and Annex G.
1625 * 0 - General
1626 * 1 - Authentication Failure
1627 * 2 - IMSI unknown in HLR
1628 * 3 - Illegal MS
1629 * 4 - Illegal ME
1630 * 5 - PLMN not allowed
1631 * 6 - Location area not allowed
1632 * 7 - Roaming not allowed
1633 * 8 - No Suitable Cells in this Location Area
1634 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07001635 * 10 - Persistent location update reject
Wink Savillec0114b32011-02-18 10:14:07 -08001636 * 11 - PLMN not allowed
1637 * 12 - Location area not allowed
1638 * 13 - Roaming not allowed in this Location Area
1639 * 15 - No Suitable Cells in this Location Area
1640 * 17 - Network Failure
1641 * 20 - MAC Failure
1642 * 21 - Sync Failure
1643 * 22 - Congestion
1644 * 23 - GSM Authentication unacceptable
1645 * 25 - Not Authorized for this CSG
1646 * 32 - Service option not supported
1647 * 33 - Requested service option not subscribed
1648 * 34 - Service option temporarily out of order
1649 * 38 - Call cannot be identified
1650 * 48-63 - Retry upon entry into a new cell
1651 * 95 - Semantically incorrect message
1652 * 96 - Invalid mandatory information
1653 * 97 - Message type non-existent or not implemented
1654 * 98 - Message not compatible with protocol state
1655 * 99 - Information element non-existent or not implemented
1656 * 100 - Conditional IE error
1657 * 101 - Message not compatible with protocol state
1658 * 111 - Protocol error, unspecified
jshca5e3472010-06-23 21:53:24 -07001659 * ((const char **)response)[14] is the Primary Scrambling Code of the current
1660 * cell as described in TS 25.331, in hexadecimal
1661 * format, or NULL if unknown or not registered
1662 * to a UMTS network.
Wink Saville1b5fd232009-04-22 14:50:00 -07001663 *
1664 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001665 * as "out of service" in the Android telephony system
1666 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001667 * Registration state 3 can be returned if Location Update Reject
1668 * (with cause 17 - Network Failure) is received repeatedly from the network,
1669 * to facilitate "managed roaming"
1670 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001671 * Valid errors:
1672 * SUCCESS
1673 * RADIO_NOT_AVAILABLE
1674 * GENERIC_FAILURE
1675 */
Wink Savillec0114b32011-02-18 10:14:07 -08001676#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001677
1678/**
Wink Savillec0114b32011-02-18 10:14:07 -08001679 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001680 *
Wink Savillec0114b32011-02-18 10:14:07 -08001681 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001682 *
1683 * "data" is NULL
1684 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08001685 * ((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 -08001686 * ((const char **)response)[1] is LAC if registered or NULL if not
1687 * ((const char **)response)[2] is CID if registered or NULL if not
Wink Saville43808972011-01-13 17:39:51 -08001688 * ((const char **)response)[3] indicates the available data radio technology,
1689 * valid values as defined by RIL_RadioTechnology.
Wink Savillec0114b32011-02-18 10:14:07 -08001690 * ((const char **)response)[4] if registration state is 3 (Registration
1691 * denied) this is an enumerated reason why
1692 * registration was denied. See 3GPP TS 24.008,
1693 * Annex G.6 "Additonal cause codes for GMM".
1694 * 7 == GPRS services not allowed
1695 * 8 == GPRS services and non-GPRS services not allowed
1696 * 9 == MS identity cannot be derived by the network
1697 * 10 == Implicitly detached
1698 * 14 == GPRS services not allowed in this PLMN
1699 * 16 == MSC temporarily not reachable
1700 * 40 == No PDP context activated
1701 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
1702 * established using RIL_REQUEST_SETUP_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001703 *
Wink Savilleae679532012-12-03 14:59:45 -08001704 * The values at offsets 6..10 are optional LTE location information in decimal.
1705 * If a value is unknown that value may be NULL. If all values are NULL,
1706 * none need to be present.
Wink Savilleea51a9d2012-09-15 07:54:06 -07001707 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
1708 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
1709 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
1710 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
1711 * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
1712 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001713 * LAC and CID are in hexadecimal format.
1714 * valid LAC are 0x0000 - 0xffff
1715 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07001716 *
1717 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001718 * as "out of service" in the Android telephony system
1719 *
1720 * Valid errors:
1721 * SUCCESS
1722 * RADIO_NOT_AVAILABLE
1723 * GENERIC_FAILURE
1724 */
Wink Savillec0114b32011-02-18 10:14:07 -08001725#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001726
1727/**
1728 * RIL_REQUEST_OPERATOR
1729 *
1730 * Request current operator ONS or EONS
1731 *
1732 * "data" is NULL
1733 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07001734 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001735 * or NULL if unregistered
1736 *
Wink Saville7f856802009-06-09 10:23:37 -07001737 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001738 * or NULL if unregistered
1739 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1740 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07001741 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001742 * Valid errors:
1743 * SUCCESS
1744 * RADIO_NOT_AVAILABLE
1745 * GENERIC_FAILURE
1746 */
1747#define RIL_REQUEST_OPERATOR 22
1748
1749/**
1750 * RIL_REQUEST_RADIO_POWER
1751 *
1752 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07001753 * If the radio is is turned off/on the radio modem subsystem
1754 * is expected return to an initialized state. For instance,
1755 * any voice and data calls will be terminated and all associated
1756 * lists emptied.
1757 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001758 * "data" is int *
1759 * ((int *)data)[0] is > 0 for "Radio On"
1760 * ((int *)data)[0] is == 0 for "Radio Off"
1761 *
1762 * "response" is NULL
1763 *
1764 * Turn radio on if "on" > 0
1765 * Turn radio off if "on" == 0
1766 *
1767 * Valid errors:
1768 * SUCCESS
1769 * RADIO_NOT_AVAILABLE
1770 * GENERIC_FAILURE
1771 */
1772#define RIL_REQUEST_RADIO_POWER 23
1773
1774/**
1775 * RIL_REQUEST_DTMF
1776 *
1777 * Send a DTMF tone
1778 *
1779 * If the implementation is currently playing a tone requested via
1780 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1781 * should be played instead
1782 *
jsh602f80f2009-07-10 15:44:37 -07001783 * "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 -08001784 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001785 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001786 * FIXME should this block/mute microphone?
1787 * How does this interact with local DTMF feedback?
1788 *
1789 * Valid errors:
1790 * SUCCESS
1791 * RADIO_NOT_AVAILABLE
1792 * GENERIC_FAILURE
1793 *
1794 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1795 *
1796 */
1797#define RIL_REQUEST_DTMF 24
1798
1799/**
1800 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07001801 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001802 * Send an SMS message
1803 *
1804 * "data" is const char **
1805 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1806 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1807 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1808 * less the SMSC address
1809 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1810 *
1811 * "response" is a const RIL_SMS_Response *
1812 *
1813 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001814 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001815 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1816 *
1817 * Valid errors:
1818 * SUCCESS
1819 * RADIO_NOT_AVAILABLE
1820 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07001821 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001822 * GENERIC_FAILURE
1823 *
1824 * FIXME how do we specify TP-Message-Reference if we need to resend?
1825 */
1826#define RIL_REQUEST_SEND_SMS 25
1827
1828
1829/**
1830 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07001831 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001832 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1833 * except that more messages are expected to be sent soon. If possible,
1834 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1835 *
1836 * "data" is const char **
1837 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1838 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1839 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1840 * less the SMSC address
1841 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1842 *
1843 * "response" is a const RIL_SMS_Response *
1844 *
1845 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001846 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001847 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1848 *
1849 * Valid errors:
1850 * SUCCESS
1851 * RADIO_NOT_AVAILABLE
1852 * SMS_SEND_FAIL_RETRY
1853 * GENERIC_FAILURE
1854 *
1855 */
1856#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1857
1858
1859/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001860 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001861 *
Wink Saville29487ef2011-04-15 09:15:31 -07001862 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
1863 * return success it is added to the list of data calls and a
1864 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
1865 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
1866 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
1867 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001868 *
Wink Saville43808972011-01-13 17:39:51 -08001869 * The RIL is expected to:
1870 * - Create one data call context.
1871 * - Create and configure a dedicated interface for the context
1872 * - The interface must be point to point.
1873 * - The interface is configured with one or more addresses and
1874 * is capable of sending and receiving packets. The prefix length
1875 * of the addresses must be /32 for IPv4 and /128 for IPv6.
1876 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08001877 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08001878 * number of simultaneous data call contexts.
1879 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001880 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08001881 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
1882 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07001883 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07001884 * ((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 -07001885 * override the one in the profile. NULL indicates no APN overrride.
1886 * ((const char **)data)[3] is the username for APN, or NULL
1887 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07001888 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
1889 * 0 => PAP and CHAP is never performed.
1890 * 1 => PAP may be performed; CHAP is never performed.
1891 * 2 => CHAP may be performed; PAP is never performed.
1892 * 3 => PAP / CHAP may be performed - baseband dependent.
Wink Savillec0114b32011-02-18 10:14:07 -08001893 * ((const char **)data)[6] is the connection type to request must be one of the
1894 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07001895 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Wink Savillec0114b32011-02-18 10:14:07 -08001896 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001897 *
Wink Savillec0114b32011-02-18 10:14:07 -08001898 * "response" is a RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001899 *
1900 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07001901 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001902 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08001903 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08001904 * the RIL_Data_Call_Response_v6.status containing the actual status.
1905 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08001906 *
1907 * Other errors could include:
1908 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
1909 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001910 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001911 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001912 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001913#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001914
1915
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001916/**
1917 * RIL_REQUEST_SIM_IO
1918 *
1919 * Request SIM I/O operation.
1920 * This is similar to the TS 27.007 "restricted SIM" operation
1921 * where it assumes all of the EF selection will be done by the
1922 * callee.
1923 *
Wink Savillefd729372011-02-22 16:19:39 -08001924 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001925 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1926 * or may specify a PIN2 for operations that require a PIN2 (eg
1927 * updating FDN records)
1928 *
1929 * "response" is a const RIL_SIM_IO_Response *
1930 *
1931 * Arguments and responses that are unused for certain
1932 * values of "command" should be ignored or set to NULL
1933 *
1934 * Valid errors:
1935 * SUCCESS
1936 * RADIO_NOT_AVAILABLE
1937 * GENERIC_FAILURE
1938 * SIM_PIN2
1939 * SIM_PUK2
1940 */
1941#define RIL_REQUEST_SIM_IO 28
1942
1943/**
1944 * RIL_REQUEST_SEND_USSD
1945 *
1946 * Send a USSD message
1947 *
1948 * If a USSD session already exists, the message should be sent in the
1949 * context of that session. Otherwise, a new session should be created.
1950 *
1951 * The network reply should be reported via RIL_UNSOL_ON_USSD
1952 *
1953 * Only one USSD session may exist at a time, and the session is assumed
1954 * to exist until:
1955 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1956 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1957 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1958 *
1959 * "data" is a const char * containing the USSD request in UTF-8 format
1960 * "response" is NULL
1961 *
1962 * Valid errors:
1963 * SUCCESS
1964 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07001965 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001966 * GENERIC_FAILURE
1967 *
1968 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1969 */
1970
1971#define RIL_REQUEST_SEND_USSD 29
1972
1973/**
1974 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07001975 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001976 * Cancel the current USSD session if one exists
1977 *
1978 * "data" is null
1979 * "response" is NULL
1980 *
1981 * Valid errors:
1982 * SUCCESS
1983 * RADIO_NOT_AVAILABLE
Wink Saville7f856802009-06-09 10:23:37 -07001984 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001985 */
1986
1987#define RIL_REQUEST_CANCEL_USSD 30
1988
Wink Saville7f856802009-06-09 10:23:37 -07001989/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001990 * RIL_REQUEST_GET_CLIR
1991 *
1992 * Gets current CLIR status
1993 * "data" is NULL
1994 * "response" is int *
1995 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1996 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
1997 *
1998 * Valid errors:
1999 * SUCCESS
2000 * RADIO_NOT_AVAILABLE
2001 * GENERIC_FAILURE
2002 */
2003#define RIL_REQUEST_GET_CLIR 31
2004
2005/**
2006 * RIL_REQUEST_SET_CLIR
2007 *
2008 * "data" is int *
2009 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2010 *
2011 * "response" is NULL
2012 *
2013 * Valid errors:
2014 * SUCCESS
2015 * RADIO_NOT_AVAILABLE
2016 * GENERIC_FAILURE
2017 */
2018#define RIL_REQUEST_SET_CLIR 32
2019
2020/**
2021 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2022 *
2023 * "data" is const RIL_CallForwardInfo *
2024 *
2025 * "response" is const RIL_CallForwardInfo **
2026 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2027 * each distinct registered phone number.
2028 *
2029 * For example, if data is forwarded to +18005551212 and voice is forwarded
2030 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07002031 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002032 * If, however, both data and voice are forwarded to +18005551212, then
2033 * a single RIL_CallForwardInfo can be returned with the service class
2034 * set to "data + voice = 3")
2035 *
2036 * Valid errors:
2037 * SUCCESS
2038 * RADIO_NOT_AVAILABLE
2039 * GENERIC_FAILURE
2040 */
2041#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2042
2043
2044/**
2045 * RIL_REQUEST_SET_CALL_FORWARD
2046 *
2047 * Configure call forward rule
2048 *
2049 * "data" is const RIL_CallForwardInfo *
2050 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002051 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002052 * Valid errors:
2053 * SUCCESS
2054 * RADIO_NOT_AVAILABLE
2055 * GENERIC_FAILURE
2056 */
2057#define RIL_REQUEST_SET_CALL_FORWARD 34
2058
2059
2060/**
2061 * RIL_REQUEST_QUERY_CALL_WAITING
2062 *
2063 * Query current call waiting state
2064 *
2065 * "data" is const int *
2066 * ((const int *)data)[0] is the TS 27.007 service class to query.
2067 * "response" is a const int *
2068 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2069 *
2070 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2071 * must follow, with the TS 27.007 service class bit vector of services
2072 * for which call waiting is enabled.
2073 *
Wink Saville7f856802009-06-09 10:23:37 -07002074 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002075 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2076 * and voice and disabled for everything else
2077 *
2078 * Valid errors:
2079 * SUCCESS
2080 * RADIO_NOT_AVAILABLE
2081 * GENERIC_FAILURE
2082 */
2083#define RIL_REQUEST_QUERY_CALL_WAITING 35
2084
2085
2086/**
2087 * RIL_REQUEST_SET_CALL_WAITING
2088 *
2089 * Configure current call waiting state
2090 *
2091 * "data" is const int *
2092 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2093 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2094 * services to modify
2095 * "response" is NULL
2096 *
2097 * Valid errors:
2098 * SUCCESS
2099 * RADIO_NOT_AVAILABLE
2100 * GENERIC_FAILURE
2101 */
2102#define RIL_REQUEST_SET_CALL_WAITING 36
2103
2104/**
2105 * RIL_REQUEST_SMS_ACKNOWLEDGE
2106 *
2107 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07002108 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002109 *
2110 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07002111 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002112 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07002113 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002114 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07002115 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
2116 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
2117 * capacity exceeded) and 0xFF (unspecified error) are
2118 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002119 *
2120 * "response" is NULL
2121 *
2122 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
2123 *
2124 * Valid errors:
2125 * SUCCESS
2126 * RADIO_NOT_AVAILABLE
2127 * GENERIC_FAILURE
2128 */
2129#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
2130
2131/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002132 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002133 *
2134 * Get the device IMEI, including check digit
2135 *
johnwangf8bc1672009-05-14 19:19:47 -07002136 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002137 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2138 *
2139 * "data" is NULL
2140 * "response" is a const char * containing the IMEI
2141 *
2142 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002143 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002144 * RADIO_NOT_AVAILABLE (radio resetting)
2145 * GENERIC_FAILURE
2146 */
2147
2148#define RIL_REQUEST_GET_IMEI 38
2149
2150/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002151 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002152 *
2153 * Get the device IMEISV, which should be two decimal digits
2154 *
johnwangf8bc1672009-05-14 19:19:47 -07002155 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002156 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2157 *
2158 * "data" is NULL
2159 * "response" is a const char * containing the IMEISV
2160 *
2161 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002162 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002163 * RADIO_NOT_AVAILABLE (radio resetting)
2164 * GENERIC_FAILURE
2165 */
2166
2167#define RIL_REQUEST_GET_IMEISV 39
2168
2169
2170/**
2171 * RIL_REQUEST_ANSWER
2172 *
2173 * Answer incoming call
2174 *
2175 * Will not be called for WAITING calls.
2176 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
2177 * instead
2178 *
2179 * "data" is NULL
2180 * "response" is NULL
2181 *
2182 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002183 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002184 * RADIO_NOT_AVAILABLE (radio resetting)
2185 * GENERIC_FAILURE
2186 */
2187
2188#define RIL_REQUEST_ANSWER 40
2189
2190/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002191 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002192 *
Wink Saville29487ef2011-04-15 09:15:31 -07002193 * Deactivate packet data connection and remove from the
2194 * data call list if SUCCESS is returned. Any other return
2195 * values should also try to remove the call from the list,
2196 * but that may not be possible. In any event a
2197 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
2198 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
2199 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002200 *
2201 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07002202 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06002203 * ((char**)data)[1] indicating Disconnect Reason
2204 * 0 => No specific reason specified
2205 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07002206 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002207 * "response" is NULL
2208 *
2209 * Valid errors:
2210 * SUCCESS
2211 * RADIO_NOT_AVAILABLE
2212 * GENERIC_FAILURE
2213 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002214 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002215 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002216#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002217
2218/**
2219 * RIL_REQUEST_QUERY_FACILITY_LOCK
2220 *
2221 * Query the status of a facility lock state
2222 *
2223 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07002224 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002225 * (eg "AO" for BAOC, "SC" for SIM lock)
2226 * ((const char **)data)[1] is the password, or "" if not required
2227 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
2228 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08002229 * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
Wink Savillefd729372011-02-22 16:19:39 -08002230 * This is only applicable in the case of Fixed Dialing Numbers
2231 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002232 *
2233 * "response" is an int *
2234 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07002235 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002236 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07002237 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002238 *
2239 * Valid errors:
2240 * SUCCESS
2241 * RADIO_NOT_AVAILABLE
2242 * GENERIC_FAILURE
2243 *
2244 */
2245#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
2246
2247/**
2248 * RIL_REQUEST_SET_FACILITY_LOCK
2249 *
2250 * Enable/disable one facility lock
2251 *
2252 * "data" is const char **
2253 *
2254 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2255 * (eg "AO" for BAOC)
2256 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
2257 * ((const char **)data)[2] = password
2258 * ((const char **)data)[3] = string representation of decimal TS 27.007
2259 * service class bit vector. Eg, the string
2260 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08002261 * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
Wink Savillefd729372011-02-22 16:19:39 -08002262 * This is only applicable in the case of Fixed Dialing Numbers
2263 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002264 *
jsh593c9102009-06-24 16:13:44 -07002265 * "response" is int *
2266 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002267 *
2268 * Valid errors:
2269 * SUCCESS
2270 * RADIO_NOT_AVAILABLE
2271 * GENERIC_FAILURE
2272 *
2273 */
2274#define RIL_REQUEST_SET_FACILITY_LOCK 43
2275
2276/**
2277 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
2278 *
2279 * Change call barring facility password
2280 *
2281 * "data" is const char **
2282 *
2283 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2284 * (eg "AO" for BAOC)
2285 * ((const char **)data)[1] = old password
2286 * ((const char **)data)[2] = new password
2287 *
Wink Saville7f856802009-06-09 10:23:37 -07002288 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002289 *
2290 * Valid errors:
2291 * SUCCESS
2292 * RADIO_NOT_AVAILABLE
2293 * GENERIC_FAILURE
2294 *
2295 */
2296#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
2297
2298/**
2299 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
2300 *
2301 * Query current network selectin mode
2302 *
2303 * "data" is NULL
2304 *
2305 * "response" is int *
2306 * ((const int *)response)[0] is
2307 * 0 for automatic selection
2308 * 1 for manual selection
2309 *
2310 * Valid errors:
2311 * SUCCESS
2312 * RADIO_NOT_AVAILABLE
2313 * GENERIC_FAILURE
2314 *
2315 */
2316#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
2317
2318/**
2319 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
2320 *
2321 * Specify that the network should be selected automatically
2322 *
2323 * "data" is NULL
2324 * "response" is NULL
2325 *
Wink Saville7f856802009-06-09 10:23:37 -07002326 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002327 * and registered
2328 *
2329 * Valid errors:
2330 * SUCCESS
2331 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07002332 * ILLEGAL_SIM_OR_ME
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002333 * GENERIC_FAILURE
2334 *
John Wang75534472010-04-20 15:11:42 -07002335 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2336 * no retries needed, such as illegal SIM or ME.
2337 * Returns GENERIC_FAILURE for all other causes that might be
2338 * fixed by retries.
2339 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002340 */
2341#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
2342
2343/**
2344 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
2345 *
2346 * Manually select a specified network.
2347 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002348 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
2349 * "response" is NULL
2350 *
Wink Saville7f856802009-06-09 10:23:37 -07002351 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002352 * and registered
2353 *
2354 * Valid errors:
2355 * SUCCESS
2356 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07002357 * ILLEGAL_SIM_OR_ME
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002358 * GENERIC_FAILURE
2359 *
John Wang75534472010-04-20 15:11:42 -07002360 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2361 * no retries needed, such as illegal SIM or ME.
2362 * Returns GENERIC_FAILURE for all other causes that might be
2363 * fixed by retries.
2364 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002365 */
2366#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
2367
2368/**
2369 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
2370 *
2371 * Scans for available networks
2372 *
2373 * "data" is NULL
2374 * "response" is const char ** that should be an array of n*4 strings, where
2375 * n is the number of available networks
2376 * For each available network:
2377 *
Wink Saville7f856802009-06-09 10:23:37 -07002378 * ((const char **)response)[n+0] is long alpha ONS or EONS
2379 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002380 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
2381 * ((const char **)response)[n+3] is a string value of the status:
2382 * "unknown"
2383 * "available"
2384 * "current"
2385 * "forbidden"
2386 *
Wink Saville7f856802009-06-09 10:23:37 -07002387 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002388 * and registered
2389 *
2390 * Valid errors:
2391 * SUCCESS
2392 * RADIO_NOT_AVAILABLE
2393 * GENERIC_FAILURE
2394 *
2395 */
2396#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
2397
2398/**
2399 * RIL_REQUEST_DTMF_START
2400 *
Wink Saville7f856802009-06-09 10:23:37 -07002401 * Start playing a DTMF tone. Continue playing DTMF tone until
2402 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002403 *
2404 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
2405 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07002406 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002407 * "data" is a char *
2408 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
2409 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002410 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002411 * Valid errors:
2412 * SUCCESS
2413 * RADIO_NOT_AVAILABLE
2414 * GENERIC_FAILURE
2415 *
2416 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
2417 */
2418#define RIL_REQUEST_DTMF_START 49
2419
2420/**
2421 * RIL_REQUEST_DTMF_STOP
2422 *
2423 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07002424 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002425 * "data" is NULL
2426 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002427 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002428 * Valid errors:
2429 * SUCCESS
2430 * RADIO_NOT_AVAILABLE
2431 * GENERIC_FAILURE
2432 *
2433 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
2434 */
2435#define RIL_REQUEST_DTMF_STOP 50
2436
2437/**
2438 * RIL_REQUEST_BASEBAND_VERSION
2439 *
2440 * Return string value indicating baseband version, eg
2441 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07002442 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002443 * "data" is NULL
2444 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07002445 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002446 * Valid errors:
2447 * SUCCESS
2448 * RADIO_NOT_AVAILABLE
2449 * GENERIC_FAILURE
2450 *
2451 */
2452#define RIL_REQUEST_BASEBAND_VERSION 51
2453
2454/**
2455 * RIL_REQUEST_SEPARATE_CONNECTION
2456 *
2457 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07002458 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002459 * as the only other member of the current (active) call
2460 *
2461 * Like AT+CHLD=2x
2462 *
2463 * See TS 22.084 1.3.8.2 (iii)
2464 * TS 22.030 6.5.5 "Entering "2X followed by send"
2465 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07002466 *
2467 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002468 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
2469 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002470 * "response" is NULL
2471 *
2472 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002473 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002474 * RADIO_NOT_AVAILABLE (radio resetting)
2475 * GENERIC_FAILURE
2476 */
2477#define RIL_REQUEST_SEPARATE_CONNECTION 52
2478
2479
2480/**
2481 * RIL_REQUEST_SET_MUTE
2482 *
2483 * Turn on or off uplink (microphone) mute.
2484 *
2485 * Will only be sent while voice call is active.
2486 * Will always be reset to "disable mute" when a new voice call is initiated
2487 *
2488 * "data" is an int *
2489 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
2490 *
2491 * "response" is NULL
2492 *
2493 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002494 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002495 * RADIO_NOT_AVAILABLE (radio resetting)
2496 * GENERIC_FAILURE
2497 */
2498
2499#define RIL_REQUEST_SET_MUTE 53
2500
2501/**
2502 * RIL_REQUEST_GET_MUTE
2503 *
2504 * Queries the current state of the uplink mute setting
2505 *
2506 * "data" is NULL
2507 * "response" is an int *
2508 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
2509 *
2510 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002511 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002512 * RADIO_NOT_AVAILABLE (radio resetting)
2513 * GENERIC_FAILURE
2514 */
2515
2516#define RIL_REQUEST_GET_MUTE 54
2517
2518/**
2519 * RIL_REQUEST_QUERY_CLIP
2520 *
2521 * Queries the status of the CLIP supplementary service
2522 *
2523 * (for MMI code "*#30#")
2524 *
2525 * "data" is NULL
2526 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07002527 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002528 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07002529 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002530 *
2531 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002532 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002533 * RADIO_NOT_AVAILABLE (radio resetting)
2534 * GENERIC_FAILURE
2535 */
2536
2537#define RIL_REQUEST_QUERY_CLIP 55
2538
2539/**
Wink Savillec0114b32011-02-18 10:14:07 -08002540 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
2541 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07002542 *
2543 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07002544 * context or CDMA data connection active
2545 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002546 *
2547 * "data" is NULL
2548 *
2549 * "response" is a "int *"
2550 * ((int *)response)[0] is an integer cause code defined in TS 24.008
2551 * section 6.1.3.1.3 or close approximation
2552 *
2553 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07002554 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08002555 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002556 * cases for error notification
2557 * and potential retries.
2558 *
2559 * Valid errors:
2560 * SUCCESS
2561 * RADIO_NOT_AVAILABLE
2562 * GENERIC_FAILURE
2563 *
2564 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08002565 *
2566 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07002567 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002568
Wink Savillef4c4d362009-04-02 01:37:03 -07002569#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002570
2571/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002572 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002573 *
Wink Saville29487ef2011-04-15 09:15:31 -07002574 * Returns the data call list. An entry is added when a
2575 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
2576 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
2577 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002578 *
2579 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08002580 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002581 *
2582 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002583 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002584 * RADIO_NOT_AVAILABLE (radio resetting)
2585 * GENERIC_FAILURE
Wink Saville29487ef2011-04-15 09:15:31 -07002586 *
2587 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002588 */
2589
Wink Savillef4c4d362009-04-02 01:37:03 -07002590#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002591
2592/**
johnwangf8bc1672009-05-14 19:19:47 -07002593 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002594 *
2595 * Request a radio reset. The RIL implementation may postpone
2596 * the reset until after this request is responded to if the baseband
2597 * is presently busy.
2598 *
johnwangf8bc1672009-05-14 19:19:47 -07002599 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
2600 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002601 * "data" is NULL
2602 * "response" is NULL
2603 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002604 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002605 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002606 * RADIO_NOT_AVAILABLE (radio resetting)
2607 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07002608 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002609 */
2610
2611#define RIL_REQUEST_RESET_RADIO 58
2612
2613/**
2614 * RIL_REQUEST_OEM_HOOK_RAW
2615 *
2616 * This request reserved for OEM-specific uses. It passes raw byte arrays
2617 * back and forth.
2618 *
Wink Saville7f856802009-06-09 10:23:37 -07002619 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002620 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
2621 *
2622 * "data" is a char * of bytes copied from the byte[] data argument in java
2623 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07002624 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002625 * (byte[])(((AsyncResult)response.obj).result)
2626 *
Wink Saville7f856802009-06-09 10:23:37 -07002627 * An error response here will result in
2628 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002629 * (((AsyncResult)response.obj).exception) being an instance of
2630 * com.android.internal.telephony.gsm.CommandException
2631 *
2632 * Valid errors:
2633 * All
2634 */
2635
2636#define RIL_REQUEST_OEM_HOOK_RAW 59
2637
2638/**
2639 * RIL_REQUEST_OEM_HOOK_STRINGS
2640 *
2641 * This request reserved for OEM-specific uses. It passes strings
2642 * back and forth.
2643 *
Wink Saville7f856802009-06-09 10:23:37 -07002644 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002645 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
2646 *
2647 * "data" is a const char **, representing an array of null-terminated UTF-8
2648 * strings copied from the "String[] strings" argument to
2649 * invokeOemRilRequestStrings()
2650 *
2651 * "response" is a const char **, representing an array of null-terminated UTF-8
2652 * stings that will be returned via the caller's response message here:
2653 *
2654 * (String[])(((AsyncResult)response.obj).result)
2655 *
Wink Saville7f856802009-06-09 10:23:37 -07002656 * An error response here will result in
2657 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002658 * (((AsyncResult)response.obj).exception) being an instance of
2659 * com.android.internal.telephony.gsm.CommandException
2660 *
2661 * Valid errors:
2662 * All
2663 */
2664
2665#define RIL_REQUEST_OEM_HOOK_STRINGS 60
2666
2667/**
2668 * RIL_REQUEST_SCREEN_STATE
2669 *
2670 * Indicates the current state of the screen. When the screen is off, the
2671 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07002672 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
2673 * in an effort to conserve power. These notifications should resume when the
2674 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002675 *
2676 * "data" is int *
2677 * ((int *)data)[0] is == 1 for "Screen On"
2678 * ((int *)data)[0] is == 0 for "Screen Off"
2679 *
2680 * "response" is NULL
2681 *
2682 * Valid errors:
2683 * SUCCESS
2684 * GENERIC_FAILURE
2685 */
2686#define RIL_REQUEST_SCREEN_STATE 61
2687
2688
2689/**
2690 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
2691 *
2692 * Enables/disables supplementary service related notifications
2693 * from the network.
2694 *
2695 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2696 *
2697 * "data" is int *
2698 * ((int *)data)[0] is == 1 for notifications enabled
2699 * ((int *)data)[0] is == 0 for notifications disabled
2700 *
2701 * "response" is NULL
2702 *
2703 * Valid errors:
2704 * SUCCESS
2705 * RADIO_NOT_AVAILABLE
2706 * GENERIC_FAILURE
2707 *
2708 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2709 */
2710#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2711
2712/**
2713 * RIL_REQUEST_WRITE_SMS_TO_SIM
2714 *
2715 * Stores a SMS message to SIM memory.
2716 *
2717 * "data" is RIL_SMS_WriteArgs *
2718 *
2719 * "response" is int *
2720 * ((const int *)response)[0] is the record index where the message is stored.
2721 *
2722 * Valid errors:
2723 * SUCCESS
2724 * GENERIC_FAILURE
2725 *
2726 */
2727#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2728
2729/**
2730 * RIL_REQUEST_DELETE_SMS_ON_SIM
2731 *
2732 * Deletes a SMS message from SIM memory.
2733 *
2734 * "data" is int *
2735 * ((int *)data)[0] is the record index of the message to delete.
2736 *
2737 * "response" is NULL
2738 *
2739 * Valid errors:
2740 * SUCCESS
2741 * GENERIC_FAILURE
2742 *
2743 */
2744#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2745
2746/**
2747 * RIL_REQUEST_SET_BAND_MODE
2748 *
2749 * Assign a specified band for RF configuration.
2750 *
2751 * "data" is int *
2752 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2753 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2754 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2755 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2756 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2757 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002758 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2759 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2760 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2761 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2762 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2763 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2764 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2765 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2766 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2767 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2768 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2769 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2770 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002771 *
2772 * "response" is NULL
2773 *
2774 * Valid errors:
2775 * SUCCESS
2776 * RADIO_NOT_AVAILABLE
2777 * GENERIC_FAILURE
2778 */
2779#define RIL_REQUEST_SET_BAND_MODE 65
2780
2781/**
2782 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2783 *
2784 * Query the list of band mode supported by RF.
2785 *
2786 * "data" is NULL
2787 *
2788 * "response" is int *
2789 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2790 * each available band mode.
2791 *
2792 * 0 for "unspecified" (selected by baseband automatically)
2793 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2794 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2795 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2796 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2797 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002798 * 6 for "Cellular (800-MHz Band)"
2799 * 7 for "PCS (1900-MHz Band)"
2800 * 8 for "Band Class 3 (JTACS Band)"
2801 * 9 for "Band Class 4 (Korean PCS Band)"
2802 * 10 for "Band Class 5 (450-MHz Band)"
2803 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2804 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2805 * 13 for "Band Class 8 (1800-MHz Band)"
2806 * 14 for "Band Class 9 (900-MHz Band)"
2807 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2808 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2809 * 17 for "Band Class 15 (AWS Band)"
2810 * 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002811 *
2812 * Valid errors:
2813 * SUCCESS
2814 * RADIO_NOT_AVAILABLE
2815 * GENERIC_FAILURE
2816 *
2817 * See also: RIL_REQUEST_SET_BAND_MODE
2818 */
2819#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2820
2821/**
2822 * RIL_REQUEST_STK_GET_PROFILE
2823 *
2824 * Requests the profile of SIM tool kit.
2825 * The profile indicates the SAT/USAT features supported by ME.
2826 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2827 *
2828 * "data" is NULL
2829 *
2830 * "response" is a const char * containing SAT/USAT profile
2831 * in hexadecimal format string starting with first byte of terminal profile
2832 *
2833 * Valid errors:
2834 * RIL_E_SUCCESS
2835 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2836 * RIL_E_GENERIC_FAILURE
2837 */
2838#define RIL_REQUEST_STK_GET_PROFILE 67
2839
2840/**
2841 * RIL_REQUEST_STK_SET_PROFILE
2842 *
2843 * Download the STK terminal profile as part of SIM initialization
2844 * procedure
2845 *
2846 * "data" is a const char * containing SAT/USAT profile
2847 * in hexadecimal format string starting with first byte of terminal profile
2848 *
2849 * "response" is NULL
2850 *
2851 * Valid errors:
2852 * RIL_E_SUCCESS
2853 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2854 * RIL_E_GENERIC_FAILURE
2855 */
2856#define RIL_REQUEST_STK_SET_PROFILE 68
2857
2858/**
2859 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2860 *
2861 * Requests to send a SAT/USAT envelope command to SIM.
2862 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2863 *
2864 * "data" is a const char * containing SAT/USAT command
2865 * in hexadecimal format string starting with command tag
2866 *
2867 * "response" is a const char * containing SAT/USAT response
2868 * in hexadecimal format string starting with first byte of response
2869 * (May be NULL)
2870 *
2871 * Valid errors:
2872 * RIL_E_SUCCESS
2873 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2874 * RIL_E_GENERIC_FAILURE
2875 */
2876#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2877
2878/**
2879 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2880 *
2881 * Requests to send a terminal response to SIM for a received
2882 * proactive command
2883 *
2884 * "data" is a const char * containing SAT/USAT response
2885 * in hexadecimal format string starting with first byte of response data
2886 *
2887 * "response" is NULL
2888 *
2889 * Valid errors:
2890 * RIL_E_SUCCESS
2891 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2892 * RIL_E_GENERIC_FAILURE
2893 */
2894#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
2895
2896/**
2897 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
2898 *
2899 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
2900 * been initialized by ME already. (We could see the call has been in the 'call
2901 * list') So, STK application needs to accept/reject the call according as user
2902 * operations.
2903 *
2904 * "data" is int *
2905 * ((int *)data)[0] is > 0 for "accept" the call setup
2906 * ((int *)data)[0] is == 0 for "reject" the call setup
2907 *
2908 * "response" is NULL
2909 *
2910 * Valid errors:
2911 * RIL_E_SUCCESS
2912 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2913 * RIL_E_GENERIC_FAILURE
2914 */
2915#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
2916
2917/**
2918 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
2919 *
2920 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07002921 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002922 * "data" is NULL
2923 * "response" is NULL
2924 *
2925 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002926 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002927 * RADIO_NOT_AVAILABLE (radio resetting)
2928 * GENERIC_FAILURE
2929 */
2930#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
2931
2932/**
2933 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2934 *
2935 * Requests to set the preferred network type for searching and registering
2936 * (CS/PS domain, RAT, and operation mode)
2937 *
Wink Savillec0114b32011-02-18 10:14:07 -08002938 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002939 *
2940 * "response" is NULL
2941 *
2942 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07002943 * SUCCESS
2944 * RADIO_NOT_AVAILABLE (radio resetting)
2945 * GENERIC_FAILURE
2946 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002947 */
2948#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2949
2950/**
2951 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2952 *
2953 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2954 * for searching and registering
2955 *
2956 * "data" is NULL
2957 *
2958 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08002959 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002960 *
2961 * Valid errors:
2962 * SUCCESS
2963 * RADIO_NOT_AVAILABLE
2964 * GENERIC_FAILURE
2965 *
2966 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2967 */
2968#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2969
2970/**
2971 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2972 *
2973 * Request neighboring cell id in GSM network
2974 *
2975 * "data" is NULL
2976 * "response" must be a " const RIL_NeighboringCell** "
2977 *
2978 * Valid errors:
2979 * SUCCESS
2980 * RADIO_NOT_AVAILABLE
2981 * GENERIC_FAILURE
2982 */
2983#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
2984
2985/**
2986 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07002987 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002988 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07002989 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
2990 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002991 *
2992 * Note: The RIL implementation should default to "updates enabled"
2993 * when the screen is on and "updates disabled" when the screen is off.
2994 *
2995 * "data" is int *
2996 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
2997 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
2998 *
2999 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07003000 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003001 * Valid errors:
3002 * SUCCESS
3003 * RADIO_NOT_AVAILABLE
3004 * GENERIC_FAILURE
3005 *
3006 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3007 */
3008#define RIL_REQUEST_SET_LOCATION_UPDATES 76
3009
Wink Savillef4c4d362009-04-02 01:37:03 -07003010/**
Wink Savillec0114b32011-02-18 10:14:07 -08003011 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07003012 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003013 * Request to set the location where the CDMA subscription shall
3014 * be retrieved
3015 *
3016 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08003017 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07003018 *
3019 * "response" is NULL
3020 *
3021 * Valid errors:
3022 * SUCCESS
3023 * RADIO_NOT_AVAILABLE
3024 * GENERIC_FAILURE
3025 * SIM_ABSENT
3026 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08003027 *
3028 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07003029 */
Wink Savillec0114b32011-02-18 10:14:07 -08003030#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07003031
3032/**
3033 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003034 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003035 * Request to set the roaming preferences in CDMA
3036 *
3037 * "data" is int *
3038 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3039 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3040 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003041 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003042 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003043 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003044 * Valid errors:
3045 * SUCCESS
3046 * RADIO_NOT_AVAILABLE
3047 * GENERIC_FAILURE
3048 */
3049#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
3050
3051/**
3052 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07003053 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003054 * Request the actual setting of the roaming preferences in CDMA in the modem
3055 *
3056 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003057 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003058 * "response" is int *
3059 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
3060 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3061 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07003062 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003063 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003064 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003065 * Valid errors:
3066 * SUCCESS
3067 * RADIO_NOT_AVAILABLE
3068 * GENERIC_FAILURE
3069 */
3070#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
3071
3072/**
3073 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003074 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003075 * Request to set the TTY mode
3076 *
3077 * "data" is int *
3078 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003079 * ((int *)data)[0] is == 1 for TTY Full
3080 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
3081 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07003082 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003083 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003084 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003085 * Valid errors:
3086 * SUCCESS
3087 * RADIO_NOT_AVAILABLE
3088 * GENERIC_FAILURE
3089 */
3090#define RIL_REQUEST_SET_TTY_MODE 80
3091
3092/**
3093 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003094 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003095 * Request the setting of TTY mode
3096 *
3097 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003098 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003099 * "response" is int *
3100 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07003101 * ((int *)response)[0] is == 1 for TTY Full
3102 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
3103 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07003104 *
3105 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003106 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003107 * Valid errors:
3108 * SUCCESS
3109 * RADIO_NOT_AVAILABLE
3110 * GENERIC_FAILURE
3111 */
3112#define RIL_REQUEST_QUERY_TTY_MODE 81
3113
3114/**
3115 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
3116 *
3117 * Request to set the preferred voice privacy mode used in voice
3118 * scrambling
3119 *
3120 * "data" is int *
3121 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3122 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003123 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003124 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003125 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003126 * Valid errors:
3127 * SUCCESS
3128 * RADIO_NOT_AVAILABLE
3129 * GENERIC_FAILURE
3130 */
3131#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
3132
3133/**
3134 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07003135 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003136 * Request the setting of preferred voice privacy mode
3137 *
3138 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003139 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003140 * "response" is int *
3141 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3142 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07003143 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003144 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003145 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003146 * Valid errors:
3147 * SUCCESS
3148 * RADIO_NOT_AVAILABLE
3149 * GENERIC_FAILURE
3150 */
3151#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
3152
3153/**
3154 * RIL_REQUEST_CDMA_FLASH
3155 *
3156 * Send FLASH
3157 *
3158 * "data" is const char *
3159 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07003160 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003161 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003162 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003163 * Valid errors:
3164 * SUCCESS
3165 * RADIO_NOT_AVAILABLE
3166 * GENERIC_FAILURE
3167 *
3168 */
3169#define RIL_REQUEST_CDMA_FLASH 84
3170
3171/**
3172 * RIL_REQUEST_CDMA_BURST_DTMF
3173 *
3174 * Send DTMF string
3175 *
jsh602f80f2009-07-10 15:44:37 -07003176 * "data" is const char **
3177 * ((const char **)data)[0] is a DTMF string
3178 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
3179 * default
3180 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
3181 * default
Wink Saville7f856802009-06-09 10:23:37 -07003182 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003183 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003184 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003185 * Valid errors:
3186 * SUCCESS
3187 * RADIO_NOT_AVAILABLE
3188 * GENERIC_FAILURE
3189 *
3190 */
3191#define RIL_REQUEST_CDMA_BURST_DTMF 85
3192
3193/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07003194 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07003195 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07003196 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
3197 * If the checksum is valid the 20 digit AKEY is written to NV,
3198 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07003199 *
3200 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07003201 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
3202 * where the last 6 digits are a checksum of the
3203 * first 20, as specified in TR45.AHAG
3204 * "Common Cryptographic Algorithms, Revision D.1
3205 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07003206 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003207 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003208 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003209 * Valid errors:
3210 * SUCCESS
3211 * RADIO_NOT_AVAILABLE
3212 * GENERIC_FAILURE
3213 *
3214 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07003215#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07003216
3217/**
3218 * RIL_REQUEST_CDMA_SEND_SMS
3219 *
3220 * Send a CDMA SMS message
3221 *
3222 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07003223 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003224 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07003225 *
johnwangbfb151b2009-09-11 15:20:38 -07003226 * Based on the return error, caller decides to resend if sending sms
3227 * fails. The CDMA error class is derived as follows,
3228 * SUCCESS is error class 0 (no error)
3229 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
3230 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
3231 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003232 * Valid errors:
3233 * SUCCESS
3234 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07003235 * SMS_SEND_FAIL_RETRY
Wink Savillef4c4d362009-04-02 01:37:03 -07003236 * GENERIC_FAILURE
3237 *
3238 */
3239#define RIL_REQUEST_CDMA_SEND_SMS 87
3240
3241/**
3242 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
3243 *
3244 * Acknowledge the success or failure in the receipt of SMS
3245 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3246 *
3247 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07003248 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003249 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003250 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003251 * Valid errors:
3252 * SUCCESS
3253 * RADIO_NOT_AVAILABLE
3254 * GENERIC_FAILURE
3255 *
3256 */
3257#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
3258
3259/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003260 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07003261 *
Wink Savillea592eeb2009-05-22 13:26:36 -07003262 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
3263 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003264 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003265 *
3266 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
3267 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
3268 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003269 * Valid errors:
3270 * SUCCESS
3271 * RADIO_NOT_AVAILABLE
3272 * GENERIC_FAILURE
3273 *
3274 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003275#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07003276
3277/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003278 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07003279 *
3280 * Set GSM/WCDMA Cell Broadcast SMS config
3281 *
Wink Savillea592eeb2009-05-22 13:26:36 -07003282 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
3283 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
3284 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003285 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003286 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003287 * Valid errors:
3288 * SUCCESS
3289 * RADIO_NOT_AVAILABLE
3290 * GENERIC_FAILURE
3291 *
3292 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003293#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07003294
3295/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003296 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07003297 *
Wink Savillea592eeb2009-05-22 13:26:36 -07003298* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07003299 *
3300 * "data" is const int *
3301 * (const int *)data[0] indicates to activate or turn off the
3302 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
3303 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07003304 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003305 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003306 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003307 * Valid errors:
3308 * SUCCESS
3309 * RADIO_NOT_AVAILABLE
3310 * GENERIC_FAILURE
3311 *
3312 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003313#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07003314
3315/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003316 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07003317 *
3318 * Request the setting of CDMA Broadcast SMS config
3319 *
3320 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003321 *
3322 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
3323 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
3324 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003325 * Valid errors:
3326 * SUCCESS
3327 * RADIO_NOT_AVAILABLE
3328 * GENERIC_FAILURE
3329 *
3330 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003331#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07003332
3333/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003334 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07003335 *
3336 * Set CDMA Broadcast SMS config
3337 *
Wink Savillea592eeb2009-05-22 13:26:36 -07003338 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
3339 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
3340 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003341 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003342 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003343 * Valid errors:
3344 * SUCCESS
3345 * RADIO_NOT_AVAILABLE
3346 * GENERIC_FAILURE
3347 *
3348 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003349#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07003350
3351/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003352 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07003353 *
3354 * Enable or disable the reception of CDMA Broadcast SMS
3355 *
3356 * "data" is const int *
3357 * (const int *)data[0] indicates to activate or turn off the
3358 * reception of CDMA Broadcast SMS, 0-1,
3359 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07003360 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003361 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003362 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003363 * Valid errors:
3364 * SUCCESS
3365 * RADIO_NOT_AVAILABLE
3366 * GENERIC_FAILURE
3367 *
3368 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003369#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07003370
3371/**
3372 * RIL_REQUEST_CDMA_SUBSCRIPTION
3373 *
3374 * Request the device MDN / H_SID / H_NID.
3375 *
3376 * The request is only allowed when CDMA subscription is available. When CDMA
3377 * subscription is changed, application layer should re-issue the request to
3378 * update the subscription information.
3379 *
3380 * If a NULL value is returned for any of the device id, it means that error
3381 * accessing the device.
3382 *
3383 * "response" is const char **
3384 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07003385 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
3386 * CDMA subscription is available, in decimal format
3387 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
3388 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07003389 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07003390 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07003391 *
3392 * Valid errors:
3393 * SUCCESS
3394 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
3395 */
3396
Wink Savilleeafe79d2009-04-03 18:02:34 -07003397#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07003398
3399/**
3400 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
3401 *
3402 * Stores a CDMA SMS message to RUIM memory.
3403 *
3404 * "data" is RIL_CDMA_SMS_WriteArgs *
3405 *
3406 * "response" is int *
3407 * ((const int *)response)[0] is the record index where the message is stored.
3408 *
3409 * Valid errors:
3410 * SUCCESS
3411 * RADIO_NOT_AVAILABLE
3412 * GENERIC_FAILURE
3413 *
3414 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003415#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07003416
3417/**
3418 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
3419 *
3420 * Deletes a CDMA SMS message from RUIM memory.
3421 *
3422 * "data" is int *
3423 * ((int *)data)[0] is the record index of the message to delete.
3424 *
3425 * "response" is NULL
3426 *
3427 * Valid errors:
3428 * SUCCESS
3429 * RADIO_NOT_AVAILABLE
3430 * GENERIC_FAILURE
3431 *
3432 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003433#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07003434
3435/**
3436 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07003437 *
3438 * Request the device ESN / MEID / IMEI / IMEISV.
3439 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003440 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07003441 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07003442 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003443 *
3444 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07003445 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003446 *
3447 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07003448 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003449 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003450 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07003451 * ((const char **)response)[0] is IMEI if GSM subscription is available
3452 * ((const char **)response)[1] is IMEISV if GSM subscription is available
3453 * ((const char **)response)[2] is ESN if CDMA subscription is available
3454 * ((const char **)response)[3] is MEID if CDMA subscription is available
3455 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003456 * Valid errors:
3457 * SUCCESS
3458 * RADIO_NOT_AVAILABLE
3459 * GENERIC_FAILURE
3460 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003461#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07003462
Wink Saville1b5fd232009-04-22 14:50:00 -07003463/**
3464 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
3465 *
3466 * Request the radio's system selection module to exit emergency
3467 * callback mode. RIL will not respond with SUCCESS until the modem has
3468 * completely exited from Emergency Callback Mode.
3469 *
3470 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003471 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003472 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003473 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003474 * Valid errors:
3475 * SUCCESS
3476 * RADIO_NOT_AVAILABLE
3477 * GENERIC_FAILURE
3478 *
3479 */
3480#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07003481
jsh000a9fe2009-05-11 14:52:35 -07003482/**
3483 * RIL_REQUEST_GET_SMSC_ADDRESS
3484 *
3485 * Queries the default Short Message Service Center address on the device.
3486 *
3487 * "data" is NULL
3488 *
3489 * "response" is const char * containing the SMSC address.
3490 *
3491 * Valid errors:
3492 * SUCCESS
3493 * RADIO_NOT_AVAILABLE
3494 * GENERIC_FAILURE
3495 *
3496 */
3497#define RIL_REQUEST_GET_SMSC_ADDRESS 100
3498
3499/**
3500 * RIL_REQUEST_SET_SMSC_ADDRESS
3501 *
3502 * Sets the default Short Message Service Center address on the device.
3503 *
3504 * "data" is const char * containing the SMSC address.
3505 *
3506 * "response" is NULL
3507 *
3508 * Valid errors:
3509 * SUCCESS
3510 * RADIO_NOT_AVAILABLE
3511 * GENERIC_FAILURE
3512 *
3513 */
3514#define RIL_REQUEST_SET_SMSC_ADDRESS 101
3515
jshb60444e2009-05-29 11:09:17 -07003516/**
3517 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
3518 *
3519 * Indicates whether there is storage available for new SMS messages.
3520 *
3521 * "data" is int *
3522 * ((int *)data)[0] is 1 if memory is available for storing new messages
3523 * is 0 if memory capacity is exceeded
3524 *
3525 * "response" is NULL
3526 *
3527 * Valid errors:
3528 * SUCCESS
3529 * RADIO_NOT_AVAILABLE
3530 * GENERIC_FAILURE
3531 *
3532 */
3533#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
3534
Wink Saville2641d5b2009-06-08 17:40:42 -07003535/**
3536 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
3537 *
3538 * Indicates that the StkSerivce is running and is
3539 * ready to receive RIL_UNSOL_STK_XXXXX commands.
3540 *
3541 * "data" is NULL
3542 * "response" is NULL
3543 *
3544 * Valid errors:
3545 * SUCCESS
3546 * RADIO_NOT_AVAILABLE
3547 * GENERIC_FAILURE
3548 *
3549 */
3550#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
3551
Wink Savillec0114b32011-02-18 10:14:07 -08003552/**
3553 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3554 *
3555 * Request to query the location where the CDMA subscription shall
3556 * be retrieved
3557 *
3558 * "data" is NULL
3559 *
3560 * "response" is int *
3561 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3562 *
3563 * Valid errors:
3564 * SUCCESS
3565 * RADIO_NOT_AVAILABLE
3566 * GENERIC_FAILURE
3567 * SUBSCRIPTION_NOT_AVAILABLE
3568 *
3569 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
3570 */
3571#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
3572
Jake Hambyfa8d5842011-08-19 16:22:18 -07003573/**
3574 * RIL_REQUEST_ISIM_AUTHENTICATION
3575 *
3576 * Request the ISIM application on the UICC to perform AKA
3577 * challenge/response algorithm for IMS authentication
3578 *
3579 * "data" is a const char * containing the challenge string in Base64 format
3580 * "response" is a const char * containing the response in Base64 format
3581 *
3582 * Valid errors:
3583 * SUCCESS
3584 * RADIO_NOT_AVAILABLE
3585 * GENERIC_FAILURE
3586 */
3587#define RIL_REQUEST_ISIM_AUTHENTICATION 105
3588
Jake Hamby300105d2011-09-26 01:01:44 -07003589/**
3590 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
3591 *
3592 * Acknowledge successful or failed receipt of SMS previously indicated
3593 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
3594 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
3595 *
3596 * "data" is const char **
3597 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
3598 * is "0" on failed receipt (send RP-ERROR)
3599 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
3600 *
3601 * "response" is NULL
3602 *
3603 * Valid errors:
3604 * SUCCESS
3605 * RADIO_NOT_AVAILABLE
3606 * GENERIC_FAILURE
3607 */
3608#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
3609
3610/**
3611 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
3612 *
3613 * Requests to send a SAT/USAT envelope command to SIM.
3614 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
3615 *
3616 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
3617 * the SW1 and SW2 status bytes from the UICC response are returned along with
3618 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
3619 *
3620 * The RIL implementation shall perform the normal processing of a '91XX'
3621 * response in SW1/SW2 to retrieve the pending proactive command and send it
3622 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
3623 *
3624 * "data" is a const char * containing the SAT/USAT command
3625 * in hexadecimal format starting with command tag
3626 *
3627 * "response" is a const RIL_SIM_IO_Response *
3628 *
3629 * Valid errors:
3630 * RIL_E_SUCCESS
3631 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3632 * RIL_E_GENERIC_FAILURE
3633 */
3634#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
3635
Naveen Kalla2bc78d62011-12-07 16:22:53 -08003636/**
3637 * RIL_REQUEST_VOICE_RADIO_TECH
3638 *
3639 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
3640 * when radio state is RADIO_STATE_ON
3641 *
3642 * "data" is NULL
3643 * "response" is int *
3644 * ((int *) response)[0] is of type const RIL_RadioTechnology
3645 *
3646 * Valid errors:
3647 * SUCCESS
3648 * RADIO_NOT_AVAILABLE
3649 * GENERIC_FAILURE
3650 */
3651#define RIL_REQUEST_VOICE_RADIO_TECH 108
3652
Wink Saville8a9e0212013-04-09 12:11:38 -07003653/**
3654 * RIL_REQUEST_GET_CELL_INFO_LIST
3655 *
3656 * Request all of the current cell information known to the radio. The radio
3657 * must a list of all current cells, including the neighboring cells. If for a particular
3658 * cell information isn't known then the appropriate unknown value will be returned.
3659 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
3660 *
3661 * "data" is NULL
3662 *
3663 * "response" is an array of RIL_CellInfo.
3664 */
3665#define RIL_REQUEST_GET_CELL_INFO_LIST 109
3666
3667/**
3668 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
3669 *
3670 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
Wink Savillec57b3eb2013-04-17 12:51:41 -07003671 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
Wink Saville8a9e0212013-04-09 12:11:38 -07003672 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
3673 * a RIL_UNSOL_CELL_INFO_LIST.
3674 *
3675 * "data" is int *
3676 * ((int *)data)[0] is minimum time in milliseconds
3677 *
3678 * "response" is NULL
3679 *
3680 * Valid errors:
3681 * SUCCESS
3682 * RADIO_NOT_AVAILABLE
3683 * GENERIC_FAILURE
3684 */
3685#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
Jake Hamby300105d2011-09-26 01:01:44 -07003686
Sungmin Choi75697532013-04-26 15:04:45 -07003687/**
3688 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
3689 *
3690 * Set an apn to initial attach network
3691 * "response" is NULL
3692 *
3693 * Valid errors:
3694 * SUCCESS
3695 * RADIO_NOT_AVAILABLE (radio resetting)
3696 * GENERIC_FAILURE
3697 * SUBSCRIPTION_NOT_AVAILABLE
3698 */
3699#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
3700
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07003701/**
3702 * RIL_REQUEST_IMS_REGISTRATION_STATE
3703 *
3704 * Request current IMS registration state
3705 *
3706 * "data" is NULL
3707 *
3708 * "response" is int *
3709 * ((int *)response)[0] is registration state:
3710 * 0 - Not registered
3711 * 1 - Registered
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07003712 *
Wink Saville865ce3b2013-11-08 16:37:01 -08003713 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07003714 * must follow with IMS SMS format:
3715 *
Wink Saville865ce3b2013-11-08 16:37:01 -08003716 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
3717 *
3718 * Valid errors:
3719 * SUCCESS
3720 * RADIO_NOT_AVAILABLE
3721 * GENERIC_FAILURE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07003722 */
3723#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
3724
3725/**
3726 * RIL_REQUEST_IMS_SEND_SMS
3727 *
3728 * Send a SMS message over IMS
3729 *
3730 * "data" is const RIL_IMS_SMS_Message *
3731 *
3732 * "response" is a const RIL_SMS_Response *
3733 *
3734 * Based on the return error, caller decides to resend if sending sms
3735 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
3736 * In case of retry, data is encoded based on Voice Technology available.
3737 *
3738 * Valid errors:
3739 * SUCCESS
3740 * RADIO_NOT_AVAILABLE
3741 * SMS_SEND_FAIL_RETRY
3742 * FDN_CHECK_FAILURE
3743 * GENERIC_FAILURE
3744 *
3745 */
3746#define RIL_REQUEST_IMS_SEND_SMS 113
3747
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08003748/**
3749 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
3750 *
3751 * Request APDU exchange on the basic channel. This command reflects TS 27.007
3752 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
3753 * of GSM/CDMA, and filter commands appropriately. It should filter
3754 * channel management and SELECT by DF name commands.
3755 *
3756 * "data" is a const RIL_SIM_APDU *
3757 * "sessionid" field should be ignored.
3758 *
3759 * "response" is a const RIL_SIM_IO_Response *
3760 *
3761 * Valid errors:
3762 * SUCCESS
3763 * RADIO_NOT_AVAILABLE
3764 * GENERIC_FAILURE
3765 */
3766#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
3767
3768/**
3769 * RIL_REQUEST_SIM_OPEN_CHANNEL
3770 *
3771 * Open a new logical channel and select the given application. This command
3772 * reflects TS 27.007 "open logical channel" operation (+CCHO).
3773 *
3774 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
3775 *
3776 * "response" is int *
3777 * ((int *)data)[0] contains the session id of the logical channel.
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08003778 *
3779 * Valid errors:
3780 * SUCCESS
3781 * RADIO_NOT_AVAILABLE
3782 * GENERIC_FAILURE
3783 * MISSING_RESOURCE
3784 * NO_SUCH_ELEMENT
3785 */
3786#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
3787
3788/**
3789 * RIL_REQUEST_SIM_CLOSE_CHANNEL
3790 *
3791 * Close a previously opened logical channel. This command reflects TS 27.007
3792 * "close logical channel" operation (+CCHC).
3793 *
3794 * "data" is int *
3795 * ((int *)data)[0] is the session id of logical the channel to close.
3796 *
3797 * "response" is NULL
3798 *
3799 * Valid errors:
3800 * SUCCESS
3801 * RADIO_NOT_AVAILABLE
3802 * GENERIC_FAILURE
3803 */
3804#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
3805
3806/**
3807 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
3808 *
3809 * Exchange APDUs with a UICC over a previously opened logical channel. This
3810 * command reflects TS 27.007 "generic logical channel access" operation
3811 * (+CGLA). The modem should filter channel management and SELECT by DF name
3812 * commands.
3813 *
3814 * "data" is a const RIL_SIM_APDU*
3815 *
3816 * "response" is a const RIL_SIM_IO_Response *
3817 *
3818 * Valid errors:
3819 * SUCCESS
3820 * RADIO_NOT_AVAILABLE
3821 * GENERIC_FAILURE
3822 */
3823#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
3824
Jake Hamby8a4a2332014-01-15 13:12:05 -08003825/**
3826 * RIL_REQUEST_NV_READ_ITEM
3827 *
3828 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
3829 * This is used for device configuration by some CDMA operators.
3830 *
3831 * "data" is a const RIL_NV_ReadItem *
3832 *
3833 * "response" is const char * containing the contents of the NV item
3834 *
3835 * Valid errors:
3836 * SUCCESS
3837 * RADIO_NOT_AVAILABLE
3838 * GENERIC_FAILURE
3839 */
3840#define RIL_REQUEST_NV_READ_ITEM 118
3841
3842/**
3843 * RIL_REQUEST_NV_WRITE_ITEM
3844 *
3845 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
3846 * This is used for device configuration by some CDMA operators.
3847 *
3848 * "data" is a const RIL_NV_WriteItem *
3849 *
3850 * "response" is NULL
3851 *
3852 * Valid errors:
3853 * SUCCESS
3854 * RADIO_NOT_AVAILABLE
3855 * GENERIC_FAILURE
3856 */
3857#define RIL_REQUEST_NV_WRITE_ITEM 119
3858
3859/**
3860 * RIL_REQUEST_NV_WRITE_CDMA_PRL
3861 *
3862 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
3863 * This is used for device configuration by some CDMA operators.
3864 *
3865 * "data" is a const char * containing the PRL as a byte array
3866 *
3867 * "response" is NULL
3868 *
3869 * Valid errors:
3870 * SUCCESS
3871 * RADIO_NOT_AVAILABLE
3872 * GENERIC_FAILURE
3873 */
3874#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
3875
3876/**
3877 * RIL_REQUEST_NV_RESET_CONFIG
3878 *
3879 * Reset the radio NV configuration to the factory state.
3880 * This is used for device configuration by some CDMA operators.
3881 *
3882 * "data" is int *
Jake Hambyd27c9d52014-02-06 14:52:05 -08003883 * ((int *)data)[0] is 1 to reload all NV items
3884 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
3885 * ((int *)data)[0] is 3 for factory reset (RTN)
Jake Hamby8a4a2332014-01-15 13:12:05 -08003886 *
3887 * "response" is NULL
3888 *
3889 * Valid errors:
3890 * SUCCESS
3891 * RADIO_NOT_AVAILABLE
3892 * GENERIC_FAILURE
3893 */
3894#define RIL_REQUEST_NV_RESET_CONFIG 121
3895
Etan Cohend3652192014-06-20 08:28:44 -07003896 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
3897 * FIXME This API needs to have more documentation.
3898 *
3899 * Selection/de-selection of a subscription from a SIM card
3900 * "data" is const RIL_SelectUiccSub*
3901
3902 *
3903 * "response" is NULL
3904 *
3905 * Valid errors:
3906 * SUCCESS
3907 * RADIO_NOT_AVAILABLE (radio resetting)
3908 * GENERIC_FAILURE
3909 * SUBSCRIPTION_NOT_SUPPORTED
3910 *
3911 */
3912#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
3913
3914/**
3915 * RIL_REQUEST_ALLOW_DATA
3916 *
3917 * Tells the modem whether data calls are allowed or not
3918 *
3919 * "data" is int *
3920 * FIXME slotId and aid will be added.
3921 * ((int *)data)[0] is == 0 to allow data calls
3922 * ((int *)data)[0] is == 1 to disallow data calls
3923 *
3924 * "response" is NULL
3925 *
3926 * Valid errors:
3927 *
3928 * SUCCESS
3929 * RADIO_NOT_AVAILABLE (radio resetting)
3930 * GENERIC_FAILURE
3931 *
3932 */
3933#define RIL_REQUEST_ALLOW_DATA 123
3934
3935/**
3936 * RIL_REQUEST_GET_HARDWARE_CONFIG
3937 *
3938 * Request all of the current hardware (modem and sim) associated
3939 * with the RIL.
3940 *
3941 * "data" is NULL
3942 *
3943 * "response" is an array of RIL_HardwareConfig.
3944 */
3945#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
3946
3947/**
3948 * RIL_REQUEST_ICC_SIM_AUTHENTICATION
3949 *
3950 * Returns the response of SIM Authentication through RIL to a
3951 * challenge request.
3952 *
3953 * "data" Base64 encoded string containing challenge:
3954 * int authContext; P2 value of authentication command, see P2 parameter in
3955 * 3GPP TS 31.102 7.1.2
3956 * char *authData; the challenge string in Base64 format, see 3GPP
3957 * TS 31.102 7.1.2
3958 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
3959 * NULL if no value
3960 *
3961 * "response" Base64 encoded strings containing response:
3962 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
3963 * int sw2;
3964 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
3965 */
3966#define RIL_REQUEST_ICC_SIM_AUTHENTICATION 125
Shishir Agrawal2458d8d2013-11-27 14:53:05 -08003967
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003968/***********************************************************************/
3969
Wink Savillef4c4d362009-04-02 01:37:03 -07003970
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003971#define RIL_UNSOL_RESPONSE_BASE 1000
3972
3973/**
3974 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3975 *
3976 * Indicate when value of RIL_RadioState has changed.
3977 *
3978 * Callee will invoke RIL_RadioStateRequest method on main thread
3979 *
3980 * "data" is NULL
3981 */
3982
3983#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
3984
3985
3986/**
3987 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
3988 *
3989 * Indicate when call state has changed
3990 *
3991 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
3992 *
3993 * "data" is NULL
3994 *
Wink Saville7f856802009-06-09 10:23:37 -07003995 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003996 * "RING", "BUSY", "NO CARRIER", and also call state
3997 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
3998 *
3999 * Redundent or extraneous invocations are tolerated
4000 */
4001#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
4002
4003
4004/**
Wink Savillec0114b32011-02-18 10:14:07 -08004005 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004006 *
Wink Savillec0114b32011-02-18 10:14:07 -08004007 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004008 *
4009 * Callee will invoke the following requests on main thread:
4010 *
Wink Savillec0114b32011-02-18 10:14:07 -08004011 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004012 * RIL_REQUEST_OPERATOR
4013 *
4014 * "data" is NULL
4015 *
4016 * FIXME should this happen when SIM records are loaded? (eg, for
4017 * EONS)
4018 */
Wink Savillec0114b32011-02-18 10:14:07 -08004019#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004020
4021/**
4022 * RIL_UNSOL_RESPONSE_NEW_SMS
4023 *
4024 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07004025 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004026 * "data" is const char *
4027 * This is a pointer to a string containing the PDU of an SMS-DELIVER
4028 * as an ascii string of hex digits. The PDU starts with the SMSC address
4029 * per TS 27.005 (+CMT:)
4030 *
4031 * Callee will subsequently confirm the receipt of thei SMS with a
4032 * RIL_REQUEST_SMS_ACKNOWLEDGE
4033 *
Wink Saville7f856802009-06-09 10:23:37 -07004034 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004035 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
4036 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
4037 */
4038
4039#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
4040
4041/**
4042 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
4043 *
4044 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07004045 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004046 * "data" is const char *
4047 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
4048 * as an ascii string of hex digits. The PDU starts with the SMSC address
4049 * per TS 27.005 (+CDS:).
4050 *
4051 * Callee will subsequently confirm the receipt of the SMS with a
4052 * RIL_REQUEST_SMS_ACKNOWLEDGE
4053 *
Wink Saville7f856802009-06-09 10:23:37 -07004054 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004055 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
4056 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
4057 */
4058
4059#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
4060
4061/**
4062 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
4063 *
4064 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07004065 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004066 * "data" is const int *
4067 * ((const int *)data)[0] contains the slot index on the SIM that contains
4068 * the new message
4069 */
4070
4071#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
4072
4073/**
4074 * RIL_UNSOL_ON_USSD
4075 *
4076 * Called when a new USSD message is received.
4077 *
4078 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07004079 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004080 * one of these string values:
4081 * "0" USSD-Notify -- text in ((const char **)data)[1]
4082 * "1" USSD-Request -- text in ((const char **)data)[1]
4083 * "2" Session terminated by network
4084 * "3" other local client (eg, SIM Toolkit) has responded
4085 * "4" Operation not supported
4086 * "5" Network timeout
4087 *
4088 * The USSD session is assumed to persist if the type code is "1", otherwise
4089 * the current session (if any) is assumed to have terminated.
4090 *
4091 * ((const char **)data)[1] points to a message string if applicable, which
4092 * should always be in UTF-8.
4093 */
4094#define RIL_UNSOL_ON_USSD 1006
4095/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
4096
4097/**
4098 * RIL_UNSOL_ON_USSD_REQUEST
4099 *
4100 * Obsolete. Send via RIL_UNSOL_ON_USSD
4101 */
Wink Saville7f856802009-06-09 10:23:37 -07004102#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004103
4104
4105/**
4106 * RIL_UNSOL_NITZ_TIME_RECEIVED
4107 *
4108 * Called when radio has received a NITZ time message
4109 *
4110 * "data" is const char * pointing to NITZ time string
4111 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
4112 */
4113#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
4114
4115/**
4116 * RIL_UNSOL_SIGNAL_STRENGTH
4117 *
4118 * Radio may report signal strength rather han have it polled.
4119 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004120 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004121 */
4122#define RIL_UNSOL_SIGNAL_STRENGTH 1009
4123
4124
4125/**
Wink Savillef4c4d362009-04-02 01:37:03 -07004126 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004127 *
Wink Savillec0114b32011-02-18 10:14:07 -08004128 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07004129 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
4130 * of current data contexts including new contexts that have been
4131 * activated. A data call is only removed from this list when the
4132 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
4133 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004134 *
Wink Savillef4c4d362009-04-02 01:37:03 -07004135 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004136 */
4137
Wink Savillef4c4d362009-04-02 01:37:03 -07004138#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004139
4140/**
4141 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
4142 *
4143 * Reports supplementary service related notification from the network.
4144 *
4145 * "data" is a const RIL_SuppSvcNotification *
4146 *
4147 */
4148
4149#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
4150
4151/**
4152 * RIL_UNSOL_STK_SESSION_END
4153 *
4154 * Indicate when STK session is terminated by SIM.
4155 *
4156 * "data" is NULL
4157 */
4158#define RIL_UNSOL_STK_SESSION_END 1012
4159
4160/**
4161 * RIL_UNSOL_STK_PROACTIVE_COMMAND
4162 *
4163 * Indicate when SIM issue a STK proactive command to applications
4164 *
4165 * "data" is a const char * containing SAT/USAT proactive command
4166 * in hexadecimal format string starting with command tag
4167 *
4168 */
4169#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
4170
4171/**
4172 * RIL_UNSOL_STK_EVENT_NOTIFY
4173 *
4174 * Indicate when SIM notifies applcations some event happens.
4175 * Generally, application does not need to have any feedback to
4176 * SIM but shall be able to indicate appropriate messages to users.
4177 *
4178 * "data" is a const char * containing SAT/USAT commands or responses
4179 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
4180 * starting with first byte of response data or command tag
4181 *
4182 */
4183#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
4184
4185/**
4186 * RIL_UNSOL_STK_CALL_SETUP
4187 *
4188 * Indicate when SIM wants application to setup a voice call.
4189 *
4190 * "data" is const int *
4191 * ((const int *)data)[0] contains timeout value (in milliseconds)
4192 */
4193#define RIL_UNSOL_STK_CALL_SETUP 1015
4194
4195/**
4196 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
4197 *
4198 * Indicates that SMS storage on the SIM is full. Sent when the network
4199 * attempts to deliver a new SMS message. Messages cannot be saved on the
4200 * SIM until space is freed. In particular, incoming Class 2 messages
4201 * cannot be stored.
4202 *
4203 * "data" is null
4204 *
4205 */
4206#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
4207
4208/**
4209 * RIL_UNSOL_SIM_REFRESH
4210 *
4211 * Indicates that file(s) on the SIM have been updated, or the SIM
4212 * has been reinitialized.
4213 *
Alex Yakavenka45e740e2012-01-31 11:48:27 -08004214 * In the case where RIL is version 6 or older:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004215 * "data" is an int *
4216 * ((int *)data)[0] is a RIL_SimRefreshResult.
4217 * ((int *)data)[1] is the EFID of the updated file if the result is
Alex Yakavenka45e740e2012-01-31 11:48:27 -08004218 * SIM_FILE_UPDATE or NULL for any other result.
4219 *
4220 * In the case where RIL is version 7:
4221 * "data" is a RIL_SimRefreshResponse_v7 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004222 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004223 * Note: If the SIM state changes as a result of the SIM refresh (eg,
4224 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004225 * should be sent.
4226 */
4227#define RIL_UNSOL_SIM_REFRESH 1017
4228
4229/**
4230 * RIL_UNSOL_CALL_RING
4231 *
4232 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07004233 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
4234 * of a call and sending multiple is optional. If the system property
4235 * ro.telephony.call_ring.multiple is false then the upper layers
4236 * will generate the multiple events internally. Otherwise the vendor
4237 * ril must generate multiple RIL_UNSOL_CALL_RING if
4238 * ro.telephony.call_ring.multiple is true or if it is absent.
4239 *
4240 * The rate of these events is controlled by ro.telephony.call_ring.delay
4241 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004242 *
Wink Saville3d54e742009-05-18 18:00:44 -07004243 * "data" is null for GSM
4244 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004245 */
4246#define RIL_UNSOL_CALL_RING 1018
4247
The Android Open Source Project34a51082009-03-05 14:34:37 -08004248/**
4249 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
4250 *
4251 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07004252 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004253 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07004254
The Android Open Source Project34a51082009-03-05 14:34:37 -08004255 * "data" is null
4256 */
4257#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
4258
4259/**
4260 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4261 *
4262 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07004263 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004264 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07004265 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004266 * Callee will subsequently confirm the receipt of the SMS with
4267 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07004268 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004269 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
4270 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07004271 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004272 */
4273#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
4274
4275/**
4276 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
4277 *
4278 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07004279 *
Henrik Hall0eba2022010-11-25 10:20:56 +01004280 * "data" can be one of the following:
4281 * If received from GSM network, "data" is const char of 88 bytes
4282 * which indicates each page of a CBS Message sent to the MS by the
4283 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
4284 * If received from UMTS network, "data" is const char of 90 up to 1252
4285 * bytes which contain between 1 and 15 CBS Message pages sent as one
4286 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2.
Wink Savillef4c4d362009-04-02 01:37:03 -07004287 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004288 */
4289#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07004290
The Android Open Source Project34a51082009-03-05 14:34:37 -08004291/**
4292 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
4293 *
4294 * Indicates that SMS storage on the RUIM is full. Messages
4295 * cannot be saved on the RUIM until space is freed.
4296 *
4297 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07004298 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08004299 */
Wink Savillef4c4d362009-04-02 01:37:03 -07004300#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
4301
The Android Open Source Project34a51082009-03-05 14:34:37 -08004302/**
4303 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
4304 *
4305 * Indicates a restricted state change (eg, for Domain Specific Access Control).
4306 *
4307 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
4308 *
4309 * "data" is an int *
4310 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
4311 */
4312#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
4313
Wink Saville1b5fd232009-04-22 14:50:00 -07004314/**
4315 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
4316 *
4317 * Indicates that the radio system selection module has
4318 * autonomously entered emergency callback mode.
4319 *
4320 * "data" is null
4321 *
4322 */
4323#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08004324
Wink Saville1b5fd232009-04-22 14:50:00 -07004325/**
4326 * RIL_UNSOL_CDMA_CALL_WAITING
4327 *
4328 * Called when CDMA radio receives a call waiting indication.
4329 *
4330 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07004331 *
Wink Saville1b5fd232009-04-22 14:50:00 -07004332 */
4333#define RIL_UNSOL_CDMA_CALL_WAITING 1025
4334
4335/**
4336 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
4337 *
4338 * Called when CDMA radio receives an update of the progress of an
4339 * OTASP/OTAPA call.
4340 *
4341 * "data" is const int *
4342 * For CDMA this is an integer OTASP/OTAPA status listed in
4343 * RIL_CDMA_OTA_ProvisionStatus.
4344 *
4345 */
4346#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
4347
4348/**
4349 * RIL_UNSOL_CDMA_INFO_REC
4350 *
4351 * Called when CDMA radio receives one or more info recs.
4352 *
4353 * "data" is const RIL_CDMA_InformationRecords *
4354 *
4355 */
4356#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08004357
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07004358/**
4359 * RIL_UNSOL_OEM_HOOK_RAW
4360 *
4361 * This is for OEM specific use.
4362 *
4363 * "data" is a byte[]
4364 */
4365#define RIL_UNSOL_OEM_HOOK_RAW 1028
4366
John Wang5d621da2009-09-18 17:17:48 -07004367/**
4368 * RIL_UNSOL_RINGBACK_TONE
4369 *
4370 * Indicates that nework doesn't have in-band information, need to
4371 * play out-band tone.
4372 *
4373 * "data" is an int *
4374 * ((int *)data)[0] == 0 for stop play ringback tone.
4375 * ((int *)data)[0] == 1 for start play ringback tone.
4376 */
4377#define RIL_UNSOL_RINGBACK_TONE 1029
4378
John Wang5909cf82010-01-29 00:18:54 -08004379/**
4380 * RIL_UNSOL_RESEND_INCALL_MUTE
4381 *
4382 * Indicates that framework/application need reset the uplink mute state.
4383 *
4384 * There may be situations where the mute state becomes out of sync
4385 * between the application and device in some GSM infrastructures.
4386 *
4387 * "data" is null
4388 */
4389#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08004390
4391/**
4392 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
4393 *
4394 * Called when CDMA subscription source changed.
4395 *
4396 * "data" is int *
4397 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4398 */
Wink Saville29487ef2011-04-15 09:15:31 -07004399#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08004400
4401/**
4402 * RIL_UNSOL_CDMA_PRL_CHANGED
4403 *
4404 * Called when PRL (preferred roaming list) changes.
4405 *
4406 * "data" is int *
4407 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
4408 */
4409#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
4410
4411/**
4412 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
4413 *
4414 * Called when Emergency Callback Mode Ends
4415 *
4416 * Indicates that the radio system selection module has
4417 * proactively exited emergency callback mode.
4418 *
4419 * "data" is NULL
4420 *
4421 */
4422#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
4423
Wink Saville5b9df332011-04-06 16:24:21 -07004424/**
4425 * RIL_UNSOL_RIL_CONNECTED
4426 *
4427 * Called the ril connects and returns the version
4428 *
4429 * "data" is int *
4430 * ((int *)data)[0] is RIL_VERSION
4431 */
4432#define RIL_UNSOL_RIL_CONNECTED 1034
4433
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004434/**
4435 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
4436 *
4437 * Indicates that voice technology has changed. Contains new radio technology
4438 * as a data in the message.
4439 *
4440 * "data" is int *
4441 * ((int *)data)[0] is of type const RIL_RadioTechnology
4442 *
4443 */
4444#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
4445
Wink Saville8a9e0212013-04-09 12:11:38 -07004446/**
4447 * RIL_UNSOL_CELL_INFO_LIST
4448 *
4449 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
4450 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
4451 *
4452 * "data" is NULL
4453 *
4454 * "response" is an array of RIL_CellInfo.
4455 */
4456#define RIL_UNSOL_CELL_INFO_LIST 1036
Naveen Kalla2bc78d62011-12-07 16:22:53 -08004457
Wink Saville865ce3b2013-11-08 16:37:01 -08004458/**
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004459 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
4460 *
4461 * Called when IMS registration state has changed
4462 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004463 * To get IMS registration state and IMS SMS format, callee needs to invoke the
4464 * following request on main thread:
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004465 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004466 * RIL_REQUEST_IMS_REGISTRATION_STATE
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004467 *
Wink Saville865ce3b2013-11-08 16:37:01 -08004468 * "data" is NULL
4469 *
Sukanya Rajkhowaa18b9d12013-09-10 12:30:13 -07004470 */
4471#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
4472
Etan Cohend3652192014-06-20 08:28:44 -07004473/**
4474 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
4475 *
4476 * Indicated when there is a change in subscription status.
4477 * This event will be sent in the following scenarios
4478 * - subscription readiness at modem, which was selected by telephony layer
4479 * - when subscription is deactivated by modem due to UICC card removal
4480 * - When network invalidates the subscription i.e. attach reject due to authentication reject
4481 *
4482 * "data" is const int *
4483 * ((const int *)data)[0] == 0 for Subscription Deactivated
4484 * ((const int *)data)[0] == 1 for Subscription Activated
4485 *
4486 */
4487#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
4488
4489/**
4490 * RIL_UNSOL_SRVCC_STATE_NOTIFY
4491 *
4492 * Called when Single Radio Voice Call Continuity(SRVCC)
4493 * progress state has changed
4494 *
4495 * "data" is int *
4496 * ((int *)data)[0] is of type const RIL_SrvccState
4497 *
4498 */
4499
4500#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
4501
4502/**
4503 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
4504 *
4505 * Called when the hardware configuration associated with the RILd changes
4506 *
4507 * "data" is an array of RIL_HardwareConfig
4508 *
4509 */
4510#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
4511
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004512/***********************************************************************/
4513
Etan Cohend3652192014-06-20 08:28:44 -07004514#if defined(ANDROID_MULTI_SIM)
4515/**
4516 * RIL_Request Function pointer
4517 *
4518 * @param request is one of RIL_REQUEST_*
4519 * @param data is pointer to data defined for that RIL_REQUEST_*
4520 * data is owned by caller, and should not be modified or freed by callee
4521 * @param t should be used in subsequent call to RIL_onResponse
4522 * @param datalen the length of data
4523 *
4524 */
4525typedef void (*RIL_RequestFunc) (int request, void *data,
4526 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
4527
4528/**
4529 * This function should return the current radio state synchronously
4530 */
4531typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
4532
4533#else
4534/* Backward compatible */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004535
4536/**
4537 * RIL_Request Function pointer
4538 *
4539 * @param request is one of RIL_REQUEST_*
4540 * @param data is pointer to data defined for that RIL_REQUEST_*
4541 * data is owned by caller, and should not be modified or freed by callee
4542 * @param t should be used in subsequent call to RIL_onResponse
4543 * @param datalen the length of data
4544 *
4545 */
Wink Saville7f856802009-06-09 10:23:37 -07004546typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004547 size_t datalen, RIL_Token t);
4548
4549/**
4550 * This function should return the current radio state synchronously
4551 */
4552typedef RIL_RadioState (*RIL_RadioStateRequest)();
4553
Etan Cohend3652192014-06-20 08:28:44 -07004554#endif
4555
4556
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004557/**
4558 * This function returns "1" if the specified RIL_REQUEST code is
4559 * supported and 0 if it is not
4560 *
4561 * @param requestCode is one of RIL_REQUEST codes
4562 */
4563
4564typedef int (*RIL_Supports)(int requestCode);
4565
4566/**
Wink Saville7f856802009-06-09 10:23:37 -07004567 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004568 * thread that calls RIL_RequestFunc--and indicates that a pending
4569 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07004570 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004571 * On cancel, the callee should do its best to abandon the request and
4572 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
4573 *
4574 * Subsequent calls to RIL_onRequestComplete for this request with
4575 * other results will be tolerated but ignored. (That is, it is valid
4576 * to ignore the cancellation request)
4577 *
4578 * RIL_Cancel calls should return immediately, and not wait for cancellation
4579 *
Wink Saville7f856802009-06-09 10:23:37 -07004580 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004581 * interface
4582 *
4583 * @param t token wants to be canceled
4584 */
4585
4586typedef void (*RIL_Cancel)(RIL_Token t);
4587
4588typedef void (*RIL_TimedCallback) (void *param);
4589
4590/**
4591 * Return a version string for your RIL implementation
4592 */
4593typedef const char * (*RIL_GetVersion) (void);
4594
4595typedef struct {
4596 int version; /* set to RIL_VERSION */
4597 RIL_RequestFunc onRequest;
4598 RIL_RadioStateRequest onStateRequest;
4599 RIL_Supports supports;
4600 RIL_Cancel onCancel;
4601 RIL_GetVersion getVersion;
4602} RIL_RadioFunctions;
4603
Sungmin Choi75697532013-04-26 15:04:45 -07004604typedef struct {
4605 char *apn;
4606 char *protocol;
4607 int authtype;
4608 char *username;
4609 char *password;
4610} RIL_InitialAttachApn;
4611
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004612#ifdef RIL_SHLIB
4613struct RIL_Env {
4614 /**
4615 * "t" is parameter passed in on previous call to RIL_Notification
4616 * routine.
4617 *
4618 * If "e" != SUCCESS, then response can be null/is ignored
4619 *
Wink Saville7f856802009-06-09 10:23:37 -07004620 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004621 * freed by callee
4622 *
4623 * RIL_onRequestComplete will return as soon as possible
4624 */
Wink Saville7f856802009-06-09 10:23:37 -07004625 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004626 void *response, size_t responselen);
4627
Etan Cohend3652192014-06-20 08:28:44 -07004628#if defined(ANDROID_MULTI_SIM)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004629 /**
4630 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
4631 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
4632 *
4633 * "data" is owned by caller, and should not be modified or freed by callee
4634 */
Etan Cohend3652192014-06-20 08:28:44 -07004635 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
4636#else
4637 /**
4638 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
4639 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
4640 *
4641 * "data" is owned by caller, and should not be modified or freed by callee
4642 */
4643 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
4644#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004645 /**
Wink Saville7f856802009-06-09 10:23:37 -07004646 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004647 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
4648 * a relative time value at which the callback is invoked. If relativeTime is
4649 * NULL or points to a 0-filled structure, the callback will be invoked as
4650 * soon as possible
4651 */
4652
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07004653 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07004654 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004655};
4656
4657
Wink Saville7f856802009-06-09 10:23:37 -07004658/**
4659 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004660 * argc and argv will be command line arguments intended for the RIL implementation
4661 * Return NULL on error
4662 *
4663 * @param env is environment point defined as RIL_Env
4664 * @param argc number of arguments
4665 * @param argv list fo arguments
4666 *
4667 */
4668const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
4669
4670#else /* RIL_SHLIB */
4671
4672/**
4673 * Call this once at startup to register notification routine
4674 *
4675 * @param callbacks user-specifed callback function
4676 */
4677void RIL_register (const RIL_RadioFunctions *callbacks);
4678
4679
4680/**
4681 *
4682 * RIL_onRequestComplete will return as soon as possible
4683 *
4684 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07004685 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004686 * @param e error code
4687 * if "e" != SUCCESS, then response can be null/is ignored
4688 * @param response is owned by caller, and should not be modified or
4689 * freed by callee
4690 * @param responselen the length of response in byte
4691 */
Wink Saville7f856802009-06-09 10:23:37 -07004692void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004693 void *response, size_t responselen);
4694
Etan Cohend3652192014-06-20 08:28:44 -07004695#if defined(ANDROID_MULTI_SIM)
4696/**
4697 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
4698 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
4699 * "data" is owned by caller, and should not be modified or freed by callee
4700 * @param datalen the length of data in byte
4701 */
4702
4703void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
4704 size_t datalen, RIL_SOCKET_ID socket_id);
4705#else
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004706/**
4707 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
4708 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
4709 * "data" is owned by caller, and should not be modified or freed by callee
4710 * @param datalen the length of data in byte
4711 */
4712
Wink Saville7f856802009-06-09 10:23:37 -07004713void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004714 size_t datalen);
Etan Cohend3652192014-06-20 08:28:44 -07004715#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004716
4717/**
Wink Saville7f856802009-06-09 10:23:37 -07004718 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004719 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
4720 * a relative time value at which the callback is invoked. If relativeTime is
4721 * NULL or points to a 0-filled structure, the callback will be invoked as
4722 * soon as possible
4723 *
4724 * @param callback user-specifed callback function
4725 * @param param parameter list
4726 * @param relativeTime a relative time value at which the callback is invoked
4727 */
4728
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07004729void RIL_requestTimedCallback (RIL_TimedCallback callback,
4730 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08004731
4732
4733#endif /* RIL_SHLIB */
4734
4735#ifdef __cplusplus
4736}
4737#endif
4738
4739#endif /*ANDROID_RIL_H*/