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