1190978c3Sopenharmony_ci/* 2190978c3Sopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd. 3190978c3Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4190978c3Sopenharmony_ci * you may not use this file except in compliance with the License. 5190978c3Sopenharmony_ci * You may obtain a copy of the License at 6190978c3Sopenharmony_ci * 7190978c3Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8190978c3Sopenharmony_ci * 9190978c3Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10190978c3Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11190978c3Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12190978c3Sopenharmony_ci * See the License for the specific language governing permissions and 13190978c3Sopenharmony_ci * limitations under the License. 14190978c3Sopenharmony_ci */ 15190978c3Sopenharmony_ci 16190978c3Sopenharmony_ci#ifndef STARTUP_CONSTANT_H 17190978c3Sopenharmony_ci#define STARTUP_CONSTANT_H 18190978c3Sopenharmony_ci 19190978c3Sopenharmony_ci#include <cstdint> 20190978c3Sopenharmony_ci#include <string> 21190978c3Sopenharmony_ci#include <vector> 22190978c3Sopenharmony_ci 23190978c3Sopenharmony_cinamespace OHOS { 24190978c3Sopenharmony_cinamespace UpdateEngine { 25190978c3Sopenharmony_cienum class StartupReason { 26190978c3Sopenharmony_ci UNKNOWN = -1, 27190978c3Sopenharmony_ci DEVICE_REBOOT = 0, 28190978c3Sopenharmony_ci SCHEDULE_TASK = 1, 29190978c3Sopenharmony_ci PROCESS_ENV_RESET = 2, 30190978c3Sopenharmony_ci}; 31190978c3Sopenharmony_ci 32190978c3Sopenharmony_cienum class TaskPriority { 33190978c3Sopenharmony_ci LOW = 0, 34190978c3Sopenharmony_ci NORMAL = 1, 35190978c3Sopenharmony_ci HIGH = 2, 36190978c3Sopenharmony_ci}; 37190978c3Sopenharmony_ci 38190978c3Sopenharmony_cienum class AccessType { 39190978c3Sopenharmony_ci DEFAULT = 0, 40190978c3Sopenharmony_ci FIRMWARE = 1, 41190978c3Sopenharmony_ci PARAM = 2, 42190978c3Sopenharmony_ci DOWNLOAD = 3, 43190978c3Sopenharmony_ci REPORT = 4, 44190978c3Sopenharmony_ci}; 45190978c3Sopenharmony_ci 46190978c3Sopenharmony_cinamespace Startup { 47190978c3Sopenharmony_ciconst std::vector<AccessType> ACCESS_TYPES{AccessType::FIRMWARE}; 48190978c3Sopenharmony_ciconst std::string UPDATER_SA_NAME = "updater_sa"; 49190978c3Sopenharmony_ci 50190978c3Sopenharmony_ciconstexpr uint64_t ONE_SECOND_MILLISECONDS = 1000L; 51190978c3Sopenharmony_ciconstexpr uint64_t ONE_MINUTE_SECONDS = 60L; 52190978c3Sopenharmony_ciconstexpr uint64_t ONE_HOUR_MINUTES = 60L; 53190978c3Sopenharmony_ci 54190978c3Sopenharmony_ciconst std::string PULLUP_INTERVAL_CONFIG = "pullupInterval"; // SA拉起间隔配置项 55190978c3Sopenharmony_ciconstexpr uint64_t PULLUP_INTERVAL = 4 * ONE_HOUR_MINUTES * ONE_MINUTE_SECONDS; // SA拉起间隔 56190978c3Sopenharmony_ciconst std::string IDLE_CHECK_INTERVAL_CONFIG = "idleCheckInterval"; // 空闲检测间隔配置项 57190978c3Sopenharmony_ciconstexpr uint64_t IDLE_CHECK_INTERVAL = 5 * ONE_MINUTE_SECONDS; // 空闲检测间隔 58190978c3Sopenharmony_ci} // namespace Startup 59190978c3Sopenharmony_ci} // namespace UpdateEngine 60190978c3Sopenharmony_ci} // namespace OHOS 61190978c3Sopenharmony_ci#endif // STARTUP_CONSTANT_H