blob: e921fa60d5e9566868ecacfaf5cd3034a845badb [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 Saville1b5fd232009-04-22 14:50:00 -070017 /* ISSUES:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080018 * - SMS retransmit (specifying TP-Message-ID)
19 *
20 */
21
22/**
23 * TODO
24 *
25 * Supp Service Notification (+CSSN)
26 * GPRS PDP context deactivate notification
Wink Saville7f856802009-06-09 10:23:37 -070027 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080028 */
29
30
Wink Saville7f856802009-06-09 10:23:37 -070031#ifndef ANDROID_RIL_H
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080032#define ANDROID_RIL_H 1
33
34#include <stdlib.h>
Wink Savillef4c4d362009-04-02 01:37:03 -070035#ifndef FEATURE_UNIT_TEST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080036#include <sys/time.h>
Wink Savillef4c4d362009-04-02 01:37:03 -070037#endif /* !FEATURE_UNIT_TEST */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080038
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43#define RIL_VERSION 2
44
Wink Savillea592eeb2009-05-22 13:26:36 -070045#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
46#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
47
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080048typedef void * RIL_Token;
49
50typedef enum {
51 RIL_E_SUCCESS = 0,
52 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
53 RIL_E_GENERIC_FAILURE = 2,
54 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
55 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
56 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
57 RIL_E_REQUEST_NOT_SUPPORTED = 6,
58 RIL_E_CANCELLED = 7,
59 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
60 call on a Class C GPRS device */
61 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
62 registers in network */
Wink Saville3d54e742009-05-18 18:00:44 -070063 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
64 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
65 shall be retrieved because of SIM or RUIM
Wink Savillef4c4d362009-04-02 01:37:03 -070066 card absent */
Wink Saville3d54e742009-05-18 18:00:44 -070067 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
Wink Savillef4c4d362009-04-02 01:37:03 -070068 location */
jsh602f80f2009-07-10 15:44:37 -070069 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
70 RIL_E_FDN_CHECK_FAILURE = 14 /* command failed because recipient is not on FDN list */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080071} RIL_Errno;
72
73typedef enum {
74 RIL_CALL_ACTIVE = 0,
75 RIL_CALL_HOLDING = 1,
76 RIL_CALL_DIALING = 2, /* MO call only */
77 RIL_CALL_ALERTING = 3, /* MO call only */
78 RIL_CALL_INCOMING = 4, /* MT call only */
79 RIL_CALL_WAITING = 5 /* MT call only */
80} RIL_CallState;
81
82typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -070083 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
84 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
85 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
Wink Saville7f856802009-06-09 10:23:37 -070086 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -070087 personalization locked, or SIM absent */
88 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
89 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
90 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
Wink Saville7f856802009-06-09 10:23:37 -070091 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -070092 personalization locked, or RUIM absent */
93 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
94 RADIO_STATE_NV_READY = 9 /* Radio is on and the NV interface is available */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080095} RIL_RadioState;
96
Wink Saville1b5fd232009-04-22 14:50:00 -070097 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
98typedef struct {
99 char isPresent; /* non-zero if signal information record is present */
100 char signalType; /* as defined 3.7.5.5-1 */
101 char alertPitch; /* as defined 3.7.5.5-2 */
102 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
103} RIL_CDMA_SignalInfoRecord;
104
Wink Saville1b5fd232009-04-22 14:50:00 -0700105typedef struct {
106 RIL_CallState state;
107 int index; /* Connection Index for use with, eg, AT+CHLD */
108 int toa; /* type of address, eg 145 = intl */
109 char isMpty; /* nonzero if is mpty call */
110 char isMT; /* nonzero if call is mobile terminated */
111 char als; /* ALS line indicator if available
112 (0 = line 1) */
113 char isVoice; /* nonzero if this is is a voice call */
114 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
115 char * number; /* Remote party number */
116 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
117 char * name; /* Remote party name */
118 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800119} RIL_Call;
120
121typedef struct {
122 int cid; /* Context ID */
Wink Saville1b5fd232009-04-22 14:50:00 -0700123 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800124 char * type; /* X.25, IP, IPV6, etc. */
125 char * apn;
126 char * address;
Wink Savillef4c4d362009-04-02 01:37:03 -0700127} RIL_Data_Call_Response;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800128
129typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800130 int messageRef; /* TP-Message-Reference for GSM,
131 and BearerData MessageId for CDMA
132 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800133 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700134 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
135 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
136 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800137} RIL_SMS_Response;
138
139/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
140typedef struct {
141 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
142 /* 0 = "REC UNREAD" */
143 /* 1 = "REC READ" */
144 /* 2 = "STO UNSENT" */
145 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700146 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
147 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800148 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
149 (as expected by TS 27.005) or NULL for default SMSC */
150} RIL_SMS_WriteArgs;
151
152/** Used by RIL_REQUEST_DIAL */
153typedef struct {
154 char * address;
155 int clir;
156 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
157 * clir == 0 on "use subscription default value"
158 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
159 * clir == 2 on "CLIR suppression" (allow CLI presentation)
160 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800161} RIL_Dial;
162
163typedef struct {
164 int command; /* one of the commands listed for TS 27.007 +CRSM*/
165 int fileid; /* EF id */
166 char *path; /* "pathid" from TS 27.007 +CRSM command.
167 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700168 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800169 */
170 int p1;
171 int p2;
172 int p3;
173 char *data; /* May be NULL*/
174 char *pin2; /* May be NULL*/
175} RIL_SIM_IO;
176
177typedef struct {
178 int sw1;
179 int sw2;
180 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
181} RIL_SIM_IO_Response;
182
183/* See also com.android.internal.telephony.gsm.CallForwardInfo */
184
185typedef struct {
186 int status; /*
187 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
188 * status 1 = active, 0 = not active
189 *
190 * For RIL_REQUEST_SET_CALL_FORWARD:
191 * status is:
192 * 0 = disable
193 * 1 = enable
194 * 2 = interrogate
195 * 3 = registeration
196 * 4 = erasure
197 */
198
Wink Saville3d54e742009-05-18 18:00:44 -0700199 int reason; /* from TS 27.007 7.11 "reason" */
200 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
201 See table for Android mapping from
202 MMI service code
203 0 means user doesn't input class */
204 int toa; /* "type" from TS 27.007 7.11 */
205 char * number; /* "number" from TS 27.007 7.11. May be NULL */
206 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800207}RIL_CallForwardInfo;
208
209typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700210 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
211 * Upper 16 bits is LAC and lower 16 bits
212 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800213 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700214 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700215 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800216 */
johnwange0ba6a92009-09-11 19:14:52 -0700217 int rssi; /* Received RSSI in GSM,
218 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800219 */
220} RIL_NeighboringCell;
221
222/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
223typedef enum {
224 CALL_FAIL_NORMAL = 16,
225 CALL_FAIL_BUSY = 17,
226 CALL_FAIL_CONGESTION = 34,
227 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
228 CALL_FAIL_CALL_BARRED = 240,
229 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700230 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
231 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Wink Saville1b5fd232009-04-22 14:50:00 -0700232 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
233 CALL_FAIL_CDMA_DROP = 1001,
234 CALL_FAIL_CDMA_INTERCEPT = 1002,
235 CALL_FAIL_CDMA_REORDER = 1003,
236 CALL_FAIL_CDMA_SO_REJECT = 1004,
237 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
238 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
239 CALL_FAIL_CDMA_PREEMPTED = 1007,
240 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
241 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700242 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800243 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
244} RIL_LastCallFailCause;
245
Wink Savillef4c4d362009-04-02 01:37:03 -0700246/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800247typedef enum {
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700248 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
249 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
250 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
251 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
252 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
253 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
254 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
255 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
256 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
257 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
258 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
259 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
260 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* This and all other cases: retry silently */
261 /* Not mentioned in the specification */
262 PDP_FAIL_REGISTRATION_FAIL = -1,
263 PDP_FAIL_GPRS_REGISTRATION_FAIL = -2,
Wink Savillef4c4d362009-04-02 01:37:03 -0700264} RIL_LastDataCallActivateFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800265
jsh602f80f2009-07-10 15:44:37 -0700266/* See RIL_REQUEST_SETUP_DATA_CALL */
267typedef enum {
268 RIL_DATA_PROFILE_DEFAULT = 0,
269 RIL_DATA_PROFILE_TETHERED = 1,
270 RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */
271} RIL_DataProfile;
272
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800273/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
274typedef struct {
275 int notificationType; /*
276 * 0 = MO intermediate result code
277 * 1 = MT unsolicited result code
278 */
279 int code; /* See 27.007 7.17
280 "code1" for MO
281 "code2" for MT. */
282 int index; /* CUG index. See 27.007 7.17. */
283 int type; /* "type" from 27.007 7.17 (MT only). */
284 char * number; /* "number" from 27.007 7.17
285 (MT only, may be NULL). */
286} RIL_SuppSvcNotification;
287
Wink Savillef4c4d362009-04-02 01:37:03 -0700288#define RIL_CARD_MAX_APPS 8
289
290typedef enum {
291 RIL_CARDSTATE_ABSENT = 0,
292 RIL_CARDSTATE_PRESENT = 1,
293 RIL_CARDSTATE_ERROR = 2
294} RIL_CardState;
295
296typedef enum {
297 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
298 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700299 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
300 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700301 involved */
302 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
303 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
304 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
305 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
306 RIL_PERSOSUBSTATE_SIM_SIM = 7,
307 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
308 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
309 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
310 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
311 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
312 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
313 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
314 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
315 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
316 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
317 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
318 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
319 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
320 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
321 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
322 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
323 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
324} RIL_PersoSubstate;
325
326typedef enum {
327 RIL_APPSTATE_UNKNOWN = 0,
328 RIL_APPSTATE_DETECTED = 1,
329 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
330 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700331 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700332 when app_state is assigned to this value */
333 RIL_APPSTATE_READY = 5
334} RIL_AppState;
335
336typedef enum {
337 RIL_PINSTATE_UNKNOWN = 0,
338 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
339 RIL_PINSTATE_ENABLED_VERIFIED = 2,
340 RIL_PINSTATE_DISABLED = 3,
341 RIL_PINSTATE_ENABLED_BLOCKED = 4,
342 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
343} RIL_PinState;
344
345typedef enum {
346 RIL_APPTYPE_UNKNOWN = 0,
347 RIL_APPTYPE_SIM = 1,
348 RIL_APPTYPE_USIM = 2,
349 RIL_APPTYPE_RUIM = 3,
350 RIL_APPTYPE_CSIM = 4
351} RIL_AppType;
352
353typedef struct
354{
Wink Saville7f856802009-06-09 10:23:37 -0700355 RIL_AppType app_type;
356 RIL_AppState app_state;
357 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -0700358 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -0700359 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -0700360 0x30, 0x30, 0x30 */
361 char *app_label_ptr; /* null terminated string */
362 int pin1_replaced; /* applicable to USIM and CSIM */
Wink Saville7f856802009-06-09 10:23:37 -0700363 RIL_PinState pin1;
364 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -0700365} RIL_AppStatus;
366
367typedef struct
368{
Wink Saville7f856802009-06-09 10:23:37 -0700369 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -0700370 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
371 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
372 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
373 int num_applications; /* value <= RIL_CARD_MAX_APPS */
374 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
375} RIL_CardStatus;
376
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800377/* The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH */
378typedef enum {
379 /* A file on SIM has been updated. data[1] contains the EFID. */
380 SIM_FILE_UPDATE = 0,
381 /* SIM initialized. All files should be re-read. */
382 SIM_INIT = 1,
383 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
384 SIM_RESET = 2
385} RIL_SimRefreshResult;
386
Wink Saville1b5fd232009-04-22 14:50:00 -0700387typedef struct {
388 char * number; /* Remote party number */
389 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
390 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -0700391 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Saville1b5fd232009-04-22 14:50:00 -0700392} RIL_CDMA_CallWaiting;
393
Wink Savillea592eeb2009-05-22 13:26:36 -0700394/**
395 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
396 *
397 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
398 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
399 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
400 * CBM message ID.
401 *
402 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
403 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
404 * and 9.4.4.2.3 for UMTS.
405 * All other values can be treated as empty CBM data coding scheme.
406 *
407 * selected 0 means message types specified in <fromServiceId, toServiceId>
408 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
409 *
410 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
411 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
412 */
Wink Savillef4c4d362009-04-02 01:37:03 -0700413typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -0700414 int fromServiceId;
415 int toServiceId;
416 int fromCodeScheme;
417 int toCodeScheme;
418 unsigned char selected;
419} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -0700420
The Android Open Source Project34a51082009-03-05 14:34:37 -0800421/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
422#define RIL_RESTRICTED_STATE_NONE 0x00
423/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
424#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
425/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
426#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -0700427/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -0800428#define RIL_RESTRICTED_STATE_CS_ALL 0x04
429/* Block packet data access due to restriction. */
430#define RIL_RESTRICTED_STATE_PS_ALL 0x10
431
Wink Saville1b5fd232009-04-22 14:50:00 -0700432/* The status for an OTASP/OTAPA session */
433typedef enum {
434 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
435 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
436 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
437 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
438 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
439 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
440 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
441 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
442 CDMA_OTA_PROVISION_STATUS_COMMITTED,
443 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
444 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
445 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
446} RIL_CDMA_OTA_ProvisionStatus;
447
448typedef struct {
449 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
450 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
451} RIL_GW_SignalStrength;
452
453
454typedef struct {
455 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
456 * multiplied by -1. Example: If the actual RSSI is -75, then this response
457 * value will be 75.
458 */
459 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
460 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
461 * will be 125.
462 */
463} RIL_CDMA_SignalStrength;
464
465
466typedef struct {
467 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
468 * multiplied by -1. Example: If the actual RSSI is -75, then this response
469 * value will be 75.
470 */
471 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
472 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
473 * will be 125.
474 */
475 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
476} RIL_EVDO_SignalStrength;
477
478
479typedef struct {
480 RIL_GW_SignalStrength GW_SignalStrength;
481 RIL_CDMA_SignalStrength CDMA_SignalStrength;
482 RIL_EVDO_SignalStrength EVDO_SignalStrength;
483} RIL_SignalStrength;
484
485/* Names of the CDMA info records (C.S0005 section 3.7.5) */
486typedef enum {
487 RIL_CDMA_DISPLAY_INFO_REC,
488 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
489 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
490 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
491 RIL_CDMA_SIGNAL_INFO_REC,
492 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
493 RIL_CDMA_LINE_CONTROL_INFO_REC,
494 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
495 RIL_CDMA_T53_CLIR_INFO_REC,
496 RIL_CDMA_T53_RELEASE_INFO_REC,
497 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
498} RIL_CDMA_InfoRecName;
499
500/* Display Info Rec as defined in C.S0005 section 3.7.5.1
501 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
502 Note: the Extended Display info rec contains multiple records of the
503 form: display_tag, display_len, and display_len occurrences of the
504 chari field if the display_tag is not 10000000 or 10000001.
505 To save space, the records are stored consecutively in a byte buffer.
506 The display_tag, display_len and chari fields are all 1 byte.
507*/
508
509typedef struct {
510 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -0700511 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -0700512} RIL_CDMA_DisplayInfoRecord;
513
514/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
515 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
516 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
517*/
518
519typedef struct {
520 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -0700521 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -0700522 char number_type;
523 char number_plan;
524 char pi;
525 char si;
526} RIL_CDMA_NumberInfoRecord;
527
528/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
529typedef enum {
530 RIL_REDIRECTING_REASON_UNKNOWN = 0,
531 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
532 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
533 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
534 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
535 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
536 RIL_REDIRECTING_REASON_RESERVED
537} RIL_CDMA_RedirectingReason;
538
539typedef struct {
540 RIL_CDMA_NumberInfoRecord redirectingNumber;
541 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
542 RIL_CDMA_RedirectingReason redirectingReason;
543} RIL_CDMA_RedirectingNumberInfoRecord;
544
545/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
546typedef struct {
547 char lineCtrlPolarityIncluded;
548 char lineCtrlToggle;
549 char lineCtrlReverse;
550 char lineCtrlPowerDenial;
551} RIL_CDMA_LineControlInfoRecord;
552
553/* T53 CLIR Information Record */
554typedef struct {
555 char cause;
556} RIL_CDMA_T53_CLIRInfoRecord;
557
558/* T53 Audio Control Information Record */
559typedef struct {
560 char upLink;
561 char downLink;
562} RIL_CDMA_T53_AudioControlInfoRecord;
563
564typedef struct {
565
566 RIL_CDMA_InfoRecName name;
567
568 union {
569 /* Display and Extended Display Info Rec */
570 RIL_CDMA_DisplayInfoRecord display;
571
572 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
573 RIL_CDMA_NumberInfoRecord number;
574
575 /* Signal Info Rec */
576 RIL_CDMA_SignalInfoRecord signal;
577
578 /* Redirecting Number Info Rec */
579 RIL_CDMA_RedirectingNumberInfoRecord redir;
580
581 /* Line Control Info Rec */
582 RIL_CDMA_LineControlInfoRecord lineCtrl;
583
584 /* T53 CLIR Info Rec */
585 RIL_CDMA_T53_CLIRInfoRecord clir;
586
587 /* T53 Audio Control Info Rec */
588 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
589 } rec;
590} RIL_CDMA_InformationRecord;
591
592#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
593
594typedef struct {
595 char numberOfInfoRecs;
596 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
597} RIL_CDMA_InformationRecords;
598
Wink Saville7f856802009-06-09 10:23:37 -0700599/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800600 * RIL_REQUEST_GET_SIM_STATUS
601 *
602 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -0700603 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800604 * "data" is NULL
605 *
Wink Savillef4c4d362009-04-02 01:37:03 -0700606 * "response" is const RIL_CardStatus *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800607 *
608 * Valid errors:
609 * Must never fail
610 */
611#define RIL_REQUEST_GET_SIM_STATUS 1
612
613/**
614 * RIL_REQUEST_ENTER_SIM_PIN
615 *
John Wang309ac292009-07-30 14:53:23 -0700616 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800617 *
618 * "data" is const char **
619 * ((const char **)data)[0] is PIN value
620 *
jsh593c9102009-06-24 16:13:44 -0700621 * "response" is int *
622 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800623 *
624 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700625 *
626 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800627 * RADIO_NOT_AVAILABLE (radio resetting)
628 * GENERIC_FAILURE
629 * PASSWORD_INCORRECT
630 */
631
632#define RIL_REQUEST_ENTER_SIM_PIN 2
633
634
635/**
636 * RIL_REQUEST_ENTER_SIM_PUK
637 *
Wink Saville7f856802009-06-09 10:23:37 -0700638 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800639 *
640 * "data" is const char **
641 * ((const char **)data)[0] is PUK value
642 * ((const char **)data)[1] is new PIN value
643 *
jsh593c9102009-06-24 16:13:44 -0700644 * "response" is int *
645 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800646 *
647 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700648 *
649 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800650 * RADIO_NOT_AVAILABLE (radio resetting)
651 * GENERIC_FAILURE
652 * PASSWORD_INCORRECT
653 * (PUK is invalid)
654 */
655
656#define RIL_REQUEST_ENTER_SIM_PUK 3
657
658/**
659 * RIL_REQUEST_ENTER_SIM_PIN2
660 *
661 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
662 * returned as a a failure from a previous operation.
663 *
664 * "data" is const char **
665 * ((const char **)data)[0] is PIN2 value
666 *
jsh593c9102009-06-24 16:13:44 -0700667 * "response" is int *
668 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800669 *
670 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700671 *
672 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800673 * RADIO_NOT_AVAILABLE (radio resetting)
674 * GENERIC_FAILURE
675 * PASSWORD_INCORRECT
676 */
677
678#define RIL_REQUEST_ENTER_SIM_PIN2 4
679
680/**
681 * RIL_REQUEST_ENTER_SIM_PUK2
682 *
Wink Saville7f856802009-06-09 10:23:37 -0700683 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800684 *
685 * "data" is const char **
686 * ((const char **)data)[0] is PUK2 value
687 * ((const char **)data)[1] is new PIN2 value
688 *
jsh593c9102009-06-24 16:13:44 -0700689 * "response" is int *
690 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800691 *
692 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700693 *
694 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800695 * RADIO_NOT_AVAILABLE (radio resetting)
696 * GENERIC_FAILURE
697 * PASSWORD_INCORRECT
698 * (PUK2 is invalid)
699 */
700
701#define RIL_REQUEST_ENTER_SIM_PUK2 5
702
703/**
704 * RIL_REQUEST_CHANGE_SIM_PIN
705 *
Wink Saville7f856802009-06-09 10:23:37 -0700706 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800707 *
708 * "data" is const char **
709 * ((const char **)data)[0] is old PIN value
710 * ((const char **)data)[1] is new PIN value
711 *
jsh593c9102009-06-24 16:13:44 -0700712 * "response" is int *
713 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800714 *
715 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700716 *
717 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800718 * RADIO_NOT_AVAILABLE (radio resetting)
719 * GENERIC_FAILURE
720 * PASSWORD_INCORRECT
721 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -0700722 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800723 */
724
725#define RIL_REQUEST_CHANGE_SIM_PIN 6
726
727
728/**
729 * RIL_REQUEST_CHANGE_SIM_PIN2
730 *
Wink Saville7f856802009-06-09 10:23:37 -0700731 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800732 *
733 * "data" is const char **
734 * ((const char **)data)[0] is old PIN2 value
735 * ((const char **)data)[1] is new PIN2 value
736 *
jsh593c9102009-06-24 16:13:44 -0700737 * "response" is int *
738 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800739 *
740 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700741 *
742 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800743 * RADIO_NOT_AVAILABLE (radio resetting)
744 * GENERIC_FAILURE
745 * PASSWORD_INCORRECT
746 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -0700747 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800748 */
749
750#define RIL_REQUEST_CHANGE_SIM_PIN2 7
751
752/**
753 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
754 *
755 * Requests that network personlization be deactivated
756 *
757 * "data" is const char **
758 * ((const char **)(data))[0]] is network depersonlization code
759 *
jsh593c9102009-06-24 16:13:44 -0700760 * "response" is int *
761 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800762 *
763 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700764 *
765 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800766 * RADIO_NOT_AVAILABLE (radio resetting)
767 * GENERIC_FAILURE
768 * PASSWORD_INCORRECT
769 * (code is invalid)
770 */
771
772#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
773
774/**
Wink Saville7f856802009-06-09 10:23:37 -0700775 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800776 *
777 * Requests current call list
778 *
779 * "data" is NULL
780 *
781 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -0700782 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800783 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700784 *
785 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800786 * RADIO_NOT_AVAILABLE (radio resetting)
787 * GENERIC_FAILURE
788 * (request will be made again in a few hundred msec)
789 */
790
791#define RIL_REQUEST_GET_CURRENT_CALLS 9
792
793
Wink Saville7f856802009-06-09 10:23:37 -0700794/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800795 * RIL_REQUEST_DIAL
796 *
797 * Initiate voice call
798 *
799 * "data" is const RIL_Dial *
800 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -0700801 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800802 * This method is never used for supplementary service codes
803 *
804 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700805 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800806 * RADIO_NOT_AVAILABLE (radio resetting)
807 * GENERIC_FAILURE
808 */
809#define RIL_REQUEST_DIAL 10
810
811/**
812 * RIL_REQUEST_GET_IMSI
813 *
814 * Get the SIM IMSI
815 *
816 * Only valid when radio state is "RADIO_STATE_SIM_READY"
817 *
818 * "data" is NULL
819 * "response" is a const char * containing the IMSI
820 *
821 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700822 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800823 * RADIO_NOT_AVAILABLE (radio resetting)
824 * GENERIC_FAILURE
825 */
826
827#define RIL_REQUEST_GET_IMSI 11
828
829/**
830 * RIL_REQUEST_HANGUP
831 *
832 * Hang up a specific line (like AT+CHLD=1x)
833 *
Wink Saville7f856802009-06-09 10:23:37 -0700834 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -0700835 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800836 *
837 * "response" is NULL
838 *
839 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700840 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800841 * RADIO_NOT_AVAILABLE (radio resetting)
842 * GENERIC_FAILURE
843 */
844
845#define RIL_REQUEST_HANGUP 12
846
847/**
848 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
849 *
850 * Hang up waiting or held (like AT+CHLD=0)
851 *
852 * "data" is NULL
853 * "response" is NULL
854 *
855 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700856 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800857 * RADIO_NOT_AVAILABLE (radio resetting)
858 * GENERIC_FAILURE
859 */
860
861#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
862
863/**
864 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
865 *
866 * Hang up waiting or held (like AT+CHLD=1)
867 *
868 * "data" is NULL
869 * "response" is NULL
870 *
871 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700872 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800873 * RADIO_NOT_AVAILABLE (radio resetting)
874 * GENERIC_FAILURE
875 */
876
877#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
878
879/**
880 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
881 *
882 * Switch waiting or holding call and active call (like AT+CHLD=2)
883 *
884 * State transitions should be is follows:
885 *
886 * If call 1 is waiting and call 2 is active, then if this re
887 *
888 * BEFORE AFTER
889 * Call 1 Call 2 Call 1 Call 2
890 * ACTIVE HOLDING HOLDING ACTIVE
891 * ACTIVE WAITING HOLDING ACTIVE
892 * HOLDING WAITING HOLDING ACTIVE
893 * ACTIVE IDLE HOLDING IDLE
894 * IDLE IDLE IDLE IDLE
895 *
896 * "data" is NULL
897 * "response" is NULL
898 *
899 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700900 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800901 * RADIO_NOT_AVAILABLE (radio resetting)
902 * GENERIC_FAILURE
903 */
904
905#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
906#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
907
908/**
909 * RIL_REQUEST_CONFERENCE
910 *
911 * Conference holding and active (like AT+CHLD=3)
912
913 * "data" is NULL
914 * "response" is NULL
915 *
916 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700917 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800918 * RADIO_NOT_AVAILABLE (radio resetting)
919 * GENERIC_FAILURE
920 */
921#define RIL_REQUEST_CONFERENCE 16
922
923/**
924 * RIL_REQUEST_UDUB
925 *
Wink Saville7f856802009-06-09 10:23:37 -0700926 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800927 * waiting call answer)(RIL_BasicRequest r);
928 *
929 * "data" is NULL
930 * "response" is NULL
931 *
932 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700933 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800934 * RADIO_NOT_AVAILABLE (radio resetting)
935 * GENERIC_FAILURE
936 */
937#define RIL_REQUEST_UDUB 17
938
939/**
940 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
941 *
942 * Requests the failure cause code for the most recently terminated call
943 *
944 * "data" is NULL
945 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -0700946 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700947 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
948 * failure reasons are derived from the possible call failure scenarios
949 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800950 *
The Android Open Source Project34a51082009-03-05 14:34:37 -0800951 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
952 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
953 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800954 * If the implementation does not have access to the exact cause codes,
955 * then it should return one of the values listed in RIL_LastCallFailCause,
956 * as the UI layer needs to distinguish these cases for tone generation or
957 * error notification.
958 *
959 * Valid errors:
960 * SUCCESS
961 * RADIO_NOT_AVAILABLE
962 * GENERIC_FAILURE
963 *
Wink Savillef4c4d362009-04-02 01:37:03 -0700964 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800965 */
966#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
967
968/**
969 * RIL_REQUEST_SIGNAL_STRENGTH
970 *
Wink Saville1b5fd232009-04-22 14:50:00 -0700971 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800972 *
973 * Must succeed if radio is on.
974 *
975 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -0700976 *
977 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800978 *
979 * Valid errors:
980 * SUCCESS
981 * RADIO_NOT_AVAILABLE
982 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800983#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -0700984
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800985/**
986 * RIL_REQUEST_REGISTRATION_STATE
987 *
988 * Request current registration state
989 *
990 * "data" is NULL
991 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -0700992 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -0700993 * 0 - Not registered, MT is not currently searching
994 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -0700995 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -0700996 * 2 - Not registered, but MT is currently searching
997 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -0700998 * 3 - Registration denied
999 * 4 - Unknown
1000 * 5 - Registered, roaming
Wink Saville1b5fd232009-04-22 14:50:00 -07001001 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1002 * NULL if not.Valid LAC are 0x0000 - 0xffff
1003 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1004 * NULL if not.
1005 * Valid CID are 0x00000000 - 0xffffffff
1006 * In GSM, CID is Cell ID (see TS 27.007)
1007 * in 16 bits
1008 * In UMTS, CID is UMTS Cell Identity
1009 * (see TS 25.331) in 28 bits
Wink Savillef4c4d362009-04-02 01:37:03 -07001010 * ((const char **)response)[3] indicates the available radio technology 0-7,
Wink Saville1b5fd232009-04-22 14:50:00 -07001011 * 0 - Unknown, 1 - GPRS, 2 - EDGE, 3 - UMTS,
1012 * 4 - IS95A, 5 - IS95B, 6 - 1xRTT,
Li Zhe3a63fbc2009-08-04 13:14:34 +08001013 * 7 - EvDo Rev. 0, 8 - EvDo Rev. A,
1014 * 9 - HSDPA, 10 - HSUPA, 11 - HSPA
Wink Saville1b5fd232009-04-22 14:50:00 -07001015 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1016 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07001017 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07001018 * ((const char **)response)[5] is Base Station latitude if registered on a
1019 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001020 * latitude is a decimal number as specified in
1021 * 3GPP2 C.S0005-A v6.0. It is represented in
1022 * units of 0.25 seconds and ranges from -1296000
1023 * to 1296000, both values inclusive (corresponding
1024 * to a range of -90° to +90°).
Wink Saville1b5fd232009-04-22 14:50:00 -07001025 * ((const char **)response)[6] is Base Station longitude if registered on a
1026 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001027 * longitude is a decimal number as specified in
1028 * 3GPP2 C.S0005-A v6.0. It is represented in
1029 * units of 0.25 seconds and ranges from -2592000
1030 * to 2592000, both values inclusive (corresponding
1031 * to a range of -180° to +180°).
Wink Saville1b5fd232009-04-22 14:50:00 -07001032 * ((const char **)response)[7] is concurrent services support indicator if
1033 * registered on a CDMA system 0-1.
1034 * 0 - Concurrent services not supported,
1035 * 1 - Concurrent services supported
1036 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1037 * NULL if not. Valid System ID are 0 - 32767
1038 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1039 * NULL if not. Valid System ID are 0 - 65535
1040 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001041 * on a CDMA or EVDO system or NULL if not. Valid values
Wink Saville1b5fd232009-04-22 14:50:00 -07001042 * are 0-255.
1043 * ((const char **)response)[11] indicates whether the current system is in the
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001044 * PRL if registered on a CDMA or EVDO system or NULL if
Wink Saville1b5fd232009-04-22 14:50:00 -07001045 * not. 0=not in the PRL, 1=in the PRL
1046 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001047 * if registered on a CDMA or EVDO system or NULL if not.
Wink Saville1b5fd232009-04-22 14:50:00 -07001048 * Valid values are 0-255.
1049 * ((const char **)response)[13] if registration state is 3 (Registration
1050 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07001051 * registration was denied. See 3GPP TS 24.008,
1052 * 10.5.3.6 and Annex G.
1053 * 0 - General
1054 * 1 - Authentication Failure
1055 * 2 - IMSI unknown in HLR
1056 * 3 - Illegal MS
1057 * 4 - Illegal ME
1058 * 5 - PLMN not allowed
1059 * 6 - Location area not allowed
1060 * 7 - Roaming not allowed
1061 * 8 - No Suitable Cells in this Location Area
1062 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07001063 * 10 - Persistent location update reject
Wink Saville1b5fd232009-04-22 14:50:00 -07001064 *
1065 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001066 * as "out of service" in the Android telephony system
1067 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001068 * Registration state 3 can be returned if Location Update Reject
1069 * (with cause 17 - Network Failure) is received repeatedly from the network,
1070 * to facilitate "managed roaming"
1071 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001072 * Valid errors:
1073 * SUCCESS
1074 * RADIO_NOT_AVAILABLE
1075 * GENERIC_FAILURE
1076 */
1077#define RIL_REQUEST_REGISTRATION_STATE 20
1078
1079/**
1080 * RIL_REQUEST_GPRS_REGISTRATION_STATE
1081 *
1082 * Request current GPRS registration state
1083 *
1084 * "data" is NULL
1085 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08001086 * ((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 -08001087 * ((const char **)response)[1] is LAC if registered or NULL if not
1088 * ((const char **)response)[2] is CID if registered or NULL if not
1089 * ((const char **)response)[3] indicates the available radio technology, where:
1090 * 0 == unknown
1091 * 1 == GPRS only
1092 * 2 == EDGE
1093 * 3 == UMTS
Li Zhe3a63fbc2009-08-04 13:14:34 +08001094 * 9 == HSDPA
1095 * 10 == HSUPA
1096 * 11 == HSPA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001097 *
1098 * LAC and CID are in hexadecimal format.
1099 * valid LAC are 0x0000 - 0xffff
1100 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07001101 *
1102 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001103 * as "out of service" in the Android telephony system
1104 *
1105 * Valid errors:
1106 * SUCCESS
1107 * RADIO_NOT_AVAILABLE
1108 * GENERIC_FAILURE
1109 */
1110#define RIL_REQUEST_GPRS_REGISTRATION_STATE 21
1111
1112/**
1113 * RIL_REQUEST_OPERATOR
1114 *
1115 * Request current operator ONS or EONS
1116 *
1117 * "data" is NULL
1118 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07001119 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001120 * or NULL if unregistered
1121 *
Wink Saville7f856802009-06-09 10:23:37 -07001122 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001123 * or NULL if unregistered
1124 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1125 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07001126 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001127 * Valid errors:
1128 * SUCCESS
1129 * RADIO_NOT_AVAILABLE
1130 * GENERIC_FAILURE
1131 */
1132#define RIL_REQUEST_OPERATOR 22
1133
1134/**
1135 * RIL_REQUEST_RADIO_POWER
1136 *
1137 * Toggle radio on and off (for "airplane" mode)
1138 * "data" is int *
1139 * ((int *)data)[0] is > 0 for "Radio On"
1140 * ((int *)data)[0] is == 0 for "Radio Off"
1141 *
1142 * "response" is NULL
1143 *
1144 * Turn radio on if "on" > 0
1145 * Turn radio off if "on" == 0
1146 *
1147 * Valid errors:
1148 * SUCCESS
1149 * RADIO_NOT_AVAILABLE
1150 * GENERIC_FAILURE
1151 */
1152#define RIL_REQUEST_RADIO_POWER 23
1153
1154/**
1155 * RIL_REQUEST_DTMF
1156 *
1157 * Send a DTMF tone
1158 *
1159 * If the implementation is currently playing a tone requested via
1160 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1161 * should be played instead
1162 *
jsh602f80f2009-07-10 15:44:37 -07001163 * "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 -08001164 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001165 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001166 * FIXME should this block/mute microphone?
1167 * How does this interact with local DTMF feedback?
1168 *
1169 * Valid errors:
1170 * SUCCESS
1171 * RADIO_NOT_AVAILABLE
1172 * GENERIC_FAILURE
1173 *
1174 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1175 *
1176 */
1177#define RIL_REQUEST_DTMF 24
1178
1179/**
1180 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07001181 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001182 * Send an SMS message
1183 *
1184 * "data" is const char **
1185 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1186 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1187 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1188 * less the SMSC address
1189 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1190 *
1191 * "response" is a const RIL_SMS_Response *
1192 *
1193 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001194 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001195 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1196 *
1197 * Valid errors:
1198 * SUCCESS
1199 * RADIO_NOT_AVAILABLE
1200 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07001201 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001202 * GENERIC_FAILURE
1203 *
1204 * FIXME how do we specify TP-Message-Reference if we need to resend?
1205 */
1206#define RIL_REQUEST_SEND_SMS 25
1207
1208
1209/**
1210 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07001211 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001212 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1213 * except that more messages are expected to be sent soon. If possible,
1214 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1215 *
1216 * "data" is const char **
1217 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1218 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1219 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1220 * less the SMSC address
1221 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1222 *
1223 * "response" is a const RIL_SMS_Response *
1224 *
1225 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001226 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001227 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1228 *
1229 * Valid errors:
1230 * SUCCESS
1231 * RADIO_NOT_AVAILABLE
1232 * SMS_SEND_FAIL_RETRY
1233 * GENERIC_FAILURE
1234 *
1235 */
1236#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1237
1238
1239/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001240 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001241 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001242 * Setup a packet data connection
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001243 *
1244 * "data" is a const char **
Wink Saville7f856802009-06-09 10:23:37 -07001245 * ((const char **)data)[0] indicates whether to setup connection on radio technology CDMA
Wink Savillef4c4d362009-04-02 01:37:03 -07001246 * or GSM/UMTS, 0-1. 0 - CDMA, 1-GSM/UMTS
Wink Saville7f856802009-06-09 10:23:37 -07001247 *
jsh602f80f2009-07-10 15:44:37 -07001248 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07001249 * ((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 -07001250 * override the one in the profile. NULL indicates no APN overrride.
1251 * ((const char **)data)[3] is the username for APN, or NULL
1252 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07001253 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
1254 * 0 => PAP and CHAP is never performed.
1255 * 1 => PAP may be performed; CHAP is never performed.
1256 * 2 => CHAP may be performed; PAP is never performed.
1257 * 3 => PAP / CHAP may be performed - baseband dependent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001258 *
1259 * "response" is a char **
Wink Saville7f856802009-06-09 10:23:37 -07001260 * ((char **)response)[0] indicating PDP CID, which is generated by RIL. This Connection ID is
Wink Savillef4c4d362009-04-02 01:37:03 -07001261 * used in GSM/UMTS and CDMA
1262 * ((char **)response)[1] indicating the network interface name for GSM/UMTS or CDMA
Wink Saville7f856802009-06-09 10:23:37 -07001263 * ((char **)response)[2] indicating the IP address for this interface for GSM/UMTS
Wink Savillef4c4d362009-04-02 01:37:03 -07001264 * and NULL for CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001265 *
1266 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07001267 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001268 * replaces RIL_REQUEST_SETUP_DEFAULT_PDP
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001269 *
1270 * Valid errors:
1271 * SUCCESS
1272 * RADIO_NOT_AVAILABLE
1273 * GENERIC_FAILURE
1274 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001275 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001276 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001277#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001278
1279
1280
1281/**
1282 * RIL_REQUEST_SIM_IO
1283 *
1284 * Request SIM I/O operation.
1285 * This is similar to the TS 27.007 "restricted SIM" operation
1286 * where it assumes all of the EF selection will be done by the
1287 * callee.
1288 *
1289 * "data" is a const RIL_SIM_IO *
1290 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1291 * or may specify a PIN2 for operations that require a PIN2 (eg
1292 * updating FDN records)
1293 *
1294 * "response" is a const RIL_SIM_IO_Response *
1295 *
1296 * Arguments and responses that are unused for certain
1297 * values of "command" should be ignored or set to NULL
1298 *
1299 * Valid errors:
1300 * SUCCESS
1301 * RADIO_NOT_AVAILABLE
1302 * GENERIC_FAILURE
1303 * SIM_PIN2
1304 * SIM_PUK2
1305 */
1306#define RIL_REQUEST_SIM_IO 28
1307
1308/**
1309 * RIL_REQUEST_SEND_USSD
1310 *
1311 * Send a USSD message
1312 *
1313 * If a USSD session already exists, the message should be sent in the
1314 * context of that session. Otherwise, a new session should be created.
1315 *
1316 * The network reply should be reported via RIL_UNSOL_ON_USSD
1317 *
1318 * Only one USSD session may exist at a time, and the session is assumed
1319 * to exist until:
1320 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1321 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1322 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1323 *
1324 * "data" is a const char * containing the USSD request in UTF-8 format
1325 * "response" is NULL
1326 *
1327 * Valid errors:
1328 * SUCCESS
1329 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07001330 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001331 * GENERIC_FAILURE
1332 *
1333 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1334 */
1335
1336#define RIL_REQUEST_SEND_USSD 29
1337
1338/**
1339 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07001340 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001341 * Cancel the current USSD session if one exists
1342 *
1343 * "data" is null
1344 * "response" is NULL
1345 *
1346 * Valid errors:
1347 * SUCCESS
1348 * RADIO_NOT_AVAILABLE
Wink Saville7f856802009-06-09 10:23:37 -07001349 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001350 */
1351
1352#define RIL_REQUEST_CANCEL_USSD 30
1353
Wink Saville7f856802009-06-09 10:23:37 -07001354/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001355 * RIL_REQUEST_GET_CLIR
1356 *
1357 * Gets current CLIR status
1358 * "data" is NULL
1359 * "response" is int *
1360 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1361 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
1362 *
1363 * Valid errors:
1364 * SUCCESS
1365 * RADIO_NOT_AVAILABLE
1366 * GENERIC_FAILURE
1367 */
1368#define RIL_REQUEST_GET_CLIR 31
1369
1370/**
1371 * RIL_REQUEST_SET_CLIR
1372 *
1373 * "data" is int *
1374 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1375 *
1376 * "response" is NULL
1377 *
1378 * Valid errors:
1379 * SUCCESS
1380 * RADIO_NOT_AVAILABLE
1381 * GENERIC_FAILURE
1382 */
1383#define RIL_REQUEST_SET_CLIR 32
1384
1385/**
1386 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
1387 *
1388 * "data" is const RIL_CallForwardInfo *
1389 *
1390 * "response" is const RIL_CallForwardInfo **
1391 * "response" points to an array of RIL_CallForwardInfo *'s, one for
1392 * each distinct registered phone number.
1393 *
1394 * For example, if data is forwarded to +18005551212 and voice is forwarded
1395 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07001396 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001397 * If, however, both data and voice are forwarded to +18005551212, then
1398 * a single RIL_CallForwardInfo can be returned with the service class
1399 * set to "data + voice = 3")
1400 *
1401 * Valid errors:
1402 * SUCCESS
1403 * RADIO_NOT_AVAILABLE
1404 * GENERIC_FAILURE
1405 */
1406#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
1407
1408
1409/**
1410 * RIL_REQUEST_SET_CALL_FORWARD
1411 *
1412 * Configure call forward rule
1413 *
1414 * "data" is const RIL_CallForwardInfo *
1415 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001416 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001417 * Valid errors:
1418 * SUCCESS
1419 * RADIO_NOT_AVAILABLE
1420 * GENERIC_FAILURE
1421 */
1422#define RIL_REQUEST_SET_CALL_FORWARD 34
1423
1424
1425/**
1426 * RIL_REQUEST_QUERY_CALL_WAITING
1427 *
1428 * Query current call waiting state
1429 *
1430 * "data" is const int *
1431 * ((const int *)data)[0] is the TS 27.007 service class to query.
1432 * "response" is a const int *
1433 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
1434 *
1435 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
1436 * must follow, with the TS 27.007 service class bit vector of services
1437 * for which call waiting is enabled.
1438 *
Wink Saville7f856802009-06-09 10:23:37 -07001439 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001440 * ((const int *)response)[1] is 3, then call waiting is enabled for data
1441 * and voice and disabled for everything else
1442 *
1443 * Valid errors:
1444 * SUCCESS
1445 * RADIO_NOT_AVAILABLE
1446 * GENERIC_FAILURE
1447 */
1448#define RIL_REQUEST_QUERY_CALL_WAITING 35
1449
1450
1451/**
1452 * RIL_REQUEST_SET_CALL_WAITING
1453 *
1454 * Configure current call waiting state
1455 *
1456 * "data" is const int *
1457 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
1458 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
1459 * services to modify
1460 * "response" is NULL
1461 *
1462 * Valid errors:
1463 * SUCCESS
1464 * RADIO_NOT_AVAILABLE
1465 * GENERIC_FAILURE
1466 */
1467#define RIL_REQUEST_SET_CALL_WAITING 36
1468
1469/**
1470 * RIL_REQUEST_SMS_ACKNOWLEDGE
1471 *
1472 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07001473 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001474 *
1475 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07001476 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001477 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07001478 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001479 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07001480 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
1481 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
1482 * capacity exceeded) and 0xFF (unspecified error) are
1483 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001484 *
1485 * "response" is NULL
1486 *
1487 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
1488 *
1489 * Valid errors:
1490 * SUCCESS
1491 * RADIO_NOT_AVAILABLE
1492 * GENERIC_FAILURE
1493 */
1494#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
1495
1496/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001497 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001498 *
1499 * Get the device IMEI, including check digit
1500 *
johnwangf8bc1672009-05-14 19:19:47 -07001501 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001502 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1503 *
1504 * "data" is NULL
1505 * "response" is a const char * containing the IMEI
1506 *
1507 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001508 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001509 * RADIO_NOT_AVAILABLE (radio resetting)
1510 * GENERIC_FAILURE
1511 */
1512
1513#define RIL_REQUEST_GET_IMEI 38
1514
1515/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001516 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001517 *
1518 * Get the device IMEISV, which should be two decimal digits
1519 *
johnwangf8bc1672009-05-14 19:19:47 -07001520 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001521 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1522 *
1523 * "data" is NULL
1524 * "response" is a const char * containing the IMEISV
1525 *
1526 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001527 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001528 * RADIO_NOT_AVAILABLE (radio resetting)
1529 * GENERIC_FAILURE
1530 */
1531
1532#define RIL_REQUEST_GET_IMEISV 39
1533
1534
1535/**
1536 * RIL_REQUEST_ANSWER
1537 *
1538 * Answer incoming call
1539 *
1540 * Will not be called for WAITING calls.
1541 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
1542 * instead
1543 *
1544 * "data" is NULL
1545 * "response" is NULL
1546 *
1547 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001548 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001549 * RADIO_NOT_AVAILABLE (radio resetting)
1550 * GENERIC_FAILURE
1551 */
1552
1553#define RIL_REQUEST_ANSWER 40
1554
1555/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001556 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001557 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001558 * Deactivate packet data connection
1559 * replaces RIL_REQUEST_DEACTIVATE_DEFAULT_PDP
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001560 *
1561 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07001562 * ((char**)data)[0] indicating CID
Wink Saville7f856802009-06-09 10:23:37 -07001563 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001564 * "response" is NULL
1565 *
1566 * Valid errors:
1567 * SUCCESS
1568 * RADIO_NOT_AVAILABLE
1569 * GENERIC_FAILURE
1570 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001571 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001572 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001573#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001574
1575/**
1576 * RIL_REQUEST_QUERY_FACILITY_LOCK
1577 *
1578 * Query the status of a facility lock state
1579 *
1580 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07001581 * ((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 -08001582 * (eg "AO" for BAOC, "SC" for SIM lock)
1583 * ((const char **)data)[1] is the password, or "" if not required
1584 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
1585 * services to query
1586 *
1587 * "response" is an int *
1588 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07001589 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001590 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07001591 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001592 *
1593 * Valid errors:
1594 * SUCCESS
1595 * RADIO_NOT_AVAILABLE
1596 * GENERIC_FAILURE
1597 *
1598 */
1599#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
1600
1601/**
1602 * RIL_REQUEST_SET_FACILITY_LOCK
1603 *
1604 * Enable/disable one facility lock
1605 *
1606 * "data" is const char **
1607 *
1608 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1609 * (eg "AO" for BAOC)
1610 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
1611 * ((const char **)data)[2] = password
1612 * ((const char **)data)[3] = string representation of decimal TS 27.007
1613 * service class bit vector. Eg, the string
1614 * "1" means "set this facility for voice services"
1615 *
jsh593c9102009-06-24 16:13:44 -07001616 * "response" is int *
1617 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001618 *
1619 * Valid errors:
1620 * SUCCESS
1621 * RADIO_NOT_AVAILABLE
1622 * GENERIC_FAILURE
1623 *
1624 */
1625#define RIL_REQUEST_SET_FACILITY_LOCK 43
1626
1627/**
1628 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
1629 *
1630 * Change call barring facility password
1631 *
1632 * "data" is const char **
1633 *
1634 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1635 * (eg "AO" for BAOC)
1636 * ((const char **)data)[1] = old password
1637 * ((const char **)data)[2] = new password
1638 *
Wink Saville7f856802009-06-09 10:23:37 -07001639 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001640 *
1641 * Valid errors:
1642 * SUCCESS
1643 * RADIO_NOT_AVAILABLE
1644 * GENERIC_FAILURE
1645 *
1646 */
1647#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
1648
1649/**
1650 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
1651 *
1652 * Query current network selectin mode
1653 *
1654 * "data" is NULL
1655 *
1656 * "response" is int *
1657 * ((const int *)response)[0] is
1658 * 0 for automatic selection
1659 * 1 for manual selection
1660 *
1661 * Valid errors:
1662 * SUCCESS
1663 * RADIO_NOT_AVAILABLE
1664 * GENERIC_FAILURE
1665 *
1666 */
1667#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
1668
1669/**
1670 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
1671 *
1672 * Specify that the network should be selected automatically
1673 *
1674 * "data" is NULL
1675 * "response" is NULL
1676 *
Wink Saville7f856802009-06-09 10:23:37 -07001677 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001678 * and registered
1679 *
1680 * Valid errors:
1681 * SUCCESS
1682 * RADIO_NOT_AVAILABLE
1683 * GENERIC_FAILURE
1684 *
1685 */
1686#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
1687
1688/**
1689 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
1690 *
1691 * Manually select a specified network.
1692 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001693 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
1694 * "response" is NULL
1695 *
Wink Saville7f856802009-06-09 10:23:37 -07001696 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001697 * and registered
1698 *
1699 * Valid errors:
1700 * SUCCESS
1701 * RADIO_NOT_AVAILABLE
1702 * GENERIC_FAILURE
1703 *
1704 */
1705#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
1706
1707/**
1708 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
1709 *
1710 * Scans for available networks
1711 *
1712 * "data" is NULL
1713 * "response" is const char ** that should be an array of n*4 strings, where
1714 * n is the number of available networks
1715 * For each available network:
1716 *
Wink Saville7f856802009-06-09 10:23:37 -07001717 * ((const char **)response)[n+0] is long alpha ONS or EONS
1718 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001719 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
1720 * ((const char **)response)[n+3] is a string value of the status:
1721 * "unknown"
1722 * "available"
1723 * "current"
1724 * "forbidden"
1725 *
Wink Saville7f856802009-06-09 10:23:37 -07001726 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001727 * and registered
1728 *
1729 * Valid errors:
1730 * SUCCESS
1731 * RADIO_NOT_AVAILABLE
1732 * GENERIC_FAILURE
1733 *
1734 */
1735#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
1736
1737/**
1738 * RIL_REQUEST_DTMF_START
1739 *
Wink Saville7f856802009-06-09 10:23:37 -07001740 * Start playing a DTMF tone. Continue playing DTMF tone until
1741 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001742 *
1743 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
1744 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07001745 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001746 * "data" is a char *
1747 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
1748 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001749 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001750 * Valid errors:
1751 * SUCCESS
1752 * RADIO_NOT_AVAILABLE
1753 * GENERIC_FAILURE
1754 *
1755 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
1756 */
1757#define RIL_REQUEST_DTMF_START 49
1758
1759/**
1760 * RIL_REQUEST_DTMF_STOP
1761 *
1762 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07001763 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001764 * "data" is NULL
1765 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001766 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001767 * Valid errors:
1768 * SUCCESS
1769 * RADIO_NOT_AVAILABLE
1770 * GENERIC_FAILURE
1771 *
1772 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
1773 */
1774#define RIL_REQUEST_DTMF_STOP 50
1775
1776/**
1777 * RIL_REQUEST_BASEBAND_VERSION
1778 *
1779 * Return string value indicating baseband version, eg
1780 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07001781 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001782 * "data" is NULL
1783 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07001784 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001785 * Valid errors:
1786 * SUCCESS
1787 * RADIO_NOT_AVAILABLE
1788 * GENERIC_FAILURE
1789 *
1790 */
1791#define RIL_REQUEST_BASEBAND_VERSION 51
1792
1793/**
1794 * RIL_REQUEST_SEPARATE_CONNECTION
1795 *
1796 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07001797 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001798 * as the only other member of the current (active) call
1799 *
1800 * Like AT+CHLD=2x
1801 *
1802 * See TS 22.084 1.3.8.2 (iii)
1803 * TS 22.030 6.5.5 "Entering "2X followed by send"
1804 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07001805 *
1806 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001807 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
1808 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001809 * "response" is NULL
1810 *
1811 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001812 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001813 * RADIO_NOT_AVAILABLE (radio resetting)
1814 * GENERIC_FAILURE
1815 */
1816#define RIL_REQUEST_SEPARATE_CONNECTION 52
1817
1818
1819/**
1820 * RIL_REQUEST_SET_MUTE
1821 *
1822 * Turn on or off uplink (microphone) mute.
1823 *
1824 * Will only be sent while voice call is active.
1825 * Will always be reset to "disable mute" when a new voice call is initiated
1826 *
1827 * "data" is an int *
1828 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
1829 *
1830 * "response" is NULL
1831 *
1832 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001833 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001834 * RADIO_NOT_AVAILABLE (radio resetting)
1835 * GENERIC_FAILURE
1836 */
1837
1838#define RIL_REQUEST_SET_MUTE 53
1839
1840/**
1841 * RIL_REQUEST_GET_MUTE
1842 *
1843 * Queries the current state of the uplink mute setting
1844 *
1845 * "data" is NULL
1846 * "response" is an int *
1847 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
1848 *
1849 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001850 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001851 * RADIO_NOT_AVAILABLE (radio resetting)
1852 * GENERIC_FAILURE
1853 */
1854
1855#define RIL_REQUEST_GET_MUTE 54
1856
1857/**
1858 * RIL_REQUEST_QUERY_CLIP
1859 *
1860 * Queries the status of the CLIP supplementary service
1861 *
1862 * (for MMI code "*#30#")
1863 *
1864 * "data" is NULL
1865 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07001866 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001867 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07001868 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001869 *
1870 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001871 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001872 * RADIO_NOT_AVAILABLE (radio resetting)
1873 * GENERIC_FAILURE
1874 */
1875
1876#define RIL_REQUEST_QUERY_CLIP 55
1877
1878/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001879 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
Wink Saville7f856802009-06-09 10:23:37 -07001880 *
1881 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07001882 * context or CDMA data connection active
1883 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001884 *
1885 * "data" is NULL
1886 *
1887 * "response" is a "int *"
1888 * ((int *)response)[0] is an integer cause code defined in TS 24.008
1889 * section 6.1.3.1.3 or close approximation
1890 *
1891 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07001892 * then it should return one of the values listed in
1893 * RIL_LastDataCallActivateFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001894 * cases for error notification
1895 * and potential retries.
1896 *
1897 * Valid errors:
1898 * SUCCESS
1899 * RADIO_NOT_AVAILABLE
1900 * GENERIC_FAILURE
1901 *
1902 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Saville7f856802009-06-09 10:23:37 -07001903 *
1904 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001905
Wink Savillef4c4d362009-04-02 01:37:03 -07001906#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001907
1908/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001909 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001910 *
1911 * Queries the status of PDP contexts, returning for each
1912 * its CID, whether or not it is active, and its PDP type,
1913 * APN, and PDP adddress.
Wink Savillef4c4d362009-04-02 01:37:03 -07001914 * replaces RIL_REQUEST_PDP_CONTEXT_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001915 *
1916 * "data" is NULL
Wink Savillef4c4d362009-04-02 01:37:03 -07001917 * "response" is an array of RIL_Data_Call_Response
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001918 *
1919 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001920 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001921 * RADIO_NOT_AVAILABLE (radio resetting)
1922 * GENERIC_FAILURE
1923 */
1924
Wink Savillef4c4d362009-04-02 01:37:03 -07001925#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001926
1927/**
johnwangf8bc1672009-05-14 19:19:47 -07001928 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001929 *
1930 * Request a radio reset. The RIL implementation may postpone
1931 * the reset until after this request is responded to if the baseband
1932 * is presently busy.
1933 *
johnwangf8bc1672009-05-14 19:19:47 -07001934 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
1935 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001936 * "data" is NULL
1937 * "response" is NULL
1938 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001939 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001940 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001941 * RADIO_NOT_AVAILABLE (radio resetting)
1942 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07001943 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001944 */
1945
1946#define RIL_REQUEST_RESET_RADIO 58
1947
1948/**
1949 * RIL_REQUEST_OEM_HOOK_RAW
1950 *
1951 * This request reserved for OEM-specific uses. It passes raw byte arrays
1952 * back and forth.
1953 *
Wink Saville7f856802009-06-09 10:23:37 -07001954 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001955 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
1956 *
1957 * "data" is a char * of bytes copied from the byte[] data argument in java
1958 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07001959 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001960 * (byte[])(((AsyncResult)response.obj).result)
1961 *
Wink Saville7f856802009-06-09 10:23:37 -07001962 * An error response here will result in
1963 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001964 * (((AsyncResult)response.obj).exception) being an instance of
1965 * com.android.internal.telephony.gsm.CommandException
1966 *
1967 * Valid errors:
1968 * All
1969 */
1970
1971#define RIL_REQUEST_OEM_HOOK_RAW 59
1972
1973/**
1974 * RIL_REQUEST_OEM_HOOK_STRINGS
1975 *
1976 * This request reserved for OEM-specific uses. It passes strings
1977 * back and forth.
1978 *
Wink Saville7f856802009-06-09 10:23:37 -07001979 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001980 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
1981 *
1982 * "data" is a const char **, representing an array of null-terminated UTF-8
1983 * strings copied from the "String[] strings" argument to
1984 * invokeOemRilRequestStrings()
1985 *
1986 * "response" is a const char **, representing an array of null-terminated UTF-8
1987 * stings that will be returned via the caller's response message here:
1988 *
1989 * (String[])(((AsyncResult)response.obj).result)
1990 *
Wink Saville7f856802009-06-09 10:23:37 -07001991 * An error response here will result in
1992 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001993 * (((AsyncResult)response.obj).exception) being an instance of
1994 * com.android.internal.telephony.gsm.CommandException
1995 *
1996 * Valid errors:
1997 * All
1998 */
1999
2000#define RIL_REQUEST_OEM_HOOK_STRINGS 60
2001
2002/**
2003 * RIL_REQUEST_SCREEN_STATE
2004 *
2005 * Indicates the current state of the screen. When the screen is off, the
2006 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07002007 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
2008 * in an effort to conserve power. These notifications should resume when the
2009 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002010 *
2011 * "data" is int *
2012 * ((int *)data)[0] is == 1 for "Screen On"
2013 * ((int *)data)[0] is == 0 for "Screen Off"
2014 *
2015 * "response" is NULL
2016 *
2017 * Valid errors:
2018 * SUCCESS
2019 * GENERIC_FAILURE
2020 */
2021#define RIL_REQUEST_SCREEN_STATE 61
2022
2023
2024/**
2025 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
2026 *
2027 * Enables/disables supplementary service related notifications
2028 * from the network.
2029 *
2030 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2031 *
2032 * "data" is int *
2033 * ((int *)data)[0] is == 1 for notifications enabled
2034 * ((int *)data)[0] is == 0 for notifications disabled
2035 *
2036 * "response" is NULL
2037 *
2038 * Valid errors:
2039 * SUCCESS
2040 * RADIO_NOT_AVAILABLE
2041 * GENERIC_FAILURE
2042 *
2043 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2044 */
2045#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2046
2047/**
2048 * RIL_REQUEST_WRITE_SMS_TO_SIM
2049 *
2050 * Stores a SMS message to SIM memory.
2051 *
2052 * "data" is RIL_SMS_WriteArgs *
2053 *
2054 * "response" is int *
2055 * ((const int *)response)[0] is the record index where the message is stored.
2056 *
2057 * Valid errors:
2058 * SUCCESS
2059 * GENERIC_FAILURE
2060 *
2061 */
2062#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2063
2064/**
2065 * RIL_REQUEST_DELETE_SMS_ON_SIM
2066 *
2067 * Deletes a SMS message from SIM memory.
2068 *
2069 * "data" is int *
2070 * ((int *)data)[0] is the record index of the message to delete.
2071 *
2072 * "response" is NULL
2073 *
2074 * Valid errors:
2075 * SUCCESS
2076 * GENERIC_FAILURE
2077 *
2078 */
2079#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2080
2081/**
2082 * RIL_REQUEST_SET_BAND_MODE
2083 *
2084 * Assign a specified band for RF configuration.
2085 *
2086 * "data" is int *
2087 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2088 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2089 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2090 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2091 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2092 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002093 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2094 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2095 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2096 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2097 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2098 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2099 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2100 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2101 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2102 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2103 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2104 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2105 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002106 *
2107 * "response" is NULL
2108 *
2109 * Valid errors:
2110 * SUCCESS
2111 * RADIO_NOT_AVAILABLE
2112 * GENERIC_FAILURE
2113 */
2114#define RIL_REQUEST_SET_BAND_MODE 65
2115
2116/**
2117 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2118 *
2119 * Query the list of band mode supported by RF.
2120 *
2121 * "data" is NULL
2122 *
2123 * "response" is int *
2124 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2125 * each available band mode.
2126 *
2127 * 0 for "unspecified" (selected by baseband automatically)
2128 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2129 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2130 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2131 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2132 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002133 * 6 for "Cellular (800-MHz Band)"
2134 * 7 for "PCS (1900-MHz Band)"
2135 * 8 for "Band Class 3 (JTACS Band)"
2136 * 9 for "Band Class 4 (Korean PCS Band)"
2137 * 10 for "Band Class 5 (450-MHz Band)"
2138 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2139 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2140 * 13 for "Band Class 8 (1800-MHz Band)"
2141 * 14 for "Band Class 9 (900-MHz Band)"
2142 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2143 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2144 * 17 for "Band Class 15 (AWS Band)"
2145 * 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002146 *
2147 * Valid errors:
2148 * SUCCESS
2149 * RADIO_NOT_AVAILABLE
2150 * GENERIC_FAILURE
2151 *
2152 * See also: RIL_REQUEST_SET_BAND_MODE
2153 */
2154#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2155
2156/**
2157 * RIL_REQUEST_STK_GET_PROFILE
2158 *
2159 * Requests the profile of SIM tool kit.
2160 * The profile indicates the SAT/USAT features supported by ME.
2161 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2162 *
2163 * "data" is NULL
2164 *
2165 * "response" is a const char * containing SAT/USAT profile
2166 * in hexadecimal format string starting with first byte of terminal profile
2167 *
2168 * Valid errors:
2169 * RIL_E_SUCCESS
2170 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2171 * RIL_E_GENERIC_FAILURE
2172 */
2173#define RIL_REQUEST_STK_GET_PROFILE 67
2174
2175/**
2176 * RIL_REQUEST_STK_SET_PROFILE
2177 *
2178 * Download the STK terminal profile as part of SIM initialization
2179 * procedure
2180 *
2181 * "data" is a const char * containing SAT/USAT profile
2182 * in hexadecimal format string starting with first byte of terminal profile
2183 *
2184 * "response" is NULL
2185 *
2186 * Valid errors:
2187 * RIL_E_SUCCESS
2188 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2189 * RIL_E_GENERIC_FAILURE
2190 */
2191#define RIL_REQUEST_STK_SET_PROFILE 68
2192
2193/**
2194 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2195 *
2196 * Requests to send a SAT/USAT envelope command to SIM.
2197 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2198 *
2199 * "data" is a const char * containing SAT/USAT command
2200 * in hexadecimal format string starting with command tag
2201 *
2202 * "response" is a const char * containing SAT/USAT response
2203 * in hexadecimal format string starting with first byte of response
2204 * (May be NULL)
2205 *
2206 * Valid errors:
2207 * RIL_E_SUCCESS
2208 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2209 * RIL_E_GENERIC_FAILURE
2210 */
2211#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2212
2213/**
2214 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2215 *
2216 * Requests to send a terminal response to SIM for a received
2217 * proactive command
2218 *
2219 * "data" is a const char * containing SAT/USAT response
2220 * in hexadecimal format string starting with first byte of response data
2221 *
2222 * "response" is NULL
2223 *
2224 * Valid errors:
2225 * RIL_E_SUCCESS
2226 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2227 * RIL_E_GENERIC_FAILURE
2228 */
2229#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
2230
2231/**
2232 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
2233 *
2234 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
2235 * been initialized by ME already. (We could see the call has been in the 'call
2236 * list') So, STK application needs to accept/reject the call according as user
2237 * operations.
2238 *
2239 * "data" is int *
2240 * ((int *)data)[0] is > 0 for "accept" the call setup
2241 * ((int *)data)[0] is == 0 for "reject" the call setup
2242 *
2243 * "response" is NULL
2244 *
2245 * Valid errors:
2246 * RIL_E_SUCCESS
2247 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2248 * RIL_E_GENERIC_FAILURE
2249 */
2250#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
2251
2252/**
2253 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
2254 *
2255 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07002256 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002257 * "data" is NULL
2258 * "response" is NULL
2259 *
2260 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002261 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002262 * RADIO_NOT_AVAILABLE (radio resetting)
2263 * GENERIC_FAILURE
2264 */
2265#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
2266
2267/**
2268 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2269 *
2270 * Requests to set the preferred network type for searching and registering
2271 * (CS/PS domain, RAT, and operation mode)
2272 *
2273 * "data" is int *
Wink Saville7f856802009-06-09 10:23:37 -07002274 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002275 * ((int *)data)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002276 * ((int *)data)[0] is == 1 for GSM only
2277 * ((int *)data)[0] is == 2 for WCDMA only
jsh29be25c2009-07-14 20:18:59 -07002278 * ((int *)data)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL)
Wink Savillef4c4d362009-04-02 01:37:03 -07002279 * ((int *)data)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2280 * ((int *)data)[0] is == 5 for CDMA only
2281 * ((int *)data)[0] is == 6 for EvDo only
2282 * ((int *)data)[0] is == 7 for GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002283 *
2284 * "response" is NULL
2285 *
2286 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07002287 * SUCCESS
2288 * RADIO_NOT_AVAILABLE (radio resetting)
2289 * GENERIC_FAILURE
2290 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002291 */
2292#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2293
2294/**
2295 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2296 *
2297 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2298 * for searching and registering
2299 *
2300 * "data" is NULL
2301 *
2302 * "response" is int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002303 * ((int *)response)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002304 * ((int *)response)[0] is == 1 for GSM only
2305 * ((int *)response)[0] is == 2 for WCDMA only
Wink Savillef4c4d362009-04-02 01:37:03 -07002306 * ((int *)response)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL)
2307 * ((int *)response)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2308 * ((int *)response)[0] is == 5 for CDMA only
2309 * ((int *)response)[0] is == 6 for EvDo only
2310 * ((int *)response)[0] is == 7 for GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002311 *
2312 * Valid errors:
2313 * SUCCESS
2314 * RADIO_NOT_AVAILABLE
2315 * GENERIC_FAILURE
2316 *
2317 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2318 */
2319#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2320
2321/**
2322 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2323 *
2324 * Request neighboring cell id in GSM network
2325 *
2326 * "data" is NULL
2327 * "response" must be a " const RIL_NeighboringCell** "
2328 *
2329 * Valid errors:
2330 * SUCCESS
2331 * RADIO_NOT_AVAILABLE
2332 * GENERIC_FAILURE
2333 */
2334#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
2335
2336/**
2337 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07002338 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002339 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07002340 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
2341 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002342 *
2343 * Note: The RIL implementation should default to "updates enabled"
2344 * when the screen is on and "updates disabled" when the screen is off.
2345 *
2346 * "data" is int *
2347 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
2348 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
2349 *
2350 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07002351 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002352 * Valid errors:
2353 * SUCCESS
2354 * RADIO_NOT_AVAILABLE
2355 * GENERIC_FAILURE
2356 *
2357 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2358 */
2359#define RIL_REQUEST_SET_LOCATION_UPDATES 76
2360
Wink Savillef4c4d362009-04-02 01:37:03 -07002361/**
2362 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION
Wink Saville7f856802009-06-09 10:23:37 -07002363 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002364 * Request to set the location where the CDMA subscription shall
2365 * be retrieved
2366 *
2367 * "data" is int *
2368 * ((int *)data)[0] is == 0 from RUIM/SIM (default)
2369 * ((int *)data)[0] is == 1 from NV
2370 *
2371 * "response" is NULL
2372 *
2373 * Valid errors:
2374 * SUCCESS
2375 * RADIO_NOT_AVAILABLE
2376 * GENERIC_FAILURE
2377 * SIM_ABSENT
2378 * SUBSCRIPTION_NOT_AVAILABLE
2379 */
2380#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION 77
2381
2382/**
2383 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07002384 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002385 * Request to set the roaming preferences in CDMA
2386 *
2387 * "data" is int *
2388 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
2389 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2390 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07002391 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002392 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002393 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002394 * Valid errors:
2395 * SUCCESS
2396 * RADIO_NOT_AVAILABLE
2397 * GENERIC_FAILURE
2398 */
2399#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
2400
2401/**
2402 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07002403 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002404 * Request the actual setting of the roaming preferences in CDMA in the modem
2405 *
2406 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002407 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002408 * "response" is int *
2409 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
2410 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2411 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07002412 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002413 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002414 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002415 * Valid errors:
2416 * SUCCESS
2417 * RADIO_NOT_AVAILABLE
2418 * GENERIC_FAILURE
2419 */
2420#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
2421
2422/**
2423 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002424 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002425 * Request to set the TTY mode
2426 *
2427 * "data" is int *
2428 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07002429 * ((int *)data)[0] is == 1 for TTY Full
2430 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
2431 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07002432 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002433 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002434 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002435 * Valid errors:
2436 * SUCCESS
2437 * RADIO_NOT_AVAILABLE
2438 * GENERIC_FAILURE
2439 */
2440#define RIL_REQUEST_SET_TTY_MODE 80
2441
2442/**
2443 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002444 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002445 * Request the setting of TTY mode
2446 *
2447 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002448 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002449 * "response" is int *
2450 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07002451 * ((int *)response)[0] is == 1 for TTY Full
2452 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
2453 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07002454 *
2455 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002456 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002457 * Valid errors:
2458 * SUCCESS
2459 * RADIO_NOT_AVAILABLE
2460 * GENERIC_FAILURE
2461 */
2462#define RIL_REQUEST_QUERY_TTY_MODE 81
2463
2464/**
2465 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
2466 *
2467 * Request to set the preferred voice privacy mode used in voice
2468 * scrambling
2469 *
2470 * "data" is int *
2471 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2472 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07002473 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002474 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002475 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002476 * Valid errors:
2477 * SUCCESS
2478 * RADIO_NOT_AVAILABLE
2479 * GENERIC_FAILURE
2480 */
2481#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
2482
2483/**
2484 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002485 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002486 * Request the setting of preferred voice privacy mode
2487 *
2488 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002489 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002490 * "response" is int *
2491 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2492 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07002493 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002494 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002495 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002496 * Valid errors:
2497 * SUCCESS
2498 * RADIO_NOT_AVAILABLE
2499 * GENERIC_FAILURE
2500 */
2501#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
2502
2503/**
2504 * RIL_REQUEST_CDMA_FLASH
2505 *
2506 * Send FLASH
2507 *
2508 * "data" is const char *
2509 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07002510 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002511 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002512 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002513 * Valid errors:
2514 * SUCCESS
2515 * RADIO_NOT_AVAILABLE
2516 * GENERIC_FAILURE
2517 *
2518 */
2519#define RIL_REQUEST_CDMA_FLASH 84
2520
2521/**
2522 * RIL_REQUEST_CDMA_BURST_DTMF
2523 *
2524 * Send DTMF string
2525 *
jsh602f80f2009-07-10 15:44:37 -07002526 * "data" is const char **
2527 * ((const char **)data)[0] is a DTMF string
2528 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
2529 * default
2530 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
2531 * default
Wink Saville7f856802009-06-09 10:23:37 -07002532 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002533 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002534 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002535 * Valid errors:
2536 * SUCCESS
2537 * RADIO_NOT_AVAILABLE
2538 * GENERIC_FAILURE
2539 *
2540 */
2541#define RIL_REQUEST_CDMA_BURST_DTMF 85
2542
2543/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002544 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07002545 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002546 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
2547 * If the checksum is valid the 20 digit AKEY is written to NV,
2548 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07002549 *
2550 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002551 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
2552 * where the last 6 digits are a checksum of the
2553 * first 20, as specified in TR45.AHAG
2554 * "Common Cryptographic Algorithms, Revision D.1
2555 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07002556 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002557 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002558 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002559 * Valid errors:
2560 * SUCCESS
2561 * RADIO_NOT_AVAILABLE
2562 * GENERIC_FAILURE
2563 *
2564 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002565#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07002566
2567/**
2568 * RIL_REQUEST_CDMA_SEND_SMS
2569 *
2570 * Send a CDMA SMS message
2571 *
2572 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07002573 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002574 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07002575 *
johnwangbfb151b2009-09-11 15:20:38 -07002576 * Based on the return error, caller decides to resend if sending sms
2577 * fails. The CDMA error class is derived as follows,
2578 * SUCCESS is error class 0 (no error)
2579 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
2580 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
2581 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002582 * Valid errors:
2583 * SUCCESS
2584 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07002585 * SMS_SEND_FAIL_RETRY
Wink Savillef4c4d362009-04-02 01:37:03 -07002586 * GENERIC_FAILURE
2587 *
2588 */
2589#define RIL_REQUEST_CDMA_SEND_SMS 87
2590
2591/**
2592 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
2593 *
2594 * Acknowledge the success or failure in the receipt of SMS
2595 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
2596 *
2597 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07002598 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002599 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002600 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002601 * Valid errors:
2602 * SUCCESS
2603 * RADIO_NOT_AVAILABLE
2604 * GENERIC_FAILURE
2605 *
2606 */
2607#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
2608
2609/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002610 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002611 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002612 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
2613 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002614 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002615 *
2616 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
2617 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
2618 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002619 * Valid errors:
2620 * SUCCESS
2621 * RADIO_NOT_AVAILABLE
2622 * GENERIC_FAILURE
2623 *
2624 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002625#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07002626
2627/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002628 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002629 *
2630 * Set GSM/WCDMA Cell Broadcast SMS config
2631 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002632 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
2633 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
2634 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002635 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002636 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002637 * Valid errors:
2638 * SUCCESS
2639 * RADIO_NOT_AVAILABLE
2640 * GENERIC_FAILURE
2641 *
2642 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002643#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07002644
2645/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002646 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07002647 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002648* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07002649 *
2650 * "data" is const int *
2651 * (const int *)data[0] indicates to activate or turn off the
2652 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
2653 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07002654 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002655 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002656 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002657 * Valid errors:
2658 * SUCCESS
2659 * RADIO_NOT_AVAILABLE
2660 * GENERIC_FAILURE
2661 *
2662 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002663#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07002664
2665/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002666 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002667 *
2668 * Request the setting of CDMA Broadcast SMS config
2669 *
2670 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002671 *
2672 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
2673 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
2674 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002675 * Valid errors:
2676 * SUCCESS
2677 * RADIO_NOT_AVAILABLE
2678 * GENERIC_FAILURE
2679 *
2680 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002681#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07002682
2683/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002684 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002685 *
2686 * Set CDMA Broadcast SMS config
2687 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002688 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
2689 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
2690 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002691 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002692 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002693 * Valid errors:
2694 * SUCCESS
2695 * RADIO_NOT_AVAILABLE
2696 * GENERIC_FAILURE
2697 *
2698 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002699#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07002700
2701/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002702 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07002703 *
2704 * Enable or disable the reception of CDMA Broadcast SMS
2705 *
2706 * "data" is const int *
2707 * (const int *)data[0] indicates to activate or turn off the
2708 * reception of CDMA Broadcast SMS, 0-1,
2709 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07002710 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002711 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002712 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002713 * Valid errors:
2714 * SUCCESS
2715 * RADIO_NOT_AVAILABLE
2716 * GENERIC_FAILURE
2717 *
2718 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002719#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07002720
2721/**
2722 * RIL_REQUEST_CDMA_SUBSCRIPTION
2723 *
2724 * Request the device MDN / H_SID / H_NID.
2725 *
2726 * The request is only allowed when CDMA subscription is available. When CDMA
2727 * subscription is changed, application layer should re-issue the request to
2728 * update the subscription information.
2729 *
2730 * If a NULL value is returned for any of the device id, it means that error
2731 * accessing the device.
2732 *
2733 * "response" is const char **
2734 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07002735 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
2736 * CDMA subscription is available, in decimal format
2737 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
2738 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07002739 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07002740 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07002741 *
2742 * Valid errors:
2743 * SUCCESS
2744 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
2745 */
2746
Wink Savilleeafe79d2009-04-03 18:02:34 -07002747#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07002748
2749/**
2750 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
2751 *
2752 * Stores a CDMA SMS message to RUIM memory.
2753 *
2754 * "data" is RIL_CDMA_SMS_WriteArgs *
2755 *
2756 * "response" is int *
2757 * ((const int *)response)[0] is the record index where the message is stored.
2758 *
2759 * Valid errors:
2760 * SUCCESS
2761 * RADIO_NOT_AVAILABLE
2762 * GENERIC_FAILURE
2763 *
2764 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07002765#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07002766
2767/**
2768 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
2769 *
2770 * Deletes a CDMA SMS message from RUIM memory.
2771 *
2772 * "data" is int *
2773 * ((int *)data)[0] is the record index of the message to delete.
2774 *
2775 * "response" is NULL
2776 *
2777 * Valid errors:
2778 * SUCCESS
2779 * RADIO_NOT_AVAILABLE
2780 * GENERIC_FAILURE
2781 *
2782 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07002783#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07002784
2785/**
2786 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07002787 *
2788 * Request the device ESN / MEID / IMEI / IMEISV.
2789 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002790 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07002791 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07002792 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07002793 *
2794 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07002795 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07002796 *
2797 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07002798 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07002799 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002800 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07002801 * ((const char **)response)[0] is IMEI if GSM subscription is available
2802 * ((const char **)response)[1] is IMEISV if GSM subscription is available
2803 * ((const char **)response)[2] is ESN if CDMA subscription is available
2804 * ((const char **)response)[3] is MEID if CDMA subscription is available
2805 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002806 * Valid errors:
2807 * SUCCESS
2808 * RADIO_NOT_AVAILABLE
2809 * GENERIC_FAILURE
2810 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07002811#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07002812
Wink Saville1b5fd232009-04-22 14:50:00 -07002813/**
2814 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
2815 *
2816 * Request the radio's system selection module to exit emergency
2817 * callback mode. RIL will not respond with SUCCESS until the modem has
2818 * completely exited from Emergency Callback Mode.
2819 *
2820 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002821 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002822 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002823 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002824 * Valid errors:
2825 * SUCCESS
2826 * RADIO_NOT_AVAILABLE
2827 * GENERIC_FAILURE
2828 *
2829 */
2830#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07002831
jsh000a9fe2009-05-11 14:52:35 -07002832/**
2833 * RIL_REQUEST_GET_SMSC_ADDRESS
2834 *
2835 * Queries the default Short Message Service Center address on the device.
2836 *
2837 * "data" is NULL
2838 *
2839 * "response" is const char * containing the SMSC address.
2840 *
2841 * Valid errors:
2842 * SUCCESS
2843 * RADIO_NOT_AVAILABLE
2844 * GENERIC_FAILURE
2845 *
2846 */
2847#define RIL_REQUEST_GET_SMSC_ADDRESS 100
2848
2849/**
2850 * RIL_REQUEST_SET_SMSC_ADDRESS
2851 *
2852 * Sets the default Short Message Service Center address on the device.
2853 *
2854 * "data" is const char * containing the SMSC address.
2855 *
2856 * "response" is NULL
2857 *
2858 * Valid errors:
2859 * SUCCESS
2860 * RADIO_NOT_AVAILABLE
2861 * GENERIC_FAILURE
2862 *
2863 */
2864#define RIL_REQUEST_SET_SMSC_ADDRESS 101
2865
jshb60444e2009-05-29 11:09:17 -07002866/**
2867 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
2868 *
2869 * Indicates whether there is storage available for new SMS messages.
2870 *
2871 * "data" is int *
2872 * ((int *)data)[0] is 1 if memory is available for storing new messages
2873 * is 0 if memory capacity is exceeded
2874 *
2875 * "response" is NULL
2876 *
2877 * Valid errors:
2878 * SUCCESS
2879 * RADIO_NOT_AVAILABLE
2880 * GENERIC_FAILURE
2881 *
2882 */
2883#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
2884
Wink Saville2641d5b2009-06-08 17:40:42 -07002885/**
2886 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
2887 *
2888 * Indicates that the StkSerivce is running and is
2889 * ready to receive RIL_UNSOL_STK_XXXXX commands.
2890 *
2891 * "data" is NULL
2892 * "response" is NULL
2893 *
2894 * Valid errors:
2895 * SUCCESS
2896 * RADIO_NOT_AVAILABLE
2897 * GENERIC_FAILURE
2898 *
2899 */
2900#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
2901
Wink Savillef4c4d362009-04-02 01:37:03 -07002902
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002903/***********************************************************************/
2904
Wink Savillef4c4d362009-04-02 01:37:03 -07002905
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002906#define RIL_UNSOL_RESPONSE_BASE 1000
2907
2908/**
2909 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
2910 *
2911 * Indicate when value of RIL_RadioState has changed.
2912 *
2913 * Callee will invoke RIL_RadioStateRequest method on main thread
2914 *
2915 * "data" is NULL
2916 */
2917
2918#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
2919
2920
2921/**
2922 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
2923 *
2924 * Indicate when call state has changed
2925 *
2926 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
2927 *
2928 * "data" is NULL
2929 *
Wink Saville7f856802009-06-09 10:23:37 -07002930 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002931 * "RING", "BUSY", "NO CARRIER", and also call state
2932 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
2933 *
2934 * Redundent or extraneous invocations are tolerated
2935 */
2936#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
2937
2938
2939/**
Wink Saville7f856802009-06-09 10:23:37 -07002940 * RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002941 *
2942 * Called when network state, operator name, or GPRS state has changed
2943 * Basically on, +CREG and +CGREG
2944 *
2945 * Callee will invoke the following requests on main thread:
2946 *
2947 * RIL_REQUEST_REGISTRATION_STATE
2948 * RIL_REQUEST_GPRS_REGISTRATION_STATE
2949 * RIL_REQUEST_OPERATOR
2950 *
2951 * "data" is NULL
2952 *
2953 * FIXME should this happen when SIM records are loaded? (eg, for
2954 * EONS)
2955 */
2956#define RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 1002
2957
2958/**
2959 * RIL_UNSOL_RESPONSE_NEW_SMS
2960 *
2961 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07002962 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002963 * "data" is const char *
2964 * This is a pointer to a string containing the PDU of an SMS-DELIVER
2965 * as an ascii string of hex digits. The PDU starts with the SMSC address
2966 * per TS 27.005 (+CMT:)
2967 *
2968 * Callee will subsequently confirm the receipt of thei SMS with a
2969 * RIL_REQUEST_SMS_ACKNOWLEDGE
2970 *
Wink Saville7f856802009-06-09 10:23:37 -07002971 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002972 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
2973 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
2974 */
2975
2976#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
2977
2978/**
2979 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
2980 *
2981 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07002982 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002983 * "data" is const char *
2984 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
2985 * as an ascii string of hex digits. The PDU starts with the SMSC address
2986 * per TS 27.005 (+CDS:).
2987 *
2988 * Callee will subsequently confirm the receipt of the SMS with a
2989 * RIL_REQUEST_SMS_ACKNOWLEDGE
2990 *
Wink Saville7f856802009-06-09 10:23:37 -07002991 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002992 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
2993 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
2994 */
2995
2996#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
2997
2998/**
2999 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
3000 *
3001 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07003002 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003003 * "data" is const int *
3004 * ((const int *)data)[0] contains the slot index on the SIM that contains
3005 * the new message
3006 */
3007
3008#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
3009
3010/**
3011 * RIL_UNSOL_ON_USSD
3012 *
3013 * Called when a new USSD message is received.
3014 *
3015 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07003016 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003017 * one of these string values:
3018 * "0" USSD-Notify -- text in ((const char **)data)[1]
3019 * "1" USSD-Request -- text in ((const char **)data)[1]
3020 * "2" Session terminated by network
3021 * "3" other local client (eg, SIM Toolkit) has responded
3022 * "4" Operation not supported
3023 * "5" Network timeout
3024 *
3025 * The USSD session is assumed to persist if the type code is "1", otherwise
3026 * the current session (if any) is assumed to have terminated.
3027 *
3028 * ((const char **)data)[1] points to a message string if applicable, which
3029 * should always be in UTF-8.
3030 */
3031#define RIL_UNSOL_ON_USSD 1006
3032/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
3033
3034/**
3035 * RIL_UNSOL_ON_USSD_REQUEST
3036 *
3037 * Obsolete. Send via RIL_UNSOL_ON_USSD
3038 */
Wink Saville7f856802009-06-09 10:23:37 -07003039#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003040
3041
3042/**
3043 * RIL_UNSOL_NITZ_TIME_RECEIVED
3044 *
3045 * Called when radio has received a NITZ time message
3046 *
3047 * "data" is const char * pointing to NITZ time string
3048 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
3049 */
3050#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
3051
3052/**
3053 * RIL_UNSOL_SIGNAL_STRENGTH
3054 *
3055 * Radio may report signal strength rather han have it polled.
3056 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003057 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003058 */
3059#define RIL_UNSOL_SIGNAL_STRENGTH 1009
3060
3061
3062/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003063 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003064 *
3065 * Indicate a PDP context state has changed, or a new context
3066 * has been activated or deactivated
Wink Savillef4c4d362009-04-02 01:37:03 -07003067 * replaces RIL_UNSOL_PDP_CONTEXT_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003068 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003069 * "data" is an array of RIL_Data_Call_Response identical to that
3070 * returned by RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003071 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003072 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003073 */
3074
Wink Savillef4c4d362009-04-02 01:37:03 -07003075#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003076
3077/**
3078 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
3079 *
3080 * Reports supplementary service related notification from the network.
3081 *
3082 * "data" is a const RIL_SuppSvcNotification *
3083 *
3084 */
3085
3086#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
3087
3088/**
3089 * RIL_UNSOL_STK_SESSION_END
3090 *
3091 * Indicate when STK session is terminated by SIM.
3092 *
3093 * "data" is NULL
3094 */
3095#define RIL_UNSOL_STK_SESSION_END 1012
3096
3097/**
3098 * RIL_UNSOL_STK_PROACTIVE_COMMAND
3099 *
3100 * Indicate when SIM issue a STK proactive command to applications
3101 *
3102 * "data" is a const char * containing SAT/USAT proactive command
3103 * in hexadecimal format string starting with command tag
3104 *
3105 */
3106#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
3107
3108/**
3109 * RIL_UNSOL_STK_EVENT_NOTIFY
3110 *
3111 * Indicate when SIM notifies applcations some event happens.
3112 * Generally, application does not need to have any feedback to
3113 * SIM but shall be able to indicate appropriate messages to users.
3114 *
3115 * "data" is a const char * containing SAT/USAT commands or responses
3116 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
3117 * starting with first byte of response data or command tag
3118 *
3119 */
3120#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
3121
3122/**
3123 * RIL_UNSOL_STK_CALL_SETUP
3124 *
3125 * Indicate when SIM wants application to setup a voice call.
3126 *
3127 * "data" is const int *
3128 * ((const int *)data)[0] contains timeout value (in milliseconds)
3129 */
3130#define RIL_UNSOL_STK_CALL_SETUP 1015
3131
3132/**
3133 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
3134 *
3135 * Indicates that SMS storage on the SIM is full. Sent when the network
3136 * attempts to deliver a new SMS message. Messages cannot be saved on the
3137 * SIM until space is freed. In particular, incoming Class 2 messages
3138 * cannot be stored.
3139 *
3140 * "data" is null
3141 *
3142 */
3143#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
3144
3145/**
3146 * RIL_UNSOL_SIM_REFRESH
3147 *
3148 * Indicates that file(s) on the SIM have been updated, or the SIM
3149 * has been reinitialized.
3150 *
3151 * "data" is an int *
3152 * ((int *)data)[0] is a RIL_SimRefreshResult.
3153 * ((int *)data)[1] is the EFID of the updated file if the result is
3154 * SIM_FILE_UPDATE or NULL for any other result.
3155 *
3156 * Note: If the radio state changes as a result of the SIM refresh (eg,
3157 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3158 * should be sent.
3159 */
3160#define RIL_UNSOL_SIM_REFRESH 1017
3161
3162/**
3163 * RIL_UNSOL_CALL_RING
3164 *
3165 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07003166 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
3167 * of a call and sending multiple is optional. If the system property
3168 * ro.telephony.call_ring.multiple is false then the upper layers
3169 * will generate the multiple events internally. Otherwise the vendor
3170 * ril must generate multiple RIL_UNSOL_CALL_RING if
3171 * ro.telephony.call_ring.multiple is true or if it is absent.
3172 *
3173 * The rate of these events is controlled by ro.telephony.call_ring.delay
3174 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003175 *
Wink Saville3d54e742009-05-18 18:00:44 -07003176 * "data" is null for GSM
3177 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003178 */
3179#define RIL_UNSOL_CALL_RING 1018
3180
The Android Open Source Project34a51082009-03-05 14:34:37 -08003181/**
3182 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
3183 *
3184 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07003185 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003186 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07003187
The Android Open Source Project34a51082009-03-05 14:34:37 -08003188 * "data" is null
3189 */
3190#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
3191
3192/**
3193 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3194 *
3195 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07003196 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003197 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07003198 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003199 * Callee will subsequently confirm the receipt of the SMS with
3200 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07003201 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003202 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
3203 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07003204 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003205 */
3206#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
3207
3208/**
3209 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
3210 *
3211 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07003212 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003213 * "data" is const char * of 88 bytes which indicates each page
3214 * of a CBS Message sent to the MS by the BTS as coded in 3GPP
3215 * 23.041 Section 9.4.1.1
Wink Savillef4c4d362009-04-02 01:37:03 -07003216 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003217 */
3218#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07003219
The Android Open Source Project34a51082009-03-05 14:34:37 -08003220/**
3221 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
3222 *
3223 * Indicates that SMS storage on the RUIM is full. Messages
3224 * cannot be saved on the RUIM until space is freed.
3225 *
3226 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07003227 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003228 */
Wink Savillef4c4d362009-04-02 01:37:03 -07003229#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
3230
The Android Open Source Project34a51082009-03-05 14:34:37 -08003231/**
3232 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
3233 *
3234 * Indicates a restricted state change (eg, for Domain Specific Access Control).
3235 *
3236 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
3237 *
3238 * "data" is an int *
3239 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
3240 */
3241#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
3242
Wink Saville1b5fd232009-04-22 14:50:00 -07003243/**
3244 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
3245 *
3246 * Indicates that the radio system selection module has
3247 * autonomously entered emergency callback mode.
3248 *
3249 * "data" is null
3250 *
3251 */
3252#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08003253
Wink Saville1b5fd232009-04-22 14:50:00 -07003254/**
3255 * RIL_UNSOL_CDMA_CALL_WAITING
3256 *
3257 * Called when CDMA radio receives a call waiting indication.
3258 *
3259 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07003260 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003261 */
3262#define RIL_UNSOL_CDMA_CALL_WAITING 1025
3263
3264/**
3265 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
3266 *
3267 * Called when CDMA radio receives an update of the progress of an
3268 * OTASP/OTAPA call.
3269 *
3270 * "data" is const int *
3271 * For CDMA this is an integer OTASP/OTAPA status listed in
3272 * RIL_CDMA_OTA_ProvisionStatus.
3273 *
3274 */
3275#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
3276
3277/**
3278 * RIL_UNSOL_CDMA_INFO_REC
3279 *
3280 * Called when CDMA radio receives one or more info recs.
3281 *
3282 * "data" is const RIL_CDMA_InformationRecords *
3283 *
3284 */
3285#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08003286
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07003287/**
3288 * RIL_UNSOL_OEM_HOOK_RAW
3289 *
3290 * This is for OEM specific use.
3291 *
3292 * "data" is a byte[]
3293 */
3294#define RIL_UNSOL_OEM_HOOK_RAW 1028
3295
John Wang5d621da2009-09-18 17:17:48 -07003296/**
3297 * RIL_UNSOL_RINGBACK_TONE
3298 *
3299 * Indicates that nework doesn't have in-band information, need to
3300 * play out-band tone.
3301 *
3302 * "data" is an int *
3303 * ((int *)data)[0] == 0 for stop play ringback tone.
3304 * ((int *)data)[0] == 1 for start play ringback tone.
3305 */
3306#define RIL_UNSOL_RINGBACK_TONE 1029
3307
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003308/***********************************************************************/
3309
3310
3311/**
3312 * RIL_Request Function pointer
3313 *
3314 * @param request is one of RIL_REQUEST_*
3315 * @param data is pointer to data defined for that RIL_REQUEST_*
3316 * data is owned by caller, and should not be modified or freed by callee
3317 * @param t should be used in subsequent call to RIL_onResponse
3318 * @param datalen the length of data
3319 *
3320 */
Wink Saville7f856802009-06-09 10:23:37 -07003321typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003322 size_t datalen, RIL_Token t);
3323
3324/**
3325 * This function should return the current radio state synchronously
3326 */
3327typedef RIL_RadioState (*RIL_RadioStateRequest)();
3328
3329/**
3330 * This function returns "1" if the specified RIL_REQUEST code is
3331 * supported and 0 if it is not
3332 *
3333 * @param requestCode is one of RIL_REQUEST codes
3334 */
3335
3336typedef int (*RIL_Supports)(int requestCode);
3337
3338/**
Wink Saville7f856802009-06-09 10:23:37 -07003339 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003340 * thread that calls RIL_RequestFunc--and indicates that a pending
3341 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07003342 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003343 * On cancel, the callee should do its best to abandon the request and
3344 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
3345 *
3346 * Subsequent calls to RIL_onRequestComplete for this request with
3347 * other results will be tolerated but ignored. (That is, it is valid
3348 * to ignore the cancellation request)
3349 *
3350 * RIL_Cancel calls should return immediately, and not wait for cancellation
3351 *
Wink Saville7f856802009-06-09 10:23:37 -07003352 * 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 -08003353 * interface
3354 *
3355 * @param t token wants to be canceled
3356 */
3357
3358typedef void (*RIL_Cancel)(RIL_Token t);
3359
3360typedef void (*RIL_TimedCallback) (void *param);
3361
3362/**
3363 * Return a version string for your RIL implementation
3364 */
3365typedef const char * (*RIL_GetVersion) (void);
3366
3367typedef struct {
3368 int version; /* set to RIL_VERSION */
3369 RIL_RequestFunc onRequest;
3370 RIL_RadioStateRequest onStateRequest;
3371 RIL_Supports supports;
3372 RIL_Cancel onCancel;
3373 RIL_GetVersion getVersion;
3374} RIL_RadioFunctions;
3375
3376#ifdef RIL_SHLIB
3377struct RIL_Env {
3378 /**
3379 * "t" is parameter passed in on previous call to RIL_Notification
3380 * routine.
3381 *
3382 * If "e" != SUCCESS, then response can be null/is ignored
3383 *
Wink Saville7f856802009-06-09 10:23:37 -07003384 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003385 * freed by callee
3386 *
3387 * RIL_onRequestComplete will return as soon as possible
3388 */
Wink Saville7f856802009-06-09 10:23:37 -07003389 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003390 void *response, size_t responselen);
3391
3392 /**
3393 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
3394 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3395 *
3396 * "data" is owned by caller, and should not be modified or freed by callee
3397 */
3398
Wink Saville7f856802009-06-09 10:23:37 -07003399 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003400 size_t datalen);
3401
3402 /**
Wink Saville7f856802009-06-09 10:23:37 -07003403 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003404 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3405 * a relative time value at which the callback is invoked. If relativeTime is
3406 * NULL or points to a 0-filled structure, the callback will be invoked as
3407 * soon as possible
3408 */
3409
Wink Saville7f856802009-06-09 10:23:37 -07003410 void (*RequestTimedCallback) (RIL_TimedCallback callback,
3411 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003412};
3413
3414
Wink Saville7f856802009-06-09 10:23:37 -07003415/**
3416 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003417 * argc and argv will be command line arguments intended for the RIL implementation
3418 * Return NULL on error
3419 *
3420 * @param env is environment point defined as RIL_Env
3421 * @param argc number of arguments
3422 * @param argv list fo arguments
3423 *
3424 */
3425const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
3426
3427#else /* RIL_SHLIB */
3428
3429/**
3430 * Call this once at startup to register notification routine
3431 *
3432 * @param callbacks user-specifed callback function
3433 */
3434void RIL_register (const RIL_RadioFunctions *callbacks);
3435
3436
3437/**
3438 *
3439 * RIL_onRequestComplete will return as soon as possible
3440 *
3441 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07003442 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003443 * @param e error code
3444 * if "e" != SUCCESS, then response can be null/is ignored
3445 * @param response is owned by caller, and should not be modified or
3446 * freed by callee
3447 * @param responselen the length of response in byte
3448 */
Wink Saville7f856802009-06-09 10:23:37 -07003449void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003450 void *response, size_t responselen);
3451
3452/**
3453 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
3454 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3455 * "data" is owned by caller, and should not be modified or freed by callee
3456 * @param datalen the length of data in byte
3457 */
3458
Wink Saville7f856802009-06-09 10:23:37 -07003459void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003460 size_t datalen);
3461
3462
3463/**
Wink Saville7f856802009-06-09 10:23:37 -07003464 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003465 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3466 * a relative time value at which the callback is invoked. If relativeTime is
3467 * NULL or points to a 0-filled structure, the callback will be invoked as
3468 * soon as possible
3469 *
3470 * @param callback user-specifed callback function
3471 * @param param parameter list
3472 * @param relativeTime a relative time value at which the callback is invoked
3473 */
3474
Wink Saville7f856802009-06-09 10:23:37 -07003475void RIL_requestTimedCallback (RIL_TimedCallback callback,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003476 void *param, const struct timeval *relativeTime);
3477
3478
3479#endif /* RIL_SHLIB */
3480
3481#ifdef __cplusplus
3482}
3483#endif
3484
3485#endif /*ANDROID_RIL_H*/