• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 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")
16
17device_profile_path = "//foundation/deviceprofile/device_profile_core"
18device_profile_innerkits = "${device_profile_path}/interfaces/innerkits"
19device_profile_common_sources =
20    [ "${device_profile_path}/common/src/device_profile_utils.cpp" ]
21
22config("device_profile_core_config") {
23  visibility = [ ":*" ]
24  include_dirs = [
25    "include",
26    "include/authority",
27    "include/devicemanager",
28    "include/contentsensor",
29    "include/dbstorage",
30    "include/subscribemanager",
31    "${device_profile_path}/common/include",
32    "${device_profile_innerkits}/core/include",
33    "//third_party/json/include",
34  ]
35}
36
37ohos_shared_library("distributed_device_profile") {
38  install_enable = true
39  sources = [
40    "src/authority/authority_manager.cpp",
41    "src/authority/trust_group_manager.cpp",
42    "src/contentsensor/content_collector.cpp",
43    "src/contentsensor/content_sensor_manager.cpp",
44    "src/contentsensor/device_info_collector.cpp",
45    "src/contentsensor/system_info_collector.cpp",
46    "src/dbstorage/device_profile_storage.cpp",
47    "src/dbstorage/device_profile_storage_manager.cpp",
48    "src/dbstorage/kvstore_death_recipient.cpp",
49    "src/dbstorage/online_sync_table.cpp",
50    "src/dbstorage/sync_coordinator.cpp",
51    "src/devicemanager/device_info.cpp",
52    "src/devicemanager/device_manager.cpp",
53    "src/distributed_device_profile_service.cpp",
54    "src/distributed_device_profile_stub.cpp",
55    "src/profile_change_notification.cpp",
56    "src/service_characteristic_profile.cpp",
57    "src/subscribemanager/profile_change_handler.cpp",
58    "src/subscribemanager/profile_event_handler.cpp",
59    "src/subscribemanager/profile_event_handler_factory.cpp",
60    "src/subscribemanager/profile_event_notifier_proxy.cpp",
61    "src/subscribemanager/profile_sync_handler.cpp",
62    "src/subscribemanager/subscribe_info.cpp",
63    "src/subscribemanager/subscribe_info_checker.cpp",
64    "src/subscribemanager/subscribe_manager.cpp",
65    "src/subscribemanager/subscriber_death_recipient.cpp",
66    "src/sync_options.cpp",
67  ]
68  sources += device_profile_common_sources
69
70  configs = [ ":device_profile_core_config" ]
71
72  external_deps = [
73    "access_token:libaccesstoken_sdk",
74    "deviceauth_standard:deviceauth_sdk",
75    "distributeddatamgr:distributeddata_inner",
76    "dsoftbus_standard:softbus_client",
77    "eventhandler:libeventhandler",
78    "hiviewdfx_hilog_native:libhilog",
79    "ipc:ipc_core",
80    "safwk:system_ability_fwk",
81    "samgr_standard:samgr_proxy",
82    "startup_l2:syspara",
83    "utils_base:utils",
84  ]
85
86  part_name = "device_profile_core"
87  subsystem_name = "deviceprofile"
88}
89
90group("unittest") {
91  testonly = true
92  deps = [ "test:unittest" ]
93}
94