• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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("//build/ohos_var.gni")
16import("//foundation/deviceprofile/device_info_manager/deviceprofile.gni")
17
18device_profile_common_sources =
19    [ "${old_device_profile_path}/common/src/device_profile_utils.cpp" ]
20
21config("device_info_manager_config") {
22  visibility = [ ":*" ]
23  visibility += [ "./test/*" ]
24  include_dirs = [
25    "include",
26    "include/authority",
27    "include/devicemanager",
28    "include/contentsensor",
29    "include/dbstorage",
30    "include/dfx",
31    "include/subscribemanager",
32    "${old_device_profile_path}/common/include",
33    "${old_device_profile_innerkits}/core/include",
34    "${old_device_profile_service}/core/include",
35    "${device_profile_path}/radar/include",
36    "${device_profile_service}/include/",
37    "${device_profile_service}/include/contentsensormanager",
38    "${device_profile_service}/include/deviceprofilemanager",
39    "${device_profile_service}/include/deviceprofilemanager/listener",
40    "${device_profile_service}/include/permissionmanager",
41    "${device_profile_service}/include/persistenceadapter/kvadapter",
42    "${device_profile_service}/include/persistenceadapter/rdbadapter",
43    "${device_profile_service}/include/subscribeprofilemanager",
44    "${device_profile_service}/include/trustprofilemanager",
45    "${device_profile_service}/include/utils",
46    "${device_profile_common}/include/constants",
47    "${device_profile_common}/include/interfaces",
48    "${device_profile_common}/include/utils",
49    "//third_party/json/include",
50  ]
51}
52
53ohos_shared_library("distributed_device_profile") {
54  branch_protector_ret = "pac_ret"
55
56  sanitize = {
57    boundary_sanitize = true
58    integer_overflow = true
59    ubsan = true
60    cfi = true
61    cfi_cross_dso = true
62    debug = false
63  }
64
65  install_enable = true
66  sources = [
67    "src/authority/authority_manager.cpp",
68    "src/authority/trust_group_manager.cpp",
69    "src/contentsensor/app_info_collector.cpp",
70    "src/contentsensor/content_collector.cpp",
71    "src/contentsensor/content_sensor_manager.cpp",
72    "src/contentsensor/device_info_collector.cpp",
73    "src/contentsensor/pasteboard_info_collector.cpp",
74    "src/contentsensor/storage_info_collector.cpp",
75    "src/contentsensor/syscap_info_collector.cpp",
76    "src/contentsensor/system_info_collector.cpp",
77    "src/dbstorage/device_profile_storage.cpp",
78    "src/dbstorage/device_profile_storage_manager.cpp",
79    "src/dbstorage/kvstore_death_recipient_dp.cpp",
80    "src/dbstorage/online_sync_table.cpp",
81    "src/dbstorage/sync_coordinator.cpp",
82    "src/devicemanager/device_info.cpp",
83    "src/devicemanager/dp_device_manager.cpp",
84    "src/dfx/device_profile_dumper.cpp",
85    "src/distributed_device_profile_service.cpp",
86    "src/distributed_device_profile_stub.cpp",
87    "src/profile_change_notification.cpp",
88    "src/service_characteristic_profile.cpp",
89    "src/subscribemanager/profile_change_handler.cpp",
90    "src/subscribemanager/profile_event_handler.cpp",
91    "src/subscribemanager/profile_event_handler_factory.cpp",
92    "src/subscribemanager/profile_event_notifier_proxy.cpp",
93    "src/subscribemanager/profile_sync_handler.cpp",
94    "src/subscribemanager/subscribe_info.cpp",
95    "src/subscribemanager/subscribe_info_checker.cpp",
96    "src/subscribemanager/subscribe_manager.cpp",
97    "src/subscribemanager/subscriber_death_recipient.cpp",
98    "src/sync_options.cpp",
99  ]
100  sources += device_profile_common_sources
101
102  configs = [
103    ":device_info_manager_config",
104    "${old_device_profile_test}/resource:coverage_flags",
105  ]
106
107  deps = [
108    "${device_profile_common}:distributed_device_profile_common",
109    "${device_profile_path}/radar:deviceprofileradar",
110    "${device_profile_service}:distributed_device_profile_svr",
111  ]
112
113  external_deps = [
114    "access_token:libaccesstoken_sdk",
115    "c_utils:utils",
116    "device_auth:deviceauth_sdk",
117    "device_manager:devicemanagersdk",
118    "dmsfwk:common_sdk",
119    "eventhandler:libeventhandler",
120    "hilog:libhilog",
121    "hisysevent:libhisysevent",
122    "hitrace:hitrace_meter",
123    "init:libbegetutil",
124    "ipc:ipc_core",
125    "kv_store:distributeddata_inner",
126    "safwk:system_ability_fwk",
127    "samgr:samgr_proxy",
128    "syscap_codec:syscap_interface_shared",
129  ]
130
131  part_name = "device_info_manager"
132  subsystem_name = "deviceprofile"
133}
134
135group("unittest") {
136  testonly = true
137  deps = [ "test:unittest" ]
138}
139