1 /* 2 * Copyright (c) 2023 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 #ifndef IAM_WIDGET_SCHEDULE_CALLBACK_H 17 #define IAM_WIDGET_SCHEDULE_CALLBACK_H 18 19 #include <cstdint> 20 #include <memory> 21 #include <set> 22 #include <vector> 23 24 #include "attributes.h" 25 #include "iam_common_defines.h" 26 #include "user_auth_common_defines.h" 27 28 namespace OHOS { 29 namespace UserIam { 30 namespace UserAuth { 31 class WidgetScheduleNodeCallback { 32 public: 33 virtual ~WidgetScheduleNodeCallback() = default; 34 virtual bool LaunchWidget() = 0; 35 virtual void ExecuteAuthList(const std::set<AuthType> &authTypeList, bool endAfterFirstFail, 36 AuthIntent authIntent) = 0; 37 virtual void EndAuthAsCancel() = 0; 38 virtual void EndAuthAsNaviPin() = 0; 39 virtual void EndAuthAsWidgetParaInvalid() = 0; 40 virtual void StopAuthList(const std::vector<AuthType> &authTypeList) = 0; 41 virtual void SuccessAuth(AuthType authType) = 0; 42 virtual bool AuthWidgetReload(uint32_t orientation, uint32_t needRotate, uint32_t alreadyLoad, 43 AuthType &rotateAuthType) = 0; 44 virtual void AuthWidgetReloadInit() = 0; 45 }; 46 } // namespace UserAuth 47 } // namespace UserIam 48 } // namespace OHOS 49 #endif // IAM_WIDGET_SCHEDULE_CALLBACK_H