• 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("../../batterymgr.gni")
16
17config("batterysrv_public_config") {
18  include_dirs = [
19    "${battery_inner_api}/native/include",
20    "${target_gen_dir}",
21  ]
22}
23
24idl_gen_interface("batterysrv_interface") {
25  sources = [ "IBatterySrv.idl" ]
26
27  log_domainid = "0xD002922"
28  log_tag = "BatterySvc"
29  subsystem_name = "powermgr"
30  part_name = "battery_manager"
31}
32
33ohos_source_set("batterysrv_proxy") {
34  sanitize = {
35    cfi = true
36    cfi_cross_dso = true
37    debug = false
38  }
39  output_values = get_target_outputs(":batterysrv_interface")
40  sources = filter_include(output_values, [ "*_proxy.cpp" ])
41  configs = [
42    "${battery_utils}:utils_config",
43    ":batterysrv_public_config",
44    "${battery_utils}:coverage_flags",
45  ]
46  deps = [ ":batterysrv_interface" ]
47  external_deps = [
48    "c_utils:utils",
49    "hilog:libhilog",
50    "ipc:ipc_single",
51    "samgr:samgr_proxy",
52  ]
53  subsystem_name = "powermgr"
54  part_name = "battery_manager"
55}
56
57ohos_source_set("batterysrv_stub") {
58  sanitize = {
59    cfi = true
60    cfi_cross_dso = true
61    debug = false
62  }
63  output_values = get_target_outputs(":batterysrv_interface")
64  sources = filter_include(output_values, [ "*_stub.cpp" ])
65
66  configs = [
67    "${battery_utils}:utils_config",
68    ":batterysrv_public_config",
69    "${battery_utils}:coverage_flags",
70  ]
71
72  deps = [ ":batterysrv_interface" ]
73  external_deps = [
74    "c_utils:utils",
75    "hilog:libhilog",
76    "ipc:ipc_core",
77    "ipc:ipc_single",
78  ]
79
80  subsystem_name = "powermgr"
81  part_name = "battery_manager"
82}
83