• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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.
13
14import("//build/config/components/idl_tool/idl.gni")
15import("//foundation/ability/ability_runtime/service_router_framework/srms.gni")
16
17idl_gen_interface("service_router_mgr_interface") {
18  sources = [ "IServiceRouterMgr.idl" ]
19  log_domainid = "0xD001353"
20  log_tag = "ServiceRouter"
21  subsystem_name = "ability"
22  part_name = "ability_runtime"
23}
24
25config("srms_fwk_config") {
26  include_dirs = [
27    "include",
28    "${target_gen_dir}",
29    "${ability_runtime_services_path}/common/include",
30    "${ability_runtime_path}/interfaces/inner_api/ability_manager/include",
31  ]
32}
33
34ohos_source_set("service_router_mgr_proxy") {
35  sanitize = {
36    cfi = true
37    cfi_cross_dso = true
38    debug = false
39  }
40  public_configs = [ ":srms_fwk_config" ]
41  output_values = get_target_outputs(":service_router_mgr_interface")
42  sources = filter_include(output_values, [ "*_proxy.cpp" ])
43  deps = [ ":service_router_mgr_interface" ]
44  external_deps = [
45    "ability_base:session_info",
46    "ability_base:want",
47    "bundle_framework:appexecfwk_base",
48    "bundle_framework:libappexecfwk_common",
49    "c_utils:utils",
50    "hilog:libhilog",
51    "ipc:ipc_core",
52    "samgr:samgr_proxy",
53  ]
54  subsystem_name = "ability"
55  part_name = "ability_runtime"
56}
57
58ohos_source_set("service_router_mgr_stub") {
59  sanitize = {
60    cfi = true
61    cfi_cross_dso = true
62    debug = false
63  }
64  configs = [ ":srms_fwk_config" ]
65  output_values = get_target_outputs(":service_router_mgr_interface")
66  sources = filter_include(output_values, [ "*_stub.cpp" ])
67  deps = [ ":service_router_mgr_interface" ]
68  external_deps = [
69    "ability_base:session_info",
70    "ability_base:want",
71    "ability_base:zuri",
72    "bundle_framework:appexecfwk_base",
73    "bundle_framework:appexecfwk_core",
74    "bundle_framework:libappexecfwk_common",
75    "c_utils:utils",
76    "hilog:libhilog",
77    "ipc:ipc_single",
78    "safwk:system_ability_fwk",
79    "samgr:samgr_proxy",
80  ]
81  subsystem_name = "ability"
82  part_name = "ability_runtime"
83}
84
85ohos_shared_library("srms_fwk") {
86  sanitize = {
87    cfi = true
88    cfi_cross_dso = true
89    debug = false
90  }
91  sources = [
92    "src/service_info.cpp",
93    "src/service_router_death_recipient.cpp",
94    "src/service_router_load_callback.cpp",
95    "src/service_router_mgr_helper.cpp",
96  ]
97  output_values = get_target_outputs(":service_router_mgr_interface")
98  sources += filter_include(output_values, [ "*_proxy.cpp" ])
99
100  public_configs = [ ":srms_fwk_config" ]
101
102  deps = [ "${ability_runtime_innerkits_path}/ability_manager:ability_manager" ]
103  deps += [ ":service_router_mgr_interface" ]
104
105  external_deps = [
106    "ability_base:session_info",
107    "ability_base:want",
108    "bundle_framework:appexecfwk_base",
109    "bundle_framework:libappexecfwk_common",
110    "c_utils:utils",
111    "hilog:libhilog",
112    "ipc:ipc_core",
113    "samgr:samgr_proxy",
114  ]
115
116  innerapi_tags = [ "platformsdk" ]
117  subsystem_name = "ability"
118  part_name = "ability_runtime"
119}
120