# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//base/powermgr/battery_manager/batterymgr.gni") config("batterysrv_private_config") { include_dirs = [ "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include/xcollie", "//base/sensors/miscdevice/interfaces/native/light/include", ] } config("batterysrv_public_config") { include_dirs = [ "native/include", "${battery_service_zidl}/include", "${battery_innerkits}/native/include", "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include/xcollie", "//base/powermgr/power_manager/utils/permission/include", ] } ohos_shared_library("batteryservice") { sources = [ "native/src/battery_callback.cpp", "native/src/battery_config.cpp", "native/src/battery_dump.cpp", "native/src/battery_light.cpp", "native/src/battery_notify.cpp", "native/src/battery_service.cpp", "native/src/battery_service_event_handler.cpp", ] configs = [ "${battery_utils}:utils_config", ":batterysrv_private_config", ] public_configs = [ ":batterysrv_public_config" ] deps = [ "${battery_service_zidl}:batterysrv_stub", "//base/powermgr/power_manager/utils/permission:power_permission", "//base/sensors/miscdevice/interfaces/native/light:light_target", "//third_party/jsoncpp:jsoncpp", ] external_deps = [ "ability_base:want", "ability_runtime:ability_manager", "bundle_framework:appexecfwk_base", "c_utils:utils", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "drivers_interface_battery:libbattery_proxy_1.1", "eventhandler:libeventhandler", "hdf_core:libhdi", "hicollie_native:libhicollie", "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "power_manager:powermgr_client", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] part_name = "battery_manager" } group("service") { deps = [ ":batteryservice", "native/profile:battery_config", ] }