• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("../../powermgr.gni")
15
16config("powermgr_public_config") {
17  include_dirs = [
18    "native/include",
19    "${powermgr_service_zidl}/include",
20  ]
21}
22
23config("powermgr_private_config") {
24  include_dirs = [
25    "${powermgr_framework_native}",
26    "${powermgr_service_zidl}/src/shutdown",
27  ]
28}
29
30ohos_shared_library("powermgr_client") {
31  sources = [
32    "${powermgr_framework_native}/client_lifecycle.cpp",
33    "${powermgr_framework_native}/power_mgr_client.cpp",
34    "${powermgr_framework_native}/running_lock.cpp",
35    "${powermgr_framework_native}/running_lock_info.cpp",
36    "${powermgr_framework_native}/running_lock_token_stub.cpp",
37    "${powermgr_framework_native}/shutdown/shutdown_client.cpp",
38    "${powermgr_service_zidl}/src/power_mgr_proxy.cpp",
39    "${powermgr_service_zidl}/src/power_mode_callback_proxy.cpp",
40    "${powermgr_service_zidl}/src/power_mode_callback_stub.cpp",
41    "${powermgr_service_zidl}/src/power_state_callback_proxy.cpp",
42    "${powermgr_service_zidl}/src/power_state_callback_stub.cpp",
43    "${powermgr_service_zidl}/src/shutdown/async_shutdown_callback_proxy.cpp",
44    "${powermgr_service_zidl}/src/shutdown/async_shutdown_callback_stub.cpp",
45    "${powermgr_service_zidl}/src/shutdown/shutdown_proxy_delegator.cpp",
46    "${powermgr_service_zidl}/src/shutdown/sync_shutdown_callback_proxy.cpp",
47    "${powermgr_service_zidl}/src/shutdown/sync_shutdown_callback_stub.cpp",
48    "${powermgr_service_zidl}/src/shutdown/takeover_shutdown_callback_proxy.cpp",
49    "${powermgr_service_zidl}/src/shutdown/takeover_shutdown_callback_stub.cpp",
50  ]
51
52  configs = [
53    "${powermgr_utils_path}:coverage_flags",
54    ":powermgr_private_config",
55  ]
56
57  public_configs = [
58    ":powermgr_public_config",
59    "${powermgr_utils_path}:utils_config",
60  ]
61
62  external_deps = [
63    "c_utils:utils",
64    "hicollie:libhicollie",
65    "hilog:libhilog",
66    "ipc:ipc_core",
67    "samgr:samgr_proxy",
68  ]
69
70  subsystem_name = "powermgr"
71  innerapi_tags = [ "platformsdk" ]
72  part_name = "${powermgr_part_name}"
73}
74