• 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 OHOS_ROSEN_HIDUMP_CONTROLLER_H
17 #define OHOS_ROSEN_HIDUMP_CONTROLLER_H
18 
19 #include "wm_single_instance.h"
20 #include "session/host/include/scene_session.h"
21 
22 namespace OHOS {
23 namespace Rosen {
24 class HidumpController {
25 WM_DECLARE_SINGLE_INSTANCE(HidumpController)
26 public:
27     void GetAllSessionDumpDetailedInfo(std::ostringstream& oss,
28         const std::vector<sptr<SceneSession>>& allSession, const std::vector<sptr<SceneSession>>& backgroundSession);
29 
30 private:
31     void DumpSceneSessionParamList(std::ostringstream& oss);
32     void DumpSceneSessionParam(std::ostringstream& oss, sptr<SceneSession> session);
33     void DumpSessionParamList(std::ostringstream& oss);
34     void DumpSessionParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
35     void DumpLayoutRectParamList(std::ostringstream& oss);
36     void DumpLayoutRectParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
37     void DumpLayoutParamList(std::ostringstream& oss);
38     void DumpLayoutParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
39     void DumpAbilityParamList(std::ostringstream& oss);
40     void DumpAbilityParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
41     void DumpKeyboardParamList(std::ostringstream& oss);
42     void DumpKeyboardParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
43     void DumpSysconfigParamList(std::ostringstream& oss);
44     void DumpSysconfigParam(std::ostringstream& oss, sptr<SceneSession> session);
45     void DumpLifeParamList(std::ostringstream& oss);
46     void DumpLifeParam(std::ostringstream& oss, sptr<SceneSession> session);
47     void DumpDisplayParamList(std::ostringstream& oss);
48     void DumpDisplayParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
49     void DumpFocusParamList(std::ostringstream& oss);
50     void DumpFocusParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
51     void DumpInputParamList(std::ostringstream& oss);
52     void DumpInputParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
53     void DumpLakeParamList(std::ostringstream& oss);
54     void DumpLakeParam(std::ostringstream& oss, sptr<SceneSession> session);
55     void DumpCOMParamList(std::ostringstream& oss);
56     void DumpCOMParam(std::ostringstream& oss, sptr<SceneSession> session);
57     void DumpVisibleParamList(std::ostringstream& oss);
58     void DumpVisibleParam(std::ostringstream& oss, sptr<SceneSession> session);
59 };
60 }
61 }
62 #endif // OHOS_ROSEN_HIDUMP_CONTROLLER_H
63