# Copyright (c) 2023-2024 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("../device_status.gni") config("devicestatus_services_private_config") { include_dirs = [ "delegate_task/include", "native/include", "${device_status_utils_path}/include", "${device_status_interfaces_path}/innerkits/include", "${device_status_interfaces_path}/innerkits/interaction/include", "../libs/interface", "interaction/drag/include", "communication/base", "communication/service/include", ] if (device_status_intention_framework) { include_dirs += [ "${device_status_root_path}/intention/cooperate/server/include", "${device_status_root_path}/intention/drag/server/include", "${device_status_root_path}/intention/ipc/socket/include", ] } defines = device_status_default_defines } config("devicestatus_services_public_config") { include_dirs = [ "delegate_task/include", "native/include", "interaction/drag/include", ] if (device_status_intention_framework) { include_dirs += [ "${device_status_root_path}/intention/cooperate/server/include", "${device_status_root_path}/intention/drag/server/include", "${device_status_root_path}/intention/ipc/socket/include", ] } } sources_set = [ "communication/service/src/devicestatus_srv_stub.cpp", "delegate_task/src/delegate_tasks.cpp", "native/src/devicestatus_dumper.cpp", "native/src/devicestatus_hisysevent.cpp", "native/src/devicestatus_manager.cpp", "native/src/devicestatus_msdp_client_impl.cpp", "native/src/devicestatus_service.cpp", "native/src/stream_server.cpp", ] external_deps_set = [ "ability_runtime:app_manager", "access_token:libaccesstoken_sdk", "access_token:libtokenid_sdk", "cJSON:cjson", "c_utils:utils", "graphic_2d:librender_service_client", "graphic_2d:window_animation", "hilog:libhilog", "hisysevent:libhisysevent", "hitrace:hitrace_meter", "input:libmmi-client", "ipc:ipc_single", "image_framework:image_native", "safwk:system_ability_fwk", "window_manager:libwm", "window_manager:libdm", ] ohos_shared_library("devicestatus_service") { sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } branch_protector_ret = "pac_ret" shlib_type = "sa" sources = sources_set configs = [ ":devicestatus_services_private_config" ] public_configs = [ ":devicestatus_services_public_config" ] deps = [ "${device_status_interfaces_path}/innerkits:devicestatus_client", "${device_status_root_path}/utils/ipc:devicestatus_ipc", "${device_status_utils_path}:devicestatus_util", "interaction/drag:interaction_drag", ] if (device_status_intention_framework) { deps += [ "${device_status_root_path}/intention/adapters/dsoftbus_adapter:intention_dsoftbus_adapter", "${device_status_root_path}/intention/adapters/input_adapter:intention_input_adapter", "${device_status_root_path}/intention/scheduler/plugin_manager:intention_plugin_manager", ] } public_deps = [ "${device_status_root_path}/intention/common/epoll:intention_epoll", "${device_status_root_path}/intention/prototype:intention_prototype", "${device_status_root_path}/intention/scheduler/timer_manager:intention_timer_manager", "${device_status_root_path}/intention/services/device_manager:intention_device_manager", ] if (device_status_intention_framework) { public_deps += [ "${device_status_root_path}/intention/ipc/socket:intention_socket_session_manager", "${device_status_root_path}/intention/ipc/tunnel:intention_tunnel_server", "${device_status_root_path}/intention/services/intention_service:intention_service", ] } defines = [] if (device_status_sensor_enable) { defines += [ "DEVICE_STATUS_SENSOR_ENABLE" ] } external_deps = external_deps_set if (device_status_intention_framework) { external_deps += [ "device_manager:devicemanagersdk" ] } else { if (device_status_interaction_coordination) { external_deps += [ "device_manager:devicemanagersdk" ] } } if (device_status_memmgr_enable) { defines += [ "MEMMGR_ENABLE" ] external_deps += [ "memmgr:memmgrclient" ] } subsystem_name = "${device_status_subsystem_name}" part_name = "${device_status_part_name}" } ohos_static_library("devicestatus_static_service") { sanitize = { integer_overflow = true ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false } sources = sources_set configs = [ ":devicestatus_services_private_config" ] public_configs = [ ":devicestatus_services_public_config" ] deps = [ "${device_status_interfaces_path}/innerkits:devicestatus_client", "${device_status_root_path}/utils/ipc:devicestatus_ipc", "${device_status_utils_path}:devicestatus_util", "interaction/drag:interaction_drag", ] if (device_status_intention_framework) { deps += [ "${device_status_root_path}/intention/adapters/dsoftbus_adapter:intention_dsoftbus_adapter", "${device_status_root_path}/intention/adapters/input_adapter:intention_input_adapter", "${device_status_root_path}/intention/scheduler/plugin_manager:intention_plugin_manager", ] } defines = [] if (device_status_sensor_enable) { defines += [ "DEVICE_STATUS_SENSOR_ENABLE" ] } public_deps = [ "${device_status_root_path}/intention/common/epoll:intention_epoll", "${device_status_root_path}/intention/prototype:intention_prototype", "${device_status_root_path}/intention/scheduler/timer_manager:intention_timer_manager", "${device_status_root_path}/intention/services/device_manager:intention_device_manager", ] if (device_status_intention_framework) { public_deps += [ "${device_status_root_path}/intention/ipc/socket:intention_socket_session_manager", "${device_status_root_path}/intention/ipc/tunnel:intention_tunnel_server", "${device_status_root_path}/intention/services/intention_service:intention_service", ] } external_deps = external_deps_set if (device_status_intention_framework) { external_deps += [ "device_manager:devicemanagersdk" ] } else { if (device_status_interaction_coordination) { external_deps += [ "device_manager:devicemanagersdk" ] } } if (device_status_memmgr_enable) { defines += [ "MEMMGR_ENABLE" ] external_deps += [ "memmgr:memmgrclient" ] } subsystem_name = "${device_status_subsystem_name}" part_name = "${device_status_part_name}" }