1/* 2 * Copyright (c) 2025 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 16package OHOS; 17 18enum UpdateStatus { 19 UPDATE_STATE_INIT = 0, 20 UPDATE_STATE_ONGOING, 21 UPDATE_STATE_FAILED, 22 UPDATE_STATE_SUCCESSFUL, 23 UPDATE_STATE_MAX, 24}; 25 26enum InstallMode { 27 FEATURE_INSTALL = 0, 28 REGULAR_OTA, 29 STREAM_OTA, 30 AB_REGULAR_OTA, 31 AB_STREAM_OTA, 32 VAB_REGULAR_OTA, 33 VAB_STREAM_OTA, 34}; 35 36enum RebootStatus { 37 NOT_REBOOT = 0, 38 REBOOTED, 39}; 40 41enum CloudRomInstallStatus { 42 ERROR = -1, 43 INIT = 0, 44 INSTALLING = 10, 45 UNZIP_PKG_SUCCESS, 46 RESTORE_PKG_SUCCESS, 47 WAIT_REBOOT_THEN_INSTALL, 48 WAIT_UPGRADE_THEN_INSTALL, 49 INSTALL_FAIL, 50 INSTALL_SUCCESS, 51 UNINSTALLING = 30, 52 WAIT_REBOOT_THEN_UNINSTALL, 53 UNINSTALL_FAIL, 54 UNINSTALL_SUCCESS, 55}; 56 57struct FeatureInfo { 58 boolean isNeedReboot; 59 String featureName; 60 String version; 61 String path; 62}; 63 64struct ErrorInfo { 65 int errorCode; 66 String errorMsg; 67}; 68 69struct FeatureStatus { 70 String featureName; 71 String version; 72 String installPath; 73 CloudRomInstallStatus status; 74 ErrorInfo errorInfo; 75 unsigned int featureType; 76}; 77