1bc2ed2b3Sopenharmony_ci/*
2bc2ed2b3Sopenharmony_ci * Copyright (C) 2022 Huawei Device Co., Ltd.
3bc2ed2b3Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4bc2ed2b3Sopenharmony_ci * you may not use this file except in compliance with the License.
5bc2ed2b3Sopenharmony_ci * You may obtain a copy of the License at
6bc2ed2b3Sopenharmony_ci *
7bc2ed2b3Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8bc2ed2b3Sopenharmony_ci *
9bc2ed2b3Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10bc2ed2b3Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11bc2ed2b3Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12bc2ed2b3Sopenharmony_ci * See the License for the specific language governing permissions and
13bc2ed2b3Sopenharmony_ci * limitations under the License.
14bc2ed2b3Sopenharmony_ci */
15bc2ed2b3Sopenharmony_ci#include "cardEmulation.h"
16bc2ed2b3Sopenharmony_ci#include "loghelper.h"
17bc2ed2b3Sopenharmony_ci#include "nfc_sdk_common.h"
18bc2ed2b3Sopenharmony_ci
19bc2ed2b3Sopenharmony_cinamespace OHOS {
20bc2ed2b3Sopenharmony_cinamespace NFC {
21bc2ed2b3Sopenharmony_cinamespace KITS {
22bc2ed2b3Sopenharmony_ci
23bc2ed2b3Sopenharmony_ciCardEmulation::CardEmulation()
24bc2ed2b3Sopenharmony_ci{
25bc2ed2b3Sopenharmony_ci    DebugLog("[cardEmulation::cardEmulation] new ability manager");
26bc2ed2b3Sopenharmony_ci}
27bc2ed2b3Sopenharmony_ci
28bc2ed2b3Sopenharmony_ciCardEmulation::~CardEmulation()
29bc2ed2b3Sopenharmony_ci{
30bc2ed2b3Sopenharmony_ci    DebugLog("destruct cardEmulation");
31bc2ed2b3Sopenharmony_ci}
32bc2ed2b3Sopenharmony_ci
33bc2ed2b3Sopenharmony_ciCardEmulation &CardEmulation::GetInstance()
34bc2ed2b3Sopenharmony_ci{
35bc2ed2b3Sopenharmony_ci    static CardEmulation instance;
36bc2ed2b3Sopenharmony_ci    return instance;
37bc2ed2b3Sopenharmony_ci}
38bc2ed2b3Sopenharmony_ci
39bc2ed2b3Sopenharmony_cibool CardEmulation::IsSupported(FeatureType feature)
40bc2ed2b3Sopenharmony_ci{
41bc2ed2b3Sopenharmony_ci    DebugLog("cardEmulation::IsSupported in.");
42bc2ed2b3Sopenharmony_ci    switch (feature) {
43bc2ed2b3Sopenharmony_ci        case HCE: {
44bc2ed2b3Sopenharmony_ci            DebugLog("cardEmulation::HCE card emulation is supported.");
45bc2ed2b3Sopenharmony_ci            break;
46bc2ed2b3Sopenharmony_ci        }
47bc2ed2b3Sopenharmony_ci        case UICC: {
48bc2ed2b3Sopenharmony_ci            DebugLog("cardEmulation::UICC card emulation is supported.");
49bc2ed2b3Sopenharmony_ci            break;
50bc2ed2b3Sopenharmony_ci        }
51bc2ed2b3Sopenharmony_ci        case ESE: {
52bc2ed2b3Sopenharmony_ci            DebugLog("cardEmulation::ESE card emulation is supported.");
53bc2ed2b3Sopenharmony_ci            break;
54bc2ed2b3Sopenharmony_ci        }
55bc2ed2b3Sopenharmony_ci        default:
56bc2ed2b3Sopenharmony_ci            DebugLog("cardEmulation:: card emulation is not supported.");
57bc2ed2b3Sopenharmony_ci            return false;
58bc2ed2b3Sopenharmony_ci    }
59bc2ed2b3Sopenharmony_ci    return true;
60bc2ed2b3Sopenharmony_ci}
61bc2ed2b3Sopenharmony_ci}  // namespace KITS
62bc2ed2b3Sopenharmony_ci}  // namespace NFC
63bc2ed2b3Sopenharmony_ci}  // namespace OHOS