1 /* 2 * Copyright (C) 2024 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 OH_CJ_REQUEST_APP_STATE_CALLBACK_H 17 #define OH_CJ_REQUEST_APP_STATE_CALLBACK_H 18 19 #include "cj_ability_lifecycle_callback.h" 20 21 namespace OHOS::CJSystemapi::Request { 22 class CJAppStateCallback : public OHOS::AbilityRuntime::CjAbilityLifecycleCallback, 23 public std::enable_shared_from_this<CJAppStateCallback> { 24 public: OnAbilityCreate(const int64_t & ability)25 void OnAbilityCreate(const int64_t &ability){}; 26 OnWindowStageCreate(const int64_t & ability,WindowStagePtr windowStage)27 void OnWindowStageCreate(const int64_t &ability, WindowStagePtr windowStage) {} 28 OnWindowStageDestroy(const int64_t & ability,WindowStagePtr windowStage)29 void OnWindowStageDestroy(const int64_t &ability, WindowStagePtr windowStage) {} 30 OnWindowStageActive(const int64_t & ability,WindowStagePtr windowStage)31 void OnWindowStageActive(const int64_t &ability, WindowStagePtr windowStage) {} 32 OnWindowStageInactive(const int64_t & ability,WindowStagePtr windowStage)33 void OnWindowStageInactive(const int64_t &ability, WindowStagePtr windowStage) {} 34 OnAbilityDestroy(const int64_t & ability)35 void OnAbilityDestroy(const int64_t &ability) {} 36 37 void OnAbilityForeground(const int64_t &ability); 38 OnAbilityBackground(const int64_t & ability)39 void OnAbilityBackground(const int64_t &ability) {} 40 OnAbilityContinue(const int64_t & ability)41 void OnAbilityContinue(const int64_t &ability) {} 42 }; 43 } // namespace OHOS::CJSystemapi::Request 44 #endif