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 OHOS_SLITE_ABILITY_STATE_H 17 #define OHOS_SLITE_ABILITY_STATE_H 18 19 namespace OHOS { 20 namespace AbilitySlite { 21 /** 22 * @brief Enumerates all lifecycle states that an ability will go through over the course of its lifetime. 23 * 24 * @since 1.0 25 * @version 1.0 26 */ 27 enum SliteAbilityState { 28 SLITE_STATE_UNKNOWN, 29 /** 30 * Uninitialized state: An ability is in this state when it has not been initialized. 31 */ 32 SLITE_STATE_UNINITIALIZED, 33 34 /** 35 * Initial state: An ability is in this state after it is initialized. 36 */ 37 SLITE_STATE_INITIAL, 38 39 /** 40 * Foreground state: An ability is in this state when it is switched to the foreground. 41 */ 42 SLITE_STATE_FOREGROUND, 43 44 /** 45 * Background state: An ability is in this state after it returns to the background. 46 */ 47 SLITE_STATE_BACKGROUND, 48 }; 49 } // namespace AbilitySlite 50 } // namespace OHOS 51 #endif // OHOS_SLITE_ABILITY_STATE_H 52