ril.h revision 73f2ccbf49cced1bb66371d1ba12ce23fd8eae5b
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 17#ifndef ANDROID_RIL_H 18#define ANDROID_RIL_H 1 19 20#include <stdlib.h> 21#include <stdint.h> 22#include <telephony/ril_cdma_sms.h> 23#include <telephony/ril_nv_items.h> 24#include <telephony/ril_msim.h> 25 26#ifndef FEATURE_UNIT_TEST 27#include <sys/time.h> 28#endif /* !FEATURE_UNIT_TEST */ 29 30#ifdef __cplusplus 31extern "C" { 32#endif 33 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 49#define RIL_VERSION 11 /* Current version */ 50#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */ 51 52#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64 53#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81 54 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 60#define MAX_UUID_LENGTH 64 61 62 63typedef void * RIL_Token; 64 65typedef enum { 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 80typedef enum { 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 */ 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 96 card absent */ 97 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified 98 location */ 99 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */ 100 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */ 101 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to 102 illegal SIM or ME */ 103 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */ 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 RIL_E_LCE_NOT_SUPPORTED = 36 /* LCE service not supported(36 in RILConstants.java) */ 118 119 120} RIL_Errno; 121 122typedef enum { 123 RIL_CALL_ACTIVE = 0, 124 RIL_CALL_HOLDING = 1, 125 RIL_CALL_DIALING = 2, /* MO call only */ 126 RIL_CALL_ALERTING = 3, /* MO call only */ 127 RIL_CALL_INCOMING = 4, /* MT call only */ 128 RIL_CALL_WAITING = 5 /* MT call only */ 129} RIL_CallState; 130 131typedef enum { 132 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */ 133 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */ 134 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */ 135 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */ 136 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network 137 personalization locked, or SIM absent */ 138 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */ 139 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */ 140 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */ 141 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network 142 personalization locked, or RUIM absent */ 143 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */ 144 RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */ 145 RADIO_STATE_ON = 10 /* Radio is on */ 146} RIL_RadioState; 147 148typedef enum { 149 RADIO_TECH_UNKNOWN = 0, 150 RADIO_TECH_GPRS = 1, 151 RADIO_TECH_EDGE = 2, 152 RADIO_TECH_UMTS = 3, 153 RADIO_TECH_IS95A = 4, 154 RADIO_TECH_IS95B = 5, 155 RADIO_TECH_1xRTT = 6, 156 RADIO_TECH_EVDO_0 = 7, 157 RADIO_TECH_EVDO_A = 8, 158 RADIO_TECH_HSDPA = 9, 159 RADIO_TECH_HSUPA = 10, 160 RADIO_TECH_HSPA = 11, 161 RADIO_TECH_EVDO_B = 12, 162 RADIO_TECH_EHRPD = 13, 163 RADIO_TECH_LTE = 14, 164 RADIO_TECH_HSPAP = 15, // HSPA+ 165 RADIO_TECH_GSM = 16, // Only supports voice 166 RADIO_TECH_TD_SCDMA = 17, 167 RADIO_TECH_IWLAN = 18 168} RIL_RadioTechnology; 169 170typedef enum { 171 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN), 172 RAF_GPRS = (1 << RADIO_TECH_GPRS), 173 RAF_EDGE = (1 << RADIO_TECH_EDGE), 174 RAF_UMTS = (1 << RADIO_TECH_UMTS), 175 RAF_IS95A = (1 << RADIO_TECH_IS95A), 176 RAF_IS95B = (1 << RADIO_TECH_IS95B), 177 RAF_1xRTT = (1 << RADIO_TECH_1xRTT), 178 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0), 179 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A), 180 RAF_HSDPA = (1 << RADIO_TECH_HSDPA), 181 RAF_HSUPA = (1 << RADIO_TECH_HSUPA), 182 RAF_HSPA = (1 << RADIO_TECH_HSPA), 183 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B), 184 RAF_EHRPD = (1 << RADIO_TECH_EHRPD), 185 RAF_LTE = (1 << RADIO_TECH_LTE), 186 RAF_HSPAP = (1 << RADIO_TECH_HSPAP), 187 RAF_GSM = (1 << RADIO_TECH_GSM), 188 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA), 189} RIL_RadioAccessFamily; 190 191typedef enum { 192 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes 193 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be 194 // forthcoming with these same parameters 195 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned 196 // RIL_RadioCapability.status = 0, if any START's fail no 197 // APPLY will be sent 198 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY 199 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error 200 // occurs in any previous command the RIL_RadioAccessesFamily and 201 // logicalModemUuid fields will be the prior configuration thus 202 // restoring the configuration to the previous value. An error 203 // returned by this command will generally be ignored or may 204 // cause that logical modem to be removed from service. 205} RadioCapabilityPhase; 206 207typedef enum { 208 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START, 209 // RC_PHASE_APPLY 210 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio 211 // capability was success with RC_PHASE_FINISH 212 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio 213 // capability is fail with RC_PHASE_FINISH. 214} RadioCapabilityStatus; 215 216#define RIL_RADIO_CAPABILITY_VERSION 1 217typedef struct { 218 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION 219 int session; // Unique session value defined by framework returned in all "responses/unsol" 220 int phase; // CONFIGURED, START, APPLY, FINISH 221 int rat; // RIL_RadioAccessFamily for the radio 222 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem. 223 int status; // Return status and an input parameter for RC_PHASE_FINISH 224} RIL_RadioCapability; 225 226// Do we want to split Data from Voice and the use 227// RIL_RadioTechnology for get/setPreferredVoice/Data ? 228typedef enum { 229 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */ 230 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */ 231 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */ 232 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */ 233 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */ 234 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */ 235 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */ 236 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */ 237 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */ 238 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */ 239 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */ 240 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */ 241 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */ 242} RIL_PreferredNetworkType; 243 244/* Source for cdma subscription */ 245typedef enum { 246 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0, 247 CDMA_SUBSCRIPTION_SOURCE_NV = 1 248} RIL_CdmaSubscriptionSource; 249 250/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */ 251typedef enum { 252 RIL_UUS_TYPE1_IMPLICIT = 0, 253 RIL_UUS_TYPE1_REQUIRED = 1, 254 RIL_UUS_TYPE1_NOT_REQUIRED = 2, 255 RIL_UUS_TYPE2_REQUIRED = 3, 256 RIL_UUS_TYPE2_NOT_REQUIRED = 4, 257 RIL_UUS_TYPE3_REQUIRED = 5, 258 RIL_UUS_TYPE3_NOT_REQUIRED = 6 259} RIL_UUS_Type; 260 261/* User-to-User Signaling Information data coding schemes. Possible values for 262 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been 263 * specified in section 10.5.4.25 of 3GPP TS 24.008 */ 264typedef enum { 265 RIL_UUS_DCS_USP = 0, /* User specified protocol */ 266 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */ 267 RIL_UUS_DCS_X244 = 2, /* X.244 */ 268 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement 269 convergence function */ 270 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */ 271} RIL_UUS_DCS; 272 273/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0 274 * This data is passed in RIL_ExtensionRecord and rec contains this 275 * structure when type is RIL_UUS_INFO_EXT_REC */ 276typedef struct { 277 RIL_UUS_Type uusType; /* UUS Type */ 278 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */ 279 int uusLength; /* Length of UUS Data */ 280 char * uusData; /* UUS Data */ 281} RIL_UUS_Info; 282 283/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */ 284typedef struct { 285 char isPresent; /* non-zero if signal information record is present */ 286 char signalType; /* as defined 3.7.5.5-1 */ 287 char alertPitch; /* as defined 3.7.5.5-2 */ 288 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */ 289} RIL_CDMA_SignalInfoRecord; 290 291typedef struct { 292 RIL_CallState state; 293 int index; /* Connection Index for use with, eg, AT+CHLD */ 294 int toa; /* type of address, eg 145 = intl */ 295 char isMpty; /* nonzero if is mpty call */ 296 char isMT; /* nonzero if call is mobile terminated */ 297 char als; /* ALS line indicator if available 298 (0 = line 1) */ 299 char isVoice; /* nonzero if this is is a voice call */ 300 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */ 301 char * number; /* Remote party number */ 302 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ 303 char * name; /* Remote party name */ 304 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ 305 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */ 306} RIL_Call; 307 308/* Deprecated, use RIL_Data_Call_Response_v6 */ 309typedef struct { 310 int cid; /* Context ID, uniquely identifies this call */ 311 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 312 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 313 For example, "IP", "IPV6", "IPV4V6", or "PPP". */ 314 char * apn; /* ignored */ 315 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */ 316} RIL_Data_Call_Response_v4; 317 318/* 319 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST 320 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0. 321 */ 322typedef struct { 323 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ 324 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry 325 back-off timer value RIL wants to override the one 326 pre-configured in FW. 327 The unit is miliseconds. 328 The value < 0 means no value is suggested. 329 The value 0 means retry should be done ASAP. 330 The value of INT_MAX(0x7fffffff) means no retry. */ 331 int cid; /* Context ID, uniquely identifies this call */ 332 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 333 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 334 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is 335 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported 336 such as "IP" or "IPV6" */ 337 char * ifname; /* The network interface name */ 338 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, 339 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". 340 May not be empty, typically 1 IPv4 or 1 IPv6 or 341 one of each. If the prefix length is absent the addresses 342 are assumed to be point to point with IPv4 having a prefix 343 length of 32 and IPv6 128. */ 344 char * dnses; /* A space-delimited list of DNS server addresses, 345 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 346 May be empty. */ 347 char * gateways; /* A space-delimited list of default gateway addresses, 348 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 349 May be empty in which case the addresses represent point 350 to point connections. */ 351} RIL_Data_Call_Response_v6; 352 353typedef struct { 354 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ 355 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry 356 back-off timer value RIL wants to override the one 357 pre-configured in FW. 358 The unit is miliseconds. 359 The value < 0 means no value is suggested. 360 The value 0 means retry should be done ASAP. 361 The value of INT_MAX(0x7fffffff) means no retry. */ 362 int cid; /* Context ID, uniquely identifies this call */ 363 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 364 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 365 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is 366 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported 367 such as "IP" or "IPV6" */ 368 char * ifname; /* The network interface name */ 369 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, 370 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". 371 May not be empty, typically 1 IPv4 or 1 IPv6 or 372 one of each. If the prefix length is absent the addresses 373 are assumed to be point to point with IPv4 having a prefix 374 length of 32 and IPv6 128. */ 375 char * dnses; /* A space-delimited list of DNS server addresses, 376 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 377 May be empty. */ 378 char * gateways; /* A space-delimited list of default gateway addresses, 379 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 380 May be empty in which case the addresses represent point 381 to point connections. */ 382 char * pcscf; /* the Proxy Call State Control Function address 383 via PCO(Protocol Configuration Option) for IMS client. */ 384} RIL_Data_Call_Response_v9; 385 386typedef struct { 387 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ 388 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry 389 back-off timer value RIL wants to override the one 390 pre-configured in FW. 391 The unit is miliseconds. 392 The value < 0 means no value is suggested. 393 The value 0 means retry should be done ASAP. 394 The value of INT_MAX(0x7fffffff) means no retry. */ 395 int cid; /* Context ID, uniquely identifies this call */ 396 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 397 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 398 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is 399 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported 400 such as "IP" or "IPV6" */ 401 char * ifname; /* The network interface name */ 402 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, 403 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". 404 May not be empty, typically 1 IPv4 or 1 IPv6 or 405 one of each. If the prefix length is absent the addresses 406 are assumed to be point to point with IPv4 having a prefix 407 length of 32 and IPv6 128. */ 408 char * dnses; /* A space-delimited list of DNS server addresses, 409 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 410 May be empty. */ 411 char * gateways; /* A space-delimited list of default gateway addresses, 412 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 413 May be empty in which case the addresses represent point 414 to point connections. */ 415 char * pcscf; /* the Proxy Call State Control Function address 416 via PCO(Protocol Configuration Option) for IMS client. */ 417 int mtu; /* MTU received from network 418 Value <= 0 means network has either not sent a value or 419 sent an invalid value */ 420} RIL_Data_Call_Response_v11; 421 422typedef enum { 423 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */ 424 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */ 425} RIL_RadioTechnologyFamily; 426 427typedef struct { 428 RIL_RadioTechnologyFamily tech; 429 unsigned char retry; /* 0 == not retry, nonzero == retry */ 430 int messageRef; /* Valid field if retry is set to nonzero. 431 Contains messageRef from RIL_SMS_Response 432 corresponding to failed MO SMS. 433 */ 434 435 union { 436 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */ 437 RIL_CDMA_SMS_Message* cdmaMessage; 438 439 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */ 440 char** gsmMessage; 441 } message; 442} RIL_IMS_SMS_Message; 443 444typedef struct { 445 int messageRef; /* TP-Message-Reference for GSM, 446 and BearerData MessageId for CDMA 447 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */ 448 char *ackPDU; /* or NULL if n/a */ 449 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS, 450 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA, 451 -1 if unknown or not applicable*/ 452} RIL_SMS_Response; 453 454/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */ 455typedef struct { 456 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */ 457 /* 0 = "REC UNREAD" */ 458 /* 1 = "REC READ" */ 459 /* 2 = "STO UNSENT" */ 460 /* 3 = "STO SENT" */ 461 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address, 462 the TP-layer length is "strlen(pdu)/2". */ 463 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte 464 (as expected by TS 27.005) or NULL for default SMSC */ 465} RIL_SMS_WriteArgs; 466 467/** Used by RIL_REQUEST_DIAL */ 468typedef struct { 469 char * address; 470 int clir; 471 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR" 472 * clir == 0 on "use subscription default value" 473 * clir == 1 on "CLIR invocation" (restrict CLI presentation) 474 * clir == 2 on "CLIR suppression" (allow CLI presentation) 475 */ 476 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */ 477} RIL_Dial; 478 479typedef struct { 480 int command; /* one of the commands listed for TS 27.007 +CRSM*/ 481 int fileid; /* EF id */ 482 char *path; /* "pathid" from TS 27.007 +CRSM command. 483 Path is in hex asciii format eg "7f205f70" 484 Path must always be provided. 485 */ 486 int p1; 487 int p2; 488 int p3; 489 char *data; /* May be NULL*/ 490 char *pin2; /* May be NULL*/ 491} RIL_SIM_IO_v5; 492 493typedef struct { 494 int command; /* one of the commands listed for TS 27.007 +CRSM*/ 495 int fileid; /* EF id */ 496 char *path; /* "pathid" from TS 27.007 +CRSM command. 497 Path is in hex asciii format eg "7f205f70" 498 Path must always be provided. 499 */ 500 int p1; 501 int p2; 502 int p3; 503 char *data; /* May be NULL*/ 504 char *pin2; /* May be NULL*/ 505 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */ 506} RIL_SIM_IO_v6; 507 508/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and 509 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */ 510typedef struct { 511 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be 512 ignored for +CSIM command. */ 513 514 /* Following fields are used to derive the APDU ("command" and "length" 515 values in TS 27.007 +CSIM and +CGLA commands). */ 516 int cla; 517 int instruction; 518 int p1; 519 int p2; 520 int p3; /* A negative P3 implies a 4 byte APDU. */ 521 char *data; /* May be NULL. In hex string format. */ 522} RIL_SIM_APDU; 523 524typedef struct { 525 int sw1; 526 int sw2; 527 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION 528 response for which it is in Base64 format, see 3GPP TS 31.102 7.1.2 */ 529} RIL_SIM_IO_Response; 530 531/* See also com.android.internal.telephony.gsm.CallForwardInfo */ 532 533typedef struct { 534 int status; /* 535 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 536 * status 1 = active, 0 = not active 537 * 538 * For RIL_REQUEST_SET_CALL_FORWARD: 539 * status is: 540 * 0 = disable 541 * 1 = enable 542 * 2 = interrogate 543 * 3 = registeration 544 * 4 = erasure 545 */ 546 547 int reason; /* from TS 27.007 7.11 "reason" */ 548 int serviceClass;/* From 27.007 +CCFC/+CLCK "class" 549 See table for Android mapping from 550 MMI service code 551 0 means user doesn't input class */ 552 int toa; /* "type" from TS 27.007 7.11 */ 553 char * number; /* "number" from TS 27.007 7.11. May be NULL */ 554 int timeSeconds; /* for CF no reply only */ 555}RIL_CallForwardInfo; 556 557typedef struct { 558 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM. 559 * Upper 16 bits is LAC and lower 16 bits 560 * is CID (as described in TS 27.005) 561 * Primary Scrambling Code (as described in TS 25.331) 562 * in 9 bits in UMTS 563 * Valid values are hexadecimal 0x0000 - 0xffffffff. 564 */ 565 int rssi; /* Received RSSI in GSM, 566 * Level index of CPICH Received Signal Code Power in UMTS 567 */ 568} RIL_NeighboringCell; 569 570typedef struct { 571 char lce_status; /* LCE service status: 572 * -1 = not supported; 573 * 0 = stopped; 574 * 1 = active. 575 */ 576 unsigned int actual_interval_ms; /* actual LCE reporting interval, 577 * meaningful only if LCEStatus = 1. 578 */ 579} RIL_LceStatusInfo; 580 581typedef struct { 582 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */ 583 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */ 584 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio 585 * moves to inactive state or network type change) 586 * 1 = suspended; 587 * 0 = not suspended. 588 */ 589} RIL_LceDataInfo; 590 591/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */ 592typedef enum { 593 CALL_FAIL_UNOBTAINABLE_NUMBER = 1, 594 CALL_FAIL_NORMAL = 16, 595 CALL_FAIL_BUSY = 17, 596 CALL_FAIL_CONGESTION = 34, 597 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68, 598 CALL_FAIL_CALL_BARRED = 240, 599 CALL_FAIL_FDN_BLOCKED = 241, 600 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242, 601 CALL_FAIL_IMEI_NOT_ACCEPTED = 243, 602 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */ 603 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245, 604 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246, 605 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000, 606 CALL_FAIL_CDMA_DROP = 1001, 607 CALL_FAIL_CDMA_INTERCEPT = 1002, 608 CALL_FAIL_CDMA_REORDER = 1003, 609 CALL_FAIL_CDMA_SO_REJECT = 1004, 610 CALL_FAIL_CDMA_RETRY_ORDER = 1005, 611 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006, 612 CALL_FAIL_CDMA_PREEMPTED = 1007, 613 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed 614 during emergency callback mode */ 615 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */ 616 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff 617} RIL_LastCallFailCause; 618 619/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */ 620typedef enum { 621 PDP_FAIL_NONE = 0, /* No error, connection ok */ 622 623 /* an integer cause code defined in TS 24.008 624 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B. 625 If the implementation does not have access to the exact cause codes, 626 then it should return one of the following values, 627 as the UI layer needs to distinguish these 628 cases for error notification and potential retries. */ 629 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */ 630 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A, 631 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */ 632 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */ 633 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */ 634 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */ 635 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F, 636 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */ 637 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */ 638 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22, 639 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */ 640 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio, 641 based on framework config */ 642 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */ 643 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */ 644 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34, 645 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */ 646 647 /* Not mentioned in the specification */ 648 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1, 649 PDP_FAIL_DATA_REGISTRATION_FAIL = -2, 650 651 /* reasons for data call drop - network/modem disconnect */ 652 PDP_FAIL_SIGNAL_LOST = -3, 653 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry 654 with parameters appropriate for new technology */ 655 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting, 656 powered off - no retry */ 657 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered 658 mode was up on same APN/data profile - no retry until 659 tethered call is off */ 660 661 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */ 662} RIL_DataCallFailCause; 663 664/* See RIL_REQUEST_SETUP_DATA_CALL */ 665typedef enum { 666 RIL_DATA_PROFILE_DEFAULT = 0, 667 RIL_DATA_PROFILE_TETHERED = 1, 668 RIL_DATA_PROFILE_IMS = 2, 669 RIL_DATA_PROFILE_FOTA = 3, 670 RIL_DATA_PROFILE_CBS = 4, 671 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */ 672 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF 673} RIL_DataProfile; 674 675/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */ 676typedef struct { 677 int notificationType; /* 678 * 0 = MO intermediate result code 679 * 1 = MT unsolicited result code 680 */ 681 int code; /* See 27.007 7.17 682 "code1" for MO 683 "code2" for MT. */ 684 int index; /* CUG index. See 27.007 7.17. */ 685 int type; /* "type" from 27.007 7.17 (MT only). */ 686 char * number; /* "number" from 27.007 7.17 687 (MT only, may be NULL). */ 688} RIL_SuppSvcNotification; 689 690#define RIL_CARD_MAX_APPS 8 691 692typedef enum { 693 RIL_CARDSTATE_ABSENT = 0, 694 RIL_CARDSTATE_PRESENT = 1, 695 RIL_CARDSTATE_ERROR = 2 696} RIL_CardState; 697 698typedef enum { 699 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */ 700 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */ 701 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished 702 since each app can only have 1 active perso 703 involved */ 704 RIL_PERSOSUBSTATE_SIM_NETWORK = 3, 705 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4, 706 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5, 707 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6, 708 RIL_PERSOSUBSTATE_SIM_SIM = 7, 709 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */ 710 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9, 711 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10, 712 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11, 713 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12, 714 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13, 715 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14, 716 RIL_PERSOSUBSTATE_RUIM_HRPD = 15, 717 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16, 718 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17, 719 RIL_PERSOSUBSTATE_RUIM_RUIM = 18, 720 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */ 721 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20, 722 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21, 723 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22, 724 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23, 725 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24 726} RIL_PersoSubstate; 727 728typedef enum { 729 RIL_APPSTATE_UNKNOWN = 0, 730 RIL_APPSTATE_DETECTED = 1, 731 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */ 732 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */ 733 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at 734 when app_state is assigned to this value */ 735 RIL_APPSTATE_READY = 5 736} RIL_AppState; 737 738typedef enum { 739 RIL_PINSTATE_UNKNOWN = 0, 740 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1, 741 RIL_PINSTATE_ENABLED_VERIFIED = 2, 742 RIL_PINSTATE_DISABLED = 3, 743 RIL_PINSTATE_ENABLED_BLOCKED = 4, 744 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5 745} RIL_PinState; 746 747typedef enum { 748 RIL_APPTYPE_UNKNOWN = 0, 749 RIL_APPTYPE_SIM = 1, 750 RIL_APPTYPE_USIM = 2, 751 RIL_APPTYPE_RUIM = 3, 752 RIL_APPTYPE_CSIM = 4, 753 RIL_APPTYPE_ISIM = 5 754} RIL_AppType; 755 756typedef struct 757{ 758 RIL_AppType app_type; 759 RIL_AppState app_state; 760 RIL_PersoSubstate perso_substate; /* applicable only if app_state == 761 RIL_APPSTATE_SUBSCRIPTION_PERSO */ 762 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41, 763 0x30, 0x30, 0x30 */ 764 char *app_label_ptr; /* null terminated string */ 765 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */ 766 RIL_PinState pin1; 767 RIL_PinState pin2; 768} RIL_AppStatus; 769 770/* Deprecated, use RIL_CardStatus_v6 */ 771typedef struct 772{ 773 RIL_CardState card_state; 774 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ 775 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 776 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 777 int num_applications; /* value <= RIL_CARD_MAX_APPS */ 778 RIL_AppStatus applications[RIL_CARD_MAX_APPS]; 779} RIL_CardStatus_v5; 780 781typedef struct 782{ 783 RIL_CardState card_state; 784 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ 785 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 786 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 787 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 788 int num_applications; /* value <= RIL_CARD_MAX_APPS */ 789 RIL_AppStatus applications[RIL_CARD_MAX_APPS]; 790} RIL_CardStatus_v6; 791 792/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH 793 * or as part of RIL_SimRefreshResponse_v7 794 */ 795typedef enum { 796 /* A file on SIM has been updated. data[1] contains the EFID. */ 797 SIM_FILE_UPDATE = 0, 798 /* SIM initialized. All files should be re-read. */ 799 SIM_INIT = 1, 800 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */ 801 SIM_RESET = 2 802} RIL_SimRefreshResult; 803 804typedef struct { 805 RIL_SimRefreshResult result; 806 int ef_id; /* is the EFID of the updated file if the result is */ 807 /* SIM_FILE_UPDATE or 0 for any other result. */ 808 char * aid; /* is AID(application ID) of the card application */ 809 /* See ETSI 102.221 8.1 and 101.220 4 */ 810 /* For SIM_FILE_UPDATE result it can be set to AID of */ 811 /* application in which updated EF resides or it can be */ 812 /* NULL if EF is outside of an application. */ 813 /* For SIM_INIT result this field is set to AID of */ 814 /* application that caused REFRESH */ 815 /* For SIM_RESET result it is NULL. */ 816} RIL_SimRefreshResponse_v7; 817 818/* Deprecated, use RIL_CDMA_CallWaiting_v6 */ 819typedef struct { 820 char * number; /* Remote party number */ 821 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ 822 char * name; /* Remote party name */ 823 RIL_CDMA_SignalInfoRecord signalInfoRecord; 824} RIL_CDMA_CallWaiting_v5; 825 826typedef struct { 827 char * number; /* Remote party number */ 828 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ 829 char * name; /* Remote party name */ 830 RIL_CDMA_SignalInfoRecord signalInfoRecord; 831 /* Number type/Number plan required to support International Call Waiting */ 832 int number_type; /* 0=Unknown, 1=International, 2=National, 833 3=Network specific, 4=subscriber */ 834 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */ 835} RIL_CDMA_CallWaiting_v6; 836 837/** 838 * Which types of Cell Broadcast Message (CBM) are to be received by the ME 839 * 840 * uFromServiceID - uToServiceID defines a range of CBM message identifiers 841 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS 842 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty 843 * CBM message ID. 844 * 845 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes 846 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS 847 * and 9.4.4.2.3 for UMTS. 848 * All other values can be treated as empty CBM data coding scheme. 849 * 850 * selected 0 means message types specified in <fromServiceId, toServiceId> 851 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted. 852 * 853 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and 854 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG. 855 */ 856typedef struct { 857 int fromServiceId; 858 int toServiceId; 859 int fromCodeScheme; 860 int toCodeScheme; 861 unsigned char selected; 862} RIL_GSM_BroadcastSmsConfigInfo; 863 864/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */ 865#define RIL_RESTRICTED_STATE_NONE 0x00 866/* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */ 867#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01 868/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */ 869#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02 870/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/ 871#define RIL_RESTRICTED_STATE_CS_ALL 0x04 872/* Block packet data access due to restriction. */ 873#define RIL_RESTRICTED_STATE_PS_ALL 0x10 874 875/* The status for an OTASP/OTAPA session */ 876typedef enum { 877 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED, 878 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED, 879 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED, 880 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED, 881 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED, 882 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED, 883 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED, 884 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED, 885 CDMA_OTA_PROVISION_STATUS_COMMITTED, 886 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED, 887 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED, 888 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED 889} RIL_CDMA_OTA_ProvisionStatus; 890 891typedef struct { 892 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 893 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ 894} RIL_GW_SignalStrength; 895 896typedef struct { 897 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 898 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ 899} RIL_SignalStrengthWcdma; 900 901typedef struct { 902 int dbm; /* Valid values are positive integers. This value is the actual RSSI value 903 * multiplied by -1. Example: If the actual RSSI is -75, then this response 904 * value will be 75. 905 */ 906 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied 907 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value 908 * will be 125. 909 */ 910} RIL_CDMA_SignalStrength; 911 912 913typedef struct { 914 int dbm; /* Valid values are positive integers. This value is the actual RSSI value 915 * multiplied by -1. Example: If the actual RSSI is -75, then this response 916 * value will be 75. 917 */ 918 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied 919 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value 920 * will be 125. 921 */ 922 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */ 923} RIL_EVDO_SignalStrength; 924 925typedef struct { 926 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 927 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1. 928 * Range: 44 to 140 dBm 929 * INT_MAX: 0x7FFFFFFF denotes invalid value. 930 * Reference: 3GPP TS 36.133 9.1.4 */ 931 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1. 932 * Range: 20 to 3 dB. 933 * INT_MAX: 0x7FFFFFFF denotes invalid value. 934 * Reference: 3GPP TS 36.133 9.1.7 */ 935 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units. 936 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). 937 * INT_MAX : 0x7FFFFFFF denotes invalid value. 938 * Reference: 3GPP TS 36.101 8.1.1 */ 939 int cqi; /* The current Channel Quality Indicator. 940 * Range: 0 to 15. 941 * INT_MAX : 0x7FFFFFFF denotes invalid value. 942 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */ 943} RIL_LTE_SignalStrength; 944 945typedef struct { 946 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 947 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1. 948 * Range: 44 to 140 dBm 949 * INT_MAX: 0x7FFFFFFF denotes invalid value. 950 * Reference: 3GPP TS 36.133 9.1.4 */ 951 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1. 952 * Range: 20 to 3 dB. 953 * INT_MAX: 0x7FFFFFFF denotes invalid value. 954 * Reference: 3GPP TS 36.133 9.1.7 */ 955 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units. 956 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). 957 * INT_MAX : 0x7FFFFFFF denotes invalid value. 958 * Reference: 3GPP TS 36.101 8.1.1 */ 959 int cqi; /* The current Channel Quality Indicator. 960 * Range: 0 to 15. 961 * INT_MAX : 0x7FFFFFFF denotes invalid value. 962 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */ 963 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device. 964 * Approximate distance can be calculated using 300m/us * timingAdvance. 965 * Range: 0 to 0x7FFFFFFE 966 * INT_MAX : 0x7FFFFFFF denotes invalid value. 967 * Reference: 3GPP 36.321 section 6.1.3.5 968 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */ 969} RIL_LTE_SignalStrength_v8; 970 971typedef struct { 972 int rscp; /* The Received Signal Code Power in dBm multipled by -1. 973 * Range : 25 to 120 974 * INT_MAX: 0x7FFFFFFF denotes invalid value. 975 * Reference: 3GPP TS 25.123, section 9.1.1.1 */ 976} RIL_TD_SCDMA_SignalStrength; 977 978/* Deprecated, use RIL_SignalStrength_v6 */ 979typedef struct { 980 RIL_GW_SignalStrength GW_SignalStrength; 981 RIL_CDMA_SignalStrength CDMA_SignalStrength; 982 RIL_EVDO_SignalStrength EVDO_SignalStrength; 983} RIL_SignalStrength_v5; 984 985typedef struct { 986 RIL_GW_SignalStrength GW_SignalStrength; 987 RIL_CDMA_SignalStrength CDMA_SignalStrength; 988 RIL_EVDO_SignalStrength EVDO_SignalStrength; 989 RIL_LTE_SignalStrength LTE_SignalStrength; 990} RIL_SignalStrength_v6; 991 992typedef struct { 993 RIL_GW_SignalStrength GW_SignalStrength; 994 RIL_CDMA_SignalStrength CDMA_SignalStrength; 995 RIL_EVDO_SignalStrength EVDO_SignalStrength; 996 RIL_LTE_SignalStrength_v8 LTE_SignalStrength; 997} RIL_SignalStrength_v8; 998 999typedef struct { 1000 RIL_GW_SignalStrength GW_SignalStrength; 1001 RIL_CDMA_SignalStrength CDMA_SignalStrength; 1002 RIL_EVDO_SignalStrength EVDO_SignalStrength; 1003 RIL_LTE_SignalStrength_v8 LTE_SignalStrength; 1004 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength; 1005} RIL_SignalStrength_v10; 1006 1007/** RIL_CellIdentityGsm */ 1008typedef struct { 1009 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1010 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ 1011 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 1012 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */ 1013} RIL_CellIdentityGsm; 1014 1015/** RIL_CellIdentityWcdma */ 1016typedef struct { 1017 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1018 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ 1019 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 1020 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ 1021 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */ 1022} RIL_CellIdentityWcdma; 1023 1024/** RIL_CellIdentityCdma */ 1025typedef struct { 1026 int networkId; /* Network Id 0..65535, INT_MAX if unknown */ 1027 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */ 1028 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */ 1029 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. 1030 * It is represented in units of 0.25 seconds and ranges from -2592000 1031 * to 2592000, both values inclusive (corresponding to a range of -180 1032 * to +180 degrees). INT_MAX if unknown */ 1033 1034 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. 1035 * It is represented in units of 0.25 seconds and ranges from -1296000 1036 * to 1296000, both values inclusive (corresponding to a range of -90 1037 * to +90 degrees). INT_MAX if unknown */ 1038} RIL_CellIdentityCdma; 1039 1040/** RIL_CellIdentityLte */ 1041typedef struct { 1042 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1043 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ 1044 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */ 1045 int pci; /* physical cell id 0..503, INT_MAX if unknown */ 1046 int tac; /* 16-bit tracking area code, INT_MAX if unknown */ 1047} RIL_CellIdentityLte; 1048 1049/** RIL_CellIdentityTdscdma */ 1050typedef struct { 1051 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1052 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ 1053 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 1054 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ 1055 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */ 1056} RIL_CellIdentityTdscdma; 1057 1058/** RIL_CellInfoGsm */ 1059typedef struct { 1060 RIL_CellIdentityGsm cellIdentityGsm; 1061 RIL_GW_SignalStrength signalStrengthGsm; 1062} RIL_CellInfoGsm; 1063 1064/** RIL_CellInfoWcdma */ 1065typedef struct { 1066 RIL_CellIdentityWcdma cellIdentityWcdma; 1067 RIL_SignalStrengthWcdma signalStrengthWcdma; 1068} RIL_CellInfoWcdma; 1069 1070/** RIL_CellInfoCdma */ 1071typedef struct { 1072 RIL_CellIdentityCdma cellIdentityCdma; 1073 RIL_CDMA_SignalStrength signalStrengthCdma; 1074 RIL_EVDO_SignalStrength signalStrengthEvdo; 1075} RIL_CellInfoCdma; 1076 1077/** RIL_CellInfoLte */ 1078typedef struct { 1079 RIL_CellIdentityLte cellIdentityLte; 1080 RIL_LTE_SignalStrength_v8 signalStrengthLte; 1081} RIL_CellInfoLte; 1082 1083/** RIL_CellInfoTdscdma */ 1084typedef struct { 1085 RIL_CellIdentityTdscdma cellIdentityTdscdma; 1086 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma; 1087} RIL_CellInfoTdscdma; 1088 1089// Must be the same as CellInfo.TYPE_XXX 1090typedef enum { 1091 RIL_CELL_INFO_TYPE_GSM = 1, 1092 RIL_CELL_INFO_TYPE_CDMA = 2, 1093 RIL_CELL_INFO_TYPE_LTE = 3, 1094 RIL_CELL_INFO_TYPE_WCDMA = 4, 1095 RIL_CELL_INFO_TYPE_TD_SCDMA = 5 1096} RIL_CellInfoType; 1097 1098// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX 1099typedef enum { 1100 RIL_TIMESTAMP_TYPE_UNKNOWN = 0, 1101 RIL_TIMESTAMP_TYPE_ANTENNA = 1, 1102 RIL_TIMESTAMP_TYPE_MODEM = 2, 1103 RIL_TIMESTAMP_TYPE_OEM_RIL = 3, 1104 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4, 1105} RIL_TimeStampType; 1106 1107typedef struct { 1108 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */ 1109 int registered; /* !0 if this cell is registered 0 if not registered */ 1110 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */ 1111 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */ 1112 union { 1113 RIL_CellInfoGsm gsm; 1114 RIL_CellInfoCdma cdma; 1115 RIL_CellInfoLte lte; 1116 RIL_CellInfoWcdma wcdma; 1117 RIL_CellInfoTdscdma tdscdma; 1118 } CellInfo; 1119} RIL_CellInfo; 1120 1121/* Names of the CDMA info records (C.S0005 section 3.7.5) */ 1122typedef enum { 1123 RIL_CDMA_DISPLAY_INFO_REC, 1124 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC, 1125 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC, 1126 RIL_CDMA_CONNECTED_NUMBER_INFO_REC, 1127 RIL_CDMA_SIGNAL_INFO_REC, 1128 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC, 1129 RIL_CDMA_LINE_CONTROL_INFO_REC, 1130 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC, 1131 RIL_CDMA_T53_CLIR_INFO_REC, 1132 RIL_CDMA_T53_RELEASE_INFO_REC, 1133 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC 1134} RIL_CDMA_InfoRecName; 1135 1136/* Display Info Rec as defined in C.S0005 section 3.7.5.1 1137 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16 1138 Note: the Extended Display info rec contains multiple records of the 1139 form: display_tag, display_len, and display_len occurrences of the 1140 chari field if the display_tag is not 10000000 or 10000001. 1141 To save space, the records are stored consecutively in a byte buffer. 1142 The display_tag, display_len and chari fields are all 1 byte. 1143*/ 1144 1145typedef struct { 1146 char alpha_len; 1147 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH]; 1148} RIL_CDMA_DisplayInfoRecord; 1149 1150/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2 1151 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3 1152 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4 1153*/ 1154 1155typedef struct { 1156 char len; 1157 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH]; 1158 char number_type; 1159 char number_plan; 1160 char pi; 1161 char si; 1162} RIL_CDMA_NumberInfoRecord; 1163 1164/* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */ 1165typedef enum { 1166 RIL_REDIRECTING_REASON_UNKNOWN = 0, 1167 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1, 1168 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2, 1169 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9, 1170 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10, 1171 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15, 1172 RIL_REDIRECTING_REASON_RESERVED 1173} RIL_CDMA_RedirectingReason; 1174 1175typedef struct { 1176 RIL_CDMA_NumberInfoRecord redirectingNumber; 1177 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */ 1178 RIL_CDMA_RedirectingReason redirectingReason; 1179} RIL_CDMA_RedirectingNumberInfoRecord; 1180 1181/* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */ 1182typedef struct { 1183 char lineCtrlPolarityIncluded; 1184 char lineCtrlToggle; 1185 char lineCtrlReverse; 1186 char lineCtrlPowerDenial; 1187} RIL_CDMA_LineControlInfoRecord; 1188 1189/* T53 CLIR Information Record */ 1190typedef struct { 1191 char cause; 1192} RIL_CDMA_T53_CLIRInfoRecord; 1193 1194/* T53 Audio Control Information Record */ 1195typedef struct { 1196 char upLink; 1197 char downLink; 1198} RIL_CDMA_T53_AudioControlInfoRecord; 1199 1200typedef struct { 1201 1202 RIL_CDMA_InfoRecName name; 1203 1204 union { 1205 /* Display and Extended Display Info Rec */ 1206 RIL_CDMA_DisplayInfoRecord display; 1207 1208 /* Called Party Number, Calling Party Number, Connected Number Info Rec */ 1209 RIL_CDMA_NumberInfoRecord number; 1210 1211 /* Signal Info Rec */ 1212 RIL_CDMA_SignalInfoRecord signal; 1213 1214 /* Redirecting Number Info Rec */ 1215 RIL_CDMA_RedirectingNumberInfoRecord redir; 1216 1217 /* Line Control Info Rec */ 1218 RIL_CDMA_LineControlInfoRecord lineCtrl; 1219 1220 /* T53 CLIR Info Rec */ 1221 RIL_CDMA_T53_CLIRInfoRecord clir; 1222 1223 /* T53 Audio Control Info Rec */ 1224 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl; 1225 } rec; 1226} RIL_CDMA_InformationRecord; 1227 1228#define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10 1229 1230typedef struct { 1231 char numberOfInfoRecs; 1232 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS]; 1233} RIL_CDMA_InformationRecords; 1234 1235/* See RIL_REQUEST_NV_READ_ITEM */ 1236typedef struct { 1237 RIL_NV_Item itemID; 1238} RIL_NV_ReadItem; 1239 1240/* See RIL_REQUEST_NV_WRITE_ITEM */ 1241typedef struct { 1242 RIL_NV_Item itemID; 1243 char * value; 1244} RIL_NV_WriteItem; 1245 1246typedef enum { 1247 HANDOVER_STARTED = 0, 1248 HANDOVER_COMPLETED = 1, 1249 HANDOVER_FAILED = 2, 1250 HANDOVER_CANCELED = 3 1251} RIL_SrvccState; 1252 1253/* hardware configuration reported to RILJ. */ 1254typedef enum { 1255 RIL_HARDWARE_CONFIG_MODEM = 0, 1256 RIL_HARDWARE_CONFIG_SIM = 1, 1257} RIL_HardwareConfig_Type; 1258 1259typedef enum { 1260 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0, 1261 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1, 1262 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2, 1263} RIL_HardwareConfig_State; 1264 1265typedef struct { 1266 int rilModel; 1267 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */ 1268 int maxVoice; 1269 int maxData; 1270 int maxStandby; 1271} RIL_HardwareConfig_Modem; 1272 1273typedef struct { 1274 char modemUuid[MAX_UUID_LENGTH]; 1275} RIL_HardwareConfig_Sim; 1276 1277typedef struct { 1278 RIL_HardwareConfig_Type type; 1279 char uuid[MAX_UUID_LENGTH]; 1280 RIL_HardwareConfig_State state; 1281 union { 1282 RIL_HardwareConfig_Modem modem; 1283 RIL_HardwareConfig_Sim sim; 1284 } cfg; 1285} RIL_HardwareConfig; 1286 1287typedef enum { 1288 SS_CFU, 1289 SS_CF_BUSY, 1290 SS_CF_NO_REPLY, 1291 SS_CF_NOT_REACHABLE, 1292 SS_CF_ALL, 1293 SS_CF_ALL_CONDITIONAL, 1294 SS_CLIP, 1295 SS_CLIR, 1296 SS_COLP, 1297 SS_COLR, 1298 SS_WAIT, 1299 SS_BAOC, 1300 SS_BAOIC, 1301 SS_BAOIC_EXC_HOME, 1302 SS_BAIC, 1303 SS_BAIC_ROAMING, 1304 SS_ALL_BARRING, 1305 SS_OUTGOING_BARRING, 1306 SS_INCOMING_BARRING 1307} RIL_SsServiceType; 1308 1309typedef enum { 1310 SS_ACTIVATION, 1311 SS_DEACTIVATION, 1312 SS_INTERROGATION, 1313 SS_REGISTRATION, 1314 SS_ERASURE 1315} RIL_SsRequestType; 1316 1317typedef enum { 1318 SS_ALL_TELE_AND_BEARER_SERVICES, 1319 SS_ALL_TELESEVICES, 1320 SS_TELEPHONY, 1321 SS_ALL_DATA_TELESERVICES, 1322 SS_SMS_SERVICES, 1323 SS_ALL_TELESERVICES_EXCEPT_SMS 1324} RIL_SsTeleserviceType; 1325 1326#define SS_INFO_MAX 4 1327#define NUM_SERVICE_CLASSES 7 1328 1329typedef struct { 1330 int numValidIndexes; /* This gives the number of valid values in cfInfo. 1331 For example if voice is forwarded to one number and data 1332 is forwarded to a different one then numValidIndexes will be 1333 2 indicating total number of valid values in cfInfo. 1334 Similarly if all the services are forwarded to the same 1335 number then the value of numValidIndexes will be 1. */ 1336 1337 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data 1338 for SS request to query call 1339 forward status. see 1340 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */ 1341} RIL_CfData; 1342 1343typedef struct { 1344 RIL_SsServiceType serviceType; 1345 RIL_SsRequestType requestType; 1346 RIL_SsTeleserviceType teleserviceType; 1347 int serviceClass; 1348 RIL_Errno result; 1349 1350 union { 1351 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET 1352 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns 1353 two ints, so first two values of ssInfo[] will be 1354 used for response if serviceType is SS_CLIR and 1355 requestType is SS_INTERROGATION */ 1356 1357 RIL_CfData cfData; 1358 }; 1359} RIL_StkCcUnsolSsResponse; 1360 1361/** 1362 * Data connection power state 1363 */ 1364typedef enum { 1365 RIL_DC_POWER_STATE_LOW = 1, // Low power state 1366 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state 1367 RIL_DC_POWER_STATE_HIGH = 3, // High power state 1368 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state 1369} RIL_DcPowerStates; 1370 1371/** 1372 * Data connection real time info 1373 */ 1374typedef struct { 1375 uint64_t time; // Time in nanos as returned by ril_nano_time 1376 RIL_DcPowerStates powerState; // Current power state 1377} RIL_DcRtInfo; 1378 1379/** 1380 * Data profile to modem 1381 */ 1382typedef struct { 1383 /* id of the data profile */ 1384 int profileId; 1385 /* the APN to connect to */ 1386 char* apn; 1387 /** one of the PDP_type values in TS 27.007 section 10.1.1. 1388 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 1389 */ 1390 char* protocol; 1391 /** authentication protocol used for this PDP context 1392 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) 1393 */ 1394 int authType; 1395 /* the username for APN, or NULL */ 1396 char* user; 1397 /* the password for APN, or NULL */ 1398 char* password; 1399 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */ 1400 int type; 1401 /* the period in seconds to limit the maximum connections */ 1402 int maxConnsTime; 1403 /* the maximum connections during maxConnsTime */ 1404 int maxConns; 1405 /** the required wait time in seconds after a successful UE initiated 1406 * disconnect of a given PDN connection before the device can send 1407 * a new PDN connection request for that given PDN 1408 */ 1409 int waitTime; 1410 /* true to enable the profile, 0 to disable, 1 to enable */ 1411 int enabled; 1412} RIL_DataProfileInfo; 1413 1414/* Tx Power Levels */ 1415typedef enum { 1416 RIL_TX_POWER_LEVEL_ONE = 0, 1417 RIL_TX_POWER_LEVEL_TWO = 1, 1418 RIL_TX_POWER_LEVEL_THREE = 2, 1419 RIL_TX_POWER_LEVEL_FOUR = 3, 1420 RIL_TX_POWER_LEVEL_FIVE = 4, 1421 RIL_TX_POWER_LEVEL_MAX = 5 1422} RIL_TxPowerLevel; 1423 1424typedef struct { 1425 1426 /* period (in ms) when modem is power collapsed */ 1427 uint32_t sleep_mode_time_ms; 1428 1429 /* period (in ms) when modem is awake and in idle mode*/ 1430 uint32_t idle_mode_time_ms; 1431 1432 /* period (in ms) for which Tx is active */ 1433 uint32_t tx_mode_time_ms[RIL_TX_POWER_LEVEL_MAX]; 1434 1435 /* period (in ms) for which Rx is active */ 1436 uint32_t rx_mode_time_ms; 1437} RIL_ActivityStatsInfo; 1438 1439/** 1440 * RIL_REQUEST_GET_SIM_STATUS 1441 * 1442 * Requests status of the SIM interface and the SIM card 1443 * 1444 * "data" is NULL 1445 * 1446 * "response" is const RIL_CardStatus_v6 * 1447 * 1448 * Valid errors: 1449 * Must never fail 1450 */ 1451#define RIL_REQUEST_GET_SIM_STATUS 1 1452 1453/** 1454 * RIL_REQUEST_ENTER_SIM_PIN 1455 * 1456 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state 1457 * 1458 * "data" is const char ** 1459 * ((const char **)data)[0] is PIN value 1460 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1461 * 1462 * "response" is int * 1463 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1464 * 1465 * Valid errors: 1466 * 1467 * SUCCESS 1468 * RADIO_NOT_AVAILABLE (radio resetting) 1469 * GENERIC_FAILURE 1470 * PASSWORD_INCORRECT 1471 */ 1472 1473#define RIL_REQUEST_ENTER_SIM_PIN 2 1474 1475/** 1476 * RIL_REQUEST_ENTER_SIM_PUK 1477 * 1478 * Supplies SIM PUK and new PIN. 1479 * 1480 * "data" is const char ** 1481 * ((const char **)data)[0] is PUK value 1482 * ((const char **)data)[1] is new PIN value 1483 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1484 * 1485 * "response" is int * 1486 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1487 * 1488 * Valid errors: 1489 * 1490 * SUCCESS 1491 * RADIO_NOT_AVAILABLE (radio resetting) 1492 * GENERIC_FAILURE 1493 * PASSWORD_INCORRECT 1494 * (PUK is invalid) 1495 */ 1496 1497#define RIL_REQUEST_ENTER_SIM_PUK 3 1498 1499/** 1500 * RIL_REQUEST_ENTER_SIM_PIN2 1501 * 1502 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was 1503 * returned as a a failure from a previous operation. 1504 * 1505 * "data" is const char ** 1506 * ((const char **)data)[0] is PIN2 value 1507 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1508 * 1509 * "response" is int * 1510 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1511 * 1512 * Valid errors: 1513 * 1514 * SUCCESS 1515 * RADIO_NOT_AVAILABLE (radio resetting) 1516 * GENERIC_FAILURE 1517 * PASSWORD_INCORRECT 1518 */ 1519 1520#define RIL_REQUEST_ENTER_SIM_PIN2 4 1521 1522/** 1523 * RIL_REQUEST_ENTER_SIM_PUK2 1524 * 1525 * Supplies SIM PUK2 and new PIN2. 1526 * 1527 * "data" is const char ** 1528 * ((const char **)data)[0] is PUK2 value 1529 * ((const char **)data)[1] is new PIN2 value 1530 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1531 * 1532 * "response" is int * 1533 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1534 * 1535 * Valid errors: 1536 * 1537 * SUCCESS 1538 * RADIO_NOT_AVAILABLE (radio resetting) 1539 * GENERIC_FAILURE 1540 * PASSWORD_INCORRECT 1541 * (PUK2 is invalid) 1542 */ 1543 1544#define RIL_REQUEST_ENTER_SIM_PUK2 5 1545 1546/** 1547 * RIL_REQUEST_CHANGE_SIM_PIN 1548 * 1549 * Supplies old SIM PIN and new PIN. 1550 * 1551 * "data" is const char ** 1552 * ((const char **)data)[0] is old PIN value 1553 * ((const char **)data)[1] is new PIN value 1554 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1555 * 1556 * "response" is int * 1557 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1558 * 1559 * Valid errors: 1560 * 1561 * SUCCESS 1562 * RADIO_NOT_AVAILABLE (radio resetting) 1563 * GENERIC_FAILURE 1564 * PASSWORD_INCORRECT 1565 * (old PIN is invalid) 1566 * 1567 */ 1568 1569#define RIL_REQUEST_CHANGE_SIM_PIN 6 1570 1571 1572/** 1573 * RIL_REQUEST_CHANGE_SIM_PIN2 1574 * 1575 * Supplies old SIM PIN2 and new PIN2. 1576 * 1577 * "data" is const char ** 1578 * ((const char **)data)[0] is old PIN2 value 1579 * ((const char **)data)[1] is new PIN2 value 1580 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1581 * 1582 * "response" is int * 1583 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1584 * 1585 * Valid errors: 1586 * 1587 * SUCCESS 1588 * RADIO_NOT_AVAILABLE (radio resetting) 1589 * GENERIC_FAILURE 1590 * PASSWORD_INCORRECT 1591 * (old PIN2 is invalid) 1592 * 1593 */ 1594 1595#define RIL_REQUEST_CHANGE_SIM_PIN2 7 1596 1597/** 1598 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 1599 * 1600 * Requests that network personlization be deactivated 1601 * 1602 * "data" is const char ** 1603 * ((const char **)(data))[0]] is network depersonlization code 1604 * 1605 * "response" is int * 1606 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 1607 * 1608 * Valid errors: 1609 * 1610 * SUCCESS 1611 * RADIO_NOT_AVAILABLE (radio resetting) 1612 * GENERIC_FAILURE 1613 * PASSWORD_INCORRECT 1614 * (code is invalid) 1615 */ 1616 1617#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8 1618 1619/** 1620 * RIL_REQUEST_GET_CURRENT_CALLS 1621 * 1622 * Requests current call list 1623 * 1624 * "data" is NULL 1625 * 1626 * "response" must be a "const RIL_Call **" 1627 * 1628 * Valid errors: 1629 * 1630 * SUCCESS 1631 * RADIO_NOT_AVAILABLE (radio resetting) 1632 * GENERIC_FAILURE 1633 * (request will be made again in a few hundred msec) 1634 */ 1635 1636#define RIL_REQUEST_GET_CURRENT_CALLS 9 1637 1638 1639/** 1640 * RIL_REQUEST_DIAL 1641 * 1642 * Initiate voice call 1643 * 1644 * "data" is const RIL_Dial * 1645 * "response" is NULL 1646 * 1647 * This method is never used for supplementary service codes 1648 * 1649 * Valid errors: 1650 * SUCCESS 1651 * RADIO_NOT_AVAILABLE (radio resetting) 1652 * DIAL_MODIFIED_TO_USSD 1653 * DIAL_MODIFIED_TO_SS 1654 * DIAL_MODIFIED_TO_DIAL 1655 * GENERIC_FAILURE 1656 */ 1657#define RIL_REQUEST_DIAL 10 1658 1659/** 1660 * RIL_REQUEST_GET_IMSI 1661 * 1662 * Get the SIM IMSI 1663 * 1664 * Only valid when radio state is "RADIO_STATE_ON" 1665 * 1666 * "data" is const char ** 1667 * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 1668 * "response" is a const char * containing the IMSI 1669 * 1670 * Valid errors: 1671 * SUCCESS 1672 * RADIO_NOT_AVAILABLE (radio resetting) 1673 * GENERIC_FAILURE 1674 */ 1675 1676#define RIL_REQUEST_GET_IMSI 11 1677 1678/** 1679 * RIL_REQUEST_HANGUP 1680 * 1681 * Hang up a specific line (like AT+CHLD=1x) 1682 * 1683 * After this HANGUP request returns, RIL should show the connection is NOT 1684 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. 1685 * 1686 * "data" is an int * 1687 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) 1688 * 1689 * "response" is NULL 1690 * 1691 * Valid errors: 1692 * SUCCESS 1693 * RADIO_NOT_AVAILABLE (radio resetting) 1694 * GENERIC_FAILURE 1695 */ 1696 1697#define RIL_REQUEST_HANGUP 12 1698 1699/** 1700 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 1701 * 1702 * Hang up waiting or held (like AT+CHLD=0) 1703 * 1704 * After this HANGUP request returns, RIL should show the connection is NOT 1705 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. 1706 * 1707 * "data" is NULL 1708 * "response" is NULL 1709 * 1710 * Valid errors: 1711 * SUCCESS 1712 * RADIO_NOT_AVAILABLE (radio resetting) 1713 * GENERIC_FAILURE 1714 */ 1715 1716#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13 1717 1718/** 1719 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 1720 * 1721 * Hang up waiting or held (like AT+CHLD=1) 1722 * 1723 * After this HANGUP request returns, RIL should show the connection is NOT 1724 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. 1725 * 1726 * "data" is NULL 1727 * "response" is NULL 1728 * 1729 * Valid errors: 1730 * SUCCESS 1731 * RADIO_NOT_AVAILABLE (radio resetting) 1732 * GENERIC_FAILURE 1733 */ 1734 1735#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14 1736 1737/** 1738 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 1739 * 1740 * Switch waiting or holding call and active call (like AT+CHLD=2) 1741 * 1742 * State transitions should be is follows: 1743 * 1744 * If call 1 is waiting and call 2 is active, then if this re 1745 * 1746 * BEFORE AFTER 1747 * Call 1 Call 2 Call 1 Call 2 1748 * ACTIVE HOLDING HOLDING ACTIVE 1749 * ACTIVE WAITING HOLDING ACTIVE 1750 * HOLDING WAITING HOLDING ACTIVE 1751 * ACTIVE IDLE HOLDING IDLE 1752 * IDLE IDLE IDLE IDLE 1753 * 1754 * "data" is NULL 1755 * "response" is NULL 1756 * 1757 * Valid errors: 1758 * SUCCESS 1759 * RADIO_NOT_AVAILABLE (radio resetting) 1760 * GENERIC_FAILURE 1761 */ 1762 1763#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15 1764#define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15 1765 1766/** 1767 * RIL_REQUEST_CONFERENCE 1768 * 1769 * Conference holding and active (like AT+CHLD=3) 1770 1771 * "data" is NULL 1772 * "response" is NULL 1773 * 1774 * Valid errors: 1775 * SUCCESS 1776 * RADIO_NOT_AVAILABLE (radio resetting) 1777 * GENERIC_FAILURE 1778 */ 1779#define RIL_REQUEST_CONFERENCE 16 1780 1781/** 1782 * RIL_REQUEST_UDUB 1783 * 1784 * Send UDUB (user determined used busy) to ringing or 1785 * waiting call answer)(RIL_BasicRequest r); 1786 * 1787 * "data" is NULL 1788 * "response" is NULL 1789 * 1790 * Valid errors: 1791 * SUCCESS 1792 * RADIO_NOT_AVAILABLE (radio resetting) 1793 * GENERIC_FAILURE 1794 */ 1795#define RIL_REQUEST_UDUB 17 1796 1797/** 1798 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE 1799 * 1800 * Requests the failure cause code for the most recently terminated call 1801 * 1802 * "data" is NULL 1803 * "response" is a "int *" 1804 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are 1805 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA 1806 * failure reasons are derived from the possible call failure scenarios 1807 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard. 1808 * 1809 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked 1810 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED) 1811 * 1812 * If the implementation does not have access to the exact cause codes, 1813 * then it should return one of the values listed in RIL_LastCallFailCause, 1814 * as the UI layer needs to distinguish these cases for tone generation or 1815 * error notification. 1816 * 1817 * Valid errors: 1818 * SUCCESS 1819 * RADIO_NOT_AVAILABLE 1820 * GENERIC_FAILURE 1821 * 1822 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 1823 */ 1824#define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18 1825 1826/** 1827 * RIL_REQUEST_SIGNAL_STRENGTH 1828 * 1829 * Requests current signal strength and associated information 1830 * 1831 * Must succeed if radio is on. 1832 * 1833 * "data" is NULL 1834 * 1835 * "response" is a const RIL_SignalStrength * 1836 * 1837 * Valid errors: 1838 * SUCCESS 1839 * RADIO_NOT_AVAILABLE 1840 */ 1841#define RIL_REQUEST_SIGNAL_STRENGTH 19 1842 1843/** 1844 * RIL_REQUEST_VOICE_REGISTRATION_STATE 1845 * 1846 * Request current registration state 1847 * 1848 * "data" is NULL 1849 * "response" is a "char **" 1850 * ((const char **)response)[0] is registration state 0-6, 1851 * 0 - Not registered, MT is not currently searching 1852 * a new operator to register 1853 * 1 - Registered, home network 1854 * 2 - Not registered, but MT is currently searching 1855 * a new operator to register 1856 * 3 - Registration denied 1857 * 4 - Unknown 1858 * 5 - Registered, roaming 1859 * 10 - Same as 0, but indicates that emergency calls 1860 * are enabled. 1861 * 12 - Same as 2, but indicates that emergency calls 1862 * are enabled. 1863 * 13 - Same as 3, but indicates that emergency calls 1864 * are enabled. 1865 * 14 - Same as 4, but indicates that emergency calls 1866 * are enabled. 1867 * 1868 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or 1869 * NULL if not.Valid LAC are 0x0000 - 0xffff 1870 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or 1871 * NULL if not. 1872 * Valid CID are 0x00000000 - 0xffffffff 1873 * In GSM, CID is Cell ID (see TS 27.007) 1874 * in 16 bits 1875 * In UMTS, CID is UMTS Cell Identity 1876 * (see TS 25.331) in 28 bits 1877 * ((const char **)response)[3] indicates the available voice radio technology, 1878 * valid values as defined by RIL_RadioTechnology. 1879 * ((const char **)response)[4] is Base Station ID if registered on a CDMA 1880 * system or NULL if not. Base Station ID in 1881 * decimal format 1882 * ((const char **)response)[5] is Base Station latitude if registered on a 1883 * CDMA system or NULL if not. Base Station 1884 * latitude is a decimal number as specified in 1885 * 3GPP2 C.S0005-A v6.0. It is represented in 1886 * units of 0.25 seconds and ranges from -1296000 1887 * to 1296000, both values inclusive (corresponding 1888 * to a range of -90 to +90 degrees). 1889 * ((const char **)response)[6] is Base Station longitude if registered on a 1890 * CDMA system or NULL if not. Base Station 1891 * longitude is a decimal number as specified in 1892 * 3GPP2 C.S0005-A v6.0. It is represented in 1893 * units of 0.25 seconds and ranges from -2592000 1894 * to 2592000, both values inclusive (corresponding 1895 * to a range of -180 to +180 degrees). 1896 * ((const char **)response)[7] is concurrent services support indicator if 1897 * registered on a CDMA system 0-1. 1898 * 0 - Concurrent services not supported, 1899 * 1 - Concurrent services supported 1900 * ((const char **)response)[8] is System ID if registered on a CDMA system or 1901 * NULL if not. Valid System ID are 0 - 32767 1902 * ((const char **)response)[9] is Network ID if registered on a CDMA system or 1903 * NULL if not. Valid System ID are 0 - 65535 1904 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered 1905 * on a CDMA or EVDO system or NULL if not. Valid values 1906 * are 0-255. 1907 * ((const char **)response)[11] indicates whether the current system is in the 1908 * PRL if registered on a CDMA or EVDO system or NULL if 1909 * not. 0=not in the PRL, 1=in the PRL 1910 * ((const char **)response)[12] is the default Roaming Indicator from the PRL, 1911 * if registered on a CDMA or EVDO system or NULL if not. 1912 * Valid values are 0-255. 1913 * ((const char **)response)[13] if registration state is 3 (Registration 1914 * denied) this is an enumerated reason why 1915 * registration was denied. See 3GPP TS 24.008, 1916 * 10.5.3.6 and Annex G. 1917 * 0 - General 1918 * 1 - Authentication Failure 1919 * 2 - IMSI unknown in HLR 1920 * 3 - Illegal MS 1921 * 4 - Illegal ME 1922 * 5 - PLMN not allowed 1923 * 6 - Location area not allowed 1924 * 7 - Roaming not allowed 1925 * 8 - No Suitable Cells in this Location Area 1926 * 9 - Network failure 1927 * 10 - Persistent location update reject 1928 * 11 - PLMN not allowed 1929 * 12 - Location area not allowed 1930 * 13 - Roaming not allowed in this Location Area 1931 * 15 - No Suitable Cells in this Location Area 1932 * 17 - Network Failure 1933 * 20 - MAC Failure 1934 * 21 - Sync Failure 1935 * 22 - Congestion 1936 * 23 - GSM Authentication unacceptable 1937 * 25 - Not Authorized for this CSG 1938 * 32 - Service option not supported 1939 * 33 - Requested service option not subscribed 1940 * 34 - Service option temporarily out of order 1941 * 38 - Call cannot be identified 1942 * 48-63 - Retry upon entry into a new cell 1943 * 95 - Semantically incorrect message 1944 * 96 - Invalid mandatory information 1945 * 97 - Message type non-existent or not implemented 1946 * 98 - Message not compatible with protocol state 1947 * 99 - Information element non-existent or not implemented 1948 * 100 - Conditional IE error 1949 * 101 - Message not compatible with protocol state 1950 * 111 - Protocol error, unspecified 1951 * ((const char **)response)[14] is the Primary Scrambling Code of the current 1952 * cell as described in TS 25.331, in hexadecimal 1953 * format, or NULL if unknown or not registered 1954 * to a UMTS network. 1955 * 1956 * Please note that registration state 4 ("unknown") is treated 1957 * as "out of service" in the Android telephony system 1958 * 1959 * Registration state 3 can be returned if Location Update Reject 1960 * (with cause 17 - Network Failure) is received repeatedly from the network, 1961 * to facilitate "managed roaming" 1962 * 1963 * Valid errors: 1964 * SUCCESS 1965 * RADIO_NOT_AVAILABLE 1966 * GENERIC_FAILURE 1967 */ 1968#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20 1969 1970/** 1971 * RIL_REQUEST_DATA_REGISTRATION_STATE 1972 * 1973 * Request current DATA registration state 1974 * 1975 * "data" is NULL 1976 * "response" is a "char **" 1977 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG 1978 * ((const char **)response)[1] is LAC if registered or NULL if not 1979 * ((const char **)response)[2] is CID if registered or NULL if not 1980 * ((const char **)response)[3] indicates the available data radio technology, 1981 * valid values as defined by RIL_RadioTechnology. 1982 * ((const char **)response)[4] if registration state is 3 (Registration 1983 * denied) this is an enumerated reason why 1984 * registration was denied. See 3GPP TS 24.008, 1985 * Annex G.6 "Additonal cause codes for GMM". 1986 * 7 == GPRS services not allowed 1987 * 8 == GPRS services and non-GPRS services not allowed 1988 * 9 == MS identity cannot be derived by the network 1989 * 10 == Implicitly detached 1990 * 14 == GPRS services not allowed in this PLMN 1991 * 16 == MSC temporarily not reachable 1992 * 40 == No PDP context activated 1993 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be 1994 * established using RIL_REQUEST_SETUP_DATA_CALL. 1995 * 1996 * The values at offsets 6..10 are optional LTE location information in decimal. 1997 * If a value is unknown that value may be NULL. If all values are NULL, 1998 * none need to be present. 1999 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code. 2000 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier. 2001 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier. 2002 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity. 2003 * ((const char **)response)[10] is TADV, a 6-bit timing advance value. 2004 * 2005 * LAC and CID are in hexadecimal format. 2006 * valid LAC are 0x0000 - 0xffff 2007 * valid CID are 0x00000000 - 0x0fffffff 2008 * 2009 * Please note that registration state 4 ("unknown") is treated 2010 * as "out of service" in the Android telephony system 2011 * 2012 * Valid errors: 2013 * SUCCESS 2014 * RADIO_NOT_AVAILABLE 2015 * GENERIC_FAILURE 2016 */ 2017#define RIL_REQUEST_DATA_REGISTRATION_STATE 21 2018 2019/** 2020 * RIL_REQUEST_OPERATOR 2021 * 2022 * Request current operator ONS or EONS 2023 * 2024 * "data" is NULL 2025 * "response" is a "const char **" 2026 * ((const char **)response)[0] is long alpha ONS or EONS 2027 * or NULL if unregistered 2028 * 2029 * ((const char **)response)[1] is short alpha ONS or EONS 2030 * or NULL if unregistered 2031 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC) 2032 * or NULL if unregistered 2033 * 2034 * Valid errors: 2035 * SUCCESS 2036 * RADIO_NOT_AVAILABLE 2037 * GENERIC_FAILURE 2038 */ 2039#define RIL_REQUEST_OPERATOR 22 2040 2041/** 2042 * RIL_REQUEST_RADIO_POWER 2043 * 2044 * Toggle radio on and off (for "airplane" mode) 2045 * If the radio is is turned off/on the radio modem subsystem 2046 * is expected return to an initialized state. For instance, 2047 * any voice and data calls will be terminated and all associated 2048 * lists emptied. 2049 * 2050 * "data" is int * 2051 * ((int *)data)[0] is > 0 for "Radio On" 2052 * ((int *)data)[0] is == 0 for "Radio Off" 2053 * 2054 * "response" is NULL 2055 * 2056 * Turn radio on if "on" > 0 2057 * Turn radio off if "on" == 0 2058 * 2059 * Valid errors: 2060 * SUCCESS 2061 * RADIO_NOT_AVAILABLE 2062 * GENERIC_FAILURE 2063 */ 2064#define RIL_REQUEST_RADIO_POWER 23 2065 2066/** 2067 * RIL_REQUEST_DTMF 2068 * 2069 * Send a DTMF tone 2070 * 2071 * If the implementation is currently playing a tone requested via 2072 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone 2073 * should be played instead 2074 * 2075 * "data" is a char * containing a single character with one of 12 values: 0-9,*,# 2076 * "response" is NULL 2077 * 2078 * FIXME should this block/mute microphone? 2079 * How does this interact with local DTMF feedback? 2080 * 2081 * Valid errors: 2082 * SUCCESS 2083 * RADIO_NOT_AVAILABLE 2084 * GENERIC_FAILURE 2085 * 2086 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START 2087 * 2088 */ 2089#define RIL_REQUEST_DTMF 24 2090 2091/** 2092 * RIL_REQUEST_SEND_SMS 2093 * 2094 * Send an SMS message 2095 * 2096 * "data" is const char ** 2097 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed 2098 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 2099 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string 2100 * less the SMSC address 2101 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" 2102 * 2103 * "response" is a const RIL_SMS_Response * 2104 * 2105 * Based on the return error, caller decides to resend if sending sms 2106 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) 2107 * and GENERIC_FAILURE means no retry (i.e. error cause is 500) 2108 * 2109 * Valid errors: 2110 * SUCCESS 2111 * RADIO_NOT_AVAILABLE 2112 * SMS_SEND_FAIL_RETRY 2113 * FDN_CHECK_FAILURE 2114 * GENERIC_FAILURE 2115 * 2116 * FIXME how do we specify TP-Message-Reference if we need to resend? 2117 */ 2118#define RIL_REQUEST_SEND_SMS 25 2119 2120 2121/** 2122 * RIL_REQUEST_SEND_SMS_EXPECT_MORE 2123 * 2124 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS, 2125 * except that more messages are expected to be sent soon. If possible, 2126 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command) 2127 * 2128 * "data" is const char ** 2129 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed 2130 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 2131 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string 2132 * less the SMSC address 2133 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" 2134 * 2135 * "response" is a const RIL_SMS_Response * 2136 * 2137 * Based on the return error, caller decides to resend if sending sms 2138 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) 2139 * and GENERIC_FAILURE means no retry (i.e. error cause is 500) 2140 * 2141 * Valid errors: 2142 * SUCCESS 2143 * RADIO_NOT_AVAILABLE 2144 * SMS_SEND_FAIL_RETRY 2145 * GENERIC_FAILURE 2146 * 2147 */ 2148#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26 2149 2150 2151/** 2152 * RIL_REQUEST_SETUP_DATA_CALL 2153 * 2154 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status 2155 * return success it is added to the list of data calls and a 2156 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the 2157 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the 2158 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST 2159 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED. 2160 * 2161 * The RIL is expected to: 2162 * - Create one data call context. 2163 * - Create and configure a dedicated interface for the context 2164 * - The interface must be point to point. 2165 * - The interface is configured with one or more addresses and 2166 * is capable of sending and receiving packets. The prefix length 2167 * of the addresses must be /32 for IPv4 and /128 for IPv6. 2168 * - Must NOT change the linux routing table. 2169 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5] 2170 * number of simultaneous data call contexts. 2171 * 2172 * "data" is a const char ** 2173 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2... 2174 * for values above 2 this is RIL_RadioTechnology + 2. 2175 * ((const char **)data)[1] is a RIL_DataProfile (support is optional) 2176 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will 2177 * override the one in the profile. NULL indicates no APN overrride. 2178 * ((const char **)data)[3] is the username for APN, or NULL 2179 * ((const char **)data)[4] is the password for APN, or NULL 2180 * ((const char **)data)[5] is the PAP / CHAP auth type. Values: 2181 * 0 => PAP and CHAP is never performed. 2182 * 1 => PAP may be performed; CHAP is never performed. 2183 * 2 => CHAP may be performed; PAP is never performed. 2184 * 3 => PAP / CHAP may be performed - baseband dependent. 2185 * ((const char **)data)[6] is the connection type to request must be one of the 2186 * PDP_type values in TS 27.007 section 10.1.1. 2187 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 2188 * ((const char **)data)[7] Optional connection property parameters, format to be defined. 2189 * 2190 * "response" is a RIL_Data_Call_Response_v11 2191 * 2192 * FIXME may need way to configure QoS settings 2193 * 2194 * Valid errors: 2195 * SUCCESS should be returned on both success and failure of setup with 2196 * the RIL_Data_Call_Response_v6.status containing the actual status. 2197 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored. 2198 * 2199 * Other errors could include: 2200 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW, 2201 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED. 2202 * 2203 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL 2204 */ 2205#define RIL_REQUEST_SETUP_DATA_CALL 27 2206 2207 2208/** 2209 * RIL_REQUEST_SIM_IO 2210 * 2211 * Request SIM I/O operation. 2212 * This is similar to the TS 27.007 "restricted SIM" operation 2213 * where it assumes all of the EF selection will be done by the 2214 * callee. 2215 * 2216 * "data" is a const RIL_SIM_IO_v6 * 2217 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL, 2218 * or may specify a PIN2 for operations that require a PIN2 (eg 2219 * updating FDN records) 2220 * 2221 * "response" is a const RIL_SIM_IO_Response * 2222 * 2223 * Arguments and responses that are unused for certain 2224 * values of "command" should be ignored or set to NULL 2225 * 2226 * Valid errors: 2227 * SUCCESS 2228 * RADIO_NOT_AVAILABLE 2229 * GENERIC_FAILURE 2230 * SIM_PIN2 2231 * SIM_PUK2 2232 */ 2233#define RIL_REQUEST_SIM_IO 28 2234 2235/** 2236 * RIL_REQUEST_SEND_USSD 2237 * 2238 * Send a USSD message 2239 * 2240 * If a USSD session already exists, the message should be sent in the 2241 * context of that session. Otherwise, a new session should be created. 2242 * 2243 * The network reply should be reported via RIL_UNSOL_ON_USSD 2244 * 2245 * Only one USSD session may exist at a time, and the session is assumed 2246 * to exist until: 2247 * a) The android system invokes RIL_REQUEST_CANCEL_USSD 2248 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code 2249 * of "0" (USSD-Notify/no further action) or "2" (session terminated) 2250 * 2251 * "data" is a const char * containing the USSD request in UTF-8 format 2252 * "response" is NULL 2253 * 2254 * Valid errors: 2255 * SUCCESS 2256 * RADIO_NOT_AVAILABLE 2257 * FDN_CHECK_FAILURE 2258 * USSD_MODIFIED_TO_DIAL 2259 * USSD_MODIFIED_TO_SS 2260 * USSD_MODIFIED_TO_USSD 2261 * GENERIC_FAILURE 2262 * 2263 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD 2264 */ 2265 2266#define RIL_REQUEST_SEND_USSD 29 2267 2268/** 2269 * RIL_REQUEST_CANCEL_USSD 2270 * 2271 * Cancel the current USSD session if one exists 2272 * 2273 * "data" is null 2274 * "response" is NULL 2275 * 2276 * Valid errors: 2277 * SUCCESS 2278 * RADIO_NOT_AVAILABLE 2279 * GENERIC_FAILURE 2280 */ 2281 2282#define RIL_REQUEST_CANCEL_USSD 30 2283 2284/** 2285 * RIL_REQUEST_GET_CLIR 2286 * 2287 * Gets current CLIR status 2288 * "data" is NULL 2289 * "response" is int * 2290 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 2291 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7 2292 * 2293 * Valid errors: 2294 * SUCCESS 2295 * RADIO_NOT_AVAILABLE 2296 * SS_MODIFIED_TO_DIAL 2297 * SS_MODIFIED_TO_USSD 2298 * SS_MODIFIED_TO_SS 2299 * GENERIC_FAILURE 2300 */ 2301#define RIL_REQUEST_GET_CLIR 31 2302 2303/** 2304 * RIL_REQUEST_SET_CLIR 2305 * 2306 * "data" is int * 2307 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 2308 * 2309 * "response" is NULL 2310 * 2311 * Valid errors: 2312 * SUCCESS 2313 * RADIO_NOT_AVAILABLE 2314 * SS_MODIFIED_TO_DIAL 2315 * SS_MODIFIED_TO_USSD 2316 * SS_MODIFIED_TO_SS 2317 * GENERIC_FAILURE 2318 */ 2319#define RIL_REQUEST_SET_CLIR 32 2320 2321/** 2322 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 2323 * 2324 * "data" is const RIL_CallForwardInfo * 2325 * 2326 * "response" is const RIL_CallForwardInfo ** 2327 * "response" points to an array of RIL_CallForwardInfo *'s, one for 2328 * each distinct registered phone number. 2329 * 2330 * For example, if data is forwarded to +18005551212 and voice is forwarded 2331 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned 2332 * 2333 * If, however, both data and voice are forwarded to +18005551212, then 2334 * a single RIL_CallForwardInfo can be returned with the service class 2335 * set to "data + voice = 3") 2336 * 2337 * Valid errors: 2338 * SUCCESS 2339 * RADIO_NOT_AVAILABLE 2340 * SS_MODIFIED_TO_DIAL 2341 * SS_MODIFIED_TO_USSD 2342 * SS_MODIFIED_TO_SS 2343 * GENERIC_FAILURE 2344 */ 2345#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33 2346 2347 2348/** 2349 * RIL_REQUEST_SET_CALL_FORWARD 2350 * 2351 * Configure call forward rule 2352 * 2353 * "data" is const RIL_CallForwardInfo * 2354 * "response" is NULL 2355 * 2356 * Valid errors: 2357 * SUCCESS 2358 * RADIO_NOT_AVAILABLE 2359 * SS_MODIFIED_TO_DIAL 2360 * SS_MODIFIED_TO_USSD 2361 * SS_MODIFIED_TO_SS 2362 * GENERIC_FAILURE 2363 */ 2364#define RIL_REQUEST_SET_CALL_FORWARD 34 2365 2366 2367/** 2368 * RIL_REQUEST_QUERY_CALL_WAITING 2369 * 2370 * Query current call waiting state 2371 * 2372 * "data" is const int * 2373 * ((const int *)data)[0] is the TS 27.007 service class to query. 2374 * "response" is a const int * 2375 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled" 2376 * 2377 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1] 2378 * must follow, with the TS 27.007 service class bit vector of services 2379 * for which call waiting is enabled. 2380 * 2381 * For example, if ((const int *)response)[0] is 1 and 2382 * ((const int *)response)[1] is 3, then call waiting is enabled for data 2383 * and voice and disabled for everything else 2384 * 2385 * Valid errors: 2386 * SUCCESS 2387 * RADIO_NOT_AVAILABLE 2388 * SS_MODIFIED_TO_DIAL 2389 * SS_MODIFIED_TO_USSD 2390 * SS_MODIFIED_TO_SS 2391 * GENERIC_FAILURE 2392 */ 2393#define RIL_REQUEST_QUERY_CALL_WAITING 35 2394 2395 2396/** 2397 * RIL_REQUEST_SET_CALL_WAITING 2398 * 2399 * Configure current call waiting state 2400 * 2401 * "data" is const int * 2402 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled" 2403 * ((const int *)data)[1] is the TS 27.007 service class bit vector of 2404 * services to modify 2405 * "response" is NULL 2406 * 2407 * Valid errors: 2408 * SUCCESS 2409 * RADIO_NOT_AVAILABLE 2410 * SS_MODIFIED_TO_DIAL 2411 * SS_MODIFIED_TO_USSD 2412 * SS_MODIFIED_TO_SS 2413 * GENERIC_FAILURE 2414 */ 2415#define RIL_REQUEST_SET_CALL_WAITING 36 2416 2417/** 2418 * RIL_REQUEST_SMS_ACKNOWLEDGE 2419 * 2420 * Acknowledge successful or failed receipt of SMS previously indicated 2421 * via RIL_UNSOL_RESPONSE_NEW_SMS 2422 * 2423 * "data" is int * 2424 * ((int *)data)[0] is 1 on successful receipt 2425 * (basically, AT+CNMA=1 from TS 27.005 2426 * is 0 on failed receipt 2427 * (basically, AT+CNMA=2 from TS 27.005) 2428 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined 2429 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory 2430 * capacity exceeded) and 0xFF (unspecified error) are 2431 * reported. 2432 * 2433 * "response" is NULL 2434 * 2435 * FIXME would like request that specified RP-ACK/RP-ERROR PDU 2436 * 2437 * Valid errors: 2438 * SUCCESS 2439 * RADIO_NOT_AVAILABLE 2440 * GENERIC_FAILURE 2441 */ 2442#define RIL_REQUEST_SMS_ACKNOWLEDGE 37 2443 2444/** 2445 * RIL_REQUEST_GET_IMEI - DEPRECATED 2446 * 2447 * Get the device IMEI, including check digit 2448 * 2449 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY 2450 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE 2451 * 2452 * "data" is NULL 2453 * "response" is a const char * containing the IMEI 2454 * 2455 * Valid errors: 2456 * SUCCESS 2457 * RADIO_NOT_AVAILABLE (radio resetting) 2458 * GENERIC_FAILURE 2459 */ 2460 2461#define RIL_REQUEST_GET_IMEI 38 2462 2463/** 2464 * RIL_REQUEST_GET_IMEISV - DEPRECATED 2465 * 2466 * Get the device IMEISV, which should be two decimal digits 2467 * 2468 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY 2469 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE 2470 * 2471 * "data" is NULL 2472 * "response" is a const char * containing the IMEISV 2473 * 2474 * Valid errors: 2475 * SUCCESS 2476 * RADIO_NOT_AVAILABLE (radio resetting) 2477 * GENERIC_FAILURE 2478 */ 2479 2480#define RIL_REQUEST_GET_IMEISV 39 2481 2482 2483/** 2484 * RIL_REQUEST_ANSWER 2485 * 2486 * Answer incoming call 2487 * 2488 * Will not be called for WAITING calls. 2489 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case 2490 * instead 2491 * 2492 * "data" is NULL 2493 * "response" is NULL 2494 * 2495 * Valid errors: 2496 * SUCCESS 2497 * RADIO_NOT_AVAILABLE (radio resetting) 2498 * GENERIC_FAILURE 2499 */ 2500 2501#define RIL_REQUEST_ANSWER 40 2502 2503/** 2504 * RIL_REQUEST_DEACTIVATE_DATA_CALL 2505 * 2506 * Deactivate packet data connection and remove from the 2507 * data call list if SUCCESS is returned. Any other return 2508 * values should also try to remove the call from the list, 2509 * but that may not be possible. In any event a 2510 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An 2511 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be 2512 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL. 2513 * 2514 * "data" is const char ** 2515 * ((char**)data)[0] indicating CID 2516 * ((char**)data)[1] indicating Disconnect Reason 2517 * 0 => No specific reason specified 2518 * 1 => Radio shutdown requested 2519 * 2520 * "response" is NULL 2521 * 2522 * Valid errors: 2523 * SUCCESS 2524 * RADIO_NOT_AVAILABLE 2525 * GENERIC_FAILURE 2526 * 2527 * See also: RIL_REQUEST_SETUP_DATA_CALL 2528 */ 2529#define RIL_REQUEST_DEACTIVATE_DATA_CALL 41 2530 2531/** 2532 * RIL_REQUEST_QUERY_FACILITY_LOCK 2533 * 2534 * Query the status of a facility lock state 2535 * 2536 * "data" is const char ** 2537 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4 2538 * (eg "AO" for BAOC, "SC" for SIM lock) 2539 * ((const char **)data)[1] is the password, or "" if not required 2540 * ((const char **)data)[2] is the TS 27.007 service class bit vector of 2541 * services to query 2542 * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 2543 * This is only applicable in the case of Fixed Dialing Numbers 2544 * (FDN) requests. 2545 * 2546 * "response" is an int * 2547 * ((const int *)response) 0 is the TS 27.007 service class bit vector of 2548 * services for which the specified barring facility 2549 * is active. "0" means "disabled for all" 2550 * 2551 * 2552 * Valid errors: 2553 * SUCCESS 2554 * RADIO_NOT_AVAILABLE 2555 * SS_MODIFIED_TO_DIAL 2556 * SS_MODIFIED_TO_USSD 2557 * SS_MODIFIED_TO_SS 2558 * GENERIC_FAILURE 2559 * 2560 */ 2561#define RIL_REQUEST_QUERY_FACILITY_LOCK 42 2562 2563/** 2564 * RIL_REQUEST_SET_FACILITY_LOCK 2565 * 2566 * Enable/disable one facility lock 2567 * 2568 * "data" is const char ** 2569 * 2570 * ((const char **)data)[0] = facility string code from TS 27.007 7.4 2571 * (eg "AO" for BAOC) 2572 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock" 2573 * ((const char **)data)[2] = password 2574 * ((const char **)data)[3] = string representation of decimal TS 27.007 2575 * service class bit vector. Eg, the string 2576 * "1" means "set this facility for voice services" 2577 * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 2578 * This is only applicable in the case of Fixed Dialing Numbers 2579 * (FDN) requests. 2580 * 2581 * "response" is int * 2582 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 2583 * 2584 * Valid errors: 2585 * SUCCESS 2586 * RADIO_NOT_AVAILABLE 2587 * SS_MODIFIED_TO_DIAL 2588 * SS_MODIFIED_TO_USSD 2589 * SS_MODIFIED_TO_SS 2590 * GENERIC_FAILURE 2591 * 2592 */ 2593#define RIL_REQUEST_SET_FACILITY_LOCK 43 2594 2595/** 2596 * RIL_REQUEST_CHANGE_BARRING_PASSWORD 2597 * 2598 * Change call barring facility password 2599 * 2600 * "data" is const char ** 2601 * 2602 * ((const char **)data)[0] = facility string code from TS 27.007 7.4 2603 * (eg "AO" for BAOC) 2604 * ((const char **)data)[1] = old password 2605 * ((const char **)data)[2] = new password 2606 * 2607 * "response" is NULL 2608 * 2609 * Valid errors: 2610 * SUCCESS 2611 * RADIO_NOT_AVAILABLE 2612 * SS_MODIFIED_TO_DIAL 2613 * SS_MODIFIED_TO_USSD 2614 * SS_MODIFIED_TO_SS 2615 * GENERIC_FAILURE 2616 * 2617 */ 2618#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44 2619 2620/** 2621 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 2622 * 2623 * Query current network selectin mode 2624 * 2625 * "data" is NULL 2626 * 2627 * "response" is int * 2628 * ((const int *)response)[0] is 2629 * 0 for automatic selection 2630 * 1 for manual selection 2631 * 2632 * Valid errors: 2633 * SUCCESS 2634 * RADIO_NOT_AVAILABLE 2635 * GENERIC_FAILURE 2636 * 2637 */ 2638#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45 2639 2640/** 2641 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 2642 * 2643 * Specify that the network should be selected automatically 2644 * 2645 * "data" is NULL 2646 * "response" is NULL 2647 * 2648 * This request must not respond until the new operator is selected 2649 * and registered 2650 * 2651 * Valid errors: 2652 * SUCCESS 2653 * RADIO_NOT_AVAILABLE 2654 * ILLEGAL_SIM_OR_ME 2655 * GENERIC_FAILURE 2656 * 2657 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and 2658 * no retries needed, such as illegal SIM or ME. 2659 * Returns GENERIC_FAILURE for all other causes that might be 2660 * fixed by retries. 2661 * 2662 */ 2663#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46 2664 2665/** 2666 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 2667 * 2668 * Manually select a specified network. 2669 * 2670 * "data" is const char * specifying MCCMNC of network to select (eg "310170") 2671 * "response" is NULL 2672 * 2673 * This request must not respond until the new operator is selected 2674 * and registered 2675 * 2676 * Valid errors: 2677 * SUCCESS 2678 * RADIO_NOT_AVAILABLE 2679 * ILLEGAL_SIM_OR_ME 2680 * GENERIC_FAILURE 2681 * 2682 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and 2683 * no retries needed, such as illegal SIM or ME. 2684 * Returns GENERIC_FAILURE for all other causes that might be 2685 * fixed by retries. 2686 * 2687 */ 2688#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47 2689 2690/** 2691 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 2692 * 2693 * Scans for available networks 2694 * 2695 * "data" is NULL 2696 * "response" is const char ** that should be an array of n*4 strings, where 2697 * n is the number of available networks 2698 * For each available network: 2699 * 2700 * ((const char **)response)[n+0] is long alpha ONS or EONS 2701 * ((const char **)response)[n+1] is short alpha ONS or EONS 2702 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC) 2703 * ((const char **)response)[n+3] is a string value of the status: 2704 * "unknown" 2705 * "available" 2706 * "current" 2707 * "forbidden" 2708 * 2709 * This request must not respond until the new operator is selected 2710 * and registered 2711 * 2712 * Valid errors: 2713 * SUCCESS 2714 * RADIO_NOT_AVAILABLE 2715 * GENERIC_FAILURE 2716 * 2717 */ 2718#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48 2719 2720/** 2721 * RIL_REQUEST_DTMF_START 2722 * 2723 * Start playing a DTMF tone. Continue playing DTMF tone until 2724 * RIL_REQUEST_DTMF_STOP is received 2725 * 2726 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing, 2727 * it should cancel the previous tone and play the new one. 2728 * 2729 * "data" is a char * 2730 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,# 2731 * "response" is NULL 2732 * 2733 * Valid errors: 2734 * SUCCESS 2735 * RADIO_NOT_AVAILABLE 2736 * GENERIC_FAILURE 2737 * 2738 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP 2739 */ 2740#define RIL_REQUEST_DTMF_START 49 2741 2742/** 2743 * RIL_REQUEST_DTMF_STOP 2744 * 2745 * Stop playing a currently playing DTMF tone. 2746 * 2747 * "data" is NULL 2748 * "response" is NULL 2749 * 2750 * Valid errors: 2751 * SUCCESS 2752 * RADIO_NOT_AVAILABLE 2753 * GENERIC_FAILURE 2754 * 2755 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START 2756 */ 2757#define RIL_REQUEST_DTMF_STOP 50 2758 2759/** 2760 * RIL_REQUEST_BASEBAND_VERSION 2761 * 2762 * Return string value indicating baseband version, eg 2763 * response from AT+CGMR 2764 * 2765 * "data" is NULL 2766 * "response" is const char * containing version string for log reporting 2767 * 2768 * Valid errors: 2769 * SUCCESS 2770 * RADIO_NOT_AVAILABLE 2771 * GENERIC_FAILURE 2772 * 2773 */ 2774#define RIL_REQUEST_BASEBAND_VERSION 51 2775 2776/** 2777 * RIL_REQUEST_SEPARATE_CONNECTION 2778 * 2779 * Separate a party from a multiparty call placing the multiparty call 2780 * (less the specified party) on hold and leaving the specified party 2781 * as the only other member of the current (active) call 2782 * 2783 * Like AT+CHLD=2x 2784 * 2785 * See TS 22.084 1.3.8.2 (iii) 2786 * TS 22.030 6.5.5 "Entering "2X followed by send" 2787 * TS 27.007 "AT+CHLD=2x" 2788 * 2789 * "data" is an int * 2790 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL 2791 * 2792 * "response" is NULL 2793 * 2794 * Valid errors: 2795 * SUCCESS 2796 * RADIO_NOT_AVAILABLE (radio resetting) 2797 * GENERIC_FAILURE 2798 */ 2799#define RIL_REQUEST_SEPARATE_CONNECTION 52 2800 2801 2802/** 2803 * RIL_REQUEST_SET_MUTE 2804 * 2805 * Turn on or off uplink (microphone) mute. 2806 * 2807 * Will only be sent while voice call is active. 2808 * Will always be reset to "disable mute" when a new voice call is initiated 2809 * 2810 * "data" is an int * 2811 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute" 2812 * 2813 * "response" is NULL 2814 * 2815 * Valid errors: 2816 * SUCCESS 2817 * RADIO_NOT_AVAILABLE (radio resetting) 2818 * GENERIC_FAILURE 2819 */ 2820 2821#define RIL_REQUEST_SET_MUTE 53 2822 2823/** 2824 * RIL_REQUEST_GET_MUTE 2825 * 2826 * Queries the current state of the uplink mute setting 2827 * 2828 * "data" is NULL 2829 * "response" is an int * 2830 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled" 2831 * 2832 * Valid errors: 2833 * SUCCESS 2834 * RADIO_NOT_AVAILABLE (radio resetting) 2835 * SS_MODIFIED_TO_DIAL 2836 * SS_MODIFIED_TO_USSD 2837 * SS_MODIFIED_TO_SS 2838 * GENERIC_FAILURE 2839 */ 2840 2841#define RIL_REQUEST_GET_MUTE 54 2842 2843/** 2844 * RIL_REQUEST_QUERY_CLIP 2845 * 2846 * Queries the status of the CLIP supplementary service 2847 * 2848 * (for MMI code "*#30#") 2849 * 2850 * "data" is NULL 2851 * "response" is an int * 2852 * (int *)response)[0] is 1 for "CLIP provisioned" 2853 * and 0 for "CLIP not provisioned" 2854 * and 2 for "unknown, e.g. no network etc" 2855 * 2856 * Valid errors: 2857 * SUCCESS 2858 * RADIO_NOT_AVAILABLE (radio resetting) 2859 * GENERIC_FAILURE 2860 */ 2861 2862#define RIL_REQUEST_QUERY_CLIP 55 2863 2864/** 2865 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status 2866 * field in RIL_Data_Call_Response_v6. 2867 * 2868 * Requests the failure cause code for the most recently failed PDP 2869 * context or CDMA data connection active 2870 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE 2871 * 2872 * "data" is NULL 2873 * 2874 * "response" is a "int *" 2875 * ((int *)response)[0] is an integer cause code defined in TS 24.008 2876 * section 6.1.3.1.3 or close approximation 2877 * 2878 * If the implementation does not have access to the exact cause codes, 2879 * then it should return one of the values listed in 2880 * RIL_DataCallFailCause, as the UI layer needs to distinguish these 2881 * cases for error notification 2882 * and potential retries. 2883 * 2884 * Valid errors: 2885 * SUCCESS 2886 * RADIO_NOT_AVAILABLE 2887 * GENERIC_FAILURE 2888 * 2889 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE 2890 * 2891 * Deprecated use the status field in RIL_Data_Call_Response_v6. 2892 */ 2893 2894#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56 2895 2896/** 2897 * RIL_REQUEST_DATA_CALL_LIST 2898 * 2899 * Returns the data call list. An entry is added when a 2900 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a 2901 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied 2902 * when RIL_REQUEST_RADIO_POWER off/on is issued. 2903 * 2904 * "data" is NULL 2905 * "response" is an array of RIL_Data_Call_Response_v6 2906 * 2907 * Valid errors: 2908 * SUCCESS 2909 * RADIO_NOT_AVAILABLE (radio resetting) 2910 * GENERIC_FAILURE 2911 * 2912 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED 2913 */ 2914 2915#define RIL_REQUEST_DATA_CALL_LIST 57 2916 2917/** 2918 * RIL_REQUEST_RESET_RADIO - DEPRECATED 2919 * 2920 * Request a radio reset. The RIL implementation may postpone 2921 * the reset until after this request is responded to if the baseband 2922 * is presently busy. 2923 * 2924 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER 2925 * 2926 * "data" is NULL 2927 * "response" is NULL 2928 * 2929 * Valid errors: 2930 * SUCCESS 2931 * RADIO_NOT_AVAILABLE (radio resetting) 2932 * GENERIC_FAILURE 2933 * REQUEST_NOT_SUPPORTED 2934 */ 2935 2936#define RIL_REQUEST_RESET_RADIO 58 2937 2938/** 2939 * RIL_REQUEST_OEM_HOOK_RAW 2940 * 2941 * This request reserved for OEM-specific uses. It passes raw byte arrays 2942 * back and forth. 2943 * 2944 * It can be invoked on the Java side from 2945 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw() 2946 * 2947 * "data" is a char * of bytes copied from the byte[] data argument in java 2948 * "response" is a char * of bytes that will returned via the 2949 * caller's "response" Message here: 2950 * (byte[])(((AsyncResult)response.obj).result) 2951 * 2952 * An error response here will result in 2953 * (((AsyncResult)response.obj).result) == null and 2954 * (((AsyncResult)response.obj).exception) being an instance of 2955 * com.android.internal.telephony.gsm.CommandException 2956 * 2957 * Valid errors: 2958 * All 2959 */ 2960 2961#define RIL_REQUEST_OEM_HOOK_RAW 59 2962 2963/** 2964 * RIL_REQUEST_OEM_HOOK_STRINGS 2965 * 2966 * This request reserved for OEM-specific uses. It passes strings 2967 * back and forth. 2968 * 2969 * It can be invoked on the Java side from 2970 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings() 2971 * 2972 * "data" is a const char **, representing an array of null-terminated UTF-8 2973 * strings copied from the "String[] strings" argument to 2974 * invokeOemRilRequestStrings() 2975 * 2976 * "response" is a const char **, representing an array of null-terminated UTF-8 2977 * stings that will be returned via the caller's response message here: 2978 * 2979 * (String[])(((AsyncResult)response.obj).result) 2980 * 2981 * An error response here will result in 2982 * (((AsyncResult)response.obj).result) == null and 2983 * (((AsyncResult)response.obj).exception) being an instance of 2984 * com.android.internal.telephony.gsm.CommandException 2985 * 2986 * Valid errors: 2987 * All 2988 */ 2989 2990#define RIL_REQUEST_OEM_HOOK_STRINGS 60 2991 2992/** 2993 * RIL_REQUEST_SCREEN_STATE 2994 * 2995 * Indicates the current state of the screen. When the screen is off, the 2996 * RIL should notify the baseband to suppress certain notifications (eg, 2997 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude) 2998 * in an effort to conserve power. These notifications should resume when the 2999 * screen is on. 3000 * 3001 * "data" is int * 3002 * ((int *)data)[0] is == 1 for "Screen On" 3003 * ((int *)data)[0] is == 0 for "Screen Off" 3004 * 3005 * "response" is NULL 3006 * 3007 * Valid errors: 3008 * SUCCESS 3009 * GENERIC_FAILURE 3010 */ 3011#define RIL_REQUEST_SCREEN_STATE 61 3012 3013 3014/** 3015 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 3016 * 3017 * Enables/disables supplementary service related notifications 3018 * from the network. 3019 * 3020 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION. 3021 * 3022 * "data" is int * 3023 * ((int *)data)[0] is == 1 for notifications enabled 3024 * ((int *)data)[0] is == 0 for notifications disabled 3025 * 3026 * "response" is NULL 3027 * 3028 * Valid errors: 3029 * SUCCESS 3030 * RADIO_NOT_AVAILABLE 3031 * GENERIC_FAILURE 3032 * 3033 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION. 3034 */ 3035#define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62 3036 3037/** 3038 * RIL_REQUEST_WRITE_SMS_TO_SIM 3039 * 3040 * Stores a SMS message to SIM memory. 3041 * 3042 * "data" is RIL_SMS_WriteArgs * 3043 * 3044 * "response" is int * 3045 * ((const int *)response)[0] is the record index where the message is stored. 3046 * 3047 * Valid errors: 3048 * SUCCESS 3049 * GENERIC_FAILURE 3050 * 3051 */ 3052#define RIL_REQUEST_WRITE_SMS_TO_SIM 63 3053 3054/** 3055 * RIL_REQUEST_DELETE_SMS_ON_SIM 3056 * 3057 * Deletes a SMS message from SIM memory. 3058 * 3059 * "data" is int * 3060 * ((int *)data)[0] is the record index of the message to delete. 3061 * 3062 * "response" is NULL 3063 * 3064 * Valid errors: 3065 * SUCCESS 3066 * GENERIC_FAILURE 3067 * 3068 */ 3069#define RIL_REQUEST_DELETE_SMS_ON_SIM 64 3070 3071/** 3072 * RIL_REQUEST_SET_BAND_MODE 3073 * 3074 * Assign a specified band for RF configuration. 3075 * 3076 * "data" is int * 3077 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically) 3078 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000) 3079 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900) 3080 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000) 3081 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000) 3082 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850) 3083 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)" 3084 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)" 3085 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)" 3086 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)" 3087 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)" 3088 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)" 3089 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)" 3090 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)" 3091 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)" 3092 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)" 3093 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)" 3094 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)" 3095 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)" 3096 * 3097 * "response" is NULL 3098 * 3099 * Valid errors: 3100 * SUCCESS 3101 * RADIO_NOT_AVAILABLE 3102 * GENERIC_FAILURE 3103 */ 3104#define RIL_REQUEST_SET_BAND_MODE 65 3105 3106/** 3107 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 3108 * 3109 * Query the list of band mode supported by RF. 3110 * 3111 * "data" is NULL 3112 * 3113 * "response" is int * 3114 * "response" points to an array of int's, the int[0] is the size of array, reset is one for 3115 * each available band mode. 3116 * 3117 * 0 for "unspecified" (selected by baseband automatically) 3118 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000) 3119 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900) 3120 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000) 3121 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000) 3122 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850) 3123 * 6 for "Cellular (800-MHz Band)" 3124 * 7 for "PCS (1900-MHz Band)" 3125 * 8 for "Band Class 3 (JTACS Band)" 3126 * 9 for "Band Class 4 (Korean PCS Band)" 3127 * 10 for "Band Class 5 (450-MHz Band)" 3128 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)" 3129 * 12 for "Band Class 7 (Upper 700-MHz Band)" 3130 * 13 for "Band Class 8 (1800-MHz Band)" 3131 * 14 for "Band Class 9 (900-MHz Band)" 3132 * 15 for "Band Class 10 (Secondary 800-MHz Band)" 3133 * 16 for "Band Class 11 (400-MHz European PAMR Band)" 3134 * 17 for "Band Class 15 (AWS Band)" 3135 * 18 for "Band Class 16 (US 2.5-GHz Band)" 3136 * 3137 * Valid errors: 3138 * SUCCESS 3139 * RADIO_NOT_AVAILABLE 3140 * GENERIC_FAILURE 3141 * 3142 * See also: RIL_REQUEST_SET_BAND_MODE 3143 */ 3144#define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66 3145 3146/** 3147 * RIL_REQUEST_STK_GET_PROFILE 3148 * 3149 * Requests the profile of SIM tool kit. 3150 * The profile indicates the SAT/USAT features supported by ME. 3151 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111 3152 * 3153 * "data" is NULL 3154 * 3155 * "response" is a const char * containing SAT/USAT profile 3156 * in hexadecimal format string starting with first byte of terminal profile 3157 * 3158 * Valid errors: 3159 * RIL_E_SUCCESS 3160 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 3161 * RIL_E_GENERIC_FAILURE 3162 */ 3163#define RIL_REQUEST_STK_GET_PROFILE 67 3164 3165/** 3166 * RIL_REQUEST_STK_SET_PROFILE 3167 * 3168 * Download the STK terminal profile as part of SIM initialization 3169 * procedure 3170 * 3171 * "data" is a const char * containing SAT/USAT profile 3172 * in hexadecimal format string starting with first byte of terminal profile 3173 * 3174 * "response" is NULL 3175 * 3176 * Valid errors: 3177 * RIL_E_SUCCESS 3178 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 3179 * RIL_E_GENERIC_FAILURE 3180 */ 3181#define RIL_REQUEST_STK_SET_PROFILE 68 3182 3183/** 3184 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 3185 * 3186 * Requests to send a SAT/USAT envelope command to SIM. 3187 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111 3188 * 3189 * "data" is a const char * containing SAT/USAT command 3190 * in hexadecimal format string starting with command tag 3191 * 3192 * "response" is a const char * containing SAT/USAT response 3193 * in hexadecimal format string starting with first byte of response 3194 * (May be NULL) 3195 * 3196 * Valid errors: 3197 * RIL_E_SUCCESS 3198 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 3199 * RIL_E_GENERIC_FAILURE 3200 */ 3201#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69 3202 3203/** 3204 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 3205 * 3206 * Requests to send a terminal response to SIM for a received 3207 * proactive command 3208 * 3209 * "data" is a const char * containing SAT/USAT response 3210 * in hexadecimal format string starting with first byte of response data 3211 * 3212 * "response" is NULL 3213 * 3214 * Valid errors: 3215 * RIL_E_SUCCESS 3216 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 3217 * RIL_E_GENERIC_FAILURE 3218 */ 3219#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70 3220 3221/** 3222 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 3223 * 3224 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has 3225 * been initialized by ME already. (We could see the call has been in the 'call 3226 * list') So, STK application needs to accept/reject the call according as user 3227 * operations. 3228 * 3229 * "data" is int * 3230 * ((int *)data)[0] is > 0 for "accept" the call setup 3231 * ((int *)data)[0] is == 0 for "reject" the call setup 3232 * 3233 * "response" is NULL 3234 * 3235 * Valid errors: 3236 * RIL_E_SUCCESS 3237 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 3238 * RIL_E_GENERIC_FAILURE 3239 */ 3240#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71 3241 3242/** 3243 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER 3244 * 3245 * Connects the two calls and disconnects the subscriber from both calls. 3246 * 3247 * "data" is NULL 3248 * "response" is NULL 3249 * 3250 * Valid errors: 3251 * SUCCESS 3252 * RADIO_NOT_AVAILABLE (radio resetting) 3253 * GENERIC_FAILURE 3254 */ 3255#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72 3256 3257/** 3258 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 3259 * 3260 * Requests to set the preferred network type for searching and registering 3261 * (CS/PS domain, RAT, and operation mode) 3262 * 3263 * "data" is int * which is RIL_PreferredNetworkType 3264 * 3265 * "response" is NULL 3266 * 3267 * Valid errors: 3268 * SUCCESS 3269 * RADIO_NOT_AVAILABLE (radio resetting) 3270 * GENERIC_FAILURE 3271 * MODE_NOT_SUPPORTED 3272 */ 3273#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73 3274 3275/** 3276 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 3277 * 3278 * Query the preferred network type (CS/PS domain, RAT, and operation mode) 3279 * for searching and registering 3280 * 3281 * "data" is NULL 3282 * 3283 * "response" is int * 3284 * ((int *)reponse)[0] is == RIL_PreferredNetworkType 3285 * 3286 * Valid errors: 3287 * SUCCESS 3288 * RADIO_NOT_AVAILABLE 3289 * GENERIC_FAILURE 3290 * 3291 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 3292 */ 3293#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74 3294 3295/** 3296 * RIL_REQUEST_NEIGHBORING_CELL_IDS 3297 * 3298 * Request neighboring cell id in GSM network 3299 * 3300 * "data" is NULL 3301 * "response" must be a " const RIL_NeighboringCell** " 3302 * 3303 * Valid errors: 3304 * SUCCESS 3305 * RADIO_NOT_AVAILABLE 3306 * GENERIC_FAILURE 3307 */ 3308#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75 3309 3310/** 3311 * RIL_REQUEST_SET_LOCATION_UPDATES 3312 * 3313 * Enables/disables network state change notifications due to changes in 3314 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA). 3315 * Basically +CREG=2 vs. +CREG=1 (TS 27.007). 3316 * 3317 * Note: The RIL implementation should default to "updates enabled" 3318 * when the screen is on and "updates disabled" when the screen is off. 3319 * 3320 * "data" is int * 3321 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2) 3322 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1) 3323 * 3324 * "response" is NULL 3325 * 3326 * Valid errors: 3327 * SUCCESS 3328 * RADIO_NOT_AVAILABLE 3329 * GENERIC_FAILURE 3330 * 3331 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 3332 */ 3333#define RIL_REQUEST_SET_LOCATION_UPDATES 76 3334 3335/** 3336 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 3337 * 3338 * Request to set the location where the CDMA subscription shall 3339 * be retrieved 3340 * 3341 * "data" is int * 3342 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource 3343 * 3344 * "response" is NULL 3345 * 3346 * Valid errors: 3347 * SUCCESS 3348 * RADIO_NOT_AVAILABLE 3349 * GENERIC_FAILURE 3350 * SIM_ABSENT 3351 * SUBSCRIPTION_NOT_AVAILABLE 3352 * 3353 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 3354 */ 3355#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77 3356 3357/** 3358 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 3359 * 3360 * Request to set the roaming preferences in CDMA 3361 * 3362 * "data" is int * 3363 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL 3364 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL 3365 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL 3366 * 3367 * "response" is NULL 3368 * 3369 * Valid errors: 3370 * SUCCESS 3371 * RADIO_NOT_AVAILABLE 3372 * GENERIC_FAILURE 3373 */ 3374#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78 3375 3376/** 3377 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 3378 * 3379 * Request the actual setting of the roaming preferences in CDMA in the modem 3380 * 3381 * "data" is NULL 3382 * 3383 * "response" is int * 3384 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL 3385 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL 3386 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL 3387 * 3388 * "response" is NULL 3389 * 3390 * Valid errors: 3391 * SUCCESS 3392 * RADIO_NOT_AVAILABLE 3393 * GENERIC_FAILURE 3394 */ 3395#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79 3396 3397/** 3398 * RIL_REQUEST_SET_TTY_MODE 3399 * 3400 * Request to set the TTY mode 3401 * 3402 * "data" is int * 3403 * ((int *)data)[0] is == 0 for TTY off 3404 * ((int *)data)[0] is == 1 for TTY Full 3405 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover) 3406 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover) 3407 * 3408 * "response" is NULL 3409 * 3410 * Valid errors: 3411 * SUCCESS 3412 * RADIO_NOT_AVAILABLE 3413 * GENERIC_FAILURE 3414 */ 3415#define RIL_REQUEST_SET_TTY_MODE 80 3416 3417/** 3418 * RIL_REQUEST_QUERY_TTY_MODE 3419 * 3420 * Request the setting of TTY mode 3421 * 3422 * "data" is NULL 3423 * 3424 * "response" is int * 3425 * ((int *)response)[0] is == 0 for TTY off 3426 * ((int *)response)[0] is == 1 for TTY Full 3427 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover) 3428 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover) 3429 * 3430 * "response" is NULL 3431 * 3432 * Valid errors: 3433 * SUCCESS 3434 * RADIO_NOT_AVAILABLE 3435 * GENERIC_FAILURE 3436 */ 3437#define RIL_REQUEST_QUERY_TTY_MODE 81 3438 3439/** 3440 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 3441 * 3442 * Request to set the preferred voice privacy mode used in voice 3443 * scrambling 3444 * 3445 * "data" is int * 3446 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) 3447 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) 3448 * 3449 * "response" is NULL 3450 * 3451 * Valid errors: 3452 * SUCCESS 3453 * RADIO_NOT_AVAILABLE 3454 * GENERIC_FAILURE 3455 */ 3456#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82 3457 3458/** 3459 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 3460 * 3461 * Request the setting of preferred voice privacy mode 3462 * 3463 * "data" is NULL 3464 * 3465 * "response" is int * 3466 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) 3467 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) 3468 * 3469 * "response" is NULL 3470 * 3471 * Valid errors: 3472 * SUCCESS 3473 * RADIO_NOT_AVAILABLE 3474 * GENERIC_FAILURE 3475 */ 3476#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83 3477 3478/** 3479 * RIL_REQUEST_CDMA_FLASH 3480 * 3481 * Send FLASH 3482 * 3483 * "data" is const char * 3484 * ((const char *)data)[0] is a FLASH string 3485 * 3486 * "response" is NULL 3487 * 3488 * Valid errors: 3489 * SUCCESS 3490 * RADIO_NOT_AVAILABLE 3491 * GENERIC_FAILURE 3492 * 3493 */ 3494#define RIL_REQUEST_CDMA_FLASH 84 3495 3496/** 3497 * RIL_REQUEST_CDMA_BURST_DTMF 3498 * 3499 * Send DTMF string 3500 * 3501 * "data" is const char ** 3502 * ((const char **)data)[0] is a DTMF string 3503 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use 3504 * default 3505 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use 3506 * default 3507 * 3508 * "response" is NULL 3509 * 3510 * Valid errors: 3511 * SUCCESS 3512 * RADIO_NOT_AVAILABLE 3513 * GENERIC_FAILURE 3514 * 3515 */ 3516#define RIL_REQUEST_CDMA_BURST_DTMF 85 3517 3518/** 3519 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 3520 * 3521 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum). 3522 * If the checksum is valid the 20 digit AKEY is written to NV, 3523 * replacing the existing AKEY no matter what it was before. 3524 * 3525 * "data" is const char * 3526 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9') 3527 * where the last 6 digits are a checksum of the 3528 * first 20, as specified in TR45.AHAG 3529 * "Common Cryptographic Algorithms, Revision D.1 3530 * Section 2.2" 3531 * 3532 * "response" is NULL 3533 * 3534 * Valid errors: 3535 * SUCCESS 3536 * RADIO_NOT_AVAILABLE 3537 * GENERIC_FAILURE 3538 * 3539 */ 3540#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86 3541 3542/** 3543 * RIL_REQUEST_CDMA_SEND_SMS 3544 * 3545 * Send a CDMA SMS message 3546 * 3547 * "data" is const RIL_CDMA_SMS_Message * 3548 * 3549 * "response" is a const RIL_SMS_Response * 3550 * 3551 * Based on the return error, caller decides to resend if sending sms 3552 * fails. The CDMA error class is derived as follows, 3553 * SUCCESS is error class 0 (no error) 3554 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure) 3555 * and GENERIC_FAILURE is error class 3 (permanent and no retry) 3556 * 3557 * Valid errors: 3558 * SUCCESS 3559 * RADIO_NOT_AVAILABLE 3560 * SMS_SEND_FAIL_RETRY 3561 * GENERIC_FAILURE 3562 * 3563 */ 3564#define RIL_REQUEST_CDMA_SEND_SMS 87 3565 3566/** 3567 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 3568 * 3569 * Acknowledge the success or failure in the receipt of SMS 3570 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 3571 * 3572 * "data" is const RIL_CDMA_SMS_Ack * 3573 * 3574 * "response" is NULL 3575 * 3576 * Valid errors: 3577 * SUCCESS 3578 * RADIO_NOT_AVAILABLE 3579 * GENERIC_FAILURE 3580 * 3581 */ 3582#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88 3583 3584/** 3585 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 3586 * 3587 * Request the setting of GSM/WCDMA Cell Broadcast SMS config. 3588 * 3589 * "data" is NULL 3590 * 3591 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo ** 3592 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *) 3593 * 3594 * Valid errors: 3595 * SUCCESS 3596 * RADIO_NOT_AVAILABLE 3597 * GENERIC_FAILURE 3598 * 3599 */ 3600#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89 3601 3602/** 3603 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 3604 * 3605 * Set GSM/WCDMA Cell Broadcast SMS config 3606 * 3607 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo ** 3608 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *) 3609 * 3610 * "response" is NULL 3611 * 3612 * Valid errors: 3613 * SUCCESS 3614 * RADIO_NOT_AVAILABLE 3615 * GENERIC_FAILURE 3616 * 3617 */ 3618#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90 3619 3620/** 3621 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 3622 * 3623* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS 3624 * 3625 * "data" is const int * 3626 * (const int *)data[0] indicates to activate or turn off the 3627 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1, 3628 * 0 - Activate, 1 - Turn off 3629 * 3630 * "response" is NULL 3631 * 3632 * Valid errors: 3633 * SUCCESS 3634 * RADIO_NOT_AVAILABLE 3635 * GENERIC_FAILURE 3636 * 3637 */ 3638#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91 3639 3640/** 3641 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 3642 * 3643 * Request the setting of CDMA Broadcast SMS config 3644 * 3645 * "data" is NULL 3646 * 3647 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo ** 3648 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *) 3649 * 3650 * Valid errors: 3651 * SUCCESS 3652 * RADIO_NOT_AVAILABLE 3653 * GENERIC_FAILURE 3654 * 3655 */ 3656#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92 3657 3658/** 3659 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 3660 * 3661 * Set CDMA Broadcast SMS config 3662 * 3663 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo ** 3664 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *) 3665 * 3666 * "response" is NULL 3667 * 3668 * Valid errors: 3669 * SUCCESS 3670 * RADIO_NOT_AVAILABLE 3671 * GENERIC_FAILURE 3672 * 3673 */ 3674#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93 3675 3676/** 3677 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 3678 * 3679 * Enable or disable the reception of CDMA Broadcast SMS 3680 * 3681 * "data" is const int * 3682 * (const int *)data[0] indicates to activate or turn off the 3683 * reception of CDMA Broadcast SMS, 0-1, 3684 * 0 - Activate, 1 - Turn off 3685 * 3686 * "response" is NULL 3687 * 3688 * Valid errors: 3689 * SUCCESS 3690 * RADIO_NOT_AVAILABLE 3691 * GENERIC_FAILURE 3692 * 3693 */ 3694#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94 3695 3696/** 3697 * RIL_REQUEST_CDMA_SUBSCRIPTION 3698 * 3699 * Request the device MDN / H_SID / H_NID. 3700 * 3701 * The request is only allowed when CDMA subscription is available. When CDMA 3702 * subscription is changed, application layer should re-issue the request to 3703 * update the subscription information. 3704 * 3705 * If a NULL value is returned for any of the device id, it means that error 3706 * accessing the device. 3707 * 3708 * "response" is const char ** 3709 * ((const char **)response)[0] is MDN if CDMA subscription is available 3710 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if 3711 * CDMA subscription is available, in decimal format 3712 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if 3713 * CDMA subscription is available, in decimal format 3714 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available 3715 * ((const char **)response)[4] is PRL version if CDMA subscription is available 3716 * 3717 * Valid errors: 3718 * SUCCESS 3719 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE 3720 */ 3721 3722#define RIL_REQUEST_CDMA_SUBSCRIPTION 95 3723 3724/** 3725 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 3726 * 3727 * Stores a CDMA SMS message to RUIM memory. 3728 * 3729 * "data" is RIL_CDMA_SMS_WriteArgs * 3730 * 3731 * "response" is int * 3732 * ((const int *)response)[0] is the record index where the message is stored. 3733 * 3734 * Valid errors: 3735 * SUCCESS 3736 * RADIO_NOT_AVAILABLE 3737 * GENERIC_FAILURE 3738 * 3739 */ 3740#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96 3741 3742/** 3743 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 3744 * 3745 * Deletes a CDMA SMS message from RUIM memory. 3746 * 3747 * "data" is int * 3748 * ((int *)data)[0] is the record index of the message to delete. 3749 * 3750 * "response" is NULL 3751 * 3752 * Valid errors: 3753 * SUCCESS 3754 * RADIO_NOT_AVAILABLE 3755 * GENERIC_FAILURE 3756 * 3757 */ 3758#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97 3759 3760/** 3761 * RIL_REQUEST_DEVICE_IDENTITY 3762 * 3763 * Request the device ESN / MEID / IMEI / IMEISV. 3764 * 3765 * The request is always allowed and contains GSM and CDMA device identity; 3766 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and 3767 * RIL_REQUEST_GET_IMEISV. 3768 * 3769 * If a NULL value is returned for any of the device id, it means that error 3770 * accessing the device. 3771 * 3772 * When CDMA subscription is changed the ESN/MEID may change. The application 3773 * layer should re-issue the request to update the device identity in this case. 3774 * 3775 * "response" is const char ** 3776 * ((const char **)response)[0] is IMEI if GSM subscription is available 3777 * ((const char **)response)[1] is IMEISV if GSM subscription is available 3778 * ((const char **)response)[2] is ESN if CDMA subscription is available 3779 * ((const char **)response)[3] is MEID if CDMA subscription is available 3780 * 3781 * Valid errors: 3782 * SUCCESS 3783 * RADIO_NOT_AVAILABLE 3784 * GENERIC_FAILURE 3785 */ 3786#define RIL_REQUEST_DEVICE_IDENTITY 98 3787 3788/** 3789 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 3790 * 3791 * Request the radio's system selection module to exit emergency 3792 * callback mode. RIL will not respond with SUCCESS until the modem has 3793 * completely exited from Emergency Callback Mode. 3794 * 3795 * "data" is NULL 3796 * 3797 * "response" is NULL 3798 * 3799 * Valid errors: 3800 * SUCCESS 3801 * RADIO_NOT_AVAILABLE 3802 * GENERIC_FAILURE 3803 * 3804 */ 3805#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99 3806 3807/** 3808 * RIL_REQUEST_GET_SMSC_ADDRESS 3809 * 3810 * Queries the default Short Message Service Center address on the device. 3811 * 3812 * "data" is NULL 3813 * 3814 * "response" is const char * containing the SMSC address. 3815 * 3816 * Valid errors: 3817 * SUCCESS 3818 * RADIO_NOT_AVAILABLE 3819 * GENERIC_FAILURE 3820 * 3821 */ 3822#define RIL_REQUEST_GET_SMSC_ADDRESS 100 3823 3824/** 3825 * RIL_REQUEST_SET_SMSC_ADDRESS 3826 * 3827 * Sets the default Short Message Service Center address on the device. 3828 * 3829 * "data" is const char * containing the SMSC address. 3830 * 3831 * "response" is NULL 3832 * 3833 * Valid errors: 3834 * SUCCESS 3835 * RADIO_NOT_AVAILABLE 3836 * GENERIC_FAILURE 3837 * 3838 */ 3839#define RIL_REQUEST_SET_SMSC_ADDRESS 101 3840 3841/** 3842 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 3843 * 3844 * Indicates whether there is storage available for new SMS messages. 3845 * 3846 * "data" is int * 3847 * ((int *)data)[0] is 1 if memory is available for storing new messages 3848 * is 0 if memory capacity is exceeded 3849 * 3850 * "response" is NULL 3851 * 3852 * Valid errors: 3853 * SUCCESS 3854 * RADIO_NOT_AVAILABLE 3855 * GENERIC_FAILURE 3856 * 3857 */ 3858#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102 3859 3860/** 3861 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 3862 * 3863 * Indicates that the StkSerivce is running and is 3864 * ready to receive RIL_UNSOL_STK_XXXXX commands. 3865 * 3866 * "data" is NULL 3867 * "response" is NULL 3868 * 3869 * Valid errors: 3870 * SUCCESS 3871 * RADIO_NOT_AVAILABLE 3872 * GENERIC_FAILURE 3873 * 3874 */ 3875#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103 3876 3877/** 3878 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 3879 * 3880 * Request to query the location where the CDMA subscription shall 3881 * be retrieved 3882 * 3883 * "data" is NULL 3884 * 3885 * "response" is int * 3886 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource 3887 * 3888 * Valid errors: 3889 * SUCCESS 3890 * RADIO_NOT_AVAILABLE 3891 * GENERIC_FAILURE 3892 * SUBSCRIPTION_NOT_AVAILABLE 3893 * 3894 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 3895 */ 3896#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104 3897 3898/** 3899 * RIL_REQUEST_ISIM_AUTHENTICATION 3900 * 3901 * Request the ISIM application on the UICC to perform AKA 3902 * challenge/response algorithm for IMS authentication 3903 * 3904 * "data" is a const char * containing the challenge string in Base64 format 3905 * "response" is a const char * containing the response in Base64 format 3906 * 3907 * Valid errors: 3908 * SUCCESS 3909 * RADIO_NOT_AVAILABLE 3910 * GENERIC_FAILURE 3911 */ 3912#define RIL_REQUEST_ISIM_AUTHENTICATION 105 3913 3914/** 3915 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 3916 * 3917 * Acknowledge successful or failed receipt of SMS previously indicated 3918 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send 3919 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU. 3920 * 3921 * "data" is const char ** 3922 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK) 3923 * is "0" on failed receipt (send RP-ERROR) 3924 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format 3925 * 3926 * "response" is NULL 3927 * 3928 * Valid errors: 3929 * SUCCESS 3930 * RADIO_NOT_AVAILABLE 3931 * GENERIC_FAILURE 3932 */ 3933#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106 3934 3935/** 3936 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 3937 * 3938 * Requests to send a SAT/USAT envelope command to SIM. 3939 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111. 3940 * 3941 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND: 3942 * the SW1 and SW2 status bytes from the UICC response are returned along with 3943 * the response data, using the same structure as RIL_REQUEST_SIM_IO. 3944 * 3945 * The RIL implementation shall perform the normal processing of a '91XX' 3946 * response in SW1/SW2 to retrieve the pending proactive command and send it 3947 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does. 3948 * 3949 * "data" is a const char * containing the SAT/USAT command 3950 * in hexadecimal format starting with command tag 3951 * 3952 * "response" is a const RIL_SIM_IO_Response * 3953 * 3954 * Valid errors: 3955 * RIL_E_SUCCESS 3956 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 3957 * RIL_E_GENERIC_FAILURE 3958 */ 3959#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107 3960 3961/** 3962 * RIL_REQUEST_VOICE_RADIO_TECH 3963 * 3964 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only 3965 * when radio state is RADIO_STATE_ON 3966 * 3967 * "data" is NULL 3968 * "response" is int * 3969 * ((int *) response)[0] is of type const RIL_RadioTechnology 3970 * 3971 * Valid errors: 3972 * SUCCESS 3973 * RADIO_NOT_AVAILABLE 3974 * GENERIC_FAILURE 3975 */ 3976#define RIL_REQUEST_VOICE_RADIO_TECH 108 3977 3978/** 3979 * RIL_REQUEST_GET_CELL_INFO_LIST 3980 * 3981 * Request all of the current cell information known to the radio. The radio 3982 * must a list of all current cells, including the neighboring cells. If for a particular 3983 * cell information isn't known then the appropriate unknown value will be returned. 3984 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST. 3985 * 3986 * "data" is NULL 3987 * 3988 * "response" is an array of RIL_CellInfo. 3989 */ 3990#define RIL_REQUEST_GET_CELL_INFO_LIST 109 3991 3992/** 3993 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 3994 * 3995 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked. 3996 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported 3997 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue 3998 * a RIL_UNSOL_CELL_INFO_LIST. 3999 * 4000 * "data" is int * 4001 * ((int *)data)[0] is minimum time in milliseconds 4002 * 4003 * "response" is NULL 4004 * 4005 * Valid errors: 4006 * SUCCESS 4007 * RADIO_NOT_AVAILABLE 4008 * GENERIC_FAILURE 4009 */ 4010#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110 4011 4012/** 4013 * RIL_REQUEST_SET_INITIAL_ATTACH_APN 4014 * 4015 * Set an apn to initial attach network 4016 * "response" is NULL 4017 * 4018 * Valid errors: 4019 * SUCCESS 4020 * RADIO_NOT_AVAILABLE (radio resetting) 4021 * GENERIC_FAILURE 4022 * SUBSCRIPTION_NOT_AVAILABLE 4023 */ 4024#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111 4025 4026/** 4027 * RIL_REQUEST_IMS_REGISTRATION_STATE 4028 * 4029 * Request current IMS registration state 4030 * 4031 * "data" is NULL 4032 * 4033 * "response" is int * 4034 * ((int *)response)[0] is registration state: 4035 * 0 - Not registered 4036 * 1 - Registered 4037 * 4038 * If ((int*)response)[0] is = 1, then ((int *) response)[1] 4039 * must follow with IMS SMS format: 4040 * 4041 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily 4042 * 4043 * Valid errors: 4044 * SUCCESS 4045 * RADIO_NOT_AVAILABLE 4046 * GENERIC_FAILURE 4047 */ 4048#define RIL_REQUEST_IMS_REGISTRATION_STATE 112 4049 4050/** 4051 * RIL_REQUEST_IMS_SEND_SMS 4052 * 4053 * Send a SMS message over IMS 4054 * 4055 * "data" is const RIL_IMS_SMS_Message * 4056 * 4057 * "response" is a const RIL_SMS_Response * 4058 * 4059 * Based on the return error, caller decides to resend if sending sms 4060 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry. 4061 * In case of retry, data is encoded based on Voice Technology available. 4062 * 4063 * Valid errors: 4064 * SUCCESS 4065 * RADIO_NOT_AVAILABLE 4066 * SMS_SEND_FAIL_RETRY 4067 * FDN_CHECK_FAILURE 4068 * GENERIC_FAILURE 4069 * 4070 */ 4071#define RIL_REQUEST_IMS_SEND_SMS 113 4072 4073/** 4074 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 4075 * 4076 * Request APDU exchange on the basic channel. This command reflects TS 27.007 4077 * "generic SIM access" operation (+CSIM). The modem must ensure proper function 4078 * of GSM/CDMA, and filter commands appropriately. It should filter 4079 * channel management and SELECT by DF name commands. 4080 * 4081 * "data" is a const RIL_SIM_APDU * 4082 * "sessionid" field should be ignored. 4083 * 4084 * "response" is a const RIL_SIM_IO_Response * 4085 * 4086 * Valid errors: 4087 * SUCCESS 4088 * RADIO_NOT_AVAILABLE 4089 * GENERIC_FAILURE 4090 */ 4091#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114 4092 4093/** 4094 * RIL_REQUEST_SIM_OPEN_CHANNEL 4095 * 4096 * Open a new logical channel and select the given application. This command 4097 * reflects TS 27.007 "open logical channel" operation (+CCHO). 4098 * 4099 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220. 4100 * 4101 * "response" is int * 4102 * ((int *)data)[0] contains the session id of the logical channel. 4103 * ((int *)data)[1] onwards may optionally contain the select response for the 4104 * open channel command with one byte per integer. 4105 * 4106 * Valid errors: 4107 * SUCCESS 4108 * RADIO_NOT_AVAILABLE 4109 * GENERIC_FAILURE 4110 * MISSING_RESOURCE 4111 * NO_SUCH_ELEMENT 4112 */ 4113#define RIL_REQUEST_SIM_OPEN_CHANNEL 115 4114 4115/** 4116 * RIL_REQUEST_SIM_CLOSE_CHANNEL 4117 * 4118 * Close a previously opened logical channel. This command reflects TS 27.007 4119 * "close logical channel" operation (+CCHC). 4120 * 4121 * "data" is int * 4122 * ((int *)data)[0] is the session id of logical the channel to close. 4123 * 4124 * "response" is NULL 4125 * 4126 * Valid errors: 4127 * SUCCESS 4128 * RADIO_NOT_AVAILABLE 4129 * GENERIC_FAILURE 4130 */ 4131#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116 4132 4133/** 4134 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 4135 * 4136 * Exchange APDUs with a UICC over a previously opened logical channel. This 4137 * command reflects TS 27.007 "generic logical channel access" operation 4138 * (+CGLA). The modem should filter channel management and SELECT by DF name 4139 * commands. 4140 * 4141 * "data" is a const RIL_SIM_APDU* 4142 * 4143 * "response" is a const RIL_SIM_IO_Response * 4144 * 4145 * Valid errors: 4146 * SUCCESS 4147 * RADIO_NOT_AVAILABLE 4148 * GENERIC_FAILURE 4149 */ 4150#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117 4151 4152/** 4153 * RIL_REQUEST_NV_READ_ITEM 4154 * 4155 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h. 4156 * This is used for device configuration by some CDMA operators. 4157 * 4158 * "data" is a const RIL_NV_ReadItem * 4159 * 4160 * "response" is const char * containing the contents of the NV item 4161 * 4162 * Valid errors: 4163 * SUCCESS 4164 * RADIO_NOT_AVAILABLE 4165 * GENERIC_FAILURE 4166 */ 4167#define RIL_REQUEST_NV_READ_ITEM 118 4168 4169/** 4170 * RIL_REQUEST_NV_WRITE_ITEM 4171 * 4172 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h. 4173 * This is used for device configuration by some CDMA operators. 4174 * 4175 * "data" is a const RIL_NV_WriteItem * 4176 * 4177 * "response" is NULL 4178 * 4179 * Valid errors: 4180 * SUCCESS 4181 * RADIO_NOT_AVAILABLE 4182 * GENERIC_FAILURE 4183 */ 4184#define RIL_REQUEST_NV_WRITE_ITEM 119 4185 4186/** 4187 * RIL_REQUEST_NV_WRITE_CDMA_PRL 4188 * 4189 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage. 4190 * This is used for device configuration by some CDMA operators. 4191 * 4192 * "data" is a const char * containing the PRL as a byte array 4193 * 4194 * "response" is NULL 4195 * 4196 * Valid errors: 4197 * SUCCESS 4198 * RADIO_NOT_AVAILABLE 4199 * GENERIC_FAILURE 4200 */ 4201#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120 4202 4203/** 4204 * RIL_REQUEST_NV_RESET_CONFIG 4205 * 4206 * Reset the radio NV configuration to the factory state. 4207 * This is used for device configuration by some CDMA operators. 4208 * 4209 * "data" is int * 4210 * ((int *)data)[0] is 1 to reload all NV items 4211 * ((int *)data)[0] is 2 for erase NV reset (SCRTN) 4212 * ((int *)data)[0] is 3 for factory reset (RTN) 4213 * 4214 * "response" is NULL 4215 * 4216 * Valid errors: 4217 * SUCCESS 4218 * RADIO_NOT_AVAILABLE 4219 * GENERIC_FAILURE 4220 */ 4221#define RIL_REQUEST_NV_RESET_CONFIG 121 4222 4223 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION 4224 * FIXME This API needs to have more documentation. 4225 * 4226 * Selection/de-selection of a subscription from a SIM card 4227 * "data" is const RIL_SelectUiccSub* 4228 4229 * 4230 * "response" is NULL 4231 * 4232 * Valid errors: 4233 * SUCCESS 4234 * RADIO_NOT_AVAILABLE (radio resetting) 4235 * GENERIC_FAILURE 4236 * SUBSCRIPTION_NOT_SUPPORTED 4237 * 4238 */ 4239#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122 4240 4241/** 4242 * RIL_REQUEST_ALLOW_DATA 4243 * 4244 * Tells the modem whether data calls are allowed or not 4245 * 4246 * "data" is int * 4247 * FIXME slotId and aid will be added. 4248 * ((int *)data)[0] is == 0 to allow data calls 4249 * ((int *)data)[0] is == 1 to disallow data calls 4250 * 4251 * "response" is NULL 4252 * 4253 * Valid errors: 4254 * 4255 * SUCCESS 4256 * RADIO_NOT_AVAILABLE (radio resetting) 4257 * GENERIC_FAILURE 4258 * 4259 */ 4260#define RIL_REQUEST_ALLOW_DATA 123 4261 4262/** 4263 * RIL_REQUEST_GET_HARDWARE_CONFIG 4264 * 4265 * Request all of the current hardware (modem and sim) associated 4266 * with the RIL. 4267 * 4268 * "data" is NULL 4269 * 4270 * "response" is an array of RIL_HardwareConfig. 4271 */ 4272#define RIL_REQUEST_GET_HARDWARE_CONFIG 124 4273 4274/** 4275 * RIL_REQUEST_SIM_AUTHENTICATION 4276 * 4277 * Returns the response of SIM Authentication through RIL to a 4278 * challenge request. 4279 * 4280 * "data" Base64 encoded string containing challenge: 4281 * int authContext; P2 value of authentication command, see P2 parameter in 4282 * 3GPP TS 31.102 7.1.2 4283 * char *authData; the challenge string in Base64 format, see 3GPP 4284 * TS 31.102 7.1.2 4285 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4, 4286 * NULL if no value 4287 * 4288 * "response" Base64 encoded strings containing response: 4289 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3 4290 * int sw2; 4291 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2 4292 */ 4293#define RIL_REQUEST_SIM_AUTHENTICATION 125 4294 4295/** 4296 * RIL_REQUEST_GET_DC_RT_INFO 4297 * 4298 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO 4299 * Requests the Data Connection Real Time Info 4300 * 4301 * "data" is NULL 4302 * 4303 * "response" is the most recent RIL_DcRtInfo 4304 * 4305 * Valid errors: 4306 * SUCCESS 4307 * RADIO_NOT_AVAILABLE 4308 * GENERIC_FAILURE 4309 * 4310 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED 4311 */ 4312#define RIL_REQUEST_GET_DC_RT_INFO 126 4313 4314/** 4315 * RIL_REQUEST_SET_DC_RT_INFO_RATE 4316 * 4317 * The request is DEPRECATED 4318 * This is the minimum number of milliseconds between successive 4319 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate 4320 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of 4321 * 0 means send as fast as possible. 4322 * 4323 * "data" The number of milliseconds as an int 4324 * 4325 * "response" is null 4326 * 4327 * Valid errors: 4328 * SUCCESS must not fail 4329 */ 4330#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127 4331 4332/** 4333 * RIL_REQUEST_SET_DATA_PROFILE 4334 * 4335 * Set data profile in modem 4336 * Modem should erase existed profiles from framework, and apply new profiles 4337 * "data" is an const RIL_DataProfileInfo ** 4338 * "datalen" is count * sizeof(const RIL_DataProfileInfo *) 4339 * "response" is NULL 4340 * 4341 * Valid errors: 4342 * SUCCESS 4343 * RADIO_NOT_AVAILABLE (radio resetting) 4344 * GENERIC_FAILURE 4345 * SUBSCRIPTION_NOT_AVAILABLE 4346 */ 4347#define RIL_REQUEST_SET_DATA_PROFILE 128 4348 4349/** 4350 * RIL_REQUEST_SHUTDOWN 4351 * 4352 * Device is shutting down. All further commands are ignored 4353 * and RADIO_NOT_AVAILABLE must be returned. 4354 * 4355 * "data" is null 4356 * "response" is NULL 4357 * 4358 * Valid errors: 4359 * SUCCESS 4360 * RADIO_NOT_AVAILABLE 4361 * GENERIC_FAILURE 4362 */ 4363#define RIL_REQUEST_SHUTDOWN 129 4364 4365/** 4366 * RIL_REQUEST_GET_RADIO_CAPABILITY 4367 * 4368 * Used to get phone radio capablility. 4369 * 4370 * "data" is the RIL_RadioCapability structure 4371 * 4372 * Valid errors: 4373 * SUCCESS 4374 * RADIO_NOT_AVAILABLE 4375 * GENERIC_FAILURE 4376 */ 4377#define RIL_REQUEST_GET_RADIO_CAPABILITY 130 4378 4379/** 4380 * RIL_REQUEST_SET_RADIO_CAPABILITY 4381 * 4382 * Used to set the phones radio capability. Be VERY careful 4383 * using this request as it may cause some vendor modems to reset. Because 4384 * of the possible modem reset any RIL commands after this one may not be 4385 * processed. 4386 * 4387 * "data" is the RIL_RadioCapability structure 4388 * 4389 * "response" is the RIL_RadioCapability structure, used to feedback return status 4390 * 4391 * Valid errors: 4392 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds. 4393 * RADIO_NOT_AVAILABLE 4394 * GENERIC_FAILURE 4395 */ 4396#define RIL_REQUEST_SET_RADIO_CAPABILITY 131 4397 4398/** 4399 * RIL_REQUEST_START_LCE 4400 * 4401 * Start Link Capacity Estimate (LCE) service if supported by the radio. 4402 * 4403 * "data" is const int * 4404 * ((const int*)data)[0] specifies the desired reporting interval (ms). 4405 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH. 4406 * 4407 * "response" is the RIL_LceStatusInfo. 4408 * 4409 * Valid errors: 4410 * SUCCESS 4411 * RADIO_NOT_AVAILABLE 4412 * LCE_NOT_SUPPORTED 4413 */ 4414#define RIL_REQUEST_START_LCE 132 4415 4416/** 4417 * RIL_REQUEST_STOP_LCE 4418 * 4419 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be 4420 * idempotent for the radio modem. 4421 * 4422 * "response" is the RIL_LceStatusInfo. 4423 * 4424 * Valid errors: 4425 * SUCCESS 4426 * RADIO_NOT_AVAILABLE 4427 * LCE_NOT_SUPPORTED 4428 */ 4429#define RIL_REQUEST_STOP_LCE 133 4430 4431/** 4432 * RIL_REQUEST_PULL_LCEDATA 4433 * 4434 * Pull LCE service for capacity information. 4435 * 4436 * "response" is the RIL_LceDataInfo. 4437 * 4438 * Valid errors: 4439 * SUCCESS 4440 * RADIO_NOT_AVAILABLE 4441 * LCE_NOT_SUPPORTED 4442 */ 4443#define RIL_REQUEST_PULL_LCEDATA 134 4444 4445/** 4446 * RIL_REQUEST_GET_ACTIVITY_INFO 4447 * 4448 * Get modem activity statisitics info. 4449 * 4450 * There can be multiple RIL_REQUEST_GET_ACTIVITY_INFO calls to modem. 4451 * Once the response for the request is sent modem will clear 4452 * current statistics information. 4453 * 4454 * "data" is null 4455 * "response" is const RIL_ActivityStatsInfo * 4456 * 4457 * Valid errors: 4458 * 4459 * SUCCESS 4460 * RADIO_NOT_AVAILABLE (radio resetting) 4461 * GENERIC_FAILURE 4462 */ 4463#define RIL_REQUEST_GET_ACTIVITY_INFO 135 4464 4465/***********************************************************************/ 4466 4467 4468#define RIL_UNSOL_RESPONSE_BASE 1000 4469 4470/** 4471 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 4472 * 4473 * Indicate when value of RIL_RadioState has changed. 4474 * 4475 * Callee will invoke RIL_RadioStateRequest method on main thread 4476 * 4477 * "data" is NULL 4478 */ 4479 4480#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000 4481 4482 4483/** 4484 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 4485 * 4486 * Indicate when call state has changed 4487 * 4488 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread 4489 * 4490 * "data" is NULL 4491 * 4492 * Response should be invoked on, for example, 4493 * "RING", "BUSY", "NO CARRIER", and also call state 4494 * transitions (DIALING->ALERTING ALERTING->ACTIVE) 4495 * 4496 * Redundent or extraneous invocations are tolerated 4497 */ 4498#define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001 4499 4500 4501/** 4502 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 4503 * 4504 * Called when the voice network state changed 4505 * 4506 * Callee will invoke the following requests on main thread: 4507 * 4508 * RIL_REQUEST_VOICE_REGISTRATION_STATE 4509 * RIL_REQUEST_OPERATOR 4510 * 4511 * "data" is NULL 4512 * 4513 * FIXME should this happen when SIM records are loaded? (eg, for 4514 * EONS) 4515 */ 4516#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002 4517 4518/** 4519 * RIL_UNSOL_RESPONSE_NEW_SMS 4520 * 4521 * Called when new SMS is received. 4522 * 4523 * "data" is const char * 4524 * This is a pointer to a string containing the PDU of an SMS-DELIVER 4525 * as an ascii string of hex digits. The PDU starts with the SMSC address 4526 * per TS 27.005 (+CMT:) 4527 * 4528 * Callee will subsequently confirm the receipt of thei SMS with a 4529 * RIL_REQUEST_SMS_ACKNOWLEDGE 4530 * 4531 * No new RIL_UNSOL_RESPONSE_NEW_SMS 4532 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a 4533 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received 4534 */ 4535 4536#define RIL_UNSOL_RESPONSE_NEW_SMS 1003 4537 4538/** 4539 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 4540 * 4541 * Called when new SMS Status Report is received. 4542 * 4543 * "data" is const char * 4544 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT 4545 * as an ascii string of hex digits. The PDU starts with the SMSC address 4546 * per TS 27.005 (+CDS:). 4547 * 4548 * Callee will subsequently confirm the receipt of the SMS with a 4549 * RIL_REQUEST_SMS_ACKNOWLEDGE 4550 * 4551 * No new RIL_UNSOL_RESPONSE_NEW_SMS 4552 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a 4553 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received 4554 */ 4555 4556#define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004 4557 4558/** 4559 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 4560 * 4561 * Called when new SMS has been stored on SIM card 4562 * 4563 * "data" is const int * 4564 * ((const int *)data)[0] contains the slot index on the SIM that contains 4565 * the new message 4566 */ 4567 4568#define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005 4569 4570/** 4571 * RIL_UNSOL_ON_USSD 4572 * 4573 * Called when a new USSD message is received. 4574 * 4575 * "data" is const char ** 4576 * ((const char **)data)[0] points to a type code, which is 4577 * one of these string values: 4578 * "0" USSD-Notify -- text in ((const char **)data)[1] 4579 * "1" USSD-Request -- text in ((const char **)data)[1] 4580 * "2" Session terminated by network 4581 * "3" other local client (eg, SIM Toolkit) has responded 4582 * "4" Operation not supported 4583 * "5" Network timeout 4584 * 4585 * The USSD session is assumed to persist if the type code is "1", otherwise 4586 * the current session (if any) is assumed to have terminated. 4587 * 4588 * ((const char **)data)[1] points to a message string if applicable, which 4589 * should always be in UTF-8. 4590 */ 4591#define RIL_UNSOL_ON_USSD 1006 4592/* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */ 4593 4594/** 4595 * RIL_UNSOL_ON_USSD_REQUEST 4596 * 4597 * Obsolete. Send via RIL_UNSOL_ON_USSD 4598 */ 4599#define RIL_UNSOL_ON_USSD_REQUEST 1007 4600 4601/** 4602 * RIL_UNSOL_NITZ_TIME_RECEIVED 4603 * 4604 * Called when radio has received a NITZ time message 4605 * 4606 * "data" is const char * pointing to NITZ time string 4607 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt" 4608 */ 4609#define RIL_UNSOL_NITZ_TIME_RECEIVED 1008 4610 4611/** 4612 * RIL_UNSOL_SIGNAL_STRENGTH 4613 * 4614 * Radio may report signal strength rather han have it polled. 4615 * 4616 * "data" is a const RIL_SignalStrength * 4617 */ 4618#define RIL_UNSOL_SIGNAL_STRENGTH 1009 4619 4620 4621/** 4622 * RIL_UNSOL_DATA_CALL_LIST_CHANGED 4623 * 4624 * "data" is an array of RIL_Data_Call_Response_v6 identical to that 4625 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list 4626 * of current data contexts including new contexts that have been 4627 * activated. A data call is only removed from this list when the 4628 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio 4629 * is powered off/on. 4630 * 4631 * See also: RIL_REQUEST_DATA_CALL_LIST 4632 */ 4633 4634#define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010 4635 4636/** 4637 * RIL_UNSOL_SUPP_SVC_NOTIFICATION 4638 * 4639 * Reports supplementary service related notification from the network. 4640 * 4641 * "data" is a const RIL_SuppSvcNotification * 4642 * 4643 */ 4644 4645#define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011 4646 4647/** 4648 * RIL_UNSOL_STK_SESSION_END 4649 * 4650 * Indicate when STK session is terminated by SIM. 4651 * 4652 * "data" is NULL 4653 */ 4654#define RIL_UNSOL_STK_SESSION_END 1012 4655 4656/** 4657 * RIL_UNSOL_STK_PROACTIVE_COMMAND 4658 * 4659 * Indicate when SIM issue a STK proactive command to applications 4660 * 4661 * "data" is a const char * containing SAT/USAT proactive command 4662 * in hexadecimal format string starting with command tag 4663 * 4664 */ 4665#define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013 4666 4667/** 4668 * RIL_UNSOL_STK_EVENT_NOTIFY 4669 * 4670 * Indicate when SIM notifies applcations some event happens. 4671 * Generally, application does not need to have any feedback to 4672 * SIM but shall be able to indicate appropriate messages to users. 4673 * 4674 * "data" is a const char * containing SAT/USAT commands or responses 4675 * sent by ME to SIM or commands handled by ME, in hexadecimal format string 4676 * starting with first byte of response data or command tag 4677 * 4678 */ 4679#define RIL_UNSOL_STK_EVENT_NOTIFY 1014 4680 4681/** 4682 * RIL_UNSOL_STK_CALL_SETUP 4683 * 4684 * Indicate when SIM wants application to setup a voice call. 4685 * 4686 * "data" is const int * 4687 * ((const int *)data)[0] contains timeout value (in milliseconds) 4688 */ 4689#define RIL_UNSOL_STK_CALL_SETUP 1015 4690 4691/** 4692 * RIL_UNSOL_SIM_SMS_STORAGE_FULL 4693 * 4694 * Indicates that SMS storage on the SIM is full. Sent when the network 4695 * attempts to deliver a new SMS message. Messages cannot be saved on the 4696 * SIM until space is freed. In particular, incoming Class 2 messages 4697 * cannot be stored. 4698 * 4699 * "data" is null 4700 * 4701 */ 4702#define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016 4703 4704/** 4705 * RIL_UNSOL_SIM_REFRESH 4706 * 4707 * Indicates that file(s) on the SIM have been updated, or the SIM 4708 * has been reinitialized. 4709 * 4710 * In the case where RIL is version 6 or older: 4711 * "data" is an int * 4712 * ((int *)data)[0] is a RIL_SimRefreshResult. 4713 * ((int *)data)[1] is the EFID of the updated file if the result is 4714 * SIM_FILE_UPDATE or NULL for any other result. 4715 * 4716 * In the case where RIL is version 7: 4717 * "data" is a RIL_SimRefreshResponse_v7 * 4718 * 4719 * Note: If the SIM state changes as a result of the SIM refresh (eg, 4720 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 4721 * should be sent. 4722 */ 4723#define RIL_UNSOL_SIM_REFRESH 1017 4724 4725/** 4726 * RIL_UNSOL_CALL_RING 4727 * 4728 * Ring indication for an incoming call (eg, RING or CRING event). 4729 * There must be at least one RIL_UNSOL_CALL_RING at the beginning 4730 * of a call and sending multiple is optional. If the system property 4731 * ro.telephony.call_ring.multiple is false then the upper layers 4732 * will generate the multiple events internally. Otherwise the vendor 4733 * ril must generate multiple RIL_UNSOL_CALL_RING if 4734 * ro.telephony.call_ring.multiple is true or if it is absent. 4735 * 4736 * The rate of these events is controlled by ro.telephony.call_ring.delay 4737 * and has a default value of 3000 (3 seconds) if absent. 4738 * 4739 * "data" is null for GSM 4740 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA 4741 */ 4742#define RIL_UNSOL_CALL_RING 1018 4743 4744/** 4745 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 4746 * 4747 * Indicates that SIM state changes. 4748 * 4749 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread 4750 4751 * "data" is null 4752 */ 4753#define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019 4754 4755/** 4756 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 4757 * 4758 * Called when new CDMA SMS is received 4759 * 4760 * "data" is const RIL_CDMA_SMS_Message * 4761 * 4762 * Callee will subsequently confirm the receipt of the SMS with 4763 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 4764 * 4765 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until 4766 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received 4767 * 4768 */ 4769#define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020 4770 4771/** 4772 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 4773 * 4774 * Called when new Broadcast SMS is received 4775 * 4776 * "data" can be one of the following: 4777 * If received from GSM network, "data" is const char of 88 bytes 4778 * which indicates each page of a CBS Message sent to the MS by the 4779 * BTS as coded in 3GPP 23.041 Section 9.4.1.2. 4780 * If received from UMTS network, "data" is const char of 90 up to 1252 4781 * bytes which contain between 1 and 15 CBS Message pages sent as one 4782 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2. 4783 * 4784 */ 4785#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021 4786 4787/** 4788 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 4789 * 4790 * Indicates that SMS storage on the RUIM is full. Messages 4791 * cannot be saved on the RUIM until space is freed. 4792 * 4793 * "data" is null 4794 * 4795 */ 4796#define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022 4797 4798/** 4799 * RIL_UNSOL_RESTRICTED_STATE_CHANGED 4800 * 4801 * Indicates a restricted state change (eg, for Domain Specific Access Control). 4802 * 4803 * Radio need send this msg after radio off/on cycle no matter it is changed or not. 4804 * 4805 * "data" is an int * 4806 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values. 4807 */ 4808#define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023 4809 4810/** 4811 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 4812 * 4813 * Indicates that the radio system selection module has 4814 * autonomously entered emergency callback mode. 4815 * 4816 * "data" is null 4817 * 4818 */ 4819#define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024 4820 4821/** 4822 * RIL_UNSOL_CDMA_CALL_WAITING 4823 * 4824 * Called when CDMA radio receives a call waiting indication. 4825 * 4826 * "data" is const RIL_CDMA_CallWaiting * 4827 * 4828 */ 4829#define RIL_UNSOL_CDMA_CALL_WAITING 1025 4830 4831/** 4832 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 4833 * 4834 * Called when CDMA radio receives an update of the progress of an 4835 * OTASP/OTAPA call. 4836 * 4837 * "data" is const int * 4838 * For CDMA this is an integer OTASP/OTAPA status listed in 4839 * RIL_CDMA_OTA_ProvisionStatus. 4840 * 4841 */ 4842#define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026 4843 4844/** 4845 * RIL_UNSOL_CDMA_INFO_REC 4846 * 4847 * Called when CDMA radio receives one or more info recs. 4848 * 4849 * "data" is const RIL_CDMA_InformationRecords * 4850 * 4851 */ 4852#define RIL_UNSOL_CDMA_INFO_REC 1027 4853 4854/** 4855 * RIL_UNSOL_OEM_HOOK_RAW 4856 * 4857 * This is for OEM specific use. 4858 * 4859 * "data" is a byte[] 4860 */ 4861#define RIL_UNSOL_OEM_HOOK_RAW 1028 4862 4863/** 4864 * RIL_UNSOL_RINGBACK_TONE 4865 * 4866 * Indicates that nework doesn't have in-band information, need to 4867 * play out-band tone. 4868 * 4869 * "data" is an int * 4870 * ((int *)data)[0] == 0 for stop play ringback tone. 4871 * ((int *)data)[0] == 1 for start play ringback tone. 4872 */ 4873#define RIL_UNSOL_RINGBACK_TONE 1029 4874 4875/** 4876 * RIL_UNSOL_RESEND_INCALL_MUTE 4877 * 4878 * Indicates that framework/application need reset the uplink mute state. 4879 * 4880 * There may be situations where the mute state becomes out of sync 4881 * between the application and device in some GSM infrastructures. 4882 * 4883 * "data" is null 4884 */ 4885#define RIL_UNSOL_RESEND_INCALL_MUTE 1030 4886 4887/** 4888 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 4889 * 4890 * Called when CDMA subscription source changed. 4891 * 4892 * "data" is int * 4893 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource 4894 */ 4895#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031 4896 4897/** 4898 * RIL_UNSOL_CDMA_PRL_CHANGED 4899 * 4900 * Called when PRL (preferred roaming list) changes. 4901 * 4902 * "data" is int * 4903 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION 4904 */ 4905#define RIL_UNSOL_CDMA_PRL_CHANGED 1032 4906 4907/** 4908 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 4909 * 4910 * Called when Emergency Callback Mode Ends 4911 * 4912 * Indicates that the radio system selection module has 4913 * proactively exited emergency callback mode. 4914 * 4915 * "data" is NULL 4916 * 4917 */ 4918#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033 4919 4920/** 4921 * RIL_UNSOL_RIL_CONNECTED 4922 * 4923 * Called the ril connects and returns the version 4924 * 4925 * "data" is int * 4926 * ((int *)data)[0] is RIL_VERSION 4927 */ 4928#define RIL_UNSOL_RIL_CONNECTED 1034 4929 4930/** 4931 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 4932 * 4933 * Indicates that voice technology has changed. Contains new radio technology 4934 * as a data in the message. 4935 * 4936 * "data" is int * 4937 * ((int *)data)[0] is of type const RIL_RadioTechnology 4938 * 4939 */ 4940#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035 4941 4942/** 4943 * RIL_UNSOL_CELL_INFO_LIST 4944 * 4945 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned 4946 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE. 4947 * 4948 * "data" is NULL 4949 * 4950 * "response" is an array of RIL_CellInfo. 4951 */ 4952#define RIL_UNSOL_CELL_INFO_LIST 1036 4953 4954/** 4955 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 4956 * 4957 * Called when IMS registration state has changed 4958 * 4959 * To get IMS registration state and IMS SMS format, callee needs to invoke the 4960 * following request on main thread: 4961 * 4962 * RIL_REQUEST_IMS_REGISTRATION_STATE 4963 * 4964 * "data" is NULL 4965 * 4966 */ 4967#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037 4968 4969/** 4970 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 4971 * 4972 * Indicated when there is a change in subscription status. 4973 * This event will be sent in the following scenarios 4974 * - subscription readiness at modem, which was selected by telephony layer 4975 * - when subscription is deactivated by modem due to UICC card removal 4976 * - When network invalidates the subscription i.e. attach reject due to authentication reject 4977 * 4978 * "data" is const int * 4979 * ((const int *)data)[0] == 0 for Subscription Deactivated 4980 * ((const int *)data)[0] == 1 for Subscription Activated 4981 * 4982 */ 4983#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038 4984 4985/** 4986 * RIL_UNSOL_SRVCC_STATE_NOTIFY 4987 * 4988 * Called when Single Radio Voice Call Continuity(SRVCC) 4989 * progress state has changed 4990 * 4991 * "data" is int * 4992 * ((int *)data)[0] is of type const RIL_SrvccState 4993 * 4994 */ 4995 4996#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039 4997 4998/** 4999 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED 5000 * 5001 * Called when the hardware configuration associated with the RILd changes 5002 * 5003 * "data" is an array of RIL_HardwareConfig 5004 * 5005 */ 5006#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040 5007 5008/** 5009 * RIL_UNSOL_DC_RT_INFO_CHANGED 5010 * 5011 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO 5012 * Sent when the DC_RT_STATE changes but the time 5013 * between these messages must not be less than the 5014 * value set by RIL_REQUEST_SET_DC_RT_RATE. 5015 * 5016 * "data" is the most recent RIL_DcRtInfo 5017 * 5018 */ 5019#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041 5020 5021/** 5022 * RIL_UNSOL_RADIO_CAPABILITY 5023 * 5024 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes. 5025 * Returns the phone radio capability exactly as 5026 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the 5027 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY. 5028 * 5029 * "data" is the RIL_RadioCapability structure 5030 */ 5031#define RIL_UNSOL_RADIO_CAPABILITY 1042 5032 5033/* 5034 * RIL_UNSOL_ON_SS 5035 * 5036 * Called when SS response is received when DIAL/USSD/SS is changed to SS by 5037 * call control. 5038 * 5039 * "data" is const RIL_StkCcUnsolSsResponse * 5040 * 5041 */ 5042#define RIL_UNSOL_ON_SS 1043 5043 5044/** 5045 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY 5046 * 5047 * Called when there is an ALPHA from UICC during Call Control. 5048 * 5049 * "data" is const char * containing ALPHA string from UICC in UTF-8 format. 5050 * 5051 */ 5052#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044 5053 5054/** 5055 * RIL_UNSOL_LCEDATA_RECV 5056 * 5057 * Called when there is an incoming Link Capacity Estimate (LCE) info report. 5058 * 5059 * "data" is the RIL_LceDataInfo structure. 5060 * 5061 */ 5062#define RIL_UNSOL_LCEDATA_RECV 1045 5063 5064/***********************************************************************/ 5065 5066 5067#if defined(ANDROID_MULTI_SIM) 5068/** 5069 * RIL_Request Function pointer 5070 * 5071 * @param request is one of RIL_REQUEST_* 5072 * @param data is pointer to data defined for that RIL_REQUEST_* 5073 * data is owned by caller, and should not be modified or freed by callee 5074 * @param t should be used in subsequent call to RIL_onResponse 5075 * @param datalen the length of data 5076 * 5077 */ 5078typedef void (*RIL_RequestFunc) (int request, void *data, 5079 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id); 5080 5081/** 5082 * This function should return the current radio state synchronously 5083 */ 5084typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id); 5085 5086#else 5087/* Backward compatible */ 5088 5089/** 5090 * RIL_Request Function pointer 5091 * 5092 * @param request is one of RIL_REQUEST_* 5093 * @param data is pointer to data defined for that RIL_REQUEST_* 5094 * data is owned by caller, and should not be modified or freed by callee 5095 * @param t should be used in subsequent call to RIL_onResponse 5096 * @param datalen the length of data 5097 * 5098 */ 5099typedef void (*RIL_RequestFunc) (int request, void *data, 5100 size_t datalen, RIL_Token t); 5101 5102/** 5103 * This function should return the current radio state synchronously 5104 */ 5105typedef RIL_RadioState (*RIL_RadioStateRequest)(); 5106 5107#endif 5108 5109 5110/** 5111 * This function returns "1" if the specified RIL_REQUEST code is 5112 * supported and 0 if it is not 5113 * 5114 * @param requestCode is one of RIL_REQUEST codes 5115 */ 5116 5117typedef int (*RIL_Supports)(int requestCode); 5118 5119/** 5120 * This function is called from a separate thread--not the 5121 * thread that calls RIL_RequestFunc--and indicates that a pending 5122 * request should be cancelled. 5123 * 5124 * On cancel, the callee should do its best to abandon the request and 5125 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point. 5126 * 5127 * Subsequent calls to RIL_onRequestComplete for this request with 5128 * other results will be tolerated but ignored. (That is, it is valid 5129 * to ignore the cancellation request) 5130 * 5131 * RIL_Cancel calls should return immediately, and not wait for cancellation 5132 * 5133 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007 5134 * interface 5135 * 5136 * @param t token wants to be canceled 5137 */ 5138 5139typedef void (*RIL_Cancel)(RIL_Token t); 5140 5141typedef void (*RIL_TimedCallback) (void *param); 5142 5143/** 5144 * Return a version string for your RIL implementation 5145 */ 5146typedef const char * (*RIL_GetVersion) (void); 5147 5148typedef struct { 5149 int version; /* set to RIL_VERSION */ 5150 RIL_RequestFunc onRequest; 5151 RIL_RadioStateRequest onStateRequest; 5152 RIL_Supports supports; 5153 RIL_Cancel onCancel; 5154 RIL_GetVersion getVersion; 5155} RIL_RadioFunctions; 5156 5157typedef struct { 5158 char *apn; 5159 char *protocol; 5160 int authtype; 5161 char *username; 5162 char *password; 5163} RIL_InitialAttachApn; 5164 5165typedef struct { 5166 int authContext; /* P2 value of authentication command, see P2 parameter in 5167 3GPP TS 31.102 7.1.2 */ 5168 char *authData; /* the challenge string in Base64 format, see 3GPP 5169 TS 31.102 7.1.2 */ 5170 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4, 5171 NULL if no value. */ 5172} RIL_SimAuthentication; 5173 5174#ifdef RIL_SHLIB 5175struct RIL_Env { 5176 /** 5177 * "t" is parameter passed in on previous call to RIL_Notification 5178 * routine. 5179 * 5180 * If "e" != SUCCESS, then response can be null/is ignored 5181 * 5182 * "response" is owned by caller, and should not be modified or 5183 * freed by callee 5184 * 5185 * RIL_onRequestComplete will return as soon as possible 5186 */ 5187 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e, 5188 void *response, size_t responselen); 5189 5190#if defined(ANDROID_MULTI_SIM) 5191 /** 5192 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_* 5193 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_* 5194 * 5195 * "data" is owned by caller, and should not be modified or freed by callee 5196 */ 5197 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id); 5198#else 5199 /** 5200 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_* 5201 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_* 5202 * 5203 * "data" is owned by caller, and should not be modified or freed by callee 5204 */ 5205 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen); 5206#endif 5207 /** 5208 * Call user-specifed "callback" function on on the same thread that 5209 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies 5210 * a relative time value at which the callback is invoked. If relativeTime is 5211 * NULL or points to a 0-filled structure, the callback will be invoked as 5212 * soon as possible 5213 */ 5214 5215 void (*RequestTimedCallback) (RIL_TimedCallback callback, 5216 void *param, const struct timeval *relativeTime); 5217}; 5218 5219 5220/** 5221 * RIL implementations must defined RIL_Init 5222 * argc and argv will be command line arguments intended for the RIL implementation 5223 * Return NULL on error 5224 * 5225 * @param env is environment point defined as RIL_Env 5226 * @param argc number of arguments 5227 * @param argv list fo arguments 5228 * 5229 */ 5230const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv); 5231 5232#else /* RIL_SHLIB */ 5233 5234/** 5235 * Call this once at startup to register notification routine 5236 * 5237 * @param callbacks user-specifed callback function 5238 */ 5239void RIL_register (const RIL_RadioFunctions *callbacks); 5240 5241 5242/** 5243 * 5244 * RIL_onRequestComplete will return as soon as possible 5245 * 5246 * @param t is parameter passed in on previous call to RIL_Notification 5247 * routine. 5248 * @param e error code 5249 * if "e" != SUCCESS, then response can be null/is ignored 5250 * @param response is owned by caller, and should not be modified or 5251 * freed by callee 5252 * @param responselen the length of response in byte 5253 */ 5254void RIL_onRequestComplete(RIL_Token t, RIL_Errno e, 5255 void *response, size_t responselen); 5256 5257#if defined(ANDROID_MULTI_SIM) 5258/** 5259 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_* 5260 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_* 5261 * "data" is owned by caller, and should not be modified or freed by callee 5262 * @param datalen the length of data in byte 5263 */ 5264 5265void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, 5266 size_t datalen, RIL_SOCKET_ID socket_id); 5267#else 5268/** 5269 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_* 5270 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_* 5271 * "data" is owned by caller, and should not be modified or freed by callee 5272 * @param datalen the length of data in byte 5273 */ 5274 5275void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, 5276 size_t datalen); 5277#endif 5278 5279/** 5280 * Call user-specifed "callback" function on on the same thread that 5281 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies 5282 * a relative time value at which the callback is invoked. If relativeTime is 5283 * NULL or points to a 0-filled structure, the callback will be invoked as 5284 * soon as possible 5285 * 5286 * @param callback user-specifed callback function 5287 * @param param parameter list 5288 * @param relativeTime a relative time value at which the callback is invoked 5289 */ 5290 5291void RIL_requestTimedCallback (RIL_TimedCallback callback, 5292 void *param, const struct timeval *relativeTime); 5293 5294 5295#endif /* RIL_SHLIB */ 5296 5297#ifdef __cplusplus 5298} 5299#endif 5300 5301#endif /*ANDROID_RIL_H*/ 5302