# 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/power_manager/powermgr.gni") import("//base/powermgr/thermal_manager/thermalmgr.gni") config("thermalsrv_private_config") { include_dirs = [ "${ability_runtime_services_path}/appmgr/include", "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include/xcollie", ] } config("thermalsrv_public_config") { include_dirs = [ "native/include/", "native/include/thermal_action", "native/include/thermal_observer", "native/include/thermal_policy", "native/include/thermal_observer/state_machine", "native/include/thermal_action/action", "native/include/thermal_action/action/action_soc", "${thermal_innerkits}/native/include", ] } ohos_shared_library("thermalservice") { sources = [ "native/src/thermal_action/action/action_application_process.cpp", "native/src/thermal_action/action/action_charger.cpp", "native/src/thermal_action/action/action_display.cpp", "native/src/thermal_action/action/action_popup.cpp", "native/src/thermal_action/action/action_shutdown.cpp", "native/src/thermal_action/action/action_soc/action_cpu_big.cpp", "native/src/thermal_action/action/action_soc/action_cpu_lit.cpp", "native/src/thermal_action/action/action_soc/action_cpu_med.cpp", "native/src/thermal_action/action/action_soc/action_gpu.cpp", "native/src/thermal_action/action/action_thermal_level.cpp", "native/src/thermal_action/action/action_voltage.cpp", "native/src/thermal_action/action/action_volume.cpp", "native/src/thermal_action/thermal_action_factory.cpp", "native/src/thermal_action/thermal_action_manager.cpp", "native/src/thermal_action/thermal_timer.cpp", "native/src/thermal_callback.cpp", "native/src/thermal_mgr_dumper.cpp", "native/src/thermal_observer/state_machine/charger_state_collection.cpp", "native/src/thermal_observer/state_machine/scene_state_collection.cpp", "native/src/thermal_observer/state_machine/screen_state_collection.cpp", "native/src/thermal_observer/state_machine/state_collection_factory.cpp", "native/src/thermal_observer/state_machine/state_machine.cpp", "native/src/thermal_observer/thermal_common_event_receiver.cpp", "native/src/thermal_observer/thermal_observer.cpp", "native/src/thermal_observer/thermal_sensor_info.cpp", "native/src/thermal_observer/thermal_service_subscriber.cpp", "native/src/thermal_policy/thermal_config_base_info.cpp", "native/src/thermal_policy/thermal_config_sensor_cluster.cpp", "native/src/thermal_policy/thermal_policy.cpp", "native/src/thermal_policy/thermal_srv_config_parser.cpp", "native/src/thermal_service.cpp", "native/src/thermalsrv_event_handler.cpp", ] configs = [ "${utils_path}:utils_config", ":thermalsrv_private_config", ] public_configs = [ ":thermalsrv_public_config" ] deps = [ "${powermgr_utils_path}/permission:power_permission", "${thermal_service_zidl}:thermalmgr_proxy", "${thermal_service_zidl}:thermalmgr_stub", "${utils_path}:thermal_utils", "//foundation/arkui/ace_engine/interfaces/inner_api/ui_service_manager:ui_service_mgr", "//foundation/resourceschedule/resource_schedule_service/soc_perf:socperf_client", "//third_party/libxml2:xml2", ] external_deps = [ "ability_base:want", "ability_runtime:ability_manager", "ability_runtime:app_manager", "ability_runtime:wantagent_innerkits", "appspawn:appspawn_socket_client", "battery_manager:batterysrv_client", "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", "display_manager:displaymgr", "drivers_interface_battery:libbattery_proxy_1.1", "drivers_interface_thermal:libthermal_proxy_1.0", "eventhandler:libeventhandler", "hdf_core:libhdi", "hicollie_native:libhicollie", "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "init:libbegetutil", "ipc:ipc_core", "multimedia_audio_framework:audio_client", "multimedia_image_framework:image_native", "power_manager:powermgr_client", "safwk:system_ability_fwk", "time_service:time_client", "window_manager:libdm", ] subsystem_name = "powermgr" part_name = "thermal_manager" } group("service") { deps = [ ":thermalservice", "${thermal_manager_path}/sa_profile:thermalmgr_sa_profile", "native/profile:thermal_service_config", ] }