• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023-2024 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("../device_status.gni")
15
16config("devicestatus_services_private_config") {
17  include_dirs = [
18    "delegate_task/include",
19    "native/include",
20    "${device_status_utils_path}/include",
21    "${device_status_interfaces_path}/innerkits/include",
22    "${device_status_interfaces_path}/innerkits/interaction/include",
23    "../libs/interface",
24    "interaction/drag/include",
25    "communication/base",
26    "communication/service/include",
27  ]
28
29  if (device_status_intention_framework) {
30    include_dirs += [
31      "${device_status_root_path}/intention/cooperate/server/include",
32      "${device_status_root_path}/intention/drag/server/include",
33      "${device_status_root_path}/intention/ipc/socket/include",
34    ]
35  }
36
37  defines = device_status_default_defines
38}
39
40config("devicestatus_services_public_config") {
41  include_dirs = [
42    "delegate_task/include",
43    "native/include",
44    "interaction/drag/include",
45  ]
46
47  if (device_status_intention_framework) {
48    include_dirs += [
49      "${device_status_root_path}/intention/cooperate/server/include",
50      "${device_status_root_path}/intention/drag/server/include",
51      "${device_status_root_path}/intention/ipc/socket/include",
52    ]
53  }
54}
55
56sources_set = [
57  "communication/service/src/devicestatus_srv_stub.cpp",
58  "delegate_task/src/delegate_tasks.cpp",
59  "native/src/devicestatus_dumper.cpp",
60  "native/src/devicestatus_hisysevent.cpp",
61  "native/src/devicestatus_manager.cpp",
62  "native/src/devicestatus_msdp_client_impl.cpp",
63  "native/src/devicestatus_service.cpp",
64  "native/src/stream_server.cpp",
65  "native/src/devicestatus_napi_manager.cpp",
66]
67
68external_deps_set = [
69  "ability_runtime:app_manager",
70  "access_token:libaccesstoken_sdk",
71  "access_token:libtokenid_sdk",
72  "cJSON:cjson",
73  "c_utils:utils",
74  "graphic_2d:librender_service_client",
75  "graphic_2d:window_animation",
76  "hilog:libhilog",
77  "input:libmmi-client",
78  "ipc:ipc_single",
79  "image_framework:image_native",
80  "libxml2:libxml2",
81  "qos_manager:concurrent_task_client",
82  "qos_manager:qos",
83  "safwk:system_ability_fwk",
84  "samgr:samgr_proxy",
85  "window_manager:libwm",
86  "window_manager:libdm",
87]
88
89ohos_shared_library("devicestatus_service") {
90  sanitize = {
91    integer_overflow = true
92    ubsan = true
93    boundary_sanitize = true
94    cfi = true
95    cfi_cross_dso = true
96    debug = false
97  }
98
99  branch_protector_ret = "pac_ret"
100
101  shlib_type = "sa"
102
103  sources = sources_set
104
105  configs = [ ":devicestatus_services_private_config" ]
106
107  public_configs = [ ":devicestatus_services_public_config" ]
108
109  deps = [
110    "${device_status_interfaces_path}/innerkits:devicestatus_client",
111    "${device_status_root_path}/utils/ipc:devicestatus_ipc",
112    "${device_status_utils_path}:devicestatus_util",
113    "interaction/drag:interaction_drag",
114  ]
115
116  if (device_status_intention_framework) {
117    deps += [
118      "${device_status_root_path}/intention/adapters/ddm_adapter:intention_ddm_adapter",
119      "${device_status_root_path}/intention/adapters/dsoftbus_adapter:intention_dsoftbus_adapter",
120      "${device_status_root_path}/intention/adapters/input_adapter:intention_input_adapter",
121      "${device_status_root_path}/intention/scheduler/plugin_manager:intention_plugin_manager",
122    ]
123  }
124
125  public_deps = [
126    "${device_status_root_path}/intention/common/epoll:intention_epoll",
127    "${device_status_root_path}/intention/prototype:intention_prototype",
128    "${device_status_root_path}/intention/scheduler/timer_manager:intention_timer_manager",
129    "${device_status_root_path}/intention/services/device_manager:intention_device_manager",
130  ]
131
132  if (device_status_intention_framework) {
133    public_deps += [
134      "${device_status_root_path}/intention/ipc/socket:intention_socket_session_manager",
135      "${device_status_root_path}/intention/ipc/tunnel:intention_tunnel_server",
136      "${device_status_root_path}/intention/services/intention_service:intention_service",
137    ]
138  }
139
140  defines = []
141  if (device_status_sensor_enable) {
142    defines += [ "DEVICE_STATUS_SENSOR_ENABLE" ]
143  }
144  external_deps = external_deps_set
145  if (device_status_intention_framework) {
146    external_deps += [ "device_manager:devicemanagersdk" ]
147  } else {
148    if (device_status_interaction_coordination) {
149      external_deps += [ "device_manager:devicemanagersdk" ]
150    }
151  }
152  if (device_status_memmgr_enable) {
153    defines += [ "MEMMGR_ENABLE" ]
154    external_deps += [ "memmgr:memmgrclient" ]
155  }
156  if (device_status_hisysevent_enable) {
157    external_deps += [ "hisysevent:libhisysevent" ]
158    defines += [ "MSDP_HIVIEWDFX_HISYSEVENT_ENABLE" ]
159  }
160
161  if (device_status_hitrace_enable) {
162    external_deps += [ "hitrace:hitrace_meter" ]
163    defines += [ "MSDP_HIVIEWDFX_HITRACE_ENABLE" ]
164  }
165  if (device_status_motion_enable) {
166    defines += [ "MOTION_ENABLE" ]
167    external_deps += [ "motion:motion_interface_native" ]
168  }
169
170  subsystem_name = "${device_status_subsystem_name}"
171  part_name = "${device_status_part_name}"
172}
173
174ohos_static_library("devicestatus_static_service") {
175  sanitize = {
176    integer_overflow = true
177    ubsan = true
178    boundary_sanitize = true
179    cfi = true
180    cfi_cross_dso = true
181    debug = false
182  }
183
184  sources = sources_set
185
186  configs = [ ":devicestatus_services_private_config" ]
187
188  public_configs = [ ":devicestatus_services_public_config" ]
189
190  deps = [
191    "${device_status_interfaces_path}/innerkits:devicestatus_client",
192    "${device_status_root_path}/utils/ipc:devicestatus_ipc",
193    "${device_status_utils_path}:devicestatus_util",
194    "interaction/drag:interaction_drag",
195  ]
196
197  if (device_status_intention_framework) {
198    deps += [
199      "${device_status_root_path}/intention/adapters/ddm_adapter:intention_ddm_adapter",
200      "${device_status_root_path}/intention/adapters/dsoftbus_adapter:intention_dsoftbus_adapter",
201      "${device_status_root_path}/intention/adapters/input_adapter:intention_input_adapter",
202      "${device_status_root_path}/intention/scheduler/plugin_manager:intention_plugin_manager",
203    ]
204  }
205
206  defines = []
207  if (device_status_sensor_enable) {
208    defines += [ "DEVICE_STATUS_SENSOR_ENABLE" ]
209  }
210
211  public_deps = [
212    "${device_status_root_path}/intention/common/epoll:intention_epoll",
213    "${device_status_root_path}/intention/prototype:intention_prototype",
214    "${device_status_root_path}/intention/scheduler/timer_manager:intention_timer_manager",
215    "${device_status_root_path}/intention/services/device_manager:intention_device_manager",
216  ]
217
218  if (device_status_intention_framework) {
219    public_deps += [
220      "${device_status_root_path}/intention/ipc/socket:intention_socket_session_manager",
221      "${device_status_root_path}/intention/ipc/tunnel:intention_tunnel_server",
222      "${device_status_root_path}/intention/services/intention_service:intention_service",
223    ]
224  }
225
226  external_deps = external_deps_set
227  if (device_status_intention_framework) {
228    external_deps += [ "device_manager:devicemanagersdk" ]
229  } else {
230    if (device_status_interaction_coordination) {
231      external_deps += [ "device_manager:devicemanagersdk" ]
232    }
233  }
234  if (device_status_memmgr_enable) {
235    defines += [ "MEMMGR_ENABLE" ]
236    external_deps += [ "memmgr:memmgrclient" ]
237  }
238
239  if (device_status_hisysevent_enable) {
240    external_deps += [ "hisysevent:libhisysevent" ]
241    defines += [ "MSDP_HIVIEWDFX_HISYSEVENT_ENABLE" ]
242  }
243
244  if (device_status_hitrace_enable) {
245    external_deps += [ "hitrace:hitrace_meter" ]
246    defines += [ "MSDP_HIVIEWDFX_HITRACE_ENABLE" ]
247  }
248  if (device_status_motion_enable) {
249    defines += [ "MOTION_ENABLE" ]
250    external_deps += [ "motion:motion_interface_native" ]
251  }
252
253  subsystem_name = "${device_status_subsystem_name}"
254  part_name = "${device_status_part_name}"
255}
256