1 /* 2 * Copyright (C) 2025 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 #ifndef WIFI_TELEPHONY_UTILS_H 17 #define WIFI_TELEPHONY_UTILS_H 18 19 #include <string> 20 #include <cstdint> 21 22 #ifdef TELEPHONE_CORE_SERVICE_ENABLE 23 #include "sim_state_type.h" 24 #include "core_service_client.h" 25 #include "cellular_data_client.h" 26 #endif 27 #include "wifi_errcode.h" 28 29 namespace OHOS { 30 namespace Wifi { 31 namespace WifiTelephonyUtils { 32 #ifndef OHOS_ARCH_LITE 33 int32_t GetDataSlotId(int32_t slotId); 34 std::string GetImsi(int32_t slotId); 35 std::string GetPlmn(int32_t slotId); 36 #endif 37 std::string ConvertString(const std::u16string &wideText); 38 int32_t GetDefaultId(int32_t slotId); 39 int32_t GetSimCardState(int32_t slotId); 40 bool IsMultiSimEnabled(); 41 bool IsSupportCardType(int32_t eapSubId); 42 int32_t GetSlotId(int32_t eapSubId); 43 enum class AuthType : uint8_t { 44 SIM_TYPE, 45 AKA_TYPE, 46 }; 47 std::string SimAkaAuth(const std::string &nonce, AuthType authType, int32_t eapSubId); 48 } // WifiTelephonyUtils 49 } // Wifi 50 } // OHOS 51 #endif