1d590543dSopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd.
2d590543dSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3d590543dSopenharmony_ci# you may not use this file except in compliance with the License.
4d590543dSopenharmony_ci# You may obtain a copy of the License at
5d590543dSopenharmony_ci#
6d590543dSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7d590543dSopenharmony_ci#
8d590543dSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9d590543dSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10d590543dSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11d590543dSopenharmony_ci# See the License for the specific language governing permissions and
12d590543dSopenharmony_ci# limitations under the License.
13d590543dSopenharmony_ci
14d590543dSopenharmony_ciimport("//build/ohos.gni")
15d590543dSopenharmony_cidefines = []
16d590543dSopenharmony_ciif (!defined(global_parts_info) ||
17d590543dSopenharmony_ci    defined(global_parts_info.communication_bluetooth)) {
18d590543dSopenharmony_ci  has_batterystats_bluetooth_part = true
19d590543dSopenharmony_ci  defines += [ "HAS_BATTERYSTATS_BLUETOOTH_PART" ]
20d590543dSopenharmony_ci} else {
21d590543dSopenharmony_ci  has_batterystats_bluetooth_part = false
22d590543dSopenharmony_ci}
23d590543dSopenharmony_ci
24d590543dSopenharmony_ciif (!defined(global_parts_info) ||
25d590543dSopenharmony_ci    defined(global_parts_info.communication_wifi)) {
26d590543dSopenharmony_ci  has_batterystats_wifi_part = true
27d590543dSopenharmony_ci  defines += [ "HAS_BATTERYSTATS_WIFI_PART" ]
28d590543dSopenharmony_ci} else {
29d590543dSopenharmony_ci  has_batterystats_wifi_part = false
30d590543dSopenharmony_ci}
31d590543dSopenharmony_ci
32d590543dSopenharmony_ciif (!defined(global_parts_info) ||
33d590543dSopenharmony_ci    defined(global_parts_info.powermgr_display_manager)) {
34d590543dSopenharmony_ci  has_batterystats_display_manager_part = true
35d590543dSopenharmony_ci  defines += [ "HAS_BATTERYSTATS_DISPLAY_MANAGER_PART" ]
36d590543dSopenharmony_ci} else {
37d590543dSopenharmony_ci  has_batterystats_display_manager_part = false
38d590543dSopenharmony_ci}
39d590543dSopenharmony_ci
40d590543dSopenharmony_ciif (!defined(global_parts_info) ||
41d590543dSopenharmony_ci    defined(global_parts_info.telephony_call_manager)) {
42d590543dSopenharmony_ci  has_batterystats_call_manager_part = true
43d590543dSopenharmony_ci  defines += [ "HAS_BATTERYSTATS_CALL_MANAGER_PART" ]
44d590543dSopenharmony_ci} else {
45d590543dSopenharmony_ci  has_batterystats_call_manager_part = false
46d590543dSopenharmony_ci}
47d590543dSopenharmony_ci
48d590543dSopenharmony_ciif (!defined(global_parts_info) ||
49d590543dSopenharmony_ci    defined(global_parts_info.customization_config_policy)) {
50d590543dSopenharmony_ci  has_batterystats_config_policy_part = true
51d590543dSopenharmony_ci} else {
52d590543dSopenharmony_ci  has_batterystats_config_policy_part = false
53d590543dSopenharmony_ci}
54d590543dSopenharmony_ci
55d590543dSopenharmony_ciability_runtime_path = "//foundation/ability/ability_runtime"
56d590543dSopenharmony_ciability_runtime_services_path = "${ability_runtime_path}/services"
57d590543dSopenharmony_ciability_runtime_kits_path = "${ability_runtime_path}/frameworks/kits"
58d590543dSopenharmony_cibatterystats_part_name = "battery_statistics"
59d590543dSopenharmony_cibatterystats_root_path = "//base/powermgr/battery_statistics"
60d590543dSopenharmony_cibatterystats_inner_api = "${batterystats_root_path}/interfaces/inner_api"
61d590543dSopenharmony_cibatterystats_frameworks_path = "${batterystats_root_path}/frameworks"
62d590543dSopenharmony_cibatterystats_service_path = "${batterystats_root_path}/services"
63d590543dSopenharmony_cibatterystats_service_zidl = "${batterystats_service_path}/zidl"
64d590543dSopenharmony_cibatterystats_service_native = "${batterystats_service_path}/native"
65d590543dSopenharmony_cibatterystats_utils_path = "${batterystats_root_path}/utils"
66