• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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("//base/usb/usb_manager/usbmgr.gni")
15
16config("usbsrv_private_config") {
17  include_dirs = []
18}
19
20config("usbsrv_public_config") {
21  include_dirs = [
22    "native/include",
23    "${usb_manager_path}/services/zidl/include",
24  ]
25}
26
27ohos_shared_library("usbservice") {
28  install_enable = true
29  sources = [
30    "${usb_manager_path}/services/zidl/src/usb_srv_stub.cpp",
31    "native/src/usb_descriptor_parser.cpp",
32    "native/src/usb_function_manager.cpp",
33    "native/src/usb_host_manager.cpp",
34    "native/src/usb_port_manager.cpp",
35    "native/src/usb_right_manager.cpp",
36    "native/src/usb_serial_reader.cpp",
37    "native/src/usb_server_event_handler.cpp",
38    "native/src/usb_service.cpp",
39    "native/src/usb_service_subscriber.cpp",
40  ]
41
42  configs = [
43    "${utils_path}:utils_config",
44    ":usbsrv_private_config",
45  ]
46
47  public_configs = [ ":usbsrv_public_config" ]
48
49  deps = [ "${usb_manager_path}/interfaces/innerkits:usbsrv_client" ]
50
51  external_deps = [
52    "ability_base:want",
53    "bundle_framework:appexecfwk_base",
54    "bundle_framework:appexecfwk_core",
55    "ces_standard:cesfwk_innerkits",
56    "eventhandler:libeventhandler",
57    "hiviewdfx_hilog_native:libhilog",
58    "ipc:ipc_core",
59    "safwk:system_ability_fwk",
60    "samgr_standard:samgr_proxy",
61    "usb_device_driver:usbd_client",
62    "utils_base:utils",
63  ]
64
65  part_name = "usb_manager"
66}
67
68ohos_prebuilt_etc("usb_service.init") {
69  source = "usb_service.cfg"
70  relative_install_dir = "init"
71  part_name = "usb_manager"
72}
73