• 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    [ "${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    "${device_profile_path}/common/include",
33    "${device_profile_innerkits}/core/include",
34    "${device_profile_service}/core/include",
35    "//third_party/json/include",
36  ]
37}
38
39ohos_shared_library("distributed_device_profile") {
40  install_enable = true
41  sources = [
42    "src/authority/authority_manager.cpp",
43    "src/authority/trust_group_manager.cpp",
44    "src/contentsensor/app_info_collector.cpp",
45    "src/contentsensor/content_collector.cpp",
46    "src/contentsensor/content_sensor_manager.cpp",
47    "src/contentsensor/device_info_collector.cpp",
48    "src/contentsensor/storage_info_collector.cpp",
49    "src/contentsensor/syscap_info_collector.cpp",
50    "src/contentsensor/system_info_collector.cpp",
51    "src/dbstorage/device_profile_storage.cpp",
52    "src/dbstorage/device_profile_storage_manager.cpp",
53    "src/dbstorage/kvstore_death_recipient.cpp",
54    "src/dbstorage/online_sync_table.cpp",
55    "src/dbstorage/sync_coordinator.cpp",
56    "src/devicemanager/device_info.cpp",
57    "src/devicemanager/dp_device_manager.cpp",
58    "src/dfx/device_profile_dumper.cpp",
59    "src/distributed_device_profile_service.cpp",
60    "src/distributed_device_profile_stub.cpp",
61    "src/profile_change_notification.cpp",
62    "src/service_characteristic_profile.cpp",
63    "src/subscribemanager/profile_change_handler.cpp",
64    "src/subscribemanager/profile_event_handler.cpp",
65    "src/subscribemanager/profile_event_handler_factory.cpp",
66    "src/subscribemanager/profile_event_notifier_proxy.cpp",
67    "src/subscribemanager/profile_sync_handler.cpp",
68    "src/subscribemanager/subscribe_info.cpp",
69    "src/subscribemanager/subscribe_info_checker.cpp",
70    "src/subscribemanager/subscribe_manager.cpp",
71    "src/subscribemanager/subscriber_death_recipient.cpp",
72    "src/sync_options.cpp",
73  ]
74  sources += device_profile_common_sources
75
76  configs = [
77    ":device_info_manager_config",
78    "${device_profile_test}/resource:coverage_flags",
79  ]
80
81  external_deps = [
82    "access_token:libaccesstoken_sdk",
83    "c_utils:utils",
84    "device_auth:deviceauth_sdk",
85    "device_manager:devicemanagersdk",
86    "dmsfwk:common_sdk",
87    "eventhandler:libeventhandler",
88    "hilog:libhilog",
89    "hisysevent:libhisysevent",
90    "hitrace:hitrace_meter",
91    "init:libbegetutil",
92    "ipc:ipc_core",
93    "kv_store:distributeddata_inner",
94    "safwk:system_ability_fwk",
95    "samgr:samgr_proxy",
96    "syscap_codec:syscap_interface_shared",
97  ]
98
99  part_name = "device_info_manager"
100  subsystem_name = "deviceprofile"
101}
102
103group("unittest") {
104  testonly = true
105  deps = [ "test:unittest" ]
106}
107