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 SYS_INSTALLER_MODULE_CONSTANTS_H 17 #define SYS_INSTALLER_MODULE_CONSTANTS_H 18 19 namespace OHOS { 20 namespace SysInstaller { 21 static constexpr int32_t APP_SERIAL_NUMBER = -1; 22 static constexpr const char *UPDATE_INSTALL_DIR = "/data/module_update_package"; 23 static constexpr const char *UPDATE_ACTIVE_DIR = "/data/module_update/active"; 24 static constexpr const char *UPDATE_BACKUP_DIR = "/data/module_update/backup"; 25 static constexpr const char *MODULE_PREINSTALL_DIR = "/system/module_update"; 26 static constexpr const char *MODULE_ROOT_DIR = "/module_update"; 27 static constexpr const char *HMP_PACKAGE_SUFFIX = ".zip"; 28 static constexpr const char *MODULE_PACKAGE_SUFFIX = ".zip"; 29 static constexpr const char *HMP_INFO_NAME = "module_info.zip"; 30 static constexpr const char *IMG_FILE_NAME = "module.img"; 31 static constexpr const char *PACK_INFO_NAME = "pack.info"; 32 static constexpr const char *MODULE_RESULT_PATH = "/data/updater/module_update_result"; 33 static constexpr const char *OTA_PACKAGE_DIR = "/data/update/ota_package"; 34 static constexpr const char *SA_ABNORMAL = "true"; 35 static constexpr const char *SA_NORMAL = "false"; 36 static constexpr const char *SA_START = "persist.samgr.moduleupdate.start"; 37 static constexpr const char *SA_START_PREFIX = "persist.samgr.moduleupdate"; 38 static constexpr const char *UNLOAD = "unload"; 39 static constexpr const char *LOAD_FAIL = "loadfail"; 40 static constexpr const char *CRASH = "crash"; 41 static constexpr const char *BMS_START_INSTALL = "persist.moduleupdate.bms.scan"; 42 static constexpr const char *BMS_RESULT_PREFIX = "persist.moduleupdate.bms.install"; 43 static constexpr const char *BMS_UPDATE = "update"; 44 static constexpr const char *BMS_REVERT = "revert"; 45 static constexpr const char *NOTIFY_BMS_REVERT = "revert_bms"; 46 static constexpr const char *BMS_INSTALL_FAIL = "false"; 47 } // namespace SysInstaller 48 } // namespace OHOS 49 #endif // SYS_INSTALLER_MODULE_CONSTANTS_H