1# Copyright (c) 2021-2022 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("//base/powermgr/thermal_manager/thermalmgr.gni") 15 16config("thermalsrv_private_config") { 17 include_dirs = [ 18 "${ability_runtime_services_path}/appmgr/include", 19 "//base/hiviewdfx/hicollie/interfaces/native/innerkits/include/xcollie", 20 ] 21} 22 23config("thermalsrv_public_config") { 24 include_dirs = [ 25 "native/include/", 26 "native/include/thermal_action", 27 "native/include/thermal_observer", 28 "native/include/thermal_policy", 29 "native/include/thermal_observer/state_machine", 30 "native/include/thermal_action/action", 31 "native/include/thermal_action/action/action_soc", 32 "${thermal_innerkits}/native/include", 33 ] 34} 35 36ohos_shared_library("thermalservice") { 37 sources = [ 38 "native/src/thermal_action/action/action_application_process.cpp", 39 "native/src/thermal_action/action/action_charger.cpp", 40 "native/src/thermal_action/action/action_display.cpp", 41 "native/src/thermal_action/action/action_popup.cpp", 42 "native/src/thermal_action/action/action_shutdown.cpp", 43 "native/src/thermal_action/action/action_soc/action_cpu_big.cpp", 44 "native/src/thermal_action/action/action_soc/action_cpu_lit.cpp", 45 "native/src/thermal_action/action/action_soc/action_cpu_med.cpp", 46 "native/src/thermal_action/action/action_soc/action_gpu.cpp", 47 "native/src/thermal_action/action/action_thermal_level.cpp", 48 "native/src/thermal_action/action/action_voltage.cpp", 49 "native/src/thermal_action/action/action_volume.cpp", 50 "native/src/thermal_action/thermal_action_factory.cpp", 51 "native/src/thermal_action/thermal_action_manager.cpp", 52 "native/src/thermal_action/thermal_timer.cpp", 53 "native/src/thermal_callback.cpp", 54 "native/src/thermal_mgr_dumper.cpp", 55 "native/src/thermal_observer/state_machine/charger_state_collection.cpp", 56 "native/src/thermal_observer/state_machine/scene_state_collection.cpp", 57 "native/src/thermal_observer/state_machine/screen_state_collection.cpp", 58 "native/src/thermal_observer/state_machine/state_collection_factory.cpp", 59 "native/src/thermal_observer/state_machine/state_machine.cpp", 60 "native/src/thermal_observer/thermal_common_event_receiver.cpp", 61 "native/src/thermal_observer/thermal_observer.cpp", 62 "native/src/thermal_observer/thermal_sensor_info.cpp", 63 "native/src/thermal_observer/thermal_service_subscriber.cpp", 64 "native/src/thermal_policy/thermal_config_base_info.cpp", 65 "native/src/thermal_policy/thermal_config_sensor_cluster.cpp", 66 "native/src/thermal_policy/thermal_policy.cpp", 67 "native/src/thermal_policy/thermal_srv_config_parser.cpp", 68 "native/src/thermal_service.cpp", 69 "native/src/thermalsrv_event_handler.cpp", 70 ] 71 72 configs = [ 73 "${utils_path}:utils_config", 74 ":thermalsrv_private_config", 75 ] 76 77 public_configs = [ ":thermalsrv_public_config" ] 78 79 deps = [ 80 "${thermal_service_zidl}:thermalmgr_proxy", 81 "${thermal_service_zidl}:thermalmgr_stub", 82 "${utils_path}:thermal_utils", 83 "//foundation/arkui/ace_engine/interfaces/inner_api/ui_service_manager:ui_service_mgr", 84 "//foundation/resourceschedule/resource_schedule_service/soc_perf:socperf_client", 85 "//third_party/libxml2:xml2", 86 ] 87 88 external_deps = [ 89 "ability_base:want", 90 "ability_runtime:ability_manager", 91 "ability_runtime:app_manager", 92 "ability_runtime:wantagent_innerkits", 93 "appspawn:appspawn_socket_client", 94 "battery_manager:batterysrv_client", 95 "bundle_framework:appexecfwk_core", 96 "c_utils:utils", 97 "common_event_service:cesfwk_innerkits", 98 "display_manager:displaymgr", 99 "drivers_interface_battery:libbattery_proxy_1.1", 100 "drivers_interface_thermal:libthermal_proxy_1.0", 101 "eventhandler:libeventhandler", 102 "hdf_core:libhdi", 103 "hicollie_native:libhicollie", 104 "hisysevent_native:libhisysevent", 105 "hiviewdfx_hilog_native:libhilog", 106 "init:libbegetutil", 107 "ipc:ipc_core", 108 "multimedia_audio_framework:audio_client", 109 "multimedia_image_framework:image_native", 110 "power_manager:powermgr_client", 111 "safwk:system_ability_fwk", 112 "time_service:time_client", 113 "window_manager:libdm", 114 ] 115 116 subsystem_name = "powermgr" 117 part_name = "thermal_manager" 118} 119 120group("service") { 121 deps = [ 122 ":thermalservice", 123 "${thermal_manager_path}/sa_profile:thermalmgr_sa_profile", 124 "native/profile:thermal_service_config", 125 ] 126} 127