• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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("//build/ohos.gni")
15import("//build/ohos_var.gni")
16import("//foundation/deviceprofile/device_info_manager/deviceprofile.gni")
17
18config("device_info_manager_config") {
19  visibility = [ ":*" ]
20  visibility += [ "./test/*" ]
21  include_dirs = [
22    "include",
23    "include/contentsensormanager",
24    "include/deviceprofilemanager",
25    "include/deviceprofilemanager/listener",
26    "include/dfx",
27    "include/dm_adapter",
28    "include/permissionmanager",
29    "include/persistenceadapter",
30    "include/persistenceadapter/kvadapter",
31    "include/persistenceadapter/rdbadapter",
32    "include/subscribeprofilemanager",
33    "include/trustprofilemanager",
34    "include/utils",
35    "${device_profile_common}/include/constants",
36    "${device_profile_common}/include/interfaces",
37    "${device_profile_common}/include/utils",
38    "${device_profile_path}/radar/include",
39  ]
40}
41
42ohos_shared_library("distributed_device_profile_svr") {
43  branch_protector_ret = "pac_ret"
44
45  sanitize = {
46    boundary_sanitize = true
47    integer_overflow = true
48    ubsan = true
49    debug = false
50  }
51
52  install_enable = true
53  sources = [
54    "src/contentsensormanager/collaboration_info_collector.cpp",
55    "src/contentsensormanager/collector.cpp",
56    "src/contentsensormanager/content_sensor_manager.cpp",
57    "src/contentsensormanager/dms_info_collector.cpp",
58    "src/contentsensormanager/pasteboard_info_collector.cpp",
59    "src/contentsensormanager/syscap_info_collector.cpp",
60    "src/contentsensormanager/system_info_collector.cpp",
61    "src/deviceprofilemanager/device_profile_manager.cpp",
62    "src/deviceprofilemanager/listener/kv_data_change_listener.cpp",
63    "src/deviceprofilemanager/listener/kv_store_death_recipient.cpp",
64    "src/deviceprofilemanager/listener/kv_sync_completed_listener.cpp",
65    "src/deviceprofilemanager/listener/sync_subscriber_death_recipient.cpp",
66    "src/dfx/device_profile_dumper.cpp",
67    "src/distributed_device_profile_service_new.cpp",
68    "src/distributed_device_profile_stub_new.cpp",
69    "src/dm_adapter/dm_adapter.cpp",
70    "src/permissionmanager/permission_manager.cpp",
71    "src/persistenceadapter/kvadapter/kv_adapter.cpp",
72    "src/persistenceadapter/rdbadapter/rdb_adapter.cpp",
73    "src/subscribeprofilemanager/subscribe_profile_manager.cpp",
74    "src/trustprofilemanager/trust_profile_manager.cpp",
75    "src/utils/event_handler_factory.cpp",
76    "src/utils/profile_cache.cpp",
77  ]
78
79  deps = [
80    "${device_profile_common}:distributed_device_profile_common",
81    "${device_profile_path}/radar:device_profile_radar",
82  ]
83
84  configs = [ ":device_info_manager_config" ]
85
86  external_deps = [
87    "access_token:libaccesstoken_sdk",
88    "cJSON:cjson",
89    "c_utils:utils",
90    "device_auth:deviceauth_sdk",
91    "device_manager:devicemanagersdk",
92    "dmsfwk:common_sdk",
93    "eventhandler:libeventhandler",
94    "hilog:libhilog",
95    "hisysevent:libhisysevent",
96    "hitrace:hitrace_meter",
97    "init:libbegetutil",
98    "ipc:ipc_core",
99    "kv_store:distributeddata_inner",
100    "relational_store:native_rdb",
101    "safwk:system_ability_fwk",
102    "samgr:samgr_proxy",
103    "syscap_codec:syscap_interface_shared",
104  ]
105
106  part_name = "device_info_manager"
107  subsystem_name = "deviceprofile"
108}
109
110group("unittest") {
111  testonly = true
112  deps = [ "test:unittest" ]
113}
114