• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 std::enable_shared_from_this<CJAppStateCallback> {
24 public:
OnAbilityCreate(const std::shared_ptr<NativeReference> & ability)25     void OnAbilityCreate(const std::shared_ptr<NativeReference> &ability) override{};
26 
OnWindowStageCreate(const std::shared_ptr<NativeReference> & ability,const std::shared_ptr<NativeReference> & windowStage)27     void OnWindowStageCreate(
28         const std::shared_ptr<NativeReference> &ability, const std::shared_ptr<NativeReference> &windowStage) override
29     {
30     }
31 
OnWindowStageDestroy(const std::shared_ptr<NativeReference> & ability,const std::shared_ptr<NativeReference> & windowStage)32     void OnWindowStageDestroy(
33         const std::shared_ptr<NativeReference> &ability, const std::shared_ptr<NativeReference> &windowStage) override
34     {
35     }
36 
OnWindowStageActive(const std::shared_ptr<NativeReference> & ability,const std::shared_ptr<NativeReference> & windowStage)37     void OnWindowStageActive(
38         const std::shared_ptr<NativeReference> &ability, const std::shared_ptr<NativeReference> &windowStage) override
39     {
40     }
41 
OnWindowStageInactive(const std::shared_ptr<NativeReference> & ability,const std::shared_ptr<NativeReference> & windowStage)42     void OnWindowStageInactive(
43         const std::shared_ptr<NativeReference> &ability, const std::shared_ptr<NativeReference> &windowStage) override
44     {
45     }
46 
OnAbilityDestroy(const std::shared_ptr<NativeReference> & ability)47     void OnAbilityDestroy(const std::shared_ptr<NativeReference> &ability) override
48     {
49     }
50 
51     void OnAbilityForeground(const std::shared_ptr<NativeReference> &ability) override;
52 
OnAbilityBackground(const std::shared_ptr<NativeReference> & ability)53     void OnAbilityBackground(const std::shared_ptr<NativeReference> &ability) override
54     {
55     }
56 
OnAbilityContinue(const std::shared_ptr<NativeReference> & ability)57     void OnAbilityContinue(const std::shared_ptr<NativeReference> &ability) override
58     {
59     }
60 };
61 } // OHOS::CJSystemapi::Request
62 #endif