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> |
Sukanya Rajkhowa | a18b9d1 | 2013-09-10 12:30:13 -0700 | [diff] [blame] | 22 | #include <telephony/ril_cdma_sms.h> |
Jake Hamby | 8a4a233 | 2014-01-15 13:12:05 -0800 | [diff] [blame] | 23 | #include <telephony/ril_nv_items.h> |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 24 | #include <telephony/ril_msim.h> |
Jake Hamby | 8a4a233 | 2014-01-15 13:12:05 -0800 | [diff] [blame] | 25 | |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 26 | #ifndef FEATURE_UNIT_TEST |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 27 | #include <sys/time.h> |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 28 | #endif /* !FEATURE_UNIT_TEST */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 29 | |
| 30 | #ifdef __cplusplus |
| 31 | extern "C" { |
| 32 | #endif |
| 33 | |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 34 | |
| 35 | #if defined(ANDROID_SIM_COUNT_2) |
| 36 | #define SIM_COUNT 2 |
| 37 | #elif defined(ANDROID_SIM_COUNT_3) |
| 38 | #define SIM_COUNT 3 |
| 39 | #elif defined(ANDROID_SIM_COUNT_4) |
| 40 | #define SIM_COUNT 4 |
| 41 | #else |
| 42 | #define SIM_COUNT 1 |
| 43 | #endif |
| 44 | |
| 45 | #ifndef ANDROID_MULTI_SIM |
| 46 | #define SIM_COUNT 1 |
| 47 | #endif |
| 48 | |
Shishir Agrawal | 2458d8d | 2013-11-27 14:53:05 -0800 | [diff] [blame] | 49 | #define RIL_VERSION 10 /* Current version */ |
Alex Yakavenka | 45e740e | 2012-01-31 11:48:27 -0800 | [diff] [blame] | 50 | #define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 51 | |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 52 | #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64 |
| 53 | #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81 |
| 54 | |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 55 | #define MAX_RILDS 3 |
| 56 | #define MAX_SOCKET_NAME_LENGTH 6 |
| 57 | #define MAX_CLIENT_ID_LENGTH 2 |
| 58 | #define MAX_DEBUG_SOCKET_NAME_LENGTH 12 |
| 59 | #define MAX_QEMU_PIPE_NAME_LENGTH 11 |
Wink Saville | 8b4e4f7 | 2014-10-17 15:01:45 -0700 | [diff] [blame] | 60 | #define MAX_UUID_LENGTH 64 |
| 61 | |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 62 | |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 63 | typedef void * RIL_Token; |
| 64 | |
| 65 | typedef enum { |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 66 | RIL_SOCKET_1, |
| 67 | #if (SIM_COUNT >= 2) |
| 68 | RIL_SOCKET_2, |
| 69 | #if (SIM_COUNT >= 3) |
| 70 | RIL_SOCKET_3, |
| 71 | #endif |
| 72 | #if (SIM_COUNT >= 4) |
| 73 | RIL_SOCKET_4, |
| 74 | #endif |
| 75 | #endif |
| 76 | RIL_SOCKET_NUM |
| 77 | } RIL_SOCKET_ID; |
| 78 | |
| 79 | |
| 80 | typedef enum { |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 81 | RIL_E_SUCCESS = 0, |
| 82 | RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */ |
| 83 | RIL_E_GENERIC_FAILURE = 2, |
| 84 | RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */ |
| 85 | RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */ |
| 86 | RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */ |
| 87 | RIL_E_REQUEST_NOT_SUPPORTED = 6, |
| 88 | RIL_E_CANCELLED = 7, |
| 89 | RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice |
| 90 | call on a Class C GPRS device */ |
| 91 | RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device |
| 92 | registers in network */ |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 93 | RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */ |
| 94 | RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription |
| 95 | shall be retrieved because of SIM or RUIM |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 96 | card absent */ |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 97 | 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] | 98 | location */ |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 99 | 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] | 100 | RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */ |
Shishir Agrawal | 2458d8d | 2013-11-27 14:53:05 -0800 | [diff] [blame] | 101 | RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to |
John Wang | 7553447 | 2010-04-20 15:11:42 -0700 | [diff] [blame] | 102 | illegal SIM or ME */ |
Shishir Agrawal | 2458d8d | 2013-11-27 14:53:05 -0800 | [diff] [blame] | 103 | RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */ |
| 104 | RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 105 | } RIL_Errno; |
| 106 | |
| 107 | typedef enum { |
| 108 | RIL_CALL_ACTIVE = 0, |
| 109 | RIL_CALL_HOLDING = 1, |
| 110 | RIL_CALL_DIALING = 2, /* MO call only */ |
| 111 | RIL_CALL_ALERTING = 3, /* MO call only */ |
| 112 | RIL_CALL_INCOMING = 4, /* MT call only */ |
| 113 | RIL_CALL_WAITING = 5 /* MT call only */ |
| 114 | } RIL_CallState; |
| 115 | |
| 116 | typedef enum { |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 117 | RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */ |
| 118 | RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */ |
Naveen Kalla | 2bc78d6 | 2011-12-07 16:22:53 -0800 | [diff] [blame] | 119 | /* 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] | 120 | 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] | 121 | 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] | 122 | personalization locked, or SIM absent */ |
| 123 | RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */ |
| 124 | RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */ |
| 125 | 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] | 126 | 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] | 127 | personalization locked, or RUIM absent */ |
| 128 | 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] | 129 | RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */ |
| 130 | RADIO_STATE_ON = 10 /* Radio is on */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 131 | } RIL_RadioState; |
| 132 | |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 133 | typedef enum { |
| 134 | RADIO_TECH_UNKNOWN = 0, |
| 135 | RADIO_TECH_GPRS = 1, |
| 136 | RADIO_TECH_EDGE = 2, |
| 137 | RADIO_TECH_UMTS = 3, |
| 138 | RADIO_TECH_IS95A = 4, |
| 139 | RADIO_TECH_IS95B = 5, |
| 140 | RADIO_TECH_1xRTT = 6, |
| 141 | RADIO_TECH_EVDO_0 = 7, |
| 142 | RADIO_TECH_EVDO_A = 8, |
| 143 | RADIO_TECH_HSDPA = 9, |
| 144 | RADIO_TECH_HSUPA = 10, |
| 145 | RADIO_TECH_HSPA = 11, |
| 146 | RADIO_TECH_EVDO_B = 12, |
| 147 | RADIO_TECH_EHRPD = 13, |
Glenn Kasten | c941961 | 2011-02-02 17:44:18 -0800 | [diff] [blame] | 148 | RADIO_TECH_LTE = 14, |
Naveen Kalla | 2bc78d6 | 2011-12-07 16:22:53 -0800 | [diff] [blame] | 149 | RADIO_TECH_HSPAP = 15, // HSPA+ |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 150 | RADIO_TECH_GSM = 16, // Only supports voice |
| 151 | RADIO_TECH_TD_SCDMA = 17 |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 152 | } RIL_RadioTechnology; |
| 153 | |
Wink Saville | 8b4e4f7 | 2014-10-17 15:01:45 -0700 | [diff] [blame] | 154 | typedef enum { |
| 155 | RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN), |
| 156 | RAF_GPRS = (1 << RADIO_TECH_GPRS), |
| 157 | RAF_EDGE = (1 << RADIO_TECH_EDGE), |
| 158 | RAF_UMTS = (1 << RADIO_TECH_UMTS), |
| 159 | RAF_IS95A = (1 << RADIO_TECH_IS95A), |
| 160 | RAF_IS95B = (1 << RADIO_TECH_IS95B), |
| 161 | RAF_1xRTT = (1 << RADIO_TECH_1xRTT), |
| 162 | RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0), |
| 163 | RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A), |
| 164 | RAF_HSDPA = (1 << RADIO_TECH_HSDPA), |
| 165 | RAF_HSUPA = (1 << RADIO_TECH_HSUPA), |
| 166 | RAF_HSPA = (1 << RADIO_TECH_HSPA), |
| 167 | RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B), |
| 168 | RAF_EHRPD = (1 << RADIO_TECH_EHRPD), |
| 169 | RAF_LTE = (1 << RADIO_TECH_LTE), |
| 170 | RAF_HSPAP = (1 << RADIO_TECH_HSPAP), |
| 171 | RAF_GSM = (1 << RADIO_TECH_GSM), |
| 172 | RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA), |
| 173 | } RIL_RadioAccessFamily; |
| 174 | |
| 175 | typedef enum { |
| 176 | RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes |
| 177 | RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be |
| 178 | // forthcoming with these same parameters |
| 179 | RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned |
| 180 | // RIL_RadioCapability.status = 0, if any START's fail no |
| 181 | // APPLY will be sent |
| 182 | RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY |
| 183 | RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error |
| 184 | // occurs in any previous command the RIL_RadioAccessesFamily and |
Legler Wu | 8caf06f | 2014-10-29 14:02:14 +0800 | [diff] [blame] | 185 | // logicalModemUuid fields will be the prior configuration thus |
Wink Saville | 8b4e4f7 | 2014-10-17 15:01:45 -0700 | [diff] [blame] | 186 | // restoring the configuration to the previous value. An error |
| 187 | // returned by this command will generally be ignored or may |
| 188 | // cause that logical modem to be removed from service. |
| 189 | } RadioCapabilityPhase; |
| 190 | |
| 191 | typedef enum { |
| 192 | RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START, |
| 193 | // RC_PHASE_APPLY |
| 194 | RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio |
| 195 | // capability was success with RC_PHASE_FINISH |
| 196 | RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio |
| 197 | // capability is fail with RC_PHASE_FINISH. |
| 198 | } RadioCapabilityStatus; |
| 199 | |
| 200 | #define RIL_RADIO_CAPABILITY_VERSION 1 |
| 201 | typedef struct { |
Legler Wu | 8caf06f | 2014-10-29 14:02:14 +0800 | [diff] [blame] | 202 | int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION |
Wink Saville | 8b4e4f7 | 2014-10-17 15:01:45 -0700 | [diff] [blame] | 203 | int session; // Unique session value defined by framework returned in all "responses/unsol" |
| 204 | int phase; // CONFIGURED, START, APPLY, FINISH |
| 205 | int rat; // RIL_RadioAccessFamily for the radio |
| 206 | char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem. |
| 207 | int status; // Return status and an input parameter for RC_PHASE_FINISH |
| 208 | } RIL_RadioCapability; |
| 209 | |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 210 | // Do we want to split Data from Voice and the use |
| 211 | // RIL_RadioTechnology for get/setPreferredVoice/Data ? |
| 212 | typedef enum { |
| 213 | PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */ |
| 214 | PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */ |
| 215 | PREF_NET_TYPE_WCDMA = 2, /* WCDMA */ |
| 216 | PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */ |
| 217 | PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */ |
| 218 | PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */ |
| 219 | PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */ |
| 220 | PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */ |
| 221 | PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */ |
| 222 | PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */ |
| 223 | 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] | 224 | PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */ |
| 225 | PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 226 | } RIL_PreferredNetworkType; |
| 227 | |
| 228 | /* Source for cdma subscription */ |
| 229 | typedef enum { |
| 230 | CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0, |
| 231 | CDMA_SUBSCRIPTION_SOURCE_NV = 1 |
| 232 | } RIL_CdmaSubscriptionSource; |
| 233 | |
Wink Saville | 74fa388 | 2009-12-22 15:35:41 -0800 | [diff] [blame] | 234 | /* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */ |
| 235 | typedef enum { |
| 236 | RIL_UUS_TYPE1_IMPLICIT = 0, |
| 237 | RIL_UUS_TYPE1_REQUIRED = 1, |
| 238 | RIL_UUS_TYPE1_NOT_REQUIRED = 2, |
| 239 | RIL_UUS_TYPE2_REQUIRED = 3, |
| 240 | RIL_UUS_TYPE2_NOT_REQUIRED = 4, |
| 241 | RIL_UUS_TYPE3_REQUIRED = 5, |
| 242 | RIL_UUS_TYPE3_NOT_REQUIRED = 6 |
| 243 | } RIL_UUS_Type; |
| 244 | |
| 245 | /* User-to-User Signaling Information data coding schemes. Possible values for |
| 246 | * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been |
| 247 | * specified in section 10.5.4.25 of 3GPP TS 24.008 */ |
| 248 | typedef enum { |
| 249 | RIL_UUS_DCS_USP = 0, /* User specified protocol */ |
| 250 | RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */ |
| 251 | RIL_UUS_DCS_X244 = 2, /* X.244 */ |
| 252 | RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement |
| 253 | convergence function */ |
| 254 | RIL_UUS_DCS_IA5c = 4 /* IA5 characters */ |
| 255 | } RIL_UUS_DCS; |
| 256 | |
| 257 | /* User-to-User Signaling Information defined in 3GPP 23.087 v8.0 |
| 258 | * This data is passed in RIL_ExtensionRecord and rec contains this |
| 259 | * structure when type is RIL_UUS_INFO_EXT_REC */ |
| 260 | typedef struct { |
| 261 | RIL_UUS_Type uusType; /* UUS Type */ |
| 262 | RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */ |
| 263 | int uusLength; /* Length of UUS Data */ |
| 264 | char * uusData; /* UUS Data */ |
| 265 | } RIL_UUS_Info; |
| 266 | |
| 267 | /* 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] | 268 | typedef struct { |
| 269 | char isPresent; /* non-zero if signal information record is present */ |
| 270 | char signalType; /* as defined 3.7.5.5-1 */ |
| 271 | char alertPitch; /* as defined 3.7.5.5-2 */ |
| 272 | char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */ |
| 273 | } RIL_CDMA_SignalInfoRecord; |
| 274 | |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 275 | typedef struct { |
| 276 | RIL_CallState state; |
| 277 | int index; /* Connection Index for use with, eg, AT+CHLD */ |
| 278 | int toa; /* type of address, eg 145 = intl */ |
| 279 | char isMpty; /* nonzero if is mpty call */ |
| 280 | char isMT; /* nonzero if call is mobile terminated */ |
| 281 | char als; /* ALS line indicator if available |
| 282 | (0 = line 1) */ |
| 283 | char isVoice; /* nonzero if this is is a voice call */ |
| 284 | char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */ |
| 285 | char * number; /* Remote party number */ |
| 286 | int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ |
| 287 | char * name; /* Remote party name */ |
| 288 | int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ |
Wink Saville | 74fa388 | 2009-12-22 15:35:41 -0800 | [diff] [blame] | 289 | 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] | 290 | } RIL_Call; |
| 291 | |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 292 | /* Deprecated, use RIL_Data_Call_Response_v6 */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 293 | typedef struct { |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 294 | int cid; /* Context ID, uniquely identifies this call */ |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 295 | 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] | 296 | char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. |
| 297 | For example, "IP", "IPV6", "IPV4V6", or "PPP". */ |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 298 | char * apn; /* ignored */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 299 | char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */ |
| 300 | } RIL_Data_Call_Response_v4; |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 301 | |
| 302 | /* |
| 303 | * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST |
| 304 | * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0. |
| 305 | */ |
| 306 | typedef struct { |
| 307 | 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] | 308 | int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry |
| 309 | back-off timer value RIL wants to override the one |
| 310 | pre-configured in FW. |
| 311 | The unit is miliseconds. |
| 312 | The value < 0 means no value is suggested. |
Kazuhiro Ondo | 1615758 | 2011-07-24 07:56:32 -0700 | [diff] [blame] | 313 | The value 0 means retry should be done ASAP. |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 314 | The value of INT_MAX(0x7fffffff) means no retry. */ |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 315 | int cid; /* Context ID, uniquely identifies this call */ |
| 316 | int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ |
| 317 | char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. |
| 318 | For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is |
| 319 | PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported |
| 320 | such as "IP" or "IPV6" */ |
| 321 | char * ifname; /* The network interface name */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 322 | char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, |
| 323 | 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] | 324 | May not be empty, typically 1 IPv4 or 1 IPv6 or |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 325 | one of each. If the prefix length is absent the addresses |
| 326 | are assumed to be point to point with IPv4 having a prefix |
| 327 | length of 32 and IPv6 128. */ |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 328 | char * dnses; /* A space-delimited list of DNS server addresses, |
| 329 | e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". |
| 330 | May be empty. */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 331 | char * gateways; /* A space-delimited list of default gateway addresses, |
| 332 | e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". |
| 333 | May be empty in which case the addresses represent point |
| 334 | to point connections. */ |
| 335 | } RIL_Data_Call_Response_v6; |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 336 | |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 337 | typedef struct { |
| 338 | int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ |
| 339 | int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry |
| 340 | back-off timer value RIL wants to override the one |
| 341 | pre-configured in FW. |
| 342 | The unit is miliseconds. |
| 343 | The value < 0 means no value is suggested. |
| 344 | The value 0 means retry should be done ASAP. |
| 345 | The value of INT_MAX(0x7fffffff) means no retry. */ |
| 346 | int cid; /* Context ID, uniquely identifies this call */ |
| 347 | int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ |
| 348 | char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. |
| 349 | For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is |
| 350 | PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported |
| 351 | such as "IP" or "IPV6" */ |
| 352 | char * ifname; /* The network interface name */ |
| 353 | char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, |
| 354 | e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". |
| 355 | May not be empty, typically 1 IPv4 or 1 IPv6 or |
| 356 | one of each. If the prefix length is absent the addresses |
| 357 | are assumed to be point to point with IPv4 having a prefix |
| 358 | length of 32 and IPv6 128. */ |
| 359 | char * dnses; /* A space-delimited list of DNS server addresses, |
| 360 | e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". |
| 361 | May be empty. */ |
| 362 | char * gateways; /* A space-delimited list of default gateway addresses, |
| 363 | e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". |
| 364 | May be empty in which case the addresses represent point |
| 365 | to point connections. */ |
| 366 | char * pcscf; /* the Proxy Call State Control Function address |
| 367 | via PCO(Protocol Configuration Option) for IMS client. */ |
| 368 | } RIL_Data_Call_Response_v9; // FIXME: Change to v10 |
| 369 | |
Sukanya Rajkhowa | a18b9d1 | 2013-09-10 12:30:13 -0700 | [diff] [blame] | 370 | typedef enum { |
| 371 | RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */ |
| 372 | RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */ |
| 373 | } RIL_RadioTechnologyFamily; |
| 374 | |
| 375 | typedef struct { |
| 376 | RIL_RadioTechnologyFamily tech; |
| 377 | unsigned char retry; /* 0 == not retry, nonzero == retry */ |
| 378 | int messageRef; /* Valid field if retry is set to nonzero. |
| 379 | Contains messageRef from RIL_SMS_Response |
| 380 | corresponding to failed MO SMS. |
| 381 | */ |
| 382 | |
| 383 | union { |
| 384 | /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */ |
| 385 | RIL_CDMA_SMS_Message* cdmaMessage; |
| 386 | |
| 387 | /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */ |
| 388 | char** gsmMessage; |
| 389 | } message; |
| 390 | } RIL_IMS_SMS_Message; |
| 391 | |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 392 | typedef struct { |
Tammo Spalink | 8e3a2ca | 2009-09-11 11:26:30 +0800 | [diff] [blame] | 393 | int messageRef; /* TP-Message-Reference for GSM, |
| 394 | and BearerData MessageId for CDMA |
| 395 | (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] | 396 | char *ackPDU; /* or NULL if n/a */ |
Jaikumar Ganesh | 920c78f | 2009-06-04 10:53:15 -0700 | [diff] [blame] | 397 | int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS, |
| 398 | 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA, |
| 399 | -1 if unknown or not applicable*/ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 400 | } RIL_SMS_Response; |
| 401 | |
| 402 | /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */ |
| 403 | typedef struct { |
| 404 | int status; /* Status of message. See TS 27.005 3.1, "<stat>": */ |
| 405 | /* 0 = "REC UNREAD" */ |
| 406 | /* 1 = "REC READ" */ |
| 407 | /* 2 = "STO UNSENT" */ |
| 408 | /* 3 = "STO SENT" */ |
johnwang | f8bc167 | 2009-05-14 19:19:47 -0700 | [diff] [blame] | 409 | char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address, |
| 410 | the TP-layer length is "strlen(pdu)/2". */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 411 | char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte |
| 412 | (as expected by TS 27.005) or NULL for default SMSC */ |
| 413 | } RIL_SMS_WriteArgs; |
| 414 | |
| 415 | /** Used by RIL_REQUEST_DIAL */ |
| 416 | typedef struct { |
| 417 | char * address; |
| 418 | int clir; |
| 419 | /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR" |
| 420 | * clir == 0 on "use subscription default value" |
| 421 | * clir == 1 on "CLIR invocation" (restrict CLI presentation) |
| 422 | * clir == 2 on "CLIR suppression" (allow CLI presentation) |
| 423 | */ |
Wink Saville | 74fa388 | 2009-12-22 15:35:41 -0800 | [diff] [blame] | 424 | 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] | 425 | } RIL_Dial; |
| 426 | |
| 427 | typedef struct { |
| 428 | int command; /* one of the commands listed for TS 27.007 +CRSM*/ |
| 429 | int fileid; /* EF id */ |
| 430 | char *path; /* "pathid" from TS 27.007 +CRSM command. |
| 431 | Path is in hex asciii format eg "7f205f70" |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 432 | Path must always be provided. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 433 | */ |
| 434 | int p1; |
| 435 | int p2; |
| 436 | int p3; |
| 437 | char *data; /* May be NULL*/ |
| 438 | char *pin2; /* May be NULL*/ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 439 | } RIL_SIM_IO_v5; |
| 440 | |
| 441 | typedef struct { |
| 442 | int command; /* one of the commands listed for TS 27.007 +CRSM*/ |
| 443 | int fileid; /* EF id */ |
| 444 | char *path; /* "pathid" from TS 27.007 +CRSM command. |
| 445 | Path is in hex asciii format eg "7f205f70" |
| 446 | Path must always be provided. |
| 447 | */ |
| 448 | int p1; |
| 449 | int p2; |
| 450 | int p3; |
| 451 | char *data; /* May be NULL*/ |
| 452 | char *pin2; /* May be NULL*/ |
| 453 | char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */ |
| 454 | } RIL_SIM_IO_v6; |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 455 | |
Shishir Agrawal | 2458d8d | 2013-11-27 14:53:05 -0800 | [diff] [blame] | 456 | /* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and |
| 457 | * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */ |
| 458 | typedef struct { |
| 459 | int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be |
| 460 | ignored for +CSIM command. */ |
| 461 | |
| 462 | /* Following fields are used to derive the APDU ("command" and "length" |
| 463 | values in TS 27.007 +CSIM and +CGLA commands). */ |
| 464 | int cla; |
| 465 | int instruction; |
| 466 | int p1; |
| 467 | int p2; |
| 468 | int p3; /* A negative P3 implies a 4 byte APDU. */ |
| 469 | char *data; /* May be NULL. In hex string format. */ |
| 470 | } RIL_SIM_APDU; |
| 471 | |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 472 | typedef struct { |
| 473 | int sw1; |
| 474 | int sw2; |
Amit Mahajan | 2875bc2 | 2014-08-06 10:03:15 -0700 | [diff] [blame] | 475 | char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION |
| 476 | response for which it is in Base64 format, see 3GPP TS 31.102 7.1.2 */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 477 | } RIL_SIM_IO_Response; |
| 478 | |
| 479 | /* See also com.android.internal.telephony.gsm.CallForwardInfo */ |
| 480 | |
| 481 | typedef struct { |
| 482 | int status; /* |
| 483 | * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS |
| 484 | * status 1 = active, 0 = not active |
| 485 | * |
| 486 | * For RIL_REQUEST_SET_CALL_FORWARD: |
| 487 | * status is: |
| 488 | * 0 = disable |
| 489 | * 1 = enable |
| 490 | * 2 = interrogate |
| 491 | * 3 = registeration |
| 492 | * 4 = erasure |
| 493 | */ |
| 494 | |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 495 | int reason; /* from TS 27.007 7.11 "reason" */ |
| 496 | int serviceClass;/* From 27.007 +CCFC/+CLCK "class" |
| 497 | See table for Android mapping from |
| 498 | MMI service code |
| 499 | 0 means user doesn't input class */ |
| 500 | int toa; /* "type" from TS 27.007 7.11 */ |
| 501 | char * number; /* "number" from TS 27.007 7.11. May be NULL */ |
| 502 | int timeSeconds; /* for CF no reply only */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 503 | }RIL_CallForwardInfo; |
| 504 | |
| 505 | typedef struct { |
johnwang | e0ba6a9 | 2009-09-11 19:14:52 -0700 | [diff] [blame] | 506 | char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM. |
| 507 | * Upper 16 bits is LAC and lower 16 bits |
| 508 | * is CID (as described in TS 27.005) |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 509 | * Primary Scrambling Code (as described in TS 25.331) |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 510 | * in 9 bits in UMTS |
johnwang | e0ba6a9 | 2009-09-11 19:14:52 -0700 | [diff] [blame] | 511 | * Valid values are hexadecimal 0x0000 - 0xffffffff. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 512 | */ |
johnwang | e0ba6a9 | 2009-09-11 19:14:52 -0700 | [diff] [blame] | 513 | int rssi; /* Received RSSI in GSM, |
| 514 | * 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] | 515 | */ |
| 516 | } RIL_NeighboringCell; |
| 517 | |
| 518 | /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */ |
| 519 | typedef enum { |
Naveen Kalla | 1b3a6fe | 2010-04-21 16:44:37 -0700 | [diff] [blame] | 520 | CALL_FAIL_UNOBTAINABLE_NUMBER = 1, |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 521 | CALL_FAIL_NORMAL = 16, |
| 522 | CALL_FAIL_BUSY = 17, |
| 523 | CALL_FAIL_CONGESTION = 34, |
| 524 | CALL_FAIL_ACM_LIMIT_EXCEEDED = 68, |
| 525 | CALL_FAIL_CALL_BARRED = 240, |
| 526 | CALL_FAIL_FDN_BLOCKED = 241, |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 527 | CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242, |
| 528 | CALL_FAIL_IMEI_NOT_ACCEPTED = 243, |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 529 | CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000, |
| 530 | CALL_FAIL_CDMA_DROP = 1001, |
| 531 | CALL_FAIL_CDMA_INTERCEPT = 1002, |
| 532 | CALL_FAIL_CDMA_REORDER = 1003, |
| 533 | CALL_FAIL_CDMA_SO_REJECT = 1004, |
| 534 | CALL_FAIL_CDMA_RETRY_ORDER = 1005, |
| 535 | CALL_FAIL_CDMA_ACCESS_FAILURE = 1006, |
| 536 | CALL_FAIL_CDMA_PREEMPTED = 1007, |
| 537 | CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed |
| 538 | during emergency callback mode */ |
Naveen Kalla | 03c1edf | 2009-09-23 11:18:35 -0700 | [diff] [blame] | 539 | 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] | 540 | CALL_FAIL_ERROR_UNSPECIFIED = 0xffff |
| 541 | } RIL_LastCallFailCause; |
| 542 | |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 543 | /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 544 | typedef enum { |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 545 | PDP_FAIL_NONE = 0, /* No error, connection ok */ |
| 546 | |
| 547 | /* an integer cause code defined in TS 24.008 |
| 548 | section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B. |
| 549 | If the implementation does not have access to the exact cause codes, |
| 550 | then it should return one of the following values, |
| 551 | as the UI layer needs to distinguish these |
| 552 | cases for error notification and potential retries. */ |
Jaikumar Ganesh | d6aa2e3 | 2009-05-04 11:09:46 -0700 | [diff] [blame] | 553 | PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */ |
| 554 | PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A, |
| 555 | PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */ |
| 556 | PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */ |
| 557 | PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */ |
| 558 | PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */ |
| 559 | PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F, |
| 560 | PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */ |
| 561 | PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */ |
| 562 | PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22, |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 563 | PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */ |
Hui Wang | 11e8b23 | 2014-09-19 16:40:17 -0500 | [diff] [blame] | 564 | PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio, |
| 565 | based on framework config */ |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 566 | PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */ |
| 567 | PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */ |
| 568 | PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34, |
Jaikumar Ganesh | d6aa2e3 | 2009-05-04 11:09:46 -0700 | [diff] [blame] | 569 | PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */ |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 570 | |
Jaikumar Ganesh | d6aa2e3 | 2009-05-04 11:09:46 -0700 | [diff] [blame] | 571 | /* Not mentioned in the specification */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 572 | PDP_FAIL_VOICE_REGISTRATION_FAIL = -1, |
| 573 | PDP_FAIL_DATA_REGISTRATION_FAIL = -2, |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 574 | |
| 575 | /* reasons for data call drop - network/modem disconnect */ |
Wink Saville | 3492c6e | 2013-10-03 13:53:27 -0700 | [diff] [blame] | 576 | PDP_FAIL_SIGNAL_LOST = -3, |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 577 | PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry |
| 578 | with parameters appropriate for new technology */ |
| 579 | PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting, |
| 580 | powered off - no retry */ |
| 581 | PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered |
| 582 | mode was up on same APN/data profile - no retry until |
| 583 | tethered call is off */ |
| 584 | |
| 585 | PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */ |
| 586 | } RIL_DataCallFailCause; |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 587 | |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 588 | /* See RIL_REQUEST_SETUP_DATA_CALL */ |
| 589 | typedef enum { |
| 590 | RIL_DATA_PROFILE_DEFAULT = 0, |
| 591 | RIL_DATA_PROFILE_TETHERED = 1, |
Hui Wang | 8d67962 | 2014-10-16 14:59:27 -0500 | [diff] [blame] | 592 | RIL_DATA_PROFILE_IMS = 2, |
| 593 | RIL_DATA_PROFILE_FOTA = 3, |
| 594 | RIL_DATA_PROFILE_CBS = 4, |
| 595 | RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */ |
| 596 | RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 597 | } RIL_DataProfile; |
| 598 | |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 599 | /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */ |
| 600 | typedef struct { |
| 601 | int notificationType; /* |
| 602 | * 0 = MO intermediate result code |
| 603 | * 1 = MT unsolicited result code |
| 604 | */ |
| 605 | int code; /* See 27.007 7.17 |
| 606 | "code1" for MO |
| 607 | "code2" for MT. */ |
| 608 | int index; /* CUG index. See 27.007 7.17. */ |
| 609 | int type; /* "type" from 27.007 7.17 (MT only). */ |
| 610 | char * number; /* "number" from 27.007 7.17 |
| 611 | (MT only, may be NULL). */ |
| 612 | } RIL_SuppSvcNotification; |
| 613 | |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 614 | #define RIL_CARD_MAX_APPS 8 |
| 615 | |
| 616 | typedef enum { |
| 617 | RIL_CARDSTATE_ABSENT = 0, |
| 618 | RIL_CARDSTATE_PRESENT = 1, |
| 619 | RIL_CARDSTATE_ERROR = 2 |
| 620 | } RIL_CardState; |
| 621 | |
| 622 | typedef enum { |
| 623 | RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */ |
| 624 | RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */ |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 625 | RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished |
| 626 | since each app can only have 1 active perso |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 627 | involved */ |
| 628 | RIL_PERSOSUBSTATE_SIM_NETWORK = 3, |
| 629 | RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4, |
| 630 | RIL_PERSOSUBSTATE_SIM_CORPORATE = 5, |
| 631 | RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6, |
| 632 | RIL_PERSOSUBSTATE_SIM_SIM = 7, |
| 633 | RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */ |
| 634 | RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9, |
| 635 | RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10, |
| 636 | RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11, |
| 637 | RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12, |
| 638 | RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13, |
| 639 | RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14, |
| 640 | RIL_PERSOSUBSTATE_RUIM_HRPD = 15, |
| 641 | RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16, |
| 642 | RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17, |
| 643 | RIL_PERSOSUBSTATE_RUIM_RUIM = 18, |
| 644 | RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */ |
| 645 | RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20, |
| 646 | RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21, |
| 647 | RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22, |
| 648 | RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23, |
| 649 | RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24 |
| 650 | } RIL_PersoSubstate; |
| 651 | |
| 652 | typedef enum { |
| 653 | RIL_APPSTATE_UNKNOWN = 0, |
| 654 | RIL_APPSTATE_DETECTED = 1, |
| 655 | RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */ |
| 656 | RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */ |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 657 | RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 658 | when app_state is assigned to this value */ |
| 659 | RIL_APPSTATE_READY = 5 |
| 660 | } RIL_AppState; |
| 661 | |
| 662 | typedef enum { |
| 663 | RIL_PINSTATE_UNKNOWN = 0, |
| 664 | RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1, |
| 665 | RIL_PINSTATE_ENABLED_VERIFIED = 2, |
| 666 | RIL_PINSTATE_DISABLED = 3, |
| 667 | RIL_PINSTATE_ENABLED_BLOCKED = 4, |
| 668 | RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5 |
| 669 | } RIL_PinState; |
| 670 | |
| 671 | typedef enum { |
| 672 | RIL_APPTYPE_UNKNOWN = 0, |
| 673 | RIL_APPTYPE_SIM = 1, |
| 674 | RIL_APPTYPE_USIM = 2, |
| 675 | RIL_APPTYPE_RUIM = 3, |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 676 | RIL_APPTYPE_CSIM = 4, |
| 677 | RIL_APPTYPE_ISIM = 5 |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 678 | } RIL_AppType; |
| 679 | |
| 680 | typedef struct |
| 681 | { |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 682 | RIL_AppType app_type; |
| 683 | RIL_AppState app_state; |
| 684 | RIL_PersoSubstate perso_substate; /* applicable only if app_state == |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 685 | RIL_APPSTATE_SUBSCRIPTION_PERSO */ |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 686 | char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41, |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 687 | 0x30, 0x30, 0x30 */ |
| 688 | char *app_label_ptr; /* null terminated string */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 689 | int pin1_replaced; /* applicable to USIM, CSIM & ISIM */ |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 690 | RIL_PinState pin1; |
| 691 | RIL_PinState pin2; |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 692 | } RIL_AppStatus; |
| 693 | |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 694 | /* Deprecated, use RIL_CardStatus_v6 */ |
| 695 | typedef struct |
| 696 | { |
| 697 | RIL_CardState card_state; |
| 698 | RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ |
| 699 | int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ |
| 700 | int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ |
| 701 | int num_applications; /* value <= RIL_CARD_MAX_APPS */ |
| 702 | RIL_AppStatus applications[RIL_CARD_MAX_APPS]; |
| 703 | } RIL_CardStatus_v5; |
| 704 | |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 705 | typedef struct |
| 706 | { |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 707 | RIL_CardState card_state; |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 708 | 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] | 709 | int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ |
| 710 | int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ |
| 711 | 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] | 712 | int num_applications; /* value <= RIL_CARD_MAX_APPS */ |
| 713 | RIL_AppStatus applications[RIL_CARD_MAX_APPS]; |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 714 | } RIL_CardStatus_v6; |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 715 | |
Alex Yakavenka | 45e740e | 2012-01-31 11:48:27 -0800 | [diff] [blame] | 716 | /** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH |
| 717 | * or as part of RIL_SimRefreshResponse_v7 |
| 718 | */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 719 | typedef enum { |
| 720 | /* A file on SIM has been updated. data[1] contains the EFID. */ |
| 721 | SIM_FILE_UPDATE = 0, |
Alex Yakavenka | 45e740e | 2012-01-31 11:48:27 -0800 | [diff] [blame] | 722 | /* SIM initialized. All files should be re-read. */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 723 | SIM_INIT = 1, |
| 724 | /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */ |
| 725 | SIM_RESET = 2 |
| 726 | } RIL_SimRefreshResult; |
| 727 | |
Alex Yakavenka | 45e740e | 2012-01-31 11:48:27 -0800 | [diff] [blame] | 728 | typedef struct { |
| 729 | RIL_SimRefreshResult result; |
| 730 | int ef_id; /* is the EFID of the updated file if the result is */ |
| 731 | /* SIM_FILE_UPDATE or 0 for any other result. */ |
| 732 | char * aid; /* is AID(application ID) of the card application */ |
| 733 | /* See ETSI 102.221 8.1 and 101.220 4 */ |
| 734 | /* For SIM_FILE_UPDATE result it can be set to AID of */ |
| 735 | /* application in which updated EF resides or it can be */ |
| 736 | /* NULL if EF is outside of an application. */ |
| 737 | /* For SIM_INIT result this field is set to AID of */ |
| 738 | /* application that caused REFRESH */ |
| 739 | /* For SIM_RESET result it is NULL. */ |
| 740 | } RIL_SimRefreshResponse_v7; |
| 741 | |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 742 | /* Deprecated, use RIL_CDMA_CallWaiting_v6 */ |
| 743 | typedef struct { |
| 744 | char * number; /* Remote party number */ |
| 745 | int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ |
| 746 | char * name; /* Remote party name */ |
| 747 | RIL_CDMA_SignalInfoRecord signalInfoRecord; |
| 748 | } RIL_CDMA_CallWaiting_v5; |
| 749 | |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 750 | typedef struct { |
| 751 | char * number; /* Remote party number */ |
| 752 | int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ |
| 753 | char * name; /* Remote party name */ |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 754 | RIL_CDMA_SignalInfoRecord signalInfoRecord; |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 755 | /* Number type/Number plan required to support International Call Waiting */ |
| 756 | int number_type; /* 0=Unknown, 1=International, 2=National, |
| 757 | 3=Network specific, 4=subscriber */ |
| 758 | int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */ |
| 759 | } RIL_CDMA_CallWaiting_v6; |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 760 | |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 761 | /** |
| 762 | * Which types of Cell Broadcast Message (CBM) are to be received by the ME |
| 763 | * |
| 764 | * uFromServiceID - uToServiceID defines a range of CBM message identifiers |
| 765 | * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS |
| 766 | * and 9.4.4.2.2 for UMTS. All other values can be treated as empty |
| 767 | * CBM message ID. |
| 768 | * |
| 769 | * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes |
| 770 | * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS |
| 771 | * and 9.4.4.2.3 for UMTS. |
| 772 | * All other values can be treated as empty CBM data coding scheme. |
| 773 | * |
| 774 | * selected 0 means message types specified in <fromServiceId, toServiceId> |
| 775 | * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted. |
| 776 | * |
| 777 | * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and |
| 778 | * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG. |
| 779 | */ |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 780 | typedef struct { |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 781 | int fromServiceId; |
| 782 | int toServiceId; |
| 783 | int fromCodeScheme; |
| 784 | int toCodeScheme; |
| 785 | unsigned char selected; |
| 786 | } RIL_GSM_BroadcastSmsConfigInfo; |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 787 | |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 788 | /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */ |
| 789 | #define RIL_RESTRICTED_STATE_NONE 0x00 |
| 790 | /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */ |
| 791 | #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01 |
| 792 | /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */ |
| 793 | #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02 |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 794 | /* 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] | 795 | #define RIL_RESTRICTED_STATE_CS_ALL 0x04 |
| 796 | /* Block packet data access due to restriction. */ |
| 797 | #define RIL_RESTRICTED_STATE_PS_ALL 0x10 |
| 798 | |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 799 | /* The status for an OTASP/OTAPA session */ |
| 800 | typedef enum { |
| 801 | CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED, |
| 802 | CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED, |
| 803 | CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED, |
| 804 | CDMA_OTA_PROVISION_STATUS_SSD_UPDATED, |
| 805 | CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED, |
| 806 | CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED, |
| 807 | CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED, |
| 808 | CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED, |
| 809 | CDMA_OTA_PROVISION_STATUS_COMMITTED, |
| 810 | CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED, |
| 811 | CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED, |
| 812 | CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED |
| 813 | } RIL_CDMA_OTA_ProvisionStatus; |
| 814 | |
| 815 | typedef struct { |
| 816 | int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ |
| 817 | int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ |
| 818 | } RIL_GW_SignalStrength; |
| 819 | |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 820 | typedef struct { |
| 821 | int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ |
| 822 | int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ |
| 823 | } RIL_SignalStrengthWcdma; |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 824 | |
| 825 | typedef struct { |
| 826 | int dbm; /* Valid values are positive integers. This value is the actual RSSI value |
| 827 | * multiplied by -1. Example: If the actual RSSI is -75, then this response |
| 828 | * value will be 75. |
| 829 | */ |
| 830 | int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied |
| 831 | * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value |
| 832 | * will be 125. |
| 833 | */ |
| 834 | } RIL_CDMA_SignalStrength; |
| 835 | |
| 836 | |
| 837 | typedef struct { |
| 838 | int dbm; /* Valid values are positive integers. This value is the actual RSSI value |
| 839 | * multiplied by -1. Example: If the actual RSSI is -75, then this response |
| 840 | * value will be 75. |
| 841 | */ |
| 842 | int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied |
| 843 | * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value |
| 844 | * will be 125. |
| 845 | */ |
| 846 | int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */ |
| 847 | } RIL_EVDO_SignalStrength; |
| 848 | |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 849 | typedef struct { |
| 850 | 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] | 851 | int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1. |
| 852 | * Range: 44 to 140 dBm |
| 853 | * INT_MAX: 0x7FFFFFFF denotes invalid value. |
| 854 | * Reference: 3GPP TS 36.133 9.1.4 */ |
| 855 | int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1. |
| 856 | * Range: 20 to 3 dB. |
| 857 | * INT_MAX: 0x7FFFFFFF denotes invalid value. |
| 858 | * Reference: 3GPP TS 36.133 9.1.7 */ |
| 859 | int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units. |
| 860 | * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). |
| 861 | * INT_MAX : 0x7FFFFFFF denotes invalid value. |
| 862 | * Reference: 3GPP TS 36.101 8.1.1 */ |
| 863 | int cqi; /* The current Channel Quality Indicator. |
| 864 | * Range: 0 to 15. |
| 865 | * INT_MAX : 0x7FFFFFFF denotes invalid value. |
| 866 | * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 867 | } RIL_LTE_SignalStrength; |
| 868 | |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 869 | typedef struct { |
| 870 | int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ |
| 871 | int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1. |
| 872 | * Range: 44 to 140 dBm |
| 873 | * INT_MAX: 0x7FFFFFFF denotes invalid value. |
| 874 | * Reference: 3GPP TS 36.133 9.1.4 */ |
| 875 | int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1. |
| 876 | * Range: 20 to 3 dB. |
| 877 | * INT_MAX: 0x7FFFFFFF denotes invalid value. |
| 878 | * Reference: 3GPP TS 36.133 9.1.7 */ |
| 879 | int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units. |
| 880 | * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). |
| 881 | * INT_MAX : 0x7FFFFFFF denotes invalid value. |
| 882 | * Reference: 3GPP TS 36.101 8.1.1 */ |
| 883 | int cqi; /* The current Channel Quality Indicator. |
| 884 | * Range: 0 to 15. |
| 885 | * INT_MAX : 0x7FFFFFFF denotes invalid value. |
| 886 | * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */ |
| 887 | int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device. |
| 888 | * Approximate distance can be calculated using 300m/us * timingAdvance. |
| 889 | * Range: 0 to 0x7FFFFFFE |
| 890 | * INT_MAX : 0x7FFFFFFF denotes invalid value. |
| 891 | * Reference: 3GPP 36.321 section 6.1.3.5 |
| 892 | * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */ |
| 893 | } RIL_LTE_SignalStrength_v8; |
| 894 | |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 895 | typedef struct { |
| 896 | int rscp; /* The Received Signal Code Power in dBm multipled by -1. |
| 897 | * Range : 25 to 120 |
| 898 | * INT_MAX: 0x7FFFFFFF denotes invalid value. |
| 899 | * Reference: 3GPP TS 25.123, section 9.1.1.1 */ |
| 900 | } RIL_TD_SCDMA_SignalStrength; |
| 901 | |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 902 | /* Deprecated, use RIL_SignalStrength_v6 */ |
| 903 | typedef struct { |
| 904 | RIL_GW_SignalStrength GW_SignalStrength; |
| 905 | RIL_CDMA_SignalStrength CDMA_SignalStrength; |
| 906 | RIL_EVDO_SignalStrength EVDO_SignalStrength; |
| 907 | } RIL_SignalStrength_v5; |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 908 | |
| 909 | typedef struct { |
| 910 | RIL_GW_SignalStrength GW_SignalStrength; |
| 911 | RIL_CDMA_SignalStrength CDMA_SignalStrength; |
| 912 | RIL_EVDO_SignalStrength EVDO_SignalStrength; |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 913 | RIL_LTE_SignalStrength LTE_SignalStrength; |
| 914 | } RIL_SignalStrength_v6; |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 915 | |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 916 | typedef struct { |
| 917 | RIL_GW_SignalStrength GW_SignalStrength; |
| 918 | RIL_CDMA_SignalStrength CDMA_SignalStrength; |
| 919 | RIL_EVDO_SignalStrength EVDO_SignalStrength; |
| 920 | RIL_LTE_SignalStrength_v8 LTE_SignalStrength; |
| 921 | } RIL_SignalStrength_v8; |
| 922 | |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 923 | typedef struct { |
| 924 | RIL_GW_SignalStrength GW_SignalStrength; |
| 925 | RIL_CDMA_SignalStrength CDMA_SignalStrength; |
| 926 | RIL_EVDO_SignalStrength EVDO_SignalStrength; |
| 927 | RIL_LTE_SignalStrength_v8 LTE_SignalStrength; |
| 928 | RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength; |
| 929 | } RIL_SignalStrength_v10; |
| 930 | |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 931 | /** RIL_CellIdentityGsm */ |
| 932 | typedef struct { |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 933 | int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ |
| 934 | int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ |
| 935 | int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ |
| 936 | 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] | 937 | } RIL_CellIdentityGsm; |
| 938 | |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 939 | /** RIL_CellIdentityWcdma */ |
| 940 | typedef struct { |
| 941 | int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ |
| 942 | int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ |
| 943 | int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ |
| 944 | int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ |
| 945 | int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */ |
| 946 | } RIL_CellIdentityWcdma; |
| 947 | |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 948 | /** RIL_CellIdentityCdma */ |
| 949 | typedef struct { |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 950 | int networkId; /* Network Id 0..65535, INT_MAX if unknown */ |
| 951 | int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */ |
| 952 | int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */ |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 953 | int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. |
| 954 | * It is represented in units of 0.25 seconds and ranges from -2592000 |
| 955 | * to 2592000, both values inclusive (corresponding to a range of -180 |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 956 | * to +180 degrees). INT_MAX if unknown */ |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 957 | |
| 958 | int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. |
| 959 | * It is represented in units of 0.25 seconds and ranges from -1296000 |
| 960 | * to 1296000, both values inclusive (corresponding to a range of -90 |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 961 | * to +90 degrees). INT_MAX if unknown */ |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 962 | } RIL_CellIdentityCdma; |
| 963 | |
| 964 | /** RIL_CellIdentityLte */ |
| 965 | typedef struct { |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 966 | int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ |
| 967 | int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ |
| 968 | int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */ |
| 969 | int pci; /* physical cell id 0..503, INT_MAX if unknown */ |
| 970 | int tac; /* 16-bit tracking area code, INT_MAX if unknown */ |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 971 | } RIL_CellIdentityLte; |
| 972 | |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 973 | /** RIL_CellIdentityTdscdma */ |
| 974 | typedef struct { |
| 975 | int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ |
| 976 | int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ |
| 977 | int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ |
| 978 | int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ |
| 979 | int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */ |
| 980 | } RIL_CellIdentityTdscdma; |
| 981 | |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 982 | /** RIL_CellInfoGsm */ |
| 983 | typedef struct { |
| 984 | RIL_CellIdentityGsm cellIdentityGsm; |
| 985 | RIL_GW_SignalStrength signalStrengthGsm; |
| 986 | } RIL_CellInfoGsm; |
| 987 | |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 988 | /** RIL_CellInfoWcdma */ |
| 989 | typedef struct { |
| 990 | RIL_CellIdentityWcdma cellIdentityWcdma; |
| 991 | RIL_SignalStrengthWcdma signalStrengthWcdma; |
| 992 | } RIL_CellInfoWcdma; |
| 993 | |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 994 | /** RIL_CellInfoCdma */ |
| 995 | typedef struct { |
| 996 | RIL_CellIdentityCdma cellIdentityCdma; |
| 997 | RIL_CDMA_SignalStrength signalStrengthCdma; |
| 998 | RIL_EVDO_SignalStrength signalStrengthEvdo; |
| 999 | } RIL_CellInfoCdma; |
| 1000 | |
| 1001 | /** RIL_CellInfoLte */ |
| 1002 | typedef struct { |
| 1003 | RIL_CellIdentityLte cellIdentityLte; |
| 1004 | RIL_LTE_SignalStrength_v8 signalStrengthLte; |
| 1005 | } RIL_CellInfoLte; |
| 1006 | |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 1007 | /** RIL_CellInfoTdscdma */ |
| 1008 | typedef struct { |
| 1009 | RIL_CellIdentityTdscdma cellIdentityTdscdma; |
| 1010 | RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma; |
| 1011 | } RIL_CellInfoTdscdma; |
| 1012 | |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 1013 | // Must be the same as CellInfo.TYPE_XXX |
| 1014 | typedef enum { |
| 1015 | RIL_CELL_INFO_TYPE_GSM = 1, |
| 1016 | RIL_CELL_INFO_TYPE_CDMA = 2, |
| 1017 | RIL_CELL_INFO_TYPE_LTE = 3, |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 1018 | RIL_CELL_INFO_TYPE_WCDMA = 4, |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 1019 | RIL_CELL_INFO_TYPE_TD_SCDMA = 5 |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 1020 | } RIL_CellInfoType; |
| 1021 | |
| 1022 | // Must be the same as CellInfo.TIMESTAMP_TYPE_XXX |
| 1023 | typedef enum { |
| 1024 | RIL_TIMESTAMP_TYPE_UNKNOWN = 0, |
| 1025 | RIL_TIMESTAMP_TYPE_ANTENNA = 1, |
| 1026 | RIL_TIMESTAMP_TYPE_MODEM = 2, |
| 1027 | RIL_TIMESTAMP_TYPE_OEM_RIL = 3, |
| 1028 | RIL_TIMESTAMP_TYPE_JAVA_RIL = 4, |
| 1029 | } RIL_TimeStampType; |
| 1030 | |
| 1031 | typedef struct { |
| 1032 | RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */ |
| 1033 | int registered; /* !0 if this cell is registered 0 if not registered */ |
| 1034 | RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */ |
| 1035 | uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */ |
| 1036 | union { |
| 1037 | RIL_CellInfoGsm gsm; |
| 1038 | RIL_CellInfoCdma cdma; |
| 1039 | RIL_CellInfoLte lte; |
Wink Saville | c57b3eb | 2013-04-17 12:51:41 -0700 | [diff] [blame] | 1040 | RIL_CellInfoWcdma wcdma; |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 1041 | RIL_CellInfoTdscdma tdscdma; |
Wink Saville | 8a9e021 | 2013-04-09 12:11:38 -0700 | [diff] [blame] | 1042 | } CellInfo; |
| 1043 | } RIL_CellInfo; |
| 1044 | |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1045 | /* Names of the CDMA info records (C.S0005 section 3.7.5) */ |
| 1046 | typedef enum { |
| 1047 | RIL_CDMA_DISPLAY_INFO_REC, |
| 1048 | RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC, |
| 1049 | RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC, |
| 1050 | RIL_CDMA_CONNECTED_NUMBER_INFO_REC, |
| 1051 | RIL_CDMA_SIGNAL_INFO_REC, |
| 1052 | RIL_CDMA_REDIRECTING_NUMBER_INFO_REC, |
| 1053 | RIL_CDMA_LINE_CONTROL_INFO_REC, |
| 1054 | RIL_CDMA_EXTENDED_DISPLAY_INFO_REC, |
| 1055 | RIL_CDMA_T53_CLIR_INFO_REC, |
| 1056 | RIL_CDMA_T53_RELEASE_INFO_REC, |
| 1057 | RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC |
| 1058 | } RIL_CDMA_InfoRecName; |
| 1059 | |
| 1060 | /* Display Info Rec as defined in C.S0005 section 3.7.5.1 |
| 1061 | Extended Display Info Rec as defined in C.S0005 section 3.7.5.16 |
| 1062 | Note: the Extended Display info rec contains multiple records of the |
| 1063 | form: display_tag, display_len, and display_len occurrences of the |
| 1064 | chari field if the display_tag is not 10000000 or 10000001. |
| 1065 | To save space, the records are stored consecutively in a byte buffer. |
| 1066 | The display_tag, display_len and chari fields are all 1 byte. |
| 1067 | */ |
| 1068 | |
| 1069 | typedef struct { |
| 1070 | char alpha_len; |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 1071 | char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH]; |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1072 | } RIL_CDMA_DisplayInfoRecord; |
| 1073 | |
| 1074 | /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2 |
| 1075 | Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3 |
| 1076 | Connected Number Info Rec as defined in C.S0005 section 3.7.5.4 |
| 1077 | */ |
| 1078 | |
| 1079 | typedef struct { |
| 1080 | char len; |
Wink Saville | a592eeb | 2009-05-22 13:26:36 -0700 | [diff] [blame] | 1081 | char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH]; |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1082 | char number_type; |
| 1083 | char number_plan; |
| 1084 | char pi; |
| 1085 | char si; |
| 1086 | } RIL_CDMA_NumberInfoRecord; |
| 1087 | |
| 1088 | /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */ |
| 1089 | typedef enum { |
| 1090 | RIL_REDIRECTING_REASON_UNKNOWN = 0, |
| 1091 | RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1, |
| 1092 | RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2, |
| 1093 | RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9, |
| 1094 | RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10, |
| 1095 | RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15, |
| 1096 | RIL_REDIRECTING_REASON_RESERVED |
| 1097 | } RIL_CDMA_RedirectingReason; |
| 1098 | |
| 1099 | typedef struct { |
| 1100 | RIL_CDMA_NumberInfoRecord redirectingNumber; |
| 1101 | /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */ |
| 1102 | RIL_CDMA_RedirectingReason redirectingReason; |
| 1103 | } RIL_CDMA_RedirectingNumberInfoRecord; |
| 1104 | |
| 1105 | /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */ |
| 1106 | typedef struct { |
| 1107 | char lineCtrlPolarityIncluded; |
| 1108 | char lineCtrlToggle; |
| 1109 | char lineCtrlReverse; |
| 1110 | char lineCtrlPowerDenial; |
| 1111 | } RIL_CDMA_LineControlInfoRecord; |
| 1112 | |
| 1113 | /* T53 CLIR Information Record */ |
| 1114 | typedef struct { |
| 1115 | char cause; |
| 1116 | } RIL_CDMA_T53_CLIRInfoRecord; |
| 1117 | |
| 1118 | /* T53 Audio Control Information Record */ |
| 1119 | typedef struct { |
| 1120 | char upLink; |
| 1121 | char downLink; |
| 1122 | } RIL_CDMA_T53_AudioControlInfoRecord; |
| 1123 | |
| 1124 | typedef struct { |
| 1125 | |
| 1126 | RIL_CDMA_InfoRecName name; |
| 1127 | |
| 1128 | union { |
| 1129 | /* Display and Extended Display Info Rec */ |
| 1130 | RIL_CDMA_DisplayInfoRecord display; |
| 1131 | |
| 1132 | /* Called Party Number, Calling Party Number, Connected Number Info Rec */ |
| 1133 | RIL_CDMA_NumberInfoRecord number; |
| 1134 | |
| 1135 | /* Signal Info Rec */ |
| 1136 | RIL_CDMA_SignalInfoRecord signal; |
| 1137 | |
| 1138 | /* Redirecting Number Info Rec */ |
| 1139 | RIL_CDMA_RedirectingNumberInfoRecord redir; |
| 1140 | |
| 1141 | /* Line Control Info Rec */ |
| 1142 | RIL_CDMA_LineControlInfoRecord lineCtrl; |
| 1143 | |
| 1144 | /* T53 CLIR Info Rec */ |
| 1145 | RIL_CDMA_T53_CLIRInfoRecord clir; |
| 1146 | |
| 1147 | /* T53 Audio Control Info Rec */ |
| 1148 | RIL_CDMA_T53_AudioControlInfoRecord audioCtrl; |
| 1149 | } rec; |
| 1150 | } RIL_CDMA_InformationRecord; |
| 1151 | |
| 1152 | #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10 |
| 1153 | |
| 1154 | typedef struct { |
| 1155 | char numberOfInfoRecs; |
| 1156 | RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS]; |
| 1157 | } RIL_CDMA_InformationRecords; |
| 1158 | |
Jake Hamby | 8a4a233 | 2014-01-15 13:12:05 -0800 | [diff] [blame] | 1159 | /* See RIL_REQUEST_NV_READ_ITEM */ |
| 1160 | typedef struct { |
| 1161 | RIL_NV_Item itemID; |
| 1162 | } RIL_NV_ReadItem; |
| 1163 | |
| 1164 | /* See RIL_REQUEST_NV_WRITE_ITEM */ |
| 1165 | typedef struct { |
| 1166 | RIL_NV_Item itemID; |
| 1167 | char * value; |
| 1168 | } RIL_NV_WriteItem; |
| 1169 | |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 1170 | typedef enum { |
| 1171 | HANDOVER_STARTED = 0, |
| 1172 | HANDOVER_COMPLETED = 1, |
| 1173 | HANDOVER_FAILED = 2, |
| 1174 | HANDOVER_CANCELED = 3 |
| 1175 | } RIL_SrvccState; |
| 1176 | |
| 1177 | /* hardware configuration reported to RILJ. */ |
| 1178 | typedef enum { |
| 1179 | RIL_HARDWARE_CONFIG_MODEM = 0, |
| 1180 | RIL_HARDWARE_CONFIG_SIM = 1, |
| 1181 | } RIL_HardwareConfig_Type; |
| 1182 | |
| 1183 | typedef enum { |
| 1184 | RIL_HARDWARE_CONFIG_STATE_ENABLED = 0, |
| 1185 | RIL_HARDWARE_CONFIG_STATE_STANDBY = 1, |
| 1186 | RIL_HARDWARE_CONFIG_STATE_DISABLED = 2, |
| 1187 | } RIL_HardwareConfig_State; |
| 1188 | |
| 1189 | typedef struct { |
| 1190 | int rilModel; |
| 1191 | uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */ |
| 1192 | int maxVoice; |
| 1193 | int maxData; |
| 1194 | int maxStandby; |
| 1195 | } RIL_HardwareConfig_Modem; |
| 1196 | |
| 1197 | typedef struct { |
Wink Saville | 8b4e4f7 | 2014-10-17 15:01:45 -0700 | [diff] [blame] | 1198 | char modemUuid[MAX_UUID_LENGTH]; |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 1199 | } RIL_HardwareConfig_Sim; |
| 1200 | |
| 1201 | typedef struct { |
| 1202 | RIL_HardwareConfig_Type type; |
Wink Saville | 8b4e4f7 | 2014-10-17 15:01:45 -0700 | [diff] [blame] | 1203 | char uuid[MAX_UUID_LENGTH]; |
Etan Cohen | d365219 | 2014-06-20 08:28:44 -0700 | [diff] [blame] | 1204 | RIL_HardwareConfig_State state; |
| 1205 | union { |
| 1206 | RIL_HardwareConfig_Modem modem; |
| 1207 | RIL_HardwareConfig_Sim sim; |
| 1208 | } cfg; |
| 1209 | } RIL_HardwareConfig; |
| 1210 | |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1211 | /** |
Wink Saville | c29360a | 2014-07-13 05:17:28 -0700 | [diff] [blame] | 1212 | * Data connection power state |
| 1213 | */ |
| 1214 | typedef enum { |
| 1215 | RIL_DC_POWER_STATE_LOW = 1, // Low power state |
| 1216 | RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state |
| 1217 | RIL_DC_POWER_STATE_HIGH = 3, // High power state |
| 1218 | RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state |
| 1219 | } RIL_DcPowerStates; |
| 1220 | |
| 1221 | /** |
| 1222 | * Data connection real time info |
| 1223 | */ |
| 1224 | typedef struct { |
| 1225 | uint64_t time; // Time in nanos as returned by ril_nano_time |
| 1226 | RIL_DcPowerStates powerState; // Current power state |
| 1227 | } RIL_DcRtInfo; |
| 1228 | |
Amit Mahajan | c796e22 | 2014-08-13 16:54:01 +0000 | [diff] [blame] | 1229 | /** |
| 1230 | * Data profile to modem |
| 1231 | */ |
| 1232 | typedef struct { |
| 1233 | /* id of the data profile */ |
| 1234 | int profileId; |
| 1235 | /* the APN to connect to */ |
| 1236 | char* apn; |
| 1237 | /** one of the PDP_type values in TS 27.007 section 10.1.1. |
| 1238 | * For example, "IP", "IPV6", "IPV4V6", or "PPP". |
| 1239 | */ |
| 1240 | char* protocol; |
| 1241 | /** authentication protocol used for this PDP context |
| 1242 | * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) |
| 1243 | */ |
| 1244 | int authType; |
| 1245 | /* the username for APN, or NULL */ |
| 1246 | char* user; |
| 1247 | /* the password for APN, or NULL */ |
| 1248 | char* password; |
| 1249 | /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */ |
| 1250 | int type; |
| 1251 | /* the period in seconds to limit the maximum connections */ |
| 1252 | int maxConnsTime; |
| 1253 | /* the maximum connections during maxConnsTime */ |
| 1254 | int maxConns; |
| 1255 | /** the required wait time in seconds after a successful UE initiated |
| 1256 | * disconnect of a given PDN connection before the device can send |
| 1257 | * a new PDN connection request for that given PDN |
| 1258 | */ |
| 1259 | int waitTime; |
| 1260 | /* true to enable the profile, 0 to disable, 1 to enable */ |
| 1261 | int enabled; |
| 1262 | } RIL_DataProfileInfo; |
Wink Saville | c29360a | 2014-07-13 05:17:28 -0700 | [diff] [blame] | 1263 | |
| 1264 | /** |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1265 | * RIL_REQUEST_GET_SIM_STATUS |
| 1266 | * |
| 1267 | * Requests status of the SIM interface and the SIM card |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1268 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1269 | * "data" is NULL |
| 1270 | * |
Wink Saville | fd72937 | 2011-02-22 16:19:39 -0800 | [diff] [blame] | 1271 | * "response" is const RIL_CardStatus_v6 * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1272 | * |
| 1273 | * Valid errors: |
| 1274 | * Must never fail |
| 1275 | */ |
| 1276 | #define RIL_REQUEST_GET_SIM_STATUS 1 |
| 1277 | |
| 1278 | /** |
| 1279 | * RIL_REQUEST_ENTER_SIM_PIN |
| 1280 | * |
John Wang | 309ac29 | 2009-07-30 14:53:23 -0700 | [diff] [blame] | 1281 | * 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] | 1282 | * |
| 1283 | * "data" is const char ** |
| 1284 | * ((const char **)data)[0] is PIN value |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1285 | * ((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] | 1286 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 1287 | * "response" is int * |
| 1288 | * ((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] | 1289 | * |
| 1290 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1291 | * |
| 1292 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1293 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1294 | * GENERIC_FAILURE |
| 1295 | * PASSWORD_INCORRECT |
| 1296 | */ |
| 1297 | |
| 1298 | #define RIL_REQUEST_ENTER_SIM_PIN 2 |
| 1299 | |
| 1300 | |
| 1301 | /** |
| 1302 | * RIL_REQUEST_ENTER_SIM_PUK |
| 1303 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1304 | * Supplies SIM PUK and new PIN. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1305 | * |
| 1306 | * "data" is const char ** |
| 1307 | * ((const char **)data)[0] is PUK value |
| 1308 | * ((const char **)data)[1] is new PIN value |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1309 | * ((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] | 1310 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 1311 | * "response" is int * |
| 1312 | * ((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] | 1313 | * |
| 1314 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1315 | * |
| 1316 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1317 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1318 | * GENERIC_FAILURE |
| 1319 | * PASSWORD_INCORRECT |
| 1320 | * (PUK is invalid) |
| 1321 | */ |
| 1322 | |
| 1323 | #define RIL_REQUEST_ENTER_SIM_PUK 3 |
| 1324 | |
| 1325 | /** |
| 1326 | * RIL_REQUEST_ENTER_SIM_PIN2 |
| 1327 | * |
| 1328 | * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was |
| 1329 | * returned as a a failure from a previous operation. |
| 1330 | * |
| 1331 | * "data" is const char ** |
| 1332 | * ((const char **)data)[0] is PIN2 value |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1333 | * ((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] | 1334 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 1335 | * "response" is int * |
| 1336 | * ((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] | 1337 | * |
| 1338 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1339 | * |
| 1340 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1341 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1342 | * GENERIC_FAILURE |
| 1343 | * PASSWORD_INCORRECT |
| 1344 | */ |
| 1345 | |
| 1346 | #define RIL_REQUEST_ENTER_SIM_PIN2 4 |
| 1347 | |
| 1348 | /** |
| 1349 | * RIL_REQUEST_ENTER_SIM_PUK2 |
| 1350 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1351 | * Supplies SIM PUK2 and new PIN2. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1352 | * |
| 1353 | * "data" is const char ** |
| 1354 | * ((const char **)data)[0] is PUK2 value |
| 1355 | * ((const char **)data)[1] is new PIN2 value |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1356 | * ((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] | 1357 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 1358 | * "response" is int * |
| 1359 | * ((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] | 1360 | * |
| 1361 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1362 | * |
| 1363 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1364 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1365 | * GENERIC_FAILURE |
| 1366 | * PASSWORD_INCORRECT |
| 1367 | * (PUK2 is invalid) |
| 1368 | */ |
| 1369 | |
| 1370 | #define RIL_REQUEST_ENTER_SIM_PUK2 5 |
| 1371 | |
| 1372 | /** |
| 1373 | * RIL_REQUEST_CHANGE_SIM_PIN |
| 1374 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1375 | * Supplies old SIM PIN and new PIN. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1376 | * |
| 1377 | * "data" is const char ** |
| 1378 | * ((const char **)data)[0] is old PIN value |
| 1379 | * ((const char **)data)[1] is new PIN value |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1380 | * ((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] | 1381 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 1382 | * "response" is int * |
| 1383 | * ((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] | 1384 | * |
| 1385 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1386 | * |
| 1387 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1388 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1389 | * GENERIC_FAILURE |
| 1390 | * PASSWORD_INCORRECT |
| 1391 | * (old PIN is invalid) |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1392 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1393 | */ |
| 1394 | |
| 1395 | #define RIL_REQUEST_CHANGE_SIM_PIN 6 |
| 1396 | |
| 1397 | |
| 1398 | /** |
| 1399 | * RIL_REQUEST_CHANGE_SIM_PIN2 |
| 1400 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1401 | * Supplies old SIM PIN2 and new PIN2. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1402 | * |
| 1403 | * "data" is const char ** |
| 1404 | * ((const char **)data)[0] is old PIN2 value |
| 1405 | * ((const char **)data)[1] is new PIN2 value |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1406 | * ((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] | 1407 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 1408 | * "response" is int * |
| 1409 | * ((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] | 1410 | * |
| 1411 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1412 | * |
| 1413 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1414 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1415 | * GENERIC_FAILURE |
| 1416 | * PASSWORD_INCORRECT |
| 1417 | * (old PIN2 is invalid) |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1418 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1419 | */ |
| 1420 | |
| 1421 | #define RIL_REQUEST_CHANGE_SIM_PIN2 7 |
| 1422 | |
| 1423 | /** |
| 1424 | * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION |
| 1425 | * |
| 1426 | * Requests that network personlization be deactivated |
| 1427 | * |
| 1428 | * "data" is const char ** |
| 1429 | * ((const char **)(data))[0]] is network depersonlization code |
| 1430 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 1431 | * "response" is int * |
| 1432 | * ((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] | 1433 | * |
| 1434 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1435 | * |
| 1436 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1437 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1438 | * GENERIC_FAILURE |
| 1439 | * PASSWORD_INCORRECT |
| 1440 | * (code is invalid) |
| 1441 | */ |
| 1442 | |
| 1443 | #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8 |
| 1444 | |
| 1445 | /** |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1446 | * RIL_REQUEST_GET_CURRENT_CALLS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1447 | * |
| 1448 | * Requests current call list |
| 1449 | * |
| 1450 | * "data" is NULL |
| 1451 | * |
| 1452 | * "response" must be a "const RIL_Call **" |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1453 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1454 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1455 | * |
| 1456 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1457 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1458 | * GENERIC_FAILURE |
| 1459 | * (request will be made again in a few hundred msec) |
| 1460 | */ |
| 1461 | |
| 1462 | #define RIL_REQUEST_GET_CURRENT_CALLS 9 |
| 1463 | |
| 1464 | |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1465 | /** |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1466 | * RIL_REQUEST_DIAL |
| 1467 | * |
| 1468 | * Initiate voice call |
| 1469 | * |
| 1470 | * "data" is const RIL_Dial * |
| 1471 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1472 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1473 | * This method is never used for supplementary service codes |
| 1474 | * |
| 1475 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1476 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1477 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1478 | * GENERIC_FAILURE |
| 1479 | */ |
| 1480 | #define RIL_REQUEST_DIAL 10 |
| 1481 | |
| 1482 | /** |
| 1483 | * RIL_REQUEST_GET_IMSI |
| 1484 | * |
| 1485 | * Get the SIM IMSI |
| 1486 | * |
Naveen Kalla | 2bc78d6 | 2011-12-07 16:22:53 -0800 | [diff] [blame] | 1487 | * Only valid when radio state is "RADIO_STATE_ON" |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1488 | * |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1489 | * "data" is const char ** |
| 1490 | * ((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] | 1491 | * "response" is a const char * containing the IMSI |
| 1492 | * |
| 1493 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1494 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1495 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1496 | * GENERIC_FAILURE |
| 1497 | */ |
| 1498 | |
| 1499 | #define RIL_REQUEST_GET_IMSI 11 |
| 1500 | |
| 1501 | /** |
| 1502 | * RIL_REQUEST_HANGUP |
| 1503 | * |
| 1504 | * Hang up a specific line (like AT+CHLD=1x) |
| 1505 | * |
John Wang | 06bae4b | 2010-11-18 16:37:09 -0800 | [diff] [blame] | 1506 | * After this HANGUP request returns, RIL should show the connection is NOT |
| 1507 | * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. |
| 1508 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1509 | * "data" is an int * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1510 | * (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] | 1511 | * |
| 1512 | * "response" is NULL |
| 1513 | * |
| 1514 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1515 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1516 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1517 | * GENERIC_FAILURE |
| 1518 | */ |
| 1519 | |
| 1520 | #define RIL_REQUEST_HANGUP 12 |
| 1521 | |
| 1522 | /** |
| 1523 | * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND |
| 1524 | * |
| 1525 | * Hang up waiting or held (like AT+CHLD=0) |
| 1526 | * |
John Wang | 06bae4b | 2010-11-18 16:37:09 -0800 | [diff] [blame] | 1527 | * After this HANGUP request returns, RIL should show the connection is NOT |
| 1528 | * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. |
| 1529 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1530 | * "data" is NULL |
| 1531 | * "response" is NULL |
| 1532 | * |
| 1533 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1534 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1535 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1536 | * GENERIC_FAILURE |
| 1537 | */ |
| 1538 | |
| 1539 | #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13 |
| 1540 | |
| 1541 | /** |
| 1542 | * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND |
| 1543 | * |
| 1544 | * Hang up waiting or held (like AT+CHLD=1) |
| 1545 | * |
John Wang | 06bae4b | 2010-11-18 16:37:09 -0800 | [diff] [blame] | 1546 | * After this HANGUP request returns, RIL should show the connection is NOT |
| 1547 | * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. |
| 1548 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1549 | * "data" is NULL |
| 1550 | * "response" is NULL |
| 1551 | * |
| 1552 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1553 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1554 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1555 | * GENERIC_FAILURE |
| 1556 | */ |
| 1557 | |
| 1558 | #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14 |
| 1559 | |
| 1560 | /** |
| 1561 | * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE |
| 1562 | * |
| 1563 | * Switch waiting or holding call and active call (like AT+CHLD=2) |
| 1564 | * |
| 1565 | * State transitions should be is follows: |
| 1566 | * |
| 1567 | * If call 1 is waiting and call 2 is active, then if this re |
| 1568 | * |
| 1569 | * BEFORE AFTER |
| 1570 | * Call 1 Call 2 Call 1 Call 2 |
| 1571 | * ACTIVE HOLDING HOLDING ACTIVE |
| 1572 | * ACTIVE WAITING HOLDING ACTIVE |
| 1573 | * HOLDING WAITING HOLDING ACTIVE |
| 1574 | * ACTIVE IDLE HOLDING IDLE |
| 1575 | * IDLE IDLE IDLE IDLE |
| 1576 | * |
| 1577 | * "data" is NULL |
| 1578 | * "response" is NULL |
| 1579 | * |
| 1580 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1581 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1582 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1583 | * GENERIC_FAILURE |
| 1584 | */ |
| 1585 | |
| 1586 | #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15 |
| 1587 | #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15 |
| 1588 | |
| 1589 | /** |
| 1590 | * RIL_REQUEST_CONFERENCE |
| 1591 | * |
| 1592 | * Conference holding and active (like AT+CHLD=3) |
| 1593 | |
| 1594 | * "data" is NULL |
| 1595 | * "response" is NULL |
| 1596 | * |
| 1597 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1598 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1599 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1600 | * GENERIC_FAILURE |
| 1601 | */ |
| 1602 | #define RIL_REQUEST_CONFERENCE 16 |
| 1603 | |
| 1604 | /** |
| 1605 | * RIL_REQUEST_UDUB |
| 1606 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1607 | * Send UDUB (user determined used busy) to ringing or |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1608 | * waiting call answer)(RIL_BasicRequest r); |
| 1609 | * |
| 1610 | * "data" is NULL |
| 1611 | * "response" is NULL |
| 1612 | * |
| 1613 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1614 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1615 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 1616 | * GENERIC_FAILURE |
| 1617 | */ |
| 1618 | #define RIL_REQUEST_UDUB 17 |
| 1619 | |
| 1620 | /** |
| 1621 | * RIL_REQUEST_LAST_CALL_FAIL_CAUSE |
| 1622 | * |
| 1623 | * Requests the failure cause code for the most recently terminated call |
| 1624 | * |
| 1625 | * "data" is NULL |
| 1626 | * "response" is a "int *" |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1627 | * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are |
Naveen Kalla | 03c1edf | 2009-09-23 11:18:35 -0700 | [diff] [blame] | 1628 | * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA |
| 1629 | * failure reasons are derived from the possible call failure scenarios |
| 1630 | * 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] | 1631 | * |
The Android Open Source Project | 34a5108 | 2009-03-05 14:34:37 -0800 | [diff] [blame] | 1632 | * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked |
| 1633 | * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED) |
| 1634 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1635 | * If the implementation does not have access to the exact cause codes, |
| 1636 | * then it should return one of the values listed in RIL_LastCallFailCause, |
| 1637 | * as the UI layer needs to distinguish these cases for tone generation or |
| 1638 | * error notification. |
| 1639 | * |
| 1640 | * Valid errors: |
| 1641 | * SUCCESS |
| 1642 | * RADIO_NOT_AVAILABLE |
| 1643 | * GENERIC_FAILURE |
| 1644 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1645 | * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1646 | */ |
| 1647 | #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18 |
| 1648 | |
| 1649 | /** |
| 1650 | * RIL_REQUEST_SIGNAL_STRENGTH |
| 1651 | * |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1652 | * Requests current signal strength and associated information |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1653 | * |
| 1654 | * Must succeed if radio is on. |
| 1655 | * |
| 1656 | * "data" is NULL |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1657 | * |
| 1658 | * "response" is a const RIL_SignalStrength * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1659 | * |
| 1660 | * Valid errors: |
| 1661 | * SUCCESS |
| 1662 | * RADIO_NOT_AVAILABLE |
| 1663 | */ |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1664 | #define RIL_REQUEST_SIGNAL_STRENGTH 19 |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 1665 | |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1666 | /** |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1667 | * RIL_REQUEST_VOICE_REGISTRATION_STATE |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1668 | * |
| 1669 | * Request current registration state |
| 1670 | * |
| 1671 | * "data" is NULL |
| 1672 | * "response" is a "char **" |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1673 | * ((const char **)response)[0] is registration state 0-6, |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1674 | * 0 - Not registered, MT is not currently searching |
| 1675 | * a new operator to register |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1676 | * 1 - Registered, home network |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1677 | * 2 - Not registered, but MT is currently searching |
| 1678 | * a new operator to register |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1679 | * 3 - Registration denied |
| 1680 | * 4 - Unknown |
| 1681 | * 5 - Registered, roaming |
John Wang | 7f8ded1 | 2010-01-21 15:07:28 -0800 | [diff] [blame] | 1682 | * 10 - Same as 0, but indicates that emergency calls |
| 1683 | * are enabled. |
| 1684 | * 12 - Same as 2, but indicates that emergency calls |
| 1685 | * are enabled. |
| 1686 | * 13 - Same as 3, but indicates that emergency calls |
| 1687 | * are enabled. |
| 1688 | * 14 - Same as 4, but indicates that emergency calls |
| 1689 | * are enabled. |
| 1690 | * |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1691 | * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or |
| 1692 | * NULL if not.Valid LAC are 0x0000 - 0xffff |
| 1693 | * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or |
| 1694 | * NULL if not. |
| 1695 | * Valid CID are 0x00000000 - 0xffffffff |
| 1696 | * In GSM, CID is Cell ID (see TS 27.007) |
| 1697 | * in 16 bits |
| 1698 | * In UMTS, CID is UMTS Cell Identity |
| 1699 | * (see TS 25.331) in 28 bits |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 1700 | * ((const char **)response)[3] indicates the available voice radio technology, |
| 1701 | * valid values as defined by RIL_RadioTechnology. |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1702 | * ((const char **)response)[4] is Base Station ID if registered on a CDMA |
| 1703 | * system or NULL if not. Base Station ID in |
jsh | 29be25c | 2009-07-14 20:18:59 -0700 | [diff] [blame] | 1704 | * decimal format |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1705 | * ((const char **)response)[5] is Base Station latitude if registered on a |
| 1706 | * CDMA system or NULL if not. Base Station |
Naveen Kalla | 36b721c | 2009-10-13 18:29:41 -0700 | [diff] [blame] | 1707 | * latitude is a decimal number as specified in |
| 1708 | * 3GPP2 C.S0005-A v6.0. It is represented in |
| 1709 | * units of 0.25 seconds and ranges from -1296000 |
| 1710 | * to 1296000, both values inclusive (corresponding |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 1711 | * to a range of -90 to +90 degrees). |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1712 | * ((const char **)response)[6] is Base Station longitude if registered on a |
| 1713 | * CDMA system or NULL if not. Base Station |
Naveen Kalla | 36b721c | 2009-10-13 18:29:41 -0700 | [diff] [blame] | 1714 | * longitude is a decimal number as specified in |
| 1715 | * 3GPP2 C.S0005-A v6.0. It is represented in |
| 1716 | * units of 0.25 seconds and ranges from -2592000 |
| 1717 | * to 2592000, both values inclusive (corresponding |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 1718 | * to a range of -180 to +180 degrees). |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1719 | * ((const char **)response)[7] is concurrent services support indicator if |
| 1720 | * registered on a CDMA system 0-1. |
| 1721 | * 0 - Concurrent services not supported, |
| 1722 | * 1 - Concurrent services supported |
| 1723 | * ((const char **)response)[8] is System ID if registered on a CDMA system or |
| 1724 | * NULL if not. Valid System ID are 0 - 32767 |
| 1725 | * ((const char **)response)[9] is Network ID if registered on a CDMA system or |
| 1726 | * NULL if not. Valid System ID are 0 - 65535 |
| 1727 | * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered |
Naveen Kalla | 03c1edf | 2009-09-23 11:18:35 -0700 | [diff] [blame] | 1728 | * on a CDMA or EVDO system or NULL if not. Valid values |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1729 | * are 0-255. |
| 1730 | * ((const char **)response)[11] indicates whether the current system is in the |
Naveen Kalla | 03c1edf | 2009-09-23 11:18:35 -0700 | [diff] [blame] | 1731 | * PRL if registered on a CDMA or EVDO system or NULL if |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1732 | * not. 0=not in the PRL, 1=in the PRL |
| 1733 | * ((const char **)response)[12] is the default Roaming Indicator from the PRL, |
Naveen Kalla | 03c1edf | 2009-09-23 11:18:35 -0700 | [diff] [blame] | 1734 | * if registered on a CDMA or EVDO system or NULL if not. |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1735 | * Valid values are 0-255. |
| 1736 | * ((const char **)response)[13] if registration state is 3 (Registration |
| 1737 | * denied) this is an enumerated reason why |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 1738 | * registration was denied. See 3GPP TS 24.008, |
| 1739 | * 10.5.3.6 and Annex G. |
| 1740 | * 0 - General |
| 1741 | * 1 - Authentication Failure |
| 1742 | * 2 - IMSI unknown in HLR |
| 1743 | * 3 - Illegal MS |
| 1744 | * 4 - Illegal ME |
| 1745 | * 5 - PLMN not allowed |
| 1746 | * 6 - Location area not allowed |
| 1747 | * 7 - Roaming not allowed |
| 1748 | * 8 - No Suitable Cells in this Location Area |
| 1749 | * 9 - Network failure |
jsh | 29be25c | 2009-07-14 20:18:59 -0700 | [diff] [blame] | 1750 | * 10 - Persistent location update reject |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1751 | * 11 - PLMN not allowed |
| 1752 | * 12 - Location area not allowed |
| 1753 | * 13 - Roaming not allowed in this Location Area |
| 1754 | * 15 - No Suitable Cells in this Location Area |
| 1755 | * 17 - Network Failure |
| 1756 | * 20 - MAC Failure |
| 1757 | * 21 - Sync Failure |
| 1758 | * 22 - Congestion |
| 1759 | * 23 - GSM Authentication unacceptable |
| 1760 | * 25 - Not Authorized for this CSG |
| 1761 | * 32 - Service option not supported |
| 1762 | * 33 - Requested service option not subscribed |
| 1763 | * 34 - Service option temporarily out of order |
| 1764 | * 38 - Call cannot be identified |
| 1765 | * 48-63 - Retry upon entry into a new cell |
| 1766 | * 95 - Semantically incorrect message |
| 1767 | * 96 - Invalid mandatory information |
| 1768 | * 97 - Message type non-existent or not implemented |
| 1769 | * 98 - Message not compatible with protocol state |
| 1770 | * 99 - Information element non-existent or not implemented |
| 1771 | * 100 - Conditional IE error |
| 1772 | * 101 - Message not compatible with protocol state |
| 1773 | * 111 - Protocol error, unspecified |
jsh | ca5e347 | 2010-06-23 21:53:24 -0700 | [diff] [blame] | 1774 | * ((const char **)response)[14] is the Primary Scrambling Code of the current |
| 1775 | * cell as described in TS 25.331, in hexadecimal |
| 1776 | * format, or NULL if unknown or not registered |
| 1777 | * to a UMTS network. |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1778 | * |
| 1779 | * Please note that registration state 4 ("unknown") is treated |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1780 | * as "out of service" in the Android telephony system |
| 1781 | * |
Wink Saville | 1b5fd23 | 2009-04-22 14:50:00 -0700 | [diff] [blame] | 1782 | * Registration state 3 can be returned if Location Update Reject |
| 1783 | * (with cause 17 - Network Failure) is received repeatedly from the network, |
| 1784 | * to facilitate "managed roaming" |
| 1785 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1786 | * Valid errors: |
| 1787 | * SUCCESS |
| 1788 | * RADIO_NOT_AVAILABLE |
| 1789 | * GENERIC_FAILURE |
| 1790 | */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1791 | #define RIL_REQUEST_VOICE_REGISTRATION_STATE 20 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1792 | |
| 1793 | /** |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1794 | * RIL_REQUEST_DATA_REGISTRATION_STATE |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1795 | * |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1796 | * Request current DATA registration state |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1797 | * |
| 1798 | * "data" is NULL |
| 1799 | * "response" is a "char **" |
Li Zhe | 3a63fbc | 2009-08-04 13:14:34 +0800 | [diff] [blame] | 1800 | * ((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] | 1801 | * ((const char **)response)[1] is LAC if registered or NULL if not |
| 1802 | * ((const char **)response)[2] is CID if registered or NULL if not |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 1803 | * ((const char **)response)[3] indicates the available data radio technology, |
| 1804 | * valid values as defined by RIL_RadioTechnology. |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1805 | * ((const char **)response)[4] if registration state is 3 (Registration |
| 1806 | * denied) this is an enumerated reason why |
| 1807 | * registration was denied. See 3GPP TS 24.008, |
| 1808 | * Annex G.6 "Additonal cause codes for GMM". |
| 1809 | * 7 == GPRS services not allowed |
| 1810 | * 8 == GPRS services and non-GPRS services not allowed |
| 1811 | * 9 == MS identity cannot be derived by the network |
| 1812 | * 10 == Implicitly detached |
| 1813 | * 14 == GPRS services not allowed in this PLMN |
| 1814 | * 16 == MSC temporarily not reachable |
| 1815 | * 40 == No PDP context activated |
| 1816 | * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be |
| 1817 | * established using RIL_REQUEST_SETUP_DATA_CALL. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1818 | * |
Wink Saville | ae67953 | 2012-12-03 14:59:45 -0800 | [diff] [blame] | 1819 | * The values at offsets 6..10 are optional LTE location information in decimal. |
| 1820 | * If a value is unknown that value may be NULL. If all values are NULL, |
| 1821 | * none need to be present. |
Wink Saville | ea51a9d | 2012-09-15 07:54:06 -0700 | [diff] [blame] | 1822 | * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code. |
| 1823 | * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier. |
| 1824 | * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier. |
| 1825 | * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity. |
| 1826 | * ((const char **)response)[10] is TADV, a 6-bit timing advance value. |
| 1827 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1828 | * LAC and CID are in hexadecimal format. |
| 1829 | * valid LAC are 0x0000 - 0xffff |
| 1830 | * valid CID are 0x00000000 - 0x0fffffff |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1831 | * |
| 1832 | * Please note that registration state 4 ("unknown") is treated |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1833 | * as "out of service" in the Android telephony system |
| 1834 | * |
| 1835 | * Valid errors: |
| 1836 | * SUCCESS |
| 1837 | * RADIO_NOT_AVAILABLE |
| 1838 | * GENERIC_FAILURE |
| 1839 | */ |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1840 | #define RIL_REQUEST_DATA_REGISTRATION_STATE 21 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1841 | |
| 1842 | /** |
| 1843 | * RIL_REQUEST_OPERATOR |
| 1844 | * |
| 1845 | * Request current operator ONS or EONS |
| 1846 | * |
| 1847 | * "data" is NULL |
| 1848 | * "response" is a "const char **" |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1849 | * ((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] | 1850 | * or NULL if unregistered |
| 1851 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1852 | * ((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] | 1853 | * or NULL if unregistered |
| 1854 | * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC) |
| 1855 | * or NULL if unregistered |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1856 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1857 | * Valid errors: |
| 1858 | * SUCCESS |
| 1859 | * RADIO_NOT_AVAILABLE |
| 1860 | * GENERIC_FAILURE |
| 1861 | */ |
| 1862 | #define RIL_REQUEST_OPERATOR 22 |
| 1863 | |
| 1864 | /** |
| 1865 | * RIL_REQUEST_RADIO_POWER |
| 1866 | * |
| 1867 | * Toggle radio on and off (for "airplane" mode) |
Wink Saville | 29487ef | 2011-04-15 09:15:31 -0700 | [diff] [blame] | 1868 | * If the radio is is turned off/on the radio modem subsystem |
| 1869 | * is expected return to an initialized state. For instance, |
| 1870 | * any voice and data calls will be terminated and all associated |
| 1871 | * lists emptied. |
| 1872 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1873 | * "data" is int * |
| 1874 | * ((int *)data)[0] is > 0 for "Radio On" |
| 1875 | * ((int *)data)[0] is == 0 for "Radio Off" |
| 1876 | * |
| 1877 | * "response" is NULL |
| 1878 | * |
| 1879 | * Turn radio on if "on" > 0 |
| 1880 | * Turn radio off if "on" == 0 |
| 1881 | * |
| 1882 | * Valid errors: |
| 1883 | * SUCCESS |
| 1884 | * RADIO_NOT_AVAILABLE |
| 1885 | * GENERIC_FAILURE |
| 1886 | */ |
| 1887 | #define RIL_REQUEST_RADIO_POWER 23 |
| 1888 | |
| 1889 | /** |
| 1890 | * RIL_REQUEST_DTMF |
| 1891 | * |
| 1892 | * Send a DTMF tone |
| 1893 | * |
| 1894 | * If the implementation is currently playing a tone requested via |
| 1895 | * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone |
| 1896 | * should be played instead |
| 1897 | * |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 1898 | * "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] | 1899 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1900 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1901 | * FIXME should this block/mute microphone? |
| 1902 | * How does this interact with local DTMF feedback? |
| 1903 | * |
| 1904 | * Valid errors: |
| 1905 | * SUCCESS |
| 1906 | * RADIO_NOT_AVAILABLE |
| 1907 | * GENERIC_FAILURE |
| 1908 | * |
| 1909 | * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START |
| 1910 | * |
| 1911 | */ |
| 1912 | #define RIL_REQUEST_DTMF 24 |
| 1913 | |
| 1914 | /** |
| 1915 | * RIL_REQUEST_SEND_SMS |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1916 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1917 | * Send an SMS message |
| 1918 | * |
| 1919 | * "data" is const char ** |
| 1920 | * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed |
| 1921 | * by a length byte (as expected by TS 27.005) or NULL for default SMSC |
| 1922 | * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string |
| 1923 | * less the SMSC address |
| 1924 | * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" |
| 1925 | * |
| 1926 | * "response" is a const RIL_SMS_Response * |
| 1927 | * |
| 1928 | * Based on the return error, caller decides to resend if sending sms |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1929 | * 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] | 1930 | * and GENERIC_FAILURE means no retry (i.e. error cause is 500) |
| 1931 | * |
| 1932 | * Valid errors: |
| 1933 | * SUCCESS |
| 1934 | * RADIO_NOT_AVAILABLE |
| 1935 | * SMS_SEND_FAIL_RETRY |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 1936 | * FDN_CHECK_FAILURE |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1937 | * GENERIC_FAILURE |
| 1938 | * |
| 1939 | * FIXME how do we specify TP-Message-Reference if we need to resend? |
| 1940 | */ |
| 1941 | #define RIL_REQUEST_SEND_SMS 25 |
| 1942 | |
| 1943 | |
| 1944 | /** |
| 1945 | * RIL_REQUEST_SEND_SMS_EXPECT_MORE |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1946 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1947 | * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS, |
| 1948 | * except that more messages are expected to be sent soon. If possible, |
| 1949 | * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command) |
| 1950 | * |
| 1951 | * "data" is const char ** |
| 1952 | * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed |
| 1953 | * by a length byte (as expected by TS 27.005) or NULL for default SMSC |
| 1954 | * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string |
| 1955 | * less the SMSC address |
| 1956 | * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" |
| 1957 | * |
| 1958 | * "response" is a const RIL_SMS_Response * |
| 1959 | * |
| 1960 | * Based on the return error, caller decides to resend if sending sms |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1961 | * 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] | 1962 | * and GENERIC_FAILURE means no retry (i.e. error cause is 500) |
| 1963 | * |
| 1964 | * Valid errors: |
| 1965 | * SUCCESS |
| 1966 | * RADIO_NOT_AVAILABLE |
| 1967 | * SMS_SEND_FAIL_RETRY |
| 1968 | * GENERIC_FAILURE |
| 1969 | * |
| 1970 | */ |
| 1971 | #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26 |
| 1972 | |
| 1973 | |
| 1974 | /** |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 1975 | * RIL_REQUEST_SETUP_DATA_CALL |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1976 | * |
Wink Saville | 29487ef | 2011-04-15 09:15:31 -0700 | [diff] [blame] | 1977 | * Setup a packet data connection. If RIL_Data_Call_Response_v6.status |
| 1978 | * return success it is added to the list of data calls and a |
| 1979 | * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the |
| 1980 | * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the |
| 1981 | * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST |
| 1982 | * and RIL_UNSOL_DATA_CALL_LIST_CHANGED. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1983 | * |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 1984 | * The RIL is expected to: |
| 1985 | * - Create one data call context. |
| 1986 | * - Create and configure a dedicated interface for the context |
| 1987 | * - The interface must be point to point. |
| 1988 | * - The interface is configured with one or more addresses and |
| 1989 | * is capable of sending and receiving packets. The prefix length |
| 1990 | * of the addresses must be /32 for IPv4 and /128 for IPv6. |
| 1991 | * - Must NOT change the linux routing table. |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1992 | * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5] |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 1993 | * number of simultaneous data call contexts. |
| 1994 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 1995 | * "data" is a const char ** |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 1996 | * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2... |
| 1997 | * for values above 2 this is RIL_RadioTechnology + 2. |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 1998 | * ((const char **)data)[1] is a RIL_DataProfile (support is optional) |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 1999 | * ((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] | 2000 | * override the one in the profile. NULL indicates no APN overrride. |
| 2001 | * ((const char **)data)[3] is the username for APN, or NULL |
| 2002 | * ((const char **)data)[4] is the password for APN, or NULL |
Jaikumar Ganesh | 920c78f | 2009-06-04 10:53:15 -0700 | [diff] [blame] | 2003 | * ((const char **)data)[5] is the PAP / CHAP auth type. Values: |
| 2004 | * 0 => PAP and CHAP is never performed. |
| 2005 | * 1 => PAP may be performed; CHAP is never performed. |
| 2006 | * 2 => CHAP may be performed; PAP is never performed. |
| 2007 | * 3 => PAP / CHAP may be performed - baseband dependent. |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2008 | * ((const char **)data)[6] is the connection type to request must be one of the |
| 2009 | * PDP_type values in TS 27.007 section 10.1.1. |
Lorenzo Colitti | 4f81dcf | 2010-09-01 19:38:57 -0700 | [diff] [blame] | 2010 | * For example, "IP", "IPV6", "IPV4V6", or "PPP". |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2011 | * ((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] | 2012 | * |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2013 | * "response" is a RIL_Data_Call_Response_v6 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2014 | * |
| 2015 | * FIXME may need way to configure QoS settings |
Wink Saville | 3d54e74 | 2009-05-18 18:00:44 -0700 | [diff] [blame] | 2016 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2017 | * Valid errors: |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 2018 | * SUCCESS should be returned on both success and failure of setup with |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2019 | * the RIL_Data_Call_Response_v6.status containing the actual status. |
| 2020 | * For all other errors the RIL_Data_Call_Resonse_v6 is ignored. |
Wink Saville | 4380897 | 2011-01-13 17:39:51 -0800 | [diff] [blame] | 2021 | * |
| 2022 | * Other errors could include: |
| 2023 | * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW, |
| 2024 | * 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] | 2025 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2026 | * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2027 | */ |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2028 | #define RIL_REQUEST_SETUP_DATA_CALL 27 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2029 | |
| 2030 | |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2031 | /** |
| 2032 | * RIL_REQUEST_SIM_IO |
| 2033 | * |
| 2034 | * Request SIM I/O operation. |
| 2035 | * This is similar to the TS 27.007 "restricted SIM" operation |
| 2036 | * where it assumes all of the EF selection will be done by the |
| 2037 | * callee. |
| 2038 | * |
Wink Saville | fd72937 | 2011-02-22 16:19:39 -0800 | [diff] [blame] | 2039 | * "data" is a const RIL_SIM_IO_v6 * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2040 | * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL, |
| 2041 | * or may specify a PIN2 for operations that require a PIN2 (eg |
| 2042 | * updating FDN records) |
| 2043 | * |
| 2044 | * "response" is a const RIL_SIM_IO_Response * |
| 2045 | * |
| 2046 | * Arguments and responses that are unused for certain |
| 2047 | * values of "command" should be ignored or set to NULL |
| 2048 | * |
| 2049 | * Valid errors: |
| 2050 | * SUCCESS |
| 2051 | * RADIO_NOT_AVAILABLE |
| 2052 | * GENERIC_FAILURE |
| 2053 | * SIM_PIN2 |
| 2054 | * SIM_PUK2 |
| 2055 | */ |
| 2056 | #define RIL_REQUEST_SIM_IO 28 |
| 2057 | |
| 2058 | /** |
| 2059 | * RIL_REQUEST_SEND_USSD |
| 2060 | * |
| 2061 | * Send a USSD message |
| 2062 | * |
| 2063 | * If a USSD session already exists, the message should be sent in the |
| 2064 | * context of that session. Otherwise, a new session should be created. |
| 2065 | * |
| 2066 | * The network reply should be reported via RIL_UNSOL_ON_USSD |
| 2067 | * |
| 2068 | * Only one USSD session may exist at a time, and the session is assumed |
| 2069 | * to exist until: |
| 2070 | * a) The android system invokes RIL_REQUEST_CANCEL_USSD |
| 2071 | * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code |
| 2072 | * of "0" (USSD-Notify/no further action) or "2" (session terminated) |
| 2073 | * |
| 2074 | * "data" is a const char * containing the USSD request in UTF-8 format |
| 2075 | * "response" is NULL |
| 2076 | * |
| 2077 | * Valid errors: |
| 2078 | * SUCCESS |
| 2079 | * RADIO_NOT_AVAILABLE |
jsh | 602f80f | 2009-07-10 15:44:37 -0700 | [diff] [blame] | 2080 | * FDN_CHECK_FAILURE |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2081 | * GENERIC_FAILURE |
| 2082 | * |
| 2083 | * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD |
| 2084 | */ |
| 2085 | |
| 2086 | #define RIL_REQUEST_SEND_USSD 29 |
| 2087 | |
| 2088 | /** |
| 2089 | * RIL_REQUEST_CANCEL_USSD |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2090 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2091 | * Cancel the current USSD session if one exists |
| 2092 | * |
| 2093 | * "data" is null |
| 2094 | * "response" is NULL |
| 2095 | * |
| 2096 | * Valid errors: |
| 2097 | * SUCCESS |
| 2098 | * RADIO_NOT_AVAILABLE |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2099 | * GENERIC_FAILURE |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2100 | */ |
| 2101 | |
| 2102 | #define RIL_REQUEST_CANCEL_USSD 30 |
| 2103 | |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2104 | /** |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2105 | * RIL_REQUEST_GET_CLIR |
| 2106 | * |
| 2107 | * Gets current CLIR status |
| 2108 | * "data" is NULL |
| 2109 | * "response" is int * |
| 2110 | * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 |
| 2111 | * ((int *)data)[1] is "m" parameter from TS 27.007 7.7 |
| 2112 | * |
| 2113 | * Valid errors: |
| 2114 | * SUCCESS |
| 2115 | * RADIO_NOT_AVAILABLE |
| 2116 | * GENERIC_FAILURE |
| 2117 | */ |
| 2118 | #define RIL_REQUEST_GET_CLIR 31 |
| 2119 | |
| 2120 | /** |
| 2121 | * RIL_REQUEST_SET_CLIR |
| 2122 | * |
| 2123 | * "data" is int * |
| 2124 | * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 |
| 2125 | * |
| 2126 | * "response" is NULL |
| 2127 | * |
| 2128 | * Valid errors: |
| 2129 | * SUCCESS |
| 2130 | * RADIO_NOT_AVAILABLE |
| 2131 | * GENERIC_FAILURE |
| 2132 | */ |
| 2133 | #define RIL_REQUEST_SET_CLIR 32 |
| 2134 | |
| 2135 | /** |
| 2136 | * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS |
| 2137 | * |
| 2138 | * "data" is const RIL_CallForwardInfo * |
| 2139 | * |
| 2140 | * "response" is const RIL_CallForwardInfo ** |
| 2141 | * "response" points to an array of RIL_CallForwardInfo *'s, one for |
| 2142 | * each distinct registered phone number. |
| 2143 | * |
| 2144 | * For example, if data is forwarded to +18005551212 and voice is forwarded |
| 2145 | * to +18005559999, then two separate RIL_CallForwardInfo's should be returned |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2146 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2147 | * If, however, both data and voice are forwarded to +18005551212, then |
| 2148 | * a single RIL_CallForwardInfo can be returned with the service class |
| 2149 | * set to "data + voice = 3") |
| 2150 | * |
| 2151 | * Valid errors: |
| 2152 | * SUCCESS |
| 2153 | * RADIO_NOT_AVAILABLE |
| 2154 | * GENERIC_FAILURE |
| 2155 | */ |
| 2156 | #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33 |
| 2157 | |
| 2158 | |
| 2159 | /** |
| 2160 | * RIL_REQUEST_SET_CALL_FORWARD |
| 2161 | * |
| 2162 | * Configure call forward rule |
| 2163 | * |
| 2164 | * "data" is const RIL_CallForwardInfo * |
| 2165 | * "response" is NULL |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2166 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2167 | * Valid errors: |
| 2168 | * SUCCESS |
| 2169 | * RADIO_NOT_AVAILABLE |
| 2170 | * GENERIC_FAILURE |
| 2171 | */ |
| 2172 | #define RIL_REQUEST_SET_CALL_FORWARD 34 |
| 2173 | |
| 2174 | |
| 2175 | /** |
| 2176 | * RIL_REQUEST_QUERY_CALL_WAITING |
| 2177 | * |
| 2178 | * Query current call waiting state |
| 2179 | * |
| 2180 | * "data" is const int * |
| 2181 | * ((const int *)data)[0] is the TS 27.007 service class to query. |
| 2182 | * "response" is a const int * |
| 2183 | * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled" |
| 2184 | * |
| 2185 | * If ((const int *)response)[0] is = 1, then ((const int *)response)[1] |
| 2186 | * must follow, with the TS 27.007 service class bit vector of services |
| 2187 | * for which call waiting is enabled. |
| 2188 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2189 | * 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] | 2190 | * ((const int *)response)[1] is 3, then call waiting is enabled for data |
| 2191 | * and voice and disabled for everything else |
| 2192 | * |
| 2193 | * Valid errors: |
| 2194 | * SUCCESS |
| 2195 | * RADIO_NOT_AVAILABLE |
| 2196 | * GENERIC_FAILURE |
| 2197 | */ |
| 2198 | #define RIL_REQUEST_QUERY_CALL_WAITING 35 |
| 2199 | |
| 2200 | |
| 2201 | /** |
| 2202 | * RIL_REQUEST_SET_CALL_WAITING |
| 2203 | * |
| 2204 | * Configure current call waiting state |
| 2205 | * |
| 2206 | * "data" is const int * |
| 2207 | * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled" |
| 2208 | * ((const int *)data)[1] is the TS 27.007 service class bit vector of |
| 2209 | * services to modify |
| 2210 | * "response" is NULL |
| 2211 | * |
| 2212 | * Valid errors: |
| 2213 | * SUCCESS |
| 2214 | * RADIO_NOT_AVAILABLE |
| 2215 | * GENERIC_FAILURE |
| 2216 | */ |
| 2217 | #define RIL_REQUEST_SET_CALL_WAITING 36 |
| 2218 | |
| 2219 | /** |
| 2220 | * RIL_REQUEST_SMS_ACKNOWLEDGE |
| 2221 | * |
| 2222 | * Acknowledge successful or failed receipt of SMS previously indicated |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2223 | * via RIL_UNSOL_RESPONSE_NEW_SMS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2224 | * |
| 2225 | * "data" is int * |
jsh | b60444e | 2009-05-29 11:09:17 -0700 | [diff] [blame] | 2226 | * ((int *)data)[0] is 1 on successful receipt |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2227 | * (basically, AT+CNMA=1 from TS 27.005 |
jsh | b60444e | 2009-05-29 11:09:17 -0700 | [diff] [blame] | 2228 | * is 0 on failed receipt |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2229 | * (basically, AT+CNMA=2 from TS 27.005) |
jsh | b60444e | 2009-05-29 11:09:17 -0700 | [diff] [blame] | 2230 | * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined |
| 2231 | * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory |
| 2232 | * capacity exceeded) and 0xFF (unspecified error) are |
| 2233 | * reported. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2234 | * |
| 2235 | * "response" is NULL |
| 2236 | * |
| 2237 | * FIXME would like request that specified RP-ACK/RP-ERROR PDU |
| 2238 | * |
| 2239 | * Valid errors: |
| 2240 | * SUCCESS |
| 2241 | * RADIO_NOT_AVAILABLE |
| 2242 | * GENERIC_FAILURE |
| 2243 | */ |
| 2244 | #define RIL_REQUEST_SMS_ACKNOWLEDGE 37 |
| 2245 | |
| 2246 | /** |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2247 | * RIL_REQUEST_GET_IMEI - DEPRECATED |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2248 | * |
| 2249 | * Get the device IMEI, including check digit |
| 2250 | * |
johnwang | f8bc167 | 2009-05-14 19:19:47 -0700 | [diff] [blame] | 2251 | * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2252 | * Valid when RadioState is not RADIO_STATE_UNAVAILABLE |
| 2253 | * |
| 2254 | * "data" is NULL |
| 2255 | * "response" is a const char * containing the IMEI |
| 2256 | * |
| 2257 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2258 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2259 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 2260 | * GENERIC_FAILURE |
| 2261 | */ |
| 2262 | |
| 2263 | #define RIL_REQUEST_GET_IMEI 38 |
| 2264 | |
| 2265 | /** |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2266 | * RIL_REQUEST_GET_IMEISV - DEPRECATED |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2267 | * |
| 2268 | * Get the device IMEISV, which should be two decimal digits |
| 2269 | * |
johnwang | f8bc167 | 2009-05-14 19:19:47 -0700 | [diff] [blame] | 2270 | * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2271 | * Valid when RadioState is not RADIO_STATE_UNAVAILABLE |
| 2272 | * |
| 2273 | * "data" is NULL |
| 2274 | * "response" is a const char * containing the IMEISV |
| 2275 | * |
| 2276 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2277 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2278 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 2279 | * GENERIC_FAILURE |
| 2280 | */ |
| 2281 | |
| 2282 | #define RIL_REQUEST_GET_IMEISV 39 |
| 2283 | |
| 2284 | |
| 2285 | /** |
| 2286 | * RIL_REQUEST_ANSWER |
| 2287 | * |
| 2288 | * Answer incoming call |
| 2289 | * |
| 2290 | * Will not be called for WAITING calls. |
| 2291 | * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case |
| 2292 | * instead |
| 2293 | * |
| 2294 | * "data" is NULL |
| 2295 | * "response" is NULL |
| 2296 | * |
| 2297 | * Valid errors: |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2298 | * SUCCESS |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2299 | * RADIO_NOT_AVAILABLE (radio resetting) |
| 2300 | * GENERIC_FAILURE |
| 2301 | */ |
| 2302 | |
| 2303 | #define RIL_REQUEST_ANSWER 40 |
| 2304 | |
| 2305 | /** |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2306 | * RIL_REQUEST_DEACTIVATE_DATA_CALL |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2307 | * |
Wink Saville | 29487ef | 2011-04-15 09:15:31 -0700 | [diff] [blame] | 2308 | * Deactivate packet data connection and remove from the |
| 2309 | * data call list if SUCCESS is returned. Any other return |
| 2310 | * values should also try to remove the call from the list, |
| 2311 | * but that may not be possible. In any event a |
| 2312 | * RIL_REQUEST_RADIO_POWER off/on must clear the list. An |
| 2313 | * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be |
| 2314 | * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2315 | * |
| 2316 | * "data" is const char ** |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2317 | * ((char**)data)[0] indicating CID |
Kazuhiro Ondo | d86799a | 2010-12-02 13:22:35 -0600 | [diff] [blame] | 2318 | * ((char**)data)[1] indicating Disconnect Reason |
| 2319 | * 0 => No specific reason specified |
| 2320 | * 1 => Radio shutdown requested |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2321 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2322 | * "response" is NULL |
| 2323 | * |
| 2324 | * Valid errors: |
| 2325 | * SUCCESS |
| 2326 | * RADIO_NOT_AVAILABLE |
| 2327 | * GENERIC_FAILURE |
| 2328 | * |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2329 | * See also: RIL_REQUEST_SETUP_DATA_CALL |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2330 | */ |
Wink Saville | f4c4d36 | 2009-04-02 01:37:03 -0700 | [diff] [blame] | 2331 | #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41 |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2332 | |
| 2333 | /** |
| 2334 | * RIL_REQUEST_QUERY_FACILITY_LOCK |
| 2335 | * |
| 2336 | * Query the status of a facility lock state |
| 2337 | * |
| 2338 | * "data" is const char ** |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2339 | * ((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] | 2340 | * (eg "AO" for BAOC, "SC" for SIM lock) |
| 2341 | * ((const char **)data)[1] is the password, or "" if not required |
| 2342 | * ((const char **)data)[2] is the TS 27.007 service class bit vector of |
| 2343 | * services to query |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2344 | * ((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] | 2345 | * This is only applicable in the case of Fixed Dialing Numbers |
| 2346 | * (FDN) requests. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2347 | * |
| 2348 | * "response" is an int * |
| 2349 | * ((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] | 2350 | * services for which the specified barring facility |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2351 | * is active. "0" means "disabled for all" |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2352 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2353 | * |
| 2354 | * Valid errors: |
| 2355 | * SUCCESS |
| 2356 | * RADIO_NOT_AVAILABLE |
| 2357 | * GENERIC_FAILURE |
| 2358 | * |
| 2359 | */ |
| 2360 | #define RIL_REQUEST_QUERY_FACILITY_LOCK 42 |
| 2361 | |
| 2362 | /** |
| 2363 | * RIL_REQUEST_SET_FACILITY_LOCK |
| 2364 | * |
| 2365 | * Enable/disable one facility lock |
| 2366 | * |
| 2367 | * "data" is const char ** |
| 2368 | * |
| 2369 | * ((const char **)data)[0] = facility string code from TS 27.007 7.4 |
| 2370 | * (eg "AO" for BAOC) |
| 2371 | * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock" |
| 2372 | * ((const char **)data)[2] = password |
| 2373 | * ((const char **)data)[3] = string representation of decimal TS 27.007 |
| 2374 | * service class bit vector. Eg, the string |
| 2375 | * "1" means "set this facility for voice services" |
Wink Saville | c0114b3 | 2011-02-18 10:14:07 -0800 | [diff] [blame] | 2376 | * ((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] | 2377 | * This is only applicable in the case of Fixed Dialing Numbers |
| 2378 | * (FDN) requests. |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2379 | * |
jsh | 593c910 | 2009-06-24 16:13:44 -0700 | [diff] [blame] | 2380 | * "response" is int * |
| 2381 | * ((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] | 2382 | * |
| 2383 | * Valid errors: |
| 2384 | * SUCCESS |
| 2385 | * RADIO_NOT_AVAILABLE |
| 2386 | * GENERIC_FAILURE |
| 2387 | * |
| 2388 | */ |
| 2389 | #define RIL_REQUEST_SET_FACILITY_LOCK 43 |
| 2390 | |
| 2391 | /** |
| 2392 | * RIL_REQUEST_CHANGE_BARRING_PASSWORD |
| 2393 | * |
| 2394 | * Change call barring facility password |
| 2395 | * |
| 2396 | * "data" is const char ** |
| 2397 | * |
| 2398 | * ((const char **)data)[0] = facility string code from TS 27.007 7.4 |
| 2399 | * (eg "AO" for BAOC) |
| 2400 | * ((const char **)data)[1] = old password |
| 2401 | * ((const char **)data)[2] = new password |
| 2402 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2403 | * "response" is NULL |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2404 | * |
| 2405 | * Valid errors: |
| 2406 | * SUCCESS |
| 2407 | * RADIO_NOT_AVAILABLE |
| 2408 | * GENERIC_FAILURE |
| 2409 | * |
| 2410 | */ |
| 2411 | #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44 |
| 2412 | |
| 2413 | /** |
| 2414 | * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE |
| 2415 | * |
| 2416 | * Query current network selectin mode |
| 2417 | * |
| 2418 | * "data" is NULL |
| 2419 | * |
| 2420 | * "response" is int * |
| 2421 | * ((const int *)response)[0] is |
| 2422 | * 0 for automatic selection |
| 2423 | * 1 for manual selection |
| 2424 | * |
| 2425 | * Valid errors: |
| 2426 | * SUCCESS |
| 2427 | * RADIO_NOT_AVAILABLE |
| 2428 | * GENERIC_FAILURE |
| 2429 | * |
| 2430 | */ |
| 2431 | #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45 |
| 2432 | |
| 2433 | /** |
| 2434 | * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC |
| 2435 | * |
| 2436 | * Specify that the network should be selected automatically |
| 2437 | * |
| 2438 | * "data" is NULL |
| 2439 | * "response" is NULL |
| 2440 | * |
Wink Saville | 7f85680 | 2009-06-09 10:23:37 -0700 | [diff] [blame] | 2441 | * 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] | 2442 | * and registered |
| 2443 | * |
| 2444 | * Valid errors: |
| 2445 | * SUCCESS |
| 2446 | * RADIO_NOT_AVAILABLE |
John Wang | 7553447 | 2010-04-20 15:11:42 -0700 | [diff] [blame] | 2447 | * ILLEGAL_SIM_OR_ME |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2448 | * GENERIC_FAILURE |
| 2449 | * |
John Wang | 7553447 | 2010-04-20 15:11:42 -0700 | [diff] [blame] | 2450 | * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and |
| 2451 | * no retries needed, such as illegal SIM or ME. |
| 2452 | * Returns GENERIC_FAILURE for all other causes that might be |
| 2453 | * fixed by retries. |
| 2454 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2455 | */ |
| 2456 | #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46 |
| 2457 | |
| 2458 | /** |
| 2459 | * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL |
| 2460 | * |
| 2461 | * Manually select a specified network. |
| 2462 | * |
The Android Open Source Project | 00f06fc | 2009-03-03 19:32:15 -0800 | [diff] [blame] | 2463 | * "data" is const ch
|