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 16/** 17 * @file pinauth_register.h 18 * 19 * @brief APIs for managing input dialog boxes. 20 * @since 3.1 21 * @version 3.2 22 */ 23 24#ifndef PINAUTH_REGISTER_H 25#define PINAUTH_REGISTER_H 26 27#include "i_inputer.h" 28 29namespace OHOS { 30namespace UserIam { 31namespace PinAuth { 32class PinAuthRegister { 33public: 34 /** 35 * @brief Get PinAuthRegister instance. 36 * 37 * @return PinAuthRegister's instance. 38 */ 39 static PinAuthRegister &GetInstance(); 40 41 /** 42 * @brief Deconstructor. 43 */ 44 virtual ~PinAuthRegister() = default; 45 46 /* 47 * @brief Register inputer that used to obtain pin data. 48 * 49 * @param inputer Used to obtain pin data. 50 * @return Is it successful. 51 */ 52 virtual bool RegisterInputer(std::shared_ptr<IInputer> inputer) = 0; 53 54 /* 55 * @brief UnRegister inputer that used to obtain pin data. 56 */ 57 virtual void UnRegisterInputer() = 0; 58}; 59} // namespace PinAuth 60} // namespace UserIam 61} // namespace OHOS 62 63#endif // PINAUTH_REGISTER_H 64