1# Copyright (C) 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("//build/config/components/idl_tool/idl.gni") 15import("//build/ohos.gni") 16import("../../wallpaper.gni") 17 18config("wallpaper_manager_config") { 19 visibility = [ ":*" ] 20 include_dirs = [ 21 "include", 22 "${target_gen_dir}", 23 "${wallpaper_path}/utils/dfx/hisysevent_adapter", 24 "${wallpaper_path}/services/include", 25 "${wallpaper_path}/utils/include", 26 "${wallpaper_path}/interfaces/inner_api/include", 27 "${wallpaper_path}/frameworks/native/include", 28 ] 29 cflags_cc = [ 30 "-fdata-sections", 31 "-ffunction-sections", 32 "-Os", 33 ] 34} 35 36idl_gen_interface("wallpaperservice_interface") { 37 sources = [ "IWallpaperService.idl" ] 38 log_domainid = "0xD001C20" 39 log_tag = "WallpaperClient" 40 subsystem_name = "theme" 41 part_name = "wallpaper_mgr" 42} 43 44ohos_source_set("wallpaper_service_proxy") { 45 public_configs = [ ":wallpaper_manager_config" ] 46 sanitize = { 47 cfi = true 48 cfi_cross_dso = true 49 cfi_vcall_icall_only = true 50 debug = false 51 } 52 sources = [ 53 "src/wallpaper_picture_info_by_parcel.cpp", 54 "src/wallpaper_rawdata.cpp", 55 ] 56 output_values = get_target_outputs(":wallpaperservice_interface") 57 sources += filter_include(output_values, [ "*_stub.cpp" ]) 58 sources += filter_include(output_values, [ "*_proxy.cpp" ]) 59 60 deps = [ ":wallpaperservice_interface" ] 61 external_deps = [ 62 "ability_runtime:wantagent_innerkits", 63 "hilog:libhilog", 64 "ipc:ipc_single", 65 "samgr:samgr_proxy", 66 ] 67 subsystem_name = "theme" 68 part_name = "wallpaper_mgr" 69} 70 71ohos_shared_library("wallpapermanager") { 72 sources = [ 73 "src/wallpaper_event_listener_client.cpp", 74 "src/wallpaper_event_listener_stub.cpp", 75 "src/wallpaper_manager.cpp", 76 "src/wallpaper_manager_client.cpp", 77 "src/wallpaper_picture_info_by_parcel.cpp", 78 "src/wallpaper_rawdata.cpp", 79 "src/wallpaper_service_cb_stub.cpp", 80 ] 81 82 output_values = get_target_outputs(":wallpaperservice_interface") 83 sources += filter_include(output_values, [ "*_stub.cpp" ]) 84 sources += filter_include(output_values, [ "*_proxy.cpp" ]) 85 86 public_configs = [ ":wallpaper_manager_config" ] 87 deps = [ 88 ":wallpaperservice_interface", 89 "${utils_path}:wallpaper_utils", 90 ] 91 external_deps = [ 92 "c_utils:utils", 93 "hilog:libhilog", 94 "hitrace:hitrace_meter", 95 "image_framework:image_native", 96 "ipc:ipc_single", 97 "napi:ace_napi", 98 "player_framework:media_client", 99 "samgr:samgr_proxy", 100 "window_manager:libdm", 101 ] 102 branch_protector_ret = "pac_ret" 103 subsystem_name = "theme" 104 innerapi_tags = [ "platformsdk" ] 105 part_name = "wallpaper_mgr" 106} 107 108ohos_static_library("wallpapermanager_static") { 109 testonly = true 110 sources = [ 111 "src/wallpaper_event_listener_client.cpp", 112 "src/wallpaper_event_listener_stub.cpp", 113 "src/wallpaper_manager.cpp", 114 "src/wallpaper_manager_client.cpp", 115 "src/wallpaper_picture_info_by_parcel.cpp", 116 "src/wallpaper_rawdata.cpp", 117 "src/wallpaper_service_cb_stub.cpp", 118 ] 119 120 output_values = get_target_outputs(":wallpaperservice_interface") 121 sources += filter_include(output_values, [ "*_stub.cpp" ]) 122 sources += filter_include(output_values, [ "*_proxy.cpp" ]) 123 124 public_configs = [ ":wallpaper_manager_config" ] 125 deps = [ 126 ":wallpaperservice_interface", 127 "${utils_path}:wallpaper_utils", 128 ] 129 sanitize = { 130 cfi = true 131 cfi_cross_dso = true 132 debug = false 133 } 134 external_deps = [ 135 "c_utils:utils", 136 "hilog:libhilog", 137 "hitrace:hitrace_meter", 138 "image_framework:image_native", 139 "ipc:ipc_single", 140 "napi:ace_napi", 141 "player_framework:media_client", 142 "samgr:samgr_proxy", 143 "window_manager:libdm", 144 ] 145 subsystem_name = "theme" 146 part_name = "wallpaper_mgr" 147} 148 149ohos_prebuilt_etc("wallpaperdefault.jpeg") { 150 source = "data/wallpaperdefault.jpeg" 151 part_name = "wallpaper_mgr" 152 subsystem_name = "theme" 153} 154ohos_prebuilt_etc("wallpaperlockdefault.jpeg") { 155 source = "data/wallpaperlockdefault.jpeg" 156 part_name = "wallpaper_mgr" 157 subsystem_name = "theme" 158} 159