blob: 074817fe2cbdd0e7c0136203cc61f0b21235cdca [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
Wink Savillec0114b32011-02-18 10:14:07 -080029#define RIL_VERSION 6 /* Current version */
Wink Saville43808972011-01-13 17:39:51 -080030#define RIL_VERSION_MIN 2 /* 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) */
74 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
Wink Saville7f856802009-06-09 10:23:37 -070075 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -070076 personalization locked, or SIM absent */
77 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
78 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
79 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
Wink Saville7f856802009-06-09 10:23:37 -070080 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -070081 personalization locked, or RUIM absent */
82 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
83 RADIO_STATE_NV_READY = 9 /* Radio is on and the NV interface is available */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080084} RIL_RadioState;
85
Wink Saville43808972011-01-13 17:39:51 -080086typedef enum {
87 RADIO_TECH_UNKNOWN = 0,
88 RADIO_TECH_GPRS = 1,
89 RADIO_TECH_EDGE = 2,
90 RADIO_TECH_UMTS = 3,
91 RADIO_TECH_IS95A = 4,
92 RADIO_TECH_IS95B = 5,
93 RADIO_TECH_1xRTT = 6,
94 RADIO_TECH_EVDO_0 = 7,
95 RADIO_TECH_EVDO_A = 8,
96 RADIO_TECH_HSDPA = 9,
97 RADIO_TECH_HSUPA = 10,
98 RADIO_TECH_HSPA = 11,
99 RADIO_TECH_EVDO_B = 12,
100 RADIO_TECH_EHRPD = 13,
Glenn Kastenc9419612011-02-02 17:44:18 -0800101 RADIO_TECH_LTE = 14,
102 RADIO_TECH_HSPAP = 15 // HSPA+
Wink Saville43808972011-01-13 17:39:51 -0800103} RIL_RadioTechnology;
104
Wink Savillec0114b32011-02-18 10:14:07 -0800105// Do we want to split Data from Voice and the use
106// RIL_RadioTechnology for get/setPreferredVoice/Data ?
107typedef enum {
108 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
109 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
110 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
111 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
112 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
113 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
114 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
115 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
116 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
117 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
118 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
119 PREF_NET_TYPE_LTE_ONLY = 11 /* LTE only */
120} RIL_PreferredNetworkType;
121
122/* Source for cdma subscription */
123typedef enum {
124 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
125 CDMA_SUBSCRIPTION_SOURCE_NV = 1
126} RIL_CdmaSubscriptionSource;
127
Wink Saville74fa3882009-12-22 15:35:41 -0800128/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
129typedef enum {
130 RIL_UUS_TYPE1_IMPLICIT = 0,
131 RIL_UUS_TYPE1_REQUIRED = 1,
132 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
133 RIL_UUS_TYPE2_REQUIRED = 3,
134 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
135 RIL_UUS_TYPE3_REQUIRED = 5,
136 RIL_UUS_TYPE3_NOT_REQUIRED = 6
137} RIL_UUS_Type;
138
139/* User-to-User Signaling Information data coding schemes. Possible values for
140 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
141 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
142typedef enum {
143 RIL_UUS_DCS_USP = 0, /* User specified protocol */
144 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
145 RIL_UUS_DCS_X244 = 2, /* X.244 */
146 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
147 convergence function */
148 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
149} RIL_UUS_DCS;
150
151/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
152 * This data is passed in RIL_ExtensionRecord and rec contains this
153 * structure when type is RIL_UUS_INFO_EXT_REC */
154typedef struct {
155 RIL_UUS_Type uusType; /* UUS Type */
156 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
157 int uusLength; /* Length of UUS Data */
158 char * uusData; /* UUS Data */
159} RIL_UUS_Info;
160
161/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700162typedef struct {
163 char isPresent; /* non-zero if signal information record is present */
164 char signalType; /* as defined 3.7.5.5-1 */
165 char alertPitch; /* as defined 3.7.5.5-2 */
166 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
167} RIL_CDMA_SignalInfoRecord;
168
Wink Saville1b5fd232009-04-22 14:50:00 -0700169typedef struct {
170 RIL_CallState state;
171 int index; /* Connection Index for use with, eg, AT+CHLD */
172 int toa; /* type of address, eg 145 = intl */
173 char isMpty; /* nonzero if is mpty call */
174 char isMT; /* nonzero if call is mobile terminated */
175 char als; /* ALS line indicator if available
176 (0 = line 1) */
177 char isVoice; /* nonzero if this is is a voice call */
178 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
179 char * number; /* Remote party number */
180 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
181 char * name; /* Remote party name */
182 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800183 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800184} RIL_Call;
185
Wink Savillec0114b32011-02-18 10:14:07 -0800186/* Deprecated, use RIL_Data_Call_Response_v6 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800187typedef struct {
Wink Saville43808972011-01-13 17:39:51 -0800188 int cid; /* Context ID, uniquely identifies this call */
Wink Saville1b5fd232009-04-22 14:50:00 -0700189 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -0700190 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
191 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
Wink Saville43808972011-01-13 17:39:51 -0800192 char * apn; /* ignored */
Wink Savillec0114b32011-02-18 10:14:07 -0800193 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
194} RIL_Data_Call_Response_v4;
Wink Saville43808972011-01-13 17:39:51 -0800195
196/*
197 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
198 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
199 */
200typedef struct {
201 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
202 int cid; /* Context ID, uniquely identifies this call */
203 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
204 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
205 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
206 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
207 such as "IP" or "IPV6" */
208 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800209 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
210 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800211 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800212 one of each. If the prefix length is absent the addresses
213 are assumed to be point to point with IPv4 having a prefix
214 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800215 char * dnses; /* A space-delimited list of DNS server addresses,
216 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
217 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800218 char * gateways; /* A space-delimited list of default gateway addresses,
219 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
220 May be empty in which case the addresses represent point
221 to point connections. */
222} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800223
224typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800225 int messageRef; /* TP-Message-Reference for GSM,
226 and BearerData MessageId for CDMA
227 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800228 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700229 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
230 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
231 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800232} RIL_SMS_Response;
233
234/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
235typedef struct {
236 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
237 /* 0 = "REC UNREAD" */
238 /* 1 = "REC READ" */
239 /* 2 = "STO UNSENT" */
240 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700241 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
242 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800243 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
244 (as expected by TS 27.005) or NULL for default SMSC */
245} RIL_SMS_WriteArgs;
246
247/** Used by RIL_REQUEST_DIAL */
248typedef struct {
249 char * address;
250 int clir;
251 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
252 * clir == 0 on "use subscription default value"
253 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
254 * clir == 2 on "CLIR suppression" (allow CLI presentation)
255 */
Wink Saville74fa3882009-12-22 15:35:41 -0800256 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800257} RIL_Dial;
258
259typedef struct {
260 int command; /* one of the commands listed for TS 27.007 +CRSM*/
261 int fileid; /* EF id */
262 char *path; /* "pathid" from TS 27.007 +CRSM command.
263 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700264 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800265 */
266 int p1;
267 int p2;
268 int p3;
269 char *data; /* May be NULL*/
270 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800271} RIL_SIM_IO_v5;
272
273typedef struct {
274 int command; /* one of the commands listed for TS 27.007 +CRSM*/
275 int fileid; /* EF id */
276 char *path; /* "pathid" from TS 27.007 +CRSM command.
277 Path is in hex asciii format eg "7f205f70"
278 Path must always be provided.
279 */
280 int p1;
281 int p2;
282 int p3;
283 char *data; /* May be NULL*/
284 char *pin2; /* May be NULL*/
285 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
286} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800287
288typedef struct {
289 int sw1;
290 int sw2;
291 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
292} RIL_SIM_IO_Response;
293
294/* See also com.android.internal.telephony.gsm.CallForwardInfo */
295
296typedef struct {
297 int status; /*
298 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
299 * status 1 = active, 0 = not active
300 *
301 * For RIL_REQUEST_SET_CALL_FORWARD:
302 * status is:
303 * 0 = disable
304 * 1 = enable
305 * 2 = interrogate
306 * 3 = registeration
307 * 4 = erasure
308 */
309
Wink Saville3d54e742009-05-18 18:00:44 -0700310 int reason; /* from TS 27.007 7.11 "reason" */
311 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
312 See table for Android mapping from
313 MMI service code
314 0 means user doesn't input class */
315 int toa; /* "type" from TS 27.007 7.11 */
316 char * number; /* "number" from TS 27.007 7.11. May be NULL */
317 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800318}RIL_CallForwardInfo;
319
320typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700321 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
322 * Upper 16 bits is LAC and lower 16 bits
323 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800324 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700325 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700326 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800327 */
johnwange0ba6a92009-09-11 19:14:52 -0700328 int rssi; /* Received RSSI in GSM,
329 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800330 */
331} RIL_NeighboringCell;
332
333/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
334typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700335 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800336 CALL_FAIL_NORMAL = 16,
337 CALL_FAIL_BUSY = 17,
338 CALL_FAIL_CONGESTION = 34,
339 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
340 CALL_FAIL_CALL_BARRED = 240,
341 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700342 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
343 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Wink Saville1b5fd232009-04-22 14:50:00 -0700344 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
345 CALL_FAIL_CDMA_DROP = 1001,
346 CALL_FAIL_CDMA_INTERCEPT = 1002,
347 CALL_FAIL_CDMA_REORDER = 1003,
348 CALL_FAIL_CDMA_SO_REJECT = 1004,
349 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
350 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
351 CALL_FAIL_CDMA_PREEMPTED = 1007,
352 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
353 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700354 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800355 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
356} RIL_LastCallFailCause;
357
Wink Savillef4c4d362009-04-02 01:37:03 -0700358/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800359typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800360 PDP_FAIL_NONE = 0, /* No error, connection ok */
361
362 /* an integer cause code defined in TS 24.008
363 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
364 If the implementation does not have access to the exact cause codes,
365 then it should return one of the following values,
366 as the UI layer needs to distinguish these
367 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700368 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
369 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
370 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
371 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
372 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
373 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
374 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
375 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
376 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
377 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800378 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
379 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
380 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
381 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700382 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
Wink Saville43808972011-01-13 17:39:51 -0800383
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700384 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800385 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
386 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800387
388 /* reasons for data call drop - network/modem disconnect */
Wink Savillec0114b32011-02-18 10:14:07 -0800389 PDP_FAIL_SIGNAL_LOST = -3, /* no retry */
Wink Saville43808972011-01-13 17:39:51 -0800390 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
391 with parameters appropriate for new technology */
392 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
393 powered off - no retry */
394 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
395 mode was up on same APN/data profile - no retry until
396 tethered call is off */
397
398 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */
399} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800400
jsh602f80f2009-07-10 15:44:37 -0700401/* See RIL_REQUEST_SETUP_DATA_CALL */
402typedef enum {
403 RIL_DATA_PROFILE_DEFAULT = 0,
404 RIL_DATA_PROFILE_TETHERED = 1,
405 RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */
406} RIL_DataProfile;
407
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800408/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
409typedef struct {
410 int notificationType; /*
411 * 0 = MO intermediate result code
412 * 1 = MT unsolicited result code
413 */
414 int code; /* See 27.007 7.17
415 "code1" for MO
416 "code2" for MT. */
417 int index; /* CUG index. See 27.007 7.17. */
418 int type; /* "type" from 27.007 7.17 (MT only). */
419 char * number; /* "number" from 27.007 7.17
420 (MT only, may be NULL). */
421} RIL_SuppSvcNotification;
422
Wink Savillef4c4d362009-04-02 01:37:03 -0700423#define RIL_CARD_MAX_APPS 8
424
425typedef enum {
426 RIL_CARDSTATE_ABSENT = 0,
427 RIL_CARDSTATE_PRESENT = 1,
428 RIL_CARDSTATE_ERROR = 2
429} RIL_CardState;
430
431typedef enum {
432 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
433 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700434 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
435 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700436 involved */
437 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
438 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
439 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
440 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
441 RIL_PERSOSUBSTATE_SIM_SIM = 7,
442 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
443 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
444 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
445 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
446 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
447 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
448 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
449 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
450 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
451 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
452 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
453 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
454 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
455 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
456 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
457 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
458 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
459} RIL_PersoSubstate;
460
461typedef enum {
462 RIL_APPSTATE_UNKNOWN = 0,
463 RIL_APPSTATE_DETECTED = 1,
464 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
465 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700466 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700467 when app_state is assigned to this value */
468 RIL_APPSTATE_READY = 5
469} RIL_AppState;
470
471typedef enum {
472 RIL_PINSTATE_UNKNOWN = 0,
473 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
474 RIL_PINSTATE_ENABLED_VERIFIED = 2,
475 RIL_PINSTATE_DISABLED = 3,
476 RIL_PINSTATE_ENABLED_BLOCKED = 4,
477 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
478} RIL_PinState;
479
480typedef enum {
481 RIL_APPTYPE_UNKNOWN = 0,
482 RIL_APPTYPE_SIM = 1,
483 RIL_APPTYPE_USIM = 2,
484 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -0800485 RIL_APPTYPE_CSIM = 4,
486 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -0700487} RIL_AppType;
488
489typedef struct
490{
Wink Saville7f856802009-06-09 10:23:37 -0700491 RIL_AppType app_type;
492 RIL_AppState app_state;
493 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -0700494 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -0700495 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -0700496 0x30, 0x30, 0x30 */
497 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -0800498 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -0700499 RIL_PinState pin1;
500 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -0700501} RIL_AppStatus;
502
Wink Savillec0114b32011-02-18 10:14:07 -0800503/* Deprecated, use RIL_CardStatus_v6 */
504typedef struct
505{
506 RIL_CardState card_state;
507 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
508 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
509 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
510 int num_applications; /* value <= RIL_CARD_MAX_APPS */
511 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
512} RIL_CardStatus_v5;
513
Wink Savillef4c4d362009-04-02 01:37:03 -0700514typedef struct
515{
Wink Saville7f856802009-06-09 10:23:37 -0700516 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -0700517 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -0800518 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 ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -0700521 int num_applications; /* value <= RIL_CARD_MAX_APPS */
522 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -0800523} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -0700524
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800525/* The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH */
526typedef enum {
527 /* A file on SIM has been updated. data[1] contains the EFID. */
528 SIM_FILE_UPDATE = 0,
Wink Savillec0114b32011-02-18 10:14:07 -0800529 /* SIM initialized. All files should be re-read. data[1] contains AID that caused REFRESH */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800530 SIM_INIT = 1,
531 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
532 SIM_RESET = 2
533} RIL_SimRefreshResult;
534
Wink Savillec0114b32011-02-18 10:14:07 -0800535/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
536typedef struct {
537 char * number; /* Remote party number */
538 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
539 char * name; /* Remote party name */
540 RIL_CDMA_SignalInfoRecord signalInfoRecord;
541} RIL_CDMA_CallWaiting_v5;
542
Wink Saville1b5fd232009-04-22 14:50:00 -0700543typedef struct {
544 char * number; /* Remote party number */
545 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
546 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -0700547 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -0800548 /* Number type/Number plan required to support International Call Waiting */
549 int number_type; /* 0=Unknown, 1=International, 2=National,
550 3=Network specific, 4=subscriber */
551 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
552} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -0700553
Wink Savillea592eeb2009-05-22 13:26:36 -0700554/**
555 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
556 *
557 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
558 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
559 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
560 * CBM message ID.
561 *
562 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
563 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
564 * and 9.4.4.2.3 for UMTS.
565 * All other values can be treated as empty CBM data coding scheme.
566 *
567 * selected 0 means message types specified in <fromServiceId, toServiceId>
568 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
569 *
570 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
571 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
572 */
Wink Savillef4c4d362009-04-02 01:37:03 -0700573typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -0700574 int fromServiceId;
575 int toServiceId;
576 int fromCodeScheme;
577 int toCodeScheme;
578 unsigned char selected;
579} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -0700580
The Android Open Source Project34a51082009-03-05 14:34:37 -0800581/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
582#define RIL_RESTRICTED_STATE_NONE 0x00
583/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
584#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
585/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
586#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -0700587/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -0800588#define RIL_RESTRICTED_STATE_CS_ALL 0x04
589/* Block packet data access due to restriction. */
590#define RIL_RESTRICTED_STATE_PS_ALL 0x10
591
Wink Saville1b5fd232009-04-22 14:50:00 -0700592/* The status for an OTASP/OTAPA session */
593typedef enum {
594 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
595 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
596 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
597 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
598 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
599 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
600 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
601 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
602 CDMA_OTA_PROVISION_STATUS_COMMITTED,
603 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
604 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
605 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
606} RIL_CDMA_OTA_ProvisionStatus;
607
608typedef struct {
609 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
610 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
611} RIL_GW_SignalStrength;
612
613
614typedef struct {
615 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
616 * multiplied by -1. Example: If the actual RSSI is -75, then this response
617 * value will be 75.
618 */
619 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
620 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
621 * will be 125.
622 */
623} RIL_CDMA_SignalStrength;
624
625
626typedef struct {
627 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
628 * multiplied by -1. Example: If the actual RSSI is -75, then this response
629 * value will be 75.
630 */
631 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
632 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
633 * will be 125.
634 */
635 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
636} RIL_EVDO_SignalStrength;
637
Wink Savillec0114b32011-02-18 10:14:07 -0800638typedef struct {
639 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
640 int rsrp; /* The current Reference Signal Receive Power in dBm
641 * multipled by -1. Range: 44 to 140 dBm, TODO: doc reference */
642 int rsrq; /* The current Reference Signal Receive Quality in dB
643 * multiplied by -1. Range: 20 to 3 dB. TODO: doc reference */
644 int rssnr; /* TODO: Need documentation and doc reference */
645 int cqi; /* TODO: Need documentation and doc reference */
646} RIL_LTE_SignalStrength;
647
648/* Deprecated, use RIL_SignalStrength_v6 */
649typedef struct {
650 RIL_GW_SignalStrength GW_SignalStrength;
651 RIL_CDMA_SignalStrength CDMA_SignalStrength;
652 RIL_EVDO_SignalStrength EVDO_SignalStrength;
653} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -0700654
655typedef struct {
656 RIL_GW_SignalStrength GW_SignalStrength;
657 RIL_CDMA_SignalStrength CDMA_SignalStrength;
658 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -0800659 RIL_LTE_SignalStrength LTE_SignalStrength;
660} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -0700661
662/* Names of the CDMA info records (C.S0005 section 3.7.5) */
663typedef enum {
664 RIL_CDMA_DISPLAY_INFO_REC,
665 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
666 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
667 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
668 RIL_CDMA_SIGNAL_INFO_REC,
669 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
670 RIL_CDMA_LINE_CONTROL_INFO_REC,
671 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
672 RIL_CDMA_T53_CLIR_INFO_REC,
673 RIL_CDMA_T53_RELEASE_INFO_REC,
674 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
675} RIL_CDMA_InfoRecName;
676
677/* Display Info Rec as defined in C.S0005 section 3.7.5.1
678 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
679 Note: the Extended Display info rec contains multiple records of the
680 form: display_tag, display_len, and display_len occurrences of the
681 chari field if the display_tag is not 10000000 or 10000001.
682 To save space, the records are stored consecutively in a byte buffer.
683 The display_tag, display_len and chari fields are all 1 byte.
684*/
685
686typedef struct {
687 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -0700688 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -0700689} RIL_CDMA_DisplayInfoRecord;
690
691/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
692 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
693 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
694*/
695
696typedef struct {
697 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -0700698 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -0700699 char number_type;
700 char number_plan;
701 char pi;
702 char si;
703} RIL_CDMA_NumberInfoRecord;
704
705/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
706typedef enum {
707 RIL_REDIRECTING_REASON_UNKNOWN = 0,
708 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
709 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
710 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
711 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
712 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
713 RIL_REDIRECTING_REASON_RESERVED
714} RIL_CDMA_RedirectingReason;
715
716typedef struct {
717 RIL_CDMA_NumberInfoRecord redirectingNumber;
718 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
719 RIL_CDMA_RedirectingReason redirectingReason;
720} RIL_CDMA_RedirectingNumberInfoRecord;
721
722/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
723typedef struct {
724 char lineCtrlPolarityIncluded;
725 char lineCtrlToggle;
726 char lineCtrlReverse;
727 char lineCtrlPowerDenial;
728} RIL_CDMA_LineControlInfoRecord;
729
730/* T53 CLIR Information Record */
731typedef struct {
732 char cause;
733} RIL_CDMA_T53_CLIRInfoRecord;
734
735/* T53 Audio Control Information Record */
736typedef struct {
737 char upLink;
738 char downLink;
739} RIL_CDMA_T53_AudioControlInfoRecord;
740
741typedef struct {
742
743 RIL_CDMA_InfoRecName name;
744
745 union {
746 /* Display and Extended Display Info Rec */
747 RIL_CDMA_DisplayInfoRecord display;
748
749 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
750 RIL_CDMA_NumberInfoRecord number;
751
752 /* Signal Info Rec */
753 RIL_CDMA_SignalInfoRecord signal;
754
755 /* Redirecting Number Info Rec */
756 RIL_CDMA_RedirectingNumberInfoRecord redir;
757
758 /* Line Control Info Rec */
759 RIL_CDMA_LineControlInfoRecord lineCtrl;
760
761 /* T53 CLIR Info Rec */
762 RIL_CDMA_T53_CLIRInfoRecord clir;
763
764 /* T53 Audio Control Info Rec */
765 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
766 } rec;
767} RIL_CDMA_InformationRecord;
768
769#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
770
771typedef struct {
772 char numberOfInfoRecs;
773 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
774} RIL_CDMA_InformationRecords;
775
Wink Saville7f856802009-06-09 10:23:37 -0700776/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800777 * RIL_REQUEST_GET_SIM_STATUS
778 *
779 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -0700780 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800781 * "data" is NULL
782 *
Wink Savillefd729372011-02-22 16:19:39 -0800783 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800784 *
785 * Valid errors:
786 * Must never fail
787 */
788#define RIL_REQUEST_GET_SIM_STATUS 1
789
790/**
791 * RIL_REQUEST_ENTER_SIM_PIN
792 *
John Wang309ac292009-07-30 14:53:23 -0700793 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800794 *
795 * "data" is const char **
796 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -0800797 * ((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 -0800798 *
jsh593c9102009-06-24 16:13:44 -0700799 * "response" is int *
800 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800801 *
802 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700803 *
804 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800805 * RADIO_NOT_AVAILABLE (radio resetting)
806 * GENERIC_FAILURE
807 * PASSWORD_INCORRECT
808 */
809
810#define RIL_REQUEST_ENTER_SIM_PIN 2
811
812
813/**
814 * RIL_REQUEST_ENTER_SIM_PUK
815 *
Wink Saville7f856802009-06-09 10:23:37 -0700816 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800817 *
818 * "data" is const char **
819 * ((const char **)data)[0] is PUK value
820 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -0800821 * ((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 -0800822 *
jsh593c9102009-06-24 16:13:44 -0700823 * "response" is int *
824 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800825 *
826 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700827 *
828 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800829 * RADIO_NOT_AVAILABLE (radio resetting)
830 * GENERIC_FAILURE
831 * PASSWORD_INCORRECT
832 * (PUK is invalid)
833 */
834
835#define RIL_REQUEST_ENTER_SIM_PUK 3
836
837/**
838 * RIL_REQUEST_ENTER_SIM_PIN2
839 *
840 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
841 * returned as a a failure from a previous operation.
842 *
843 * "data" is const char **
844 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -0800845 * ((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 -0800846 *
jsh593c9102009-06-24 16:13:44 -0700847 * "response" is int *
848 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800849 *
850 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700851 *
852 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800853 * RADIO_NOT_AVAILABLE (radio resetting)
854 * GENERIC_FAILURE
855 * PASSWORD_INCORRECT
856 */
857
858#define RIL_REQUEST_ENTER_SIM_PIN2 4
859
860/**
861 * RIL_REQUEST_ENTER_SIM_PUK2
862 *
Wink Saville7f856802009-06-09 10:23:37 -0700863 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800864 *
865 * "data" is const char **
866 * ((const char **)data)[0] is PUK2 value
867 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -0800868 * ((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 -0800869 *
jsh593c9102009-06-24 16:13:44 -0700870 * "response" is int *
871 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800872 *
873 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700874 *
875 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800876 * RADIO_NOT_AVAILABLE (radio resetting)
877 * GENERIC_FAILURE
878 * PASSWORD_INCORRECT
879 * (PUK2 is invalid)
880 */
881
882#define RIL_REQUEST_ENTER_SIM_PUK2 5
883
884/**
885 * RIL_REQUEST_CHANGE_SIM_PIN
886 *
Wink Saville7f856802009-06-09 10:23:37 -0700887 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800888 *
889 * "data" is const char **
890 * ((const char **)data)[0] is old PIN value
891 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -0800892 * ((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 -0800893 *
jsh593c9102009-06-24 16:13:44 -0700894 * "response" is int *
895 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800896 *
897 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700898 *
899 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800900 * RADIO_NOT_AVAILABLE (radio resetting)
901 * GENERIC_FAILURE
902 * PASSWORD_INCORRECT
903 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -0700904 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800905 */
906
907#define RIL_REQUEST_CHANGE_SIM_PIN 6
908
909
910/**
911 * RIL_REQUEST_CHANGE_SIM_PIN2
912 *
Wink Saville7f856802009-06-09 10:23:37 -0700913 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800914 *
915 * "data" is const char **
916 * ((const char **)data)[0] is old PIN2 value
917 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -0800918 * ((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 -0800919 *
jsh593c9102009-06-24 16:13:44 -0700920 * "response" is int *
921 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800922 *
923 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700924 *
925 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800926 * RADIO_NOT_AVAILABLE (radio resetting)
927 * GENERIC_FAILURE
928 * PASSWORD_INCORRECT
929 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -0700930 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800931 */
932
933#define RIL_REQUEST_CHANGE_SIM_PIN2 7
934
935/**
936 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
937 *
938 * Requests that network personlization be deactivated
939 *
940 * "data" is const char **
941 * ((const char **)(data))[0]] is network depersonlization code
942 *
jsh593c9102009-06-24 16:13:44 -0700943 * "response" is int *
944 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800945 *
946 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700947 *
948 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800949 * RADIO_NOT_AVAILABLE (radio resetting)
950 * GENERIC_FAILURE
951 * PASSWORD_INCORRECT
952 * (code is invalid)
953 */
954
955#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
956
957/**
Wink Saville7f856802009-06-09 10:23:37 -0700958 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800959 *
960 * Requests current call list
961 *
962 * "data" is NULL
963 *
964 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -0700965 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800966 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700967 *
968 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800969 * RADIO_NOT_AVAILABLE (radio resetting)
970 * GENERIC_FAILURE
971 * (request will be made again in a few hundred msec)
972 */
973
974#define RIL_REQUEST_GET_CURRENT_CALLS 9
975
976
Wink Saville7f856802009-06-09 10:23:37 -0700977/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800978 * RIL_REQUEST_DIAL
979 *
980 * Initiate voice call
981 *
982 * "data" is const RIL_Dial *
983 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -0700984 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800985 * This method is never used for supplementary service codes
986 *
987 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700988 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800989 * RADIO_NOT_AVAILABLE (radio resetting)
990 * GENERIC_FAILURE
991 */
992#define RIL_REQUEST_DIAL 10
993
994/**
995 * RIL_REQUEST_GET_IMSI
996 *
997 * Get the SIM IMSI
998 *
999 * Only valid when radio state is "RADIO_STATE_SIM_READY"
1000 *
Wink Savillec0114b32011-02-18 10:14:07 -08001001 * "data" is const char **
1002 * ((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 -08001003 * "response" is a const char * containing the IMSI
1004 *
1005 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001006 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001007 * RADIO_NOT_AVAILABLE (radio resetting)
1008 * GENERIC_FAILURE
1009 */
1010
1011#define RIL_REQUEST_GET_IMSI 11
1012
1013/**
1014 * RIL_REQUEST_HANGUP
1015 *
1016 * Hang up a specific line (like AT+CHLD=1x)
1017 *
John Wang06bae4b2010-11-18 16:37:09 -08001018 * After this HANGUP request returns, RIL should show the connection is NOT
1019 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1020 *
Wink Saville7f856802009-06-09 10:23:37 -07001021 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001022 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001023 *
1024 * "response" is NULL
1025 *
1026 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001027 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001028 * RADIO_NOT_AVAILABLE (radio resetting)
1029 * GENERIC_FAILURE
1030 */
1031
1032#define RIL_REQUEST_HANGUP 12
1033
1034/**
1035 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
1036 *
1037 * Hang up waiting or held (like AT+CHLD=0)
1038 *
John Wang06bae4b2010-11-18 16:37:09 -08001039 * After this HANGUP request returns, RIL should show the connection is NOT
1040 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1041 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001042 * "data" is NULL
1043 * "response" is NULL
1044 *
1045 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001046 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001047 * RADIO_NOT_AVAILABLE (radio resetting)
1048 * GENERIC_FAILURE
1049 */
1050
1051#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
1052
1053/**
1054 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
1055 *
1056 * Hang up waiting or held (like AT+CHLD=1)
1057 *
John Wang06bae4b2010-11-18 16:37:09 -08001058 * After this HANGUP request returns, RIL should show the connection is NOT
1059 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1060 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001061 * "data" is NULL
1062 * "response" is NULL
1063 *
1064 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001065 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001066 * RADIO_NOT_AVAILABLE (radio resetting)
1067 * GENERIC_FAILURE
1068 */
1069
1070#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
1071
1072/**
1073 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
1074 *
1075 * Switch waiting or holding call and active call (like AT+CHLD=2)
1076 *
1077 * State transitions should be is follows:
1078 *
1079 * If call 1 is waiting and call 2 is active, then if this re
1080 *
1081 * BEFORE AFTER
1082 * Call 1 Call 2 Call 1 Call 2
1083 * ACTIVE HOLDING HOLDING ACTIVE
1084 * ACTIVE WAITING HOLDING ACTIVE
1085 * HOLDING WAITING HOLDING ACTIVE
1086 * ACTIVE IDLE HOLDING IDLE
1087 * IDLE IDLE IDLE IDLE
1088 *
1089 * "data" is NULL
1090 * "response" is NULL
1091 *
1092 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001093 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001094 * RADIO_NOT_AVAILABLE (radio resetting)
1095 * GENERIC_FAILURE
1096 */
1097
1098#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
1099#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
1100
1101/**
1102 * RIL_REQUEST_CONFERENCE
1103 *
1104 * Conference holding and active (like AT+CHLD=3)
1105
1106 * "data" is NULL
1107 * "response" is NULL
1108 *
1109 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001110 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001111 * RADIO_NOT_AVAILABLE (radio resetting)
1112 * GENERIC_FAILURE
1113 */
1114#define RIL_REQUEST_CONFERENCE 16
1115
1116/**
1117 * RIL_REQUEST_UDUB
1118 *
Wink Saville7f856802009-06-09 10:23:37 -07001119 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001120 * waiting call answer)(RIL_BasicRequest r);
1121 *
1122 * "data" is NULL
1123 * "response" is NULL
1124 *
1125 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001126 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001127 * RADIO_NOT_AVAILABLE (radio resetting)
1128 * GENERIC_FAILURE
1129 */
1130#define RIL_REQUEST_UDUB 17
1131
1132/**
1133 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1134 *
1135 * Requests the failure cause code for the most recently terminated call
1136 *
1137 * "data" is NULL
1138 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -07001139 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001140 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
1141 * failure reasons are derived from the possible call failure scenarios
1142 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001143 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08001144 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
1145 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
1146 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001147 * If the implementation does not have access to the exact cause codes,
1148 * then it should return one of the values listed in RIL_LastCallFailCause,
1149 * as the UI layer needs to distinguish these cases for tone generation or
1150 * error notification.
1151 *
1152 * Valid errors:
1153 * SUCCESS
1154 * RADIO_NOT_AVAILABLE
1155 * GENERIC_FAILURE
1156 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001157 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001158 */
1159#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
1160
1161/**
1162 * RIL_REQUEST_SIGNAL_STRENGTH
1163 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001164 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001165 *
1166 * Must succeed if radio is on.
1167 *
1168 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07001169 *
1170 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001171 *
1172 * Valid errors:
1173 * SUCCESS
1174 * RADIO_NOT_AVAILABLE
1175 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001176#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07001177
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001178/**
Wink Savillec0114b32011-02-18 10:14:07 -08001179 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001180 *
1181 * Request current registration state
1182 *
1183 * "data" is NULL
1184 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -07001185 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -07001186 * 0 - Not registered, MT is not currently searching
1187 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001188 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -07001189 * 2 - Not registered, but MT is currently searching
1190 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001191 * 3 - Registration denied
1192 * 4 - Unknown
1193 * 5 - Registered, roaming
John Wang7f8ded12010-01-21 15:07:28 -08001194 * 10 - Same as 0, but indicates that emergency calls
1195 * are enabled.
1196 * 12 - Same as 2, but indicates that emergency calls
1197 * are enabled.
1198 * 13 - Same as 3, but indicates that emergency calls
1199 * are enabled.
1200 * 14 - Same as 4, but indicates that emergency calls
1201 * are enabled.
1202 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001203 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1204 * NULL if not.Valid LAC are 0x0000 - 0xffff
1205 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1206 * NULL if not.
1207 * Valid CID are 0x00000000 - 0xffffffff
1208 * In GSM, CID is Cell ID (see TS 27.007)
1209 * in 16 bits
1210 * In UMTS, CID is UMTS Cell Identity
1211 * (see TS 25.331) in 28 bits
Wink Saville43808972011-01-13 17:39:51 -08001212 * ((const char **)response)[3] indicates the available voice radio technology,
1213 * valid values as defined by RIL_RadioTechnology.
Wink Saville1b5fd232009-04-22 14:50:00 -07001214 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1215 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07001216 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07001217 * ((const char **)response)[5] is Base Station latitude if registered on a
1218 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001219 * latitude is a decimal number as specified in
1220 * 3GPP2 C.S0005-A v6.0. It is represented in
1221 * units of 0.25 seconds and ranges from -1296000
1222 * to 1296000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08001223 * to a range of -90 to +90 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07001224 * ((const char **)response)[6] is Base Station longitude if registered on a
1225 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001226 * longitude is a decimal number as specified in
1227 * 3GPP2 C.S0005-A v6.0. It is represented in
1228 * units of 0.25 seconds and ranges from -2592000
1229 * to 2592000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08001230 * to a range of -180 to +180 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07001231 * ((const char **)response)[7] is concurrent services support indicator if
1232 * registered on a CDMA system 0-1.
1233 * 0 - Concurrent services not supported,
1234 * 1 - Concurrent services supported
1235 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1236 * NULL if not. Valid System ID are 0 - 32767
1237 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1238 * NULL if not. Valid System ID are 0 - 65535
1239 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001240 * on a CDMA or EVDO system or NULL if not. Valid values
Wink Saville1b5fd232009-04-22 14:50:00 -07001241 * are 0-255.
1242 * ((const char **)response)[11] indicates whether the current system is in the
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001243 * PRL if registered on a CDMA or EVDO system or NULL if
Wink Saville1b5fd232009-04-22 14:50:00 -07001244 * not. 0=not in the PRL, 1=in the PRL
1245 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001246 * if registered on a CDMA or EVDO system or NULL if not.
Wink Saville1b5fd232009-04-22 14:50:00 -07001247 * Valid values are 0-255.
1248 * ((const char **)response)[13] if registration state is 3 (Registration
1249 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07001250 * registration was denied. See 3GPP TS 24.008,
1251 * 10.5.3.6 and Annex G.
1252 * 0 - General
1253 * 1 - Authentication Failure
1254 * 2 - IMSI unknown in HLR
1255 * 3 - Illegal MS
1256 * 4 - Illegal ME
1257 * 5 - PLMN not allowed
1258 * 6 - Location area not allowed
1259 * 7 - Roaming not allowed
1260 * 8 - No Suitable Cells in this Location Area
1261 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07001262 * 10 - Persistent location update reject
Wink Savillec0114b32011-02-18 10:14:07 -08001263 * 11 - PLMN not allowed
1264 * 12 - Location area not allowed
1265 * 13 - Roaming not allowed in this Location Area
1266 * 15 - No Suitable Cells in this Location Area
1267 * 17 - Network Failure
1268 * 20 - MAC Failure
1269 * 21 - Sync Failure
1270 * 22 - Congestion
1271 * 23 - GSM Authentication unacceptable
1272 * 25 - Not Authorized for this CSG
1273 * 32 - Service option not supported
1274 * 33 - Requested service option not subscribed
1275 * 34 - Service option temporarily out of order
1276 * 38 - Call cannot be identified
1277 * 48-63 - Retry upon entry into a new cell
1278 * 95 - Semantically incorrect message
1279 * 96 - Invalid mandatory information
1280 * 97 - Message type non-existent or not implemented
1281 * 98 - Message not compatible with protocol state
1282 * 99 - Information element non-existent or not implemented
1283 * 100 - Conditional IE error
1284 * 101 - Message not compatible with protocol state
1285 * 111 - Protocol error, unspecified
jshca5e3472010-06-23 21:53:24 -07001286 * ((const char **)response)[14] is the Primary Scrambling Code of the current
1287 * cell as described in TS 25.331, in hexadecimal
1288 * format, or NULL if unknown or not registered
1289 * to a UMTS network.
Wink Saville1b5fd232009-04-22 14:50:00 -07001290 *
1291 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001292 * as "out of service" in the Android telephony system
1293 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001294 * Registration state 3 can be returned if Location Update Reject
1295 * (with cause 17 - Network Failure) is received repeatedly from the network,
1296 * to facilitate "managed roaming"
1297 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001298 * Valid errors:
1299 * SUCCESS
1300 * RADIO_NOT_AVAILABLE
1301 * GENERIC_FAILURE
1302 */
Wink Savillec0114b32011-02-18 10:14:07 -08001303#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001304
1305/**
Wink Savillec0114b32011-02-18 10:14:07 -08001306 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001307 *
Wink Savillec0114b32011-02-18 10:14:07 -08001308 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001309 *
1310 * "data" is NULL
1311 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08001312 * ((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 -08001313 * ((const char **)response)[1] is LAC if registered or NULL if not
1314 * ((const char **)response)[2] is CID if registered or NULL if not
Wink Saville43808972011-01-13 17:39:51 -08001315 * ((const char **)response)[3] indicates the available data radio technology,
1316 * valid values as defined by RIL_RadioTechnology.
Wink Savillec0114b32011-02-18 10:14:07 -08001317 * ((const char **)response)[4] if registration state is 3 (Registration
1318 * denied) this is an enumerated reason why
1319 * registration was denied. See 3GPP TS 24.008,
1320 * Annex G.6 "Additonal cause codes for GMM".
1321 * 7 == GPRS services not allowed
1322 * 8 == GPRS services and non-GPRS services not allowed
1323 * 9 == MS identity cannot be derived by the network
1324 * 10 == Implicitly detached
1325 * 14 == GPRS services not allowed in this PLMN
1326 * 16 == MSC temporarily not reachable
1327 * 40 == No PDP context activated
1328 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
1329 * established using RIL_REQUEST_SETUP_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001330 *
1331 * LAC and CID are in hexadecimal format.
1332 * valid LAC are 0x0000 - 0xffff
1333 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07001334 *
1335 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001336 * as "out of service" in the Android telephony system
1337 *
1338 * Valid errors:
1339 * SUCCESS
1340 * RADIO_NOT_AVAILABLE
1341 * GENERIC_FAILURE
1342 */
Wink Savillec0114b32011-02-18 10:14:07 -08001343#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001344
1345/**
1346 * RIL_REQUEST_OPERATOR
1347 *
1348 * Request current operator ONS or EONS
1349 *
1350 * "data" is NULL
1351 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07001352 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001353 * or NULL if unregistered
1354 *
Wink Saville7f856802009-06-09 10:23:37 -07001355 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001356 * or NULL if unregistered
1357 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1358 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07001359 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001360 * Valid errors:
1361 * SUCCESS
1362 * RADIO_NOT_AVAILABLE
1363 * GENERIC_FAILURE
1364 */
1365#define RIL_REQUEST_OPERATOR 22
1366
1367/**
1368 * RIL_REQUEST_RADIO_POWER
1369 *
1370 * Toggle radio on and off (for "airplane" mode)
1371 * "data" is int *
1372 * ((int *)data)[0] is > 0 for "Radio On"
1373 * ((int *)data)[0] is == 0 for "Radio Off"
1374 *
1375 * "response" is NULL
1376 *
1377 * Turn radio on if "on" > 0
1378 * Turn radio off if "on" == 0
1379 *
1380 * Valid errors:
1381 * SUCCESS
1382 * RADIO_NOT_AVAILABLE
1383 * GENERIC_FAILURE
1384 */
1385#define RIL_REQUEST_RADIO_POWER 23
1386
1387/**
1388 * RIL_REQUEST_DTMF
1389 *
1390 * Send a DTMF tone
1391 *
1392 * If the implementation is currently playing a tone requested via
1393 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1394 * should be played instead
1395 *
jsh602f80f2009-07-10 15:44:37 -07001396 * "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 -08001397 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001398 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001399 * FIXME should this block/mute microphone?
1400 * How does this interact with local DTMF feedback?
1401 *
1402 * Valid errors:
1403 * SUCCESS
1404 * RADIO_NOT_AVAILABLE
1405 * GENERIC_FAILURE
1406 *
1407 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1408 *
1409 */
1410#define RIL_REQUEST_DTMF 24
1411
1412/**
1413 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07001414 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001415 * Send an SMS message
1416 *
1417 * "data" is const char **
1418 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1419 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1420 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1421 * less the SMSC address
1422 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1423 *
1424 * "response" is a const RIL_SMS_Response *
1425 *
1426 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001427 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001428 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1429 *
1430 * Valid errors:
1431 * SUCCESS
1432 * RADIO_NOT_AVAILABLE
1433 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07001434 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001435 * GENERIC_FAILURE
1436 *
1437 * FIXME how do we specify TP-Message-Reference if we need to resend?
1438 */
1439#define RIL_REQUEST_SEND_SMS 25
1440
1441
1442/**
1443 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07001444 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001445 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1446 * except that more messages are expected to be sent soon. If possible,
1447 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1448 *
1449 * "data" is const char **
1450 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1451 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1452 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1453 * less the SMSC address
1454 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1455 *
1456 * "response" is a const RIL_SMS_Response *
1457 *
1458 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001459 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001460 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1461 *
1462 * Valid errors:
1463 * SUCCESS
1464 * RADIO_NOT_AVAILABLE
1465 * SMS_SEND_FAIL_RETRY
1466 * GENERIC_FAILURE
1467 *
1468 */
1469#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1470
1471
1472/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001473 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001474 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001475 * Setup a packet data connection
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001476 *
Wink Saville43808972011-01-13 17:39:51 -08001477 * The RIL is expected to:
1478 * - Create one data call context.
1479 * - Create and configure a dedicated interface for the context
1480 * - The interface must be point to point.
1481 * - The interface is configured with one or more addresses and
1482 * is capable of sending and receiving packets. The prefix length
1483 * of the addresses must be /32 for IPv4 and /128 for IPv6.
1484 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08001485 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08001486 * number of simultaneous data call contexts.
1487 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001488 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08001489 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
1490 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07001491 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07001492 * ((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 -07001493 * override the one in the profile. NULL indicates no APN overrride.
1494 * ((const char **)data)[3] is the username for APN, or NULL
1495 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07001496 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
1497 * 0 => PAP and CHAP is never performed.
1498 * 1 => PAP may be performed; CHAP is never performed.
1499 * 2 => CHAP may be performed; PAP is never performed.
1500 * 3 => PAP / CHAP may be performed - baseband dependent.
Wink Savillec0114b32011-02-18 10:14:07 -08001501 * ((const char **)data)[6] is the connection type to request must be one of the
1502 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07001503 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Wink Savillec0114b32011-02-18 10:14:07 -08001504 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001505 *
Wink Savillec0114b32011-02-18 10:14:07 -08001506 * "response" is a RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001507 *
1508 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07001509 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001510 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08001511 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08001512 * the RIL_Data_Call_Response_v6.status containing the actual status.
1513 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08001514 *
1515 * Other errors could include:
1516 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
1517 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001518 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001519 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001520 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001521#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001522
1523
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001524/**
1525 * RIL_REQUEST_SIM_IO
1526 *
1527 * Request SIM I/O operation.
1528 * This is similar to the TS 27.007 "restricted SIM" operation
1529 * where it assumes all of the EF selection will be done by the
1530 * callee.
1531 *
Wink Savillefd729372011-02-22 16:19:39 -08001532 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001533 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1534 * or may specify a PIN2 for operations that require a PIN2 (eg
1535 * updating FDN records)
1536 *
1537 * "response" is a const RIL_SIM_IO_Response *
1538 *
1539 * Arguments and responses that are unused for certain
1540 * values of "command" should be ignored or set to NULL
1541 *
1542 * Valid errors:
1543 * SUCCESS
1544 * RADIO_NOT_AVAILABLE
1545 * GENERIC_FAILURE
1546 * SIM_PIN2
1547 * SIM_PUK2
1548 */
1549#define RIL_REQUEST_SIM_IO 28
1550
1551/**
1552 * RIL_REQUEST_SEND_USSD
1553 *
1554 * Send a USSD message
1555 *
1556 * If a USSD session already exists, the message should be sent in the
1557 * context of that session. Otherwise, a new session should be created.
1558 *
1559 * The network reply should be reported via RIL_UNSOL_ON_USSD
1560 *
1561 * Only one USSD session may exist at a time, and the session is assumed
1562 * to exist until:
1563 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1564 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1565 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1566 *
1567 * "data" is a const char * containing the USSD request in UTF-8 format
1568 * "response" is NULL
1569 *
1570 * Valid errors:
1571 * SUCCESS
1572 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07001573 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001574 * GENERIC_FAILURE
1575 *
1576 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1577 */
1578
1579#define RIL_REQUEST_SEND_USSD 29
1580
1581/**
1582 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07001583 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001584 * Cancel the current USSD session if one exists
1585 *
1586 * "data" is null
1587 * "response" is NULL
1588 *
1589 * Valid errors:
1590 * SUCCESS
1591 * RADIO_NOT_AVAILABLE
Wink Saville7f856802009-06-09 10:23:37 -07001592 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001593 */
1594
1595#define RIL_REQUEST_CANCEL_USSD 30
1596
Wink Saville7f856802009-06-09 10:23:37 -07001597/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001598 * RIL_REQUEST_GET_CLIR
1599 *
1600 * Gets current CLIR status
1601 * "data" is NULL
1602 * "response" is int *
1603 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1604 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
1605 *
1606 * Valid errors:
1607 * SUCCESS
1608 * RADIO_NOT_AVAILABLE
1609 * GENERIC_FAILURE
1610 */
1611#define RIL_REQUEST_GET_CLIR 31
1612
1613/**
1614 * RIL_REQUEST_SET_CLIR
1615 *
1616 * "data" is int *
1617 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1618 *
1619 * "response" is NULL
1620 *
1621 * Valid errors:
1622 * SUCCESS
1623 * RADIO_NOT_AVAILABLE
1624 * GENERIC_FAILURE
1625 */
1626#define RIL_REQUEST_SET_CLIR 32
1627
1628/**
1629 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
1630 *
1631 * "data" is const RIL_CallForwardInfo *
1632 *
1633 * "response" is const RIL_CallForwardInfo **
1634 * "response" points to an array of RIL_CallForwardInfo *'s, one for
1635 * each distinct registered phone number.
1636 *
1637 * For example, if data is forwarded to +18005551212 and voice is forwarded
1638 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07001639 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001640 * If, however, both data and voice are forwarded to +18005551212, then
1641 * a single RIL_CallForwardInfo can be returned with the service class
1642 * set to "data + voice = 3")
1643 *
1644 * Valid errors:
1645 * SUCCESS
1646 * RADIO_NOT_AVAILABLE
1647 * GENERIC_FAILURE
1648 */
1649#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
1650
1651
1652/**
1653 * RIL_REQUEST_SET_CALL_FORWARD
1654 *
1655 * Configure call forward rule
1656 *
1657 * "data" is const RIL_CallForwardInfo *
1658 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001659 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001660 * Valid errors:
1661 * SUCCESS
1662 * RADIO_NOT_AVAILABLE
1663 * GENERIC_FAILURE
1664 */
1665#define RIL_REQUEST_SET_CALL_FORWARD 34
1666
1667
1668/**
1669 * RIL_REQUEST_QUERY_CALL_WAITING
1670 *
1671 * Query current call waiting state
1672 *
1673 * "data" is const int *
1674 * ((const int *)data)[0] is the TS 27.007 service class to query.
1675 * "response" is a const int *
1676 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
1677 *
1678 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
1679 * must follow, with the TS 27.007 service class bit vector of services
1680 * for which call waiting is enabled.
1681 *
Wink Saville7f856802009-06-09 10:23:37 -07001682 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001683 * ((const int *)response)[1] is 3, then call waiting is enabled for data
1684 * and voice and disabled for everything else
1685 *
1686 * Valid errors:
1687 * SUCCESS
1688 * RADIO_NOT_AVAILABLE
1689 * GENERIC_FAILURE
1690 */
1691#define RIL_REQUEST_QUERY_CALL_WAITING 35
1692
1693
1694/**
1695 * RIL_REQUEST_SET_CALL_WAITING
1696 *
1697 * Configure current call waiting state
1698 *
1699 * "data" is const int *
1700 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
1701 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
1702 * services to modify
1703 * "response" is NULL
1704 *
1705 * Valid errors:
1706 * SUCCESS
1707 * RADIO_NOT_AVAILABLE
1708 * GENERIC_FAILURE
1709 */
1710#define RIL_REQUEST_SET_CALL_WAITING 36
1711
1712/**
1713 * RIL_REQUEST_SMS_ACKNOWLEDGE
1714 *
1715 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07001716 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001717 *
1718 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07001719 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001720 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07001721 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001722 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07001723 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
1724 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
1725 * capacity exceeded) and 0xFF (unspecified error) are
1726 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001727 *
1728 * "response" is NULL
1729 *
1730 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
1731 *
1732 * Valid errors:
1733 * SUCCESS
1734 * RADIO_NOT_AVAILABLE
1735 * GENERIC_FAILURE
1736 */
1737#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
1738
1739/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001740 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001741 *
1742 * Get the device IMEI, including check digit
1743 *
johnwangf8bc1672009-05-14 19:19:47 -07001744 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001745 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1746 *
1747 * "data" is NULL
1748 * "response" is a const char * containing the IMEI
1749 *
1750 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001751 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001752 * RADIO_NOT_AVAILABLE (radio resetting)
1753 * GENERIC_FAILURE
1754 */
1755
1756#define RIL_REQUEST_GET_IMEI 38
1757
1758/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001759 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001760 *
1761 * Get the device IMEISV, which should be two decimal digits
1762 *
johnwangf8bc1672009-05-14 19:19:47 -07001763 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001764 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1765 *
1766 * "data" is NULL
1767 * "response" is a const char * containing the IMEISV
1768 *
1769 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001770 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001771 * RADIO_NOT_AVAILABLE (radio resetting)
1772 * GENERIC_FAILURE
1773 */
1774
1775#define RIL_REQUEST_GET_IMEISV 39
1776
1777
1778/**
1779 * RIL_REQUEST_ANSWER
1780 *
1781 * Answer incoming call
1782 *
1783 * Will not be called for WAITING calls.
1784 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
1785 * instead
1786 *
1787 * "data" is NULL
1788 * "response" is NULL
1789 *
1790 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001791 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001792 * RADIO_NOT_AVAILABLE (radio resetting)
1793 * GENERIC_FAILURE
1794 */
1795
1796#define RIL_REQUEST_ANSWER 40
1797
1798/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001799 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001800 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001801 * Deactivate packet data connection
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001802 *
1803 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07001804 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06001805 * ((char**)data)[1] indicating Disconnect Reason
1806 * 0 => No specific reason specified
1807 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07001808 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001809 * "response" is NULL
1810 *
1811 * Valid errors:
1812 * SUCCESS
1813 * RADIO_NOT_AVAILABLE
1814 * GENERIC_FAILURE
1815 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001816 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001817 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001818#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001819
1820/**
1821 * RIL_REQUEST_QUERY_FACILITY_LOCK
1822 *
1823 * Query the status of a facility lock state
1824 *
1825 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07001826 * ((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 -08001827 * (eg "AO" for BAOC, "SC" for SIM lock)
1828 * ((const char **)data)[1] is the password, or "" if not required
1829 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
1830 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08001831 * ((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 -08001832 * This is only applicable in the case of Fixed Dialing Numbers
1833 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001834 *
1835 * "response" is an int *
1836 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07001837 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001838 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07001839 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001840 *
1841 * Valid errors:
1842 * SUCCESS
1843 * RADIO_NOT_AVAILABLE
1844 * GENERIC_FAILURE
1845 *
1846 */
1847#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
1848
1849/**
1850 * RIL_REQUEST_SET_FACILITY_LOCK
1851 *
1852 * Enable/disable one facility lock
1853 *
1854 * "data" is const char **
1855 *
1856 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1857 * (eg "AO" for BAOC)
1858 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
1859 * ((const char **)data)[2] = password
1860 * ((const char **)data)[3] = string representation of decimal TS 27.007
1861 * service class bit vector. Eg, the string
1862 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08001863 * ((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 -08001864 * This is only applicable in the case of Fixed Dialing Numbers
1865 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001866 *
jsh593c9102009-06-24 16:13:44 -07001867 * "response" is int *
1868 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001869 *
1870 * Valid errors:
1871 * SUCCESS
1872 * RADIO_NOT_AVAILABLE
1873 * GENERIC_FAILURE
1874 *
1875 */
1876#define RIL_REQUEST_SET_FACILITY_LOCK 43
1877
1878/**
1879 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
1880 *
1881 * Change call barring facility password
1882 *
1883 * "data" is const char **
1884 *
1885 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1886 * (eg "AO" for BAOC)
1887 * ((const char **)data)[1] = old password
1888 * ((const char **)data)[2] = new password
1889 *
Wink Saville7f856802009-06-09 10:23:37 -07001890 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001891 *
1892 * Valid errors:
1893 * SUCCESS
1894 * RADIO_NOT_AVAILABLE
1895 * GENERIC_FAILURE
1896 *
1897 */
1898#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
1899
1900/**
1901 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
1902 *
1903 * Query current network selectin mode
1904 *
1905 * "data" is NULL
1906 *
1907 * "response" is int *
1908 * ((const int *)response)[0] is
1909 * 0 for automatic selection
1910 * 1 for manual selection
1911 *
1912 * Valid errors:
1913 * SUCCESS
1914 * RADIO_NOT_AVAILABLE
1915 * GENERIC_FAILURE
1916 *
1917 */
1918#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
1919
1920/**
1921 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
1922 *
1923 * Specify that the network should be selected automatically
1924 *
1925 * "data" is NULL
1926 * "response" is NULL
1927 *
Wink Saville7f856802009-06-09 10:23:37 -07001928 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001929 * and registered
1930 *
1931 * Valid errors:
1932 * SUCCESS
1933 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07001934 * ILLEGAL_SIM_OR_ME
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001935 * GENERIC_FAILURE
1936 *
John Wang75534472010-04-20 15:11:42 -07001937 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
1938 * no retries needed, such as illegal SIM or ME.
1939 * Returns GENERIC_FAILURE for all other causes that might be
1940 * fixed by retries.
1941 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001942 */
1943#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
1944
1945/**
1946 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
1947 *
1948 * Manually select a specified network.
1949 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001950 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
1951 * "response" is NULL
1952 *
Wink Saville7f856802009-06-09 10:23:37 -07001953 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001954 * and registered
1955 *
1956 * Valid errors:
1957 * SUCCESS
1958 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07001959 * ILLEGAL_SIM_OR_ME
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001960 * GENERIC_FAILURE
1961 *
John Wang75534472010-04-20 15:11:42 -07001962 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
1963 * no retries needed, such as illegal SIM or ME.
1964 * Returns GENERIC_FAILURE for all other causes that might be
1965 * fixed by retries.
1966 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001967 */
1968#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
1969
1970/**
1971 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
1972 *
1973 * Scans for available networks
1974 *
1975 * "data" is NULL
1976 * "response" is const char ** that should be an array of n*4 strings, where
1977 * n is the number of available networks
1978 * For each available network:
1979 *
Wink Saville7f856802009-06-09 10:23:37 -07001980 * ((const char **)response)[n+0] is long alpha ONS or EONS
1981 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001982 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
1983 * ((const char **)response)[n+3] is a string value of the status:
1984 * "unknown"
1985 * "available"
1986 * "current"
1987 * "forbidden"
1988 *
Wink Saville7f856802009-06-09 10:23:37 -07001989 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001990 * and registered
1991 *
1992 * Valid errors:
1993 * SUCCESS
1994 * RADIO_NOT_AVAILABLE
1995 * GENERIC_FAILURE
1996 *
1997 */
1998#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
1999
2000/**
2001 * RIL_REQUEST_DTMF_START
2002 *
Wink Saville7f856802009-06-09 10:23:37 -07002003 * Start playing a DTMF tone. Continue playing DTMF tone until
2004 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002005 *
2006 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
2007 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07002008 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002009 * "data" is a char *
2010 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
2011 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002012 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002013 * Valid errors:
2014 * SUCCESS
2015 * RADIO_NOT_AVAILABLE
2016 * GENERIC_FAILURE
2017 *
2018 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
2019 */
2020#define RIL_REQUEST_DTMF_START 49
2021
2022/**
2023 * RIL_REQUEST_DTMF_STOP
2024 *
2025 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07002026 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002027 * "data" is NULL
2028 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002029 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002030 * Valid errors:
2031 * SUCCESS
2032 * RADIO_NOT_AVAILABLE
2033 * GENERIC_FAILURE
2034 *
2035 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
2036 */
2037#define RIL_REQUEST_DTMF_STOP 50
2038
2039/**
2040 * RIL_REQUEST_BASEBAND_VERSION
2041 *
2042 * Return string value indicating baseband version, eg
2043 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07002044 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002045 * "data" is NULL
2046 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07002047 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002048 * Valid errors:
2049 * SUCCESS
2050 * RADIO_NOT_AVAILABLE
2051 * GENERIC_FAILURE
2052 *
2053 */
2054#define RIL_REQUEST_BASEBAND_VERSION 51
2055
2056/**
2057 * RIL_REQUEST_SEPARATE_CONNECTION
2058 *
2059 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07002060 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002061 * as the only other member of the current (active) call
2062 *
2063 * Like AT+CHLD=2x
2064 *
2065 * See TS 22.084 1.3.8.2 (iii)
2066 * TS 22.030 6.5.5 "Entering "2X followed by send"
2067 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07002068 *
2069 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002070 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
2071 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002072 * "response" is NULL
2073 *
2074 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002075 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002076 * RADIO_NOT_AVAILABLE (radio resetting)
2077 * GENERIC_FAILURE
2078 */
2079#define RIL_REQUEST_SEPARATE_CONNECTION 52
2080
2081
2082/**
2083 * RIL_REQUEST_SET_MUTE
2084 *
2085 * Turn on or off uplink (microphone) mute.
2086 *
2087 * Will only be sent while voice call is active.
2088 * Will always be reset to "disable mute" when a new voice call is initiated
2089 *
2090 * "data" is an int *
2091 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
2092 *
2093 * "response" is NULL
2094 *
2095 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002096 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002097 * RADIO_NOT_AVAILABLE (radio resetting)
2098 * GENERIC_FAILURE
2099 */
2100
2101#define RIL_REQUEST_SET_MUTE 53
2102
2103/**
2104 * RIL_REQUEST_GET_MUTE
2105 *
2106 * Queries the current state of the uplink mute setting
2107 *
2108 * "data" is NULL
2109 * "response" is an int *
2110 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
2111 *
2112 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002113 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002114 * RADIO_NOT_AVAILABLE (radio resetting)
2115 * GENERIC_FAILURE
2116 */
2117
2118#define RIL_REQUEST_GET_MUTE 54
2119
2120/**
2121 * RIL_REQUEST_QUERY_CLIP
2122 *
2123 * Queries the status of the CLIP supplementary service
2124 *
2125 * (for MMI code "*#30#")
2126 *
2127 * "data" is NULL
2128 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07002129 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002130 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07002131 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002132 *
2133 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002134 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002135 * RADIO_NOT_AVAILABLE (radio resetting)
2136 * GENERIC_FAILURE
2137 */
2138
2139#define RIL_REQUEST_QUERY_CLIP 55
2140
2141/**
Wink Savillec0114b32011-02-18 10:14:07 -08002142 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
2143 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07002144 *
2145 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07002146 * context or CDMA data connection active
2147 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002148 *
2149 * "data" is NULL
2150 *
2151 * "response" is a "int *"
2152 * ((int *)response)[0] is an integer cause code defined in TS 24.008
2153 * section 6.1.3.1.3 or close approximation
2154 *
2155 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07002156 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08002157 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002158 * cases for error notification
2159 * and potential retries.
2160 *
2161 * Valid errors:
2162 * SUCCESS
2163 * RADIO_NOT_AVAILABLE
2164 * GENERIC_FAILURE
2165 *
2166 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08002167 *
2168 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07002169 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002170
Wink Savillef4c4d362009-04-02 01:37:03 -07002171#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002172
2173/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002174 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002175 *
2176 * Queries the status of PDP contexts, returning for each
2177 * its CID, whether or not it is active, and its PDP type,
2178 * APN, and PDP adddress.
Wink Savillef4c4d362009-04-02 01:37:03 -07002179 * replaces RIL_REQUEST_PDP_CONTEXT_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002180 *
2181 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08002182 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002183 *
2184 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002185 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002186 * RADIO_NOT_AVAILABLE (radio resetting)
2187 * GENERIC_FAILURE
2188 */
2189
Wink Savillef4c4d362009-04-02 01:37:03 -07002190#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002191
2192/**
johnwangf8bc1672009-05-14 19:19:47 -07002193 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002194 *
2195 * Request a radio reset. The RIL implementation may postpone
2196 * the reset until after this request is responded to if the baseband
2197 * is presently busy.
2198 *
johnwangf8bc1672009-05-14 19:19:47 -07002199 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
2200 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002201 * "data" is NULL
2202 * "response" is NULL
2203 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002204 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002205 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002206 * RADIO_NOT_AVAILABLE (radio resetting)
2207 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07002208 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002209 */
2210
2211#define RIL_REQUEST_RESET_RADIO 58
2212
2213/**
2214 * RIL_REQUEST_OEM_HOOK_RAW
2215 *
2216 * This request reserved for OEM-specific uses. It passes raw byte arrays
2217 * back and forth.
2218 *
Wink Saville7f856802009-06-09 10:23:37 -07002219 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002220 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
2221 *
2222 * "data" is a char * of bytes copied from the byte[] data argument in java
2223 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07002224 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002225 * (byte[])(((AsyncResult)response.obj).result)
2226 *
Wink Saville7f856802009-06-09 10:23:37 -07002227 * An error response here will result in
2228 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002229 * (((AsyncResult)response.obj).exception) being an instance of
2230 * com.android.internal.telephony.gsm.CommandException
2231 *
2232 * Valid errors:
2233 * All
2234 */
2235
2236#define RIL_REQUEST_OEM_HOOK_RAW 59
2237
2238/**
2239 * RIL_REQUEST_OEM_HOOK_STRINGS
2240 *
2241 * This request reserved for OEM-specific uses. It passes strings
2242 * back and forth.
2243 *
Wink Saville7f856802009-06-09 10:23:37 -07002244 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002245 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
2246 *
2247 * "data" is a const char **, representing an array of null-terminated UTF-8
2248 * strings copied from the "String[] strings" argument to
2249 * invokeOemRilRequestStrings()
2250 *
2251 * "response" is a const char **, representing an array of null-terminated UTF-8
2252 * stings that will be returned via the caller's response message here:
2253 *
2254 * (String[])(((AsyncResult)response.obj).result)
2255 *
Wink Saville7f856802009-06-09 10:23:37 -07002256 * An error response here will result in
2257 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002258 * (((AsyncResult)response.obj).exception) being an instance of
2259 * com.android.internal.telephony.gsm.CommandException
2260 *
2261 * Valid errors:
2262 * All
2263 */
2264
2265#define RIL_REQUEST_OEM_HOOK_STRINGS 60
2266
2267/**
2268 * RIL_REQUEST_SCREEN_STATE
2269 *
2270 * Indicates the current state of the screen. When the screen is off, the
2271 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07002272 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
2273 * in an effort to conserve power. These notifications should resume when the
2274 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002275 *
2276 * "data" is int *
2277 * ((int *)data)[0] is == 1 for "Screen On"
2278 * ((int *)data)[0] is == 0 for "Screen Off"
2279 *
2280 * "response" is NULL
2281 *
2282 * Valid errors:
2283 * SUCCESS
2284 * GENERIC_FAILURE
2285 */
2286#define RIL_REQUEST_SCREEN_STATE 61
2287
2288
2289/**
2290 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
2291 *
2292 * Enables/disables supplementary service related notifications
2293 * from the network.
2294 *
2295 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2296 *
2297 * "data" is int *
2298 * ((int *)data)[0] is == 1 for notifications enabled
2299 * ((int *)data)[0] is == 0 for notifications disabled
2300 *
2301 * "response" is NULL
2302 *
2303 * Valid errors:
2304 * SUCCESS
2305 * RADIO_NOT_AVAILABLE
2306 * GENERIC_FAILURE
2307 *
2308 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2309 */
2310#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2311
2312/**
2313 * RIL_REQUEST_WRITE_SMS_TO_SIM
2314 *
2315 * Stores a SMS message to SIM memory.
2316 *
2317 * "data" is RIL_SMS_WriteArgs *
2318 *
2319 * "response" is int *
2320 * ((const int *)response)[0] is the record index where the message is stored.
2321 *
2322 * Valid errors:
2323 * SUCCESS
2324 * GENERIC_FAILURE
2325 *
2326 */
2327#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2328
2329/**
2330 * RIL_REQUEST_DELETE_SMS_ON_SIM
2331 *
2332 * Deletes a SMS message from SIM memory.
2333 *
2334 * "data" is int *
2335 * ((int *)data)[0] is the record index of the message to delete.
2336 *
2337 * "response" is NULL
2338 *
2339 * Valid errors:
2340 * SUCCESS
2341 * GENERIC_FAILURE
2342 *
2343 */
2344#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2345
2346/**
2347 * RIL_REQUEST_SET_BAND_MODE
2348 *
2349 * Assign a specified band for RF configuration.
2350 *
2351 * "data" is int *
2352 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2353 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2354 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2355 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2356 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2357 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002358 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2359 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2360 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2361 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2362 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2363 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2364 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2365 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2366 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2367 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2368 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2369 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2370 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002371 *
2372 * "response" is NULL
2373 *
2374 * Valid errors:
2375 * SUCCESS
2376 * RADIO_NOT_AVAILABLE
2377 * GENERIC_FAILURE
2378 */
2379#define RIL_REQUEST_SET_BAND_MODE 65
2380
2381/**
2382 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2383 *
2384 * Query the list of band mode supported by RF.
2385 *
2386 * "data" is NULL
2387 *
2388 * "response" is int *
2389 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2390 * each available band mode.
2391 *
2392 * 0 for "unspecified" (selected by baseband automatically)
2393 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2394 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2395 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2396 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2397 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002398 * 6 for "Cellular (800-MHz Band)"
2399 * 7 for "PCS (1900-MHz Band)"
2400 * 8 for "Band Class 3 (JTACS Band)"
2401 * 9 for "Band Class 4 (Korean PCS Band)"
2402 * 10 for "Band Class 5 (450-MHz Band)"
2403 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2404 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2405 * 13 for "Band Class 8 (1800-MHz Band)"
2406 * 14 for "Band Class 9 (900-MHz Band)"
2407 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2408 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2409 * 17 for "Band Class 15 (AWS Band)"
2410 * 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002411 *
2412 * Valid errors:
2413 * SUCCESS
2414 * RADIO_NOT_AVAILABLE
2415 * GENERIC_FAILURE
2416 *
2417 * See also: RIL_REQUEST_SET_BAND_MODE
2418 */
2419#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2420
2421/**
2422 * RIL_REQUEST_STK_GET_PROFILE
2423 *
2424 * Requests the profile of SIM tool kit.
2425 * The profile indicates the SAT/USAT features supported by ME.
2426 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2427 *
2428 * "data" is NULL
2429 *
2430 * "response" is a const char * containing SAT/USAT profile
2431 * in hexadecimal format string starting with first byte of terminal profile
2432 *
2433 * Valid errors:
2434 * RIL_E_SUCCESS
2435 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2436 * RIL_E_GENERIC_FAILURE
2437 */
2438#define RIL_REQUEST_STK_GET_PROFILE 67
2439
2440/**
2441 * RIL_REQUEST_STK_SET_PROFILE
2442 *
2443 * Download the STK terminal profile as part of SIM initialization
2444 * procedure
2445 *
2446 * "data" is a const char * containing SAT/USAT profile
2447 * in hexadecimal format string starting with first byte of terminal profile
2448 *
2449 * "response" is NULL
2450 *
2451 * Valid errors:
2452 * RIL_E_SUCCESS
2453 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2454 * RIL_E_GENERIC_FAILURE
2455 */
2456#define RIL_REQUEST_STK_SET_PROFILE 68
2457
2458/**
2459 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2460 *
2461 * Requests to send a SAT/USAT envelope command to SIM.
2462 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2463 *
2464 * "data" is a const char * containing SAT/USAT command
2465 * in hexadecimal format string starting with command tag
2466 *
2467 * "response" is a const char * containing SAT/USAT response
2468 * in hexadecimal format string starting with first byte of response
2469 * (May be NULL)
2470 *
2471 * Valid errors:
2472 * RIL_E_SUCCESS
2473 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2474 * RIL_E_GENERIC_FAILURE
2475 */
2476#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2477
2478/**
2479 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2480 *
2481 * Requests to send a terminal response to SIM for a received
2482 * proactive command
2483 *
2484 * "data" is a const char * containing SAT/USAT response
2485 * in hexadecimal format string starting with first byte of response data
2486 *
2487 * "response" is NULL
2488 *
2489 * Valid errors:
2490 * RIL_E_SUCCESS
2491 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2492 * RIL_E_GENERIC_FAILURE
2493 */
2494#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
2495
2496/**
2497 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
2498 *
2499 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
2500 * been initialized by ME already. (We could see the call has been in the 'call
2501 * list') So, STK application needs to accept/reject the call according as user
2502 * operations.
2503 *
2504 * "data" is int *
2505 * ((int *)data)[0] is > 0 for "accept" the call setup
2506 * ((int *)data)[0] is == 0 for "reject" the call setup
2507 *
2508 * "response" is NULL
2509 *
2510 * Valid errors:
2511 * RIL_E_SUCCESS
2512 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2513 * RIL_E_GENERIC_FAILURE
2514 */
2515#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
2516
2517/**
2518 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
2519 *
2520 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07002521 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002522 * "data" is NULL
2523 * "response" is NULL
2524 *
2525 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002526 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002527 * RADIO_NOT_AVAILABLE (radio resetting)
2528 * GENERIC_FAILURE
2529 */
2530#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
2531
2532/**
2533 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2534 *
2535 * Requests to set the preferred network type for searching and registering
2536 * (CS/PS domain, RAT, and operation mode)
2537 *
Wink Savillec0114b32011-02-18 10:14:07 -08002538 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002539 *
2540 * "response" is NULL
2541 *
2542 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07002543 * SUCCESS
2544 * RADIO_NOT_AVAILABLE (radio resetting)
2545 * GENERIC_FAILURE
2546 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002547 */
2548#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2549
2550/**
2551 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2552 *
2553 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2554 * for searching and registering
2555 *
2556 * "data" is NULL
2557 *
2558 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08002559 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002560 *
2561 * Valid errors:
2562 * SUCCESS
2563 * RADIO_NOT_AVAILABLE
2564 * GENERIC_FAILURE
2565 *
2566 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2567 */
2568#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2569
2570/**
2571 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2572 *
2573 * Request neighboring cell id in GSM network
2574 *
2575 * "data" is NULL
2576 * "response" must be a " const RIL_NeighboringCell** "
2577 *
2578 * Valid errors:
2579 * SUCCESS
2580 * RADIO_NOT_AVAILABLE
2581 * GENERIC_FAILURE
2582 */
2583#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
2584
2585/**
2586 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07002587 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002588 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07002589 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
2590 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002591 *
2592 * Note: The RIL implementation should default to "updates enabled"
2593 * when the screen is on and "updates disabled" when the screen is off.
2594 *
2595 * "data" is int *
2596 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
2597 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
2598 *
2599 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07002600 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002601 * Valid errors:
2602 * SUCCESS
2603 * RADIO_NOT_AVAILABLE
2604 * GENERIC_FAILURE
2605 *
2606 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2607 */
2608#define RIL_REQUEST_SET_LOCATION_UPDATES 76
2609
Wink Savillef4c4d362009-04-02 01:37:03 -07002610/**
Wink Savillec0114b32011-02-18 10:14:07 -08002611 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07002612 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002613 * Request to set the location where the CDMA subscription shall
2614 * be retrieved
2615 *
2616 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08002617 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07002618 *
2619 * "response" is NULL
2620 *
2621 * Valid errors:
2622 * SUCCESS
2623 * RADIO_NOT_AVAILABLE
2624 * GENERIC_FAILURE
2625 * SIM_ABSENT
2626 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08002627 *
2628 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07002629 */
Wink Savillec0114b32011-02-18 10:14:07 -08002630#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07002631
2632/**
2633 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07002634 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002635 * Request to set the roaming preferences in CDMA
2636 *
2637 * "data" is int *
2638 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
2639 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2640 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07002641 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002642 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002643 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002644 * Valid errors:
2645 * SUCCESS
2646 * RADIO_NOT_AVAILABLE
2647 * GENERIC_FAILURE
2648 */
2649#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
2650
2651/**
2652 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07002653 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002654 * Request the actual setting of the roaming preferences in CDMA in the modem
2655 *
2656 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002657 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002658 * "response" is int *
2659 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
2660 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2661 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07002662 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002663 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002664 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002665 * Valid errors:
2666 * SUCCESS
2667 * RADIO_NOT_AVAILABLE
2668 * GENERIC_FAILURE
2669 */
2670#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
2671
2672/**
2673 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002674 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002675 * Request to set the TTY mode
2676 *
2677 * "data" is int *
2678 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07002679 * ((int *)data)[0] is == 1 for TTY Full
2680 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
2681 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07002682 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002683 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002684 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002685 * Valid errors:
2686 * SUCCESS
2687 * RADIO_NOT_AVAILABLE
2688 * GENERIC_FAILURE
2689 */
2690#define RIL_REQUEST_SET_TTY_MODE 80
2691
2692/**
2693 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002694 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002695 * Request the setting of TTY mode
2696 *
2697 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002698 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002699 * "response" is int *
2700 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07002701 * ((int *)response)[0] is == 1 for TTY Full
2702 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
2703 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07002704 *
2705 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002706 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002707 * Valid errors:
2708 * SUCCESS
2709 * RADIO_NOT_AVAILABLE
2710 * GENERIC_FAILURE
2711 */
2712#define RIL_REQUEST_QUERY_TTY_MODE 81
2713
2714/**
2715 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
2716 *
2717 * Request to set the preferred voice privacy mode used in voice
2718 * scrambling
2719 *
2720 * "data" is int *
2721 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2722 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07002723 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002724 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002725 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002726 * Valid errors:
2727 * SUCCESS
2728 * RADIO_NOT_AVAILABLE
2729 * GENERIC_FAILURE
2730 */
2731#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
2732
2733/**
2734 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002735 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002736 * Request the setting of preferred voice privacy mode
2737 *
2738 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002739 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002740 * "response" is int *
2741 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2742 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07002743 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002744 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002745 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002746 * Valid errors:
2747 * SUCCESS
2748 * RADIO_NOT_AVAILABLE
2749 * GENERIC_FAILURE
2750 */
2751#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
2752
2753/**
2754 * RIL_REQUEST_CDMA_FLASH
2755 *
2756 * Send FLASH
2757 *
2758 * "data" is const char *
2759 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07002760 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002761 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002762 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002763 * Valid errors:
2764 * SUCCESS
2765 * RADIO_NOT_AVAILABLE
2766 * GENERIC_FAILURE
2767 *
2768 */
2769#define RIL_REQUEST_CDMA_FLASH 84
2770
2771/**
2772 * RIL_REQUEST_CDMA_BURST_DTMF
2773 *
2774 * Send DTMF string
2775 *
jsh602f80f2009-07-10 15:44:37 -07002776 * "data" is const char **
2777 * ((const char **)data)[0] is a DTMF string
2778 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
2779 * default
2780 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
2781 * default
Wink Saville7f856802009-06-09 10:23:37 -07002782 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002783 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002784 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002785 * Valid errors:
2786 * SUCCESS
2787 * RADIO_NOT_AVAILABLE
2788 * GENERIC_FAILURE
2789 *
2790 */
2791#define RIL_REQUEST_CDMA_BURST_DTMF 85
2792
2793/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002794 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07002795 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002796 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
2797 * If the checksum is valid the 20 digit AKEY is written to NV,
2798 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07002799 *
2800 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002801 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
2802 * where the last 6 digits are a checksum of the
2803 * first 20, as specified in TR45.AHAG
2804 * "Common Cryptographic Algorithms, Revision D.1
2805 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07002806 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002807 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002808 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002809 * Valid errors:
2810 * SUCCESS
2811 * RADIO_NOT_AVAILABLE
2812 * GENERIC_FAILURE
2813 *
2814 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002815#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07002816
2817/**
2818 * RIL_REQUEST_CDMA_SEND_SMS
2819 *
2820 * Send a CDMA SMS message
2821 *
2822 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07002823 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002824 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07002825 *
johnwangbfb151b2009-09-11 15:20:38 -07002826 * Based on the return error, caller decides to resend if sending sms
2827 * fails. The CDMA error class is derived as follows,
2828 * SUCCESS is error class 0 (no error)
2829 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
2830 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
2831 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002832 * Valid errors:
2833 * SUCCESS
2834 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07002835 * SMS_SEND_FAIL_RETRY
Wink Savillef4c4d362009-04-02 01:37:03 -07002836 * GENERIC_FAILURE
2837 *
2838 */
2839#define RIL_REQUEST_CDMA_SEND_SMS 87
2840
2841/**
2842 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
2843 *
2844 * Acknowledge the success or failure in the receipt of SMS
2845 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
2846 *
2847 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07002848 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002849 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002850 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002851 * Valid errors:
2852 * SUCCESS
2853 * RADIO_NOT_AVAILABLE
2854 * GENERIC_FAILURE
2855 *
2856 */
2857#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
2858
2859/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002860 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002861 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002862 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
2863 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002864 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002865 *
2866 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
2867 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
2868 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002869 * Valid errors:
2870 * SUCCESS
2871 * RADIO_NOT_AVAILABLE
2872 * GENERIC_FAILURE
2873 *
2874 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002875#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07002876
2877/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002878 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002879 *
2880 * Set GSM/WCDMA Cell Broadcast SMS config
2881 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002882 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
2883 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
2884 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002885 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002886 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002887 * Valid errors:
2888 * SUCCESS
2889 * RADIO_NOT_AVAILABLE
2890 * GENERIC_FAILURE
2891 *
2892 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002893#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07002894
2895/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002896 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07002897 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002898* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07002899 *
2900 * "data" is const int *
2901 * (const int *)data[0] indicates to activate or turn off the
2902 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
2903 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07002904 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002905 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002906 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002907 * Valid errors:
2908 * SUCCESS
2909 * RADIO_NOT_AVAILABLE
2910 * GENERIC_FAILURE
2911 *
2912 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002913#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07002914
2915/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002916 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002917 *
2918 * Request the setting of CDMA Broadcast SMS config
2919 *
2920 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002921 *
2922 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
2923 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
2924 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002925 * Valid errors:
2926 * SUCCESS
2927 * RADIO_NOT_AVAILABLE
2928 * GENERIC_FAILURE
2929 *
2930 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002931#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07002932
2933/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002934 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002935 *
2936 * Set CDMA Broadcast SMS config
2937 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002938 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
2939 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
2940 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002941 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002942 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002943 * Valid errors:
2944 * SUCCESS
2945 * RADIO_NOT_AVAILABLE
2946 * GENERIC_FAILURE
2947 *
2948 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002949#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07002950
2951/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002952 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07002953 *
2954 * Enable or disable the reception of CDMA Broadcast SMS
2955 *
2956 * "data" is const int *
2957 * (const int *)data[0] indicates to activate or turn off the
2958 * reception of CDMA Broadcast SMS, 0-1,
2959 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07002960 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002961 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002962 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002963 * Valid errors:
2964 * SUCCESS
2965 * RADIO_NOT_AVAILABLE
2966 * GENERIC_FAILURE
2967 *
2968 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002969#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07002970
2971/**
2972 * RIL_REQUEST_CDMA_SUBSCRIPTION
2973 *
2974 * Request the device MDN / H_SID / H_NID.
2975 *
2976 * The request is only allowed when CDMA subscription is available. When CDMA
2977 * subscription is changed, application layer should re-issue the request to
2978 * update the subscription information.
2979 *
2980 * If a NULL value is returned for any of the device id, it means that error
2981 * accessing the device.
2982 *
2983 * "response" is const char **
2984 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07002985 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
2986 * CDMA subscription is available, in decimal format
2987 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
2988 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07002989 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07002990 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07002991 *
2992 * Valid errors:
2993 * SUCCESS
2994 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
2995 */
2996
Wink Savilleeafe79d2009-04-03 18:02:34 -07002997#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07002998
2999/**
3000 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
3001 *
3002 * Stores a CDMA SMS message to RUIM memory.
3003 *
3004 * "data" is RIL_CDMA_SMS_WriteArgs *
3005 *
3006 * "response" is int *
3007 * ((const int *)response)[0] is the record index where the message is stored.
3008 *
3009 * Valid errors:
3010 * SUCCESS
3011 * RADIO_NOT_AVAILABLE
3012 * GENERIC_FAILURE
3013 *
3014 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003015#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07003016
3017/**
3018 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
3019 *
3020 * Deletes a CDMA SMS message from RUIM memory.
3021 *
3022 * "data" is int *
3023 * ((int *)data)[0] is the record index of the message to delete.
3024 *
3025 * "response" is NULL
3026 *
3027 * Valid errors:
3028 * SUCCESS
3029 * RADIO_NOT_AVAILABLE
3030 * GENERIC_FAILURE
3031 *
3032 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003033#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07003034
3035/**
3036 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07003037 *
3038 * Request the device ESN / MEID / IMEI / IMEISV.
3039 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003040 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07003041 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07003042 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003043 *
3044 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07003045 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003046 *
3047 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07003048 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003049 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003050 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07003051 * ((const char **)response)[0] is IMEI if GSM subscription is available
3052 * ((const char **)response)[1] is IMEISV if GSM subscription is available
3053 * ((const char **)response)[2] is ESN if CDMA subscription is available
3054 * ((const char **)response)[3] is MEID if CDMA subscription is available
3055 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003056 * Valid errors:
3057 * SUCCESS
3058 * RADIO_NOT_AVAILABLE
3059 * GENERIC_FAILURE
3060 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003061#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07003062
Wink Saville1b5fd232009-04-22 14:50:00 -07003063/**
3064 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
3065 *
3066 * Request the radio's system selection module to exit emergency
3067 * callback mode. RIL will not respond with SUCCESS until the modem has
3068 * completely exited from Emergency Callback Mode.
3069 *
3070 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003071 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003072 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003073 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003074 * Valid errors:
3075 * SUCCESS
3076 * RADIO_NOT_AVAILABLE
3077 * GENERIC_FAILURE
3078 *
3079 */
3080#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07003081
jsh000a9fe2009-05-11 14:52:35 -07003082/**
3083 * RIL_REQUEST_GET_SMSC_ADDRESS
3084 *
3085 * Queries the default Short Message Service Center address on the device.
3086 *
3087 * "data" is NULL
3088 *
3089 * "response" is const char * containing the SMSC address.
3090 *
3091 * Valid errors:
3092 * SUCCESS
3093 * RADIO_NOT_AVAILABLE
3094 * GENERIC_FAILURE
3095 *
3096 */
3097#define RIL_REQUEST_GET_SMSC_ADDRESS 100
3098
3099/**
3100 * RIL_REQUEST_SET_SMSC_ADDRESS
3101 *
3102 * Sets the default Short Message Service Center address on the device.
3103 *
3104 * "data" is const char * containing the SMSC address.
3105 *
3106 * "response" is NULL
3107 *
3108 * Valid errors:
3109 * SUCCESS
3110 * RADIO_NOT_AVAILABLE
3111 * GENERIC_FAILURE
3112 *
3113 */
3114#define RIL_REQUEST_SET_SMSC_ADDRESS 101
3115
jshb60444e2009-05-29 11:09:17 -07003116/**
3117 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
3118 *
3119 * Indicates whether there is storage available for new SMS messages.
3120 *
3121 * "data" is int *
3122 * ((int *)data)[0] is 1 if memory is available for storing new messages
3123 * is 0 if memory capacity is exceeded
3124 *
3125 * "response" is NULL
3126 *
3127 * Valid errors:
3128 * SUCCESS
3129 * RADIO_NOT_AVAILABLE
3130 * GENERIC_FAILURE
3131 *
3132 */
3133#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
3134
Wink Saville2641d5b2009-06-08 17:40:42 -07003135/**
3136 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
3137 *
3138 * Indicates that the StkSerivce is running and is
3139 * ready to receive RIL_UNSOL_STK_XXXXX commands.
3140 *
3141 * "data" is NULL
3142 * "response" is NULL
3143 *
3144 * Valid errors:
3145 * SUCCESS
3146 * RADIO_NOT_AVAILABLE
3147 * GENERIC_FAILURE
3148 *
3149 */
3150#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
3151
Wink Savillec0114b32011-02-18 10:14:07 -08003152/**
3153 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3154 *
3155 * Request to query the location where the CDMA subscription shall
3156 * be retrieved
3157 *
3158 * "data" is NULL
3159 *
3160 * "response" is int *
3161 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3162 *
3163 * Valid errors:
3164 * SUCCESS
3165 * RADIO_NOT_AVAILABLE
3166 * GENERIC_FAILURE
3167 * SUBSCRIPTION_NOT_AVAILABLE
3168 *
3169 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
3170 */
3171#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
3172
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003173/***********************************************************************/
3174
Wink Savillef4c4d362009-04-02 01:37:03 -07003175
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003176#define RIL_UNSOL_RESPONSE_BASE 1000
3177
3178/**
3179 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3180 *
3181 * Indicate when value of RIL_RadioState has changed.
3182 *
3183 * Callee will invoke RIL_RadioStateRequest method on main thread
3184 *
3185 * "data" is NULL
3186 */
3187
3188#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
3189
3190
3191/**
3192 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
3193 *
3194 * Indicate when call state has changed
3195 *
3196 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
3197 *
3198 * "data" is NULL
3199 *
Wink Saville7f856802009-06-09 10:23:37 -07003200 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003201 * "RING", "BUSY", "NO CARRIER", and also call state
3202 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
3203 *
3204 * Redundent or extraneous invocations are tolerated
3205 */
3206#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
3207
3208
3209/**
Wink Savillec0114b32011-02-18 10:14:07 -08003210 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003211 *
Wink Savillec0114b32011-02-18 10:14:07 -08003212 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003213 *
3214 * Callee will invoke the following requests on main thread:
3215 *
Wink Savillec0114b32011-02-18 10:14:07 -08003216 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003217 * RIL_REQUEST_OPERATOR
3218 *
3219 * "data" is NULL
3220 *
3221 * FIXME should this happen when SIM records are loaded? (eg, for
3222 * EONS)
3223 */
Wink Savillec0114b32011-02-18 10:14:07 -08003224#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003225
3226/**
3227 * RIL_UNSOL_RESPONSE_NEW_SMS
3228 *
3229 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07003230 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003231 * "data" is const char *
3232 * This is a pointer to a string containing the PDU of an SMS-DELIVER
3233 * as an ascii string of hex digits. The PDU starts with the SMSC address
3234 * per TS 27.005 (+CMT:)
3235 *
3236 * Callee will subsequently confirm the receipt of thei SMS with a
3237 * RIL_REQUEST_SMS_ACKNOWLEDGE
3238 *
Wink Saville7f856802009-06-09 10:23:37 -07003239 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003240 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3241 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3242 */
3243
3244#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
3245
3246/**
3247 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
3248 *
3249 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07003250 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003251 * "data" is const char *
3252 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
3253 * as an ascii string of hex digits. The PDU starts with the SMSC address
3254 * per TS 27.005 (+CDS:).
3255 *
3256 * Callee will subsequently confirm the receipt of the SMS with a
3257 * RIL_REQUEST_SMS_ACKNOWLEDGE
3258 *
Wink Saville7f856802009-06-09 10:23:37 -07003259 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003260 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3261 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3262 */
3263
3264#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
3265
3266/**
3267 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
3268 *
3269 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07003270 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003271 * "data" is const int *
3272 * ((const int *)data)[0] contains the slot index on the SIM that contains
3273 * the new message
3274 */
3275
3276#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
3277
3278/**
3279 * RIL_UNSOL_ON_USSD
3280 *
3281 * Called when a new USSD message is received.
3282 *
3283 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07003284 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003285 * one of these string values:
3286 * "0" USSD-Notify -- text in ((const char **)data)[1]
3287 * "1" USSD-Request -- text in ((const char **)data)[1]
3288 * "2" Session terminated by network
3289 * "3" other local client (eg, SIM Toolkit) has responded
3290 * "4" Operation not supported
3291 * "5" Network timeout
3292 *
3293 * The USSD session is assumed to persist if the type code is "1", otherwise
3294 * the current session (if any) is assumed to have terminated.
3295 *
3296 * ((const char **)data)[1] points to a message string if applicable, which
3297 * should always be in UTF-8.
3298 */
3299#define RIL_UNSOL_ON_USSD 1006
3300/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
3301
3302/**
3303 * RIL_UNSOL_ON_USSD_REQUEST
3304 *
3305 * Obsolete. Send via RIL_UNSOL_ON_USSD
3306 */
Wink Saville7f856802009-06-09 10:23:37 -07003307#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003308
3309
3310/**
3311 * RIL_UNSOL_NITZ_TIME_RECEIVED
3312 *
3313 * Called when radio has received a NITZ time message
3314 *
3315 * "data" is const char * pointing to NITZ time string
3316 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
3317 */
3318#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
3319
3320/**
3321 * RIL_UNSOL_SIGNAL_STRENGTH
3322 *
3323 * Radio may report signal strength rather han have it polled.
3324 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003325 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003326 */
3327#define RIL_UNSOL_SIGNAL_STRENGTH 1009
3328
3329
3330/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003331 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003332 *
3333 * Indicate a PDP context state has changed, or a new context
3334 * has been activated or deactivated
Wink Savillef4c4d362009-04-02 01:37:03 -07003335 * replaces RIL_UNSOL_PDP_CONTEXT_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003336 *
Wink Savillec0114b32011-02-18 10:14:07 -08003337 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Savillef4c4d362009-04-02 01:37:03 -07003338 * returned by RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003339 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003340 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003341 */
3342
Wink Savillef4c4d362009-04-02 01:37:03 -07003343#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003344
3345/**
3346 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
3347 *
3348 * Reports supplementary service related notification from the network.
3349 *
3350 * "data" is a const RIL_SuppSvcNotification *
3351 *
3352 */
3353
3354#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
3355
3356/**
3357 * RIL_UNSOL_STK_SESSION_END
3358 *
3359 * Indicate when STK session is terminated by SIM.
3360 *
3361 * "data" is NULL
3362 */
3363#define RIL_UNSOL_STK_SESSION_END 1012
3364
3365/**
3366 * RIL_UNSOL_STK_PROACTIVE_COMMAND
3367 *
3368 * Indicate when SIM issue a STK proactive command to applications
3369 *
3370 * "data" is a const char * containing SAT/USAT proactive command
3371 * in hexadecimal format string starting with command tag
3372 *
3373 */
3374#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
3375
3376/**
3377 * RIL_UNSOL_STK_EVENT_NOTIFY
3378 *
3379 * Indicate when SIM notifies applcations some event happens.
3380 * Generally, application does not need to have any feedback to
3381 * SIM but shall be able to indicate appropriate messages to users.
3382 *
3383 * "data" is a const char * containing SAT/USAT commands or responses
3384 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
3385 * starting with first byte of response data or command tag
3386 *
3387 */
3388#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
3389
3390/**
3391 * RIL_UNSOL_STK_CALL_SETUP
3392 *
3393 * Indicate when SIM wants application to setup a voice call.
3394 *
3395 * "data" is const int *
3396 * ((const int *)data)[0] contains timeout value (in milliseconds)
3397 */
3398#define RIL_UNSOL_STK_CALL_SETUP 1015
3399
3400/**
3401 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
3402 *
3403 * Indicates that SMS storage on the SIM is full. Sent when the network
3404 * attempts to deliver a new SMS message. Messages cannot be saved on the
3405 * SIM until space is freed. In particular, incoming Class 2 messages
3406 * cannot be stored.
3407 *
3408 * "data" is null
3409 *
3410 */
3411#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
3412
3413/**
3414 * RIL_UNSOL_SIM_REFRESH
3415 *
3416 * Indicates that file(s) on the SIM have been updated, or the SIM
3417 * has been reinitialized.
3418 *
3419 * "data" is an int *
3420 * ((int *)data)[0] is a RIL_SimRefreshResult.
3421 * ((int *)data)[1] is the EFID of the updated file if the result is
Wink Savillec0114b32011-02-18 10:14:07 -08003422 * SIM_FILE_UPDATE, AID(application ID) of the card application
3423 * triggering the REFRESH if the result is SIM_INIT, or NULL for any other result.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003424 *
3425 * Note: If the radio state changes as a result of the SIM refresh (eg,
3426 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3427 * should be sent.
3428 */
3429#define RIL_UNSOL_SIM_REFRESH 1017
3430
3431/**
3432 * RIL_UNSOL_CALL_RING
3433 *
3434 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07003435 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
3436 * of a call and sending multiple is optional. If the system property
3437 * ro.telephony.call_ring.multiple is false then the upper layers
3438 * will generate the multiple events internally. Otherwise the vendor
3439 * ril must generate multiple RIL_UNSOL_CALL_RING if
3440 * ro.telephony.call_ring.multiple is true or if it is absent.
3441 *
3442 * The rate of these events is controlled by ro.telephony.call_ring.delay
3443 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003444 *
Wink Saville3d54e742009-05-18 18:00:44 -07003445 * "data" is null for GSM
3446 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003447 */
3448#define RIL_UNSOL_CALL_RING 1018
3449
The Android Open Source Project34a51082009-03-05 14:34:37 -08003450/**
3451 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
3452 *
3453 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07003454 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003455 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07003456
The Android Open Source Project34a51082009-03-05 14:34:37 -08003457 * "data" is null
3458 */
3459#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
3460
3461/**
3462 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3463 *
3464 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07003465 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003466 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07003467 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003468 * Callee will subsequently confirm the receipt of the SMS with
3469 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07003470 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003471 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
3472 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07003473 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003474 */
3475#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
3476
3477/**
3478 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
3479 *
3480 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07003481 *
Henrik Hall0eba2022010-11-25 10:20:56 +01003482 * "data" can be one of the following:
3483 * If received from GSM network, "data" is const char of 88 bytes
3484 * which indicates each page of a CBS Message sent to the MS by the
3485 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
3486 * If received from UMTS network, "data" is const char of 90 up to 1252
3487 * bytes which contain between 1 and 15 CBS Message pages sent as one
3488 * 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 -07003489 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003490 */
3491#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07003492
The Android Open Source Project34a51082009-03-05 14:34:37 -08003493/**
3494 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
3495 *
3496 * Indicates that SMS storage on the RUIM is full. Messages
3497 * cannot be saved on the RUIM until space is freed.
3498 *
3499 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07003500 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003501 */
Wink Savillef4c4d362009-04-02 01:37:03 -07003502#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
3503
The Android Open Source Project34a51082009-03-05 14:34:37 -08003504/**
3505 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
3506 *
3507 * Indicates a restricted state change (eg, for Domain Specific Access Control).
3508 *
3509 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
3510 *
3511 * "data" is an int *
3512 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
3513 */
3514#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
3515
Wink Saville1b5fd232009-04-22 14:50:00 -07003516/**
3517 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
3518 *
3519 * Indicates that the radio system selection module has
3520 * autonomously entered emergency callback mode.
3521 *
3522 * "data" is null
3523 *
3524 */
3525#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08003526
Wink Saville1b5fd232009-04-22 14:50:00 -07003527/**
3528 * RIL_UNSOL_CDMA_CALL_WAITING
3529 *
3530 * Called when CDMA radio receives a call waiting indication.
3531 *
3532 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07003533 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003534 */
3535#define RIL_UNSOL_CDMA_CALL_WAITING 1025
3536
3537/**
3538 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
3539 *
3540 * Called when CDMA radio receives an update of the progress of an
3541 * OTASP/OTAPA call.
3542 *
3543 * "data" is const int *
3544 * For CDMA this is an integer OTASP/OTAPA status listed in
3545 * RIL_CDMA_OTA_ProvisionStatus.
3546 *
3547 */
3548#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
3549
3550/**
3551 * RIL_UNSOL_CDMA_INFO_REC
3552 *
3553 * Called when CDMA radio receives one or more info recs.
3554 *
3555 * "data" is const RIL_CDMA_InformationRecords *
3556 *
3557 */
3558#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08003559
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07003560/**
3561 * RIL_UNSOL_OEM_HOOK_RAW
3562 *
3563 * This is for OEM specific use.
3564 *
3565 * "data" is a byte[]
3566 */
3567#define RIL_UNSOL_OEM_HOOK_RAW 1028
3568
John Wang5d621da2009-09-18 17:17:48 -07003569/**
3570 * RIL_UNSOL_RINGBACK_TONE
3571 *
3572 * Indicates that nework doesn't have in-band information, need to
3573 * play out-band tone.
3574 *
3575 * "data" is an int *
3576 * ((int *)data)[0] == 0 for stop play ringback tone.
3577 * ((int *)data)[0] == 1 for start play ringback tone.
3578 */
3579#define RIL_UNSOL_RINGBACK_TONE 1029
3580
John Wang5909cf82010-01-29 00:18:54 -08003581/**
3582 * RIL_UNSOL_RESEND_INCALL_MUTE
3583 *
3584 * Indicates that framework/application need reset the uplink mute state.
3585 *
3586 * There may be situations where the mute state becomes out of sync
3587 * between the application and device in some GSM infrastructures.
3588 *
3589 * "data" is null
3590 */
3591#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08003592
3593/**
3594 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
3595 *
3596 * Called when CDMA subscription source changed.
3597 *
3598 * "data" is int *
3599 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3600 */
3601#define RIL_UNSOL_CDMA_SUBSCRIPTION_CHANGED 1031
3602
3603/**
3604 * RIL_UNSOL_CDMA_PRL_CHANGED
3605 *
3606 * Called when PRL (preferred roaming list) changes.
3607 *
3608 * "data" is int *
3609 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
3610 */
3611#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
3612
3613/**
3614 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
3615 *
3616 * Called when Emergency Callback Mode Ends
3617 *
3618 * Indicates that the radio system selection module has
3619 * proactively exited emergency callback mode.
3620 *
3621 * "data" is NULL
3622 *
3623 */
3624#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
3625
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003626/***********************************************************************/
3627
3628
3629/**
3630 * RIL_Request Function pointer
3631 *
3632 * @param request is one of RIL_REQUEST_*
3633 * @param data is pointer to data defined for that RIL_REQUEST_*
3634 * data is owned by caller, and should not be modified or freed by callee
3635 * @param t should be used in subsequent call to RIL_onResponse
3636 * @param datalen the length of data
3637 *
3638 */
Wink Saville7f856802009-06-09 10:23:37 -07003639typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003640 size_t datalen, RIL_Token t);
3641
3642/**
3643 * This function should return the current radio state synchronously
3644 */
3645typedef RIL_RadioState (*RIL_RadioStateRequest)();
3646
3647/**
3648 * This function returns "1" if the specified RIL_REQUEST code is
3649 * supported and 0 if it is not
3650 *
3651 * @param requestCode is one of RIL_REQUEST codes
3652 */
3653
3654typedef int (*RIL_Supports)(int requestCode);
3655
3656/**
Wink Saville7f856802009-06-09 10:23:37 -07003657 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003658 * thread that calls RIL_RequestFunc--and indicates that a pending
3659 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07003660 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003661 * On cancel, the callee should do its best to abandon the request and
3662 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
3663 *
3664 * Subsequent calls to RIL_onRequestComplete for this request with
3665 * other results will be tolerated but ignored. (That is, it is valid
3666 * to ignore the cancellation request)
3667 *
3668 * RIL_Cancel calls should return immediately, and not wait for cancellation
3669 *
Wink Saville7f856802009-06-09 10:23:37 -07003670 * 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 -08003671 * interface
3672 *
3673 * @param t token wants to be canceled
3674 */
3675
3676typedef void (*RIL_Cancel)(RIL_Token t);
3677
3678typedef void (*RIL_TimedCallback) (void *param);
3679
3680/**
3681 * Return a version string for your RIL implementation
3682 */
3683typedef const char * (*RIL_GetVersion) (void);
3684
3685typedef struct {
3686 int version; /* set to RIL_VERSION */
3687 RIL_RequestFunc onRequest;
3688 RIL_RadioStateRequest onStateRequest;
3689 RIL_Supports supports;
3690 RIL_Cancel onCancel;
3691 RIL_GetVersion getVersion;
3692} RIL_RadioFunctions;
3693
3694#ifdef RIL_SHLIB
3695struct RIL_Env {
3696 /**
3697 * "t" is parameter passed in on previous call to RIL_Notification
3698 * routine.
3699 *
3700 * If "e" != SUCCESS, then response can be null/is ignored
3701 *
Wink Saville7f856802009-06-09 10:23:37 -07003702 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003703 * freed by callee
3704 *
3705 * RIL_onRequestComplete will return as soon as possible
3706 */
Wink Saville7f856802009-06-09 10:23:37 -07003707 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003708 void *response, size_t responselen);
3709
3710 /**
3711 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
3712 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3713 *
3714 * "data" is owned by caller, and should not be modified or freed by callee
3715 */
3716
Wink Saville7f856802009-06-09 10:23:37 -07003717 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003718 size_t datalen);
3719
3720 /**
Wink Saville7f856802009-06-09 10:23:37 -07003721 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003722 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3723 * a relative time value at which the callback is invoked. If relativeTime is
3724 * NULL or points to a 0-filled structure, the callback will be invoked as
3725 * soon as possible
3726 */
3727
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07003728 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07003729 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003730};
3731
3732
Wink Saville7f856802009-06-09 10:23:37 -07003733/**
3734 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003735 * argc and argv will be command line arguments intended for the RIL implementation
3736 * Return NULL on error
3737 *
3738 * @param env is environment point defined as RIL_Env
3739 * @param argc number of arguments
3740 * @param argv list fo arguments
3741 *
3742 */
3743const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
3744
3745#else /* RIL_SHLIB */
3746
3747/**
3748 * Call this once at startup to register notification routine
3749 *
3750 * @param callbacks user-specifed callback function
3751 */
3752void RIL_register (const RIL_RadioFunctions *callbacks);
3753
3754
3755/**
3756 *
3757 * RIL_onRequestComplete will return as soon as possible
3758 *
3759 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07003760 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003761 * @param e error code
3762 * if "e" != SUCCESS, then response can be null/is ignored
3763 * @param response is owned by caller, and should not be modified or
3764 * freed by callee
3765 * @param responselen the length of response in byte
3766 */
Wink Saville7f856802009-06-09 10:23:37 -07003767void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003768 void *response, size_t responselen);
3769
3770/**
3771 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
3772 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3773 * "data" is owned by caller, and should not be modified or freed by callee
3774 * @param datalen the length of data in byte
3775 */
3776
Wink Saville7f856802009-06-09 10:23:37 -07003777void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003778 size_t datalen);
3779
3780
3781/**
Wink Saville7f856802009-06-09 10:23:37 -07003782 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003783 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3784 * a relative time value at which the callback is invoked. If relativeTime is
3785 * NULL or points to a 0-filled structure, the callback will be invoked as
3786 * soon as possible
3787 *
3788 * @param callback user-specifed callback function
3789 * @param param parameter list
3790 * @param relativeTime a relative time value at which the callback is invoked
3791 */
3792
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07003793void RIL_requestTimedCallback (RIL_TimedCallback callback,
3794 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003795
3796
3797#endif /* RIL_SHLIB */
3798
3799#ifdef __cplusplus
3800}
3801#endif
3802
3803#endif /*ANDROID_RIL_H*/