1 /* 2 * Copyright (C) 2022 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 #ifndef NFC_CONTROLLER_PROXY_H 16 #define NFC_CONTROLLER_PROXY_H 17 18 19 #include "nfc_basic_proxy.h" 20 #include "nfc_sdk_common.h" 21 #include "infc_controller_callback.h" 22 #include "infc_controller_service.h" 23 #include "iremote_proxy.h" 24 #include "iremote_object.h" 25 26 namespace OHOS { 27 namespace NFC { 28 class NfcControllerProxy final : public OHOS::IRemoteProxy<INfcControllerService>, public NfcBasicProxy { 29 public: NfcControllerProxy(const OHOS::sptr<OHOS::IRemoteObject> & remote)30 explicit NfcControllerProxy(const OHOS::sptr<OHOS::IRemoteObject>& remote) 31 : OHOS::IRemoteProxy<INfcControllerService>(remote), NfcBasicProxy(remote) 32 { 33 } 34 ~NfcControllerProxy() override; 35 36 int TurnOn() override; 37 int TurnOff() override; 38 int GetState() override; 39 int IsNfcOpen(bool &isOpen) override; 40 KITS::ErrorCode RegisterCallBack(const sptr<INfcControllerCallback> &callback, 41 const std::string& type) override; 42 KITS::ErrorCode UnRegisterCallBack(const std::string& type) override; 43 OHOS::sptr<IRemoteObject> GetTagServiceIface() override; 44 private: 45 }; 46 } // namespace NFC 47 } // namespace OHOS 48 #endif // NFC_CONTROLLER_PROXY_H 49