• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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("../../thermalmgr.gni")
16
17config("thermalmgr_ipc_private_config") {
18  include_dirs = [ "${thermal_inner_api}/native/include" ]
19}
20
21config("thermalmgr_ipc_public_config") {
22  include_dirs = [
23    "include",
24    "${target_gen_dir}",
25  ]
26}
27
28idl_gen_interface("thermalmgr_interface") {
29  sources = [ "IThermalSrv.idl" ]
30
31  log_domainid = "0xD002942"
32  log_tag = "ThermalSvc"
33  subsystem_name = "powermgr"
34  part_name = "thermal_manager"
35}
36
37deps_ex = [
38  "bundle_framework:appexecfwk_base",
39  "hilog:libhilog",
40  "hicollie:libhicollie",
41  "ipc:ipc_core",
42  "c_utils:utils",
43  "ipc:ipc_single",
44  "samgr:samgr_proxy",
45]
46
47ohos_source_set("thermalmgr_proxy") {
48  sanitize = {
49    cfi = true
50    cfi_cross_dso = true
51    debug = false
52  }
53  output_values = get_target_outputs(":thermalmgr_interface")
54  sources = filter_include(output_values, [ "*_proxy.cpp" ])
55
56  configs = [
57    "${utils_path}:utils_config",
58    ":thermalmgr_ipc_private_config",
59    "${utils_path}:coverage_flags",
60  ]
61
62  public_configs = [ ":thermalmgr_ipc_public_config" ]
63
64  deps = [ ":thermalmgr_interface" ]
65
66  external_deps = deps_ex
67
68  subsystem_name = "powermgr"
69  part_name = "thermal_manager"
70}
71
72ohos_source_set("thermalmgr_stub") {
73  sanitize = {
74    cfi = true
75    cfi_cross_dso = true
76    debug = false
77  }
78  output_values = get_target_outputs(":thermalmgr_interface")
79  sources = filter_include(output_values, [ "*_stub.cpp" ])
80
81  sources += [
82    "${thermal_frameworks}/native/thermal_srv_sensor_info.cpp",
83    "src/thermal_action_callback_stub.cpp",
84    "src/thermal_temp_callback_stub.cpp",
85  ]
86
87  configs = [
88    "${utils_path}:utils_config",
89    ":thermalmgr_ipc_private_config",
90    "${utils_path}:coverage_flags",
91  ]
92
93  public_configs = [ ":thermalmgr_ipc_public_config" ]
94
95  deps = [ ":thermalmgr_interface" ]
96  external_deps = deps_ex
97
98  subsystem_name = "powermgr"
99  part_name = "thermal_manager"
100}
101