# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//base/print/print_fwk/print.gni") import("//build/ohos.gni") cflags_cc = [] config("scan_service_config") { visibility = [ ":*" ] include_dirs = [ "include", "${print_path}/frameworks/helper/scan_helper/include", ] cflags_cc += [ "-fexceptions" ] } ohos_shared_library("scan_service") { sources = [ "src/scan_callback_proxy.cpp", "src/scan_event_subscriber.cpp", "src/scan_mdns_service.cpp", "src/scan_service_ability.cpp", "src/scan_service_stub.cpp", "src/scan_system_data.cpp", "src/scan_usb_manager.cpp", ] branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true boundary_sanitize = true debug = false integer_overflow = true ubsan = true } public_configs = [ ":scan_service_config" ] include_dirs = [ "${print_path}/frameworks/innerkitsimpl/scan_impl/include", "${print_utils_path}/include", ] deps = [ "${print_path}/frameworks/helper/scan_helper:scan_helper", "${print_path}/frameworks/innerkitsimpl/scan_impl:scan_client", ] if (debug_enable) { cflags_cc += [ "-DDEBUG_ENABLE" ] } external_deps = [ "ability_base:base", "ability_base:want", "ability_base:zuri", "ability_runtime:ability_manager", "ability_runtime:abilitykit_native", "access_token:libaccesstoken_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "cJSON:cjson", "c_utils:utils", "common_event_service:cesfwk_innerkits", "drivers_interface_usb:libusb_proxy_1.0", "eventhandler:libeventhandler", "hilog:libhilog", "hisysevent:libhisysevent", "init:libbegetutil", "ipc:ipc_core", "libjpeg-turbo:turbojpeg", "napi:ace_napi", "netmanager_ext:mdns_manager_if", "netmanager_ext:mdns_manager_if", "os_account:os_account_innerkits", "safwk:system_ability_fwk", "samgr:samgr_proxy", "usb_manager:usbsrv_client", ] if (build_variant == "user") { cflags_cc += [ "-DIS_RELEASE_VERSION" ] } subsystem_name = "print" part_name = "print_fwk" }