# Copyright (c) 2021 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 = [] } config("usbsrv_public_config") { include_dirs = [ "native/include", "${usb_manager_path}/services/zidl/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_function_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", ] configs = [ "${utils_path}:utils_config", ":usbsrv_private_config", ] public_configs = [ ":usbsrv_public_config" ] deps = [ "${usb_manager_path}/interfaces/innerkits:usbsrv_client" ] external_deps = [ "ability_base:want", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "ces_standard:cesfwk_innerkits", "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", "usb_device_driver:usbd_client", "utils_base:utils", ] part_name = "usb_manager" } ohos_prebuilt_etc("usb_service.init") { source = "usb_service.cfg" relative_install_dir = "init" part_name = "usb_manager" }