blob: e4dccd193e5d1bc7a0358c97d1b3338f4fb698a8 [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 */
Kazuhiro Ondobeb25b52011-06-17 16:26:45 -0500202 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
203 back-off timer value RIL wants to override the one
204 pre-configured in FW.
205 The unit is miliseconds.
206 The value < 0 means no value is suggested.
Kazuhiro Ondo16157582011-07-24 07:56:32 -0700207 The value 0 means retry should be done ASAP.
208 The value of MAX_INT(0x7fffffff) means no retry. */
Wink Saville43808972011-01-13 17:39:51 -0800209 int cid; /* Context ID, uniquely identifies this call */
210 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
211 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
212 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
213 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
214 such as "IP" or "IPV6" */
215 char * ifname; /* The network interface name */
Wink Savillec0114b32011-02-18 10:14:07 -0800216 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
217 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
Wink Saville43808972011-01-13 17:39:51 -0800218 May not be empty, typically 1 IPv4 or 1 IPv6 or
Wink Savillec0114b32011-02-18 10:14:07 -0800219 one of each. If the prefix length is absent the addresses
220 are assumed to be point to point with IPv4 having a prefix
221 length of 32 and IPv6 128. */
Wink Saville43808972011-01-13 17:39:51 -0800222 char * dnses; /* A space-delimited list of DNS server addresses,
223 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
224 May be empty. */
Wink Savillec0114b32011-02-18 10:14:07 -0800225 char * gateways; /* A space-delimited list of default gateway addresses,
226 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
227 May be empty in which case the addresses represent point
228 to point connections. */
229} RIL_Data_Call_Response_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800230
231typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800232 int messageRef; /* TP-Message-Reference for GSM,
233 and BearerData MessageId for CDMA
234 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800235 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700236 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
237 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
238 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800239} RIL_SMS_Response;
240
241/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
242typedef struct {
243 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
244 /* 0 = "REC UNREAD" */
245 /* 1 = "REC READ" */
246 /* 2 = "STO UNSENT" */
247 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700248 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
249 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800250 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
251 (as expected by TS 27.005) or NULL for default SMSC */
252} RIL_SMS_WriteArgs;
253
254/** Used by RIL_REQUEST_DIAL */
255typedef struct {
256 char * address;
257 int clir;
258 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
259 * clir == 0 on "use subscription default value"
260 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
261 * clir == 2 on "CLIR suppression" (allow CLI presentation)
262 */
Wink Saville74fa3882009-12-22 15:35:41 -0800263 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800264} RIL_Dial;
265
266typedef struct {
267 int command; /* one of the commands listed for TS 27.007 +CRSM*/
268 int fileid; /* EF id */
269 char *path; /* "pathid" from TS 27.007 +CRSM command.
270 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700271 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800272 */
273 int p1;
274 int p2;
275 int p3;
276 char *data; /* May be NULL*/
277 char *pin2; /* May be NULL*/
Wink Savillec0114b32011-02-18 10:14:07 -0800278} RIL_SIM_IO_v5;
279
280typedef struct {
281 int command; /* one of the commands listed for TS 27.007 +CRSM*/
282 int fileid; /* EF id */
283 char *path; /* "pathid" from TS 27.007 +CRSM command.
284 Path is in hex asciii format eg "7f205f70"
285 Path must always be provided.
286 */
287 int p1;
288 int p2;
289 int p3;
290 char *data; /* May be NULL*/
291 char *pin2; /* May be NULL*/
292 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
293} RIL_SIM_IO_v6;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800294
295typedef struct {
296 int sw1;
297 int sw2;
298 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
299} RIL_SIM_IO_Response;
300
301/* See also com.android.internal.telephony.gsm.CallForwardInfo */
302
303typedef struct {
304 int status; /*
305 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
306 * status 1 = active, 0 = not active
307 *
308 * For RIL_REQUEST_SET_CALL_FORWARD:
309 * status is:
310 * 0 = disable
311 * 1 = enable
312 * 2 = interrogate
313 * 3 = registeration
314 * 4 = erasure
315 */
316
Wink Saville3d54e742009-05-18 18:00:44 -0700317 int reason; /* from TS 27.007 7.11 "reason" */
318 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
319 See table for Android mapping from
320 MMI service code
321 0 means user doesn't input class */
322 int toa; /* "type" from TS 27.007 7.11 */
323 char * number; /* "number" from TS 27.007 7.11. May be NULL */
324 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800325}RIL_CallForwardInfo;
326
327typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700328 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
329 * Upper 16 bits is LAC and lower 16 bits
330 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800331 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700332 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700333 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800334 */
johnwange0ba6a92009-09-11 19:14:52 -0700335 int rssi; /* Received RSSI in GSM,
336 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800337 */
338} RIL_NeighboringCell;
339
340/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
341typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700342 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800343 CALL_FAIL_NORMAL = 16,
344 CALL_FAIL_BUSY = 17,
345 CALL_FAIL_CONGESTION = 34,
346 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
347 CALL_FAIL_CALL_BARRED = 240,
348 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700349 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
350 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Wink Saville1b5fd232009-04-22 14:50:00 -0700351 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
352 CALL_FAIL_CDMA_DROP = 1001,
353 CALL_FAIL_CDMA_INTERCEPT = 1002,
354 CALL_FAIL_CDMA_REORDER = 1003,
355 CALL_FAIL_CDMA_SO_REJECT = 1004,
356 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
357 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
358 CALL_FAIL_CDMA_PREEMPTED = 1007,
359 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
360 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700361 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800362 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
363} RIL_LastCallFailCause;
364
Wink Savillef4c4d362009-04-02 01:37:03 -0700365/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800366typedef enum {
Wink Saville43808972011-01-13 17:39:51 -0800367 PDP_FAIL_NONE = 0, /* No error, connection ok */
368
369 /* an integer cause code defined in TS 24.008
370 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
371 If the implementation does not have access to the exact cause codes,
372 then it should return one of the following values,
373 as the UI layer needs to distinguish these
374 cases for error notification and potential retries. */
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700375 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
376 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
377 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
378 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
379 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
380 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
381 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
382 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
383 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
384 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
Wink Saville43808972011-01-13 17:39:51 -0800385 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
386 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
387 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
388 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700389 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
Wink Saville43808972011-01-13 17:39:51 -0800390
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700391 /* Not mentioned in the specification */
Wink Savillec0114b32011-02-18 10:14:07 -0800392 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
393 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
Wink Saville43808972011-01-13 17:39:51 -0800394
395 /* reasons for data call drop - network/modem disconnect */
Wink Savillec0114b32011-02-18 10:14:07 -0800396 PDP_FAIL_SIGNAL_LOST = -3, /* no retry */
Wink Saville43808972011-01-13 17:39:51 -0800397 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
398 with parameters appropriate for new technology */
399 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
400 powered off - no retry */
401 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
402 mode was up on same APN/data profile - no retry until
403 tethered call is off */
404
405 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */
406} RIL_DataCallFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800407
jsh602f80f2009-07-10 15:44:37 -0700408/* See RIL_REQUEST_SETUP_DATA_CALL */
409typedef enum {
410 RIL_DATA_PROFILE_DEFAULT = 0,
411 RIL_DATA_PROFILE_TETHERED = 1,
412 RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */
413} RIL_DataProfile;
414
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800415/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
416typedef struct {
417 int notificationType; /*
418 * 0 = MO intermediate result code
419 * 1 = MT unsolicited result code
420 */
421 int code; /* See 27.007 7.17
422 "code1" for MO
423 "code2" for MT. */
424 int index; /* CUG index. See 27.007 7.17. */
425 int type; /* "type" from 27.007 7.17 (MT only). */
426 char * number; /* "number" from 27.007 7.17
427 (MT only, may be NULL). */
428} RIL_SuppSvcNotification;
429
Wink Savillef4c4d362009-04-02 01:37:03 -0700430#define RIL_CARD_MAX_APPS 8
431
432typedef enum {
433 RIL_CARDSTATE_ABSENT = 0,
434 RIL_CARDSTATE_PRESENT = 1,
435 RIL_CARDSTATE_ERROR = 2
436} RIL_CardState;
437
438typedef enum {
439 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
440 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700441 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
442 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700443 involved */
444 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
445 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
446 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
447 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
448 RIL_PERSOSUBSTATE_SIM_SIM = 7,
449 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
450 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
451 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
452 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
453 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
454 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
455 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
456 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
457 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
458 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
459 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
460 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
461 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
462 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
463 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
464 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
465 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
466} RIL_PersoSubstate;
467
468typedef enum {
469 RIL_APPSTATE_UNKNOWN = 0,
470 RIL_APPSTATE_DETECTED = 1,
471 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
472 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700473 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700474 when app_state is assigned to this value */
475 RIL_APPSTATE_READY = 5
476} RIL_AppState;
477
478typedef enum {
479 RIL_PINSTATE_UNKNOWN = 0,
480 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
481 RIL_PINSTATE_ENABLED_VERIFIED = 2,
482 RIL_PINSTATE_DISABLED = 3,
483 RIL_PINSTATE_ENABLED_BLOCKED = 4,
484 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
485} RIL_PinState;
486
487typedef enum {
488 RIL_APPTYPE_UNKNOWN = 0,
489 RIL_APPTYPE_SIM = 1,
490 RIL_APPTYPE_USIM = 2,
491 RIL_APPTYPE_RUIM = 3,
Wink Savillec0114b32011-02-18 10:14:07 -0800492 RIL_APPTYPE_CSIM = 4,
493 RIL_APPTYPE_ISIM = 5
Wink Savillef4c4d362009-04-02 01:37:03 -0700494} RIL_AppType;
495
496typedef struct
497{
Wink Saville7f856802009-06-09 10:23:37 -0700498 RIL_AppType app_type;
499 RIL_AppState app_state;
500 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -0700501 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -0700502 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -0700503 0x30, 0x30, 0x30 */
504 char *app_label_ptr; /* null terminated string */
Wink Savillec0114b32011-02-18 10:14:07 -0800505 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
Wink Saville7f856802009-06-09 10:23:37 -0700506 RIL_PinState pin1;
507 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -0700508} RIL_AppStatus;
509
Wink Savillec0114b32011-02-18 10:14:07 -0800510/* Deprecated, use RIL_CardStatus_v6 */
511typedef struct
512{
513 RIL_CardState card_state;
514 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
515 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
516 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
517 int num_applications; /* value <= RIL_CARD_MAX_APPS */
518 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
519} RIL_CardStatus_v5;
520
Wink Savillef4c4d362009-04-02 01:37:03 -0700521typedef struct
522{
Wink Saville7f856802009-06-09 10:23:37 -0700523 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -0700524 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
Wink Savillec0114b32011-02-18 10:14:07 -0800525 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
526 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
527 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
Wink Savillef4c4d362009-04-02 01:37:03 -0700528 int num_applications; /* value <= RIL_CARD_MAX_APPS */
529 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
Wink Savillec0114b32011-02-18 10:14:07 -0800530} RIL_CardStatus_v6;
Wink Savillef4c4d362009-04-02 01:37:03 -0700531
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800532/* The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH */
533typedef enum {
534 /* A file on SIM has been updated. data[1] contains the EFID. */
535 SIM_FILE_UPDATE = 0,
Wink Savillec0114b32011-02-18 10:14:07 -0800536 /* 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 -0800537 SIM_INIT = 1,
538 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
539 SIM_RESET = 2
540} RIL_SimRefreshResult;
541
Wink Savillec0114b32011-02-18 10:14:07 -0800542/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
543typedef struct {
544 char * number; /* Remote party number */
545 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
546 char * name; /* Remote party name */
547 RIL_CDMA_SignalInfoRecord signalInfoRecord;
548} RIL_CDMA_CallWaiting_v5;
549
Wink Saville1b5fd232009-04-22 14:50:00 -0700550typedef struct {
551 char * number; /* Remote party number */
552 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
553 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -0700554 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Savillec0114b32011-02-18 10:14:07 -0800555 /* Number type/Number plan required to support International Call Waiting */
556 int number_type; /* 0=Unknown, 1=International, 2=National,
557 3=Network specific, 4=subscriber */
558 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
559} RIL_CDMA_CallWaiting_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -0700560
Wink Savillea592eeb2009-05-22 13:26:36 -0700561/**
562 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
563 *
564 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
565 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
566 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
567 * CBM message ID.
568 *
569 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
570 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
571 * and 9.4.4.2.3 for UMTS.
572 * All other values can be treated as empty CBM data coding scheme.
573 *
574 * selected 0 means message types specified in <fromServiceId, toServiceId>
575 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
576 *
577 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
578 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
579 */
Wink Savillef4c4d362009-04-02 01:37:03 -0700580typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -0700581 int fromServiceId;
582 int toServiceId;
583 int fromCodeScheme;
584 int toCodeScheme;
585 unsigned char selected;
586} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -0700587
The Android Open Source Project34a51082009-03-05 14:34:37 -0800588/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
589#define RIL_RESTRICTED_STATE_NONE 0x00
590/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
591#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
592/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
593#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -0700594/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -0800595#define RIL_RESTRICTED_STATE_CS_ALL 0x04
596/* Block packet data access due to restriction. */
597#define RIL_RESTRICTED_STATE_PS_ALL 0x10
598
Wink Saville1b5fd232009-04-22 14:50:00 -0700599/* The status for an OTASP/OTAPA session */
600typedef enum {
601 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
602 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
603 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
604 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
605 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
606 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
607 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
608 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
609 CDMA_OTA_PROVISION_STATUS_COMMITTED,
610 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
611 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
612 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
613} RIL_CDMA_OTA_ProvisionStatus;
614
615typedef struct {
616 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
617 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
618} RIL_GW_SignalStrength;
619
620
621typedef struct {
622 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
623 * multiplied by -1. Example: If the actual RSSI is -75, then this response
624 * value will be 75.
625 */
626 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
627 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
628 * will be 125.
629 */
630} RIL_CDMA_SignalStrength;
631
632
633typedef struct {
634 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
635 * multiplied by -1. Example: If the actual RSSI is -75, then this response
636 * value will be 75.
637 */
638 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
639 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
640 * will be 125.
641 */
642 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
643} RIL_EVDO_SignalStrength;
644
Wink Savillec0114b32011-02-18 10:14:07 -0800645typedef struct {
646 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
Wink Saville473adc92011-06-13 10:24:09 -0700647 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
648 * Range: 44 to 140 dBm
649 * INT_MAX: 0x7FFFFFFF denotes invalid value.
650 * Reference: 3GPP TS 36.133 9.1.4 */
651 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
652 * Range: 20 to 3 dB.
653 * INT_MAX: 0x7FFFFFFF denotes invalid value.
654 * Reference: 3GPP TS 36.133 9.1.7 */
655 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
656 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
657 * INT_MAX : 0x7FFFFFFF denotes invalid value.
658 * Reference: 3GPP TS 36.101 8.1.1 */
659 int cqi; /* The current Channel Quality Indicator.
660 * Range: 0 to 15.
661 * INT_MAX : 0x7FFFFFFF denotes invalid value.
662 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
Wink Savillec0114b32011-02-18 10:14:07 -0800663} RIL_LTE_SignalStrength;
664
665/* Deprecated, use RIL_SignalStrength_v6 */
666typedef struct {
667 RIL_GW_SignalStrength GW_SignalStrength;
668 RIL_CDMA_SignalStrength CDMA_SignalStrength;
669 RIL_EVDO_SignalStrength EVDO_SignalStrength;
670} RIL_SignalStrength_v5;
Wink Saville1b5fd232009-04-22 14:50:00 -0700671
672typedef struct {
673 RIL_GW_SignalStrength GW_SignalStrength;
674 RIL_CDMA_SignalStrength CDMA_SignalStrength;
675 RIL_EVDO_SignalStrength EVDO_SignalStrength;
Wink Savillec0114b32011-02-18 10:14:07 -0800676 RIL_LTE_SignalStrength LTE_SignalStrength;
677} RIL_SignalStrength_v6;
Wink Saville1b5fd232009-04-22 14:50:00 -0700678
679/* Names of the CDMA info records (C.S0005 section 3.7.5) */
680typedef enum {
681 RIL_CDMA_DISPLAY_INFO_REC,
682 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
683 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
684 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
685 RIL_CDMA_SIGNAL_INFO_REC,
686 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
687 RIL_CDMA_LINE_CONTROL_INFO_REC,
688 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
689 RIL_CDMA_T53_CLIR_INFO_REC,
690 RIL_CDMA_T53_RELEASE_INFO_REC,
691 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
692} RIL_CDMA_InfoRecName;
693
694/* Display Info Rec as defined in C.S0005 section 3.7.5.1
695 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
696 Note: the Extended Display info rec contains multiple records of the
697 form: display_tag, display_len, and display_len occurrences of the
698 chari field if the display_tag is not 10000000 or 10000001.
699 To save space, the records are stored consecutively in a byte buffer.
700 The display_tag, display_len and chari fields are all 1 byte.
701*/
702
703typedef struct {
704 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -0700705 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -0700706} RIL_CDMA_DisplayInfoRecord;
707
708/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
709 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
710 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
711*/
712
713typedef struct {
714 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -0700715 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -0700716 char number_type;
717 char number_plan;
718 char pi;
719 char si;
720} RIL_CDMA_NumberInfoRecord;
721
722/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
723typedef enum {
724 RIL_REDIRECTING_REASON_UNKNOWN = 0,
725 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
726 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
727 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
728 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
729 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
730 RIL_REDIRECTING_REASON_RESERVED
731} RIL_CDMA_RedirectingReason;
732
733typedef struct {
734 RIL_CDMA_NumberInfoRecord redirectingNumber;
735 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
736 RIL_CDMA_RedirectingReason redirectingReason;
737} RIL_CDMA_RedirectingNumberInfoRecord;
738
739/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
740typedef struct {
741 char lineCtrlPolarityIncluded;
742 char lineCtrlToggle;
743 char lineCtrlReverse;
744 char lineCtrlPowerDenial;
745} RIL_CDMA_LineControlInfoRecord;
746
747/* T53 CLIR Information Record */
748typedef struct {
749 char cause;
750} RIL_CDMA_T53_CLIRInfoRecord;
751
752/* T53 Audio Control Information Record */
753typedef struct {
754 char upLink;
755 char downLink;
756} RIL_CDMA_T53_AudioControlInfoRecord;
757
758typedef struct {
759
760 RIL_CDMA_InfoRecName name;
761
762 union {
763 /* Display and Extended Display Info Rec */
764 RIL_CDMA_DisplayInfoRecord display;
765
766 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
767 RIL_CDMA_NumberInfoRecord number;
768
769 /* Signal Info Rec */
770 RIL_CDMA_SignalInfoRecord signal;
771
772 /* Redirecting Number Info Rec */
773 RIL_CDMA_RedirectingNumberInfoRecord redir;
774
775 /* Line Control Info Rec */
776 RIL_CDMA_LineControlInfoRecord lineCtrl;
777
778 /* T53 CLIR Info Rec */
779 RIL_CDMA_T53_CLIRInfoRecord clir;
780
781 /* T53 Audio Control Info Rec */
782 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
783 } rec;
784} RIL_CDMA_InformationRecord;
785
786#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
787
788typedef struct {
789 char numberOfInfoRecs;
790 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
791} RIL_CDMA_InformationRecords;
792
Wink Saville7f856802009-06-09 10:23:37 -0700793/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800794 * RIL_REQUEST_GET_SIM_STATUS
795 *
796 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -0700797 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800798 * "data" is NULL
799 *
Wink Savillefd729372011-02-22 16:19:39 -0800800 * "response" is const RIL_CardStatus_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800801 *
802 * Valid errors:
803 * Must never fail
804 */
805#define RIL_REQUEST_GET_SIM_STATUS 1
806
807/**
808 * RIL_REQUEST_ENTER_SIM_PIN
809 *
John Wang309ac292009-07-30 14:53:23 -0700810 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800811 *
812 * "data" is const char **
813 * ((const char **)data)[0] is PIN value
Wink Savillec0114b32011-02-18 10:14:07 -0800814 * ((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 -0800815 *
jsh593c9102009-06-24 16:13:44 -0700816 * "response" is int *
817 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800818 *
819 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700820 *
821 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800822 * RADIO_NOT_AVAILABLE (radio resetting)
823 * GENERIC_FAILURE
824 * PASSWORD_INCORRECT
825 */
826
827#define RIL_REQUEST_ENTER_SIM_PIN 2
828
829
830/**
831 * RIL_REQUEST_ENTER_SIM_PUK
832 *
Wink Saville7f856802009-06-09 10:23:37 -0700833 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800834 *
835 * "data" is const char **
836 * ((const char **)data)[0] is PUK value
837 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -0800838 * ((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 -0800839 *
jsh593c9102009-06-24 16:13:44 -0700840 * "response" is int *
841 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800842 *
843 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700844 *
845 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800846 * RADIO_NOT_AVAILABLE (radio resetting)
847 * GENERIC_FAILURE
848 * PASSWORD_INCORRECT
849 * (PUK is invalid)
850 */
851
852#define RIL_REQUEST_ENTER_SIM_PUK 3
853
854/**
855 * RIL_REQUEST_ENTER_SIM_PIN2
856 *
857 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
858 * returned as a a failure from a previous operation.
859 *
860 * "data" is const char **
861 * ((const char **)data)[0] is PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -0800862 * ((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 -0800863 *
jsh593c9102009-06-24 16:13:44 -0700864 * "response" is int *
865 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800866 *
867 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700868 *
869 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800870 * RADIO_NOT_AVAILABLE (radio resetting)
871 * GENERIC_FAILURE
872 * PASSWORD_INCORRECT
873 */
874
875#define RIL_REQUEST_ENTER_SIM_PIN2 4
876
877/**
878 * RIL_REQUEST_ENTER_SIM_PUK2
879 *
Wink Saville7f856802009-06-09 10:23:37 -0700880 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800881 *
882 * "data" is const char **
883 * ((const char **)data)[0] is PUK2 value
884 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -0800885 * ((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 -0800886 *
jsh593c9102009-06-24 16:13:44 -0700887 * "response" is int *
888 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800889 *
890 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700891 *
892 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800893 * RADIO_NOT_AVAILABLE (radio resetting)
894 * GENERIC_FAILURE
895 * PASSWORD_INCORRECT
896 * (PUK2 is invalid)
897 */
898
899#define RIL_REQUEST_ENTER_SIM_PUK2 5
900
901/**
902 * RIL_REQUEST_CHANGE_SIM_PIN
903 *
Wink Saville7f856802009-06-09 10:23:37 -0700904 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800905 *
906 * "data" is const char **
907 * ((const char **)data)[0] is old PIN value
908 * ((const char **)data)[1] is new PIN value
Wink Savillec0114b32011-02-18 10:14:07 -0800909 * ((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 -0800910 *
jsh593c9102009-06-24 16:13:44 -0700911 * "response" is int *
912 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800913 *
914 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700915 *
916 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800917 * RADIO_NOT_AVAILABLE (radio resetting)
918 * GENERIC_FAILURE
919 * PASSWORD_INCORRECT
920 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -0700921 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800922 */
923
924#define RIL_REQUEST_CHANGE_SIM_PIN 6
925
926
927/**
928 * RIL_REQUEST_CHANGE_SIM_PIN2
929 *
Wink Saville7f856802009-06-09 10:23:37 -0700930 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800931 *
932 * "data" is const char **
933 * ((const char **)data)[0] is old PIN2 value
934 * ((const char **)data)[1] is new PIN2 value
Wink Savillec0114b32011-02-18 10:14:07 -0800935 * ((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 -0800936 *
jsh593c9102009-06-24 16:13:44 -0700937 * "response" is int *
938 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800939 *
940 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700941 *
942 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800943 * RADIO_NOT_AVAILABLE (radio resetting)
944 * GENERIC_FAILURE
945 * PASSWORD_INCORRECT
946 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -0700947 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800948 */
949
950#define RIL_REQUEST_CHANGE_SIM_PIN2 7
951
952/**
953 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
954 *
955 * Requests that network personlization be deactivated
956 *
957 * "data" is const char **
958 * ((const char **)(data))[0]] is network depersonlization code
959 *
jsh593c9102009-06-24 16:13:44 -0700960 * "response" is int *
961 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800962 *
963 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700964 *
965 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800966 * RADIO_NOT_AVAILABLE (radio resetting)
967 * GENERIC_FAILURE
968 * PASSWORD_INCORRECT
969 * (code is invalid)
970 */
971
972#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
973
974/**
Wink Saville7f856802009-06-09 10:23:37 -0700975 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800976 *
977 * Requests current call list
978 *
979 * "data" is NULL
980 *
981 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -0700982 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800983 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700984 *
985 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800986 * RADIO_NOT_AVAILABLE (radio resetting)
987 * GENERIC_FAILURE
988 * (request will be made again in a few hundred msec)
989 */
990
991#define RIL_REQUEST_GET_CURRENT_CALLS 9
992
993
Wink Saville7f856802009-06-09 10:23:37 -0700994/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800995 * RIL_REQUEST_DIAL
996 *
997 * Initiate voice call
998 *
999 * "data" is const RIL_Dial *
1000 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001001 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001002 * This method is never used for supplementary service codes
1003 *
1004 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001005 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001006 * RADIO_NOT_AVAILABLE (radio resetting)
1007 * GENERIC_FAILURE
1008 */
1009#define RIL_REQUEST_DIAL 10
1010
1011/**
1012 * RIL_REQUEST_GET_IMSI
1013 *
1014 * Get the SIM IMSI
1015 *
1016 * Only valid when radio state is "RADIO_STATE_SIM_READY"
1017 *
Wink Savillec0114b32011-02-18 10:14:07 -08001018 * "data" is const char **
1019 * ((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 -08001020 * "response" is a const char * containing the IMSI
1021 *
1022 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001023 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001024 * RADIO_NOT_AVAILABLE (radio resetting)
1025 * GENERIC_FAILURE
1026 */
1027
1028#define RIL_REQUEST_GET_IMSI 11
1029
1030/**
1031 * RIL_REQUEST_HANGUP
1032 *
1033 * Hang up a specific line (like AT+CHLD=1x)
1034 *
John Wang06bae4b2010-11-18 16:37:09 -08001035 * After this HANGUP request returns, RIL should show the connection is NOT
1036 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1037 *
Wink Saville7f856802009-06-09 10:23:37 -07001038 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001039 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001040 *
1041 * "response" is NULL
1042 *
1043 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001044 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001045 * RADIO_NOT_AVAILABLE (radio resetting)
1046 * GENERIC_FAILURE
1047 */
1048
1049#define RIL_REQUEST_HANGUP 12
1050
1051/**
1052 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
1053 *
1054 * Hang up waiting or held (like AT+CHLD=0)
1055 *
John Wang06bae4b2010-11-18 16:37:09 -08001056 * After this HANGUP request returns, RIL should show the connection is NOT
1057 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1058 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001059 * "data" is NULL
1060 * "response" is NULL
1061 *
1062 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001063 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001064 * RADIO_NOT_AVAILABLE (radio resetting)
1065 * GENERIC_FAILURE
1066 */
1067
1068#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
1069
1070/**
1071 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
1072 *
1073 * Hang up waiting or held (like AT+CHLD=1)
1074 *
John Wang06bae4b2010-11-18 16:37:09 -08001075 * After this HANGUP request returns, RIL should show the connection is NOT
1076 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1077 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001078 * "data" is NULL
1079 * "response" is NULL
1080 *
1081 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001082 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001083 * RADIO_NOT_AVAILABLE (radio resetting)
1084 * GENERIC_FAILURE
1085 */
1086
1087#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
1088
1089/**
1090 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
1091 *
1092 * Switch waiting or holding call and active call (like AT+CHLD=2)
1093 *
1094 * State transitions should be is follows:
1095 *
1096 * If call 1 is waiting and call 2 is active, then if this re
1097 *
1098 * BEFORE AFTER
1099 * Call 1 Call 2 Call 1 Call 2
1100 * ACTIVE HOLDING HOLDING ACTIVE
1101 * ACTIVE WAITING HOLDING ACTIVE
1102 * HOLDING WAITING HOLDING ACTIVE
1103 * ACTIVE IDLE HOLDING IDLE
1104 * IDLE IDLE IDLE IDLE
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
1115#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
1116#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
1117
1118/**
1119 * RIL_REQUEST_CONFERENCE
1120 *
1121 * Conference holding and active (like AT+CHLD=3)
1122
1123 * "data" is NULL
1124 * "response" is NULL
1125 *
1126 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001127 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001128 * RADIO_NOT_AVAILABLE (radio resetting)
1129 * GENERIC_FAILURE
1130 */
1131#define RIL_REQUEST_CONFERENCE 16
1132
1133/**
1134 * RIL_REQUEST_UDUB
1135 *
Wink Saville7f856802009-06-09 10:23:37 -07001136 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001137 * waiting call answer)(RIL_BasicRequest r);
1138 *
1139 * "data" is NULL
1140 * "response" is NULL
1141 *
1142 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001143 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001144 * RADIO_NOT_AVAILABLE (radio resetting)
1145 * GENERIC_FAILURE
1146 */
1147#define RIL_REQUEST_UDUB 17
1148
1149/**
1150 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1151 *
1152 * Requests the failure cause code for the most recently terminated call
1153 *
1154 * "data" is NULL
1155 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -07001156 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001157 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
1158 * failure reasons are derived from the possible call failure scenarios
1159 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001160 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08001161 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
1162 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
1163 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001164 * If the implementation does not have access to the exact cause codes,
1165 * then it should return one of the values listed in RIL_LastCallFailCause,
1166 * as the UI layer needs to distinguish these cases for tone generation or
1167 * error notification.
1168 *
1169 * Valid errors:
1170 * SUCCESS
1171 * RADIO_NOT_AVAILABLE
1172 * GENERIC_FAILURE
1173 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001174 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001175 */
1176#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
1177
1178/**
1179 * RIL_REQUEST_SIGNAL_STRENGTH
1180 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001181 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001182 *
1183 * Must succeed if radio is on.
1184 *
1185 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07001186 *
1187 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001188 *
1189 * Valid errors:
1190 * SUCCESS
1191 * RADIO_NOT_AVAILABLE
1192 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001193#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07001194
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001195/**
Wink Savillec0114b32011-02-18 10:14:07 -08001196 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001197 *
1198 * Request current registration state
1199 *
1200 * "data" is NULL
1201 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -07001202 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -07001203 * 0 - Not registered, MT is not currently searching
1204 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001205 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -07001206 * 2 - Not registered, but MT is currently searching
1207 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001208 * 3 - Registration denied
1209 * 4 - Unknown
1210 * 5 - Registered, roaming
John Wang7f8ded12010-01-21 15:07:28 -08001211 * 10 - Same as 0, but indicates that emergency calls
1212 * are enabled.
1213 * 12 - Same as 2, but indicates that emergency calls
1214 * are enabled.
1215 * 13 - Same as 3, but indicates that emergency calls
1216 * are enabled.
1217 * 14 - Same as 4, but indicates that emergency calls
1218 * are enabled.
1219 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001220 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1221 * NULL if not.Valid LAC are 0x0000 - 0xffff
1222 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1223 * NULL if not.
1224 * Valid CID are 0x00000000 - 0xffffffff
1225 * In GSM, CID is Cell ID (see TS 27.007)
1226 * in 16 bits
1227 * In UMTS, CID is UMTS Cell Identity
1228 * (see TS 25.331) in 28 bits
Wink Saville43808972011-01-13 17:39:51 -08001229 * ((const char **)response)[3] indicates the available voice radio technology,
1230 * valid values as defined by RIL_RadioTechnology.
Wink Saville1b5fd232009-04-22 14:50:00 -07001231 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1232 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07001233 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07001234 * ((const char **)response)[5] is Base Station latitude if registered on a
1235 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001236 * latitude is a decimal number as specified in
1237 * 3GPP2 C.S0005-A v6.0. It is represented in
1238 * units of 0.25 seconds and ranges from -1296000
1239 * to 1296000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08001240 * to a range of -90 to +90 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07001241 * ((const char **)response)[6] is Base Station longitude if registered on a
1242 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001243 * longitude is a decimal number as specified in
1244 * 3GPP2 C.S0005-A v6.0. It is represented in
1245 * units of 0.25 seconds and ranges from -2592000
1246 * to 2592000, both values inclusive (corresponding
Wink Saville43808972011-01-13 17:39:51 -08001247 * to a range of -180 to +180 degrees).
Wink Saville1b5fd232009-04-22 14:50:00 -07001248 * ((const char **)response)[7] is concurrent services support indicator if
1249 * registered on a CDMA system 0-1.
1250 * 0 - Concurrent services not supported,
1251 * 1 - Concurrent services supported
1252 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1253 * NULL if not. Valid System ID are 0 - 32767
1254 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1255 * NULL if not. Valid System ID are 0 - 65535
1256 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001257 * on a CDMA or EVDO system or NULL if not. Valid values
Wink Saville1b5fd232009-04-22 14:50:00 -07001258 * are 0-255.
1259 * ((const char **)response)[11] indicates whether the current system is in the
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001260 * PRL if registered on a CDMA or EVDO system or NULL if
Wink Saville1b5fd232009-04-22 14:50:00 -07001261 * not. 0=not in the PRL, 1=in the PRL
1262 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001263 * if registered on a CDMA or EVDO system or NULL if not.
Wink Saville1b5fd232009-04-22 14:50:00 -07001264 * Valid values are 0-255.
1265 * ((const char **)response)[13] if registration state is 3 (Registration
1266 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07001267 * registration was denied. See 3GPP TS 24.008,
1268 * 10.5.3.6 and Annex G.
1269 * 0 - General
1270 * 1 - Authentication Failure
1271 * 2 - IMSI unknown in HLR
1272 * 3 - Illegal MS
1273 * 4 - Illegal ME
1274 * 5 - PLMN not allowed
1275 * 6 - Location area not allowed
1276 * 7 - Roaming not allowed
1277 * 8 - No Suitable Cells in this Location Area
1278 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07001279 * 10 - Persistent location update reject
Wink Savillec0114b32011-02-18 10:14:07 -08001280 * 11 - PLMN not allowed
1281 * 12 - Location area not allowed
1282 * 13 - Roaming not allowed in this Location Area
1283 * 15 - No Suitable Cells in this Location Area
1284 * 17 - Network Failure
1285 * 20 - MAC Failure
1286 * 21 - Sync Failure
1287 * 22 - Congestion
1288 * 23 - GSM Authentication unacceptable
1289 * 25 - Not Authorized for this CSG
1290 * 32 - Service option not supported
1291 * 33 - Requested service option not subscribed
1292 * 34 - Service option temporarily out of order
1293 * 38 - Call cannot be identified
1294 * 48-63 - Retry upon entry into a new cell
1295 * 95 - Semantically incorrect message
1296 * 96 - Invalid mandatory information
1297 * 97 - Message type non-existent or not implemented
1298 * 98 - Message not compatible with protocol state
1299 * 99 - Information element non-existent or not implemented
1300 * 100 - Conditional IE error
1301 * 101 - Message not compatible with protocol state
1302 * 111 - Protocol error, unspecified
jshca5e3472010-06-23 21:53:24 -07001303 * ((const char **)response)[14] is the Primary Scrambling Code of the current
1304 * cell as described in TS 25.331, in hexadecimal
1305 * format, or NULL if unknown or not registered
1306 * to a UMTS network.
Wink Saville1b5fd232009-04-22 14:50:00 -07001307 *
1308 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001309 * as "out of service" in the Android telephony system
1310 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001311 * Registration state 3 can be returned if Location Update Reject
1312 * (with cause 17 - Network Failure) is received repeatedly from the network,
1313 * to facilitate "managed roaming"
1314 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001315 * Valid errors:
1316 * SUCCESS
1317 * RADIO_NOT_AVAILABLE
1318 * GENERIC_FAILURE
1319 */
Wink Savillec0114b32011-02-18 10:14:07 -08001320#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001321
1322/**
Wink Savillec0114b32011-02-18 10:14:07 -08001323 * RIL_REQUEST_DATA_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001324 *
Wink Savillec0114b32011-02-18 10:14:07 -08001325 * Request current DATA registration state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001326 *
1327 * "data" is NULL
1328 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08001329 * ((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 -08001330 * ((const char **)response)[1] is LAC if registered or NULL if not
1331 * ((const char **)response)[2] is CID if registered or NULL if not
Wink Saville43808972011-01-13 17:39:51 -08001332 * ((const char **)response)[3] indicates the available data radio technology,
1333 * valid values as defined by RIL_RadioTechnology.
Wink Savillec0114b32011-02-18 10:14:07 -08001334 * ((const char **)response)[4] if registration state is 3 (Registration
1335 * denied) this is an enumerated reason why
1336 * registration was denied. See 3GPP TS 24.008,
1337 * Annex G.6 "Additonal cause codes for GMM".
1338 * 7 == GPRS services not allowed
1339 * 8 == GPRS services and non-GPRS services not allowed
1340 * 9 == MS identity cannot be derived by the network
1341 * 10 == Implicitly detached
1342 * 14 == GPRS services not allowed in this PLMN
1343 * 16 == MSC temporarily not reachable
1344 * 40 == No PDP context activated
1345 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
1346 * established using RIL_REQUEST_SETUP_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001347 *
1348 * LAC and CID are in hexadecimal format.
1349 * valid LAC are 0x0000 - 0xffff
1350 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07001351 *
1352 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001353 * as "out of service" in the Android telephony system
1354 *
1355 * Valid errors:
1356 * SUCCESS
1357 * RADIO_NOT_AVAILABLE
1358 * GENERIC_FAILURE
1359 */
Wink Savillec0114b32011-02-18 10:14:07 -08001360#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001361
1362/**
1363 * RIL_REQUEST_OPERATOR
1364 *
1365 * Request current operator ONS or EONS
1366 *
1367 * "data" is NULL
1368 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07001369 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001370 * or NULL if unregistered
1371 *
Wink Saville7f856802009-06-09 10:23:37 -07001372 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001373 * or NULL if unregistered
1374 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1375 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07001376 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001377 * Valid errors:
1378 * SUCCESS
1379 * RADIO_NOT_AVAILABLE
1380 * GENERIC_FAILURE
1381 */
1382#define RIL_REQUEST_OPERATOR 22
1383
1384/**
1385 * RIL_REQUEST_RADIO_POWER
1386 *
1387 * Toggle radio on and off (for "airplane" mode)
Wink Saville29487ef2011-04-15 09:15:31 -07001388 * If the radio is is turned off/on the radio modem subsystem
1389 * is expected return to an initialized state. For instance,
1390 * any voice and data calls will be terminated and all associated
1391 * lists emptied.
1392 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001393 * "data" is int *
1394 * ((int *)data)[0] is > 0 for "Radio On"
1395 * ((int *)data)[0] is == 0 for "Radio Off"
1396 *
1397 * "response" is NULL
1398 *
1399 * Turn radio on if "on" > 0
1400 * Turn radio off if "on" == 0
1401 *
1402 * Valid errors:
1403 * SUCCESS
1404 * RADIO_NOT_AVAILABLE
1405 * GENERIC_FAILURE
1406 */
1407#define RIL_REQUEST_RADIO_POWER 23
1408
1409/**
1410 * RIL_REQUEST_DTMF
1411 *
1412 * Send a DTMF tone
1413 *
1414 * If the implementation is currently playing a tone requested via
1415 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1416 * should be played instead
1417 *
jsh602f80f2009-07-10 15:44:37 -07001418 * "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 -08001419 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001420 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001421 * FIXME should this block/mute microphone?
1422 * How does this interact with local DTMF feedback?
1423 *
1424 * Valid errors:
1425 * SUCCESS
1426 * RADIO_NOT_AVAILABLE
1427 * GENERIC_FAILURE
1428 *
1429 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1430 *
1431 */
1432#define RIL_REQUEST_DTMF 24
1433
1434/**
1435 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07001436 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001437 * Send an SMS message
1438 *
1439 * "data" is const char **
1440 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1441 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1442 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1443 * less the SMSC address
1444 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1445 *
1446 * "response" is a const RIL_SMS_Response *
1447 *
1448 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001449 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001450 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1451 *
1452 * Valid errors:
1453 * SUCCESS
1454 * RADIO_NOT_AVAILABLE
1455 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07001456 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001457 * GENERIC_FAILURE
1458 *
1459 * FIXME how do we specify TP-Message-Reference if we need to resend?
1460 */
1461#define RIL_REQUEST_SEND_SMS 25
1462
1463
1464/**
1465 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07001466 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001467 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1468 * except that more messages are expected to be sent soon. If possible,
1469 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1470 *
1471 * "data" is const char **
1472 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1473 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1474 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1475 * less the SMSC address
1476 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1477 *
1478 * "response" is a const RIL_SMS_Response *
1479 *
1480 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001481 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001482 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1483 *
1484 * Valid errors:
1485 * SUCCESS
1486 * RADIO_NOT_AVAILABLE
1487 * SMS_SEND_FAIL_RETRY
1488 * GENERIC_FAILURE
1489 *
1490 */
1491#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1492
1493
1494/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001495 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001496 *
Wink Saville29487ef2011-04-15 09:15:31 -07001497 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
1498 * return success it is added to the list of data calls and a
1499 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
1500 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
1501 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
1502 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001503 *
Wink Saville43808972011-01-13 17:39:51 -08001504 * The RIL is expected to:
1505 * - Create one data call context.
1506 * - Create and configure a dedicated interface for the context
1507 * - The interface must be point to point.
1508 * - The interface is configured with one or more addresses and
1509 * is capable of sending and receiving packets. The prefix length
1510 * of the addresses must be /32 for IPv4 and /128 for IPv6.
1511 * - Must NOT change the linux routing table.
Wink Savillec0114b32011-02-18 10:14:07 -08001512 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
Wink Saville43808972011-01-13 17:39:51 -08001513 * number of simultaneous data call contexts.
1514 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001515 * "data" is a const char **
Wink Savillec0114b32011-02-18 10:14:07 -08001516 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
1517 * for values above 2 this is RIL_RadioTechnology + 2.
jsh602f80f2009-07-10 15:44:37 -07001518 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07001519 * ((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 -07001520 * override the one in the profile. NULL indicates no APN overrride.
1521 * ((const char **)data)[3] is the username for APN, or NULL
1522 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07001523 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
1524 * 0 => PAP and CHAP is never performed.
1525 * 1 => PAP may be performed; CHAP is never performed.
1526 * 2 => CHAP may be performed; PAP is never performed.
1527 * 3 => PAP / CHAP may be performed - baseband dependent.
Wink Savillec0114b32011-02-18 10:14:07 -08001528 * ((const char **)data)[6] is the connection type to request must be one of the
1529 * PDP_type values in TS 27.007 section 10.1.1.
Lorenzo Colitti4f81dcf2010-09-01 19:38:57 -07001530 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
Wink Savillec0114b32011-02-18 10:14:07 -08001531 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001532 *
Wink Savillec0114b32011-02-18 10:14:07 -08001533 * "response" is a RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001534 *
1535 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07001536 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001537 * Valid errors:
Wink Saville43808972011-01-13 17:39:51 -08001538 * SUCCESS should be returned on both success and failure of setup with
Wink Savillec0114b32011-02-18 10:14:07 -08001539 * the RIL_Data_Call_Response_v6.status containing the actual status.
1540 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
Wink Saville43808972011-01-13 17:39:51 -08001541 *
1542 * Other errors could include:
1543 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
1544 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001545 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001546 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001547 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001548#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001549
1550
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001551/**
1552 * RIL_REQUEST_SIM_IO
1553 *
1554 * Request SIM I/O operation.
1555 * This is similar to the TS 27.007 "restricted SIM" operation
1556 * where it assumes all of the EF selection will be done by the
1557 * callee.
1558 *
Wink Savillefd729372011-02-22 16:19:39 -08001559 * "data" is a const RIL_SIM_IO_v6 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001560 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1561 * or may specify a PIN2 for operations that require a PIN2 (eg
1562 * updating FDN records)
1563 *
1564 * "response" is a const RIL_SIM_IO_Response *
1565 *
1566 * Arguments and responses that are unused for certain
1567 * values of "command" should be ignored or set to NULL
1568 *
1569 * Valid errors:
1570 * SUCCESS
1571 * RADIO_NOT_AVAILABLE
1572 * GENERIC_FAILURE
1573 * SIM_PIN2
1574 * SIM_PUK2
1575 */
1576#define RIL_REQUEST_SIM_IO 28
1577
1578/**
1579 * RIL_REQUEST_SEND_USSD
1580 *
1581 * Send a USSD message
1582 *
1583 * If a USSD session already exists, the message should be sent in the
1584 * context of that session. Otherwise, a new session should be created.
1585 *
1586 * The network reply should be reported via RIL_UNSOL_ON_USSD
1587 *
1588 * Only one USSD session may exist at a time, and the session is assumed
1589 * to exist until:
1590 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1591 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1592 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1593 *
1594 * "data" is a const char * containing the USSD request in UTF-8 format
1595 * "response" is NULL
1596 *
1597 * Valid errors:
1598 * SUCCESS
1599 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07001600 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001601 * GENERIC_FAILURE
1602 *
1603 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1604 */
1605
1606#define RIL_REQUEST_SEND_USSD 29
1607
1608/**
1609 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07001610 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001611 * Cancel the current USSD session if one exists
1612 *
1613 * "data" is null
1614 * "response" is NULL
1615 *
1616 * Valid errors:
1617 * SUCCESS
1618 * RADIO_NOT_AVAILABLE
Wink Saville7f856802009-06-09 10:23:37 -07001619 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001620 */
1621
1622#define RIL_REQUEST_CANCEL_USSD 30
1623
Wink Saville7f856802009-06-09 10:23:37 -07001624/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001625 * RIL_REQUEST_GET_CLIR
1626 *
1627 * Gets current CLIR status
1628 * "data" is NULL
1629 * "response" is int *
1630 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1631 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
1632 *
1633 * Valid errors:
1634 * SUCCESS
1635 * RADIO_NOT_AVAILABLE
1636 * GENERIC_FAILURE
1637 */
1638#define RIL_REQUEST_GET_CLIR 31
1639
1640/**
1641 * RIL_REQUEST_SET_CLIR
1642 *
1643 * "data" is int *
1644 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1645 *
1646 * "response" is NULL
1647 *
1648 * Valid errors:
1649 * SUCCESS
1650 * RADIO_NOT_AVAILABLE
1651 * GENERIC_FAILURE
1652 */
1653#define RIL_REQUEST_SET_CLIR 32
1654
1655/**
1656 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
1657 *
1658 * "data" is const RIL_CallForwardInfo *
1659 *
1660 * "response" is const RIL_CallForwardInfo **
1661 * "response" points to an array of RIL_CallForwardInfo *'s, one for
1662 * each distinct registered phone number.
1663 *
1664 * For example, if data is forwarded to +18005551212 and voice is forwarded
1665 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07001666 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001667 * If, however, both data and voice are forwarded to +18005551212, then
1668 * a single RIL_CallForwardInfo can be returned with the service class
1669 * set to "data + voice = 3")
1670 *
1671 * Valid errors:
1672 * SUCCESS
1673 * RADIO_NOT_AVAILABLE
1674 * GENERIC_FAILURE
1675 */
1676#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
1677
1678
1679/**
1680 * RIL_REQUEST_SET_CALL_FORWARD
1681 *
1682 * Configure call forward rule
1683 *
1684 * "data" is const RIL_CallForwardInfo *
1685 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001686 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001687 * Valid errors:
1688 * SUCCESS
1689 * RADIO_NOT_AVAILABLE
1690 * GENERIC_FAILURE
1691 */
1692#define RIL_REQUEST_SET_CALL_FORWARD 34
1693
1694
1695/**
1696 * RIL_REQUEST_QUERY_CALL_WAITING
1697 *
1698 * Query current call waiting state
1699 *
1700 * "data" is const int *
1701 * ((const int *)data)[0] is the TS 27.007 service class to query.
1702 * "response" is a const int *
1703 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
1704 *
1705 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
1706 * must follow, with the TS 27.007 service class bit vector of services
1707 * for which call waiting is enabled.
1708 *
Wink Saville7f856802009-06-09 10:23:37 -07001709 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001710 * ((const int *)response)[1] is 3, then call waiting is enabled for data
1711 * and voice and disabled for everything else
1712 *
1713 * Valid errors:
1714 * SUCCESS
1715 * RADIO_NOT_AVAILABLE
1716 * GENERIC_FAILURE
1717 */
1718#define RIL_REQUEST_QUERY_CALL_WAITING 35
1719
1720
1721/**
1722 * RIL_REQUEST_SET_CALL_WAITING
1723 *
1724 * Configure current call waiting state
1725 *
1726 * "data" is const int *
1727 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
1728 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
1729 * services to modify
1730 * "response" is NULL
1731 *
1732 * Valid errors:
1733 * SUCCESS
1734 * RADIO_NOT_AVAILABLE
1735 * GENERIC_FAILURE
1736 */
1737#define RIL_REQUEST_SET_CALL_WAITING 36
1738
1739/**
1740 * RIL_REQUEST_SMS_ACKNOWLEDGE
1741 *
1742 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07001743 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001744 *
1745 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07001746 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001747 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07001748 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001749 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07001750 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
1751 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
1752 * capacity exceeded) and 0xFF (unspecified error) are
1753 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001754 *
1755 * "response" is NULL
1756 *
1757 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
1758 *
1759 * Valid errors:
1760 * SUCCESS
1761 * RADIO_NOT_AVAILABLE
1762 * GENERIC_FAILURE
1763 */
1764#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
1765
1766/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001767 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001768 *
1769 * Get the device IMEI, including check digit
1770 *
johnwangf8bc1672009-05-14 19:19:47 -07001771 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001772 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1773 *
1774 * "data" is NULL
1775 * "response" is a const char * containing the IMEI
1776 *
1777 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001778 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001779 * RADIO_NOT_AVAILABLE (radio resetting)
1780 * GENERIC_FAILURE
1781 */
1782
1783#define RIL_REQUEST_GET_IMEI 38
1784
1785/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001786 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001787 *
1788 * Get the device IMEISV, which should be two decimal digits
1789 *
johnwangf8bc1672009-05-14 19:19:47 -07001790 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001791 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1792 *
1793 * "data" is NULL
1794 * "response" is a const char * containing the IMEISV
1795 *
1796 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001797 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001798 * RADIO_NOT_AVAILABLE (radio resetting)
1799 * GENERIC_FAILURE
1800 */
1801
1802#define RIL_REQUEST_GET_IMEISV 39
1803
1804
1805/**
1806 * RIL_REQUEST_ANSWER
1807 *
1808 * Answer incoming call
1809 *
1810 * Will not be called for WAITING calls.
1811 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
1812 * instead
1813 *
1814 * "data" is NULL
1815 * "response" is NULL
1816 *
1817 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001818 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001819 * RADIO_NOT_AVAILABLE (radio resetting)
1820 * GENERIC_FAILURE
1821 */
1822
1823#define RIL_REQUEST_ANSWER 40
1824
1825/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001826 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001827 *
Wink Saville29487ef2011-04-15 09:15:31 -07001828 * Deactivate packet data connection and remove from the
1829 * data call list if SUCCESS is returned. Any other return
1830 * values should also try to remove the call from the list,
1831 * but that may not be possible. In any event a
1832 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
1833 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
1834 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001835 *
1836 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07001837 * ((char**)data)[0] indicating CID
Kazuhiro Ondod86799a2010-12-02 13:22:35 -06001838 * ((char**)data)[1] indicating Disconnect Reason
1839 * 0 => No specific reason specified
1840 * 1 => Radio shutdown requested
Wink Saville7f856802009-06-09 10:23:37 -07001841 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001842 * "response" is NULL
1843 *
1844 * Valid errors:
1845 * SUCCESS
1846 * RADIO_NOT_AVAILABLE
1847 * GENERIC_FAILURE
1848 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001849 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001850 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001851#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001852
1853/**
1854 * RIL_REQUEST_QUERY_FACILITY_LOCK
1855 *
1856 * Query the status of a facility lock state
1857 *
1858 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07001859 * ((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 -08001860 * (eg "AO" for BAOC, "SC" for SIM lock)
1861 * ((const char **)data)[1] is the password, or "" if not required
1862 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
1863 * services to query
Wink Savillec0114b32011-02-18 10:14:07 -08001864 * ((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 -08001865 * This is only applicable in the case of Fixed Dialing Numbers
1866 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001867 *
1868 * "response" is an int *
1869 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07001870 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001871 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07001872 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001873 *
1874 * Valid errors:
1875 * SUCCESS
1876 * RADIO_NOT_AVAILABLE
1877 * GENERIC_FAILURE
1878 *
1879 */
1880#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
1881
1882/**
1883 * RIL_REQUEST_SET_FACILITY_LOCK
1884 *
1885 * Enable/disable one facility lock
1886 *
1887 * "data" is const char **
1888 *
1889 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1890 * (eg "AO" for BAOC)
1891 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
1892 * ((const char **)data)[2] = password
1893 * ((const char **)data)[3] = string representation of decimal TS 27.007
1894 * service class bit vector. Eg, the string
1895 * "1" means "set this facility for voice services"
Wink Savillec0114b32011-02-18 10:14:07 -08001896 * ((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 -08001897 * This is only applicable in the case of Fixed Dialing Numbers
1898 * (FDN) requests.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001899 *
jsh593c9102009-06-24 16:13:44 -07001900 * "response" is int *
1901 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001902 *
1903 * Valid errors:
1904 * SUCCESS
1905 * RADIO_NOT_AVAILABLE
1906 * GENERIC_FAILURE
1907 *
1908 */
1909#define RIL_REQUEST_SET_FACILITY_LOCK 43
1910
1911/**
1912 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
1913 *
1914 * Change call barring facility password
1915 *
1916 * "data" is const char **
1917 *
1918 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1919 * (eg "AO" for BAOC)
1920 * ((const char **)data)[1] = old password
1921 * ((const char **)data)[2] = new password
1922 *
Wink Saville7f856802009-06-09 10:23:37 -07001923 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001924 *
1925 * Valid errors:
1926 * SUCCESS
1927 * RADIO_NOT_AVAILABLE
1928 * GENERIC_FAILURE
1929 *
1930 */
1931#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
1932
1933/**
1934 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
1935 *
1936 * Query current network selectin mode
1937 *
1938 * "data" is NULL
1939 *
1940 * "response" is int *
1941 * ((const int *)response)[0] is
1942 * 0 for automatic selection
1943 * 1 for manual selection
1944 *
1945 * Valid errors:
1946 * SUCCESS
1947 * RADIO_NOT_AVAILABLE
1948 * GENERIC_FAILURE
1949 *
1950 */
1951#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
1952
1953/**
1954 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
1955 *
1956 * Specify that the network should be selected automatically
1957 *
1958 * "data" is NULL
1959 * "response" is NULL
1960 *
Wink Saville7f856802009-06-09 10:23:37 -07001961 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001962 * and registered
1963 *
1964 * Valid errors:
1965 * SUCCESS
1966 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07001967 * ILLEGAL_SIM_OR_ME
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001968 * GENERIC_FAILURE
1969 *
John Wang75534472010-04-20 15:11:42 -07001970 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
1971 * no retries needed, such as illegal SIM or ME.
1972 * Returns GENERIC_FAILURE for all other causes that might be
1973 * fixed by retries.
1974 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001975 */
1976#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
1977
1978/**
1979 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
1980 *
1981 * Manually select a specified network.
1982 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001983 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
1984 * "response" is NULL
1985 *
Wink Saville7f856802009-06-09 10:23:37 -07001986 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001987 * and registered
1988 *
1989 * Valid errors:
1990 * SUCCESS
1991 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07001992 * ILLEGAL_SIM_OR_ME
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001993 * GENERIC_FAILURE
1994 *
John Wang75534472010-04-20 15:11:42 -07001995 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
1996 * no retries needed, such as illegal SIM or ME.
1997 * Returns GENERIC_FAILURE for all other causes that might be
1998 * fixed by retries.
1999 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002000 */
2001#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
2002
2003/**
2004 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
2005 *
2006 * Scans for available networks
2007 *
2008 * "data" is NULL
2009 * "response" is const char ** that should be an array of n*4 strings, where
2010 * n is the number of available networks
2011 * For each available network:
2012 *
Wink Saville7f856802009-06-09 10:23:37 -07002013 * ((const char **)response)[n+0] is long alpha ONS or EONS
2014 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002015 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
2016 * ((const char **)response)[n+3] is a string value of the status:
2017 * "unknown"
2018 * "available"
2019 * "current"
2020 * "forbidden"
2021 *
Wink Saville7f856802009-06-09 10:23:37 -07002022 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002023 * and registered
2024 *
2025 * Valid errors:
2026 * SUCCESS
2027 * RADIO_NOT_AVAILABLE
2028 * GENERIC_FAILURE
2029 *
2030 */
2031#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
2032
2033/**
2034 * RIL_REQUEST_DTMF_START
2035 *
Wink Saville7f856802009-06-09 10:23:37 -07002036 * Start playing a DTMF tone. Continue playing DTMF tone until
2037 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002038 *
2039 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
2040 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07002041 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002042 * "data" is a char *
2043 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
2044 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002045 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002046 * Valid errors:
2047 * SUCCESS
2048 * RADIO_NOT_AVAILABLE
2049 * GENERIC_FAILURE
2050 *
2051 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
2052 */
2053#define RIL_REQUEST_DTMF_START 49
2054
2055/**
2056 * RIL_REQUEST_DTMF_STOP
2057 *
2058 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07002059 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002060 * "data" is NULL
2061 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002062 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002063 * Valid errors:
2064 * SUCCESS
2065 * RADIO_NOT_AVAILABLE
2066 * GENERIC_FAILURE
2067 *
2068 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
2069 */
2070#define RIL_REQUEST_DTMF_STOP 50
2071
2072/**
2073 * RIL_REQUEST_BASEBAND_VERSION
2074 *
2075 * Return string value indicating baseband version, eg
2076 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07002077 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002078 * "data" is NULL
2079 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07002080 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002081 * Valid errors:
2082 * SUCCESS
2083 * RADIO_NOT_AVAILABLE
2084 * GENERIC_FAILURE
2085 *
2086 */
2087#define RIL_REQUEST_BASEBAND_VERSION 51
2088
2089/**
2090 * RIL_REQUEST_SEPARATE_CONNECTION
2091 *
2092 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07002093 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002094 * as the only other member of the current (active) call
2095 *
2096 * Like AT+CHLD=2x
2097 *
2098 * See TS 22.084 1.3.8.2 (iii)
2099 * TS 22.030 6.5.5 "Entering "2X followed by send"
2100 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07002101 *
2102 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002103 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
2104 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002105 * "response" is NULL
2106 *
2107 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002108 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002109 * RADIO_NOT_AVAILABLE (radio resetting)
2110 * GENERIC_FAILURE
2111 */
2112#define RIL_REQUEST_SEPARATE_CONNECTION 52
2113
2114
2115/**
2116 * RIL_REQUEST_SET_MUTE
2117 *
2118 * Turn on or off uplink (microphone) mute.
2119 *
2120 * Will only be sent while voice call is active.
2121 * Will always be reset to "disable mute" when a new voice call is initiated
2122 *
2123 * "data" is an int *
2124 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
2125 *
2126 * "response" is NULL
2127 *
2128 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002129 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002130 * RADIO_NOT_AVAILABLE (radio resetting)
2131 * GENERIC_FAILURE
2132 */
2133
2134#define RIL_REQUEST_SET_MUTE 53
2135
2136/**
2137 * RIL_REQUEST_GET_MUTE
2138 *
2139 * Queries the current state of the uplink mute setting
2140 *
2141 * "data" is NULL
2142 * "response" is an int *
2143 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
2144 *
2145 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002146 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002147 * RADIO_NOT_AVAILABLE (radio resetting)
2148 * GENERIC_FAILURE
2149 */
2150
2151#define RIL_REQUEST_GET_MUTE 54
2152
2153/**
2154 * RIL_REQUEST_QUERY_CLIP
2155 *
2156 * Queries the status of the CLIP supplementary service
2157 *
2158 * (for MMI code "*#30#")
2159 *
2160 * "data" is NULL
2161 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07002162 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002163 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07002164 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002165 *
2166 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002167 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002168 * RADIO_NOT_AVAILABLE (radio resetting)
2169 * GENERIC_FAILURE
2170 */
2171
2172#define RIL_REQUEST_QUERY_CLIP 55
2173
2174/**
Wink Savillec0114b32011-02-18 10:14:07 -08002175 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
2176 * field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07002177 *
2178 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07002179 * context or CDMA data connection active
2180 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002181 *
2182 * "data" is NULL
2183 *
2184 * "response" is a "int *"
2185 * ((int *)response)[0] is an integer cause code defined in TS 24.008
2186 * section 6.1.3.1.3 or close approximation
2187 *
2188 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07002189 * then it should return one of the values listed in
Wink Saville43808972011-01-13 17:39:51 -08002190 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002191 * cases for error notification
2192 * and potential retries.
2193 *
2194 * Valid errors:
2195 * SUCCESS
2196 * RADIO_NOT_AVAILABLE
2197 * GENERIC_FAILURE
2198 *
2199 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Savillec0114b32011-02-18 10:14:07 -08002200 *
2201 * Deprecated use the status field in RIL_Data_Call_Response_v6.
Wink Saville7f856802009-06-09 10:23:37 -07002202 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002203
Wink Savillef4c4d362009-04-02 01:37:03 -07002204#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002205
2206/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002207 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002208 *
Wink Saville29487ef2011-04-15 09:15:31 -07002209 * Returns the data call list. An entry is added when a
2210 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
2211 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
2212 * when RIL_REQUEST_RADIO_POWER off/on is issued.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002213 *
2214 * "data" is NULL
Wink Savillec0114b32011-02-18 10:14:07 -08002215 * "response" is an array of RIL_Data_Call_Response_v6
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002216 *
2217 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002218 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002219 * RADIO_NOT_AVAILABLE (radio resetting)
2220 * GENERIC_FAILURE
Wink Saville29487ef2011-04-15 09:15:31 -07002221 *
2222 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002223 */
2224
Wink Savillef4c4d362009-04-02 01:37:03 -07002225#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002226
2227/**
johnwangf8bc1672009-05-14 19:19:47 -07002228 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002229 *
2230 * Request a radio reset. The RIL implementation may postpone
2231 * the reset until after this request is responded to if the baseband
2232 * is presently busy.
2233 *
johnwangf8bc1672009-05-14 19:19:47 -07002234 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
2235 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002236 * "data" is NULL
2237 * "response" is NULL
2238 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002239 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002240 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002241 * RADIO_NOT_AVAILABLE (radio resetting)
2242 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07002243 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002244 */
2245
2246#define RIL_REQUEST_RESET_RADIO 58
2247
2248/**
2249 * RIL_REQUEST_OEM_HOOK_RAW
2250 *
2251 * This request reserved for OEM-specific uses. It passes raw byte arrays
2252 * back and forth.
2253 *
Wink Saville7f856802009-06-09 10:23:37 -07002254 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002255 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
2256 *
2257 * "data" is a char * of bytes copied from the byte[] data argument in java
2258 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07002259 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002260 * (byte[])(((AsyncResult)response.obj).result)
2261 *
Wink Saville7f856802009-06-09 10:23:37 -07002262 * An error response here will result in
2263 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002264 * (((AsyncResult)response.obj).exception) being an instance of
2265 * com.android.internal.telephony.gsm.CommandException
2266 *
2267 * Valid errors:
2268 * All
2269 */
2270
2271#define RIL_REQUEST_OEM_HOOK_RAW 59
2272
2273/**
2274 * RIL_REQUEST_OEM_HOOK_STRINGS
2275 *
2276 * This request reserved for OEM-specific uses. It passes strings
2277 * back and forth.
2278 *
Wink Saville7f856802009-06-09 10:23:37 -07002279 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002280 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
2281 *
2282 * "data" is a const char **, representing an array of null-terminated UTF-8
2283 * strings copied from the "String[] strings" argument to
2284 * invokeOemRilRequestStrings()
2285 *
2286 * "response" is a const char **, representing an array of null-terminated UTF-8
2287 * stings that will be returned via the caller's response message here:
2288 *
2289 * (String[])(((AsyncResult)response.obj).result)
2290 *
Wink Saville7f856802009-06-09 10:23:37 -07002291 * An error response here will result in
2292 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002293 * (((AsyncResult)response.obj).exception) being an instance of
2294 * com.android.internal.telephony.gsm.CommandException
2295 *
2296 * Valid errors:
2297 * All
2298 */
2299
2300#define RIL_REQUEST_OEM_HOOK_STRINGS 60
2301
2302/**
2303 * RIL_REQUEST_SCREEN_STATE
2304 *
2305 * Indicates the current state of the screen. When the screen is off, the
2306 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07002307 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
2308 * in an effort to conserve power. These notifications should resume when the
2309 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002310 *
2311 * "data" is int *
2312 * ((int *)data)[0] is == 1 for "Screen On"
2313 * ((int *)data)[0] is == 0 for "Screen Off"
2314 *
2315 * "response" is NULL
2316 *
2317 * Valid errors:
2318 * SUCCESS
2319 * GENERIC_FAILURE
2320 */
2321#define RIL_REQUEST_SCREEN_STATE 61
2322
2323
2324/**
2325 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
2326 *
2327 * Enables/disables supplementary service related notifications
2328 * from the network.
2329 *
2330 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2331 *
2332 * "data" is int *
2333 * ((int *)data)[0] is == 1 for notifications enabled
2334 * ((int *)data)[0] is == 0 for notifications disabled
2335 *
2336 * "response" is NULL
2337 *
2338 * Valid errors:
2339 * SUCCESS
2340 * RADIO_NOT_AVAILABLE
2341 * GENERIC_FAILURE
2342 *
2343 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2344 */
2345#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2346
2347/**
2348 * RIL_REQUEST_WRITE_SMS_TO_SIM
2349 *
2350 * Stores a SMS message to SIM memory.
2351 *
2352 * "data" is RIL_SMS_WriteArgs *
2353 *
2354 * "response" is int *
2355 * ((const int *)response)[0] is the record index where the message is stored.
2356 *
2357 * Valid errors:
2358 * SUCCESS
2359 * GENERIC_FAILURE
2360 *
2361 */
2362#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2363
2364/**
2365 * RIL_REQUEST_DELETE_SMS_ON_SIM
2366 *
2367 * Deletes a SMS message from SIM memory.
2368 *
2369 * "data" is int *
2370 * ((int *)data)[0] is the record index of the message to delete.
2371 *
2372 * "response" is NULL
2373 *
2374 * Valid errors:
2375 * SUCCESS
2376 * GENERIC_FAILURE
2377 *
2378 */
2379#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2380
2381/**
2382 * RIL_REQUEST_SET_BAND_MODE
2383 *
2384 * Assign a specified band for RF configuration.
2385 *
2386 * "data" is int *
2387 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2388 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2389 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2390 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2391 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2392 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002393 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2394 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2395 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2396 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2397 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2398 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2399 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2400 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2401 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2402 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2403 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2404 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2405 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002406 *
2407 * "response" is NULL
2408 *
2409 * Valid errors:
2410 * SUCCESS
2411 * RADIO_NOT_AVAILABLE
2412 * GENERIC_FAILURE
2413 */
2414#define RIL_REQUEST_SET_BAND_MODE 65
2415
2416/**
2417 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2418 *
2419 * Query the list of band mode supported by RF.
2420 *
2421 * "data" is NULL
2422 *
2423 * "response" is int *
2424 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2425 * each available band mode.
2426 *
2427 * 0 for "unspecified" (selected by baseband automatically)
2428 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2429 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2430 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2431 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2432 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002433 * 6 for "Cellular (800-MHz Band)"
2434 * 7 for "PCS (1900-MHz Band)"
2435 * 8 for "Band Class 3 (JTACS Band)"
2436 * 9 for "Band Class 4 (Korean PCS Band)"
2437 * 10 for "Band Class 5 (450-MHz Band)"
2438 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2439 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2440 * 13 for "Band Class 8 (1800-MHz Band)"
2441 * 14 for "Band Class 9 (900-MHz Band)"
2442 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2443 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2444 * 17 for "Band Class 15 (AWS Band)"
2445 * 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002446 *
2447 * Valid errors:
2448 * SUCCESS
2449 * RADIO_NOT_AVAILABLE
2450 * GENERIC_FAILURE
2451 *
2452 * See also: RIL_REQUEST_SET_BAND_MODE
2453 */
2454#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2455
2456/**
2457 * RIL_REQUEST_STK_GET_PROFILE
2458 *
2459 * Requests the profile of SIM tool kit.
2460 * The profile indicates the SAT/USAT features supported by ME.
2461 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2462 *
2463 * "data" is NULL
2464 *
2465 * "response" is a const char * containing SAT/USAT profile
2466 * in hexadecimal format string starting with first byte of terminal profile
2467 *
2468 * Valid errors:
2469 * RIL_E_SUCCESS
2470 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2471 * RIL_E_GENERIC_FAILURE
2472 */
2473#define RIL_REQUEST_STK_GET_PROFILE 67
2474
2475/**
2476 * RIL_REQUEST_STK_SET_PROFILE
2477 *
2478 * Download the STK terminal profile as part of SIM initialization
2479 * procedure
2480 *
2481 * "data" is a const char * containing SAT/USAT profile
2482 * in hexadecimal format string starting with first byte of terminal profile
2483 *
2484 * "response" is NULL
2485 *
2486 * Valid errors:
2487 * RIL_E_SUCCESS
2488 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2489 * RIL_E_GENERIC_FAILURE
2490 */
2491#define RIL_REQUEST_STK_SET_PROFILE 68
2492
2493/**
2494 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2495 *
2496 * Requests to send a SAT/USAT envelope command to SIM.
2497 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2498 *
2499 * "data" is a const char * containing SAT/USAT command
2500 * in hexadecimal format string starting with command tag
2501 *
2502 * "response" is a const char * containing SAT/USAT response
2503 * in hexadecimal format string starting with first byte of response
2504 * (May be NULL)
2505 *
2506 * Valid errors:
2507 * RIL_E_SUCCESS
2508 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2509 * RIL_E_GENERIC_FAILURE
2510 */
2511#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2512
2513/**
2514 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2515 *
2516 * Requests to send a terminal response to SIM for a received
2517 * proactive command
2518 *
2519 * "data" is a const char * containing SAT/USAT response
2520 * in hexadecimal format string starting with first byte of response data
2521 *
2522 * "response" is NULL
2523 *
2524 * Valid errors:
2525 * RIL_E_SUCCESS
2526 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2527 * RIL_E_GENERIC_FAILURE
2528 */
2529#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
2530
2531/**
2532 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
2533 *
2534 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
2535 * been initialized by ME already. (We could see the call has been in the 'call
2536 * list') So, STK application needs to accept/reject the call according as user
2537 * operations.
2538 *
2539 * "data" is int *
2540 * ((int *)data)[0] is > 0 for "accept" the call setup
2541 * ((int *)data)[0] is == 0 for "reject" the call setup
2542 *
2543 * "response" is NULL
2544 *
2545 * Valid errors:
2546 * RIL_E_SUCCESS
2547 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2548 * RIL_E_GENERIC_FAILURE
2549 */
2550#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
2551
2552/**
2553 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
2554 *
2555 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07002556 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002557 * "data" is NULL
2558 * "response" is NULL
2559 *
2560 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002561 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002562 * RADIO_NOT_AVAILABLE (radio resetting)
2563 * GENERIC_FAILURE
2564 */
2565#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
2566
2567/**
2568 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2569 *
2570 * Requests to set the preferred network type for searching and registering
2571 * (CS/PS domain, RAT, and operation mode)
2572 *
Wink Savillec0114b32011-02-18 10:14:07 -08002573 * "data" is int * which is RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002574 *
2575 * "response" is NULL
2576 *
2577 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07002578 * SUCCESS
2579 * RADIO_NOT_AVAILABLE (radio resetting)
2580 * GENERIC_FAILURE
2581 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002582 */
2583#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2584
2585/**
2586 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2587 *
2588 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2589 * for searching and registering
2590 *
2591 * "data" is NULL
2592 *
2593 * "response" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08002594 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002595 *
2596 * Valid errors:
2597 * SUCCESS
2598 * RADIO_NOT_AVAILABLE
2599 * GENERIC_FAILURE
2600 *
2601 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2602 */
2603#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2604
2605/**
2606 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2607 *
2608 * Request neighboring cell id in GSM network
2609 *
2610 * "data" is NULL
2611 * "response" must be a " const RIL_NeighboringCell** "
2612 *
2613 * Valid errors:
2614 * SUCCESS
2615 * RADIO_NOT_AVAILABLE
2616 * GENERIC_FAILURE
2617 */
2618#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
2619
2620/**
2621 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07002622 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002623 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07002624 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
2625 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002626 *
2627 * Note: The RIL implementation should default to "updates enabled"
2628 * when the screen is on and "updates disabled" when the screen is off.
2629 *
2630 * "data" is int *
2631 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
2632 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
2633 *
2634 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07002635 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002636 * Valid errors:
2637 * SUCCESS
2638 * RADIO_NOT_AVAILABLE
2639 * GENERIC_FAILURE
2640 *
2641 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2642 */
2643#define RIL_REQUEST_SET_LOCATION_UPDATES 76
2644
Wink Savillef4c4d362009-04-02 01:37:03 -07002645/**
Wink Savillec0114b32011-02-18 10:14:07 -08002646 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
Wink Saville7f856802009-06-09 10:23:37 -07002647 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002648 * Request to set the location where the CDMA subscription shall
2649 * be retrieved
2650 *
2651 * "data" is int *
Wink Savillec0114b32011-02-18 10:14:07 -08002652 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
Wink Savillef4c4d362009-04-02 01:37:03 -07002653 *
2654 * "response" is NULL
2655 *
2656 * Valid errors:
2657 * SUCCESS
2658 * RADIO_NOT_AVAILABLE
2659 * GENERIC_FAILURE
2660 * SIM_ABSENT
2661 * SUBSCRIPTION_NOT_AVAILABLE
Wink Savillec0114b32011-02-18 10:14:07 -08002662 *
2663 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
Wink Savillef4c4d362009-04-02 01:37:03 -07002664 */
Wink Savillec0114b32011-02-18 10:14:07 -08002665#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
Wink Savillef4c4d362009-04-02 01:37:03 -07002666
2667/**
2668 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07002669 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002670 * Request to set the roaming preferences in CDMA
2671 *
2672 * "data" is int *
2673 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
2674 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2675 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07002676 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002677 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002678 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002679 * Valid errors:
2680 * SUCCESS
2681 * RADIO_NOT_AVAILABLE
2682 * GENERIC_FAILURE
2683 */
2684#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
2685
2686/**
2687 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07002688 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002689 * Request the actual setting of the roaming preferences in CDMA in the modem
2690 *
2691 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002692 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002693 * "response" is int *
2694 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
2695 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2696 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07002697 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002698 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002699 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002700 * Valid errors:
2701 * SUCCESS
2702 * RADIO_NOT_AVAILABLE
2703 * GENERIC_FAILURE
2704 */
2705#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
2706
2707/**
2708 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002709 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002710 * Request to set the TTY mode
2711 *
2712 * "data" is int *
2713 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07002714 * ((int *)data)[0] is == 1 for TTY Full
2715 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
2716 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07002717 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002718 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002719 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002720 * Valid errors:
2721 * SUCCESS
2722 * RADIO_NOT_AVAILABLE
2723 * GENERIC_FAILURE
2724 */
2725#define RIL_REQUEST_SET_TTY_MODE 80
2726
2727/**
2728 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002729 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002730 * Request the setting of TTY mode
2731 *
2732 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002733 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002734 * "response" is int *
2735 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07002736 * ((int *)response)[0] is == 1 for TTY Full
2737 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
2738 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07002739 *
2740 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002741 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002742 * Valid errors:
2743 * SUCCESS
2744 * RADIO_NOT_AVAILABLE
2745 * GENERIC_FAILURE
2746 */
2747#define RIL_REQUEST_QUERY_TTY_MODE 81
2748
2749/**
2750 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
2751 *
2752 * Request to set the preferred voice privacy mode used in voice
2753 * scrambling
2754 *
2755 * "data" is int *
2756 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2757 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07002758 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002759 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002760 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002761 * Valid errors:
2762 * SUCCESS
2763 * RADIO_NOT_AVAILABLE
2764 * GENERIC_FAILURE
2765 */
2766#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
2767
2768/**
2769 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002770 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002771 * Request the setting of preferred voice privacy mode
2772 *
2773 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002774 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002775 * "response" is int *
2776 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2777 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07002778 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002779 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002780 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002781 * Valid errors:
2782 * SUCCESS
2783 * RADIO_NOT_AVAILABLE
2784 * GENERIC_FAILURE
2785 */
2786#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
2787
2788/**
2789 * RIL_REQUEST_CDMA_FLASH
2790 *
2791 * Send FLASH
2792 *
2793 * "data" is const char *
2794 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07002795 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002796 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002797 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002798 * Valid errors:
2799 * SUCCESS
2800 * RADIO_NOT_AVAILABLE
2801 * GENERIC_FAILURE
2802 *
2803 */
2804#define RIL_REQUEST_CDMA_FLASH 84
2805
2806/**
2807 * RIL_REQUEST_CDMA_BURST_DTMF
2808 *
2809 * Send DTMF string
2810 *
jsh602f80f2009-07-10 15:44:37 -07002811 * "data" is const char **
2812 * ((const char **)data)[0] is a DTMF string
2813 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
2814 * default
2815 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
2816 * default
Wink Saville7f856802009-06-09 10:23:37 -07002817 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002818 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002819 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002820 * Valid errors:
2821 * SUCCESS
2822 * RADIO_NOT_AVAILABLE
2823 * GENERIC_FAILURE
2824 *
2825 */
2826#define RIL_REQUEST_CDMA_BURST_DTMF 85
2827
2828/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002829 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07002830 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002831 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
2832 * If the checksum is valid the 20 digit AKEY is written to NV,
2833 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07002834 *
2835 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002836 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
2837 * where the last 6 digits are a checksum of the
2838 * first 20, as specified in TR45.AHAG
2839 * "Common Cryptographic Algorithms, Revision D.1
2840 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07002841 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002842 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002843 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002844 * Valid errors:
2845 * SUCCESS
2846 * RADIO_NOT_AVAILABLE
2847 * GENERIC_FAILURE
2848 *
2849 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002850#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07002851
2852/**
2853 * RIL_REQUEST_CDMA_SEND_SMS
2854 *
2855 * Send a CDMA SMS message
2856 *
2857 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07002858 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002859 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07002860 *
johnwangbfb151b2009-09-11 15:20:38 -07002861 * Based on the return error, caller decides to resend if sending sms
2862 * fails. The CDMA error class is derived as follows,
2863 * SUCCESS is error class 0 (no error)
2864 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
2865 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
2866 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002867 * Valid errors:
2868 * SUCCESS
2869 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07002870 * SMS_SEND_FAIL_RETRY
Wink Savillef4c4d362009-04-02 01:37:03 -07002871 * GENERIC_FAILURE
2872 *
2873 */
2874#define RIL_REQUEST_CDMA_SEND_SMS 87
2875
2876/**
2877 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
2878 *
2879 * Acknowledge the success or failure in the receipt of SMS
2880 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
2881 *
2882 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07002883 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002884 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002885 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002886 * Valid errors:
2887 * SUCCESS
2888 * RADIO_NOT_AVAILABLE
2889 * GENERIC_FAILURE
2890 *
2891 */
2892#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
2893
2894/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002895 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002896 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002897 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
2898 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002899 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002900 *
2901 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
2902 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
2903 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002904 * Valid errors:
2905 * SUCCESS
2906 * RADIO_NOT_AVAILABLE
2907 * GENERIC_FAILURE
2908 *
2909 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002910#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07002911
2912/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002913 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002914 *
2915 * Set GSM/WCDMA Cell Broadcast SMS config
2916 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002917 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
2918 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
2919 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002920 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002921 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002922 * Valid errors:
2923 * SUCCESS
2924 * RADIO_NOT_AVAILABLE
2925 * GENERIC_FAILURE
2926 *
2927 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002928#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07002929
2930/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002931 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07002932 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002933* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07002934 *
2935 * "data" is const int *
2936 * (const int *)data[0] indicates to activate or turn off the
2937 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
2938 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07002939 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002940 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002941 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002942 * Valid errors:
2943 * SUCCESS
2944 * RADIO_NOT_AVAILABLE
2945 * GENERIC_FAILURE
2946 *
2947 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002948#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07002949
2950/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002951 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002952 *
2953 * Request the setting of CDMA Broadcast SMS config
2954 *
2955 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002956 *
2957 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
2958 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
2959 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002960 * Valid errors:
2961 * SUCCESS
2962 * RADIO_NOT_AVAILABLE
2963 * GENERIC_FAILURE
2964 *
2965 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002966#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07002967
2968/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002969 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002970 *
2971 * Set CDMA Broadcast SMS config
2972 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002973 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
2974 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
2975 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002976 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002977 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002978 * Valid errors:
2979 * SUCCESS
2980 * RADIO_NOT_AVAILABLE
2981 * GENERIC_FAILURE
2982 *
2983 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002984#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07002985
2986/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002987 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07002988 *
2989 * Enable or disable the reception of CDMA Broadcast SMS
2990 *
2991 * "data" is const int *
2992 * (const int *)data[0] indicates to activate or turn off the
2993 * reception of CDMA Broadcast SMS, 0-1,
2994 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07002995 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002996 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002997 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002998 * Valid errors:
2999 * SUCCESS
3000 * RADIO_NOT_AVAILABLE
3001 * GENERIC_FAILURE
3002 *
3003 */
Wink Savillea592eeb2009-05-22 13:26:36 -07003004#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07003005
3006/**
3007 * RIL_REQUEST_CDMA_SUBSCRIPTION
3008 *
3009 * Request the device MDN / H_SID / H_NID.
3010 *
3011 * The request is only allowed when CDMA subscription is available. When CDMA
3012 * subscription is changed, application layer should re-issue the request to
3013 * update the subscription information.
3014 *
3015 * If a NULL value is returned for any of the device id, it means that error
3016 * accessing the device.
3017 *
3018 * "response" is const char **
3019 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07003020 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
3021 * CDMA subscription is available, in decimal format
3022 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
3023 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07003024 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07003025 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07003026 *
3027 * Valid errors:
3028 * SUCCESS
3029 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
3030 */
3031
Wink Savilleeafe79d2009-04-03 18:02:34 -07003032#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07003033
3034/**
3035 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
3036 *
3037 * Stores a CDMA SMS message to RUIM memory.
3038 *
3039 * "data" is RIL_CDMA_SMS_WriteArgs *
3040 *
3041 * "response" is int *
3042 * ((const int *)response)[0] is the record index where the message is stored.
3043 *
3044 * Valid errors:
3045 * SUCCESS
3046 * RADIO_NOT_AVAILABLE
3047 * GENERIC_FAILURE
3048 *
3049 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003050#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07003051
3052/**
3053 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
3054 *
3055 * Deletes a CDMA SMS message from RUIM memory.
3056 *
3057 * "data" is int *
3058 * ((int *)data)[0] is the record index of the message to delete.
3059 *
3060 * "response" is NULL
3061 *
3062 * Valid errors:
3063 * SUCCESS
3064 * RADIO_NOT_AVAILABLE
3065 * GENERIC_FAILURE
3066 *
3067 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003068#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07003069
3070/**
3071 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07003072 *
3073 * Request the device ESN / MEID / IMEI / IMEISV.
3074 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003075 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07003076 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07003077 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003078 *
3079 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07003080 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003081 *
3082 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07003083 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07003084 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003085 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07003086 * ((const char **)response)[0] is IMEI if GSM subscription is available
3087 * ((const char **)response)[1] is IMEISV if GSM subscription is available
3088 * ((const char **)response)[2] is ESN if CDMA subscription is available
3089 * ((const char **)response)[3] is MEID if CDMA subscription is available
3090 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003091 * Valid errors:
3092 * SUCCESS
3093 * RADIO_NOT_AVAILABLE
3094 * GENERIC_FAILURE
3095 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07003096#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07003097
Wink Saville1b5fd232009-04-22 14:50:00 -07003098/**
3099 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
3100 *
3101 * Request the radio's system selection module to exit emergency
3102 * callback mode. RIL will not respond with SUCCESS until the modem has
3103 * completely exited from Emergency Callback Mode.
3104 *
3105 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003106 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003107 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07003108 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003109 * Valid errors:
3110 * SUCCESS
3111 * RADIO_NOT_AVAILABLE
3112 * GENERIC_FAILURE
3113 *
3114 */
3115#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07003116
jsh000a9fe2009-05-11 14:52:35 -07003117/**
3118 * RIL_REQUEST_GET_SMSC_ADDRESS
3119 *
3120 * Queries the default Short Message Service Center address on the device.
3121 *
3122 * "data" is NULL
3123 *
3124 * "response" is const char * containing the SMSC address.
3125 *
3126 * Valid errors:
3127 * SUCCESS
3128 * RADIO_NOT_AVAILABLE
3129 * GENERIC_FAILURE
3130 *
3131 */
3132#define RIL_REQUEST_GET_SMSC_ADDRESS 100
3133
3134/**
3135 * RIL_REQUEST_SET_SMSC_ADDRESS
3136 *
3137 * Sets the default Short Message Service Center address on the device.
3138 *
3139 * "data" is const char * containing the SMSC address.
3140 *
3141 * "response" is NULL
3142 *
3143 * Valid errors:
3144 * SUCCESS
3145 * RADIO_NOT_AVAILABLE
3146 * GENERIC_FAILURE
3147 *
3148 */
3149#define RIL_REQUEST_SET_SMSC_ADDRESS 101
3150
jshb60444e2009-05-29 11:09:17 -07003151/**
3152 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
3153 *
3154 * Indicates whether there is storage available for new SMS messages.
3155 *
3156 * "data" is int *
3157 * ((int *)data)[0] is 1 if memory is available for storing new messages
3158 * is 0 if memory capacity is exceeded
3159 *
3160 * "response" is NULL
3161 *
3162 * Valid errors:
3163 * SUCCESS
3164 * RADIO_NOT_AVAILABLE
3165 * GENERIC_FAILURE
3166 *
3167 */
3168#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
3169
Wink Saville2641d5b2009-06-08 17:40:42 -07003170/**
3171 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
3172 *
3173 * Indicates that the StkSerivce is running and is
3174 * ready to receive RIL_UNSOL_STK_XXXXX commands.
3175 *
3176 * "data" is NULL
3177 * "response" is NULL
3178 *
3179 * Valid errors:
3180 * SUCCESS
3181 * RADIO_NOT_AVAILABLE
3182 * GENERIC_FAILURE
3183 *
3184 */
3185#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
3186
Wink Savillec0114b32011-02-18 10:14:07 -08003187/**
3188 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3189 *
3190 * Request to query the location where the CDMA subscription shall
3191 * be retrieved
3192 *
3193 * "data" is NULL
3194 *
3195 * "response" is int *
3196 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3197 *
3198 * Valid errors:
3199 * SUCCESS
3200 * RADIO_NOT_AVAILABLE
3201 * GENERIC_FAILURE
3202 * SUBSCRIPTION_NOT_AVAILABLE
3203 *
3204 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
3205 */
3206#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
3207
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003208/***********************************************************************/
3209
Wink Savillef4c4d362009-04-02 01:37:03 -07003210
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003211#define RIL_UNSOL_RESPONSE_BASE 1000
3212
3213/**
3214 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3215 *
3216 * Indicate when value of RIL_RadioState has changed.
3217 *
3218 * Callee will invoke RIL_RadioStateRequest method on main thread
3219 *
3220 * "data" is NULL
3221 */
3222
3223#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
3224
3225
3226/**
3227 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
3228 *
3229 * Indicate when call state has changed
3230 *
3231 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
3232 *
3233 * "data" is NULL
3234 *
Wink Saville7f856802009-06-09 10:23:37 -07003235 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003236 * "RING", "BUSY", "NO CARRIER", and also call state
3237 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
3238 *
3239 * Redundent or extraneous invocations are tolerated
3240 */
3241#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
3242
3243
3244/**
Wink Savillec0114b32011-02-18 10:14:07 -08003245 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003246 *
Wink Savillec0114b32011-02-18 10:14:07 -08003247 * Called when the voice network state changed
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003248 *
3249 * Callee will invoke the following requests on main thread:
3250 *
Wink Savillec0114b32011-02-18 10:14:07 -08003251 * RIL_REQUEST_VOICE_REGISTRATION_STATE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003252 * RIL_REQUEST_OPERATOR
3253 *
3254 * "data" is NULL
3255 *
3256 * FIXME should this happen when SIM records are loaded? (eg, for
3257 * EONS)
3258 */
Wink Savillec0114b32011-02-18 10:14:07 -08003259#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003260
3261/**
3262 * RIL_UNSOL_RESPONSE_NEW_SMS
3263 *
3264 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07003265 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003266 * "data" is const char *
3267 * This is a pointer to a string containing the PDU of an SMS-DELIVER
3268 * as an ascii string of hex digits. The PDU starts with the SMSC address
3269 * per TS 27.005 (+CMT:)
3270 *
3271 * Callee will subsequently confirm the receipt of thei SMS with a
3272 * RIL_REQUEST_SMS_ACKNOWLEDGE
3273 *
Wink Saville7f856802009-06-09 10:23:37 -07003274 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003275 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3276 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3277 */
3278
3279#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
3280
3281/**
3282 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
3283 *
3284 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07003285 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003286 * "data" is const char *
3287 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
3288 * as an ascii string of hex digits. The PDU starts with the SMSC address
3289 * per TS 27.005 (+CDS:).
3290 *
3291 * Callee will subsequently confirm the receipt of the SMS with a
3292 * RIL_REQUEST_SMS_ACKNOWLEDGE
3293 *
Wink Saville7f856802009-06-09 10:23:37 -07003294 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003295 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3296 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3297 */
3298
3299#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
3300
3301/**
3302 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
3303 *
3304 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07003305 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003306 * "data" is const int *
3307 * ((const int *)data)[0] contains the slot index on the SIM that contains
3308 * the new message
3309 */
3310
3311#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
3312
3313/**
3314 * RIL_UNSOL_ON_USSD
3315 *
3316 * Called when a new USSD message is received.
3317 *
3318 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07003319 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003320 * one of these string values:
3321 * "0" USSD-Notify -- text in ((const char **)data)[1]
3322 * "1" USSD-Request -- text in ((const char **)data)[1]
3323 * "2" Session terminated by network
3324 * "3" other local client (eg, SIM Toolkit) has responded
3325 * "4" Operation not supported
3326 * "5" Network timeout
3327 *
3328 * The USSD session is assumed to persist if the type code is "1", otherwise
3329 * the current session (if any) is assumed to have terminated.
3330 *
3331 * ((const char **)data)[1] points to a message string if applicable, which
3332 * should always be in UTF-8.
3333 */
3334#define RIL_UNSOL_ON_USSD 1006
3335/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
3336
3337/**
3338 * RIL_UNSOL_ON_USSD_REQUEST
3339 *
3340 * Obsolete. Send via RIL_UNSOL_ON_USSD
3341 */
Wink Saville7f856802009-06-09 10:23:37 -07003342#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003343
3344
3345/**
3346 * RIL_UNSOL_NITZ_TIME_RECEIVED
3347 *
3348 * Called when radio has received a NITZ time message
3349 *
3350 * "data" is const char * pointing to NITZ time string
3351 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
3352 */
3353#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
3354
3355/**
3356 * RIL_UNSOL_SIGNAL_STRENGTH
3357 *
3358 * Radio may report signal strength rather han have it polled.
3359 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003360 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003361 */
3362#define RIL_UNSOL_SIGNAL_STRENGTH 1009
3363
3364
3365/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003366 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003367 *
Wink Savillec0114b32011-02-18 10:14:07 -08003368 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
Wink Saville29487ef2011-04-15 09:15:31 -07003369 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
3370 * of current data contexts including new contexts that have been
3371 * activated. A data call is only removed from this list when the
3372 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
3373 * is powered off/on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003374 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003375 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003376 */
3377
Wink Savillef4c4d362009-04-02 01:37:03 -07003378#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003379
3380/**
3381 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
3382 *
3383 * Reports supplementary service related notification from the network.
3384 *
3385 * "data" is a const RIL_SuppSvcNotification *
3386 *
3387 */
3388
3389#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
3390
3391/**
3392 * RIL_UNSOL_STK_SESSION_END
3393 *
3394 * Indicate when STK session is terminated by SIM.
3395 *
3396 * "data" is NULL
3397 */
3398#define RIL_UNSOL_STK_SESSION_END 1012
3399
3400/**
3401 * RIL_UNSOL_STK_PROACTIVE_COMMAND
3402 *
3403 * Indicate when SIM issue a STK proactive command to applications
3404 *
3405 * "data" is a const char * containing SAT/USAT proactive command
3406 * in hexadecimal format string starting with command tag
3407 *
3408 */
3409#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
3410
3411/**
3412 * RIL_UNSOL_STK_EVENT_NOTIFY
3413 *
3414 * Indicate when SIM notifies applcations some event happens.
3415 * Generally, application does not need to have any feedback to
3416 * SIM but shall be able to indicate appropriate messages to users.
3417 *
3418 * "data" is a const char * containing SAT/USAT commands or responses
3419 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
3420 * starting with first byte of response data or command tag
3421 *
3422 */
3423#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
3424
3425/**
3426 * RIL_UNSOL_STK_CALL_SETUP
3427 *
3428 * Indicate when SIM wants application to setup a voice call.
3429 *
3430 * "data" is const int *
3431 * ((const int *)data)[0] contains timeout value (in milliseconds)
3432 */
3433#define RIL_UNSOL_STK_CALL_SETUP 1015
3434
3435/**
3436 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
3437 *
3438 * Indicates that SMS storage on the SIM is full. Sent when the network
3439 * attempts to deliver a new SMS message. Messages cannot be saved on the
3440 * SIM until space is freed. In particular, incoming Class 2 messages
3441 * cannot be stored.
3442 *
3443 * "data" is null
3444 *
3445 */
3446#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
3447
3448/**
3449 * RIL_UNSOL_SIM_REFRESH
3450 *
3451 * Indicates that file(s) on the SIM have been updated, or the SIM
3452 * has been reinitialized.
3453 *
3454 * "data" is an int *
3455 * ((int *)data)[0] is a RIL_SimRefreshResult.
3456 * ((int *)data)[1] is the EFID of the updated file if the result is
Wink Savillec0114b32011-02-18 10:14:07 -08003457 * SIM_FILE_UPDATE, AID(application ID) of the card application
3458 * 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 -08003459 *
3460 * Note: If the radio state changes as a result of the SIM refresh (eg,
3461 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3462 * should be sent.
3463 */
3464#define RIL_UNSOL_SIM_REFRESH 1017
3465
3466/**
3467 * RIL_UNSOL_CALL_RING
3468 *
3469 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07003470 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
3471 * of a call and sending multiple is optional. If the system property
3472 * ro.telephony.call_ring.multiple is false then the upper layers
3473 * will generate the multiple events internally. Otherwise the vendor
3474 * ril must generate multiple RIL_UNSOL_CALL_RING if
3475 * ro.telephony.call_ring.multiple is true or if it is absent.
3476 *
3477 * The rate of these events is controlled by ro.telephony.call_ring.delay
3478 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003479 *
Wink Saville3d54e742009-05-18 18:00:44 -07003480 * "data" is null for GSM
3481 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003482 */
3483#define RIL_UNSOL_CALL_RING 1018
3484
The Android Open Source Project34a51082009-03-05 14:34:37 -08003485/**
3486 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
3487 *
3488 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07003489 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003490 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07003491
The Android Open Source Project34a51082009-03-05 14:34:37 -08003492 * "data" is null
3493 */
3494#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
3495
3496/**
3497 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3498 *
3499 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07003500 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003501 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07003502 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003503 * Callee will subsequently confirm the receipt of the SMS with
3504 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07003505 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003506 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
3507 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07003508 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003509 */
3510#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
3511
3512/**
3513 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
3514 *
3515 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07003516 *
Henrik Hall0eba2022010-11-25 10:20:56 +01003517 * "data" can be one of the following:
3518 * If received from GSM network, "data" is const char of 88 bytes
3519 * which indicates each page of a CBS Message sent to the MS by the
3520 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
3521 * If received from UMTS network, "data" is const char of 90 up to 1252
3522 * bytes which contain between 1 and 15 CBS Message pages sent as one
3523 * 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 -07003524 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003525 */
3526#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07003527
The Android Open Source Project34a51082009-03-05 14:34:37 -08003528/**
3529 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
3530 *
3531 * Indicates that SMS storage on the RUIM is full. Messages
3532 * cannot be saved on the RUIM until space is freed.
3533 *
3534 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07003535 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003536 */
Wink Savillef4c4d362009-04-02 01:37:03 -07003537#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
3538
The Android Open Source Project34a51082009-03-05 14:34:37 -08003539/**
3540 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
3541 *
3542 * Indicates a restricted state change (eg, for Domain Specific Access Control).
3543 *
3544 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
3545 *
3546 * "data" is an int *
3547 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
3548 */
3549#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
3550
Wink Saville1b5fd232009-04-22 14:50:00 -07003551/**
3552 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
3553 *
3554 * Indicates that the radio system selection module has
3555 * autonomously entered emergency callback mode.
3556 *
3557 * "data" is null
3558 *
3559 */
3560#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08003561
Wink Saville1b5fd232009-04-22 14:50:00 -07003562/**
3563 * RIL_UNSOL_CDMA_CALL_WAITING
3564 *
3565 * Called when CDMA radio receives a call waiting indication.
3566 *
3567 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07003568 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003569 */
3570#define RIL_UNSOL_CDMA_CALL_WAITING 1025
3571
3572/**
3573 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
3574 *
3575 * Called when CDMA radio receives an update of the progress of an
3576 * OTASP/OTAPA call.
3577 *
3578 * "data" is const int *
3579 * For CDMA this is an integer OTASP/OTAPA status listed in
3580 * RIL_CDMA_OTA_ProvisionStatus.
3581 *
3582 */
3583#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
3584
3585/**
3586 * RIL_UNSOL_CDMA_INFO_REC
3587 *
3588 * Called when CDMA radio receives one or more info recs.
3589 *
3590 * "data" is const RIL_CDMA_InformationRecords *
3591 *
3592 */
3593#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08003594
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07003595/**
3596 * RIL_UNSOL_OEM_HOOK_RAW
3597 *
3598 * This is for OEM specific use.
3599 *
3600 * "data" is a byte[]
3601 */
3602#define RIL_UNSOL_OEM_HOOK_RAW 1028
3603
John Wang5d621da2009-09-18 17:17:48 -07003604/**
3605 * RIL_UNSOL_RINGBACK_TONE
3606 *
3607 * Indicates that nework doesn't have in-band information, need to
3608 * play out-band tone.
3609 *
3610 * "data" is an int *
3611 * ((int *)data)[0] == 0 for stop play ringback tone.
3612 * ((int *)data)[0] == 1 for start play ringback tone.
3613 */
3614#define RIL_UNSOL_RINGBACK_TONE 1029
3615
John Wang5909cf82010-01-29 00:18:54 -08003616/**
3617 * RIL_UNSOL_RESEND_INCALL_MUTE
3618 *
3619 * Indicates that framework/application need reset the uplink mute state.
3620 *
3621 * There may be situations where the mute state becomes out of sync
3622 * between the application and device in some GSM infrastructures.
3623 *
3624 * "data" is null
3625 */
3626#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
Wink Savillec0114b32011-02-18 10:14:07 -08003627
3628/**
3629 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
3630 *
3631 * Called when CDMA subscription source changed.
3632 *
3633 * "data" is int *
3634 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3635 */
Wink Saville29487ef2011-04-15 09:15:31 -07003636#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
Wink Savillec0114b32011-02-18 10:14:07 -08003637
3638/**
3639 * RIL_UNSOL_CDMA_PRL_CHANGED
3640 *
3641 * Called when PRL (preferred roaming list) changes.
3642 *
3643 * "data" is int *
3644 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
3645 */
3646#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
3647
3648/**
3649 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
3650 *
3651 * Called when Emergency Callback Mode Ends
3652 *
3653 * Indicates that the radio system selection module has
3654 * proactively exited emergency callback mode.
3655 *
3656 * "data" is NULL
3657 *
3658 */
3659#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
3660
Wink Saville5b9df332011-04-06 16:24:21 -07003661/**
3662 * RIL_UNSOL_RIL_CONNECTED
3663 *
3664 * Called the ril connects and returns the version
3665 *
3666 * "data" is int *
3667 * ((int *)data)[0] is RIL_VERSION
3668 */
3669#define RIL_UNSOL_RIL_CONNECTED 1034
3670
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003671/***********************************************************************/
3672
3673
3674/**
3675 * RIL_Request Function pointer
3676 *
3677 * @param request is one of RIL_REQUEST_*
3678 * @param data is pointer to data defined for that RIL_REQUEST_*
3679 * data is owned by caller, and should not be modified or freed by callee
3680 * @param t should be used in subsequent call to RIL_onResponse
3681 * @param datalen the length of data
3682 *
3683 */
Wink Saville7f856802009-06-09 10:23:37 -07003684typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003685 size_t datalen, RIL_Token t);
3686
3687/**
3688 * This function should return the current radio state synchronously
3689 */
3690typedef RIL_RadioState (*RIL_RadioStateRequest)();
3691
3692/**
3693 * This function returns "1" if the specified RIL_REQUEST code is
3694 * supported and 0 if it is not
3695 *
3696 * @param requestCode is one of RIL_REQUEST codes
3697 */
3698
3699typedef int (*RIL_Supports)(int requestCode);
3700
3701/**
Wink Saville7f856802009-06-09 10:23:37 -07003702 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003703 * thread that calls RIL_RequestFunc--and indicates that a pending
3704 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07003705 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003706 * On cancel, the callee should do its best to abandon the request and
3707 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
3708 *
3709 * Subsequent calls to RIL_onRequestComplete for this request with
3710 * other results will be tolerated but ignored. (That is, it is valid
3711 * to ignore the cancellation request)
3712 *
3713 * RIL_Cancel calls should return immediately, and not wait for cancellation
3714 *
Wink Saville7f856802009-06-09 10:23:37 -07003715 * 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 -08003716 * interface
3717 *
3718 * @param t token wants to be canceled
3719 */
3720
3721typedef void (*RIL_Cancel)(RIL_Token t);
3722
3723typedef void (*RIL_TimedCallback) (void *param);
3724
3725/**
3726 * Return a version string for your RIL implementation
3727 */
3728typedef const char * (*RIL_GetVersion) (void);
3729
3730typedef struct {
3731 int version; /* set to RIL_VERSION */
3732 RIL_RequestFunc onRequest;
3733 RIL_RadioStateRequest onStateRequest;
3734 RIL_Supports supports;
3735 RIL_Cancel onCancel;
3736 RIL_GetVersion getVersion;
3737} RIL_RadioFunctions;
3738
3739#ifdef RIL_SHLIB
3740struct RIL_Env {
3741 /**
3742 * "t" is parameter passed in on previous call to RIL_Notification
3743 * routine.
3744 *
3745 * If "e" != SUCCESS, then response can be null/is ignored
3746 *
Wink Saville7f856802009-06-09 10:23:37 -07003747 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003748 * freed by callee
3749 *
3750 * RIL_onRequestComplete will return as soon as possible
3751 */
Wink Saville7f856802009-06-09 10:23:37 -07003752 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003753 void *response, size_t responselen);
3754
3755 /**
3756 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
3757 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3758 *
3759 * "data" is owned by caller, and should not be modified or freed by callee
3760 */
3761
Wink Saville7f856802009-06-09 10:23:37 -07003762 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003763 size_t datalen);
3764
3765 /**
Wink Saville7f856802009-06-09 10:23:37 -07003766 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003767 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3768 * a relative time value at which the callback is invoked. If relativeTime is
3769 * NULL or points to a 0-filled structure, the callback will be invoked as
3770 * soon as possible
3771 */
3772
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07003773 void (*RequestTimedCallback) (RIL_TimedCallback callback,
Wink Saville7f856802009-06-09 10:23:37 -07003774 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003775};
3776
3777
Wink Saville7f856802009-06-09 10:23:37 -07003778/**
3779 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003780 * argc and argv will be command line arguments intended for the RIL implementation
3781 * Return NULL on error
3782 *
3783 * @param env is environment point defined as RIL_Env
3784 * @param argc number of arguments
3785 * @param argv list fo arguments
3786 *
3787 */
3788const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
3789
3790#else /* RIL_SHLIB */
3791
3792/**
3793 * Call this once at startup to register notification routine
3794 *
3795 * @param callbacks user-specifed callback function
3796 */
3797void RIL_register (const RIL_RadioFunctions *callbacks);
3798
3799
3800/**
3801 *
3802 * RIL_onRequestComplete will return as soon as possible
3803 *
3804 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07003805 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003806 * @param e error code
3807 * if "e" != SUCCESS, then response can be null/is ignored
3808 * @param response is owned by caller, and should not be modified or
3809 * freed by callee
3810 * @param responselen the length of response in byte
3811 */
Wink Saville7f856802009-06-09 10:23:37 -07003812void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003813 void *response, size_t responselen);
3814
3815/**
3816 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
3817 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3818 * "data" is owned by caller, and should not be modified or freed by callee
3819 * @param datalen the length of data in byte
3820 */
3821
Wink Saville7f856802009-06-09 10:23:37 -07003822void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003823 size_t datalen);
3824
3825
3826/**
Wink Saville7f856802009-06-09 10:23:37 -07003827 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003828 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3829 * a relative time value at which the callback is invoked. If relativeTime is
3830 * NULL or points to a 0-filled structure, the callback will be invoked as
3831 * soon as possible
3832 *
3833 * @param callback user-specifed callback function
3834 * @param param parameter list
3835 * @param relativeTime a relative time value at which the callback is invoked
3836 */
3837
Dianne Hackborn0d9f0c02010-06-25 16:50:46 -07003838void RIL_requestTimedCallback (RIL_TimedCallback callback,
3839 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003840
3841
3842#endif /* RIL_SHLIB */
3843
3844#ifdef __cplusplus
3845}
3846#endif
3847
3848#endif /*ANDROID_RIL_H*/