/* * 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. */ #include "secure_element_interface_service.h" #include #define HDF_LOG_TAG secure_element_interface_service namespace OHOS { namespace HDI { namespace SecureElement { namespace SimSecureElement { namespace V1_0 { extern "C" ISecureElementInterface *SecureElementInterfaceImplGetInstance(void) { return new (std::nothrow) SecureElementInterfaceService(); } int32_t SecureElementInterfaceService::init( const sptr& clientCallback, OHOS::HDI::SecureElement::SimSecureElement::V1_0::SecureElementStatus& status) { return adaptor_.init(clientCallback, status); } int32_t SecureElementInterfaceService::getAtr(std::vector& response) { return adaptor_.getAtr(response); } int32_t SecureElementInterfaceService::isSecureElementPresent(bool& present) { return adaptor_.isSecureElementPresent(present); } int32_t SecureElementInterfaceService::openLogicalChannel(const std::vector& aid, uint8_t p2, std::vector& response, uint8_t& channelNumber, OHOS::HDI::SecureElement::SimSecureElement::V1_0::SecureElementStatus& status) { return adaptor_.openLogicalChannel(aid, p2, response, channelNumber, status); } int32_t SecureElementInterfaceService::openBasicChannel(const std::vector& aid, uint8_t p2, std::vector& response, OHOS::HDI::SecureElement::SimSecureElement::V1_0::SecureElementStatus& status) { return adaptor_.openBasicChannel(aid, p2, response, status); } int32_t SecureElementInterfaceService::closeChannel(uint8_t channelNumber, OHOS::HDI::SecureElement::SimSecureElement::V1_0::SecureElementStatus& status) { return adaptor_.closeChannel(channelNumber, status); } int32_t SecureElementInterfaceService::transmit(const std::vector& command, std::vector& response, OHOS::HDI::SecureElement::SimSecureElement::V1_0::SecureElementStatus& status) { return adaptor_.transmit(command, response, status); } int32_t SecureElementInterfaceService::reset( OHOS::HDI::SecureElement::SimSecureElement::V1_0::SecureElementStatus& status) { return adaptor_.reset(status); } } // V1_0 } // SimSecureElement } // SecureElement } // HDI } // OHOS