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 i_inputer_data.h 18 * 19 * @brief The definition of pinAuth's inputer data. 20 * @since 3.1 21 * @version 3.2 22 */ 23 24 #ifndef PINAUTH_IINPUTERDATA_H 25 #define PINAUTH_IINPUTERDATA_H 26 27 #include <memory> 28 #include <vector> 29 #include "nocopyable.h" 30 31 namespace OHOS { 32 namespace UserIam { 33 namespace PinAuth { 34 class IInputerData : public NoCopyable { 35 public: 36 /** 37 * @brief Get IInputerData's instance. 38 * 39 * @return IInputerData's instance. 40 */ 41 IInputerData() = default; 42 43 /** 44 * @brief Deconstructor. 45 */ 46 ~IInputerData() override = default; 47 48 /** 49 * @brief Transfers the pin data from the pin input dialog box to the pin auth service ability. 50 * 51 * @param authSubType PinAuth sub type. 52 * @param data Pin data. 53 */ 54 virtual void OnSetData(int32_t authSubType, std::vector<uint8_t> data) = 0 ; 55 }; 56 } // namespace PinAuth 57 } // namespace UserIam 58 } // namespace OHOS 59 60 #endif // PINAUTH_IINPUTERDATA_H 61