1/* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @addtogroup Ril 18 * 19 * @brief Defines Ril-related APIs. 20 * 21 * The radio interface layer (RIL) module provides APIs and callbacks for upper-layer telephony services, 22 * including call, SMS, MMS, network search, and SIM card services. 23 * 24 * @since 4.1 25 * @version 1.3 26 */ 27 28package ohos.hdi.ril.v1_3; 29 30import ohos.hdi.ril.v1_1.Types; 31import ohos.hdi.ril.v1_2.Types; 32 33/** 34 * @brief Defines the SIM card status information. 35 */ 36struct SimCardStatusInfo { 37 /** 38 * SIM card index 39 */ 40 int index; 41 42 /** 43 * SIM card type: 44 *- 0: unknown 45 *- 1: common SIM card 46 *- 2: USIM, supporting 4G 47 */ 48 int simType; 49 50 /** 51 * SIM card status: 52 *- -1: unknown 53 *- 0: SIM card not inserted 54 *- 1: SIM card detected normally 55 *- 2: PIN required 56 *- 3: PUK required 57 *- 4: PIN2 required 58 *- 5: PUK2 required 59 */ 60 int simState; 61 62 /** 63 * SIM card iccid: 64 */ 65 String iccid; 66}; 67 68/** 69 * @brief Defines PDP context information with apn types. 70 */ 71struct DataProfileDataInfoWithApnTypes { 72 /** 73 * Request SN 74 */ 75 int serial; 76 77 /** 78 * Data service type. The value 0 indicates the default data service, 79 * and the value 1 indicates the MMS data service. 80 */ 81 int profileId; 82 83 /** 84 * Authentication mode: 85 *- 0: no authentication 86 *- 1: Password Authentication Protocol (PAP) 87 *- 2: Challenge Handshake Authentication Protocol (CHAP) 88 */ 89 int authenticationType; 90 91 /** 92 * Access point name 93 */ 94 String apn; 95 96 /** 97 * Protocol version 98 */ 99 String protocol; 100 101 /** 102 * Roaming protocol version 103 */ 104 String roamingProtocol; 105 106 /** 107 * Username 108 */ 109 String userName; 110 111 /** 112 * Password 113 */ 114 String password; 115 116 /** 117 * Supported APN types Bitmap 118 */ 119 unsigned long supportedApnTypesBitmap; 120}; 121 122/** 123 * @brief Defines the data service information. 124 */ 125struct DataCallInfoWithApnTypes { 126 /** 127 * Request SN 128 */ 129 int serial; 130 131 /** 132 * Radio access technology. For details, see {@link RilRadioTech}. 133 */ 134 int radioTechnology; 135 136 /** 137 * Whether the PDP context is set for the modem 138 */ 139 boolean modemCognitive; 140 141 /** 142 * Whether roaming is allowed. The value true indicates that roaming is allowed, 143 * and the value false indicates the opposite. 144 */ 145 boolean roamingAllowed; 146 147 /** 148 * Whether the user is roaming. The value true indicates that the user is roaming, 149 * and the value false indicates the opposite. 150 */ 151 boolean isRoaming; 152 153 /** 154 * PDP context information with apn types 155 */ 156 struct DataProfileDataInfoWithApnTypes dataProfileInfo; 157}; 158