# Copyright (c) 2021 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("../../powermgr.gni") config("powermgr_public_config") { include_dirs = [ "native/include", "${powermgr_service_zidl}/include", ] } config("powermgr_private_config") { include_dirs = [ "${powermgr_framework_native}", "${powermgr_service_zidl}/src/shutdown", ] } ohos_shared_library("powermgr_client") { sources = [ "${powermgr_framework_native}/client_lifecycle.cpp", "${powermgr_framework_native}/power_mgr_client.cpp", "${powermgr_framework_native}/running_lock.cpp", "${powermgr_framework_native}/running_lock_info.cpp", "${powermgr_framework_native}/running_lock_token_stub.cpp", "${powermgr_framework_native}/shutdown/shutdown_client.cpp", "${powermgr_service_zidl}/src/power_mgr_proxy.cpp", "${powermgr_service_zidl}/src/power_mode_callback_proxy.cpp", "${powermgr_service_zidl}/src/power_mode_callback_stub.cpp", "${powermgr_service_zidl}/src/power_state_callback_proxy.cpp", "${powermgr_service_zidl}/src/power_state_callback_stub.cpp", "${powermgr_service_zidl}/src/shutdown/async_shutdown_callback_proxy.cpp", "${powermgr_service_zidl}/src/shutdown/async_shutdown_callback_stub.cpp", "${powermgr_service_zidl}/src/shutdown/shutdown_proxy_delegator.cpp", "${powermgr_service_zidl}/src/shutdown/sync_shutdown_callback_proxy.cpp", "${powermgr_service_zidl}/src/shutdown/sync_shutdown_callback_stub.cpp", "${powermgr_service_zidl}/src/shutdown/takeover_shutdown_callback_proxy.cpp", "${powermgr_service_zidl}/src/shutdown/takeover_shutdown_callback_stub.cpp", ] configs = [ "${powermgr_utils_path}:coverage_flags", ":powermgr_private_config", ] public_configs = [ ":powermgr_public_config", "${powermgr_utils_path}:utils_config", ] external_deps = [ "c_utils:utils", "hicollie:libhicollie", "hilog:libhilog", "ipc:ipc_core", "samgr:samgr_proxy", ] subsystem_name = "powermgr" innerapi_tags = [ "platformsdk" ] part_name = "${powermgr_part_name}" }