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 cflags_cc = [ 47 "-fstack-protector-strong", 48 ] 49 output_values = get_target_outputs(":standby_service_interface") 50 sources = [ 51 "src/allow_info.cpp", 52 "src/allow_type.cpp", 53 "src/resource_request.cpp", 54 "src/standby_service_client.cpp", 55 "src/standby_service_subscriber_stub.cpp", 56 ] 57 sources += filter_include(output_values, [ "*_proxy.cpp" ]) 58 59 public_configs = [ ":standby_innerkits_public_config" ] 60 61 deps = [ 62 ":standby_service_interface", 63 "${standby_service_frameworks_path}:standby_fwk", 64 "${standby_utils_common_path}:standby_utils_common", 65 ] 66 67 install_images = [ 68 "system", 69 "updater", 70 ] 71 72 external_deps = [ 73 "c_utils:utils", 74 "hilog:libhilog", 75 "ipc:ipc_single", 76 "samgr:samgr_proxy", 77 ] 78 79 public_external_deps = [ "resource_schedule_service:resschedsvc" ] 80 innerapi_tags = [ "platformsdk" ] 81 subsystem_name = "resourceschedule" 82 part_name = "${standby_service_part_name}" 83 84 version_script = "libstandby_innerkits.versionscript" 85} 86 87ohos_source_set("device_standby_stub") { 88 branch_protector_ret = "pac_ret" 89 sanitize = { 90 cfi = true 91 cfi_cross_dso = true 92 debug = false 93 } 94 public_configs = [ ":standby_innerkits_public_config" ] 95 output_values = get_target_outputs(":standby_service_interface") 96 sources = filter_include(output_values, [ "*_stub.cpp" ]) 97 deps = [ ":standby_service_interface" ] 98 external_deps = [ 99 "c_utils:utils", 100 "hilog:libhilog", 101 "ipc:ipc_single", 102 "samgr:samgr_proxy", 103 ] 104 subsystem_name = "resourceschedule" 105 part_name = "${standby_service_part_name}" 106} 107