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 "application_context.h"
20 
21 namespace OHOS::CJSystemapi::Request {
22 class CJAppStateCallback : public OHOS::AbilityRuntime::AbilityLifecycleCallback {
23 public:
OnAbilityCreate(const std::shared_ptr<NativeReference> & ability)24     void OnAbilityCreate(const std::shared_ptr<NativeReference> &ability) override{};
25 
OnWindowStageCreate(const std::shared_ptr<NativeReference> & ability,const std::shared_ptr<NativeReference> & windowStage)26     void OnWindowStageCreate(
27         const std::shared_ptr<NativeReference> &ability, const std::shared_ptr<NativeReference> &windowStage) override
28     {
29     }
30 
OnWindowStageDestroy(const std::shared_ptr<NativeReference> & ability,const std::shared_ptr<NativeReference> & windowStage)31     void OnWindowStageDestroy(
32         const std::shared_ptr<NativeReference> &ability, const std::shared_ptr<NativeReference> &windowStage) override
33     {
34     }
35 
OnWindowStageActive(const std::shared_ptr<NativeReference> & ability,const std::shared_ptr<NativeReference> & windowStage)36     void OnWindowStageActive(
37         const std::shared_ptr<NativeReference> &ability, const std::shared_ptr<NativeReference> &windowStage) override
38     {
39     }
40 
OnWindowStageInactive(const std::shared_ptr<NativeReference> & ability,const std::shared_ptr<NativeReference> & windowStage)41     void OnWindowStageInactive(
42         const std::shared_ptr<NativeReference> &ability, const std::shared_ptr<NativeReference> &windowStage) override
43     {
44     }
45 
OnAbilityDestroy(const std::shared_ptr<NativeReference> & ability)46     void OnAbilityDestroy(const std::shared_ptr<NativeReference> &ability) override
47     {
48     }
49 
50     void OnAbilityForeground(const std::shared_ptr<NativeReference> &ability) override;
51 
OnAbilityBackground(const std::shared_ptr<NativeReference> & ability)52     void OnAbilityBackground(const std::shared_ptr<NativeReference> &ability) override
53     {
54     }
55 
OnAbilityContinue(const std::shared_ptr<NativeReference> & ability)56     void OnAbilityContinue(const std::shared_ptr<NativeReference> &ability) override
57     {
58     }
59 };
60 } // OHOS::CJSystemapi::Request
61 #endif