blob: 1396428682d7afa3c1e1d778cfa9f5a822e622f1 [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
17/*
18 * ISSUES:
19 * - SMS retransmit (specifying TP-Message-ID)
20 *
21 */
22
23/**
24 * TODO
25 *
26 * Supp Service Notification (+CSSN)
27 * GPRS PDP context deactivate notification
28 *
29 */
30
31
32#ifndef ANDROID_RIL_H
33#define ANDROID_RIL_H 1
34
35#include <stdlib.h>
Wink Savillef4c4d362009-04-02 01:37:03 -070036#ifndef FEATURE_UNIT_TEST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080037#include <sys/time.h>
Wink Savillef4c4d362009-04-02 01:37:03 -070038#endif /* !FEATURE_UNIT_TEST */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080039
40#ifdef __cplusplus
41extern "C" {
42#endif
43
44#define RIL_VERSION 2
45
46typedef void * RIL_Token;
47
48typedef enum {
49 RIL_E_SUCCESS = 0,
50 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
51 RIL_E_GENERIC_FAILURE = 2,
52 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
53 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
54 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
55 RIL_E_REQUEST_NOT_SUPPORTED = 6,
56 RIL_E_CANCELLED = 7,
57 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
58 call on a Class C GPRS device */
59 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
60 registers in network */
Wink Savillef4c4d362009-04-02 01:37:03 -070061 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
62 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
63 shall be retrieved because of SIM or RUIM
64 card absent */
65#ifdef FEATURE_MULTIMODE_ANDROID
66 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
67 location */
68 RIL_E_MODE_NOT_SUPPORTED = 13 /* HW does not support preferred network type */
69#endif
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080070} RIL_Errno;
71
72typedef enum {
73 RIL_CALL_ACTIVE = 0,
74 RIL_CALL_HOLDING = 1,
75 RIL_CALL_DIALING = 2, /* MO call only */
76 RIL_CALL_ALERTING = 3, /* MO call only */
77 RIL_CALL_INCOMING = 4, /* MT call only */
78 RIL_CALL_WAITING = 5 /* MT call only */
79} RIL_CallState;
80
81typedef enum {
Wink Savillef4c4d362009-04-02 01:37:03 -070082 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
83 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
84 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
85 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
86 personalization locked, or SIM absent */
87 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
88 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
89 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
90 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
91 personalization locked, or RUIM absent */
92 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
93 RADIO_STATE_NV_READY = 9 /* Radio is on and the NV interface is available */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080094} RIL_RadioState;
95
96typedef struct {
97 RIL_CallState state;
Wink Savillef4c4d362009-04-02 01:37:03 -070098 int index; /* Connection Index for use with, eg, AT+CHLD */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -080099 int toa; /* type of address, eg 145 = intl */
100 char isMpty; /* nonzero if is mpty call */
101 char isMT; /* nonzero if call is mobile terminated */
102 char als; /* ALS line indicator if available
103 (0 = line 1) */
Wink Savillef4c4d362009-04-02 01:37:03 -0700104 char isVoice; /* nonzero if this is is a voice call
105 "p" if the CDMA voice privacy mode is active */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800106
107 char * number; /* phone number */
John Wangff368742009-03-24 17:56:29 -0700108 char numberPresentation; /* 0 = Allowed,
109 1 = Restricted,
110 2 = Not Specified/Unknown,
111 3 = Payphone */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800112} RIL_Call;
113
114typedef struct {
115 int cid; /* Context ID */
116 int active; /* nonzero if context is active */
117 char * type; /* X.25, IP, IPV6, etc. */
118 char * apn;
119 char * address;
Wink Savillef4c4d362009-04-02 01:37:03 -0700120} RIL_Data_Call_Response;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800121
122typedef struct {
123 int messageRef; /*TP-Message-Reference*/
124 char *ackPDU; /* or NULL if n/a */
125} RIL_SMS_Response;
126
127/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
128typedef struct {
129 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
130 /* 0 = "REC UNREAD" */
131 /* 1 = "REC READ" */
132 /* 2 = "STO UNSENT" */
133 /* 3 = "STO SENT" */
134 char * pdu; /* PDU of message to write, as a hex string. */
135 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
136 (as expected by TS 27.005) or NULL for default SMSC */
137} RIL_SMS_WriteArgs;
138
139/** Used by RIL_REQUEST_DIAL */
140typedef struct {
141 char * address;
142 int clir;
143 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
144 * clir == 0 on "use subscription default value"
145 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
146 * clir == 2 on "CLIR suppression" (allow CLI presentation)
147 */
148
149} RIL_Dial;
150
151typedef struct {
152 int command; /* one of the commands listed for TS 27.007 +CRSM*/
153 int fileid; /* EF id */
154 char *path; /* "pathid" from TS 27.007 +CRSM command.
155 Path is in hex asciii format eg "7f205f70"
156 */
157 int p1;
158 int p2;
159 int p3;
160 char *data; /* May be NULL*/
161 char *pin2; /* May be NULL*/
162} RIL_SIM_IO;
163
164typedef struct {
165 int sw1;
166 int sw2;
167 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
168} RIL_SIM_IO_Response;
169
170/* See also com.android.internal.telephony.gsm.CallForwardInfo */
171
172typedef struct {
173 int status; /*
174 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
175 * status 1 = active, 0 = not active
176 *
177 * For RIL_REQUEST_SET_CALL_FORWARD:
178 * status is:
179 * 0 = disable
180 * 1 = enable
181 * 2 = interrogate
182 * 3 = registeration
183 * 4 = erasure
184 */
185
Wink Savillef4c4d362009-04-02 01:37:03 -0700186 int reason; /* from TS 27.007 7.11 "reason" */
187 int serviceClass; /* From 27.007 +CCFC/+CLCK "class"
188 See table for Android mapping from
189 MMI service code
190 0 means user doesn't input class */
191 int toa; /* "type" from TS 27.007 7.11 */
192 char * number; /* "number" from TS 27.007 7.11. May be NULL */
193 int timeSeconds; /* for CF no reply only */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800194}RIL_CallForwardInfo;
195
196typedef struct {
197 char * cid; /* Cell Id (as described in TS 27.005) in 16 bits in GSM
198 * Primary Scrambling Code (as described in TS 25.331)
199 * in 9 bits in UMTS
200 * Valid values are hexadecimal 0x0000 - 0xffff.
201 */
202 int rssi; /* Received RSSI in 2G,
203 * Level index of CPICH Received Signal Code Power in 3G
204 */
205} RIL_NeighboringCell;
206
207/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
208typedef enum {
209 CALL_FAIL_NORMAL = 16,
210 CALL_FAIL_BUSY = 17,
211 CALL_FAIL_CONGESTION = 34,
212 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
213 CALL_FAIL_CALL_BARRED = 240,
214 CALL_FAIL_FDN_BLOCKED = 241,
215 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
216} RIL_LastCallFailCause;
217
Wink Savillef4c4d362009-04-02 01:37:03 -0700218/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800219typedef enum {
220 PDP_FAIL_BARRED = 8, /* no retry; prompt user */
221 PDP_FAIL_BAD_APN = 27, /* no retry; prompt user */
222 PDP_FAIL_USER_AUTHENTICATION = 29, /* no retry; prompt user */
223 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 32, /*no retry; prompt user */
224 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 33, /*no retry; prompt user */
225 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff /* This and all other cases: retry silently */
Wink Savillef4c4d362009-04-02 01:37:03 -0700226} RIL_LastDataCallActivateFailCause;
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800227
228/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
229typedef struct {
230 int notificationType; /*
231 * 0 = MO intermediate result code
232 * 1 = MT unsolicited result code
233 */
234 int code; /* See 27.007 7.17
235 "code1" for MO
236 "code2" for MT. */
237 int index; /* CUG index. See 27.007 7.17. */
238 int type; /* "type" from 27.007 7.17 (MT only). */
239 char * number; /* "number" from 27.007 7.17
240 (MT only, may be NULL). */
241} RIL_SuppSvcNotification;
242
Wink Savillef4c4d362009-04-02 01:37:03 -0700243#define RIL_SIM_ABSENT 0
244#define RIL_SIM_NOT_READY 1
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800245/* RIL_SIM_READY means that the radio state is RADIO_STATE_SIM_READY.
246 * This is more
247 * than "+CPIN: READY". It also means the radio is ready for SIM I/O
248 */
Wink Savillef4c4d362009-04-02 01:37:03 -0700249#define RIL_SIM_READY 2
250#define RIL_SIM_PIN 3
251#define RIL_SIM_PUK 4
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800252#define RIL_SIM_NETWORK_PERSONALIZATION 5
253
Wink Savillef4c4d362009-04-02 01:37:03 -0700254/* see RIL_REQUEST_GET_SIM_STATUS */
255
256#define RIL_CARD_MAX_APPS 8
257
258typedef enum {
259 RIL_CARDSTATE_ABSENT = 0,
260 RIL_CARDSTATE_PRESENT = 1,
261 RIL_CARDSTATE_ERROR = 2
262} RIL_CardState;
263
264typedef enum {
265 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
266 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
267 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
268 since each app can only have 1 active perso
269 involved */
270 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
271 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
272 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
273 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
274 RIL_PERSOSUBSTATE_SIM_SIM = 7,
275 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
276 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
277 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
278 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
279 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
280 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
281 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
282 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
283 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
284 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
285 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
286 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
287 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
288 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
289 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
290 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
291 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
292} RIL_PersoSubstate;
293
294typedef enum {
295 RIL_APPSTATE_UNKNOWN = 0,
296 RIL_APPSTATE_DETECTED = 1,
297 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
298 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
299 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
300 when app_state is assigned to this value */
301 RIL_APPSTATE_READY = 5
302} RIL_AppState;
303
304typedef enum {
305 RIL_PINSTATE_UNKNOWN = 0,
306 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
307 RIL_PINSTATE_ENABLED_VERIFIED = 2,
308 RIL_PINSTATE_DISABLED = 3,
309 RIL_PINSTATE_ENABLED_BLOCKED = 4,
310 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
311} RIL_PinState;
312
313typedef enum {
314 RIL_APPTYPE_UNKNOWN = 0,
315 RIL_APPTYPE_SIM = 1,
316 RIL_APPTYPE_USIM = 2,
317 RIL_APPTYPE_RUIM = 3,
318 RIL_APPTYPE_CSIM = 4
319} RIL_AppType;
320
321typedef struct
322{
323 RIL_AppType app_type;
324 RIL_AppState app_state;
325 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
326 RIL_APPSTATE_SUBSCRIPTION_PERSO */
327 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
328 0x30, 0x30, 0x30 */
329 char *app_label_ptr; /* null terminated string */
330 int pin1_replaced; /* applicable to USIM and CSIM */
331 RIL_PinState pin1;
332 RIL_PinState pin2;
333} RIL_AppStatus;
334
335typedef struct
336{
337 RIL_CardState card_state;
338 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
339 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
340 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
341 int num_applications; /* value <= RIL_CARD_MAX_APPS */
342 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
343} RIL_CardStatus;
344
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800345/* The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH */
346typedef enum {
347 /* A file on SIM has been updated. data[1] contains the EFID. */
348 SIM_FILE_UPDATE = 0,
349 /* SIM initialized. All files should be re-read. */
350 SIM_INIT = 1,
351 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
352 SIM_RESET = 2
353} RIL_SimRefreshResult;
354
Wink Savillef4c4d362009-04-02 01:37:03 -0700355/* Used by RIL_REQUEST_GET_BROADCAST_CONFIG and RIL_REQUEST_SET_BROADCAST_CONFIG */
356
357typedef struct {
358 int uFromServiceID;
359 int uToserviceID;
360 unsigned char bSelected;
361} RIL_BroadcastServiceInfo;
362
363typedef struct {
364 int size;
365 RIL_BroadcastServiceInfo *entries;
366} RIL_BroadcastSMSConfig;
367
368
The Android Open Source Project34a51082009-03-05 14:34:37 -0800369/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
370#define RIL_RESTRICTED_STATE_NONE 0x00
371/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
372#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
373/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
374#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
375/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
376#define RIL_RESTRICTED_STATE_CS_ALL 0x04
377/* Block packet data access due to restriction. */
378#define RIL_RESTRICTED_STATE_PS_ALL 0x10
379
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800380/**
381 * RIL_REQUEST_GET_SIM_STATUS
382 *
383 * Requests status of the SIM interface and the SIM card
384 *
385 * "data" is NULL
386 *
Wink Savillef4c4d362009-04-02 01:37:03 -0700387 * "response" is const RIL_CardStatus *
388
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800389 *
390 * If the radio is off or unavailable, return RIL_SIM_NOT_READY
391 *
392 * Please note: RIL_SIM_READY means that the radio state
393 * is RADIO_STATE_SIM_READY. This is more than "+CPIN: READY".
394 * It also means the radio is ready for SIM I/O
395 *
396 * Valid errors:
397 * Must never fail
398 */
399#define RIL_REQUEST_GET_SIM_STATUS 1
400
401/**
402 * RIL_REQUEST_ENTER_SIM_PIN
403 *
404 * Supplies SIM PIN. Only called if SIM status is RIL_SIM_PIN
405 *
406 * "data" is const char **
407 * ((const char **)data)[0] is PIN value
408 *
409 * "response" must be NULL
410 *
411 * Valid errors:
412 *
413 * SUCCESS
414 * RADIO_NOT_AVAILABLE (radio resetting)
415 * GENERIC_FAILURE
416 * PASSWORD_INCORRECT
417 */
418
419#define RIL_REQUEST_ENTER_SIM_PIN 2
420
421
422/**
423 * RIL_REQUEST_ENTER_SIM_PUK
424 *
425 * Supplies SIM PUK and new PIN.
426 *
427 * "data" is const char **
428 * ((const char **)data)[0] is PUK value
429 * ((const char **)data)[1] is new PIN value
430 *
431 * "response" must be NULL
432 *
433 * Valid errors:
434 *
435 * SUCCESS
436 * RADIO_NOT_AVAILABLE (radio resetting)
437 * GENERIC_FAILURE
438 * PASSWORD_INCORRECT
439 * (PUK is invalid)
440 */
441
442#define RIL_REQUEST_ENTER_SIM_PUK 3
443
444/**
445 * RIL_REQUEST_ENTER_SIM_PIN2
446 *
447 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
448 * returned as a a failure from a previous operation.
449 *
450 * "data" is const char **
451 * ((const char **)data)[0] is PIN2 value
452 *
453 * "response" must be NULL
454 *
455 * Valid errors:
456 *
457 * SUCCESS
458 * RADIO_NOT_AVAILABLE (radio resetting)
459 * GENERIC_FAILURE
460 * PASSWORD_INCORRECT
461 */
462
463#define RIL_REQUEST_ENTER_SIM_PIN2 4
464
465/**
466 * RIL_REQUEST_ENTER_SIM_PUK2
467 *
468 * Supplies SIM PUK2 and new PIN2.
469 *
470 * "data" is const char **
471 * ((const char **)data)[0] is PUK2 value
472 * ((const char **)data)[1] is new PIN2 value
473 *
474 * "response" must be NULL
475 *
476 * Valid errors:
477 *
478 * SUCCESS
479 * RADIO_NOT_AVAILABLE (radio resetting)
480 * GENERIC_FAILURE
481 * PASSWORD_INCORRECT
482 * (PUK2 is invalid)
483 */
484
485#define RIL_REQUEST_ENTER_SIM_PUK2 5
486
487/**
488 * RIL_REQUEST_CHANGE_SIM_PIN
489 *
490 * Supplies old SIM PIN and new PIN.
491 *
492 * "data" is const char **
493 * ((const char **)data)[0] is old PIN value
494 * ((const char **)data)[1] is new PIN value
495 *
496 * "response" must be NULL
497 *
498 * Valid errors:
499 *
500 * SUCCESS
501 * RADIO_NOT_AVAILABLE (radio resetting)
502 * GENERIC_FAILURE
503 * PASSWORD_INCORRECT
504 * (old PIN is invalid)
505 *
506 */
507
508#define RIL_REQUEST_CHANGE_SIM_PIN 6
509
510
511/**
512 * RIL_REQUEST_CHANGE_SIM_PIN2
513 *
514 * Supplies old SIM PIN2 and new PIN2.
515 *
516 * "data" is const char **
517 * ((const char **)data)[0] is old PIN2 value
518 * ((const char **)data)[1] is new PIN2 value
519 *
520 * "response" must be NULL
521 *
522 * Valid errors:
523 *
524 * SUCCESS
525 * RADIO_NOT_AVAILABLE (radio resetting)
526 * GENERIC_FAILURE
527 * PASSWORD_INCORRECT
528 * (old PIN2 is invalid)
529 *
530 */
531
532#define RIL_REQUEST_CHANGE_SIM_PIN2 7
533
534/**
535 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
536 *
537 * Requests that network personlization be deactivated
538 *
539 * "data" is const char **
540 * ((const char **)(data))[0]] is network depersonlization code
541 *
542 * "response" must be NULL
543 *
544 * Valid errors:
545 *
546 * SUCCESS
547 * RADIO_NOT_AVAILABLE (radio resetting)
548 * GENERIC_FAILURE
549 * PASSWORD_INCORRECT
550 * (code is invalid)
551 */
552
553#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
554
555/**
556 * RIL_REQUEST_GET_CURRENT_CALLS
557 *
558 * Requests current call list
559 *
560 * "data" is NULL
561 *
562 * "response" must be a "const RIL_Call **"
563 *
564 * Valid errors:
565 *
566 * SUCCESS
567 * RADIO_NOT_AVAILABLE (radio resetting)
568 * GENERIC_FAILURE
569 * (request will be made again in a few hundred msec)
570 */
571
572#define RIL_REQUEST_GET_CURRENT_CALLS 9
573
574
575/**
576 * RIL_REQUEST_DIAL
577 *
578 * Initiate voice call
579 *
580 * "data" is const RIL_Dial *
581 * "response" is NULL
582 *
583 * This method is never used for supplementary service codes
584 *
585 * Valid errors:
586 * SUCCESS
587 * RADIO_NOT_AVAILABLE (radio resetting)
588 * GENERIC_FAILURE
589 */
590#define RIL_REQUEST_DIAL 10
591
592/**
593 * RIL_REQUEST_GET_IMSI
594 *
595 * Get the SIM IMSI
596 *
597 * Only valid when radio state is "RADIO_STATE_SIM_READY"
598 *
599 * "data" is NULL
600 * "response" is a const char * containing the IMSI
601 *
602 * Valid errors:
603 * SUCCESS
604 * RADIO_NOT_AVAILABLE (radio resetting)
605 * GENERIC_FAILURE
606 */
607
608#define RIL_REQUEST_GET_IMSI 11
609
610/**
611 * RIL_REQUEST_HANGUP
612 *
613 * Hang up a specific line (like AT+CHLD=1x)
614 *
615 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -0700616 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800617 *
618 * "response" is NULL
619 *
620 * Valid errors:
621 * SUCCESS
622 * RADIO_NOT_AVAILABLE (radio resetting)
623 * GENERIC_FAILURE
624 */
625
626#define RIL_REQUEST_HANGUP 12
627
628/**
629 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
630 *
631 * Hang up waiting or held (like AT+CHLD=0)
632 *
633 * "data" is NULL
634 * "response" is NULL
635 *
636 * Valid errors:
637 * SUCCESS
638 * RADIO_NOT_AVAILABLE (radio resetting)
639 * GENERIC_FAILURE
640 */
641
642#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
643
644/**
645 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
646 *
647 * Hang up waiting or held (like AT+CHLD=1)
648 *
649 * "data" is NULL
650 * "response" is NULL
651 *
652 * Valid errors:
653 * SUCCESS
654 * RADIO_NOT_AVAILABLE (radio resetting)
655 * GENERIC_FAILURE
656 */
657
658#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
659
660/**
661 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
662 *
663 * Switch waiting or holding call and active call (like AT+CHLD=2)
664 *
665 * State transitions should be is follows:
666 *
667 * If call 1 is waiting and call 2 is active, then if this re
668 *
669 * BEFORE AFTER
670 * Call 1 Call 2 Call 1 Call 2
671 * ACTIVE HOLDING HOLDING ACTIVE
672 * ACTIVE WAITING HOLDING ACTIVE
673 * HOLDING WAITING HOLDING ACTIVE
674 * ACTIVE IDLE HOLDING IDLE
675 * IDLE IDLE IDLE IDLE
676 *
677 * "data" is NULL
678 * "response" is NULL
679 *
680 * Valid errors:
681 * SUCCESS
682 * RADIO_NOT_AVAILABLE (radio resetting)
683 * GENERIC_FAILURE
684 */
685
686#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
687#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
688
689/**
690 * RIL_REQUEST_CONFERENCE
691 *
692 * Conference holding and active (like AT+CHLD=3)
693
694 * "data" is NULL
695 * "response" is NULL
696 *
697 * Valid errors:
698 * SUCCESS
699 * RADIO_NOT_AVAILABLE (radio resetting)
700 * GENERIC_FAILURE
701 */
702#define RIL_REQUEST_CONFERENCE 16
703
704/**
705 * RIL_REQUEST_UDUB
706 *
707 * Send UDUB (user determined used busy) to ringing or
708 * waiting call answer)(RIL_BasicRequest r);
709 *
710 * "data" is NULL
711 * "response" is NULL
712 *
713 * Valid errors:
714 * SUCCESS
715 * RADIO_NOT_AVAILABLE (radio resetting)
716 * GENERIC_FAILURE
717 */
718#define RIL_REQUEST_UDUB 17
719
720/**
721 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
722 *
723 * Requests the failure cause code for the most recently terminated call
724 *
725 * "data" is NULL
726 * "response" is a "int *"
727 * ((int *)response)[0] is an integer cause code defined in TS 24.008
728 * Annex H or close approximation
729 *
The Android Open Source Project34a51082009-03-05 14:34:37 -0800730 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
731 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
732 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800733 * If the implementation does not have access to the exact cause codes,
734 * then it should return one of the values listed in RIL_LastCallFailCause,
735 * as the UI layer needs to distinguish these cases for tone generation or
736 * error notification.
737 *
738 * Valid errors:
739 * SUCCESS
740 * RADIO_NOT_AVAILABLE
741 * GENERIC_FAILURE
742 *
Wink Savillef4c4d362009-04-02 01:37:03 -0700743 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800744 */
745#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
746
747/**
748 * RIL_REQUEST_SIGNAL_STRENGTH
749 *
750 * Requests current signal strength and bit error rate
751 *
752 * Must succeed if radio is on.
753 *
754 * "data" is NULL
755 * "response" is an "int *"
756 * ((int *)response)[0] is received signal strength (0-31, 99)
757 * ((int *)response)[1] is bit error rate (0-7, 99)
758 * as defined in TS 27.007 8.5
759 * Other values (eg -1) are not legal
760 *
761 * Valid errors:
762 * SUCCESS
763 * RADIO_NOT_AVAILABLE
764 */
765
766#define RIL_REQUEST_SIGNAL_STRENGTH 19
767/**
768 * RIL_REQUEST_REGISTRATION_STATE
769 *
770 * Request current registration state
771 *
772 * "data" is NULL
773 * "response" is a "char **"
Wink Savillef4c4d362009-04-02 01:37:03 -0700774 * ((const char **)response)[0] is registration state 0-6,
775 * 0 - Not registered, MT is not currently searching a new operator to register
776 * 1 - Registered, home network
777 * 2 - Not registered, but MT is currently searching a new operator to register
778 * 3 - Registration denied
779 * 4 - Unknown
780 * 5 - Registered, roaming
781 * 6 - Registered, roaming affiliates
782 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or NULL if not.
783 * Valid LAC are 0x0000 - 0xffff
784 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or NULL if not.
785 * Valid CID are 0x00000000 - 0xffffffff
786 * ((const char **)response)[3] indicates the available radio technology 0-7,
787 * 0 - Unknown, 1 - GPRS, 2 - EDGE, 3 - UMTS, 4 - IS95A,
788 * 5 - IS95B, 6 - 1xRTT, 7 - EvDo Rev. 0, 8 - EvDo Rev. A
789 * ((const char **)response)[4] is Base Station ID if registered on a CDMA system or NULL if not.
790 * Base Station ID in hexadecimal format
791 * ((const char **)response)[5] is Base Station latitude if registered on a CDMA system or NULL
792 * if not. Base Station latitude in hexadecimal format
793 * ((const char **)response)[6] is Base Station longitude if registered on a CDMA system or NULL
794 * if not. Base Station longitude in hexadecimal format
795 * ((const char **)response)[7] is concurrent services support indicator if registered on a CDMA
796 * system 0-1, 0 - Concurrent services not supported,
797 * 1 - Concurrent services supported
798 * ((const char **)response)[8] is System ID if registered on a CDMA system or NULL if not.
799 * Valid System ID are 0 - 32767
800 * ((const char **)response)[9] is Network ID if registered on a CDMA system or NULL if not.
801 * Valid System ID are 0 - 65535
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800802 *
803 * Please note that registration state 4 ("unknown") is treated
804 * as "out of service" in the Android telephony system
805 *
806 * Valid errors:
807 * SUCCESS
808 * RADIO_NOT_AVAILABLE
809 * GENERIC_FAILURE
810 */
811#define RIL_REQUEST_REGISTRATION_STATE 20
812
813/**
814 * RIL_REQUEST_GPRS_REGISTRATION_STATE
815 *
816 * Request current GPRS registration state
817 *
818 * "data" is NULL
819 * "response" is a "char **"
820 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 7.2
821 * ((const char **)response)[1] is LAC if registered or NULL if not
822 * ((const char **)response)[2] is CID if registered or NULL if not
823 * ((const char **)response)[3] indicates the available radio technology, where:
824 * 0 == unknown
825 * 1 == GPRS only
826 * 2 == EDGE
827 * 3 == UMTS
828 *
829 * LAC and CID are in hexadecimal format.
830 * valid LAC are 0x0000 - 0xffff
831 * valid CID are 0x00000000 - 0x0fffffff
832 *
833 * Please note that registration state 4 ("unknown") is treated
834 * as "out of service" in the Android telephony system
835 *
836 * Valid errors:
837 * SUCCESS
838 * RADIO_NOT_AVAILABLE
839 * GENERIC_FAILURE
840 */
841#define RIL_REQUEST_GPRS_REGISTRATION_STATE 21
842
843/**
844 * RIL_REQUEST_OPERATOR
845 *
846 * Request current operator ONS or EONS
847 *
848 * "data" is NULL
849 * "response" is a "const char **"
850 * ((const char **)response)[0] is long alpha ONS or EONS
851 * or NULL if unregistered
852 *
853 * ((const char **)response)[1] is short alpha ONS or EONS
854 * or NULL if unregistered
855 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
856 * or NULL if unregistered
Wink Savillef4c4d362009-04-02 01:37:03 -0700857 * ((const char **)response)[3] is system type, range from 0 to 3 or NULL if unregistered,
858 * 0 - WCDMA system,
859 * 1 - GSM system,
860 * 2 - 1x system,
861 * 3 - EVDO system
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800862 *
863 * Valid errors:
864 * SUCCESS
865 * RADIO_NOT_AVAILABLE
866 * GENERIC_FAILURE
867 */
868#define RIL_REQUEST_OPERATOR 22
869
870/**
871 * RIL_REQUEST_RADIO_POWER
872 *
873 * Toggle radio on and off (for "airplane" mode)
874 * "data" is int *
875 * ((int *)data)[0] is > 0 for "Radio On"
876 * ((int *)data)[0] is == 0 for "Radio Off"
877 *
878 * "response" is NULL
879 *
880 * Turn radio on if "on" > 0
881 * Turn radio off if "on" == 0
882 *
883 * Valid errors:
884 * SUCCESS
885 * RADIO_NOT_AVAILABLE
886 * GENERIC_FAILURE
887 */
888#define RIL_REQUEST_RADIO_POWER 23
889
890/**
891 * RIL_REQUEST_DTMF
892 *
893 * Send a DTMF tone
894 *
895 * If the implementation is currently playing a tone requested via
896 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
897 * should be played instead
898 *
899 * "data" is a char *
900 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
901 * ((char *)data)[1] is a single character with one of 3 values:
902 * 'S' -- tone should be played for a short time
903 * 'L' -- tone should be played for a long time
904 * "response" is NULL
905 *
906 * FIXME should this block/mute microphone?
907 * How does this interact with local DTMF feedback?
908 *
909 * Valid errors:
910 * SUCCESS
911 * RADIO_NOT_AVAILABLE
912 * GENERIC_FAILURE
913 *
914 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
915 *
916 */
917#define RIL_REQUEST_DTMF 24
918
919/**
920 * RIL_REQUEST_SEND_SMS
921 *
922 * Send an SMS message
923 *
924 * "data" is const char **
925 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
926 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
927 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
928 * less the SMSC address
929 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
930 *
931 * "response" is a const RIL_SMS_Response *
932 *
933 * Based on the return error, caller decides to resend if sending sms
934 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
935 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
936 *
937 * Valid errors:
938 * SUCCESS
939 * RADIO_NOT_AVAILABLE
940 * SMS_SEND_FAIL_RETRY
941 * GENERIC_FAILURE
942 *
943 * FIXME how do we specify TP-Message-Reference if we need to resend?
944 */
945#define RIL_REQUEST_SEND_SMS 25
946
947
948/**
949 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
950 *
951 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
952 * except that more messages are expected to be sent soon. If possible,
953 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
954 *
955 * "data" is const char **
956 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
957 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
958 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
959 * less the SMSC address
960 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
961 *
962 * "response" is a const RIL_SMS_Response *
963 *
964 * Based on the return error, caller decides to resend if sending sms
965 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
966 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
967 *
968 * Valid errors:
969 * SUCCESS
970 * RADIO_NOT_AVAILABLE
971 * SMS_SEND_FAIL_RETRY
972 * GENERIC_FAILURE
973 *
974 */
975#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
976
977
978/**
Wink Savillef4c4d362009-04-02 01:37:03 -0700979 * RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800980 *
Wink Savillef4c4d362009-04-02 01:37:03 -0700981 * Setup a packet data connection
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800982 *
983 * "data" is a const char **
Wink Savillef4c4d362009-04-02 01:37:03 -0700984 * ((const char **)data)[0] indicates whether to setup connection on radio technology CDMA
985 * or GSM/UMTS, 0-1. 0 - CDMA, 1-GSM/UMTS
986 *
987 * ((const char **)data)[1] Profile Number or NULL to indicate default profile
988 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
989 * override the one in the profile. NULL indicates no APN overrride.
990 * ((const char **)data)[3] is the username for APN, or NULL
991 * ((const char **)data)[4] is the password for APN, or NULL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800992 *
993 * "response" is a char **
Wink Savillef4c4d362009-04-02 01:37:03 -0700994 * ((char **)response)[0] indicating PDP CID, which is generated by RIL. This Connection ID is
995 * used in GSM/UMTS and CDMA
996 * ((char **)response)[1] indicating the network interface name for GSM/UMTS or CDMA
997 * ((char **)response)[2] indicating the IP address for this interface for GSM/UMTS
998 * and NULL for CDMA
The Android Open Source Project00f06fc2009-03-03 19:32:15 -0800999 *
1000 * FIXME may need way to configure QoS settings
Wink Savillef4c4d362009-04-02 01:37:03 -07001001 *
1002 * replaces RIL_REQUEST_SETUP_DEFAULT_PDP
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001003 *
1004 * Valid errors:
1005 * SUCCESS
1006 * RADIO_NOT_AVAILABLE
1007 * GENERIC_FAILURE
1008 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001009 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001010 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001011#define RIL_REQUEST_SETUP_DATA_CALL 27
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001012
1013
1014
1015/**
1016 * RIL_REQUEST_SIM_IO
1017 *
1018 * Request SIM I/O operation.
1019 * This is similar to the TS 27.007 "restricted SIM" operation
1020 * where it assumes all of the EF selection will be done by the
1021 * callee.
1022 *
1023 * "data" is a const RIL_SIM_IO *
1024 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1025 * or may specify a PIN2 for operations that require a PIN2 (eg
1026 * updating FDN records)
1027 *
1028 * "response" is a const RIL_SIM_IO_Response *
1029 *
1030 * Arguments and responses that are unused for certain
1031 * values of "command" should be ignored or set to NULL
1032 *
1033 * Valid errors:
1034 * SUCCESS
1035 * RADIO_NOT_AVAILABLE
1036 * GENERIC_FAILURE
1037 * SIM_PIN2
1038 * SIM_PUK2
1039 */
1040#define RIL_REQUEST_SIM_IO 28
1041
1042/**
1043 * RIL_REQUEST_SEND_USSD
1044 *
1045 * Send a USSD message
1046 *
1047 * If a USSD session already exists, the message should be sent in the
1048 * context of that session. Otherwise, a new session should be created.
1049 *
1050 * The network reply should be reported via RIL_UNSOL_ON_USSD
1051 *
1052 * Only one USSD session may exist at a time, and the session is assumed
1053 * to exist until:
1054 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1055 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1056 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1057 *
1058 * "data" is a const char * containing the USSD request in UTF-8 format
1059 * "response" is NULL
1060 *
1061 * Valid errors:
1062 * SUCCESS
1063 * RADIO_NOT_AVAILABLE
1064 * GENERIC_FAILURE
1065 *
1066 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1067 */
1068
1069#define RIL_REQUEST_SEND_USSD 29
1070
1071/**
1072 * RIL_REQUEST_CANCEL_USSD
1073 *
1074 * Cancel the current USSD session if one exists
1075 *
1076 * "data" is null
1077 * "response" is NULL
1078 *
1079 * Valid errors:
1080 * SUCCESS
1081 * RADIO_NOT_AVAILABLE
1082 * GENERIC_FAILURE
1083 */
1084
1085#define RIL_REQUEST_CANCEL_USSD 30
1086
1087/**
1088 * RIL_REQUEST_GET_CLIR
1089 *
1090 * Gets current CLIR status
1091 * "data" is NULL
1092 * "response" is int *
1093 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1094 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
1095 *
1096 * Valid errors:
1097 * SUCCESS
1098 * RADIO_NOT_AVAILABLE
1099 * GENERIC_FAILURE
1100 */
1101#define RIL_REQUEST_GET_CLIR 31
1102
1103/**
1104 * RIL_REQUEST_SET_CLIR
1105 *
1106 * "data" is int *
1107 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1108 *
1109 * "response" is NULL
1110 *
1111 * Valid errors:
1112 * SUCCESS
1113 * RADIO_NOT_AVAILABLE
1114 * GENERIC_FAILURE
1115 */
1116#define RIL_REQUEST_SET_CLIR 32
1117
1118/**
1119 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
1120 *
1121 * "data" is const RIL_CallForwardInfo *
1122 *
1123 * "response" is const RIL_CallForwardInfo **
1124 * "response" points to an array of RIL_CallForwardInfo *'s, one for
1125 * each distinct registered phone number.
1126 *
1127 * For example, if data is forwarded to +18005551212 and voice is forwarded
1128 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
1129 *
1130 * If, however, both data and voice are forwarded to +18005551212, then
1131 * a single RIL_CallForwardInfo can be returned with the service class
1132 * set to "data + voice = 3")
1133 *
1134 * Valid errors:
1135 * SUCCESS
1136 * RADIO_NOT_AVAILABLE
1137 * GENERIC_FAILURE
1138 */
1139#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
1140
1141
1142/**
1143 * RIL_REQUEST_SET_CALL_FORWARD
1144 *
1145 * Configure call forward rule
1146 *
1147 * "data" is const RIL_CallForwardInfo *
1148 * "response" is NULL
1149 *
1150 * Valid errors:
1151 * SUCCESS
1152 * RADIO_NOT_AVAILABLE
1153 * GENERIC_FAILURE
1154 */
1155#define RIL_REQUEST_SET_CALL_FORWARD 34
1156
1157
1158/**
1159 * RIL_REQUEST_QUERY_CALL_WAITING
1160 *
1161 * Query current call waiting state
1162 *
1163 * "data" is const int *
1164 * ((const int *)data)[0] is the TS 27.007 service class to query.
1165 * "response" is a const int *
1166 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
1167 *
1168 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
1169 * must follow, with the TS 27.007 service class bit vector of services
1170 * for which call waiting is enabled.
1171 *
1172 * For example, if ((const int *)response)[0] is 1 and
1173 * ((const int *)response)[1] is 3, then call waiting is enabled for data
1174 * and voice and disabled for everything else
1175 *
1176 * Valid errors:
1177 * SUCCESS
1178 * RADIO_NOT_AVAILABLE
1179 * GENERIC_FAILURE
1180 */
1181#define RIL_REQUEST_QUERY_CALL_WAITING 35
1182
1183
1184/**
1185 * RIL_REQUEST_SET_CALL_WAITING
1186 *
1187 * Configure current call waiting state
1188 *
1189 * "data" is const int *
1190 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
1191 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
1192 * services to modify
1193 * "response" is NULL
1194 *
1195 * Valid errors:
1196 * SUCCESS
1197 * RADIO_NOT_AVAILABLE
1198 * GENERIC_FAILURE
1199 */
1200#define RIL_REQUEST_SET_CALL_WAITING 36
1201
1202/**
1203 * RIL_REQUEST_SMS_ACKNOWLEDGE
1204 *
1205 * Acknowledge successful or failed receipt of SMS previously indicated
1206 * via RIL_UNSOL_RESPONSE_NEW_SMS
1207 *
1208 * "data" is int *
1209 * ((int *)data)[0] is "1" on successful receipt
1210 * (basically, AT+CNMA=1 from TS 27.005
1211 * ((int *)data)[0] is "0" on failed receipt
1212 * (basically, AT+CNMA=2 from TS 27.005)
1213 *
1214 * "response" is NULL
1215 *
1216 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
1217 *
1218 * Valid errors:
1219 * SUCCESS
1220 * RADIO_NOT_AVAILABLE
1221 * GENERIC_FAILURE
1222 */
1223#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
1224
1225/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001226 * RIL_REQUEST_GET_IMEI - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001227 *
1228 * Get the device IMEI, including check digit
1229 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001230 * The request is DECRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001231 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1232 *
1233 * "data" is NULL
1234 * "response" is a const char * containing the IMEI
1235 *
1236 * Valid errors:
1237 * SUCCESS
1238 * RADIO_NOT_AVAILABLE (radio resetting)
1239 * GENERIC_FAILURE
1240 */
1241
1242#define RIL_REQUEST_GET_IMEI 38
1243
1244/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001245 * RIL_REQUEST_GET_IMEISV - DEPRECATED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001246 *
1247 * Get the device IMEISV, which should be two decimal digits
1248 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001249 * The request is DECRECATED, use RIL_REQUEST_DEVICE_IDENTITY
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001250 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1251 *
1252 * "data" is NULL
1253 * "response" is a const char * containing the IMEISV
1254 *
1255 * Valid errors:
1256 * SUCCESS
1257 * RADIO_NOT_AVAILABLE (radio resetting)
1258 * GENERIC_FAILURE
1259 */
1260
1261#define RIL_REQUEST_GET_IMEISV 39
1262
1263
1264/**
1265 * RIL_REQUEST_ANSWER
1266 *
1267 * Answer incoming call
1268 *
1269 * Will not be called for WAITING calls.
1270 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
1271 * instead
1272 *
1273 * "data" is NULL
1274 * "response" is NULL
1275 *
1276 * Valid errors:
1277 * SUCCESS
1278 * RADIO_NOT_AVAILABLE (radio resetting)
1279 * GENERIC_FAILURE
1280 */
1281
1282#define RIL_REQUEST_ANSWER 40
1283
1284/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001285 * RIL_REQUEST_DEACTIVATE_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001286 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001287 * Deactivate packet data connection
1288 * replaces RIL_REQUEST_DEACTIVATE_DEFAULT_PDP
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001289 *
1290 * "data" is const char **
Wink Savillef4c4d362009-04-02 01:37:03 -07001291 * ((char**)data)[0] indicating CID
1292 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001293 * "response" is NULL
1294 *
1295 * Valid errors:
1296 * SUCCESS
1297 * RADIO_NOT_AVAILABLE
1298 * GENERIC_FAILURE
1299 *
Wink Savillef4c4d362009-04-02 01:37:03 -07001300 * See also: RIL_REQUEST_SETUP_DATA_CALL
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001301 */
Wink Savillef4c4d362009-04-02 01:37:03 -07001302#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001303
1304/**
1305 * RIL_REQUEST_QUERY_FACILITY_LOCK
1306 *
1307 * Query the status of a facility lock state
1308 *
1309 * "data" is const char **
1310 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
1311 * (eg "AO" for BAOC, "SC" for SIM lock)
1312 * ((const char **)data)[1] is the password, or "" if not required
1313 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
1314 * services to query
1315 *
1316 * "response" is an int *
1317 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
1318 * services for which the specified barring facility
1319 * is active. "0" means "disabled for all"
1320 *
1321 *
1322 * Valid errors:
1323 * SUCCESS
1324 * RADIO_NOT_AVAILABLE
1325 * GENERIC_FAILURE
1326 *
1327 */
1328#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
1329
1330/**
1331 * RIL_REQUEST_SET_FACILITY_LOCK
1332 *
1333 * Enable/disable one facility lock
1334 *
1335 * "data" is const char **
1336 *
1337 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1338 * (eg "AO" for BAOC)
1339 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
1340 * ((const char **)data)[2] = password
1341 * ((const char **)data)[3] = string representation of decimal TS 27.007
1342 * service class bit vector. Eg, the string
1343 * "1" means "set this facility for voice services"
1344 *
1345 * "response" is NULL
1346 *
1347 * Valid errors:
1348 * SUCCESS
1349 * RADIO_NOT_AVAILABLE
1350 * GENERIC_FAILURE
1351 *
1352 */
1353#define RIL_REQUEST_SET_FACILITY_LOCK 43
1354
1355/**
1356 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
1357 *
1358 * Change call barring facility password
1359 *
1360 * "data" is const char **
1361 *
1362 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
1363 * (eg "AO" for BAOC)
1364 * ((const char **)data)[1] = old password
1365 * ((const char **)data)[2] = new password
1366 *
1367 * "response" is NULL
1368 *
1369 * Valid errors:
1370 * SUCCESS
1371 * RADIO_NOT_AVAILABLE
1372 * GENERIC_FAILURE
1373 *
1374 */
1375#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
1376
1377/**
1378 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
1379 *
1380 * Query current network selectin mode
1381 *
1382 * "data" is NULL
1383 *
1384 * "response" is int *
1385 * ((const int *)response)[0] is
1386 * 0 for automatic selection
1387 * 1 for manual selection
1388 *
1389 * Valid errors:
1390 * SUCCESS
1391 * RADIO_NOT_AVAILABLE
1392 * GENERIC_FAILURE
1393 *
1394 */
1395#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
1396
1397/**
1398 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
1399 *
1400 * Specify that the network should be selected automatically
1401 *
1402 * "data" is NULL
1403 * "response" is NULL
1404 *
1405 * This request must not respond until the new operator is selected
1406 * and registered
1407 *
1408 * Valid errors:
1409 * SUCCESS
1410 * RADIO_NOT_AVAILABLE
1411 * GENERIC_FAILURE
1412 *
1413 */
1414#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
1415
1416/**
1417 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
1418 *
1419 * Manually select a specified network.
1420 *
1421 * The radio baseband/RIL implementation is expected to fall back to
1422 * automatic selection mode if the manually selected network should go
1423 * out of range in the future.
1424 *
1425 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
1426 * "response" is NULL
1427 *
1428 * This request must not respond until the new operator is selected
1429 * and registered
1430 *
1431 * Valid errors:
1432 * SUCCESS
1433 * RADIO_NOT_AVAILABLE
1434 * GENERIC_FAILURE
1435 *
1436 */
1437#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
1438
1439/**
1440 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
1441 *
1442 * Scans for available networks
1443 *
1444 * "data" is NULL
1445 * "response" is const char ** that should be an array of n*4 strings, where
1446 * n is the number of available networks
1447 * For each available network:
1448 *
1449 * ((const char **)response)[n+0] is long alpha ONS or EONS
1450 * ((const char **)response)[n+1] is short alpha ONS or EONS
1451 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
1452 * ((const char **)response)[n+3] is a string value of the status:
1453 * "unknown"
1454 * "available"
1455 * "current"
1456 * "forbidden"
1457 *
1458 * This request must not respond until the new operator is selected
1459 * and registered
1460 *
1461 * Valid errors:
1462 * SUCCESS
1463 * RADIO_NOT_AVAILABLE
1464 * GENERIC_FAILURE
1465 *
1466 */
1467#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
1468
1469/**
1470 * RIL_REQUEST_DTMF_START
1471 *
1472 * Start playing a DTMF tone. Continue playing DTMF tone until
1473 * RIL_REQUEST_DTMF_STOP is received
1474 *
1475 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
1476 * it should cancel the previous tone and play the new one.
1477 *
1478 * "data" is a char *
1479 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
1480 * "response" is NULL
1481 *
1482 * Valid errors:
1483 * SUCCESS
1484 * RADIO_NOT_AVAILABLE
1485 * GENERIC_FAILURE
1486 *
1487 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
1488 */
1489#define RIL_REQUEST_DTMF_START 49
1490
1491/**
1492 * RIL_REQUEST_DTMF_STOP
1493 *
1494 * Stop playing a currently playing DTMF tone.
1495 *
1496 * "data" is NULL
1497 * "response" is NULL
1498 *
1499 * Valid errors:
1500 * SUCCESS
1501 * RADIO_NOT_AVAILABLE
1502 * GENERIC_FAILURE
1503 *
1504 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
1505 */
1506#define RIL_REQUEST_DTMF_STOP 50
1507
1508/**
1509 * RIL_REQUEST_BASEBAND_VERSION
1510 *
1511 * Return string value indicating baseband version, eg
1512 * response from AT+CGMR
1513 *
1514 * "data" is NULL
1515 * "response" is const char * containing version string for log reporting
1516 *
1517 * Valid errors:
1518 * SUCCESS
1519 * RADIO_NOT_AVAILABLE
1520 * GENERIC_FAILURE
1521 *
1522 */
1523#define RIL_REQUEST_BASEBAND_VERSION 51
1524
1525/**
1526 * RIL_REQUEST_SEPARATE_CONNECTION
1527 *
1528 * Separate a party from a multiparty call placing the multiparty call
1529 * (less the specified party) on hold and leaving the specified party
1530 * as the only other member of the current (active) call
1531 *
1532 * Like AT+CHLD=2x
1533 *
1534 * See TS 22.084 1.3.8.2 (iii)
1535 * TS 22.030 6.5.5 "Entering "2X followed by send"
1536 * TS 27.007 "AT+CHLD=2x"
1537 *
1538 * "data" is an int *
Wink Savillef4c4d362009-04-02 01:37:03 -07001539 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
1540 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001541 * "response" is NULL
1542 *
1543 * Valid errors:
1544 * SUCCESS
1545 * RADIO_NOT_AVAILABLE (radio resetting)
1546 * GENERIC_FAILURE
1547 */
1548#define RIL_REQUEST_SEPARATE_CONNECTION 52
1549
1550
1551/**
1552 * RIL_REQUEST_SET_MUTE
1553 *
1554 * Turn on or off uplink (microphone) mute.
1555 *
1556 * Will only be sent while voice call is active.
1557 * Will always be reset to "disable mute" when a new voice call is initiated
1558 *
1559 * "data" is an int *
1560 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
1561 *
1562 * "response" is NULL
1563 *
1564 * Valid errors:
1565 * SUCCESS
1566 * RADIO_NOT_AVAILABLE (radio resetting)
1567 * GENERIC_FAILURE
1568 */
1569
1570#define RIL_REQUEST_SET_MUTE 53
1571
1572/**
1573 * RIL_REQUEST_GET_MUTE
1574 *
1575 * Queries the current state of the uplink mute setting
1576 *
1577 * "data" is NULL
1578 * "response" is an int *
1579 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
1580 *
1581 * Valid errors:
1582 * SUCCESS
1583 * RADIO_NOT_AVAILABLE (radio resetting)
1584 * GENERIC_FAILURE
1585 */
1586
1587#define RIL_REQUEST_GET_MUTE 54
1588
1589/**
1590 * RIL_REQUEST_QUERY_CLIP
1591 *
1592 * Queries the status of the CLIP supplementary service
1593 *
1594 * (for MMI code "*#30#")
1595 *
1596 * "data" is NULL
1597 * "response" is an int *
1598 * (int *)response)[0] is 1 for "CLIP provisioned"
1599 * and 0 for "CLIP not provisioned"
1600 * and 2 for "unknown, e.g. no network etc"
1601 *
1602 * Valid errors:
1603 * SUCCESS
1604 * RADIO_NOT_AVAILABLE (radio resetting)
1605 * GENERIC_FAILURE
1606 */
1607
1608#define RIL_REQUEST_QUERY_CLIP 55
1609
1610/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001611 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001612 *
1613 * Requests the failure cause code for the most recently failed PDP
Wink Savillef4c4d362009-04-02 01:37:03 -07001614 * context or CDMA data connection active
1615 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001616 *
1617 * "data" is NULL
1618 *
1619 * "response" is a "int *"
1620 * ((int *)response)[0] is an integer cause code defined in TS 24.008
1621 * section 6.1.3.1.3 or close approximation
1622 *
1623 * If the implementation does not have access to the exact cause codes,
1624 * then it should return one of the values listed in
Wink Savillef4c4d362009-04-02 01:37:03 -07001625 * RIL_LastDataCallActivateFailCause, as the UI layer needs to distinguish these
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001626 * cases for error notification
1627 * and potential retries.
1628 *
1629 * Valid errors:
1630 * SUCCESS
1631 * RADIO_NOT_AVAILABLE
1632 * GENERIC_FAILURE
1633 *
1634 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1635 *
1636 */
1637
Wink Savillef4c4d362009-04-02 01:37:03 -07001638#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001639
1640/**
Wink Savillef4c4d362009-04-02 01:37:03 -07001641 * RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001642 *
1643 * Queries the status of PDP contexts, returning for each
1644 * its CID, whether or not it is active, and its PDP type,
1645 * APN, and PDP adddress.
Wink Savillef4c4d362009-04-02 01:37:03 -07001646 * replaces RIL_REQUEST_PDP_CONTEXT_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001647 *
1648 * "data" is NULL
Wink Savillef4c4d362009-04-02 01:37:03 -07001649 * "response" is an array of RIL_Data_Call_Response
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001650 *
1651 * Valid errors:
1652 * SUCCESS
1653 * RADIO_NOT_AVAILABLE (radio resetting)
1654 * GENERIC_FAILURE
1655 */
1656
Wink Savillef4c4d362009-04-02 01:37:03 -07001657#define RIL_REQUEST_DATA_CALL_LIST 57
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001658
1659/**
1660 * RIL_REQUEST_RESET_RADIO
1661 *
1662 * Request a radio reset. The RIL implementation may postpone
1663 * the reset until after this request is responded to if the baseband
1664 * is presently busy.
1665 *
1666 * "data" is NULL
1667 * "response" is NULL
1668 *
1669 * The reset action could be delayed for a while
1670 * in case baseband modem is just busy.
1671 *
1672 * Valid errors:
1673 * SUCCESS
1674 * RADIO_NOT_AVAILABLE (radio resetting)
1675 * GENERIC_FAILURE
1676 */
1677
1678#define RIL_REQUEST_RESET_RADIO 58
1679
1680/**
1681 * RIL_REQUEST_OEM_HOOK_RAW
1682 *
1683 * This request reserved for OEM-specific uses. It passes raw byte arrays
1684 * back and forth.
1685 *
1686 * It can be invoked on the Java side from
1687 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
1688 *
1689 * "data" is a char * of bytes copied from the byte[] data argument in java
1690 * "response" is a char * of bytes that will returned via the
1691 * caller's "response" Message here:
1692 * (byte[])(((AsyncResult)response.obj).result)
1693 *
1694 * An error response here will result in
1695 * (((AsyncResult)response.obj).result) == null and
1696 * (((AsyncResult)response.obj).exception) being an instance of
1697 * com.android.internal.telephony.gsm.CommandException
1698 *
1699 * Valid errors:
1700 * All
1701 */
1702
1703#define RIL_REQUEST_OEM_HOOK_RAW 59
1704
1705/**
1706 * RIL_REQUEST_OEM_HOOK_STRINGS
1707 *
1708 * This request reserved for OEM-specific uses. It passes strings
1709 * back and forth.
1710 *
1711 * It can be invoked on the Java side from
1712 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
1713 *
1714 * "data" is a const char **, representing an array of null-terminated UTF-8
1715 * strings copied from the "String[] strings" argument to
1716 * invokeOemRilRequestStrings()
1717 *
1718 * "response" is a const char **, representing an array of null-terminated UTF-8
1719 * stings that will be returned via the caller's response message here:
1720 *
1721 * (String[])(((AsyncResult)response.obj).result)
1722 *
1723 * An error response here will result in
1724 * (((AsyncResult)response.obj).result) == null and
1725 * (((AsyncResult)response.obj).exception) being an instance of
1726 * com.android.internal.telephony.gsm.CommandException
1727 *
1728 * Valid errors:
1729 * All
1730 */
1731
1732#define RIL_REQUEST_OEM_HOOK_STRINGS 60
1733
1734/**
1735 * RIL_REQUEST_SCREEN_STATE
1736 *
1737 * Indicates the current state of the screen. When the screen is off, the
1738 * RIL should notify the baseband to suppress certain notifications (eg,
1739 * signal strength and changes in LAC or CID) in an effort to conserve power.
1740 * These notifications should resume when the screen is on.
1741 *
1742 * "data" is int *
1743 * ((int *)data)[0] is == 1 for "Screen On"
1744 * ((int *)data)[0] is == 0 for "Screen Off"
1745 *
1746 * "response" is NULL
1747 *
1748 * Valid errors:
1749 * SUCCESS
1750 * GENERIC_FAILURE
1751 */
1752#define RIL_REQUEST_SCREEN_STATE 61
1753
1754
1755/**
1756 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
1757 *
1758 * Enables/disables supplementary service related notifications
1759 * from the network.
1760 *
1761 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
1762 *
1763 * "data" is int *
1764 * ((int *)data)[0] is == 1 for notifications enabled
1765 * ((int *)data)[0] is == 0 for notifications disabled
1766 *
1767 * "response" is NULL
1768 *
1769 * Valid errors:
1770 * SUCCESS
1771 * RADIO_NOT_AVAILABLE
1772 * GENERIC_FAILURE
1773 *
1774 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
1775 */
1776#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
1777
1778/**
1779 * RIL_REQUEST_WRITE_SMS_TO_SIM
1780 *
1781 * Stores a SMS message to SIM memory.
1782 *
1783 * "data" is RIL_SMS_WriteArgs *
1784 *
1785 * "response" is int *
1786 * ((const int *)response)[0] is the record index where the message is stored.
1787 *
1788 * Valid errors:
1789 * SUCCESS
1790 * GENERIC_FAILURE
1791 *
1792 */
1793#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
1794
1795/**
1796 * RIL_REQUEST_DELETE_SMS_ON_SIM
1797 *
1798 * Deletes a SMS message from SIM memory.
1799 *
1800 * "data" is int *
1801 * ((int *)data)[0] is the record index of the message to delete.
1802 *
1803 * "response" is NULL
1804 *
1805 * Valid errors:
1806 * SUCCESS
1807 * GENERIC_FAILURE
1808 *
1809 */
1810#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
1811
1812/**
1813 * RIL_REQUEST_SET_BAND_MODE
1814 *
1815 * Assign a specified band for RF configuration.
1816 *
1817 * "data" is int *
1818 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
1819 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
1820 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
1821 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
1822 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
1823 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07001824 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
1825 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
1826 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
1827 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
1828 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
1829 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
1830 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
1831 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
1832 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
1833 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
1834 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
1835 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
1836 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001837 *
1838 * "response" is NULL
1839 *
1840 * Valid errors:
1841 * SUCCESS
1842 * RADIO_NOT_AVAILABLE
1843 * GENERIC_FAILURE
1844 */
1845#define RIL_REQUEST_SET_BAND_MODE 65
1846
1847/**
1848 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
1849 *
1850 * Query the list of band mode supported by RF.
1851 *
1852 * "data" is NULL
1853 *
1854 * "response" is int *
1855 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
1856 * each available band mode.
1857 *
1858 * 0 for "unspecified" (selected by baseband automatically)
1859 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
1860 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
1861 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
1862 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
1863 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
Wink Savillef4c4d362009-04-02 01:37:03 -07001864 * 6 for "Cellular (800-MHz Band)"
1865 * 7 for "PCS (1900-MHz Band)"
1866 * 8 for "Band Class 3 (JTACS Band)"
1867 * 9 for "Band Class 4 (Korean PCS Band)"
1868 * 10 for "Band Class 5 (450-MHz Band)"
1869 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
1870 * 12 for "Band Class 7 (Upper 700-MHz Band)"
1871 * 13 for "Band Class 8 (1800-MHz Band)"
1872 * 14 for "Band Class 9 (900-MHz Band)"
1873 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
1874 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
1875 * 17 for "Band Class 15 (AWS Band)"
1876 * 18 for "Band Class 16 (US 2.5-GHz Band)"
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08001877 *
1878 * Valid errors:
1879 * SUCCESS
1880 * RADIO_NOT_AVAILABLE
1881 * GENERIC_FAILURE
1882 *
1883 * See also: RIL_REQUEST_SET_BAND_MODE
1884 */
1885#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
1886
1887/**
1888 * RIL_REQUEST_STK_GET_PROFILE
1889 *
1890 * Requests the profile of SIM tool kit.
1891 * The profile indicates the SAT/USAT features supported by ME.
1892 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
1893 *
1894 * "data" is NULL
1895 *
1896 * "response" is a const char * containing SAT/USAT profile
1897 * in hexadecimal format string starting with first byte of terminal profile
1898 *
1899 * Valid errors:
1900 * RIL_E_SUCCESS
1901 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
1902 * RIL_E_GENERIC_FAILURE
1903 */
1904#define RIL_REQUEST_STK_GET_PROFILE 67
1905
1906/**
1907 * RIL_REQUEST_STK_SET_PROFILE
1908 *
1909 * Download the STK terminal profile as part of SIM initialization
1910 * procedure
1911 *
1912 * "data" is a const char * containing SAT/USAT profile
1913 * in hexadecimal format string starting with first byte of terminal profile
1914 *
1915 * "response" is NULL
1916 *
1917 * Valid errors:
1918 * RIL_E_SUCCESS
1919 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
1920 * RIL_E_GENERIC_FAILURE
1921 */
1922#define RIL_REQUEST_STK_SET_PROFILE 68
1923
1924/**
1925 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
1926 *
1927 * Requests to send a SAT/USAT envelope command to SIM.
1928 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
1929 *
1930 * "data" is a const char * containing SAT/USAT command
1931 * in hexadecimal format string starting with command tag
1932 *
1933 * "response" is a const char * containing SAT/USAT response
1934 * in hexadecimal format string starting with first byte of response
1935 * (May be NULL)
1936 *
1937 * Valid errors:
1938 * RIL_E_SUCCESS
1939 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
1940 * RIL_E_GENERIC_FAILURE
1941 */
1942#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
1943
1944/**
1945 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
1946 *
1947 * Requests to send a terminal response to SIM for a received
1948 * proactive command
1949 *
1950 * "data" is a const char * containing SAT/USAT response
1951 * in hexadecimal format string starting with first byte of response data
1952 *
1953 * "response" is NULL
1954 *
1955 * Valid errors:
1956 * RIL_E_SUCCESS
1957 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
1958 * RIL_E_GENERIC_FAILURE
1959 */
1960#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
1961
1962/**
1963 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
1964 *
1965 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
1966 * been initialized by ME already. (We could see the call has been in the 'call
1967 * list') So, STK application needs to accept/reject the call according as user
1968 * operations.
1969 *
1970 * "data" is int *
1971 * ((int *)data)[0] is > 0 for "accept" the call setup
1972 * ((int *)data)[0] is == 0 for "reject" the call setup
1973 *
1974 * "response" is NULL
1975 *
1976 * Valid errors:
1977 * RIL_E_SUCCESS
1978 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
1979 * RIL_E_GENERIC_FAILURE
1980 */
1981#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
1982
1983/**
1984 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
1985 *
1986 * Connects the two calls and disconnects the subscriber from both calls.
1987 *
1988 * "data" is NULL
1989 * "response" is NULL
1990 *
1991 * Valid errors:
1992 * SUCCESS
1993 * RADIO_NOT_AVAILABLE (radio resetting)
1994 * GENERIC_FAILURE
1995 */
1996#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
1997
1998/**
1999 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2000 *
2001 * Requests to set the preferred network type for searching and registering
2002 * (CS/PS domain, RAT, and operation mode)
2003 *
2004 * "data" is int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002005 *
2006 * ((int *)data)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002007 * ((int *)data)[0] is == 1 for GSM only
2008 * ((int *)data)[0] is == 2 for WCDMA only
Wink Savillef4c4d362009-04-02 01:37:03 -07002009 * ((int *)data)[0] is == 3 for GSM/WCDMA (auto mode)
2010 * ((int *)data)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2011 * ((int *)data)[0] is == 5 for CDMA only
2012 * ((int *)data)[0] is == 6 for EvDo only
2013 * ((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 -08002014 *
2015 * "response" is NULL
2016 *
2017 * Valid errors:
Wink Savillef4c4d362009-04-02 01:37:03 -07002018 * SUCCESS
2019 * RADIO_NOT_AVAILABLE (radio resetting)
2020 * GENERIC_FAILURE
2021 * MODE_NOT_SUPPORTED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002022 */
2023#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2024
2025/**
2026 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2027 *
2028 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2029 * for searching and registering
2030 *
2031 * "data" is NULL
2032 *
2033 * "response" is int *
Wink Savillef4c4d362009-04-02 01:37:03 -07002034 * ((int *)response)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002035 * ((int *)response)[0] is == 1 for GSM only
2036 * ((int *)response)[0] is == 2 for WCDMA only
Wink Savillef4c4d362009-04-02 01:37:03 -07002037 * ((int *)response)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL)
2038 * ((int *)response)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
2039 * ((int *)response)[0] is == 5 for CDMA only
2040 * ((int *)response)[0] is == 6 for EvDo only
2041 * ((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 -08002042 *
2043 * Valid errors:
2044 * SUCCESS
2045 * RADIO_NOT_AVAILABLE
2046 * GENERIC_FAILURE
2047 *
2048 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2049 */
2050#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2051
2052/**
2053 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2054 *
2055 * Request neighboring cell id in GSM network
2056 *
2057 * "data" is NULL
2058 * "response" must be a " const RIL_NeighboringCell** "
2059 *
2060 * Valid errors:
2061 * SUCCESS
2062 * RADIO_NOT_AVAILABLE
2063 * GENERIC_FAILURE
2064 */
2065#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
2066
2067/**
2068 * RIL_REQUEST_SET_LOCATION_UPDATES
Wink Savillef4c4d362009-04-02 01:37:03 -07002069 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002070 * Enables/disables network state change notifications due to changes in
2071 * LAC and/or CID (basically, +CREG=2 vs. +CREG=1).
2072 *
2073 * Note: The RIL implementation should default to "updates enabled"
2074 * when the screen is on and "updates disabled" when the screen is off.
2075 *
2076 * "data" is int *
2077 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
2078 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
2079 *
2080 * "response" is NULL
Wink Savillef4c4d362009-04-02 01:37:03 -07002081 *
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002082 * Valid errors:
2083 * SUCCESS
2084 * RADIO_NOT_AVAILABLE
2085 * GENERIC_FAILURE
2086 *
2087 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2088 */
2089#define RIL_REQUEST_SET_LOCATION_UPDATES 76
2090
Wink Savillef4c4d362009-04-02 01:37:03 -07002091/**
2092 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION
2093 *
2094 * Request to set the location where the CDMA subscription shall
2095 * be retrieved
2096 *
2097 * "data" is int *
2098 * ((int *)data)[0] is == 0 from RUIM/SIM (default)
2099 * ((int *)data)[0] is == 1 from NV
2100 *
2101 * "response" is NULL
2102 *
2103 * Valid errors:
2104 * SUCCESS
2105 * RADIO_NOT_AVAILABLE
2106 * GENERIC_FAILURE
2107 * SIM_ABSENT
2108 * SUBSCRIPTION_NOT_AVAILABLE
2109 */
2110#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION 77
2111
2112/**
2113 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
2114 *
2115 * Request to set the roaming preferences in CDMA
2116 *
2117 * "data" is int *
2118 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
2119 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2120 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
2121 *
2122 * "response" is NULL
2123 *
2124 * Valid errors:
2125 * SUCCESS
2126 * RADIO_NOT_AVAILABLE
2127 * GENERIC_FAILURE
2128 */
2129#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
2130
2131/**
2132 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
2133 *
2134 * Request the actual setting of the roaming preferences in CDMA in the modem
2135 *
2136 * "data" is NULL
2137 *
2138 * "response" is int *
2139 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
2140 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2141 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
2142 *
2143 * "response" is NULL
2144 *
2145 * Valid errors:
2146 * SUCCESS
2147 * RADIO_NOT_AVAILABLE
2148 * GENERIC_FAILURE
2149 */
2150#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
2151
2152/**
2153 * RIL_REQUEST_SET_TTY_MODE
2154 *
2155 * Request to set the TTY mode
2156 *
2157 * "data" is int *
2158 * ((int *)data)[0] is == 0 for TTY off
2159 * ((int *)data)[0] is == 1 for TTY on
2160 *
2161 * "response" is NULL
2162 *
2163 * Valid errors:
2164 * SUCCESS
2165 * RADIO_NOT_AVAILABLE
2166 * GENERIC_FAILURE
2167 */
2168#define RIL_REQUEST_SET_TTY_MODE 80
2169
2170/**
2171 * RIL_REQUEST_QUERY_TTY_MODE
2172 *
2173 * Request the setting of TTY mode
2174 *
2175 * "data" is NULL
2176 *
2177 * "response" is int *
2178 * ((int *)response)[0] is == 0 for TTY off
2179 * ((int *)response)[0] is == 1 for TTY on
2180 *
2181 * "response" is NULL
2182 *
2183 * Valid errors:
2184 * SUCCESS
2185 * RADIO_NOT_AVAILABLE
2186 * GENERIC_FAILURE
2187 */
2188#define RIL_REQUEST_QUERY_TTY_MODE 81
2189
2190/**
2191 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
2192 *
2193 * Request to set the preferred voice privacy mode used in voice
2194 * scrambling
2195 *
2196 * "data" is int *
2197 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2198 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
2199 *
2200 * "response" is NULL
2201 *
2202 * Valid errors:
2203 * SUCCESS
2204 * RADIO_NOT_AVAILABLE
2205 * GENERIC_FAILURE
2206 */
2207#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
2208
2209/**
2210 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
2211 *
2212 * Request the setting of preferred voice privacy mode
2213 *
2214 * "data" is NULL
2215 *
2216 * "response" is int *
2217 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2218 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
2219 *
2220 * "response" is NULL
2221 *
2222 * Valid errors:
2223 * SUCCESS
2224 * RADIO_NOT_AVAILABLE
2225 * GENERIC_FAILURE
2226 */
2227#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
2228
2229/**
2230 * RIL_REQUEST_CDMA_FLASH
2231 *
2232 * Send FLASH
2233 *
2234 * "data" is const char *
2235 * ((const char *)data)[0] is a FLASH string
2236 *
2237 * "response" is NULL
2238 *
2239 * Valid errors:
2240 * SUCCESS
2241 * RADIO_NOT_AVAILABLE
2242 * GENERIC_FAILURE
2243 *
2244 */
2245#define RIL_REQUEST_CDMA_FLASH 84
2246
2247/**
2248 * RIL_REQUEST_CDMA_BURST_DTMF
2249 *
2250 * Send DTMF string
2251 *
2252 * "data" is const char *
2253 * ((const char *)data)[0] is a DTMF string
2254 *
2255 * "response" is NULL
2256 *
2257 * Valid errors:
2258 * SUCCESS
2259 * RADIO_NOT_AVAILABLE
2260 * GENERIC_FAILURE
2261 *
2262 */
2263#define RIL_REQUEST_CDMA_BURST_DTMF 85
2264
2265/**
2266 * RIL_REQUEST_CDMA_VALIDATE_AKEY
2267 *
2268 * Validate AKey.
2269 *
2270 * "data" is const char *
2271 * ((const char *)data)[0] is a AKey string
2272 *
2273 * "response" is NULL
2274 *
2275 * Valid errors:
2276 * SUCCESS
2277 * RADIO_NOT_AVAILABLE
2278 * GENERIC_FAILURE
2279 *
2280 */
2281#define RIL_REQUEST_CDMA_VALIDATE_AKEY 86
2282
2283/**
2284 * RIL_REQUEST_CDMA_SEND_SMS
2285 *
2286 * Send a CDMA SMS message
2287 *
2288 * "data" is const RIL_CDMA_SMS_Message *
2289 *
2290 * "response" is a const RIL_SMS_Response *
2291 *
2292 * Valid errors:
2293 * SUCCESS
2294 * RADIO_NOT_AVAILABLE
2295 * GENERIC_FAILURE
2296 *
2297 */
2298#define RIL_REQUEST_CDMA_SEND_SMS 87
2299
2300/**
2301 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
2302 *
2303 * Acknowledge the success or failure in the receipt of SMS
2304 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
2305 *
2306 * "data" is const RIL_CDMA_SMS_Ack *
2307 *
2308 * "response" is NULL
2309 *
2310 * Valid errors:
2311 * SUCCESS
2312 * RADIO_NOT_AVAILABLE
2313 * GENERIC_FAILURE
2314 *
2315 */
2316#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
2317
2318/**
2319 * RIL_REQUEST_GET_BROADCAST_CONFIG
2320 *
2321 * Request the setting of GSM/WCDMA Cell Broadcast SMS config
2322 *
2323 * "data" is NULL
2324 *
2325 * "response" is const RIL_BroadcastSMSConfig *
2326 *
2327 * Valid errors:
2328 * SUCCESS
2329 * RADIO_NOT_AVAILABLE
2330 * GENERIC_FAILURE
2331 *
2332 */
2333#define RIL_REQUEST_GET_BROADCAST_CONFIG 89
2334
2335/**
2336 * RIL_REQUEST_SET_BROADCAST_CONFIG
2337 *
2338 * Set GSM/WCDMA Cell Broadcast SMS config
2339 *
2340 * "data" is const RIL_BroadcastSMSConfig *
2341 *
2342 * "response" is NULL
2343 *
2344 * Valid errors:
2345 * SUCCESS
2346 * RADIO_NOT_AVAILABLE
2347 * GENERIC_FAILURE
2348 *
2349 */
2350#define RIL_REQUEST_SET_BROADCAST_CONFIG 90
2351
2352/**
2353 * RIL_REQUEST_BROADCAST_ACTIVATION
2354 *
2355 * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
2356 *
2357 * "data" is const int *
2358 * (const int *)data[0] indicates to activate or turn off the
2359 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
2360 * 0 - Activate, 1 - Turn off
2361 *
2362 * "response" is NULL
2363 *
2364 * Valid errors:
2365 * SUCCESS
2366 * RADIO_NOT_AVAILABLE
2367 * GENERIC_FAILURE
2368 *
2369 */
2370#define RIL_REQUEST_BROADCAST_ACTIVATION 91
2371
2372/**
2373 * RIL_REQUEST_CDMA_GET_BROADCAST_CONFIG
2374 *
2375 * Request the setting of CDMA Broadcast SMS config
2376 *
2377 * "data" is NULL
2378 *
2379 * "response" is const RIL_CDMA_BroadcastSMSConfig *
2380 *
2381 * Valid errors:
2382 * SUCCESS
2383 * RADIO_NOT_AVAILABLE
2384 * GENERIC_FAILURE
2385 *
2386 */
2387#define RIL_REQUEST_CDMA_GET_BROADCAST_CONFIG 92
2388
2389/**
2390 * RIL_REQUEST_CDMA_SET_BROADCAST_CONFIG
2391 *
2392 * Set CDMA Broadcast SMS config
2393 *
2394 * "data" is const RIL_CDMA_BroadcastSMSConfig *
2395 *
2396 * "response" is NULL
2397 *
2398 * Valid errors:
2399 * SUCCESS
2400 * RADIO_NOT_AVAILABLE
2401 * GENERIC_FAILURE
2402 *
2403 */
2404#define RIL_REQUEST_CDMA_SET_BROADCAST_CONFIG 93
2405
2406/**
2407 * RIL_REQUEST_CDMA_BROADCAST_ACTIVATION
2408 *
2409 * Enable or disable the reception of CDMA Broadcast SMS
2410 *
2411 * "data" is const int *
2412 * (const int *)data[0] indicates to activate or turn off the
2413 * reception of CDMA Broadcast SMS, 0-1,
2414 * 0 - Activate, 1 - Turn off
2415 *
2416 * "response" is NULL
2417 *
2418 * Valid errors:
2419 * SUCCESS
2420 * RADIO_NOT_AVAILABLE
2421 * GENERIC_FAILURE
2422 *
2423 */
2424#define RIL_REQUEST_CDMA_BROADCAST_ACTIVATION 94
2425
2426/**
2427 * RIL_REQUEST_CDMA_SUBSCRIPTION
2428 *
2429 * Request the device MDN / H_SID / H_NID.
2430 *
2431 * The request is only allowed when CDMA subscription is available. When CDMA
2432 * subscription is changed, application layer should re-issue the request to
2433 * update the subscription information.
2434 *
2435 * If a NULL value is returned for any of the device id, it means that error
2436 * accessing the device.
2437 *
2438 * "response" is const char **
2439 * ((const char **)response)[0] is MDN if CDMA subscription is available
2440 * ((const char **)response)[1] is H_SID (Home SID) if CDMA subscription is available
2441 * ((const char **)response)[2] is H_NID (Home SID) if CDMA subscription is available
2442 *
2443 * Valid errors:
2444 * SUCCESS
2445 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
2446 */
2447
Wink Savilleeafe79d2009-04-03 18:02:34 -07002448#define RIL_REQUEST_CDMA_SUBSCRIPTION 95
Wink Savillef4c4d362009-04-02 01:37:03 -07002449
2450/**
2451 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
2452 *
2453 * Stores a CDMA SMS message to RUIM memory.
2454 *
2455 * "data" is RIL_CDMA_SMS_WriteArgs *
2456 *
2457 * "response" is int *
2458 * ((const int *)response)[0] is the record index where the message is stored.
2459 *
2460 * Valid errors:
2461 * SUCCESS
2462 * RADIO_NOT_AVAILABLE
2463 * GENERIC_FAILURE
2464 *
2465 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07002466#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
Wink Savillef4c4d362009-04-02 01:37:03 -07002467
2468/**
2469 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
2470 *
2471 * Deletes a CDMA SMS message from RUIM memory.
2472 *
2473 * "data" is int *
2474 * ((int *)data)[0] is the record index of the message to delete.
2475 *
2476 * "response" is NULL
2477 *
2478 * Valid errors:
2479 * SUCCESS
2480 * RADIO_NOT_AVAILABLE
2481 * GENERIC_FAILURE
2482 *
2483 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07002484#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
Wink Savillef4c4d362009-04-02 01:37:03 -07002485
2486/**
2487 * RIL_REQUEST_DEVICE_IDENTITY
Wink Savilleeafe79d2009-04-03 18:02:34 -07002488 *
2489 * Request the device ESN / MEID / IMEI / IMEISV.
2490 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002491 * The request is always allowed and contains GSM and CDMA device identity;
Wink Savilleeafe79d2009-04-03 18:02:34 -07002492 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
Wink Savillef4c4d362009-04-02 01:37:03 -07002493 * RIL_REQUEST_GET_IMEISV.
Wink Savilleeafe79d2009-04-03 18:02:34 -07002494 *
2495 * If a NULL value is returned for any of the device id, it means that error
Wink Savillef4c4d362009-04-02 01:37:03 -07002496 * accessing the device.
Wink Savilleeafe79d2009-04-03 18:02:34 -07002497 *
2498 * When CDMA subscription is changed the ESN/MEID may change. The application
Wink Savillef4c4d362009-04-02 01:37:03 -07002499 * layer should re-issue the request to update the device identity in this case.
Wink Savilleeafe79d2009-04-03 18:02:34 -07002500 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002501 * "response" is const char **
Wink Savilleeafe79d2009-04-03 18:02:34 -07002502 * ((const char **)response)[0] is IMEI if GSM subscription is available
2503 * ((const char **)response)[1] is IMEISV if GSM subscription is available
2504 * ((const char **)response)[2] is ESN if CDMA subscription is available
2505 * ((const char **)response)[3] is MEID if CDMA subscription is available
2506 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002507 * Valid errors:
2508 * SUCCESS
2509 * RADIO_NOT_AVAILABLE
2510 * GENERIC_FAILURE
2511 */
Wink Savilleeafe79d2009-04-03 18:02:34 -07002512#define RIL_REQUEST_DEVICE_IDENTITY 98
Wink Savillef4c4d362009-04-02 01:37:03 -07002513
2514
2515
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002516/***********************************************************************/
2517
Wink Savillef4c4d362009-04-02 01:37:03 -07002518
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002519#define RIL_UNSOL_RESPONSE_BASE 1000
2520
2521/**
2522 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
2523 *
2524 * Indicate when value of RIL_RadioState has changed.
2525 *
2526 * Callee will invoke RIL_RadioStateRequest method on main thread
2527 *
2528 * "data" is NULL
2529 */
2530
2531#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
2532
2533
2534/**
2535 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
2536 *
2537 * Indicate when call state has changed
2538 *
2539 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
2540 *
2541 * "data" is NULL
2542 *
2543 * Response should be invoked on, for example,
2544 * "RING", "BUSY", "NO CARRIER", and also call state
2545 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
2546 *
2547 * Redundent or extraneous invocations are tolerated
2548 */
2549#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
2550
2551
2552/**
2553 * RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2554 *
2555 * Called when network state, operator name, or GPRS state has changed
2556 * Basically on, +CREG and +CGREG
2557 *
2558 * Callee will invoke the following requests on main thread:
2559 *
2560 * RIL_REQUEST_REGISTRATION_STATE
2561 * RIL_REQUEST_GPRS_REGISTRATION_STATE
2562 * RIL_REQUEST_OPERATOR
2563 *
2564 * "data" is NULL
2565 *
2566 * FIXME should this happen when SIM records are loaded? (eg, for
2567 * EONS)
2568 */
2569#define RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 1002
2570
2571/**
2572 * RIL_UNSOL_RESPONSE_NEW_SMS
2573 *
2574 * Called when new SMS is received.
2575 *
2576 * "data" is const char *
2577 * This is a pointer to a string containing the PDU of an SMS-DELIVER
2578 * as an ascii string of hex digits. The PDU starts with the SMSC address
2579 * per TS 27.005 (+CMT:)
2580 *
2581 * Callee will subsequently confirm the receipt of thei SMS with a
2582 * RIL_REQUEST_SMS_ACKNOWLEDGE
2583 *
2584 * No new RIL_UNSOL_RESPONSE_NEW_SMS
2585 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
2586 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
2587 */
2588
2589#define RIL_UNSOL_RESPONSE_NEW_SMS 1003
2590
2591/**
2592 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
2593 *
2594 * Called when new SMS Status Report is received.
2595 *
2596 * "data" is const char *
2597 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
2598 * as an ascii string of hex digits. The PDU starts with the SMSC address
2599 * per TS 27.005 (+CDS:).
2600 *
2601 * Callee will subsequently confirm the receipt of the SMS with a
2602 * RIL_REQUEST_SMS_ACKNOWLEDGE
2603 *
2604 * No new RIL_UNSOL_RESPONSE_NEW_SMS
2605 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
2606 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
2607 */
2608
2609#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
2610
2611/**
2612 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
2613 *
2614 * Called when new SMS has been stored on SIM card
2615 *
2616 * "data" is const int *
2617 * ((const int *)data)[0] contains the slot index on the SIM that contains
2618 * the new message
2619 */
2620
2621#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
2622
2623/**
2624 * RIL_UNSOL_ON_USSD
2625 *
2626 * Called when a new USSD message is received.
2627 *
2628 * "data" is const char **
2629 * ((const char **)data)[0] points to a type code, which is
2630 * one of these string values:
2631 * "0" USSD-Notify -- text in ((const char **)data)[1]
2632 * "1" USSD-Request -- text in ((const char **)data)[1]
2633 * "2" Session terminated by network
2634 * "3" other local client (eg, SIM Toolkit) has responded
2635 * "4" Operation not supported
2636 * "5" Network timeout
2637 *
2638 * The USSD session is assumed to persist if the type code is "1", otherwise
2639 * the current session (if any) is assumed to have terminated.
2640 *
2641 * ((const char **)data)[1] points to a message string if applicable, which
2642 * should always be in UTF-8.
2643 */
2644#define RIL_UNSOL_ON_USSD 1006
2645/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
2646
2647/**
2648 * RIL_UNSOL_ON_USSD_REQUEST
2649 *
2650 * Obsolete. Send via RIL_UNSOL_ON_USSD
2651 */
2652#define RIL_UNSOL_ON_USSD_REQUEST 1007
2653
2654
2655/**
2656 * RIL_UNSOL_NITZ_TIME_RECEIVED
2657 *
2658 * Called when radio has received a NITZ time message
2659 *
2660 * "data" is const char * pointing to NITZ time string
2661 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
2662 */
2663#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
2664
2665/**
2666 * RIL_UNSOL_SIGNAL_STRENGTH
2667 *
2668 * Radio may report signal strength rather han have it polled.
2669 *
2670 * "data" is an "int *"
2671 * ((int *)response)[0] is received signal strength (0-31, 99)
2672 * ((int *)response)[1] is bit error rate (0-7, 99)
2673 * as defined in TS 27.007 8.5
2674 * Other values (eg -1) are not legal
2675 */
2676#define RIL_UNSOL_SIGNAL_STRENGTH 1009
2677
2678
2679/**
Wink Savillef4c4d362009-04-02 01:37:03 -07002680 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002681 *
2682 * Indicate a PDP context state has changed, or a new context
2683 * has been activated or deactivated
Wink Savillef4c4d362009-04-02 01:37:03 -07002684 * replaces RIL_UNSOL_PDP_CONTEXT_LIST_CHANGED
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002685 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002686 * "data" is an array of RIL_Data_Call_Response identical to that
2687 * returned by RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002688 *
Wink Savillef4c4d362009-04-02 01:37:03 -07002689 * See also: RIL_REQUEST_DATA_CALL_LIST
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002690 */
2691
Wink Savillef4c4d362009-04-02 01:37:03 -07002692#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002693
2694/**
2695 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
2696 *
2697 * Reports supplementary service related notification from the network.
2698 *
2699 * "data" is a const RIL_SuppSvcNotification *
2700 *
2701 */
2702
2703#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
2704
2705/**
2706 * RIL_UNSOL_STK_SESSION_END
2707 *
2708 * Indicate when STK session is terminated by SIM.
2709 *
2710 * "data" is NULL
2711 */
2712#define RIL_UNSOL_STK_SESSION_END 1012
2713
2714/**
2715 * RIL_UNSOL_STK_PROACTIVE_COMMAND
2716 *
2717 * Indicate when SIM issue a STK proactive command to applications
2718 *
2719 * "data" is a const char * containing SAT/USAT proactive command
2720 * in hexadecimal format string starting with command tag
2721 *
2722 */
2723#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
2724
2725/**
2726 * RIL_UNSOL_STK_EVENT_NOTIFY
2727 *
2728 * Indicate when SIM notifies applcations some event happens.
2729 * Generally, application does not need to have any feedback to
2730 * SIM but shall be able to indicate appropriate messages to users.
2731 *
2732 * "data" is a const char * containing SAT/USAT commands or responses
2733 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
2734 * starting with first byte of response data or command tag
2735 *
2736 */
2737#define RIL_UNSOL_STK_EVENT_NOTIFY 1014
2738
2739/**
2740 * RIL_UNSOL_STK_CALL_SETUP
2741 *
2742 * Indicate when SIM wants application to setup a voice call.
2743 *
2744 * "data" is const int *
2745 * ((const int *)data)[0] contains timeout value (in milliseconds)
2746 */
2747#define RIL_UNSOL_STK_CALL_SETUP 1015
2748
2749/**
2750 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
2751 *
2752 * Indicates that SMS storage on the SIM is full. Sent when the network
2753 * attempts to deliver a new SMS message. Messages cannot be saved on the
2754 * SIM until space is freed. In particular, incoming Class 2 messages
2755 * cannot be stored.
2756 *
2757 * "data" is null
2758 *
2759 */
2760#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
2761
2762/**
2763 * RIL_UNSOL_SIM_REFRESH
2764 *
2765 * Indicates that file(s) on the SIM have been updated, or the SIM
2766 * has been reinitialized.
2767 *
2768 * "data" is an int *
2769 * ((int *)data)[0] is a RIL_SimRefreshResult.
2770 * ((int *)data)[1] is the EFID of the updated file if the result is
2771 * SIM_FILE_UPDATE or NULL for any other result.
2772 *
2773 * Note: If the radio state changes as a result of the SIM refresh (eg,
2774 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
2775 * should be sent.
2776 */
2777#define RIL_UNSOL_SIM_REFRESH 1017
2778
2779/**
2780 * RIL_UNSOL_CALL_RING
2781 *
2782 * Ring indication for an incoming call (eg, RING or CRING event).
2783 *
2784 * "data" is null
2785 */
2786#define RIL_UNSOL_CALL_RING 1018
2787
The Android Open Source Project34a51082009-03-05 14:34:37 -08002788/**
2789 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
2790 *
2791 * Indicates that SIM state changes.
Wink Savillef4c4d362009-04-02 01:37:03 -07002792 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08002793 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
Wink Savillef4c4d362009-04-02 01:37:03 -07002794
The Android Open Source Project34a51082009-03-05 14:34:37 -08002795 * "data" is null
2796 */
2797#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
2798
2799/**
2800 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
2801 *
2802 * Called when new CDMA SMS is received
Wink Savillef4c4d362009-04-02 01:37:03 -07002803 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08002804 * "data" is const RIL_CDMA_SMS_Message *
Wink Savillef4c4d362009-04-02 01:37:03 -07002805 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08002806 * Callee will subsequently confirm the receipt of the SMS with
2807 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
Wink Savillef4c4d362009-04-02 01:37:03 -07002808 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08002809 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
2810 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
Wink Savillef4c4d362009-04-02 01:37:03 -07002811 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08002812 */
2813#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
2814
2815/**
2816 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
2817 *
2818 * Called when new Broadcast SMS is received
Wink Savillef4c4d362009-04-02 01:37:03 -07002819 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08002820 * "data" is const char * of 88 bytes which indicates each page
2821 * of a CBS Message sent to the MS by the BTS as coded in 3GPP
2822 * 23.041 Section 9.4.1.1
Wink Savillef4c4d362009-04-02 01:37:03 -07002823 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08002824 */
2825#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
Wink Savillef4c4d362009-04-02 01:37:03 -07002826
The Android Open Source Project34a51082009-03-05 14:34:37 -08002827/**
2828 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
2829 *
2830 * Indicates that SMS storage on the RUIM is full. Messages
2831 * cannot be saved on the RUIM until space is freed.
2832 *
2833 * "data" is null
Wink Savillef4c4d362009-04-02 01:37:03 -07002834 *
The Android Open Source Project34a51082009-03-05 14:34:37 -08002835 */
Wink Savillef4c4d362009-04-02 01:37:03 -07002836#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
2837
The Android Open Source Project34a51082009-03-05 14:34:37 -08002838/**
2839 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
2840 *
2841 * Indicates a restricted state change (eg, for Domain Specific Access Control).
2842 *
2843 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
2844 *
2845 * "data" is an int *
2846 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
2847 */
2848#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
2849
2850
2851
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002852/***********************************************************************/
2853
2854
2855/**
2856 * RIL_Request Function pointer
2857 *
2858 * @param request is one of RIL_REQUEST_*
2859 * @param data is pointer to data defined for that RIL_REQUEST_*
2860 * data is owned by caller, and should not be modified or freed by callee
2861 * @param t should be used in subsequent call to RIL_onResponse
2862 * @param datalen the length of data
2863 *
2864 */
2865typedef void (*RIL_RequestFunc) (int request, void *data,
2866 size_t datalen, RIL_Token t);
2867
2868/**
2869 * This function should return the current radio state synchronously
2870 */
2871typedef RIL_RadioState (*RIL_RadioStateRequest)();
2872
2873/**
2874 * This function returns "1" if the specified RIL_REQUEST code is
2875 * supported and 0 if it is not
2876 *
2877 * @param requestCode is one of RIL_REQUEST codes
2878 */
2879
2880typedef int (*RIL_Supports)(int requestCode);
2881
2882/**
2883 * This function is called from a separate thread--not the
2884 * thread that calls RIL_RequestFunc--and indicates that a pending
2885 * request should be cancelled.
2886 *
2887 * On cancel, the callee should do its best to abandon the request and
2888 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
2889 *
2890 * Subsequent calls to RIL_onRequestComplete for this request with
2891 * other results will be tolerated but ignored. (That is, it is valid
2892 * to ignore the cancellation request)
2893 *
2894 * RIL_Cancel calls should return immediately, and not wait for cancellation
2895 *
2896 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
2897 * interface
2898 *
2899 * @param t token wants to be canceled
2900 */
2901
2902typedef void (*RIL_Cancel)(RIL_Token t);
2903
2904typedef void (*RIL_TimedCallback) (void *param);
2905
2906/**
2907 * Return a version string for your RIL implementation
2908 */
2909typedef const char * (*RIL_GetVersion) (void);
2910
2911typedef struct {
2912 int version; /* set to RIL_VERSION */
2913 RIL_RequestFunc onRequest;
2914 RIL_RadioStateRequest onStateRequest;
2915 RIL_Supports supports;
2916 RIL_Cancel onCancel;
2917 RIL_GetVersion getVersion;
2918} RIL_RadioFunctions;
2919
2920#ifdef RIL_SHLIB
2921struct RIL_Env {
2922 /**
2923 * "t" is parameter passed in on previous call to RIL_Notification
2924 * routine.
2925 *
2926 * If "e" != SUCCESS, then response can be null/is ignored
2927 *
2928 * "response" is owned by caller, and should not be modified or
2929 * freed by callee
2930 *
2931 * RIL_onRequestComplete will return as soon as possible
2932 */
2933 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
2934 void *response, size_t responselen);
2935
2936 /**
2937 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
2938 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
2939 *
2940 * "data" is owned by caller, and should not be modified or freed by callee
2941 */
2942
2943 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
2944 size_t datalen);
2945
2946 /**
2947 * Call user-specifed "callback" function on on the same thread that
2948 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
2949 * a relative time value at which the callback is invoked. If relativeTime is
2950 * NULL or points to a 0-filled structure, the callback will be invoked as
2951 * soon as possible
2952 */
2953
2954 void (*RequestTimedCallback) (RIL_TimedCallback callback,
2955 void *param, const struct timeval *relativeTime);
2956};
2957
2958
2959/**
2960 * RIL implementations must defined RIL_Init
2961 * argc and argv will be command line arguments intended for the RIL implementation
2962 * Return NULL on error
2963 *
2964 * @param env is environment point defined as RIL_Env
2965 * @param argc number of arguments
2966 * @param argv list fo arguments
2967 *
2968 */
2969const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
2970
2971#else /* RIL_SHLIB */
2972
2973/**
2974 * Call this once at startup to register notification routine
2975 *
2976 * @param callbacks user-specifed callback function
2977 */
2978void RIL_register (const RIL_RadioFunctions *callbacks);
2979
2980
2981/**
2982 *
2983 * RIL_onRequestComplete will return as soon as possible
2984 *
2985 * @param t is parameter passed in on previous call to RIL_Notification
Wink Savillef4c4d362009-04-02 01:37:03 -07002986 * routine.
The Android Open Source Project00f06fc2009-03-03 19:32:15 -08002987 * @param e error code
2988 * if "e" != SUCCESS, then response can be null/is ignored
2989 * @param response is owned by caller, and should not be modified or
2990 * freed by callee
2991 * @param responselen the length of response in byte
2992 */
2993void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
2994 void *response, size_t responselen);
2995
2996/**
2997 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
2998 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
2999 * "data" is owned by caller, and should not be modified or freed by callee
3000 * @param datalen the length of data in byte
3001 */
3002
3003void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
3004 size_t datalen);
3005
3006
3007/**
3008 * Call user-specifed "callback" function on on the same thread that
3009 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
3010 * a relative time value at which the callback is invoked. If relativeTime is
3011 * NULL or points to a 0-filled structure, the callback will be invoked as
3012 * soon as possible
3013 *
3014 * @param callback user-specifed callback function
3015 * @param param parameter list
3016 * @param relativeTime a relative time value at which the callback is invoked
3017 */
3018
3019void RIL_requestTimedCallback (RIL_TimedCallback callback,
3020 void *param, const struct timeval *relativeTime);
3021
3022
3023#endif /* RIL_SHLIB */
3024
3025#ifdef __cplusplus
3026}
3027#endif
3028
3029#endif /*ANDROID_RIL_H*/