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 16 #ifndef OHOS_HDI_SECURE_ELEMENT_SIM_SECURE_ELEMENT_V1_0_SECUREELEMENTINTERFACESERVICE_H 17 #define OHOS_HDI_SECURE_ELEMENT_SIM_SECURE_ELEMENT_V1_0_SECUREELEMENTINTERFACESERVICE_H 18 #include "se_vendor_adaptions.h" 19 #include "v1_0/isecure_element_interface.h" 20 21 namespace OHOS { 22 namespace HDI { 23 namespace SecureElement { 24 namespace SimSecureElement { 25 namespace V1_0 { 26 class SecureElementInterfaceService : 27 public OHOS::HDI::SecureElement::SimSecureElement::V1_0::ISecureElementInterface { 28 public: 29 SecureElementInterfaceService() = default; 30 virtual ~SecureElementInterfaceService() = default; 31 32 int32_t init(const sptr<OHOS::HDI::SecureElement::SimSecureElement::V1_0::ISecureElementCallback>& clientCallback, 33 OHOS::HDI::SecureElement::SimSecureElement::V1_0::SecureElementStatus& status) override; 34 35 int32_t getAtr(std::vector<uint8_t>& response) override; 36 37 int32_t isSecureElementPresent(bool& present) override; 38 39 int32_t openLogicalChannel(const std::vector<uint8_t>& aid, uint8_t p2, std::vector<uint8_t>& response, 40 uint8_t& channelNumber, OHOS::HDI::SecureElement::SimSecureElement::V1_0::SecureElementStatus& status) 41 override; 42 43 int32_t openBasicChannel(const std::vector<uint8_t>& aid, uint8_t p2, std::vector<uint8_t>& response, 44 OHOS::HDI::SecureElement::SimSecureElement::V1_0::SecureElementStatus& status) override; 45 46 int32_t closeChannel(uint8_t channelNumber, 47 OHOS::HDI::SecureElement::SimSecureElement::V1_0::SecureElementStatus& status) override; 48 49 int32_t transmit(const std::vector<uint8_t>& command, std::vector<uint8_t>& response, 50 OHOS::HDI::SecureElement::SimSecureElement::V1_0::SecureElementStatus& status) override; 51 52 int32_t reset(OHOS::HDI::SecureElement::SimSecureElement::V1_0::SecureElementStatus& status) override; 53 private: 54 SimSeVendorAdaptions adaptor_; 55 }; 56 } // V1_0 57 } // SimSecureElement 58 } // SecureElement 59 } // HDI 60 } // OHOS 61 62 #endif // OHOS_HDI_SECURE_ELEMENT_SIM_SECURE_ELEMENT_V1_0_SECUREELEMENTINTERFACESERVICE_H