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("./../../usbmgr.gni") 15 16config("usbsrv_private_config") { 17 include_dirs = [ "${usb_manager_path}/services/zidl/include" ] 18} 19 20config("usbsrv_public_config") { 21 include_dirs = [ 22 "native/include", 23 "${usb_manager_path}/utils/native/include", 24 ] 25} 26 27ohos_shared_library("usbsrv_client") { 28 sanitize = { 29 integer_overflow = true 30 ubsan = true 31 boundary_sanitize = true 32 } 33 34 sources = [ 35 "${usb_manager_path}/services/zidl/src/usb_srv_proxy.cpp", 36 "native/src/usb_device_pipe.cpp", 37 "native/src/usb_interface_type.cpp", 38 "native/src/usb_request.cpp", 39 "native/src/usb_srv_client.cpp", 40 "native/src/usbd_bulk_callback.cpp", 41 ] 42 43 configs = [ 44 "${utils_path}:utils_config", 45 ":usbsrv_private_config", 46 ":usbsrv_public_config", 47 ] 48 49 public_configs = [ ":usbsrv_public_config" ] 50 public_external_deps = [ 51 "cJSON:cjson", 52 "drivers_interface_usb:usb_idl_headers_1.1", 53 ] 54 external_deps = [ 55 "c_utils:utils", 56 "drivers_interface_usb:usb_idl_headers_1.1", 57 "hilog:libhilog", 58 "ipc:ipc_core", 59 "samgr:samgr_proxy", 60 ] 61 subsystem_name = "usb" 62 innerapi_tags = [ "platformsdk" ] 63 part_name = "usb_manager" 64} 65