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 | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 17 | #ifndef ANDROID_RIL_H |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 18 | #define ANDROID_RIL_H 1 |
| 19 | |
| 20 | #include <stdlib.h> |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 21 | #include <stdint.h> |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 22 | #ifndef FEATURE_UNIT_TEST |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 23 | #include <sys/time.h> |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 24 | #endif /* !FEATURE_UNIT_TEST */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 25 | |
| 26 | #ifdef __cplusplus |
| 27 | extern "C" { |
| 28 | #endif |
| 29 | |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 30 | #define RIL_VERSION 8 /* Current version */ |
Alex Yakavenka | 45e740e | 2012-01-31 11:48:27 -0800 | [diff] [blame] | 31 | #define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 32 | |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 33 | #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64 |
| 34 | #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81 |
| 35 | |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 36 | typedef void * RIL_Token; |
| 37 | |
| 38 | typedef enum { |
| 39 | RIL_E_SUCCESS = 0, |
| 40 | RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */ |
| 41 | RIL_E_GENERIC_FAILURE = 2, |
| 42 | RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */ |
| 43 | RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */ |
| 44 | RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */ |
| 45 | RIL_E_REQUEST_NOT_SUPPORTED = 6, |
| 46 | RIL_E_CANCELLED = 7, |
| 47 | RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice |
| 48 | call on a Class C GPRS device */ |
| 49 | RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device |
| 50 | registers in network */ |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 51 | RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */ |
| 52 | RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription |
| 53 | shall be retrieved because of SIM or RUIM |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 54 | card absent */ |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 55 | 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] | 56 | location */ |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 57 | RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */ |
John Wang | 7553447 | 2010-04-20 15:11:42 -0700 | [diff] [blame] | 58 | RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */ |
| 59 | RIL_E_ILLEGAL_SIM_OR_ME = 15 /* network selection failed due to |
| 60 | illegal SIM or ME */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 61 | } RIL_Errno; |
| 62 | |
| 63 | typedef enum { |
| 64 | RIL_CALL_ACTIVE = 0, |
| 65 | RIL_CALL_HOLDING = 1, |
| 66 | RIL_CALL_DIALING = 2, /* MO call only */ |
| 67 | RIL_CALL_ALERTING = 3, /* MO call only */ |
| 68 | RIL_CALL_INCOMING = 4, /* MT call only */ |
| 69 | RIL_CALL_WAITING = 5 /* MT call only */ |
| 70 | } RIL_CallState; |
| 71 | |
| 72 | typedef enum { |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 73 | RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */ |
| 74 | RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */ |
Naveen Kalla | 2bc78d6 | 2011-12-07 16:22:53 -0800 | [diff] [blame] | 75 | /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */ |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 76 | 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] | 77 | 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] | 78 | personalization locked, or SIM absent */ |
| 79 | RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */ |
| 80 | RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */ |
| 81 | 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] | 82 | 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] | 83 | personalization locked, or RUIM absent */ |
| 84 | RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */ |
Naveen Kalla | 2bc78d6 | 2011-12-07 16:22:53 -0800 | [diff] [blame] | 85 | RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */ |
| 86 | RADIO_STATE_ON = 10 /* Radio is on */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 87 | } RIL_RadioState; |
| 88 | |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 89 | typedef enum { |
| 90 | RADIO_TECH_UNKNOWN = 0, |
| 91 | RADIO_TECH_GPRS = 1, |
| 92 | RADIO_TECH_EDGE = 2, |
| 93 | RADIO_TECH_UMTS = 3, |
| 94 | RADIO_TECH_IS95A = 4, |
| 95 | RADIO_TECH_IS95B = 5, |
| 96 | RADIO_TECH_1xRTT = 6, |
| 97 | RADIO_TECH_EVDO_0 = 7, |
| 98 | RADIO_TECH_EVDO_A = 8, |
| 99 | RADIO_TECH_HSDPA = 9, |
| 100 | RADIO_TECH_HSUPA = 10, |
| 101 | RADIO_TECH_HSPA = 11, |
| 102 | RADIO_TECH_EVDO_B = 12, |
| 103 | RADIO_TECH_EHRPD = 13, |
Glenn Kasten | c941961 | 2011-02-02 17:44:18 -0800 | [diff] [blame] | 104 | RADIO_TECH_LTE = 14, |
Naveen Kalla | 2bc78d6 | 2011-12-07 16:22:53 -0800 | [diff] [blame] | 105 | RADIO_TECH_HSPAP = 15, // HSPA+ |
| 106 | RADIO_TECH_GSM = 16 // Only supports voice |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 107 | } RIL_RadioTechnology; |
| 108 | |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 109 | // Do we want to split Data from Voice and the use |
| 110 | // RIL_RadioTechnology for get/setPreferredVoice/Data ? |
| 111 | typedef enum { |
| 112 | PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */ |
| 113 | PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */ |
| 114 | PREF_NET_TYPE_WCDMA = 2, /* WCDMA */ |
| 115 | PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */ |
| 116 | PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */ |
| 117 | PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */ |
| 118 | PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */ |
| 119 | PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */ |
| 120 | PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */ |
| 121 | PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */ |
| 122 | PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */ |
Uma Maheswari Ramalingam | 0e09487 | 2011-09-28 13:25:48 -0700 | [diff] [blame] | 123 | PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */ |
| 124 | PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 125 | } RIL_PreferredNetworkType; |
| 126 | |
| 127 | /* Source for cdma subscription */ |
| 128 | typedef enum { |
| 129 | CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0, |
| 130 | CDMA_SUBSCRIPTION_SOURCE_NV = 1 |
| 131 | } RIL_CdmaSubscriptionSource; |
| 132 | |
Wink Saville | 74fa388 | 2009-12-22 15:35:41 -0800 | [diff] [blame] | 133 | /* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */ |
| 134 | typedef enum { |
| 135 | RIL_UUS_TYPE1_IMPLICIT = 0, |
| 136 | RIL_UUS_TYPE1_REQUIRED = 1, |
| 137 | RIL_UUS_TYPE1_NOT_REQUIRED = 2, |
| 138 | RIL_UUS_TYPE2_REQUIRED = 3, |
| 139 | RIL_UUS_TYPE2_NOT_REQUIRED = 4, |
| 140 | RIL_UUS_TYPE3_REQUIRED = 5, |
| 141 | RIL_UUS_TYPE3_NOT_REQUIRED = 6 |
| 142 | } RIL_UUS_Type; |
| 143 | |
| 144 | /* User-to-User Signaling Information data coding schemes. Possible values for |
| 145 | * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been |
| 146 | * specified in section 10.5.4.25 of 3GPP TS 24.008 */ |
| 147 | typedef enum { |
| 148 | RIL_UUS_DCS_USP = 0, /* User specified protocol */ |
| 149 | RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */ |
| 150 | RIL_UUS_DCS_X244 = 2, /* X.244 */ |
| 151 | RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement |
| 152 | convergence function */ |
| 153 | RIL_UUS_DCS_IA5c = 4 /* IA5 characters */ |
| 154 | } RIL_UUS_DCS; |
| 155 | |
| 156 | /* User-to-User Signaling Information defined in 3GPP 23.087 v8.0 |
| 157 | * This data is passed in RIL_ExtensionRecord and rec contains this |
| 158 | * structure when type is RIL_UUS_INFO_EXT_REC */ |
| 159 | typedef struct { |
| 160 | RIL_UUS_Type uusType; /* UUS Type */ |
| 161 | RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */ |
| 162 | int uusLength; /* Length of UUS Data */ |
| 163 | char * uusData; /* UUS Data */ |
| 164 | } RIL_UUS_Info; |
| 165 | |
| 166 | /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */ |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 167 | typedef struct { |
| 168 | char isPresent; /* non-zero if signal information record is present */ |
| 169 | char signalType; /* as defined 3.7.5.5-1 */ |
| 170 | char alertPitch; /* as defined 3.7.5.5-2 */ |
| 171 | char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */ |
| 172 | } RIL_CDMA_SignalInfoRecord; |
| 173 | |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 174 | typedef struct { |
| 175 | RIL_CallState state; |
| 176 | int index; /* Connection Index for use with, eg, AT+CHLD */ |
| 177 | int toa; /* type of address, eg 145 = intl */ |
| 178 | char isMpty; /* nonzero if is mpty call */ |
| 179 | char isMT; /* nonzero if call is mobile terminated */ |
| 180 | char als; /* ALS line indicator if available |
| 181 | (0 = line 1) */ |
| 182 | char isVoice; /* nonzero if this is is a voice call */ |
| 183 | char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */ |
| 184 | char * number; /* Remote party number */ |
| 185 | int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ |
| 186 | char * name; /* Remote party name */ |
| 187 | int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ |
Wink Saville | 74fa388 | 2009-12-22 15:35:41 -0800 | [diff] [blame] | 188 | RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 189 | } RIL_Call; |
| 190 | |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 191 | /* Deprecated, use RIL_Data_Call_Response_v6 */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 192 | typedef struct { |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 193 | int cid; /* Context ID, uniquely identifies this call */ |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 194 | int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ |
Lorenzo Colitti | 4f81dcf | 2010-09-01 19:38:57 -0700 | [diff] [blame] | 195 | char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. |
| 196 | For example, "IP", "IPV6", "IPV4V6", or "PPP". */ |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 197 | char * apn; /* ignored */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 198 | char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */ |
| 199 | } RIL_Data_Call_Response_v4; |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 200 | |
| 201 | /* |
| 202 | * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST |
| 203 | * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0. |
| 204 | */ |
| 205 | typedef struct { |
| 206 | int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ |
Kazuhiro Ondo | beb25b5 | 2011-06-17 16:26:45 -0500 | [diff] [blame] | 207 | int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry |
| 208 | back-off timer value RIL wants to override the one |
| 209 | pre-configured in FW. |
| 210 | The unit is miliseconds. |
| 211 | The value < 0 means no value is suggested. |
Kazuhiro Ondo | 1615758 | 2011-07-24 07:56:32 -0700 | [diff] [blame] | 212 | The value 0 means retry should be done ASAP. |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 213 | The value of INT_MAX(0x7fffffff) means no retry. */ |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 214 | int cid; /* Context ID, uniquely identifies this call */ |
| 215 | int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ |
| 216 | char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. |
| 217 | For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is |
| 218 | PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported |
| 219 | such as "IP" or "IPV6" */ |
| 220 | char * ifname; /* The network interface name */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 221 | char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, |
| 222 | e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 223 | May not be empty, typically 1 IPv4 or 1 IPv6 or |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 224 | one of each. If the prefix length is absent the addresses |
| 225 | are assumed to be point to point with IPv4 having a prefix |
| 226 | length of 32 and IPv6 128. */ |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 227 | char * dnses; /* A space-delimited list of DNS server addresses, |
| 228 | e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". |
| 229 | May be empty. */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 230 | char * gateways; /* A space-delimited list of default gateway addresses, |
| 231 | e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". |
| 232 | May be empty in which case the addresses represent point |
| 233 | to point connections. */ |
| 234 | } RIL_Data_Call_Response_v6; |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 235 | |
| 236 | typedef struct { |
Tammo Spalink | 8e3a2ca | 2009-09-11 11:26:30 +0800 | [diff] [blame] | 237 | int messageRef; /* TP-Message-Reference for GSM, |
| 238 | and BearerData MessageId for CDMA |
| 239 | (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 240 | char *ackPDU; /* or NULL if n/a */ |
Jaikumar Ganesh | 920c78f | 2009-06-04 10:53:15 -0700 | [diff] [blame] | 241 | int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS, |
| 242 | 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA, |
| 243 | -1 if unknown or not applicable*/ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 244 | } RIL_SMS_Response; |
| 245 | |
| 246 | /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */ |
| 247 | typedef struct { |
| 248 | int status; /* Status of message. See TS 27.005 3.1, "<stat>": */ |
| 249 | /* 0 = "REC UNREAD" */ |
| 250 | /* 1 = "REC READ" */ |
| 251 | /* 2 = "STO UNSENT" */ |
| 252 | /* 3 = "STO SENT" */ |
johnwang | f8bc167 | 2009-05-14 19:19:47 -0700 | [diff] [blame] | 253 | char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address, |
| 254 | the TP-layer length is "strlen(pdu)/2". */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 255 | char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte |
| 256 | (as expected by TS 27.005) or NULL for default SMSC */ |
| 257 | } RIL_SMS_WriteArgs; |
| 258 | |
| 259 | /** Used by RIL_REQUEST_DIAL */ |
| 260 | typedef struct { |
| 261 | char * address; |
| 262 | int clir; |
| 263 | /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR" |
| 264 | * clir == 0 on "use subscription default value" |
| 265 | * clir == 1 on "CLIR invocation" (restrict CLI presentation) |
| 266 | * clir == 2 on "CLIR suppression" (allow CLI presentation) |
| 267 | */ |
Wink Saville | 74fa388 | 2009-12-22 15:35:41 -0800 | [diff] [blame] | 268 | RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 269 | } RIL_Dial; |
| 270 | |
| 271 | typedef struct { |
| 272 | int command; /* one of the commands listed for TS 27.007 +CRSM*/ |
| 273 | int fileid; /* EF id */ |
| 274 | char *path; /* "pathid" from TS 27.007 +CRSM command. |
| 275 | Path is in hex asciii format eg "7f205f70" |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 276 | Path must always be provided. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 277 | */ |
| 278 | int p1; |
| 279 | int p2; |
| 280 | int p3; |
| 281 | char *data; /* May be NULL*/ |
| 282 | char *pin2; /* May be NULL*/ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 283 | } RIL_SIM_IO_v5; |
| 284 | |
| 285 | typedef struct { |
| 286 | int command; /* one of the commands listed for TS 27.007 +CRSM*/ |
| 287 | int fileid; /* EF id */ |
| 288 | char *path; /* "pathid" from TS 27.007 +CRSM command. |
| 289 | Path is in hex asciii format eg "7f205f70" |
| 290 | Path must always be provided. |
| 291 | */ |
| 292 | int p1; |
| 293 | int p2; |
| 294 | int p3; |
| 295 | char *data; /* May be NULL*/ |
| 296 | char *pin2; /* May be NULL*/ |
| 297 | char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */ |
| 298 | } RIL_SIM_IO_v6; |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 299 | |
| 300 | typedef struct { |
| 301 | int sw1; |
| 302 | int sw2; |
| 303 | char *simResponse; /* In hex string format ([a-fA-F0-9]*). */ |
| 304 | } RIL_SIM_IO_Response; |
| 305 | |
| 306 | /* See also com.android.internal.telephony.gsm.CallForwardInfo */ |
| 307 | |
| 308 | typedef struct { |
| 309 | int status; /* |
| 310 | * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS |
| 311 | * status 1 = active, 0 = not active |
| 312 | * |
| 313 | * For RIL_REQUEST_SET_CALL_FORWARD: |
| 314 | * status is: |
| 315 | * 0 = disable |
| 316 | * 1 = enable |
| 317 | * 2 = interrogate |
| 318 | * 3 = registeration |
| 319 | * 4 = erasure |
| 320 | */ |
| 321 | |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 322 | int reason; /* from TS 27.007 7.11 "reason" */ |
| 323 | int serviceClass;/* From 27.007 +CCFC/+CLCK "class" |
| 324 | See table for Android mapping from |
| 325 | MMI service code |
| 326 | 0 means user doesn't input class */ |
| 327 | int toa; /* "type" from TS 27.007 7.11 */ |
| 328 | char * number; /* "number" from TS 27.007 7.11. May be NULL */ |
| 329 | int timeSeconds; /* for CF no reply only */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 330 | }RIL_CallForwardInfo; |
| 331 | |
| 332 | typedef struct { |
johnwang | e0ba6a9 | 2009-09-11 19:14:52 -0700 | [diff] [blame] | 333 | char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM. |
| 334 | * Upper 16 bits is LAC and lower 16 bits |
| 335 | * is CID (as described in TS 27.005) |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 336 | * Primary Scrambling Code (as described in TS 25.331) |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 337 | * in 9 bits in UMTS |
johnwang | e0ba6a9 | 2009-09-11 19:14:52 -0700 | [diff] [blame] | 338 | * Valid values are hexadecimal 0x0000 - 0xffffffff. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 339 | */ |
johnwang | e0ba6a9 | 2009-09-11 19:14:52 -0700 | [diff] [blame] | 340 | int rssi; /* Received RSSI in GSM, |
| 341 | * Level index of CPICH Received Signal Code Power in UMTS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 342 | */ |
| 343 | } RIL_NeighboringCell; |
| 344 | |
| 345 | /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */ |
| 346 | typedef enum { |
Naveen Kalla | 1b3a6fe | 2010-04-21 16:44:37 -0700 | [diff] [blame] | 347 | CALL_FAIL_UNOBTAINABLE_NUMBER = 1, |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 348 | CALL_FAIL_NORMAL = 16, |
| 349 | CALL_FAIL_BUSY = 17, |
| 350 | CALL_FAIL_CONGESTION = 34, |
| 351 | CALL_FAIL_ACM_LIMIT_EXCEEDED = 68, |
| 352 | CALL_FAIL_CALL_BARRED = 240, |
| 353 | CALL_FAIL_FDN_BLOCKED = 241, |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 354 | CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242, |
| 355 | CALL_FAIL_IMEI_NOT_ACCEPTED = 243, |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 356 | CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000, |
| 357 | CALL_FAIL_CDMA_DROP = 1001, |
| 358 | CALL_FAIL_CDMA_INTERCEPT = 1002, |
| 359 | CALL_FAIL_CDMA_REORDER = 1003, |
| 360 | CALL_FAIL_CDMA_SO_REJECT = 1004, |
| 361 | CALL_FAIL_CDMA_RETRY_ORDER = 1005, |
| 362 | CALL_FAIL_CDMA_ACCESS_FAILURE = 1006, |
| 363 | CALL_FAIL_CDMA_PREEMPTED = 1007, |
| 364 | CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed |
| 365 | during emergency callback mode */ |
Naveen Kalla | 03c1edf | 2009-09-23 11:18:35 -0700 | [diff] [blame] | 366 | CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 367 | CALL_FAIL_ERROR_UNSPECIFIED = 0xffff |
| 368 | } RIL_LastCallFailCause; |
| 369 | |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 370 | /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 371 | typedef enum { |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 372 | PDP_FAIL_NONE = 0, /* No error, connection ok */ |
| 373 | |
| 374 | /* an integer cause code defined in TS 24.008 |
| 375 | section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B. |
| 376 | If the implementation does not have access to the exact cause codes, |
| 377 | then it should return one of the following values, |
| 378 | as the UI layer needs to distinguish these |
| 379 | cases for error notification and potential retries. */ |
Jaikumar Ganesh | d6aa2e3 | 2009-05-04 11:09:46 -0700 | [diff] [blame] | 380 | PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */ |
| 381 | PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A, |
| 382 | PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */ |
| 383 | PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */ |
| 384 | PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */ |
| 385 | PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */ |
| 386 | PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F, |
| 387 | PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */ |
| 388 | PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */ |
| 389 | PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22, |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 390 | PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */ |
Wink Saville | 3d14a71 | 2013-08-05 14:44:01 -0700 | [diff] [blame] | 391 | PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* restart radio */ |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 392 | PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */ |
| 393 | PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */ |
| 394 | PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34, |
Jaikumar Ganesh | d6aa2e3 | 2009-05-04 11:09:46 -0700 | [diff] [blame] | 395 | PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */ |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 396 | |
Jaikumar Ganesh | d6aa2e3 | 2009-05-04 11:09:46 -0700 | [diff] [blame] | 397 | /* Not mentioned in the specification */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 398 | PDP_FAIL_VOICE_REGISTRATION_FAIL = -1, |
| 399 | PDP_FAIL_DATA_REGISTRATION_FAIL = -2, |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 400 | |
| 401 | /* reasons for data call drop - network/modem disconnect */ |
Wink Saville | 3492c6e | 2013-10-03 13:53:27 -0700 | [diff] [blame^] | 402 | PDP_FAIL_SIGNAL_LOST = -3, |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 403 | PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry |
| 404 | with parameters appropriate for new technology */ |
| 405 | PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting, |
| 406 | powered off - no retry */ |
| 407 | PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered |
| 408 | mode was up on same APN/data profile - no retry until |
| 409 | tethered call is off */ |
| 410 | |
| 411 | PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */ |
| 412 | } RIL_DataCallFailCause; |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 413 | |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 414 | /* See RIL_REQUEST_SETUP_DATA_CALL */ |
| 415 | typedef enum { |
| 416 | RIL_DATA_PROFILE_DEFAULT = 0, |
| 417 | RIL_DATA_PROFILE_TETHERED = 1, |
| 418 | RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */ |
| 419 | } RIL_DataProfile; |
| 420 | |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 421 | /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */ |
| 422 | typedef struct { |
| 423 | int notificationType; /* |
| 424 | * 0 = MO intermediate result code |
| 425 | * 1 = MT unsolicited result code |
| 426 | */ |
| 427 | int code; /* See 27.007 7.17 |
| 428 | "code1" for MO |
| 429 | "code2" for MT. */ |
| 430 | int index; /* CUG index. See 27.007 7.17. */ |
| 431 | int type; /* "type" from 27.007 7.17 (MT only). */ |
| 432 | char * number; /* "number" from 27.007 7.17 |
| 433 | (MT only, may be NULL). */ |
| 434 | } RIL_SuppSvcNotification; |
| 435 | |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 436 | #define RIL_CARD_MAX_APPS 8 |
| 437 | |
| 438 | typedef enum { |
| 439 | RIL_CARDSTATE_ABSENT = 0, |
| 440 | RIL_CARDSTATE_PRESENT = 1, |
| 441 | RIL_CARDSTATE_ERROR = 2 |
| 442 | } RIL_CardState; |
| 443 | |
| 444 | typedef enum { |
| 445 | RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */ |
| 446 | RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */ |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 447 | RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished |
| 448 | since each app can only have 1 active perso |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 449 | involved */ |
| 450 | RIL_PERSOSUBSTATE_SIM_NETWORK = 3, |
| 451 | RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4, |
| 452 | RIL_PERSOSUBSTATE_SIM_CORPORATE = 5, |
| 453 | RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6, |
| 454 | RIL_PERSOSUBSTATE_SIM_SIM = 7, |
| 455 | RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */ |
| 456 | RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9, |
| 457 | RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10, |
| 458 | RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11, |
| 459 | RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12, |
| 460 | RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13, |
| 461 | RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14, |
| 462 | RIL_PERSOSUBSTATE_RUIM_HRPD = 15, |
| 463 | RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16, |
| 464 | RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17, |
| 465 | RIL_PERSOSUBSTATE_RUIM_RUIM = 18, |
| 466 | RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */ |
| 467 | RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20, |
| 468 | RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21, |
| 469 | RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22, |
| 470 | RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23, |
| 471 | RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24 |
| 472 | } RIL_PersoSubstate; |
| 473 | |
| 474 | typedef enum { |
| 475 | RIL_APPSTATE_UNKNOWN = 0, |
| 476 | RIL_APPSTATE_DETECTED = 1, |
| 477 | RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */ |
| 478 | RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */ |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 479 | RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 480 | when app_state is assigned to this value */ |
| 481 | RIL_APPSTATE_READY = 5 |
| 482 | } RIL_AppState; |
| 483 | |
| 484 | typedef enum { |
| 485 | RIL_PINSTATE_UNKNOWN = 0, |
| 486 | RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1, |
| 487 | RIL_PINSTATE_ENABLED_VERIFIED = 2, |
| 488 | RIL_PINSTATE_DISABLED = 3, |
| 489 | RIL_PINSTATE_ENABLED_BLOCKED = 4, |
| 490 | RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5 |
| 491 | } RIL_PinState; |
| 492 | |
| 493 | typedef enum { |
| 494 | RIL_APPTYPE_UNKNOWN = 0, |
| 495 | RIL_APPTYPE_SIM = 1, |
| 496 | RIL_APPTYPE_USIM = 2, |
| 497 | RIL_APPTYPE_RUIM = 3, |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 498 | RIL_APPTYPE_CSIM = 4, |
| 499 | RIL_APPTYPE_ISIM = 5 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 500 | } RIL_AppType; |
| 501 | |
| 502 | typedef struct |
| 503 | { |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 504 | RIL_AppType app_type; |
| 505 | RIL_AppState app_state; |
| 506 | RIL_PersoSubstate perso_substate; /* applicable only if app_state == |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 507 | RIL_APPSTATE_SUBSCRIPTION_PERSO */ |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 508 | char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41, |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 509 | 0x30, 0x30, 0x30 */ |
| 510 | char *app_label_ptr; /* null terminated string */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 511 | int pin1_replaced; /* applicable to USIM, CSIM & ISIM */ |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 512 | RIL_PinState pin1; |
| 513 | RIL_PinState pin2; |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 514 | } RIL_AppStatus; |
| 515 | |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 516 | /* Deprecated, use RIL_CardStatus_v6 */ |
| 517 | typedef struct |
| 518 | { |
| 519 | RIL_CardState card_state; |
| 520 | RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ |
| 521 | int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ |
| 522 | int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ |
| 523 | int num_applications; /* value <= RIL_CARD_MAX_APPS */ |
| 524 | RIL_AppStatus applications[RIL_CARD_MAX_APPS]; |
| 525 | } RIL_CardStatus_v5; |
| 526 | |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 527 | typedef struct |
| 528 | { |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 529 | RIL_CardState card_state; |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 530 | RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 531 | int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ |
| 532 | int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ |
| 533 | int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 534 | int num_applications; /* value <= RIL_CARD_MAX_APPS */ |
| 535 | RIL_AppStatus applications[RIL_CARD_MAX_APPS]; |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 536 | } RIL_CardStatus_v6; |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 537 | |
Alex Yakavenka | 45e740e | 2012-01-31 11:48:27 -0800 | [diff] [blame] | 538 | /** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH |
| 539 | * or as part of RIL_SimRefreshResponse_v7 |
| 540 | */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 541 | typedef enum { |
| 542 | /* A file on SIM has been updated. data[1] contains the EFID. */ |
| 543 | SIM_FILE_UPDATE = 0, |
Alex Yakavenka | 45e740e | 2012-01-31 11:48:27 -0800 | [diff] [blame] | 544 | /* SIM initialized. All files should be re-read. */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 545 | SIM_INIT = 1, |
| 546 | /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */ |
| 547 | SIM_RESET = 2 |
| 548 | } RIL_SimRefreshResult; |
| 549 | |
Alex Yakavenka | 45e740e | 2012-01-31 11:48:27 -0800 | [diff] [blame] | 550 | typedef struct { |
| 551 | RIL_SimRefreshResult result; |
| 552 | int ef_id; /* is the EFID of the updated file if the result is */ |
| 553 | /* SIM_FILE_UPDATE or 0 for any other result. */ |
| 554 | char * aid; /* is AID(application ID) of the card application */ |
| 555 | /* See ETSI 102.221 8.1 and 101.220 4 */ |
| 556 | /* For SIM_FILE_UPDATE result it can be set to AID of */ |
| 557 | /* application in which updated EF resides or it can be */ |
| 558 | /* NULL if EF is outside of an application. */ |
| 559 | /* For SIM_INIT result this field is set to AID of */ |
| 560 | /* application that caused REFRESH */ |
| 561 | /* For SIM_RESET result it is NULL. */ |
| 562 | } RIL_SimRefreshResponse_v7; |
| 563 | |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 564 | /* Deprecated, use RIL_CDMA_CallWaiting_v6 */ |
| 565 | typedef struct { |
| 566 | char * number; /* Remote party number */ |
| 567 | int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ |
| 568 | char * name; /* Remote party name */ |
| 569 | RIL_CDMA_SignalInfoRecord signalInfoRecord; |
| 570 | } RIL_CDMA_CallWaiting_v5; |
| 571 | |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 572 | typedef struct { |
| 573 | char * number; /* Remote party number */ |
| 574 | int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ |
| 575 | char * name; /* Remote party name */ |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 576 | RIL_CDMA_SignalInfoRecord signalInfoRecord; |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 577 | /* Number type/Number plan required to support International Call Waiting */ |
| 578 | int number_type; /* 0=Unknown, 1=International, 2=National, |
| 579 | 3=Network specific, 4=subscriber */ |
| 580 | int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */ |
| 581 | } RIL_CDMA_CallWaiting_v6; |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 582 | |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 583 | /** |
| 584 | * Which types of Cell Broadcast Message (CBM) are to be received by the ME |
| 585 | * |
| 586 | * uFromServiceID - uToServiceID defines a range of CBM message identifiers |
| 587 | * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS |
| 588 | * and 9.4.4.2.2 for UMTS. All other values can be treated as empty |
| 589 | * CBM message ID. |
| 590 | * |
| 591 | * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes |
| 592 | * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS |
| 593 | * and 9.4.4.2.3 for UMTS. |
| 594 | * All other values can be treated as empty CBM data coding scheme. |
| 595 | * |
| 596 | * selected 0 means message types specified in <fromServiceId, toServiceId> |
| 597 | * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted. |
| 598 | * |
| 599 | * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and |
| 600 | * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG. |
| 601 | */ |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 602 | typedef struct { |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 603 | int fromServiceId; |
| 604 | int toServiceId; |
| 605 | int fromCodeScheme; |
| 606 | int toCodeScheme; |
| 607 | unsigned char selected; |
| 608 | } RIL_GSM_BroadcastSmsConfigInfo; |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 609 | |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 610 | /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */ |
| 611 | #define RIL_RESTRICTED_STATE_NONE 0x00 |
| 612 | /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */ |
| 613 | #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01 |
| 614 | /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */ |
| 615 | #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02 |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 616 | /* 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] | 617 | #define RIL_RESTRICTED_STATE_CS_ALL 0x04 |
| 618 | /* Block packet data access due to restriction. */ |
| 619 | #define RIL_RESTRICTED_STATE_PS_ALL 0x10 |
| 620 | |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 621 | /* The status for an OTASP/OTAPA session */ |
| 622 | typedef enum { |
| 623 | CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED, |
| 624 | CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED, |
| 625 | CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED, |
| 626 | CDMA_OTA_PROVISION_STATUS_SSD_UPDATED, |
| 627 | CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED, |
| 628 | CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED, |
| 629 | CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED, |
| 630 | CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED, |
| 631 | CDMA_OTA_PROVISION_STATUS_COMMITTED, |
| 632 | CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED, |
| 633 | CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED, |
| 634 | CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED |
| 635 | } RIL_CDMA_OTA_ProvisionStatus; |
| 636 | |
| 637 | typedef struct { |
| 638 | int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ |
| 639 | int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ |
| 640 | } RIL_GW_SignalStrength; |
| 641 | |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 642 | typedef struct { |
| 643 | int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ |
| 644 | int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ |
| 645 | } RIL_SignalStrengthWcdma; |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 646 | |
| 647 | typedef struct { |
| 648 | int dbm; /* Valid values are positive integers. This value is the actual RSSI value |
| 649 | * multiplied by -1. Example: If the actual RSSI is -75, then this response |
| 650 | * value will be 75. |
| 651 | */ |
| 652 | int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied |
| 653 | * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value |
| 654 | * will be 125. |
| 655 | */ |
| 656 | } RIL_CDMA_SignalStrength; |
| 657 | |
| 658 | |
| 659 | typedef struct { |
| 660 | int dbm; /* Valid values are positive integers. This value is the actual RSSI value |
| 661 | * multiplied by -1. Example: If the actual RSSI is -75, then this response |
| 662 | * value will be 75. |
| 663 | */ |
| 664 | int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied |
| 665 | * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value |
| 666 | * will be 125. |
| 667 | */ |
| 668 | int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */ |
| 669 | } RIL_EVDO_SignalStrength; |
| 670 | |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 671 | typedef struct { |
| 672 | int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ |
Wink Saville | 473adc9 | 2011-06-13 10:24:09 -0700 | [diff] [blame] | 673 | int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1. |
| 674 | * Range: 44 to 140 dBm |
| 675 | * INT_MAX: 0x7FFFFFFF denotes invalid value. |
| 676 | * Reference: 3GPP TS 36.133 9.1.4 */ |
| 677 | int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1. |
| 678 | * Range: 20 to 3 dB. |
| 679 | * INT_MAX: 0x7FFFFFFF denotes invalid value. |
| 680 | * Reference: 3GPP TS 36.133 9.1.7 */ |
| 681 | int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units. |
| 682 | * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). |
| 683 | * INT_MAX : 0x7FFFFFFF denotes invalid value. |
| 684 | * Reference: 3GPP TS 36.101 8.1.1 */ |
| 685 | int cqi; /* The current Channel Quality Indicator. |
| 686 | * Range: 0 to 15. |
| 687 | * INT_MAX : 0x7FFFFFFF denotes invalid value. |
| 688 | * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 689 | } RIL_LTE_SignalStrength; |
| 690 | |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 691 | typedef struct { |
| 692 | int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ |
| 693 | int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1. |
| 694 | * Range: 44 to 140 dBm |
| 695 | * INT_MAX: 0x7FFFFFFF denotes invalid value. |
| 696 | * Reference: 3GPP TS 36.133 9.1.4 */ |
| 697 | int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1. |
| 698 | * Range: 20 to 3 dB. |
| 699 | * INT_MAX: 0x7FFFFFFF denotes invalid value. |
| 700 | * Reference: 3GPP TS 36.133 9.1.7 */ |
| 701 | int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units. |
| 702 | * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). |
| 703 | * INT_MAX : 0x7FFFFFFF denotes invalid value. |
| 704 | * Reference: 3GPP TS 36.101 8.1.1 */ |
| 705 | int cqi; /* The current Channel Quality Indicator. |
| 706 | * Range: 0 to 15. |
| 707 | * INT_MAX : 0x7FFFFFFF denotes invalid value. |
| 708 | * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */ |
| 709 | int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device. |
| 710 | * Approximate distance can be calculated using 300m/us * timingAdvance. |
| 711 | * Range: 0 to 0x7FFFFFFE |
| 712 | * INT_MAX : 0x7FFFFFFF denotes invalid value. |
| 713 | * Reference: 3GPP 36.321 section 6.1.3.5 |
| 714 | * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */ |
| 715 | } RIL_LTE_SignalStrength_v8; |
| 716 | |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 717 | /* Deprecated, use RIL_SignalStrength_v6 */ |
| 718 | typedef struct { |
| 719 | RIL_GW_SignalStrength GW_SignalStrength; |
| 720 | RIL_CDMA_SignalStrength CDMA_SignalStrength; |
| 721 | RIL_EVDO_SignalStrength EVDO_SignalStrength; |
| 722 | } RIL_SignalStrength_v5; |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 723 | |
| 724 | typedef struct { |
| 725 | RIL_GW_SignalStrength GW_SignalStrength; |
| 726 | RIL_CDMA_SignalStrength CDMA_SignalStrength; |
| 727 | RIL_EVDO_SignalStrength EVDO_SignalStrength; |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 728 | RIL_LTE_SignalStrength LTE_SignalStrength; |
| 729 | } RIL_SignalStrength_v6; |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 730 | |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 731 | typedef struct { |
| 732 | RIL_GW_SignalStrength GW_SignalStrength; |
| 733 | RIL_CDMA_SignalStrength CDMA_SignalStrength; |
| 734 | RIL_EVDO_SignalStrength EVDO_SignalStrength; |
| 735 | RIL_LTE_SignalStrength_v8 LTE_SignalStrength; |
| 736 | } RIL_SignalStrength_v8; |
| 737 | |
| 738 | /** RIL_CellIdentityGsm */ |
| 739 | typedef struct { |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 740 | int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ |
| 741 | int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ |
| 742 | int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ |
| 743 | int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */ |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 744 | } RIL_CellIdentityGsm; |
| 745 | |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 746 | /** RIL_CellIdentityWcdma */ |
| 747 | typedef struct { |
| 748 | int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ |
| 749 | int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ |
| 750 | int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ |
| 751 | int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ |
| 752 | int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */ |
| 753 | } RIL_CellIdentityWcdma; |
| 754 | |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 755 | /** RIL_CellIdentityCdma */ |
| 756 | typedef struct { |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 757 | int networkId; /* Network Id 0..65535, INT_MAX if unknown */ |
| 758 | int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */ |
| 759 | int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */ |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 760 | int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. |
| 761 | * It is represented in units of 0.25 seconds and ranges from -2592000 |
| 762 | * to 2592000, both values inclusive (corresponding to a range of -180 |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 763 | * to +180 degrees). INT_MAX if unknown */ |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 764 | |
| 765 | int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. |
| 766 | * It is represented in units of 0.25 seconds and ranges from -1296000 |
| 767 | * to 1296000, both values inclusive (corresponding to a range of -90 |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 768 | * to +90 degrees). INT_MAX if unknown */ |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 769 | } RIL_CellIdentityCdma; |
| 770 | |
| 771 | /** RIL_CellIdentityLte */ |
| 772 | typedef struct { |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 773 | int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ |
| 774 | int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ |
| 775 | int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */ |
| 776 | int pci; /* physical cell id 0..503, INT_MAX if unknown */ |
| 777 | int tac; /* 16-bit tracking area code, INT_MAX if unknown */ |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 778 | } RIL_CellIdentityLte; |
| 779 | |
| 780 | /** RIL_CellInfoGsm */ |
| 781 | typedef struct { |
| 782 | RIL_CellIdentityGsm cellIdentityGsm; |
| 783 | RIL_GW_SignalStrength signalStrengthGsm; |
| 784 | } RIL_CellInfoGsm; |
| 785 | |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 786 | /** RIL_CellInfoWcdma */ |
| 787 | typedef struct { |
| 788 | RIL_CellIdentityWcdma cellIdentityWcdma; |
| 789 | RIL_SignalStrengthWcdma signalStrengthWcdma; |
| 790 | } RIL_CellInfoWcdma; |
| 791 | |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 792 | /** RIL_CellInfoCdma */ |
| 793 | typedef struct { |
| 794 | RIL_CellIdentityCdma cellIdentityCdma; |
| 795 | RIL_CDMA_SignalStrength signalStrengthCdma; |
| 796 | RIL_EVDO_SignalStrength signalStrengthEvdo; |
| 797 | } RIL_CellInfoCdma; |
| 798 | |
| 799 | /** RIL_CellInfoLte */ |
| 800 | typedef struct { |
| 801 | RIL_CellIdentityLte cellIdentityLte; |
| 802 | RIL_LTE_SignalStrength_v8 signalStrengthLte; |
| 803 | } RIL_CellInfoLte; |
| 804 | |
| 805 | // Must be the same as CellInfo.TYPE_XXX |
| 806 | typedef enum { |
| 807 | RIL_CELL_INFO_TYPE_GSM = 1, |
| 808 | RIL_CELL_INFO_TYPE_CDMA = 2, |
| 809 | RIL_CELL_INFO_TYPE_LTE = 3, |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 810 | RIL_CELL_INFO_TYPE_WCDMA = 4, |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 811 | } RIL_CellInfoType; |
| 812 | |
| 813 | // Must be the same as CellInfo.TIMESTAMP_TYPE_XXX |
| 814 | typedef enum { |
| 815 | RIL_TIMESTAMP_TYPE_UNKNOWN = 0, |
| 816 | RIL_TIMESTAMP_TYPE_ANTENNA = 1, |
| 817 | RIL_TIMESTAMP_TYPE_MODEM = 2, |
| 818 | RIL_TIMESTAMP_TYPE_OEM_RIL = 3, |
| 819 | RIL_TIMESTAMP_TYPE_JAVA_RIL = 4, |
| 820 | } RIL_TimeStampType; |
| 821 | |
| 822 | typedef struct { |
| 823 | RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */ |
| 824 | int registered; /* !0 if this cell is registered 0 if not registered */ |
| 825 | RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */ |
| 826 | uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */ |
| 827 | union { |
| 828 | RIL_CellInfoGsm gsm; |
| 829 | RIL_CellInfoCdma cdma; |
| 830 | RIL_CellInfoLte lte; |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 831 | RIL_CellInfoWcdma wcdma; |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 832 | } CellInfo; |
| 833 | } RIL_CellInfo; |
| 834 | |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 835 | /* Names of the CDMA info records (C.S0005 section 3.7.5) */ |
| 836 | typedef enum { |
| 837 | RIL_CDMA_DISPLAY_INFO_REC, |
| 838 | RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC, |
| 839 | RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC, |
| 840 | RIL_CDMA_CONNECTED_NUMBER_INFO_REC, |
| 841 | RIL_CDMA_SIGNAL_INFO_REC, |
| 842 | RIL_CDMA_REDIRECTING_NUMBER_INFO_REC, |
| 843 | RIL_CDMA_LINE_CONTROL_INFO_REC, |
| 844 | RIL_CDMA_EXTENDED_DISPLAY_INFO_REC, |
| 845 | RIL_CDMA_T53_CLIR_INFO_REC, |
| 846 | RIL_CDMA_T53_RELEASE_INFO_REC, |
| 847 | RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC |
| 848 | } RIL_CDMA_InfoRecName; |
| 849 | |
| 850 | /* Display Info Rec as defined in C.S0005 section 3.7.5.1 |
| 851 | Extended Display Info Rec as defined in C.S0005 section 3.7.5.16 |
| 852 | Note: the Extended Display info rec contains multiple records of the |
| 853 | form: display_tag, display_len, and display_len occurrences of the |
| 854 | chari field if the display_tag is not 10000000 or 10000001. |
| 855 | To save space, the records are stored consecutively in a byte buffer. |
| 856 | The display_tag, display_len and chari fields are all 1 byte. |
| 857 | */ |
| 858 | |
| 859 | typedef struct { |
| 860 | char alpha_len; |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 861 | char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH]; |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 862 | } RIL_CDMA_DisplayInfoRecord; |
| 863 | |
| 864 | /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2 |
| 865 | Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3 |
| 866 | Connected Number Info Rec as defined in C.S0005 section 3.7.5.4 |
| 867 | */ |
| 868 | |
| 869 | typedef struct { |
| 870 | char len; |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 871 | char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH]; |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 872 | char number_type; |
| 873 | char number_plan; |
| 874 | char pi; |
| 875 | char si; |
| 876 | } RIL_CDMA_NumberInfoRecord; |
| 877 | |
| 878 | /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */ |
| 879 | typedef enum { |
| 880 | RIL_REDIRECTING_REASON_UNKNOWN = 0, |
| 881 | RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1, |
| 882 | RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2, |
| 883 | RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9, |
| 884 | RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10, |
| 885 | RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15, |
| 886 | RIL_REDIRECTING_REASON_RESERVED |
| 887 | } RIL_CDMA_RedirectingReason; |
| 888 | |
| 889 | typedef struct { |
| 890 | RIL_CDMA_NumberInfoRecord redirectingNumber; |
| 891 | /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */ |
| 892 | RIL_CDMA_RedirectingReason redirectingReason; |
| 893 | } RIL_CDMA_RedirectingNumberInfoRecord; |
| 894 | |
| 895 | /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */ |
| 896 | typedef struct { |
| 897 | char lineCtrlPolarityIncluded; |
| 898 | char lineCtrlToggle; |
| 899 | char lineCtrlReverse; |
| 900 | char lineCtrlPowerDenial; |
| 901 | } RIL_CDMA_LineControlInfoRecord; |
| 902 | |
| 903 | /* T53 CLIR Information Record */ |
| 904 | typedef struct { |
| 905 | char cause; |
| 906 | } RIL_CDMA_T53_CLIRInfoRecord; |
| 907 | |
| 908 | /* T53 Audio Control Information Record */ |
| 909 | typedef struct { |
| 910 | char upLink; |
| 911 | char downLink; |
| 912 | } RIL_CDMA_T53_AudioControlInfoRecord; |
| 913 | |
| 914 | typedef struct { |
| 915 | |
| 916 | RIL_CDMA_InfoRecName name; |
| 917 | |
| 918 | union { |
| 919 | /* Display and Extended Display Info Rec */ |
| 920 | RIL_CDMA_DisplayInfoRecord display; |
| 921 | |
| 922 | /* Called Party Number, Calling Party Number, Connected Number Info Rec */ |
| 923 | RIL_CDMA_NumberInfoRecord number; |
| 924 | |
| 925 | /* Signal Info Rec */ |
| 926 | RIL_CDMA_SignalInfoRecord signal; |
| 927 | |
| 928 | /* Redirecting Number Info Rec */ |
| 929 | RIL_CDMA_RedirectingNumberInfoRecord redir; |
| 930 | |
| 931 | /* Line Control Info Rec */ |
| 932 | RIL_CDMA_LineControlInfoRecord lineCtrl; |
| 933 | |
| 934 | /* T53 CLIR Info Rec */ |
| 935 | RIL_CDMA_T53_CLIRInfoRecord clir; |
| 936 | |
| 937 | /* T53 Audio Control Info Rec */ |
| 938 | RIL_CDMA_T53_AudioControlInfoRecord audioCtrl; |
| 939 | } rec; |
| 940 | } RIL_CDMA_InformationRecord; |
| 941 | |
| 942 | #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10 |
| 943 | |
| 944 | typedef struct { |
| 945 | char numberOfInfoRecs; |
| 946 | RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS]; |
| 947 | } RIL_CDMA_InformationRecords; |
| 948 | |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 949 | /** |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 950 | * RIL_REQUEST_GET_SIM_STATUS |
| 951 | * |
| 952 | * Requests status of the SIM interface and the SIM card |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 953 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 954 | * "data" is NULL |
| 955 | * |
Wink Saville | fd72937 | 2011-02-22 16:19:39 -0800 | [diff] [blame] | 956 | * "response" is const RIL_CardStatus_v6 * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 957 | * |
| 958 | * Valid errors: |
| 959 | * Must never fail |
| 960 | */ |
| 961 | #define RIL_REQUEST_GET_SIM_STATUS 1 |
| 962 | |
| 963 | /** |
| 964 | * RIL_REQUEST_ENTER_SIM_PIN |
| 965 | * |
John Wang | 309ac29 | 2009-07-30 14:53:23 -0700 | [diff] [blame] | 966 | * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 967 | * |
| 968 | * "data" is const char ** |
| 969 | * ((const char **)data)[0] is PIN value |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 970 | * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 971 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 972 | * "response" is int * |
| 973 | * ((int *)response)[0] is the number of retries remaining, or -1 if unknown |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 974 | * |
| 975 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 976 | * |
| 977 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 978 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 979 | * GENERIC_FAILURE |
| 980 | * PASSWORD_INCORRECT |
| 981 | */ |
| 982 | |
| 983 | #define RIL_REQUEST_ENTER_SIM_PIN 2 |
| 984 | |
| 985 | |
| 986 | /** |
| 987 | * RIL_REQUEST_ENTER_SIM_PUK |
| 988 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 989 | * Supplies SIM PUK and new PIN. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 990 | * |
| 991 | * "data" is const char ** |
| 992 | * ((const char **)data)[0] is PUK value |
| 993 | * ((const char **)data)[1] is new PIN value |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 994 | * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 995 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 996 | * "response" is int * |
| 997 | * ((int *)response)[0] is the number of retries remaining, or -1 if unknown |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 998 | * |
| 999 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1000 | * |
| 1001 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1002 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1003 | * GENERIC_FAILURE |
| 1004 | * PASSWORD_INCORRECT |
| 1005 | * (PUK is invalid) |
| 1006 | */ |
| 1007 | |
| 1008 | #define RIL_REQUEST_ENTER_SIM_PUK 3 |
| 1009 | |
| 1010 | /** |
| 1011 | * RIL_REQUEST_ENTER_SIM_PIN2 |
| 1012 | * |
| 1013 | * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was |
| 1014 | * returned as a a failure from a previous operation. |
| 1015 | * |
| 1016 | * "data" is const char ** |
| 1017 | * ((const char **)data)[0] is PIN2 value |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1018 | * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1019 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 1020 | * "response" is int * |
| 1021 | * ((int *)response)[0] is the number of retries remaining, or -1 if unknown |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1022 | * |
| 1023 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1024 | * |
| 1025 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1026 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1027 | * GENERIC_FAILURE |
| 1028 | * PASSWORD_INCORRECT |
| 1029 | */ |
| 1030 | |
| 1031 | #define RIL_REQUEST_ENTER_SIM_PIN2 4 |
| 1032 | |
| 1033 | /** |
| 1034 | * RIL_REQUEST_ENTER_SIM_PUK2 |
| 1035 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1036 | * Supplies SIM PUK2 and new PIN2. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1037 | * |
| 1038 | * "data" is const char ** |
| 1039 | * ((const char **)data)[0] is PUK2 value |
| 1040 | * ((const char **)data)[1] is new PIN2 value |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1041 | * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1042 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 1043 | * "response" is int * |
| 1044 | * ((int *)response)[0] is the number of retries remaining, or -1 if unknown |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1045 | * |
| 1046 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1047 | * |
| 1048 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1049 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1050 | * GENERIC_FAILURE |
| 1051 | * PASSWORD_INCORRECT |
| 1052 | * (PUK2 is invalid) |
| 1053 | */ |
| 1054 | |
| 1055 | #define RIL_REQUEST_ENTER_SIM_PUK2 5 |
| 1056 | |
| 1057 | /** |
| 1058 | * RIL_REQUEST_CHANGE_SIM_PIN |
| 1059 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1060 | * Supplies old SIM PIN and new PIN. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1061 | * |
| 1062 | * "data" is const char ** |
| 1063 | * ((const char **)data)[0] is old PIN value |
| 1064 | * ((const char **)data)[1] is new PIN value |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1065 | * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1066 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 1067 | * "response" is int * |
| 1068 | * ((int *)response)[0] is the number of retries remaining, or -1 if unknown |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1069 | * |
| 1070 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1071 | * |
| 1072 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1073 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1074 | * GENERIC_FAILURE |
| 1075 | * PASSWORD_INCORRECT |
| 1076 | * (old PIN is invalid) |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1077 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1078 | */ |
| 1079 | |
| 1080 | #define RIL_REQUEST_CHANGE_SIM_PIN 6 |
| 1081 | |
| 1082 | |
| 1083 | /** |
| 1084 | * RIL_REQUEST_CHANGE_SIM_PIN2 |
| 1085 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1086 | * Supplies old SIM PIN2 and new PIN2. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1087 | * |
| 1088 | * "data" is const char ** |
| 1089 | * ((const char **)data)[0] is old PIN2 value |
| 1090 | * ((const char **)data)[1] is new PIN2 value |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1091 | * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1092 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 1093 | * "response" is int * |
| 1094 | * ((int *)response)[0] is the number of retries remaining, or -1 if unknown |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1095 | * |
| 1096 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1097 | * |
| 1098 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1099 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1100 | * GENERIC_FAILURE |
| 1101 | * PASSWORD_INCORRECT |
| 1102 | * (old PIN2 is invalid) |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1103 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1104 | */ |
| 1105 | |
| 1106 | #define RIL_REQUEST_CHANGE_SIM_PIN2 7 |
| 1107 | |
| 1108 | /** |
| 1109 | * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION |
| 1110 | * |
| 1111 | * Requests that network personlization be deactivated |
| 1112 | * |
| 1113 | * "data" is const char ** |
| 1114 | * ((const char **)(data))[0]] is network depersonlization code |
| 1115 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 1116 | * "response" is int * |
| 1117 | * ((int *)response)[0] is the number of retries remaining, or -1 if unknown |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1118 | * |
| 1119 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1120 | * |
| 1121 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1122 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1123 | * GENERIC_FAILURE |
| 1124 | * PASSWORD_INCORRECT |
| 1125 | * (code is invalid) |
| 1126 | */ |
| 1127 | |
| 1128 | #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8 |
| 1129 | |
| 1130 | /** |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1131 | * RIL_REQUEST_GET_CURRENT_CALLS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1132 | * |
| 1133 | * Requests current call list |
| 1134 | * |
| 1135 | * "data" is NULL |
| 1136 | * |
| 1137 | * "response" must be a "const RIL_Call **" |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1138 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1139 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1140 | * |
| 1141 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1142 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1143 | * GENERIC_FAILURE |
| 1144 | * (request will be made again in a few hundred msec) |
| 1145 | */ |
| 1146 | |
| 1147 | #define RIL_REQUEST_GET_CURRENT_CALLS 9 |
| 1148 | |
| 1149 | |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1150 | /** |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1151 | * RIL_REQUEST_DIAL |
| 1152 | * |
| 1153 | * Initiate voice call |
| 1154 | * |
| 1155 | * "data" is const RIL_Dial * |
| 1156 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1157 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1158 | * This method is never used for supplementary service codes |
| 1159 | * |
| 1160 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1161 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1162 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1163 | * GENERIC_FAILURE |
| 1164 | */ |
| 1165 | #define RIL_REQUEST_DIAL 10 |
| 1166 | |
| 1167 | /** |
| 1168 | * RIL_REQUEST_GET_IMSI |
| 1169 | * |
| 1170 | * Get the SIM IMSI |
| 1171 | * |
Naveen Kalla | 2bc78d6 | 2011-12-07 16:22:53 -0800 | [diff] [blame] | 1172 | * Only valid when radio state is "RADIO_STATE_ON" |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1173 | * |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1174 | * "data" is const char ** |
| 1175 | * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1176 | * "response" is a const char * containing the IMSI |
| 1177 | * |
| 1178 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1179 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1180 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1181 | * GENERIC_FAILURE |
| 1182 | */ |
| 1183 | |
| 1184 | #define RIL_REQUEST_GET_IMSI 11 |
| 1185 | |
| 1186 | /** |
| 1187 | * RIL_REQUEST_HANGUP |
| 1188 | * |
| 1189 | * Hang up a specific line (like AT+CHLD=1x) |
| 1190 | * |
John Wang | 06bae4b | 2010-11-18 16:37:09 -0800 | [diff] [blame] | 1191 | * After this HANGUP request returns, RIL should show the connection is NOT |
| 1192 | * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. |
| 1193 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1194 | * "data" is an int * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1195 | * (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] | 1196 | * |
| 1197 | * "response" is NULL |
| 1198 | * |
| 1199 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1200 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1201 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1202 | * GENERIC_FAILURE |
| 1203 | */ |
| 1204 | |
| 1205 | #define RIL_REQUEST_HANGUP 12 |
| 1206 | |
| 1207 | /** |
| 1208 | * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND |
| 1209 | * |
| 1210 | * Hang up waiting or held (like AT+CHLD=0) |
| 1211 | * |
John Wang | 06bae4b | 2010-11-18 16:37:09 -0800 | [diff] [blame] | 1212 | * After this HANGUP request returns, RIL should show the connection is NOT |
| 1213 | * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. |
| 1214 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1215 | * "data" is NULL |
| 1216 | * "response" is NULL |
| 1217 | * |
| 1218 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1219 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1220 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1221 | * GENERIC_FAILURE |
| 1222 | */ |
| 1223 | |
| 1224 | #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13 |
| 1225 | |
| 1226 | /** |
| 1227 | * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND |
| 1228 | * |
| 1229 | * Hang up waiting or held (like AT+CHLD=1) |
| 1230 | * |
John Wang | 06bae4b | 2010-11-18 16:37:09 -0800 | [diff] [blame] | 1231 | * After this HANGUP request returns, RIL should show the connection is NOT |
| 1232 | * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. |
| 1233 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1234 | * "data" is NULL |
| 1235 | * "response" is NULL |
| 1236 | * |
| 1237 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1238 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1239 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1240 | * GENERIC_FAILURE |
| 1241 | */ |
| 1242 | |
| 1243 | #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14 |
| 1244 | |
| 1245 | /** |
| 1246 | * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE |
| 1247 | * |
| 1248 | * Switch waiting or holding call and active call (like AT+CHLD=2) |
| 1249 | * |
| 1250 | * State transitions should be is follows: |
| 1251 | * |
| 1252 | * If call 1 is waiting and call 2 is active, then if this re |
| 1253 | * |
| 1254 | * BEFORE AFTER |
| 1255 | * Call 1 Call 2 Call 1 Call 2 |
| 1256 | * ACTIVE HOLDING HOLDING ACTIVE |
| 1257 | * ACTIVE WAITING HOLDING ACTIVE |
| 1258 | * HOLDING WAITING HOLDING ACTIVE |
| 1259 | * ACTIVE IDLE HOLDING IDLE |
| 1260 | * IDLE IDLE IDLE IDLE |
| 1261 | * |
| 1262 | * "data" is NULL |
| 1263 | * "response" is NULL |
| 1264 | * |
| 1265 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1266 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1267 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1268 | * GENERIC_FAILURE |
| 1269 | */ |
| 1270 | |
| 1271 | #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15 |
| 1272 | #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15 |
| 1273 | |
| 1274 | /** |
| 1275 | * RIL_REQUEST_CONFERENCE |
| 1276 | * |
| 1277 | * Conference holding and active (like AT+CHLD=3) |
| 1278 | |
| 1279 | * "data" is NULL |
| 1280 | * "response" is NULL |
| 1281 | * |
| 1282 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1283 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1284 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1285 | * GENERIC_FAILURE |
| 1286 | */ |
| 1287 | #define RIL_REQUEST_CONFERENCE 16 |
| 1288 | |
| 1289 | /** |
| 1290 | * RIL_REQUEST_UDUB |
| 1291 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1292 | * Send UDUB (user determined used busy) to ringing or |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1293 | * waiting call answer)(RIL_BasicRequest r); |
| 1294 | * |
| 1295 | * "data" is NULL |
| 1296 | * "response" is NULL |
| 1297 | * |
| 1298 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1299 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1300 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1301 | * GENERIC_FAILURE |
| 1302 | */ |
| 1303 | #define RIL_REQUEST_UDUB 17 |
| 1304 | |
| 1305 | /** |
| 1306 | * RIL_REQUEST_LAST_CALL_FAIL_CAUSE |
| 1307 | * |
| 1308 | * Requests the failure cause code for the most recently terminated call |
| 1309 | * |
| 1310 | * "data" is NULL |
| 1311 | * "response" is a "int *" |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1312 | * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are |
Naveen Kalla | 03c1edf | 2009-09-23 11:18:35 -0700 | [diff] [blame] | 1313 | * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA |
| 1314 | * failure reasons are derived from the possible call failure scenarios |
| 1315 | * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1316 | * |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 1317 | * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked |
| 1318 | * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED) |
| 1319 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1320 | * If the implementation does not have access to the exact cause codes, |
| 1321 | * then it should return one of the values listed in RIL_LastCallFailCause, |
| 1322 | * as the UI layer needs to distinguish these cases for tone generation or |
| 1323 | * error notification. |
| 1324 | * |
| 1325 | * Valid errors: |
| 1326 | * SUCCESS |
| 1327 | * RADIO_NOT_AVAILABLE |
| 1328 | * GENERIC_FAILURE |
| 1329 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1330 | * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1331 | */ |
| 1332 | #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18 |
| 1333 | |
| 1334 | /** |
| 1335 | * RIL_REQUEST_SIGNAL_STRENGTH |
| 1336 | * |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1337 | * Requests current signal strength and associated information |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1338 | * |
| 1339 | * Must succeed if radio is on. |
| 1340 | * |
| 1341 | * "data" is NULL |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1342 | * |
| 1343 | * "response" is a const RIL_SignalStrength * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1344 | * |
| 1345 | * Valid errors: |
| 1346 | * SUCCESS |
| 1347 | * RADIO_NOT_AVAILABLE |
| 1348 | */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1349 | #define RIL_REQUEST_SIGNAL_STRENGTH 19 |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 1350 | |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1351 | /** |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1352 | * RIL_REQUEST_VOICE_REGISTRATION_STATE |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1353 | * |
| 1354 | * Request current registration state |
| 1355 | * |
| 1356 | * "data" is NULL |
| 1357 | * "response" is a "char **" |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1358 | * ((const char **)response)[0] is registration state 0-6, |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1359 | * 0 - Not registered, MT is not currently searching |
| 1360 | * a new operator to register |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1361 | * 1 - Registered, home network |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1362 | * 2 - Not registered, but MT is currently searching |
| 1363 | * a new operator to register |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1364 | * 3 - Registration denied |
| 1365 | * 4 - Unknown |
| 1366 | * 5 - Registered, roaming |
John Wang | 7f8ded1 | 2010-01-21 15:07:28 -0800 | [diff] [blame] | 1367 | * 10 - Same as 0, but indicates that emergency calls |
| 1368 | * are enabled. |
| 1369 | * 12 - Same as 2, but indicates that emergency calls |
| 1370 | * are enabled. |
| 1371 | * 13 - Same as 3, but indicates that emergency calls |
| 1372 | * are enabled. |
| 1373 | * 14 - Same as 4, but indicates that emergency calls |
| 1374 | * are enabled. |
| 1375 | * |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1376 | * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or |
| 1377 | * NULL if not.Valid LAC are 0x0000 - 0xffff |
| 1378 | * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or |
| 1379 | * NULL if not. |
| 1380 | * Valid CID are 0x00000000 - 0xffffffff |
| 1381 | * In GSM, CID is Cell ID (see TS 27.007) |
| 1382 | * in 16 bits |
| 1383 | * In UMTS, CID is UMTS Cell Identity |
| 1384 | * (see TS 25.331) in 28 bits |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 1385 | * ((const char **)response)[3] indicates the available voice radio technology, |
| 1386 | * valid values as defined by RIL_RadioTechnology. |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1387 | * ((const char **)response)[4] is Base Station ID if registered on a CDMA |
| 1388 | * system or NULL if not. Base Station ID in |
jsh | 29be25c | 2009-07-14 20:18:59 -0700 | [diff] [blame] | 1389 | * decimal format |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1390 | * ((const char **)response)[5] is Base Station latitude if registered on a |
| 1391 | * CDMA system or NULL if not. Base Station |
Naveen Kalla | 36b721c | 2009-10-13 18:29:41 -0700 | [diff] [blame] | 1392 | * latitude is a decimal number as specified in |
| 1393 | * 3GPP2 C.S0005-A v6.0. It is represented in |
| 1394 | * units of 0.25 seconds and ranges from -1296000 |
| 1395 | * to 1296000, both values inclusive (corresponding |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 1396 | * to a range of -90 to +90 degrees). |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1397 | * ((const char **)response)[6] is Base Station longitude if registered on a |
| 1398 | * CDMA system or NULL if not. Base Station |
Naveen Kalla | 36b721c | 2009-10-13 18:29:41 -0700 | [diff] [blame] | 1399 | * longitude is a decimal number as specified in |
| 1400 | * 3GPP2 C.S0005-A v6.0. It is represented in |
| 1401 | * units of 0.25 seconds and ranges from -2592000 |
| 1402 | * to 2592000, both values inclusive (corresponding |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 1403 | * to a range of -180 to +180 degrees). |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1404 | * ((const char **)response)[7] is concurrent services support indicator if |
| 1405 | * registered on a CDMA system 0-1. |
| 1406 | * 0 - Concurrent services not supported, |
| 1407 | * 1 - Concurrent services supported |
| 1408 | * ((const char **)response)[8] is System ID if registered on a CDMA system or |
| 1409 | * NULL if not. Valid System ID are 0 - 32767 |
| 1410 | * ((const char **)response)[9] is Network ID if registered on a CDMA system or |
| 1411 | * NULL if not. Valid System ID are 0 - 65535 |
| 1412 | * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered |
Naveen Kalla | 03c1edf | 2009-09-23 11:18:35 -0700 | [diff] [blame] | 1413 | * on a CDMA or EVDO system or NULL if not. Valid values |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1414 | * are 0-255. |
| 1415 | * ((const char **)response)[11] indicates whether the current system is in the |
Naveen Kalla | 03c1edf | 2009-09-23 11:18:35 -0700 | [diff] [blame] | 1416 | * PRL if registered on a CDMA or EVDO system or NULL if |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1417 | * not. 0=not in the PRL, 1=in the PRL |
| 1418 | * ((const char **)response)[12] is the default Roaming Indicator from the PRL, |
Naveen Kalla | 03c1edf | 2009-09-23 11:18:35 -0700 | [diff] [blame] | 1419 | * if registered on a CDMA or EVDO system or NULL if not. |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1420 | * Valid values are 0-255. |
| 1421 | * ((const char **)response)[13] if registration state is 3 (Registration |
| 1422 | * denied) this is an enumerated reason why |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 1423 | * registration was denied. See 3GPP TS 24.008, |
| 1424 | * 10.5.3.6 and Annex G. |
| 1425 | * 0 - General |
| 1426 | * 1 - Authentication Failure |
| 1427 | * 2 - IMSI unknown in HLR |
| 1428 | * 3 - Illegal MS |
| 1429 | * 4 - Illegal ME |
| 1430 | * 5 - PLMN not allowed |
| 1431 | * 6 - Location area not allowed |
| 1432 | * 7 - Roaming not allowed |
| 1433 | * 8 - No Suitable Cells in this Location Area |
| 1434 | * 9 - Network failure |
jsh | 29be25c | 2009-07-14 20:18:59 -0700 | [diff] [blame] | 1435 | * 10 - Persistent location update reject |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1436 | * 11 - PLMN not allowed |
| 1437 | * 12 - Location area not allowed |
| 1438 | * 13 - Roaming not allowed in this Location Area |
| 1439 | * 15 - No Suitable Cells in this Location Area |
| 1440 | * 17 - Network Failure |
| 1441 | * 20 - MAC Failure |
| 1442 | * 21 - Sync Failure |
| 1443 | * 22 - Congestion |
| 1444 | * 23 - GSM Authentication unacceptable |
| 1445 | * 25 - Not Authorized for this CSG |
| 1446 | * 32 - Service option not supported |
| 1447 | * 33 - Requested service option not subscribed |
| 1448 | * 34 - Service option temporarily out of order |
| 1449 | * 38 - Call cannot be identified |
| 1450 | * 48-63 - Retry upon entry into a new cell |
| 1451 | * 95 - Semantically incorrect message |
| 1452 | * 96 - Invalid mandatory information |
| 1453 | * 97 - Message type non-existent or not implemented |
| 1454 | * 98 - Message not compatible with protocol state |
| 1455 | * 99 - Information element non-existent or not implemented |
| 1456 | * 100 - Conditional IE error |
| 1457 | * 101 - Message not compatible with protocol state |
| 1458 | * 111 - Protocol error, unspecified |
jsh | ca5e347 | 2010-06-23 21:53:24 -0700 | [diff] [blame] | 1459 | * ((const char **)response)[14] is the Primary Scrambling Code of the current |
| 1460 | * cell as described in TS 25.331, in hexadecimal |
| 1461 | * format, or NULL if unknown or not registered |
| 1462 | * to a UMTS network. |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1463 | * |
| 1464 | * Please note that registration state 4 ("unknown") is treated |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1465 | * as "out of service" in the Android telephony system |
| 1466 | * |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1467 | * Registration state 3 can be returned if Location Update Reject |
| 1468 | * (with cause 17 - Network Failure) is received repeatedly from the network, |
| 1469 | * to facilitate "managed roaming" |
| 1470 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1471 | * Valid errors: |
| 1472 | * SUCCESS |
| 1473 | * RADIO_NOT_AVAILABLE |
| 1474 | * GENERIC_FAILURE |
| 1475 | */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1476 | #define RIL_REQUEST_VOICE_REGISTRATION_STATE 20 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1477 | |
| 1478 | /** |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1479 | * RIL_REQUEST_DATA_REGISTRATION_STATE |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1480 | * |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1481 | * Request current DATA registration state |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1482 | * |
| 1483 | * "data" is NULL |
| 1484 | * "response" is a "char **" |
Li Zhe | 3a63fbc | 2009-08-04 13:14:34 +0800 | [diff] [blame] | 1485 | * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1486 | * ((const char **)response)[1] is LAC if registered or NULL if not |
| 1487 | * ((const char **)response)[2] is CID if registered or NULL if not |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 1488 | * ((const char **)response)[3] indicates the available data radio technology, |
| 1489 | * valid values as defined by RIL_RadioTechnology. |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1490 | * ((const char **)response)[4] if registration state is 3 (Registration |
| 1491 | * denied) this is an enumerated reason why |
| 1492 | * registration was denied. See 3GPP TS 24.008, |
| 1493 | * Annex G.6 "Additonal cause codes for GMM". |
| 1494 | * 7 == GPRS services not allowed |
| 1495 | * 8 == GPRS services and non-GPRS services not allowed |
| 1496 | * 9 == MS identity cannot be derived by the network |
| 1497 | * 10 == Implicitly detached |
| 1498 | * 14 == GPRS services not allowed in this PLMN |
| 1499 | * 16 == MSC temporarily not reachable |
| 1500 | * 40 == No PDP context activated |
| 1501 | * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be |
| 1502 | * established using RIL_REQUEST_SETUP_DATA_CALL. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1503 | * |
Wink Saville | ae67953 | 2012-12-03 14:59:45 -0800 | [diff] [blame] | 1504 | * The values at offsets 6..10 are optional LTE location information in decimal. |
| 1505 | * If a value is unknown that value may be NULL. If all values are NULL, |
| 1506 | * none need to be present. |
Wink Saville | ea51a9d | 2012-09-15 07:54:06 -0700 | [diff] [blame] | 1507 | * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code. |
| 1508 | * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier. |
| 1509 | * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier. |
| 1510 | * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity. |
| 1511 | * ((const char **)response)[10] is TADV, a 6-bit timing advance value. |
| 1512 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1513 | * LAC and CID are in hexadecimal format. |
| 1514 | * valid LAC are 0x0000 - 0xffff |
| 1515 | * valid CID are 0x00000000 - 0x0fffffff |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1516 | * |
| 1517 | * Please note that registration state 4 ("unknown") is treated |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1518 | * as "out of service" in the Android telephony system |
| 1519 | * |
| 1520 | * Valid errors: |
| 1521 | * SUCCESS |
| 1522 | * RADIO_NOT_AVAILABLE |
| 1523 | * GENERIC_FAILURE |
| 1524 | */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1525 | #define RIL_REQUEST_DATA_REGISTRATION_STATE 21 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1526 | |
| 1527 | /** |
| 1528 | * RIL_REQUEST_OPERATOR |
| 1529 | * |
| 1530 | * Request current operator ONS or EONS |
| 1531 | * |
| 1532 | * "data" is NULL |
| 1533 | * "response" is a "const char **" |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1534 | * ((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] | 1535 | * or NULL if unregistered |
| 1536 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1537 | * ((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] | 1538 | * or NULL if unregistered |
| 1539 | * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC) |
| 1540 | * or NULL if unregistered |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1541 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1542 | * Valid errors: |
| 1543 | * SUCCESS |
| 1544 | * RADIO_NOT_AVAILABLE |
| 1545 | * GENERIC_FAILURE |
| 1546 | */ |
| 1547 | #define RIL_REQUEST_OPERATOR 22 |
| 1548 | |
| 1549 | /** |
| 1550 | * RIL_REQUEST_RADIO_POWER |
| 1551 | * |
| 1552 | * Toggle radio on and off (for "airplane" mode) |
Wink Saville | 29487ef | 2011-04-15 09:15:31 -0700 | [diff] [blame] | 1553 | * If the radio is is turned off/on the radio modem subsystem |
| 1554 | * is expected return to an initialized state. For instance, |
| 1555 | * any voice and data calls will be terminated and all associated |
| 1556 | * lists emptied. |
| 1557 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1558 | * "data" is int * |
| 1559 | * ((int *)data)[0] is > 0 for "Radio On" |
| 1560 | * ((int *)data)[0] is == 0 for "Radio Off" |
| 1561 | * |
| 1562 | * "response" is NULL |
| 1563 | * |
| 1564 | * Turn radio on if "on" > 0 |
| 1565 | * Turn radio off if "on" == 0 |
| 1566 | * |
| 1567 | * Valid errors: |
| 1568 | * SUCCESS |
| 1569 | * RADIO_NOT_AVAILABLE |
| 1570 | * GENERIC_FAILURE |
| 1571 | */ |
| 1572 | #define RIL_REQUEST_RADIO_POWER 23 |
| 1573 | |
| 1574 | /** |
| 1575 | * RIL_REQUEST_DTMF |
| 1576 | * |
| 1577 | * Send a DTMF tone |
| 1578 | * |
| 1579 | * If the implementation is currently playing a tone requested via |
| 1580 | * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone |
| 1581 | * should be played instead |
| 1582 | * |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 1583 | * "data" is a char * containing a single character with one of 12 values: 0-9,*,# |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1584 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1585 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1586 | * FIXME should this block/mute microphone? |
| 1587 | * How does this interact with local DTMF feedback? |
| 1588 | * |
| 1589 | * Valid errors: |
| 1590 | * SUCCESS |
| 1591 | * RADIO_NOT_AVAILABLE |
| 1592 | * GENERIC_FAILURE |
| 1593 | * |
| 1594 | * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START |
| 1595 | * |
| 1596 | */ |
| 1597 | #define RIL_REQUEST_DTMF 24 |
| 1598 | |
| 1599 | /** |
| 1600 | * RIL_REQUEST_SEND_SMS |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1601 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1602 | * Send an SMS message |
| 1603 | * |
| 1604 | * "data" is const char ** |
| 1605 | * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed |
| 1606 | * by a length byte (as expected by TS 27.005) or NULL for default SMSC |
| 1607 | * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string |
| 1608 | * less the SMSC address |
| 1609 | * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" |
| 1610 | * |
| 1611 | * "response" is a const RIL_SMS_Response * |
| 1612 | * |
| 1613 | * Based on the return error, caller decides to resend if sending sms |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1614 | * 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] | 1615 | * and GENERIC_FAILURE means no retry (i.e. error cause is 500) |
| 1616 | * |
| 1617 | * Valid errors: |
| 1618 | * SUCCESS |
| 1619 | * RADIO_NOT_AVAILABLE |
| 1620 | * SMS_SEND_FAIL_RETRY |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 1621 | * FDN_CHECK_FAILURE |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1622 | * GENERIC_FAILURE |
| 1623 | * |
| 1624 | * FIXME how do we specify TP-Message-Reference if we need to resend? |
| 1625 | */ |
| 1626 | #define RIL_REQUEST_SEND_SMS 25 |
| 1627 | |
| 1628 | |
| 1629 | /** |
| 1630 | * RIL_REQUEST_SEND_SMS_EXPECT_MORE |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1631 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1632 | * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS, |
| 1633 | * except that more messages are expected to be sent soon. If possible, |
| 1634 | * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command) |
| 1635 | * |
| 1636 | * "data" is const char ** |
| 1637 | * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed |
| 1638 | * by a length byte (as expected by TS 27.005) or NULL for default SMSC |
| 1639 | * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string |
| 1640 | * less the SMSC address |
| 1641 | * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" |
| 1642 | * |
| 1643 | * "response" is a const RIL_SMS_Response * |
| 1644 | * |
| 1645 | * Based on the return error, caller decides to resend if sending sms |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1646 | * 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] | 1647 | * and GENERIC_FAILURE means no retry (i.e. error cause is 500) |
| 1648 | * |
| 1649 | * Valid errors: |
| 1650 | * SUCCESS |
| 1651 | * RADIO_NOT_AVAILABLE |
| 1652 | * SMS_SEND_FAIL_RETRY |
| 1653 | * GENERIC_FAILURE |
| 1654 | * |
| 1655 | */ |
| 1656 | #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26 |
| 1657 | |
| 1658 | |
| 1659 | /** |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1660 | * RIL_REQUEST_SETUP_DATA_CALL |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1661 | * |
Wink Saville | 29487ef | 2011-04-15 09:15:31 -0700 | [diff] [blame] | 1662 | * Setup a packet data connection. If RIL_Data_Call_Response_v6.status |
| 1663 | * return success it is added to the list of data calls and a |
| 1664 | * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the |
| 1665 | * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the |
| 1666 | * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST |
| 1667 | * and RIL_UNSOL_DATA_CALL_LIST_CHANGED. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1668 | * |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 1669 | * The RIL is expected to: |
| 1670 | * - Create one data call context. |
| 1671 | * - Create and configure a dedicated interface for the context |
| 1672 | * - The interface must be point to point. |
| 1673 | * - The interface is configured with one or more addresses and |
| 1674 | * is capable of sending and receiving packets. The prefix length |
| 1675 | * of the addresses must be /32 for IPv4 and /128 for IPv6. |
| 1676 | * - Must NOT change the linux routing table. |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1677 | * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5] |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 1678 | * number of simultaneous data call contexts. |
| 1679 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1680 | * "data" is a const char ** |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1681 | * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2... |
| 1682 | * for values above 2 this is RIL_RadioTechnology + 2. |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 1683 | * ((const char **)data)[1] is a RIL_DataProfile (support is optional) |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1684 | * ((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] | 1685 | * override the one in the profile. NULL indicates no APN overrride. |
| 1686 | * ((const char **)data)[3] is the username for APN, or NULL |
| 1687 | * ((const char **)data)[4] is the password for APN, or NULL |
Jaikumar Ganesh | 920c78f | 2009-06-04 10:53:15 -0700 | [diff] [blame] | 1688 | * ((const char **)data)[5] is the PAP / CHAP auth type. Values: |
| 1689 | * 0 => PAP and CHAP is never performed. |
| 1690 | * 1 => PAP may be performed; CHAP is never performed. |
| 1691 | * 2 => CHAP may be performed; PAP is never performed. |
| 1692 | * 3 => PAP / CHAP may be performed - baseband dependent. |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1693 | * ((const char **)data)[6] is the connection type to request must be one of the |
| 1694 | * PDP_type values in TS 27.007 section 10.1.1. |
Lorenzo Colitti | 4f81dcf | 2010-09-01 19:38:57 -0700 | [diff] [blame] | 1695 | * For example, "IP", "IPV6", "IPV4V6", or "PPP". |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1696 | * ((const char **)data)[7] Optional connection property parameters, format to be defined. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1697 | * |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1698 | * "response" is a RIL_Data_Call_Response_v6 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1699 | * |
| 1700 | * FIXME may need way to configure QoS settings |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 1701 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1702 | * Valid errors: |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 1703 | * SUCCESS should be returned on both success and failure of setup with |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1704 | * the RIL_Data_Call_Response_v6.status containing the actual status. |
| 1705 | * For all other errors the RIL_Data_Call_Resonse_v6 is ignored. |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 1706 | * |
| 1707 | * Other errors could include: |
| 1708 | * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW, |
| 1709 | * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1710 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1711 | * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1712 | */ |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1713 | #define RIL_REQUEST_SETUP_DATA_CALL 27 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1714 | |
| 1715 | |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1716 | /** |
| 1717 | * RIL_REQUEST_SIM_IO |
| 1718 | * |
| 1719 | * Request SIM I/O operation. |
| 1720 | * This is similar to the TS 27.007 "restricted SIM" operation |
| 1721 | * where it assumes all of the EF selection will be done by the |
| 1722 | * callee. |
| 1723 | * |
Wink Saville | fd72937 | 2011-02-22 16:19:39 -0800 | [diff] [blame] | 1724 | * "data" is a const RIL_SIM_IO_v6 * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1725 | * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL, |
| 1726 | * or may specify a PIN2 for operations that require a PIN2 (eg |
| 1727 | * updating FDN records) |
| 1728 | * |
| 1729 | * "response" is a const RIL_SIM_IO_Response * |
| 1730 | * |
| 1731 | * Arguments and responses that are unused for certain |
| 1732 | * values of "command" should be ignored or set to NULL |
| 1733 | * |
| 1734 | * Valid errors: |
| 1735 | * SUCCESS |
| 1736 | * RADIO_NOT_AVAILABLE |
| 1737 | * GENERIC_FAILURE |
| 1738 | * SIM_PIN2 |
| 1739 | * SIM_PUK2 |
| 1740 | */ |
| 1741 | #define RIL_REQUEST_SIM_IO 28 |
| 1742 | |
| 1743 | /** |
| 1744 | * RIL_REQUEST_SEND_USSD |
| 1745 | * |
| 1746 | * Send a USSD message |
| 1747 | * |
| 1748 | * If a USSD session already exists, the message should be sent in the |
| 1749 | * context of that session. Otherwise, a new session should be created. |
| 1750 | * |
| 1751 | * The network reply should be reported via RIL_UNSOL_ON_USSD |
| 1752 | * |
| 1753 | * Only one USSD session may exist at a time, and the session is assumed |
| 1754 | * to exist until: |
| 1755 | * a) The android system invokes RIL_REQUEST_CANCEL_USSD |
| 1756 | * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code |
| 1757 | * of "0" (USSD-Notify/no further action) or "2" (session terminated) |
| 1758 | * |
| 1759 | * "data" is a const char * containing the USSD request in UTF-8 format |
| 1760 | * "response" is NULL |
| 1761 | * |
| 1762 | * Valid errors: |
| 1763 | * SUCCESS |
| 1764 | * RADIO_NOT_AVAILABLE |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 1765 | * FDN_CHECK_FAILURE |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1766 | * GENERIC_FAILURE |
| 1767 | * |
| 1768 | * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD |
| 1769 | */ |
| 1770 | |
| 1771 | #define RIL_REQUEST_SEND_USSD 29 |
| 1772 | |
| 1773 | /** |
| 1774 | * RIL_REQUEST_CANCEL_USSD |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1775 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1776 | * Cancel the current USSD session if one exists |
| 1777 | * |
| 1778 | * "data" is null |
| 1779 | * "response" is NULL |
| 1780 | * |
| 1781 | * Valid errors: |
| 1782 | * SUCCESS |
| 1783 | * RADIO_NOT_AVAILABLE |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1784 | * GENERIC_FAILURE |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1785 | */ |
| 1786 | |
| 1787 | #define RIL_REQUEST_CANCEL_USSD 30 |
| 1788 | |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1789 | /** |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1790 | * RIL_REQUEST_GET_CLIR |
| 1791 | * |
| 1792 | * Gets current CLIR status |
| 1793 | * "data" is NULL |
| 1794 | * "response" is int * |
| 1795 | * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 |
| 1796 | * ((int *)data)[1] is "m" parameter from TS 27.007 7.7 |
| 1797 | * |
| 1798 | * Valid errors: |
| 1799 | * SUCCESS |
| 1800 | * RADIO_NOT_AVAILABLE |
| 1801 | * GENERIC_FAILURE |
| 1802 | */ |
| 1803 | #define RIL_REQUEST_GET_CLIR 31 |
| 1804 | |
| 1805 | /** |
| 1806 | * RIL_REQUEST_SET_CLIR |
| 1807 | * |
| 1808 | * "data" is int * |
| 1809 | * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 |
| 1810 | * |
| 1811 | * "response" is NULL |
| 1812 | * |
| 1813 | * Valid errors: |
| 1814 | * SUCCESS |
| 1815 | * RADIO_NOT_AVAILABLE |
| 1816 | * GENERIC_FAILURE |
| 1817 | */ |
| 1818 | #define RIL_REQUEST_SET_CLIR 32 |
| 1819 | |
| 1820 | /** |
| 1821 | * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS |
| 1822 | * |
| 1823 | * "data" is const RIL_CallForwardInfo * |
| 1824 | * |
| 1825 | * "response" is const RIL_CallForwardInfo ** |
| 1826 | * "response" points to an array of RIL_CallForwardInfo *'s, one for |
| 1827 | * each distinct registered phone number. |
| 1828 | * |
| 1829 | * For example, if data is forwarded to +18005551212 and voice is forwarded |
| 1830 | * to +18005559999, then two separate RIL_CallForwardInfo's should be returned |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1831 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1832 | * If, however, both data and voice are forwarded to +18005551212, then |
| 1833 | * a single RIL_CallForwardInfo can be returned with the service class |
| 1834 | * set to "data + voice = 3") |
| 1835 | * |
| 1836 | * Valid errors: |
| 1837 | * SUCCESS |
| 1838 | * RADIO_NOT_AVAILABLE |
| 1839 | * GENERIC_FAILURE |
| 1840 | */ |
| 1841 | #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33 |
| 1842 | |
| 1843 | |
| 1844 | /** |
| 1845 | * RIL_REQUEST_SET_CALL_FORWARD |
| 1846 | * |
| 1847 | * Configure call forward rule |
| 1848 | * |
| 1849 | * "data" is const RIL_CallForwardInfo * |
| 1850 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1851 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1852 | * Valid errors: |
| 1853 | * SUCCESS |
| 1854 | * RADIO_NOT_AVAILABLE |
| 1855 | * GENERIC_FAILURE |
| 1856 | */ |
| 1857 | #define RIL_REQUEST_SET_CALL_FORWARD 34 |
| 1858 | |
| 1859 | |
| 1860 | /** |
| 1861 | * RIL_REQUEST_QUERY_CALL_WAITING |
| 1862 | * |
| 1863 | * Query current call waiting state |
| 1864 | * |
| 1865 | * "data" is const int * |
| 1866 | * ((const int *)data)[0] is the TS 27.007 service class to query. |
| 1867 | * "response" is a const int * |
| 1868 | * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled" |
| 1869 | * |
| 1870 | * If ((const int *)response)[0] is = 1, then ((const int *)response)[1] |
| 1871 | * must follow, with the TS 27.007 service class bit vector of services |
| 1872 | * for which call waiting is enabled. |
| 1873 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1874 | * 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] | 1875 | * ((const int *)response)[1] is 3, then call waiting is enabled for data |
| 1876 | * and voice and disabled for everything else |
| 1877 | * |
| 1878 | * Valid errors: |
| 1879 | * SUCCESS |
| 1880 | * RADIO_NOT_AVAILABLE |
| 1881 | * GENERIC_FAILURE |
| 1882 | */ |
| 1883 | #define RIL_REQUEST_QUERY_CALL_WAITING 35 |
| 1884 | |
| 1885 | |
| 1886 | /** |
| 1887 | * RIL_REQUEST_SET_CALL_WAITING |
| 1888 | * |
| 1889 | * Configure current call waiting state |
| 1890 | * |
| 1891 | * "data" is const int * |
| 1892 | * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled" |
| 1893 | * ((const int *)data)[1] is the TS 27.007 service class bit vector of |
| 1894 | * services to modify |
| 1895 | * "response" is NULL |
| 1896 | * |
| 1897 | * Valid errors: |
| 1898 | * SUCCESS |
| 1899 | * RADIO_NOT_AVAILABLE |
| 1900 | * GENERIC_FAILURE |
| 1901 | */ |
| 1902 | #define RIL_REQUEST_SET_CALL_WAITING 36 |
| 1903 | |
| 1904 | /** |
| 1905 | * RIL_REQUEST_SMS_ACKNOWLEDGE |
| 1906 | * |
| 1907 | * Acknowledge successful or failed receipt of SMS previously indicated |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1908 | * via RIL_UNSOL_RESPONSE_NEW_SMS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1909 | * |
| 1910 | * "data" is int * |
jsh | b60444e | 2009-05-29 11:09:17 -0700 | [diff] [blame] | 1911 | * ((int *)data)[0] is 1 on successful receipt |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1912 | * (basically, AT+CNMA=1 from TS 27.005 |
jsh | b60444e | 2009-05-29 11:09:17 -0700 | [diff] [blame] | 1913 | * is 0 on failed receipt |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1914 | * (basically, AT+CNMA=2 from TS 27.005) |
jsh | b60444e | 2009-05-29 11:09:17 -0700 | [diff] [blame] | 1915 | * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined |
| 1916 | * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory |
| 1917 | * capacity exceeded) and 0xFF (unspecified error) are |
| 1918 | * reported. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1919 | * |
| 1920 | * "response" is NULL |
| 1921 | * |
| 1922 | * FIXME would like request that specified RP-ACK/RP-ERROR PDU |
| 1923 | * |
| 1924 | * Valid errors: |
| 1925 | * SUCCESS |
| 1926 | * RADIO_NOT_AVAILABLE |
| 1927 | * GENERIC_FAILURE |
| 1928 | */ |
| 1929 | #define RIL_REQUEST_SMS_ACKNOWLEDGE 37 |
| 1930 | |
| 1931 | /** |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1932 | * RIL_REQUEST_GET_IMEI - DEPRECATED |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1933 | * |
| 1934 | * Get the device IMEI, including check digit |
| 1935 | * |
johnwang | f8bc167 | 2009-05-14 19:19:47 -0700 | [diff] [blame] | 1936 | * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1937 | * Valid when RadioState is not RADIO_STATE_UNAVAILABLE |
| 1938 | * |
| 1939 | * "data" is NULL |
| 1940 | * "response" is a const char * containing the IMEI |
| 1941 | * |
| 1942 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1943 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1944 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1945 | * GENERIC_FAILURE |
| 1946 | */ |
| 1947 | |
| 1948 | #define RIL_REQUEST_GET_IMEI 38 |
| 1949 | |
| 1950 | /** |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1951 | * RIL_REQUEST_GET_IMEISV - DEPRECATED |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1952 | * |
| 1953 | * Get the device IMEISV, which should be two decimal digits |
| 1954 | * |
johnwang | f8bc167 | 2009-05-14 19:19:47 -0700 | [diff] [blame] | 1955 | * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1956 | * Valid when RadioState is not RADIO_STATE_UNAVAILABLE |
| 1957 | * |
| 1958 | * "data" is NULL |
| 1959 | * "response" is a const char * containing the IMEISV |
| 1960 | * |
| 1961 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1962 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1963 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1964 | * GENERIC_FAILURE |
| 1965 | */ |
| 1966 | |
| 1967 | #define RIL_REQUEST_GET_IMEISV 39 |
| 1968 | |
| 1969 | |
| 1970 | /** |
| 1971 | * RIL_REQUEST_ANSWER |
| 1972 | * |
| 1973 | * Answer incoming call |
| 1974 | * |
| 1975 | * Will not be called for WAITING calls. |
| 1976 | * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case |
| 1977 | * instead |
| 1978 | * |
| 1979 | * "data" is NULL |
| 1980 | * "response" is NULL |
| 1981 | * |
| 1982 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1983 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1984 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1985 | * GENERIC_FAILURE |
| 1986 | */ |
| 1987 | |
| 1988 | #define RIL_REQUEST_ANSWER 40 |
| 1989 | |
| 1990 | /** |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1991 | * RIL_REQUEST_DEACTIVATE_DATA_CALL |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1992 | * |
Wink Saville | 29487ef | 2011-04-15 09:15:31 -0700 | [diff] [blame] | 1993 | * Deactivate packet data connection and remove from the |
| 1994 | * data call list if SUCCESS is returned. Any other return |
| 1995 | * values should also try to remove the call from the list, |
| 1996 | * but that may not be possible. In any event a |
| 1997 | * RIL_REQUEST_RADIO_POWER off/on must clear the list. An |
| 1998 | * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be |
| 1999 | * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2000 | * |
| 2001 | * "data" is const char ** |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2002 | * ((char**)data)[0] indicating CID |
Kazuhiro Ondo | d86799a | 2010-12-02 13:22:35 -0600 | [diff] [blame] | 2003 | * ((char**)data)[1] indicating Disconnect Reason |
| 2004 | * 0 => No specific reason specified |
| 2005 | * 1 => Radio shutdown requested |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2006 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2007 | * "response" is NULL |
| 2008 | * |
| 2009 | * Valid errors: |
| 2010 | * SUCCESS |
| 2011 | * RADIO_NOT_AVAILABLE |
| 2012 | * GENERIC_FAILURE |
| 2013 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2014 | * See also: RIL_REQUEST_SETUP_DATA_CALL |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2015 | */ |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2016 | #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2017 | |
| 2018 | /** |
| 2019 | * RIL_REQUEST_QUERY_FACILITY_LOCK |
| 2020 | * |
| 2021 | * Query the status of a facility lock state |
| 2022 | * |
| 2023 | * "data" is const char ** |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2024 | * ((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] | 2025 | * (eg "AO" for BAOC, "SC" for SIM lock) |
| 2026 | * ((const char **)data)[1] is the password, or "" if not required |
| 2027 | * ((const char **)data)[2] is the TS 27.007 service class bit vector of |
| 2028 | * services to query |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2029 | * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. |
Wink Saville | fd72937 | 2011-02-22 16:19:39 -0800 | [diff] [blame] | 2030 | * This is only applicable in the case of Fixed Dialing Numbers |
| 2031 | * (FDN) requests. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2032 | * |
| 2033 | * "response" is an int * |
| 2034 | * ((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] | 2035 | * services for which the specified barring facility |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2036 | * is active. "0" means "disabled for all" |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2037 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2038 | * |
| 2039 | * Valid errors: |
| 2040 | * SUCCESS |
| 2041 | * RADIO_NOT_AVAILABLE |
| 2042 | * GENERIC_FAILURE |
| 2043 | * |
| 2044 | */ |
| 2045 | #define RIL_REQUEST_QUERY_FACILITY_LOCK 42 |
| 2046 | |
| 2047 | /** |
| 2048 | * RIL_REQUEST_SET_FACILITY_LOCK |
| 2049 | * |
| 2050 | * Enable/disable one facility lock |
| 2051 | * |
| 2052 | * "data" is const char ** |
| 2053 | * |
| 2054 | * ((const char **)data)[0] = facility string code from TS 27.007 7.4 |
| 2055 | * (eg "AO" for BAOC) |
| 2056 | * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock" |
| 2057 | * ((const char **)data)[2] = password |
| 2058 | * ((const char **)data)[3] = string representation of decimal TS 27.007 |
| 2059 | * service class bit vector. Eg, the string |
| 2060 | * "1" means "set this facility for voice services" |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2061 | * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. |
Wink Saville | fd72937 | 2011-02-22 16:19:39 -0800 | [diff] [blame] | 2062 | * This is only applicable in the case of Fixed Dialing Numbers |
| 2063 | * (FDN) requests. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2064 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 2065 | * "response" is int * |
| 2066 | * ((int *)response)[0] is the number of retries remaining, or -1 if unknown |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2067 | * |
| 2068 | * Valid errors: |
| 2069 | * SUCCESS |
| 2070 | * RADIO_NOT_AVAILABLE |
| 2071 | * GENERIC_FAILURE |
| 2072 | * |
| 2073 | */ |
| 2074 | #define RIL_REQUEST_SET_FACILITY_LOCK 43 |
| 2075 | |
| 2076 | /** |
| 2077 | * RIL_REQUEST_CHANGE_BARRING_PASSWORD |
| 2078 | * |
| 2079 | * Change call barring facility password |
| 2080 | * |
| 2081 | * "data" is const char ** |
| 2082 | * |
| 2083 | * ((const char **)data)[0] = facility string code from TS 27.007 7.4 |
| 2084 | * (eg "AO" for BAOC) |
| 2085 | * ((const char **)data)[1] = old password |
| 2086 | * ((const char **)data)[2] = new password |
| 2087 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2088 | * "response" is NULL |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2089 | * |
| 2090 | * Valid errors: |
| 2091 | * SUCCESS |
| 2092 | * RADIO_NOT_AVAILABLE |
| 2093 | * GENERIC_FAILURE |
| 2094 | * |
| 2095 | */ |
| 2096 | #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44 |
| 2097 | |
| 2098 | /** |
| 2099 | * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE |
| 2100 | * |
| 2101 | * Query current network selectin mode |
| 2102 | * |
| 2103 | * "data" is NULL |
| 2104 | * |
| 2105 | * "response" is int * |
| 2106 | * ((const int *)response)[0] is |
| 2107 | * 0 for automatic selection |
| 2108 | * 1 for manual selection |
| 2109 | * |
| 2110 | * Valid errors: |
| 2111 | * SUCCESS |
| 2112 | * RADIO_NOT_AVAILABLE |
| 2113 | * GENERIC_FAILURE |
| 2114 | * |
| 2115 | */ |
| 2116 | #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45 |
| 2117 | |
| 2118 | /** |
| 2119 | * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC |
| 2120 | * |
| 2121 | * Specify that the network should be selected automatically |
| 2122 | * |
| 2123 | * "data" is NULL |
| 2124 | * "response" is NULL |
| 2125 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2126 | * 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] | 2127 | * and registered |
| 2128 | * |
| 2129 | * Valid errors: |
| 2130 | * SUCCESS |
| 2131 | * RADIO_NOT_AVAILABLE |
John Wang | 7553447 | 2010-04-20 15:11:42 -0700 | [diff] [blame] | 2132 | * ILLEGAL_SIM_OR_ME |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2133 | * GENERIC_FAILURE |
| 2134 | * |
John Wang | 7553447 | 2010-04-20 15:11:42 -0700 | [diff] [blame] | 2135 | * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and |
| 2136 | * no retries needed, such as illegal SIM or ME. |
| 2137 | * Returns GENERIC_FAILURE for all other causes that might be |
| 2138 | * fixed by retries. |
| 2139 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2140 | */ |
| 2141 | #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46 |
| 2142 | |
| 2143 | /** |
| 2144 | * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL |
| 2145 | * |
| 2146 | * Manually select a specified network. |
| 2147 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2148 | * "data" is const char * specifying MCCMNC of network to select (eg "310170") |
| 2149 | * "response" is NULL |
| 2150 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2151 | * 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] | 2152 | * and registered |
| 2153 | * |
| 2154 | * Valid errors: |
| 2155 | * SUCCESS |
| 2156 | * RADIO_NOT_AVAILABLE |
John Wang | 7553447 | 2010-04-20 15:11:42 -0700 | [diff] [blame] | 2157 | * ILLEGAL_SIM_OR_ME |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2158 | * GENERIC_FAILURE |
| 2159 | * |
John Wang | 7553447 | 2010-04-20 15:11:42 -0700 | [diff] [blame] | 2160 | * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and |
| 2161 | * no retries needed, such as illegal SIM or ME. |
| 2162 | * Returns GENERIC_FAILURE for all other causes that might be |
| 2163 | * fixed by retries. |
| 2164 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2165 | */ |
| 2166 | #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47 |
| 2167 | |
| 2168 | /** |
| 2169 | * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS |
| 2170 | * |
| 2171 | * Scans for available networks |
| 2172 | * |
| 2173 | * "data" is NULL |
| 2174 | * "response" is const char ** that should be an array of n*4 strings, where |
| 2175 | * n is the number of available networks |
| 2176 | * For each available network: |
| 2177 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2178 | * ((const char **)response)[n+0] is long alpha ONS or EONS |
| 2179 | * ((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] | 2180 | * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC) |
| 2181 | * ((const char **)response)[n+3] is a string value of the status: |
| 2182 | * "unknown" |
| 2183 | * "available" |
| 2184 | * "current" |
| 2185 | * "forbidden" |
| 2186 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2187 | * 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] | 2188 | * and registered |
| 2189 | * |
| 2190 | * Valid errors: |
| 2191 | * SUCCESS |
| 2192 | * RADIO_NOT_AVAILABLE |
| 2193 | * GENERIC_FAILURE |
| 2194 | * |
| 2195 | */ |
| 2196 | #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48 |
| 2197 | |
| 2198 | /** |
| 2199 | * RIL_REQUEST_DTMF_START |
| 2200 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2201 | * Start playing a DTMF tone. Continue playing DTMF tone until |
| 2202 | * RIL_REQUEST_DTMF_STOP is received |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2203 | * |
| 2204 | * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing, |
| 2205 | * it should cancel the previous tone and play the new one. |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2206 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2207 | * "data" is a char * |
| 2208 | * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,# |
| 2209 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2210 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2211 | * Valid errors: |
| 2212 | * SUCCESS |
| 2213 | * RADIO_NOT_AVAILABLE |
| 2214 | * GENERIC_FAILURE |
| 2215 | * |
| 2216 | * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP |
| 2217 | */ |
| 2218 | #define RIL_REQUEST_DTMF_START 49 |
| 2219 | |
| 2220 | /** |
| 2221 | * RIL_REQUEST_DTMF_STOP |
| 2222 | * |
| 2223 | * Stop playing a currently playing DTMF tone. |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2224 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2225 | * "data" is NULL |
| 2226 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2227 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2228 | * Valid errors: |
| 2229 | * SUCCESS |
| 2230 | * RADIO_NOT_AVAILABLE |
| 2231 | * GENERIC_FAILURE |
| 2232 | * |
| 2233 | * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START |
| 2234 | */ |
| 2235 | #define RIL_REQUEST_DTMF_STOP 50 |
| 2236 | |
| 2237 | /** |
| 2238 | * RIL_REQUEST_BASEBAND_VERSION |
| 2239 | * |
| 2240 | * Return string value indicating baseband version, eg |
| 2241 | * response from AT+CGMR |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2242 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2243 | * "data" is NULL |
| 2244 | * "response" is const char * containing version string for log reporting |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2245 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2246 | * Valid errors: |
| 2247 | * SUCCESS |
| 2248 | * RADIO_NOT_AVAILABLE |
| 2249 | * GENERIC_FAILURE |
| 2250 | * |
| 2251 | */ |
| 2252 | #define RIL_REQUEST_BASEBAND_VERSION 51 |
| 2253 | |
| 2254 | /** |
| 2255 | * RIL_REQUEST_SEPARATE_CONNECTION |
| 2256 | * |
| 2257 | * Separate a party from a multiparty call placing the multiparty call |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2258 | * (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] | 2259 | * as the only other member of the current (active) call |
| 2260 | * |
| 2261 | * Like AT+CHLD=2x |
| 2262 | * |
| 2263 | * See TS 22.084 1.3.8.2 (iii) |
| 2264 | * TS 22.030 6.5.5 "Entering "2X followed by send" |
| 2265 | * TS 27.007 "AT+CHLD=2x" |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2266 | * |
| 2267 | * "data" is an int * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2268 | * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL |
| 2269 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2270 | * "response" is NULL |
| 2271 | * |
| 2272 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2273 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2274 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 2275 | * GENERIC_FAILURE |
| 2276 | */ |
| 2277 | #define RIL_REQUEST_SEPARATE_CONNECTION 52 |
| 2278 | |
| 2279 | |
| 2280 | /** |
| 2281 | * RIL_REQUEST_SET_MUTE |
| 2282 | * |
| 2283 | * Turn on or off uplink (microphone) mute. |
| 2284 | * |
| 2285 | * Will only be sent while voice call is active. |
| 2286 | * Will always be reset to "disable mute" when a new voice call is initiated |
| 2287 | * |
| 2288 | * "data" is an int * |
| 2289 | * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute" |
| 2290 | * |
| 2291 | * "response" is NULL |
| 2292 | * |
| 2293 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2294 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2295 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 2296 | * GENERIC_FAILURE |
| 2297 | */ |
| 2298 | |
| 2299 | #define RIL_REQUEST_SET_MUTE 53 |
| 2300 | |
| 2301 | /** |
| 2302 | * RIL_REQUEST_GET_MUTE |
| 2303 | * |
| 2304 | * Queries the current state of the uplink mute setting |
| 2305 | * |
| 2306 | * "data" is NULL |
| 2307 | * "response" is an int * |
| 2308 | * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled" |
| 2309 | * |
| 2310 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2311 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2312 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 2313 | * GENERIC_FAILURE |
| 2314 | */ |
| 2315 | |
| 2316 | #define RIL_REQUEST_GET_MUTE 54 |
| 2317 | |
| 2318 | /** |
| 2319 | * RIL_REQUEST_QUERY_CLIP |
| 2320 | * |
| 2321 | * Queries the status of the CLIP supplementary service |
| 2322 | * |
| 2323 | * (for MMI code "*#30#") |
| 2324 | * |
| 2325 | * "data" is NULL |
| 2326 | * "response" is an int * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2327 | * (int *)response)[0] is 1 for "CLIP provisioned" |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2328 | * and 0 for "CLIP not provisioned" |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2329 | * and 2 for "unknown, e.g. no network etc" |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2330 | * |
| 2331 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2332 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2333 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 2334 | * GENERIC_FAILURE |
| 2335 | */ |
| 2336 | |
| 2337 | #define RIL_REQUEST_QUERY_CLIP 55 |
| 2338 | |
| 2339 | /** |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2340 | * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status |
| 2341 | * field in RIL_Data_Call_Response_v6. |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2342 | * |
| 2343 | * Requests the failure cause code for the most recently failed PDP |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2344 | * context or CDMA data connection active |
| 2345 | * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2346 | * |
| 2347 | * "data" is NULL |
| 2348 | * |
| 2349 | * "response" is a "int *" |
| 2350 | * ((int *)response)[0] is an integer cause code defined in TS 24.008 |
| 2351 | * section 6.1.3.1.3 or close approximation |
| 2352 | * |
| 2353 | * If the implementation does not have access to the exact cause codes, |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2354 | * then it should return one of the values listed in |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 2355 | * RIL_DataCallFailCause, as the UI layer needs to distinguish these |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2356 | * cases for error notification |
| 2357 | * and potential retries. |
| 2358 | * |
| 2359 | * Valid errors: |
| 2360 | * SUCCESS |
| 2361 | * RADIO_NOT_AVAILABLE |
| 2362 | * GENERIC_FAILURE |
| 2363 | * |
| 2364 | * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2365 | * |
| 2366 | * Deprecated use the status field in RIL_Data_Call_Response_v6. |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2367 | */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2368 | |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2369 | #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2370 | |
| 2371 | /** |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2372 | * RIL_REQUEST_DATA_CALL_LIST |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2373 | * |
Wink Saville | 29487ef | 2011-04-15 09:15:31 -0700 | [diff] [blame] | 2374 | * Returns the data call list. An entry is added when a |
| 2375 | * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a |
| 2376 | * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied |
| 2377 | * when RIL_REQUEST_RADIO_POWER off/on is issued. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2378 | * |
| 2379 | * "data" is NULL |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2380 | * "response" is an array of RIL_Data_Call_Response_v6 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2381 | * |
| 2382 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2383 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2384 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 2385 | * GENERIC_FAILURE |
Wink Saville | 29487ef | 2011-04-15 09:15:31 -0700 | [diff] [blame] | 2386 | * |
| 2387 | * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2388 | */ |
| 2389 | |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2390 | #define RIL_REQUEST_DATA_CALL_LIST 57 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2391 | |
| 2392 | /** |
johnwang | f8bc167 | 2009-05-14 19:19:47 -0700 | [diff] [blame] | 2393 | * RIL_REQUEST_RESET_RADIO - DEPRECATED |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2394 | * |
| 2395 | * Request a radio reset. The RIL implementation may postpone |
| 2396 | * the reset until after this request is responded to if the baseband |
| 2397 | * is presently busy. |
| 2398 | * |
johnwang | f8bc167 | 2009-05-14 19:19:47 -0700 | [diff] [blame] | 2399 | * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER |
| 2400 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2401 | * "data" is NULL |
| 2402 | * "response" is NULL |
| 2403 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2404 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2405 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2406 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 2407 | * GENERIC_FAILURE |
johnwang | f8bc167 | 2009-05-14 19:19:47 -0700 | [diff] [blame] | 2408 | * REQUEST_NOT_SUPPORTED |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2409 | */ |
| 2410 | |
| 2411 | #define RIL_REQUEST_RESET_RADIO 58 |
| 2412 | |
| 2413 | /** |
| 2414 | * RIL_REQUEST_OEM_HOOK_RAW |
| 2415 | * |
| 2416 | * This request reserved for OEM-specific uses. It passes raw byte arrays |
| 2417 | * back and forth. |
| 2418 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2419 | * It can be invoked on the Java side from |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2420 | * com.android.internal.telephony.Phone.invokeOemRilRequestRaw() |
| 2421 | * |
| 2422 | * "data" is a char * of bytes copied from the byte[] data argument in java |
| 2423 | * "response" is a char * of bytes that will returned via the |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2424 | * caller's "response" Message here: |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2425 | * (byte[])(((AsyncResult)response.obj).result) |
| 2426 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2427 | * An error response here will result in |
| 2428 | * (((AsyncResult)response.obj).result) == null and |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2429 | * (((AsyncResult)response.obj).exception) being an instance of |
| 2430 | * com.android.internal.telephony.gsm.CommandException |
| 2431 | * |
| 2432 | * Valid errors: |
| 2433 | * All |
| 2434 | */ |
| 2435 | |
| 2436 | #define RIL_REQUEST_OEM_HOOK_RAW 59 |
| 2437 | |
| 2438 | /** |
| 2439 | * RIL_REQUEST_OEM_HOOK_STRINGS |
| 2440 | * |
| 2441 | * This request reserved for OEM-specific uses. It passes strings |
| 2442 | * back and forth. |
| 2443 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2444 | * It can be invoked on the Java side from |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2445 | * com.android.internal.telephony.Phone.invokeOemRilRequestStrings() |
| 2446 | * |
| 2447 | * "data" is a const char **, representing an array of null-terminated UTF-8 |
| 2448 | * strings copied from the "String[] strings" argument to |
| 2449 | * invokeOemRilRequestStrings() |
| 2450 | * |
| 2451 | * "response" is a const char **, representing an array of null-terminated UTF-8 |
| 2452 | * stings that will be returned via the caller's response message here: |
| 2453 | * |
| 2454 | * (String[])(((AsyncResult)response.obj).result) |
| 2455 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2456 | * An error response here will result in |
| 2457 | * (((AsyncResult)response.obj).result) == null and |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2458 | * (((AsyncResult)response.obj).exception) being an instance of |
| 2459 | * com.android.internal.telephony.gsm.CommandException |
| 2460 | * |
| 2461 | * Valid errors: |
| 2462 | * All |
| 2463 | */ |
| 2464 | |
| 2465 | #define RIL_REQUEST_OEM_HOOK_STRINGS 60 |
| 2466 | |
| 2467 | /** |
| 2468 | * RIL_REQUEST_SCREEN_STATE |
| 2469 | * |
| 2470 | * Indicates the current state of the screen. When the screen is off, the |
| 2471 | * RIL should notify the baseband to suppress certain notifications (eg, |
jsh | 4326561 | 2009-09-29 17:46:11 -0700 | [diff] [blame] | 2472 | * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude) |
| 2473 | * in an effort to conserve power. These notifications should resume when the |
| 2474 | * screen is on. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2475 | * |
| 2476 | * "data" is int * |
| 2477 | * ((int *)data)[0] is == 1 for "Screen On" |
| 2478 | * ((int *)data)[0] is == 0 for "Screen Off" |
| 2479 | * |
| 2480 | * "response" is NULL |
| 2481 | * |
| 2482 | * Valid errors: |
| 2483 | * SUCCESS |
| 2484 | * GENERIC_FAILURE |
| 2485 | */ |
| 2486 | #define RIL_REQUEST_SCREEN_STATE 61 |
| 2487 | |
| 2488 | |
| 2489 | /** |
| 2490 | * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION |
| 2491 | * |
| 2492 | * Enables/disables supplementary service related notifications |
| 2493 | * from the network. |
| 2494 | * |
| 2495 | * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION. |
| 2496 | * |
| 2497 | * "data" is int * |
| 2498 | * ((int *)data)[0] is == 1 for notifications enabled |
| 2499 | * ((int *)data)[0] is == 0 for notifications disabled |
| 2500 | * |
| 2501 | * "response" is NULL |
| 2502 | * |
| 2503 | * Valid errors: |
| 2504 | * SUCCESS |
| 2505 | * RADIO_NOT_AVAILABLE |
| 2506 | * GENERIC_FAILURE |
| 2507 | * |
| 2508 | * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION. |
| 2509 | */ |
| 2510 | #define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62 |
| 2511 | |
| 2512 | /** |
| 2513 | * RIL_REQUEST_WRITE_SMS_TO_SIM |
| 2514 | * |
| 2515 | * Stores a SMS message to SIM memory. |
| 2516 | * |
| 2517 | * "data" is RIL_SMS_WriteArgs * |
| 2518 | * |
| 2519 | * "response" is int * |
| 2520 | * ((const int *)response)[0] is the record index where the message is stored. |
| 2521 | * |
| 2522 | * Valid errors: |
| 2523 | * SUCCESS |
| 2524 | * GENERIC_FAILURE |
| 2525 | * |
| 2526 | */ |
| 2527 | #define RIL_REQUEST_WRITE_SMS_TO_SIM 63 |
| 2528 | |
| 2529 | /** |
| 2530 | * RIL_REQUEST_DELETE_SMS_ON_SIM |
| 2531 | * |
| 2532 | * Deletes a SMS message from SIM memory. |
| 2533 | * |
| 2534 | * "data" is int * |
| 2535 | * ((int *)data)[0] is the record index of the message to delete. |
| 2536 | * |
| 2537 | * "response" is NULL |
| 2538 | * |
| 2539 | * Valid errors: |
| 2540 | * SUCCESS |
| 2541 | * GENERIC_FAILURE |
| 2542 | * |
| 2543 | */ |
| 2544 | #define RIL_REQUEST_DELETE_SMS_ON_SIM 64 |
| 2545 | |
| 2546 | /** |
| 2547 | * RIL_REQUEST_SET_BAND_MODE |
| 2548 | * |
| 2549 | * Assign a specified band for RF configuration. |
| 2550 | * |
| 2551 | * "data" is int * |
| 2552 | * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically) |
| 2553 | * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000) |
| 2554 | * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900) |
| 2555 | * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000) |
| 2556 | * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000) |
| 2557 | * ((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] | 2558 | * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)" |
| 2559 | * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)" |
| 2560 | * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)" |
| 2561 | * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)" |
| 2562 | * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)" |
| 2563 | * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)" |
| 2564 | * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)" |
| 2565 | * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)" |
| 2566 | * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)" |
| 2567 | * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)" |
| 2568 | * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)" |
| 2569 | * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)" |
| 2570 | * ((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] | 2571 | * |
| 2572 | * "response" is NULL |
| 2573 | * |
| 2574 | * Valid errors: |
| 2575 | * SUCCESS |
| 2576 | * RADIO_NOT_AVAILABLE |
| 2577 | * GENERIC_FAILURE |
| 2578 | */ |
| 2579 | #define RIL_REQUEST_SET_BAND_MODE 65 |
| 2580 | |
| 2581 | /** |
| 2582 | * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE |
| 2583 | * |
| 2584 | * Query the list of band mode supported by RF. |
| 2585 | * |
| 2586 | * "data" is NULL |
| 2587 | * |
| 2588 | * "response" is int * |
| 2589 | * "response" points to an array of int's, the int[0] is the size of array, reset is one for |
| 2590 | * each available band mode. |
| 2591 | * |
| 2592 | * 0 for "unspecified" (selected by baseband automatically) |
| 2593 | * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000) |
| 2594 | * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900) |
| 2595 | * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000) |
| 2596 | * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000) |
| 2597 | * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850) |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2598 | * 6 for "Cellular (800-MHz Band)" |
| 2599 | * 7 for "PCS (1900-MHz Band)" |
| 2600 | * 8 for "Band Class 3 (JTACS Band)" |
| 2601 | * 9 for "Band Class 4 (Korean PCS Band)" |
| 2602 | * 10 for "Band Class 5 (450-MHz Band)" |
| 2603 | * 11 for "Band Class 6 (2-GMHz IMT2000 Band)" |
| 2604 | * 12 for "Band Class 7 (Upper 700-MHz Band)" |
| 2605 | * 13 for "Band Class 8 (1800-MHz Band)" |
| 2606 | * 14 for "Band Class 9 (900-MHz Band)" |
| 2607 | * 15 for "Band Class 10 (Secondary 800-MHz Band)" |
| 2608 | * 16 for "Band Class 11 (400-MHz European PAMR Band)" |
| 2609 | * 17 for "Band Class 15 (AWS Band)" |
| 2610 | * 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] | 2611 | * |
| 2612 | * Valid errors: |
| 2613 | * SUCCESS |
| 2614 | * RADIO_NOT_AVAILABLE |
| 2615 | * GENERIC_FAILURE |
| 2616 | * |
| 2617 | * See also: RIL_REQUEST_SET_BAND_MODE |
| 2618 | */ |
| 2619 | #define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66 |
| 2620 | |
| 2621 | /** |
| 2622 | * RIL_REQUEST_STK_GET_PROFILE |
| 2623 | * |
| 2624 | * Requests the profile of SIM tool kit. |
| 2625 | * The profile indicates the SAT/USAT features supported by ME. |
| 2626 | * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111 |
| 2627 | * |
| 2628 | * "data" is NULL |
| 2629 | * |
| 2630 | * "response" is a const char * containing SAT/USAT profile |
| 2631 | * in hexadecimal format string starting with first byte of terminal profile |
| 2632 | * |
| 2633 | * Valid errors: |
| 2634 | * RIL_E_SUCCESS |
| 2635 | * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) |
| 2636 | * RIL_E_GENERIC_FAILURE |
| 2637 | */ |
| 2638 | #define RIL_REQUEST_STK_GET_PROFILE 67 |
| 2639 | |
| 2640 | /** |
| 2641 | * RIL_REQUEST_STK_SET_PROFILE |
| 2642 | * |
| 2643 | * Download the STK terminal profile as part of SIM initialization |
| 2644 | * procedure |
| 2645 | * |
| 2646 | * "data" is a const char * containing SAT/USAT profile |
| 2647 | * in hexadecimal format string starting with first byte of terminal profile |
| 2648 | * |
| 2649 | * "response" is NULL |
| 2650 | * |
| 2651 | * Valid errors: |
| 2652 | * RIL_E_SUCCESS |
| 2653 | * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) |
| 2654 | * RIL_E_GENERIC_FAILURE |
| 2655 | */ |
| 2656 | #define RIL_REQUEST_STK_SET_PROFILE 68 |
| 2657 | |
| 2658 | /** |
| 2659 | * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND |
| 2660 | * |
| 2661 | * Requests to send a SAT/USAT envelope command to SIM. |
| 2662 | * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111 |
| 2663 | * |
| 2664 | * "data" is a const char * containing SAT/USAT command |
| 2665 | * in hexadecimal format string starting with command tag |
| 2666 | * |
| 2667 | * "response" is a const char * containing SAT/USAT response |
| 2668 | * in hexadecimal format string starting with first byte of response |
| 2669 | * (May be NULL) |
| 2670 | * |
| 2671 | * Valid errors: |
| 2672 | * RIL_E_SUCCESS |
| 2673 | * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) |
| 2674 | * RIL_E_GENERIC_FAILURE |
| 2675 | */ |
| 2676 | #define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69 |
| 2677 | |
| 2678 | /** |
| 2679 | * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE |
| 2680 | * |
| 2681 | * Requests to send a terminal response to SIM for a received |
| 2682 | * proactive command |
| 2683 | * |
| 2684 | * "data" is a const char * containing SAT/USAT response |
| 2685 | * in hexadecimal format string starting with first byte of response data |
| 2686 | * |
| 2687 | * "response" is NULL |
| 2688 | * |
| 2689 | * Valid errors: |
| 2690 | * RIL_E_SUCCESS |
| 2691 | * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) |
| 2692 | * RIL_E_GENERIC_FAILURE |
| 2693 | */ |
| 2694 | #define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70 |
| 2695 | |
| 2696 | /** |
| 2697 | * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM |
| 2698 | * |
| 2699 | * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has |
| 2700 | * been initialized by ME already. (We could see the call has been in the 'call |
| 2701 | * list') So, STK application needs to accept/reject the call according as user |
| 2702 | * operations. |
| 2703 | * |
| 2704 | * "data" is int * |
| 2705 | * ((int *)data)[0] is > 0 for "accept" the call setup |
| 2706 | * ((int *)data)[0] is == 0 for "reject" the call setup |
| 2707 | * |
| 2708 | * "response" is NULL |
| 2709 | * |
| 2710 | * Valid errors: |
| 2711 | * RIL_E_SUCCESS |
| 2712 | * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) |
| 2713 | * RIL_E_GENERIC_FAILURE |
| 2714 | */ |
| 2715 | #define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71 |
| 2716 | |
| 2717 | /** |
| 2718 | * RIL_REQUEST_EXPLICIT_CALL_TRANSFER |
| 2719 | * |
| 2720 | * Connects the two calls and disconnects the subscriber from both calls. |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2721 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2722 | * "data" is NULL |
| 2723 | * "response" is NULL |
| 2724 | * |
| 2725 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2726 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2727 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 2728 | * GENERIC_FAILURE |
| 2729 | */ |
| 2730 | #define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72 |
| 2731 | |
| 2732 | /** |
| 2733 | * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE |
| 2734 | * |
| 2735 | * Requests to set the preferred network type for searching and registering |
| 2736 | * (CS/PS domain, RAT, and operation mode) |
| 2737 | * |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2738 | * "data" is int * which is RIL_PreferredNetworkType |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2739 | * |
| 2740 | * "response" is NULL |
| 2741 | * |
| 2742 | * Valid errors: |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2743 | * SUCCESS |
| 2744 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 2745 | * GENERIC_FAILURE |
| 2746 | * MODE_NOT_SUPPORTED |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2747 | */ |
| 2748 | #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73 |
| 2749 | |
| 2750 | /** |
| 2751 | * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE |
| 2752 | * |
| 2753 | * Query the preferred network type (CS/PS domain, RAT, and operation mode) |
| 2754 | * for searching and registering |
| 2755 | * |
| 2756 | * "data" is NULL |
| 2757 | * |
| 2758 | * "response" is int * |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2759 | * ((int *)reponse)[0] is == RIL_PreferredNetworkType |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2760 | * |
| 2761 | * Valid errors: |
| 2762 | * SUCCESS |
| 2763 | * RADIO_NOT_AVAILABLE |
| 2764 | * GENERIC_FAILURE |
| 2765 | * |
| 2766 | * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE |
| 2767 | */ |
| 2768 | #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74 |
| 2769 | |
| 2770 | /** |
| 2771 | * RIL_REQUEST_NEIGHBORING_CELL_IDS |
| 2772 | * |
| 2773 | * Request neighboring cell id in GSM network |
| 2774 | * |
| 2775 | * "data" is NULL |
| 2776 | * "response" must be a " const RIL_NeighboringCell** " |
| 2777 | * |
| 2778 | * Valid errors: |
| 2779 | * SUCCESS |
| 2780 | * RADIO_NOT_AVAILABLE |
| 2781 | * GENERIC_FAILURE |
| 2782 | */ |
| 2783 | #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75 |
| 2784 | |
| 2785 | /** |
| 2786 | * RIL_REQUEST_SET_LOCATION_UPDATES |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 2787 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2788 | * Enables/disables network state change notifications due to changes in |
jsh | 4326561 | 2009-09-29 17:46:11 -0700 | [diff] [blame] | 2789 | * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA). |
| 2790 | * Basically +CREG=2 vs. +CREG=1 (TS 27.007). |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2791 | * |
| 2792 | * Note: The RIL implementation should default to "updates enabled" |
| 2793 | * when the screen is on and "updates disabled" when the screen is off. |
| 2794 | * |
| 2795 | * "data" is int * |
| 2796 | * ((int *)data)[0] is == 1 for updates enabled (+CREG=2) |
| 2797 | * ((int *)data)[0] is == 0 for updates disabled (+CREG=1) |
| 2798 | * |
| 2799 | * "response" is NULL |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 2800 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2801 | * Valid errors: |
| 2802 | * SUCCESS |
| 2803 | * RADIO_NOT_AVAILABLE |
| 2804 | * GENERIC_FAILURE |
| 2805 | * |
| 2806 | * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED |
| 2807 | */ |
| 2808 | #define RIL_REQUEST_SET_LOCATION_UPDATES 76 |
| 2809 | |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2810 | /** |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2811 | * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2812 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2813 | * Request to set the location where the CDMA subscription shall |
| 2814 | * be retrieved |
| 2815 | * |
| 2816 | * "data" is int * |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2817 | * ((int *)data)[0] is == RIL_CdmaSubscriptionSource |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2818 | * |
| 2819 | * "response" is NULL |
| 2820 | * |
| 2821 | * Valid errors: |
| 2822 | * SUCCESS |
| 2823 | * RADIO_NOT_AVAILABLE |
| 2824 | * GENERIC_FAILURE |
| 2825 | * SIM_ABSENT |
| 2826 | * SUBSCRIPTION_NOT_AVAILABLE |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2827 | * |
| 2828 | * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2829 | */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2830 | #define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2831 | |
| 2832 | /** |
| 2833 | * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2834 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2835 | * Request to set the roaming preferences in CDMA |
| 2836 | * |
| 2837 | * "data" is int * |
| 2838 | * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL |
| 2839 | * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL |
| 2840 | * ((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] | 2841 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2842 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2843 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2844 | * Valid errors: |
| 2845 | * SUCCESS |
| 2846 | * RADIO_NOT_AVAILABLE |
| 2847 | * GENERIC_FAILURE |
| 2848 | */ |
| 2849 | #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78 |
| 2850 | |
| 2851 | /** |
| 2852 | * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2853 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2854 | * Request the actual setting of the roaming preferences in CDMA in the modem |
| 2855 | * |
| 2856 | * "data" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2857 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2858 | * "response" is int * |
| 2859 | * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL |
| 2860 | * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL |
| 2861 | * ((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] | 2862 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2863 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2864 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2865 | * Valid errors: |
| 2866 | * SUCCESS |
| 2867 | * RADIO_NOT_AVAILABLE |
| 2868 | * GENERIC_FAILURE |
| 2869 | */ |
| 2870 | #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79 |
| 2871 | |
| 2872 | /** |
| 2873 | * RIL_REQUEST_SET_TTY_MODE |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2874 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2875 | * Request to set the TTY mode |
| 2876 | * |
| 2877 | * "data" is int * |
| 2878 | * ((int *)data)[0] is == 0 for TTY off |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 2879 | * ((int *)data)[0] is == 1 for TTY Full |
| 2880 | * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover) |
| 2881 | * ((int *)data)[0] is == 3 for TTY VCO (voice carryover) |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2882 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2883 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2884 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2885 | * Valid errors: |
| 2886 | * SUCCESS |
| 2887 | * RADIO_NOT_AVAILABLE |
| 2888 | * GENERIC_FAILURE |
| 2889 | */ |
| 2890 | #define RIL_REQUEST_SET_TTY_MODE 80 |
| 2891 | |
| 2892 | /** |
| 2893 | * RIL_REQUEST_QUERY_TTY_MODE |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2894 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2895 | * Request the setting of TTY mode |
| 2896 | * |
| 2897 | * "data" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2898 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2899 | * "response" is int * |
| 2900 | * ((int *)response)[0] is == 0 for TTY off |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 2901 | * ((int *)response)[0] is == 1 for TTY Full |
| 2902 | * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover) |
| 2903 | * ((int *)response)[0] is == 3 for TTY VCO (voice carryover) |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2904 | * |
| 2905 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2906 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2907 | * Valid errors: |
| 2908 | * SUCCESS |
| 2909 | * RADIO_NOT_AVAILABLE |
| 2910 | * GENERIC_FAILURE |
| 2911 | */ |
| 2912 | #define RIL_REQUEST_QUERY_TTY_MODE 81 |
| 2913 | |
| 2914 | /** |
| 2915 | * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE |
| 2916 | * |
| 2917 | * Request to set the preferred voice privacy mode used in voice |
| 2918 | * scrambling |
| 2919 | * |
| 2920 | * "data" is int * |
| 2921 | * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) |
| 2922 | * ((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] | 2923 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2924 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2925 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2926 | * Valid errors: |
| 2927 | * SUCCESS |
| 2928 | * RADIO_NOT_AVAILABLE |
| 2929 | * GENERIC_FAILURE |
| 2930 | */ |
| 2931 | #define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82 |
| 2932 | |
| 2933 | /** |
| 2934 | * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2935 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2936 | * Request the setting of preferred voice privacy mode |
| 2937 | * |
| 2938 | * "data" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2939 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2940 | * "response" is int * |
| 2941 | * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) |
| 2942 | * ((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] | 2943 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2944 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2945 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2946 | * Valid errors: |
| 2947 | * SUCCESS |
| 2948 | * RADIO_NOT_AVAILABLE |
| 2949 | * GENERIC_FAILURE |
| 2950 | */ |
| 2951 | #define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83 |
| 2952 | |
| 2953 | /** |
| 2954 | * RIL_REQUEST_CDMA_FLASH |
| 2955 | * |
| 2956 | * Send FLASH |
| 2957 | * |
| 2958 | * "data" is const char * |
| 2959 | * ((const char *)data)[0] is a FLASH string |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2960 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2961 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2962 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2963 | * Valid errors: |
| 2964 | * SUCCESS |
| 2965 | * RADIO_NOT_AVAILABLE |
| 2966 | * GENERIC_FAILURE |
| 2967 | * |
| 2968 | */ |
| 2969 | #define RIL_REQUEST_CDMA_FLASH 84 |
| 2970 | |
| 2971 | /** |
| 2972 | * RIL_REQUEST_CDMA_BURST_DTMF |
| 2973 | * |
| 2974 | * Send DTMF string |
| 2975 | * |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 2976 | * "data" is const char ** |
| 2977 | * ((const char **)data)[0] is a DTMF string |
| 2978 | * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use |
| 2979 | * default |
| 2980 | * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use |
| 2981 | * default |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2982 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2983 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2984 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2985 | * Valid errors: |
| 2986 | * SUCCESS |
| 2987 | * RADIO_NOT_AVAILABLE |
| 2988 | * GENERIC_FAILURE |
| 2989 | * |
| 2990 | */ |
| 2991 | #define RIL_REQUEST_CDMA_BURST_DTMF 85 |
| 2992 | |
| 2993 | /** |
Naveen Kalla | 03c1edf | 2009-09-23 11:18:35 -0700 | [diff] [blame] | 2994 | * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2995 | * |
Naveen Kalla | 03c1edf | 2009-09-23 11:18:35 -0700 | [diff] [blame] | 2996 | * Takes a 26 digit string (20 digit AKEY + 6 digit checksum). |
| 2997 | * If the checksum is valid the 20 digit AKEY is written to NV, |
| 2998 | * replacing the existing AKEY no matter what it was before. |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2999 | * |
| 3000 | * "data" is const char * |
Naveen Kalla | 03c1edf | 2009-09-23 11:18:35 -0700 | [diff] [blame] | 3001 | * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9') |
| 3002 | * where the last 6 digits are a checksum of the |
| 3003 | * first 20, as specified in TR45.AHAG |
| 3004 | * "Common Cryptographic Algorithms, Revision D.1 |
| 3005 | * Section 2.2" |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3006 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3007 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3008 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3009 | * Valid errors: |
| 3010 | * SUCCESS |
| 3011 | * RADIO_NOT_AVAILABLE |
| 3012 | * GENERIC_FAILURE |
| 3013 | * |
| 3014 | */ |
Naveen Kalla | 03c1edf | 2009-09-23 11:18:35 -0700 | [diff] [blame] | 3015 | #define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3016 | |
| 3017 | /** |
| 3018 | * RIL_REQUEST_CDMA_SEND_SMS |
| 3019 | * |
| 3020 | * Send a CDMA SMS message |
| 3021 | * |
| 3022 | * "data" is const RIL_CDMA_SMS_Message * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3023 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3024 | * "response" is a const RIL_SMS_Response * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3025 | * |
johnwang | bfb151b | 2009-09-11 15:20:38 -0700 | [diff] [blame] | 3026 | * Based on the return error, caller decides to resend if sending sms |
| 3027 | * fails. The CDMA error class is derived as follows, |
| 3028 | * SUCCESS is error class 0 (no error) |
| 3029 | * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure) |
| 3030 | * and GENERIC_FAILURE is error class 3 (permanent and no retry) |
| 3031 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3032 | * Valid errors: |
| 3033 | * SUCCESS |
| 3034 | * RADIO_NOT_AVAILABLE |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 3035 | * SMS_SEND_FAIL_RETRY |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3036 | * GENERIC_FAILURE |
| 3037 | * |
| 3038 | */ |
| 3039 | #define RIL_REQUEST_CDMA_SEND_SMS 87 |
| 3040 | |
| 3041 | /** |
| 3042 | * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE |
| 3043 | * |
| 3044 | * Acknowledge the success or failure in the receipt of SMS |
| 3045 | * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS |
| 3046 | * |
| 3047 | * "data" is const RIL_CDMA_SMS_Ack * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3048 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3049 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3050 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3051 | * Valid errors: |
| 3052 | * SUCCESS |
| 3053 | * RADIO_NOT_AVAILABLE |
| 3054 | * GENERIC_FAILURE |
| 3055 | * |
| 3056 | */ |
| 3057 | #define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88 |
| 3058 | |
| 3059 | /** |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3060 | * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3061 | * |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3062 | * Request the setting of GSM/WCDMA Cell Broadcast SMS config. |
| 3063 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3064 | * "data" is NULL |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3065 | * |
| 3066 | * "response" is a const RIL_GSM_BroadcastSmsConfigInfo ** |
| 3067 | * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *) |
| 3068 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3069 | * Valid errors: |
| 3070 | * SUCCESS |
| 3071 | * RADIO_NOT_AVAILABLE |
| 3072 | * GENERIC_FAILURE |
| 3073 | * |
| 3074 | */ |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3075 | #define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3076 | |
| 3077 | /** |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3078 | * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3079 | * |
| 3080 | * Set GSM/WCDMA Cell Broadcast SMS config |
| 3081 | * |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3082 | * "data" is a const RIL_GSM_BroadcastSmsConfigInfo ** |
| 3083 | * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *) |
| 3084 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3085 | * "response" is NULL |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3086 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3087 | * Valid errors: |
| 3088 | * SUCCESS |
| 3089 | * RADIO_NOT_AVAILABLE |
| 3090 | * GENERIC_FAILURE |
| 3091 | * |
| 3092 | */ |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3093 | #define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3094 | |
| 3095 | /** |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3096 | * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3097 | * |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3098 | * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3099 | * |
| 3100 | * "data" is const int * |
| 3101 | * (const int *)data[0] indicates to activate or turn off the |
| 3102 | * reception of GSM/WCDMA Cell Broadcast SMS, 0-1, |
| 3103 | * 0 - Activate, 1 - Turn off |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3104 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3105 | * "response" is NULL |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3106 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3107 | * Valid errors: |
| 3108 | * SUCCESS |
| 3109 | * RADIO_NOT_AVAILABLE |
| 3110 | * GENERIC_FAILURE |
| 3111 | * |
| 3112 | */ |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3113 | #define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3114 | |
| 3115 | /** |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3116 | * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3117 | * |
| 3118 | * Request the setting of CDMA Broadcast SMS config |
| 3119 | * |
| 3120 | * "data" is NULL |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3121 | * |
| 3122 | * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo ** |
| 3123 | * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *) |
| 3124 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3125 | * Valid errors: |
| 3126 | * SUCCESS |
| 3127 | * RADIO_NOT_AVAILABLE |
| 3128 | * GENERIC_FAILURE |
| 3129 | * |
| 3130 | */ |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3131 | #define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3132 | |
| 3133 | /** |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3134 | * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3135 | * |
| 3136 | * Set CDMA Broadcast SMS config |
| 3137 | * |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3138 | * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo ** |
| 3139 | * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *) |
| 3140 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3141 | * "response" is NULL |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3142 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3143 | * Valid errors: |
| 3144 | * SUCCESS |
| 3145 | * RADIO_NOT_AVAILABLE |
| 3146 | * GENERIC_FAILURE |
| 3147 | * |
| 3148 | */ |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3149 | #define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3150 | |
| 3151 | /** |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3152 | * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3153 | * |
| 3154 | * Enable or disable the reception of CDMA Broadcast SMS |
| 3155 | * |
| 3156 | * "data" is const int * |
| 3157 | * (const int *)data[0] indicates to activate or turn off the |
| 3158 | * reception of CDMA Broadcast SMS, 0-1, |
| 3159 | * 0 - Activate, 1 - Turn off |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3160 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3161 | * "response" is NULL |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3162 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3163 | * Valid errors: |
| 3164 | * SUCCESS |
| 3165 | * RADIO_NOT_AVAILABLE |
| 3166 | * GENERIC_FAILURE |
| 3167 | * |
| 3168 | */ |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 3169 | #define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3170 | |
| 3171 | /** |
| 3172 | * RIL_REQUEST_CDMA_SUBSCRIPTION |
| 3173 | * |
| 3174 | * Request the device MDN / H_SID / H_NID. |
| 3175 | * |
| 3176 | * The request is only allowed when CDMA subscription is available. When CDMA |
| 3177 | * subscription is changed, application layer should re-issue the request to |
| 3178 | * update the subscription information. |
| 3179 | * |
| 3180 | * If a NULL value is returned for any of the device id, it means that error |
| 3181 | * accessing the device. |
| 3182 | * |
| 3183 | * "response" is const char ** |
| 3184 | * ((const char **)response)[0] is MDN if CDMA subscription is available |
jsh | 29be25c | 2009-07-14 20:18:59 -0700 | [diff] [blame] | 3185 | * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if |
| 3186 | * CDMA subscription is available, in decimal format |
| 3187 | * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if |
| 3188 | * CDMA subscription is available, in decimal format |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 3189 | * ((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] | 3190 | * ((const char **)response)[4] is PRL version if CDMA subscription is available |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3191 | * |
| 3192 | * Valid errors: |
| 3193 | * SUCCESS |
| 3194 | * RIL_E_SUBSCRIPTION_NOT_AVAILABLE |
| 3195 | */ |
| 3196 | |
Wink Saville | eafe79d | 2009-04-03 18:02:34 -0700 | [diff] [blame] | 3197 | #define RIL_REQUEST_CDMA_SUBSCRIPTION 95 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3198 | |
| 3199 | /** |
| 3200 | * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM |
| 3201 | * |
| 3202 | * Stores a CDMA SMS message to RUIM memory. |
| 3203 | * |
| 3204 | * "data" is RIL_CDMA_SMS_WriteArgs * |
| 3205 | * |
| 3206 | * "response" is int * |
| 3207 | * ((const int *)response)[0] is the record index where the message is stored. |
| 3208 | * |
| 3209 | * Valid errors: |
| 3210 | * SUCCESS |
| 3211 | * RADIO_NOT_AVAILABLE |
| 3212 | * GENERIC_FAILURE |
| 3213 | * |
| 3214 | */ |
Wink Saville | eafe79d | 2009-04-03 18:02:34 -0700 | [diff] [blame] | 3215 | #define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3216 | |
| 3217 | /** |
| 3218 | * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM |
| 3219 | * |
| 3220 | * Deletes a CDMA SMS message from RUIM memory. |
| 3221 | * |
| 3222 | * "data" is int * |
| 3223 | * ((int *)data)[0] is the record index of the message to delete. |
| 3224 | * |
| 3225 | * "response" is NULL |
| 3226 | * |
| 3227 | * Valid errors: |
| 3228 | * SUCCESS |
| 3229 | * RADIO_NOT_AVAILABLE |
| 3230 | * GENERIC_FAILURE |
| 3231 | * |
| 3232 | */ |
Wink Saville | eafe79d | 2009-04-03 18:02:34 -0700 | [diff] [blame] | 3233 | #define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3234 | |
| 3235 | /** |
| 3236 | * RIL_REQUEST_DEVICE_IDENTITY |
Wink Saville | eafe79d | 2009-04-03 18:02:34 -0700 | [diff] [blame] | 3237 | * |
| 3238 | * Request the device ESN / MEID / IMEI / IMEISV. |
| 3239 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3240 | * The request is always allowed and contains GSM and CDMA device identity; |
Wink Saville | eafe79d | 2009-04-03 18:02:34 -0700 | [diff] [blame] | 3241 | * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3242 | * RIL_REQUEST_GET_IMEISV. |
Wink Saville | eafe79d | 2009-04-03 18:02:34 -0700 | [diff] [blame] | 3243 | * |
| 3244 | * 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] | 3245 | * accessing the device. |
Wink Saville | eafe79d | 2009-04-03 18:02:34 -0700 | [diff] [blame] | 3246 | * |
| 3247 | * When CDMA subscription is changed the ESN/MEID may change. The application |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3248 | * 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] | 3249 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3250 | * "response" is const char ** |
Wink Saville | eafe79d | 2009-04-03 18:02:34 -0700 | [diff] [blame] | 3251 | * ((const char **)response)[0] is IMEI if GSM subscription is available |
| 3252 | * ((const char **)response)[1] is IMEISV if GSM subscription is available |
| 3253 | * ((const char **)response)[2] is ESN if CDMA subscription is available |
| 3254 | * ((const char **)response)[3] is MEID if CDMA subscription is available |
| 3255 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3256 | * Valid errors: |
| 3257 | * SUCCESS |
| 3258 | * RADIO_NOT_AVAILABLE |
| 3259 | * GENERIC_FAILURE |
| 3260 | */ |
Wink Saville | eafe79d | 2009-04-03 18:02:34 -0700 | [diff] [blame] | 3261 | #define RIL_REQUEST_DEVICE_IDENTITY 98 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3262 | |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 3263 | /** |
| 3264 | * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE |
| 3265 | * |
| 3266 | * Request the radio's system selection module to exit emergency |
| 3267 | * callback mode. RIL will not respond with SUCCESS until the modem has |
| 3268 | * completely exited from Emergency Callback Mode. |
| 3269 | * |
| 3270 | * "data" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3271 | * |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 3272 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3273 | * |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 3274 | * Valid errors: |
| 3275 | * SUCCESS |
| 3276 | * RADIO_NOT_AVAILABLE |
| 3277 | * GENERIC_FAILURE |
| 3278 | * |
| 3279 | */ |
| 3280 | #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3281 | |
jsh | 000a9fe | 2009-05-11 14:52:35 -0700 | [diff] [blame] | 3282 | /** |
| 3283 | * RIL_REQUEST_GET_SMSC_ADDRESS |
| 3284 | * |
| 3285 | * Queries the default Short Message Service Center address on the device. |
| 3286 | * |
| 3287 | * "data" is NULL |
| 3288 | * |
| 3289 | * "response" is const char * containing the SMSC address. |
| 3290 | * |
| 3291 | * Valid errors: |
| 3292 | * SUCCESS |
| 3293 | * RADIO_NOT_AVAILABLE |
| 3294 | * GENERIC_FAILURE |
| 3295 | * |
| 3296 | */ |
| 3297 | #define RIL_REQUEST_GET_SMSC_ADDRESS 100 |
| 3298 | |
| 3299 | /** |
| 3300 | * RIL_REQUEST_SET_SMSC_ADDRESS |
| 3301 | * |
| 3302 | * Sets the default Short Message Service Center address on the device. |
| 3303 | * |
| 3304 | * "data" is const char * containing the SMSC address. |
| 3305 | * |
| 3306 | * "response" is NULL |
| 3307 | * |
| 3308 | * Valid errors: |
| 3309 | * SUCCESS |
| 3310 | * RADIO_NOT_AVAILABLE |
| 3311 | * GENERIC_FAILURE |
| 3312 | * |
| 3313 | */ |
| 3314 | #define RIL_REQUEST_SET_SMSC_ADDRESS 101 |
| 3315 | |
jsh | b60444e | 2009-05-29 11:09:17 -0700 | [diff] [blame] | 3316 | /** |
| 3317 | * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS |
| 3318 | * |
| 3319 | * Indicates whether there is storage available for new SMS messages. |
| 3320 | * |
| 3321 | * "data" is int * |
| 3322 | * ((int *)data)[0] is 1 if memory is available for storing new messages |
| 3323 | * is 0 if memory capacity is exceeded |
| 3324 | * |
| 3325 | * "response" is NULL |
| 3326 | * |
| 3327 | * Valid errors: |
| 3328 | * SUCCESS |
| 3329 | * RADIO_NOT_AVAILABLE |
| 3330 | * GENERIC_FAILURE |
| 3331 | * |
| 3332 | */ |
| 3333 | #define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102 |
| 3334 | |
Wink Saville | 2641d5b | 2009-06-08 17:40:42 -0700 | [diff] [blame] | 3335 | /** |
| 3336 | * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING |
| 3337 | * |
| 3338 | * Indicates that the StkSerivce is running and is |
| 3339 | * ready to receive RIL_UNSOL_STK_XXXXX commands. |
| 3340 | * |
| 3341 | * "data" is NULL |
| 3342 | * "response" is NULL |
| 3343 | * |
| 3344 | * Valid errors: |
| 3345 | * SUCCESS |
| 3346 | * RADIO_NOT_AVAILABLE |
| 3347 | * GENERIC_FAILURE |
| 3348 | * |
| 3349 | */ |
| 3350 | #define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103 |
| 3351 | |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 3352 | /** |
| 3353 | * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE |
| 3354 | * |
| 3355 | * Request to query the location where the CDMA subscription shall |
| 3356 | * be retrieved |
| 3357 | * |
| 3358 | * "data" is NULL |
| 3359 | * |
| 3360 | * "response" is int * |
| 3361 | * ((int *)data)[0] is == RIL_CdmaSubscriptionSource |
| 3362 | * |
| 3363 | * Valid errors: |
| 3364 | * SUCCESS |
| 3365 | * RADIO_NOT_AVAILABLE |
| 3366 | * GENERIC_FAILURE |
| 3367 | * SUBSCRIPTION_NOT_AVAILABLE |
| 3368 | * |
| 3369 | * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE |
| 3370 | */ |
| 3371 | #define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104 |
| 3372 | |
Jake Hamby | fa8d584 | 2011-08-19 16:22:18 -0700 | [diff] [blame] | 3373 | /** |
| 3374 | * RIL_REQUEST_ISIM_AUTHENTICATION |
| 3375 | * |
| 3376 | * Request the ISIM application on the UICC to perform AKA |
| 3377 | * challenge/response algorithm for IMS authentication |
| 3378 | * |
| 3379 | * "data" is a const char * containing the challenge string in Base64 format |
| 3380 | * "response" is a const char * containing the response in Base64 format |
| 3381 | * |
| 3382 | * Valid errors: |
| 3383 | * SUCCESS |
| 3384 | * RADIO_NOT_AVAILABLE |
| 3385 | * GENERIC_FAILURE |
| 3386 | */ |
| 3387 | #define RIL_REQUEST_ISIM_AUTHENTICATION 105 |
| 3388 | |
Jake Hamby | 300105d | 2011-09-26 01:01:44 -0700 | [diff] [blame] | 3389 | /** |
| 3390 | * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU |
| 3391 | * |
| 3392 | * Acknowledge successful or failed receipt of SMS previously indicated |
| 3393 | * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send |
| 3394 | * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU. |
| 3395 | * |
| 3396 | * "data" is const char ** |
| 3397 | * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK) |
| 3398 | * is "0" on failed receipt (send RP-ERROR) |
| 3399 | * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format |
| 3400 | * |
| 3401 | * "response" is NULL |
| 3402 | * |
| 3403 | * Valid errors: |
| 3404 | * SUCCESS |
| 3405 | * RADIO_NOT_AVAILABLE |
| 3406 | * GENERIC_FAILURE |
| 3407 | */ |
| 3408 | #define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106 |
| 3409 | |
| 3410 | /** |
| 3411 | * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS |
| 3412 | * |
| 3413 | * Requests to send a SAT/USAT envelope command to SIM. |
| 3414 | * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111. |
| 3415 | * |
| 3416 | * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND: |
| 3417 | * the SW1 and SW2 status bytes from the UICC response are returned along with |
| 3418 | * the response data, using the same structure as RIL_REQUEST_SIM_IO. |
| 3419 | * |
| 3420 | * The RIL implementation shall perform the normal processing of a '91XX' |
| 3421 | * response in SW1/SW2 to retrieve the pending proactive command and send it |
| 3422 | * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does. |
| 3423 | * |
| 3424 | * "data" is a const char * containing the SAT/USAT command |
| 3425 | * in hexadecimal format starting with command tag |
| 3426 | * |
| 3427 | * "response" is a const RIL_SIM_IO_Response * |
| 3428 | * |
| 3429 | * Valid errors: |
| 3430 | * RIL_E_SUCCESS |
| 3431 | * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) |
| 3432 | * RIL_E_GENERIC_FAILURE |
| 3433 | */ |
| 3434 | #define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107 |
| 3435 | |
Naveen Kalla | 2bc78d6 | 2011-12-07 16:22:53 -0800 | [diff] [blame] | 3436 | /** |
| 3437 | * RIL_REQUEST_VOICE_RADIO_TECH |
| 3438 | * |
| 3439 | * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only |
| 3440 | * when radio state is RADIO_STATE_ON |
| 3441 | * |
| 3442 | * "data" is NULL |
| 3443 | * "response" is int * |
| 3444 | * ((int *) response)[0] is of type const RIL_RadioTechnology |
| 3445 | * |
| 3446 | * Valid errors: |
| 3447 | * SUCCESS |
| 3448 | * RADIO_NOT_AVAILABLE |
| 3449 | * GENERIC_FAILURE |
| 3450 | */ |
| 3451 | #define RIL_REQUEST_VOICE_RADIO_TECH 108 |
| 3452 | |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 3453 | /** |
| 3454 | * RIL_REQUEST_GET_CELL_INFO_LIST |
| 3455 | * |
| 3456 | * Request all of the current cell information known to the radio. The radio |
| 3457 | * must a list of all current cells, including the neighboring cells. If for a particular |
| 3458 | * cell information isn't known then the appropriate unknown value will be returned. |
| 3459 | * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST. |
| 3460 | * |
| 3461 | * "data" is NULL |
| 3462 | * |
| 3463 | * "response" is an array of RIL_CellInfo. |
| 3464 | */ |
| 3465 | #define RIL_REQUEST_GET_CELL_INFO_LIST 109 |
| 3466 | |
| 3467 | /** |
| 3468 | * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE |
| 3469 | * |
| 3470 | * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked. |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 3471 | * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 3472 | * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue |
| 3473 | * a RIL_UNSOL_CELL_INFO_LIST. |
| 3474 | * |
| 3475 | * "data" is int * |
| 3476 | * ((int *)data)[0] is minimum time in milliseconds |
| 3477 | * |
| 3478 | * "response" is NULL |
| 3479 | * |
| 3480 | * Valid errors: |
| 3481 | * SUCCESS |
| 3482 | * RADIO_NOT_AVAILABLE |
| 3483 | * GENERIC_FAILURE |
| 3484 | */ |
| 3485 | #define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110 |
Jake Hamby | 300105d | 2011-09-26 01:01:44 -0700 | [diff] [blame] | 3486 | |
Sungmin Choi | 7569753 | 2013-04-26 15:04:45 -0700 | [diff] [blame] | 3487 | /** |
| 3488 | * RIL_REQUEST_SET_INITIAL_ATTACH_APN |
| 3489 | * |
| 3490 | * Set an apn to initial attach network |
| 3491 | * "response" is NULL |
| 3492 | * |
| 3493 | * Valid errors: |
| 3494 | * SUCCESS |
| 3495 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 3496 | * GENERIC_FAILURE |
| 3497 | * SUBSCRIPTION_NOT_AVAILABLE |
| 3498 | */ |
| 3499 | #define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111 |
| 3500 | |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3501 | /***********************************************************************/ |
| 3502 | |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3503 | |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3504 | #define RIL_UNSOL_RESPONSE_BASE 1000 |
| 3505 | |
| 3506 | /** |
| 3507 | * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED |
| 3508 | * |
| 3509 | * Indicate when value of RIL_RadioState has changed. |
| 3510 | * |
| 3511 | * Callee will invoke RIL_RadioStateRequest method on main thread |
| 3512 | * |
| 3513 | * "data" is NULL |
| 3514 | */ |
| 3515 | |
| 3516 | #define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000 |
| 3517 | |
| 3518 | |
| 3519 | /** |
| 3520 | * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED |
| 3521 | * |
| 3522 | * Indicate when call state has changed |
| 3523 | * |
| 3524 | * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread |
| 3525 | * |
| 3526 | * "data" is NULL |
| 3527 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3528 | * Response should be invoked on, for example, |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3529 | * "RING", "BUSY", "NO CARRIER", and also call state |
| 3530 | * transitions (DIALING->ALERTING ALERTING->ACTIVE) |
| 3531 | * |
| 3532 | * Redundent or extraneous invocations are tolerated |
| 3533 | */ |
| 3534 | #define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001 |
| 3535 | |
| 3536 | |
| 3537 | /** |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 3538 | * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3539 | * |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 3540 | * Called when the voice network state changed |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3541 | * |
| 3542 | * Callee will invoke the following requests on main thread: |
| 3543 | * |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 3544 | * RIL_REQUEST_VOICE_REGISTRATION_STATE |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3545 | * RIL_REQUEST_OPERATOR |
| 3546 | * |
| 3547 | * "data" is NULL |
| 3548 | * |
| 3549 | * FIXME should this happen when SIM records are loaded? (eg, for |
| 3550 | * EONS) |
| 3551 | */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 3552 | #define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3553 | |
| 3554 | /** |
| 3555 | * RIL_UNSOL_RESPONSE_NEW_SMS |
| 3556 | * |
| 3557 | * Called when new SMS is received. |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3558 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3559 | * "data" is const char * |
| 3560 | * This is a pointer to a string containing the PDU of an SMS-DELIVER |
| 3561 | * as an ascii string of hex digits. The PDU starts with the SMSC address |
| 3562 | * per TS 27.005 (+CMT:) |
| 3563 | * |
| 3564 | * Callee will subsequently confirm the receipt of thei SMS with a |
| 3565 | * RIL_REQUEST_SMS_ACKNOWLEDGE |
| 3566 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3567 | * No new RIL_UNSOL_RESPONSE_NEW_SMS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3568 | * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a |
| 3569 | * RIL_REQUEST_SMS_ACKNOWLEDGE has been received |
| 3570 | */ |
| 3571 | |
| 3572 | #define RIL_UNSOL_RESPONSE_NEW_SMS 1003 |
| 3573 | |
| 3574 | /** |
| 3575 | * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT |
| 3576 | * |
| 3577 | * Called when new SMS Status Report is received. |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3578 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3579 | * "data" is const char * |
| 3580 | * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT |
| 3581 | * as an ascii string of hex digits. The PDU starts with the SMSC address |
| 3582 | * per TS 27.005 (+CDS:). |
| 3583 | * |
| 3584 | * Callee will subsequently confirm the receipt of the SMS with a |
| 3585 | * RIL_REQUEST_SMS_ACKNOWLEDGE |
| 3586 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3587 | * No new RIL_UNSOL_RESPONSE_NEW_SMS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3588 | * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a |
| 3589 | * RIL_REQUEST_SMS_ACKNOWLEDGE has been received |
| 3590 | */ |
| 3591 | |
| 3592 | #define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004 |
| 3593 | |
| 3594 | /** |
| 3595 | * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM |
| 3596 | * |
| 3597 | * Called when new SMS has been stored on SIM card |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3598 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3599 | * "data" is const int * |
| 3600 | * ((const int *)data)[0] contains the slot index on the SIM that contains |
| 3601 | * the new message |
| 3602 | */ |
| 3603 | |
| 3604 | #define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005 |
| 3605 | |
| 3606 | /** |
| 3607 | * RIL_UNSOL_ON_USSD |
| 3608 | * |
| 3609 | * Called when a new USSD message is received. |
| 3610 | * |
| 3611 | * "data" is const char ** |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3612 | * ((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] | 3613 | * one of these string values: |
| 3614 | * "0" USSD-Notify -- text in ((const char **)data)[1] |
| 3615 | * "1" USSD-Request -- text in ((const char **)data)[1] |
| 3616 | * "2" Session terminated by network |
| 3617 | * "3" other local client (eg, SIM Toolkit) has responded |
| 3618 | * "4" Operation not supported |
| 3619 | * "5" Network timeout |
| 3620 | * |
| 3621 | * The USSD session is assumed to persist if the type code is "1", otherwise |
| 3622 | * the current session (if any) is assumed to have terminated. |
| 3623 | * |
| 3624 | * ((const char **)data)[1] points to a message string if applicable, which |
| 3625 | * should always be in UTF-8. |
| 3626 | */ |
| 3627 | #define RIL_UNSOL_ON_USSD 1006 |
| 3628 | /* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */ |
| 3629 | |
| 3630 | /** |
| 3631 | * RIL_UNSOL_ON_USSD_REQUEST |
| 3632 | * |
| 3633 | * Obsolete. Send via RIL_UNSOL_ON_USSD |
| 3634 | */ |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3635 | #define RIL_UNSOL_ON_USSD_REQUEST 1007 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3636 | |
| 3637 | |
| 3638 | /** |
| 3639 | * RIL_UNSOL_NITZ_TIME_RECEIVED |
| 3640 | * |
| 3641 | * Called when radio has received a NITZ time message |
| 3642 | * |
| 3643 | * "data" is const char * pointing to NITZ time string |
| 3644 | * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt" |
| 3645 | */ |
| 3646 | #define RIL_UNSOL_NITZ_TIME_RECEIVED 1008 |
| 3647 | |
| 3648 | /** |
| 3649 | * RIL_UNSOL_SIGNAL_STRENGTH |
| 3650 | * |
| 3651 | * Radio may report signal strength rather han have it polled. |
| 3652 | * |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 3653 | * "data" is a const RIL_SignalStrength * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3654 | */ |
| 3655 | #define RIL_UNSOL_SIGNAL_STRENGTH 1009 |
| 3656 | |
| 3657 | |
| 3658 | /** |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3659 | * RIL_UNSOL_DATA_CALL_LIST_CHANGED |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3660 | * |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 3661 | * "data" is an array of RIL_Data_Call_Response_v6 identical to that |
Wink Saville | 29487ef | 2011-04-15 09:15:31 -0700 | [diff] [blame] | 3662 | * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list |
| 3663 | * of current data contexts including new contexts that have been |
| 3664 | * activated. A data call is only removed from this list when the |
| 3665 | * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio |
| 3666 | * is powered off/on. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3667 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3668 | * See also: RIL_REQUEST_DATA_CALL_LIST |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3669 | */ |
| 3670 | |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3671 | #define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3672 | |
| 3673 | /** |
| 3674 | * RIL_UNSOL_SUPP_SVC_NOTIFICATION |
| 3675 | * |
| 3676 | * Reports supplementary service related notification from the network. |
| 3677 | * |
| 3678 | * "data" is a const RIL_SuppSvcNotification * |
| 3679 | * |
| 3680 | */ |
| 3681 | |
| 3682 | #define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011 |
| 3683 | |
| 3684 | /** |
| 3685 | * RIL_UNSOL_STK_SESSION_END |
| 3686 | * |
| 3687 | * Indicate when STK session is terminated by SIM. |
| 3688 | * |
| 3689 | * "data" is NULL |
| 3690 | */ |
| 3691 | #define RIL_UNSOL_STK_SESSION_END 1012 |
| 3692 | |
| 3693 | /** |
| 3694 | * RIL_UNSOL_STK_PROACTIVE_COMMAND |
| 3695 | * |
| 3696 | * Indicate when SIM issue a STK proactive command to applications |
| 3697 | * |
| 3698 | * "data" is a const char * containing SAT/USAT proactive command |
| 3699 | * in hexadecimal format string starting with command tag |
| 3700 | * |
| 3701 | */ |
| 3702 | #define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013 |
| 3703 | |
| 3704 | /** |
| 3705 | * RIL_UNSOL_STK_EVENT_NOTIFY |
| 3706 | * |
| 3707 | * Indicate when SIM notifies applcations some event happens. |
| 3708 | * Generally, application does not need to have any feedback to |
| 3709 | * SIM but shall be able to indicate appropriate messages to users. |
| 3710 | * |
| 3711 | * "data" is a const char * containing SAT/USAT commands or responses |
| 3712 | * sent by ME to SIM or commands handled by ME, in hexadecimal format string |
| 3713 | * starting with first byte of response data or command tag |
| 3714 | * |
| 3715 | */ |
| 3716 | #define RIL_UNSOL_STK_EVENT_NOTIFY 1014 |
| 3717 | |
| 3718 | /** |
| 3719 | * RIL_UNSOL_STK_CALL_SETUP |
| 3720 | * |
| 3721 | * Indicate when SIM wants application to setup a voice call. |
| 3722 | * |
| 3723 | * "data" is const int * |
| 3724 | * ((const int *)data)[0] contains timeout value (in milliseconds) |
| 3725 | */ |
| 3726 | #define RIL_UNSOL_STK_CALL_SETUP 1015 |
| 3727 | |
| 3728 | /** |
| 3729 | * RIL_UNSOL_SIM_SMS_STORAGE_FULL |
| 3730 | * |
| 3731 | * Indicates that SMS storage on the SIM is full. Sent when the network |
| 3732 | * attempts to deliver a new SMS message. Messages cannot be saved on the |
| 3733 | * SIM until space is freed. In particular, incoming Class 2 messages |
| 3734 | * cannot be stored. |
| 3735 | * |
| 3736 | * "data" is null |
| 3737 | * |
| 3738 | */ |
| 3739 | #define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016 |
| 3740 | |
| 3741 | /** |
| 3742 | * RIL_UNSOL_SIM_REFRESH |
| 3743 | * |
| 3744 | * Indicates that file(s) on the SIM have been updated, or the SIM |
| 3745 | * has been reinitialized. |
| 3746 | * |
Alex Yakavenka | 45e740e | 2012-01-31 11:48:27 -0800 | [diff] [blame] | 3747 | * In the case where RIL is version 6 or older: |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3748 | * "data" is an int * |
| 3749 | * ((int *)data)[0] is a RIL_SimRefreshResult. |
| 3750 | * ((int *)data)[1] is the EFID of the updated file if the result is |
Alex Yakavenka | 45e740e | 2012-01-31 11:48:27 -0800 | [diff] [blame] | 3751 | * SIM_FILE_UPDATE or NULL for any other result. |
| 3752 | * |
| 3753 | * In the case where RIL is version 7: |
| 3754 | * "data" is a RIL_SimRefreshResponse_v7 * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3755 | * |
Naveen Kalla | 2bc78d6 | 2011-12-07 16:22:53 -0800 | [diff] [blame] | 3756 | * Note: If the SIM state changes as a result of the SIM refresh (eg, |
| 3757 | * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3758 | * should be sent. |
| 3759 | */ |
| 3760 | #define RIL_UNSOL_SIM_REFRESH 1017 |
| 3761 | |
| 3762 | /** |
| 3763 | * RIL_UNSOL_CALL_RING |
| 3764 | * |
| 3765 | * Ring indication for an incoming call (eg, RING or CRING event). |
Wink Saville | 6453306 | 2009-08-28 11:16:03 -0700 | [diff] [blame] | 3766 | * There must be at least one RIL_UNSOL_CALL_RING at the beginning |
| 3767 | * of a call and sending multiple is optional. If the system property |
| 3768 | * ro.telephony.call_ring.multiple is false then the upper layers |
| 3769 | * will generate the multiple events internally. Otherwise the vendor |
| 3770 | * ril must generate multiple RIL_UNSOL_CALL_RING if |
| 3771 | * ro.telephony.call_ring.multiple is true or if it is absent. |
| 3772 | * |
| 3773 | * The rate of these events is controlled by ro.telephony.call_ring.delay |
| 3774 | * and has a default value of 3000 (3 seconds) if absent. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3775 | * |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 3776 | * "data" is null for GSM |
| 3777 | * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3778 | */ |
| 3779 | #define RIL_UNSOL_CALL_RING 1018 |
| 3780 | |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 3781 | /** |
| 3782 | * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED |
| 3783 | * |
| 3784 | * Indicates that SIM state changes. |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 3785 | * |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 3786 | * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3787 | |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 3788 | * "data" is null |
| 3789 | */ |
| 3790 | #define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019 |
| 3791 | |
| 3792 | /** |
| 3793 | * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS |
| 3794 | * |
| 3795 | * Called when new CDMA SMS is received |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 3796 | * |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 3797 | * "data" is const RIL_CDMA_SMS_Message * |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 3798 | * |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 3799 | * Callee will subsequently confirm the receipt of the SMS with |
| 3800 | * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 3801 | * |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 3802 | * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until |
| 3803 | * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 3804 | * |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 3805 | */ |
| 3806 | #define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020 |
| 3807 | |
| 3808 | /** |
| 3809 | * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS |
| 3810 | * |
| 3811 | * Called when new Broadcast SMS is received |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3812 | * |
Henrik Hall | 0eba202 | 2010-11-25 10:20:56 +0100 | [diff] [blame] | 3813 | * "data" can be one of the following: |
| 3814 | * If received from GSM network, "data" is const char of 88 bytes |
| 3815 | * which indicates each page of a CBS Message sent to the MS by the |
| 3816 | * BTS as coded in 3GPP 23.041 Section 9.4.1.2. |
| 3817 | * If received from UMTS network, "data" is const char of 90 up to 1252 |
| 3818 | * bytes which contain between 1 and 15 CBS Message pages sent as one |
| 3819 | * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2. |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3820 | * |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 3821 | */ |
| 3822 | #define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3823 | |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 3824 | /** |
| 3825 | * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL |
| 3826 | * |
| 3827 | * Indicates that SMS storage on the RUIM is full. Messages |
| 3828 | * cannot be saved on the RUIM until space is freed. |
| 3829 | * |
| 3830 | * "data" is null |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3831 | * |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 3832 | */ |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 3833 | #define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022 |
| 3834 | |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 3835 | /** |
| 3836 | * RIL_UNSOL_RESTRICTED_STATE_CHANGED |
| 3837 | * |
| 3838 | * Indicates a restricted state change (eg, for Domain Specific Access Control). |
| 3839 | * |
| 3840 | * Radio need send this msg after radio off/on cycle no matter it is changed or not. |
| 3841 | * |
| 3842 | * "data" is an int * |
| 3843 | * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values. |
| 3844 | */ |
| 3845 | #define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023 |
| 3846 | |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 3847 | /** |
| 3848 | * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE |
| 3849 | * |
| 3850 | * Indicates that the radio system selection module has |
| 3851 | * autonomously entered emergency callback mode. |
| 3852 | * |
| 3853 | * "data" is null |
| 3854 | * |
| 3855 | */ |
| 3856 | #define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024 |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 3857 | |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 3858 | /** |
| 3859 | * RIL_UNSOL_CDMA_CALL_WAITING |
| 3860 | * |
| 3861 | * Called when CDMA radio receives a call waiting indication. |
| 3862 | * |
| 3863 | * "data" is const RIL_CDMA_CallWaiting * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 3864 | * |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 3865 | */ |
| 3866 | #define RIL_UNSOL_CDMA_CALL_WAITING 1025 |
| 3867 | |
| 3868 | /** |
| 3869 | * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS |
| 3870 | * |
| 3871 | * Called when CDMA radio receives an update of the progress of an |
| 3872 | * OTASP/OTAPA call. |
| 3873 | * |
| 3874 | * "data" is const int * |
| 3875 | * For CDMA this is an integer OTASP/OTAPA status listed in |
| 3876 | * RIL_CDMA_OTA_ProvisionStatus. |
| 3877 | * |
| 3878 | */ |
| 3879 | #define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026 |
| 3880 | |
| 3881 | /** |
| 3882 | * RIL_UNSOL_CDMA_INFO_REC |
| 3883 | * |
| 3884 | * Called when CDMA radio receives one or more info recs. |
| 3885 | * |
| 3886 | * "data" is const RIL_CDMA_InformationRecords * |
| 3887 | * |
| 3888 | */ |
| 3889 | #define RIL_UNSOL_CDMA_INFO_REC 1027 |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 3890 | |
Jaikumar Ganesh | af6ecbf | 2009-04-29 13:27:51 -0700 | [diff] [blame] | 3891 | /** |
| 3892 | * RIL_UNSOL_OEM_HOOK_RAW |
| 3893 | * |
| 3894 | * This is for OEM specific use. |
| 3895 | * |
| 3896 | * "data" is a byte[] |
| 3897 | */ |
| 3898 | #define RIL_UNSOL_OEM_HOOK_RAW 1028 |
| 3899 | |
John Wang | 5d621da | 2009-09-18 17:17:48 -0700 | [diff] [blame] | 3900 | /** |
| 3901 | * RIL_UNSOL_RINGBACK_TONE |
| 3902 | * |
| 3903 | * Indicates that nework doesn't have in-band information, need to |
| 3904 | * play out-band tone. |
| 3905 | * |
| 3906 | * "data" is an int * |
| 3907 | * ((int *)data)[0] == 0 for stop play ringback tone. |
| 3908 | * ((int *)data)[0] == 1 for start play ringback tone. |
| 3909 | */ |
| 3910 | #define RIL_UNSOL_RINGBACK_TONE 1029 |
| 3911 | |
John Wang | 5909cf8 | 2010-01-29 00:18:54 -0800 | [diff] [blame] | 3912 | /** |
| 3913 | * RIL_UNSOL_RESEND_INCALL_MUTE |
| 3914 | * |
| 3915 | * Indicates that framework/application need reset the uplink mute state. |
| 3916 | * |
| 3917 | * There may be situations where the mute state becomes out of sync |
| 3918 | * between the application and device in some GSM infrastructures. |
| 3919 | * |
| 3920 | * "data" is null |
| 3921 | */ |
| 3922 | #define RIL_UNSOL_RESEND_INCALL_MUTE 1030 |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 3923 | |
| 3924 | /** |
| 3925 | * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED |
| 3926 | * |
| 3927 | * Called when CDMA subscription source changed. |
| 3928 | * |
| 3929 | * "data" is int * |
| 3930 | * ((int *)data)[0] is == RIL_CdmaSubscriptionSource |
| 3931 | */ |
Wink Saville | 29487ef | 2011-04-15 09:15:31 -0700 | [diff] [blame] | 3932 | #define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031 |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 3933 | |
| 3934 | /** |
| 3935 | * RIL_UNSOL_CDMA_PRL_CHANGED |
| 3936 | * |
| 3937 | * Called when PRL (preferred roaming list) changes. |
| 3938 | * |
| 3939 | * "data" is int * |
| 3940 | * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION |
| 3941 | */ |
| 3942 | #define RIL_UNSOL_CDMA_PRL_CHANGED 1032 |
| 3943 | |
| 3944 | /** |
| 3945 | * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE |
| 3946 | * |
| 3947 | * Called when Emergency Callback Mode Ends |
| 3948 | * |
| 3949 | * Indicates that the radio system selection module has |
| 3950 | * proactively exited emergency callback mode. |
| 3951 | * |
| 3952 | * "data" is NULL |
| 3953 | * |
| 3954 | */ |
| 3955 | #define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033 |
| 3956 | |
Wink Saville | 5b9df33 | 2011-04-06 16:24:21 -0700 | [diff] [blame] | 3957 | /** |
| 3958 | * RIL_UNSOL_RIL_CONNECTED |
| 3959 | * |
| 3960 | * Called the ril connects and returns the version |
| 3961 | * |
| 3962 | * "data" is int * |
| 3963 | * ((int *)data)[0] is RIL_VERSION |
| 3964 | */ |
| 3965 | #define RIL_UNSOL_RIL_CONNECTED 1034 |
| 3966 | |
Naveen Kalla | 2bc78d6 | 2011-12-07 16:22:53 -0800 | [diff] [blame] | 3967 | /** |
| 3968 | * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED |
| 3969 | * |
| 3970 | * Indicates that voice technology has changed. Contains new radio technology |
| 3971 | * as a data in the message. |
| 3972 | * |
| 3973 | * "data" is int * |
| 3974 | * ((int *)data)[0] is of type const RIL_RadioTechnology |
| 3975 | * |
| 3976 | */ |
| 3977 | #define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035 |
| 3978 | |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 3979 | /** |
| 3980 | * RIL_UNSOL_CELL_INFO_LIST |
| 3981 | * |
| 3982 | * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned |
| 3983 | * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE. |
| 3984 | * |
| 3985 | * "data" is NULL |
| 3986 | * |
| 3987 | * "response" is an array of RIL_CellInfo. |
| 3988 | */ |
| 3989 | #define RIL_UNSOL_CELL_INFO_LIST 1036 |
Naveen Kalla | 2bc78d6 | 2011-12-07 16:22:53 -0800 | [diff] [blame] | 3990 | |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 3991 | /***********************************************************************/ |
| 3992 | |
| 3993 | |
| 3994 | /** |
| 3995 | * RIL_Request Function pointer |
| 3996 | * |
| 3997 | * @param request is one of RIL_REQUEST_* |
| 3998 | * @param data is pointer to data defined for that RIL_REQUEST_* |
| 3999 | * data is owned by caller, and should not be modified or freed by callee |
| 4000 | * @param t should be used in subsequent call to RIL_onResponse |
| 4001 | * @param datalen the length of data |
| 4002 | * |
| 4003 | */ |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 4004 | typedef void (*RIL_RequestFunc) (int request, void *data, |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 4005 | size_t datalen, RIL_Token t); |
| 4006 | |
| 4007 | /** |
| 4008 | * This function should return the current radio state synchronously |
| 4009 | */ |
| 4010 | typedef RIL_RadioState (*RIL_RadioStateRequest)(); |
| 4011 | |
| 4012 | /** |
| 4013 | * This function returns "1" if the specified RIL_REQUEST code is |
| 4014 | * supported and 0 if it is not |
| 4015 | * |
| 4016 | * @param requestCode is one of RIL_REQUEST codes |
| 4017 | */ |
| 4018 | |
| 4019 | typedef int (*RIL_Supports)(int requestCode); |
| 4020 | |
| 4021 | /** |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 4022 | * 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] | 4023 | * thread that calls RIL_RequestFunc--and indicates that a pending |
| 4024 | * request should be cancelled. |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 4025 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 4026 | * On cancel, the callee should do its best to abandon the request and |
| 4027 | * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point. |
| 4028 | * |
| 4029 | * Subsequent calls to RIL_onRequestComplete for this request with |
| 4030 | * other results will be tolerated but ignored. (That is, it is valid |
| 4031 | * to ignore the cancellation request) |
| 4032 | * |
| 4033 | * RIL_Cancel calls should return immediately, and not wait for cancellation |
| 4034 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 4035 | * 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] | 4036 | * interface |
| 4037 | * |
| 4038 | * @param t token wants to be canceled |
| 4039 | */ |
| 4040 | |
| 4041 | typedef void (*RIL_Cancel)(RIL_Token t); |
| 4042 | |
| 4043 | typedef void (*RIL_TimedCallback) (void *param); |
| 4044 | |
| 4045 | /** |
| 4046 | * Return a version string for your RIL implementation |
| 4047 | */ |
| 4048 | typedef const char * (*RIL_GetVersion) (void); |
| 4049 | |
| 4050 | typedef struct { |
| 4051 | int version; /* set to RIL_VERSION */ |
| 4052 | RIL_RequestFunc onRequest; |
| 4053 | RIL_RadioStateRequest onStateRequest; |
| 4054 | RIL_Supports supports; |
| 4055 | RIL_Cancel onCancel; |
| 4056 | RIL_GetVersion getVersion; |
| 4057 | } RIL_RadioFunctions; |
| 4058 | |
Sungmin Choi | 7569753 | 2013-04-26 15:04:45 -0700 | [diff] [blame] | 4059 | typedef struct { |
| 4060 | char *apn; |
| 4061 | char *protocol; |
| 4062 | int authtype; |
| 4063 | char *username; |
| 4064 | char *password; |
| 4065 | } RIL_InitialAttachApn; |
| 4066 | |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 4067 | #ifdef RIL_SHLIB |
| 4068 | struct RIL_Env { |
| 4069 | /** |
| 4070 | * "t" is parameter passed in on previous call to RIL_Notification |
| 4071 | * routine. |
| 4072 | * |
| 4073 | * If "e" != SUCCESS, then response can be null/is ignored |
| 4074 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 4075 | * "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] | 4076 | * freed by callee |
| 4077 | * |
| 4078 | * RIL_onRequestComplete will return as soon as possible |
| 4079 | */ |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 4080 | void (*OnRequestComplete)(RIL_Token t, RIL_Errno e, |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 4081 | void *response, size_t responselen); |
| 4082 | |
| 4083 | /** |
| 4084 | * "unsolResponse" is one of RIL_UNSOL_RESPONSE_* |
| 4085 | * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_* |
| 4086 | * |
| 4087 | * "data" is owned by caller, and should not be modified or freed by callee |
| 4088 | */ |
| 4089 | |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 4090 | void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 4091 | size_t datalen); |
| 4092 | |
| 4093 | /** |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 4094 | * 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] | 4095 | * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies |
| 4096 | * a relative time value at which the callback is invoked. If relativeTime is |
| 4097 | * NULL or points to a 0-filled structure, the callback will be invoked as |
| 4098 | * soon as possible |
| 4099 | */ |
| 4100 | |
Dianne Hackborn | 0d9f0c0 | 2010-06-25 16:50:46 -0700 | [diff] [blame] | 4101 | void (*RequestTimedCallback) (RIL_TimedCallback callback, |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 4102 | void *param, const struct timeval *relativeTime); |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 4103 | }; |
| 4104 | |
| 4105 | |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 4106 | /** |
| 4107 | * RIL implementations must defined RIL_Init |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 4108 | * argc and argv will be command line arguments intended for the RIL implementation |
| 4109 | * Return NULL on error |
| 4110 | * |
| 4111 | * @param env is environment point defined as RIL_Env |
| 4112 | * @param argc number of arguments |
| 4113 | * @param argv list fo arguments |
| 4114 | * |
| 4115 | */ |
| 4116 | const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv); |
| 4117 | |
| 4118 | #else /* RIL_SHLIB */ |
| 4119 | |
| 4120 | /** |
| 4121 | * Call this once at startup to register notification routine |
| 4122 | * |
| 4123 | * @param callbacks user-specifed callback function |
| 4124 | */ |
| 4125 | void RIL_register (const RIL_RadioFunctions *callbacks); |
| 4126 | |
| 4127 | |
| 4128 | /** |
| 4129 | * |
| 4130 | * RIL_onRequestComplete will return as soon as possible |
| 4131 | * |
| 4132 | * @param t is parameter passed in on previous call to RIL_Notification |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 4133 | * routine. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 4134 | * @param e error code |
| 4135 | * if "e" != SUCCESS, then response can be null/is ignored |
| 4136 | * @param response is owned by caller, and should not be modified or |
| 4137 | * freed by callee |
| 4138 | * @param responselen the length of response in byte |
| 4139 | */ |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 4140 | void RIL_onRequestComplete(RIL_Token t, RIL_Errno e, |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 4141 | void *response, size_t responselen); |
| 4142 | |
| 4143 | /** |
| 4144 | * @param unsolResponse is one of RIL_UNSOL_RESPONSE_* |
| 4145 | * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_* |
| 4146 | * "data" is owned by caller, and should not be modified or freed by callee |
| 4147 | * @param datalen the length of data in byte |
| 4148 | */ |
| 4149 | |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 4150 | void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 4151 | size_t datalen); |
| 4152 | |
| 4153 | |
| 4154 | /** |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 4155 | * 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] | 4156 | * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies |
| 4157 | * a relative time value at which the callback is invoked. If relativeTime is |
| 4158 | * NULL or points to a 0-filled structure, the callback will be invoked as |
| 4159 | * soon as possible |
| 4160 | * |
| 4161 | * @param callback user-specifed callback function |
| 4162 | * @param param parameter list |
| 4163 | * @param relativeTime a relative time value at which the callback is invoked |
| 4164 | */ |
| 4165 | |
Dianne Hackborn | 0d9f0c0 | 2010-06-25 16:50:46 -0700 | [diff] [blame] | 4166 | void RIL_requestTimedCallback (RIL_TimedCallback callback, |
| 4167 | void *param, const struct timeval *relativeTime); |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 4168 | |
| 4169 | |
| 4170 | #endif /* RIL_SHLIB */ |
| 4171 | |
| 4172 | #ifdef __cplusplus |
| 4173 | } |
| 4174 | #endif |
| 4175 | |
| 4176 | #endif /*ANDROID_RIL_H*/ |