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 #ifndef TELEPHONY_SIM_IMPL_H 16 #define TELEPHONY_SIM_IMPL_H 17 18 #include "sim_state_type.h" 19 #include "telephony_napi_common_error.h" 20 #include "telephony_sim_utils.h" 21 #include "telephony_types.h" 22 23 namespace OHOS { 24 namespace Telephony { 25 26 class TelephonySimImpl { 27 public: 28 static bool IsSimActive(int32_t slotId, int32_t &errCode); 29 static int32_t getDefaultVoiceSlotId(); 30 static bool hasOperatorPrivileges(int32_t slotId, int32_t &errCode); 31 static char* getISOCountryCodeForSim(int32_t slotId, int32_t &errCode); 32 static char* getSimOperatorNumeric(int32_t slotId, int32_t &errCode); 33 static char* getSimSpn(int32_t slotId, int32_t &errCode); 34 static int32_t getSimState(int32_t slotId, int32_t &errCode); 35 static int32_t getCardType(int32_t slotId, int32_t &errCode); 36 static bool hasSimCard(int32_t slotId, int32_t &errCode); 37 static CIccAccountInfo getSimAccountInfo(int32_t slotId, int32_t &errCode); 38 static CArryIccAccountInfo getActiveSimAccountInfoList(int32_t &errCode); 39 static int32_t getMaxSimCount(); 40 static char* getOpKey(int32_t slotId, int32_t &errCode); 41 static char* getOpName(int32_t slotId, int32_t &errCode); 42 static int32_t getDefaultVoiceSimId(int32_t &errCode); 43 }; 44 } 45 } 46 47 #endif