blob: a2203cb9a6f3cfbd1bbefc01fea3c3abb16e5774 [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 {
210 char * cid; /* Cell Id (as described in TS 27.005) in 16 bits in GSM
211 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700212 * in 9 bits in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800213 * Valid values are hexadecimal 0x0000 - 0xffff.
214 */
215 int rssi; /* Received RSSI in 2G,
216 * Level index of CPICH Received Signal Code Power in 3G
217 */
218} RIL_NeighboringCell;
219
220/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
221typedef enum {
222 CALL_FAIL_NORMAL = 16,
223 CALL_FAIL_BUSY = 17,
224 CALL_FAIL_CONGESTION = 34,
225 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
226 CALL_FAIL_CALL_BARRED = 240,
227 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700228 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
229 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Wink Saville1b5fd232009-04-22 14:50:00 -0700230 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
231 CALL_FAIL_CDMA_DROP = 1001,
232 CALL_FAIL_CDMA_INTERCEPT = 1002,
233 CALL_FAIL_CDMA_REORDER = 1003,
234 CALL_FAIL_CDMA_SO_REJECT = 1004,
235 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
236 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
237 CALL_FAIL_CDMA_PREEMPTED = 1007,
238 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
239 during emergency callback mode */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800240 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
241} RIL_LastCallFailCause;
242
Wink Savillef4c4d362009-04-02 01:37:03 -0700243/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800244typedef enum {
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700245 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
246 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
247 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
248 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
249 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
250 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
251 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
252 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
253 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
254 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
255 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
256 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
257 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* This and all other cases: retry silently */
258 /* Not mentioned in the specification */
259 PDP_FAIL_REGISTRATION_FAIL = -1,
260 PDP_FAIL_GPRS_REGISTRATION_FAIL = -2,
Wink Savillef4c4d362009-04-02 01:37:03 -0700261} RIL_LastDataCallActivateFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800262
jsh602f80f2009-07-10 15:44:37 -0700263/* See RIL_REQUEST_SETUP_DATA_CALL */
264typedef enum {
265 RIL_DATA_PROFILE_DEFAULT = 0,
266 RIL_DATA_PROFILE_TETHERED = 1,
267 RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */
268} RIL_DataProfile;
269
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800270/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
271typedef struct {
272 int notificationType; /*
273 * 0 = MO intermediate result code
274 * 1 = MT unsolicited result code
275 */
276 int code; /* See 27.007 7.17
277 "code1" for MO
278 "code2" for MT. */
279 int index; /* CUG index. See 27.007 7.17. */
280 int type; /* "type" from 27.007 7.17 (MT only). */
281 char * number; /* "number" from 27.007 7.17
282 (MT only, may be NULL). */
283} RIL_SuppSvcNotification;
284
Wink Savillef4c4d362009-04-02 01:37:03 -0700285#define RIL_CARD_MAX_APPS 8
286
287typedef enum {
288 RIL_CARDSTATE_ABSENT = 0,
289 RIL_CARDSTATE_PRESENT = 1,
290 RIL_CARDSTATE_ERROR = 2
291} RIL_CardState;
292
293typedef enum {
294 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
295 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700296 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
297 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700298 involved */
299 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
300 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
301 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
302 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
303 RIL_PERSOSUBSTATE_SIM_SIM = 7,
304 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
305 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
306 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
307 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
308 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
309 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
310 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
311 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
312 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
313 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
314 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
315 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
316 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
317 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
318 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
319 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
320 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
321} RIL_PersoSubstate;
322
323typedef enum {
324 RIL_APPSTATE_UNKNOWN = 0,
325 RIL_APPSTATE_DETECTED = 1,
326 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
327 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700328 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700329 when app_state is assigned to this value */
330 RIL_APPSTATE_READY = 5
331} RIL_AppState;
332
333typedef enum {
334 RIL_PINSTATE_UNKNOWN = 0,
335 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
336 RIL_PINSTATE_ENABLED_VERIFIED = 2,
337 RIL_PINSTATE_DISABLED = 3,
338 RIL_PINSTATE_ENABLED_BLOCKED = 4,
339 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
340} RIL_PinState;
341
342typedef enum {
343 RIL_APPTYPE_UNKNOWN = 0,
344 RIL_APPTYPE_SIM = 1,
345 RIL_APPTYPE_USIM = 2,
346 RIL_APPTYPE_RUIM = 3,
347 RIL_APPTYPE_CSIM = 4
348} RIL_AppType;
349
350typedef struct
351{
Wink Saville7f856802009-06-09 10:23:37 -0700352 RIL_AppType app_type;
353 RIL_AppState app_state;
354 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -0700355 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -0700356 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -0700357 0x30, 0x30, 0x30 */
358 char *app_label_ptr; /* null terminated string */
359 int pin1_replaced; /* applicable to USIM and CSIM */
Wink Saville7f856802009-06-09 10:23:37 -0700360 RIL_PinState pin1;
361 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -0700362} RIL_AppStatus;
363
364typedef struct
365{
Wink Saville7f856802009-06-09 10:23:37 -0700366 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -0700367 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
368 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
369 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
370 int num_applications; /* value <= RIL_CARD_MAX_APPS */
371 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
372} RIL_CardStatus;
373
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800374/* The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH */
375typedef enum {
376 /* A file on SIM has been updated. data[1] contains the EFID. */
377 SIM_FILE_UPDATE = 0,
378 /* SIM initialized. All files should be re-read. */
379 SIM_INIT = 1,
380 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
381 SIM_RESET = 2
382} RIL_SimRefreshResult;
383
Wink Saville1b5fd232009-04-22 14:50:00 -0700384typedef struct {
385 char * number; /* Remote party number */
386 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
387 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -0700388 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Saville1b5fd232009-04-22 14:50:00 -0700389} RIL_CDMA_CallWaiting;
390
Wink Savillea592eeb2009-05-22 13:26:36 -0700391/**
392 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
393 *
394 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
395 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
396 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
397 * CBM message ID.
398 *
399 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
400 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
401 * and 9.4.4.2.3 for UMTS.
402 * All other values can be treated as empty CBM data coding scheme.
403 *
404 * selected 0 means message types specified in <fromServiceId, toServiceId>
405 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
406 *
407 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
408 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
409 */
Wink Savillef4c4d362009-04-02 01:37:03 -0700410typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -0700411 int fromServiceId;
412 int toServiceId;
413 int fromCodeScheme;
414 int toCodeScheme;
415 unsigned char selected;
416} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -0700417
The Android Open Source Project34a51082009-03-05 14:34:37 -0800418/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
419#define RIL_RESTRICTED_STATE_NONE 0x00
420/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
421#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
422/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
423#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -0700424/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -0800425#define RIL_RESTRICTED_STATE_CS_ALL 0x04
426/* Block packet data access due to restriction. */
427#define RIL_RESTRICTED_STATE_PS_ALL 0x10
428
Wink Saville1b5fd232009-04-22 14:50:00 -0700429/* The status for an OTASP/OTAPA session */
430typedef enum {
431 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
432 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
433 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
434 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
435 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
436 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
437 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
438 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
439 CDMA_OTA_PROVISION_STATUS_COMMITTED,
440 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
441 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
442 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
443} RIL_CDMA_OTA_ProvisionStatus;
444
445typedef struct {
446 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
447 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
448} RIL_GW_SignalStrength;
449
450
451typedef struct {
452 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
453 * multiplied by -1. Example: If the actual RSSI is -75, then this response
454 * value will be 75.
455 */
456 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
457 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
458 * will be 125.
459 */
460} RIL_CDMA_SignalStrength;
461
462
463typedef struct {
464 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
465 * multiplied by -1. Example: If the actual RSSI is -75, then this response
466 * value will be 75.
467 */
468 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
469 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
470 * will be 125.
471 */
472 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
473} RIL_EVDO_SignalStrength;
474
475
476typedef struct {
477 RIL_GW_SignalStrength GW_SignalStrength;
478 RIL_CDMA_SignalStrength CDMA_SignalStrength;
479 RIL_EVDO_SignalStrength EVDO_SignalStrength;
480} RIL_SignalStrength;
481
482/* Names of the CDMA info records (C.S0005 section 3.7.5) */
483typedef enum {
484 RIL_CDMA_DISPLAY_INFO_REC,
485 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
486 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
487 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
488 RIL_CDMA_SIGNAL_INFO_REC,
489 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
490 RIL_CDMA_LINE_CONTROL_INFO_REC,
491 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
492 RIL_CDMA_T53_CLIR_INFO_REC,
493 RIL_CDMA_T53_RELEASE_INFO_REC,
494 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
495} RIL_CDMA_InfoRecName;
496
497/* Display Info Rec as defined in C.S0005 section 3.7.5.1
498 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
499 Note: the Extended Display info rec contains multiple records of the
500 form: display_tag, display_len, and display_len occurrences of the
501 chari field if the display_tag is not 10000000 or 10000001.
502 To save space, the records are stored consecutively in a byte buffer.
503 The display_tag, display_len and chari fields are all 1 byte.
504*/
505
506typedef struct {
507 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -0700508 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -0700509} RIL_CDMA_DisplayInfoRecord;
510
511/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
512 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
513 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
514*/
515
516typedef struct {
517 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -0700518 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -0700519 char number_type;
520 char number_plan;
521 char pi;
522 char si;
523} RIL_CDMA_NumberInfoRecord;
524
525/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
526typedef enum {
527 RIL_REDIRECTING_REASON_UNKNOWN = 0,
528 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
529 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
530 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
531 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
532 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
533 RIL_REDIRECTING_REASON_RESERVED
534} RIL_CDMA_RedirectingReason;
535
536typedef struct {
537 RIL_CDMA_NumberInfoRecord redirectingNumber;
538 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
539 RIL_CDMA_RedirectingReason redirectingReason;
540} RIL_CDMA_RedirectingNumberInfoRecord;
541
542/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
543typedef struct {
544 char lineCtrlPolarityIncluded;
545 char lineCtrlToggle;
546 char lineCtrlReverse;
547 char lineCtrlPowerDenial;
548} RIL_CDMA_LineControlInfoRecord;
549
550/* T53 CLIR Information Record */
551typedef struct {
552 char cause;
553} RIL_CDMA_T53_CLIRInfoRecord;
554
555/* T53 Audio Control Information Record */
556typedef struct {
557 char upLink;
558 char downLink;
559} RIL_CDMA_T53_AudioControlInfoRecord;
560
561typedef struct {
562
563 RIL_CDMA_InfoRecName name;
564
565 union {
566 /* Display and Extended Display Info Rec */
567 RIL_CDMA_DisplayInfoRecord display;
568
569 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
570 RIL_CDMA_NumberInfoRecord number;
571
572 /* Signal Info Rec */
573 RIL_CDMA_SignalInfoRecord signal;
574
575 /* Redirecting Number Info Rec */
576 RIL_CDMA_RedirectingNumberInfoRecord redir;
577
578 /* Line Control Info Rec */
579 RIL_CDMA_LineControlInfoRecord lineCtrl;
580
581 /* T53 CLIR Info Rec */
582 RIL_CDMA_T53_CLIRInfoRecord clir;
583
584 /* T53 Audio Control Info Rec */
585 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
586 } rec;
587} RIL_CDMA_InformationRecord;
588
589#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
590
591typedef struct {
592 char numberOfInfoRecs;
593 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
594} RIL_CDMA_InformationRecords;
595
Wink Saville7f856802009-06-09 10:23:37 -0700596/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800597 * RIL_REQUEST_GET_SIM_STATUS
598 *
599 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -0700600 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800601 * "data" is NULL
602 *
Wink Savillef4c4d362009-04-02 01:37:03 -0700603 * "response" is const RIL_CardStatus *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800604 *
605 * Valid errors:
606 * Must never fail
607 */
608#define RIL_REQUEST_GET_SIM_STATUS 1
609
610/**
611 * RIL_REQUEST_ENTER_SIM_PIN
612 *
John Wang309ac292009-07-30 14:53:23 -0700613 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800614 *
615 * "data" is const char **
616 * ((const char **)data)[0] is PIN value
617 *
jsh593c9102009-06-24 16:13:44 -0700618 * "response" is int *
619 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800620 *
621 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700622 *
623 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800624 * RADIO_NOT_AVAILABLE (radio resetting)
625 * GENERIC_FAILURE
626 * PASSWORD_INCORRECT
627 */
628
629#define RIL_REQUEST_ENTER_SIM_PIN 2
630
631
632/**
633 * RIL_REQUEST_ENTER_SIM_PUK
634 *
Wink Saville7f856802009-06-09 10:23:37 -0700635 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800636 *
637 * "data" is const char **
638 * ((const char **)data)[0] is PUK value
639 * ((const char **)data)[1] is new PIN value
640 *
jsh593c9102009-06-24 16:13:44 -0700641 * "response" is int *
642 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800643 *
644 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700645 *
646 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800647 * RADIO_NOT_AVAILABLE (radio resetting)
648 * GENERIC_FAILURE
649 * PASSWORD_INCORRECT
650 * (PUK is invalid)
651 */
652
653#define RIL_REQUEST_ENTER_SIM_PUK 3
654
655/**
656 * RIL_REQUEST_ENTER_SIM_PIN2
657 *
658 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
659 * returned as a a failure from a previous operation.
660 *
661 * "data" is const char **
662 * ((const char **)data)[0] is PIN2 value
663 *
jsh593c9102009-06-24 16:13:44 -0700664 * "response" is int *
665 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800666 *
667 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700668 *
669 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800670 * RADIO_NOT_AVAILABLE (radio resetting)
671 * GENERIC_FAILURE
672 * PASSWORD_INCORRECT
673 */
674
675#define RIL_REQUEST_ENTER_SIM_PIN2 4
676
677/**
678 * RIL_REQUEST_ENTER_SIM_PUK2
679 *
Wink Saville7f856802009-06-09 10:23:37 -0700680 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800681 *
682 * "data" is const char **
683 * ((const char **)data)[0] is PUK2 value
684 * ((const char **)data)[1] is new PIN2 value
685 *
jsh593c9102009-06-24 16:13:44 -0700686 * "response" is int *
687 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800688 *
689 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700690 *
691 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800692 * RADIO_NOT_AVAILABLE (radio resetting)
693 * GENERIC_FAILURE
694 * PASSWORD_INCORRECT
695 * (PUK2 is invalid)
696 */
697
698#define RIL_REQUEST_ENTER_SIM_PUK2 5
699
700/**
701 * RIL_REQUEST_CHANGE_SIM_PIN
702 *
Wink Saville7f856802009-06-09 10:23:37 -0700703 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800704 *
705 * "data" is const char **
706 * ((const char **)data)[0] is old PIN value
707 * ((const char **)data)[1] is new PIN value
708 *
jsh593c9102009-06-24 16:13:44 -0700709 * "response" is int *
710 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800711 *
712 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700713 *
714 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800715 * RADIO_NOT_AVAILABLE (radio resetting)
716 * GENERIC_FAILURE
717 * PASSWORD_INCORRECT
718 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -0700719 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800720 */
721
722#define RIL_REQUEST_CHANGE_SIM_PIN 6
723
724
725/**
726 * RIL_REQUEST_CHANGE_SIM_PIN2
727 *
Wink Saville7f856802009-06-09 10:23:37 -0700728 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800729 *
730 * "data" is const char **
731 * ((const char **)data)[0] is old PIN2 value
732 * ((const char **)data)[1] is new PIN2 value
733 *
jsh593c9102009-06-24 16:13:44 -0700734 * "response" is int *
735 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800736 *
737 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700738 *
739 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800740 * RADIO_NOT_AVAILABLE (radio resetting)
741 * GENERIC_FAILURE
742 * PASSWORD_INCORRECT
743 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -0700744 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800745 */
746
747#define RIL_REQUEST_CHANGE_SIM_PIN2 7
748
749/**
750 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
751 *
752 * Requests that network personlization be deactivated
753 *
754 * "data" is const char **
755 * ((const char **)(data))[0]] is network depersonlization code
756 *
jsh593c9102009-06-24 16:13:44 -0700757 * "response" is int *
758 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800759 *
760 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700761 *
762 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800763 * RADIO_NOT_AVAILABLE (radio resetting)
764 * GENERIC_FAILURE
765 * PASSWORD_INCORRECT
766 * (code is invalid)
767 */
768
769#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
770
771/**
Wink Saville7f856802009-06-09 10:23:37 -0700772 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800773 *
774 * Requests current call list
775 *
776 * "data" is NULL
777 *
778 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -0700779 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800780 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700781 *
782 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800783 * RADIO_NOT_AVAILABLE (radio resetting)
784 * GENERIC_FAILURE
785 * (request will be made again in a few hundred msec)
786 */
787
788#define RIL_REQUEST_GET_CURRENT_CALLS 9
789
790
Wink Saville7f856802009-06-09 10:23:37 -0700791/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800792 * RIL_REQUEST_DIAL
793 *
794 * Initiate voice call
795 *
796 * "data" is const RIL_Dial *
797 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -0700798 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800799 * This method is never used for supplementary service codes
800 *
801 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700802 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800803 * RADIO_NOT_AVAILABLE (radio resetting)
804 * GENERIC_FAILURE
805 */
806#define RIL_REQUEST_DIAL 10
807
808/**
809 * RIL_REQUEST_GET_IMSI
810 *
811 * Get the SIM IMSI
812 *
813 * Only valid when radio state is "RADIO_STATE_SIM_READY"
814 *
815 * "data" is NULL
816 * "response" is a const char * containing the IMSI
817 *
818 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700819 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800820 * RADIO_NOT_AVAILABLE (radio resetting)
821 * GENERIC_FAILURE
822 */
823
824#define RIL_REQUEST_GET_IMSI 11
825
826/**
827 * RIL_REQUEST_HANGUP
828 *
829 * Hang up a specific line (like AT+CHLD=1x)
830 *
Wink Saville7f856802009-06-09 10:23:37 -0700831 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -0700832 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800833 *
834 * "response" is NULL
835 *
836 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700837 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800838 * RADIO_NOT_AVAILABLE (radio resetting)
839 * GENERIC_FAILURE
840 */
841
842#define RIL_REQUEST_HANGUP 12
843
844/**
845 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
846 *
847 * Hang up waiting or held (like AT+CHLD=0)
848 *
849 * "data" is NULL
850 * "response" is NULL
851 *
852 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700853 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800854 * RADIO_NOT_AVAILABLE (radio resetting)
855 * GENERIC_FAILURE
856 */
857
858#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
859
860/**
861 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
862 *
863 * Hang up waiting or held (like AT+CHLD=1)
864 *
865 * "data" is NULL
866 * "response" is NULL
867 *
868 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700869 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800870 * RADIO_NOT_AVAILABLE (radio resetting)
871 * GENERIC_FAILURE
872 */
873
874#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
875
876/**
877 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
878 *
879 * Switch waiting or holding call and active call (like AT+CHLD=2)
880 *
881 * State transitions should be is follows:
882 *
883 * If call 1 is waiting and call 2 is active, then if this re
884 *
885 * BEFORE AFTER
886 * Call 1 Call 2 Call 1 Call 2
887 * ACTIVE HOLDING HOLDING ACTIVE
888 * ACTIVE WAITING HOLDING ACTIVE
889 * HOLDING WAITING HOLDING ACTIVE
890 * ACTIVE IDLE HOLDING IDLE
891 * IDLE IDLE IDLE IDLE
892 *
893 * "data" is NULL
894 * "response" is NULL
895 *
896 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700897 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800898 * RADIO_NOT_AVAILABLE (radio resetting)
899 * GENERIC_FAILURE
900 */
901
902#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
903#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
904
905/**
906 * RIL_REQUEST_CONFERENCE
907 *
908 * Conference holding and active (like AT+CHLD=3)
909
910 * "data" is NULL
911 * "response" is NULL
912 *
913 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700914 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800915 * RADIO_NOT_AVAILABLE (radio resetting)
916 * GENERIC_FAILURE
917 */
918#define RIL_REQUEST_CONFERENCE 16
919
920/**
921 * RIL_REQUEST_UDUB
922 *
Wink Saville7f856802009-06-09 10:23:37 -0700923 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800924 * waiting call answer)(RIL_BasicRequest r);
925 *
926 * "data" is NULL
927 * "response" is NULL
928 *
929 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700930 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800931 * RADIO_NOT_AVAILABLE (radio resetting)
932 * GENERIC_FAILURE
933 */
934#define RIL_REQUEST_UDUB 17
935
936/**
937 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
938 *
939 * Requests the failure cause code for the most recently terminated call
940 *
941 * "data" is NULL
942 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -0700943 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
944 * mapped to cause codes defined in TS 24.008 Annex H where possible.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800945 *
The Android Open Source Project34a51082009-03-05 14:34:37 -0800946 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
947 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
948 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800949 * If the implementation does not have access to the exact cause codes,
950 * then it should return one of the values listed in RIL_LastCallFailCause,
951 * as the UI layer needs to distinguish these cases for tone generation or
952 * error notification.
953 *
954 * Valid errors:
955 * SUCCESS
956 * RADIO_NOT_AVAILABLE
957 * GENERIC_FAILURE
958 *
Wink Savillef4c4d362009-04-02 01:37:03 -0700959 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800960 */
961#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
962
963/**
964 * RIL_REQUEST_SIGNAL_STRENGTH
965 *
Wink Saville1b5fd232009-04-22 14:50:00 -0700966 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800967 *
968 * Must succeed if radio is on.
969 *
970 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -0700971 *
972 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800973 *
974 * Valid errors:
975 * SUCCESS
976 * RADIO_NOT_AVAILABLE
977 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800978#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -0700979
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800980/**
981 * RIL_REQUEST_REGISTRATION_STATE
982 *
983 * Request current registration state
984 *
985 * "data" is NULL
986 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -0700987 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -0700988 * 0 - Not registered, MT is not currently searching
989 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -0700990 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -0700991 * 2 - Not registered, but MT is currently searching
992 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -0700993 * 3 - Registration denied
994 * 4 - Unknown
995 * 5 - Registered, roaming
Wink Saville1b5fd232009-04-22 14:50:00 -0700996 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
997 * NULL if not.Valid LAC are 0x0000 - 0xffff
998 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
999 * NULL if not.
1000 * Valid CID are 0x00000000 - 0xffffffff
1001 * In GSM, CID is Cell ID (see TS 27.007)
1002 * in 16 bits
1003 * In UMTS, CID is UMTS Cell Identity
1004 * (see TS 25.331) in 28 bits
Wink Savillef4c4d362009-04-02 01:37:03 -07001005 * ((const char **)response)[3] indicates the available radio technology 0-7,
Wink Saville1b5fd232009-04-22 14:50:00 -07001006 * 0 - Unknown, 1 - GPRS, 2 - EDGE, 3 - UMTS,
1007 * 4 - IS95A, 5 - IS95B, 6 - 1xRTT,
Li Zhe3a63fbc2009-08-04 13:14:34 +08001008 * 7 - EvDo Rev. 0, 8 - EvDo Rev. A,
1009 * 9 - HSDPA, 10 - HSUPA, 11 - HSPA
Wink Saville1b5fd232009-04-22 14:50:00 -07001010 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1011 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07001012 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07001013 * ((const char **)response)[5] is Base Station latitude if registered on a
1014 * CDMA system or NULL if not. Base Station
1015 * latitude in hexadecimal format
1016 * ((const char **)response)[6] is Base Station longitude if registered on a
1017 * CDMA system or NULL if not. Base Station
1018 * longitude in hexadecimal format
1019 * ((const char **)response)[7] is concurrent services support indicator if
1020 * registered on a CDMA system 0-1.
1021 * 0 - Concurrent services not supported,
1022 * 1 - Concurrent services supported
1023 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1024 * NULL if not. Valid System ID are 0 - 32767
1025 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1026 * NULL if not. Valid System ID are 0 - 65535
1027 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
1028 * on a CDMA system or NULL if not. Valid values
1029 * are 0-255.
1030 * ((const char **)response)[11] indicates whether the current system is in the
1031 * PRL if registered on a CDMA system or NULL if
1032 * not. 0=not in the PRL, 1=in the PRL
1033 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
1034 * if registered on a CDMA system or NULL if not.
1035 * Valid values are 0-255.
1036 * ((const char **)response)[13] if registration state is 3 (Registration
1037 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07001038 * registration was denied. See 3GPP TS 24.008,
1039 * 10.5.3.6 and Annex G.
1040 * 0 - General
1041 * 1 - Authentication Failure
1042 * 2 - IMSI unknown in HLR
1043 * 3 - Illegal MS
1044 * 4 - Illegal ME
1045 * 5 - PLMN not allowed
1046 * 6 - Location area not allowed
1047 * 7 - Roaming not allowed
1048 * 8 - No Suitable Cells in this Location Area
1049 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07001050 * 10 - Persistent location update reject
Wink Saville1b5fd232009-04-22 14:50:00 -07001051 *
1052 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001053 * as "out of service" in the Android telephony system
1054 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001055 * Registration state 3 can be returned if Location Update Reject
1056 * (with cause 17 - Network Failure) is received repeatedly from the network,
1057 * to facilitate "managed roaming"
1058 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001059 * Valid errors:
1060 * SUCCESS
1061 * RADIO_NOT_AVAILABLE
1062 * GENERIC_FAILURE
1063 */
1064#define RIL_REQUEST_REGISTRATION_STATE 20
1065
1066/**
1067 * RIL_REQUEST_GPRS_REGISTRATION_STATE
1068 *
1069 * Request current GPRS registration state
1070 *
1071 * "data" is NULL
1072 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08001073 * ((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 -08001074 * ((const char **)response)[1] is LAC if registered or NULL if not
1075 * ((const char **)response)[2] is CID if registered or NULL if not
1076 * ((const char **)response)[3] indicates the available radio technology, where:
1077 * 0 == unknown
1078 * 1 == GPRS only
1079 * 2 == EDGE
1080 * 3 == UMTS
Li Zhe3a63fbc2009-08-04 13:14:34 +08001081 * 9 == HSDPA
1082 * 10 == HSUPA
1083 * 11 == HSPA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001084 *
1085 * LAC and CID are in hexadecimal format.
1086 * valid LAC are 0x0000 - 0xffff
1087 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07001088 *
1089 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001090 * as "out of service" in the Android telephony system
1091 *
1092 * Valid errors:
1093 * SUCCESS
1094 * RADIO_NOT_AVAILABLE
1095 * GENERIC_FAILURE
1096 */
1097#define RIL_REQUEST_GPRS_REGISTRATION_STATE 21
1098
1099/**
1100 * RIL_REQUEST_OPERATOR
1101 *
1102 * Request current operator ONS or EONS
1103 *
1104 * "data" is NULL
1105 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07001106 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001107 * or NULL if unregistered
1108 *
Wink Saville7f856802009-06-09 10:23:37 -07001109 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001110 * or NULL if unregistered
1111 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1112 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07001113 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001114 * Valid errors:
1115 * SUCCESS
1116 * RADIO_NOT_AVAILABLE
1117 * GENERIC_FAILURE
1118 */
1119#define RIL_REQUEST_OPERATOR 22
1120
1121/**
1122 * RIL_REQUEST_RADIO_POWER
1123 *
1124 * Toggle radio on and off (for "airplane" mode)
1125 * "data" is int *
1126 * ((int *)data)[0] is > 0 for "Radio On"
1127 * ((int *)data)[0] is == 0 for "Radio Off"
1128 *
1129 * "response" is NULL
1130 *
1131 * Turn radio on if "on" > 0
1132 * Turn radio off if "on" == 0
1133 *
1134 * Valid errors:
1135 * SUCCESS
1136 * RADIO_NOT_AVAILABLE
1137 * GENERIC_FAILURE
1138 */
1139#define RIL_REQUEST_RADIO_POWER 23
1140
1141/**
1142 * RIL_REQUEST_DTMF
1143 *
1144 * Send a DTMF tone
1145 *
1146 * If the implementation is currently playing a tone requested via
1147 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1148 * should be played instead
1149 *
jsh602f80f2009-07-10 15:44:37 -07001150 * "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 -08001151 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001152 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001153 * FIXME should this block/mute microphone?
1154 * How does this interact with local DTMF feedback?
1155 *
1156 * Valid errors:
1157 * SUCCESS
1158 * RADIO_NOT_AVAILABLE
1159 * GENERIC_FAILURE
1160 *
1161 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1162 *
1163 */
1164#define RIL_REQUEST_DTMF 24
1165
1166/**
1167 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07001168 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001169 * Send an SMS message
1170 *
1171 * "data" is const char **
1172 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1173 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1174 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1175 * less the SMSC address
1176 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1177 *
1178 * "response" is a const RIL_SMS_Response *
1179 *
1180 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001181 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001182 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1183 *
1184 * Valid errors:
1185 * SUCCESS
1186 * RADIO_NOT_AVAILABLE
1187 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07001188 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001189 * GENERIC_FAILURE
1190 *
1191 * FIXME how do we specify TP-Message-Reference if we need to resend?
1192 */
1193#define RIL_REQUEST_SEND_SMS 25
1194
1195
1196/**
1197 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07001198 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001199 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1200 * except that more messages are expected to be sent soon. If possible,
1201 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1202 *
1203 * "data" is const char **
1204 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1205 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1206 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1207 * less the SMSC address
1208 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1209 *
1210 * "response" is a const RIL_SMS_Response *
1211 *
1212 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001213 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001214 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1215 *
1216 * Valid errors:
1217 * SUCCESS
1218 * RADIO_NOT_AVAILABLE
1219 * SMS_SEND_FAIL_RETRY
1220 * GENERIC_FAILURE
1221 *
1222 */
1223#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1224
1225
1226/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001227 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001228 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001229 * Setup a packet data connection
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001230 *
1231 * "data" is a const char **
Wink Saville7f856802009-06-09 10:23:37 -07001232 * ((const char **)data)[0] indicates whether to setup connection on radio technology CDMA
Wink Savillef4c4d362009-04-02 01:37:03 -07001233 * or GSM/UMTS, 0-1. 0 - CDMA, 1-GSM/UMTS
Wink Saville7f856802009-06-09 10:23:37 -07001234 *
jsh602f80f2009-07-10 15:44:37 -07001235 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07001236 * ((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 -07001237 * override the one in the profile. NULL indicates no APN overrride.
1238 * ((const char **)data)[3] is the username for APN, or NULL
1239 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07001240 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
1241 * 0 => PAP and CHAP is never performed.
1242 * 1 => PAP may be performed; CHAP is never performed.
1243 * 2 => CHAP may be performed; PAP is never performed.
1244 * 3 => PAP / CHAP may be performed - baseband dependent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001245 *
1246 * "response" is a char **
Wink Saville7f856802009-06-09 10:23:37 -07001247 * ((char **)response)[0] indicating PDP CID, which is generated by RIL. This Connection ID is
Wink Savillef4c4d362009-04-02 01:37:03 -07001248 * used in GSM/UMTS and CDMA
1249 * ((char **)response)[1] indicating the network interface name for GSM/UMTS or CDMA
Wink Saville7f856802009-06-09 10:23:37 -07001250 * ((char **)response)[2] indicating the IP address for this interface for GSM/UMTS
Wink Savillef4c4d362009-04-02 01:37:03 -07001251 * and NULL for CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001252 *
1253 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07001254 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001255 * replaces RIL_REQUEST_SETUP_DEFAULT_PDP
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001256 *
1257 * Valid errors:
1258 * SUCCESS
1259 * RADIO_NOT_AVAILABLE
1260 * GENERIC_FAILURE
1261 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001262 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001263 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001264#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001265
1266
1267
1268/**
1269 * RIL_REQUEST_SIM_IO
1270 *
1271 * Request SIM I/O operation.
1272 * This is similar to the TS 27.007 "restricted SIM" operation
1273 * where it assumes all of the EF selection will be done by the
1274 * callee.
1275 *
1276 * "data" is a const RIL_SIM_IO *
1277 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1278 * or may specify a PIN2 for operations that require a PIN2 (eg
1279 * updating FDN records)
1280 *
1281 * "response" is a const RIL_SIM_IO_Response *
1282 *
1283 * Arguments and responses that are unused for certain
1284 * values of "command" should be ignored or set to NULL
1285 *
1286 * Valid errors:
1287 * SUCCESS
1288 * RADIO_NOT_AVAILABLE
1289 * GENERIC_FAILURE
1290 * SIM_PIN2
1291 * SIM_PUK2
1292 */
1293#define RIL_REQUEST_SIM_IO 28
1294
1295/**
1296 * RIL_REQUEST_SEND_USSD
1297 *
1298 * Send a USSD message
1299 *
1300 * If a USSD session already exists, the message should be sent in the
1301 * context of that session. Otherwise, a new session should be created.
1302 *
1303 * The network reply should be reported via RIL_UNSOL_ON_USSD
1304 *
1305 * Only one USSD session may exist at a time, and the session is assumed
1306 * to exist until:
1307 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1308 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1309 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1310 *
1311 * "data" is a const char * containing the USSD request in UTF-8 format
1312 * "response" is NULL
1313 *
1314 * Valid errors:
1315 * SUCCESS
1316 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07001317 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001318 * GENERIC_FAILURE
1319 *
1320 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1321 */
1322
1323#define RIL_REQUEST_SEND_USSD 29
1324
1325/**
1326 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07001327 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001328 * Cancel the current USSD session if one exists
1329 *
1330 * "data" is null
1331 * "response" is NULL
1332 *
1333 * Valid errors:
1334 * SUCCESS
1335 * RADIO_NOT_AVAILABLE
Wink Saville7f856802009-06-09 10:23:37 -07001336 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001337 */
1338
1339#define RIL_REQUEST_CANCEL_USSD 30
1340
Wink Saville7f856802009-06-09 10:23:37 -07001341/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001342 * RIL_REQUEST_GET_CLIR
1343 *
1344 * Gets current CLIR status
1345 * "data" is NULL
1346 * "response" is int *
1347 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1348 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
1349 *
1350 * Valid errors:
1351 * SUCCESS
1352 * RADIO_NOT_AVAILABLE
1353 * GENERIC_FAILURE
1354 */
1355#define RIL_REQUEST_GET_CLIR 31
1356
1357/**
1358 * RIL_REQUEST_SET_CLIR
1359 *
1360 * "data" is int *
1361 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1362 *
1363 * "response" is NULL
1364 *
1365 * Valid errors:
1366 * SUCCESS
1367 * RADIO_NOT_AVAILABLE
1368 * GENERIC_FAILURE
1369 */
1370#define RIL_REQUEST_SET_CLIR 32
1371
1372/**
1373 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
1374 *
1375 * "data" is const RIL_CallForwardInfo *
1376 *
1377 * "response" is const RIL_CallForwardInfo **
1378 * "response" points to an array of RIL_CallForwardInfo *'s, one for
1379 * each distinct registered phone number.
1380 *
1381 * For example, if data is forwarded to +18005551212 and voice is forwarded
1382 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07001383 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001384 * If, however, both data and voice are forwarded to +18005551212, then
1385 * a single RIL_CallForwardInfo can be returned with the service class
1386 * set to "data + voice = 3")
1387 *
1388 * Valid errors:
1389 * SUCCESS
1390 * RADIO_NOT_AVAILABLE
1391 * GENERIC_FAILURE
1392 */
1393#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
1394
1395
1396/**
1397 * RIL_REQUEST_SET_CALL_FORWARD
1398 *
1399 * Configure call forward rule
1400 *
1401 * "data" is const RIL_CallForwardInfo *
1402 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001403 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001404 * Valid errors:
1405 * SUCCESS
1406 * RADIO_NOT_AVAILABLE
1407 * GENERIC_FAILURE
1408 */
1409#define RIL_REQUEST_SET_CALL_FORWARD 34
1410
1411
1412/**
1413 * RIL_REQUEST_QUERY_CALL_WAITING
1414 *
1415 * Query current call waiting state
1416 *
1417 * "data" is const int *
1418 * ((const int *)data)[0] is the TS 27.007 service class to query.
1419 * "response" is a const int *
1420 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
1421 *
1422 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
1423 * must follow, with the TS 27.007 service class bit vector of services
1424 * for which call waiting is enabled.
1425 *
Wink Saville7f856802009-06-09 10:23:37 -07001426 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001427 * ((const int *)response)[1] is 3, then call waiting is enabled for data
1428 * and voice and disabled for everything else
1429 *
1430 * Valid errors:
1431 * SUCCESS
1432 * RADIO_NOT_AVAILABLE
1433 * GENERIC_FAILURE
1434 */
1435#define RIL_REQUEST_QUERY_CALL_WAITING 35
1436
1437
1438/**
1439 * RIL_REQUEST_SET_CALL_WAITING
1440 *
1441 * Configure current call waiting state
1442 *
1443 * "data" is const int *
1444 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
1445 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
1446 * services to modify
1447 * "response" is NULL
1448 *
1449 * Valid errors:
1450 * SUCCESS
1451 * RADIO_NOT_AVAILABLE
1452 * GENERIC_FAILURE
1453 */
1454#define RIL_REQUEST_SET_CALL_WAITING 36
1455
1456/**
1457 * RIL_REQUEST_SMS_ACKNOWLEDGE
1458 *
1459 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07001460 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001461 *
1462 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07001463 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001464 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07001465 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001466 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07001467 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
1468 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
1469 * capacity exceeded) and 0xFF (unspecified error) are
1470 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001471 *
1472 * "response" is NULL
1473 *
1474 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
1475 *
1476 * Valid errors:
1477 * SUCCESS
1478 * RADIO_NOT_AVAILABLE
1479 * GENERIC_FAILURE
1480 */
1481#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
1482
1483/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001484 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001485 *
1486 * Get the device IMEI, including check digit
1487 *
johnwangf8bc1672009-05-14 19:19:47 -07001488 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001489 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1490 *
1491 * "data" is NULL
1492 * "response" is a const char * containing the IMEI
1493 *
1494 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001495 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001496 * RADIO_NOT_AVAILABLE (radio resetting)
1497 * GENERIC_FAILURE
1498 */
1499
1500#define RIL_REQUEST_GET_IMEI 38
1501
1502/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001503 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001504 *
1505 * Get the device IMEISV, which should be two decimal digits
1506 *
johnwangf8bc1672009-05-14 19:19:47 -07001507 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001508 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1509 *
1510 * "data" is NULL
1511 * "response" is a const char * containing the IMEISV
1512 *
1513 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001514 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001515 * RADIO_NOT_AVAILABLE (radio resetting)
1516 * GENERIC_FAILURE
1517 */
1518
1519#define RIL_REQUEST_GET_IMEISV 39
1520
1521
1522/**
1523 * RIL_REQUEST_ANSWER
1524 *
1525 * Answer incoming call
1526 *
1527 * Will not be called for WAITING calls.
1528 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
1529 * instead
1530 *
1531 * "data" is NULL
1532 * "response" is NULL
1533 *
1534 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001535 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001536 * RADIO_NOT_AVAILABLE (radio resetting)
1537 * GENERIC_FAILURE
1538 */
1539
1540#define RIL_REQUEST_ANSWER 40
1541
1542/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001543 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001544 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001545 * Deactivate packet data connection
1546 * replaces RIL_REQUEST_DEACTIVATE_DEFAULT_PDP
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001547 *
1548 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07001549 * ((char**)data)[0] indicating CID
Wink Saville7f856802009-06-09 10:23:37 -07001550 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001551 * "response" is NULL
1552 *
1553 * Valid errors:
1554 * SUCCESS
1555 * RADIO_NOT_AVAILABLE
1556 * GENERIC_FAILURE
1557 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001558 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001559 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001560#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001561
1562/**
1563 * RIL_REQUEST_QUERY_FACILITY_LOCK
1564 *
1565 * Query the status of a facility lock state
1566 *
1567 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07001568 * ((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 -08001569 * (eg "AO" for BAOC, "SC" for SIM lock)
1570 * ((const char **)data)[1] is the password, or "" if not required
1571 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
1572 * services to query
1573 *
1574 * "response" is an int *
1575 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07001576 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001577 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07001578 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001579 *
1580 * Valid errors:
1581 * SUCCESS
1582 * RADIO_NOT_AVAILABLE
1583 * GENERIC_FAILURE
1584 *
1585 */
1586#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
1587
1588/**
1589 * RIL_REQUEST_SET_FACILITY_LOCK
1590 *
1591 * Enable/disable one facility lock
1592 *
1593 * "data" is const char **
1594 *
1595 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1596 * (eg "AO" for BAOC)
1597 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
1598 * ((const char **)data)[2] = password
1599 * ((const char **)data)[3] = string representation of decimal TS 27.007
1600 * service class bit vector. Eg, the string
1601 * "1" means "set this facility for voice services"
1602 *
jsh593c9102009-06-24 16:13:44 -07001603 * "response" is int *
1604 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001605 *
1606 * Valid errors:
1607 * SUCCESS
1608 * RADIO_NOT_AVAILABLE
1609 * GENERIC_FAILURE
1610 *
1611 */
1612#define RIL_REQUEST_SET_FACILITY_LOCK 43
1613
1614/**
1615 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
1616 *
1617 * Change call barring facility password
1618 *
1619 * "data" is const char **
1620 *
1621 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1622 * (eg "AO" for BAOC)
1623 * ((const char **)data)[1] = old password
1624 * ((const char **)data)[2] = new password
1625 *
Wink Saville7f856802009-06-09 10:23:37 -07001626 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001627 *
1628 * Valid errors:
1629 * SUCCESS
1630 * RADIO_NOT_AVAILABLE
1631 * GENERIC_FAILURE
1632 *
1633 */
1634#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
1635
1636/**
1637 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
1638 *
1639 * Query current network selectin mode
1640 *
1641 * "data" is NULL
1642 *
1643 * "response" is int *
1644 * ((const int *)response)[0] is
1645 * 0 for automatic selection
1646 * 1 for manual selection
1647 *
1648 * Valid errors:
1649 * SUCCESS
1650 * RADIO_NOT_AVAILABLE
1651 * GENERIC_FAILURE
1652 *
1653 */
1654#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
1655
1656/**
1657 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
1658 *
1659 * Specify that the network should be selected automatically
1660 *
1661 * "data" is NULL
1662 * "response" is NULL
1663 *
Wink Saville7f856802009-06-09 10:23:37 -07001664 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001665 * and registered
1666 *
1667 * Valid errors:
1668 * SUCCESS
1669 * RADIO_NOT_AVAILABLE
1670 * GENERIC_FAILURE
1671 *
1672 */
1673#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
1674
1675/**
1676 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
1677 *
1678 * Manually select a specified network.
1679 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001680 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
1681 * "response" is NULL
1682 *
Wink Saville7f856802009-06-09 10:23:37 -07001683 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001684 * and registered
1685 *
1686 * Valid errors:
1687 * SUCCESS
1688 * RADIO_NOT_AVAILABLE
1689 * GENERIC_FAILURE
1690 *
1691 */
1692#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
1693
1694/**
1695 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
1696 *
1697 * Scans for available networks
1698 *
1699 * "data" is NULL
1700 * "response" is const char ** that should be an array of n*4 strings, where
1701 * n is the number of available networks
1702 * For each available network:
1703 *
Wink Saville7f856802009-06-09 10:23:37 -07001704 * ((const char **)response)[n+0] is long alpha ONS or EONS
1705 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001706 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
1707 * ((const char **)response)[n+3] is a string value of the status:
1708 * "unknown"
1709 * "available"
1710 * "current"
1711 * "forbidden"
1712 *
Wink Saville7f856802009-06-09 10:23:37 -07001713 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001714 * and registered
1715 *
1716 * Valid errors:
1717 * SUCCESS
1718 * RADIO_NOT_AVAILABLE
1719 * GENERIC_FAILURE
1720 *
1721 */
1722#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
1723
1724/**
1725 * RIL_REQUEST_DTMF_START
1726 *
Wink Saville7f856802009-06-09 10:23:37 -07001727 * Start playing a DTMF tone. Continue playing DTMF tone until
1728 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001729 *
1730 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
1731 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07001732 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001733 * "data" is a char *
1734 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
1735 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001736 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001737 * Valid errors:
1738 * SUCCESS
1739 * RADIO_NOT_AVAILABLE
1740 * GENERIC_FAILURE
1741 *
1742 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
1743 */
1744#define RIL_REQUEST_DTMF_START 49
1745
1746/**
1747 * RIL_REQUEST_DTMF_STOP
1748 *
1749 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07001750 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001751 * "data" is NULL
1752 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001753 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001754 * Valid errors:
1755 * SUCCESS
1756 * RADIO_NOT_AVAILABLE
1757 * GENERIC_FAILURE
1758 *
1759 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
1760 */
1761#define RIL_REQUEST_DTMF_STOP 50
1762
1763/**
1764 * RIL_REQUEST_BASEBAND_VERSION
1765 *
1766 * Return string value indicating baseband version, eg
1767 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07001768 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001769 * "data" is NULL
1770 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07001771 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001772 * Valid errors:
1773 * SUCCESS
1774 * RADIO_NOT_AVAILABLE
1775 * GENERIC_FAILURE
1776 *
1777 */
1778#define RIL_REQUEST_BASEBAND_VERSION 51
1779
1780/**
1781 * RIL_REQUEST_SEPARATE_CONNECTION
1782 *
1783 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07001784 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001785 * as the only other member of the current (active) call
1786 *
1787 * Like AT+CHLD=2x
1788 *
1789 * See TS 22.084 1.3.8.2 (iii)
1790 * TS 22.030 6.5.5 "Entering "2X followed by send"
1791 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07001792 *
1793 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001794 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
1795 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001796 * "response" is NULL
1797 *
1798 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001799 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001800 * RADIO_NOT_AVAILABLE (radio resetting)
1801 * GENERIC_FAILURE
1802 */
1803#define RIL_REQUEST_SEPARATE_CONNECTION 52
1804
1805
1806/**
1807 * RIL_REQUEST_SET_MUTE
1808 *
1809 * Turn on or off uplink (microphone) mute.
1810 *
1811 * Will only be sent while voice call is active.
1812 * Will always be reset to "disable mute" when a new voice call is initiated
1813 *
1814 * "data" is an int *
1815 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
1816 *
1817 * "response" is NULL
1818 *
1819 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001820 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001821 * RADIO_NOT_AVAILABLE (radio resetting)
1822 * GENERIC_FAILURE
1823 */
1824
1825#define RIL_REQUEST_SET_MUTE 53
1826
1827/**
1828 * RIL_REQUEST_GET_MUTE
1829 *
1830 * Queries the current state of the uplink mute setting
1831 *
1832 * "data" is NULL
1833 * "response" is an int *
1834 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
1835 *
1836 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001837 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001838 * RADIO_NOT_AVAILABLE (radio resetting)
1839 * GENERIC_FAILURE
1840 */
1841
1842#define RIL_REQUEST_GET_MUTE 54
1843
1844/**
1845 * RIL_REQUEST_QUERY_CLIP
1846 *
1847 * Queries the status of the CLIP supplementary service
1848 *
1849 * (for MMI code "*#30#")
1850 *
1851 * "data" is NULL
1852 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07001853 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001854 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07001855 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001856 *
1857 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001858 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001859 * RADIO_NOT_AVAILABLE (radio resetting)
1860 * GENERIC_FAILURE
1861 */
1862
1863#define RIL_REQUEST_QUERY_CLIP 55
1864
1865/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001866 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
Wink Saville7f856802009-06-09 10:23:37 -07001867 *
1868 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07001869 * context or CDMA data connection active
1870 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001871 *
1872 * "data" is NULL
1873 *
1874 * "response" is a "int *"
1875 * ((int *)response)[0] is an integer cause code defined in TS 24.008
1876 * section 6.1.3.1.3 or close approximation
1877 *
1878 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07001879 * then it should return one of the values listed in
1880 * RIL_LastDataCallActivateFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001881 * cases for error notification
1882 * and potential retries.
1883 *
1884 * Valid errors:
1885 * SUCCESS
1886 * RADIO_NOT_AVAILABLE
1887 * GENERIC_FAILURE
1888 *
1889 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Saville7f856802009-06-09 10:23:37 -07001890 *
1891 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001892
Wink Savillef4c4d362009-04-02 01:37:03 -07001893#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001894
1895/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001896 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001897 *
1898 * Queries the status of PDP contexts, returning for each
1899 * its CID, whether or not it is active, and its PDP type,
1900 * APN, and PDP adddress.
Wink Savillef4c4d362009-04-02 01:37:03 -07001901 * replaces RIL_REQUEST_PDP_CONTEXT_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001902 *
1903 * "data" is NULL
Wink Savillef4c4d362009-04-02 01:37:03 -07001904 * "response" is an array of RIL_Data_Call_Response
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001905 *
1906 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001907 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001908 * RADIO_NOT_AVAILABLE (radio resetting)
1909 * GENERIC_FAILURE
1910 */
1911
Wink Savillef4c4d362009-04-02 01:37:03 -07001912#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001913
1914/**
johnwangf8bc1672009-05-14 19:19:47 -07001915 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001916 *
1917 * Request a radio reset. The RIL implementation may postpone
1918 * the reset until after this request is responded to if the baseband
1919 * is presently busy.
1920 *
johnwangf8bc1672009-05-14 19:19:47 -07001921 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
1922 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001923 * "data" is NULL
1924 * "response" is NULL
1925 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001926 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001927 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001928 * RADIO_NOT_AVAILABLE (radio resetting)
1929 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07001930 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001931 */
1932
1933#define RIL_REQUEST_RESET_RADIO 58
1934
1935/**
1936 * RIL_REQUEST_OEM_HOOK_RAW
1937 *
1938 * This request reserved for OEM-specific uses. It passes raw byte arrays
1939 * back and forth.
1940 *
Wink Saville7f856802009-06-09 10:23:37 -07001941 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001942 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
1943 *
1944 * "data" is a char * of bytes copied from the byte[] data argument in java
1945 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07001946 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001947 * (byte[])(((AsyncResult)response.obj).result)
1948 *
Wink Saville7f856802009-06-09 10:23:37 -07001949 * An error response here will result in
1950 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001951 * (((AsyncResult)response.obj).exception) being an instance of
1952 * com.android.internal.telephony.gsm.CommandException
1953 *
1954 * Valid errors:
1955 * All
1956 */
1957
1958#define RIL_REQUEST_OEM_HOOK_RAW 59
1959
1960/**
1961 * RIL_REQUEST_OEM_HOOK_STRINGS
1962 *
1963 * This request reserved for OEM-specific uses. It passes strings
1964 * back and forth.
1965 *
Wink Saville7f856802009-06-09 10:23:37 -07001966 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001967 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
1968 *
1969 * "data" is a const char **, representing an array of null-terminated UTF-8
1970 * strings copied from the "String[] strings" argument to
1971 * invokeOemRilRequestStrings()
1972 *
1973 * "response" is a const char **, representing an array of null-terminated UTF-8
1974 * stings that will be returned via the caller's response message here:
1975 *
1976 * (String[])(((AsyncResult)response.obj).result)
1977 *
Wink Saville7f856802009-06-09 10:23:37 -07001978 * An error response here will result in
1979 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001980 * (((AsyncResult)response.obj).exception) being an instance of
1981 * com.android.internal.telephony.gsm.CommandException
1982 *
1983 * Valid errors:
1984 * All
1985 */
1986
1987#define RIL_REQUEST_OEM_HOOK_STRINGS 60
1988
1989/**
1990 * RIL_REQUEST_SCREEN_STATE
1991 *
1992 * Indicates the current state of the screen. When the screen is off, the
1993 * RIL should notify the baseband to suppress certain notifications (eg,
1994 * signal strength and changes in LAC or CID) in an effort to conserve power.
1995 * These notifications should resume when the screen is on.
1996 *
1997 * "data" is int *
1998 * ((int *)data)[0] is == 1 for "Screen On"
1999 * ((int *)data)[0] is == 0 for "Screen Off"
2000 *
2001 * "response" is NULL
2002 *
2003 * Valid errors:
2004 * SUCCESS
2005 * GENERIC_FAILURE
2006 */
2007#define RIL_REQUEST_SCREEN_STATE 61
2008
2009
2010/**
2011 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
2012 *
2013 * Enables/disables supplementary service related notifications
2014 * from the network.
2015 *
2016 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2017 *
2018 * "data" is int *
2019 * ((int *)data)[0] is == 1 for notifications enabled
2020 * ((int *)data)[0] is == 0 for notifications disabled
2021 *
2022 * "response" is NULL
2023 *
2024 * Valid errors:
2025 * SUCCESS
2026 * RADIO_NOT_AVAILABLE
2027 * GENERIC_FAILURE
2028 *
2029 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2030 */
2031#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2032
2033/**
2034 * RIL_REQUEST_WRITE_SMS_TO_SIM
2035 *
2036 * Stores a SMS message to SIM memory.
2037 *
2038 * "data" is RIL_SMS_WriteArgs *
2039 *
2040 * "response" is int *
2041 * ((const int *)response)[0] is the record index where the message is stored.
2042 *
2043 * Valid errors:
2044 * SUCCESS
2045 * GENERIC_FAILURE
2046 *
2047 */
2048#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2049
2050/**
2051 * RIL_REQUEST_DELETE_SMS_ON_SIM
2052 *
2053 * Deletes a SMS message from SIM memory.
2054 *
2055 * "data" is int *
2056 * ((int *)data)[0] is the record index of the message to delete.
2057 *
2058 * "response" is NULL
2059 *
2060 * Valid errors:
2061 * SUCCESS
2062 * GENERIC_FAILURE
2063 *
2064 */
2065#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2066
2067/**
2068 * RIL_REQUEST_SET_BAND_MODE
2069 *
2070 * Assign a specified band for RF configuration.
2071 *
2072 * "data" is int *
2073 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2074 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2075 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2076 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2077 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2078 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002079 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2080 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2081 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2082 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2083 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2084 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2085 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2086 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2087 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2088 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2089 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2090 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2091 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002092 *
2093 * "response" is NULL
2094 *
2095 * Valid errors:
2096 * SUCCESS
2097 * RADIO_NOT_AVAILABLE
2098 * GENERIC_FAILURE
2099 */
2100#define RIL_REQUEST_SET_BAND_MODE 65
2101
2102/**
2103 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2104 *
2105 * Query the list of band mode supported by RF.
2106 *
2107 * "data" is NULL
2108 *
2109 * "response" is int *
2110 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2111 * each available band mode.
2112 *
2113 * 0 for "unspecified" (selected by baseband automatically)
2114 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2115 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2116 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2117 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2118 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002119 * 6 for "Cellular (800-MHz Band)"
2120 * 7 for "PCS (1900-MHz Band)"
2121 * 8 for "Band Class 3 (JTACS Band)"
2122 * 9 for "Band Class 4 (Korean PCS Band)"
2123 * 10 for "Band Class 5 (450-MHz Band)"
2124 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2125 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2126 * 13 for "Band Class 8 (1800-MHz Band)"
2127 * 14 for "Band Class 9 (900-MHz Band)"
2128 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2129 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2130 * 17 for "Band Class 15 (AWS Band)"
2131 * 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002132 *
2133 * Valid errors:
2134 * SUCCESS
2135 * RADIO_NOT_AVAILABLE
2136 * GENERIC_FAILURE
2137 *
2138 * See also: RIL_REQUEST_SET_BAND_MODE
2139 */
2140#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2141
2142/**
2143 * RIL_REQUEST_STK_GET_PROFILE
2144 *
2145 * Requests the profile of SIM tool kit.
2146 * The profile indicates the SAT/USAT features supported by ME.
2147 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2148 *
2149 * "data" is NULL
2150 *
2151 * "response" is a const char * containing SAT/USAT profile
2152 * in hexadecimal format string starting with first byte of terminal profile
2153 *
2154 * Valid errors:
2155 * RIL_E_SUCCESS
2156 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2157 * RIL_E_GENERIC_FAILURE
2158 */
2159#define RIL_REQUEST_STK_GET_PROFILE 67
2160
2161/**
2162 * RIL_REQUEST_STK_SET_PROFILE
2163 *
2164 * Download the STK terminal profile as part of SIM initialization
2165 * procedure
2166 *
2167 * "data" is a const char * containing SAT/USAT profile
2168 * in hexadecimal format string starting with first byte of terminal profile
2169 *
2170 * "response" is NULL
2171 *
2172 * Valid errors:
2173 * RIL_E_SUCCESS
2174 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2175 * RIL_E_GENERIC_FAILURE
2176 */
2177#define RIL_REQUEST_STK_SET_PROFILE 68
2178
2179/**
2180 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2181 *
2182 * Requests to send a SAT/USAT envelope command to SIM.
2183 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2184 *
2185 * "data" is a const char * containing SAT/USAT command
2186 * in hexadecimal format string starting with command tag
2187 *
2188 * "response" is a const char * containing SAT/USAT response
2189 * in hexadecimal format string starting with first byte of response
2190 * (May be NULL)
2191 *
2192 * Valid errors:
2193 * RIL_E_SUCCESS
2194 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2195 * RIL_E_GENERIC_FAILURE
2196 */
2197#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2198
2199/**
2200 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2201 *
2202 * Requests to send a terminal response to SIM for a received
2203 * proactive command
2204 *
2205 * "data" is a const char * containing SAT/USAT response
2206 * in hexadecimal format string starting with first byte of response data
2207 *
2208 * "response" is NULL
2209 *
2210 * Valid errors:
2211 * RIL_E_SUCCESS
2212 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2213 * RIL_E_GENERIC_FAILURE
2214 */
2215#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
2216
2217/**
2218 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
2219 *
2220 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
2221 * been initialized by ME already. (We could see the call has been in the 'call
2222 * list') So, STK application needs to accept/reject the call according as user
2223 * operations.
2224 *
2225 * "data" is int *
2226 * ((int *)data)[0] is > 0 for "accept" the call setup
2227 * ((int *)data)[0] is == 0 for "reject" the call setup
2228 *
2229 * "response" is NULL
2230 *
2231 * Valid errors:
2232 * RIL_E_SUCCESS
2233 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2234 * RIL_E_GENERIC_FAILURE
2235 */
2236#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
2237
2238/**
2239 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
2240 *
2241 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07002242 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002243 * "data" is NULL
2244 * "response" is NULL
2245 *
2246 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002247 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002248 * RADIO_NOT_AVAILABLE (radio resetting)
2249 * GENERIC_FAILURE
2250 */
2251#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
2252
2253/**
2254 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2255 *
2256 * Requests to set the preferred network type for searching and registering
2257 * (CS/PS domain, RAT, and operation mode)
2258 *
2259 * "data" is int *
Wink Saville7f856802009-06-09 10:23:37 -07002260 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002261 * ((int *)data)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002262 * ((int *)data)[0] is == 1 for GSM only
2263 * ((int *)data)[0] is == 2 for WCDMA only
jsh29be25c2009-07-14 20:18:59 -07002264 * ((int *)data)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL)
Wink Savillef4c4d362009-04-02 01:37:03 -07002265 * ((int *)data)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2266 * ((int *)data)[0] is == 5 for CDMA only
2267 * ((int *)data)[0] is == 6 for EvDo only
2268 * ((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 -08002269 *
2270 * "response" is NULL
2271 *
2272 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07002273 * SUCCESS
2274 * RADIO_NOT_AVAILABLE (radio resetting)
2275 * GENERIC_FAILURE
2276 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002277 */
2278#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2279
2280/**
2281 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2282 *
2283 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2284 * for searching and registering
2285 *
2286 * "data" is NULL
2287 *
2288 * "response" is int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002289 * ((int *)response)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002290 * ((int *)response)[0] is == 1 for GSM only
2291 * ((int *)response)[0] is == 2 for WCDMA only
Wink Savillef4c4d362009-04-02 01:37:03 -07002292 * ((int *)response)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL)
2293 * ((int *)response)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2294 * ((int *)response)[0] is == 5 for CDMA only
2295 * ((int *)response)[0] is == 6 for EvDo only
2296 * ((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 -08002297 *
2298 * Valid errors:
2299 * SUCCESS
2300 * RADIO_NOT_AVAILABLE
2301 * GENERIC_FAILURE
2302 *
2303 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2304 */
2305#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2306
2307/**
2308 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2309 *
2310 * Request neighboring cell id in GSM network
2311 *
2312 * "data" is NULL
2313 * "response" must be a " const RIL_NeighboringCell** "
2314 *
2315 * Valid errors:
2316 * SUCCESS
2317 * RADIO_NOT_AVAILABLE
2318 * GENERIC_FAILURE
2319 */
2320#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
2321
2322/**
2323 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07002324 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002325 * Enables/disables network state change notifications due to changes in
Wink Saville7f856802009-06-09 10:23:37 -07002326 * LAC and/or CID (basically, +CREG=2 vs. +CREG=1).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002327 *
2328 * Note: The RIL implementation should default to "updates enabled"
2329 * when the screen is on and "updates disabled" when the screen is off.
2330 *
2331 * "data" is int *
2332 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
2333 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
2334 *
2335 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07002336 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002337 * Valid errors:
2338 * SUCCESS
2339 * RADIO_NOT_AVAILABLE
2340 * GENERIC_FAILURE
2341 *
2342 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2343 */
2344#define RIL_REQUEST_SET_LOCATION_UPDATES 76
2345
Wink Savillef4c4d362009-04-02 01:37:03 -07002346/**
2347 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION
Wink Saville7f856802009-06-09 10:23:37 -07002348 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002349 * Request to set the location where the CDMA subscription shall
2350 * be retrieved
2351 *
2352 * "data" is int *
2353 * ((int *)data)[0] is == 0 from RUIM/SIM (default)
2354 * ((int *)data)[0] is == 1 from NV
2355 *
2356 * "response" is NULL
2357 *
2358 * Valid errors:
2359 * SUCCESS
2360 * RADIO_NOT_AVAILABLE
2361 * GENERIC_FAILURE
2362 * SIM_ABSENT
2363 * SUBSCRIPTION_NOT_AVAILABLE
2364 */
2365#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION 77
2366
2367/**
2368 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07002369 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002370 * Request to set the roaming preferences in CDMA
2371 *
2372 * "data" is int *
2373 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
2374 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2375 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07002376 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002377 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002378 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002379 * Valid errors:
2380 * SUCCESS
2381 * RADIO_NOT_AVAILABLE
2382 * GENERIC_FAILURE
2383 */
2384#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
2385
2386/**
2387 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07002388 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002389 * Request the actual setting of the roaming preferences in CDMA in the modem
2390 *
2391 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002392 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002393 * "response" is int *
2394 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
2395 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2396 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07002397 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002398 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002399 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002400 * Valid errors:
2401 * SUCCESS
2402 * RADIO_NOT_AVAILABLE
2403 * GENERIC_FAILURE
2404 */
2405#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
2406
2407/**
2408 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002409 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002410 * Request to set the TTY mode
2411 *
2412 * "data" is int *
2413 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07002414 * ((int *)data)[0] is == 1 for TTY Full
2415 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
2416 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07002417 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002418 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002419 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002420 * Valid errors:
2421 * SUCCESS
2422 * RADIO_NOT_AVAILABLE
2423 * GENERIC_FAILURE
2424 */
2425#define RIL_REQUEST_SET_TTY_MODE 80
2426
2427/**
2428 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002429 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002430 * Request the setting of TTY mode
2431 *
2432 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002433 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002434 * "response" is int *
2435 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07002436 * ((int *)response)[0] is == 1 for TTY Full
2437 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
2438 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07002439 *
2440 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002441 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002442 * Valid errors:
2443 * SUCCESS
2444 * RADIO_NOT_AVAILABLE
2445 * GENERIC_FAILURE
2446 */
2447#define RIL_REQUEST_QUERY_TTY_MODE 81
2448
2449/**
2450 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
2451 *
2452 * Request to set the preferred voice privacy mode used in voice
2453 * scrambling
2454 *
2455 * "data" is int *
2456 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2457 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07002458 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002459 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002460 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002461 * Valid errors:
2462 * SUCCESS
2463 * RADIO_NOT_AVAILABLE
2464 * GENERIC_FAILURE
2465 */
2466#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
2467
2468/**
2469 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002470 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002471 * Request the setting of preferred voice privacy mode
2472 *
2473 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002474 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002475 * "response" is int *
2476 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2477 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07002478 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002479 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002480 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002481 * Valid errors:
2482 * SUCCESS
2483 * RADIO_NOT_AVAILABLE
2484 * GENERIC_FAILURE
2485 */
2486#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
2487
2488/**
2489 * RIL_REQUEST_CDMA_FLASH
2490 *
2491 * Send FLASH
2492 *
2493 * "data" is const char *
2494 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07002495 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002496 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002497 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002498 * Valid errors:
2499 * SUCCESS
2500 * RADIO_NOT_AVAILABLE
2501 * GENERIC_FAILURE
2502 *
2503 */
2504#define RIL_REQUEST_CDMA_FLASH 84
2505
2506/**
2507 * RIL_REQUEST_CDMA_BURST_DTMF
2508 *
2509 * Send DTMF string
2510 *
jsh602f80f2009-07-10 15:44:37 -07002511 * "data" is const char **
2512 * ((const char **)data)[0] is a DTMF string
2513 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
2514 * default
2515 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
2516 * default
Wink Saville7f856802009-06-09 10:23:37 -07002517 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002518 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002519 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002520 * Valid errors:
2521 * SUCCESS
2522 * RADIO_NOT_AVAILABLE
2523 * GENERIC_FAILURE
2524 *
2525 */
2526#define RIL_REQUEST_CDMA_BURST_DTMF 85
2527
2528/**
2529 * RIL_REQUEST_CDMA_VALIDATE_AKEY
2530 *
2531 * Validate AKey.
2532 *
2533 * "data" is const char *
2534 * ((const char *)data)[0] is a AKey string
Wink Saville7f856802009-06-09 10:23:37 -07002535 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002536 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002537 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002538 * Valid errors:
2539 * SUCCESS
2540 * RADIO_NOT_AVAILABLE
2541 * GENERIC_FAILURE
2542 *
2543 */
2544#define RIL_REQUEST_CDMA_VALIDATE_AKEY 86
2545
2546/**
2547 * RIL_REQUEST_CDMA_SEND_SMS
2548 *
2549 * Send a CDMA SMS message
2550 *
2551 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07002552 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002553 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07002554 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002555 * Valid errors:
2556 * SUCCESS
2557 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07002558 * SMS_SEND_FAIL_RETRY
Wink Savillef4c4d362009-04-02 01:37:03 -07002559 * GENERIC_FAILURE
2560 *
2561 */
2562#define RIL_REQUEST_CDMA_SEND_SMS 87
2563
2564/**
2565 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
2566 *
2567 * Acknowledge the success or failure in the receipt of SMS
2568 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
2569 *
2570 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07002571 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002572 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002573 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002574 * Valid errors:
2575 * SUCCESS
2576 * RADIO_NOT_AVAILABLE
2577 * GENERIC_FAILURE
2578 *
2579 */
2580#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
2581
2582/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002583 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002584 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002585 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
2586 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002587 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002588 *
2589 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
2590 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
2591 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002592 * Valid errors:
2593 * SUCCESS
2594 * RADIO_NOT_AVAILABLE
2595 * GENERIC_FAILURE
2596 *
2597 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002598#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07002599
2600/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002601 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002602 *
2603 * Set GSM/WCDMA Cell Broadcast SMS config
2604 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002605 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
2606 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
2607 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002608 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002609 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002610 * Valid errors:
2611 * SUCCESS
2612 * RADIO_NOT_AVAILABLE
2613 * GENERIC_FAILURE
2614 *
2615 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002616#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07002617
2618/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002619 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07002620 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002621* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07002622 *
2623 * "data" is const int *
2624 * (const int *)data[0] indicates to activate or turn off the
2625 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
2626 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07002627 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002628 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002629 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002630 * Valid errors:
2631 * SUCCESS
2632 * RADIO_NOT_AVAILABLE
2633 * GENERIC_FAILURE
2634 *
2635 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002636#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07002637
2638/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002639 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002640 *
2641 * Request the setting of CDMA Broadcast SMS config
2642 *
2643 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002644 *
2645 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
2646 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
2647 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002648 * Valid errors:
2649 * SUCCESS
2650 * RADIO_NOT_AVAILABLE
2651 * GENERIC_FAILURE
2652 *
2653 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002654#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07002655
2656/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002657 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002658 *
2659 * Set CDMA Broadcast SMS config
2660 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002661 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
2662 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
2663 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002664 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002665 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002666 * Valid errors:
2667 * SUCCESS
2668 * RADIO_NOT_AVAILABLE
2669 * GENERIC_FAILURE
2670 *
2671 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002672#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07002673
2674/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002675 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07002676 *
2677 * Enable or disable the reception of CDMA Broadcast SMS
2678 *
2679 * "data" is const int *
2680 * (const int *)data[0] indicates to activate or turn off the
2681 * reception of CDMA Broadcast SMS, 0-1,
2682 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07002683 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002684 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002685 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002686 * Valid errors:
2687 * SUCCESS
2688 * RADIO_NOT_AVAILABLE
2689 * GENERIC_FAILURE
2690 *
2691 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002692#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07002693
2694/**
2695 * RIL_REQUEST_CDMA_SUBSCRIPTION
2696 *
2697 * Request the device MDN / H_SID / H_NID.
2698 *
2699 * The request is only allowed when CDMA subscription is available. When CDMA
2700 * subscription is changed, application layer should re-issue the request to
2701 * update the subscription information.
2702 *
2703 * If a NULL value is returned for any of the device id, it means that error
2704 * accessing the device.
2705 *
2706 * "response" is const char **
2707 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07002708 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
2709 * CDMA subscription is available, in decimal format
2710 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
2711 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07002712 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07002713 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07002714 *
2715 * Valid errors:
2716 * SUCCESS
2717 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
2718 */
2719
Wink Savilleeafe79d2009-04-03 18:02:34 -07002720#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07002721
2722/**
2723 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
2724 *
2725 * Stores a CDMA SMS message to RUIM memory.
2726 *
2727 * "data" is RIL_CDMA_SMS_WriteArgs *
2728 *
2729 * "response" is int *
2730 * ((const int *)response)[0] is the record index where the message is stored.
2731 *
2732 * Valid errors:
2733 * SUCCESS
2734 * RADIO_NOT_AVAILABLE
2735 * GENERIC_FAILURE
2736 *
2737 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07002738#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07002739
2740/**
2741 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
2742 *
2743 * Deletes a CDMA SMS message from RUIM memory.
2744 *
2745 * "data" is int *
2746 * ((int *)data)[0] is the record index of the message to delete.
2747 *
2748 * "response" is NULL
2749 *
2750 * Valid errors:
2751 * SUCCESS
2752 * RADIO_NOT_AVAILABLE
2753 * GENERIC_FAILURE
2754 *
2755 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07002756#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07002757
2758/**
2759 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07002760 *
2761 * Request the device ESN / MEID / IMEI / IMEISV.
2762 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002763 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07002764 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07002765 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07002766 *
2767 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07002768 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07002769 *
2770 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07002771 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07002772 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002773 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07002774 * ((const char **)response)[0] is IMEI if GSM subscription is available
2775 * ((const char **)response)[1] is IMEISV if GSM subscription is available
2776 * ((const char **)response)[2] is ESN if CDMA subscription is available
2777 * ((const char **)response)[3] is MEID if CDMA subscription is available
2778 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002779 * Valid errors:
2780 * SUCCESS
2781 * RADIO_NOT_AVAILABLE
2782 * GENERIC_FAILURE
2783 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07002784#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07002785
Wink Saville1b5fd232009-04-22 14:50:00 -07002786/**
2787 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
2788 *
2789 * Request the radio's system selection module to exit emergency
2790 * callback mode. RIL will not respond with SUCCESS until the modem has
2791 * completely exited from Emergency Callback Mode.
2792 *
2793 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002794 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002795 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002796 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002797 * Valid errors:
2798 * SUCCESS
2799 * RADIO_NOT_AVAILABLE
2800 * GENERIC_FAILURE
2801 *
2802 */
2803#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07002804
jsh000a9fe2009-05-11 14:52:35 -07002805/**
2806 * RIL_REQUEST_GET_SMSC_ADDRESS
2807 *
2808 * Queries the default Short Message Service Center address on the device.
2809 *
2810 * "data" is NULL
2811 *
2812 * "response" is const char * containing the SMSC address.
2813 *
2814 * Valid errors:
2815 * SUCCESS
2816 * RADIO_NOT_AVAILABLE
2817 * GENERIC_FAILURE
2818 *
2819 */
2820#define RIL_REQUEST_GET_SMSC_ADDRESS 100
2821
2822/**
2823 * RIL_REQUEST_SET_SMSC_ADDRESS
2824 *
2825 * Sets the default Short Message Service Center address on the device.
2826 *
2827 * "data" is const char * containing the SMSC address.
2828 *
2829 * "response" is NULL
2830 *
2831 * Valid errors:
2832 * SUCCESS
2833 * RADIO_NOT_AVAILABLE
2834 * GENERIC_FAILURE
2835 *
2836 */
2837#define RIL_REQUEST_SET_SMSC_ADDRESS 101
2838
jshb60444e2009-05-29 11:09:17 -07002839/**
2840 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
2841 *
2842 * Indicates whether there is storage available for new SMS messages.
2843 *
2844 * "data" is int *
2845 * ((int *)data)[0] is 1 if memory is available for storing new messages
2846 * is 0 if memory capacity is exceeded
2847 *
2848 * "response" is NULL
2849 *
2850 * Valid errors:
2851 * SUCCESS
2852 * RADIO_NOT_AVAILABLE
2853 * GENERIC_FAILURE
2854 *
2855 */
2856#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
2857
Wink Saville2641d5b2009-06-08 17:40:42 -07002858/**
2859 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
2860 *
2861 * Indicates that the StkSerivce is running and is
2862 * ready to receive RIL_UNSOL_STK_XXXXX commands.
2863 *
2864 * "data" is NULL
2865 * "response" is NULL
2866 *
2867 * Valid errors:
2868 * SUCCESS
2869 * RADIO_NOT_AVAILABLE
2870 * GENERIC_FAILURE
2871 *
2872 */
2873#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
2874
Wink Savillef4c4d362009-04-02 01:37:03 -07002875
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002876/***********************************************************************/
2877
Wink Savillef4c4d362009-04-02 01:37:03 -07002878
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002879#define RIL_UNSOL_RESPONSE_BASE 1000
2880
2881/**
2882 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
2883 *
2884 * Indicate when value of RIL_RadioState has changed.
2885 *
2886 * Callee will invoke RIL_RadioStateRequest method on main thread
2887 *
2888 * "data" is NULL
2889 */
2890
2891#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
2892
2893
2894/**
2895 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
2896 *
2897 * Indicate when call state has changed
2898 *
2899 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
2900 *
2901 * "data" is NULL
2902 *
Wink Saville7f856802009-06-09 10:23:37 -07002903 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002904 * "RING", "BUSY", "NO CARRIER", and also call state
2905 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
2906 *
2907 * Redundent or extraneous invocations are tolerated
2908 */
2909#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
2910
2911
2912/**
Wink Saville7f856802009-06-09 10:23:37 -07002913 * RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002914 *
2915 * Called when network state, operator name, or GPRS state has changed
2916 * Basically on, +CREG and +CGREG
2917 *
2918 * Callee will invoke the following requests on main thread:
2919 *
2920 * RIL_REQUEST_REGISTRATION_STATE
2921 * RIL_REQUEST_GPRS_REGISTRATION_STATE
2922 * RIL_REQUEST_OPERATOR
2923 *
2924 * "data" is NULL
2925 *
2926 * FIXME should this happen when SIM records are loaded? (eg, for
2927 * EONS)
2928 */
2929#define RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 1002
2930
2931/**
2932 * RIL_UNSOL_RESPONSE_NEW_SMS
2933 *
2934 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07002935 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002936 * "data" is const char *
2937 * This is a pointer to a string containing the PDU of an SMS-DELIVER
2938 * as an ascii string of hex digits. The PDU starts with the SMSC address
2939 * per TS 27.005 (+CMT:)
2940 *
2941 * Callee will subsequently confirm the receipt of thei SMS with a
2942 * RIL_REQUEST_SMS_ACKNOWLEDGE
2943 *
Wink Saville7f856802009-06-09 10:23:37 -07002944 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002945 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
2946 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
2947 */
2948
2949#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
2950
2951/**
2952 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
2953 *
2954 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07002955 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002956 * "data" is const char *
2957 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
2958 * as an ascii string of hex digits. The PDU starts with the SMSC address
2959 * per TS 27.005 (+CDS:).
2960 *
2961 * Callee will subsequently confirm the receipt of the SMS with a
2962 * RIL_REQUEST_SMS_ACKNOWLEDGE
2963 *
Wink Saville7f856802009-06-09 10:23:37 -07002964 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002965 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
2966 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
2967 */
2968
2969#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
2970
2971/**
2972 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
2973 *
2974 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07002975 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002976 * "data" is const int *
2977 * ((const int *)data)[0] contains the slot index on the SIM that contains
2978 * the new message
2979 */
2980
2981#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
2982
2983/**
2984 * RIL_UNSOL_ON_USSD
2985 *
2986 * Called when a new USSD message is received.
2987 *
2988 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07002989 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002990 * one of these string values:
2991 * "0" USSD-Notify -- text in ((const char **)data)[1]
2992 * "1" USSD-Request -- text in ((const char **)data)[1]
2993 * "2" Session terminated by network
2994 * "3" other local client (eg, SIM Toolkit) has responded
2995 * "4" Operation not supported
2996 * "5" Network timeout
2997 *
2998 * The USSD session is assumed to persist if the type code is "1", otherwise
2999 * the current session (if any) is assumed to have terminated.
3000 *
3001 * ((const char **)data)[1] points to a message string if applicable, which
3002 * should always be in UTF-8.
3003 */
3004#define RIL_UNSOL_ON_USSD 1006
3005/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
3006
3007/**
3008 * RIL_UNSOL_ON_USSD_REQUEST
3009 *
3010 * Obsolete. Send via RIL_UNSOL_ON_USSD
3011 */
Wink Saville7f856802009-06-09 10:23:37 -07003012#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003013
3014
3015/**
3016 * RIL_UNSOL_NITZ_TIME_RECEIVED
3017 *
3018 * Called when radio has received a NITZ time message
3019 *
3020 * "data" is const char * pointing to NITZ time string
3021 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
3022 */
3023#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
3024
3025/**
3026 * RIL_UNSOL_SIGNAL_STRENGTH
3027 *
3028 * Radio may report signal strength rather han have it polled.
3029 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003030 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003031 */
3032#define RIL_UNSOL_SIGNAL_STRENGTH 1009
3033
3034
3035/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003036 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003037 *
3038 * Indicate a PDP context state has changed, or a new context
3039 * has been activated or deactivated
Wink Savillef4c4d362009-04-02 01:37:03 -07003040 * replaces RIL_UNSOL_PDP_CONTEXT_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003041 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003042 * "data" is an array of RIL_Data_Call_Response identical to that
3043 * returned by RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003044 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003045 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003046 */
3047
Wink Savillef4c4d362009-04-02 01:37:03 -07003048#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003049
3050/**
3051 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
3052 *
3053 * Reports supplementary service related notification from the network.
3054 *
3055 * "data" is a const RIL_SuppSvcNotification *
3056 *
3057 */
3058
3059#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
3060
3061/**
3062 * RIL_UNSOL_STK_SESSION_END
3063 *
3064 * Indicate when STK session is terminated by SIM.
3065 *
3066 * "data" is NULL
3067 */
3068#define RIL_UNSOL_STK_SESSION_END 1012
3069
3070/**
3071 * RIL_UNSOL_STK_PROACTIVE_COMMAND
3072 *
3073 * Indicate when SIM issue a STK proactive command to applications
3074 *
3075 * "data" is a const char * containing SAT/USAT proactive command
3076 * in hexadecimal format string starting with command tag
3077 *
3078 */
3079#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
3080
3081/**
3082 * RIL_UNSOL_STK_EVENT_NOTIFY
3083 *
3084 * Indicate when SIM notifies applcations some event happens.
3085 * Generally, application does not need to have any feedback to
3086 * SIM but shall be able to indicate appropriate messages to users.
3087 *
3088 * "data" is a const char * containing SAT/USAT commands or responses
3089 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
3090 * starting with first byte of response data or command tag
3091 *
3092 */
3093#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
3094
3095/**
3096 * RIL_UNSOL_STK_CALL_SETUP
3097 *
3098 * Indicate when SIM wants application to setup a voice call.
3099 *
3100 * "data" is const int *
3101 * ((const int *)data)[0] contains timeout value (in milliseconds)
3102 */
3103#define RIL_UNSOL_STK_CALL_SETUP 1015
3104
3105/**
3106 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
3107 *
3108 * Indicates that SMS storage on the SIM is full. Sent when the network
3109 * attempts to deliver a new SMS message. Messages cannot be saved on the
3110 * SIM until space is freed. In particular, incoming Class 2 messages
3111 * cannot be stored.
3112 *
3113 * "data" is null
3114 *
3115 */
3116#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
3117
3118/**
3119 * RIL_UNSOL_SIM_REFRESH
3120 *
3121 * Indicates that file(s) on the SIM have been updated, or the SIM
3122 * has been reinitialized.
3123 *
3124 * "data" is an int *
3125 * ((int *)data)[0] is a RIL_SimRefreshResult.
3126 * ((int *)data)[1] is the EFID of the updated file if the result is
3127 * SIM_FILE_UPDATE or NULL for any other result.
3128 *
3129 * Note: If the radio state changes as a result of the SIM refresh (eg,
3130 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3131 * should be sent.
3132 */
3133#define RIL_UNSOL_SIM_REFRESH 1017
3134
3135/**
3136 * RIL_UNSOL_CALL_RING
3137 *
3138 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07003139 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
3140 * of a call and sending multiple is optional. If the system property
3141 * ro.telephony.call_ring.multiple is false then the upper layers
3142 * will generate the multiple events internally. Otherwise the vendor
3143 * ril must generate multiple RIL_UNSOL_CALL_RING if
3144 * ro.telephony.call_ring.multiple is true or if it is absent.
3145 *
3146 * The rate of these events is controlled by ro.telephony.call_ring.delay
3147 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003148 *
Wink Saville3d54e742009-05-18 18:00:44 -07003149 * "data" is null for GSM
3150 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003151 */
3152#define RIL_UNSOL_CALL_RING 1018
3153
The Android Open Source Project34a51082009-03-05 14:34:37 -08003154/**
3155 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
3156 *
3157 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07003158 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003159 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07003160
The Android Open Source Project34a51082009-03-05 14:34:37 -08003161 * "data" is null
3162 */
3163#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
3164
3165/**
3166 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3167 *
3168 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07003169 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003170 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07003171 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003172 * Callee will subsequently confirm the receipt of the SMS with
3173 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07003174 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003175 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
3176 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07003177 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003178 */
3179#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
3180
3181/**
3182 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
3183 *
3184 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07003185 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003186 * "data" is const char * of 88 bytes which indicates each page
3187 * of a CBS Message sent to the MS by the BTS as coded in 3GPP
3188 * 23.041 Section 9.4.1.1
Wink Savillef4c4d362009-04-02 01:37:03 -07003189 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003190 */
3191#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07003192
The Android Open Source Project34a51082009-03-05 14:34:37 -08003193/**
3194 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
3195 *
3196 * Indicates that SMS storage on the RUIM is full. Messages
3197 * cannot be saved on the RUIM until space is freed.
3198 *
3199 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07003200 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003201 */
Wink Savillef4c4d362009-04-02 01:37:03 -07003202#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
3203
The Android Open Source Project34a51082009-03-05 14:34:37 -08003204/**
3205 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
3206 *
3207 * Indicates a restricted state change (eg, for Domain Specific Access Control).
3208 *
3209 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
3210 *
3211 * "data" is an int *
3212 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
3213 */
3214#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
3215
Wink Saville1b5fd232009-04-22 14:50:00 -07003216/**
3217 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
3218 *
3219 * Indicates that the radio system selection module has
3220 * autonomously entered emergency callback mode.
3221 *
3222 * "data" is null
3223 *
3224 */
3225#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08003226
Wink Saville1b5fd232009-04-22 14:50:00 -07003227/**
3228 * RIL_UNSOL_CDMA_CALL_WAITING
3229 *
3230 * Called when CDMA radio receives a call waiting indication.
3231 *
3232 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07003233 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003234 */
3235#define RIL_UNSOL_CDMA_CALL_WAITING 1025
3236
3237/**
3238 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
3239 *
3240 * Called when CDMA radio receives an update of the progress of an
3241 * OTASP/OTAPA call.
3242 *
3243 * "data" is const int *
3244 * For CDMA this is an integer OTASP/OTAPA status listed in
3245 * RIL_CDMA_OTA_ProvisionStatus.
3246 *
3247 */
3248#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
3249
3250/**
3251 * RIL_UNSOL_CDMA_INFO_REC
3252 *
3253 * Called when CDMA radio receives one or more info recs.
3254 *
3255 * "data" is const RIL_CDMA_InformationRecords *
3256 *
3257 */
3258#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08003259
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07003260/**
3261 * RIL_UNSOL_OEM_HOOK_RAW
3262 *
3263 * This is for OEM specific use.
3264 *
3265 * "data" is a byte[]
3266 */
3267#define RIL_UNSOL_OEM_HOOK_RAW 1028
3268
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003269/***********************************************************************/
3270
3271
3272/**
3273 * RIL_Request Function pointer
3274 *
3275 * @param request is one of RIL_REQUEST_*
3276 * @param data is pointer to data defined for that RIL_REQUEST_*
3277 * data is owned by caller, and should not be modified or freed by callee
3278 * @param t should be used in subsequent call to RIL_onResponse
3279 * @param datalen the length of data
3280 *
3281 */
Wink Saville7f856802009-06-09 10:23:37 -07003282typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003283 size_t datalen, RIL_Token t);
3284
3285/**
3286 * This function should return the current radio state synchronously
3287 */
3288typedef RIL_RadioState (*RIL_RadioStateRequest)();
3289
3290/**
3291 * This function returns "1" if the specified RIL_REQUEST code is
3292 * supported and 0 if it is not
3293 *
3294 * @param requestCode is one of RIL_REQUEST codes
3295 */
3296
3297typedef int (*RIL_Supports)(int requestCode);
3298
3299/**
Wink Saville7f856802009-06-09 10:23:37 -07003300 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003301 * thread that calls RIL_RequestFunc--and indicates that a pending
3302 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07003303 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003304 * On cancel, the callee should do its best to abandon the request and
3305 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
3306 *
3307 * Subsequent calls to RIL_onRequestComplete for this request with
3308 * other results will be tolerated but ignored. (That is, it is valid
3309 * to ignore the cancellation request)
3310 *
3311 * RIL_Cancel calls should return immediately, and not wait for cancellation
3312 *
Wink Saville7f856802009-06-09 10:23:37 -07003313 * 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 -08003314 * interface
3315 *
3316 * @param t token wants to be canceled
3317 */
3318
3319typedef void (*RIL_Cancel)(RIL_Token t);
3320
3321typedef void (*RIL_TimedCallback) (void *param);
3322
3323/**
3324 * Return a version string for your RIL implementation
3325 */
3326typedef const char * (*RIL_GetVersion) (void);
3327
3328typedef struct {
3329 int version; /* set to RIL_VERSION */
3330 RIL_RequestFunc onRequest;
3331 RIL_RadioStateRequest onStateRequest;
3332 RIL_Supports supports;
3333 RIL_Cancel onCancel;
3334 RIL_GetVersion getVersion;
3335} RIL_RadioFunctions;
3336
3337#ifdef RIL_SHLIB
3338struct RIL_Env {
3339 /**
3340 * "t" is parameter passed in on previous call to RIL_Notification
3341 * routine.
3342 *
3343 * If "e" != SUCCESS, then response can be null/is ignored
3344 *
Wink Saville7f856802009-06-09 10:23:37 -07003345 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003346 * freed by callee
3347 *
3348 * RIL_onRequestComplete will return as soon as possible
3349 */
Wink Saville7f856802009-06-09 10:23:37 -07003350 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003351 void *response, size_t responselen);
3352
3353 /**
3354 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
3355 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3356 *
3357 * "data" is owned by caller, and should not be modified or freed by callee
3358 */
3359
Wink Saville7f856802009-06-09 10:23:37 -07003360 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003361 size_t datalen);
3362
3363 /**
Wink Saville7f856802009-06-09 10:23:37 -07003364 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003365 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3366 * a relative time value at which the callback is invoked. If relativeTime is
3367 * NULL or points to a 0-filled structure, the callback will be invoked as
3368 * soon as possible
3369 */
3370
Wink Saville7f856802009-06-09 10:23:37 -07003371 void (*RequestTimedCallback) (RIL_TimedCallback callback,
3372 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003373};
3374
3375
Wink Saville7f856802009-06-09 10:23:37 -07003376/**
3377 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003378 * argc and argv will be command line arguments intended for the RIL implementation
3379 * Return NULL on error
3380 *
3381 * @param env is environment point defined as RIL_Env
3382 * @param argc number of arguments
3383 * @param argv list fo arguments
3384 *
3385 */
3386const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
3387
3388#else /* RIL_SHLIB */
3389
3390/**
3391 * Call this once at startup to register notification routine
3392 *
3393 * @param callbacks user-specifed callback function
3394 */
3395void RIL_register (const RIL_RadioFunctions *callbacks);
3396
3397
3398/**
3399 *
3400 * RIL_onRequestComplete will return as soon as possible
3401 *
3402 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07003403 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003404 * @param e error code
3405 * if "e" != SUCCESS, then response can be null/is ignored
3406 * @param response is owned by caller, and should not be modified or
3407 * freed by callee
3408 * @param responselen the length of response in byte
3409 */
Wink Saville7f856802009-06-09 10:23:37 -07003410void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003411 void *response, size_t responselen);
3412
3413/**
3414 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
3415 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3416 * "data" is owned by caller, and should not be modified or freed by callee
3417 * @param datalen the length of data in byte
3418 */
3419
Wink Saville7f856802009-06-09 10:23:37 -07003420void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003421 size_t datalen);
3422
3423
3424/**
Wink Saville7f856802009-06-09 10:23:37 -07003425 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003426 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3427 * a relative time value at which the callback is invoked. If relativeTime is
3428 * NULL or points to a 0-filled structure, the callback will be invoked as
3429 * soon as possible
3430 *
3431 * @param callback user-specifed callback function
3432 * @param param parameter list
3433 * @param relativeTime a relative time value at which the callback is invoked
3434 */
3435
Wink Saville7f856802009-06-09 10:23:37 -07003436void RIL_requestTimedCallback (RIL_TimedCallback callback,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003437 void *param, const struct timeval *relativeTime);
3438
3439
3440#endif /* RIL_SHLIB */
3441
3442#ifdef __cplusplus
3443}
3444#endif
3445
3446#endif /*ANDROID_RIL_H*/