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("intention_cooperate_public_config") {
17  include_dirs = [ "include" ]
18}
19
20ohos_shared_library("intention_cooperate") {
21  sanitize = {
22    integer_overflow = true
23    ubsan = true
24    boundary_sanitize = true
25    cfi = true
26    cfi_cross_dso = true
27    debug = false
28  }
29
30  branch_protector_ret = "pac_ret"
31
32  include_dirs = [
33    "include",
34    "${device_status_root_path}/intention/services/device_manager/include",
35  ]
36
37  sources = [
38    "src/cooperate.cpp",
39    "src/cooperate_context.cpp",
40    "src/cooperate_free.cpp",
41    "src/cooperate_in.cpp",
42    "src/cooperate_out.cpp",
43    "src/dsoftbus_handler.cpp",
44    "src/event_manager.cpp",
45    "src/hot_area.cpp",
46    "src/i_cooperate_state.cpp",
47    "src/input_device_mgr.cpp",
48    "src/input_event_transmission/inner_pointer_item.cpp",
49    "src/input_event_transmission/input_event_builder.cpp",
50    "src/input_event_transmission/input_event_interceptor.cpp",
51    "src/input_event_transmission/input_event_serialization.cpp",
52    "src/mouse_location.cpp",
53    "src/state_machine.cpp",
54  ]
55
56  public_configs = [ ":intention_cooperate_public_config" ]
57
58  defines = device_status_default_defines
59
60  deps = [
61    "${device_status_root_path}/intention/adapters/common_event_adapter:intention_common_event_adapter",
62    "${device_status_root_path}/intention/adapters/ddm_adapter:intention_ddm_adapter",
63    "${device_status_root_path}/intention/common/channel:intention_channel",
64    "${device_status_root_path}/intention/prototype:intention_prototype",
65    "${device_status_root_path}/intention/services/device_manager:intention_device_manager",
66    "${device_status_root_path}/utils/common:devicestatus_util",
67    "${device_status_root_path}/utils/ipc:devicestatus_ipc",
68  ]
69
70  external_deps = [
71    "ability_runtime:app_manager",
72    "access_token:libaccesstoken_sdk",
73    "access_token:libtokensetproc_shared",
74    "c_utils:utils",
75    "common_event_service:cesfwk_innerkits",
76    "device_manager:devicemanagersdk",
77    "eventhandler:libeventhandler",
78    "graphic_2d:librender_service_client",
79    "hilog:libhilog",
80    "image_framework:image_native",
81    "input:libmmi-client",
82    "ipc:ipc_single",
83    "samgr:samgr_proxy",
84    "window_manager:libdm",
85    "window_manager:libwmutil_base",
86  ]
87
88  subsystem_name = "${device_status_subsystem_name}"
89  part_name = "${device_status_part_name}"
90}
91