blob: fa6a90812502dcf65400c704975cc262dc62ddeb [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 Savillef4c4d362009-04-02 01:37:03 -070021#ifndef FEATURE_UNIT_TEST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080022#include <sys/time.h>
Wink Savillef4c4d362009-04-02 01:37:03 -070023#endif /* !FEATURE_UNIT_TEST */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080024
25#ifdef __cplusplus
26extern "C" {
27#endif
28
Naveen Kalla2bc78d62011-12-07 16:22:53 -080029#define RIL_VERSION 7 /* Current version */
Alex Yakavenka45e740e2012-01-31 11:48:27 -080030#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080031
Wink Savillea592eeb2009-05-22 13:26:36 -070032#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
33#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
34
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080035typedef void * RIL_Token;
36
37typedef enum {
38 RIL_E_SUCCESS = 0,
39 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
40 RIL_E_GENERIC_FAILURE = 2,
41 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
42 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
43 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
44 RIL_E_REQUEST_NOT_SUPPORTED = 6,
45 RIL_E_CANCELLED = 7,
46 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
47 call on a Class C GPRS device */
48 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
49 registers in network */
Wink Saville3d54e742009-05-18 18:00:44 -070050 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
51 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
52 shall be retrieved because of SIM or RUIM
Wink Savillef4c4d362009-04-02 01:37:03 -070053 card absent */
Wink Saville3d54e742009-05-18 18:00:44 -070054 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
Wink Savillef4c4d362009-04-02 01:37:03 -070055 location */
jsh602f80f2009-07-10 15:44:37 -070056 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
John Wang75534472010-04-20 15:11:42 -070057 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
58 RIL_E_ILLEGAL_SIM_OR_ME = 15 /* network selection failed due to
59 illegal SIM or ME */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080060} RIL_Errno;
61
62typedef enum {
63 RIL_CALL_ACTIVE = 0,
64 RIL_CALL_HOLDING = 1,
65 RIL_CALL_DIALING = 2, /* MO call only */
66 RIL_CALL_ALERTING = 3, /* MO call only */
67 RIL_CALL_INCOMING = 4, /* MT call only */
68 RIL_CALL_WAITING = 5 /* MT call only */
69} RIL_CallState;
70
71typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -070072 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
73 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
Naveen Kalla2bc78d62011-12-07 16:22:53 -080074 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
Wink Savillef4c4d362009-04-02 01:37:03 -070075 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
Wink Saville7f856802009-06-09 10:23:37 -070076 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -070077 personalization locked, or SIM absent */
78 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
79 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
80 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
Wink Saville7f856802009-06-09 10:23:37 -070081 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -070082 personalization locked, or RUIM absent */
83 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
Naveen Kalla2bc78d62011-12-07 16:22:53 -080084 RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */
85 RADIO_STATE_ON = 10 /* Radio is on */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080086} RIL_RadioState;
87
Wink Saville43808972011-01-13 17:39:51 -080088typedef enum {
89 RADIO_TECH_UNKNOWN = 0,
90 RADIO_TECH_GPRS = 1,
91 RADIO_TECH_EDGE = 2,
92 RADIO_TECH_UMTS = 3,
93 RADIO_TECH_IS95A = 4,
94 RADIO_TECH_IS95B = 5,
95 RADIO_TECH_1xRTT = 6,
96 RADIO_TECH_EVDO_0 = 7,
97 RADIO_TECH_EVDO_A = 8,
98 RADIO_TECH_HSDPA = 9,
99 RADIO_TECH_HSUPA = 10,
100 RADIO_TECH_HSPA = 11,
101 RADIO_TECH_EVDO_B = 12,
102 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800103 RADIO_TECH_LTE = 14,
Naveen Kalla2bc78d62011-12-07 16:22:53 -0800104 RADIO_TECH_HSPAP = 15, // HSPA+
105 RADIO_TECH_GSM = 16 // Only supports voice
Wink Saville43808972011-01-13 17:39:51 -0800106} RIL_RadioTechnology;
107
Wink Savillec0114b32011-02-18 10:14:07 -0800108// Do we want to split Data from Voice and the use
109// RIL_RadioTechnology for get/setPreferredVoice/Data ?
110typedef enum {
111 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
112 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
113 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
114 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
115 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
116 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
117 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
118 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
119 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
120 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
121 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
122 PREF_NET_TYPE_LTE_ONLY = 11 /* LTE only */
123} RIL_PreferredNetworkType;
124
125/* Source for cdma subscription */
126typedef enum {
127 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
128 CDMA_SUBSCRIPTION_SOURCE_NV = 1
129} RIL_CdmaSubscriptionSource;
130
Wink Saville74fa3882009-12-22 15:35:41 -0800131/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
132typedef enum {
133 RIL_UUS_TYPE1_IMPLICIT = 0,
134 RIL_UUS_TYPE1_REQUIRED = 1,
135 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
136 RIL_UUS_TYPE2_REQUIRED = 3,
137 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
138 RIL_UUS_TYPE3_REQUIRED = 5,
139 RIL_UUS_TYPE3_NOT_REQUIRED = 6
140} RIL_UUS_Type;
141
142/* User-to-User Signaling Information data coding schemes. Possible values for
143 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
144 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
145typedef enum {
146 RIL_UUS_DCS_USP = 0, /* User specified protocol */
147 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
148 RIL_UUS_DCS_X244 = 2, /* X.244 */
149 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
150 convergence function */
151 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
152} RIL_UUS_DCS;
153
154/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
155 * This data is passed in RIL_ExtensionRecord and rec contains this
156 * structure when type is RIL_UUS_INFO_EXT_REC */
157typedef struct {
158 RIL_UUS_Type uusType; /* UUS Type */
159 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
160 int uusLength; /* Length of UUS Data */
161 char * uusData; /* UUS Data */
162} RIL_UUS_Info;
163
164/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700165typedef struct {
166 char isPresent; /* non-zero if signal information record is present */
167 char signalType; /* as defined 3.7.5.5-1 */
168 char alertPitch; /* as defined 3.7.5.5-2 */
169 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
170} RIL_CDMA_SignalInfoRecord;
171
Wink Saville1b5fd232009-04-22 14:50:00 -0700172typedef struct {
173 RIL_CallState state;
174 int index; /* Connection Index for use with, eg, AT+CHLD */
175 int toa; /* type of address, eg 145 = intl */
176 char isMpty; /* nonzero if is mpty call */
177 char isMT; /* nonzero if call is mobile terminated */
178 char als; /* ALS line indicator if available
179 (0 = line 1) */
180 char isVoice; /* nonzero if this is is a voice call */
181 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
182 char * number; /* Remote party number */
183 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
184 char * name; /* Remote party name */
185 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800186 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800187} RIL_Call;
188
Wink Savillec0114b32011-02-18 10:14:07 -0800189/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800190typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800191 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700192 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700193 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
194 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800195 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800196 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
197} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800198
199/*
200 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
201 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
202 */
203typedef struct {
204 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500205 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
206 back-off timer value RIL wants to override the one
207 pre-configured in FW.
208 The unit is miliseconds.
209 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700210 The value 0 means retry should be done ASAP.
211 The value of MAX_INT(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800212 int cid; /* Context ID, uniquely identifies this call */
213 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
214 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
215 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
216 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
217 such as "IP" or "IPV6" */
218 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800219 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
220 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800221 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800222 one of each. If the prefix length is absent the addresses
223 are assumed to be point to point with IPv4 having a prefix
224 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800225 char * dnses; /* A space-delimited list of DNS server addresses,
226 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
227 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800228 char * gateways; /* A space-delimited list of default gateway addresses,
229 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
230 May be empty in which case the addresses represent point
231 to point connections. */
232} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800233
234typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800235 int messageRef; /* TP-Message-Reference for GSM,
236 and BearerData MessageId for CDMA
237 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800238 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700239 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
240 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
241 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800242} RIL_SMS_Response;
243
244/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
245typedef struct {
246 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
247 /* 0 = "REC UNREAD" */
248 /* 1 = "REC READ" */
249 /* 2 = "STO UNSENT" */
250 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700251 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
252 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800253 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
254 (as expected by TS 27.005) or NULL for default SMSC */
255} RIL_SMS_WriteArgs;
256
257/** Used by RIL_REQUEST_DIAL */
258typedef struct {
259 char * address;
260 int clir;
261 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
262 * clir == 0 on "use subscription default value"
263 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
264 * clir == 2 on "CLIR suppression" (allow CLI presentation)
265 */
Wink Saville74fa3882009-12-22 15:35:41 -0800266 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800267} RIL_Dial;
268
269typedef struct {
270 int command; /* one of the commands listed for TS 27.007 +CRSM*/
271 int fileid; /* EF id */
272 char *path; /* "pathid" from TS 27.007 +CRSM command.
273 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700274 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800275 */
276 int p1;
277 int p2;
278 int p3;
279 char *data; /* May be NULL*/
280 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800281} RIL_SIM_IO_v5;
282
283typedef struct {
284 int command; /* one of the commands listed for TS 27.007 +CRSM*/
285 int fileid; /* EF id */
286 char *path; /* "pathid" from TS 27.007 +CRSM command.
287 Path is in hex asciii format eg "7f205f70"
288 Path must always be provided.
289 */
290 int p1;
291 int p2;
292 int p3;
293 char *data; /* May be NULL*/
294 char *pin2; /* May be NULL*/
295 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
296} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800297
298typedef struct {
299 int sw1;
300 int sw2;
301 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
302} RIL_SIM_IO_Response;
303
304/* See also com.android.internal.telephony.gsm.CallForwardInfo */
305
306typedef struct {
307 int status; /*
308 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
309 * status 1 = active, 0 = not active
310 *
311 * For RIL_REQUEST_SET_CALL_FORWARD:
312 * status is:
313 * 0 = disable
314 * 1 = enable
315 * 2 = interrogate
316 * 3 = registeration
317 * 4 = erasure
318 */
319
Wink Saville3d54e742009-05-18 18:00:44 -0700320 int reason; /* from TS 27.007 7.11 "reason" */
321 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
322 See table for Android mapping from
323 MMI service code
324 0 means user doesn't input class */
325 int toa; /* "type" from TS 27.007 7.11 */
326 char * number; /* "number" from TS 27.007 7.11. May be NULL */
327 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800328}RIL_CallForwardInfo;
329
330typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700331 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
332 * Upper 16 bits is LAC and lower 16 bits
333 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800334 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700335 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700336 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800337 */
johnwange0ba6a92009-09-11 19:14:52 -0700338 int rssi; /* Received RSSI in GSM,
339 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800340 */
341} RIL_NeighboringCell;
342
343/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
344typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700345 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800346 CALL_FAIL_NORMAL = 16,
347 CALL_FAIL_BUSY = 17,
348 CALL_FAIL_CONGESTION = 34,
349 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
350 CALL_FAIL_CALL_BARRED = 240,
351 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700352 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
353 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Wink Saville1b5fd232009-04-22 14:50:00 -0700354 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
355 CALL_FAIL_CDMA_DROP = 1001,
356 CALL_FAIL_CDMA_INTERCEPT = 1002,
357 CALL_FAIL_CDMA_REORDER = 1003,
358 CALL_FAIL_CDMA_SO_REJECT = 1004,
359 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
360 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
361 CALL_FAIL_CDMA_PREEMPTED = 1007,
362 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
363 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700364 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800365 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
366} RIL_LastCallFailCause;
367
Wink Savillef4c4d362009-04-02 01:37:03 -0700368/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800369typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800370 PDP_FAIL_NONE = 0, /* No error, connection ok */
371
372 /* an integer cause code defined in TS 24.008
373 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
374 If the implementation does not have access to the exact cause codes,
375 then it should return one of the following values,
376 as the UI layer needs to distinguish these
377 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700378 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
379 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
380 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
381 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
382 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
383 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
384 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
385 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
386 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
387 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800388 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
389 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
390 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
391 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700392 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
Wink Saville43808972011-01-13 17:39:51 -0800393
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700394 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800395 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
396 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800397
398 /* reasons for data call drop - network/modem disconnect */
Wink Savillec0114b32011-02-18 10:14:07 -0800399 PDP_FAIL_SIGNAL_LOST = -3, /* no retry */
Wink Saville43808972011-01-13 17:39:51 -0800400 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
401 with parameters appropriate for new technology */
402 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
403 powered off - no retry */
404 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
405 mode was up on same APN/data profile - no retry until
406 tethered call is off */
407
408 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */
409} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800410
jsh602f80f2009-07-10 15:44:37 -0700411/* See RIL_REQUEST_SETUP_DATA_CALL */
412typedef enum {
413 RIL_DATA_PROFILE_DEFAULT = 0,
414 RIL_DATA_PROFILE_TETHERED = 1,
415 RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */
416} RIL_DataProfile;
417
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800418/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
419typedef struct {
420 int notificationType; /*
421 * 0 = MO intermediate result code
422 * 1 = MT unsolicited result code
423 */
424 int code; /* See 27.007 7.17
425 "code1" for MO
426 "code2" for MT. */
427 int index; /* CUG index. See 27.007 7.17. */
428 int type; /* "type" from 27.007 7.17 (MT only). */
429 char * number; /* "number" from 27.007 7.17
430 (MT only, may be NULL). */
431} RIL_SuppSvcNotification;
432
Wink Savillef4c4d362009-04-02 01:37:03 -0700433#define RIL_CARD_MAX_APPS 8
434
435typedef enum {
436 RIL_CARDSTATE_ABSENT = 0,
437 RIL_CARDSTATE_PRESENT = 1,
438 RIL_CARDSTATE_ERROR = 2
439} RIL_CardState;
440
441typedef enum {
442 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
443 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700444 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
445 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700446 involved */
447 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
448 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
449 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
450 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
451 RIL_PERSOSUBSTATE_SIM_SIM = 7,
452 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
453 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
454 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
455 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
456 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
457 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
458 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
459 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
460 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
461 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
462 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
463 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
464 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
465 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
466 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
467 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
468 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
469} RIL_PersoSubstate;
470
471typedef enum {
472 RIL_APPSTATE_UNKNOWN = 0,
473 RIL_APPSTATE_DETECTED = 1,
474 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
475 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700476 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700477 when app_state is assigned to this value */
478 RIL_APPSTATE_READY = 5
479} RIL_AppState;
480
481typedef enum {
482 RIL_PINSTATE_UNKNOWN = 0,
483 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
484 RIL_PINSTATE_ENABLED_VERIFIED = 2,
485 RIL_PINSTATE_DISABLED = 3,
486 RIL_PINSTATE_ENABLED_BLOCKED = 4,
487 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
488} RIL_PinState;
489
490typedef enum {
491 RIL_APPTYPE_UNKNOWN = 0,
492 RIL_APPTYPE_SIM = 1,
493 RIL_APPTYPE_USIM = 2,
494 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -0800495 RIL_APPTYPE_CSIM = 4,
496 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -0700497} RIL_AppType;
498
499typedef struct
500{
Wink Saville7f856802009-06-09 10:23:37 -0700501 RIL_AppType app_type;
502 RIL_AppState app_state;
503 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -0700504 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -0700505 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -0700506 0x30, 0x30, 0x30 */
507 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -0800508 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -0700509 RIL_PinState pin1;
510 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -0700511} RIL_AppStatus;
512
Wink Savillec0114b32011-02-18 10:14:07 -0800513/* Deprecated, use RIL_CardStatus_v6 */
514typedef struct
515{
516 RIL_CardState card_state;
517 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
518 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
519 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
520 int num_applications; /* value <= RIL_CARD_MAX_APPS */
521 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
522} RIL_CardStatus_v5;
523
Wink Savillef4c4d362009-04-02 01:37:03 -0700524typedef struct
525{
Wink Saville7f856802009-06-09 10:23:37 -0700526 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -0700527 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -0800528 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
529 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
530 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -0700531 int num_applications; /* value <= RIL_CARD_MAX_APPS */
532 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -0800533} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -0700534
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800535/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
536 * or as part of RIL_SimRefreshResponse_v7
537 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800538typedef enum {
539 /* A file on SIM has been updated. data[1] contains the EFID. */
540 SIM_FILE_UPDATE = 0,
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800541 /* SIM initialized. All files should be re-read. */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800542 SIM_INIT = 1,
543 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
544 SIM_RESET = 2
545} RIL_SimRefreshResult;
546
Alex Yakavenka45e740e2012-01-31 11:48:27 -0800547typedef struct {
548 RIL_SimRefreshResult result;
549 int ef_id; /* is the EFID of the updated file if the result is */
550 /* SIM_FILE_UPDATE or 0 for any other result. */
551 char * aid; /* is AID(application ID) of the card application */
552 /* See ETSI 102.221 8.1 and 101.220 4 */
553 /* For SIM_FILE_UPDATE result it can be set to AID of */
554 /* application in which updated EF resides or it can be */
555 /* NULL if EF is outside of an application. */
556 /* For SIM_INIT result this field is set to AID of */
557 /* application that caused REFRESH */
558 /* For SIM_RESET result it is NULL. */
559} RIL_SimRefreshResponse_v7;
560
Wink Savillec0114b32011-02-18 10:14:07 -0800561/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
562typedef struct {
563 char * number; /* Remote party number */
564 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
565 char * name; /* Remote party name */
566 RIL_CDMA_SignalInfoRecord signalInfoRecord;
567} RIL_CDMA_CallWaiting_v5;
568
Wink Saville1b5fd232009-04-22 14:50:00 -0700569typedef struct {
570 char * number; /* Remote party number */
571 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
572 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -0700573 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -0800574 /* Number type/Number plan required to support International Call Waiting */
575 int number_type; /* 0=Unknown, 1=International, 2=National,
576 3=Network specific, 4=subscriber */
577 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
578} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -0700579
Wink Savillea592eeb2009-05-22 13:26:36 -0700580/**
581 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
582 *
583 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
584 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
585 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
586 * CBM message ID.
587 *
588 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
589 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
590 * and 9.4.4.2.3 for UMTS.
591 * All other values can be treated as empty CBM data coding scheme.
592 *
593 * selected 0 means message types specified in <fromServiceId, toServiceId>
594 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
595 *
596 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
597 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
598 */
Wink Savillef4c4d362009-04-02 01:37:03 -0700599typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -0700600 int fromServiceId;
601 int toServiceId;
602 int fromCodeScheme;
603 int toCodeScheme;
604 unsigned char selected;
605} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -0700606
The Android Open Source Project34a51082009-03-05 14:34:37 -0800607/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
608#define RIL_RESTRICTED_STATE_NONE 0x00
609/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
610#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
611/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
612#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -0700613/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -0800614#define RIL_RESTRICTED_STATE_CS_ALL 0x04
615/* Block packet data access due to restriction. */
616#define RIL_RESTRICTED_STATE_PS_ALL 0x10
617
Wink Saville1b5fd232009-04-22 14:50:00 -0700618/* The status for an OTASP/OTAPA session */
619typedef enum {
620 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
621 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
622 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
623 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
624 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
625 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
626 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
627 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
628 CDMA_OTA_PROVISION_STATUS_COMMITTED,
629 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
630 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
631 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
632} RIL_CDMA_OTA_ProvisionStatus;
633
634typedef struct {
635 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
636 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
637} RIL_GW_SignalStrength;
638
639
640typedef struct {
641 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
642 * multiplied by -1. Example: If the actual RSSI is -75, then this response
643 * value will be 75.
644 */
645 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
646 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
647 * will be 125.
648 */
649} RIL_CDMA_SignalStrength;
650
651
652typedef struct {
653 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
654 * multiplied by -1. Example: If the actual RSSI is -75, then this response
655 * value will be 75.
656 */
657 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
658 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
659 * will be 125.
660 */
661 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
662} RIL_EVDO_SignalStrength;
663
Wink Savillec0114b32011-02-18 10:14:07 -0800664typedef struct {
665 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -0700666 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
667 * Range: 44 to 140 dBm
668 * INT_MAX: 0x7FFFFFFF denotes invalid value.
669 * Reference: 3GPP TS 36.133 9.1.4 */
670 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
671 * Range: 20 to 3 dB.
672 * INT_MAX: 0x7FFFFFFF denotes invalid value.
673 * Reference: 3GPP TS 36.133 9.1.7 */
674 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
675 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
676 * INT_MAX : 0x7FFFFFFF denotes invalid value.
677 * Reference: 3GPP TS 36.101 8.1.1 */
678 int cqi; /* The current Channel Quality Indicator.
679 * Range: 0 to 15.
680 * INT_MAX : 0x7FFFFFFF denotes invalid value.
681 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -0800682} RIL_LTE_SignalStrength;
683
684/* Deprecated, use RIL_SignalStrength_v6 */
685typedef struct {
686 RIL_GW_SignalStrength GW_SignalStrength;
687 RIL_CDMA_SignalStrength CDMA_SignalStrength;
688 RIL_EVDO_SignalStrength EVDO_SignalStrength;
689} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -0700690
691typedef struct {
692 RIL_GW_SignalStrength GW_SignalStrength;
693 RIL_CDMA_SignalStrength CDMA_SignalStrength;
694 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -0800695 RIL_LTE_SignalStrength LTE_SignalStrength;
696} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -0700697
698/* Names of the CDMA info records (C.S0005 section 3.7.5) */
699typedef enum {
700 RIL_CDMA_DISPLAY_INFO_REC,
701 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
702 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
703 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
704 RIL_CDMA_SIGNAL_INFO_REC,
705 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
706 RIL_CDMA_LINE_CONTROL_INFO_REC,
707 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
708 RIL_CDMA_T53_CLIR_INFO_REC,
709 RIL_CDMA_T53_RELEASE_INFO_REC,
710 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
711} RIL_CDMA_InfoRecName;
712
713/* Display Info Rec as defined in C.S0005 section 3.7.5.1
714 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
715 Note: the Extended Display info rec contains multiple records of the
716 form: display_tag, display_len, and display_len occurrences of the
717 chari field if the display_tag is not 10000000 or 10000001.
718 To save space, the records are stored consecutively in a byte buffer.
719 The display_tag, display_len and chari fields are all 1 byte.
720*/
721
722typedef struct {
723 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -0700724 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -0700725} RIL_CDMA_DisplayInfoRecord;
726
727/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
728 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
729 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
730*/
731
732typedef struct {
733 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -0700734 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -0700735 char number_type;
736 char number_plan;
737 char pi;
738 char si;
739} RIL_CDMA_NumberInfoRecord;
740
741/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
742typedef enum {
743 RIL_REDIRECTING_REASON_UNKNOWN = 0,
744 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
745 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
746 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
747 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
748 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
749 RIL_REDIRECTING_REASON_RESERVED
750} RIL_CDMA_RedirectingReason;
751
752typedef struct {
753 RIL_CDMA_NumberInfoRecord redirectingNumber;
754 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
755 RIL_CDMA_RedirectingReason redirectingReason;
756} RIL_CDMA_RedirectingNumberInfoRecord;
757
758/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
759typedef struct {
760 char lineCtrlPolarityIncluded;
761 char lineCtrlToggle;
762 char lineCtrlReverse;
763 char lineCtrlPowerDenial;
764} RIL_CDMA_LineControlInfoRecord;
765
766/* T53 CLIR Information Record */
767typedef struct {
768 char cause;
769} RIL_CDMA_T53_CLIRInfoRecord;
770
771/* T53 Audio Control Information Record */
772typedef struct {
773 char upLink;
774 char downLink;
775} RIL_CDMA_T53_AudioControlInfoRecord;
776
777typedef struct {
778
779 RIL_CDMA_InfoRecName name;
780
781 union {
782 /* Display and Extended Display Info Rec */
783 RIL_CDMA_DisplayInfoRecord display;
784
785 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
786 RIL_CDMA_NumberInfoRecord number;
787
788 /* Signal Info Rec */
789 RIL_CDMA_SignalInfoRecord signal;
790
791 /* Redirecting Number Info Rec */
792 RIL_CDMA_RedirectingNumberInfoRecord redir;
793
794 /* Line Control Info Rec */
795 RIL_CDMA_LineControlInfoRecord lineCtrl;
796
797 /* T53 CLIR Info Rec */
798 RIL_CDMA_T53_CLIRInfoRecord clir;
799
800 /* T53 Audio Control Info Rec */
801 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
802 } rec;
803} RIL_CDMA_InformationRecord;
804
805#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
806
807typedef struct {
808 char numberOfInfoRecs;
809 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
810} RIL_CDMA_InformationRecords;
811
Wink Saville7f856802009-06-09 10:23:37 -0700812/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800813 * RIL_REQUEST_GET_SIM_STATUS
814 *
815 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -0700816 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800817 * "data" is NULL
818 *
Wink Savillefd729372011-02-22 16:19:39 -0800819 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800820 *
821 * Valid errors:
822 * Must never fail
823 */
824#define RIL_REQUEST_GET_SIM_STATUS 1
825
826/**
827 * RIL_REQUEST_ENTER_SIM_PIN
828 *
John Wang309ac292009-07-30 14:53:23 -0700829 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800830 *
831 * "data" is const char **
832 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -0800833 * ((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 -0800834 *
jsh593c9102009-06-24 16:13:44 -0700835 * "response" is int *
836 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800837 *
838 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700839 *
840 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800841 * RADIO_NOT_AVAILABLE (radio resetting)
842 * GENERIC_FAILURE
843 * PASSWORD_INCORRECT
844 */
845
846#define RIL_REQUEST_ENTER_SIM_PIN 2
847
848
849/**
850 * RIL_REQUEST_ENTER_SIM_PUK
851 *
Wink Saville7f856802009-06-09 10:23:37 -0700852 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800853 *
854 * "data" is const char **
855 * ((const char **)data)[0] is PUK value
856 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -0800857 * ((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 -0800858 *
jsh593c9102009-06-24 16:13:44 -0700859 * "response" is int *
860 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800861 *
862 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700863 *
864 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800865 * RADIO_NOT_AVAILABLE (radio resetting)
866 * GENERIC_FAILURE
867 * PASSWORD_INCORRECT
868 * (PUK is invalid)
869 */
870
871#define RIL_REQUEST_ENTER_SIM_PUK 3
872
873/**
874 * RIL_REQUEST_ENTER_SIM_PIN2
875 *
876 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
877 * returned as a a failure from a previous operation.
878 *
879 * "data" is const char **
880 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -0800881 * ((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 -0800882 *
jsh593c9102009-06-24 16:13:44 -0700883 * "response" is int *
884 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800885 *
886 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700887 *
888 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800889 * RADIO_NOT_AVAILABLE (radio resetting)
890 * GENERIC_FAILURE
891 * PASSWORD_INCORRECT
892 */
893
894#define RIL_REQUEST_ENTER_SIM_PIN2 4
895
896/**
897 * RIL_REQUEST_ENTER_SIM_PUK2
898 *
Wink Saville7f856802009-06-09 10:23:37 -0700899 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800900 *
901 * "data" is const char **
902 * ((const char **)data)[0] is PUK2 value
903 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -0800904 * ((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 -0800905 *
jsh593c9102009-06-24 16:13:44 -0700906 * "response" is int *
907 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800908 *
909 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700910 *
911 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800912 * RADIO_NOT_AVAILABLE (radio resetting)
913 * GENERIC_FAILURE
914 * PASSWORD_INCORRECT
915 * (PUK2 is invalid)
916 */
917
918#define RIL_REQUEST_ENTER_SIM_PUK2 5
919
920/**
921 * RIL_REQUEST_CHANGE_SIM_PIN
922 *
Wink Saville7f856802009-06-09 10:23:37 -0700923 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800924 *
925 * "data" is const char **
926 * ((const char **)data)[0] is old PIN value
927 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -0800928 * ((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 -0800929 *
jsh593c9102009-06-24 16:13:44 -0700930 * "response" is int *
931 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800932 *
933 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700934 *
935 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800936 * RADIO_NOT_AVAILABLE (radio resetting)
937 * GENERIC_FAILURE
938 * PASSWORD_INCORRECT
939 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -0700940 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800941 */
942
943#define RIL_REQUEST_CHANGE_SIM_PIN 6
944
945
946/**
947 * RIL_REQUEST_CHANGE_SIM_PIN2
948 *
Wink Saville7f856802009-06-09 10:23:37 -0700949 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800950 *
951 * "data" is const char **
952 * ((const char **)data)[0] is old PIN2 value
953 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -0800954 * ((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 -0800955 *
jsh593c9102009-06-24 16:13:44 -0700956 * "response" is int *
957 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800958 *
959 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700960 *
961 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800962 * RADIO_NOT_AVAILABLE (radio resetting)
963 * GENERIC_FAILURE
964 * PASSWORD_INCORRECT
965 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -0700966 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800967 */
968
969#define RIL_REQUEST_CHANGE_SIM_PIN2 7
970
971/**
972 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
973 *
974 * Requests that network personlization be deactivated
975 *
976 * "data" is const char **
977 * ((const char **)(data))[0]] is network depersonlization code
978 *
jsh593c9102009-06-24 16:13:44 -0700979 * "response" is int *
980 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800981 *
982 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700983 *
984 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800985 * RADIO_NOT_AVAILABLE (radio resetting)
986 * GENERIC_FAILURE
987 * PASSWORD_INCORRECT
988 * (code is invalid)
989 */
990
991#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
992
993/**
Wink Saville7f856802009-06-09 10:23:37 -0700994 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800995 *
996 * Requests current call list
997 *
998 * "data" is NULL
999 *
1000 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -07001001 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001002 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001003 *
1004 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001005 * RADIO_NOT_AVAILABLE (radio resetting)
1006 * GENERIC_FAILURE
1007 * (request will be made again in a few hundred msec)
1008 */
1009
1010#define RIL_REQUEST_GET_CURRENT_CALLS 9
1011
1012
Wink Saville7f856802009-06-09 10:23:37 -07001013/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001014 * RIL_REQUEST_DIAL
1015 *
1016 * Initiate voice call
1017 *
1018 * "data" is const RIL_Dial *
1019 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001020 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001021 * This method is never used for supplementary service codes
1022 *
1023 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001024 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001025 * RADIO_NOT_AVAILABLE (radio resetting)
1026 * GENERIC_FAILURE
1027 */
1028#define RIL_REQUEST_DIAL 10
1029
1030/**
1031 * RIL_REQUEST_GET_IMSI
1032 *
1033 * Get the SIM IMSI
1034 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08001035 * Only valid when radio state is "RADIO_STATE_ON"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001036 *
Wink Savillec0114b32011-02-18 10:14:07 -08001037 * "data" is const char **
1038 * ((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 -08001039 * "response" is a const char * containing the IMSI
1040 *
1041 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001042 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001043 * RADIO_NOT_AVAILABLE (radio resetting)
1044 * GENERIC_FAILURE
1045 */
1046
1047#define RIL_REQUEST_GET_IMSI 11
1048
1049/**
1050 * RIL_REQUEST_HANGUP
1051 *
1052 * Hang up a specific line (like AT+CHLD=1x)
1053 *
John Wang06bae4b2010-11-18 16:37:09 -08001054 * After this HANGUP request returns, RIL should show the connection is NOT
1055 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1056 *
Wink Saville7f856802009-06-09 10:23:37 -07001057 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001058 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001059 *
1060 * "response" is NULL
1061 *
1062 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001063 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001064 * RADIO_NOT_AVAILABLE (radio resetting)
1065 * GENERIC_FAILURE
1066 */
1067
1068#define RIL_REQUEST_HANGUP 12
1069
1070/**
1071 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
1072 *
1073 * Hang up waiting or held (like AT+CHLD=0)
1074 *
John Wang06bae4b2010-11-18 16:37:09 -08001075 * After this HANGUP request returns, RIL should show the connection is NOT
1076 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1077 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001078 * "data" is NULL
1079 * "response" is NULL
1080 *
1081 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001082 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001083 * RADIO_NOT_AVAILABLE (radio resetting)
1084 * GENERIC_FAILURE
1085 */
1086
1087#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
1088
1089/**
1090 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
1091 *
1092 * Hang up waiting or held (like AT+CHLD=1)
1093 *
John Wang06bae4b2010-11-18 16:37:09 -08001094 * After this HANGUP request returns, RIL should show the connection is NOT
1095 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1096 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001097 * "data" is NULL
1098 * "response" is NULL
1099 *
1100 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001101 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001102 * RADIO_NOT_AVAILABLE (radio resetting)
1103 * GENERIC_FAILURE
1104 */
1105
1106#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
1107
1108/**
1109 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
1110 *
1111 * Switch waiting or holding call and active call (like AT+CHLD=2)
1112 *
1113 * State transitions should be is follows:
1114 *
1115 * If call 1 is waiting and call 2 is active, then if this re
1116 *
1117 * BEFORE AFTER
1118 * Call 1 Call 2 Call 1 Call 2
1119 * ACTIVE HOLDING HOLDING ACTIVE
1120 * ACTIVE WAITING HOLDING ACTIVE
1121 * HOLDING WAITING HOLDING ACTIVE
1122 * ACTIVE IDLE HOLDING IDLE
1123 * IDLE IDLE IDLE IDLE
1124 *
1125 * "data" is NULL
1126 * "response" is NULL
1127 *
1128 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001129 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001130 * RADIO_NOT_AVAILABLE (radio resetting)
1131 * GENERIC_FAILURE
1132 */
1133
1134#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
1135#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
1136
1137/**
1138 * RIL_REQUEST_CONFERENCE
1139 *
1140 * Conference holding and active (like AT+CHLD=3)
1141
1142 * "data" is NULL
1143 * "response" is NULL
1144 *
1145 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001146 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001147 * RADIO_NOT_AVAILABLE (radio resetting)
1148 * GENERIC_FAILURE
1149 */
1150#define RIL_REQUEST_CONFERENCE 16
1151
1152/**
1153 * RIL_REQUEST_UDUB
1154 *
Wink Saville7f856802009-06-09 10:23:37 -07001155 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001156 * waiting call answer)(RIL_BasicRequest r);
1157 *
1158 * "data" is NULL
1159 * "response" is NULL
1160 *
1161 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001162 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001163 * RADIO_NOT_AVAILABLE (radio resetting)
1164 * GENERIC_FAILURE
1165 */
1166#define RIL_REQUEST_UDUB 17
1167
1168/**
1169 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1170 *
1171 * Requests the failure cause code for the most recently terminated call
1172 *
1173 * "data" is NULL
1174 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -07001175 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001176 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
1177 * failure reasons are derived from the possible call failure scenarios
1178 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001179 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08001180 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
1181 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
1182 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001183 * If the implementation does not have access to the exact cause codes,
1184 * then it should return one of the values listed in RIL_LastCallFailCause,
1185 * as the UI layer needs to distinguish these cases for tone generation or
1186 * error notification.
1187 *
1188 * Valid errors:
1189 * SUCCESS
1190 * RADIO_NOT_AVAILABLE
1191 * GENERIC_FAILURE
1192 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001193 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001194 */
1195#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
1196
1197/**
1198 * RIL_REQUEST_SIGNAL_STRENGTH
1199 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001200 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001201 *
1202 * Must succeed if radio is on.
1203 *
1204 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07001205 *
1206 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001207 *
1208 * Valid errors:
1209 * SUCCESS
1210 * RADIO_NOT_AVAILABLE
1211 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001212#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07001213
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001214/**
Wink Savillec0114b32011-02-18 10:14:07 -08001215 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001216 *
1217 * Request current registration state
1218 *
1219 * "data" is NULL
1220 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -07001221 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -07001222 * 0 - Not registered, MT is not currently searching
1223 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001224 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -07001225 * 2 - Not registered, but MT is currently searching
1226 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001227 * 3 - Registration denied
1228 * 4 - Unknown
1229 * 5 - Registered, roaming
John Wang7f8ded12010-01-21 15:07:28 -08001230 * 10 - Same as 0, but indicates that emergency calls
1231 * are enabled.
1232 * 12 - Same as 2, but indicates that emergency calls
1233 * are enabled.
1234 * 13 - Same as 3, but indicates that emergency calls
1235 * are enabled.
1236 * 14 - Same as 4, but indicates that emergency calls
1237 * are enabled.
1238 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001239 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1240 * NULL if not.Valid LAC are 0x0000 - 0xffff
1241 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1242 * NULL if not.
1243 * Valid CID are 0x00000000 - 0xffffffff
1244 * In GSM, CID is Cell ID (see TS 27.007)
1245 * in 16 bits
1246 * In UMTS, CID is UMTS Cell Identity
1247 * (see TS 25.331) in 28 bits
Wink Saville43808972011-01-13 17:39:51 -08001248 * ((const char **)response)[3] indicates the available voice radio technology,
1249 * valid values as defined by RIL_RadioTechnology.
Wink Saville1b5fd232009-04-22 14:50:00 -07001250 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1251 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07001252 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07001253 * ((const char **)response)[5] is Base Station latitude if registered on a
1254 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001255 * latitude is a decimal number as specified in
1256 * 3GPP2 C.S0005-A v6.0. It is represented in
1257 * units of 0.25 seconds and ranges from -1296000
1258 * to 1296000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08001259 * to a range of -90 to +90 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07001260 * ((const char **)response)[6] is Base Station longitude if registered on a
1261 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001262 * longitude is a decimal number as specified in
1263 * 3GPP2 C.S0005-A v6.0. It is represented in
1264 * units of 0.25 seconds and ranges from -2592000
1265 * to 2592000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08001266 * to a range of -180 to +180 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07001267 * ((const char **)response)[7] is concurrent services support indicator if
1268 * registered on a CDMA system 0-1.
1269 * 0 - Concurrent services not supported,
1270 * 1 - Concurrent services supported
1271 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1272 * NULL if not. Valid System ID are 0 - 32767
1273 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1274 * NULL if not. Valid System ID are 0 - 65535
1275 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001276 * on a CDMA or EVDO system or NULL if not. Valid values
Wink Saville1b5fd232009-04-22 14:50:00 -07001277 * are 0-255.
1278 * ((const char **)response)[11] indicates whether the current system is in the
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001279 * PRL if registered on a CDMA or EVDO system or NULL if
Wink Saville1b5fd232009-04-22 14:50:00 -07001280 * not. 0=not in the PRL, 1=in the PRL
1281 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001282 * if registered on a CDMA or EVDO system or NULL if not.
Wink Saville1b5fd232009-04-22 14:50:00 -07001283 * Valid values are 0-255.
1284 * ((const char **)response)[13] if registration state is 3 (Registration
1285 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07001286 * registration was denied. See 3GPP TS 24.008,
1287 * 10.5.3.6 and Annex G.
1288 * 0 - General
1289 * 1 - Authentication Failure
1290 * 2 - IMSI unknown in HLR
1291 * 3 - Illegal MS
1292 * 4 - Illegal ME
1293 * 5 - PLMN not allowed
1294 * 6 - Location area not allowed
1295 * 7 - Roaming not allowed
1296 * 8 - No Suitable Cells in this Location Area
1297 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07001298 * 10 - Persistent location update reject
Wink Savillec0114b32011-02-18 10:14:07 -08001299 * 11 - PLMN not allowed
1300 * 12 - Location area not allowed
1301 * 13 - Roaming not allowed in this Location Area
1302 * 15 - No Suitable Cells in this Location Area
1303 * 17 - Network Failure
1304 * 20 - MAC Failure
1305 * 21 - Sync Failure
1306 * 22 - Congestion
1307 * 23 - GSM Authentication unacceptable
1308 * 25 - Not Authorized for this CSG
1309 * 32 - Service option not supported
1310 * 33 - Requested service option not subscribed
1311 * 34 - Service option temporarily out of order
1312 * 38 - Call cannot be identified
1313 * 48-63 - Retry upon entry into a new cell
1314 * 95 - Semantically incorrect message
1315 * 96 - Invalid mandatory information
1316 * 97 - Message type non-existent or not implemented
1317 * 98 - Message not compatible with protocol state
1318 * 99 - Information element non-existent or not implemented
1319 * 100 - Conditional IE error
1320 * 101 - Message not compatible with protocol state
1321 * 111 - Protocol error, unspecified
jshca5e3472010-06-23 21:53:24 -07001322 * ((const char **)response)[14] is the Primary Scrambling Code of the current
1323 * cell as described in TS 25.331, in hexadecimal
1324 * format, or NULL if unknown or not registered
1325 * to a UMTS network.
Wink Saville1b5fd232009-04-22 14:50:00 -07001326 *
1327 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001328 * as "out of service" in the Android telephony system
1329 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001330 * Registration state 3 can be returned if Location Update Reject
1331 * (with cause 17 - Network Failure) is received repeatedly from the network,
1332 * to facilitate "managed roaming"
1333 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001334 * Valid errors:
1335 * SUCCESS
1336 * RADIO_NOT_AVAILABLE
1337 * GENERIC_FAILURE
1338 */
Wink Savillec0114b32011-02-18 10:14:07 -08001339#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001340
1341/**
Wink Savillec0114b32011-02-18 10:14:07 -08001342 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001343 *
Wink Savillec0114b32011-02-18 10:14:07 -08001344 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001345 *
1346 * "data" is NULL
1347 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08001348 * ((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 -08001349 * ((const char **)response)[1] is LAC if registered or NULL if not
1350 * ((const char **)response)[2] is CID if registered or NULL if not
Wink Saville43808972011-01-13 17:39:51 -08001351 * ((const char **)response)[3] indicates the available data radio technology,
1352 * valid values as defined by RIL_RadioTechnology.
Wink Savillec0114b32011-02-18 10:14:07 -08001353 * ((const char **)response)[4] if registration state is 3 (Registration
1354 * denied) this is an enumerated reason why
1355 * registration was denied. See 3GPP TS 24.008,
1356 * Annex G.6 "Additonal cause codes for GMM".
1357 * 7 == GPRS services not allowed
1358 * 8 == GPRS services and non-GPRS services not allowed
1359 * 9 == MS identity cannot be derived by the network
1360 * 10 == Implicitly detached
1361 * 14 == GPRS services not allowed in this PLMN
1362 * 16 == MSC temporarily not reachable
1363 * 40 == No PDP context activated
1364 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
1365 * established using RIL_REQUEST_SETUP_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001366 *
Wink Savilleea51a9d2012-09-15 07:54:06 -07001367 * The values at offsets 6..10 are optional LTE location information. If a value
1368 * is unknown that value is NULL. If all values are NULL, none need to be present.
1369 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
1370 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
1371 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
1372 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
1373 * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
1374 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001375 * LAC and CID are in hexadecimal format.
1376 * valid LAC are 0x0000 - 0xffff
1377 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07001378 *
1379 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001380 * as "out of service" in the Android telephony system
1381 *
1382 * Valid errors:
1383 * SUCCESS
1384 * RADIO_NOT_AVAILABLE
1385 * GENERIC_FAILURE
1386 */
Wink Savillec0114b32011-02-18 10:14:07 -08001387#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001388
1389/**
1390 * RIL_REQUEST_OPERATOR
1391 *
1392 * Request current operator ONS or EONS
1393 *
1394 * "data" is NULL
1395 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07001396 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001397 * or NULL if unregistered
1398 *
Wink Saville7f856802009-06-09 10:23:37 -07001399 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001400 * or NULL if unregistered
1401 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1402 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07001403 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001404 * Valid errors:
1405 * SUCCESS
1406 * RADIO_NOT_AVAILABLE
1407 * GENERIC_FAILURE
1408 */
1409#define RIL_REQUEST_OPERATOR 22
1410
1411/**
1412 * RIL_REQUEST_RADIO_POWER
1413 *
1414 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07001415 * If the radio is is turned off/on the radio modem subsystem
1416 * is expected return to an initialized state. For instance,
1417 * any voice and data calls will be terminated and all associated
1418 * lists emptied.
1419 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001420 * "data" is int *
1421 * ((int *)data)[0] is > 0 for "Radio On"
1422 * ((int *)data)[0] is == 0 for "Radio Off"
1423 *
1424 * "response" is NULL
1425 *
1426 * Turn radio on if "on" > 0
1427 * Turn radio off if "on" == 0
1428 *
1429 * Valid errors:
1430 * SUCCESS
1431 * RADIO_NOT_AVAILABLE
1432 * GENERIC_FAILURE
1433 */
1434#define RIL_REQUEST_RADIO_POWER 23
1435
1436/**
1437 * RIL_REQUEST_DTMF
1438 *
1439 * Send a DTMF tone
1440 *
1441 * If the implementation is currently playing a tone requested via
1442 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1443 * should be played instead
1444 *
jsh602f80f2009-07-10 15:44:37 -07001445 * "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 -08001446 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001447 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001448 * FIXME should this block/mute microphone?
1449 * How does this interact with local DTMF feedback?
1450 *
1451 * Valid errors:
1452 * SUCCESS
1453 * RADIO_NOT_AVAILABLE
1454 * GENERIC_FAILURE
1455 *
1456 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1457 *
1458 */
1459#define RIL_REQUEST_DTMF 24
1460
1461/**
1462 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07001463 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001464 * Send an SMS message
1465 *
1466 * "data" is const char **
1467 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1468 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1469 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1470 * less the SMSC address
1471 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1472 *
1473 * "response" is a const RIL_SMS_Response *
1474 *
1475 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001476 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001477 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1478 *
1479 * Valid errors:
1480 * SUCCESS
1481 * RADIO_NOT_AVAILABLE
1482 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07001483 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001484 * GENERIC_FAILURE
1485 *
1486 * FIXME how do we specify TP-Message-Reference if we need to resend?
1487 */
1488#define RIL_REQUEST_SEND_SMS 25
1489
1490
1491/**
1492 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07001493 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001494 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1495 * except that more messages are expected to be sent soon. If possible,
1496 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1497 *
1498 * "data" is const char **
1499 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1500 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1501 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1502 * less the SMSC address
1503 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1504 *
1505 * "response" is a const RIL_SMS_Response *
1506 *
1507 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001508 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001509 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1510 *
1511 * Valid errors:
1512 * SUCCESS
1513 * RADIO_NOT_AVAILABLE
1514 * SMS_SEND_FAIL_RETRY
1515 * GENERIC_FAILURE
1516 *
1517 */
1518#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1519
1520
1521/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001522 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001523 *
Wink Saville29487ef2011-04-15 09:15:31 -07001524 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
1525 * return success it is added to the list of data calls and a
1526 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
1527 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
1528 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
1529 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001530 *
Wink Saville43808972011-01-13 17:39:51 -08001531 * The RIL is expected to:
1532 * - Create one data call context.
1533 * - Create and configure a dedicated interface for the context
1534 * - The interface must be point to point.
1535 * - The interface is configured with one or more addresses and
1536 * is capable of sending and receiving packets. The prefix length
1537 * of the addresses must be /32 for IPv4 and /128 for IPv6.
1538 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08001539 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08001540 * number of simultaneous data call contexts.
1541 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001542 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08001543 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
1544 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07001545 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07001546 * ((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 -07001547 * override the one in the profile. NULL indicates no APN overrride.
1548 * ((const char **)data)[3] is the username for APN, or NULL
1549 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07001550 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
1551 * 0 => PAP and CHAP is never performed.
1552 * 1 => PAP may be performed; CHAP is never performed.
1553 * 2 => CHAP may be performed; PAP is never performed.
1554 * 3 => PAP / CHAP may be performed - baseband dependent.
Wink Savillec0114b32011-02-18 10:14:07 -08001555 * ((const char **)data)[6] is the connection type to request must be one of the
1556 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07001557 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Wink Savillec0114b32011-02-18 10:14:07 -08001558 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001559 *
Wink Savillec0114b32011-02-18 10:14:07 -08001560 * "response" is a RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001561 *
1562 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07001563 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001564 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08001565 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08001566 * the RIL_Data_Call_Response_v6.status containing the actual status.
1567 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08001568 *
1569 * Other errors could include:
1570 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
1571 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001572 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001573 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001574 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001575#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001576
1577
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001578/**
1579 * RIL_REQUEST_SIM_IO
1580 *
1581 * Request SIM I/O operation.
1582 * This is similar to the TS 27.007 "restricted SIM" operation
1583 * where it assumes all of the EF selection will be done by the
1584 * callee.
1585 *
Wink Savillefd729372011-02-22 16:19:39 -08001586 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001587 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1588 * or may specify a PIN2 for operations that require a PIN2 (eg
1589 * updating FDN records)
1590 *
1591 * "response" is a const RIL_SIM_IO_Response *
1592 *
1593 * Arguments and responses that are unused for certain
1594 * values of "command" should be ignored or set to NULL
1595 *
1596 * Valid errors:
1597 * SUCCESS
1598 * RADIO_NOT_AVAILABLE
1599 * GENERIC_FAILURE
1600 * SIM_PIN2
1601 * SIM_PUK2
1602 */
1603#define RIL_REQUEST_SIM_IO 28
1604
1605/**
1606 * RIL_REQUEST_SEND_USSD
1607 *
1608 * Send a USSD message
1609 *
1610 * If a USSD session already exists, the message should be sent in the
1611 * context of that session. Otherwise, a new session should be created.
1612 *
1613 * The network reply should be reported via RIL_UNSOL_ON_USSD
1614 *
1615 * Only one USSD session may exist at a time, and the session is assumed
1616 * to exist until:
1617 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1618 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1619 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1620 *
1621 * "data" is a const char * containing the USSD request in UTF-8 format
1622 * "response" is NULL
1623 *
1624 * Valid errors:
1625 * SUCCESS
1626 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07001627 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001628 * GENERIC_FAILURE
1629 *
1630 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1631 */
1632
1633#define RIL_REQUEST_SEND_USSD 29
1634
1635/**
1636 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07001637 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001638 * Cancel the current USSD session if one exists
1639 *
1640 * "data" is null
1641 * "response" is NULL
1642 *
1643 * Valid errors:
1644 * SUCCESS
1645 * RADIO_NOT_AVAILABLE
Wink Saville7f856802009-06-09 10:23:37 -07001646 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001647 */
1648
1649#define RIL_REQUEST_CANCEL_USSD 30
1650
Wink Saville7f856802009-06-09 10:23:37 -07001651/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001652 * RIL_REQUEST_GET_CLIR
1653 *
1654 * Gets current CLIR status
1655 * "data" is NULL
1656 * "response" is int *
1657 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1658 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
1659 *
1660 * Valid errors:
1661 * SUCCESS
1662 * RADIO_NOT_AVAILABLE
1663 * GENERIC_FAILURE
1664 */
1665#define RIL_REQUEST_GET_CLIR 31
1666
1667/**
1668 * RIL_REQUEST_SET_CLIR
1669 *
1670 * "data" is int *
1671 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1672 *
1673 * "response" is NULL
1674 *
1675 * Valid errors:
1676 * SUCCESS
1677 * RADIO_NOT_AVAILABLE
1678 * GENERIC_FAILURE
1679 */
1680#define RIL_REQUEST_SET_CLIR 32
1681
1682/**
1683 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
1684 *
1685 * "data" is const RIL_CallForwardInfo *
1686 *
1687 * "response" is const RIL_CallForwardInfo **
1688 * "response" points to an array of RIL_CallForwardInfo *'s, one for
1689 * each distinct registered phone number.
1690 *
1691 * For example, if data is forwarded to +18005551212 and voice is forwarded
1692 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07001693 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001694 * If, however, both data and voice are forwarded to +18005551212, then
1695 * a single RIL_CallForwardInfo can be returned with the service class
1696 * set to "data + voice = 3")
1697 *
1698 * Valid errors:
1699 * SUCCESS
1700 * RADIO_NOT_AVAILABLE
1701 * GENERIC_FAILURE
1702 */
1703#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
1704
1705
1706/**
1707 * RIL_REQUEST_SET_CALL_FORWARD
1708 *
1709 * Configure call forward rule
1710 *
1711 * "data" is const RIL_CallForwardInfo *
1712 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001713 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001714 * Valid errors:
1715 * SUCCESS
1716 * RADIO_NOT_AVAILABLE
1717 * GENERIC_FAILURE
1718 */
1719#define RIL_REQUEST_SET_CALL_FORWARD 34
1720
1721
1722/**
1723 * RIL_REQUEST_QUERY_CALL_WAITING
1724 *
1725 * Query current call waiting state
1726 *
1727 * "data" is const int *
1728 * ((const int *)data)[0] is the TS 27.007 service class to query.
1729 * "response" is a const int *
1730 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
1731 *
1732 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
1733 * must follow, with the TS 27.007 service class bit vector of services
1734 * for which call waiting is enabled.
1735 *
Wink Saville7f856802009-06-09 10:23:37 -07001736 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001737 * ((const int *)response)[1] is 3, then call waiting is enabled for data
1738 * and voice and disabled for everything else
1739 *
1740 * Valid errors:
1741 * SUCCESS
1742 * RADIO_NOT_AVAILABLE
1743 * GENERIC_FAILURE
1744 */
1745#define RIL_REQUEST_QUERY_CALL_WAITING 35
1746
1747
1748/**
1749 * RIL_REQUEST_SET_CALL_WAITING
1750 *
1751 * Configure current call waiting state
1752 *
1753 * "data" is const int *
1754 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
1755 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
1756 * services to modify
1757 * "response" is NULL
1758 *
1759 * Valid errors:
1760 * SUCCESS
1761 * RADIO_NOT_AVAILABLE
1762 * GENERIC_FAILURE
1763 */
1764#define RIL_REQUEST_SET_CALL_WAITING 36
1765
1766/**
1767 * RIL_REQUEST_SMS_ACKNOWLEDGE
1768 *
1769 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07001770 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001771 *
1772 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07001773 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001774 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07001775 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001776 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07001777 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
1778 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
1779 * capacity exceeded) and 0xFF (unspecified error) are
1780 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001781 *
1782 * "response" is NULL
1783 *
1784 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
1785 *
1786 * Valid errors:
1787 * SUCCESS
1788 * RADIO_NOT_AVAILABLE
1789 * GENERIC_FAILURE
1790 */
1791#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
1792
1793/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001794 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001795 *
1796 * Get the device IMEI, including check digit
1797 *
johnwangf8bc1672009-05-14 19:19:47 -07001798 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001799 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1800 *
1801 * "data" is NULL
1802 * "response" is a const char * containing the IMEI
1803 *
1804 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001805 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001806 * RADIO_NOT_AVAILABLE (radio resetting)
1807 * GENERIC_FAILURE
1808 */
1809
1810#define RIL_REQUEST_GET_IMEI 38
1811
1812/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001813 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001814 *
1815 * Get the device IMEISV, which should be two decimal digits
1816 *
johnwangf8bc1672009-05-14 19:19:47 -07001817 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001818 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1819 *
1820 * "data" is NULL
1821 * "response" is a const char * containing the IMEISV
1822 *
1823 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001824 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001825 * RADIO_NOT_AVAILABLE (radio resetting)
1826 * GENERIC_FAILURE
1827 */
1828
1829#define RIL_REQUEST_GET_IMEISV 39
1830
1831
1832/**
1833 * RIL_REQUEST_ANSWER
1834 *
1835 * Answer incoming call
1836 *
1837 * Will not be called for WAITING calls.
1838 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
1839 * instead
1840 *
1841 * "data" is NULL
1842 * "response" is NULL
1843 *
1844 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001845 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001846 * RADIO_NOT_AVAILABLE (radio resetting)
1847 * GENERIC_FAILURE
1848 */
1849
1850#define RIL_REQUEST_ANSWER 40
1851
1852/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001853 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001854 *
Wink Saville29487ef2011-04-15 09:15:31 -07001855 * Deactivate packet data connection and remove from the
1856 * data call list if SUCCESS is returned. Any other return
1857 * values should also try to remove the call from the list,
1858 * but that may not be possible. In any event a
1859 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
1860 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
1861 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001862 *
1863 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07001864 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06001865 * ((char**)data)[1] indicating Disconnect Reason
1866 * 0 => No specific reason specified
1867 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07001868 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001869 * "response" is NULL
1870 *
1871 * Valid errors:
1872 * SUCCESS
1873 * RADIO_NOT_AVAILABLE
1874 * GENERIC_FAILURE
1875 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001876 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001877 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001878#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001879
1880/**
1881 * RIL_REQUEST_QUERY_FACILITY_LOCK
1882 *
1883 * Query the status of a facility lock state
1884 *
1885 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07001886 * ((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 -08001887 * (eg "AO" for BAOC, "SC" for SIM lock)
1888 * ((const char **)data)[1] is the password, or "" if not required
1889 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
1890 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08001891 * ((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 -08001892 * This is only applicable in the case of Fixed Dialing Numbers
1893 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001894 *
1895 * "response" is an int *
1896 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07001897 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001898 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07001899 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001900 *
1901 * Valid errors:
1902 * SUCCESS
1903 * RADIO_NOT_AVAILABLE
1904 * GENERIC_FAILURE
1905 *
1906 */
1907#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
1908
1909/**
1910 * RIL_REQUEST_SET_FACILITY_LOCK
1911 *
1912 * Enable/disable one facility lock
1913 *
1914 * "data" is const char **
1915 *
1916 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1917 * (eg "AO" for BAOC)
1918 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
1919 * ((const char **)data)[2] = password
1920 * ((const char **)data)[3] = string representation of decimal TS 27.007
1921 * service class bit vector. Eg, the string
1922 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08001923 * ((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 -08001924 * This is only applicable in the case of Fixed Dialing Numbers
1925 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001926 *
jsh593c9102009-06-24 16:13:44 -07001927 * "response" is int *
1928 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001929 *
1930 * Valid errors:
1931 * SUCCESS
1932 * RADIO_NOT_AVAILABLE
1933 * GENERIC_FAILURE
1934 *
1935 */
1936#define RIL_REQUEST_SET_FACILITY_LOCK 43
1937
1938/**
1939 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
1940 *
1941 * Change call barring facility password
1942 *
1943 * "data" is const char **
1944 *
1945 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1946 * (eg "AO" for BAOC)
1947 * ((const char **)data)[1] = old password
1948 * ((const char **)data)[2] = new password
1949 *
Wink Saville7f856802009-06-09 10:23:37 -07001950 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001951 *
1952 * Valid errors:
1953 * SUCCESS
1954 * RADIO_NOT_AVAILABLE
1955 * GENERIC_FAILURE
1956 *
1957 */
1958#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
1959
1960/**
1961 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
1962 *
1963 * Query current network selectin mode
1964 *
1965 * "data" is NULL
1966 *
1967 * "response" is int *
1968 * ((const int *)response)[0] is
1969 * 0 for automatic selection
1970 * 1 for manual selection
1971 *
1972 * Valid errors:
1973 * SUCCESS
1974 * RADIO_NOT_AVAILABLE
1975 * GENERIC_FAILURE
1976 *
1977 */
1978#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
1979
1980/**
1981 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
1982 *
1983 * Specify that the network should be selected automatically
1984 *
1985 * "data" is NULL
1986 * "response" is NULL
1987 *
Wink Saville7f856802009-06-09 10:23:37 -07001988 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001989 * and registered
1990 *
1991 * Valid errors:
1992 * SUCCESS
1993 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07001994 * ILLEGAL_SIM_OR_ME
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001995 * GENERIC_FAILURE
1996 *
John Wang75534472010-04-20 15:11:42 -07001997 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
1998 * no retries needed, such as illegal SIM or ME.
1999 * Returns GENERIC_FAILURE for all other causes that might be
2000 * fixed by retries.
2001 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002002 */
2003#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
2004
2005/**
2006 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
2007 *
2008 * Manually select a specified network.
2009 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002010 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
2011 * "response" is NULL
2012 *
Wink Saville7f856802009-06-09 10:23:37 -07002013 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002014 * and registered
2015 *
2016 * Valid errors:
2017 * SUCCESS
2018 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07002019 * ILLEGAL_SIM_OR_ME
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002020 * GENERIC_FAILURE
2021 *
John Wang75534472010-04-20 15:11:42 -07002022 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2023 * no retries needed, such as illegal SIM or ME.
2024 * Returns GENERIC_FAILURE for all other causes that might be
2025 * fixed by retries.
2026 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002027 */
2028#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
2029
2030/**
2031 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
2032 *
2033 * Scans for available networks
2034 *
2035 * "data" is NULL
2036 * "response" is const char ** that should be an array of n*4 strings, where
2037 * n is the number of available networks
2038 * For each available network:
2039 *
Wink Saville7f856802009-06-09 10:23:37 -07002040 * ((const char **)response)[n+0] is long alpha ONS or EONS
2041 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002042 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
2043 * ((const char **)response)[n+3] is a string value of the status:
2044 * "unknown"
2045 * "available"
2046 * "current"
2047 * "forbidden"
2048 *
Wink Saville7f856802009-06-09 10:23:37 -07002049 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002050 * and registered
2051 *
2052 * Valid errors:
2053 * SUCCESS
2054 * RADIO_NOT_AVAILABLE
2055 * GENERIC_FAILURE
2056 *
2057 */
2058#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
2059
2060/**
2061 * RIL_REQUEST_DTMF_START
2062 *
Wink Saville7f856802009-06-09 10:23:37 -07002063 * Start playing a DTMF tone. Continue playing DTMF tone until
2064 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002065 *
2066 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
2067 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07002068 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002069 * "data" is a char *
2070 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
2071 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002072 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002073 * Valid errors:
2074 * SUCCESS
2075 * RADIO_NOT_AVAILABLE
2076 * GENERIC_FAILURE
2077 *
2078 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
2079 */
2080#define RIL_REQUEST_DTMF_START 49
2081
2082/**
2083 * RIL_REQUEST_DTMF_STOP
2084 *
2085 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07002086 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002087 * "data" is NULL
2088 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002089 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002090 * Valid errors:
2091 * SUCCESS
2092 * RADIO_NOT_AVAILABLE
2093 * GENERIC_FAILURE
2094 *
2095 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
2096 */
2097#define RIL_REQUEST_DTMF_STOP 50
2098
2099/**
2100 * RIL_REQUEST_BASEBAND_VERSION
2101 *
2102 * Return string value indicating baseband version, eg
2103 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07002104 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002105 * "data" is NULL
2106 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07002107 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002108 * Valid errors:
2109 * SUCCESS
2110 * RADIO_NOT_AVAILABLE
2111 * GENERIC_FAILURE
2112 *
2113 */
2114#define RIL_REQUEST_BASEBAND_VERSION 51
2115
2116/**
2117 * RIL_REQUEST_SEPARATE_CONNECTION
2118 *
2119 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07002120 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002121 * as the only other member of the current (active) call
2122 *
2123 * Like AT+CHLD=2x
2124 *
2125 * See TS 22.084 1.3.8.2 (iii)
2126 * TS 22.030 6.5.5 "Entering "2X followed by send"
2127 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07002128 *
2129 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002130 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
2131 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002132 * "response" is NULL
2133 *
2134 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002135 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002136 * RADIO_NOT_AVAILABLE (radio resetting)
2137 * GENERIC_FAILURE
2138 */
2139#define RIL_REQUEST_SEPARATE_CONNECTION 52
2140
2141
2142/**
2143 * RIL_REQUEST_SET_MUTE
2144 *
2145 * Turn on or off uplink (microphone) mute.
2146 *
2147 * Will only be sent while voice call is active.
2148 * Will always be reset to "disable mute" when a new voice call is initiated
2149 *
2150 * "data" is an int *
2151 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
2152 *
2153 * "response" is NULL
2154 *
2155 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002156 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002157 * RADIO_NOT_AVAILABLE (radio resetting)
2158 * GENERIC_FAILURE
2159 */
2160
2161#define RIL_REQUEST_SET_MUTE 53
2162
2163/**
2164 * RIL_REQUEST_GET_MUTE
2165 *
2166 * Queries the current state of the uplink mute setting
2167 *
2168 * "data" is NULL
2169 * "response" is an int *
2170 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
2171 *
2172 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002173 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002174 * RADIO_NOT_AVAILABLE (radio resetting)
2175 * GENERIC_FAILURE
2176 */
2177
2178#define RIL_REQUEST_GET_MUTE 54
2179
2180/**
2181 * RIL_REQUEST_QUERY_CLIP
2182 *
2183 * Queries the status of the CLIP supplementary service
2184 *
2185 * (for MMI code "*#30#")
2186 *
2187 * "data" is NULL
2188 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07002189 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002190 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07002191 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002192 *
2193 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002194 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002195 * RADIO_NOT_AVAILABLE (radio resetting)
2196 * GENERIC_FAILURE
2197 */
2198
2199#define RIL_REQUEST_QUERY_CLIP 55
2200
2201/**
Wink Savillec0114b32011-02-18 10:14:07 -08002202 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
2203 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07002204 *
2205 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07002206 * context or CDMA data connection active
2207 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002208 *
2209 * "data" is NULL
2210 *
2211 * "response" is a "int *"
2212 * ((int *)response)[0] is an integer cause code defined in TS 24.008
2213 * section 6.1.3.1.3 or close approximation
2214 *
2215 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07002216 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08002217 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002218 * cases for error notification
2219 * and potential retries.
2220 *
2221 * Valid errors:
2222 * SUCCESS
2223 * RADIO_NOT_AVAILABLE
2224 * GENERIC_FAILURE
2225 *
2226 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08002227 *
2228 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07002229 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002230
Wink Savillef4c4d362009-04-02 01:37:03 -07002231#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002232
2233/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002234 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002235 *
Wink Saville29487ef2011-04-15 09:15:31 -07002236 * Returns the data call list. An entry is added when a
2237 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
2238 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
2239 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002240 *
2241 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08002242 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002243 *
2244 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002245 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002246 * RADIO_NOT_AVAILABLE (radio resetting)
2247 * GENERIC_FAILURE
Wink Saville29487ef2011-04-15 09:15:31 -07002248 *
2249 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002250 */
2251
Wink Savillef4c4d362009-04-02 01:37:03 -07002252#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002253
2254/**
johnwangf8bc1672009-05-14 19:19:47 -07002255 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002256 *
2257 * Request a radio reset. The RIL implementation may postpone
2258 * the reset until after this request is responded to if the baseband
2259 * is presently busy.
2260 *
johnwangf8bc1672009-05-14 19:19:47 -07002261 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
2262 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002263 * "data" is NULL
2264 * "response" is NULL
2265 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002266 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002267 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002268 * RADIO_NOT_AVAILABLE (radio resetting)
2269 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07002270 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002271 */
2272
2273#define RIL_REQUEST_RESET_RADIO 58
2274
2275/**
2276 * RIL_REQUEST_OEM_HOOK_RAW
2277 *
2278 * This request reserved for OEM-specific uses. It passes raw byte arrays
2279 * back and forth.
2280 *
Wink Saville7f856802009-06-09 10:23:37 -07002281 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002282 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
2283 *
2284 * "data" is a char * of bytes copied from the byte[] data argument in java
2285 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07002286 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002287 * (byte[])(((AsyncResult)response.obj).result)
2288 *
Wink Saville7f856802009-06-09 10:23:37 -07002289 * An error response here will result in
2290 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002291 * (((AsyncResult)response.obj).exception) being an instance of
2292 * com.android.internal.telephony.gsm.CommandException
2293 *
2294 * Valid errors:
2295 * All
2296 */
2297
2298#define RIL_REQUEST_OEM_HOOK_RAW 59
2299
2300/**
2301 * RIL_REQUEST_OEM_HOOK_STRINGS
2302 *
2303 * This request reserved for OEM-specific uses. It passes strings
2304 * back and forth.
2305 *
Wink Saville7f856802009-06-09 10:23:37 -07002306 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002307 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
2308 *
2309 * "data" is a const char **, representing an array of null-terminated UTF-8
2310 * strings copied from the "String[] strings" argument to
2311 * invokeOemRilRequestStrings()
2312 *
2313 * "response" is a const char **, representing an array of null-terminated UTF-8
2314 * stings that will be returned via the caller's response message here:
2315 *
2316 * (String[])(((AsyncResult)response.obj).result)
2317 *
Wink Saville7f856802009-06-09 10:23:37 -07002318 * An error response here will result in
2319 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002320 * (((AsyncResult)response.obj).exception) being an instance of
2321 * com.android.internal.telephony.gsm.CommandException
2322 *
2323 * Valid errors:
2324 * All
2325 */
2326
2327#define RIL_REQUEST_OEM_HOOK_STRINGS 60
2328
2329/**
2330 * RIL_REQUEST_SCREEN_STATE
2331 *
2332 * Indicates the current state of the screen. When the screen is off, the
2333 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07002334 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
2335 * in an effort to conserve power. These notifications should resume when the
2336 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002337 *
2338 * "data" is int *
2339 * ((int *)data)[0] is == 1 for "Screen On"
2340 * ((int *)data)[0] is == 0 for "Screen Off"
2341 *
2342 * "response" is NULL
2343 *
2344 * Valid errors:
2345 * SUCCESS
2346 * GENERIC_FAILURE
2347 */
2348#define RIL_REQUEST_SCREEN_STATE 61
2349
2350
2351/**
2352 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
2353 *
2354 * Enables/disables supplementary service related notifications
2355 * from the network.
2356 *
2357 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2358 *
2359 * "data" is int *
2360 * ((int *)data)[0] is == 1 for notifications enabled
2361 * ((int *)data)[0] is == 0 for notifications disabled
2362 *
2363 * "response" is NULL
2364 *
2365 * Valid errors:
2366 * SUCCESS
2367 * RADIO_NOT_AVAILABLE
2368 * GENERIC_FAILURE
2369 *
2370 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2371 */
2372#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2373
2374/**
2375 * RIL_REQUEST_WRITE_SMS_TO_SIM
2376 *
2377 * Stores a SMS message to SIM memory.
2378 *
2379 * "data" is RIL_SMS_WriteArgs *
2380 *
2381 * "response" is int *
2382 * ((const int *)response)[0] is the record index where the message is stored.
2383 *
2384 * Valid errors:
2385 * SUCCESS
2386 * GENERIC_FAILURE
2387 *
2388 */
2389#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2390
2391/**
2392 * RIL_REQUEST_DELETE_SMS_ON_SIM
2393 *
2394 * Deletes a SMS message from SIM memory.
2395 *
2396 * "data" is int *
2397 * ((int *)data)[0] is the record index of the message to delete.
2398 *
2399 * "response" is NULL
2400 *
2401 * Valid errors:
2402 * SUCCESS
2403 * GENERIC_FAILURE
2404 *
2405 */
2406#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2407
2408/**
2409 * RIL_REQUEST_SET_BAND_MODE
2410 *
2411 * Assign a specified band for RF configuration.
2412 *
2413 * "data" is int *
2414 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2415 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2416 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2417 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2418 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2419 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002420 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2421 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2422 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2423 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2424 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2425 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2426 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2427 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2428 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2429 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2430 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2431 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2432 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002433 *
2434 * "response" is NULL
2435 *
2436 * Valid errors:
2437 * SUCCESS
2438 * RADIO_NOT_AVAILABLE
2439 * GENERIC_FAILURE
2440 */
2441#define RIL_REQUEST_SET_BAND_MODE 65
2442
2443/**
2444 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2445 *
2446 * Query the list of band mode supported by RF.
2447 *
2448 * "data" is NULL
2449 *
2450 * "response" is int *
2451 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2452 * each available band mode.
2453 *
2454 * 0 for "unspecified" (selected by baseband automatically)
2455 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2456 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2457 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2458 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2459 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002460 * 6 for "Cellular (800-MHz Band)"
2461 * 7 for "PCS (1900-MHz Band)"
2462 * 8 for "Band Class 3 (JTACS Band)"
2463 * 9 for "Band Class 4 (Korean PCS Band)"
2464 * 10 for "Band Class 5 (450-MHz Band)"
2465 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2466 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2467 * 13 for "Band Class 8 (1800-MHz Band)"
2468 * 14 for "Band Class 9 (900-MHz Band)"
2469 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2470 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2471 * 17 for "Band Class 15 (AWS Band)"
2472 * 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002473 *
2474 * Valid errors:
2475 * SUCCESS
2476 * RADIO_NOT_AVAILABLE
2477 * GENERIC_FAILURE
2478 *
2479 * See also: RIL_REQUEST_SET_BAND_MODE
2480 */
2481#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2482
2483/**
2484 * RIL_REQUEST_STK_GET_PROFILE
2485 *
2486 * Requests the profile of SIM tool kit.
2487 * The profile indicates the SAT/USAT features supported by ME.
2488 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2489 *
2490 * "data" is NULL
2491 *
2492 * "response" is a const char * containing SAT/USAT profile
2493 * in hexadecimal format string starting with first byte of terminal profile
2494 *
2495 * Valid errors:
2496 * RIL_E_SUCCESS
2497 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2498 * RIL_E_GENERIC_FAILURE
2499 */
2500#define RIL_REQUEST_STK_GET_PROFILE 67
2501
2502/**
2503 * RIL_REQUEST_STK_SET_PROFILE
2504 *
2505 * Download the STK terminal profile as part of SIM initialization
2506 * procedure
2507 *
2508 * "data" is a const char * containing SAT/USAT profile
2509 * in hexadecimal format string starting with first byte of terminal profile
2510 *
2511 * "response" is NULL
2512 *
2513 * Valid errors:
2514 * RIL_E_SUCCESS
2515 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2516 * RIL_E_GENERIC_FAILURE
2517 */
2518#define RIL_REQUEST_STK_SET_PROFILE 68
2519
2520/**
2521 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2522 *
2523 * Requests to send a SAT/USAT envelope command to SIM.
2524 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2525 *
2526 * "data" is a const char * containing SAT/USAT command
2527 * in hexadecimal format string starting with command tag
2528 *
2529 * "response" is a const char * containing SAT/USAT response
2530 * in hexadecimal format string starting with first byte of response
2531 * (May be NULL)
2532 *
2533 * Valid errors:
2534 * RIL_E_SUCCESS
2535 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2536 * RIL_E_GENERIC_FAILURE
2537 */
2538#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2539
2540/**
2541 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2542 *
2543 * Requests to send a terminal response to SIM for a received
2544 * proactive command
2545 *
2546 * "data" is a const char * containing SAT/USAT response
2547 * in hexadecimal format string starting with first byte of response data
2548 *
2549 * "response" is NULL
2550 *
2551 * Valid errors:
2552 * RIL_E_SUCCESS
2553 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2554 * RIL_E_GENERIC_FAILURE
2555 */
2556#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
2557
2558/**
2559 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
2560 *
2561 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
2562 * been initialized by ME already. (We could see the call has been in the 'call
2563 * list') So, STK application needs to accept/reject the call according as user
2564 * operations.
2565 *
2566 * "data" is int *
2567 * ((int *)data)[0] is > 0 for "accept" the call setup
2568 * ((int *)data)[0] is == 0 for "reject" the call setup
2569 *
2570 * "response" is NULL
2571 *
2572 * Valid errors:
2573 * RIL_E_SUCCESS
2574 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2575 * RIL_E_GENERIC_FAILURE
2576 */
2577#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
2578
2579/**
2580 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
2581 *
2582 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07002583 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002584 * "data" is NULL
2585 * "response" is NULL
2586 *
2587 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002588 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002589 * RADIO_NOT_AVAILABLE (radio resetting)
2590 * GENERIC_FAILURE
2591 */
2592#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
2593
2594/**
2595 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2596 *
2597 * Requests to set the preferred network type for searching and registering
2598 * (CS/PS domain, RAT, and operation mode)
2599 *
Wink Savillec0114b32011-02-18 10:14:07 -08002600 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002601 *
2602 * "response" is NULL
2603 *
2604 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07002605 * SUCCESS
2606 * RADIO_NOT_AVAILABLE (radio resetting)
2607 * GENERIC_FAILURE
2608 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002609 */
2610#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2611
2612/**
2613 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2614 *
2615 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2616 * for searching and registering
2617 *
2618 * "data" is NULL
2619 *
2620 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08002621 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002622 *
2623 * Valid errors:
2624 * SUCCESS
2625 * RADIO_NOT_AVAILABLE
2626 * GENERIC_FAILURE
2627 *
2628 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2629 */
2630#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2631
2632/**
2633 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2634 *
2635 * Request neighboring cell id in GSM network
2636 *
2637 * "data" is NULL
2638 * "response" must be a " const RIL_NeighboringCell** "
2639 *
2640 * Valid errors:
2641 * SUCCESS
2642 * RADIO_NOT_AVAILABLE
2643 * GENERIC_FAILURE
2644 */
2645#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
2646
2647/**
2648 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07002649 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002650 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07002651 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
2652 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002653 *
2654 * Note: The RIL implementation should default to "updates enabled"
2655 * when the screen is on and "updates disabled" when the screen is off.
2656 *
2657 * "data" is int *
2658 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
2659 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
2660 *
2661 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07002662 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002663 * Valid errors:
2664 * SUCCESS
2665 * RADIO_NOT_AVAILABLE
2666 * GENERIC_FAILURE
2667 *
2668 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2669 */
2670#define RIL_REQUEST_SET_LOCATION_UPDATES 76
2671
Wink Savillef4c4d362009-04-02 01:37:03 -07002672/**
Wink Savillec0114b32011-02-18 10:14:07 -08002673 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07002674 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002675 * Request to set the location where the CDMA subscription shall
2676 * be retrieved
2677 *
2678 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08002679 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07002680 *
2681 * "response" is NULL
2682 *
2683 * Valid errors:
2684 * SUCCESS
2685 * RADIO_NOT_AVAILABLE
2686 * GENERIC_FAILURE
2687 * SIM_ABSENT
2688 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08002689 *
2690 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07002691 */
Wink Savillec0114b32011-02-18 10:14:07 -08002692#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07002693
2694/**
2695 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07002696 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002697 * Request to set the roaming preferences in CDMA
2698 *
2699 * "data" is int *
2700 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
2701 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2702 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07002703 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002704 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002705 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002706 * Valid errors:
2707 * SUCCESS
2708 * RADIO_NOT_AVAILABLE
2709 * GENERIC_FAILURE
2710 */
2711#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
2712
2713/**
2714 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07002715 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002716 * Request the actual setting of the roaming preferences in CDMA in the modem
2717 *
2718 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002719 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002720 * "response" is int *
2721 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
2722 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2723 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07002724 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002725 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002726 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002727 * Valid errors:
2728 * SUCCESS
2729 * RADIO_NOT_AVAILABLE
2730 * GENERIC_FAILURE
2731 */
2732#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
2733
2734/**
2735 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002736 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002737 * Request to set the TTY mode
2738 *
2739 * "data" is int *
2740 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07002741 * ((int *)data)[0] is == 1 for TTY Full
2742 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
2743 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07002744 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002745 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002746 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002747 * Valid errors:
2748 * SUCCESS
2749 * RADIO_NOT_AVAILABLE
2750 * GENERIC_FAILURE
2751 */
2752#define RIL_REQUEST_SET_TTY_MODE 80
2753
2754/**
2755 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002756 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002757 * Request the setting of TTY mode
2758 *
2759 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002760 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002761 * "response" is int *
2762 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07002763 * ((int *)response)[0] is == 1 for TTY Full
2764 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
2765 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07002766 *
2767 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002768 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002769 * Valid errors:
2770 * SUCCESS
2771 * RADIO_NOT_AVAILABLE
2772 * GENERIC_FAILURE
2773 */
2774#define RIL_REQUEST_QUERY_TTY_MODE 81
2775
2776/**
2777 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
2778 *
2779 * Request to set the preferred voice privacy mode used in voice
2780 * scrambling
2781 *
2782 * "data" is int *
2783 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2784 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07002785 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002786 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002787 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002788 * Valid errors:
2789 * SUCCESS
2790 * RADIO_NOT_AVAILABLE
2791 * GENERIC_FAILURE
2792 */
2793#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
2794
2795/**
2796 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002797 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002798 * Request the setting of preferred voice privacy mode
2799 *
2800 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002801 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002802 * "response" is int *
2803 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2804 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07002805 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002806 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002807 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002808 * Valid errors:
2809 * SUCCESS
2810 * RADIO_NOT_AVAILABLE
2811 * GENERIC_FAILURE
2812 */
2813#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
2814
2815/**
2816 * RIL_REQUEST_CDMA_FLASH
2817 *
2818 * Send FLASH
2819 *
2820 * "data" is const char *
2821 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07002822 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002823 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002824 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002825 * Valid errors:
2826 * SUCCESS
2827 * RADIO_NOT_AVAILABLE
2828 * GENERIC_FAILURE
2829 *
2830 */
2831#define RIL_REQUEST_CDMA_FLASH 84
2832
2833/**
2834 * RIL_REQUEST_CDMA_BURST_DTMF
2835 *
2836 * Send DTMF string
2837 *
jsh602f80f2009-07-10 15:44:37 -07002838 * "data" is const char **
2839 * ((const char **)data)[0] is a DTMF string
2840 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
2841 * default
2842 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
2843 * default
Wink Saville7f856802009-06-09 10:23:37 -07002844 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002845 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002846 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002847 * Valid errors:
2848 * SUCCESS
2849 * RADIO_NOT_AVAILABLE
2850 * GENERIC_FAILURE
2851 *
2852 */
2853#define RIL_REQUEST_CDMA_BURST_DTMF 85
2854
2855/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002856 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07002857 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002858 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
2859 * If the checksum is valid the 20 digit AKEY is written to NV,
2860 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07002861 *
2862 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002863 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
2864 * where the last 6 digits are a checksum of the
2865 * first 20, as specified in TR45.AHAG
2866 * "Common Cryptographic Algorithms, Revision D.1
2867 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07002868 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002869 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002870 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002871 * Valid errors:
2872 * SUCCESS
2873 * RADIO_NOT_AVAILABLE
2874 * GENERIC_FAILURE
2875 *
2876 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002877#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07002878
2879/**
2880 * RIL_REQUEST_CDMA_SEND_SMS
2881 *
2882 * Send a CDMA SMS message
2883 *
2884 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07002885 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002886 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07002887 *
johnwangbfb151b2009-09-11 15:20:38 -07002888 * Based on the return error, caller decides to resend if sending sms
2889 * fails. The CDMA error class is derived as follows,
2890 * SUCCESS is error class 0 (no error)
2891 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
2892 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
2893 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002894 * Valid errors:
2895 * SUCCESS
2896 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07002897 * SMS_SEND_FAIL_RETRY
Wink Savillef4c4d362009-04-02 01:37:03 -07002898 * GENERIC_FAILURE
2899 *
2900 */
2901#define RIL_REQUEST_CDMA_SEND_SMS 87
2902
2903/**
2904 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
2905 *
2906 * Acknowledge the success or failure in the receipt of SMS
2907 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
2908 *
2909 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07002910 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002911 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002912 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002913 * Valid errors:
2914 * SUCCESS
2915 * RADIO_NOT_AVAILABLE
2916 * GENERIC_FAILURE
2917 *
2918 */
2919#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
2920
2921/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002922 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002923 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002924 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
2925 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002926 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002927 *
2928 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
2929 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
2930 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002931 * Valid errors:
2932 * SUCCESS
2933 * RADIO_NOT_AVAILABLE
2934 * GENERIC_FAILURE
2935 *
2936 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002937#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07002938
2939/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002940 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002941 *
2942 * Set GSM/WCDMA Cell Broadcast SMS config
2943 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002944 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
2945 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
2946 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002947 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002948 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002949 * Valid errors:
2950 * SUCCESS
2951 * RADIO_NOT_AVAILABLE
2952 * GENERIC_FAILURE
2953 *
2954 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002955#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07002956
2957/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002958 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07002959 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002960* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07002961 *
2962 * "data" is const int *
2963 * (const int *)data[0] indicates to activate or turn off the
2964 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
2965 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07002966 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002967 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002968 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002969 * Valid errors:
2970 * SUCCESS
2971 * RADIO_NOT_AVAILABLE
2972 * GENERIC_FAILURE
2973 *
2974 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002975#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07002976
2977/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002978 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002979 *
2980 * Request the setting of CDMA Broadcast SMS config
2981 *
2982 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002983 *
2984 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
2985 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
2986 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002987 * Valid errors:
2988 * SUCCESS
2989 * RADIO_NOT_AVAILABLE
2990 * GENERIC_FAILURE
2991 *
2992 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002993#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07002994
2995/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002996 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002997 *
2998 * Set CDMA Broadcast SMS config
2999 *
Wink Savillea592eeb2009-05-22 13:26:36 -07003000 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
3001 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
3002 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003003 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003004 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003005 * Valid errors:
3006 * SUCCESS
3007 * RADIO_NOT_AVAILABLE
3008 * GENERIC_FAILURE
3009 *
3010 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003011#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07003012
3013/**
Wink Savillea592eeb2009-05-22 13:26:36 -07003014 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07003015 *
3016 * Enable or disable the reception of CDMA Broadcast SMS
3017 *
3018 * "data" is const int *
3019 * (const int *)data[0] indicates to activate or turn off the
3020 * reception of CDMA Broadcast SMS, 0-1,
3021 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07003022 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003023 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07003024 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003025 * Valid errors:
3026 * SUCCESS
3027 * RADIO_NOT_AVAILABLE
3028 * GENERIC_FAILURE
3029 *
3030 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003031#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07003032
3033/**
3034 * RIL_REQUEST_CDMA_SUBSCRIPTION
3035 *
3036 * Request the device MDN / H_SID / H_NID.
3037 *
3038 * The request is only allowed when CDMA subscription is available. When CDMA
3039 * subscription is changed, application layer should re-issue the request to
3040 * update the subscription information.
3041 *
3042 * If a NULL value is returned for any of the device id, it means that error
3043 * accessing the device.
3044 *
3045 * "response" is const char **
3046 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07003047 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
3048 * CDMA subscription is available, in decimal format
3049 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
3050 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07003051 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07003052 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07003053 *
3054 * Valid errors:
3055 * SUCCESS
3056 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
3057 */
3058
Wink Savilleeafe79d2009-04-03 18:02:34 -07003059#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07003060
3061/**
3062 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
3063 *
3064 * Stores a CDMA SMS message to RUIM memory.
3065 *
3066 * "data" is RIL_CDMA_SMS_WriteArgs *
3067 *
3068 * "response" is int *
3069 * ((const int *)response)[0] is the record index where the message is stored.
3070 *
3071 * Valid errors:
3072 * SUCCESS
3073 * RADIO_NOT_AVAILABLE
3074 * GENERIC_FAILURE
3075 *
3076 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003077#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07003078
3079/**
3080 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
3081 *
3082 * Deletes a CDMA SMS message from RUIM memory.
3083 *
3084 * "data" is int *
3085 * ((int *)data)[0] is the record index of the message to delete.
3086 *
3087 * "response" is NULL
3088 *
3089 * Valid errors:
3090 * SUCCESS
3091 * RADIO_NOT_AVAILABLE
3092 * GENERIC_FAILURE
3093 *
3094 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003095#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07003096
3097/**
3098 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07003099 *
3100 * Request the device ESN / MEID / IMEI / IMEISV.
3101 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003102 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07003103 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07003104 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003105 *
3106 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07003107 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003108 *
3109 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07003110 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003111 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003112 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07003113 * ((const char **)response)[0] is IMEI if GSM subscription is available
3114 * ((const char **)response)[1] is IMEISV if GSM subscription is available
3115 * ((const char **)response)[2] is ESN if CDMA subscription is available
3116 * ((const char **)response)[3] is MEID if CDMA subscription is available
3117 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003118 * Valid errors:
3119 * SUCCESS
3120 * RADIO_NOT_AVAILABLE
3121 * GENERIC_FAILURE
3122 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003123#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07003124
Wink Saville1b5fd232009-04-22 14:50:00 -07003125/**
3126 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
3127 *
3128 * Request the radio's system selection module to exit emergency
3129 * callback mode. RIL will not respond with SUCCESS until the modem has
3130 * completely exited from Emergency Callback Mode.
3131 *
3132 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003133 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003134 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003135 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003136 * Valid errors:
3137 * SUCCESS
3138 * RADIO_NOT_AVAILABLE
3139 * GENERIC_FAILURE
3140 *
3141 */
3142#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07003143
jsh000a9fe2009-05-11 14:52:35 -07003144/**
3145 * RIL_REQUEST_GET_SMSC_ADDRESS
3146 *
3147 * Queries the default Short Message Service Center address on the device.
3148 *
3149 * "data" is NULL
3150 *
3151 * "response" is const char * containing the SMSC address.
3152 *
3153 * Valid errors:
3154 * SUCCESS
3155 * RADIO_NOT_AVAILABLE
3156 * GENERIC_FAILURE
3157 *
3158 */
3159#define RIL_REQUEST_GET_SMSC_ADDRESS 100
3160
3161/**
3162 * RIL_REQUEST_SET_SMSC_ADDRESS
3163 *
3164 * Sets the default Short Message Service Center address on the device.
3165 *
3166 * "data" is const char * containing the SMSC address.
3167 *
3168 * "response" is NULL
3169 *
3170 * Valid errors:
3171 * SUCCESS
3172 * RADIO_NOT_AVAILABLE
3173 * GENERIC_FAILURE
3174 *
3175 */
3176#define RIL_REQUEST_SET_SMSC_ADDRESS 101
3177
jshb60444e2009-05-29 11:09:17 -07003178/**
3179 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
3180 *
3181 * Indicates whether there is storage available for new SMS messages.
3182 *
3183 * "data" is int *
3184 * ((int *)data)[0] is 1 if memory is available for storing new messages
3185 * is 0 if memory capacity is exceeded
3186 *
3187 * "response" is NULL
3188 *
3189 * Valid errors:
3190 * SUCCESS
3191 * RADIO_NOT_AVAILABLE
3192 * GENERIC_FAILURE
3193 *
3194 */
3195#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
3196
Wink Saville2641d5b2009-06-08 17:40:42 -07003197/**
3198 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
3199 *
3200 * Indicates that the StkSerivce is running and is
3201 * ready to receive RIL_UNSOL_STK_XXXXX commands.
3202 *
3203 * "data" is NULL
3204 * "response" is NULL
3205 *
3206 * Valid errors:
3207 * SUCCESS
3208 * RADIO_NOT_AVAILABLE
3209 * GENERIC_FAILURE
3210 *
3211 */
3212#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
3213
Wink Savillec0114b32011-02-18 10:14:07 -08003214/**
3215 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3216 *
3217 * Request to query the location where the CDMA subscription shall
3218 * be retrieved
3219 *
3220 * "data" is NULL
3221 *
3222 * "response" is int *
3223 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3224 *
3225 * Valid errors:
3226 * SUCCESS
3227 * RADIO_NOT_AVAILABLE
3228 * GENERIC_FAILURE
3229 * SUBSCRIPTION_NOT_AVAILABLE
3230 *
3231 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
3232 */
3233#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
3234
Jake Hambyfa8d5842011-08-19 16:22:18 -07003235/**
3236 * RIL_REQUEST_ISIM_AUTHENTICATION
3237 *
3238 * Request the ISIM application on the UICC to perform AKA
3239 * challenge/response algorithm for IMS authentication
3240 *
3241 * "data" is a const char * containing the challenge string in Base64 format
3242 * "response" is a const char * containing the response in Base64 format
3243 *
3244 * Valid errors:
3245 * SUCCESS
3246 * RADIO_NOT_AVAILABLE
3247 * GENERIC_FAILURE
3248 */
3249#define RIL_REQUEST_ISIM_AUTHENTICATION 105
3250
Jake Hamby300105d2011-09-26 01:01:44 -07003251/**
3252 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
3253 *
3254 * Acknowledge successful or failed receipt of SMS previously indicated
3255 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
3256 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
3257 *
3258 * "data" is const char **
3259 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
3260 * is "0" on failed receipt (send RP-ERROR)
3261 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
3262 *
3263 * "response" is NULL
3264 *
3265 * Valid errors:
3266 * SUCCESS
3267 * RADIO_NOT_AVAILABLE
3268 * GENERIC_FAILURE
3269 */
3270#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
3271
3272/**
3273 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
3274 *
3275 * Requests to send a SAT/USAT envelope command to SIM.
3276 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
3277 *
3278 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
3279 * the SW1 and SW2 status bytes from the UICC response are returned along with
3280 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
3281 *
3282 * The RIL implementation shall perform the normal processing of a '91XX'
3283 * response in SW1/SW2 to retrieve the pending proactive command and send it
3284 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
3285 *
3286 * "data" is a const char * containing the SAT/USAT command
3287 * in hexadecimal format starting with command tag
3288 *
3289 * "response" is a const RIL_SIM_IO_Response *
3290 *
3291 * Valid errors:
3292 * RIL_E_SUCCESS
3293 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3294 * RIL_E_GENERIC_FAILURE
3295 */
3296#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
3297
Naveen Kalla2bc78d62011-12-07 16:22:53 -08003298/**
3299 * RIL_REQUEST_VOICE_RADIO_TECH
3300 *
3301 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
3302 * when radio state is RADIO_STATE_ON
3303 *
3304 * "data" is NULL
3305 * "response" is int *
3306 * ((int *) response)[0] is of type const RIL_RadioTechnology
3307 *
3308 * Valid errors:
3309 * SUCCESS
3310 * RADIO_NOT_AVAILABLE
3311 * GENERIC_FAILURE
3312 */
3313#define RIL_REQUEST_VOICE_RADIO_TECH 108
3314
Jake Hamby300105d2011-09-26 01:01:44 -07003315
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003316/***********************************************************************/
3317
Wink Savillef4c4d362009-04-02 01:37:03 -07003318
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003319#define RIL_UNSOL_RESPONSE_BASE 1000
3320
3321/**
3322 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3323 *
3324 * Indicate when value of RIL_RadioState has changed.
3325 *
3326 * Callee will invoke RIL_RadioStateRequest method on main thread
3327 *
3328 * "data" is NULL
3329 */
3330
3331#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
3332
3333
3334/**
3335 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
3336 *
3337 * Indicate when call state has changed
3338 *
3339 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
3340 *
3341 * "data" is NULL
3342 *
Wink Saville7f856802009-06-09 10:23:37 -07003343 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003344 * "RING", "BUSY", "NO CARRIER", and also call state
3345 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
3346 *
3347 * Redundent or extraneous invocations are tolerated
3348 */
3349#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
3350
3351
3352/**
Wink Savillec0114b32011-02-18 10:14:07 -08003353 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003354 *
Wink Savillec0114b32011-02-18 10:14:07 -08003355 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003356 *
3357 * Callee will invoke the following requests on main thread:
3358 *
Wink Savillec0114b32011-02-18 10:14:07 -08003359 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003360 * RIL_REQUEST_OPERATOR
3361 *
3362 * "data" is NULL
3363 *
3364 * FIXME should this happen when SIM records are loaded? (eg, for
3365 * EONS)
3366 */
Wink Savillec0114b32011-02-18 10:14:07 -08003367#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003368
3369/**
3370 * RIL_UNSOL_RESPONSE_NEW_SMS
3371 *
3372 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07003373 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003374 * "data" is const char *
3375 * This is a pointer to a string containing the PDU of an SMS-DELIVER
3376 * as an ascii string of hex digits. The PDU starts with the SMSC address
3377 * per TS 27.005 (+CMT:)
3378 *
3379 * Callee will subsequently confirm the receipt of thei SMS with a
3380 * RIL_REQUEST_SMS_ACKNOWLEDGE
3381 *
Wink Saville7f856802009-06-09 10:23:37 -07003382 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003383 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3384 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3385 */
3386
3387#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
3388
3389/**
3390 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
3391 *
3392 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07003393 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003394 * "data" is const char *
3395 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
3396 * as an ascii string of hex digits. The PDU starts with the SMSC address
3397 * per TS 27.005 (+CDS:).
3398 *
3399 * Callee will subsequently confirm the receipt of the SMS with a
3400 * RIL_REQUEST_SMS_ACKNOWLEDGE
3401 *
Wink Saville7f856802009-06-09 10:23:37 -07003402 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003403 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3404 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3405 */
3406
3407#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
3408
3409/**
3410 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
3411 *
3412 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07003413 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003414 * "data" is const int *
3415 * ((const int *)data)[0] contains the slot index on the SIM that contains
3416 * the new message
3417 */
3418
3419#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
3420
3421/**
3422 * RIL_UNSOL_ON_USSD
3423 *
3424 * Called when a new USSD message is received.
3425 *
3426 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07003427 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003428 * one of these string values:
3429 * "0" USSD-Notify -- text in ((const char **)data)[1]
3430 * "1" USSD-Request -- text in ((const char **)data)[1]
3431 * "2" Session terminated by network
3432 * "3" other local client (eg, SIM Toolkit) has responded
3433 * "4" Operation not supported
3434 * "5" Network timeout
3435 *
3436 * The USSD session is assumed to persist if the type code is "1", otherwise
3437 * the current session (if any) is assumed to have terminated.
3438 *
3439 * ((const char **)data)[1] points to a message string if applicable, which
3440 * should always be in UTF-8.
3441 */
3442#define RIL_UNSOL_ON_USSD 1006
3443/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
3444
3445/**
3446 * RIL_UNSOL_ON_USSD_REQUEST
3447 *
3448 * Obsolete. Send via RIL_UNSOL_ON_USSD
3449 */
Wink Saville7f856802009-06-09 10:23:37 -07003450#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003451
3452
3453/**
3454 * RIL_UNSOL_NITZ_TIME_RECEIVED
3455 *
3456 * Called when radio has received a NITZ time message
3457 *
3458 * "data" is const char * pointing to NITZ time string
3459 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
3460 */
3461#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
3462
3463/**
3464 * RIL_UNSOL_SIGNAL_STRENGTH
3465 *
3466 * Radio may report signal strength rather han have it polled.
3467 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003468 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003469 */
3470#define RIL_UNSOL_SIGNAL_STRENGTH 1009
3471
3472
3473/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003474 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003475 *
Wink Savillec0114b32011-02-18 10:14:07 -08003476 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07003477 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
3478 * of current data contexts including new contexts that have been
3479 * activated. A data call is only removed from this list when the
3480 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
3481 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003482 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003483 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003484 */
3485
Wink Savillef4c4d362009-04-02 01:37:03 -07003486#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003487
3488/**
3489 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
3490 *
3491 * Reports supplementary service related notification from the network.
3492 *
3493 * "data" is a const RIL_SuppSvcNotification *
3494 *
3495 */
3496
3497#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
3498
3499/**
3500 * RIL_UNSOL_STK_SESSION_END
3501 *
3502 * Indicate when STK session is terminated by SIM.
3503 *
3504 * "data" is NULL
3505 */
3506#define RIL_UNSOL_STK_SESSION_END 1012
3507
3508/**
3509 * RIL_UNSOL_STK_PROACTIVE_COMMAND
3510 *
3511 * Indicate when SIM issue a STK proactive command to applications
3512 *
3513 * "data" is a const char * containing SAT/USAT proactive command
3514 * in hexadecimal format string starting with command tag
3515 *
3516 */
3517#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
3518
3519/**
3520 * RIL_UNSOL_STK_EVENT_NOTIFY
3521 *
3522 * Indicate when SIM notifies applcations some event happens.
3523 * Generally, application does not need to have any feedback to
3524 * SIM but shall be able to indicate appropriate messages to users.
3525 *
3526 * "data" is a const char * containing SAT/USAT commands or responses
3527 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
3528 * starting with first byte of response data or command tag
3529 *
3530 */
3531#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
3532
3533/**
3534 * RIL_UNSOL_STK_CALL_SETUP
3535 *
3536 * Indicate when SIM wants application to setup a voice call.
3537 *
3538 * "data" is const int *
3539 * ((const int *)data)[0] contains timeout value (in milliseconds)
3540 */
3541#define RIL_UNSOL_STK_CALL_SETUP 1015
3542
3543/**
3544 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
3545 *
3546 * Indicates that SMS storage on the SIM is full. Sent when the network
3547 * attempts to deliver a new SMS message. Messages cannot be saved on the
3548 * SIM until space is freed. In particular, incoming Class 2 messages
3549 * cannot be stored.
3550 *
3551 * "data" is null
3552 *
3553 */
3554#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
3555
3556/**
3557 * RIL_UNSOL_SIM_REFRESH
3558 *
3559 * Indicates that file(s) on the SIM have been updated, or the SIM
3560 * has been reinitialized.
3561 *
Alex Yakavenka45e740e2012-01-31 11:48:27 -08003562 * In the case where RIL is version 6 or older:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003563 * "data" is an int *
3564 * ((int *)data)[0] is a RIL_SimRefreshResult.
3565 * ((int *)data)[1] is the EFID of the updated file if the result is
Alex Yakavenka45e740e2012-01-31 11:48:27 -08003566 * SIM_FILE_UPDATE or NULL for any other result.
3567 *
3568 * In the case where RIL is version 7:
3569 * "data" is a RIL_SimRefreshResponse_v7 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003570 *
Naveen Kalla2bc78d62011-12-07 16:22:53 -08003571 * Note: If the SIM state changes as a result of the SIM refresh (eg,
3572 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003573 * should be sent.
3574 */
3575#define RIL_UNSOL_SIM_REFRESH 1017
3576
3577/**
3578 * RIL_UNSOL_CALL_RING
3579 *
3580 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07003581 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
3582 * of a call and sending multiple is optional. If the system property
3583 * ro.telephony.call_ring.multiple is false then the upper layers
3584 * will generate the multiple events internally. Otherwise the vendor
3585 * ril must generate multiple RIL_UNSOL_CALL_RING if
3586 * ro.telephony.call_ring.multiple is true or if it is absent.
3587 *
3588 * The rate of these events is controlled by ro.telephony.call_ring.delay
3589 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003590 *
Wink Saville3d54e742009-05-18 18:00:44 -07003591 * "data" is null for GSM
3592 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003593 */
3594#define RIL_UNSOL_CALL_RING 1018
3595
The Android Open Source Project34a51082009-03-05 14:34:37 -08003596/**
3597 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
3598 *
3599 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07003600 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003601 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07003602
The Android Open Source Project34a51082009-03-05 14:34:37 -08003603 * "data" is null
3604 */
3605#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
3606
3607/**
3608 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3609 *
3610 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07003611 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003612 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07003613 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003614 * Callee will subsequently confirm the receipt of the SMS with
3615 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07003616 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003617 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
3618 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07003619 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003620 */
3621#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
3622
3623/**
3624 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
3625 *
3626 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07003627 *
Henrik Hall0eba2022010-11-25 10:20:56 +01003628 * "data" can be one of the following:
3629 * If received from GSM network, "data" is const char of 88 bytes
3630 * which indicates each page of a CBS Message sent to the MS by the
3631 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
3632 * If received from UMTS network, "data" is const char of 90 up to 1252
3633 * bytes which contain between 1 and 15 CBS Message pages sent as one
3634 * 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 -07003635 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003636 */
3637#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07003638
The Android Open Source Project34a51082009-03-05 14:34:37 -08003639/**
3640 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
3641 *
3642 * Indicates that SMS storage on the RUIM is full. Messages
3643 * cannot be saved on the RUIM until space is freed.
3644 *
3645 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07003646 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003647 */
Wink Savillef4c4d362009-04-02 01:37:03 -07003648#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
3649
The Android Open Source Project34a51082009-03-05 14:34:37 -08003650/**
3651 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
3652 *
3653 * Indicates a restricted state change (eg, for Domain Specific Access Control).
3654 *
3655 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
3656 *
3657 * "data" is an int *
3658 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
3659 */
3660#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
3661
Wink Saville1b5fd232009-04-22 14:50:00 -07003662/**
3663 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
3664 *
3665 * Indicates that the radio system selection module has
3666 * autonomously entered emergency callback mode.
3667 *
3668 * "data" is null
3669 *
3670 */
3671#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08003672
Wink Saville1b5fd232009-04-22 14:50:00 -07003673/**
3674 * RIL_UNSOL_CDMA_CALL_WAITING
3675 *
3676 * Called when CDMA radio receives a call waiting indication.
3677 *
3678 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07003679 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003680 */
3681#define RIL_UNSOL_CDMA_CALL_WAITING 1025
3682
3683/**
3684 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
3685 *
3686 * Called when CDMA radio receives an update of the progress of an
3687 * OTASP/OTAPA call.
3688 *
3689 * "data" is const int *
3690 * For CDMA this is an integer OTASP/OTAPA status listed in
3691 * RIL_CDMA_OTA_ProvisionStatus.
3692 *
3693 */
3694#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
3695
3696/**
3697 * RIL_UNSOL_CDMA_INFO_REC
3698 *
3699 * Called when CDMA radio receives one or more info recs.
3700 *
3701 * "data" is const RIL_CDMA_InformationRecords *
3702 *
3703 */
3704#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08003705
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07003706/**
3707 * RIL_UNSOL_OEM_HOOK_RAW
3708 *
3709 * This is for OEM specific use.
3710 *
3711 * "data" is a byte[]
3712 */
3713#define RIL_UNSOL_OEM_HOOK_RAW 1028
3714
John Wang5d621da2009-09-18 17:17:48 -07003715/**
3716 * RIL_UNSOL_RINGBACK_TONE
3717 *
3718 * Indicates that nework doesn't have in-band information, need to
3719 * play out-band tone.
3720 *
3721 * "data" is an int *
3722 * ((int *)data)[0] == 0 for stop play ringback tone.
3723 * ((int *)data)[0] == 1 for start play ringback tone.
3724 */
3725#define RIL_UNSOL_RINGBACK_TONE 1029
3726
John Wang5909cf82010-01-29 00:18:54 -08003727/**
3728 * RIL_UNSOL_RESEND_INCALL_MUTE
3729 *
3730 * Indicates that framework/application need reset the uplink mute state.
3731 *
3732 * There may be situations where the mute state becomes out of sync
3733 * between the application and device in some GSM infrastructures.
3734 *
3735 * "data" is null
3736 */
3737#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08003738
3739/**
3740 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
3741 *
3742 * Called when CDMA subscription source changed.
3743 *
3744 * "data" is int *
3745 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3746 */
Wink Saville29487ef2011-04-15 09:15:31 -07003747#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08003748
3749/**
3750 * RIL_UNSOL_CDMA_PRL_CHANGED
3751 *
3752 * Called when PRL (preferred roaming list) changes.
3753 *
3754 * "data" is int *
3755 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
3756 */
3757#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
3758
3759/**
3760 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
3761 *
3762 * Called when Emergency Callback Mode Ends
3763 *
3764 * Indicates that the radio system selection module has
3765 * proactively exited emergency callback mode.
3766 *
3767 * "data" is NULL
3768 *
3769 */
3770#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
3771
Wink Saville5b9df332011-04-06 16:24:21 -07003772/**
3773 * RIL_UNSOL_RIL_CONNECTED
3774 *
3775 * Called the ril connects and returns the version
3776 *
3777 * "data" is int *
3778 * ((int *)data)[0] is RIL_VERSION
3779 */
3780#define RIL_UNSOL_RIL_CONNECTED 1034
3781
Naveen Kalla2bc78d62011-12-07 16:22:53 -08003782/**
3783 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
3784 *
3785 * Indicates that voice technology has changed. Contains new radio technology
3786 * as a data in the message.
3787 *
3788 * "data" is int *
3789 * ((int *)data)[0] is of type const RIL_RadioTechnology
3790 *
3791 */
3792#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
3793
3794
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003795/***********************************************************************/
3796
3797
3798/**
3799 * RIL_Request Function pointer
3800 *
3801 * @param request is one of RIL_REQUEST_*
3802 * @param data is pointer to data defined for that RIL_REQUEST_*
3803 * data is owned by caller, and should not be modified or freed by callee
3804 * @param t should be used in subsequent call to RIL_onResponse
3805 * @param datalen the length of data
3806 *
3807 */
Wink Saville7f856802009-06-09 10:23:37 -07003808typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003809 size_t datalen, RIL_Token t);
3810
3811/**
3812 * This function should return the current radio state synchronously
3813 */
3814typedef RIL_RadioState (*RIL_RadioStateRequest)();
3815
3816/**
3817 * This function returns "1" if the specified RIL_REQUEST code is
3818 * supported and 0 if it is not
3819 *
3820 * @param requestCode is one of RIL_REQUEST codes
3821 */
3822
3823typedef int (*RIL_Supports)(int requestCode);
3824
3825/**
Wink Saville7f856802009-06-09 10:23:37 -07003826 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003827 * thread that calls RIL_RequestFunc--and indicates that a pending
3828 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07003829 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003830 * On cancel, the callee should do its best to abandon the request and
3831 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
3832 *
3833 * Subsequent calls to RIL_onRequestComplete for this request with
3834 * other results will be tolerated but ignored. (That is, it is valid
3835 * to ignore the cancellation request)
3836 *
3837 * RIL_Cancel calls should return immediately, and not wait for cancellation
3838 *
Wink Saville7f856802009-06-09 10:23:37 -07003839 * 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 -08003840 * interface
3841 *
3842 * @param t token wants to be canceled
3843 */
3844
3845typedef void (*RIL_Cancel)(RIL_Token t);
3846
3847typedef void (*RIL_TimedCallback) (void *param);
3848
3849/**
3850 * Return a version string for your RIL implementation
3851 */
3852typedef const char * (*RIL_GetVersion) (void);
3853
3854typedef struct {
3855 int version; /* set to RIL_VERSION */
3856 RIL_RequestFunc onRequest;
3857 RIL_RadioStateRequest onStateRequest;
3858 RIL_Supports supports;
3859 RIL_Cancel onCancel;
3860 RIL_GetVersion getVersion;
3861} RIL_RadioFunctions;
3862
3863#ifdef RIL_SHLIB
3864struct RIL_Env {
3865 /**
3866 * "t" is parameter passed in on previous call to RIL_Notification
3867 * routine.
3868 *
3869 * If "e" != SUCCESS, then response can be null/is ignored
3870 *
Wink Saville7f856802009-06-09 10:23:37 -07003871 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003872 * freed by callee
3873 *
3874 * RIL_onRequestComplete will return as soon as possible
3875 */
Wink Saville7f856802009-06-09 10:23:37 -07003876 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003877 void *response, size_t responselen);
3878
3879 /**
3880 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
3881 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3882 *
3883 * "data" is owned by caller, and should not be modified or freed by callee
3884 */
3885
Wink Saville7f856802009-06-09 10:23:37 -07003886 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003887 size_t datalen);
3888
3889 /**
Wink Saville7f856802009-06-09 10:23:37 -07003890 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003891 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3892 * a relative time value at which the callback is invoked. If relativeTime is
3893 * NULL or points to a 0-filled structure, the callback will be invoked as
3894 * soon as possible
3895 */
3896
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07003897 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07003898 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003899};
3900
3901
Wink Saville7f856802009-06-09 10:23:37 -07003902/**
3903 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003904 * argc and argv will be command line arguments intended for the RIL implementation
3905 * Return NULL on error
3906 *
3907 * @param env is environment point defined as RIL_Env
3908 * @param argc number of arguments
3909 * @param argv list fo arguments
3910 *
3911 */
3912const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
3913
3914#else /* RIL_SHLIB */
3915
3916/**
3917 * Call this once at startup to register notification routine
3918 *
3919 * @param callbacks user-specifed callback function
3920 */
3921void RIL_register (const RIL_RadioFunctions *callbacks);
3922
3923
3924/**
3925 *
3926 * RIL_onRequestComplete will return as soon as possible
3927 *
3928 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07003929 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003930 * @param e error code
3931 * if "e" != SUCCESS, then response can be null/is ignored
3932 * @param response is owned by caller, and should not be modified or
3933 * freed by callee
3934 * @param responselen the length of response in byte
3935 */
Wink Saville7f856802009-06-09 10:23:37 -07003936void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003937 void *response, size_t responselen);
3938
3939/**
3940 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
3941 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3942 * "data" is owned by caller, and should not be modified or freed by callee
3943 * @param datalen the length of data in byte
3944 */
3945
Wink Saville7f856802009-06-09 10:23:37 -07003946void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003947 size_t datalen);
3948
3949
3950/**
Wink Saville7f856802009-06-09 10:23:37 -07003951 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003952 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3953 * a relative time value at which the callback is invoked. If relativeTime is
3954 * NULL or points to a 0-filled structure, the callback will be invoked as
3955 * soon as possible
3956 *
3957 * @param callback user-specifed callback function
3958 * @param param parameter list
3959 * @param relativeTime a relative time value at which the callback is invoked
3960 */
3961
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07003962void RIL_requestTimedCallback (RIL_TimedCallback callback,
3963 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003964
3965
3966#endif /* RIL_SHLIB */
3967
3968#ifdef __cplusplus
3969}
3970#endif
3971
3972#endif /*ANDROID_RIL_H*/