# Copyright (c) 2021-2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//build/ohos_var.gni") import("//foundation/deviceprofile/device_info_manager/deviceprofile.gni") device_profile_common_sources = [ "${old_device_profile_path}/common/src/device_profile_utils.cpp" ] config("device_info_manager_config") { visibility = [ ":*" ] visibility += [ "./test/*" ] include_dirs = [ "include", "include/authority", "include/devicemanager", "include/contentsensor", "include/dbstorage", "include/dfx", "include/subscribemanager", "${old_device_profile_path}/common/include", "${old_device_profile_innerkits}/core/include", "${old_device_profile_service}/core/include", "${old_device_profile_path}/radar/include", "${device_profile_service}/include/", "${device_profile_service}/include/contentsensormanager", "${device_profile_service}/include/deviceprofilemanager", "${device_profile_service}/include/deviceprofilemanager/listener", "${device_profile_service}/include/permissionmanager", "${device_profile_service}/include/persistenceadapter/kvadapter", "${device_profile_service}/include/persistenceadapter/rdbadapter", "${device_profile_service}/include/subscribeprofilemanager", "${device_profile_service}/include/trustprofilemanager", "${device_profile_service}/include/utils", "${device_profile_common}/include/constants", "${device_profile_common}/include/interfaces", "${device_profile_common}/include/utils", "${third_party_json}/include", ] } ohos_shared_library("distributed_device_profile") { branch_protector_ret = "pac_ret" cflags = [ "-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-O2", ] cflags_cc = cflags sanitize = { boundary_sanitize = true integer_overflow = true ubsan = true cfi = true cfi_cross_dso = true debug = false } install_enable = true sources = [ "src/authority/authority_manager.cpp", "src/authority/trust_group_manager.cpp", "src/contentsensor/app_info_collector.cpp", "src/contentsensor/content_collector.cpp", "src/contentsensor/content_sensor_manager.cpp", "src/contentsensor/device_info_collector.cpp", "src/contentsensor/pasteboard_info_collector.cpp", "src/contentsensor/storage_info_collector.cpp", "src/contentsensor/syscap_info_collector.cpp", "src/contentsensor/system_info_collector.cpp", "src/dbstorage/device_profile_storage.cpp", "src/dbstorage/device_profile_storage_manager.cpp", "src/dbstorage/kvstore_death_recipient_dp.cpp", "src/dbstorage/online_sync_table.cpp", "src/dbstorage/sync_coordinator.cpp", "src/devicemanager/device_info.cpp", "src/devicemanager/dp_device_manager.cpp", "src/dfx/device_profile_dumper.cpp", "src/distributed_device_profile_service.cpp", "src/distributed_device_profile_stub.cpp", "src/profile_change_notification.cpp", "src/service_characteristic_profile.cpp", "src/subscribemanager/profile_change_handler.cpp", "src/subscribemanager/profile_event_handler.cpp", "src/subscribemanager/profile_event_handler_factory.cpp", "src/subscribemanager/profile_event_notifier_proxy.cpp", "src/subscribemanager/profile_sync_handler.cpp", "src/subscribemanager/subscribe_info.cpp", "src/subscribemanager/subscribe_info_checker.cpp", "src/subscribemanager/subscribe_manager.cpp", "src/subscribemanager/subscriber_death_recipient.cpp", "src/sync_options.cpp", ] sources += device_profile_common_sources configs = [ ":device_info_manager_config", "${old_device_profile_test}/resource:coverage_flags", ] deps = [ "${device_profile_common}:distributed_device_profile_common", "${device_profile_service}:distributed_device_profile_svr", "${old_device_profile_path}/radar:deviceprofileradar", ] external_deps = [ "access_token:libaccesstoken_sdk", "c_utils:utils", "device_auth:deviceauth_sdk", "device_manager:devicemanagersdk", "dmsfwk:common_sdk", "eventhandler:libeventhandler", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_core", "kv_store:distributeddata_inner", "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", "syscap_codec:syscap_interface_shared", ] part_name = "device_info_manager" subsystem_name = "deviceprofile" } group("unittest") { testonly = true deps = [ "test:unittest" ] }