15ccb8f90Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd.
25ccb8f90Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
35ccb8f90Sopenharmony_ci# you may not use this file except in compliance with the License.
45ccb8f90Sopenharmony_ci# You may obtain a copy of the License at
55ccb8f90Sopenharmony_ci#
65ccb8f90Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
75ccb8f90Sopenharmony_ci#
85ccb8f90Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
95ccb8f90Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
105ccb8f90Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
115ccb8f90Sopenharmony_ci# See the License for the specific language governing permissions and
125ccb8f90Sopenharmony_ci# limitations under the License.
135ccb8f90Sopenharmony_ci
145ccb8f90Sopenharmony_ciimport("../../powermgr.gni")
155ccb8f90Sopenharmony_ci
165ccb8f90Sopenharmony_ciconfig("private_config") {
175ccb8f90Sopenharmony_ci  include_dirs = [
185ccb8f90Sopenharmony_ci    "include",
195ccb8f90Sopenharmony_ci    "../native/include",
205ccb8f90Sopenharmony_ci  ]
215ccb8f90Sopenharmony_ci}
225ccb8f90Sopenharmony_ci
235ccb8f90Sopenharmony_ciconfig("public_config") {
245ccb8f90Sopenharmony_ci  include_dirs = [ "include" ]
255ccb8f90Sopenharmony_ci}
265ccb8f90Sopenharmony_ci
275ccb8f90Sopenharmony_ciohos_shared_library("power_setting") {
285ccb8f90Sopenharmony_ci  sources = [
295ccb8f90Sopenharmony_ci    "src/setting_observer.cpp",
305ccb8f90Sopenharmony_ci    "src/setting_provider.cpp",
315ccb8f90Sopenharmony_ci  ]
325ccb8f90Sopenharmony_ci
335ccb8f90Sopenharmony_ci  configs = [
345ccb8f90Sopenharmony_ci    ":private_config",
355ccb8f90Sopenharmony_ci    "${powermgr_utils_path}:coverage_flags",
365ccb8f90Sopenharmony_ci  ]
375ccb8f90Sopenharmony_ci
385ccb8f90Sopenharmony_ci  public_configs = [ ":public_config" ]
395ccb8f90Sopenharmony_ci
405ccb8f90Sopenharmony_ci  external_deps = [
415ccb8f90Sopenharmony_ci    "ability_base:zuri",
425ccb8f90Sopenharmony_ci    "ability_runtime:ability_manager",
435ccb8f90Sopenharmony_ci    "ability_runtime:dataobs_manager",
445ccb8f90Sopenharmony_ci    "c_utils:utils",
455ccb8f90Sopenharmony_ci    "data_share:datashare_common",
465ccb8f90Sopenharmony_ci    "data_share:datashare_consumer",
475ccb8f90Sopenharmony_ci    "hilog:libhilog",
485ccb8f90Sopenharmony_ci    "ipc:ipc_core",
495ccb8f90Sopenharmony_ci    "os_account:os_account_innerkits",
505ccb8f90Sopenharmony_ci    "samgr:samgr_proxy",
515ccb8f90Sopenharmony_ci  ]
525ccb8f90Sopenharmony_ci
535ccb8f90Sopenharmony_ci  if (power_manager_feature_charging_type_setting) {
545ccb8f90Sopenharmony_ci    defines += [ "POWER_MANAGER_ENABLE_CHARGING_TYPE_SETTING" ]
555ccb8f90Sopenharmony_ci  }
565ccb8f90Sopenharmony_ci
575ccb8f90Sopenharmony_ci  subsystem_name = "powermgr"
585ccb8f90Sopenharmony_ci  part_name = "${powermgr_part_name}"
595ccb8f90Sopenharmony_ci}
60