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