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("../../thermalmgr.gni") 15 16config("thermalsrv_private_config") { 17 include_dirs = [ "${thermal_service_zidl}/include" ] 18} 19 20config("thermalsrv_public_config") { 21 include_dirs = [ "native/include" ] 22} 23 24ohos_shared_library("thermalsrv_client") { 25 sanitize = { 26 cfi = true 27 cfi_cross_dso = true 28 debug = false 29 } 30 31 branch_protector_ret = "pac_ret" 32 33 sources = [ 34 "${thermal_frameworks}/native/thermal_mgr_client.cpp", 35 "${thermal_frameworks}/native/thermal_srv_sensor_info.cpp", 36 "${thermal_service_zidl}/src/thermal_action_callback_stub.cpp", 37 "${thermal_service_zidl}/src/thermal_level_callback_stub.cpp", 38 "${thermal_service_zidl}/src/thermal_temp_callback_stub.cpp", 39 ] 40 41 configs = [ 42 "${thermal_service_zidl}:thermalmgr_ipc_public_config", 43 "${utils_path}:utils_config", 44 ":thermalsrv_private_config", 45 "${utils_path}:coverage_flags", 46 ] 47 48 public_configs = [ 49 "${thermal_service_zidl}:thermalmgr_ipc_public_config", 50 ":thermalsrv_public_config", 51 ] 52 53 deps = [ "${thermal_service_zidl}:thermalmgr_proxy" ] 54 55 external_deps = [ 56 "bundle_framework:appexecfwk_base", 57 "c_utils:utils", 58 "hicollie:libhicollie", 59 "hilog:libhilog", 60 "ipc:ipc_core", 61 "samgr:samgr_proxy", 62 ] 63 subsystem_name = "powermgr" 64 innerapi_tags = [ "platformsdk" ] 65 part_name = "thermal_manager" 66} 67 68ohos_shared_library("thermalmgr_listener") { 69 sanitize = { 70 cfi = true 71 cfi_cross_dso = true 72 debug = false 73 } 74 sources = [ "${thermal_frameworks}/native/thermal_mgr_listener.cpp" ] 75 76 configs = [ 77 "${utils_path}:utils_config", 78 ":thermalsrv_private_config", 79 "${utils_path}:coverage_flags", 80 ] 81 82 public_configs = [ ":thermalsrv_public_config" ] 83 84 deps = [ 85 "${thermal_inner_api}:thermalsrv_client", 86 ] 87 88 external_deps = [ 89 "bundle_framework:appexecfwk_base", 90 "c_utils:utils", 91 "hilog:libhilog", 92 "ipc:ipc_core", 93 ] 94 95 subsystem_name = "powermgr" 96 part_name = "thermal_manager" 97} 98