1 /****************************************************************************** 2 * 3 * Copyright 2018-2019,2022-2023 NXP 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 #ifdef NXP_BOOTTIME_UPDATE 19 #ifndef VENDOR_NXP_NXPNFC_V1_0_NXPNFC_H 20 #define VENDOR_NXP_NXPNFC_V1_0_NXPNFC_H 21 22 #include <android/binder_auto_utils.h> 23 #include <android/binder_enums.h> 24 #include <android/binder_ibinder.h> 25 #include <android/binder_interface_utils.h> 26 #include <android/binder_manager.h> 27 #include <android/binder_process.h> 28 #include <android/hardware/secure_element/1.0/ISecureElementHalCallback.h> 29 #include <android/hardware/secure_element/1.1/ISecureElement.h> 30 #include <android/hardware/secure_element/1.1/ISecureElementHalCallback.h> 31 #include <binder/IServiceManager.h> 32 #include <hardware/hardware.h> 33 #include <hidl/MQDescriptor.h> 34 #include <hidl/Status.h> 35 #include <vendor/nxp/nxpese/1.0/INxpEse.h> 36 37 #include "hal_nxpese.h" 38 namespace vendor { 39 namespace nxp { 40 namespace nxpese { 41 namespace V1_0 { 42 namespace implementation { 43 44 using ::android::sp; 45 using ::android::hardware::hidl_array; 46 using android::hardware::hidl_handle; 47 using ::android::hardware::hidl_memory; 48 using ::android::hardware::hidl_string; 49 using ::android::hardware::hidl_vec; 50 using ::android::hardware::Return; 51 using ::android::hardware::Void; 52 using ::android::hardware::secure_element::V1_0::ISecureElementHalCallback; 53 using ::android::hidl::base::V1_0::DebugInfo; 54 using ::android::hidl::base::V1_0::IBase; 55 using ::vendor::nxp::nxpese::V1_0::INxpEse; 56 struct NxpEse : public INxpEse { 57 // Methods from ::android::hidl::base::V1_0::IBase follow. 58 Return<void> debug(const hidl_handle& handle, 59 const hidl_vec<hidl_string>& options) override; 60 Return<void> ioctl(uint64_t ioctlType, const hidl_vec<uint8_t>& inOutData, 61 ioctl_cb _hidl_cb) override; 62 static Return<void> setSeCallBack( 63 const android::sp<ISecureElementHalCallback>& clientCallback); 64 static Return<void> setSeCallBack_1_1( 65 const android::sp< 66 ::android::hardware::secure_element::V1_1::ISecureElementHalCallback>& 67 clientCallback); 68 static Return<void> setVirtualISOCallBack( 69 const android::sp<ISecureElementHalCallback>& clientCallback); 70 static Return<void> setVirtualISOCallBack_1_1( 71 const android::sp< 72 ::android::hardware::secure_element::V1_1::ISecureElementHalCallback>& 73 clientCallback); 74 static void initSEService(); 75 static void initVIrtualISOService(); 76 private: 77 Return<void> ioctlHandler(uint64_t ioctlType, 78 ese_nxp_IoctlInOutData_t& inpOutData); 79 }; 80 81 } // namespace implementation 82 } // namespace V1_0 83 } // namespace nxpese 84 } // namespace nxp 85 } // namespace vendor 86 87 #endif // VENDOR_NXP_NXPNFC_V1_0_NXPNFC_H 88 #endif // NXP_BOOTTIME_UPDATE