• 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("//build/ohos.gni")
15import("//foundation/filemanagement/app_file_service/app_file_service.gni")
16import("//foundation/filemanagement/app_file_service/backup.gni")
17
18ohos_shared_library("fileshare") {
19  branch_protector_ret = "pac_ret"
20  sanitize = {
21    integer_overflow = true
22    cfi = true
23    cfi_cross_dso = true
24    debug = false
25  }
26
27  include_dirs = [
28    ".",
29    "../../common/include",
30    "${app_file_service_path}/interfaces/innerkits/native/file_share/include",
31  ]
32
33  sources = [
34    "../../common/src/json_utils.cpp",
35    "../../common/src/sandbox_helper.cpp",
36    "../../innerkits/native/file_share/src/file_permission.cpp",
37    "file_share/fileshare_n_exporter.cpp",
38    "file_share/grant_permissions.cpp",
39    "file_share/grant_uri_permission.cpp",
40  ]
41
42  external_deps = [
43    "ability_base:want",
44    "ability_base:zuri",
45    "ability_runtime:abilitykit_native",
46    "ability_runtime:extensionkit_native",
47    "ability_runtime:uri_permission_mgr",
48    "access_token:libaccesstoken_sdk",
49    "access_token:libtokenid_sdk",
50    "bundle_framework:appexecfwk_base",
51    "c_utils:utils",
52    "common_event_service:cesfwk_innerkits",
53    "data_share:datashare_common",
54    "data_share:datashare_consumer",
55    "file_api:filemgmt_libhilog",
56    "file_api:filemgmt_libn",
57    "file_api:remote_uri_native",
58    "hilog:libhilog",
59    "init:libbegetutil",
60    "ipc:ipc_core",
61    "napi:ace_napi",
62  ]
63  defines = []
64  if (sandbox_manarer) {
65    external_deps += [ "sandbox_manager:libsandbox_manager_sdk" ]
66    defines += [ "SANDBOX_MANAGER" ]
67  }
68  relative_install_dir = "module"
69
70  part_name = "app_file_service"
71  subsystem_name = "filemanagement"
72}
73
74ohos_shared_library("fileuri") {
75  branch_protector_ret = "pac_ret"
76  sanitize = {
77    integer_overflow = true
78    cfi = true
79    cfi_cross_dso = true
80    debug = false
81  }
82
83  include_dirs = [
84    ".",
85    "../../common/include",
86    "${app_file_service_path}/interfaces/innerkits/native/file_uri/include",
87  ]
88
89  sources = [
90    "../../common/src/common_func.cpp",
91    "../../common/src/sandbox_helper.cpp",
92    "file_uri/file_uri_n_exporter.cpp",
93    "file_uri/get_uri_from_path.cpp",
94    "file_uri/module.cpp",
95    "file_uri/prop_n_exporter.cpp",
96  ]
97
98  deps =
99      [ "${app_file_service_path}/interfaces/innerkits/native:fileuri_native" ]
100
101  external_deps = [
102    "ability_base:zuri",
103    "ability_runtime:abilitykit_native",
104    "bundle_framework:appexecfwk_base",
105    "bundle_framework:appexecfwk_core",
106    "c_utils:utils",
107    "file_api:filemgmt_libhilog",
108    "file_api:filemgmt_libn",
109    "hilog:libhilog",
110    "ipc:ipc_core",
111    "napi:ace_napi",
112    "samgr:samgr_proxy",
113  ]
114
115  use_exceptions = true
116
117  relative_install_dir = "module/file"
118
119  part_name = "app_file_service"
120  subsystem_name = "filemanagement"
121}
122
123ohos_shared_library("backup") {
124  branch_protector_ret = "pac_ret"
125  sanitize = {
126    integer_overflow = true
127    cfi = true
128    cfi_cross_dso = true
129    debug = false
130  }
131
132  relative_install_dir = "module/file"
133  subsystem_name = "filemanagement"
134  part_name = "app_file_service"
135
136  include_dirs = [ "${path_napi}/interfaces/kits" ]
137
138  defines = [
139    "LOG_DOMAIN=0xD004306",
140    "LOG_TAG=\"BackupNAPI\"",
141  ]
142
143  sources = [
144    "${path_backup_js}/backup/general_callbacks.cpp",
145    "${path_backup_js}/backup/module.cpp",
146    "${path_backup_js}/backup/prop_n_exporter.cpp",
147    "${path_backup_js}/backup/prop_n_operation.cpp",
148    "${path_backup_js}/backup/session_backup_n_exporter.cpp",
149    "${path_backup_js}/backup/session_incremental_backup_n_exporter.cpp",
150    "${path_backup_js}/backup/session_restore_n_exporter.cpp",
151  ]
152
153  deps = [
154    "${path_backup}/interfaces/inner_api/native/backup_kit_inner:backup_kit_inner",
155    "${path_backup}/utils:backup_utils",
156    "${path_jsoncpp}:jsoncpp",
157  ]
158
159  external_deps = [
160    "access_token:libaccesstoken_sdk",
161    "access_token:libtokenid_sdk",
162    "c_utils:utils",
163    "file_api:filemgmt_libhilog",
164    "file_api:filemgmt_libn",
165    "hilog:libhilog",
166    "ipc:ipc_core",
167    "napi:ace_napi",
168  ]
169}
170