/libril/telephony/ril.h
https://github.com/VanirAOSP/device_htc_msm8960-common · C Header · 4551 lines · 931 code · 355 blank · 3265 comment · 0 complexity · 702de109ebded32910fce9f44f1f608d MD5 · raw file
Large files are truncated click here to view the full file
- /*
- * Copyright (C) 2006 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- #ifndef ANDROID_RIL_H
- #define ANDROID_RIL_H 1
- #include <stdlib.h>
- #include <stdint.h>
- #include "ril_cdma_sms.h"
- #include <telephony/ril_msim.h>
- #ifndef FEATURE_UNIT_TEST
- #include <sys/time.h>
- #endif /* !FEATURE_UNIT_TEST */
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define RIL_VERSION 9 /* Current version */
- #define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
- #define RIL_QCOM_VERSION 3 /* Qualcomm internal RIL version */
- #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
- #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
- #define MAX_RILDS 3
- #define MAX_SOCKET_NAME_LENGTH 6
- #define MAX_CLIENT_ID_LENGTH 2
- #define MAX_DEBUG_SOCKET_NAME_LENGTH 12
- #define MAX_QEMU_PIPE_NAME_LENGTH 11
- typedef void * RIL_Token;
- typedef enum {
- RIL_E_SUCCESS = 0,
- RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
- RIL_E_GENERIC_FAILURE = 2,
- RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
- RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
- RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
- RIL_E_REQUEST_NOT_SUPPORTED = 6,
- RIL_E_CANCELLED = 7,
- RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
- call on a Class C GPRS device */
- RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
- registers in network */
- RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
- RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
- shall be retrieved because of SIM or RUIM
- card absent */
- RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
- location */
- RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
- RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
- RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
- illegal SIM or ME */
- RIL_E_UNUSED = 16,
- RIL_E_DIAL_MODIFIED_TO_USSD = 17, /* DIAL request modified to USSD */
- RIL_E_DIAL_MODIFIED_TO_SS = 18, /* DIAL request modified to SS */
- RIL_E_DIAL_MODIFIED_TO_DIAL = 19, /* DIAL request modified to DIAL with different data */
- RIL_E_USSD_MODIFIED_TO_DIAL = 20, /* USSD request modified to DIAL */
- RIL_E_USSD_MODIFIED_TO_SS = 21, /* USSD request modified to SS */
- RIL_E_USSD_MODIFIED_TO_USSD = 22, /* USSD request modified to different USSD request */
- RIL_E_SS_MODIFIED_TO_DIAL = 23, /* SS request modified to DIAL */
- RIL_E_SS_MODIFIED_TO_USSD = 24, /* SS request modified to USSD */
- RIL_E_SS_MODIFIED_TO_SS = 25, /* SS request modified to different SS request */
- RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26 /* Subscription not supported by RIL */
- } RIL_Errno;
- typedef enum {
- RIL_CALL_ACTIVE = 0,
- RIL_CALL_HOLDING = 1,
- RIL_CALL_DIALING = 2, /* MO call only */
- RIL_CALL_ALERTING = 3, /* MO call only */
- RIL_CALL_INCOMING = 4, /* MT call only */
- RIL_CALL_WAITING = 5 /* MT call only */
- } RIL_CallState;
- typedef enum {
- RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
- RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
- /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
- RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
- RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
- personalization locked, or SIM absent */
- RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
- RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
- RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
- RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
- personalization locked, or RUIM absent */
- RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
- RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */
- RADIO_STATE_ON = 10 /* Radio is on */
- } RIL_RadioState;
- typedef enum {
- RADIO_TECH_UNKNOWN = 0,
- RADIO_TECH_GPRS = 1,
- RADIO_TECH_EDGE = 2,
- RADIO_TECH_UMTS = 3,
- RADIO_TECH_IS95A = 4,
- RADIO_TECH_IS95B = 5,
- RADIO_TECH_1xRTT = 6,
- RADIO_TECH_EVDO_0 = 7,
- RADIO_TECH_EVDO_A = 8,
- RADIO_TECH_HSDPA = 9,
- RADIO_TECH_HSUPA = 10,
- RADIO_TECH_HSPA = 11,
- RADIO_TECH_EVDO_B = 12,
- RADIO_TECH_EHRPD = 13,
- RADIO_TECH_LTE = 14,
- RADIO_TECH_HSPAP = 15, // HSPA+
- RADIO_TECH_GSM = 16, // Only supports voice
- RADIO_TECH_TD_SCDMA = 17,
- RADIO_TECH_IWLAN = 18,
- RADIO_TECH_DCHSPAP = 30
- } RIL_RadioTechnology;
- // Do we want to split Data from Voice and the use
- // RIL_RadioTechnology for get/setPreferredVoice/Data ?
- typedef enum {
- PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
- PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
- PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
- PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
- PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
- PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
- PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
- PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
- PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
- PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
- PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
- PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
- PREF_NET_TYPE_LTE_WCDMA = 12, /* LTE/WCDMA */
- PREF_NET_TYPE_TD_SCDMA_ONLY = 13, /* TD-SCDMA only */
- PREF_NET_TYPE_TD_SCDMA_WCDMA = 14, /* TD-SCDMA and WCDMA */
- PREF_NET_TYPE_TD_SCDMA_LTE = 15, /* TD-SCDMA and LTE */
- PREF_NET_TYPE_TD_SCDMA_GSM = 16, /* TD-SCDMA and GSM */
- PREF_NET_TYPE_TD_SCDMA_GSM_LTE = 17, /* TD-SCDMA,GSM and LTE */
- PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA = 18, /* TD-SCDMA, GSM/WCDMA */
- PREF_NET_TYPE_TD_SCDMA_WCDMA_LTE = 19, /* TD-SCDMA, WCDMA and LTE */
- PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_LTE = 20, /* TD-SCDMA, GSM/WCDMA and LTE */
- PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_CDMA_EVDO_AUTO = 21, /* TD-SCDMA, GSM/WCDMA, CDMA and EvDo */
- PREF_NET_TYPE_TD_SCDMA_LTE_CDMA_EVDO_GSM_WCDMA = 22 /* TD-SCDMA, LTE, CDMA, EvDo GSM/WCDMA */
- } RIL_PreferredNetworkType;
- /* Source for cdma subscription */
- typedef enum {
- CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
- CDMA_SUBSCRIPTION_SOURCE_NV = 1
- } RIL_CdmaSubscriptionSource;
- /* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
- typedef enum {
- RIL_UUS_TYPE1_IMPLICIT = 0,
- RIL_UUS_TYPE1_REQUIRED = 1,
- RIL_UUS_TYPE1_NOT_REQUIRED = 2,
- RIL_UUS_TYPE2_REQUIRED = 3,
- RIL_UUS_TYPE2_NOT_REQUIRED = 4,
- RIL_UUS_TYPE3_REQUIRED = 5,
- RIL_UUS_TYPE3_NOT_REQUIRED = 6
- } RIL_UUS_Type;
- /* User-to-User Signaling Information data coding schemes. Possible values for
- * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
- * specified in section 10.5.4.25 of 3GPP TS 24.008 */
- typedef enum {
- RIL_UUS_DCS_USP = 0, /* User specified protocol */
- RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
- RIL_UUS_DCS_X244 = 2, /* X.244 */
- RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
- convergence function */
- RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
- } RIL_UUS_DCS;
- /* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
- * This data is passed in RIL_ExtensionRecord and rec contains this
- * structure when type is RIL_UUS_INFO_EXT_REC */
- typedef struct {
- RIL_UUS_Type uusType; /* UUS Type */
- RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
- int uusLength; /* Length of UUS Data */
- char * uusData; /* UUS Data */
- } RIL_UUS_Info;
- /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
- typedef struct {
- char isPresent; /* non-zero if signal information record is present */
- char signalType; /* as defined 3.7.5.5-1 */
- char alertPitch; /* as defined 3.7.5.5-2 */
- char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
- } RIL_CDMA_SignalInfoRecord;
- typedef struct {
- RIL_CallState state;
- int index; /* Connection Index for use with, eg, AT+CHLD */
- int toa; /* type of address, eg 145 = intl */
- char isMpty; /* nonzero if is mpty call */
- char isMT; /* nonzero if call is mobile terminated */
- char als; /* ALS line indicator if available
- (0 = line 1) */
- char isVoice; /* nonzero if this is is a voice call */
- char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
- char * number; /* Remote party number */
- int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
- char * name; /* Remote party name */
- int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
- RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
- } RIL_Call;
- /* Deprecated, use RIL_Data_Call_Response_v6 */
- typedef struct {
- int cid; /* Context ID, uniquely identifies this call */
- int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
- char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
- For example, "IP", "IPV6", "IPV4V6", or "PPP". */
- char * apn; /* ignored */
- char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
- } RIL_Data_Call_Response_v4;
- /*
- * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
- * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
- */
- typedef struct {
- int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
- #ifndef HCRADIO
- int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
- back-off timer value RIL wants to override the one
- pre-configured in FW.
- The unit is miliseconds.
- The value < 0 means no value is suggested.
- The value 0 means retry should be done ASAP.
- The value of INT_MAX(0x7fffffff) means no retry. */
- #endif
- int cid; /* Context ID, uniquely identifies this call */
- int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
- char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
- For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
- PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
- such as "IP" or "IPV6" */
- char * ifname; /* The network interface name */
- char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
- e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
- May not be empty, typically 1 IPv4 or 1 IPv6 or
- one of each. If the prefix length is absent the addresses
- are assumed to be point to point with IPv4 having a prefix
- length of 32 and IPv6 128. */
- char * dnses; /* A space-delimited list of DNS server addresses,
- e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
- May be empty. */
- char * gateways; /* A space-delimited list of default gateway addresses,
- e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
- May be empty in which case the addresses represent point
- to point connections. */
- } RIL_Data_Call_Response_v6;
- typedef enum {
- RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
- RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
- } RIL_RadioTechnologyFamily;
- typedef struct {
- RIL_RadioTechnologyFamily tech;
- unsigned char retry; /* 0 == not retry, nonzero == retry */
- int messageRef; /* Valid field if retry is set to nonzero.
- Contains messageRef from RIL_SMS_Response
- corresponding to failed MO SMS.
- */
- union {
- /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
- RIL_CDMA_SMS_Message* cdmaMessage;
- /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
- char** gsmMessage;
- } message;
- } RIL_IMS_SMS_Message;
- typedef struct {
- int messageRef; /* TP-Message-Reference for GSM,
- and BearerData MessageId for CDMA
- (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
- char *ackPDU; /* or NULL if n/a */
- int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
- 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
- -1 if unknown or not applicable*/
- } RIL_SMS_Response;
- /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
- typedef struct {
- int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
- /* 0 = "REC UNREAD" */
- /* 1 = "REC READ" */
- /* 2 = "STO UNSENT" */
- /* 3 = "STO SENT" */
- char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
- the TP-layer length is "strlen(pdu)/2". */
- char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
- (as expected by TS 27.005) or NULL for default SMSC */
- } RIL_SMS_WriteArgs;
- /** Used by RIL_REQUEST_DIAL */
- typedef struct {
- char * address;
- int clir;
- /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
- * clir == 0 on "use subscription default value"
- * clir == 1 on "CLIR invocation" (restrict CLI presentation)
- * clir == 2 on "CLIR suppression" (allow CLI presentation)
- */
- RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
- } RIL_Dial;
- typedef struct {
- int command; /* one of the commands listed for TS 27.007 +CRSM*/
- int fileid; /* EF id */
- char *path; /* "pathid" from TS 27.007 +CRSM command.
- Path is in hex asciii format eg "7f205f70"
- Path must always be provided.
- */
- int p1;
- int p2;
- int p3;
- char *data; /* May be NULL*/
- char *pin2; /* May be NULL*/
- } RIL_SIM_IO_v5;
- typedef struct {
- int command; /* one of the commands listed for TS 27.007 +CRSM*/
- int fileid; /* EF id */
- char *path; /* "pathid" from TS 27.007 +CRSM command.
- Path is in hex asciii format eg "7f205f70"
- Path must always be provided.
- */
- int p1;
- int p2;
- int p3;
- char *data; /* May be NULL*/
- char *pin2; /* May be NULL*/
- char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
- } RIL_SIM_IO_v6;
- typedef struct {
- int sw1;
- int sw2;
- char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
- } RIL_SIM_IO_Response;
- /* See also com.android.internal.telephony.gsm.CallForwardInfo */
- typedef struct {
- int status; /*
- * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
- * status 1 = active, 0 = not active
- *
- * For RIL_REQUEST_SET_CALL_FORWARD:
- * status is:
- * 0 = disable
- * 1 = enable
- * 2 = interrogate
- * 3 = registeration
- * 4 = erasure
- */
- int reason; /* from TS 27.007 7.11 "reason" */
- int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
- See table for Android mapping from
- MMI service code
- 0 means user doesn't input class */
- int toa; /* "type" from TS 27.007 7.11 */
- char * number; /* "number" from TS 27.007 7.11. May be NULL */
- int timeSeconds; /* for CF no reply only */
- }RIL_CallForwardInfo;
- typedef struct {
- char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
- * Upper 16 bits is LAC and lower 16 bits
- * is CID (as described in TS 27.005)
- * Primary Scrambling Code (as described in TS 25.331)
- * in 9 bits in UMTS
- * Valid values are hexadecimal 0x0000 - 0xffffffff.
- */
- int rssi; /* Received RSSI in GSM,
- * Level index of CPICH Received Signal Code Power in UMTS
- */
- } RIL_NeighboringCell;
- /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
- typedef enum {
- CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
- CALL_FAIL_NORMAL = 16,
- CALL_FAIL_BUSY = 17,
- CALL_FAIL_CONGESTION = 34,
- CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
- CALL_FAIL_CALL_BARRED = 240,
- CALL_FAIL_FDN_BLOCKED = 241,
- CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
- CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
- CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
- CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
- CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
- CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
- CALL_FAIL_CDMA_DROP = 1001,
- CALL_FAIL_CDMA_INTERCEPT = 1002,
- CALL_FAIL_CDMA_REORDER = 1003,
- CALL_FAIL_CDMA_SO_REJECT = 1004,
- CALL_FAIL_CDMA_RETRY_ORDER = 1005,
- CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
- CALL_FAIL_CDMA_PREEMPTED = 1007,
- CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
- during emergency callback mode */
- CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
- CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
- } RIL_LastCallFailCause;
- /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
- typedef enum {
- PDP_FAIL_NONE = 0, /* No error, connection ok */
- /* an integer cause code defined in TS 24.008
- section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
- If the implementation does not have access to the exact cause codes,
- then it should return one of the following values,
- as the UI layer needs to distinguish these
- cases for error notification and potential retries. */
- PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
- PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
- PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
- PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
- PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
- PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
- PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
- PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
- PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
- PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
- PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
- PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* restart radio */
- PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
- PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
- PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
- PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
- /* Not mentioned in the specification */
- PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
- PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
- /* reasons for data call drop - network/modem disconnect */
- PDP_FAIL_SIGNAL_LOST = -3,
- PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
- with parameters appropriate for new technology */
- PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
- powered off - no retry */
- PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
- mode was up on same APN/data profile - no retry until
- tethered call is off */
- PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */
- } RIL_DataCallFailCause;
- /* See RIL_REQUEST_SETUP_DATA_CALL */
- typedef enum {
- RIL_DATA_PROFILE_DEFAULT = 0,
- RIL_DATA_PROFILE_TETHERED = 1,
- RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */
- } RIL_DataProfile;
- /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
- typedef struct {
- int notificationType; /*
- * 0 = MO intermediate result code
- * 1 = MT unsolicited result code
- */
- int code; /* See 27.007 7.17
- "code1" for MO
- "code2" for MT. */
- int index; /* CUG index. See 27.007 7.17. */
- int type; /* "type" from 27.007 7.17 (MT only). */
- char * number; /* "number" from 27.007 7.17
- (MT only, may be NULL). */
- } RIL_SuppSvcNotification;
- #define RIL_CARD_MAX_APPS 8
- typedef enum {
- RIL_CARDSTATE_ABSENT = 0,
- RIL_CARDSTATE_PRESENT = 1,
- RIL_CARDSTATE_ERROR = 2
- } RIL_CardState;
- typedef enum {
- RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
- RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
- RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
- since each app can only have 1 active perso
- involved */
- RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
- RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
- RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
- RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
- RIL_PERSOSUBSTATE_SIM_SIM = 7,
- RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
- RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
- RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
- RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
- RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
- RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
- RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
- RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
- RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
- RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
- RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
- RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
- RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
- RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
- RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
- RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
- RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
- } RIL_PersoSubstate;
- typedef enum {
- RIL_APPSTATE_UNKNOWN = 0,
- RIL_APPSTATE_DETECTED = 1,
- RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
- RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
- RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
- when app_state is assigned to this value */
- RIL_APPSTATE_READY = 5
- } RIL_AppState;
- typedef enum {
- RIL_PINSTATE_UNKNOWN = 0,
- RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
- RIL_PINSTATE_ENABLED_VERIFIED = 2,
- RIL_PINSTATE_DISABLED = 3,
- RIL_PINSTATE_ENABLED_BLOCKED = 4,
- RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
- } RIL_PinState;
- typedef enum {
- RIL_APPTYPE_UNKNOWN = 0,
- RIL_APPTYPE_SIM = 1,
- RIL_APPTYPE_USIM = 2,
- RIL_APPTYPE_RUIM = 3,
- RIL_APPTYPE_CSIM = 4,
- RIL_APPTYPE_ISIM = 5
- } RIL_AppType;
- typedef struct
- {
- RIL_AppType app_type;
- RIL_AppState app_state;
- RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
- RIL_APPSTATE_SUBSCRIPTION_PERSO */
- char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
- 0x30, 0x30, 0x30 */
- char *app_label_ptr; /* null terminated string */
- int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
- RIL_PinState pin1;
- RIL_PinState pin2;
- } RIL_AppStatus;
- /* Deprecated, use RIL_CardStatus_v6 */
- typedef struct
- {
- RIL_CardState card_state;
- RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
- int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
- int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
- int num_applications; /* value <= RIL_CARD_MAX_APPS */
- RIL_AppStatus applications[RIL_CARD_MAX_APPS];
- } RIL_CardStatus_v5;
- typedef struct
- {
- RIL_CardState card_state;
- RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
- int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
- int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
- int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
- int num_applications; /* value <= RIL_CARD_MAX_APPS */
- RIL_AppStatus applications[RIL_CARD_MAX_APPS];
- } RIL_CardStatus_v6;
- /** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
- * or as part of RIL_SimRefreshResponse_v7
- */
- typedef enum {
- /* A file on SIM has been updated. data[1] contains the EFID. */
- SIM_FILE_UPDATE = 0,
- /* SIM initialized. All files should be re-read. */
- SIM_INIT = 1,
- /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
- SIM_RESET = 2
- } RIL_SimRefreshResult;
- typedef struct {
- RIL_SimRefreshResult result;
- int ef_id; /* is the EFID of the updated file if the result is */
- /* SIM_FILE_UPDATE or 0 for any other result. */
- char * aid; /* is AID(application ID) of the card application */
- /* See ETSI 102.221 8.1 and 101.220 4 */
- /* For SIM_FILE_UPDATE result it can be set to AID of */
- /* application in which updated EF resides or it can be */
- /* NULL if EF is outside of an application. */
- /* For SIM_INIT result this field is set to AID of */
- /* application that caused REFRESH */
- /* For SIM_RESET result it is NULL. */
- } RIL_SimRefreshResponse_v7;
- /* Deprecated, use RIL_CDMA_CallWaiting_v6 */
- typedef struct {
- char * number; /* Remote party number */
- int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
- char * name; /* Remote party name */
- RIL_CDMA_SignalInfoRecord signalInfoRecord;
- } RIL_CDMA_CallWaiting_v5;
- typedef struct {
- char * number; /* Remote party number */
- int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
- char * name; /* Remote party name */
- RIL_CDMA_SignalInfoRecord signalInfoRecord;
- /* Number type/Number plan required to support International Call Waiting */
- int number_type; /* 0=Unknown, 1=International, 2=National,
- 3=Network specific, 4=subscriber */
- int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
- } RIL_CDMA_CallWaiting_v6;
- /**
- * Which types of Cell Broadcast Message (CBM) are to be received by the ME
- *
- * uFromServiceID - uToServiceID defines a range of CBM message identifiers
- * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
- * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
- * CBM message ID.
- *
- * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
- * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
- * and 9.4.4.2.3 for UMTS.
- * All other values can be treated as empty CBM data coding scheme.
- *
- * selected 0 means message types specified in <fromServiceId, toServiceId>
- * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
- *
- * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
- * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
- */
- typedef struct {
- int fromServiceId;
- int toServiceId;
- int fromCodeScheme;
- int toCodeScheme;
- unsigned char selected;
- } RIL_GSM_BroadcastSmsConfigInfo;
- /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
- #define RIL_RESTRICTED_STATE_NONE 0x00
- /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
- #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
- /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
- #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
- /* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
- #define RIL_RESTRICTED_STATE_CS_ALL 0x04
- /* Block packet data access due to restriction. */
- #define RIL_RESTRICTED_STATE_PS_ALL 0x10
- /* The status for an OTASP/OTAPA session */
- typedef enum {
- CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
- CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
- CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
- CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
- CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
- CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
- CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
- CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
- CDMA_OTA_PROVISION_STATUS_COMMITTED,
- CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
- CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
- CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
- } RIL_CDMA_OTA_ProvisionStatus;
- typedef struct {
- int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
- int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
- } RIL_GW_SignalStrength;
- typedef struct {
- int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
- int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
- } RIL_SignalStrengthWcdma;
- typedef struct {
- int dbm; /* Valid values are positive integers. This value is the actual RSSI value
- * multiplied by -1. Example: If the actual RSSI is -75, then this response
- * value will be 75.
- */
- int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
- * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
- * will be 125.
- */
- } RIL_CDMA_SignalStrength;
- typedef struct {
- int dbm; /* Valid values are positive integers. This value is the actual RSSI value
- * multiplied by -1. Example: If the actual RSSI is -75, then this response
- * value will be 75.
- */
- int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
- * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
- * will be 125.
- */
- int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
- } RIL_EVDO_SignalStrength;
- typedef struct {
- int dbm;
- int ecno;
- } RIL_ATT_SignalStrength;
- typedef struct {
- int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
- int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
- * Range: 44 to 140 dBm
- * INT_MAX: 0x7FFFFFFF denotes invalid value.
- * Reference: 3GPP TS 36.133 9.1.4 */
- int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
- * Range: 20 to 3 dB.
- * INT_MAX: 0x7FFFFFFF denotes invalid value.
- * Reference: 3GPP TS 36.133 9.1.7 */
- int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
- * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
- * INT_MAX : 0x7FFFFFFF denotes invalid value.
- * Reference: 3GPP TS 36.101 8.1.1 */
- int cqi; /* The current Channel Quality Indicator.
- * Range: 0 to 15.
- * INT_MAX : 0x7FFFFFFF denotes invalid value.
- * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
- } RIL_LTE_SignalStrength;
- typedef struct {
- int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
- int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
- * Range: 44 to 140 dBm
- * INT_MAX: 0x7FFFFFFF denotes invalid value.
- * Reference: 3GPP TS 36.133 9.1.4 */
- int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
- * Range: 20 to 3 dB.
- * INT_MAX: 0x7FFFFFFF denotes invalid value.
- * Reference: 3GPP TS 36.133 9.1.7 */
- int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
- * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
- * INT_MAX : 0x7FFFFFFF denotes invalid value.
- * Reference: 3GPP TS 36.101 8.1.1 */
- int cqi; /* The current Channel Quality Indicator.
- * Range: 0 to 15.
- * INT_MAX : 0x7FFFFFFF denotes invalid value.
- * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
- int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
- * Approximate distance can be calculated using 300m/us * timingAdvance.
- * Range: 0 to 0x7FFFFFFE
- * INT_MAX : 0x7FFFFFFF denotes invalid value.
- * Reference: 3GPP 36.321 section 6.1.3.5
- * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
- } RIL_LTE_SignalStrength_v8;
- typedef struct {
- int rscp; /* The Received Signal Code Power in dBm multipled by -1.
- * Range : 25 to 120
- * INT_MAX: 0x7FFFFFFF denotes invalid value.
- * Reference: 3GPP TS 25.123, section 9.1.1.1 */
- } RIL_TD_SCDMA_SignalStrength_CAF;
- /* Deprecated, use RIL_SignalStrength_v6 */
- typedef struct {
- RIL_GW_SignalStrength GW_SignalStrength;
- RIL_CDMA_SignalStrength CDMA_SignalStrength;
- RIL_EVDO_SignalStrength EVDO_SignalStrength;
- } RIL_SignalStrength_v5;
- typedef struct {
- RIL_GW_SignalStrength GW_SignalStrength;
- RIL_CDMA_SignalStrength CDMA_SignalStrength;
- RIL_EVDO_SignalStrength EVDO_SignalStrength;
- RIL_LTE_SignalStrength LTE_SignalStrength;
- } RIL_SignalStrength_v6;
- typedef struct {
- RIL_GW_SignalStrength GW_SignalStrength;
- RIL_CDMA_SignalStrength CDMA_SignalStrength;
- RIL_EVDO_SignalStrength EVDO_SignalStrength;
- RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
- } RIL_SignalStrength_v8;
- typedef struct {
- RIL_GW_SignalStrength GW_SignalStrength;
- RIL_CDMA_SignalStrength CDMA_SignalStrength;
- RIL_EVDO_SignalStrength EVDO_SignalStrength;
- RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
- RIL_TD_SCDMA_SignalStrength_CAF TD_SCDMA_SignalStrength;
- } RIL_SignalStrength_v9_CAF;
- typedef struct {
- RIL_GW_SignalStrength GW_SignalStrength;
- RIL_CDMA_SignalStrength CDMA_SignalStrength;
- RIL_EVDO_SignalStrength EVDO_SignalStrength;
- RIL_ATT_SignalStrength ATT_SignalStrength;
- RIL_LTE_SignalStrength LTE_SignalStrength;
- } RIL_SignalStrength_HTC;
- /** RIL_CellIdentityGsm */
- typedef struct {
- int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
- int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
- int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
- int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
- } RIL_CellIdentityGsm;
- /** RIL_CellIdentityWcdma */
- typedef struct {
- int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
- int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
- int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
- int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
- int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
- } RIL_CellIdentityWcdma;
- /** RIL_CellIdentityCdma */
- typedef struct {
- int networkId; /* Network Id 0..65535, INT_MAX if unknown */
- int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
- int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
- int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
- * It is represented in units of 0.25 seconds and ranges from -2592000
- * to 2592000, both values inclusive (corresponding to a range of -180
- * to +180 degrees). INT_MAX if unknown */
- int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
- * It is represented in units of 0.25 seconds and ranges from -1296000
- * to 1296000, both values inclusive (corresponding to a range of -90
- * to +90 degrees). INT_MAX if unknown */
- } RIL_CellIdentityCdma;
- /** RIL_CellIdentityLte */
- typedef struct {
- int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
- int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
- int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
- int pci; /* physical cell id 0..503, INT_MAX if unknown */
- int tac; /* 16-bit tracking area code, INT_MAX if unknown */
- } RIL_CellIdentityLte;
- /** RIL_CellInfoGsm */
- typedef struct {
- RIL_CellIdentityGsm cellIdentityGsm;
- RIL_GW_SignalStrength signalStrengthGsm;
- } RIL_CellInfoGsm;
- /** RIL_CellInfoWcdma */
- typedef struct {
- RIL_CellIdentityWcdma cellIdentityWcdma;
- RIL_SignalStrengthWcdma signalStrengthWcdma;
- } RIL_CellInfoWcdma;
- /** RIL_CellInfoCdma */
- typedef struct {
- RIL_CellIdentityCdma cellIdentityCdma;
- RIL_CDMA_SignalStrength signalStrengthCdma;
- RIL_EVDO_SignalStrength signalStrengthEvdo;
- } RIL_CellInfoCdma;
- /** RIL_CellInfoLte */
- typedef struct {
- RIL_CellIdentityLte cellIdentityLte;
- RIL_LTE_SignalStrength_v8 signalStrengthLte;
- } RIL_CellInfoLte;
- // Must be the same as CellInfo.TYPE_XXX
- typedef enum {
- RIL_CELL_INFO_TYPE_GSM = 1,
- RIL_CELL_INFO_TYPE_CDMA = 2,
- RIL_CELL_INFO_TYPE_LTE = 3,
- RIL_CELL_INFO_TYPE_WCDMA = 4,
- } RIL_CellInfoType;
- // Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
- typedef enum {
- RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
- RIL_TIMESTAMP_TYPE_ANTENNA = 1,
- RIL_TIMESTAMP_TYPE_MODEM = 2,
- RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
- RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
- } RIL_TimeStampType;
- typedef struct {
- RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
- int registered; /* !0 if this cell is registered 0 if not registered */
- RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
- uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
- union {
- RIL_CellInfoGsm gsm;
- RIL_CellInfoCdma cdma;
- RIL_CellInfoLte lte;
- RIL_CellInfoWcdma wcdma;
- } CellInfo;
- } RIL_CellInfo;
- /* Names of the CDMA info records (C.S0005 section 3.7.5) */
- typedef enum {
- RIL_CDMA_DISPLAY_INFO_REC,
- RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
- RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
- RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
- RIL_CDMA_SIGNAL_INFO_REC,
- RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
- RIL_CDMA_LINE_CONTROL_INFO_REC,
- RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
- RIL_CDMA_T53_CLIR_INFO_REC,
- RIL_CDMA_T53_RELEASE_INFO_REC,
- RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
- } RIL_CDMA_InfoRecName;
- /* Display Info Rec as defined in C.S0005 section 3.7.5.1
- Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
- Note: the Extended Display info rec contains multiple records of the
- form: display_tag, display_len, and display_len occurrences of the
- chari field if the display_tag is not 10000000 or 10000001.
- To save space, the records are stored consecutively in a byte buffer.
- The display_tag, display_len and chari fields are all 1 byte.
- */
- typedef struct {
- char alpha_len;
- char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
- } RIL_CDMA_DisplayInfoRecord;
- /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
- Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
- Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
- */
- typedef struct {
- char len;
- char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
- char number_type;
- char number_plan;
- char pi;
- char si;
- } RIL_CDMA_NumberInfoRecord;
- /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
- typedef enum {
- RIL_REDIRECTING_REASON_UNKNOWN = 0,
- RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
- RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
- RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
- RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
- RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
- RIL_REDIRECTING_REASON_RESERVED
- } RIL_CDMA_RedirectingReason;
- typedef struct {
- RIL_CDMA_NumberInfoRecord redirectingNumber;
- /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
- RIL_CDMA_RedirectingReason redirectingReason;
- } RIL_CDMA_RedirectingNumberInfoRecord;
- /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
- typedef struct {
- char lineCtrlPolarityIncluded;
- char lineCtrlToggle;
- char lineCtrlReverse;
- char lineCtrlPowerDenial;
- } RIL_CDMA_LineControlInfoRecord;
- /* T53 CLIR Information Record */
- typedef struct {
- char cause;
- } RIL_CDMA_T53_CLIRInfoRecord;
- /* T53 Audio Control Information Record */
- typedef struct {
- char upLink;
- char downLink;
- } RIL_CDMA_T53_AudioControlInfoRecord;
- typedef struct {
- RIL_CDMA_InfoRecName name;
- union {
- /* Display and Extended Display Info Rec */
- RIL_CDMA_DisplayInfoRecord display;
- /* Called Party Number, Calling Party Number, Connected Number Info Rec */
- RIL_CDMA_NumberInfoRecord number;
- /* Signal Info Rec */
- RIL_CDMA_SignalInfoRecord signal;
- /* Redirecting Number Info Rec */
- RIL_CDMA_RedirectingNumberInfoRecord redir;
- /* Line Control Info Rec */
- RIL_CDMA_LineControlInfoRecord lineCtrl;
- /* T53 CLIR Info Rec */
- RIL_CDMA_T53_CLIRInfoRecord clir;
- /* T53 Audio Control Info Rec */
- RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
- } rec;
- } RIL_CDMA_InformationRecord;
- #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
- typedef struct {
- char numberOfInfoRecs;
- RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
- } RIL_CDMA_InformationRecords;
- /* Data Call Profile: Simple IP User Profile Parameters*/
- typedef struct {
- int profileId;
- int priority; /* priority. [0..255], 0 - highest */
- } RIL_DataCallProfileInfo;
- typedef enum {
- SS_CFU,
- SS_CF_BUSY,
- SS_CF_NO_REPLY,
- SS_CF_NOT_REACHABLE,
- SS_CF_ALL,
- SS_CF_ALL_CONDITIONAL,
- SS_CLIP,
- SS_CLIR,
- SS_COLP,
- SS_COLR,
- SS_WAIT,
- SS_BAOC,
- SS_BAOIC,
- SS_BAOIC_EXC_HOME,
- SS_BAIC,
- SS_BAIC_ROAMING,
- SS_ALL_BARRING,
- SS_OUTGOING_BARRING,
- SS_INCOMING_BARRING
- } RIL_SsServiceType;
- typedef enum {
- SS_ACTIVATION,
- SS_DEACTIVATION,
- SS_INTERROGATION,
- SS_REGISTRATION,
- SS_ERASURE
- } RIL_SsRequestType;
- typedef enum {
- SS_ALL_TELE_AND_BEARER_SERVICES,
- SS_ALL_TELESEVICES,
- SS_TELEPHONY,
- SS_ALL_DATA_TELESERVICES,
- SS_SMS_SERVICES,
- SS_ALL_TELESERVICES_EXCEPT_SMS
- } RIL_SsTeleserviceType;
- #define SS_INFO_MAX 4
- #define NUM_SERVICE_CLASSES 7
- typedef struct {
- int numValidIndexes; /* This gives the number of valid values in cfInfo.
- For example if voice is forwarded to one number and data
- is forwarded to a different one then numValidIndexes will be
- 2 indicating total number of valid values in cfInfo.
- Similarly if all the services are forwarded to the same
- number then the value of numValidIndexes will be 1. */
- RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
- for SS request to query call
- forward status. see
- RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
- } RIL_CfData;
- typedef struct {
- RIL_SsServiceType serviceType;
- RIL_SsRequestType requestType;
- RIL_SsTeleserviceType teleserviceType;
- int serviceClass;
- RIL_Errno result;
- union {
- int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
- RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
- two ints, so first two values of ssInfo[] will be
- used for response if serviceType is SS_CLIR and
- requestType is SS_INTERROGATION */
- RIL_CfData cfData;
- };
- } RIL_StkCcUnsolSsResponse;
- /**
- * RIL_REQUEST_GET_SIM_STATUS
- *
- * Requests status of the SIM interface and the SIM card
- *
- * "data" is NULL
- *
- * "response" is const RIL_CardStatus_v6 *
- *
- * Valid errors:
- * Must never fail
- */
- #define RIL_REQUEST_GET_SIM_STATUS 1
- /**
- * RIL_REQUEST_ENTER_SIM_PIN
- *
- * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
- *
- * "data" is con…