blob: 4bd94424413f12f7824cfa063939527441b33687 [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
Wink Saville74fa3882009-12-22 15:35:41 -080043#define RIL_VERSION 3
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080044
Wink Savillea592eeb2009-05-22 13:26:36 -070045#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
46#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
47
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080048typedef void * RIL_Token;
49
50typedef enum {
51 RIL_E_SUCCESS = 0,
52 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
53 RIL_E_GENERIC_FAILURE = 2,
54 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
55 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
56 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
57 RIL_E_REQUEST_NOT_SUPPORTED = 6,
58 RIL_E_CANCELLED = 7,
59 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
60 call on a Class C GPRS device */
61 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
62 registers in network */
Wink Saville3d54e742009-05-18 18:00:44 -070063 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
64 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
65 shall be retrieved because of SIM or RUIM
Wink Savillef4c4d362009-04-02 01:37:03 -070066 card absent */
Wink Saville3d54e742009-05-18 18:00:44 -070067 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
Wink Savillef4c4d362009-04-02 01:37:03 -070068 location */
jsh602f80f2009-07-10 15:44:37 -070069 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
John Wang75534472010-04-20 15:11:42 -070070 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
71 RIL_E_ILLEGAL_SIM_OR_ME = 15 /* network selection failed due to
72 illegal SIM or ME */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080073} RIL_Errno;
74
75typedef enum {
76 RIL_CALL_ACTIVE = 0,
77 RIL_CALL_HOLDING = 1,
78 RIL_CALL_DIALING = 2, /* MO call only */
79 RIL_CALL_ALERTING = 3, /* MO call only */
80 RIL_CALL_INCOMING = 4, /* MT call only */
81 RIL_CALL_WAITING = 5 /* MT call only */
82} RIL_CallState;
83
84typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -070085 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
86 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
87 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
Wink Saville7f856802009-06-09 10:23:37 -070088 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -070089 personalization locked, or SIM absent */
90 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
91 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
92 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
Wink Saville7f856802009-06-09 10:23:37 -070093 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
Wink Savillef4c4d362009-04-02 01:37:03 -070094 personalization locked, or RUIM absent */
95 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
96 RADIO_STATE_NV_READY = 9 /* Radio is on and the NV interface is available */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080097} RIL_RadioState;
98
Wink Saville74fa3882009-12-22 15:35:41 -080099/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
100typedef enum {
101 RIL_UUS_TYPE1_IMPLICIT = 0,
102 RIL_UUS_TYPE1_REQUIRED = 1,
103 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
104 RIL_UUS_TYPE2_REQUIRED = 3,
105 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
106 RIL_UUS_TYPE3_REQUIRED = 5,
107 RIL_UUS_TYPE3_NOT_REQUIRED = 6
108} RIL_UUS_Type;
109
110/* User-to-User Signaling Information data coding schemes. Possible values for
111 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
112 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
113typedef enum {
114 RIL_UUS_DCS_USP = 0, /* User specified protocol */
115 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
116 RIL_UUS_DCS_X244 = 2, /* X.244 */
117 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
118 convergence function */
119 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
120} RIL_UUS_DCS;
121
122/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
123 * This data is passed in RIL_ExtensionRecord and rec contains this
124 * structure when type is RIL_UUS_INFO_EXT_REC */
125typedef struct {
126 RIL_UUS_Type uusType; /* UUS Type */
127 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
128 int uusLength; /* Length of UUS Data */
129 char * uusData; /* UUS Data */
130} RIL_UUS_Info;
131
132/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
Wink Saville1b5fd232009-04-22 14:50:00 -0700133typedef struct {
134 char isPresent; /* non-zero if signal information record is present */
135 char signalType; /* as defined 3.7.5.5-1 */
136 char alertPitch; /* as defined 3.7.5.5-2 */
137 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
138} RIL_CDMA_SignalInfoRecord;
139
Wink Saville1b5fd232009-04-22 14:50:00 -0700140typedef struct {
141 RIL_CallState state;
142 int index; /* Connection Index for use with, eg, AT+CHLD */
143 int toa; /* type of address, eg 145 = intl */
144 char isMpty; /* nonzero if is mpty call */
145 char isMT; /* nonzero if call is mobile terminated */
146 char als; /* ALS line indicator if available
147 (0 = line 1) */
148 char isVoice; /* nonzero if this is is a voice call */
149 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
150 char * number; /* Remote party number */
151 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
152 char * name; /* Remote party name */
153 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
Wink Saville74fa3882009-12-22 15:35:41 -0800154 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800155} RIL_Call;
156
157typedef struct {
158 int cid; /* Context ID */
Wink Saville1b5fd232009-04-22 14:50:00 -0700159 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800160 char * type; /* X.25, IP, IPV6, etc. */
161 char * apn;
162 char * address;
Wink Savillef4c4d362009-04-02 01:37:03 -0700163} RIL_Data_Call_Response;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800164
165typedef struct {
Tammo Spalink8e3a2ca2009-09-11 11:26:30 +0800166 int messageRef; /* TP-Message-Reference for GSM,
167 and BearerData MessageId for CDMA
168 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800169 char *ackPDU; /* or NULL if n/a */
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -0700170 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
171 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
172 -1 if unknown or not applicable*/
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800173} RIL_SMS_Response;
174
175/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
176typedef struct {
177 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
178 /* 0 = "REC UNREAD" */
179 /* 1 = "REC READ" */
180 /* 2 = "STO UNSENT" */
181 /* 3 = "STO SENT" */
johnwangf8bc1672009-05-14 19:19:47 -0700182 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
183 the TP-layer length is "strlen(pdu)/2". */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800184 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
185 (as expected by TS 27.005) or NULL for default SMSC */
186} RIL_SMS_WriteArgs;
187
188/** Used by RIL_REQUEST_DIAL */
189typedef struct {
190 char * address;
191 int clir;
192 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
193 * clir == 0 on "use subscription default value"
194 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
195 * clir == 2 on "CLIR suppression" (allow CLI presentation)
196 */
Wink Saville74fa3882009-12-22 15:35:41 -0800197 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800198} RIL_Dial;
199
200typedef struct {
201 int command; /* one of the commands listed for TS 27.007 +CRSM*/
202 int fileid; /* EF id */
203 char *path; /* "pathid" from TS 27.007 +CRSM command.
204 Path is in hex asciii format eg "7f205f70"
Wink Saville1b5fd232009-04-22 14:50:00 -0700205 Path must always be provided.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800206 */
207 int p1;
208 int p2;
209 int p3;
210 char *data; /* May be NULL*/
211 char *pin2; /* May be NULL*/
212} RIL_SIM_IO;
213
214typedef struct {
215 int sw1;
216 int sw2;
217 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
218} RIL_SIM_IO_Response;
219
220/* See also com.android.internal.telephony.gsm.CallForwardInfo */
221
222typedef struct {
223 int status; /*
224 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
225 * status 1 = active, 0 = not active
226 *
227 * For RIL_REQUEST_SET_CALL_FORWARD:
228 * status is:
229 * 0 = disable
230 * 1 = enable
231 * 2 = interrogate
232 * 3 = registeration
233 * 4 = erasure
234 */
235
Wink Saville3d54e742009-05-18 18:00:44 -0700236 int reason; /* from TS 27.007 7.11 "reason" */
237 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
238 See table for Android mapping from
239 MMI service code
240 0 means user doesn't input class */
241 int toa; /* "type" from TS 27.007 7.11 */
242 char * number; /* "number" from TS 27.007 7.11. May be NULL */
243 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800244}RIL_CallForwardInfo;
245
246typedef struct {
johnwange0ba6a92009-09-11 19:14:52 -0700247 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
248 * Upper 16 bits is LAC and lower 16 bits
249 * is CID (as described in TS 27.005)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800250 * Primary Scrambling Code (as described in TS 25.331)
Wink Saville7f856802009-06-09 10:23:37 -0700251 * in 9 bits in UMTS
johnwange0ba6a92009-09-11 19:14:52 -0700252 * Valid values are hexadecimal 0x0000 - 0xffffffff.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800253 */
johnwange0ba6a92009-09-11 19:14:52 -0700254 int rssi; /* Received RSSI in GSM,
255 * Level index of CPICH Received Signal Code Power in UMTS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800256 */
257} RIL_NeighboringCell;
258
259/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
260typedef enum {
Naveen Kalla1b3a6fe2010-04-21 16:44:37 -0700261 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800262 CALL_FAIL_NORMAL = 16,
263 CALL_FAIL_BUSY = 17,
264 CALL_FAIL_CONGESTION = 34,
265 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
266 CALL_FAIL_CALL_BARRED = 240,
267 CALL_FAIL_FDN_BLOCKED = 241,
jsh602f80f2009-07-10 15:44:37 -0700268 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
269 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
Wink Saville1b5fd232009-04-22 14:50:00 -0700270 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
271 CALL_FAIL_CDMA_DROP = 1001,
272 CALL_FAIL_CDMA_INTERCEPT = 1002,
273 CALL_FAIL_CDMA_REORDER = 1003,
274 CALL_FAIL_CDMA_SO_REJECT = 1004,
275 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
276 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
277 CALL_FAIL_CDMA_PREEMPTED = 1007,
278 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
279 during emergency callback mode */
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700280 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800281 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
282} RIL_LastCallFailCause;
283
Wink Savillef4c4d362009-04-02 01:37:03 -0700284/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800285typedef enum {
Jaikumar Ganeshd6aa2e32009-05-04 11:09:46 -0700286 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
287 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
288 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
289 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
290 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
291 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
292 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
293 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
294 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
295 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
296 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
297 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
298 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* This and all other cases: retry silently */
299 /* Not mentioned in the specification */
300 PDP_FAIL_REGISTRATION_FAIL = -1,
301 PDP_FAIL_GPRS_REGISTRATION_FAIL = -2,
Wink Savillef4c4d362009-04-02 01:37:03 -0700302} RIL_LastDataCallActivateFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800303
jsh602f80f2009-07-10 15:44:37 -0700304/* See RIL_REQUEST_SETUP_DATA_CALL */
305typedef enum {
306 RIL_DATA_PROFILE_DEFAULT = 0,
307 RIL_DATA_PROFILE_TETHERED = 1,
308 RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */
309} RIL_DataProfile;
310
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800311/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
312typedef struct {
313 int notificationType; /*
314 * 0 = MO intermediate result code
315 * 1 = MT unsolicited result code
316 */
317 int code; /* See 27.007 7.17
318 "code1" for MO
319 "code2" for MT. */
320 int index; /* CUG index. See 27.007 7.17. */
321 int type; /* "type" from 27.007 7.17 (MT only). */
322 char * number; /* "number" from 27.007 7.17
323 (MT only, may be NULL). */
324} RIL_SuppSvcNotification;
325
Wink Savillef4c4d362009-04-02 01:37:03 -0700326#define RIL_CARD_MAX_APPS 8
327
328typedef enum {
329 RIL_CARDSTATE_ABSENT = 0,
330 RIL_CARDSTATE_PRESENT = 1,
331 RIL_CARDSTATE_ERROR = 2
332} RIL_CardState;
333
334typedef enum {
335 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
336 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
Wink Saville7f856802009-06-09 10:23:37 -0700337 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
338 since each app can only have 1 active perso
Wink Savillef4c4d362009-04-02 01:37:03 -0700339 involved */
340 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
341 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
342 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
343 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
344 RIL_PERSOSUBSTATE_SIM_SIM = 7,
345 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
346 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
347 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
348 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
349 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
350 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
351 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
352 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
353 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
354 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
355 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
356 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
357 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
358 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
359 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
360 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
361 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
362} RIL_PersoSubstate;
363
364typedef enum {
365 RIL_APPSTATE_UNKNOWN = 0,
366 RIL_APPSTATE_DETECTED = 1,
367 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
368 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
Wink Saville7f856802009-06-09 10:23:37 -0700369 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
Wink Savillef4c4d362009-04-02 01:37:03 -0700370 when app_state is assigned to this value */
371 RIL_APPSTATE_READY = 5
372} RIL_AppState;
373
374typedef enum {
375 RIL_PINSTATE_UNKNOWN = 0,
376 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
377 RIL_PINSTATE_ENABLED_VERIFIED = 2,
378 RIL_PINSTATE_DISABLED = 3,
379 RIL_PINSTATE_ENABLED_BLOCKED = 4,
380 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
381} RIL_PinState;
382
383typedef enum {
384 RIL_APPTYPE_UNKNOWN = 0,
385 RIL_APPTYPE_SIM = 1,
386 RIL_APPTYPE_USIM = 2,
387 RIL_APPTYPE_RUIM = 3,
388 RIL_APPTYPE_CSIM = 4
389} RIL_AppType;
390
391typedef struct
392{
Wink Saville7f856802009-06-09 10:23:37 -0700393 RIL_AppType app_type;
394 RIL_AppState app_state;
395 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
Wink Savillef4c4d362009-04-02 01:37:03 -0700396 RIL_APPSTATE_SUBSCRIPTION_PERSO */
Wink Saville7f856802009-06-09 10:23:37 -0700397 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
Wink Savillef4c4d362009-04-02 01:37:03 -0700398 0x30, 0x30, 0x30 */
399 char *app_label_ptr; /* null terminated string */
400 int pin1_replaced; /* applicable to USIM and CSIM */
Wink Saville7f856802009-06-09 10:23:37 -0700401 RIL_PinState pin1;
402 RIL_PinState pin2;
Wink Savillef4c4d362009-04-02 01:37:03 -0700403} RIL_AppStatus;
404
405typedef struct
406{
Wink Saville7f856802009-06-09 10:23:37 -0700407 RIL_CardState card_state;
Wink Savillef4c4d362009-04-02 01:37:03 -0700408 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
409 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
410 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
411 int num_applications; /* value <= RIL_CARD_MAX_APPS */
412 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
413} RIL_CardStatus;
414
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800415/* The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH */
416typedef enum {
417 /* A file on SIM has been updated. data[1] contains the EFID. */
418 SIM_FILE_UPDATE = 0,
419 /* SIM initialized. All files should be re-read. */
420 SIM_INIT = 1,
421 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
422 SIM_RESET = 2
423} RIL_SimRefreshResult;
424
Wink Saville1b5fd232009-04-22 14:50:00 -0700425typedef struct {
426 char * number; /* Remote party number */
427 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
428 char * name; /* Remote party name */
Wink Saville3d54e742009-05-18 18:00:44 -0700429 RIL_CDMA_SignalInfoRecord signalInfoRecord;
Wink Saville1b5fd232009-04-22 14:50:00 -0700430} RIL_CDMA_CallWaiting;
431
Wink Savillea592eeb2009-05-22 13:26:36 -0700432/**
433 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
434 *
435 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
436 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
437 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
438 * CBM message ID.
439 *
440 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
441 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
442 * and 9.4.4.2.3 for UMTS.
443 * All other values can be treated as empty CBM data coding scheme.
444 *
445 * selected 0 means message types specified in <fromServiceId, toServiceId>
446 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
447 *
448 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
449 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
450 */
Wink Savillef4c4d362009-04-02 01:37:03 -0700451typedef struct {
Wink Savillea592eeb2009-05-22 13:26:36 -0700452 int fromServiceId;
453 int toServiceId;
454 int fromCodeScheme;
455 int toCodeScheme;
456 unsigned char selected;
457} RIL_GSM_BroadcastSmsConfigInfo;
Wink Savillef4c4d362009-04-02 01:37:03 -0700458
The Android Open Source Project34a51082009-03-05 14:34:37 -0800459/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
460#define RIL_RESTRICTED_STATE_NONE 0x00
461/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
462#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
463/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
464#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
Wink Savillea592eeb2009-05-22 13:26:36 -0700465/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
The Android Open Source Project34a51082009-03-05 14:34:37 -0800466#define RIL_RESTRICTED_STATE_CS_ALL 0x04
467/* Block packet data access due to restriction. */
468#define RIL_RESTRICTED_STATE_PS_ALL 0x10
469
Wink Saville1b5fd232009-04-22 14:50:00 -0700470/* The status for an OTASP/OTAPA session */
471typedef enum {
472 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
473 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
474 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
475 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
476 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
477 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
478 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
479 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
480 CDMA_OTA_PROVISION_STATUS_COMMITTED,
481 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
482 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
483 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
484} RIL_CDMA_OTA_ProvisionStatus;
485
486typedef struct {
487 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
488 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
489} RIL_GW_SignalStrength;
490
491
492typedef struct {
493 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
494 * multiplied by -1. Example: If the actual RSSI is -75, then this response
495 * value will be 75.
496 */
497 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
498 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
499 * will be 125.
500 */
501} RIL_CDMA_SignalStrength;
502
503
504typedef struct {
505 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
506 * multiplied by -1. Example: If the actual RSSI is -75, then this response
507 * value will be 75.
508 */
509 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
510 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
511 * will be 125.
512 */
513 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
514} RIL_EVDO_SignalStrength;
515
516
517typedef struct {
518 RIL_GW_SignalStrength GW_SignalStrength;
519 RIL_CDMA_SignalStrength CDMA_SignalStrength;
520 RIL_EVDO_SignalStrength EVDO_SignalStrength;
521} RIL_SignalStrength;
522
523/* Names of the CDMA info records (C.S0005 section 3.7.5) */
524typedef enum {
525 RIL_CDMA_DISPLAY_INFO_REC,
526 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
527 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
528 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
529 RIL_CDMA_SIGNAL_INFO_REC,
530 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
531 RIL_CDMA_LINE_CONTROL_INFO_REC,
532 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
533 RIL_CDMA_T53_CLIR_INFO_REC,
534 RIL_CDMA_T53_RELEASE_INFO_REC,
535 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
536} RIL_CDMA_InfoRecName;
537
538/* Display Info Rec as defined in C.S0005 section 3.7.5.1
539 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
540 Note: the Extended Display info rec contains multiple records of the
541 form: display_tag, display_len, and display_len occurrences of the
542 chari field if the display_tag is not 10000000 or 10000001.
543 To save space, the records are stored consecutively in a byte buffer.
544 The display_tag, display_len and chari fields are all 1 byte.
545*/
546
547typedef struct {
548 char alpha_len;
Wink Savillea592eeb2009-05-22 13:26:36 -0700549 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -0700550} RIL_CDMA_DisplayInfoRecord;
551
552/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
553 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
554 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
555*/
556
557typedef struct {
558 char len;
Wink Savillea592eeb2009-05-22 13:26:36 -0700559 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
Wink Saville1b5fd232009-04-22 14:50:00 -0700560 char number_type;
561 char number_plan;
562 char pi;
563 char si;
564} RIL_CDMA_NumberInfoRecord;
565
566/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
567typedef enum {
568 RIL_REDIRECTING_REASON_UNKNOWN = 0,
569 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
570 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
571 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
572 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
573 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
574 RIL_REDIRECTING_REASON_RESERVED
575} RIL_CDMA_RedirectingReason;
576
577typedef struct {
578 RIL_CDMA_NumberInfoRecord redirectingNumber;
579 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
580 RIL_CDMA_RedirectingReason redirectingReason;
581} RIL_CDMA_RedirectingNumberInfoRecord;
582
583/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
584typedef struct {
585 char lineCtrlPolarityIncluded;
586 char lineCtrlToggle;
587 char lineCtrlReverse;
588 char lineCtrlPowerDenial;
589} RIL_CDMA_LineControlInfoRecord;
590
591/* T53 CLIR Information Record */
592typedef struct {
593 char cause;
594} RIL_CDMA_T53_CLIRInfoRecord;
595
596/* T53 Audio Control Information Record */
597typedef struct {
598 char upLink;
599 char downLink;
600} RIL_CDMA_T53_AudioControlInfoRecord;
601
602typedef struct {
603
604 RIL_CDMA_InfoRecName name;
605
606 union {
607 /* Display and Extended Display Info Rec */
608 RIL_CDMA_DisplayInfoRecord display;
609
610 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
611 RIL_CDMA_NumberInfoRecord number;
612
613 /* Signal Info Rec */
614 RIL_CDMA_SignalInfoRecord signal;
615
616 /* Redirecting Number Info Rec */
617 RIL_CDMA_RedirectingNumberInfoRecord redir;
618
619 /* Line Control Info Rec */
620 RIL_CDMA_LineControlInfoRecord lineCtrl;
621
622 /* T53 CLIR Info Rec */
623 RIL_CDMA_T53_CLIRInfoRecord clir;
624
625 /* T53 Audio Control Info Rec */
626 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
627 } rec;
628} RIL_CDMA_InformationRecord;
629
630#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
631
632typedef struct {
633 char numberOfInfoRecs;
634 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
635} RIL_CDMA_InformationRecords;
636
Wink Saville7f856802009-06-09 10:23:37 -0700637/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800638 * RIL_REQUEST_GET_SIM_STATUS
639 *
640 * Requests status of the SIM interface and the SIM card
Wink Saville7f856802009-06-09 10:23:37 -0700641 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800642 * "data" is NULL
643 *
Wink Savillef4c4d362009-04-02 01:37:03 -0700644 * "response" is const RIL_CardStatus *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800645 *
646 * Valid errors:
647 * Must never fail
648 */
649#define RIL_REQUEST_GET_SIM_STATUS 1
650
651/**
652 * RIL_REQUEST_ENTER_SIM_PIN
653 *
John Wang309ac292009-07-30 14:53:23 -0700654 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800655 *
656 * "data" is const char **
657 * ((const char **)data)[0] is PIN value
658 *
jsh593c9102009-06-24 16:13:44 -0700659 * "response" is int *
660 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800661 *
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_PIN 2
671
672
673/**
674 * RIL_REQUEST_ENTER_SIM_PUK
675 *
Wink Saville7f856802009-06-09 10:23:37 -0700676 * Supplies SIM PUK and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800677 *
678 * "data" is const char **
679 * ((const char **)data)[0] is PUK value
680 * ((const char **)data)[1] is new PIN value
681 *
jsh593c9102009-06-24 16:13:44 -0700682 * "response" is int *
683 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800684 *
685 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700686 *
687 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800688 * RADIO_NOT_AVAILABLE (radio resetting)
689 * GENERIC_FAILURE
690 * PASSWORD_INCORRECT
691 * (PUK is invalid)
692 */
693
694#define RIL_REQUEST_ENTER_SIM_PUK 3
695
696/**
697 * RIL_REQUEST_ENTER_SIM_PIN2
698 *
699 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
700 * returned as a a failure from a previous operation.
701 *
702 * "data" is const char **
703 * ((const char **)data)[0] is PIN2 value
704 *
jsh593c9102009-06-24 16:13:44 -0700705 * "response" is int *
706 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800707 *
708 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700709 *
710 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800711 * RADIO_NOT_AVAILABLE (radio resetting)
712 * GENERIC_FAILURE
713 * PASSWORD_INCORRECT
714 */
715
716#define RIL_REQUEST_ENTER_SIM_PIN2 4
717
718/**
719 * RIL_REQUEST_ENTER_SIM_PUK2
720 *
Wink Saville7f856802009-06-09 10:23:37 -0700721 * Supplies SIM PUK2 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 PUK2 value
725 * ((const char **)data)[1] is new PIN2 value
726 *
jsh593c9102009-06-24 16:13:44 -0700727 * "response" is int *
728 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800729 *
730 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700731 *
732 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800733 * RADIO_NOT_AVAILABLE (radio resetting)
734 * GENERIC_FAILURE
735 * PASSWORD_INCORRECT
736 * (PUK2 is invalid)
737 */
738
739#define RIL_REQUEST_ENTER_SIM_PUK2 5
740
741/**
742 * RIL_REQUEST_CHANGE_SIM_PIN
743 *
Wink Saville7f856802009-06-09 10:23:37 -0700744 * Supplies old SIM PIN and new PIN.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800745 *
746 * "data" is const char **
747 * ((const char **)data)[0] is old PIN value
748 * ((const char **)data)[1] is new PIN value
749 *
jsh593c9102009-06-24 16:13:44 -0700750 * "response" is int *
751 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800752 *
753 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700754 *
755 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800756 * RADIO_NOT_AVAILABLE (radio resetting)
757 * GENERIC_FAILURE
758 * PASSWORD_INCORRECT
759 * (old PIN is invalid)
Wink Saville7f856802009-06-09 10:23:37 -0700760 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800761 */
762
763#define RIL_REQUEST_CHANGE_SIM_PIN 6
764
765
766/**
767 * RIL_REQUEST_CHANGE_SIM_PIN2
768 *
Wink Saville7f856802009-06-09 10:23:37 -0700769 * Supplies old SIM PIN2 and new PIN2.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800770 *
771 * "data" is const char **
772 * ((const char **)data)[0] is old PIN2 value
773 * ((const char **)data)[1] is new PIN2 value
774 *
jsh593c9102009-06-24 16:13:44 -0700775 * "response" is int *
776 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800777 *
778 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700779 *
780 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800781 * RADIO_NOT_AVAILABLE (radio resetting)
782 * GENERIC_FAILURE
783 * PASSWORD_INCORRECT
784 * (old PIN2 is invalid)
Wink Saville7f856802009-06-09 10:23:37 -0700785 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800786 */
787
788#define RIL_REQUEST_CHANGE_SIM_PIN2 7
789
790/**
791 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
792 *
793 * Requests that network personlization be deactivated
794 *
795 * "data" is const char **
796 * ((const char **)(data))[0]] is network depersonlization code
797 *
jsh593c9102009-06-24 16:13:44 -0700798 * "response" is int *
799 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800800 *
801 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700802 *
803 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800804 * RADIO_NOT_AVAILABLE (radio resetting)
805 * GENERIC_FAILURE
806 * PASSWORD_INCORRECT
807 * (code is invalid)
808 */
809
810#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
811
812/**
Wink Saville7f856802009-06-09 10:23:37 -0700813 * RIL_REQUEST_GET_CURRENT_CALLS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800814 *
815 * Requests current call list
816 *
817 * "data" is NULL
818 *
819 * "response" must be a "const RIL_Call **"
Wink Saville7f856802009-06-09 10:23:37 -0700820 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800821 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700822 *
823 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800824 * RADIO_NOT_AVAILABLE (radio resetting)
825 * GENERIC_FAILURE
826 * (request will be made again in a few hundred msec)
827 */
828
829#define RIL_REQUEST_GET_CURRENT_CALLS 9
830
831
Wink Saville7f856802009-06-09 10:23:37 -0700832/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800833 * RIL_REQUEST_DIAL
834 *
835 * Initiate voice call
836 *
837 * "data" is const RIL_Dial *
838 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -0700839 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800840 * This method is never used for supplementary service codes
841 *
842 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700843 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800844 * RADIO_NOT_AVAILABLE (radio resetting)
845 * GENERIC_FAILURE
846 */
847#define RIL_REQUEST_DIAL 10
848
849/**
850 * RIL_REQUEST_GET_IMSI
851 *
852 * Get the SIM IMSI
853 *
854 * Only valid when radio state is "RADIO_STATE_SIM_READY"
855 *
856 * "data" is NULL
857 * "response" is a const char * containing the IMSI
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_GET_IMSI 11
866
867/**
868 * RIL_REQUEST_HANGUP
869 *
870 * Hang up a specific line (like AT+CHLD=1x)
871 *
Wink Saville7f856802009-06-09 10:23:37 -0700872 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -0700873 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800874 *
875 * "response" is NULL
876 *
877 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700878 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800879 * RADIO_NOT_AVAILABLE (radio resetting)
880 * GENERIC_FAILURE
881 */
882
883#define RIL_REQUEST_HANGUP 12
884
885/**
886 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
887 *
888 * Hang up waiting or held (like AT+CHLD=0)
889 *
890 * "data" is NULL
891 * "response" is NULL
892 *
893 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700894 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800895 * RADIO_NOT_AVAILABLE (radio resetting)
896 * GENERIC_FAILURE
897 */
898
899#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
900
901/**
902 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
903 *
904 * Hang up waiting or held (like AT+CHLD=1)
905 *
906 * "data" is NULL
907 * "response" is NULL
908 *
909 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700910 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800911 * RADIO_NOT_AVAILABLE (radio resetting)
912 * GENERIC_FAILURE
913 */
914
915#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
916
917/**
918 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
919 *
920 * Switch waiting or holding call and active call (like AT+CHLD=2)
921 *
922 * State transitions should be is follows:
923 *
924 * If call 1 is waiting and call 2 is active, then if this re
925 *
926 * BEFORE AFTER
927 * Call 1 Call 2 Call 1 Call 2
928 * ACTIVE HOLDING HOLDING ACTIVE
929 * ACTIVE WAITING HOLDING ACTIVE
930 * HOLDING WAITING HOLDING ACTIVE
931 * ACTIVE IDLE HOLDING IDLE
932 * IDLE IDLE IDLE IDLE
933 *
934 * "data" is NULL
935 * "response" is NULL
936 *
937 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700938 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800939 * RADIO_NOT_AVAILABLE (radio resetting)
940 * GENERIC_FAILURE
941 */
942
943#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
944#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
945
946/**
947 * RIL_REQUEST_CONFERENCE
948 *
949 * Conference holding and active (like AT+CHLD=3)
950
951 * "data" is NULL
952 * "response" is NULL
953 *
954 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700955 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800956 * RADIO_NOT_AVAILABLE (radio resetting)
957 * GENERIC_FAILURE
958 */
959#define RIL_REQUEST_CONFERENCE 16
960
961/**
962 * RIL_REQUEST_UDUB
963 *
Wink Saville7f856802009-06-09 10:23:37 -0700964 * Send UDUB (user determined used busy) to ringing or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800965 * waiting call answer)(RIL_BasicRequest r);
966 *
967 * "data" is NULL
968 * "response" is NULL
969 *
970 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -0700971 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800972 * RADIO_NOT_AVAILABLE (radio resetting)
973 * GENERIC_FAILURE
974 */
975#define RIL_REQUEST_UDUB 17
976
977/**
978 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
979 *
980 * Requests the failure cause code for the most recently terminated call
981 *
982 * "data" is NULL
983 * "response" is a "int *"
Wink Saville1b5fd232009-04-22 14:50:00 -0700984 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
Naveen Kalla03c1edf2009-09-23 11:18:35 -0700985 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
986 * failure reasons are derived from the possible call failure scenarios
987 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800988 *
The Android Open Source Project34a51082009-03-05 14:34:37 -0800989 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
990 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
991 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800992 * If the implementation does not have access to the exact cause codes,
993 * then it should return one of the values listed in RIL_LastCallFailCause,
994 * as the UI layer needs to distinguish these cases for tone generation or
995 * error notification.
996 *
997 * Valid errors:
998 * SUCCESS
999 * RADIO_NOT_AVAILABLE
1000 * GENERIC_FAILURE
1001 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001002 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001003 */
1004#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
1005
1006/**
1007 * RIL_REQUEST_SIGNAL_STRENGTH
1008 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001009 * Requests current signal strength and associated information
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001010 *
1011 * Must succeed if radio is on.
1012 *
1013 * "data" is NULL
Wink Saville1b5fd232009-04-22 14:50:00 -07001014 *
1015 * "response" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001016 *
1017 * Valid errors:
1018 * SUCCESS
1019 * RADIO_NOT_AVAILABLE
1020 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001021#define RIL_REQUEST_SIGNAL_STRENGTH 19
Wink Saville3d54e742009-05-18 18:00:44 -07001022
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001023/**
1024 * RIL_REQUEST_REGISTRATION_STATE
1025 *
1026 * Request current registration state
1027 *
1028 * "data" is NULL
1029 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -07001030 * ((const char **)response)[0] is registration state 0-6,
Wink Saville1b5fd232009-04-22 14:50:00 -07001031 * 0 - Not registered, MT is not currently searching
1032 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001033 * 1 - Registered, home network
Wink Saville1b5fd232009-04-22 14:50:00 -07001034 * 2 - Not registered, but MT is currently searching
1035 * a new operator to register
Wink Savillef4c4d362009-04-02 01:37:03 -07001036 * 3 - Registration denied
1037 * 4 - Unknown
1038 * 5 - Registered, roaming
John Wang7f8ded12010-01-21 15:07:28 -08001039 * 10 - Same as 0, but indicates that emergency calls
1040 * are enabled.
1041 * 12 - Same as 2, but indicates that emergency calls
1042 * are enabled.
1043 * 13 - Same as 3, but indicates that emergency calls
1044 * are enabled.
1045 * 14 - Same as 4, but indicates that emergency calls
1046 * are enabled.
1047 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001048 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1049 * NULL if not.Valid LAC are 0x0000 - 0xffff
1050 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1051 * NULL if not.
1052 * Valid CID are 0x00000000 - 0xffffffff
1053 * In GSM, CID is Cell ID (see TS 27.007)
1054 * in 16 bits
1055 * In UMTS, CID is UMTS Cell Identity
1056 * (see TS 25.331) in 28 bits
Wink Savillef4c4d362009-04-02 01:37:03 -07001057 * ((const char **)response)[3] indicates the available radio technology 0-7,
Wink Saville1b5fd232009-04-22 14:50:00 -07001058 * 0 - Unknown, 1 - GPRS, 2 - EDGE, 3 - UMTS,
1059 * 4 - IS95A, 5 - IS95B, 6 - 1xRTT,
Li Zhe3a63fbc2009-08-04 13:14:34 +08001060 * 7 - EvDo Rev. 0, 8 - EvDo Rev. A,
Naveen Kallabdbc6b02010-04-21 11:10:08 -07001061 * 9 - HSDPA, 10 - HSUPA, 11 - HSPA,
1062 * 12 - EVDO Rev B
Wink Saville1b5fd232009-04-22 14:50:00 -07001063 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1064 * system or NULL if not. Base Station ID in
jsh29be25c2009-07-14 20:18:59 -07001065 * decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07001066 * ((const char **)response)[5] is Base Station latitude if registered on a
1067 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001068 * latitude is a decimal number as specified in
1069 * 3GPP2 C.S0005-A v6.0. It is represented in
1070 * units of 0.25 seconds and ranges from -1296000
1071 * to 1296000, both values inclusive (corresponding
1072 * to a range of -90° to +90°).
Wink Saville1b5fd232009-04-22 14:50:00 -07001073 * ((const char **)response)[6] is Base Station longitude if registered on a
1074 * CDMA system or NULL if not. Base Station
Naveen Kalla36b721c2009-10-13 18:29:41 -07001075 * longitude is a decimal number as specified in
1076 * 3GPP2 C.S0005-A v6.0. It is represented in
1077 * units of 0.25 seconds and ranges from -2592000
1078 * to 2592000, both values inclusive (corresponding
1079 * to a range of -180° to +180°).
Wink Saville1b5fd232009-04-22 14:50:00 -07001080 * ((const char **)response)[7] is concurrent services support indicator if
1081 * registered on a CDMA system 0-1.
1082 * 0 - Concurrent services not supported,
1083 * 1 - Concurrent services supported
1084 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1085 * NULL if not. Valid System ID are 0 - 32767
1086 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1087 * NULL if not. Valid System ID are 0 - 65535
1088 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001089 * on a CDMA or EVDO system or NULL if not. Valid values
Wink Saville1b5fd232009-04-22 14:50:00 -07001090 * are 0-255.
1091 * ((const char **)response)[11] indicates whether the current system is in the
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001092 * PRL if registered on a CDMA or EVDO system or NULL if
Wink Saville1b5fd232009-04-22 14:50:00 -07001093 * not. 0=not in the PRL, 1=in the PRL
1094 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
Naveen Kalla03c1edf2009-09-23 11:18:35 -07001095 * if registered on a CDMA or EVDO system or NULL if not.
Wink Saville1b5fd232009-04-22 14:50:00 -07001096 * Valid values are 0-255.
1097 * ((const char **)response)[13] if registration state is 3 (Registration
1098 * denied) this is an enumerated reason why
jsh602f80f2009-07-10 15:44:37 -07001099 * registration was denied. See 3GPP TS 24.008,
1100 * 10.5.3.6 and Annex G.
1101 * 0 - General
1102 * 1 - Authentication Failure
1103 * 2 - IMSI unknown in HLR
1104 * 3 - Illegal MS
1105 * 4 - Illegal ME
1106 * 5 - PLMN not allowed
1107 * 6 - Location area not allowed
1108 * 7 - Roaming not allowed
1109 * 8 - No Suitable Cells in this Location Area
1110 * 9 - Network failure
jsh29be25c2009-07-14 20:18:59 -07001111 * 10 - Persistent location update reject
jshca5e3472010-06-23 21:53:24 -07001112 * ((const char **)response)[14] is the Primary Scrambling Code of the current
1113 * cell as described in TS 25.331, in hexadecimal
1114 * format, or NULL if unknown or not registered
1115 * to a UMTS network.
Wink Saville1b5fd232009-04-22 14:50:00 -07001116 *
1117 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001118 * as "out of service" in the Android telephony system
1119 *
Wink Saville1b5fd232009-04-22 14:50:00 -07001120 * Registration state 3 can be returned if Location Update Reject
1121 * (with cause 17 - Network Failure) is received repeatedly from the network,
1122 * to facilitate "managed roaming"
1123 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001124 * Valid errors:
1125 * SUCCESS
1126 * RADIO_NOT_AVAILABLE
1127 * GENERIC_FAILURE
1128 */
1129#define RIL_REQUEST_REGISTRATION_STATE 20
1130
1131/**
1132 * RIL_REQUEST_GPRS_REGISTRATION_STATE
1133 *
1134 * Request current GPRS registration state
1135 *
1136 * "data" is NULL
1137 * "response" is a "char **"
Li Zhe3a63fbc2009-08-04 13:14:34 +08001138 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001139 * ((const char **)response)[1] is LAC if registered or NULL if not
1140 * ((const char **)response)[2] is CID if registered or NULL if not
1141 * ((const char **)response)[3] indicates the available radio technology, where:
1142 * 0 == unknown
1143 * 1 == GPRS only
1144 * 2 == EDGE
1145 * 3 == UMTS
Li Zhe3a63fbc2009-08-04 13:14:34 +08001146 * 9 == HSDPA
1147 * 10 == HSUPA
1148 * 11 == HSPA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001149 *
1150 * LAC and CID are in hexadecimal format.
1151 * valid LAC are 0x0000 - 0xffff
1152 * valid CID are 0x00000000 - 0x0fffffff
Wink Saville7f856802009-06-09 10:23:37 -07001153 *
1154 * Please note that registration state 4 ("unknown") is treated
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001155 * as "out of service" in the Android telephony system
1156 *
1157 * Valid errors:
1158 * SUCCESS
1159 * RADIO_NOT_AVAILABLE
1160 * GENERIC_FAILURE
1161 */
1162#define RIL_REQUEST_GPRS_REGISTRATION_STATE 21
1163
1164/**
1165 * RIL_REQUEST_OPERATOR
1166 *
1167 * Request current operator ONS or EONS
1168 *
1169 * "data" is NULL
1170 * "response" is a "const char **"
Wink Saville7f856802009-06-09 10:23:37 -07001171 * ((const char **)response)[0] is long alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001172 * or NULL if unregistered
1173 *
Wink Saville7f856802009-06-09 10:23:37 -07001174 * ((const char **)response)[1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001175 * or NULL if unregistered
1176 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1177 * or NULL if unregistered
Wink Saville7f856802009-06-09 10:23:37 -07001178 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001179 * Valid errors:
1180 * SUCCESS
1181 * RADIO_NOT_AVAILABLE
1182 * GENERIC_FAILURE
1183 */
1184#define RIL_REQUEST_OPERATOR 22
1185
1186/**
1187 * RIL_REQUEST_RADIO_POWER
1188 *
1189 * Toggle radio on and off (for "airplane" mode)
1190 * "data" is int *
1191 * ((int *)data)[0] is > 0 for "Radio On"
1192 * ((int *)data)[0] is == 0 for "Radio Off"
1193 *
1194 * "response" is NULL
1195 *
1196 * Turn radio on if "on" > 0
1197 * Turn radio off if "on" == 0
1198 *
1199 * Valid errors:
1200 * SUCCESS
1201 * RADIO_NOT_AVAILABLE
1202 * GENERIC_FAILURE
1203 */
1204#define RIL_REQUEST_RADIO_POWER 23
1205
1206/**
1207 * RIL_REQUEST_DTMF
1208 *
1209 * Send a DTMF tone
1210 *
1211 * If the implementation is currently playing a tone requested via
1212 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1213 * should be played instead
1214 *
jsh602f80f2009-07-10 15:44:37 -07001215 * "data" is a char * containing a single character with one of 12 values: 0-9,*,#
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001216 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001217 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001218 * FIXME should this block/mute microphone?
1219 * How does this interact with local DTMF feedback?
1220 *
1221 * Valid errors:
1222 * SUCCESS
1223 * RADIO_NOT_AVAILABLE
1224 * GENERIC_FAILURE
1225 *
1226 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1227 *
1228 */
1229#define RIL_REQUEST_DTMF 24
1230
1231/**
1232 * RIL_REQUEST_SEND_SMS
Wink Saville7f856802009-06-09 10:23:37 -07001233 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001234 * Send an SMS message
1235 *
1236 * "data" is const char **
1237 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1238 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1239 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1240 * less the SMSC address
1241 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1242 *
1243 * "response" is a const RIL_SMS_Response *
1244 *
1245 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001246 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001247 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1248 *
1249 * Valid errors:
1250 * SUCCESS
1251 * RADIO_NOT_AVAILABLE
1252 * SMS_SEND_FAIL_RETRY
jsh602f80f2009-07-10 15:44:37 -07001253 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001254 * GENERIC_FAILURE
1255 *
1256 * FIXME how do we specify TP-Message-Reference if we need to resend?
1257 */
1258#define RIL_REQUEST_SEND_SMS 25
1259
1260
1261/**
1262 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
Wink Saville7f856802009-06-09 10:23:37 -07001263 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001264 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1265 * except that more messages are expected to be sent soon. If possible,
1266 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1267 *
1268 * "data" is const char **
1269 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1270 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1271 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1272 * less the SMSC address
1273 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1274 *
1275 * "response" is a const RIL_SMS_Response *
1276 *
1277 * Based on the return error, caller decides to resend if sending sms
Wink Saville7f856802009-06-09 10:23:37 -07001278 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001279 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1280 *
1281 * Valid errors:
1282 * SUCCESS
1283 * RADIO_NOT_AVAILABLE
1284 * SMS_SEND_FAIL_RETRY
1285 * GENERIC_FAILURE
1286 *
1287 */
1288#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1289
1290
1291/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001292 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001293 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001294 * Setup a packet data connection
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001295 *
1296 * "data" is a const char **
Wink Saville7f856802009-06-09 10:23:37 -07001297 * ((const char **)data)[0] indicates whether to setup connection on radio technology CDMA
Wink Savillef4c4d362009-04-02 01:37:03 -07001298 * or GSM/UMTS, 0-1. 0 - CDMA, 1-GSM/UMTS
Wink Saville7f856802009-06-09 10:23:37 -07001299 *
jsh602f80f2009-07-10 15:44:37 -07001300 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
Wink Saville7f856802009-06-09 10:23:37 -07001301 * ((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 -07001302 * override the one in the profile. NULL indicates no APN overrride.
1303 * ((const char **)data)[3] is the username for APN, or NULL
1304 * ((const char **)data)[4] is the password for APN, or NULL
Jaikumar Ganesh920c78f2009-06-04 10:53:15 -07001305 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
1306 * 0 => PAP and CHAP is never performed.
1307 * 1 => PAP may be performed; CHAP is never performed.
1308 * 2 => CHAP may be performed; PAP is never performed.
1309 * 3 => PAP / CHAP may be performed - baseband dependent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001310 *
1311 * "response" is a char **
Wink Saville7f856802009-06-09 10:23:37 -07001312 * ((char **)response)[0] indicating PDP CID, which is generated by RIL. This Connection ID is
Wink Savillef4c4d362009-04-02 01:37:03 -07001313 * used in GSM/UMTS and CDMA
1314 * ((char **)response)[1] indicating the network interface name for GSM/UMTS or CDMA
Wink Saville7f856802009-06-09 10:23:37 -07001315 * ((char **)response)[2] indicating the IP address for this interface for GSM/UMTS
Wink Savillef4c4d362009-04-02 01:37:03 -07001316 * and NULL for CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001317 *
1318 * FIXME may need way to configure QoS settings
Wink Saville3d54e742009-05-18 18:00:44 -07001319 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001320 * replaces RIL_REQUEST_SETUP_DEFAULT_PDP
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001321 *
1322 * Valid errors:
1323 * SUCCESS
1324 * RADIO_NOT_AVAILABLE
1325 * GENERIC_FAILURE
1326 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001327 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001328 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001329#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001330
1331
1332
1333/**
1334 * RIL_REQUEST_SIM_IO
1335 *
1336 * Request SIM I/O operation.
1337 * This is similar to the TS 27.007 "restricted SIM" operation
1338 * where it assumes all of the EF selection will be done by the
1339 * callee.
1340 *
1341 * "data" is a const RIL_SIM_IO *
1342 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1343 * or may specify a PIN2 for operations that require a PIN2 (eg
1344 * updating FDN records)
1345 *
1346 * "response" is a const RIL_SIM_IO_Response *
1347 *
1348 * Arguments and responses that are unused for certain
1349 * values of "command" should be ignored or set to NULL
1350 *
1351 * Valid errors:
1352 * SUCCESS
1353 * RADIO_NOT_AVAILABLE
1354 * GENERIC_FAILURE
1355 * SIM_PIN2
1356 * SIM_PUK2
1357 */
1358#define RIL_REQUEST_SIM_IO 28
1359
1360/**
1361 * RIL_REQUEST_SEND_USSD
1362 *
1363 * Send a USSD message
1364 *
1365 * If a USSD session already exists, the message should be sent in the
1366 * context of that session. Otherwise, a new session should be created.
1367 *
1368 * The network reply should be reported via RIL_UNSOL_ON_USSD
1369 *
1370 * Only one USSD session may exist at a time, and the session is assumed
1371 * to exist until:
1372 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1373 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1374 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1375 *
1376 * "data" is a const char * containing the USSD request in UTF-8 format
1377 * "response" is NULL
1378 *
1379 * Valid errors:
1380 * SUCCESS
1381 * RADIO_NOT_AVAILABLE
jsh602f80f2009-07-10 15:44:37 -07001382 * FDN_CHECK_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001383 * GENERIC_FAILURE
1384 *
1385 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1386 */
1387
1388#define RIL_REQUEST_SEND_USSD 29
1389
1390/**
1391 * RIL_REQUEST_CANCEL_USSD
Wink Saville7f856802009-06-09 10:23:37 -07001392 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001393 * Cancel the current USSD session if one exists
1394 *
1395 * "data" is null
1396 * "response" is NULL
1397 *
1398 * Valid errors:
1399 * SUCCESS
1400 * RADIO_NOT_AVAILABLE
Wink Saville7f856802009-06-09 10:23:37 -07001401 * GENERIC_FAILURE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001402 */
1403
1404#define RIL_REQUEST_CANCEL_USSD 30
1405
Wink Saville7f856802009-06-09 10:23:37 -07001406/**
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001407 * RIL_REQUEST_GET_CLIR
1408 *
1409 * Gets current CLIR status
1410 * "data" is NULL
1411 * "response" is int *
1412 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1413 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
1414 *
1415 * Valid errors:
1416 * SUCCESS
1417 * RADIO_NOT_AVAILABLE
1418 * GENERIC_FAILURE
1419 */
1420#define RIL_REQUEST_GET_CLIR 31
1421
1422/**
1423 * RIL_REQUEST_SET_CLIR
1424 *
1425 * "data" is int *
1426 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1427 *
1428 * "response" is NULL
1429 *
1430 * Valid errors:
1431 * SUCCESS
1432 * RADIO_NOT_AVAILABLE
1433 * GENERIC_FAILURE
1434 */
1435#define RIL_REQUEST_SET_CLIR 32
1436
1437/**
1438 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
1439 *
1440 * "data" is const RIL_CallForwardInfo *
1441 *
1442 * "response" is const RIL_CallForwardInfo **
1443 * "response" points to an array of RIL_CallForwardInfo *'s, one for
1444 * each distinct registered phone number.
1445 *
1446 * For example, if data is forwarded to +18005551212 and voice is forwarded
1447 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
Wink Saville7f856802009-06-09 10:23:37 -07001448 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001449 * If, however, both data and voice are forwarded to +18005551212, then
1450 * a single RIL_CallForwardInfo can be returned with the service class
1451 * set to "data + voice = 3")
1452 *
1453 * Valid errors:
1454 * SUCCESS
1455 * RADIO_NOT_AVAILABLE
1456 * GENERIC_FAILURE
1457 */
1458#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
1459
1460
1461/**
1462 * RIL_REQUEST_SET_CALL_FORWARD
1463 *
1464 * Configure call forward rule
1465 *
1466 * "data" is const RIL_CallForwardInfo *
1467 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001468 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001469 * Valid errors:
1470 * SUCCESS
1471 * RADIO_NOT_AVAILABLE
1472 * GENERIC_FAILURE
1473 */
1474#define RIL_REQUEST_SET_CALL_FORWARD 34
1475
1476
1477/**
1478 * RIL_REQUEST_QUERY_CALL_WAITING
1479 *
1480 * Query current call waiting state
1481 *
1482 * "data" is const int *
1483 * ((const int *)data)[0] is the TS 27.007 service class to query.
1484 * "response" is a const int *
1485 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
1486 *
1487 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
1488 * must follow, with the TS 27.007 service class bit vector of services
1489 * for which call waiting is enabled.
1490 *
Wink Saville7f856802009-06-09 10:23:37 -07001491 * For example, if ((const int *)response)[0] is 1 and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001492 * ((const int *)response)[1] is 3, then call waiting is enabled for data
1493 * and voice and disabled for everything else
1494 *
1495 * Valid errors:
1496 * SUCCESS
1497 * RADIO_NOT_AVAILABLE
1498 * GENERIC_FAILURE
1499 */
1500#define RIL_REQUEST_QUERY_CALL_WAITING 35
1501
1502
1503/**
1504 * RIL_REQUEST_SET_CALL_WAITING
1505 *
1506 * Configure current call waiting state
1507 *
1508 * "data" is const int *
1509 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
1510 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
1511 * services to modify
1512 * "response" is NULL
1513 *
1514 * Valid errors:
1515 * SUCCESS
1516 * RADIO_NOT_AVAILABLE
1517 * GENERIC_FAILURE
1518 */
1519#define RIL_REQUEST_SET_CALL_WAITING 36
1520
1521/**
1522 * RIL_REQUEST_SMS_ACKNOWLEDGE
1523 *
1524 * Acknowledge successful or failed receipt of SMS previously indicated
Wink Saville7f856802009-06-09 10:23:37 -07001525 * via RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001526 *
1527 * "data" is int *
jshb60444e2009-05-29 11:09:17 -07001528 * ((int *)data)[0] is 1 on successful receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001529 * (basically, AT+CNMA=1 from TS 27.005
jshb60444e2009-05-29 11:09:17 -07001530 * is 0 on failed receipt
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001531 * (basically, AT+CNMA=2 from TS 27.005)
jshb60444e2009-05-29 11:09:17 -07001532 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
1533 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
1534 * capacity exceeded) and 0xFF (unspecified error) are
1535 * reported.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001536 *
1537 * "response" is NULL
1538 *
1539 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
1540 *
1541 * Valid errors:
1542 * SUCCESS
1543 * RADIO_NOT_AVAILABLE
1544 * GENERIC_FAILURE
1545 */
1546#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
1547
1548/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001549 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001550 *
1551 * Get the device IMEI, including check digit
1552 *
johnwangf8bc1672009-05-14 19:19:47 -07001553 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001554 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1555 *
1556 * "data" is NULL
1557 * "response" is a const char * containing the IMEI
1558 *
1559 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001560 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001561 * RADIO_NOT_AVAILABLE (radio resetting)
1562 * GENERIC_FAILURE
1563 */
1564
1565#define RIL_REQUEST_GET_IMEI 38
1566
1567/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001568 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001569 *
1570 * Get the device IMEISV, which should be two decimal digits
1571 *
johnwangf8bc1672009-05-14 19:19:47 -07001572 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001573 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1574 *
1575 * "data" is NULL
1576 * "response" is a const char * containing the IMEISV
1577 *
1578 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001579 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001580 * RADIO_NOT_AVAILABLE (radio resetting)
1581 * GENERIC_FAILURE
1582 */
1583
1584#define RIL_REQUEST_GET_IMEISV 39
1585
1586
1587/**
1588 * RIL_REQUEST_ANSWER
1589 *
1590 * Answer incoming call
1591 *
1592 * Will not be called for WAITING calls.
1593 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
1594 * instead
1595 *
1596 * "data" is NULL
1597 * "response" is NULL
1598 *
1599 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001600 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001601 * RADIO_NOT_AVAILABLE (radio resetting)
1602 * GENERIC_FAILURE
1603 */
1604
1605#define RIL_REQUEST_ANSWER 40
1606
1607/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001608 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001609 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001610 * Deactivate packet data connection
1611 * replaces RIL_REQUEST_DEACTIVATE_DEFAULT_PDP
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001612 *
1613 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07001614 * ((char**)data)[0] indicating CID
Wink Saville7f856802009-06-09 10:23:37 -07001615 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001616 * "response" is NULL
1617 *
1618 * Valid errors:
1619 * SUCCESS
1620 * RADIO_NOT_AVAILABLE
1621 * GENERIC_FAILURE
1622 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001623 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001624 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001625#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001626
1627/**
1628 * RIL_REQUEST_QUERY_FACILITY_LOCK
1629 *
1630 * Query the status of a facility lock state
1631 *
1632 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07001633 * ((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 -08001634 * (eg "AO" for BAOC, "SC" for SIM lock)
1635 * ((const char **)data)[1] is the password, or "" if not required
1636 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
1637 * services to query
1638 *
1639 * "response" is an int *
1640 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
Wink Saville7f856802009-06-09 10:23:37 -07001641 * services for which the specified barring facility
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001642 * is active. "0" means "disabled for all"
Wink Saville7f856802009-06-09 10:23:37 -07001643 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001644 *
1645 * Valid errors:
1646 * SUCCESS
1647 * RADIO_NOT_AVAILABLE
1648 * GENERIC_FAILURE
1649 *
1650 */
1651#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
1652
1653/**
1654 * RIL_REQUEST_SET_FACILITY_LOCK
1655 *
1656 * Enable/disable one facility lock
1657 *
1658 * "data" is const char **
1659 *
1660 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1661 * (eg "AO" for BAOC)
1662 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
1663 * ((const char **)data)[2] = password
1664 * ((const char **)data)[3] = string representation of decimal TS 27.007
1665 * service class bit vector. Eg, the string
1666 * "1" means "set this facility for voice services"
1667 *
jsh593c9102009-06-24 16:13:44 -07001668 * "response" is int *
1669 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001670 *
1671 * Valid errors:
1672 * SUCCESS
1673 * RADIO_NOT_AVAILABLE
1674 * GENERIC_FAILURE
1675 *
1676 */
1677#define RIL_REQUEST_SET_FACILITY_LOCK 43
1678
1679/**
1680 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
1681 *
1682 * Change call barring facility password
1683 *
1684 * "data" is const char **
1685 *
1686 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1687 * (eg "AO" for BAOC)
1688 * ((const char **)data)[1] = old password
1689 * ((const char **)data)[2] = new password
1690 *
Wink Saville7f856802009-06-09 10:23:37 -07001691 * "response" is NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001692 *
1693 * Valid errors:
1694 * SUCCESS
1695 * RADIO_NOT_AVAILABLE
1696 * GENERIC_FAILURE
1697 *
1698 */
1699#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
1700
1701/**
1702 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
1703 *
1704 * Query current network selectin mode
1705 *
1706 * "data" is NULL
1707 *
1708 * "response" is int *
1709 * ((const int *)response)[0] is
1710 * 0 for automatic selection
1711 * 1 for manual selection
1712 *
1713 * Valid errors:
1714 * SUCCESS
1715 * RADIO_NOT_AVAILABLE
1716 * GENERIC_FAILURE
1717 *
1718 */
1719#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
1720
1721/**
1722 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
1723 *
1724 * Specify that the network should be selected automatically
1725 *
1726 * "data" is NULL
1727 * "response" is NULL
1728 *
Wink Saville7f856802009-06-09 10:23:37 -07001729 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001730 * and registered
1731 *
1732 * Valid errors:
1733 * SUCCESS
1734 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07001735 * ILLEGAL_SIM_OR_ME
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001736 * GENERIC_FAILURE
1737 *
John Wang75534472010-04-20 15:11:42 -07001738 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
1739 * no retries needed, such as illegal SIM or ME.
1740 * Returns GENERIC_FAILURE for all other causes that might be
1741 * fixed by retries.
1742 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001743 */
1744#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
1745
1746/**
1747 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
1748 *
1749 * Manually select a specified network.
1750 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001751 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
1752 * "response" is NULL
1753 *
Wink Saville7f856802009-06-09 10:23:37 -07001754 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001755 * and registered
1756 *
1757 * Valid errors:
1758 * SUCCESS
1759 * RADIO_NOT_AVAILABLE
John Wang75534472010-04-20 15:11:42 -07001760 * ILLEGAL_SIM_OR_ME
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001761 * GENERIC_FAILURE
1762 *
John Wang75534472010-04-20 15:11:42 -07001763 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
1764 * no retries needed, such as illegal SIM or ME.
1765 * Returns GENERIC_FAILURE for all other causes that might be
1766 * fixed by retries.
1767 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001768 */
1769#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
1770
1771/**
1772 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
1773 *
1774 * Scans for available networks
1775 *
1776 * "data" is NULL
1777 * "response" is const char ** that should be an array of n*4 strings, where
1778 * n is the number of available networks
1779 * For each available network:
1780 *
Wink Saville7f856802009-06-09 10:23:37 -07001781 * ((const char **)response)[n+0] is long alpha ONS or EONS
1782 * ((const char **)response)[n+1] is short alpha ONS or EONS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001783 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
1784 * ((const char **)response)[n+3] is a string value of the status:
1785 * "unknown"
1786 * "available"
1787 * "current"
1788 * "forbidden"
1789 *
Wink Saville7f856802009-06-09 10:23:37 -07001790 * This request must not respond until the new operator is selected
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001791 * and registered
1792 *
1793 * Valid errors:
1794 * SUCCESS
1795 * RADIO_NOT_AVAILABLE
1796 * GENERIC_FAILURE
1797 *
1798 */
1799#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
1800
1801/**
1802 * RIL_REQUEST_DTMF_START
1803 *
Wink Saville7f856802009-06-09 10:23:37 -07001804 * Start playing a DTMF tone. Continue playing DTMF tone until
1805 * RIL_REQUEST_DTMF_STOP is received
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001806 *
1807 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
1808 * it should cancel the previous tone and play the new one.
Wink Saville7f856802009-06-09 10:23:37 -07001809 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001810 * "data" is a char *
1811 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
1812 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001813 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001814 * Valid errors:
1815 * SUCCESS
1816 * RADIO_NOT_AVAILABLE
1817 * GENERIC_FAILURE
1818 *
1819 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
1820 */
1821#define RIL_REQUEST_DTMF_START 49
1822
1823/**
1824 * RIL_REQUEST_DTMF_STOP
1825 *
1826 * Stop playing a currently playing DTMF tone.
Wink Saville7f856802009-06-09 10:23:37 -07001827 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001828 * "data" is NULL
1829 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07001830 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001831 * Valid errors:
1832 * SUCCESS
1833 * RADIO_NOT_AVAILABLE
1834 * GENERIC_FAILURE
1835 *
1836 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
1837 */
1838#define RIL_REQUEST_DTMF_STOP 50
1839
1840/**
1841 * RIL_REQUEST_BASEBAND_VERSION
1842 *
1843 * Return string value indicating baseband version, eg
1844 * response from AT+CGMR
Wink Saville7f856802009-06-09 10:23:37 -07001845 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001846 * "data" is NULL
1847 * "response" is const char * containing version string for log reporting
Wink Saville7f856802009-06-09 10:23:37 -07001848 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001849 * Valid errors:
1850 * SUCCESS
1851 * RADIO_NOT_AVAILABLE
1852 * GENERIC_FAILURE
1853 *
1854 */
1855#define RIL_REQUEST_BASEBAND_VERSION 51
1856
1857/**
1858 * RIL_REQUEST_SEPARATE_CONNECTION
1859 *
1860 * Separate a party from a multiparty call placing the multiparty call
Wink Saville7f856802009-06-09 10:23:37 -07001861 * (less the specified party) on hold and leaving the specified party
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001862 * as the only other member of the current (active) call
1863 *
1864 * Like AT+CHLD=2x
1865 *
1866 * See TS 22.084 1.3.8.2 (iii)
1867 * TS 22.030 6.5.5 "Entering "2X followed by send"
1868 * TS 27.007 "AT+CHLD=2x"
Wink Saville7f856802009-06-09 10:23:37 -07001869 *
1870 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001871 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
1872 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001873 * "response" is NULL
1874 *
1875 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001876 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001877 * RADIO_NOT_AVAILABLE (radio resetting)
1878 * GENERIC_FAILURE
1879 */
1880#define RIL_REQUEST_SEPARATE_CONNECTION 52
1881
1882
1883/**
1884 * RIL_REQUEST_SET_MUTE
1885 *
1886 * Turn on or off uplink (microphone) mute.
1887 *
1888 * Will only be sent while voice call is active.
1889 * Will always be reset to "disable mute" when a new voice call is initiated
1890 *
1891 * "data" is an int *
1892 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
1893 *
1894 * "response" is NULL
1895 *
1896 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001897 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001898 * RADIO_NOT_AVAILABLE (radio resetting)
1899 * GENERIC_FAILURE
1900 */
1901
1902#define RIL_REQUEST_SET_MUTE 53
1903
1904/**
1905 * RIL_REQUEST_GET_MUTE
1906 *
1907 * Queries the current state of the uplink mute setting
1908 *
1909 * "data" is NULL
1910 * "response" is an int *
1911 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
1912 *
1913 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001914 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001915 * RADIO_NOT_AVAILABLE (radio resetting)
1916 * GENERIC_FAILURE
1917 */
1918
1919#define RIL_REQUEST_GET_MUTE 54
1920
1921/**
1922 * RIL_REQUEST_QUERY_CLIP
1923 *
1924 * Queries the status of the CLIP supplementary service
1925 *
1926 * (for MMI code "*#30#")
1927 *
1928 * "data" is NULL
1929 * "response" is an int *
Wink Saville7f856802009-06-09 10:23:37 -07001930 * (int *)response)[0] is 1 for "CLIP provisioned"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001931 * and 0 for "CLIP not provisioned"
Wink Saville7f856802009-06-09 10:23:37 -07001932 * and 2 for "unknown, e.g. no network etc"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001933 *
1934 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001935 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001936 * RADIO_NOT_AVAILABLE (radio resetting)
1937 * GENERIC_FAILURE
1938 */
1939
1940#define RIL_REQUEST_QUERY_CLIP 55
1941
1942/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001943 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
Wink Saville7f856802009-06-09 10:23:37 -07001944 *
1945 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07001946 * context or CDMA data connection active
1947 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001948 *
1949 * "data" is NULL
1950 *
1951 * "response" is a "int *"
1952 * ((int *)response)[0] is an integer cause code defined in TS 24.008
1953 * section 6.1.3.1.3 or close approximation
1954 *
1955 * If the implementation does not have access to the exact cause codes,
Wink Saville7f856802009-06-09 10:23:37 -07001956 * then it should return one of the values listed in
1957 * RIL_LastDataCallActivateFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001958 * cases for error notification
1959 * and potential retries.
1960 *
1961 * Valid errors:
1962 * SUCCESS
1963 * RADIO_NOT_AVAILABLE
1964 * GENERIC_FAILURE
1965 *
1966 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Wink Saville7f856802009-06-09 10:23:37 -07001967 *
1968 */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001969
Wink Savillef4c4d362009-04-02 01:37:03 -07001970#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001971
1972/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001973 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001974 *
1975 * Queries the status of PDP contexts, returning for each
1976 * its CID, whether or not it is active, and its PDP type,
1977 * APN, and PDP adddress.
Wink Savillef4c4d362009-04-02 01:37:03 -07001978 * replaces RIL_REQUEST_PDP_CONTEXT_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001979 *
1980 * "data" is NULL
Wink Savillef4c4d362009-04-02 01:37:03 -07001981 * "response" is an array of RIL_Data_Call_Response
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001982 *
1983 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07001984 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001985 * RADIO_NOT_AVAILABLE (radio resetting)
1986 * GENERIC_FAILURE
1987 */
1988
Wink Savillef4c4d362009-04-02 01:37:03 -07001989#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001990
1991/**
johnwangf8bc1672009-05-14 19:19:47 -07001992 * RIL_REQUEST_RESET_RADIO - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001993 *
1994 * Request a radio reset. The RIL implementation may postpone
1995 * the reset until after this request is responded to if the baseband
1996 * is presently busy.
1997 *
johnwangf8bc1672009-05-14 19:19:47 -07001998 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
1999 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002000 * "data" is NULL
2001 * "response" is NULL
2002 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002003 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002004 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002005 * RADIO_NOT_AVAILABLE (radio resetting)
2006 * GENERIC_FAILURE
johnwangf8bc1672009-05-14 19:19:47 -07002007 * REQUEST_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002008 */
2009
2010#define RIL_REQUEST_RESET_RADIO 58
2011
2012/**
2013 * RIL_REQUEST_OEM_HOOK_RAW
2014 *
2015 * This request reserved for OEM-specific uses. It passes raw byte arrays
2016 * back and forth.
2017 *
Wink Saville7f856802009-06-09 10:23:37 -07002018 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002019 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
2020 *
2021 * "data" is a char * of bytes copied from the byte[] data argument in java
2022 * "response" is a char * of bytes that will returned via the
Wink Saville7f856802009-06-09 10:23:37 -07002023 * caller's "response" Message here:
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002024 * (byte[])(((AsyncResult)response.obj).result)
2025 *
Wink Saville7f856802009-06-09 10:23:37 -07002026 * An error response here will result in
2027 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002028 * (((AsyncResult)response.obj).exception) being an instance of
2029 * com.android.internal.telephony.gsm.CommandException
2030 *
2031 * Valid errors:
2032 * All
2033 */
2034
2035#define RIL_REQUEST_OEM_HOOK_RAW 59
2036
2037/**
2038 * RIL_REQUEST_OEM_HOOK_STRINGS
2039 *
2040 * This request reserved for OEM-specific uses. It passes strings
2041 * back and forth.
2042 *
Wink Saville7f856802009-06-09 10:23:37 -07002043 * It can be invoked on the Java side from
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002044 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
2045 *
2046 * "data" is a const char **, representing an array of null-terminated UTF-8
2047 * strings copied from the "String[] strings" argument to
2048 * invokeOemRilRequestStrings()
2049 *
2050 * "response" is a const char **, representing an array of null-terminated UTF-8
2051 * stings that will be returned via the caller's response message here:
2052 *
2053 * (String[])(((AsyncResult)response.obj).result)
2054 *
Wink Saville7f856802009-06-09 10:23:37 -07002055 * An error response here will result in
2056 * (((AsyncResult)response.obj).result) == null and
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002057 * (((AsyncResult)response.obj).exception) being an instance of
2058 * com.android.internal.telephony.gsm.CommandException
2059 *
2060 * Valid errors:
2061 * All
2062 */
2063
2064#define RIL_REQUEST_OEM_HOOK_STRINGS 60
2065
2066/**
2067 * RIL_REQUEST_SCREEN_STATE
2068 *
2069 * Indicates the current state of the screen. When the screen is off, the
2070 * RIL should notify the baseband to suppress certain notifications (eg,
jsh43265612009-09-29 17:46:11 -07002071 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
2072 * in an effort to conserve power. These notifications should resume when the
2073 * screen is on.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002074 *
2075 * "data" is int *
2076 * ((int *)data)[0] is == 1 for "Screen On"
2077 * ((int *)data)[0] is == 0 for "Screen Off"
2078 *
2079 * "response" is NULL
2080 *
2081 * Valid errors:
2082 * SUCCESS
2083 * GENERIC_FAILURE
2084 */
2085#define RIL_REQUEST_SCREEN_STATE 61
2086
2087
2088/**
2089 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
2090 *
2091 * Enables/disables supplementary service related notifications
2092 * from the network.
2093 *
2094 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2095 *
2096 * "data" is int *
2097 * ((int *)data)[0] is == 1 for notifications enabled
2098 * ((int *)data)[0] is == 0 for notifications disabled
2099 *
2100 * "response" is NULL
2101 *
2102 * Valid errors:
2103 * SUCCESS
2104 * RADIO_NOT_AVAILABLE
2105 * GENERIC_FAILURE
2106 *
2107 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2108 */
2109#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2110
2111/**
2112 * RIL_REQUEST_WRITE_SMS_TO_SIM
2113 *
2114 * Stores a SMS message to SIM memory.
2115 *
2116 * "data" is RIL_SMS_WriteArgs *
2117 *
2118 * "response" is int *
2119 * ((const int *)response)[0] is the record index where the message is stored.
2120 *
2121 * Valid errors:
2122 * SUCCESS
2123 * GENERIC_FAILURE
2124 *
2125 */
2126#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2127
2128/**
2129 * RIL_REQUEST_DELETE_SMS_ON_SIM
2130 *
2131 * Deletes a SMS message from SIM memory.
2132 *
2133 * "data" is int *
2134 * ((int *)data)[0] is the record index of the message to delete.
2135 *
2136 * "response" is NULL
2137 *
2138 * Valid errors:
2139 * SUCCESS
2140 * GENERIC_FAILURE
2141 *
2142 */
2143#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2144
2145/**
2146 * RIL_REQUEST_SET_BAND_MODE
2147 *
2148 * Assign a specified band for RF configuration.
2149 *
2150 * "data" is int *
2151 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2152 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2153 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2154 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2155 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2156 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002157 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2158 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2159 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2160 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2161 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2162 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2163 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2164 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2165 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2166 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2167 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2168 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2169 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002170 *
2171 * "response" is NULL
2172 *
2173 * Valid errors:
2174 * SUCCESS
2175 * RADIO_NOT_AVAILABLE
2176 * GENERIC_FAILURE
2177 */
2178#define RIL_REQUEST_SET_BAND_MODE 65
2179
2180/**
2181 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2182 *
2183 * Query the list of band mode supported by RF.
2184 *
2185 * "data" is NULL
2186 *
2187 * "response" is int *
2188 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2189 * each available band mode.
2190 *
2191 * 0 for "unspecified" (selected by baseband automatically)
2192 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2193 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2194 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2195 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2196 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07002197 * 6 for "Cellular (800-MHz Band)"
2198 * 7 for "PCS (1900-MHz Band)"
2199 * 8 for "Band Class 3 (JTACS Band)"
2200 * 9 for "Band Class 4 (Korean PCS Band)"
2201 * 10 for "Band Class 5 (450-MHz Band)"
2202 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2203 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2204 * 13 for "Band Class 8 (1800-MHz Band)"
2205 * 14 for "Band Class 9 (900-MHz Band)"
2206 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2207 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2208 * 17 for "Band Class 15 (AWS Band)"
2209 * 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002210 *
2211 * Valid errors:
2212 * SUCCESS
2213 * RADIO_NOT_AVAILABLE
2214 * GENERIC_FAILURE
2215 *
2216 * See also: RIL_REQUEST_SET_BAND_MODE
2217 */
2218#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2219
2220/**
2221 * RIL_REQUEST_STK_GET_PROFILE
2222 *
2223 * Requests the profile of SIM tool kit.
2224 * The profile indicates the SAT/USAT features supported by ME.
2225 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2226 *
2227 * "data" is NULL
2228 *
2229 * "response" is a const char * containing SAT/USAT profile
2230 * in hexadecimal format string starting with first byte of terminal profile
2231 *
2232 * Valid errors:
2233 * RIL_E_SUCCESS
2234 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2235 * RIL_E_GENERIC_FAILURE
2236 */
2237#define RIL_REQUEST_STK_GET_PROFILE 67
2238
2239/**
2240 * RIL_REQUEST_STK_SET_PROFILE
2241 *
2242 * Download the STK terminal profile as part of SIM initialization
2243 * procedure
2244 *
2245 * "data" is a const char * containing SAT/USAT profile
2246 * in hexadecimal format string starting with first byte of terminal profile
2247 *
2248 * "response" is NULL
2249 *
2250 * Valid errors:
2251 * RIL_E_SUCCESS
2252 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2253 * RIL_E_GENERIC_FAILURE
2254 */
2255#define RIL_REQUEST_STK_SET_PROFILE 68
2256
2257/**
2258 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2259 *
2260 * Requests to send a SAT/USAT envelope command to SIM.
2261 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2262 *
2263 * "data" is a const char * containing SAT/USAT command
2264 * in hexadecimal format string starting with command tag
2265 *
2266 * "response" is a const char * containing SAT/USAT response
2267 * in hexadecimal format string starting with first byte of response
2268 * (May be NULL)
2269 *
2270 * Valid errors:
2271 * RIL_E_SUCCESS
2272 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2273 * RIL_E_GENERIC_FAILURE
2274 */
2275#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2276
2277/**
2278 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2279 *
2280 * Requests to send a terminal response to SIM for a received
2281 * proactive command
2282 *
2283 * "data" is a const char * containing SAT/USAT response
2284 * in hexadecimal format string starting with first byte of response data
2285 *
2286 * "response" is NULL
2287 *
2288 * Valid errors:
2289 * RIL_E_SUCCESS
2290 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2291 * RIL_E_GENERIC_FAILURE
2292 */
2293#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
2294
2295/**
2296 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
2297 *
2298 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
2299 * been initialized by ME already. (We could see the call has been in the 'call
2300 * list') So, STK application needs to accept/reject the call according as user
2301 * operations.
2302 *
2303 * "data" is int *
2304 * ((int *)data)[0] is > 0 for "accept" the call setup
2305 * ((int *)data)[0] is == 0 for "reject" the call setup
2306 *
2307 * "response" is NULL
2308 *
2309 * Valid errors:
2310 * RIL_E_SUCCESS
2311 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2312 * RIL_E_GENERIC_FAILURE
2313 */
2314#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
2315
2316/**
2317 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
2318 *
2319 * Connects the two calls and disconnects the subscriber from both calls.
Wink Saville7f856802009-06-09 10:23:37 -07002320 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002321 * "data" is NULL
2322 * "response" is NULL
2323 *
2324 * Valid errors:
Wink Saville7f856802009-06-09 10:23:37 -07002325 * SUCCESS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002326 * RADIO_NOT_AVAILABLE (radio resetting)
2327 * GENERIC_FAILURE
2328 */
2329#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
2330
2331/**
2332 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2333 *
2334 * Requests to set the preferred network type for searching and registering
2335 * (CS/PS domain, RAT, and operation mode)
2336 *
2337 * "data" is int *
Wink Saville7f856802009-06-09 10:23:37 -07002338 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002339 * ((int *)data)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002340 * ((int *)data)[0] is == 1 for GSM only
2341 * ((int *)data)[0] is == 2 for WCDMA only
jsh29be25c2009-07-14 20:18:59 -07002342 * ((int *)data)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL)
Wink Savillef4c4d362009-04-02 01:37:03 -07002343 * ((int *)data)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2344 * ((int *)data)[0] is == 5 for CDMA only
2345 * ((int *)data)[0] is == 6 for EvDo only
2346 * ((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 -08002347 *
2348 * "response" is NULL
2349 *
2350 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07002351 * SUCCESS
2352 * RADIO_NOT_AVAILABLE (radio resetting)
2353 * GENERIC_FAILURE
2354 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002355 */
2356#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2357
2358/**
2359 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2360 *
2361 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2362 * for searching and registering
2363 *
2364 * "data" is NULL
2365 *
2366 * "response" is int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002367 * ((int *)response)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002368 * ((int *)response)[0] is == 1 for GSM only
2369 * ((int *)response)[0] is == 2 for WCDMA only
Wink Savillef4c4d362009-04-02 01:37:03 -07002370 * ((int *)response)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL)
2371 * ((int *)response)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2372 * ((int *)response)[0] is == 5 for CDMA only
2373 * ((int *)response)[0] is == 6 for EvDo only
2374 * ((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 -08002375 *
2376 * Valid errors:
2377 * SUCCESS
2378 * RADIO_NOT_AVAILABLE
2379 * GENERIC_FAILURE
2380 *
2381 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2382 */
2383#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2384
2385/**
2386 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2387 *
2388 * Request neighboring cell id in GSM network
2389 *
2390 * "data" is NULL
2391 * "response" must be a " const RIL_NeighboringCell** "
2392 *
2393 * Valid errors:
2394 * SUCCESS
2395 * RADIO_NOT_AVAILABLE
2396 * GENERIC_FAILURE
2397 */
2398#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
2399
2400/**
2401 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Saville3d54e742009-05-18 18:00:44 -07002402 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002403 * Enables/disables network state change notifications due to changes in
jsh43265612009-09-29 17:46:11 -07002404 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
2405 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002406 *
2407 * Note: The RIL implementation should default to "updates enabled"
2408 * when the screen is on and "updates disabled" when the screen is off.
2409 *
2410 * "data" is int *
2411 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
2412 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
2413 *
2414 * "response" is NULL
Wink Saville3d54e742009-05-18 18:00:44 -07002415 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002416 * Valid errors:
2417 * SUCCESS
2418 * RADIO_NOT_AVAILABLE
2419 * GENERIC_FAILURE
2420 *
2421 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2422 */
2423#define RIL_REQUEST_SET_LOCATION_UPDATES 76
2424
Wink Savillef4c4d362009-04-02 01:37:03 -07002425/**
2426 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION
Wink Saville7f856802009-06-09 10:23:37 -07002427 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002428 * Request to set the location where the CDMA subscription shall
2429 * be retrieved
2430 *
2431 * "data" is int *
2432 * ((int *)data)[0] is == 0 from RUIM/SIM (default)
2433 * ((int *)data)[0] is == 1 from NV
2434 *
2435 * "response" is NULL
2436 *
2437 * Valid errors:
2438 * SUCCESS
2439 * RADIO_NOT_AVAILABLE
2440 * GENERIC_FAILURE
2441 * SIM_ABSENT
2442 * SUBSCRIPTION_NOT_AVAILABLE
2443 */
2444#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION 77
2445
2446/**
2447 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07002448 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002449 * Request to set the roaming preferences in CDMA
2450 *
2451 * "data" is int *
2452 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
2453 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2454 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
Wink Saville7f856802009-06-09 10:23:37 -07002455 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002456 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002457 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002458 * Valid errors:
2459 * SUCCESS
2460 * RADIO_NOT_AVAILABLE
2461 * GENERIC_FAILURE
2462 */
2463#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
2464
2465/**
2466 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
Wink Saville7f856802009-06-09 10:23:37 -07002467 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002468 * Request the actual setting of the roaming preferences in CDMA in the modem
2469 *
2470 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002471 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002472 * "response" is int *
2473 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
2474 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2475 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
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#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
2485
2486/**
2487 * RIL_REQUEST_SET_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002488 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002489 * Request to set the TTY mode
2490 *
2491 * "data" is int *
2492 * ((int *)data)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07002493 * ((int *)data)[0] is == 1 for TTY Full
2494 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
2495 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
Wink Saville7f856802009-06-09 10:23:37 -07002496 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002497 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002498 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002499 * Valid errors:
2500 * SUCCESS
2501 * RADIO_NOT_AVAILABLE
2502 * GENERIC_FAILURE
2503 */
2504#define RIL_REQUEST_SET_TTY_MODE 80
2505
2506/**
2507 * RIL_REQUEST_QUERY_TTY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002508 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002509 * Request the setting of TTY mode
2510 *
2511 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002512 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002513 * "response" is int *
2514 * ((int *)response)[0] is == 0 for TTY off
Wink Saville1b5fd232009-04-22 14:50:00 -07002515 * ((int *)response)[0] is == 1 for TTY Full
2516 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
2517 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
Wink Savillef4c4d362009-04-02 01:37:03 -07002518 *
2519 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002520 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002521 * Valid errors:
2522 * SUCCESS
2523 * RADIO_NOT_AVAILABLE
2524 * GENERIC_FAILURE
2525 */
2526#define RIL_REQUEST_QUERY_TTY_MODE 81
2527
2528/**
2529 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
2530 *
2531 * Request to set the preferred voice privacy mode used in voice
2532 * scrambling
2533 *
2534 * "data" is int *
2535 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2536 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07002537 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002538 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002539 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002540 * Valid errors:
2541 * SUCCESS
2542 * RADIO_NOT_AVAILABLE
2543 * GENERIC_FAILURE
2544 */
2545#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
2546
2547/**
2548 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
Wink Saville7f856802009-06-09 10:23:37 -07002549 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002550 * Request the setting of preferred voice privacy mode
2551 *
2552 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002553 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002554 * "response" is int *
2555 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2556 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
Wink Saville7f856802009-06-09 10:23:37 -07002557 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002558 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002559 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002560 * Valid errors:
2561 * SUCCESS
2562 * RADIO_NOT_AVAILABLE
2563 * GENERIC_FAILURE
2564 */
2565#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
2566
2567/**
2568 * RIL_REQUEST_CDMA_FLASH
2569 *
2570 * Send FLASH
2571 *
2572 * "data" is const char *
2573 * ((const char *)data)[0] is a FLASH string
Wink Saville7f856802009-06-09 10:23:37 -07002574 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002575 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002576 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002577 * Valid errors:
2578 * SUCCESS
2579 * RADIO_NOT_AVAILABLE
2580 * GENERIC_FAILURE
2581 *
2582 */
2583#define RIL_REQUEST_CDMA_FLASH 84
2584
2585/**
2586 * RIL_REQUEST_CDMA_BURST_DTMF
2587 *
2588 * Send DTMF string
2589 *
jsh602f80f2009-07-10 15:44:37 -07002590 * "data" is const char **
2591 * ((const char **)data)[0] is a DTMF string
2592 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
2593 * default
2594 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
2595 * default
Wink Saville7f856802009-06-09 10:23:37 -07002596 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002597 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002598 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002599 * Valid errors:
2600 * SUCCESS
2601 * RADIO_NOT_AVAILABLE
2602 * GENERIC_FAILURE
2603 *
2604 */
2605#define RIL_REQUEST_CDMA_BURST_DTMF 85
2606
2607/**
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002608 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
Wink Savillef4c4d362009-04-02 01:37:03 -07002609 *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002610 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
2611 * If the checksum is valid the 20 digit AKEY is written to NV,
2612 * replacing the existing AKEY no matter what it was before.
Wink Savillef4c4d362009-04-02 01:37:03 -07002613 *
2614 * "data" is const char *
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002615 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
2616 * where the last 6 digits are a checksum of the
2617 * first 20, as specified in TR45.AHAG
2618 * "Common Cryptographic Algorithms, Revision D.1
2619 * Section 2.2"
Wink Saville7f856802009-06-09 10:23:37 -07002620 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002621 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002622 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002623 * Valid errors:
2624 * SUCCESS
2625 * RADIO_NOT_AVAILABLE
2626 * GENERIC_FAILURE
2627 *
2628 */
Naveen Kalla03c1edf2009-09-23 11:18:35 -07002629#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
Wink Savillef4c4d362009-04-02 01:37:03 -07002630
2631/**
2632 * RIL_REQUEST_CDMA_SEND_SMS
2633 *
2634 * Send a CDMA SMS message
2635 *
2636 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville7f856802009-06-09 10:23:37 -07002637 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002638 * "response" is a const RIL_SMS_Response *
Wink Saville7f856802009-06-09 10:23:37 -07002639 *
johnwangbfb151b2009-09-11 15:20:38 -07002640 * Based on the return error, caller decides to resend if sending sms
2641 * fails. The CDMA error class is derived as follows,
2642 * SUCCESS is error class 0 (no error)
2643 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
2644 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
2645 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002646 * Valid errors:
2647 * SUCCESS
2648 * RADIO_NOT_AVAILABLE
Wink Saville1b5fd232009-04-22 14:50:00 -07002649 * SMS_SEND_FAIL_RETRY
Wink Savillef4c4d362009-04-02 01:37:03 -07002650 * GENERIC_FAILURE
2651 *
2652 */
2653#define RIL_REQUEST_CDMA_SEND_SMS 87
2654
2655/**
2656 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
2657 *
2658 * Acknowledge the success or failure in the receipt of SMS
2659 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
2660 *
2661 * "data" is const RIL_CDMA_SMS_Ack *
Wink Saville7f856802009-06-09 10:23:37 -07002662 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002663 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002664 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002665 * Valid errors:
2666 * SUCCESS
2667 * RADIO_NOT_AVAILABLE
2668 * GENERIC_FAILURE
2669 *
2670 */
2671#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
2672
2673/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002674 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002675 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002676 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
2677 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002678 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002679 *
2680 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
2681 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
2682 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002683 * Valid errors:
2684 * SUCCESS
2685 * RADIO_NOT_AVAILABLE
2686 * GENERIC_FAILURE
2687 *
2688 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002689#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
Wink Savillef4c4d362009-04-02 01:37:03 -07002690
2691/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002692 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002693 *
2694 * Set GSM/WCDMA Cell Broadcast SMS config
2695 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002696 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
2697 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
2698 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002699 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002700 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002701 * Valid errors:
2702 * SUCCESS
2703 * RADIO_NOT_AVAILABLE
2704 * GENERIC_FAILURE
2705 *
2706 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002707#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
Wink Savillef4c4d362009-04-02 01:37:03 -07002708
2709/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002710 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07002711 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002712* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
Wink Savillef4c4d362009-04-02 01:37:03 -07002713 *
2714 * "data" is const int *
2715 * (const int *)data[0] indicates to activate or turn off the
2716 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
2717 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07002718 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002719 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002720 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002721 * Valid errors:
2722 * SUCCESS
2723 * RADIO_NOT_AVAILABLE
2724 * GENERIC_FAILURE
2725 *
2726 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002727#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
Wink Savillef4c4d362009-04-02 01:37:03 -07002728
2729/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002730 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002731 *
2732 * Request the setting of CDMA Broadcast SMS config
2733 *
2734 * "data" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002735 *
2736 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
2737 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
2738 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002739 * Valid errors:
2740 * SUCCESS
2741 * RADIO_NOT_AVAILABLE
2742 * GENERIC_FAILURE
2743 *
2744 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002745#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
Wink Savillef4c4d362009-04-02 01:37:03 -07002746
2747/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002748 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
Wink Savillef4c4d362009-04-02 01:37:03 -07002749 *
2750 * Set CDMA Broadcast SMS config
2751 *
Wink Savillea592eeb2009-05-22 13:26:36 -07002752 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
2753 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
2754 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002755 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002756 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002757 * Valid errors:
2758 * SUCCESS
2759 * RADIO_NOT_AVAILABLE
2760 * GENERIC_FAILURE
2761 *
2762 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002763#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
Wink Savillef4c4d362009-04-02 01:37:03 -07002764
2765/**
Wink Savillea592eeb2009-05-22 13:26:36 -07002766 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
Wink Savillef4c4d362009-04-02 01:37:03 -07002767 *
2768 * Enable or disable the reception of CDMA Broadcast SMS
2769 *
2770 * "data" is const int *
2771 * (const int *)data[0] indicates to activate or turn off the
2772 * reception of CDMA Broadcast SMS, 0-1,
2773 * 0 - Activate, 1 - Turn off
Wink Savillea592eeb2009-05-22 13:26:36 -07002774 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002775 * "response" is NULL
Wink Savillea592eeb2009-05-22 13:26:36 -07002776 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002777 * Valid errors:
2778 * SUCCESS
2779 * RADIO_NOT_AVAILABLE
2780 * GENERIC_FAILURE
2781 *
2782 */
Wink Savillea592eeb2009-05-22 13:26:36 -07002783#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
Wink Savillef4c4d362009-04-02 01:37:03 -07002784
2785/**
2786 * RIL_REQUEST_CDMA_SUBSCRIPTION
2787 *
2788 * Request the device MDN / H_SID / H_NID.
2789 *
2790 * The request is only allowed when CDMA subscription is available. When CDMA
2791 * subscription is changed, application layer should re-issue the request to
2792 * update the subscription information.
2793 *
2794 * If a NULL value is returned for any of the device id, it means that error
2795 * accessing the device.
2796 *
2797 * "response" is const char **
2798 * ((const char **)response)[0] is MDN if CDMA subscription is available
jsh29be25c2009-07-14 20:18:59 -07002799 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
2800 * CDMA subscription is available, in decimal format
2801 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
2802 * CDMA subscription is available, in decimal format
Wink Saville1b5fd232009-04-22 14:50:00 -07002803 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
Wink Savilled4ee7dc2009-06-05 15:11:30 -07002804 * ((const char **)response)[4] is PRL version if CDMA subscription is available
Wink Savillef4c4d362009-04-02 01:37:03 -07002805 *
2806 * Valid errors:
2807 * SUCCESS
2808 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
2809 */
2810
Wink Savilleeafe79d2009-04-03 18:02:34 -07002811#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07002812
2813/**
2814 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
2815 *
2816 * Stores a CDMA SMS message to RUIM memory.
2817 *
2818 * "data" is RIL_CDMA_SMS_WriteArgs *
2819 *
2820 * "response" is int *
2821 * ((const int *)response)[0] is the record index where the message is stored.
2822 *
2823 * Valid errors:
2824 * SUCCESS
2825 * RADIO_NOT_AVAILABLE
2826 * GENERIC_FAILURE
2827 *
2828 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07002829#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07002830
2831/**
2832 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
2833 *
2834 * Deletes a CDMA SMS message from RUIM memory.
2835 *
2836 * "data" is int *
2837 * ((int *)data)[0] is the record index of the message to delete.
2838 *
2839 * "response" is NULL
2840 *
2841 * Valid errors:
2842 * SUCCESS
2843 * RADIO_NOT_AVAILABLE
2844 * GENERIC_FAILURE
2845 *
2846 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07002847#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07002848
2849/**
2850 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07002851 *
2852 * Request the device ESN / MEID / IMEI / IMEISV.
2853 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002854 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07002855 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07002856 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07002857 *
2858 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07002859 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07002860 *
2861 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07002862 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07002863 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002864 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07002865 * ((const char **)response)[0] is IMEI if GSM subscription is available
2866 * ((const char **)response)[1] is IMEISV if GSM subscription is available
2867 * ((const char **)response)[2] is ESN if CDMA subscription is available
2868 * ((const char **)response)[3] is MEID if CDMA subscription is available
2869 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002870 * Valid errors:
2871 * SUCCESS
2872 * RADIO_NOT_AVAILABLE
2873 * GENERIC_FAILURE
2874 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07002875#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07002876
Wink Saville1b5fd232009-04-22 14:50:00 -07002877/**
2878 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
2879 *
2880 * Request the radio's system selection module to exit emergency
2881 * callback mode. RIL will not respond with SUCCESS until the modem has
2882 * completely exited from Emergency Callback Mode.
2883 *
2884 * "data" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002885 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002886 * "response" is NULL
Wink Saville7f856802009-06-09 10:23:37 -07002887 *
Wink Saville1b5fd232009-04-22 14:50:00 -07002888 * Valid errors:
2889 * SUCCESS
2890 * RADIO_NOT_AVAILABLE
2891 * GENERIC_FAILURE
2892 *
2893 */
2894#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
Wink Savillef4c4d362009-04-02 01:37:03 -07002895
jsh000a9fe2009-05-11 14:52:35 -07002896/**
2897 * RIL_REQUEST_GET_SMSC_ADDRESS
2898 *
2899 * Queries the default Short Message Service Center address on the device.
2900 *
2901 * "data" is NULL
2902 *
2903 * "response" is const char * containing the SMSC address.
2904 *
2905 * Valid errors:
2906 * SUCCESS
2907 * RADIO_NOT_AVAILABLE
2908 * GENERIC_FAILURE
2909 *
2910 */
2911#define RIL_REQUEST_GET_SMSC_ADDRESS 100
2912
2913/**
2914 * RIL_REQUEST_SET_SMSC_ADDRESS
2915 *
2916 * Sets the default Short Message Service Center address on the device.
2917 *
2918 * "data" is const char * containing the SMSC address.
2919 *
2920 * "response" is NULL
2921 *
2922 * Valid errors:
2923 * SUCCESS
2924 * RADIO_NOT_AVAILABLE
2925 * GENERIC_FAILURE
2926 *
2927 */
2928#define RIL_REQUEST_SET_SMSC_ADDRESS 101
2929
jshb60444e2009-05-29 11:09:17 -07002930/**
2931 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
2932 *
2933 * Indicates whether there is storage available for new SMS messages.
2934 *
2935 * "data" is int *
2936 * ((int *)data)[0] is 1 if memory is available for storing new messages
2937 * is 0 if memory capacity is exceeded
2938 *
2939 * "response" is NULL
2940 *
2941 * Valid errors:
2942 * SUCCESS
2943 * RADIO_NOT_AVAILABLE
2944 * GENERIC_FAILURE
2945 *
2946 */
2947#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
2948
Wink Saville2641d5b2009-06-08 17:40:42 -07002949/**
2950 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
2951 *
2952 * Indicates that the StkSerivce is running and is
2953 * ready to receive RIL_UNSOL_STK_XXXXX commands.
2954 *
2955 * "data" is NULL
2956 * "response" is NULL
2957 *
2958 * Valid errors:
2959 * SUCCESS
2960 * RADIO_NOT_AVAILABLE
2961 * GENERIC_FAILURE
2962 *
2963 */
2964#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
2965
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002966/***********************************************************************/
2967
Wink Savillef4c4d362009-04-02 01:37:03 -07002968
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002969#define RIL_UNSOL_RESPONSE_BASE 1000
2970
2971/**
2972 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
2973 *
2974 * Indicate when value of RIL_RadioState has changed.
2975 *
2976 * Callee will invoke RIL_RadioStateRequest method on main thread
2977 *
2978 * "data" is NULL
2979 */
2980
2981#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
2982
2983
2984/**
2985 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
2986 *
2987 * Indicate when call state has changed
2988 *
2989 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
2990 *
2991 * "data" is NULL
2992 *
Wink Saville7f856802009-06-09 10:23:37 -07002993 * Response should be invoked on, for example,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002994 * "RING", "BUSY", "NO CARRIER", and also call state
2995 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
2996 *
2997 * Redundent or extraneous invocations are tolerated
2998 */
2999#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
3000
3001
3002/**
Wink Saville7f856802009-06-09 10:23:37 -07003003 * RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003004 *
3005 * Called when network state, operator name, or GPRS state has changed
3006 * Basically on, +CREG and +CGREG
3007 *
3008 * Callee will invoke the following requests on main thread:
3009 *
3010 * RIL_REQUEST_REGISTRATION_STATE
3011 * RIL_REQUEST_GPRS_REGISTRATION_STATE
3012 * RIL_REQUEST_OPERATOR
3013 *
3014 * "data" is NULL
3015 *
3016 * FIXME should this happen when SIM records are loaded? (eg, for
3017 * EONS)
3018 */
3019#define RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 1002
3020
3021/**
3022 * RIL_UNSOL_RESPONSE_NEW_SMS
3023 *
3024 * Called when new SMS is received.
Wink Saville7f856802009-06-09 10:23:37 -07003025 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003026 * "data" is const char *
3027 * This is a pointer to a string containing the PDU of an SMS-DELIVER
3028 * as an ascii string of hex digits. The PDU starts with the SMSC address
3029 * per TS 27.005 (+CMT:)
3030 *
3031 * Callee will subsequently confirm the receipt of thei SMS with a
3032 * RIL_REQUEST_SMS_ACKNOWLEDGE
3033 *
Wink Saville7f856802009-06-09 10:23:37 -07003034 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003035 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3036 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3037 */
3038
3039#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
3040
3041/**
3042 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
3043 *
3044 * Called when new SMS Status Report is received.
Wink Saville7f856802009-06-09 10:23:37 -07003045 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003046 * "data" is const char *
3047 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
3048 * as an ascii string of hex digits. The PDU starts with the SMSC address
3049 * per TS 27.005 (+CDS:).
3050 *
3051 * Callee will subsequently confirm the receipt of the SMS with a
3052 * RIL_REQUEST_SMS_ACKNOWLEDGE
3053 *
Wink Saville7f856802009-06-09 10:23:37 -07003054 * No new RIL_UNSOL_RESPONSE_NEW_SMS
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003055 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3056 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3057 */
3058
3059#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
3060
3061/**
3062 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
3063 *
3064 * Called when new SMS has been stored on SIM card
Wink Saville7f856802009-06-09 10:23:37 -07003065 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003066 * "data" is const int *
3067 * ((const int *)data)[0] contains the slot index on the SIM that contains
3068 * the new message
3069 */
3070
3071#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
3072
3073/**
3074 * RIL_UNSOL_ON_USSD
3075 *
3076 * Called when a new USSD message is received.
3077 *
3078 * "data" is const char **
Wink Saville7f856802009-06-09 10:23:37 -07003079 * ((const char **)data)[0] points to a type code, which is
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003080 * one of these string values:
3081 * "0" USSD-Notify -- text in ((const char **)data)[1]
3082 * "1" USSD-Request -- text in ((const char **)data)[1]
3083 * "2" Session terminated by network
3084 * "3" other local client (eg, SIM Toolkit) has responded
3085 * "4" Operation not supported
3086 * "5" Network timeout
3087 *
3088 * The USSD session is assumed to persist if the type code is "1", otherwise
3089 * the current session (if any) is assumed to have terminated.
3090 *
3091 * ((const char **)data)[1] points to a message string if applicable, which
3092 * should always be in UTF-8.
3093 */
3094#define RIL_UNSOL_ON_USSD 1006
3095/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
3096
3097/**
3098 * RIL_UNSOL_ON_USSD_REQUEST
3099 *
3100 * Obsolete. Send via RIL_UNSOL_ON_USSD
3101 */
Wink Saville7f856802009-06-09 10:23:37 -07003102#define RIL_UNSOL_ON_USSD_REQUEST 1007
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003103
3104
3105/**
3106 * RIL_UNSOL_NITZ_TIME_RECEIVED
3107 *
3108 * Called when radio has received a NITZ time message
3109 *
3110 * "data" is const char * pointing to NITZ time string
3111 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
3112 */
3113#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
3114
3115/**
3116 * RIL_UNSOL_SIGNAL_STRENGTH
3117 *
3118 * Radio may report signal strength rather han have it polled.
3119 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003120 * "data" is a const RIL_SignalStrength *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003121 */
3122#define RIL_UNSOL_SIGNAL_STRENGTH 1009
3123
3124
3125/**
Wink Savillef4c4d362009-04-02 01:37:03 -07003126 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003127 *
3128 * Indicate a PDP context state has changed, or a new context
3129 * has been activated or deactivated
Wink Savillef4c4d362009-04-02 01:37:03 -07003130 * replaces RIL_UNSOL_PDP_CONTEXT_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003131 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003132 * "data" is an array of RIL_Data_Call_Response identical to that
3133 * returned by RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003134 *
Wink Savillef4c4d362009-04-02 01:37:03 -07003135 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003136 */
3137
Wink Savillef4c4d362009-04-02 01:37:03 -07003138#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003139
3140/**
3141 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
3142 *
3143 * Reports supplementary service related notification from the network.
3144 *
3145 * "data" is a const RIL_SuppSvcNotification *
3146 *
3147 */
3148
3149#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
3150
3151/**
3152 * RIL_UNSOL_STK_SESSION_END
3153 *
3154 * Indicate when STK session is terminated by SIM.
3155 *
3156 * "data" is NULL
3157 */
3158#define RIL_UNSOL_STK_SESSION_END 1012
3159
3160/**
3161 * RIL_UNSOL_STK_PROACTIVE_COMMAND
3162 *
3163 * Indicate when SIM issue a STK proactive command to applications
3164 *
3165 * "data" is a const char * containing SAT/USAT proactive command
3166 * in hexadecimal format string starting with command tag
3167 *
3168 */
3169#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
3170
3171/**
3172 * RIL_UNSOL_STK_EVENT_NOTIFY
3173 *
3174 * Indicate when SIM notifies applcations some event happens.
3175 * Generally, application does not need to have any feedback to
3176 * SIM but shall be able to indicate appropriate messages to users.
3177 *
3178 * "data" is a const char * containing SAT/USAT commands or responses
3179 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
3180 * starting with first byte of response data or command tag
3181 *
3182 */
3183#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
3184
3185/**
3186 * RIL_UNSOL_STK_CALL_SETUP
3187 *
3188 * Indicate when SIM wants application to setup a voice call.
3189 *
3190 * "data" is const int *
3191 * ((const int *)data)[0] contains timeout value (in milliseconds)
3192 */
3193#define RIL_UNSOL_STK_CALL_SETUP 1015
3194
3195/**
3196 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
3197 *
3198 * Indicates that SMS storage on the SIM is full. Sent when the network
3199 * attempts to deliver a new SMS message. Messages cannot be saved on the
3200 * SIM until space is freed. In particular, incoming Class 2 messages
3201 * cannot be stored.
3202 *
3203 * "data" is null
3204 *
3205 */
3206#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
3207
3208/**
3209 * RIL_UNSOL_SIM_REFRESH
3210 *
3211 * Indicates that file(s) on the SIM have been updated, or the SIM
3212 * has been reinitialized.
3213 *
3214 * "data" is an int *
3215 * ((int *)data)[0] is a RIL_SimRefreshResult.
3216 * ((int *)data)[1] is the EFID of the updated file if the result is
3217 * SIM_FILE_UPDATE or NULL for any other result.
3218 *
3219 * Note: If the radio state changes as a result of the SIM refresh (eg,
3220 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3221 * should be sent.
3222 */
3223#define RIL_UNSOL_SIM_REFRESH 1017
3224
3225/**
3226 * RIL_UNSOL_CALL_RING
3227 *
3228 * Ring indication for an incoming call (eg, RING or CRING event).
Wink Saville64533062009-08-28 11:16:03 -07003229 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
3230 * of a call and sending multiple is optional. If the system property
3231 * ro.telephony.call_ring.multiple is false then the upper layers
3232 * will generate the multiple events internally. Otherwise the vendor
3233 * ril must generate multiple RIL_UNSOL_CALL_RING if
3234 * ro.telephony.call_ring.multiple is true or if it is absent.
3235 *
3236 * The rate of these events is controlled by ro.telephony.call_ring.delay
3237 * and has a default value of 3000 (3 seconds) if absent.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003238 *
Wink Saville3d54e742009-05-18 18:00:44 -07003239 * "data" is null for GSM
3240 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003241 */
3242#define RIL_UNSOL_CALL_RING 1018
3243
The Android Open Source Project34a51082009-03-05 14:34:37 -08003244/**
3245 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
3246 *
3247 * Indicates that SIM state changes.
Wink Saville3d54e742009-05-18 18:00:44 -07003248 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003249 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07003250
The Android Open Source Project34a51082009-03-05 14:34:37 -08003251 * "data" is null
3252 */
3253#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
3254
3255/**
3256 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3257 *
3258 * Called when new CDMA SMS is received
Wink Saville3d54e742009-05-18 18:00:44 -07003259 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003260 * "data" is const RIL_CDMA_SMS_Message *
Wink Saville3d54e742009-05-18 18:00:44 -07003261 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003262 * Callee will subsequently confirm the receipt of the SMS with
3263 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Saville3d54e742009-05-18 18:00:44 -07003264 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003265 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
3266 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Saville3d54e742009-05-18 18:00:44 -07003267 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003268 */
3269#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
3270
3271/**
3272 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
3273 *
3274 * Called when new Broadcast SMS is received
Wink Saville7f856802009-06-09 10:23:37 -07003275 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003276 * "data" is const char * of 88 bytes which indicates each page
3277 * of a CBS Message sent to the MS by the BTS as coded in 3GPP
3278 * 23.041 Section 9.4.1.1
Wink Savillef4c4d362009-04-02 01:37:03 -07003279 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003280 */
3281#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07003282
The Android Open Source Project34a51082009-03-05 14:34:37 -08003283/**
3284 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
3285 *
3286 * Indicates that SMS storage on the RUIM is full. Messages
3287 * cannot be saved on the RUIM until space is freed.
3288 *
3289 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07003290 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08003291 */
Wink Savillef4c4d362009-04-02 01:37:03 -07003292#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
3293
The Android Open Source Project34a51082009-03-05 14:34:37 -08003294/**
3295 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
3296 *
3297 * Indicates a restricted state change (eg, for Domain Specific Access Control).
3298 *
3299 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
3300 *
3301 * "data" is an int *
3302 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
3303 */
3304#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
3305
Wink Saville1b5fd232009-04-22 14:50:00 -07003306/**
3307 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
3308 *
3309 * Indicates that the radio system selection module has
3310 * autonomously entered emergency callback mode.
3311 *
3312 * "data" is null
3313 *
3314 */
3315#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
The Android Open Source Project34a51082009-03-05 14:34:37 -08003316
Wink Saville1b5fd232009-04-22 14:50:00 -07003317/**
3318 * RIL_UNSOL_CDMA_CALL_WAITING
3319 *
3320 * Called when CDMA radio receives a call waiting indication.
3321 *
3322 * "data" is const RIL_CDMA_CallWaiting *
Wink Saville7f856802009-06-09 10:23:37 -07003323 *
Wink Saville1b5fd232009-04-22 14:50:00 -07003324 */
3325#define RIL_UNSOL_CDMA_CALL_WAITING 1025
3326
3327/**
3328 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
3329 *
3330 * Called when CDMA radio receives an update of the progress of an
3331 * OTASP/OTAPA call.
3332 *
3333 * "data" is const int *
3334 * For CDMA this is an integer OTASP/OTAPA status listed in
3335 * RIL_CDMA_OTA_ProvisionStatus.
3336 *
3337 */
3338#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
3339
3340/**
3341 * RIL_UNSOL_CDMA_INFO_REC
3342 *
3343 * Called when CDMA radio receives one or more info recs.
3344 *
3345 * "data" is const RIL_CDMA_InformationRecords *
3346 *
3347 */
3348#define RIL_UNSOL_CDMA_INFO_REC 1027
The Android Open Source Project34a51082009-03-05 14:34:37 -08003349
Jaikumar Ganeshaf6ecbf2009-04-29 13:27:51 -07003350/**
3351 * RIL_UNSOL_OEM_HOOK_RAW
3352 *
3353 * This is for OEM specific use.
3354 *
3355 * "data" is a byte[]
3356 */
3357#define RIL_UNSOL_OEM_HOOK_RAW 1028
3358
John Wang5d621da2009-09-18 17:17:48 -07003359/**
3360 * RIL_UNSOL_RINGBACK_TONE
3361 *
3362 * Indicates that nework doesn't have in-band information, need to
3363 * play out-band tone.
3364 *
3365 * "data" is an int *
3366 * ((int *)data)[0] == 0 for stop play ringback tone.
3367 * ((int *)data)[0] == 1 for start play ringback tone.
3368 */
3369#define RIL_UNSOL_RINGBACK_TONE 1029
3370
John Wang5909cf82010-01-29 00:18:54 -08003371/**
3372 * RIL_UNSOL_RESEND_INCALL_MUTE
3373 *
3374 * Indicates that framework/application need reset the uplink mute state.
3375 *
3376 * There may be situations where the mute state becomes out of sync
3377 * between the application and device in some GSM infrastructures.
3378 *
3379 * "data" is null
3380 */
3381#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003382/***********************************************************************/
3383
3384
3385/**
3386 * RIL_Request Function pointer
3387 *
3388 * @param request is one of RIL_REQUEST_*
3389 * @param data is pointer to data defined for that RIL_REQUEST_*
3390 * data is owned by caller, and should not be modified or freed by callee
3391 * @param t should be used in subsequent call to RIL_onResponse
3392 * @param datalen the length of data
3393 *
3394 */
Wink Saville7f856802009-06-09 10:23:37 -07003395typedef void (*RIL_RequestFunc) (int request, void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003396 size_t datalen, RIL_Token t);
3397
3398/**
3399 * This function should return the current radio state synchronously
3400 */
3401typedef RIL_RadioState (*RIL_RadioStateRequest)();
3402
3403/**
3404 * This function returns "1" if the specified RIL_REQUEST code is
3405 * supported and 0 if it is not
3406 *
3407 * @param requestCode is one of RIL_REQUEST codes
3408 */
3409
3410typedef int (*RIL_Supports)(int requestCode);
3411
3412/**
Wink Saville7f856802009-06-09 10:23:37 -07003413 * This function is called from a separate thread--not the
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003414 * thread that calls RIL_RequestFunc--and indicates that a pending
3415 * request should be cancelled.
Wink Saville7f856802009-06-09 10:23:37 -07003416 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003417 * On cancel, the callee should do its best to abandon the request and
3418 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
3419 *
3420 * Subsequent calls to RIL_onRequestComplete for this request with
3421 * other results will be tolerated but ignored. (That is, it is valid
3422 * to ignore the cancellation request)
3423 *
3424 * RIL_Cancel calls should return immediately, and not wait for cancellation
3425 *
Wink Saville7f856802009-06-09 10:23:37 -07003426 * 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 -08003427 * interface
3428 *
3429 * @param t token wants to be canceled
3430 */
3431
3432typedef void (*RIL_Cancel)(RIL_Token t);
3433
3434typedef void (*RIL_TimedCallback) (void *param);
3435
3436/**
3437 * Return a version string for your RIL implementation
3438 */
3439typedef const char * (*RIL_GetVersion) (void);
3440
3441typedef struct {
3442 int version; /* set to RIL_VERSION */
3443 RIL_RequestFunc onRequest;
3444 RIL_RadioStateRequest onStateRequest;
3445 RIL_Supports supports;
3446 RIL_Cancel onCancel;
3447 RIL_GetVersion getVersion;
3448} RIL_RadioFunctions;
3449
3450#ifdef RIL_SHLIB
3451struct RIL_Env {
3452 /**
3453 * "t" is parameter passed in on previous call to RIL_Notification
3454 * routine.
3455 *
3456 * If "e" != SUCCESS, then response can be null/is ignored
3457 *
Wink Saville7f856802009-06-09 10:23:37 -07003458 * "response" is owned by caller, and should not be modified or
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003459 * freed by callee
3460 *
3461 * RIL_onRequestComplete will return as soon as possible
3462 */
Wink Saville7f856802009-06-09 10:23:37 -07003463 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003464 void *response, size_t responselen);
3465
3466 /**
3467 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
3468 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3469 *
3470 * "data" is owned by caller, and should not be modified or freed by callee
3471 */
3472
Wink Saville7f856802009-06-09 10:23:37 -07003473 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003474 size_t datalen);
3475
3476 /**
Wink Saville7f856802009-06-09 10:23:37 -07003477 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003478 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3479 * a relative time value at which the callback is invoked. If relativeTime is
3480 * NULL or points to a 0-filled structure, the callback will be invoked as
3481 * soon as possible
3482 */
3483
Wink Saville7f856802009-06-09 10:23:37 -07003484 void (*RequestTimedCallback) (RIL_TimedCallback callback,
3485 void *param, const struct timeval *relativeTime);
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003486};
3487
3488
Wink Saville7f856802009-06-09 10:23:37 -07003489/**
3490 * RIL implementations must defined RIL_Init
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003491 * argc and argv will be command line arguments intended for the RIL implementation
3492 * Return NULL on error
3493 *
3494 * @param env is environment point defined as RIL_Env
3495 * @param argc number of arguments
3496 * @param argv list fo arguments
3497 *
3498 */
3499const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
3500
3501#else /* RIL_SHLIB */
3502
3503/**
3504 * Call this once at startup to register notification routine
3505 *
3506 * @param callbacks user-specifed callback function
3507 */
3508void RIL_register (const RIL_RadioFunctions *callbacks);
3509
3510
3511/**
3512 *
3513 * RIL_onRequestComplete will return as soon as possible
3514 *
3515 * @param t is parameter passed in on previous call to RIL_Notification
Wink Saville3d54e742009-05-18 18:00:44 -07003516 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003517 * @param e error code
3518 * if "e" != SUCCESS, then response can be null/is ignored
3519 * @param response is owned by caller, and should not be modified or
3520 * freed by callee
3521 * @param responselen the length of response in byte
3522 */
Wink Saville7f856802009-06-09 10:23:37 -07003523void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003524 void *response, size_t responselen);
3525
3526/**
3527 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
3528 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
3529 * "data" is owned by caller, and should not be modified or freed by callee
3530 * @param datalen the length of data in byte
3531 */
3532
Wink Saville7f856802009-06-09 10:23:37 -07003533void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003534 size_t datalen);
3535
3536
3537/**
Wink Saville7f856802009-06-09 10:23:37 -07003538 * Call user-specifed "callback" function on on the same thread that
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003539 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3540 * a relative time value at which the callback is invoked. If relativeTime is
3541 * NULL or points to a 0-filled structure, the callback will be invoked as
3542 * soon as possible
3543 *
3544 * @param callback user-specifed callback function
3545 * @param param parameter list
3546 * @param relativeTime a relative time value at which the callback is invoked
3547 */
3548
Wink Saville7f856802009-06-09 10:23:37 -07003549void RIL_requestTimedCallback (RIL_TimedCallback callback,
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08003550 void *param, const struct timeval *relativeTime);
3551
3552
3553#endif /* RIL_SHLIB */
3554
3555#ifdef __cplusplus
3556}
3557#endif
3558
3559#endif /*ANDROID_RIL_H*/