142103316Sopenharmony_ci# Copyright (c) 2021-2023 Huawei Device Co., Ltd. 242103316Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 342103316Sopenharmony_ci# you may not use this file except in compliance with the License. 442103316Sopenharmony_ci# You may obtain a copy of the License at 542103316Sopenharmony_ci# 642103316Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 742103316Sopenharmony_ci# 842103316Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 942103316Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1042103316Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1142103316Sopenharmony_ci# See the License for the specific language governing permissions and 1242103316Sopenharmony_ci# limitations under the License. 1342103316Sopenharmony_ci 1442103316Sopenharmony_ciimport("./../../../../usbmgr.gni") 1542103316Sopenharmony_ci 1642103316Sopenharmony_ciconfig("usbnapi_private_config") { 1742103316Sopenharmony_ci include_dirs = [ 1842103316Sopenharmony_ci "${usb_manager_path}/interfaces/kits/js/napi/include", 1942103316Sopenharmony_ci "${usb_manager_path}/interfaces/innerkits/native/include", 2042103316Sopenharmony_ci ] 2142103316Sopenharmony_ci} 2242103316Sopenharmony_ci 2342103316Sopenharmony_ciohos_shared_library("usb") { 2442103316Sopenharmony_ci sanitize = { 2542103316Sopenharmony_ci integer_overflow = true 2642103316Sopenharmony_ci ubsan = true 2742103316Sopenharmony_ci boundary_sanitize = true 2842103316Sopenharmony_ci } 2942103316Sopenharmony_ci 3042103316Sopenharmony_ci sources = [ "src/usb_middle.cpp" ] 3142103316Sopenharmony_ci external_deps = [ 3242103316Sopenharmony_ci "hilog:libhilog", 3342103316Sopenharmony_ci "napi:ace_napi", 3442103316Sopenharmony_ci ] 3542103316Sopenharmony_ci 3642103316Sopenharmony_ci configs = [ "${utils_path}:utils_config" ] 3742103316Sopenharmony_ci 3842103316Sopenharmony_ci relative_install_dir = "module" 3942103316Sopenharmony_ci 4042103316Sopenharmony_ci subsystem_name = "usb" 4142103316Sopenharmony_ci part_name = "usb_manager" 4242103316Sopenharmony_ci} 4342103316Sopenharmony_ci 4442103316Sopenharmony_ciohos_shared_library("usbmanager") { 4542103316Sopenharmony_ci sanitize = { 4642103316Sopenharmony_ci integer_overflow = true 4742103316Sopenharmony_ci ubsan = true 4842103316Sopenharmony_ci boundary_sanitize = true 4942103316Sopenharmony_ci } 5042103316Sopenharmony_ci 5142103316Sopenharmony_ci sources = [ 5242103316Sopenharmony_ci "${utils_path}/native/src/usb_napi_errors.cpp", 5342103316Sopenharmony_ci "src/napi_util.cpp", 5442103316Sopenharmony_ci "src/usb_info.cpp", 5542103316Sopenharmony_ci "src/usbmanager_middle.cpp", 5642103316Sopenharmony_ci ] 5742103316Sopenharmony_ci configs = [ 5842103316Sopenharmony_ci "${utils_path}:utils_config", 5942103316Sopenharmony_ci ":usbnapi_private_config", 6042103316Sopenharmony_ci ] 6142103316Sopenharmony_ci deps = [ "${usb_manager_path}/interfaces/innerkits:usbsrv_client" ] 6242103316Sopenharmony_ci public_external_deps = [ "cJSON:cjson" ] 6342103316Sopenharmony_ci external_deps = [ 6442103316Sopenharmony_ci "bounds_checking_function:libsec_shared", 6542103316Sopenharmony_ci "drivers_interface_usb:usb_idl_headers_1.1", 6642103316Sopenharmony_ci "hilog:libhilog", 6742103316Sopenharmony_ci "napi:ace_napi", 6842103316Sopenharmony_ci ] 6942103316Sopenharmony_ci 7042103316Sopenharmony_ci relative_install_dir = "module" 7142103316Sopenharmony_ci 7242103316Sopenharmony_ci subsystem_name = "usb" 7342103316Sopenharmony_ci part_name = "usb_manager" 7442103316Sopenharmony_ci} 75