# Copyright (c) 2022-2023 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. if (defined(ohos_lite)) { import("//build/lite/config/component/lite_component.gni") } else { import("//build/ohos.gni") } import("//foundation/distributedhardware/device_manager/device_manager.gni") if (defined(ohos_lite)) { if (ohos_kernel_type == "liteos_m") { static_library("devicemanagerservice_mini") { include_dirs = [ "${innerkits_path}/native_cpp/include", "${innerkits_path}/native_cpp/include/notify", "${servicesimpl_path}/include", "${servicesimpl_path}/include/config", "${servicesimpl_path}/include/adapter", "${servicesimpl_path}/include/authentication", "${servicesimpl_path}/include/authentication/showconfirm/lite", "${servicesimpl_path}/include/ability", "${servicesimpl_path}/include/credential", "${servicesimpl_path}/include/devicestate", "${servicesimpl_path}/include/discovery", "${servicesimpl_path}/include/dependency/commonevent", "${servicesimpl_path}/include/dependency/multipleuser", "${servicesimpl_path}/include/dependency/hichain", "${servicesimpl_path}/include/dependency/softbus", "${servicesimpl_path}/include/dependency/mini", "${servicesimpl_path}/include/dependency/timer", "${servicesimpl_path}/include/dispatch", "${servicesimpl_path}/include/eventbus", "${common_path}/include", "${common_path}/include/ipc", "${common_path}/include/ipc/model", "${utils_path}/include", "${utils_path}/include/dfx", "${utils_path}/include/dfx/lite", "${utils_path}/include/permission/lite", "foundation/multimedia/image_framework/mock/native/include", "${ext_path}/pin_auth/include", "${ext_path}/pin_auth/include/lite", "//third_party/json/include", "//third_party/bounds_checking_function/include", ] sources = [ "${servicesimpl_path}/src/ability/lite/dm_ability_manager.cpp", "${servicesimpl_path}/src/adapter/standard/dm_adapter_manager.cpp", "${servicesimpl_path}/src/authentication/auth_message_processor.cpp", "${servicesimpl_path}/src/authentication/auth_request_state.cpp", "${servicesimpl_path}/src/authentication/auth_response_state.cpp", "${servicesimpl_path}/src/authentication/dm_auth_manager.cpp", "${servicesimpl_path}/src/authentication/showconfirm/lite/show_confirm.cpp", "${servicesimpl_path}/src/config/mini/dm_config_manager.cpp", "${servicesimpl_path}/src/config/mini/pin_auth.cpp", "${servicesimpl_path}/src/dependency/hichain/hichain_connector.cpp", "${servicesimpl_path}/src/dependency/mini/dm_mutex.cpp", "${servicesimpl_path}/src/dependency/mini/dm_thread.cpp", "${servicesimpl_path}/src/dependency/multipleuser/multiple_user_connector.cpp", "${servicesimpl_path}/src/dependency/softbus/softbus_connector.cpp", "${servicesimpl_path}/src/dependency/softbus/softbus_session.cpp", "${servicesimpl_path}/src/dependency/timer/mini/dm_timer.cpp", "${servicesimpl_path}/src/devicestate/dm_device_state_manager.cpp", "${servicesimpl_path}/src/discovery/dm_discovery_manager.cpp", "${servicesimpl_path}/src/dispatch/command_dispatch.cpp", "${servicesimpl_path}/src/dispatch/device_manager_service_listener_mini.cpp", "${servicesimpl_path}/src/dispatch/server_stub.cpp", ] defines = [ "__LITEOS_M__", "HI_LOG_ENABLE", "DH_LOG_TAG=\"devicemanagerserviceimpl\"", "LOG_DOMAIN=0xD004100", ] if (os_account_part_exists) { defines += [ "OS_ACCOUNT_PART_EXISTS" ] include_dirs += [ "${os_account_path }/interfaces/innerkits/osaccount/native/include", ] } ldflags = dm_ldflags deps = [ "${innerkits_path}/native_cpp:devicemanagersdk_mini", "${utils_path}:devicemanagerutils_mini", "//third_party/bounds_checking_function:libsec_static", "//third_party/mbedtls", ] external_deps = [ "device_auth:deviceauth_sdk", "dsoftbus:softbus_client", "hilog_lite:hilog_static", "init:libbegetutil", "ipc:ipc_single", "safwk:system_ability_fwk", "utils_lite:utils", ] } } } else if (!support_jsapi) { group("devicemanagerserviceimpl") { deps = [] } } else { config("devicemanagerserviceimpl_config") { include_dirs = [ "include", "include/config", "include/adapter", "include/authentication", "include/authentication/showconfirm/standard", "include/ability", "include/credential", "include/devicestate", "include/discovery", "include/publish", "include/dependency/commonevent", "include/dependency/multipleuser", "include/dependency/hichain", "include/dependency/softbus", "include/dependency/timer", "${common_path}/include", "${common_path}/include/ipc", "${common_path}/include/ipc/model", "${utils_path}/include", "${utils_path}/include/fwkload/standard", "${utils_path}/include/dfx", "${utils_path}/include/dfx/standard", "${utils_path}/include/permission/standard", "//third_party/json/include", "${services_path}/include", "${services_path}/include/ipc/standard", ] if (os_account_part_exists) { include_dirs += [ "${os_account_path }/interfaces/innerkits/osaccount/native/include", ] } } ohos_shared_library("devicemanagerserviceimpl") { sources = [ "${common_path}/src/dm_softbus_adapter_crypto.cpp", "src/ability/standard/dm_ability_manager.cpp", "src/adapter/standard/dm_adapter_manager.cpp", "src/authentication/auth_message_processor.cpp", "src/authentication/auth_request_state.cpp", "src/authentication/auth_response_state.cpp", "src/authentication/auth_ui_state_manager.cpp", "src/authentication/dm_auth_manager.cpp", "src/authentication/showconfirm/standard/show_confirm.cpp", "src/config/dm_config_manager.cpp", "src/credential/dm_credential_manager.cpp", "src/dependency/commonevent/dm_common_event_manager.cpp", "src/dependency/hichain/hichain_connector.cpp", "src/dependency/multipleuser/multiple_user_connector.cpp", "src/dependency/softbus/softbus_connector.cpp", "src/dependency/softbus/softbus_session.cpp", "src/dependency/timer/dm_timer.cpp", "src/device_manager_service_impl.cpp", "src/devicestate/dm_device_state_manager.cpp", "src/discovery/dm_discovery_filter.cpp", "src/discovery/dm_discovery_manager.cpp", "src/publish/dm_publish_manager.cpp", ] public_configs = [ ":devicemanagerserviceimpl_config" ] defines = [ "HI_LOG_ENABLE", "DH_LOG_TAG=\"devicemanagerserviceimpl\"", "LOG_DOMAIN=0xD004100", ] deps = [ "${innerkits_path}/native_cpp:devicemanagersdk", "${utils_path}:devicemanagerutils", "//third_party/mbedtls:mbedtls_shared", ] if (!device_manager_no_interaction_auth) { } external_deps = [ "ability_base:want", "ability_runtime:ability_manager", "access_token:libaccesstoken_sdk", "c_utils:utils", "common_event_service:cesfwk_core", "common_event_service:cesfwk_innerkits", "device_auth:deviceauth_sdk", "dsoftbus:softbus_client", "init:libbegetutil", "ipc:ipc_core", "resource_management:resmgr_napi_core", "samgr:samgr_proxy", ] if (os_account_part_exists) { defines += [ "OS_ACCOUNT_PART_EXISTS" ] external_deps += [ "os_account:os_account_innerkits" ] } subsystem_name = "distributedhardware" part_name = "device_manager" } }