From 920fb51fbc946bd6befdc7c9a9a37ad8b352a252 Mon Sep 17 00:00:00 2001 From: jierbumo866 Date: Tue, 4 Jun 2024 22:02:57 +0800 Subject: [PATCH] =?UTF-8?q?=20=E5=8D=A1=E8=B4=A6=E6=88=B7=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: jierbumo866 --- ril/v1_3/IRilCallback.idl | 12 +++++ ril/v1_3/Types.idl | 98 ++++++++++++++++++++++++++------------- 2 files changed, 78 insertions(+), 32 deletions(-) diff --git a/ril/v1_3/IRilCallback.idl b/ril/v1_3/IRilCallback.idl index 1eca3ada..779404b5 100644 --- a/ril/v1_3/IRilCallback.idl +++ b/ril/v1_3/IRilCallback.idl @@ -67,5 +67,17 @@ import ohos.hdi.ril.v1_3.Types; * @version 1.0 */ GetImeiSvResponse([in] struct RilRadioResponseInfo responseInfo, [in] String imeiSv); + + /** + * @brief Callback for the response of obtaining the SIM card status. + * + * @param responseInfo Common response information, such as the card slot ID and request sequence ID. + * For details, see {@link RilRadioResponseInfo}. + * @param SimCardStatusInfo SIM card status. For details, see {@link SimCardStatusInfo}. + * + * @since 5.0 + * @version 1.0 + */ + GetSimCardStatusResponse([in] struct RilRadioResponseInfo responseInfo, [in] struct SimCardStatusInfo result); } /** @} */ diff --git a/ril/v1_3/Types.idl b/ril/v1_3/Types.idl index 2f8a5e2b..db01bb8c 100644 --- a/ril/v1_3/Types.idl +++ b/ril/v1_3/Types.idl @@ -1,32 +1,66 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @addtogroup Ril - * - * @brief Defines Ril-related APIs. - * - * The radio interface layer (RIL) module provides APIs and callbacks for upper-layer telephony services, - * including call, SMS, MMS, network search, and SIM card services. - * - * @since 4.1 - * @version 1.3 - */ - -package ohos.hdi.ril.v1_3; - -import ohos.hdi.ril.v1_1.Types; -import ohos.hdi.ril.v1_2.Types; - +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @addtogroup Ril + * + * @brief Defines Ril-related APIs. + * + * The radio interface layer (RIL) module provides APIs and callbacks for upper-layer telephony services, + * including call, SMS, MMS, network search, and SIM card services. + * + * @since 4.1 + * @version 1.3 + */ + +package ohos.hdi.ril.v1_3; + +import ohos.hdi.ril.v1_1.Types; +import ohos.hdi.ril.v1_2.Types; + +/** + * @brief Defines the SIM card status information. + */ +struct SimCardStatusInfo { + /** + * SIM card index + */ + int index; + + /** + * SIM card type: + *- 0: unknown + *- 1: common SIM card + *- 2: USIM, supporting 4G + */ + int simType; + + /** + * SIM card status: + *- -1: unknown + *- 0: SIM card not inserted + *- 1: SIM card detected normally + *- 2: PIN required + *- 3: PUK required + *- 4: PIN2 required + *- 5: PUK2 required + */ + int simState; + + /** + * SIM card iccid: + */ + String iccid; +}; \ No newline at end of file -- Gitee