• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021-2023 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.
13import("//build/ohos.gni")
14import("//foundation/filemanagement/dfs_service/distributedfile.gni")
15
16ohos_shared_library("libdistributedfiledaemon") {
17  branch_protector_ret = "pac_ret"
18  sanitize = {
19    ubsan = true
20    boundary_sanitize = true
21    cfi = true
22    cfi_cross_dso = true
23    debug = false
24  }
25  include_dirs = [
26    "include",
27    "include/network/softbus",
28    "//third_party/json/include",
29    "${distributedfile_path}/frameworks/native/distributed_file_inner/include",
30    "${distributedfile_path}/services/distributedfiledaemon/include/ipc",
31  ]
32
33  sources = [
34    "src/device/device_info.cpp",
35    "src/device/device_manager_agent.cpp",
36    "src/ipc/connection_detector.cpp",
37    "src/ipc/daemon.cpp",
38    "src/ipc/daemon_stub.cpp",
39    "src/ipc/file_trans_listener_proxy.cpp",
40    "src/ipc/trans_mananger.cpp",
41    "src/mountpoint/mount_manager.cpp",
42    "src/mountpoint/mount_point.cpp",
43    "src/multiuser/os_account_observer.cpp",
44    "src/network/devsl_dispatcher.cpp",
45    "src/network/kernel_talker.cpp",
46    "src/network/network_agent_template.cpp",
47    "src/network/session_pool.cpp",
48    "src/network/softbus/softbus_agent.cpp",
49    "src/network/softbus/softbus_file_receive_listener.cpp",
50    "src/network/softbus/softbus_file_send_listener.cpp",
51    "src/network/softbus/softbus_handler.cpp",
52    "src/network/softbus/softbus_session.cpp",
53    "src/network/softbus/softbus_session_dispatcher.cpp",
54    "src/network/softbus/softbus_session_listener.cpp",
55    "src/network/softbus/softbus_session_pool.cpp",
56  ]
57
58  deps = [
59    "${services_path}/distributedfiledaemon:distributed_file_daemon_kit_inner",
60    "${utils_path}:libdistributedfileutils",
61  ]
62
63  external_deps = [
64    "ability_base:want",
65    "ability_base:zuri",
66    "ability_runtime:uri_permission_mgr",
67    "access_token:libaccesstoken_sdk",
68    "access_token:libtokenid_sdk",
69    "app_file_service:sandbox_helper_native",
70    "common_event_service:cesfwk_innerkits",
71    "dataclassification:data_transit_mgr",
72    "device_auth:deviceauth_sdk",
73    "device_manager:devicemanagersdk",
74    "dsoftbus:softbus_client",
75    "hilog:libhilog",
76    "init:libbegetutil",
77    "ipc:ipc_core",
78    "os_account:os_account_innerkits",
79    "safwk:system_ability_fwk",
80    "samgr:samgr_proxy",
81  ]
82  configs = [ "${utils_path}:compiler_configs" ]
83
84  defines = [ "LOG_TAG=\"distributedfile_daemon\"" ]
85
86  part_name = "dfs_service"
87  subsystem_name = "filemanagement"
88}
89
90config("public_config") {
91  include_dirs = [
92    ".",
93    "${device_manager_path}/interfaces/inner_kits/native_cpp/include",
94    "${distributedfile_path}/frameworks/native/distributed_file_inner/include",
95  ]
96}
97
98config("private_config") {
99  include_dirs = [
100    "${distributedfile_path}/frameworks/native/distributed_file_inner/include",
101    "${distributedfile_path}/utils/log/include",
102    "${media_library_path}/frameworks/utils/include",
103    "${media_library_path}/interfaces/inner_api/media_library_helper/include",
104    "${services_path}/distributedfiledaemon/include",
105  ]
106}
107
108ohos_shared_library("distributed_file_daemon_kit_inner") {
109  branch_protector_ret = "pac_ret"
110  sanitize = {
111    ubsan = true
112    boundary_sanitize = true
113    cfi = true
114    cfi_cross_dso = true
115    debug = false
116  }
117  sources = [
118    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/distributed_file_daemon_manager.cpp",
119    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/distributed_file_daemon_manager_impl.cpp",
120    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/distributed_file_daemon_proxy.cpp",
121    "${distributedfile_path}/frameworks/native/distributed_file_inner/src/file_trans_listener_stub.cpp",
122    "${distributedfile_path}/utils/log/src/utils_log.cpp",
123  ]
124
125  defines = [ "LOG_TAG=\"distributedfile_daemon\"" ]
126
127  configs = [ ":private_config" ]
128
129  public_configs = [ ":public_config" ]
130
131  external_deps = [
132    "c_utils:utils",
133    "device_manager:devicemanagersdk",
134    "hilog:libhilog",
135    "ipc:ipc_core",
136    "safwk:system_ability_fwk",
137    "samgr:samgr_proxy",
138  ]
139
140  use_exceptions = true
141  part_name = "dfs_service"
142  subsystem_name = "filemanagement"
143}
144