• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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("//base/powermgr/battery_manager/batterymgr.gni")
15
16config("batterysrv_private_config") {
17  include_dirs = [
18    "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include/xcollie",
19    "//base/sensors/miscdevice/interfaces/native/light/include",
20  ]
21}
22
23config("batterysrv_public_config") {
24  include_dirs = [
25    "native/include",
26    "${battery_service_zidl}/include",
27    "${battery_innerkits}/native/include",
28    "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include/xcollie",
29    "//base/powermgr/power_manager/utils/permission/include",
30  ]
31}
32
33ohos_shared_library("batteryservice") {
34  sources = [
35    "native/src/battery_callback.cpp",
36    "native/src/battery_config.cpp",
37    "native/src/battery_dump.cpp",
38    "native/src/battery_light.cpp",
39    "native/src/battery_notify.cpp",
40    "native/src/battery_service.cpp",
41    "native/src/battery_service_event_handler.cpp",
42  ]
43
44  configs = [
45    "${battery_utils}:utils_config",
46    ":batterysrv_private_config",
47  ]
48
49  public_configs = [ ":batterysrv_public_config" ]
50
51  deps = [
52    "${battery_service_zidl}:batterysrv_stub",
53    "//base/powermgr/power_manager/utils/permission:power_permission",
54    "//base/sensors/miscdevice/interfaces/native/light:light_target",
55    "//third_party/jsoncpp:jsoncpp",
56  ]
57
58  external_deps = [
59    "ability_base:want",
60    "ability_runtime:ability_manager",
61    "bundle_framework:appexecfwk_base",
62    "c_utils:utils",
63    "common_event_service:cesfwk_core",
64    "common_event_service:cesfwk_innerkits",
65    "drivers_interface_battery:libbattery_proxy_1.1",
66    "eventhandler:libeventhandler",
67    "hdf_core:libhdi",
68    "hicollie_native:libhicollie",
69    "hisysevent_native:libhisysevent",
70    "hiviewdfx_hilog_native:libhilog",
71    "ipc:ipc_core",
72    "power_manager:powermgr_client",
73    "safwk:system_ability_fwk",
74    "samgr:samgr_proxy",
75  ]
76
77  part_name = "battery_manager"
78}
79
80group("service") {
81  deps = [
82    ":batteryservice",
83    "native/profile:battery_config",
84  ]
85}
86