1fb299fa2Sopenharmony_ci 2fb299fa2Sopenharmony_ci/* 3fb299fa2Sopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd. 4fb299fa2Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 5fb299fa2Sopenharmony_ci * you may not use this file except in compliance with the License. 6fb299fa2Sopenharmony_ci * You may obtain a copy of the License at 7fb299fa2Sopenharmony_ci * 8fb299fa2Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 9fb299fa2Sopenharmony_ci * 10fb299fa2Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 11fb299fa2Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 12fb299fa2Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13fb299fa2Sopenharmony_ci * See the License for the specific language governing permissions and 14fb299fa2Sopenharmony_ci * limitations under the License. 15fb299fa2Sopenharmony_ci */ 16fb299fa2Sopenharmony_ci 17fb299fa2Sopenharmony_ci#ifndef UPDATER_UI_UPDATER_UI_EMPTY 18fb299fa2Sopenharmony_ci#define UPDATER_UI_UPDATER_UI_EMPTY 19fb299fa2Sopenharmony_ci 20fb299fa2Sopenharmony_ci#include <string> 21fb299fa2Sopenharmony_ci#include "updater_ui_const.h" 22fb299fa2Sopenharmony_ci 23fb299fa2Sopenharmony_cinamespace Updater { 24fb299fa2Sopenharmony_ciclass UpdaterUiEmpty { 25fb299fa2Sopenharmony_cipublic: 26fb299fa2Sopenharmony_ci static UpdaterUiEmpty &GetInstance() 27fb299fa2Sopenharmony_ci { 28fb299fa2Sopenharmony_ci static UpdaterUiEmpty instance; 29fb299fa2Sopenharmony_ci return instance; 30fb299fa2Sopenharmony_ci } 31fb299fa2Sopenharmony_ci void InitEnv() const {} 32fb299fa2Sopenharmony_ci [[nodiscard]] bool SetMode(std::string mode) 33fb299fa2Sopenharmony_ci { 34fb299fa2Sopenharmony_ci return true; 35fb299fa2Sopenharmony_ci } 36fb299fa2Sopenharmony_ci std::string GetMode() const 37fb299fa2Sopenharmony_ci { 38fb299fa2Sopenharmony_ci return ""; 39fb299fa2Sopenharmony_ci } 40fb299fa2Sopenharmony_ci void ShowLog(const std::string &tag, bool isClear = false) const {} 41fb299fa2Sopenharmony_ci void ShowLogRes(const std::string &tag, bool isClear = false) const {} 42fb299fa2Sopenharmony_ci void ShowUpdInfo(const std::string &tag, bool isClear = false) const {} 43fb299fa2Sopenharmony_ci void ClearText() const {} 44fb299fa2Sopenharmony_ci void ClearLog() const {} 45fb299fa2Sopenharmony_ci void ShowProgress(float value) const {} 46fb299fa2Sopenharmony_ci void ShowProgressPage() const {} 47fb299fa2Sopenharmony_ci void ShowSuccessPage() const {} 48fb299fa2Sopenharmony_ci void ShowFailedPage() const {} 49fb299fa2Sopenharmony_ci void ShowFactoryConfirmPage() {} 50fb299fa2Sopenharmony_ci void ShowMainpage() const {} 51fb299fa2Sopenharmony_ci void ShowProgressWarning(bool isShow) const {} 52fb299fa2Sopenharmony_ci bool IsInProgress() const 53fb299fa2Sopenharmony_ci { 54fb299fa2Sopenharmony_ci return false; 55fb299fa2Sopenharmony_ci } 56fb299fa2Sopenharmony_ci void Sleep(int ms) const {} 57fb299fa2Sopenharmony_ci void SaveScreen() const {} 58fb299fa2Sopenharmony_ci float GetCurrentPercent() 59fb299fa2Sopenharmony_ci { 60fb299fa2Sopenharmony_ci return 0; 61fb299fa2Sopenharmony_ci } 62fb299fa2Sopenharmony_ci}; 63fb299fa2Sopenharmony_ci} // namespace Updater 64fb299fa2Sopenharmony_ci#endif