# Copyright (c) 2022 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("//foundation/distributeddatamgr/udmf/udmf.gni") config("udmf_napi_config") { include_dirs = [ "${udmf_interfaces_path}/innerkits/client", "${udmf_interfaces_path}/innerkits/common", "${udmf_interfaces_path}/innerkits/data", "${udmf_interfaces_path}/jskits/common", "${udmf_interfaces_path}/jskits/data", "${udmf_framework_path}/common", "${udmf_framework_path}/innerkits/service", "//third_party/libuv/include", "//third_party/node/src", "${aafwk_inner_api_path}/ability_manager/include", "${aafwk_kits_path}/appkit/native/app/include/", "${aafwk_kits_path}/ability/native/include", "${aafwk_napi_path}/inner/napi_common", "${aafwk_service_path}/abilitymgr/include", "${aafwk_service_path}/common/include", ] } ohos_shared_library("unifieddatachannel_napi") { branch_protector_ret = "pac_ret" sanitize = { ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } sources = [ "${udmf_framework_path}/jskitsimpl/data/application_defined_record_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/audio_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/file_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/folder_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/html_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/image_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/link_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/plain_text_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/summary_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/system_defined_appitem_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/system_defined_form_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/system_defined_pixelmap_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/system_defined_record_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/text_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/unified_data_channel_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/unified_data_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/unified_data_properties_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/unified_record_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/video_napi.cpp", "${udmf_interfaces_path}/jskits/module/unified_data_channel_napi_module.cpp", ] ldflags = [ "-Wl,--exclude-libs=ALL" ] public_configs = [ ":udmf_napi_config" ] deps = [ "${third_party_path}/bounds_checking_function:libsec_shared", "../innerkits:udmf_client", "../jskits:udmf_js_common", ] external_deps = [ "ability_base:want", "ability_runtime:abilitykit_native", "c_utils:utils", "hilog:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", "napi:ace_napi", ] public_external_deps = [ "image_framework:image" ] cflags = [ "-fvisibility=hidden" ] relative_install_dir = "module/data" subsystem_name = "distributeddatamgr" part_name = "udmf" } ohos_shared_library("uniformtypedescriptor_napi") { branch_protector_ret = "pac_ret" sanitize = { ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } sources = [ "${udmf_framework_path}/jskitsimpl/data/type_descriptor_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/uniform_type_descriptor_napi.cpp", "${udmf_interfaces_path}/jskits/module/uniform_type_descriptor_napi_module.cpp", ] ldflags = [ "-Wl,--exclude-libs=ALL" ] public_configs = [ ":udmf_napi_config" ] deps = [ "${third_party_path}/bounds_checking_function:libsec_shared", "../innerkits:udmf_client", "../innerkits:utd_client", "../jskits:udmf_js_common", ] external_deps = [ "ability_runtime:abilitykit_native", "hilog:libhilog", "ipc:ipc_core", "napi:ace_napi", ] public_external_deps = [ "image_framework:image" ] cflags = [ "-fvisibility=hidden" ] relative_install_dir = "module/data" subsystem_name = "distributeddatamgr" part_name = "udmf" } ohos_shared_library("udmf_data_napi") { branch_protector_ret = "pac_ret" sanitize = { ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } sources = [ "${udmf_framework_path}/jskitsimpl/data/application_defined_record_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/audio_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/file_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/folder_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/html_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/image_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/link_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/plain_text_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/summary_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/system_defined_appitem_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/system_defined_form_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/system_defined_pixelmap_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/system_defined_record_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/text_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/unified_data_channel_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/unified_data_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/unified_data_properties_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/unified_record_napi.cpp", "${udmf_framework_path}/jskitsimpl/data/video_napi.cpp", "${udmf_interfaces_path}/jskits/module/unified_data_channel_napi_module.cpp", ] ldflags = [ "-Wl,--exclude-libs=ALL" ] public_configs = [ ":udmf_napi_config" ] deps = [ "${third_party_path}/bounds_checking_function:libsec_shared", "../innerkits:udmf_client", "../jskits:udmf_js_common", ] external_deps = [ "ability_base:want", "ability_runtime:abilitykit_native", "c_utils:utils", "hilog:libhilog", "ipc:ipc_core", "kv_store:distributeddata_inner", "napi:ace_napi", ] public_external_deps = [ "image_framework:image" ] cflags = [ "-fvisibility=hidden" ] subsystem_name = "distributeddatamgr" part_name = "udmf" } ohos_static_library("udmf_js_common") { branch_protector_ret = "pac_ret" sanitize = { ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } sources = [ "${udmf_framework_path}/jskitsimpl/common/napi_data_utils.cpp", "${udmf_framework_path}/jskitsimpl/common/napi_error_utils.cpp", "${udmf_framework_path}/jskitsimpl/common/napi_queue.cpp", ] ldflags = [ "-Wl,--exclude-libs=ALL" ] cflags = [ "-fvisibility=hidden" ] include_dirs = [ "${udmf_interfaces_path}/jskits/common" ] public_configs = [ ":udmf_napi_config" ] external_deps = [ "ability_runtime:abilitykit_native", "hilog:libhilog", "napi:ace_napi", ] public_external_deps = [ "image_framework:image" ] subsystem_name = "distributeddatamgr" part_name = "udmf" }