• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef SYS_INSTALLER_COMMON_H
17 #define SYS_INSTALLER_COMMON_H
18 
19 #include <string>
20 #include <cstdlib>
21 #include <cstdio>
22 #include <cstring>
23 #include <iostream>
24 
25 namespace OHOS {
26 namespace SysInstaller {
27 constexpr const char *SYS_LOG_DIR = "/data/updater/log";
28 constexpr const char *SYS_LOG_FILE = "/data/updater/log/sys_installer.log";
29 constexpr const char *SYS_STAGE_FILE = "/data/updater/log/sys_installer_stage.log";
30 constexpr const char *SYS_ERROR_FILE = "/data/updater/log/sys_installer_error_code.log";
31 
32 enum UpdateStatus {
33     UPDATE_STATE_INIT = 0,
34     UPDATE_STATE_ONGOING,
35     UPDATE_STATE_FAILED,
36     UPDATE_STATE_SUCCESSFUL
37 };
38 } // namespace SysInstaller
39 } // namespace OHOS
40 #endif // SYS_INSTALLER_COMMON_H
41