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