Home | History | Annotate | Download | only in 1.0
      1 /*
      2  * Copyright (C) 2016 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 package android.hardware.radio@1.0;
     18 
     19 enum RadioConst : int32_t {
     20     CDMA_ALPHA_INFO_BUFFER_LENGTH = 64,
     21     CDMA_NUMBER_INFO_BUFFER_LENGTH = 81,
     22     MAX_RILDS = 3,
     23     MAX_SOCKET_NAME_LENGTH = 6,
     24     MAX_CLIENT_ID_LENGTH = 2,
     25     MAX_DEBUG_SOCKET_NAME_LENGTH = 12,
     26     MAX_QEMU_PIPE_NAME_LENGTH = 11,
     27     MAX_UUID_LENGTH = 64,
     28     CARD_MAX_APPS = 8,
     29     CDMA_MAX_NUMBER_OF_INFO_RECS = 10,
     30     SS_INFO_MAX = 4,
     31     NUM_SERVICE_CLASSES = 7,
     32     NUM_TX_POWER_LEVELS = 5,
     33 };
     34 
     35 enum RadioCdmaSmsConst : int32_t {
     36     ADDRESS_MAX = 36,
     37     SUBADDRESS_MAX = 36,
     38     BEARER_DATA_MAX = 255,
     39     UDH_MAX_SND_SIZE = 128,
     40     UDH_EO_DATA_SEGMENT_MAX = 131,
     41     MAX_UD_HEADERS = 7,
     42     USER_DATA_MAX = 229,
     43     UDH_LARGE_PIC_SIZE = 128,
     44     UDH_SMALL_PIC_SIZE = 32,
     45     UDH_VAR_PIC_SIZE = 134,
     46     UDH_ANIM_NUM_BITMAPS = 4,
     47     UDH_LARGE_BITMAP_SIZE = 32,
     48     UDH_SMALL_BITMAP_SIZE = 8,
     49     UDH_OTHER_SIZE = 226,
     50     IP_ADDRESS_SIZE = 4,
     51 };
     52 
     53 enum RadioError : int32_t {
     54     NONE = 0,                             // Success
     55     RADIO_NOT_AVAILABLE = 1,              // If radio did not start or is resetting
     56     GENERIC_FAILURE = 2,
     57     PASSWORD_INCORRECT = 3,               // for PIN/PIN2 methods only
     58     SIM_PIN2 = 4,                         // Operation requires SIM PIN2 to be entered
     59     SIM_PUK2 = 5,                         // Operation requires SIM PIN2 to be entered
     60     REQUEST_NOT_SUPPORTED = 6,
     61     CANCELLED = 7,
     62     OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, // data ops are not allowed during voice
     63                                           // call on a Class C GPRS device
     64     OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9,  // data ops are not allowed before device
     65                                           // registers in network
     66     SMS_SEND_FAIL_RETRY = 10,             // fail to send sms and need retry
     67     SIM_ABSENT = 11,                      // fail to set the location where CDMA subscription
     68                                           // shall be retrieved because of SIM or RUIM
     69                                           // card absent
     70     SUBSCRIPTION_NOT_AVAILABLE = 12,      // fail to find CDMA subscription from specified
     71                                           // location
     72     MODE_NOT_SUPPORTED = 13,              // HW does not support preferred network type
     73     FDN_CHECK_FAILURE = 14,               // command failed because recipient is not on FDN list
     74     ILLEGAL_SIM_OR_ME = 15,               // network selection failed due to illegal SIM or ME
     75     MISSING_RESOURCE = 16,                // no logical channel available
     76     NO_SUCH_ELEMENT = 17,                 // application not found on SIM
     77     DIAL_MODIFIED_TO_USSD = 18,           // DIAL request modified to USSD
     78     DIAL_MODIFIED_TO_SS = 19,             // DIAL request modified to SS
     79     DIAL_MODIFIED_TO_DIAL = 20,           // DIAL request modified to DIAL with different data
     80     USSD_MODIFIED_TO_DIAL = 21,           // USSD request modified to DIAL
     81     USSD_MODIFIED_TO_SS = 22,             // USSD request modified to SS
     82     USSD_MODIFIED_TO_USSD = 23,           // USSD request modified to different USSD request
     83     SS_MODIFIED_TO_DIAL = 24,             // SS request modified to DIAL
     84     SS_MODIFIED_TO_USSD = 25,             // SS request modified to USSD
     85     SUBSCRIPTION_NOT_SUPPORTED = 26,      // Subscription not supported by RIL
     86     SS_MODIFIED_TO_SS = 27,               // SS request modified to different SS request
     87     LCE_NOT_SUPPORTED = 36,               // LCE service not supported(36 in RILConstants.java)
     88     NO_MEMORY = 37,                       // Not sufficient memory to process the request
     89     INTERNAL_ERR = 38,                    // Modem hit unexpected error scenario while handling
     90                                           // this request
     91     SYSTEM_ERR = 39,                      // Hit platform or system error
     92     MODEM_ERR = 40,                       // Vendor RIL got unexpected or incorrect response
     93                                           // from modem for this request
     94     INVALID_STATE = 41,                   // Unexpected request for the current state
     95     NO_RESOURCES = 42,                    // Not sufficient resource to process the request
     96     SIM_ERR = 43,                         // Received error from SIM card
     97     INVALID_ARGUMENTS = 44,               // Received invalid arguments in request
     98     INVALID_SIM_STATE = 45,               // Cannot process the request in current SIM state
     99     INVALID_MODEM_STATE = 46,             // Cannot process the request in current Modem state
    100     INVALID_CALL_ID = 47,                 // Received invalid call id in request
    101     NO_SMS_TO_ACK = 48,                   // ACK received when there is no SMS to ack
    102     NETWORK_ERR = 49,                     // Received error from network
    103     REQUEST_RATE_LIMITED = 50,            // Operation denied due to overly-frequent requests
    104     SIM_BUSY = 51,                        // SIM is busy
    105     SIM_FULL = 52,                        // The target EF is full
    106     NETWORK_REJECT = 53,                  // Request is rejected by network
    107     OPERATION_NOT_ALLOWED = 54,           // Not allowed the request now
    108     EMPTY_RECORD = 55,                    // The request record is empty
    109     INVALID_SMS_FORMAT = 56,              // Invalid sms format
    110     ENCODING_ERR = 57,                    // Message not encoded properly
    111     INVALID_SMSC_ADDRESS = 58,            // SMSC address specified is invalid
    112     NO_SUCH_ENTRY = 59,                   // No such entry present to perform the request
    113     NETWORK_NOT_READY = 60,               // Network is not ready to perform the request
    114     NOT_PROVISIONED = 61,                 // Device does not have this value provisioned
    115     NO_SUBSCRIPTION = 62,                 // Device does not have subscription
    116     NO_NETWORK_FOUND = 63,                // Network cannot be found
    117     DEVICE_IN_USE = 64,                   // Operation cannot be performed because the device
    118                                           // is currently in use
    119     ABORTED = 65,                         // Operation aborted
    120     INVALID_RESPONSE = 66,                // Response from vendor had invalid data
    121 
    122     OEM_ERROR_1 = 501,
    123     OEM_ERROR_2 = 502,
    124     OEM_ERROR_3 = 503,
    125     OEM_ERROR_4 = 504,
    126     OEM_ERROR_5 = 505,
    127     OEM_ERROR_6 = 506,
    128     OEM_ERROR_7 = 507,
    129     OEM_ERROR_8 = 508,
    130     OEM_ERROR_9 = 509,
    131     OEM_ERROR_10 = 510,
    132     OEM_ERROR_11 = 511,
    133     OEM_ERROR_12 = 512,
    134     OEM_ERROR_13 = 513,
    135     OEM_ERROR_14 = 514,
    136     OEM_ERROR_15 = 515,
    137     OEM_ERROR_16 = 516,
    138     OEM_ERROR_17 = 517,
    139     OEM_ERROR_18 = 518,
    140     OEM_ERROR_19 = 519,
    141     OEM_ERROR_20 = 520,
    142     OEM_ERROR_21 = 521,
    143     OEM_ERROR_22 = 522,
    144     OEM_ERROR_23 = 523,
    145     OEM_ERROR_24 = 524,
    146     OEM_ERROR_25 = 525,
    147 };
    148 
    149 enum RadioResponseType : int32_t {
    150     SOLICITED,
    151     SOLICITED_ACK,
    152     SOLICITED_ACK_EXP,
    153 };
    154 
    155 enum RadioIndicationType : int32_t {
    156     UNSOLICITED,
    157     UNSOLICITED_ACK_EXP,
    158 };
    159 
    160 enum RestrictedState : int32_t {
    161     NONE = 0x00,
    162     CS_EMERGENCY = 0x01,
    163     CS_NORMAL = 0x02,
    164     CS_ALL = 0x04,
    165     PS_ALL = 0x10,
    166 };
    167 
    168 enum CardState : int32_t {
    169     ABSENT,
    170     PRESENT,
    171     ERROR,
    172     RESTRICTED,                           // card is present but not usable due to carrier
    173                                           // restrictions
    174 };
    175 
    176 enum PinState : int32_t {
    177     UNKNOWN,
    178     ENABLED_NOT_VERIFIED,
    179     ENABLED_VERIFIED,
    180     DISABLED,
    181     ENABLED_BLOCKED,
    182     ENABLED_PERM_BLOCKED,
    183 };
    184 
    185 enum AppType : int32_t {
    186     UNKNOWN,
    187     SIM,
    188     USIM,
    189     RUIM,
    190     CSIM,
    191     ISIM,
    192 };
    193 
    194 enum AppState : int32_t {
    195     UNKNOWN,
    196     DETECTED,
    197     PIN,                                  // If PIN1 or UPin is required
    198     PUK,                                  // If PUK1 or Puk for UPin is required
    199     SUBSCRIPTION_PERSO,                   // perso_substate must be look at when app_state is
    200                                           // assigned to this value
    201     READY,
    202 };
    203 
    204 enum PersoSubstate : int32_t {
    205     UNKNOWN,                              // initial state
    206     IN_PROGRESS,                          // in between each lock transition
    207     READY,                                // when either SIM or RUIM Perso is finished since each
    208                                           // app must only have 1 active perso involved
    209     SIM_NETWORK,
    210     SIM_NETWORK_SUBSET,
    211     SIM_CORPORATE,
    212     SIM_SERVICE_PROVIDER,
    213     SIM_SIM,
    214     SIM_NETWORK_PUK,                      // The corresponding perso lock is blocked
    215     SIM_NETWORK_SUBSET_PUK,
    216     SIM_CORPORATE_PUK,
    217     SIM_SERVICE_PROVIDER_PUK,
    218     SIM_SIM_PUK,
    219     RUIM_NETWORK1,
    220     RUIM_NETWORK2,
    221     RUIM_HRPD,
    222     RUIM_CORPORATE,
    223     RUIM_SERVICE_PROVIDER,
    224     RUIM_RUIM,
    225     RUIM_NETWORK1_PUK,                    // The corresponding perso lock is blocked
    226     RUIM_NETWORK2_PUK,
    227     RUIM_HRPD_PUK,
    228     RUIM_CORPORATE_PUK,
    229     RUIM_SERVICE_PROVIDER_PUK,
    230     RUIM_RUIM_PUK,
    231 };
    232 
    233 enum RadioState : int32_t {
    234     OFF = 0,                              // Radio explicitly powered off (eg CFUN=0)
    235     UNAVAILABLE = 1,                      // Radio unavailable (eg, resetting or not booted)
    236     ON = 10,                              // Radio is ON
    237 };
    238 
    239 enum SapConnectRsp : int32_t {
    240     SUCCESS,
    241     CONNECT_FAILURE,
    242     MSG_SIZE_TOO_LARGE,
    243     MSG_SIZE_TOO_SMALL,
    244     CONNECT_OK_CALL_ONGOING,
    245 };
    246 
    247 enum SapDisconnectType : int32_t {
    248     GRACEFUL,
    249     IMMEDIATE,
    250 };
    251 
    252 enum SapApduType : int32_t {
    253     APDU,
    254     APDU7816,
    255 };
    256 
    257 enum SapResultCode : int32_t {
    258     SUCCESS,
    259     GENERIC_FAILURE,
    260     CARD_NOT_ACCESSSIBLE,
    261     CARD_ALREADY_POWERED_OFF,
    262     CARD_REMOVED,
    263     CARD_ALREADY_POWERED_ON,
    264     DATA_NOT_AVAILABLE,
    265     NOT_SUPPORTED,
    266 };
    267 
    268 enum SapStatus : int32_t {
    269     UNKNOWN_ERROR,
    270     CARD_RESET,
    271     CARD_NOT_ACCESSIBLE,
    272     CARD_REMOVED,
    273     CARD_INSERTED,
    274     RECOVERED,
    275 };
    276 
    277 enum SapTransferProtocol : int32_t {
    278     T0,
    279     T1,
    280 };
    281 
    282 enum CallState : int32_t {
    283     ACTIVE,
    284     HOLDING,
    285     DIALING,                              // MO call only
    286     ALERTING,                             // MO call only
    287     INCOMING,                             // MT call only
    288     WAITING,                              // MT call only
    289 };
    290 
    291 /**
    292  * User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0
    293  */
    294 enum UusType : int32_t {
    295     TYPE1_IMPLICIT,
    296     TYPE1_REQUIRED,
    297     TYPE1_NOT_REQUIRED,
    298     TYPE2_REQUIRED,
    299     TYPE2_NOT_REQUIRED,
    300     TYPE3_REQUIRED,
    301     TYPE3_NOT_REQUIRED,
    302 };
    303 
    304 /**
    305  * User-to-User Signaling Information data coding schemes. Possible values for
    306  * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
    307  * specified in section 10.5.4.25 of 3GPP TS 24.008
    308  */
    309 enum UusDcs : int32_t {
    310     USP,                                  // User specified protocol
    311     OSIHLP,                               // OSI higher layer protocol
    312     X244,                                 // X.244
    313     RMCF,                                 // Reserved for system management convergence function
    314     IA5C,                                 // IA5 characters
    315 };
    316 
    317 enum CallPresentation : int32_t {
    318     ALLOWED,
    319     RESTRICTED,
    320     UNKNOWN,
    321     PAYPHONE,
    322 };
    323 
    324 enum Clir : int32_t {
    325     DEFAULT,                              // "use subscription default value"
    326     INVOCATION,                           // restrict CLI presentation
    327     SUPPRESSION,                          // allow CLI presentation
    328 };
    329 
    330 enum LastCallFailCause : int32_t {
    331     UNOBTAINABLE_NUMBER = 1,
    332     NO_ROUTE_TO_DESTINATION = 3,
    333     CHANNEL_UNACCEPTABLE = 6,
    334     OPERATOR_DETERMINED_BARRING = 8,
    335     NORMAL = 16,
    336     BUSY = 17,
    337     NO_USER_RESPONDING = 18,
    338     NO_ANSWER_FROM_USER = 19,
    339     CALL_REJECTED = 21,
    340     NUMBER_CHANGED = 22,
    341     PREEMPTION = 25,
    342     DESTINATION_OUT_OF_ORDER = 27,
    343     INVALID_NUMBER_FORMAT = 28,
    344     FACILITY_REJECTED = 29,
    345     RESP_TO_STATUS_ENQUIRY = 30,
    346     NORMAL_UNSPECIFIED = 31,
    347     CONGESTION = 34,
    348     NETWORK_OUT_OF_ORDER = 38,
    349     TEMPORARY_FAILURE = 41,
    350     SWITCHING_EQUIPMENT_CONGESTION = 42,
    351     ACCESS_INFORMATION_DISCARDED = 43,
    352     REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
    353     RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
    354     QOS_UNAVAILABLE = 49,
    355     REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
    356     INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
    357     BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
    358     BEARER_CAPABILITY_UNAVAILABLE = 58,
    359     SERVICE_OPTION_NOT_AVAILABLE = 63,
    360     BEARER_SERVICE_NOT_IMPLEMENTED = 65,
    361     ACM_LIMIT_EXCEEDED = 68,
    362     REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
    363     ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
    364     SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
    365     INVALID_TRANSACTION_IDENTIFIER = 81,
    366     USER_NOT_MEMBER_OF_CUG = 87,
    367     INCOMPATIBLE_DESTINATION = 88,
    368     INVALID_TRANSIT_NW_SELECTION = 91,
    369     SEMANTICALLY_INCORRECT_MESSAGE = 95,
    370     INVALID_MANDATORY_INFORMATION = 96,
    371     MESSAGE_TYPE_NON_IMPLEMENTED = 97,
    372     MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
    373     INFORMATION_ELEMENT_NON_EXISTENT = 99,
    374     CONDITIONAL_IE_ERROR = 100,
    375     MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
    376     RECOVERY_ON_TIMER_EXPIRED = 102,
    377     PROTOCOL_ERROR_UNSPECIFIED = 111,
    378     INTERWORKING_UNSPECIFIED = 127,
    379     CALL_BARRED = 240,
    380     FDN_BLOCKED = 241,
    381     IMSI_UNKNOWN_IN_VLR = 242,
    382     IMEI_NOT_ACCEPTED = 243,
    383     DIAL_MODIFIED_TO_USSD = 244,          // STK Call Control
    384     DIAL_MODIFIED_TO_SS = 245,
    385     DIAL_MODIFIED_TO_DIAL = 246,
    386     RADIO_OFF = 247,                      // Radio is OFF
    387     OUT_OF_SERVICE = 248,                 // No cellular coverage
    388     NO_VALID_SIM = 249,                   // No valid SIM is present
    389     RADIO_INTERNAL_ERROR = 250,           // Internal error at Modem
    390     NETWORK_RESP_TIMEOUT = 251,           // No response from network
    391     NETWORK_REJECT = 252,                 // Explicit network reject
    392     RADIO_ACCESS_FAILURE = 253,           // RRC connection failure. Eg.RACH
    393     RADIO_LINK_FAILURE = 254,             // Radio Link Failure
    394     RADIO_LINK_LOST = 255,                // Radio link lost due to poor coverage
    395     RADIO_UPLINK_FAILURE = 256,           // Radio uplink failure
    396     RADIO_SETUP_FAILURE = 257,            // RRC connection setup failure
    397     RADIO_RELEASE_NORMAL = 258,           // RRC connection release, normal
    398     RADIO_RELEASE_ABNORMAL = 259,         // RRC connection release, abnormal
    399     ACCESS_CLASS_BLOCKED = 260,           // Access class barring
    400     NETWORK_DETACH = 261,                 // Explicit network detach
    401     CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
    402     CDMA_DROP = 1001,
    403     CDMA_INTERCEPT = 1002,
    404     CDMA_REORDER = 1003,
    405     CDMA_SO_REJECT = 1004,
    406     CDMA_RETRY_ORDER = 1005,
    407     CDMA_ACCESS_FAILURE = 1006,
    408     CDMA_PREEMPTED = 1007,
    409     CDMA_NOT_EMERGENCY = 1008,            // For non-emergency number dialed during emergency
    410                                           // callback mode
    411     CDMA_ACCESS_BLOCKED = 1009,
    412 
    413     /**
    414      * OEM specific error codes. Used to distinguish error from
    415      * CALL_FAIL_ERROR_UNSPECIFIED and help assist debugging */
    416     OEM_CAUSE_1 = 0xf001,
    417     OEM_CAUSE_2 = 0xf002,
    418     OEM_CAUSE_3 = 0xf003,
    419     OEM_CAUSE_4 = 0xf004,
    420     OEM_CAUSE_5 = 0xf005,
    421     OEM_CAUSE_6 = 0xf006,
    422     OEM_CAUSE_7 = 0xf007,
    423     OEM_CAUSE_8 = 0xf008,
    424     OEM_CAUSE_9 = 0xf009,
    425     OEM_CAUSE_10 = 0xf00a,
    426     OEM_CAUSE_11 = 0xf00b,
    427     OEM_CAUSE_12 = 0xf00c,
    428     OEM_CAUSE_13 = 0xf00d,
    429     OEM_CAUSE_14 = 0xf00e,
    430     OEM_CAUSE_15 = 0xf00f,
    431 
    432     ERROR_UNSPECIFIED = 0xffff,           // This error will be deprecated soon,
    433                                           // vendor code must make sure to map error
    434                                           // code to specific error
    435 };
    436 
    437 enum DataCallFailCause : int32_t {
    438     NONE = 0,                             // an integer cause code defined in TS 24.008
    439                                           // section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
    440                                           // If the implementation does not have access to the exact
    441                                           // cause codes, then it must return one of the
    442                                           // following values, as the UI layer needs to distinguish
    443                                           // these cases for error notification and potential
    444                                           // retries.
    445     OPERATOR_BARRED = 0x08,               // no retry
    446     NAS_SIGNALLING = 0x0E,                // PDP_FAIL_LLC_SNDCP = 0x19,
    447     INSUFFICIENT_RESOURCES = 0x1A,
    448     MISSING_UKNOWN_APN = 0x1B,            // no retry
    449     UNKNOWN_PDP_ADDRESS_TYPE = 0x1C,      // no retry
    450     USER_AUTHENTICATION = 0x1D,           // no retry
    451     ACTIVATION_REJECT_GGSN = 0x1E,        // no retry
    452     ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
    453     SERVICE_OPTION_NOT_SUPPORTED = 0x20,  // no retry
    454     SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, // no retry
    455     SERVICE_OPTION_OUT_OF_ORDER = 0x22,
    456     NSAPI_IN_USE = 0x23,                  // no retry
    457     REGULAR_DEACTIVATION = 0x24,          // possibly restart radio,
    458                                           // based on framework config
    459     QOS_NOT_ACCEPTED = 0x25,
    460     NETWORK_FAILURE = 0x26,
    461     UMTS_REACTIVATION_REQ = 0x27,
    462     FEATURE_NOT_SUPP = 0x28,
    463     TFT_SEMANTIC_ERROR = 0x29,
    464     TFT_SYTAX_ERROR = 0x2A,
    465     UNKNOWN_PDP_CONTEXT = 0x2B,
    466     FILTER_SEMANTIC_ERROR = 0x2C,
    467     FILTER_SYTAX_ERROR = 0x2D,
    468     PDP_WITHOUT_ACTIVE_TFT = 0x2E,
    469     ONLY_IPV4_ALLOWED = 0x32,             // no retry
    470     ONLY_IPV6_ALLOWED = 0x33,             // no retry
    471     ONLY_SINGLE_BEARER_ALLOWED = 0x34,
    472     ESM_INFO_NOT_RECEIVED = 0x35,
    473     PDN_CONN_DOES_NOT_EXIST = 0x36,
    474     MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
    475     MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
    476     UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
    477     INVALID_TRANSACTION_ID = 0x51,
    478     MESSAGE_INCORRECT_SEMANTIC = 0x5F,
    479     INVALID_MANDATORY_INFO = 0x60,
    480     MESSAGE_TYPE_UNSUPPORTED = 0x61,
    481     MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
    482     UNKNOWN_INFO_ELEMENT = 0x63,
    483     CONDITIONAL_IE_ERROR = 0x64,
    484     MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
    485     PROTOCOL_ERRORS = 0x6F,               // no retry
    486     APN_TYPE_CONFLICT = 0x70,
    487     INVALID_PCSCF_ADDR = 0x71,
    488     INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
    489     EMM_ACCESS_BARRED = 0x73,
    490     EMERGENCY_IFACE_ONLY = 0x74,
    491     IFACE_MISMATCH = 0x75,
    492     COMPANION_IFACE_IN_USE = 0x76,
    493     IP_ADDRESS_MISMATCH = 0x77,
    494     IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
    495     EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
    496     AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
    497     OEM_DCFAILCAUSE_1 = 0x1001,
    498 
    499     OEM_DCFAILCAUSE_2 = 0x1002,
    500     OEM_DCFAILCAUSE_3 = 0x1003,
    501     OEM_DCFAILCAUSE_4 = 0x1004,
    502     OEM_DCFAILCAUSE_5 = 0x1005,
    503     OEM_DCFAILCAUSE_6 = 0x1006,
    504     OEM_DCFAILCAUSE_7 = 0x1007,
    505     OEM_DCFAILCAUSE_8 = 0x1008,
    506     OEM_DCFAILCAUSE_9 = 0x1009,
    507     OEM_DCFAILCAUSE_10 = 0x100A,
    508     OEM_DCFAILCAUSE_11 = 0x100B,
    509     OEM_DCFAILCAUSE_12 = 0x100C,
    510     OEM_DCFAILCAUSE_13 = 0x100D,
    511     OEM_DCFAILCAUSE_14 = 0x100E,
    512     OEM_DCFAILCAUSE_15 = 0x100F,
    513 
    514     // Not mentioned in the specification
    515     VOICE_REGISTRATION_FAIL = -1,
    516     DATA_REGISTRATION_FAIL = -2,
    517 
    518     // reasons for data call drop - network/modem disconnect
    519     SIGNAL_LOST = -3,
    520     PREF_RADIO_TECH_CHANGED = -4,         // preferred technology has changed, must retry
    521                                           // with parameters appropriate for new technology
    522     RADIO_POWER_OFF = -5,                 // data call was disconnected because radio was resetting,
    523                                           // powered off - no retry
    524     TETHERED_CALL_ACTIVE = -6,            // data call was disconnected by modem because tethered
    525                                           // mode was up on same APN/data profile - no retry until
    526                                           // tethered call is off
    527     ERROR_UNSPECIFIED = 0xffff,
    528 };
    529 
    530 /**
    531  * Please note that registration state UNKNOWN is
    532  * treated as "out of service" in the Android telephony.
    533  * Registration state REG_DENIED must be returned if Location Update
    534  * Reject (with cause 17 - Network Failure) is received
    535  * repeatedly from the network, to facilitate
    536  * "managed roaming"
    537  */
    538 enum RegState : int32_t {
    539     NOT_REG_MT_NOT_SEARCHING_OP = 0,      // Not registered, MT is not currently searching
    540                                           // a new operator to register
    541     REG_HOME = 1,                         // Registered, home network
    542     NOT_REG_MT_SEARCHING_OP = 2,          // Not registered, but MT is currently searching
    543                                           // a new operator to register
    544     REG_DENIED = 3,                       // Registration denied
    545     UNKNOWN = 4,                          // Unknown
    546     REG_ROAMING = 5,                      // Registered, roaming
    547     NOT_REG_MT_NOT_SEARCHING_OP_EM = 10,  // Same as NOT_REG_MT_NOT_SEARCHING_OP but indicates that
    548                                           // emergency calls are enabled.
    549     NOT_REG_MT_SEARCHING_OP_EM = 12,      // Same as NOT_REG_MT_SEARCHING_OP but indicates that
    550                                           // emergency calls are enabled.
    551     REG_DENIED_EM = 13,                   // Same as REG_DENIED but indicates that
    552                                           // emergency calls are enabled.
    553     UNKNOWN_EM = 14,                      // Same as UNKNOWN but indicates that
    554                                           // emergency calls are enabled.
    555 };
    556 
    557 enum RadioTechnology : int32_t {
    558     UNKNOWN = 0,
    559     GPRS = 1,
    560     EDGE = 2,
    561     UMTS = 3,
    562     IS95A = 4,
    563     IS95B = 5,
    564     ONE_X_RTT = 6,
    565     EVDO_0 = 7,
    566     EVDO_A = 8,
    567     HSDPA = 9,
    568     HSUPA = 10,
    569     HSPA = 11,
    570     EVDO_B = 12,
    571     EHRPD = 13,
    572     LTE = 14,
    573     HSPAP = 15,                           // HSPA+
    574     GSM = 16,                             // Only supports voice
    575     TD_SCDMA = 17,
    576     IWLAN = 18,
    577     LTE_CA = 19,
    578 };
    579 
    580 enum DataProfileId : int32_t {
    581     DEFAULT = 0,
    582     TETHERED = 1,
    583     IMS = 2,
    584     FOTA = 3,
    585     CBS = 4,
    586     OEM_BASE = 1000,                      // Start of OEM-specific profiles
    587     INVALID = 0xFFFFFFFF,
    588 };
    589 
    590 enum SmsAcknowledgeFailCause : int32_t {
    591     MEMORY_CAPACITY_EXCEEDED = 0xD3,
    592     UNSPECIFIED_ERROR = 0XFF,
    593 };
    594 
    595 enum CallForwardInfoStatus : int32_t {
    596     DISABLE,
    597     ENABLE,
    598     INTERROGATE,
    599     REGISTRATION,
    600     ERASURE,
    601 };
    602 
    603 enum ClipStatus : int32_t {
    604     CLIP_PROVISIONED,                     // CLIP provisioned
    605     CLIP_UNPROVISIONED,                   // CLIP not provisioned
    606     UNKNOWN,                              // unknown, e.g. no network etc
    607 };
    608 
    609 enum SmsWriteArgsStatus : int32_t {
    610     REC_UNREAD,
    611     REC_READ,
    612     STO_UNSENT,
    613     STO_SENT,
    614 };
    615 
    616 enum RadioBandMode : int32_t  {
    617     BAND_MODE_UNSPECIFIED,                // "unspecified" (selected by baseband automatically)
    618     BAND_MODE_EURO,                       // "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
    619     BAND_MODE_USA,                        // "US band"
    620                                           // (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
    621     BAND_MODE_JPN,                        // "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
    622     BAND_MODE_AUS,                        // "AUS band"
    623                                           // (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
    624     BAND_MODE_AUS_2,                      // "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
    625     BAND_MODE_CELL_800,                   // "Cellular" (800-MHz Band)
    626     BAND_MODE_PCS,                        // "PCS" (1900-MHz Band)
    627     BAND_MODE_JTACS,                      // "Band Class 3" (JTACS Band)
    628     BAND_MODE_KOREA_PCS,                  // "Band Class 4" (Korean PCS Band)
    629     BAND_MODE_5_450M,                     // "Band Class 5" (450-MHz Band)
    630     BAND_MODE_IMT2000,                    // "Band Class 6" (2-GMHz IMT2000 Band)
    631     BAND_MODE_7_700M_2,                   // "Band Class 7" (Upper 700-MHz Band)
    632     BAND_MODE_8_1800M,                    // "Band Class 8" (1800-MHz Band)
    633     BAND_MODE_9_900M,                     // "Band Class 9" (900-MHz Band)
    634     BAND_MODE_10_800M_2,                  // "Band Class 10" (Secondary 800-MHz Band)
    635     BAND_MODE_EURO_PAMR_400M,             // "Band Class 11" (400-MHz European PAMR Band)
    636     BAND_MODE_AWS,                        // "Band Class 15" (AWS Band)
    637     BAND_MODE_USA_2500M,                  // "Band Class 16" (US 2.5-GHz Band)
    638 };
    639 
    640 enum OperatorStatus : int32_t {
    641     UNKNOWN,
    642     AVAILABLE,
    643     CURRENT,
    644     FORBIDDEN,
    645 };
    646 
    647 enum PreferredNetworkType : int32_t {
    648     GSM_WCDMA,                            // GSM/WCDMA (WCDMA preferred)
    649     GSM_ONLY,                             // GSM only
    650     WCDMA,                                // WCDMA
    651     GSM_WCDMA_AUTO,                       // GSM/WCDMA (auto mode, according to PRL)
    652     CDMA_EVDO_AUTO,                       // CDMA and EvDo (auto mode, according to PRL)
    653     CDMA_ONLY,                            // CDMA only
    654     EVDO_ONLY,                            // EvDo only
    655     GSM_WCDMA_CDMA_EVDO_AUTO,             // GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
    656     LTE_CDMA_EVDO,                        // LTE, CDMA and EvDo
    657     LTE_GSM_WCDMA,                        // LTE, GSM/WCDMA
    658     LTE_CMDA_EVDO_GSM_WCDMA,              // LTE, CDMA, EvDo, GSM/WCDMA
    659     LTE_ONLY,                             // LTE only
    660     LTE_WCDMA,                            // LTE/WCDMA
    661     TD_SCDMA_ONLY,                        // TD-SCDMA only
    662     TD_SCDMA_WCDMA,                       // TD-SCDMA and WCDMA
    663     TD_SCDMA_LTE,                         // TD-SCDMA and LTE
    664     TD_SCDMA_GSM,                         // TD-SCDMA and GSM
    665     TD_SCDMA_GSM_LTE,                     // TD-SCDMA,GSM and LTE
    666     TD_SCDMA_GSM_WCDMA,                   // TD-SCDMA, GSM/WCDMA
    667     TD_SCDMA_WCDMA_LTE,                   // TD-SCDMA, WCDMA and LTE
    668     TD_SCDMA_GSM_WCDMA_LTE,               // TD-SCDMA, GSM/WCDMA and LTE
    669     TD_SCDMA_GSM_WCDMA_CDMA_EVDO_AUTO,    // TD-SCDMA, GSM/WCDMA, CDMA and EvDo
    670     TD_SCDMA_LTE_CDMA_EVDO_GSM_WCDMA,     // TD-SCDMA, LTE, CDMA, EvDo GSM/WCDMA
    671 };
    672 
    673 enum CdmaSubscriptionSource : int32_t {
    674     RUIM_SIM,
    675     NV,
    676 };
    677 
    678 enum CdmaRoamingType : int32_t {
    679     HOME_NETWORK,
    680     AFFILIATED_ROAM,
    681     ANY_ROAM,
    682 };
    683 
    684 enum TtyMode : int32_t {
    685     OFF,
    686     FULL,
    687     HCO,                                  // Hearing carryover
    688     VCO,                                  // Voice carryover
    689 };
    690 
    691 enum NvItem : int32_t {
    692     // CDMA radio and account information (items 1-10)
    693     CDMA_MEID = 1,                        // CDMA MEID (hex)
    694     CDMA_MIN = 2,                         // CDMA MIN (MSID)
    695     CDMA_MDN = 3,                         // CDMA MDN
    696     CDMA_ACCOLC = 4,                      // CDMA access overload control
    697 
    698     // Carrier device provisioning (items 11-30)
    699     DEVICE_MSL = 11,                      // device MSL
    700     RTN_RECONDITIONED_STATUS = 12,        // RTN reconditioned status
    701     RTN_ACTIVATION_DATE = 13,             // RTN activation date
    702     RTN_LIFE_TIMER = 14,                  // RTN life timer
    703     RTN_LIFE_CALLS = 15,                  // RTN life calls
    704     RTN_LIFE_DATA_TX = 16,                // RTN life data TX
    705     RTN_LIFE_DATA_RX = 17,                // RTN life data RX
    706     OMADM_HFA_LEVEL = 18,                 // HFA in progress
    707 
    708     // Mobile IP profile information (items 31-50)
    709     MIP_PROFILE_NAI = 31,                 // NAI realm
    710     MIP_PROFILE_HOME_ADDRESS = 32,        // MIP home address
    711     MIP_PROFILE_AAA_AUTH = 33,            // AAA auth
    712     MIP_PROFILE_HA_AUTH = 34,             // HA auth
    713     MIP_PROFILE_PRI_HA_ADDR = 35,         // primary HA address
    714     MIP_PROFILE_SEC_HA_ADDR = 36,         // secondary HA address
    715     MIP_PROFILE_REV_TUN_PREF = 37,        // reverse TUN preference
    716     MIP_PROFILE_HA_SPI = 38,              // HA SPI
    717     MIP_PROFILE_AAA_SPI = 39,             // AAA SPI
    718     MIP_PROFILE_MN_HA_SS = 40,            // HA shared secret
    719     MIP_PROFILE_MN_AAA_SS = 41,           // AAA shared secret
    720 
    721     // CDMA network and band config (items 51-70)
    722     CDMA_PRL_VERSION = 51,                // CDMA PRL version
    723     CDMA_BC10 = 52,                       // CDMA band class 10
    724     CDMA_BC14 = 53,                       // CDMA band class 14
    725     CDMA_SO68 = 54,                       // CDMA SO68
    726     CDMA_SO73_COP0 = 55,                  // CDMA SO73 COP0
    727     CDMA_SO73_COP1TO7 = 56,               // CDMA SO73 COP1-7
    728     CDMA_1X_ADVANCED_ENABLED = 57,        // CDMA 1X Advanced enabled
    729     CDMA_EHRPD_ENABLED = 58,              // CDMA eHRPD enabled
    730     CDMA_EHRPD_FORCED = 59,               // CDMA eHRPD forced
    731 
    732     // LTE network and band config (items 71-90)
    733     LTE_BAND_ENABLE_25 = 71,              // LTE band 25 enable
    734     LTE_BAND_ENABLE_26 = 72,              // LTE band 26 enable
    735     LTE_BAND_ENABLE_41 = 73,              // LTE band 41 enable
    736 
    737     LTE_SCAN_PRIORITY_25 = 74,            // LTE band 25 scan priority
    738     LTE_SCAN_PRIORITY_26 = 75,            // LTE band 26 scan priority
    739     LTE_SCAN_PRIORITY_41 = 76,            // LTE band 41 scan priority
    740 
    741     LTE_HIDDEN_BAND_PRIORITY_25 = 77,     // LTE hidden band 25 priority
    742     LTE_HIDDEN_BAND_PRIORITY_26 = 78,     // LTE hidden band 26 priority
    743     LTE_HIDDEN_BAND_PRIORITY_41 = 79,     // LTE hidden band 41 priority
    744 };
    745 
    746 enum ResetNvType : int32_t {
    747     RELOAD,                               // reload all NV items
    748     ERASE,                                // erase NV reset (SCRTN)
    749     FACTORY_RESET,                        // factory reset (RTN)
    750 };
    751 
    752 enum HardwareConfigType : int32_t {
    753     MODEM,
    754     SIM,
    755 };
    756 
    757 enum HardwareConfigState : int32_t {
    758     ENABLED,
    759     STANDBY,
    760     DISABLED,
    761 };
    762 
    763 enum LceStatus : int32_t {
    764     NOT_SUPPORTED,
    765     STOPPED,
    766     ACTIVE
    767 };
    768 
    769 enum CarrierMatchType : int32_t {
    770     ALL = 0,                              // Apply to all carriers with the same mcc/mnc
    771     SPN = 1,                              // Use SPN and mcc/mnc to identify the carrier
    772     IMSI_PREFIX = 2,                      // Use IMSI prefix and mcc/mnc to identify the carrier
    773     GID1 = 3,                             // Use GID1 and mcc/mnc to identify the carrier
    774     GID2 = 4,                             // Use GID2 and mcc/mnc to identify the carrier
    775 };
    776 
    777 struct NeighboringCell {
    778     string cid;                           // Combination of LAC and Cell Id in 32 bits in GSM.
    779                                           // Upper 16 bits is LAC and lower 16 bits
    780                                           // is CID (as described in TS 27.005)
    781                                           // Primary Scrambling Code (as described in TS 25.331)
    782                                           // in 9 bits in UMTS
    783                                           // Valid values are hexadecimal 0x0000 - 0xffffffff.
    784     int32_t rssi;                         // Received RSSI in GSM,
    785                                           // Level index of CPICH Received Signal Code Power in UMTS
    786 };
    787 
    788 enum CdmaSmsDigitMode : int32_t {
    789     FOUR_BIT,                             // DTMF digits
    790     EIGHT_BIT,
    791 };
    792 
    793 enum CdmaSmsNumberMode : int32_t {
    794     NOT_DATA_NETWORK,
    795     DATA_NETWORK,
    796 };
    797 
    798 enum CdmaSmsNumberType : int32_t {
    799     UNKNOWN,
    800     INTERNATIONAL_OR_DATA_IP,             // INTERNATIONAL is used when number mode is not data
    801                                           // network
    802                                           // address. DATA_IP is used when the number mode is data
    803                                           // network address
    804     NATIONAL_OR_INTERNET_MAIL,            // NATIONAL is used when the number mode is not data
    805                                           // network address. INTERNET_MAIL is used when the number
    806                                           // mode is data network address. For INTERNET_MAIL, in
    807                                           // the address data "digits", each byte contains an ASCII
    808                                           // character.
    809                                           // Examples are "x (at) y.com,a (at) b.com - ref
    810                                           // TIA/EIA-637A 3.4.3.3
    811     NETWORK,
    812     SUBSCRIBER,
    813     ALPHANUMERIC,                         // GSM SMS: address value is GSM 7-bit chars
    814     ABBREVIATED,
    815     RESERVED_7,
    816 };
    817 
    818 enum CdmaSmsNumberPlan : int32_t {
    819     UNKNOWN,
    820     TELEPHONY,                            // CCITT E.164 and E.163, including ISDN plan
    821     RESERVED_2,
    822     DATA,                                 // CCITT X.121
    823     TELEX,                                // CCITT F.69
    824     RESERVED_5,
    825     RESERVED_6,
    826     RESERVED_7,
    827     RESERVED_8,
    828     PRIVATE,
    829     RESERVED_10,
    830     RESERVED_11,
    831     RESERVED_12,
    832     RESERVED_13,
    833     RESERVED_14,
    834     RESERVED_15,
    835 };
    836 
    837 enum CdmaSmsSubaddressType : int32_t {
    838     NSAP,                                 // CCITT X.213 or ISO 8348 AD2
    839     USER_SPECIFIED,                       // e.g. X.25
    840 };
    841 
    842 enum CdmaSmsErrorClass : int32_t {
    843     NO_ERROR,
    844     ERROR,
    845 };
    846 
    847 enum CdmaSmsWriteArgsStatus : int32_t {
    848     REC_UNREAD,
    849     REC_READ,
    850     STO_UNSENT,
    851     STO_SENT
    852 };
    853 
    854 enum CellInfoType : int32_t {
    855     NONE = 0,
    856     GSM = 1,
    857     CDMA = 2,
    858     LTE = 3,
    859     WCDMA = 4,
    860     TD_SCDMA = 5
    861 };
    862 
    863 enum TimeStampType : int32_t {
    864     UNKNOWN,
    865     ANTENNA,
    866     MODEM,
    867     OEM_RIL,
    868     JAVA_RIL,
    869 };
    870 
    871 enum ApnAuthType : int32_t {
    872     NO_PAP_NO_CHAP,                       // PAP and CHAP is never performed.
    873     PAP_NO_CHAP,                          // PAP may be performed; CHAP is never performed.
    874     NO_PAP_CHAP,                          // CHAP may be performed; PAP is never performed.
    875     PAP_CHAP                              // PAP / CHAP may be performed - baseband dependent.
    876 };
    877 
    878 enum RadioTechnologyFamily : int32_t {
    879     THREE_GPP,                            // 3GPP Technologies - GSM, WCDMA
    880     THREE_GPP2                            // 3GPP2 Technologies - CDMA
    881 };
    882 
    883 enum RadioCapabilityPhase : int32_t {
    884     CONFIGURED = 0,                       // Logical Modem's (LM)  initial value
    885                                           // and value after FINISH completes
    886     START      = 1,                       // START is sent before APPLY and indicates that an
    887                                           // APPLY is forthcoming with these same parameters
    888     APPLY      = 2,                       // APPLY is sent after all LM's receive START and returned
    889                                           // RadioCapability.status = 0. If any START's fail, hal
    890                                           // implementation must not send APPLY.
    891     UNSOL_RSP  = 3,                       // UNSOL_RSP is sent with unsolicited radioCapability()
    892     FINISH     = 4                        // FINISH is sent after all commands have completed. If an
    893                                           // error occurs in any previous command, the
    894                                           // RadioAccessesFamily and logicalModemUuid fields must be
    895                                           // the prior configuration thus restoring the
    896                                           // configuration to the previous value. An error returned
    897                                           // by FINISH will generally be ignored or may cause that
    898                                           // logical modem to be removed from service.
    899 };
    900 
    901 enum RadioCapabilityStatus : int32_t {
    902     NONE       = 0,                       // This parameter has no meaning with
    903                                           // RadioCapabilityPhase:START, RadioCapabilityPhase:APPLY
    904     SUCCESS    = 1,                       // Tell modem the action transaction of set radio
    905                                           // capability was success with RadioCapabilityPhase:FINISH
    906     FAIL       = 2,                       // Tell modem the action transaction of set radio
    907                                           // capability is fail with RadioCapabilityPhase:FINISH.
    908 };
    909 
    910 enum RadioAccessFamily : int32_t {
    911     UNKNOWN = 1 << RadioTechnology:UNKNOWN,
    912     GPRS = 1 << RadioTechnology:GPRS,
    913     EDGE = 1 << RadioTechnology:EDGE,
    914     UMTS = 1 << RadioTechnology:UMTS,
    915     IS95A = 1 << RadioTechnology:IS95A,
    916     IS95B = 1 << RadioTechnology:IS95B,
    917     ONE_X_RTT = 1 << RadioTechnology:ONE_X_RTT,
    918     EVDO_0 = 1 << RadioTechnology:EVDO_0,
    919     EVDO_A = 1 << RadioTechnology:EVDO_A,
    920     HSDPA = 1 << RadioTechnology:HSDPA,
    921     HSUPA = 1 << RadioTechnology:HSUPA,
    922     HSPA = 1 << RadioTechnology:HSPA,
    923     EVDO_B = 1 << RadioTechnology:EVDO_B,
    924     EHRPD = 1 << RadioTechnology:EHRPD,
    925     LTE = 1 << RadioTechnology:LTE,
    926     HSPAP = 1 << RadioTechnology:HSPAP,
    927     GSM = 1 << RadioTechnology:GSM,
    928     TD_SCDMA = 1 << RadioTechnology:TD_SCDMA,
    929     LTE_CA = 1 << RadioTechnology:LTE_CA
    930 };
    931 
    932 enum UssdModeType : int32_t {
    933     NOTIFY,                               // USSD-Notify
    934     REQUEST,                              // USSD-Request
    935     NW_RELEASE,                           // Session terminated by network
    936     LOCAL_CLIENT,                         // other local client (eg, SIM Toolkit) has responded
    937     NOT_SUPPORTED,                        // Operation not supported
    938     NW_TIMEOUT,                           // Network timeout
    939 };
    940 
    941 enum SimRefreshType : int32_t {
    942     SIM_FILE_UPDATE = 0,                  // A file on SIM has been updated.
    943     SIM_INIT = 1,                         // SIM initialized. All files should be re-read.
    944     SIM_RESET = 2                         // SIM reset. SIM power required, SIM may be locked a
    945                                           // nd all files must be re-read.
    946 };
    947 
    948 enum SrvccState :int32_t {
    949     HANDOVER_STARTED = 0,
    950     HANDOVER_COMPLETED = 1,
    951     HANDOVER_FAILED = 2,
    952     HANDOVER_CANCELED = 3
    953 };
    954 
    955 enum UiccSubActStatus : int32_t {
    956     DEACTIVATE,
    957     ACTIVATE
    958 };
    959 
    960 enum SubscriptionType : int32_t {
    961     SUBSCRIPTION_1,
    962     SUBSCRIPTION_2,
    963     SUBSCRIPTION_3
    964 };
    965 
    966 enum DataProfileInfoType : int32_t {
    967     COMMON,
    968     THREE_GPP,
    969     THREE_GPP2
    970 };
    971 
    972 enum PhoneRestrictedState : int32_t {
    973     NONE = 0x00,                          // No restriction at all including voice/SMS/USSD/SS/AV64
    974                                           // and packet data
    975     CS_EMERGENCY = 0x01,                  // Block emergency call due to restriction. But allow all
    976                                           // normal voice/SMS/USSD/SS/AV64.
    977     CS_NORMAL = 0x02,                     // Block all normal voice/SMS/USSD/SS/AV64 due to
    978                                           // restriction. Only Emergency call allowed.
    979     CS_ALL = 0x04,                        // Block all voice/SMS/USSD/SS/AV64 including emergency
    980                                           // call due to restriction.
    981     PS_ALL = 0x10                         // Block packet data access due to restriction.
    982 };
    983 
    984 enum CdmaCallWaitingNumberPresentation : int32_t {
    985     ALLOWED = 0,
    986     RESTRICTED = 1,
    987     UNKNOWN = 2,
    988 };
    989 
    990 enum CdmaCallWaitingNumberType : int32_t {
    991     UNKNOWN = 0,
    992     INTERNATIONAL = 1,
    993     NATIONAL = 2,
    994     NETWORK_SPECIFIC = 3,
    995     SUBSCRIBER = 4
    996 };
    997 
    998 enum CdmaCallWaitingNumberPlan : int32_t {
    999     UNKNOWN = 0,
   1000     ISDN = 1,
   1001     DATA = 3,
   1002     TELEX = 4,
   1003     NATIONAL = 8,
   1004     PRIVATE = 9
   1005 };
   1006 
   1007 enum CdmaOtaProvisionStatus : int32_t {
   1008     SPL_UNLOCKED,
   1009     SPC_RETRIES_EXCEEDED,
   1010     A_KEY_EXCHANGED,
   1011     SSD_UPDATED,
   1012     NAM_DOWNLOADED,
   1013     MDN_DOWNLOADED,
   1014     IMSI_DOWNLOADED,
   1015     PRL_DOWNLOADED,
   1016     COMMITTED,
   1017     OTAPA_STARTED,
   1018     OTAPA_STOPPED,
   1019     OTAPA_ABORTED
   1020 };
   1021 
   1022 /** Names of the CDMA info records (C.S0005 section 3.7.5) */
   1023 enum CdmaInfoRecName : int32_t {
   1024     DISPLAY,
   1025     CALLED_PARTY_NUMBER,
   1026     CALLING_PARTY_NUMBER,
   1027     CONNECTED_NUMBER,
   1028     SIGNAL,
   1029     REDIRECTING_NUMBER,
   1030     LINE_CONTROL,
   1031     EXTENDED_DISPLAY,
   1032     T53_CLIR,
   1033     T53_RELEASE,
   1034     T53_AUDIO_CONTROL
   1035 };
   1036 
   1037 /** Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
   1038 enum CdmaRedirectingReason : int32_t {
   1039     UNKNOWN = 0,
   1040     CALL_FORWARDING_BUSY = 1,
   1041     CALL_FORWARDING_NO_REPLY = 2,
   1042     CALLED_DTE_OUT_OF_ORDER = 9,
   1043     CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
   1044     CALL_FORWARDING_UNCONDITIONAL = 15,
   1045     RESERVED
   1046 };
   1047 
   1048 enum SsServiceType : int32_t {
   1049     CFU,
   1050     CF_BUSY,
   1051     CF_NO_REPLY,
   1052     CF_NOT_REACHABLE,
   1053     CF_ALL,
   1054     CF_ALL_CONDITIONAL,
   1055     CLIP,
   1056     CLIR,
   1057     COLP,
   1058     COLR,
   1059     WAIT,
   1060     BAOC,
   1061     BAOIC,
   1062     BAOIC_EXC_HOME,
   1063     BAIC,
   1064     BAIC_ROAMING,
   1065     ALL_BARRING,
   1066     OUTGOING_BARRING,
   1067     INCOMING_BARRING
   1068 };
   1069 
   1070 enum SsRequestType : int32_t {
   1071     ACTIVATION,
   1072     DEACTIVATION,
   1073     INTERROGATION,
   1074     REGISTRATION,
   1075     ERASURE
   1076 };
   1077 
   1078 enum SsTeleserviceType : int32_t {
   1079     ALL_TELE_AND_BEARER_SERVICES,
   1080     ALL_TELESEVICES,
   1081     TELEPHONY,
   1082     ALL_DATA_TELESERVICES,
   1083     SMS_SERVICES,
   1084     ALL_TELESERVICES_EXCEPT_SMS
   1085 };
   1086 
   1087 enum SuppServiceClass : int32_t {
   1088     NONE = 0,
   1089     VOICE = 1 << 0,
   1090     DATA = 1 << 1,
   1091     FAX = 1 << 2,
   1092     SMS = 1 << 3,
   1093     DATA_SYNC = 1 << 4,
   1094     DATA_ASYNC = 1 << 5,
   1095     PACKET = 1 << 6,
   1096     PAD = 1 << 7,
   1097     MAX = 1 << 7
   1098 };
   1099 
   1100 enum ApnTypes : int32_t {
   1101     NONE = 0,                             // None
   1102     DEFAULT = 1 << 0,                     // APN type for default data traffic
   1103     MMS = 1 << 1,                         // APN type for MMS traffic
   1104     SUPL = 1 << 2,                        // APN type for SUPL assisted GPS
   1105     DUN = 1 << 3,                         // APN type for DUN traffic
   1106     HIPRI = 1 << 4,                       // APN type for HiPri traffic
   1107     FOTA = 1 << 5,                        // APN type for FOTA
   1108     IMS = 1 << 6,                         // APN type for IMS
   1109     CBS = 1 << 7,                         // APN type for CBS
   1110     IA = 1 << 8,                          // APN type for IA Initial Attach APN
   1111     EMERGENCY = 1 << 9,                   // APN type for Emergency PDN. This is not an IA apn,
   1112                                           // but is used for access to carrier services in an
   1113                                           // emergency call situation.
   1114     ALL = DEFAULT | MMS | SUPL | DUN | HIPRI | FOTA | IMS | CBS | IA | EMERGENCY,
   1115 };
   1116 
   1117 enum IndicationFilter : int32_t {
   1118     NONE = 0,
   1119     SIGNAL_STRENGTH = 1 << 0,             // When this bit is set, modem should always send the
   1120                                           // signal strength update through
   1121                                           // IRadioIndication.currentSignalStrength(),
   1122                                           // otherwise suppress it.
   1123     FULL_NETWORK_STATE = 1 << 1,          // When this bit is set, modem should always invoke
   1124                                           // IRadioIndication.networkStateChanged() when any field
   1125                                           // in VoiceRegStateResult or DataRegStateResult changes.
   1126                                           // When this bit is not set, modem should suppress
   1127                                           // IRadioIndication.networkStateChanged() when there are
   1128                                           // only changes from those insignificant fields
   1129                                           // (e.g. cell info). Modem should continue invoking
   1130                                           // IRadioIndication.networkStateChanged()
   1131                                           // when significant fields are updated even when this bit
   1132                                           // is not set. The following fields are considered
   1133                                           // significant, registration state and radio technology.
   1134     DATA_CALL_DORMANCY_CHANGED = 1 << 2,  // When this bit is set, modem should send the data call
   1135                                           // list changed indication
   1136                                           // IRadioIndication.dataCallListChanged() whenever any
   1137                                           // field in ITypes.SetupDataCallResult changes. Otherwise
   1138                                           // modem should suppress the indication when the only
   1139                                           // changed field is 'active' (for data dormancy).
   1140                                           // For all other fields change, modem should continue
   1141                                           // sending IRadioIndication.dataCallListChanged()
   1142                                           // regardless this bit is set or not.
   1143     ALL = SIGNAL_STRENGTH | FULL_NETWORK_STATE | DATA_CALL_DORMANCY_CHANGED,
   1144 };
   1145 
   1146 enum MvnoType : int32_t {
   1147     NONE,                                 // None
   1148     IMSI,                                 // The matching data is based on IMSI.
   1149     GID,                                  // The matching data is based on group id.
   1150     SPN,                                  // The matching data is based service provider name.
   1151 };
   1152 
   1153 enum DeviceStateType : int32_t {
   1154     POWER_SAVE_MODE,                      // Device power save mode (provided by PowerManager)
   1155                                           // True indicates the device is in power save mode.
   1156     CHARGING_STATE,                       // Device charging state (provided by BatteryManager)
   1157                                           // True indicates the device is charging.
   1158     LOW_DATA_EXPECTED                     // Low data expected mode. True indicates low data traffic
   1159                                           // is expected, for example, when the device is idle
   1160                                           // (e.g. not doing tethering in the background). Note
   1161                                           // this doesn't mean no data is expected.
   1162 };
   1163 
   1164 enum P2Constant : int32_t {
   1165     NO_P2 = -1,                           // No P2 value is provided
   1166 };
   1167 
   1168 struct RadioResponseInfo {
   1169     RadioResponseType type;               // Response type
   1170     int32_t serial;                       // Serial number of the request
   1171     RadioError error;                     // Response error
   1172 };
   1173 
   1174 struct AppStatus {
   1175     AppType appType;
   1176     AppState appState;
   1177     PersoSubstate persoSubstate;          // applicable only if app_state == SUBSCRIPTION_PERSO
   1178     string aidPtr;                        // e.g., from 0xA0, 0x00 -> 0x41,
   1179                                           // 0x30, 0x30, 0x30
   1180     string appLabelPtr;
   1181     int32_t pin1Replaced;                 // applicable to USIM, CSIM and ISIM
   1182     PinState pin1;
   1183     PinState pin2;
   1184 };
   1185 
   1186 struct CardStatus {
   1187     CardState cardState;
   1188     PinState universalPinState;           // applicable to USIM and CSIM
   1189     int32_t gsmUmtsSubscriptionAppIndex;  // value < RadioConst:CARD_MAX_APPS, -1 if none
   1190     int32_t cdmaSubscriptionAppIndex;     // value < RadioConst:CARD_MAX_APPS, -1 if none
   1191     int32_t imsSubscriptionAppIndex;      // value < RadioConst:CARD_MAX_APPS, -1 if none
   1192     vec<AppStatus> applications;          // size <= RadioConst:CARD_MAX_APPS
   1193 };
   1194 
   1195 /**
   1196  * User-to-User Signaling Information defined in 3GPP 23.087 v8.0
   1197  */
   1198 struct UusInfo {
   1199     UusType uusType;                      // UUS Type
   1200     UusDcs uusDcs;                        // UUS Data Coding Scheme
   1201     string uusData;                       // UUS data
   1202 };
   1203 
   1204 struct Call {
   1205     CallState state;
   1206     int32_t index;                        // Connection Index for use with, eg, AT+CHLD
   1207     int32_t toa;                          // type of address, eg 145 = intl
   1208     bool isMpty;                          // true if is mpty call
   1209     bool isMT;                            // true if call is mobile terminated
   1210     uint8_t als;                          // ALS line indicator if available (0 = line 1)
   1211     bool isVoice;                         // true if this is is a voice call
   1212     bool isVoicePrivacy;                  // true if CDMA voice privacy mode is active
   1213     string number;                        // Remote party number
   1214     CallPresentation numberPresentation;
   1215     string name;                          // Remote party name
   1216     CallPresentation namePresentation;
   1217     vec<UusInfo> uusInfo;                 // Vector of User-User Signaling Information
   1218 };
   1219 
   1220 struct Dial {
   1221     string address;
   1222     Clir clir;
   1223     vec<UusInfo> uusInfo;                 // Vector of User-User Signaling Information
   1224 };
   1225 
   1226 struct LastCallFailCauseInfo {
   1227     LastCallFailCause causeCode;
   1228     string vendorCause;
   1229 };
   1230 
   1231 struct GsmSignalStrength {
   1232     uint32_t signalStrength;              // Valid values are (0-61, 99) as defined in
   1233                                           // TS 27.007 8.69
   1234     uint32_t bitErrorRate;                // bit error rate (0-7, 99) as defined in TS 27.007 8.5
   1235     int32_t timingAdvance;                // Timing Advance in bit periods. 1 bit period = 48/13 us.
   1236                                           // INT_MAX denotes invalid value
   1237 };
   1238 
   1239 struct WcdmaSignalStrength{
   1240     int32_t signalStrength;               // Valid values are (0-31, 99) as defined in
   1241                                           // TS 27.007 8.5
   1242     int32_t bitErrorRate;                 // bit error rate (0-7, 99) as defined in TS 27.007 8.5
   1243 };
   1244 
   1245 struct CdmaSignalStrength {
   1246     uint32_t dbm;                         // This value is the actual RSSI
   1247                                           // value multiplied by -1. Example: If the
   1248                                           // actual RSSI is -75, then this response value will
   1249                                           // be 75.
   1250     uint32_t ecio;                        // This value is the actual
   1251                                           // Ec/Io multiplied by -10. Example: If the
   1252                                           // actual Ec/Io is -12.5 dB, then this response value
   1253                                           // will be 125.
   1254 };
   1255 
   1256 struct EvdoSignalStrength {
   1257     uint32_t dbm;                         // This value is the actual
   1258                                           // RSSI value multiplied by -1.
   1259                                           // Example: If the actual RSSI is -75,
   1260                                           // then this response value will be 75.
   1261     uint32_t ecio;                        // This value is the actual
   1262                                           // Ec/Io multiplied by -10. Example: If the
   1263                                           // actual Ec/Io is -12.5 dB, then this response value
   1264                                           // will be 125.
   1265     uint32_t signalNoiseRatio;            // Valid values are 0-8. 8 is the highest signal to
   1266                                           // noise ratio.
   1267 };
   1268 
   1269 struct LteSignalStrength {
   1270     uint32_t signalStrength;              // Valid values are (0-31, 99) as defined in
   1271                                           // TS 27.007 8.5
   1272     uint32_t rsrp;                        // The current Reference Signal Receive Power in dBm
   1273                                           // multipled by -1.
   1274                                           // Range: 44 to 140 dBm
   1275                                           // INT_MAX: 0x7FFFFFFF denotes invalid value.
   1276                                           // Reference: 3GPP TS 36.133 9.1.4
   1277     uint32_t rsrq;                        // The current Reference Signal Receive Quality in dB
   1278                                           // multiplied by -1.
   1279                                           // Range: 20 to 3 dB.
   1280                                           // INT_MAX: 0x7FFFFFFF denotes invalid value.
   1281                                           // Reference: 3GPP TS 36.133 9.1.7
   1282     int32_t rssnr;                        // The current reference signal signal-to-noise ratio in
   1283                                           // 0.1 dB units.
   1284                                           // Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
   1285                                           // INT_MAX : 0x7FFFFFFF denotes invalid value.
   1286                                           // Reference: 3GPP TS 36.101 8.1.1
   1287     uint32_t cqi;                         // The current Channel Quality Indicator.
   1288                                           // Range: 0 to 15.
   1289                                           // INT_MAX : 0x7FFFFFFF denotes invalid value.
   1290                                           // Reference: 3GPP TS 36.101 9.2, 9.3, A.4
   1291     uint32_t timingAdvance;               // timing advance in micro seconds for a one way trip
   1292                                           // from cell to device.
   1293                                           // Approximate distance is calculated using
   1294                                           // 300m/us * timingAdvance.
   1295                                           // Range: 0 to 1282 inclusive.
   1296                                           // INT_MAX : 0x7FFFFFFF denotes unknown value.
   1297                                           // Reference: 3GPP 36.213 section 4.2.3
   1298 };
   1299 
   1300 struct TdScdmaSignalStrength {
   1301     uint32_t rscp;                        // The Received Signal Code Power in dBm multiplied by -1.
   1302                                           // Range : 25 to 120
   1303                                           // INT_MAX: 0x7FFFFFFF denotes invalid value.
   1304                                           // Reference: 3GPP TS 25.123, section 9.1.1.1
   1305 };
   1306 
   1307 struct SignalStrength {
   1308     GsmSignalStrength gw;
   1309     CdmaSignalStrength cdma;
   1310     EvdoSignalStrength evdo;
   1311     LteSignalStrength lte;
   1312     TdScdmaSignalStrength tdScdma;
   1313 };
   1314 
   1315 struct SendSmsResult {
   1316     int32_t messageRef;                   // TP-Message-Reference for GSM, and BearerData MessageId
   1317                                           // for CDMA (See 3GPP2 C.S0015-B, v2.0, table 4.5-1)
   1318     string ackPDU;                        // or empty string if n/a
   1319     int32_t errorCode;                    // See 3GPP 27.005, 3.2.5 for GSM/UMTS,
   1320                                           // 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
   1321                                           // -1 if unknown or not applicable
   1322 };
   1323 
   1324 struct SetupDataCallResult {
   1325     DataCallFailCause status;             // Data call fail cause. DataCallFailCause.NONE if no
   1326                                           // error.
   1327     int32_t suggestedRetryTime;           // If status != DataCallFailCause.NONE, this field
   1328                                           // indicates the suggested retry back-off timer value RIL
   1329                                           // wants to override the one pre-configured in FW.
   1330                                           // The unit is milliseconds.
   1331                                           // The value < 0 means no value is suggested.
   1332                                           // The value 0 means retry must be done ASAP.
   1333                                           // The value of INT_MAX(0x7fffffff) means no retry.
   1334     int32_t cid;                          // Context ID, uniquely identifies this call
   1335     int32_t active;                       // 0=inactive, 1=active/physical link down,
   1336                                           // 2=active/physical link up */
   1337     string type;                          // One of the PDP_type values in TS 27.007 section 10.1.1.
   1338                                           // For example, "IP", "IPV6", "IPV4V6", or "PPP". If
   1339                                           // status is
   1340                                           // DataCallFailCause.ONLY_SINGLE_BEARER_ALLOWED, this
   1341                                           // is the type supported such as "IP" or "IPV6".
   1342     string ifname;                        // The network interface name
   1343     string addresses;                     // A space-delimited list of addresses with optional "/"
   1344                                           // prefix length, e.g., "192.0.1.3" or
   1345                                           // "192.0.1.11/16 2001:db8::1/64".
   1346                                           // Typically 1 IPv4 or 1 IPv6 or
   1347                                           // one of each. If the prefix length is absent the
   1348                                           // addresses are assumed to be point to point with IPv4
   1349                                           // having a prefix length of 32 and IPv6 128.
   1350     string dnses;                         // A space-delimited list of DNS server addresses,
   1351                                           // e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
   1352                                           // Empty if no dns server addresses returned.
   1353     string gateways;                      // A space-delimited list of default gateway addresses,
   1354                                           // e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
   1355                                           // When empty, the addresses represent
   1356                                           // point to point connections.
   1357     string pcscf;                         // the Proxy Call State Control Function address
   1358                                           // via PCO(Protocol Configuration Option) for IMS client.
   1359     int32_t mtu;                          // MTU received from network
   1360                                           // Value <= 0 means network has either not sent a
   1361                                           // value or sent an invalid value
   1362 };
   1363 
   1364 struct IccIo {
   1365     int32_t command;                      // one of the commands listed for TS 27.007 +CRSM
   1366     int32_t fileId;                       // EF id
   1367     string path;                          // "pathid" from TS 27.007 +CRSM command.
   1368                                           // Path is in hex ascii format eg "7f205f70"
   1369                                           // Path must always be provided.
   1370     int32_t p1;                           // Values of p1, p2 and p3 defined as per 3GPP TS 51.011
   1371     int32_t p2;
   1372     int32_t p3;
   1373     string data;                          // information to be written to the SIM
   1374     string pin2;
   1375     string aid;                           // AID value, See ETSI 102.221 8.1 and 101.220 4, empty
   1376                                           // string if no value.
   1377 };
   1378 
   1379 struct IccIoResult {
   1380     int32_t sw1;
   1381     int32_t sw2;
   1382     string simResponse;                   // In hex string format ([a-fA-F0-9]*), except for
   1383                                           // SIM_AUTHENTICATION response for which it is in
   1384                                           // Base64 format, see 3GPP TS 31.102 7.1.2
   1385 };
   1386 
   1387 // See also com.android.internal.telephony.gsm.CallForwardInfo
   1388 struct CallForwardInfo {
   1389     CallForwardInfoStatus status;         // For queryCallForwardStatus()
   1390                                           // status is DISABLE (Not used by vendor code currently)
   1391                                           // For setCallForward():
   1392                                           // status must be
   1393                                           // DISABLE, ENABLE, INTERROGATE, REGISTRATION, ERASURE
   1394     int32_t reason;                       // from TS 27.007 7.11 "reason"
   1395     int32_t serviceClass;                 // From 27.007 +CCFC/+CLCK "class"
   1396                                           // See table for Android mapping from
   1397                                           // MMI service code
   1398                                           // 0 means user doesn't input class
   1399     int32_t toa;                          // "type" from TS 27.007 7.11
   1400     string number;                        // "number" from TS 27.007 7.11.
   1401     int32_t timeSeconds;
   1402 };
   1403 
   1404 // Response struct used in responseQueryAvailableNetworks
   1405 struct OperatorInfo {
   1406     string alphaLong;                     // long alpha ONS or EONS
   1407     string alphaShort;                    // short alpha ONS or EONS
   1408     string operatorNumeric;               // 5 or 6 digit numeric code (MCC + MNC)
   1409     OperatorStatus status;
   1410 };
   1411 
   1412 struct SmsWriteArgs {
   1413     SmsWriteArgsStatus status;            // Status of message. See TS 27.005 3.1
   1414     string pdu;                           // PDU of message to write, as an ASCII hex string less
   1415                                           // the SMSC address, the TP-layer length is strlen(pdu)/2.
   1416     string smsc;                          // SMSC address in GSM BCD format prefixed by a length
   1417                                           // byte (as expected by TS 27.005) or NULL for default
   1418                                           // SMSC
   1419 };
   1420 
   1421 struct CdmaSmsAddress {
   1422     CdmaSmsDigitMode digitMode;           // CdmaSmsDigitMode is of two types : 4 bit and 8 bit.
   1423                                           // For 4-bit type, only "digits" field defined below in
   1424                                           // this struct is used.
   1425     CdmaSmsNumberMode numberMode;         // Used only when digitMode is 8-bit
   1426     CdmaSmsNumberType numberType;         // Used only when digitMode is 8-bit.
   1427                                           // To specify an international address, use the following:
   1428                                           // digitMode = CdmaSmsDigitMode:EIGHT_BIT:
   1429                                           // numberMode = CdmaSmsNumberMode:NOT_DATA_NETWORK
   1430                                           // numberType = CdmaSmsNumberType:INTERNATIONAL_OR_DATA_IP
   1431                                           // numberPlan = CdmaSmsNumberPlan:TELEPHONY
   1432                                           // numberOfDigits = number of digits
   1433                                           // digits = ASCII digits, e.g. '1', '2', '3', '4', and '5'
   1434     CdmaSmsNumberPlan numberPlan;         // Used only when digitMode is 8-bit
   1435     vec<uint8_t> digits;                  // Each byte in this array represents a 4 bit or 8-bit
   1436                                           // digit of address data
   1437 };
   1438 
   1439 struct CdmaSmsSubaddress {
   1440     CdmaSmsSubaddressType subaddressType;
   1441     bool odd;                             // true means the last byte's lower 4 bits must be ignored
   1442     vec<uint8_t> digits;                  // Each byte represents an 8-bit digit of subaddress data
   1443 };
   1444 
   1445 struct CdmaSmsMessage {
   1446     int32_t teleserviceId;
   1447     bool isServicePresent;
   1448     int32_t serviceCategory;
   1449     CdmaSmsAddress address;
   1450     CdmaSmsSubaddress subAddress;
   1451     vec<uint8_t> bearerData;              // 3GPP2 C.S0015-B, v2.0,
   1452 };
   1453 
   1454 struct CdmaSmsAck {
   1455     CdmaSmsErrorClass errorClass;
   1456     int32_t smsCauseCode;                 // As defined in N.S00005, 6.5.2.125.
   1457                                           // Currently, only 35 (resource shortage) and
   1458                                           // 39 (other terminal problem) are reported.
   1459 };
   1460 
   1461 struct CdmaBroadcastSmsConfigInfo {
   1462     int32_t serviceCategory;              // serviceCategory defines a Broadcast message identifier
   1463                                           // whose value is 0x0000 - 0xFFFF as defined in
   1464                                           // C.R1001G 9.3.1 and 9.3.2.
   1465     int32_t language;                     // language code of Broadcast Message
   1466                                           // whose value is 0x00 - 0x07 as defined in C.R1001G 9.2.
   1467     bool selected;                        // selected false means message types specified in
   1468                                           // serviceCategory are not accepted, while true means
   1469                                           // accepted.
   1470 };
   1471 
   1472 struct CdmaSmsWriteArgs {
   1473     CdmaSmsWriteArgsStatus status;        // Status of message. See TS 27.005 3.1
   1474     CdmaSmsMessage message;
   1475 };
   1476 
   1477 
   1478 /**
   1479  * Which types of Cell Broadcast Message (CBM) are to be received by the ME
   1480  *
   1481  * fromServiceID - uToServiceID defines a range of CBM message identifiers
   1482  * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
   1483  * and 9.4.4.2.2 for UMTS. All other values must be treated as empty
   1484  * CBM message ID.
   1485  *
   1486  * fromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
   1487  * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
   1488  * and 9.4.4.2.3 for UMTS.
   1489  * All other values must be treated as empty CBM data coding scheme.
   1490  *
   1491  * selected false means message types specified in <fromServiceId, toServiceId>
   1492  * and <fromCodeScheme, toCodeScheme>are not accepted, while true means accepted.
   1493  */
   1494 struct GsmBroadcastSmsConfigInfo {
   1495     int32_t fromServiceId;
   1496     int32_t toServiceId;
   1497     int32_t fromCodeScheme;
   1498     int32_t toCodeScheme;
   1499     bool selected;
   1500 };
   1501 
   1502 struct CellIdentityGsm {
   1503     string mcc;                           // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
   1504     string mnc;                           // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if
   1505                                           // unknown
   1506     int32_t lac;                          // 16-bit Location Area Code, 0..65535, INT_MAX if unknown
   1507     int32_t cid;                          // 16-bit GSM Cell Identity described in
   1508                                           // TS 27.007, 0..65535, INT_MAX if unknown
   1509     int32_t arfcn;                        // 16-bit GSM Absolute RF channel number; this value must
   1510                                           // be valid
   1511     uint8_t bsic;                         // 6-bit Base Station Identity Code, 0xFF if unknown
   1512 };
   1513 
   1514 struct CellIdentityWcdma {
   1515     string mcc;                           // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
   1516     string mnc;                           // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX
   1517                                           // if unknown
   1518     int32_t lac;                          // 16-bit Location Area Code, 0..65535, INT_MAX if unknown
   1519     int32_t cid;                          // 28-bit UMTS Cell Identity described in
   1520                                           // TS 25.331, 0..268435455, INT_MAX if unknown
   1521     int32_t psc;                          // 9-bit UMTS Primary Scrambling Code described in
   1522                                           // TS 25.331, 0..511; this value must be valid
   1523     int32_t uarfcn;                       // 16-bit UMTS Absolute RF Channel Number; this value must
   1524                                           // be valid
   1525 };
   1526 
   1527 struct CellIdentityCdma {
   1528     int32_t networkId;                    // Network Id 0..65535, INT_MAX if unknown
   1529     int32_t systemId;                     // CDMA System Id 0..32767, INT_MAX if unknown
   1530     int32_t baseStationId;                // Base Station Id 0..65535, INT_MAX if unknown
   1531     int32_t longitude;                    // Longitude is a decimal number as specified in
   1532                                           // 3GPP2 C.S0005-A v6.0. It is represented in units of
   1533                                           // 0.25 seconds and ranges from -2592000 to 2592000,
   1534                                           // both values inclusive (corresponding to a range of -180
   1535                                           // to +180 degrees). INT_MAX if unknown
   1536     int32_t latitude;                     // Latitude is a decimal number as specified in
   1537                                           // 3GPP2 C.S0005-A v6.0. It is represented in units of
   1538                                           // 0.25 seconds and ranges from -1296000 to 1296000,
   1539                                           // both values inclusive (corresponding to a range of -90
   1540                                           // to +90 degrees). INT_MAX if unknown
   1541 };
   1542 
   1543 struct CellIdentityLte {
   1544     string mcc;                           // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
   1545     string mnc;                           // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if
   1546                                           // unknown
   1547     int32_t ci;                           // 28-bit Cell Identity described in TS TS 27.007, INT_MAX
   1548                                           // if unknown
   1549     int32_t pci;                          // physical cell id 0..503; this value must be valid
   1550     int32_t tac;                          // 16-bit tracking area code, INT_MAX if unknown
   1551     int32_t earfcn;                       // 18-bit LTE Absolute RF Channel Number; this value must
   1552                                           // be valid
   1553 };
   1554 
   1555 struct CellIdentityTdscdma {
   1556     string mcc;                           // 3-digit Mobile Country Code, 0..999, INT_MAX if unknown
   1557     string mnc;                           // 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if
   1558                                           // unknown
   1559     int32_t lac;                          // 16-bit Location Area Code, 0..65535, INT_MAX if
   1560                                           // unknown
   1561     int32_t cid;                          // 28-bit UMTS Cell Identity described in
   1562                                           // TS 25.331, 0..268435455, INT_MAX if unknown
   1563     int32_t cpid;                         // 8-bit Cell Parameters ID described in
   1564                                           // TS 25.331, 0..127, INT_MAX if unknown
   1565 };
   1566 
   1567 struct CellInfoGsm {
   1568     CellIdentityGsm cellIdentityGsm;
   1569     GsmSignalStrength signalStrengthGsm;
   1570 };
   1571 
   1572 struct CellInfoWcdma {
   1573     CellIdentityWcdma cellIdentityWcdma;
   1574     WcdmaSignalStrength signalStrengthWcdma;
   1575 };
   1576 
   1577 struct CellInfoCdma {
   1578     CellIdentityCdma cellIdentityCdma;
   1579     CdmaSignalStrength signalStrengthCdma;
   1580     EvdoSignalStrength signalStrengthEvdo;
   1581 };
   1582 
   1583 struct CellInfoLte {
   1584     CellIdentityLte cellIdentityLte;
   1585     LteSignalStrength signalStrengthLte;
   1586 };
   1587 
   1588 struct CellInfoTdscdma {
   1589     CellIdentityTdscdma cellIdentityTdscdma;
   1590     TdScdmaSignalStrength signalStrengthTdscdma;
   1591 };
   1592 
   1593 struct CellInfo {
   1594     CellInfoType cellInfoType;            // cell type for selecting from union CellInfo
   1595     bool registered;                      // true if this cell is registered false if not registered
   1596     TimeStampType timeStampType;          // type of time stamp represented by timeStamp
   1597     uint64_t timeStamp;                   // Time in nanos as returned by ril_nano_time
   1598     // Only one of the below vectors must be of size 1 based on the CellInfoType and others must be
   1599     // of size 0
   1600     vec<CellInfoGsm> gsm;                 // Valid only if type = gsm and size = 1 else must be
   1601                                           // empty
   1602     vec<CellInfoCdma> cdma;               // Valid only if type = cdma and size = 1 else must be
   1603                                           // empty
   1604     vec<CellInfoLte> lte;                 // Valid only if type = lte and size = 1 else must be
   1605                                           // empty
   1606     vec<CellInfoWcdma> wcdma;             // Valid only if type = wcdma and size = 1 else must be
   1607                                           // empty
   1608     vec<CellInfoTdscdma> tdscdma;         // Valid only if type = tdscdma and size = 1 else must be
   1609                                           // empty
   1610 };
   1611 
   1612 struct CellIdentity {
   1613     CellInfoType cellInfoType;            // cell type for selecting from union CellInfo
   1614     // Only one of the below vectors must be of size 1, based on a valid CellInfoType and
   1615     // others must be of size 0. If cell info type is NONE, then all the vectors
   1616     // must be of size 0.
   1617     vec<CellIdentityGsm> cellIdentityGsm;
   1618     vec<CellIdentityWcdma> cellIdentityWcdma;
   1619     vec<CellIdentityCdma> cellIdentityCdma;
   1620     vec<CellIdentityLte> cellIdentityLte;
   1621     vec<CellIdentityTdscdma> cellIdentityTdscdma;
   1622 };
   1623 
   1624 struct VoiceRegStateResult {
   1625     RegState regState;                    // Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP,
   1626                                           // REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED,
   1627                                           // UNKNOWN, REG_ROAMING defined in RegState
   1628     int32_t rat;                          // indicates the available voice radio technology,
   1629                                           // valid values as defined by RadioTechnology.
   1630     bool cssSupported;                    // concurrent services support indicator. if
   1631                                           // registered on a CDMA system.
   1632                                           // false - Concurrent services not supported,
   1633                                           // true - Concurrent services supported
   1634     int32_t roamingIndicator;             // TSB-58 Roaming Indicator if registered
   1635                                           // on a CDMA or EVDO system or -1 if not.
   1636                                           // Valid values are 0-255.
   1637     int32_t systemIsInPrl;                // indicates whether the current system is in the
   1638                                           // PRL if registered on a CDMA or EVDO system or -1 if
   1639                                           // not. 0=not in the PRL, 1=in the PRL
   1640     int32_t defaultRoamingIndicator;      // default Roaming Indicator from the PRL,
   1641                                           // if registered on a CDMA or EVDO system or -1 if not.
   1642                                           // Valid values are 0-255.
   1643     int32_t reasonForDenial;              // reasonForDenial if registration state is 3
   1644                                           // (Registration denied) this is an enumerated reason why
   1645                                           // registration was denied. See 3GPP TS 24.008,
   1646                                           // 10.5.3.6 and Annex G.
   1647                                           // 0 - General
   1648                                           // 1 - Authentication Failure
   1649                                           // 2 - IMSI unknown in HLR
   1650                                           // 3 - Illegal MS
   1651                                           // 4 - Illegal ME
   1652                                           // 5 - PLMN not allowed
   1653                                           // 6 - Location area not allowed
   1654                                           // 7 - Roaming not allowed
   1655                                           // 8 - No Suitable Cells in this Location Area
   1656                                           // 9 - Network failure
   1657                                           // 10 - Persistent location update reject
   1658                                           // 11 - PLMN not allowed
   1659                                           // 12 - Location area not allowed
   1660                                           // 13 - Roaming not allowed in this Location Area
   1661                                           // 15 - No Suitable Cells in this Location Area
   1662                                           // 17 - Network Failure
   1663                                           // 20 - MAC Failure
   1664                                           // 21 - Sync Failure
   1665                                           // 22 - Congestion
   1666                                           // 23 - GSM Authentication unacceptable
   1667                                           // 25 - Not Authorized for this CSG
   1668                                           // 32 - Service option not supported
   1669                                           // 33 - Requested service option not subscribed
   1670                                           // 34 - Service option temporarily out of order
   1671                                           // 38 - Call cannot be identified
   1672                                           // 48-63 - Retry upon entry into a new cell
   1673                                           // 95 - Semantically incorrect message
   1674                                           // 96 - Invalid mandatory information
   1675                                           // 97 - Message type non-existent or not implemented
   1676                                           // 98 - Message type not compatible with protocol state
   1677                                           // 99 - Information element non-existent or not implemented
   1678                                           // 100 - Conditional IE error
   1679                                           // 101 - Message not compatible with protocol state
   1680                                           // 111 - Protocol error, unspecified
   1681     CellIdentity cellIdentity;
   1682 };
   1683 
   1684 struct DataRegStateResult {
   1685     RegState regState;                    // Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP,
   1686                                           // REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED,
   1687                                           // UNKNOWN, REG_ROAMING defined in RegState
   1688     int32_t rat;                          // indicates the available data radio technology,
   1689                                           // valid values as defined by RadioTechnology.
   1690     int32_t reasonDataDenied;             // if registration state is 3 (Registration
   1691                                           // denied) this is an enumerated reason why
   1692                                           // registration was denied. See 3GPP TS 24.008,
   1693                                           // Annex G.6 "Additional cause codes for GMM".
   1694                                           // 7 == GPRS services not allowed
   1695                                           // 8 == GPRS services and non-GPRS services not allowed
   1696                                           // 9 == MS identity cannot be derived by the network
   1697                                           // 10 == Implicitly detached
   1698                                           // 14 == GPRS services not allowed in this PLMN
   1699                                           // 16 == MSC temporarily not reachable
   1700                                           // 40 == No PDP context activated
   1701     int32_t maxDataCalls;                 // The maximum number of simultaneous Data Calls that
   1702                                           // must be established using setupDataCall().
   1703     CellIdentity cellIdentity;
   1704 };
   1705 
   1706 struct GsmSmsMessage {
   1707     string smscPdu;                       // SMSC address in GSM BCD format prefixed by a length
   1708                                           // byte (as expected by TS 27.005) or empty string for
   1709                                           // default SMSC
   1710     string pdu;                           // SMS in PDU format as an ASCII hex string less the
   1711                                           // SMSC address. TP-Layer-Length is be "strlen(pdu)/2
   1712 };
   1713 
   1714 struct ImsSmsMessage {
   1715     RadioTechnologyFamily tech;
   1716     bool retry;                           // false == not retry, true == retry */
   1717     int32_t messageRef;                   // Valid field if retry is set to true.
   1718                                           // Contains messageRef from SendSmsResult struct
   1719                                           // corresponding to failed MO SMS.
   1720     // Only one of the below vectors must be of size 1 based on the RadioTechnologyFamily and others
   1721     // must be of size 0
   1722     vec<CdmaSmsMessage> cdmaMessage;      // Valid field if tech is 3GPP2 and size = 1 else must be
   1723                                           // empty
   1724     vec<GsmSmsMessage> gsmMessage;        // Valid field if tech is 3GPP and size = 1 else must be
   1725                                           // empty
   1726 };
   1727 
   1728 struct SimApdu {
   1729     int32_t sessionId;                    // "sessionid" from TS 27.007 +CGLA command. Must be
   1730                                           // ignored for +CSIM command.
   1731     // Following fields are used to derive the APDU ("command" and "length"
   1732     // values in TS 27.007 +CSIM and +CGLA commands).
   1733     int32_t cla;
   1734     int32_t instruction;
   1735     int32_t p1;
   1736     int32_t p2;
   1737     int32_t p3;                           // A negative P3 implies a 4 byte APDU.
   1738     string data;                          // In hex string format ([a-fA-F0-9]*).
   1739 };
   1740 
   1741 struct NvWriteItem {
   1742     NvItem itemId;
   1743     string value;
   1744 };
   1745 
   1746 struct SelectUiccSub {
   1747     int32_t slot;
   1748     int32_t appIndex;                     // array subscriptor from
   1749                                           // applications[RadioConst:CARD_MAX_APPS] in
   1750                                           // getIccCardStatus()
   1751     SubscriptionType subType;
   1752     UiccSubActStatus actStatus;
   1753 };
   1754 
   1755 struct HardwareConfigModem {
   1756     int32_t rilModel;
   1757     uint32_t rat;                         // bitset - ref. RadioTechnology.
   1758     int32_t maxVoice;
   1759     int32_t maxData;
   1760     int32_t maxStandby;
   1761 };
   1762 
   1763 struct HardwareConfigSim {
   1764     string modemUuid;                     // RadioConst:MAX_UUID_LENGTH is max length of the string
   1765 };
   1766 
   1767 struct HardwareConfig {
   1768     HardwareConfigType type;
   1769     string uuid;                          // RadioConst:MAX_UUID_LENGTH is max length of the string
   1770     HardwareConfigState state;
   1771 
   1772     // Only one of the below vectors must have size = 1 based on the HardwareConfigType and other
   1773     // must have size = 0.
   1774     vec<HardwareConfigModem> modem;       // Valid only if type is Modem and size = 1 else must be
   1775                                           // empty
   1776     vec<HardwareConfigSim> sim;           // Valid only if type is SIM or else empty and size = 1
   1777                                           // else must be empty
   1778 };
   1779 
   1780 struct DataProfileInfo {
   1781     DataProfileId profileId;              // id of the data profile
   1782     string apn;                           // The APN to connect to
   1783     string protocol;                      // One of the PDP_type values in TS 27.007 section 10.1.1.
   1784                                           // For example, "IP", "IPV6", "IPV4V6", or "PPP".
   1785     string roamingProtocol;               // one of the PDP_type values in TS 27.007 section 10.1.1
   1786                                           // used on roaming network. For example, "IP", "IPV6",
   1787                                           // "IPV4V6", or "PPP".
   1788     ApnAuthType authType;                 // APN authentication type
   1789     string user;                          // The username for APN, or empty string
   1790     string password;                      // The password for APN, or empty string
   1791     DataProfileInfoType type;             // Data profile technology type
   1792     int32_t maxConnsTime;                 // The period in seconds to limit the maximum connections
   1793     int32_t maxConns;                     // The maximum connections during maxConnsTime
   1794     int32_t waitTime;                     // The required wait time in seconds after a successful UE
   1795                                           // initiated disconnect of a given PDN connection before
   1796                                           // the device can send a new PDN connection request for
   1797                                           // that given PDN
   1798     bool enabled;                         // True to enable the profile, false to disable
   1799     bitfield<ApnTypes> supportedApnTypesBitmap; // Supported APN types bitmap. See ApnTypes for the
   1800                                           // value of each bit.
   1801     bitfield<RadioAccessFamily> bearerBitmap; // The bearer bitmap. See RadioAccessFamily for the
   1802                                           // value of each bit.
   1803     int32_t mtu;                          // Maximum transmission unit (MTU) size in bytes
   1804     MvnoType mvnoType;                    // The MVNO matching data type
   1805     string mvnoMatchData;                 // MVNO matching data. This is defined by the carrier.
   1806                                           // For example,
   1807                                           //      SPN like: "A MOBILE", "BEN NL", etc...
   1808                                           //      IMSI like: "302720x94", "2060188", etc...
   1809                                           //      GID like: "4E", "33", etc...
   1810 };
   1811 
   1812 struct RadioCapability {
   1813     int32_t session;                      // Unique session value defined by framework returned in
   1814                                           // all "responses/unsol"
   1815     RadioCapabilityPhase phase;
   1816     bitfield<RadioAccessFamily> raf;      // 32-bit bitmap of RadioAccessFamily
   1817     string logicalModemUuid;              // A UUID typically "com.xxxx.lmX where X is the logical
   1818                                           // modem. RadioConst:MAX_UUID_LENGTH is the max
   1819                                           // length
   1820     RadioCapabilityStatus status;
   1821 };
   1822 
   1823 struct LceStatusInfo {
   1824     LceStatus lceStatus;
   1825     uint8_t actualIntervalMs;             // actual LCE reporting interval,
   1826                                           // meaningful only if LceStatus = ACTIVE.
   1827 };
   1828 
   1829 struct LceDataInfo {
   1830     uint32_t lastHopCapacityKbps;         // last-hop cellular capacity: kilobits/second.
   1831     uint8_t confidenceLevel;              // capacity estimate confidence: 0-100
   1832     bool lceSuspended;                    // LCE report going to be suspended? (e.g., radio
   1833                                           // moves to inactive state or network type change)
   1834                                           // true = suspended;
   1835                                           // false = not suspended.
   1836 };
   1837 
   1838 struct ActivityStatsInfo {
   1839     uint32_t sleepModeTimeMs;             // total time (in ms) when modem is in a low power or
   1840                                           // sleep state
   1841     uint32_t idleModeTimeMs;              // total time (in ms) when modem is awake but neither
   1842                                           // the transmitter nor receiver are active/awake
   1843     uint32_t[RadioConst:NUM_TX_POWER_LEVELS] txmModetimeMs;
   1844                                           // Each index represent total time (in ms) during which
   1845                                           // the transmitter is active/awake for a particular
   1846                                           // power range as shown below.
   1847                                           // index 0 = tx_power < 0dBm
   1848                                           // index 1 = 0dBm < tx_power < 5dBm
   1849                                           // index 2 = 5dBm < tx_power < 15dBm
   1850                                           // index 3 = 15dBm < tx_power < 20dBm
   1851                                           // index 4 = tx_power > 20dBm
   1852     uint32_t rxModeTimeMs;                // total time (in ms) for which receiver is
   1853                                           // active/awake and the transmitter is inactive
   1854 };
   1855 
   1856 struct Carrier {
   1857     string mcc;
   1858     string mnc;
   1859     CarrierMatchType matchType;           // Specify match type for the carrier.
   1860                                           // If its ALL, matchData is empty string;
   1861                                           // otherwise, matchData is the value for the match type.
   1862     string matchData;
   1863 };
   1864 
   1865 struct CarrierRestrictions {
   1866     vec<Carrier> allowedCarriers;         // whitelist for allowed carriers
   1867     vec<Carrier> excludedCarriers;        // blacklist for explicitly excluded carriers
   1868                                           // which match allowed_carriers. Eg. allowedCarriers
   1869                                           // match mcc/mnc, excludedCarriers has same mcc/mnc and
   1870                                           // gid1 is ABCD. It means except the carrier whose gid1
   1871                                           // is ABCD, all carriers with the same mcc/mnc are
   1872                                           // allowed.
   1873 };
   1874 
   1875 struct SuppSvcNotification {
   1876     bool isMT;                            // notification type
   1877                                           // false = MO intermediate result code
   1878                                           // true = MT unsolicited result code
   1879     int32_t code;                         // result code. See 27.007 7.17.
   1880     int32_t index;                        // CUG index. See 27.007 7.17.
   1881     int32_t type;                         // "type" from 27.007 7.17 (MT only).
   1882     string number;                        // "number" from 27.007 7.17
   1883                                           // (MT only, may be empty string).
   1884 };
   1885 
   1886 struct SimRefreshResult {
   1887     SimRefreshType type;
   1888     int32_t efId;                         // is the EFID of the updated file if the result is
   1889                                           // SIM_FILE_UPDATE or 0 for any other result.
   1890     string aid;                           // is AID(application ID) of the card application
   1891                                           // See ETSI 102.221 8.1 and 101.220 4
   1892                                           // For SIM_FILE_UPDATE result it must be set to AID of
   1893                                           // application in which updated EF resides or it must be
   1894                                           // empty string if EF is outside of an application.
   1895                                           // For SIM_INIT result this field is set to AID of
   1896                                           // application that caused REFRESH
   1897                                           // For SIM_RESET result it is empty string.
   1898 };
   1899 
   1900 /** CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
   1901 struct CdmaSignalInfoRecord {
   1902     bool isPresent;                       // true if signal information record is present
   1903     int8_t signalType;                    // as defined 3.7.5.5-1
   1904     int8_t alertPitch;                    // as defined 3.7.5.5-2
   1905     int8_t signal;                        // as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5
   1906 };
   1907 
   1908 struct CdmaCallWaiting {
   1909     string number;                        // Remote party number
   1910     CdmaCallWaitingNumberPresentation numberPresentation;
   1911     string name;                          // Remote party name
   1912     CdmaSignalInfoRecord signalInfoRecord;
   1913     // Number type/Number plan required to support International Call Waiting
   1914     CdmaCallWaitingNumberType numberType;
   1915     CdmaCallWaitingNumberPlan numberPlan;
   1916 };
   1917 
   1918 /**
   1919  * Display Info Rec as defined in C.S0005 section 3.7.5.1
   1920  * Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
   1921  * Note: the Extended Display info rec contains multiple records of the
   1922  * form: display_tag, display_len, and display_len occurrences of the
   1923  * char field if the display_tag is not 10000000 or 10000001.
   1924  * To save space, the records are stored consecutively in a byte buffer.
   1925  * The display_tag, display_len and chari fields are all 1 byte.
   1926  */
   1927 struct CdmaDisplayInfoRecord {
   1928     string alphaBuf;                      // Max length = RadioConst:CDMA_ALPHA_INFO_BUFFER_LENGTH
   1929 };
   1930 
   1931 /**
   1932  * Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
   1933  * Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
   1934  * Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
   1935  */
   1936 struct CdmaNumberInfoRecord {
   1937     string number;                        // Max length = RADIP_CDMA_NUMBER_INFO_BUFFER_LENGTH
   1938     uint8_t numberType;
   1939     uint8_t numberPlan;
   1940     uint8_t pi;
   1941     uint8_t si;
   1942 };
   1943 
   1944 struct  CdmaRedirectingNumberInfoRecord{
   1945     CdmaNumberInfoRecord redirectingNumber;
   1946     CdmaRedirectingReason redirectingReason; // redirectingReason is set to UNKNOWN if not included
   1947 };
   1948 
   1949 /** Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
   1950 struct CdmaLineControlInfoRecord {
   1951     uint8_t lineCtrlPolarityIncluded;
   1952     uint8_t lineCtrlToggle;
   1953     uint8_t lineCtrlReverse;
   1954     uint8_t lineCtrlPowerDenial;
   1955 };
   1956 
   1957 /** T53 CLIR Information Record */
   1958 struct CdmaT53ClirInfoRecord {
   1959     uint8_t cause;
   1960 };
   1961 
   1962 /** T53 Audio Control Information Record */
   1963 struct CdmaT53AudioControlInfoRecord {
   1964     uint8_t upLink;
   1965     uint8_t downLink;
   1966 };
   1967 
   1968 struct CdmaInformationRecord {
   1969     CdmaInfoRecName name;
   1970     // Only one of the below vectors must have size = 1 based on the
   1971     // CdmaInfoRecName. All other vectors must have size 0.
   1972     vec<CdmaDisplayInfoRecord> display;   // Display and Extended Display Info Rec
   1973     vec<CdmaNumberInfoRecord> number;     // Called Party Number, Calling Party Number, Connected
   1974                                           // number Info Rec
   1975     vec<CdmaSignalInfoRecord> signal;     // Signal Info Rec
   1976     vec<CdmaRedirectingNumberInfoRecord> redir; // Redirecting Number Info Rec
   1977     vec<CdmaLineControlInfoRecord> lineCtrl;    // Line Control Info Rec
   1978     vec<CdmaT53ClirInfoRecord> clir;      // T53 CLIR Info Rec
   1979     vec<CdmaT53AudioControlInfoRecord> audioCtrl; // T53 Audio Control Info Rec
   1980 };
   1981 
   1982 struct CdmaInformationRecords {
   1983     vec<CdmaInformationRecord> infoRec;   // Max length = RadioConst:CDMA_MAX_NUMBER_OF_INFO_RECS
   1984 };
   1985 
   1986 struct CfData {
   1987     vec<CallForwardInfo> cfInfo;          // This is the response data
   1988                                           // for SS request to query call
   1989                                           // forward status. see getCallForwardStatus()
   1990                                           // Max size = RadioConst:NUM_SERVICE_CLASSES
   1991 };
   1992 
   1993 struct SsInfoData {
   1994     vec<int32_t> ssInfo;                  // This is the response data for all of the SS GET/SET
   1995                                           // Radio requests. E.g. IRadio.getClir() returns
   1996                                           // two ints, so first two values of ssInfo[] will be
   1997                                           // used for response if serviceType is SS_CLIR and
   1998                                           // requestType is SS_INTERROGATION
   1999                                           // Max size = RadioConst:SS_INFO_MAX
   2000 };
   2001 
   2002 struct StkCcUnsolSsResult {
   2003     SsServiceType serviceType;
   2004     SsRequestType requestType;
   2005     SsTeleserviceType teleserviceType;
   2006     bitfield<SuppServiceClass> serviceClass;
   2007     RadioError result;
   2008     // Only one of the below vectors may contain values and other must be empty
   2009     vec<SsInfoData> ssInfo;               // Valid only for all SsServiceType except
   2010                                           // SsServiceType:CF_* else empty.
   2011     vec<CfData> cfData;                   // Valid for SsServiceType:CF_* else empty
   2012 };
   2013 
   2014 struct PcoDataInfo {
   2015     int32_t cid;                          // Context ID, uniquely identifies this call
   2016     string bearerProto;                   // One of the PDP_type values in TS 27.007 section 10.1.1.
   2017                                           // For example, "IP", "IPV6", "IPV4V6"
   2018     int32_t pcoId;                        // The protocol ID for this box. Note that only IDs from
   2019                                           // FF00H - FFFFH are accepted. If more than one is
   2020                                           // included from the network, multiple calls must be made
   2021                                           // to send all of them.
   2022     vec<uint8_t> contents;                // Carrier-defined content. It is binary, opaque and
   2023                                           // loosely defined in LTE Layer 3 spec 24.008
   2024 };
   2025