• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("../../windowmanager_aafwk.gni")
16
17config("session_manager_public_config") {
18  visibility = [ ":*" ]
19
20  include_dirs = [
21    "${window_base_path}/interfaces/innerkits/wm",
22    "${window_base_path}/interfaces/include",
23    "${window_base_path}/window_scene",
24    "${window_base_path}/window_scene/interfaces/include",
25    "${window_base_path}/window_scene/session_manager/include",
26    "${window_base_path}/window_scene/session_manager/include/zidl",
27    "${window_base_path}/window_scene/session_manager_service/include",
28
29    # for session_manager
30    "${multimodalinput_path}/input/interfaces/native/innerkits/event/include",
31    "${multimodalinput_path}/input/util/common/include",
32    "${ability_runtime_inner_api_path}/ability_manager/include",
33    "${window_base_path}/wmserver/include",
34    "${window_base_path}/wmserver/include/zidl",
35
36    # for screen_session_manager
37    "${window_base_path}/utils/include",
38    "${window_base_path}/dm/include",
39    "${window_base_path}/interfaces/innerkits/dm",
40    "${window_base_path}/dmserver/include",
41
42    # for scene session manager
43    "${ability_runtime_inner_api_path}/session_handler/include",
44    "${resourceschedule_path}/ffrt/interfaces/kits",
45    "${window_base_path}/interfaces/innerkits/wm",
46    "${window_base_path}/wmserver/include",
47    "${graphic_base_path}/graphic_2d/rosen/modules/animation/window_animation/include",
48
49    # for window_manager_hilog
50    "${window_base_path}/utils/include",
51
52    # for screenlock_manager_interface
53    "${screenlock_mgr_path}/services/include",
54    "${screenlock_mgr_path}/utils/include",
55    "${screenlock_mgr_path}/frameworks/native/include",
56    "${window_base_path}/wm/include",
57    "${window_base_path}/wm/include/zidl",
58  ]
59}
60
61ohos_shared_library("scene_session_manager") {
62  sources = [
63    "../../wm/src/zidl/window_manager_agent_proxy.cpp",
64    "src/distributed_client.cpp",
65    "src/extension_session_manager.cpp",
66    "src/scb_session_handler.cpp",
67    "src/scene_session_converter.cpp",
68    "src/scene_session_manager.cpp",
69    "src/session_listener_controller.cpp",
70    "src/session_manager_agent_controller.cpp",
71    "src/window_scene_config.cpp",
72    "src/zidl/scene_session_manager_stub.cpp",
73    "src/zidl/session_listener_proxy.cpp",
74    "src/zidl/session_listener_stub.cpp",
75  ]
76
77  public_configs = [ ":session_manager_public_config" ]
78
79  deps = [
80    "${window_base_path}/utils:libwmutil",
81    "${window_base_path}/window_scene/common:window_scene_common",
82    "${window_base_path}/window_scene/session:scene_session",
83    "${window_base_path}/window_scene/session_manager:screen_session_manager",
84    "//third_party/libxml2:libxml2",
85  ]
86
87  external_deps = [
88    "ability_base:session_info",
89    "ability_base:want",
90    "ability_runtime:ability_context_native",
91    "ability_runtime:ability_manager",
92    "ability_runtime:ability_start_setting",
93    "ability_runtime:mission_info",
94    "ability_runtime:session_handler",
95    "bundle_framework:appexecfwk_base",
96    "bundle_framework:appexecfwk_core",
97    "c_utils:utils",
98    "config_policy:configpolicy_util",
99    "display_manager:displaymgr",
100    "dsoftbus:softbus_client",
101    "eventhandler:libeventhandler",
102    "eventhandler:libeventhandler",
103    "ffrt:libffrt",
104    "graphic_2d:librender_service_client",
105    "graphic_2d:window_animation",
106    "hicollie:libhicollie",
107    "hilog:libhilog",
108    "hitrace:hitrace_meter",
109    "image_framework:image_native",
110    "init:libbegetutil",
111    "ipc:ipc_single",
112    "napi:ace_napi",
113    "power_manager:powermgr_client",
114    "resource_management:global_resmgr",
115    "samgr:samgr_proxy",
116  ]
117
118  defines = []
119  if (defined(global_parts_info) &&
120      defined(global_parts_info.resourceschedule_memmgr_plugin)) {
121    external_deps += [ "memmgr_plugin:memmgrclient" ]
122    defines += [ "MEMMGR_WINDOW_ENABLE" ]
123  }
124
125  if (defined(global_parts_info) &&
126      defined(global_parts_info.resourceschedule_soc_perf)) {
127    external_deps += [ "resource_schedule_service:ressched_client" ]
128    defines += [ "RES_SCHED_ENABLE" ]
129  }
130
131  innerapi_tags = [ "platformsdk" ]
132  part_name = "window_manager"
133  subsystem_name = "window"
134}
135
136ohos_shared_library("screen_session_manager") {
137  sources = [
138    "../../dm/src/zidl/display_manager_agent_proxy.cpp",
139    "src/fold_screen_controller/fold_screen_state_machine.cpp",
140    "src/screen_cutout_controller.cpp",
141    "src/screen_rotation_property.cpp",
142    "src/screen_scene_config.cpp",
143    "src/screen_sensor_connector.cpp",
144    "src/screen_session_manager.cpp",
145    "src/session_display_power_controller.cpp",
146    "src/zidl/screen_session_manager_stub.cpp",
147  ]
148
149  cflags_cc = [ "-std=c++17" ]
150
151  public_configs = [ ":session_manager_public_config" ]
152
153  deps = [
154    "${window_base_path}/utils:libwmutil",
155    "${window_base_path}/window_scene/common:window_scene_common",
156    "${window_base_path}/window_scene/session:screen_session",
157    "//third_party/libxml2:libxml2",
158  ]
159
160  external_deps = [
161    "c_utils:utils",
162    "config_policy:configpolicy_util",
163    "eventhandler:libeventhandler",
164    "graphic_2d:librender_service_client",
165    "hicollie:libhicollie",
166    "hilog:libhilog",
167    "hitrace:hitrace_meter",
168    "ipc:ipc_core",
169    "sensor:sensor_interface_native",
170  ]
171
172  defines = []
173  if (window_manager_feature_subscribe_motion) {
174    if (defined(global_parts_info) && defined(global_parts_info.msdp_motion)) {
175      external_deps += [ "motion:motion_interface_native" ]
176      defines += [ "WM_SUBSCRIBE_MOTION_ENABLE" ]
177    }
178  }
179
180  if (is_standard_system) {
181    external_deps += [ "init:libbegetutil" ]
182  } else {
183    external_deps += [ "init_lite:libbegetutil" ]
184  }
185
186  innerapi_tags = [ "platformsdk" ]
187  part_name = "window_manager"
188  subsystem_name = "window"
189}
190
191ohos_shared_library("session_manager") {
192  sources = [
193    "../../wmserver/src/zidl/mock_screen_manager_service_proxy.cpp",
194    "../../wmserver/src/zidl/mock_session_manager_service_proxy.cpp",
195    "../session_manager_service/src/session_manager_service_proxy.cpp",
196    "src/session_manager.cpp",
197    "src/zidl/scene_session_manager_proxy.cpp",
198    "src/zidl/screen_session_manager_proxy.cpp",
199  ]
200
201  cflags_cc = [ "-std=c++17" ]
202
203  public_configs = [ ":session_manager_public_config" ]
204
205  deps = [ "${window_base_path}/utils:libwmutil" ]
206
207  external_deps = [
208    "ability_base:session_info",
209    "ability_base:want",
210    "ability_runtime:mission_info",
211    "c_utils:utils",
212    "graphic_2d:librender_service_client",
213    "hilog:libhilog",
214    "image_framework:image_native",
215    "ipc:ipc_single",
216    "safwk:system_ability_fwk",
217    "samgr:samgr_proxy",
218  ]
219
220  innerapi_tags = [ "platformsdk_indirect" ]
221  part_name = "window_manager"
222  subsystem_name = "window"
223}
224