blob: 532e40714aaa347a4c49ac5cdd1ecb18c9c33ac5 [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 */
69 RIL_E_MODE_NOT_SUPPORTED = 13 /* HW does not support preferred network type */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080070} RIL_Errno;
71
72typedef enum {
73 RIL_CALL_ACTIVE = 0,
74 RIL_CALL_HOLDING = 1,
75 RIL_CALL_DIALING = 2, /* MO call only */
76 RIL_CALL_ALERTING = 3, /* MO call only */
77 RIL_CALL_INCOMING = 4, /* MT call only */
78 RIL_CALL_WAITING = 5 /* MT call only */
79} RIL_CallState;
80
81typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -070082 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
83 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
84 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
Wink Saville7f856802009-06-09 10:23:37 -070085 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -070086 personalization locked, or SIM absent */
87 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
88 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
89 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
Wink Saville7f856802009-06-09 10:23:37 -070090 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -070091 personalization locked, or RUIM absent */
92 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
93 RADIO_STATE_NV_READY = 9 /* Radio is on and the NV interface is available */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080094} RIL_RadioState;
95
Wink Saville1b5fd232009-04-22 14:50:00 -070096 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
97typedef struct {
98 char isPresent; /* non-zero if signal information record is present */
99 char signalType; /* as defined 3.7.5.5-1 */
100 char alertPitch; /* as defined 3.7.5.5-2 */
101 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
102} RIL_CDMA_SignalInfoRecord;
103
Wink Saville1b5fd232009-04-22 14:50:00 -0700104typedef struct {
105 RIL_CallState state;
106 int index; /* Connection Index for use with, eg, AT+CHLD */
107 int toa; /* type of address, eg 145 = intl */
108 char isMpty; /* nonzero if is mpty call */
109 char isMT; /* nonzero if call is mobile terminated */
110 char als; /* ALS line indicator if available
111 (0 = line 1) */
112 char isVoice; /* nonzero if this is is a voice call */
113 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
114 char * number; /* Remote party number */
115 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
116 char * name; /* Remote party name */
117 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800118} RIL_Call;
119
120typedef struct {
121 int cid; /* Context ID */
Wink Saville1b5fd232009-04-22 14:50:00 -0700122 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800123 char * type; /* X.25, IP, IPV6, etc. */
124 char * apn;
125 char * address;
Wink Savillef4c4d362009-04-02 01:37:03 -0700126} RIL_Data_Call_Response;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800127
128typedef struct {
129 int messageRef; /*TP-Message-Reference*/
130 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700131 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
132 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
133 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800134} RIL_SMS_Response;
135
136/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
137typedef struct {
138 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
139 /* 0 = "REC UNREAD" */
140 /* 1 = "REC READ" */
141 /* 2 = "STO UNSENT" */
142 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700143 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
144 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800145 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
146 (as expected by TS 27.005) or NULL for default SMSC */
147} RIL_SMS_WriteArgs;
148
149/** Used by RIL_REQUEST_DIAL */
150typedef struct {
151 char * address;
152 int clir;
153 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
154 * clir == 0 on "use subscription default value"
155 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
156 * clir == 2 on "CLIR suppression" (allow CLI presentation)
157 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800158} RIL_Dial;
159
160typedef struct {
161 int command; /* one of the commands listed for TS 27.007 +CRSM*/
162 int fileid; /* EF id */
163 char *path; /* "pathid" from TS 27.007 +CRSM command.
164 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700165 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800166 */
167 int p1;
168 int p2;
169 int p3;
170 char *data; /* May be NULL*/
171 char *pin2; /* May be NULL*/
172} RIL_SIM_IO;
173
174typedef struct {
175 int sw1;
176 int sw2;
177 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
178} RIL_SIM_IO_Response;
179
180/* See also com.android.internal.telephony.gsm.CallForwardInfo */
181
182typedef struct {
183 int status; /*
184 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
185 * status 1 = active, 0 = not active
186 *
187 * For RIL_REQUEST_SET_CALL_FORWARD:
188 * status is:
189 * 0 = disable
190 * 1 = enable
191 * 2 = interrogate
192 * 3 = registeration
193 * 4 = erasure
194 */
195
Wink Saville3d54e742009-05-18 18:00:44 -0700196 int reason; /* from TS 27.007 7.11 "reason" */
197 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
198 See table for Android mapping from
199 MMI service code
200 0 means user doesn't input class */
201 int toa; /* "type" from TS 27.007 7.11 */
202 char * number; /* "number" from TS 27.007 7.11. May be NULL */
203 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800204}RIL_CallForwardInfo;
205
206typedef struct {
207 char * cid; /* Cell Id (as described in TS 27.005) in 16 bits in GSM
208 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700209 * in 9 bits in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800210 * Valid values are hexadecimal 0x0000 - 0xffff.
211 */
212 int rssi; /* Received RSSI in 2G,
213 * Level index of CPICH Received Signal Code Power in 3G
214 */
215} RIL_NeighboringCell;
216
217/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
218typedef enum {
219 CALL_FAIL_NORMAL = 16,
220 CALL_FAIL_BUSY = 17,
221 CALL_FAIL_CONGESTION = 34,
222 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
223 CALL_FAIL_CALL_BARRED = 240,
224 CALL_FAIL_FDN_BLOCKED = 241,
Wink Saville1b5fd232009-04-22 14:50:00 -0700225 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
226 CALL_FAIL_CDMA_DROP = 1001,
227 CALL_FAIL_CDMA_INTERCEPT = 1002,
228 CALL_FAIL_CDMA_REORDER = 1003,
229 CALL_FAIL_CDMA_SO_REJECT = 1004,
230 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
231 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
232 CALL_FAIL_CDMA_PREEMPTED = 1007,
233 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
234 during emergency callback mode */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800235 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
236} RIL_LastCallFailCause;
237
Wink Savillef4c4d362009-04-02 01:37:03 -0700238/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800239typedef enum {
240 PDP_FAIL_BARRED = 8, /* no retry; prompt user */
241 PDP_FAIL_BAD_APN = 27, /* no retry; prompt user */
242 PDP_FAIL_USER_AUTHENTICATION = 29, /* no retry; prompt user */
243 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 32, /*no retry; prompt user */
244 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 33, /*no retry; prompt user */
245 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff /* This and all other cases: retry silently */
Wink Savillef4c4d362009-04-02 01:37:03 -0700246} RIL_LastDataCallActivateFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800247
248/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
249typedef struct {
250 int notificationType; /*
251 * 0 = MO intermediate result code
252 * 1 = MT unsolicited result code
253 */
254 int code; /* See 27.007 7.17
255 "code1" for MO
256 "code2" for MT. */
257 int index; /* CUG index. See 27.007 7.17. */
258 int type; /* "type" from 27.007 7.17 (MT only). */
259 char * number; /* "number" from 27.007 7.17
260 (MT only, may be NULL). */
261} RIL_SuppSvcNotification;
262
Wink Saville3d54e742009-05-18 18:00:44 -0700263#define RIL_SIM_ABSENT 0
264#define RIL_SIM_NOT_READY 1
Wink Saville7f856802009-06-09 10:23:37 -0700265/* RIL_SIM_READY means that the radio state is RADIO_STATE_SIM_READY.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800266 * This is more
267 * than "+CPIN: READY". It also means the radio is ready for SIM I/O
268 */
Wink Saville3d54e742009-05-18 18:00:44 -0700269#define RIL_SIM_READY 2
270#define RIL_SIM_PIN 3
271#define RIL_SIM_PUK 4
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800272#define RIL_SIM_NETWORK_PERSONALIZATION 5
273
Wink Savillef4c4d362009-04-02 01:37:03 -0700274/* see RIL_REQUEST_GET_SIM_STATUS */
275
276#define RIL_CARD_MAX_APPS 8
277
278typedef enum {
279 RIL_CARDSTATE_ABSENT = 0,
280 RIL_CARDSTATE_PRESENT = 1,
281 RIL_CARDSTATE_ERROR = 2
282} RIL_CardState;
283
284typedef enum {
285 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
286 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700287 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
288 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700289 involved */
290 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
291 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
292 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
293 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
294 RIL_PERSOSUBSTATE_SIM_SIM = 7,
295 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
296 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
297 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
298 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
299 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
300 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
301 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
302 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
303 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
304 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
305 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
306 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
307 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
308 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
309 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
310 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
311 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
312} RIL_PersoSubstate;
313
314typedef enum {
315 RIL_APPSTATE_UNKNOWN = 0,
316 RIL_APPSTATE_DETECTED = 1,
317 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
318 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700319 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700320 when app_state is assigned to this value */
321 RIL_APPSTATE_READY = 5
322} RIL_AppState;
323
324typedef enum {
325 RIL_PINSTATE_UNKNOWN = 0,
326 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
327 RIL_PINSTATE_ENABLED_VERIFIED = 2,
328 RIL_PINSTATE_DISABLED = 3,
329 RIL_PINSTATE_ENABLED_BLOCKED = 4,
330 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
331} RIL_PinState;
332
333typedef enum {
334 RIL_APPTYPE_UNKNOWN = 0,
335 RIL_APPTYPE_SIM = 1,
336 RIL_APPTYPE_USIM = 2,
337 RIL_APPTYPE_RUIM = 3,
338 RIL_APPTYPE_CSIM = 4
339} RIL_AppType;
340
341typedef struct
342{
Wink Saville7f856802009-06-09 10:23:37 -0700343 RIL_AppType app_type;
344 RIL_AppState app_state;
345 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -0700346 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -0700347 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -0700348 0x30, 0x30, 0x30 */
349 char *app_label_ptr; /* null terminated string */
350 int pin1_replaced; /* applicable to USIM and CSIM */
Wink Saville7f856802009-06-09 10:23:37 -0700351 RIL_PinState pin1;
352 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -0700353} RIL_AppStatus;
354
355typedef struct
356{
Wink Saville7f856802009-06-09 10:23:37 -0700357 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -0700358 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
359 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
360 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
361 int num_applications; /* value <= RIL_CARD_MAX_APPS */
362 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
363} RIL_CardStatus;
364
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800365/* The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH */
366typedef enum {
367 /* A file on SIM has been updated. data[1] contains the EFID. */
368 SIM_FILE_UPDATE = 0,
369 /* SIM initialized. All files should be re-read. */
370 SIM_INIT = 1,
371 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
372 SIM_RESET = 2
373} RIL_SimRefreshResult;
374
Wink Saville1b5fd232009-04-22 14:50:00 -0700375typedef struct {
376 char * number; /* Remote party number */
377 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
378 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -0700379 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Saville1b5fd232009-04-22 14:50:00 -0700380} RIL_CDMA_CallWaiting;
381
Wink Savillea592eeb2009-05-22 13:26:36 -0700382/**
383 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
384 *
385 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
386 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
387 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
388 * CBM message ID.
389 *
390 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
391 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
392 * and 9.4.4.2.3 for UMTS.
393 * All other values can be treated as empty CBM data coding scheme.
394 *
395 * selected 0 means message types specified in <fromServiceId, toServiceId>
396 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
397 *
398 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
399 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
400 */
Wink Savillef4c4d362009-04-02 01:37:03 -0700401typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -0700402 int fromServiceId;
403 int toServiceId;
404 int fromCodeScheme;
405 int toCodeScheme;
406 unsigned char selected;
407} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -0700408
The Android Open Source Project34a51082009-03-05 14:34:37 -0800409/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
410#define RIL_RESTRICTED_STATE_NONE 0x00
411/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
412#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
413/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
414#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -0700415/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -0800416#define RIL_RESTRICTED_STATE_CS_ALL 0x04
417/* Block packet data access due to restriction. */
418#define RIL_RESTRICTED_STATE_PS_ALL 0x10
419
Wink Saville1b5fd232009-04-22 14:50:00 -0700420/* The status for an OTASP/OTAPA session */
421typedef enum {
422 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
423 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
424 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
425 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
426 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
427 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
428 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
429 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
430 CDMA_OTA_PROVISION_STATUS_COMMITTED,
431 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
432 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
433 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
434} RIL_CDMA_OTA_ProvisionStatus;
435
436typedef struct {
437 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
438 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
439} RIL_GW_SignalStrength;
440
441
442typedef struct {
443 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
444 * multiplied by -1. Example: If the actual RSSI is -75, then this response
445 * value will be 75.
446 */
447 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
448 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
449 * will be 125.
450 */
451} RIL_CDMA_SignalStrength;
452
453
454typedef struct {
455 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
456 * multiplied by -1. Example: If the actual RSSI is -75, then this response
457 * value will be 75.
458 */
459 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
460 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
461 * will be 125.
462 */
463 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
464} RIL_EVDO_SignalStrength;
465
466
467typedef struct {
468 RIL_GW_SignalStrength GW_SignalStrength;
469 RIL_CDMA_SignalStrength CDMA_SignalStrength;
470 RIL_EVDO_SignalStrength EVDO_SignalStrength;
471} RIL_SignalStrength;
472
473/* Names of the CDMA info records (C.S0005 section 3.7.5) */
474typedef enum {
475 RIL_CDMA_DISPLAY_INFO_REC,
476 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
477 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
478 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
479 RIL_CDMA_SIGNAL_INFO_REC,
480 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
481 RIL_CDMA_LINE_CONTROL_INFO_REC,
482 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
483 RIL_CDMA_T53_CLIR_INFO_REC,
484 RIL_CDMA_T53_RELEASE_INFO_REC,
485 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
486} RIL_CDMA_InfoRecName;
487
488/* Display Info Rec as defined in C.S0005 section 3.7.5.1
489 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
490 Note: the Extended Display info rec contains multiple records of the
491 form: display_tag, display_len, and display_len occurrences of the
492 chari field if the display_tag is not 10000000 or 10000001.
493 To save space, the records are stored consecutively in a byte buffer.
494 The display_tag, display_len and chari fields are all 1 byte.
495*/
496
497typedef struct {
498 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -0700499 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -0700500} RIL_CDMA_DisplayInfoRecord;
501
502/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
503 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
504 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
505*/
506
507typedef struct {
508 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -0700509 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -0700510 char number_type;
511 char number_plan;
512 char pi;
513 char si;
514} RIL_CDMA_NumberInfoRecord;
515
516/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
517typedef enum {
518 RIL_REDIRECTING_REASON_UNKNOWN = 0,
519 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
520 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
521 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
522 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
523 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
524 RIL_REDIRECTING_REASON_RESERVED
525} RIL_CDMA_RedirectingReason;
526
527typedef struct {
528 RIL_CDMA_NumberInfoRecord redirectingNumber;
529 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
530 RIL_CDMA_RedirectingReason redirectingReason;
531} RIL_CDMA_RedirectingNumberInfoRecord;
532
533/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
534typedef struct {
535 char lineCtrlPolarityIncluded;
536 char lineCtrlToggle;
537 char lineCtrlReverse;
538 char lineCtrlPowerDenial;
539} RIL_CDMA_LineControlInfoRecord;
540
541/* T53 CLIR Information Record */
542typedef struct {
543 char cause;
544} RIL_CDMA_T53_CLIRInfoRecord;
545
546/* T53 Audio Control Information Record */
547typedef struct {
548 char upLink;
549 char downLink;
550} RIL_CDMA_T53_AudioControlInfoRecord;
551
552typedef struct {
553
554 RIL_CDMA_InfoRecName name;
555
556 union {
557 /* Display and Extended Display Info Rec */
558 RIL_CDMA_DisplayInfoRecord display;
559
560 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
561 RIL_CDMA_NumberInfoRecord number;
562
563 /* Signal Info Rec */
564 RIL_CDMA_SignalInfoRecord signal;
565
566 /* Redirecting Number Info Rec */
567 RIL_CDMA_RedirectingNumberInfoRecord redir;
568
569 /* Line Control Info Rec */
570 RIL_CDMA_LineControlInfoRecord lineCtrl;
571
572 /* T53 CLIR Info Rec */
573 RIL_CDMA_T53_CLIRInfoRecord clir;
574
575 /* T53 Audio Control Info Rec */
576 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
577 } rec;
578} RIL_CDMA_InformationRecord;
579
580#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
581
582typedef struct {
583 char numberOfInfoRecs;
584 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
585} RIL_CDMA_InformationRecords;
586
Wink Saville7f856802009-06-09 10:23:37 -0700587/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800588 * RIL_REQUEST_GET_SIM_STATUS
589 *
590 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -0700591 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800592 * "data" is NULL
593 *
Wink Savillef4c4d362009-04-02 01:37:03 -0700594 * "response" is const RIL_CardStatus *
595
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800596 *
Wink Saville7f856802009-06-09 10:23:37 -0700597 * If the radio is off or unavailable, return RIL_SIM_NOT_READY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800598 *
Wink Saville7f856802009-06-09 10:23:37 -0700599 * Please note: RIL_SIM_READY means that the radio state
600 * is RADIO_STATE_SIM_READY. This is more than "+CPIN: READY".
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800601 * It also means the radio is ready for SIM I/O
602 *
603 * Valid errors:
604 * Must never fail
605 */
606#define RIL_REQUEST_GET_SIM_STATUS 1
607
608/**
609 * RIL_REQUEST_ENTER_SIM_PIN
610 *
611 * Supplies SIM PIN. Only called if SIM status is RIL_SIM_PIN
612 *
613 * "data" is const char **
614 * ((const char **)data)[0] is PIN value
615 *
616 * "response" must be NULL
617 *
618 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700619 *
620 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800621 * RADIO_NOT_AVAILABLE (radio resetting)
622 * GENERIC_FAILURE
623 * PASSWORD_INCORRECT
624 */
625
626#define RIL_REQUEST_ENTER_SIM_PIN 2
627
628
629/**
630 * RIL_REQUEST_ENTER_SIM_PUK
631 *
Wink Saville7f856802009-06-09 10:23:37 -0700632 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800633 *
634 * "data" is const char **
635 * ((const char **)data)[0] is PUK value
636 * ((const char **)data)[1] is new PIN value
637 *
638 * "response" must be NULL
639 *
640 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700641 *
642 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800643 * RADIO_NOT_AVAILABLE (radio resetting)
644 * GENERIC_FAILURE
645 * PASSWORD_INCORRECT
646 * (PUK is invalid)
647 */
648
649#define RIL_REQUEST_ENTER_SIM_PUK 3
650
651/**
652 * RIL_REQUEST_ENTER_SIM_PIN2
653 *
654 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
655 * returned as a a failure from a previous operation.
656 *
657 * "data" is const char **
658 * ((const char **)data)[0] is PIN2 value
659 *
660 * "response" must be NULL
661 *
662 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700663 *
664 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800665 * RADIO_NOT_AVAILABLE (radio resetting)
666 * GENERIC_FAILURE
667 * PASSWORD_INCORRECT
668 */
669
670#define RIL_REQUEST_ENTER_SIM_PIN2 4
671
672/**
673 * RIL_REQUEST_ENTER_SIM_PUK2
674 *
Wink Saville7f856802009-06-09 10:23:37 -0700675 * Supplies SIM PUK2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800676 *
677 * "data" is const char **
678 * ((const char **)data)[0] is PUK2 value
679 * ((const char **)data)[1] is new PIN2 value
680 *
681 * "response" must be NULL
682 *
683 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700684 *
685 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800686 * RADIO_NOT_AVAILABLE (radio resetting)
687 * GENERIC_FAILURE
688 * PASSWORD_INCORRECT
689 * (PUK2 is invalid)
690 */
691
692#define RIL_REQUEST_ENTER_SIM_PUK2 5
693
694/**
695 * RIL_REQUEST_CHANGE_SIM_PIN
696 *
Wink Saville7f856802009-06-09 10:23:37 -0700697 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800698 *
699 * "data" is const char **
700 * ((const char **)data)[0] is old PIN value
701 * ((const char **)data)[1] is new PIN value
702 *
703 * "response" must be NULL
704 *
705 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700706 *
707 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800708 * RADIO_NOT_AVAILABLE (radio resetting)
709 * GENERIC_FAILURE
710 * PASSWORD_INCORRECT
711 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -0700712 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800713 */
714
715#define RIL_REQUEST_CHANGE_SIM_PIN 6
716
717
718/**
719 * RIL_REQUEST_CHANGE_SIM_PIN2
720 *
Wink Saville7f856802009-06-09 10:23:37 -0700721 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800722 *
723 * "data" is const char **
724 * ((const char **)data)[0] is old PIN2 value
725 * ((const char **)data)[1] is new PIN2 value
726 *
727 * "response" must be NULL
728 *
729 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700730 *
731 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800732 * RADIO_NOT_AVAILABLE (radio resetting)
733 * GENERIC_FAILURE
734 * PASSWORD_INCORRECT
735 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -0700736 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800737 */
738
739#define RIL_REQUEST_CHANGE_SIM_PIN2 7
740
741/**
742 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
743 *
744 * Requests that network personlization be deactivated
745 *
746 * "data" is const char **
747 * ((const char **)(data))[0]] is network depersonlization code
748 *
749 * "response" must be NULL
750 *
751 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700752 *
753 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800754 * RADIO_NOT_AVAILABLE (radio resetting)
755 * GENERIC_FAILURE
756 * PASSWORD_INCORRECT
757 * (code is invalid)
758 */
759
760#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
761
762/**
Wink Saville7f856802009-06-09 10:23:37 -0700763 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800764 *
765 * Requests current call list
766 *
767 * "data" is NULL
768 *
769 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -0700770 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800771 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700772 *
773 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800774 * RADIO_NOT_AVAILABLE (radio resetting)
775 * GENERIC_FAILURE
776 * (request will be made again in a few hundred msec)
777 */
778
779#define RIL_REQUEST_GET_CURRENT_CALLS 9
780
781
Wink Saville7f856802009-06-09 10:23:37 -0700782/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800783 * RIL_REQUEST_DIAL
784 *
785 * Initiate voice call
786 *
787 * "data" is const RIL_Dial *
788 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -0700789 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800790 * This method is never used for supplementary service codes
791 *
792 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700793 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800794 * RADIO_NOT_AVAILABLE (radio resetting)
795 * GENERIC_FAILURE
796 */
797#define RIL_REQUEST_DIAL 10
798
799/**
800 * RIL_REQUEST_GET_IMSI
801 *
802 * Get the SIM IMSI
803 *
804 * Only valid when radio state is "RADIO_STATE_SIM_READY"
805 *
806 * "data" is NULL
807 * "response" is a const char * containing the IMSI
808 *
809 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700810 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800811 * RADIO_NOT_AVAILABLE (radio resetting)
812 * GENERIC_FAILURE
813 */
814
815#define RIL_REQUEST_GET_IMSI 11
816
817/**
818 * RIL_REQUEST_HANGUP
819 *
820 * Hang up a specific line (like AT+CHLD=1x)
821 *
Wink Saville7f856802009-06-09 10:23:37 -0700822 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -0700823 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800824 *
825 * "response" is NULL
826 *
827 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700828 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800829 * RADIO_NOT_AVAILABLE (radio resetting)
830 * GENERIC_FAILURE
831 */
832
833#define RIL_REQUEST_HANGUP 12
834
835/**
836 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
837 *
838 * Hang up waiting or held (like AT+CHLD=0)
839 *
840 * "data" is NULL
841 * "response" is NULL
842 *
843 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700844 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800845 * RADIO_NOT_AVAILABLE (radio resetting)
846 * GENERIC_FAILURE
847 */
848
849#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
850
851/**
852 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
853 *
854 * Hang up waiting or held (like AT+CHLD=1)
855 *
856 * "data" is NULL
857 * "response" is NULL
858 *
859 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700860 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800861 * RADIO_NOT_AVAILABLE (radio resetting)
862 * GENERIC_FAILURE
863 */
864
865#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
866
867/**
868 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
869 *
870 * Switch waiting or holding call and active call (like AT+CHLD=2)
871 *
872 * State transitions should be is follows:
873 *
874 * If call 1 is waiting and call 2 is active, then if this re
875 *
876 * BEFORE AFTER
877 * Call 1 Call 2 Call 1 Call 2
878 * ACTIVE HOLDING HOLDING ACTIVE
879 * ACTIVE WAITING HOLDING ACTIVE
880 * HOLDING WAITING HOLDING ACTIVE
881 * ACTIVE IDLE HOLDING IDLE
882 * IDLE IDLE IDLE IDLE
883 *
884 * "data" is NULL
885 * "response" is NULL
886 *
887 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700888 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800889 * RADIO_NOT_AVAILABLE (radio resetting)
890 * GENERIC_FAILURE
891 */
892
893#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
894#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
895
896/**
897 * RIL_REQUEST_CONFERENCE
898 *
899 * Conference holding and active (like AT+CHLD=3)
900
901 * "data" is NULL
902 * "response" is NULL
903 *
904 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700905 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800906 * RADIO_NOT_AVAILABLE (radio resetting)
907 * GENERIC_FAILURE
908 */
909#define RIL_REQUEST_CONFERENCE 16
910
911/**
912 * RIL_REQUEST_UDUB
913 *
Wink Saville7f856802009-06-09 10:23:37 -0700914 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800915 * waiting call answer)(RIL_BasicRequest r);
916 *
917 * "data" is NULL
918 * "response" is NULL
919 *
920 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700921 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800922 * RADIO_NOT_AVAILABLE (radio resetting)
923 * GENERIC_FAILURE
924 */
925#define RIL_REQUEST_UDUB 17
926
927/**
928 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
929 *
930 * Requests the failure cause code for the most recently terminated call
931 *
932 * "data" is NULL
933 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -0700934 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
935 * mapped to cause codes defined in TS 24.008 Annex H where possible.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800936 *
The Android Open Source Project34a51082009-03-05 14:34:37 -0800937 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
938 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
939 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800940 * If the implementation does not have access to the exact cause codes,
941 * then it should return one of the values listed in RIL_LastCallFailCause,
942 * as the UI layer needs to distinguish these cases for tone generation or
943 * error notification.
944 *
945 * Valid errors:
946 * SUCCESS
947 * RADIO_NOT_AVAILABLE
948 * GENERIC_FAILURE
949 *
Wink Savillef4c4d362009-04-02 01:37:03 -0700950 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800951 */
952#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
953
954/**
955 * RIL_REQUEST_SIGNAL_STRENGTH
956 *
Wink Saville1b5fd232009-04-22 14:50:00 -0700957 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800958 *
959 * Must succeed if radio is on.
960 *
961 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -0700962 *
963 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800964 *
965 * Valid errors:
966 * SUCCESS
967 * RADIO_NOT_AVAILABLE
968 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800969#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -0700970
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800971/**
972 * RIL_REQUEST_REGISTRATION_STATE
973 *
974 * Request current registration state
975 *
976 * "data" is NULL
977 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -0700978 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -0700979 * 0 - Not registered, MT is not currently searching
980 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -0700981 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -0700982 * 2 - Not registered, but MT is currently searching
983 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -0700984 * 3 - Registration denied
985 * 4 - Unknown
986 * 5 - Registered, roaming
Wink Saville1b5fd232009-04-22 14:50:00 -0700987 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
988 * NULL if not.Valid LAC are 0x0000 - 0xffff
989 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
990 * NULL if not.
991 * Valid CID are 0x00000000 - 0xffffffff
992 * In GSM, CID is Cell ID (see TS 27.007)
993 * in 16 bits
994 * In UMTS, CID is UMTS Cell Identity
995 * (see TS 25.331) in 28 bits
Wink Savillef4c4d362009-04-02 01:37:03 -0700996 * ((const char **)response)[3] indicates the available radio technology 0-7,
Wink Saville1b5fd232009-04-22 14:50:00 -0700997 * 0 - Unknown, 1 - GPRS, 2 - EDGE, 3 - UMTS,
998 * 4 - IS95A, 5 - IS95B, 6 - 1xRTT,
999 * 7 - EvDo Rev. 0, 8 - EvDo Rev. A
1000 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1001 * system or NULL if not. Base Station ID in
1002 * hexadecimal format
1003 * ((const char **)response)[5] is Base Station latitude if registered on a
1004 * CDMA system or NULL if not. Base Station
1005 * latitude in hexadecimal format
1006 * ((const char **)response)[6] is Base Station longitude if registered on a
1007 * CDMA system or NULL if not. Base Station
1008 * longitude in hexadecimal format
1009 * ((const char **)response)[7] is concurrent services support indicator if
1010 * registered on a CDMA system 0-1.
1011 * 0 - Concurrent services not supported,
1012 * 1 - Concurrent services supported
1013 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1014 * NULL if not. Valid System ID are 0 - 32767
1015 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1016 * NULL if not. Valid System ID are 0 - 65535
1017 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
1018 * on a CDMA system or NULL if not. Valid values
1019 * are 0-255.
1020 * ((const char **)response)[11] indicates whether the current system is in the
1021 * PRL if registered on a CDMA system or NULL if
1022 * not. 0=not in the PRL, 1=in the PRL
1023 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
1024 * if registered on a CDMA system or NULL if not.
1025 * Valid values are 0-255.
1026 * ((const char **)response)[13] if registration state is 3 (Registration
1027 * denied) this is an enumerated reason why
1028 * registration was denied.
1029 * 0-General, 1-Authentication Failure
1030 *
1031 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001032 * as "out of service" in the Android telephony system
1033 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001034 * Registration state 3 can be returned if Location Update Reject
1035 * (with cause 17 - Network Failure) is received repeatedly from the network,
1036 * to facilitate "managed roaming"
1037 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001038 * Valid errors:
1039 * SUCCESS
1040 * RADIO_NOT_AVAILABLE
1041 * GENERIC_FAILURE
1042 */
1043#define RIL_REQUEST_REGISTRATION_STATE 20
1044
1045/**
1046 * RIL_REQUEST_GPRS_REGISTRATION_STATE
1047 *
1048 * Request current GPRS registration state
1049 *
1050 * "data" is NULL
1051 * "response" is a "char **"
1052 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 7.2
1053 * ((const char **)response)[1] is LAC if registered or NULL if not
1054 * ((const char **)response)[2] is CID if registered or NULL if not
1055 * ((const char **)response)[3] indicates the available radio technology, where:
1056 * 0 == unknown
1057 * 1 == GPRS only
1058 * 2 == EDGE
1059 * 3 == UMTS
1060 *
1061 * LAC and CID are in hexadecimal format.
1062 * valid LAC are 0x0000 - 0xffff
1063 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07001064 *
1065 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001066 * as "out of service" in the Android telephony system
1067 *
1068 * Valid errors:
1069 * SUCCESS
1070 * RADIO_NOT_AVAILABLE
1071 * GENERIC_FAILURE
1072 */
1073#define RIL_REQUEST_GPRS_REGISTRATION_STATE 21
1074
1075/**
1076 * RIL_REQUEST_OPERATOR
1077 *
1078 * Request current operator ONS or EONS
1079 *
1080 * "data" is NULL
1081 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07001082 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001083 * or NULL if unregistered
1084 *
Wink Saville7f856802009-06-09 10:23:37 -07001085 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001086 * or NULL if unregistered
1087 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1088 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07001089 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001090 * Valid errors:
1091 * SUCCESS
1092 * RADIO_NOT_AVAILABLE
1093 * GENERIC_FAILURE
1094 */
1095#define RIL_REQUEST_OPERATOR 22
1096
1097/**
1098 * RIL_REQUEST_RADIO_POWER
1099 *
1100 * Toggle radio on and off (for "airplane" mode)
1101 * "data" is int *
1102 * ((int *)data)[0] is > 0 for "Radio On"
1103 * ((int *)data)[0] is == 0 for "Radio Off"
1104 *
1105 * "response" is NULL
1106 *
1107 * Turn radio on if "on" > 0
1108 * Turn radio off if "on" == 0
1109 *
1110 * Valid errors:
1111 * SUCCESS
1112 * RADIO_NOT_AVAILABLE
1113 * GENERIC_FAILURE
1114 */
1115#define RIL_REQUEST_RADIO_POWER 23
1116
1117/**
1118 * RIL_REQUEST_DTMF
1119 *
1120 * Send a DTMF tone
1121 *
1122 * If the implementation is currently playing a tone requested via
1123 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1124 * should be played instead
1125 *
1126 * "data" is a char *
1127 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
1128 * ((char *)data)[1] is a single character with one of 3 values:
1129 * 'S' -- tone should be played for a short time
1130 * 'L' -- tone should be played for a long time
1131 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001132 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001133 * FIXME should this block/mute microphone?
1134 * How does this interact with local DTMF feedback?
1135 *
1136 * Valid errors:
1137 * SUCCESS
1138 * RADIO_NOT_AVAILABLE
1139 * GENERIC_FAILURE
1140 *
1141 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1142 *
1143 */
1144#define RIL_REQUEST_DTMF 24
1145
1146/**
1147 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07001148 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001149 * Send an SMS message
1150 *
1151 * "data" is const char **
1152 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1153 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1154 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1155 * less the SMSC address
1156 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1157 *
1158 * "response" is a const RIL_SMS_Response *
1159 *
1160 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001161 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001162 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1163 *
1164 * Valid errors:
1165 * SUCCESS
1166 * RADIO_NOT_AVAILABLE
1167 * SMS_SEND_FAIL_RETRY
1168 * GENERIC_FAILURE
1169 *
1170 * FIXME how do we specify TP-Message-Reference if we need to resend?
1171 */
1172#define RIL_REQUEST_SEND_SMS 25
1173
1174
1175/**
1176 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07001177 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001178 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1179 * except that more messages are expected to be sent soon. If possible,
1180 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1181 *
1182 * "data" is const char **
1183 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1184 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1185 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1186 * less the SMSC address
1187 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1188 *
1189 * "response" is a const RIL_SMS_Response *
1190 *
1191 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001192 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001193 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1194 *
1195 * Valid errors:
1196 * SUCCESS
1197 * RADIO_NOT_AVAILABLE
1198 * SMS_SEND_FAIL_RETRY
1199 * GENERIC_FAILURE
1200 *
1201 */
1202#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1203
1204
1205/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001206 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001207 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001208 * Setup a packet data connection
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001209 *
1210 * "data" is a const char **
Wink Saville7f856802009-06-09 10:23:37 -07001211 * ((const char **)data)[0] indicates whether to setup connection on radio technology CDMA
Wink Savillef4c4d362009-04-02 01:37:03 -07001212 * or GSM/UMTS, 0-1. 0 - CDMA, 1-GSM/UMTS
Wink Saville7f856802009-06-09 10:23:37 -07001213 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001214 * ((const char **)data)[1] Profile Number or NULL to indicate default profile
Wink Saville7f856802009-06-09 10:23:37 -07001215 * ((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 -07001216 * override the one in the profile. NULL indicates no APN overrride.
1217 * ((const char **)data)[3] is the username for APN, or NULL
1218 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07001219 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
1220 * 0 => PAP and CHAP is never performed.
1221 * 1 => PAP may be performed; CHAP is never performed.
1222 * 2 => CHAP may be performed; PAP is never performed.
1223 * 3 => PAP / CHAP may be performed - baseband dependent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001224 *
1225 * "response" is a char **
Wink Saville7f856802009-06-09 10:23:37 -07001226 * ((char **)response)[0] indicating PDP CID, which is generated by RIL. This Connection ID is
Wink Savillef4c4d362009-04-02 01:37:03 -07001227 * used in GSM/UMTS and CDMA
1228 * ((char **)response)[1] indicating the network interface name for GSM/UMTS or CDMA
Wink Saville7f856802009-06-09 10:23:37 -07001229 * ((char **)response)[2] indicating the IP address for this interface for GSM/UMTS
Wink Savillef4c4d362009-04-02 01:37:03 -07001230 * and NULL for CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001231 *
1232 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07001233 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001234 * replaces RIL_REQUEST_SETUP_DEFAULT_PDP
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001235 *
1236 * Valid errors:
1237 * SUCCESS
1238 * RADIO_NOT_AVAILABLE
1239 * GENERIC_FAILURE
1240 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001241 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001242 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001243#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001244
1245
1246
1247/**
1248 * RIL_REQUEST_SIM_IO
1249 *
1250 * Request SIM I/O operation.
1251 * This is similar to the TS 27.007 "restricted SIM" operation
1252 * where it assumes all of the EF selection will be done by the
1253 * callee.
1254 *
1255 * "data" is a const RIL_SIM_IO *
1256 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1257 * or may specify a PIN2 for operations that require a PIN2 (eg
1258 * updating FDN records)
1259 *
1260 * "response" is a const RIL_SIM_IO_Response *
1261 *
1262 * Arguments and responses that are unused for certain
1263 * values of "command" should be ignored or set to NULL
1264 *
1265 * Valid errors:
1266 * SUCCESS
1267 * RADIO_NOT_AVAILABLE
1268 * GENERIC_FAILURE
1269 * SIM_PIN2
1270 * SIM_PUK2
1271 */
1272#define RIL_REQUEST_SIM_IO 28
1273
1274/**
1275 * RIL_REQUEST_SEND_USSD
1276 *
1277 * Send a USSD message
1278 *
1279 * If a USSD session already exists, the message should be sent in the
1280 * context of that session. Otherwise, a new session should be created.
1281 *
1282 * The network reply should be reported via RIL_UNSOL_ON_USSD
1283 *
1284 * Only one USSD session may exist at a time, and the session is assumed
1285 * to exist until:
1286 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1287 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1288 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1289 *
1290 * "data" is a const char * containing the USSD request in UTF-8 format
1291 * "response" is NULL
1292 *
1293 * Valid errors:
1294 * SUCCESS
1295 * RADIO_NOT_AVAILABLE
1296 * GENERIC_FAILURE
1297 *
1298 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1299 */
1300
1301#define RIL_REQUEST_SEND_USSD 29
1302
1303/**
1304 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07001305 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001306 * Cancel the current USSD session if one exists
1307 *
1308 * "data" is null
1309 * "response" is NULL
1310 *
1311 * Valid errors:
1312 * SUCCESS
1313 * RADIO_NOT_AVAILABLE
Wink Saville7f856802009-06-09 10:23:37 -07001314 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001315 */
1316
1317#define RIL_REQUEST_CANCEL_USSD 30
1318
Wink Saville7f856802009-06-09 10:23:37 -07001319/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001320 * RIL_REQUEST_GET_CLIR
1321 *
1322 * Gets current CLIR status
1323 * "data" is NULL
1324 * "response" is int *
1325 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1326 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
1327 *
1328 * Valid errors:
1329 * SUCCESS
1330 * RADIO_NOT_AVAILABLE
1331 * GENERIC_FAILURE
1332 */
1333#define RIL_REQUEST_GET_CLIR 31
1334
1335/**
1336 * RIL_REQUEST_SET_CLIR
1337 *
1338 * "data" is int *
1339 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1340 *
1341 * "response" is NULL
1342 *
1343 * Valid errors:
1344 * SUCCESS
1345 * RADIO_NOT_AVAILABLE
1346 * GENERIC_FAILURE
1347 */
1348#define RIL_REQUEST_SET_CLIR 32
1349
1350/**
1351 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
1352 *
1353 * "data" is const RIL_CallForwardInfo *
1354 *
1355 * "response" is const RIL_CallForwardInfo **
1356 * "response" points to an array of RIL_CallForwardInfo *'s, one for
1357 * each distinct registered phone number.
1358 *
1359 * For example, if data is forwarded to +18005551212 and voice is forwarded
1360 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07001361 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001362 * If, however, both data and voice are forwarded to +18005551212, then
1363 * a single RIL_CallForwardInfo can be returned with the service class
1364 * set to "data + voice = 3")
1365 *
1366 * Valid errors:
1367 * SUCCESS
1368 * RADIO_NOT_AVAILABLE
1369 * GENERIC_FAILURE
1370 */
1371#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
1372
1373
1374/**
1375 * RIL_REQUEST_SET_CALL_FORWARD
1376 *
1377 * Configure call forward rule
1378 *
1379 * "data" is const RIL_CallForwardInfo *
1380 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001381 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001382 * Valid errors:
1383 * SUCCESS
1384 * RADIO_NOT_AVAILABLE
1385 * GENERIC_FAILURE
1386 */
1387#define RIL_REQUEST_SET_CALL_FORWARD 34
1388
1389
1390/**
1391 * RIL_REQUEST_QUERY_CALL_WAITING
1392 *
1393 * Query current call waiting state
1394 *
1395 * "data" is const int *
1396 * ((const int *)data)[0] is the TS 27.007 service class to query.
1397 * "response" is a const int *
1398 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
1399 *
1400 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
1401 * must follow, with the TS 27.007 service class bit vector of services
1402 * for which call waiting is enabled.
1403 *
Wink Saville7f856802009-06-09 10:23:37 -07001404 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001405 * ((const int *)response)[1] is 3, then call waiting is enabled for data
1406 * and voice and disabled for everything else
1407 *
1408 * Valid errors:
1409 * SUCCESS
1410 * RADIO_NOT_AVAILABLE
1411 * GENERIC_FAILURE
1412 */
1413#define RIL_REQUEST_QUERY_CALL_WAITING 35
1414
1415
1416/**
1417 * RIL_REQUEST_SET_CALL_WAITING
1418 *
1419 * Configure current call waiting state
1420 *
1421 * "data" is const int *
1422 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
1423 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
1424 * services to modify
1425 * "response" is NULL
1426 *
1427 * Valid errors:
1428 * SUCCESS
1429 * RADIO_NOT_AVAILABLE
1430 * GENERIC_FAILURE
1431 */
1432#define RIL_REQUEST_SET_CALL_WAITING 36
1433
1434/**
1435 * RIL_REQUEST_SMS_ACKNOWLEDGE
1436 *
1437 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07001438 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001439 *
1440 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07001441 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001442 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07001443 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001444 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07001445 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
1446 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
1447 * capacity exceeded) and 0xFF (unspecified error) are
1448 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001449 *
1450 * "response" is NULL
1451 *
1452 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
1453 *
1454 * Valid errors:
1455 * SUCCESS
1456 * RADIO_NOT_AVAILABLE
1457 * GENERIC_FAILURE
1458 */
1459#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
1460
1461/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001462 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001463 *
1464 * Get the device IMEI, including check digit
1465 *
johnwangf8bc1672009-05-14 19:19:47 -07001466 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001467 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1468 *
1469 * "data" is NULL
1470 * "response" is a const char * containing the IMEI
1471 *
1472 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001473 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001474 * RADIO_NOT_AVAILABLE (radio resetting)
1475 * GENERIC_FAILURE
1476 */
1477
1478#define RIL_REQUEST_GET_IMEI 38
1479
1480/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001481 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001482 *
1483 * Get the device IMEISV, which should be two decimal digits
1484 *
johnwangf8bc1672009-05-14 19:19:47 -07001485 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001486 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1487 *
1488 * "data" is NULL
1489 * "response" is a const char * containing the IMEISV
1490 *
1491 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001492 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001493 * RADIO_NOT_AVAILABLE (radio resetting)
1494 * GENERIC_FAILURE
1495 */
1496
1497#define RIL_REQUEST_GET_IMEISV 39
1498
1499
1500/**
1501 * RIL_REQUEST_ANSWER
1502 *
1503 * Answer incoming call
1504 *
1505 * Will not be called for WAITING calls.
1506 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
1507 * instead
1508 *
1509 * "data" is NULL
1510 * "response" is NULL
1511 *
1512 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001513 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001514 * RADIO_NOT_AVAILABLE (radio resetting)
1515 * GENERIC_FAILURE
1516 */
1517
1518#define RIL_REQUEST_ANSWER 40
1519
1520/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001521 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001522 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001523 * Deactivate packet data connection
1524 * replaces RIL_REQUEST_DEACTIVATE_DEFAULT_PDP
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001525 *
1526 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07001527 * ((char**)data)[0] indicating CID
Wink Saville7f856802009-06-09 10:23:37 -07001528 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001529 * "response" is NULL
1530 *
1531 * Valid errors:
1532 * SUCCESS
1533 * RADIO_NOT_AVAILABLE
1534 * GENERIC_FAILURE
1535 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001536 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001537 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001538#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001539
1540/**
1541 * RIL_REQUEST_QUERY_FACILITY_LOCK
1542 *
1543 * Query the status of a facility lock state
1544 *
1545 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07001546 * ((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 -08001547 * (eg "AO" for BAOC, "SC" for SIM lock)
1548 * ((const char **)data)[1] is the password, or "" if not required
1549 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
1550 * services to query
1551 *
1552 * "response" is an int *
1553 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07001554 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001555 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07001556 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001557 *
1558 * Valid errors:
1559 * SUCCESS
1560 * RADIO_NOT_AVAILABLE
1561 * GENERIC_FAILURE
1562 *
1563 */
1564#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
1565
1566/**
1567 * RIL_REQUEST_SET_FACILITY_LOCK
1568 *
1569 * Enable/disable one facility lock
1570 *
1571 * "data" is const char **
1572 *
1573 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1574 * (eg "AO" for BAOC)
1575 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
1576 * ((const char **)data)[2] = password
1577 * ((const char **)data)[3] = string representation of decimal TS 27.007
1578 * service class bit vector. Eg, the string
1579 * "1" means "set this facility for voice services"
1580 *
Wink Saville7f856802009-06-09 10:23:37 -07001581 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001582 *
1583 * Valid errors:
1584 * SUCCESS
1585 * RADIO_NOT_AVAILABLE
1586 * GENERIC_FAILURE
1587 *
1588 */
1589#define RIL_REQUEST_SET_FACILITY_LOCK 43
1590
1591/**
1592 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
1593 *
1594 * Change call barring facility password
1595 *
1596 * "data" is const char **
1597 *
1598 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1599 * (eg "AO" for BAOC)
1600 * ((const char **)data)[1] = old password
1601 * ((const char **)data)[2] = new password
1602 *
Wink Saville7f856802009-06-09 10:23:37 -07001603 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001604 *
1605 * Valid errors:
1606 * SUCCESS
1607 * RADIO_NOT_AVAILABLE
1608 * GENERIC_FAILURE
1609 *
1610 */
1611#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
1612
1613/**
1614 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
1615 *
1616 * Query current network selectin mode
1617 *
1618 * "data" is NULL
1619 *
1620 * "response" is int *
1621 * ((const int *)response)[0] is
1622 * 0 for automatic selection
1623 * 1 for manual selection
1624 *
1625 * Valid errors:
1626 * SUCCESS
1627 * RADIO_NOT_AVAILABLE
1628 * GENERIC_FAILURE
1629 *
1630 */
1631#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
1632
1633/**
1634 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
1635 *
1636 * Specify that the network should be selected automatically
1637 *
1638 * "data" is NULL
1639 * "response" is NULL
1640 *
Wink Saville7f856802009-06-09 10:23:37 -07001641 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001642 * and registered
1643 *
1644 * Valid errors:
1645 * SUCCESS
1646 * RADIO_NOT_AVAILABLE
1647 * GENERIC_FAILURE
1648 *
1649 */
1650#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
1651
1652/**
1653 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
1654 *
1655 * Manually select a specified network.
1656 *
Wink Saville7f856802009-06-09 10:23:37 -07001657 * The radio baseband/RIL implementation is expected to fall back to
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001658 * automatic selection mode if the manually selected network should go
1659 * out of range in the future.
1660 *
1661 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
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_MANUAL 47
1674
1675/**
1676 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
1677 *
1678 * Scans for available networks
1679 *
1680 * "data" is NULL
1681 * "response" is const char ** that should be an array of n*4 strings, where
1682 * n is the number of available networks
1683 * For each available network:
1684 *
Wink Saville7f856802009-06-09 10:23:37 -07001685 * ((const char **)response)[n+0] is long alpha ONS or EONS
1686 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001687 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
1688 * ((const char **)response)[n+3] is a string value of the status:
1689 * "unknown"
1690 * "available"
1691 * "current"
1692 * "forbidden"
1693 *
Wink Saville7f856802009-06-09 10:23:37 -07001694 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001695 * and registered
1696 *
1697 * Valid errors:
1698 * SUCCESS
1699 * RADIO_NOT_AVAILABLE
1700 * GENERIC_FAILURE
1701 *
1702 */
1703#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
1704
1705/**
1706 * RIL_REQUEST_DTMF_START
1707 *
Wink Saville7f856802009-06-09 10:23:37 -07001708 * Start playing a DTMF tone. Continue playing DTMF tone until
1709 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001710 *
1711 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
1712 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07001713 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001714 * "data" is a char *
1715 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
1716 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001717 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001718 * Valid errors:
1719 * SUCCESS
1720 * RADIO_NOT_AVAILABLE
1721 * GENERIC_FAILURE
1722 *
1723 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
1724 */
1725#define RIL_REQUEST_DTMF_START 49
1726
1727/**
1728 * RIL_REQUEST_DTMF_STOP
1729 *
1730 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07001731 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001732 * "data" is NULL
1733 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001734 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001735 * Valid errors:
1736 * SUCCESS
1737 * RADIO_NOT_AVAILABLE
1738 * GENERIC_FAILURE
1739 *
1740 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
1741 */
1742#define RIL_REQUEST_DTMF_STOP 50
1743
1744/**
1745 * RIL_REQUEST_BASEBAND_VERSION
1746 *
1747 * Return string value indicating baseband version, eg
1748 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07001749 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001750 * "data" is NULL
1751 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07001752 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001753 * Valid errors:
1754 * SUCCESS
1755 * RADIO_NOT_AVAILABLE
1756 * GENERIC_FAILURE
1757 *
1758 */
1759#define RIL_REQUEST_BASEBAND_VERSION 51
1760
1761/**
1762 * RIL_REQUEST_SEPARATE_CONNECTION
1763 *
1764 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07001765 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001766 * as the only other member of the current (active) call
1767 *
1768 * Like AT+CHLD=2x
1769 *
1770 * See TS 22.084 1.3.8.2 (iii)
1771 * TS 22.030 6.5.5 "Entering "2X followed by send"
1772 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07001773 *
1774 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001775 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
1776 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001777 * "response" is NULL
1778 *
1779 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001780 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001781 * RADIO_NOT_AVAILABLE (radio resetting)
1782 * GENERIC_FAILURE
1783 */
1784#define RIL_REQUEST_SEPARATE_CONNECTION 52
1785
1786
1787/**
1788 * RIL_REQUEST_SET_MUTE
1789 *
1790 * Turn on or off uplink (microphone) mute.
1791 *
1792 * Will only be sent while voice call is active.
1793 * Will always be reset to "disable mute" when a new voice call is initiated
1794 *
1795 * "data" is an int *
1796 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
1797 *
1798 * "response" is NULL
1799 *
1800 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001801 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001802 * RADIO_NOT_AVAILABLE (radio resetting)
1803 * GENERIC_FAILURE
1804 */
1805
1806#define RIL_REQUEST_SET_MUTE 53
1807
1808/**
1809 * RIL_REQUEST_GET_MUTE
1810 *
1811 * Queries the current state of the uplink mute setting
1812 *
1813 * "data" is NULL
1814 * "response" is an int *
1815 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
1816 *
1817 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001818 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001819 * RADIO_NOT_AVAILABLE (radio resetting)
1820 * GENERIC_FAILURE
1821 */
1822
1823#define RIL_REQUEST_GET_MUTE 54
1824
1825/**
1826 * RIL_REQUEST_QUERY_CLIP
1827 *
1828 * Queries the status of the CLIP supplementary service
1829 *
1830 * (for MMI code "*#30#")
1831 *
1832 * "data" is NULL
1833 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07001834 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001835 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07001836 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001837 *
1838 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001839 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001840 * RADIO_NOT_AVAILABLE (radio resetting)
1841 * GENERIC_FAILURE
1842 */
1843
1844#define RIL_REQUEST_QUERY_CLIP 55
1845
1846/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001847 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
Wink Saville7f856802009-06-09 10:23:37 -07001848 *
1849 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07001850 * context or CDMA data connection active
1851 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001852 *
1853 * "data" is NULL
1854 *
1855 * "response" is a "int *"
1856 * ((int *)response)[0] is an integer cause code defined in TS 24.008
1857 * section 6.1.3.1.3 or close approximation
1858 *
1859 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07001860 * then it should return one of the values listed in
1861 * RIL_LastDataCallActivateFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001862 * cases for error notification
1863 * and potential retries.
1864 *
1865 * Valid errors:
1866 * SUCCESS
1867 * RADIO_NOT_AVAILABLE
1868 * GENERIC_FAILURE
1869 *
1870 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Saville7f856802009-06-09 10:23:37 -07001871 *
1872 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001873
Wink Savillef4c4d362009-04-02 01:37:03 -07001874#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001875
1876/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001877 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001878 *
1879 * Queries the status of PDP contexts, returning for each
1880 * its CID, whether or not it is active, and its PDP type,
1881 * APN, and PDP adddress.
Wink Savillef4c4d362009-04-02 01:37:03 -07001882 * replaces RIL_REQUEST_PDP_CONTEXT_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001883 *
1884 * "data" is NULL
Wink Savillef4c4d362009-04-02 01:37:03 -07001885 * "response" is an array of RIL_Data_Call_Response
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001886 *
1887 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001888 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001889 * RADIO_NOT_AVAILABLE (radio resetting)
1890 * GENERIC_FAILURE
1891 */
1892
Wink Savillef4c4d362009-04-02 01:37:03 -07001893#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001894
1895/**
johnwangf8bc1672009-05-14 19:19:47 -07001896 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001897 *
1898 * Request a radio reset. The RIL implementation may postpone
1899 * the reset until after this request is responded to if the baseband
1900 * is presently busy.
1901 *
johnwangf8bc1672009-05-14 19:19:47 -07001902 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
1903 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001904 * "data" is NULL
1905 * "response" is NULL
1906 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001907 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001908 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001909 * RADIO_NOT_AVAILABLE (radio resetting)
1910 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07001911 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001912 */
1913
1914#define RIL_REQUEST_RESET_RADIO 58
1915
1916/**
1917 * RIL_REQUEST_OEM_HOOK_RAW
1918 *
1919 * This request reserved for OEM-specific uses. It passes raw byte arrays
1920 * back and forth.
1921 *
Wink Saville7f856802009-06-09 10:23:37 -07001922 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001923 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
1924 *
1925 * "data" is a char * of bytes copied from the byte[] data argument in java
1926 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07001927 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001928 * (byte[])(((AsyncResult)response.obj).result)
1929 *
Wink Saville7f856802009-06-09 10:23:37 -07001930 * An error response here will result in
1931 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001932 * (((AsyncResult)response.obj).exception) being an instance of
1933 * com.android.internal.telephony.gsm.CommandException
1934 *
1935 * Valid errors:
1936 * All
1937 */
1938
1939#define RIL_REQUEST_OEM_HOOK_RAW 59
1940
1941/**
1942 * RIL_REQUEST_OEM_HOOK_STRINGS
1943 *
1944 * This request reserved for OEM-specific uses. It passes strings
1945 * back and forth.
1946 *
Wink Saville7f856802009-06-09 10:23:37 -07001947 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001948 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
1949 *
1950 * "data" is a const char **, representing an array of null-terminated UTF-8
1951 * strings copied from the "String[] strings" argument to
1952 * invokeOemRilRequestStrings()
1953 *
1954 * "response" is a const char **, representing an array of null-terminated UTF-8
1955 * stings that will be returned via the caller's response message here:
1956 *
1957 * (String[])(((AsyncResult)response.obj).result)
1958 *
Wink Saville7f856802009-06-09 10:23:37 -07001959 * An error response here will result in
1960 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001961 * (((AsyncResult)response.obj).exception) being an instance of
1962 * com.android.internal.telephony.gsm.CommandException
1963 *
1964 * Valid errors:
1965 * All
1966 */
1967
1968#define RIL_REQUEST_OEM_HOOK_STRINGS 60
1969
1970/**
1971 * RIL_REQUEST_SCREEN_STATE
1972 *
1973 * Indicates the current state of the screen. When the screen is off, the
1974 * RIL should notify the baseband to suppress certain notifications (eg,
1975 * signal strength and changes in LAC or CID) in an effort to conserve power.
1976 * These notifications should resume when the screen is on.
1977 *
1978 * "data" is int *
1979 * ((int *)data)[0] is == 1 for "Screen On"
1980 * ((int *)data)[0] is == 0 for "Screen Off"
1981 *
1982 * "response" is NULL
1983 *
1984 * Valid errors:
1985 * SUCCESS
1986 * GENERIC_FAILURE
1987 */
1988#define RIL_REQUEST_SCREEN_STATE 61
1989
1990
1991/**
1992 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
1993 *
1994 * Enables/disables supplementary service related notifications
1995 * from the network.
1996 *
1997 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
1998 *
1999 * "data" is int *
2000 * ((int *)data)[0] is == 1 for notifications enabled
2001 * ((int *)data)[0] is == 0 for notifications disabled
2002 *
2003 * "response" is NULL
2004 *
2005 * Valid errors:
2006 * SUCCESS
2007 * RADIO_NOT_AVAILABLE
2008 * GENERIC_FAILURE
2009 *
2010 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2011 */
2012#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2013
2014/**
2015 * RIL_REQUEST_WRITE_SMS_TO_SIM
2016 *
2017 * Stores a SMS message to SIM memory.
2018 *
2019 * "data" is RIL_SMS_WriteArgs *
2020 *
2021 * "response" is int *
2022 * ((const int *)response)[0] is the record index where the message is stored.
2023 *
2024 * Valid errors:
2025 * SUCCESS
2026 * GENERIC_FAILURE
2027 *
2028 */
2029#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2030
2031/**
2032 * RIL_REQUEST_DELETE_SMS_ON_SIM
2033 *
2034 * Deletes a SMS message from SIM memory.
2035 *
2036 * "data" is int *
2037 * ((int *)data)[0] is the record index of the message to delete.
2038 *
2039 * "response" is NULL
2040 *
2041 * Valid errors:
2042 * SUCCESS
2043 * GENERIC_FAILURE
2044 *
2045 */
2046#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2047
2048/**
2049 * RIL_REQUEST_SET_BAND_MODE
2050 *
2051 * Assign a specified band for RF configuration.
2052 *
2053 * "data" is int *
2054 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2055 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2056 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2057 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2058 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2059 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002060 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2061 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2062 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2063 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2064 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2065 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2066 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2067 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2068 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2069 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2070 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2071 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2072 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002073 *
2074 * "response" is NULL
2075 *
2076 * Valid errors:
2077 * SUCCESS
2078 * RADIO_NOT_AVAILABLE
2079 * GENERIC_FAILURE
2080 */
2081#define RIL_REQUEST_SET_BAND_MODE 65
2082
2083/**
2084 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2085 *
2086 * Query the list of band mode supported by RF.
2087 *
2088 * "data" is NULL
2089 *
2090 * "response" is int *
2091 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2092 * each available band mode.
2093 *
2094 * 0 for "unspecified" (selected by baseband automatically)
2095 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2096 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2097 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2098 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2099 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002100 * 6 for "Cellular (800-MHz Band)"
2101 * 7 for "PCS (1900-MHz Band)"
2102 * 8 for "Band Class 3 (JTACS Band)"
2103 * 9 for "Band Class 4 (Korean PCS Band)"
2104 * 10 for "Band Class 5 (450-MHz Band)"
2105 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2106 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2107 * 13 for "Band Class 8 (1800-MHz Band)"
2108 * 14 for "Band Class 9 (900-MHz Band)"
2109 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2110 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2111 * 17 for "Band Class 15 (AWS Band)"
2112 * 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002113 *
2114 * Valid errors:
2115 * SUCCESS
2116 * RADIO_NOT_AVAILABLE
2117 * GENERIC_FAILURE
2118 *
2119 * See also: RIL_REQUEST_SET_BAND_MODE
2120 */
2121#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2122
2123/**
2124 * RIL_REQUEST_STK_GET_PROFILE
2125 *
2126 * Requests the profile of SIM tool kit.
2127 * The profile indicates the SAT/USAT features supported by ME.
2128 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2129 *
2130 * "data" is NULL
2131 *
2132 * "response" is a const char * containing SAT/USAT profile
2133 * in hexadecimal format string starting with first byte of terminal profile
2134 *
2135 * Valid errors:
2136 * RIL_E_SUCCESS
2137 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2138 * RIL_E_GENERIC_FAILURE
2139 */
2140#define RIL_REQUEST_STK_GET_PROFILE 67
2141
2142/**
2143 * RIL_REQUEST_STK_SET_PROFILE
2144 *
2145 * Download the STK terminal profile as part of SIM initialization
2146 * procedure
2147 *
2148 * "data" is a const char * containing SAT/USAT profile
2149 * in hexadecimal format string starting with first byte of terminal profile
2150 *
2151 * "response" is NULL
2152 *
2153 * Valid errors:
2154 * RIL_E_SUCCESS
2155 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2156 * RIL_E_GENERIC_FAILURE
2157 */
2158#define RIL_REQUEST_STK_SET_PROFILE 68
2159
2160/**
2161 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2162 *
2163 * Requests to send a SAT/USAT envelope command to SIM.
2164 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2165 *
2166 * "data" is a const char * containing SAT/USAT command
2167 * in hexadecimal format string starting with command tag
2168 *
2169 * "response" is a const char * containing SAT/USAT response
2170 * in hexadecimal format string starting with first byte of response
2171 * (May be NULL)
2172 *
2173 * Valid errors:
2174 * RIL_E_SUCCESS
2175 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2176 * RIL_E_GENERIC_FAILURE
2177 */
2178#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2179
2180/**
2181 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2182 *
2183 * Requests to send a terminal response to SIM for a received
2184 * proactive command
2185 *
2186 * "data" is a const char * containing SAT/USAT response
2187 * in hexadecimal format string starting with first byte of response data
2188 *
2189 * "response" is NULL
2190 *
2191 * Valid errors:
2192 * RIL_E_SUCCESS
2193 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2194 * RIL_E_GENERIC_FAILURE
2195 */
2196#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
2197
2198/**
2199 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
2200 *
2201 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
2202 * been initialized by ME already. (We could see the call has been in the 'call
2203 * list') So, STK application needs to accept/reject the call according as user
2204 * operations.
2205 *
2206 * "data" is int *
2207 * ((int *)data)[0] is > 0 for "accept" the call setup
2208 * ((int *)data)[0] is == 0 for "reject" the call setup
2209 *
2210 * "response" is NULL
2211 *
2212 * Valid errors:
2213 * RIL_E_SUCCESS
2214 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2215 * RIL_E_GENERIC_FAILURE
2216 */
2217#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
2218
2219/**
2220 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
2221 *
2222 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07002223 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002224 * "data" is NULL
2225 * "response" is NULL
2226 *
2227 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002228 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002229 * RADIO_NOT_AVAILABLE (radio resetting)
2230 * GENERIC_FAILURE
2231 */
2232#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
2233
2234/**
2235 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2236 *
2237 * Requests to set the preferred network type for searching and registering
2238 * (CS/PS domain, RAT, and operation mode)
2239 *
2240 * "data" is int *
Wink Saville7f856802009-06-09 10:23:37 -07002241 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002242 * ((int *)data)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002243 * ((int *)data)[0] is == 1 for GSM only
2244 * ((int *)data)[0] is == 2 for WCDMA only
Wink Savillef4c4d362009-04-02 01:37:03 -07002245 * ((int *)data)[0] is == 3 for GSM/WCDMA (auto mode)
2246 * ((int *)data)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2247 * ((int *)data)[0] is == 5 for CDMA only
2248 * ((int *)data)[0] is == 6 for EvDo only
2249 * ((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 -08002250 *
2251 * "response" is NULL
2252 *
2253 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07002254 * SUCCESS
2255 * RADIO_NOT_AVAILABLE (radio resetting)
2256 * GENERIC_FAILURE
2257 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002258 */
2259#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2260
2261/**
2262 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2263 *
2264 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2265 * for searching and registering
2266 *
2267 * "data" is NULL
2268 *
2269 * "response" is int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002270 * ((int *)response)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002271 * ((int *)response)[0] is == 1 for GSM only
2272 * ((int *)response)[0] is == 2 for WCDMA only
Wink Savillef4c4d362009-04-02 01:37:03 -07002273 * ((int *)response)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL)
2274 * ((int *)response)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2275 * ((int *)response)[0] is == 5 for CDMA only
2276 * ((int *)response)[0] is == 6 for EvDo only
2277 * ((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 -08002278 *
2279 * Valid errors:
2280 * SUCCESS
2281 * RADIO_NOT_AVAILABLE
2282 * GENERIC_FAILURE
2283 *
2284 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2285 */
2286#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2287
2288/**
2289 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2290 *
2291 * Request neighboring cell id in GSM network
2292 *
2293 * "data" is NULL
2294 * "response" must be a " const RIL_NeighboringCell** "
2295 *
2296 * Valid errors:
2297 * SUCCESS
2298 * RADIO_NOT_AVAILABLE
2299 * GENERIC_FAILURE
2300 */
2301#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
2302
2303/**
2304 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07002305 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002306 * Enables/disables network state change notifications due to changes in
Wink Saville7f856802009-06-09 10:23:37 -07002307 * LAC and/or CID (basically, +CREG=2 vs. +CREG=1).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002308 *
2309 * Note: The RIL implementation should default to "updates enabled"
2310 * when the screen is on and "updates disabled" when the screen is off.
2311 *
2312 * "data" is int *
2313 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
2314 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
2315 *
2316 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07002317 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002318 * Valid errors:
2319 * SUCCESS
2320 * RADIO_NOT_AVAILABLE
2321 * GENERIC_FAILURE
2322 *
2323 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2324 */
2325#define RIL_REQUEST_SET_LOCATION_UPDATES 76
2326
Wink Savillef4c4d362009-04-02 01:37:03 -07002327/**
2328 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION
Wink Saville7f856802009-06-09 10:23:37 -07002329 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002330 * Request to set the location where the CDMA subscription shall
2331 * be retrieved
2332 *
2333 * "data" is int *
2334 * ((int *)data)[0] is == 0 from RUIM/SIM (default)
2335 * ((int *)data)[0] is == 1 from NV
2336 *
2337 * "response" is NULL
2338 *
2339 * Valid errors:
2340 * SUCCESS
2341 * RADIO_NOT_AVAILABLE
2342 * GENERIC_FAILURE
2343 * SIM_ABSENT
2344 * SUBSCRIPTION_NOT_AVAILABLE
2345 */
2346#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION 77
2347
2348/**
2349 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07002350 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002351 * Request to set the roaming preferences in CDMA
2352 *
2353 * "data" is int *
2354 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
2355 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2356 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07002357 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002358 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002359 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002360 * Valid errors:
2361 * SUCCESS
2362 * RADIO_NOT_AVAILABLE
2363 * GENERIC_FAILURE
2364 */
2365#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
2366
2367/**
2368 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07002369 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002370 * Request the actual setting of the roaming preferences in CDMA in the modem
2371 *
2372 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002373 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002374 * "response" is int *
2375 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
2376 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2377 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07002378 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002379 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002380 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002381 * Valid errors:
2382 * SUCCESS
2383 * RADIO_NOT_AVAILABLE
2384 * GENERIC_FAILURE
2385 */
2386#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
2387
2388/**
2389 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002390 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002391 * Request to set the TTY mode
2392 *
2393 * "data" is int *
2394 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07002395 * ((int *)data)[0] is == 1 for TTY Full
2396 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
2397 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07002398 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002399 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002400 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002401 * Valid errors:
2402 * SUCCESS
2403 * RADIO_NOT_AVAILABLE
2404 * GENERIC_FAILURE
2405 */
2406#define RIL_REQUEST_SET_TTY_MODE 80
2407
2408/**
2409 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002410 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002411 * Request the setting of TTY mode
2412 *
2413 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002414 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002415 * "response" is int *
2416 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07002417 * ((int *)response)[0] is == 1 for TTY Full
2418 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
2419 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07002420 *
2421 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002422 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002423 * Valid errors:
2424 * SUCCESS
2425 * RADIO_NOT_AVAILABLE
2426 * GENERIC_FAILURE
2427 */
2428#define RIL_REQUEST_QUERY_TTY_MODE 81
2429
2430/**
2431 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
2432 *
2433 * Request to set the preferred voice privacy mode used in voice
2434 * scrambling
2435 *
2436 * "data" is int *
2437 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2438 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07002439 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002440 * "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_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
2448
2449/**
2450 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002451 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002452 * Request the setting of preferred voice privacy mode
2453 *
2454 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002455 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002456 * "response" is int *
2457 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2458 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07002459 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002460 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002461 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002462 * Valid errors:
2463 * SUCCESS
2464 * RADIO_NOT_AVAILABLE
2465 * GENERIC_FAILURE
2466 */
2467#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
2468
2469/**
2470 * RIL_REQUEST_CDMA_FLASH
2471 *
2472 * Send FLASH
2473 *
2474 * "data" is const char *
2475 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07002476 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002477 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002478 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002479 * Valid errors:
2480 * SUCCESS
2481 * RADIO_NOT_AVAILABLE
2482 * GENERIC_FAILURE
2483 *
2484 */
2485#define RIL_REQUEST_CDMA_FLASH 84
2486
2487/**
2488 * RIL_REQUEST_CDMA_BURST_DTMF
2489 *
2490 * Send DTMF string
2491 *
2492 * "data" is const char *
2493 * ((const char *)data)[0] is a DTMF string
Wink Saville7f856802009-06-09 10:23:37 -07002494 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002495 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002496 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002497 * Valid errors:
2498 * SUCCESS
2499 * RADIO_NOT_AVAILABLE
2500 * GENERIC_FAILURE
2501 *
2502 */
2503#define RIL_REQUEST_CDMA_BURST_DTMF 85
2504
2505/**
2506 * RIL_REQUEST_CDMA_VALIDATE_AKEY
2507 *
2508 * Validate AKey.
2509 *
2510 * "data" is const char *
2511 * ((const char *)data)[0] is a AKey string
Wink Saville7f856802009-06-09 10:23:37 -07002512 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002513 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002514 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002515 * Valid errors:
2516 * SUCCESS
2517 * RADIO_NOT_AVAILABLE
2518 * GENERIC_FAILURE
2519 *
2520 */
2521#define RIL_REQUEST_CDMA_VALIDATE_AKEY 86
2522
2523/**
2524 * RIL_REQUEST_CDMA_SEND_SMS
2525 *
2526 * Send a CDMA SMS message
2527 *
2528 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07002529 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002530 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07002531 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002532 * Valid errors:
2533 * SUCCESS
2534 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07002535 * SMS_SEND_FAIL_RETRY
Wink Savillef4c4d362009-04-02 01:37:03 -07002536 * GENERIC_FAILURE
2537 *
2538 */
2539#define RIL_REQUEST_CDMA_SEND_SMS 87
2540
2541/**
2542 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
2543 *
2544 * Acknowledge the success or failure in the receipt of SMS
2545 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
2546 *
2547 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07002548 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002549 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002550 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002551 * Valid errors:
2552 * SUCCESS
2553 * RADIO_NOT_AVAILABLE
2554 * GENERIC_FAILURE
2555 *
2556 */
2557#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
2558
2559/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002560 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002561 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002562 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
2563 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002564 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002565 *
2566 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
2567 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
2568 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002569 * Valid errors:
2570 * SUCCESS
2571 * RADIO_NOT_AVAILABLE
2572 * GENERIC_FAILURE
2573 *
2574 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002575#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07002576
2577/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002578 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002579 *
2580 * Set GSM/WCDMA Cell Broadcast SMS config
2581 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002582 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
2583 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
2584 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002585 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002586 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002587 * Valid errors:
2588 * SUCCESS
2589 * RADIO_NOT_AVAILABLE
2590 * GENERIC_FAILURE
2591 *
2592 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002593#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07002594
2595/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002596 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07002597 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002598* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07002599 *
2600 * "data" is const int *
2601 * (const int *)data[0] indicates to activate or turn off the
2602 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
2603 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07002604 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002605 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002606 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002607 * Valid errors:
2608 * SUCCESS
2609 * RADIO_NOT_AVAILABLE
2610 * GENERIC_FAILURE
2611 *
2612 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002613#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07002614
2615/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002616 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002617 *
2618 * Request the setting of CDMA Broadcast SMS config
2619 *
2620 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002621 *
2622 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
2623 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
2624 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002625 * Valid errors:
2626 * SUCCESS
2627 * RADIO_NOT_AVAILABLE
2628 * GENERIC_FAILURE
2629 *
2630 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002631#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07002632
2633/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002634 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002635 *
2636 * Set CDMA Broadcast SMS config
2637 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002638 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
2639 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
2640 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002641 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002642 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002643 * Valid errors:
2644 * SUCCESS
2645 * RADIO_NOT_AVAILABLE
2646 * GENERIC_FAILURE
2647 *
2648 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002649#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07002650
2651/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002652 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07002653 *
2654 * Enable or disable the reception of CDMA Broadcast SMS
2655 *
2656 * "data" is const int *
2657 * (const int *)data[0] indicates to activate or turn off the
2658 * reception of CDMA Broadcast SMS, 0-1,
2659 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07002660 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002661 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002662 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002663 * Valid errors:
2664 * SUCCESS
2665 * RADIO_NOT_AVAILABLE
2666 * GENERIC_FAILURE
2667 *
2668 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002669#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07002670
2671/**
2672 * RIL_REQUEST_CDMA_SUBSCRIPTION
2673 *
2674 * Request the device MDN / H_SID / H_NID.
2675 *
2676 * The request is only allowed when CDMA subscription is available. When CDMA
2677 * subscription is changed, application layer should re-issue the request to
2678 * update the subscription information.
2679 *
2680 * If a NULL value is returned for any of the device id, it means that error
2681 * accessing the device.
2682 *
2683 * "response" is const char **
2684 * ((const char **)response)[0] is MDN if CDMA subscription is available
2685 * ((const char **)response)[1] is H_SID (Home SID) if CDMA subscription is available
Wink Saville1b5fd232009-04-22 14:50:00 -07002686 * ((const char **)response)[2] is H_NID (Home NID) if CDMA subscription is available
2687 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07002688 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07002689 *
2690 * Valid errors:
2691 * SUCCESS
2692 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
2693 */
2694
Wink Savilleeafe79d2009-04-03 18:02:34 -07002695#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07002696
2697/**
2698 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
2699 *
2700 * Stores a CDMA SMS message to RUIM memory.
2701 *
2702 * "data" is RIL_CDMA_SMS_WriteArgs *
2703 *
2704 * "response" is int *
2705 * ((const int *)response)[0] is the record index where the message is stored.
2706 *
2707 * Valid errors:
2708 * SUCCESS
2709 * RADIO_NOT_AVAILABLE
2710 * GENERIC_FAILURE
2711 *
2712 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07002713#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07002714
2715/**
2716 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
2717 *
2718 * Deletes a CDMA SMS message from RUIM memory.
2719 *
2720 * "data" is int *
2721 * ((int *)data)[0] is the record index of the message to delete.
2722 *
2723 * "response" is NULL
2724 *
2725 * Valid errors:
2726 * SUCCESS
2727 * RADIO_NOT_AVAILABLE
2728 * GENERIC_FAILURE
2729 *
2730 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07002731#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07002732
2733/**
2734 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07002735 *
2736 * Request the device ESN / MEID / IMEI / IMEISV.
2737 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002738 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07002739 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07002740 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07002741 *
2742 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07002743 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07002744 *
2745 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07002746 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07002747 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002748 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07002749 * ((const char **)response)[0] is IMEI if GSM subscription is available
2750 * ((const char **)response)[1] is IMEISV if GSM subscription is available
2751 * ((const char **)response)[2] is ESN if CDMA subscription is available
2752 * ((const char **)response)[3] is MEID if CDMA subscription is available
2753 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002754 * Valid errors:
2755 * SUCCESS
2756 * RADIO_NOT_AVAILABLE
2757 * GENERIC_FAILURE
2758 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07002759#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07002760
Wink Saville1b5fd232009-04-22 14:50:00 -07002761/**
2762 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
2763 *
2764 * Request the radio's system selection module to exit emergency
2765 * callback mode. RIL will not respond with SUCCESS until the modem has
2766 * completely exited from Emergency Callback Mode.
2767 *
2768 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002769 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002770 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002771 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002772 * Valid errors:
2773 * SUCCESS
2774 * RADIO_NOT_AVAILABLE
2775 * GENERIC_FAILURE
2776 *
2777 */
2778#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07002779
jsh000a9fe2009-05-11 14:52:35 -07002780/**
2781 * RIL_REQUEST_GET_SMSC_ADDRESS
2782 *
2783 * Queries the default Short Message Service Center address on the device.
2784 *
2785 * "data" is NULL
2786 *
2787 * "response" is const char * containing the SMSC address.
2788 *
2789 * Valid errors:
2790 * SUCCESS
2791 * RADIO_NOT_AVAILABLE
2792 * GENERIC_FAILURE
2793 *
2794 */
2795#define RIL_REQUEST_GET_SMSC_ADDRESS 100
2796
2797/**
2798 * RIL_REQUEST_SET_SMSC_ADDRESS
2799 *
2800 * Sets the default Short Message Service Center address on the device.
2801 *
2802 * "data" is const char * containing the SMSC address.
2803 *
2804 * "response" is NULL
2805 *
2806 * Valid errors:
2807 * SUCCESS
2808 * RADIO_NOT_AVAILABLE
2809 * GENERIC_FAILURE
2810 *
2811 */
2812#define RIL_REQUEST_SET_SMSC_ADDRESS 101
2813
jshb60444e2009-05-29 11:09:17 -07002814/**
2815 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
2816 *
2817 * Indicates whether there is storage available for new SMS messages.
2818 *
2819 * "data" is int *
2820 * ((int *)data)[0] is 1 if memory is available for storing new messages
2821 * is 0 if memory capacity is exceeded
2822 *
2823 * "response" is NULL
2824 *
2825 * Valid errors:
2826 * SUCCESS
2827 * RADIO_NOT_AVAILABLE
2828 * GENERIC_FAILURE
2829 *
2830 */
2831#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
2832
Wink Saville2641d5b2009-06-08 17:40:42 -07002833/**
2834 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
2835 *
2836 * Indicates that the StkSerivce is running and is
2837 * ready to receive RIL_UNSOL_STK_XXXXX commands.
2838 *
2839 * "data" is NULL
2840 * "response" is NULL
2841 *
2842 * Valid errors:
2843 * SUCCESS
2844 * RADIO_NOT_AVAILABLE
2845 * GENERIC_FAILURE
2846 *
2847 */
2848#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
2849
Wink Savillef4c4d362009-04-02 01:37:03 -07002850
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002851/***********************************************************************/
2852
Wink Savillef4c4d362009-04-02 01:37:03 -07002853
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002854#define RIL_UNSOL_RESPONSE_BASE 1000
2855
2856/**
2857 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
2858 *
2859 * Indicate when value of RIL_RadioState has changed.
2860 *
2861 * Callee will invoke RIL_RadioStateRequest method on main thread
2862 *
2863 * "data" is NULL
2864 */
2865
2866#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
2867
2868
2869/**
2870 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
2871 *
2872 * Indicate when call state has changed
2873 *
2874 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
2875 *
2876 * "data" is NULL
2877 *
Wink Saville7f856802009-06-09 10:23:37 -07002878 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002879 * "RING", "BUSY", "NO CARRIER", and also call state
2880 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
2881 *
2882 * Redundent or extraneous invocations are tolerated
2883 */
2884#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
2885
2886
2887/**
Wink Saville7f856802009-06-09 10:23:37 -07002888 * RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002889 *
2890 * Called when network state, operator name, or GPRS state has changed
2891 * Basically on, +CREG and +CGREG
2892 *
2893 * Callee will invoke the following requests on main thread:
2894 *
2895 * RIL_REQUEST_REGISTRATION_STATE
2896 * RIL_REQUEST_GPRS_REGISTRATION_STATE
2897 * RIL_REQUEST_OPERATOR
2898 *
2899 * "data" is NULL
2900 *
2901 * FIXME should this happen when SIM records are loaded? (eg, for
2902 * EONS)
2903 */
2904#define RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 1002
2905
2906/**
2907 * RIL_UNSOL_RESPONSE_NEW_SMS
2908 *
2909 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07002910 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002911 * "data" is const char *
2912 * This is a pointer to a string containing the PDU of an SMS-DELIVER
2913 * as an ascii string of hex digits. The PDU starts with the SMSC address
2914 * per TS 27.005 (+CMT:)
2915 *
2916 * Callee will subsequently confirm the receipt of thei SMS with a
2917 * RIL_REQUEST_SMS_ACKNOWLEDGE
2918 *
Wink Saville7f856802009-06-09 10:23:37 -07002919 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002920 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
2921 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
2922 */
2923
2924#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
2925
2926/**
2927 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
2928 *
2929 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07002930 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002931 * "data" is const char *
2932 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
2933 * as an ascii string of hex digits. The PDU starts with the SMSC address
2934 * per TS 27.005 (+CDS:).
2935 *
2936 * Callee will subsequently confirm the receipt of the SMS with a
2937 * RIL_REQUEST_SMS_ACKNOWLEDGE
2938 *
Wink Saville7f856802009-06-09 10:23:37 -07002939 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002940 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
2941 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
2942 */
2943
2944#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
2945
2946/**
2947 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
2948 *
2949 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07002950 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002951 * "data" is const int *
2952 * ((const int *)data)[0] contains the slot index on the SIM that contains
2953 * the new message
2954 */
2955
2956#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
2957
2958/**
2959 * RIL_UNSOL_ON_USSD
2960 *
2961 * Called when a new USSD message is received.
2962 *
2963 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07002964 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002965 * one of these string values:
2966 * "0" USSD-Notify -- text in ((const char **)data)[1]
2967 * "1" USSD-Request -- text in ((const char **)data)[1]
2968 * "2" Session terminated by network
2969 * "3" other local client (eg, SIM Toolkit) has responded
2970 * "4" Operation not supported
2971 * "5" Network timeout
2972 *
2973 * The USSD session is assumed to persist if the type code is "1", otherwise
2974 * the current session (if any) is assumed to have terminated.
2975 *
2976 * ((const char **)data)[1] points to a message string if applicable, which
2977 * should always be in UTF-8.
2978 */
2979#define RIL_UNSOL_ON_USSD 1006
2980/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
2981
2982/**
2983 * RIL_UNSOL_ON_USSD_REQUEST
2984 *
2985 * Obsolete. Send via RIL_UNSOL_ON_USSD
2986 */
Wink Saville7f856802009-06-09 10:23:37 -07002987#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002988
2989
2990/**
2991 * RIL_UNSOL_NITZ_TIME_RECEIVED
2992 *
2993 * Called when radio has received a NITZ time message
2994 *
2995 * "data" is const char * pointing to NITZ time string
2996 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
2997 */
2998#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
2999
3000/**
3001 * RIL_UNSOL_SIGNAL_STRENGTH
3002 *
3003 * Radio may report signal strength rather han have it polled.
3004 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003005 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003006 */
3007#define RIL_UNSOL_SIGNAL_STRENGTH 1009
3008
3009
3010/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003011 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003012 *
3013 * Indicate a PDP context state has changed, or a new context
3014 * has been activated or deactivated
Wink Savillef4c4d362009-04-02 01:37:03 -07003015 * replaces RIL_UNSOL_PDP_CONTEXT_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003016 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003017 * "data" is an array of RIL_Data_Call_Response identical to that
3018 * returned by RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003019 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003020 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003021 */
3022
Wink Savillef4c4d362009-04-02 01:37:03 -07003023#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003024
3025/**
3026 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
3027 *
3028 * Reports supplementary service related notification from the network.
3029 *
3030 * "data" is a const RIL_SuppSvcNotification *
3031 *
3032 */
3033
3034#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
3035
3036/**
3037 * RIL_UNSOL_STK_SESSION_END
3038 *
3039 * Indicate when STK session is terminated by SIM.
3040 *
3041 * "data" is NULL
3042 */
3043#define RIL_UNSOL_STK_SESSION_END 1012
3044
3045/**
3046 * RIL_UNSOL_STK_PROACTIVE_COMMAND
3047 *
3048 * Indicate when SIM issue a STK proactive command to applications
3049 *
3050 * "data" is a const char * containing SAT/USAT proactive command
3051 * in hexadecimal format string starting with command tag
3052 *
3053 */
3054#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
3055
3056/**
3057 * RIL_UNSOL_STK_EVENT_NOTIFY
3058 *
3059 * Indicate when SIM notifies applcations some event happens.
3060 * Generally, application does not need to have any feedback to
3061 * SIM but shall be able to indicate appropriate messages to users.
3062 *
3063 * "data" is a const char * containing SAT/USAT commands or responses
3064 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
3065 * starting with first byte of response data or command tag
3066 *
3067 */
3068#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
3069
3070/**
3071 * RIL_UNSOL_STK_CALL_SETUP
3072 *
3073 * Indicate when SIM wants application to setup a voice call.
3074 *
3075 * "data" is const int *
3076 * ((const int *)data)[0] contains timeout value (in milliseconds)
3077 */
3078#define RIL_UNSOL_STK_CALL_SETUP 1015
3079
3080/**
3081 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
3082 *
3083 * Indicates that SMS storage on the SIM is full. Sent when the network
3084 * attempts to deliver a new SMS message. Messages cannot be saved on the
3085 * SIM until space is freed. In particular, incoming Class 2 messages
3086 * cannot be stored.
3087 *
3088 * "data" is null
3089 *
3090 */
3091#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
3092
3093/**
3094 * RIL_UNSOL_SIM_REFRESH
3095 *
3096 * Indicates that file(s) on the SIM have been updated, or the SIM
3097 * has been reinitialized.
3098 *
3099 * "data" is an int *
3100 * ((int *)data)[0] is a RIL_SimRefreshResult.
3101 * ((int *)data)[1] is the EFID of the updated file if the result is
3102 * SIM_FILE_UPDATE or NULL for any other result.
3103 *
3104 * Note: If the radio state changes as a result of the SIM refresh (eg,
3105 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3106 * should be sent.
3107 */
3108#define RIL_UNSOL_SIM_REFRESH 1017
3109
3110/**
3111 * RIL_UNSOL_CALL_RING
3112 *
3113 * Ring indication for an incoming call (eg, RING or CRING event).
3114 *
Wink Saville3d54e742009-05-18 18:00:44 -07003115 * "data" is null for GSM
3116 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003117 */
3118#define RIL_UNSOL_CALL_RING 1018
3119
The Android Open Source Project34a51082009-03-05 14:34:37 -08003120/**
3121 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
3122 *
3123 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07003124 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003125 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07003126
The Android Open Source Project34a51082009-03-05 14:34:37 -08003127 * "data" is null
3128 */
3129#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
3130
3131/**
3132 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3133 *
3134 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07003135 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003136 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07003137 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003138 * Callee will subsequently confirm the receipt of the SMS with
3139 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07003140 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003141 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
3142 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07003143 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003144 */
3145#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
3146
3147/**
3148 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
3149 *
3150 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07003151 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003152 * "data" is const char * of 88 bytes which indicates each page
3153 * of a CBS Message sent to the MS by the BTS as coded in 3GPP
3154 * 23.041 Section 9.4.1.1
Wink Savillef4c4d362009-04-02 01:37:03 -07003155 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003156 */
3157#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07003158
The Android Open Source Project34a51082009-03-05 14:34:37 -08003159/**
3160 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
3161 *
3162 * Indicates that SMS storage on the RUIM is full. Messages
3163 * cannot be saved on the RUIM until space is freed.
3164 *
3165 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07003166 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003167 */
Wink Savillef4c4d362009-04-02 01:37:03 -07003168#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
3169
The Android Open Source Project34a51082009-03-05 14:34:37 -08003170/**
3171 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
3172 *
3173 * Indicates a restricted state change (eg, for Domain Specific Access Control).
3174 *
3175 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
3176 *
3177 * "data" is an int *
3178 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
3179 */
3180#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
3181
Wink Saville1b5fd232009-04-22 14:50:00 -07003182/**
3183 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
3184 *
3185 * Indicates that the radio system selection module has
3186 * autonomously entered emergency callback mode.
3187 *
3188 * "data" is null
3189 *
3190 */
3191#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08003192
Wink Saville1b5fd232009-04-22 14:50:00 -07003193/**
3194 * RIL_UNSOL_CDMA_CALL_WAITING
3195 *
3196 * Called when CDMA radio receives a call waiting indication.
3197 *
3198 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07003199 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003200 */
3201#define RIL_UNSOL_CDMA_CALL_WAITING 1025
3202
3203/**
3204 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
3205 *
3206 * Called when CDMA radio receives an update of the progress of an
3207 * OTASP/OTAPA call.
3208 *
3209 * "data" is const int *
3210 * For CDMA this is an integer OTASP/OTAPA status listed in
3211 * RIL_CDMA_OTA_ProvisionStatus.
3212 *
3213 */
3214#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
3215
3216/**
3217 * RIL_UNSOL_CDMA_INFO_REC
3218 *
3219 * Called when CDMA radio receives one or more info recs.
3220 *
3221 * "data" is const RIL_CDMA_InformationRecords *
3222 *
3223 */
3224#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08003225
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07003226/**
3227 * RIL_UNSOL_OEM_HOOK_RAW
3228 *
3229 * This is for OEM specific use.
3230 *
3231 * "data" is a byte[]
3232 */
3233#define RIL_UNSOL_OEM_HOOK_RAW 1028
3234
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003235/***********************************************************************/
3236
3237
3238/**
3239 * RIL_Request Function pointer
3240 *
3241 * @param request is one of RIL_REQUEST_*
3242 * @param data is pointer to data defined for that RIL_REQUEST_*
3243 * data is owned by caller, and should not be modified or freed by callee
3244 * @param t should be used in subsequent call to RIL_onResponse
3245 * @param datalen the length of data
3246 *
3247 */
Wink Saville7f856802009-06-09 10:23:37 -07003248typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003249 size_t datalen, RIL_Token t);
3250
3251/**
3252 * This function should return the current radio state synchronously
3253 */
3254typedef RIL_RadioState (*RIL_RadioStateRequest)();
3255
3256/**
3257 * This function returns "1" if the specified RIL_REQUEST code is
3258 * supported and 0 if it is not
3259 *
3260 * @param requestCode is one of RIL_REQUEST codes
3261 */
3262
3263typedef int (*RIL_Supports)(int requestCode);
3264
3265/**
Wink Saville7f856802009-06-09 10:23:37 -07003266 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003267 * thread that calls RIL_RequestFunc--and indicates that a pending
3268 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07003269 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003270 * On cancel, the callee should do its best to abandon the request and
3271 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
3272 *
3273 * Subsequent calls to RIL_onRequestComplete for this request with
3274 * other results will be tolerated but ignored. (That is, it is valid
3275 * to ignore the cancellation request)
3276 *
3277 * RIL_Cancel calls should return immediately, and not wait for cancellation
3278 *
Wink Saville7f856802009-06-09 10:23:37 -07003279 * 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 -08003280 * interface
3281 *
3282 * @param t token wants to be canceled
3283 */
3284
3285typedef void (*RIL_Cancel)(RIL_Token t);
3286
3287typedef void (*RIL_TimedCallback) (void *param);
3288
3289/**
3290 * Return a version string for your RIL implementation
3291 */
3292typedef const char * (*RIL_GetVersion) (void);
3293
3294typedef struct {
3295 int version; /* set to RIL_VERSION */
3296 RIL_RequestFunc onRequest;
3297 RIL_RadioStateRequest onStateRequest;
3298 RIL_Supports supports;
3299 RIL_Cancel onCancel;
3300 RIL_GetVersion getVersion;
3301} RIL_RadioFunctions;
3302
3303#ifdef RIL_SHLIB
3304struct RIL_Env {
3305 /**
3306 * "t" is parameter passed in on previous call to RIL_Notification
3307 * routine.
3308 *
3309 * If "e" != SUCCESS, then response can be null/is ignored
3310 *
Wink Saville7f856802009-06-09 10:23:37 -07003311 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003312 * freed by callee
3313 *
3314 * RIL_onRequestComplete will return as soon as possible
3315 */
Wink Saville7f856802009-06-09 10:23:37 -07003316 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003317 void *response, size_t responselen);
3318
3319 /**
3320 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
3321 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3322 *
3323 * "data" is owned by caller, and should not be modified or freed by callee
3324 */
3325
Wink Saville7f856802009-06-09 10:23:37 -07003326 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003327 size_t datalen);
3328
3329 /**
Wink Saville7f856802009-06-09 10:23:37 -07003330 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003331 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3332 * a relative time value at which the callback is invoked. If relativeTime is
3333 * NULL or points to a 0-filled structure, the callback will be invoked as
3334 * soon as possible
3335 */
3336
Wink Saville7f856802009-06-09 10:23:37 -07003337 void (*RequestTimedCallback) (RIL_TimedCallback callback,
3338 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003339};
3340
3341
Wink Saville7f856802009-06-09 10:23:37 -07003342/**
3343 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003344 * argc and argv will be command line arguments intended for the RIL implementation
3345 * Return NULL on error
3346 *
3347 * @param env is environment point defined as RIL_Env
3348 * @param argc number of arguments
3349 * @param argv list fo arguments
3350 *
3351 */
3352const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
3353
3354#else /* RIL_SHLIB */
3355
3356/**
3357 * Call this once at startup to register notification routine
3358 *
3359 * @param callbacks user-specifed callback function
3360 */
3361void RIL_register (const RIL_RadioFunctions *callbacks);
3362
3363
3364/**
3365 *
3366 * RIL_onRequestComplete will return as soon as possible
3367 *
3368 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07003369 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003370 * @param e error code
3371 * if "e" != SUCCESS, then response can be null/is ignored
3372 * @param response is owned by caller, and should not be modified or
3373 * freed by callee
3374 * @param responselen the length of response in byte
3375 */
Wink Saville7f856802009-06-09 10:23:37 -07003376void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003377 void *response, size_t responselen);
3378
3379/**
3380 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
3381 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3382 * "data" is owned by caller, and should not be modified or freed by callee
3383 * @param datalen the length of data in byte
3384 */
3385
Wink Saville7f856802009-06-09 10:23:37 -07003386void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003387 size_t datalen);
3388
3389
3390/**
Wink Saville7f856802009-06-09 10:23:37 -07003391 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003392 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3393 * a relative time value at which the callback is invoked. If relativeTime is
3394 * NULL or points to a 0-filled structure, the callback will be invoked as
3395 * soon as possible
3396 *
3397 * @param callback user-specifed callback function
3398 * @param param parameter list
3399 * @param relativeTime a relative time value at which the callback is invoked
3400 */
3401
Wink Saville7f856802009-06-09 10:23:37 -07003402void RIL_requestTimedCallback (RIL_TimedCallback callback,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003403 void *param, const struct timeval *relativeTime);
3404
3405
3406#endif /* RIL_SHLIB */
3407
3408#ifdef __cplusplus
3409}
3410#endif
3411
3412#endif /*ANDROID_RIL_H*/