# Copyright (c) 2021-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("//base/usb/usb_manager/usbmgr.gni") config("usbsrv_private_config") { include_dirs = [ "//third_party/jsoncpp/include/json", "${usb_manager_path}/interfaces/innerkits/native/include", ] } config("usbsrv_public_config") { include_dirs = [ "native/include", "${usb_manager_path}/services/zidl/include", "${usb_manager_path}/utils/native/include", "//drivers/peripheral/usb/hdi_service/include", ] } ohos_shared_library("usbservice") { install_enable = true sources = [ "${usb_manager_path}/services/zidl/src/usb_srv_stub.cpp", "native/src/usb_descriptor_parser.cpp", "native/src/usb_device_manager.cpp", "native/src/usb_host_manager.cpp", "native/src/usb_port_manager.cpp", "native/src/usb_right_manager.cpp", "native/src/usb_serial_reader.cpp", "native/src/usb_server_event_handler.cpp", "native/src/usb_service.cpp", "native/src/usb_service_subscriber.cpp", "native/src/usbd_bulkcallback_impl.cpp", ] configs = [ "${utils_path}:utils_config", ":usbsrv_private_config", ] public_configs = [ ":usbsrv_public_config" ] deps = [ "//third_party/jsoncpp:jsoncpp" ] external_deps = [ "ability_base:want", "ability_runtime:ability_manager", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", "drivers_interface_usb:libusb_proxy_1.0", "eventhandler:libeventhandler", "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] part_name = "usb_manager" } ohos_prebuilt_etc("usb_service.init") { source = "usb_service.cfg" relative_install_dir = "init" part_name = "usb_manager" }