1 /****************************************************************************** 2 * 3 * Copyright (C) 2018-2019 NXP Semiconductors 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ******************************************************************************/ 18 #ifndef VENDOR_NXP_NXPNFC_V1_0_NXPNFC_H 19 #define VENDOR_NXP_NXPNFC_V1_0_NXPNFC_H 20 21 #include <android/hardware/secure_element/1.0/ISecureElementHalCallback.h> 22 #include <android/hardware/secure_element/1.1/ISecureElement.h> 23 #include <android/hardware/secure_element/1.1/ISecureElementHalCallback.h> 24 #include <hardware/hardware.h> 25 #include <hidl/MQDescriptor.h> 26 #include <hidl/Status.h> 27 #include <vendor/nxp/nxpese/1.0/INxpEse.h> 28 #include "hal_nxpese.h" 29 namespace vendor { 30 namespace nxp { 31 namespace nxpese { 32 namespace V1_0 { 33 namespace implementation { 34 35 using ::android::sp; 36 using ::android::hardware::hidl_array; 37 using ::android::hardware::hidl_memory; 38 using ::android::hardware::hidl_string; 39 using ::android::hardware::hidl_vec; 40 using ::android::hardware::Return; 41 using ::android::hardware::Void; 42 using ::android::hardware::secure_element::V1_0::ISecureElementHalCallback; 43 using ::android::hidl::base::V1_0::DebugInfo; 44 using ::android::hidl::base::V1_0::IBase; 45 using ::vendor::nxp::nxpese::V1_0::INxpEse; 46 struct NxpEse : public INxpEse { 47 Return<void> ioctl(uint64_t ioctlType, const hidl_vec<uint8_t>& inOutData, 48 ioctl_cb _hidl_cb) override; 49 static Return<void> setSeCallBack( 50 const android::sp<ISecureElementHalCallback>& clientCallback); 51 static Return<void> setSeCallBack_1_1( 52 const android::sp< 53 ::android::hardware::secure_element::V1_1::ISecureElementHalCallback>& 54 clientCallback); 55 static Return<void> setVirtualISOCallBack( 56 const android::sp<ISecureElementHalCallback>& clientCallback); 57 static Return<void> setVirtualISOCallBack_1_1( 58 const android::sp< 59 ::android::hardware::secure_element::V1_1::ISecureElementHalCallback>& 60 clientCallback); 61 static void initSEService(); 62 static void initVIrtualISOService(); 63 64 private: 65 Return<void> ioctlHandler(uint64_t ioctlType, 66 ese_nxp_IoctlInOutData_t& inpOutData); 67 }; 68 69 } // namespace implementation 70 } // namespace V1_0 71 } // namespace nxpese 72 } // namespace nxp 73 } // namespace vendor 74 75 #endif // VENDOR_NXP_NXPNFC_V1_0_NXPNFC_H 76