From a0cdabab3b8dd428a379ccfd1582e765258b33d5 Mon Sep 17 00:00:00 2001 From: zhengzhuolan Date: Sun, 27 Apr 2025 10:57:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E9=80=9A=E7=9F=A5IDL?= =?UTF-8?q?=E5=8C=96=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhengzhuolan --- frameworks/ans/BUILD.gn | 387 +++-------------------------------- frameworks/reminder/BUILD.gn | 2 - 2 files changed, 28 insertions(+), 361 deletions(-) diff --git a/frameworks/ans/BUILD.gn b/frameworks/ans/BUILD.gn index fff01ce2d..4f01e7a30 100644 --- a/frameworks/ans/BUILD.gn +++ b/frameworks/ans/BUILD.gn @@ -14,48 +14,15 @@ import("//base/notification/distributed_notification_service/notification.gni") import("//build/config/components/idl_tool/idl.gni") -idl_gen_interface("swing_call_back_interface") { - sources = [ "ISwingCallBack.idl" ] - log_domainid = "0xD001203" - log_tag = "Ans" - subsystem_name = "notification" - part_name = "distributed_notification_service" -} - -idl_gen_interface("ans_dialog_callback_interface") { - sources = [ "IAnsDialogCallback.idl" ] - log_domainid = "0xD001203" - log_tag = "Ans" - subsystem_name = "notification" - part_name = "distributed_notification_service" -} - -idl_gen_interface("ans_operation_callback_interface") { - sources = [ "IAnsOperationCallback.idl" ] - log_domainid = "0xD001203" - log_tag = "Ans" - subsystem_name = "notification" - part_name = "distributed_notification_service" -} - -idl_gen_interface("ans_subscriber_local_live_view_interface") { - sources = [ "IAnsSubscriberLocalLiveView.idl" ] - log_domainid = "0xD001203" - log_tag = "Ans" - subsystem_name = "notification" - part_name = "distributed_notification_service" -} - -idl_gen_interface("ans_subscriber_interface") { - sources = [ "IAnsSubscriber.idl" ] - log_domainid = "0xD001203" - log_tag = "Ans" - subsystem_name = "notification" - part_name = "distributed_notification_service" -} - idl_gen_interface("ans_manager_interface") { - sources = [ "IAnsManager.idl" ] + sources = [ + "IAnsDialogCallback.idl", + "IAnsManager.idl", + "IAnsOperationCallback.idl", + "IAnsSubscriber.idl", + "IAnsSubscriberLocalLiveView.idl", + "ISwingCallBack.idl", + ] log_domainid = "0xD001203" log_tag = "Ans" subsystem_name = "notification" @@ -75,6 +42,7 @@ config("ans_innerkits_public_config") { "${core_path}/common/include", "${core_path}/include", "${target_gen_dir}", + "//third_party/json/single_include", ] configs = [ "${multimedia_path}/interfaces/innerkits:image_external_config" ] } @@ -92,104 +60,6 @@ config("ans_innerkits_config") { configs = [ "${multimedia_path}/interfaces/innerkits:image_external_config" ] } -config("ans_operation_callback_config") { - visibility = [ "./../../*" ] - - include_dirs = [ - "${inner_api_path}", - "${interfaces_path}/kits/native", - "${core_path}/common/include", - "${core_path}/include", - "${target_gen_dir}", - ] - configs = [ "${multimedia_path}/interfaces/innerkits:image_external_config" ] -} - -config("swing_call_back_config") { - visibility = [ "./../../*" ] - - include_dirs = [ - "${inner_api_path}", - "${interfaces_path}/kits/native", - "${core_path}/common/include", - "${core_path}/include", - "${target_gen_dir}", - ] - configs = [ "${multimedia_path}/interfaces/innerkits:image_external_config" ] -} - -config("ans_subscriber_local_live_view_config") { - visibility = [ "./../../*" ] - - include_dirs = [ - "${inner_api_path}", - "${interfaces_path}/kits/native", - "${core_path}/common/include", - "${core_path}/include", - "${target_gen_dir}", - ] - configs = [ "${multimedia_path}/interfaces/innerkits:image_external_config" ] -} - -config("ans_subscriber_config") { - visibility = [ "./../../*" ] - - include_dirs = [ - "${inner_api_path}", - "${interfaces_path}/kits/native", - "${core_path}/common/include", - "${core_path}/include", - "${target_gen_dir}", - ] - configs = [ "${multimedia_path}/interfaces/innerkits:image_external_config" ] -} - -ohos_source_set("swing_call_back_proxy") { - sanitize = { - integer_overflow = true - ubsan = true - boundary_sanitize = true - cfi = true - cfi_cross_dso = true - debug = false - } - public_configs = [ ":swing_call_back_config" ] - output_values = get_target_outputs(":swing_call_back_interface") - sources = filter_include(output_values, [ "*_proxy.cpp" ]) - deps = [ ":swing_call_back_interface" ] - external_deps = [ - "c_utils:utils", - "hilog:libhilog", - "ipc:ipc_core", - "samgr:samgr_proxy", - ] - subsystem_name = "notification" - part_name = "distributed_notification_service" -} - -ohos_source_set("swing_call_back_stub") { - sanitize = { - integer_overflow = true - ubsan = true - boundary_sanitize = true - cfi = true - cfi_cross_dso = true - debug = false - } - public_configs = [ ":swing_call_back_config" ] - output_values = get_target_outputs(":swing_call_back_interface") - sources = filter_include(output_values, [ "*_stub.cpp" ]) - deps = [ ":swing_call_back_interface" ] - external_deps = [ - "c_utils:utils", - "hilog:libhilog", - "ipc:ipc_core", - "samgr:samgr_proxy", - ] - subsystem_name = "notification" - part_name = "distributed_notification_service" -} - ohos_shared_library("ans_innerkits") { sanitize = { integer_overflow = true @@ -260,23 +130,28 @@ ohos_shared_library("ans_innerkits") { ] output_values = get_target_outputs(":ans_manager_interface") - sources += filter_include(output_values, [ "*_proxy.cpp" ]) + sources += filter_include(output_values, + [ + "*_dialog_callback_proxy.cpp", + "*_operation_callback_proxy.cpp", + "*_subscriber_proxy.cpp", + "*_subscriber_local_live_view_proxy.cpp", + "*_manager_proxy.cpp", + ]) + sources += filter_include(output_values, + [ + "*_dialog_callback_stub.cpp", + "*_operation_callback_stub.cpp", + "*_subscriber_stub.cpp", + "*_subscriber_local_live_view_stub.cpp", + "*_manager_stub.cpp", + ]) public_configs = [ ":ans_innerkits_public_config" ] defines = [] - deps = [ - ":ans_dialog_callback_proxy", - ":ans_dialog_callback_stub", - ":ans_manager_interface", - ":ans_operation_callback_proxy", - ":ans_operation_callback_stub", - ":ans_subscriber_local_live_view_proxy", - ":ans_subscriber_local_live_view_stub", - ":ans_subscriber_proxy", - ":ans_subscriber_stub", - ] + deps = [ ":ans_manager_interface" ] external_deps = [ "ability_base:want", @@ -311,10 +186,8 @@ ohos_shared_library("ans_innerkits") { if (notification_smart_reminder_supported) { defines += [ "NOTIFICATION_SMART_REMINDER_SUPPORTED" ] - deps += [ - ":swing_call_back_proxy", - ":swing_call_back_stub", - ] + sources += filter_include(output_values, [ "*_call_back_proxy.cpp" ]) + sources += filter_include(output_values, [ "*_call_back_stub.cpp" ]) } if (distributed_notification_service_feature_privileged_message) { @@ -325,210 +198,6 @@ ohos_shared_library("ans_innerkits") { part_name = "${component_name}" } -ohos_source_set("ans_dialog_callback_proxy") { - sanitize = { - integer_overflow = true - ubsan = true - boundary_sanitize = true - cfi = true - cfi_cross_dso = true - debug = false - } - public_configs = [ ":ans_innerkits_config" ] - output_values = get_target_outputs(":ans_dialog_callback_interface") - sources = filter_include(output_values, [ "*_proxy.cpp" ]) - deps = [ ":ans_dialog_callback_interface" ] - external_deps = [ - "c_utils:utils", - "hilog:libhilog", - "ipc:ipc_core", - "samgr:samgr_proxy", - ] - subsystem_name = "notification" - part_name = "distributed_notification_service" -} - -ohos_source_set("ans_dialog_callback_stub") { - sanitize = { - integer_overflow = true - ubsan = true - boundary_sanitize = true - cfi = true - cfi_cross_dso = true - debug = false - } - public_configs = [ ":ans_innerkits_config" ] - output_values = get_target_outputs(":ans_dialog_callback_interface") - sources = filter_include(output_values, [ "*_stub.cpp" ]) - deps = [ ":ans_dialog_callback_interface" ] - external_deps = [ - "c_utils:utils", - "hilog:libhilog", - "ipc:ipc_core", - "samgr:samgr_proxy", - ] - subsystem_name = "notification" - part_name = "distributed_notification_service" -} - -ohos_source_set("ans_operation_callback_proxy") { - sanitize = { - integer_overflow = true - ubsan = true - boundary_sanitize = true - cfi = true - cfi_cross_dso = true - debug = false - } - public_configs = [ ":ans_operation_callback_config" ] - output_values = get_target_outputs(":ans_operation_callback_interface") - sources = filter_include(output_values, [ "*_proxy.cpp" ]) - deps = [ ":ans_operation_callback_interface" ] - external_deps = [ - "c_utils:utils", - "hilog:libhilog", - "ipc:ipc_core", - "samgr:samgr_proxy", - ] - subsystem_name = "notification" - part_name = "distributed_notification_service" -} - -ohos_source_set("ans_operation_callback_stub") { - sanitize = { - integer_overflow = true - ubsan = true - boundary_sanitize = true - cfi = true - cfi_cross_dso = true - debug = false - } - public_configs = [ ":ans_operation_callback_config" ] - output_values = get_target_outputs(":ans_operation_callback_interface") - sources = filter_include(output_values, [ "*_stub.cpp" ]) - deps = [ ":ans_operation_callback_interface" ] - external_deps = [ - "c_utils:utils", - "hilog:libhilog", - "ipc:ipc_core", - "samgr:samgr_proxy", - ] - subsystem_name = "notification" - part_name = "distributed_notification_service" -} - -ohos_source_set("ans_subscriber_local_live_view_proxy") { - sanitize = { - integer_overflow = true - ubsan = true - boundary_sanitize = true - cfi = true - cfi_cross_dso = true - debug = false - } - public_configs = [ ":ans_subscriber_local_live_view_config" ] - output_values = - get_target_outputs(":ans_subscriber_local_live_view_interface") - sources = filter_include(output_values, [ "*_proxy.cpp" ]) - deps = [ ":ans_subscriber_local_live_view_interface" ] - external_deps = [ - "ability_base:want", - "c_utils:utils", - "hilog:libhilog", - "ipc:ipc_core", - "samgr:samgr_proxy", - ] - subsystem_name = "notification" - part_name = "distributed_notification_service" -} - -ohos_source_set("ans_subscriber_local_live_view_stub") { - sanitize = { - integer_overflow = true - ubsan = true - boundary_sanitize = true - cfi = true - cfi_cross_dso = true - debug = false - } - public_configs = [ ":ans_subscriber_local_live_view_config" ] - output_values = - get_target_outputs(":ans_subscriber_local_live_view_interface") - sources = filter_include(output_values, [ "*_stub.cpp" ]) - deps = [ ":ans_subscriber_local_live_view_interface" ] - external_deps = [ - "ability_base:want", - "c_utils:utils", - "hilog:libhilog", - "ipc:ipc_core", - "samgr:samgr_proxy", - ] - subsystem_name = "notification" - part_name = "distributed_notification_service" -} - -ohos_source_set("ans_subscriber_proxy") { - sanitize = { - integer_overflow = true - ubsan = true - boundary_sanitize = true - cfi = true - cfi_cross_dso = true - debug = false - } - public_configs = [ ":ans_subscriber_config" ] - output_values = get_target_outputs(":ans_subscriber_interface") - sources = filter_include(output_values, [ "*_proxy.cpp" ]) - deps = [ ":ans_subscriber_interface" ] - external_deps = [ - "c_utils:utils", - "hicollie:libhicollie", - "hilog:libhilog", - "i18n:intl_util", - "ipc:ipc_core", - "samgr:samgr_proxy", - ] - - public_external_deps = [ - "ability_runtime:wantagent_innerkits", - "image_framework:image_native", - ] - - subsystem_name = "notification" - part_name = "distributed_notification_service" -} - -ohos_source_set("ans_subscriber_stub") { - sanitize = { - integer_overflow = true - ubsan = true - boundary_sanitize = true - cfi = true - cfi_cross_dso = true - debug = false - } - public_configs = [ ":ans_subscriber_config" ] - output_values = get_target_outputs(":ans_subscriber_interface") - sources = filter_include(output_values, [ "*_stub.cpp" ]) - deps = [ ":ans_subscriber_interface" ] - external_deps = [ - "c_utils:utils", - "hicollie:libhicollie", - "hilog:libhilog", - "i18n:intl_util", - "ipc:ipc_core", - "samgr:samgr_proxy", - ] - - public_external_deps = [ - "ability_runtime:wantagent_innerkits", - "image_framework:image_native", - ] - - subsystem_name = "notification" - part_name = "distributed_notification_service" -} - ohos_source_set("ans_manager_stub") { sanitize = { integer_overflow = true diff --git a/frameworks/reminder/BUILD.gn b/frameworks/reminder/BUILD.gn index cad0d54d8..35f1f04e2 100644 --- a/frameworks/reminder/BUILD.gn +++ b/frameworks/reminder/BUILD.gn @@ -58,8 +58,6 @@ ohos_shared_library("reminder_innerkits") { public_configs = [ ":reminder_innerkits_public_config", "${frameworks_path}/ans:ans_innerkits_config", - "${frameworks_path}/ans:ans_subscriber_local_live_view_config", - "${frameworks_path}/ans:ans_subscriber_config", ] output_values = get_target_outputs(":reminder_service_interface") sources = [ -- Gitee