1# Copyright (c) 2021 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/ohos.gni") 15 16if (!defined(global_parts_info) || 17 defined(global_parts_info.communication_bluetooth)) { 18 has_batterystats_bluetooth_part = true 19 cflags_cc = [ "-DHAS_BATTERYSTATS_BLUETOOTH_PART" ] 20} else { 21 has_batterystats_bluetooth_part = false 22} 23 24if (!defined(global_parts_info) || 25 defined(global_parts_info.communication_wifi)) { 26 has_batterystats_wifi_part = true 27 cflags_cc += [ "-DHAS_BATTERYSTATS_WIFI_PART" ] 28} else { 29 has_batterystats_wifi_part = false 30} 31 32if (!defined(global_parts_info) || 33 defined(global_parts_info.powermgr_display_manager)) { 34 has_batterystats_display_manager_part = true 35 cflags_cc += [ "-DHAS_BATTERYSTATS_DISPLAY_MANAGER_PART" ] 36} else { 37 has_batterystats_display_manager_part = false 38} 39 40if (!defined(global_parts_info) || 41 defined(global_parts_info.telephony_call_manager)) { 42 has_batterystats_call_manager_part = true 43 cflags_cc += [ "-DHAS_BATTERYSTATS_CALL_MANAGER_PART" ] 44} else { 45 has_batterystats_call_manager_part = false 46} 47 48ability_runtime_path = "//foundation/ability/ability_runtime" 49ability_runtime_services_path = "${ability_runtime_path}/services" 50ability_runtime_kits_path = "${ability_runtime_path}/frameworks/kits" 51batterystats_part_name = "battery_statistics" 52batterystats_root_path = "//base/powermgr/battery_statistics" 53batterystats_inner_api = "${batterystats_root_path}/interfaces/inner_api" 54batterystats_frameworks_path = "${batterystats_root_path}/frameworks" 55batterystats_service_path = "${batterystats_root_path}/services" 56batterystats_service_zidl = "${batterystats_service_path}/zidl" 57batterystats_service_native = "${batterystats_service_path}/native" 58batterystats_utils_path = "${batterystats_root_path}/utils" 59