1# Copyright (c) 2023 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("//build/config/components/idl_tool/idl.gni") 15import("//build/ohos.gni") 16import("//foundation/resourceschedule/device_standby/standby_service.gni") 17 18idl_interface_sources = [ 19 "${target_gen_dir}/standby_service_proxy.cpp", 20 "${target_gen_dir}/standby_service_stub.cpp", 21] 22 23idl_gen_interface("standby_service_interface") { 24 src_idl = rebase_path("IStandbyService.idl") 25 dst_file = string_join(",", idl_interface_sources) 26 log_domainid = "0xD001718" 27 log_tag = "StandbyService" 28} 29 30config("standby_innerkits_public_config") { 31 include_dirs = [ 32 "include", 33 "${target_gen_dir}", 34 "${standby_service_frameworks_path}/include", 35 "${standby_utils_common_path}/include", 36 ] 37} 38 39ohos_shared_library("standby_innerkits") { 40 branch_protector_ret = "pac_ret" 41 sanitize = { 42 cfi = true 43 cfi_cross_dso = true 44 debug = false 45 } 46 output_values = get_target_outputs(":standby_service_interface") 47 sources = [ 48 "src/allow_info.cpp", 49 "src/allow_type.cpp", 50 "src/resource_request.cpp", 51 "src/standby_service_client.cpp", 52 "src/standby_service_subscriber_stub.cpp", 53 ] 54 sources += filter_include(output_values, [ "*_proxy.cpp" ]) 55 56 public_configs = [ ":standby_innerkits_public_config" ] 57 58 deps = [ 59 ":standby_service_interface", 60 "${standby_service_frameworks_path}:standby_fwk", 61 "${standby_utils_common_path}:standby_utils_common", 62 ] 63 64 install_images = [ 65 "system", 66 "updater", 67 ] 68 69 external_deps = [ 70 "c_utils:utils", 71 "hilog:libhilog", 72 "ipc:ipc_single", 73 "samgr:samgr_proxy", 74 ] 75 76 public_external_deps = [ "resource_schedule_service:resschedsvc" ] 77 innerapi_tags = [ "platformsdk" ] 78 subsystem_name = "resourceschedule" 79 part_name = "${standby_service_part_name}" 80 81 version_script = "libstandby_innerkits.versionscript" 82} 83 84ohos_source_set("device_standby_stub") { 85 sanitize = { 86 cfi = true 87 cfi_cross_dso = true 88 debug = false 89 } 90 public_configs = [ ":standby_innerkits_public_config" ] 91 output_values = get_target_outputs(":standby_service_interface") 92 sources = filter_include(output_values, [ "*_stub.cpp" ]) 93 deps = [ ":standby_service_interface" ] 94 external_deps = [ 95 "c_utils:utils", 96 "hilog:libhilog", 97 "ipc:ipc_single", 98 "samgr:samgr_proxy", 99 ] 100 subsystem_name = "resourceschedule" 101 part_name = "${standby_service_part_name}" 102} 103