From 869c9a1ea2f452d3b022dc2e9fd219a7cce8a261 Mon Sep 17 00:00:00 2001 From: zero-cyc Date: Thu, 26 May 2022 23:22:03 +0800 Subject: [PATCH] notification directory modify Signed-off-by: zero-cyc Change-Id: I5c8cb4ec680df5ad2728f721eb91d910d2353f7c --- README_zh.md | 2 +- bundle.json | 36 ++-- frameworks/BUILD.gn | 19 -- frameworks/ans/{native => }/BUILD.gn | 18 +- frameworks/ans/core/BUILD.gn | 110 ----------- .../enabled_notification_callback_data.cpp | 0 .../ans/{native => }/src/message_user.cpp | 0 .../ans/{native => }/src/notification.cpp | 0 .../src/notification_action_button.cpp | 0 .../src/notification_basic_content.cpp | 0 .../src/notification_bundle_option.cpp | 0 .../src/notification_constant.cpp | 0 .../{native => }/src/notification_content.cpp | 0 .../notification_conversational_content.cpp | 0 .../notification_conversational_message.cpp | 0 .../src/notification_distributed_options.cpp | 0 .../src/notification_do_not_disturb_date.cpp | 0 .../{native => }/src/notification_flags.cpp | 0 .../{native => }/src/notification_helper.cpp | 0 .../src/notification_long_text_content.cpp | 0 .../src/notification_media_content.cpp | 0 .../src/notification_multiline_content.cpp | 0 .../src/notification_normal_content.cpp | 0 .../src/notification_picture_content.cpp | 0 .../{native => }/src/notification_request.cpp | 0 .../{native => }/src/notification_slot.cpp | 0 .../src/notification_slot_group.cpp | 0 .../{native => }/src/notification_sorting.cpp | 0 .../src/notification_sorting_map.cpp | 0 .../src/notification_subscribe_info.cpp | 0 .../src/notification_subscriber.cpp | 2 +- .../src/notification_template.cpp | 0 .../src/notification_user_input.cpp | 0 .../ans/{native => }/src/reminder_helper.cpp | 0 .../ans/{native => }/src/reminder_request.cpp | 0 .../src/reminder_request_alarm.cpp | 0 .../src/reminder_request_calendar.cpp | 0 .../src/reminder_request_timer.cpp | 0 .../ans/{native => }/src/reminder_store.cpp | 0 .../ans/{native => }/test/unittest/BUILD.gn | 18 +- .../unittest/reminder_request_alarm_test.cpp | 0 .../reminder_request_calendar_test.cpp | 0 .../test/unittest/reminder_request_test.cpp | 0 .../unittest/reminder_request_timer_test.cpp | 0 frameworks/core/BUILD.gn | 106 +++++++++++ .../core/common/include/ans_const_define.h | 0 .../core/common/include/ans_inner_errors.h | 0 .../core/common/include/ans_log_wrapper.h | 4 +- .../core/common/include/ans_permission_def.h | 0 .../core/common/include/ans_watchdog.h | 0 .../core/common/src/ans_log_wrapper.cpp | 0 .../core/common/src/ans_watchdog.cpp | 0 .../{ans => }/core/include/ans_image_util.h | 0 .../include/ans_manager_death_recipient.h | 0 .../core/include/ans_manager_interface.h | 15 +- .../core/include/ans_manager_proxy.h | 8 +- .../{ans => }/core/include/ans_manager_stub.h | 6 +- .../{ans => }/core/include/ans_notification.h | 2 +- .../core/include/ans_subscriber_interface.h | 10 +- .../core/include/ans_subscriber_proxy.h | 2 +- .../core/include/ans_subscriber_stub.h | 2 +- .../{ans => }/core/src/ans_image_util.cpp | 0 .../core/src/ans_manager_death_recipient.cpp | 0 .../{ans => }/core/src/ans_manager_proxy.cpp | 7 +- .../{ans => }/core/src/ans_manager_stub.cpp | 19 +- .../{ans => }/core/src/ans_notification.cpp | 2 +- .../core/src/ans_subscriber_proxy.cpp | 2 +- .../core/src/ans_subscriber_stub.cpp | 4 +- .../napi/ans => frameworks/js/napi}/BUILD.gn | 24 ++- .../js/napi}/include/ans_template.h | 6 +- .../js/napi}/include/cancel.h | 6 +- .../js/napi}/include/common.h | 6 +- .../js/napi}/include/constant.h | 6 +- .../js/napi}/include/display_badge.h | 6 +- .../js/napi}/include/distributed.h | 6 +- .../js/napi}/include/disturb_mode.h | 6 +- .../js/napi}/include/enable_notification.h | 6 +- .../js/napi}/include/get_active.h | 6 +- .../ans => frameworks/js/napi}/include/init.h | 6 +- .../js/napi}/include/publish.h | 6 +- .../js/napi}/include/reminder/native_module.h | 6 +- .../js/napi}/include/reminder/publish.h | 6 +- .../napi}/include/reminder/reminder_common.h | 6 +- .../js/napi}/include/remove.h | 6 +- .../ans => frameworks/js/napi}/include/slot.h | 6 +- .../js/napi}/include/subscribe.h | 6 +- .../js/napi}/include/unsubscribe.h | 6 +- .../js/napi}/src/ans_template.cpp | 0 .../ans => frameworks/js/napi}/src/cancel.cpp | 0 .../ans => frameworks/js/napi}/src/common.cpp | 0 .../js/napi}/src/constant.cpp | 0 .../js/napi}/src/display_badge.cpp | 0 .../js/napi}/src/distributed.cpp | 0 .../js/napi}/src/disturb_mode.cpp | 0 .../js/napi}/src/enable_notification.cpp | 0 .../js/napi}/src/get_active.cpp | 0 .../ans => frameworks/js/napi}/src/init.cpp | 0 .../js/napi}/src/publish.cpp | 0 .../js/napi}/src/reminder/BUILD.gn | 12 +- .../js/napi}/src/reminder/native_module.cpp | 0 .../js/napi}/src/reminder/publish.cpp | 0 .../js/napi}/src/reminder/reminder_common.cpp | 0 .../ans => frameworks/js/napi}/src/remove.cpp | 0 .../ans => frameworks/js/napi}/src/slot.cpp | 16 +- .../js/napi}/src/subscribe.cpp | 0 .../js/napi}/src/unsubscribe.cpp | 0 frameworks/{ans => }/test/moduletest/BUILD.gn | 100 +++++----- .../test/moduletest/ReminderHelperTest.js | 0 .../test/moduletest/ans_fw_module_test.cpp | 90 ++++----- .../ans_innerkits_module_publish_test.cpp | 62 +++---- .../ans_innerkits_module_setting_test.cpp | 24 +-- .../ans_innerkits_module_slot_test.cpp | 42 ++--- .../{ans => }/test/moduletest/config.json | 0 .../{ans => }/test/moduletest/mock/blob.cpp | 0 .../mock/distributed_kv_data_manager.cpp | 6 +- .../mock/include/mock_bundle_manager.h | 6 +- .../mock/include/mock_ipc_skeleton.h | 8 +- .../mock/include/mock_single_kv_store.h | 6 +- .../moduletest/mock/mock_accesstoken_kit.cpp | 0 .../moduletest/mock/mock_bundle_manager.cpp | 4 +- .../mock/mock_bundle_manager_helper.cpp | 0 .../moduletest/mock/mock_bundle_mgr_proxy.cpp | 0 .../mock/mock_change_notification.cpp | 0 .../mock/mock_common_event_data.cpp | 0 .../mock/mock_common_event_manager.cpp | 0 .../moduletest/mock/mock_event_handler.cpp | 0 .../test/moduletest/mock/mock_ipc.cpp | 6 +- .../moduletest/mock/mock_message_parcel.cpp | 0 .../moduletest/mock/mock_single_kv_store.cpp | 76 ++++---- interfaces/BUILD.gn | 19 -- .../enabled_notification_callback_data.h | 6 +- .../include => inner_api}/message_user.h | 6 +- .../include => inner_api}/notification.h | 6 +- .../notification_action_button.h | 6 +- .../notification_basic_content.h | 6 +- .../notification_bundle_option.h | 6 +- .../notification_constant.h | 6 +- .../notification_content.h | 6 +- .../notification_conversational_content.h | 6 +- .../notification_conversational_message.h | 6 +- .../notification_distributed_options.h | 6 +- .../notification_do_not_disturb_date.h | 6 +- .../notification_flags.h | 6 +- .../notification_helper.h | 6 +- .../notification_json_convert.h | 6 +- .../notification_long_text_content.h | 6 +- .../notification_media_content.h | 6 +- .../notification_multiline_content.h | 6 +- .../notification_normal_content.h | 6 +- .../notification_picture_content.h | 6 +- .../notification_request.h | 6 +- .../include => inner_api}/notification_slot.h | 6 +- .../notification_slot_group.h | 6 +- .../notification_sorting.h | 6 +- .../notification_sorting_map.h | 6 +- .../notification_subscribe_info.h | 6 +- .../notification_subscriber.h | 8 +- .../notification_template.h | 6 +- .../notification_user_input.h | 6 +- .../include => inner_api}/reminder_helper.h | 6 +- .../include => inner_api}/reminder_request.h | 6 +- .../reminder_request_alarm.h | 6 +- .../reminder_request_calendar.h | 6 +- .../reminder_request_timer.h | 6 +- .../include => inner_api}/reminder_store.h | 8 +- notification.gni | 36 ++-- sa_profile/BUILD.gn | 2 +- services/BUILD.gn | 4 +- services/ans/BUILD.gn | 33 ++-- services/ans/include/access_token_helper.h | 6 +- .../include/advanced_notification_service.h | 12 +- .../advanced_notification_service_ability.h | 6 +- services/ans/include/bundle_manager_helper.h | 6 +- .../distributed_kvstore_death_recipient.h | 6 +- services/ans/include/interface_system_event.h | 6 +- services/ans/include/notification_filter.h | 6 +- .../ans/include/notification_preferences.h | 6 +- .../notification_preferences_database.h | 26 +-- .../include/notification_preferences_info.h | 6 +- services/ans/include/notification_record.h | 6 +- .../ans/include/notification_slot_filter.h | 6 +- .../include/notification_subscriber_manager.h | 25 +-- services/ans/include/permission_filter.h | 6 +- services/ans/include/preferences_constant.h | 6 +- services/ans/include/reminder_data_manager.h | 8 +- services/ans/include/reminder_event_manager.h | 6 +- services/ans/include/reminder_timer_info.h | 6 +- services/ans/include/remote_death_recipient.h | 6 +- services/ans/include/system_event_observer.h | 6 +- .../ans/include/system_event_subscriber.h | 6 +- .../ans/src/advanced_notification_service.cpp | 4 +- .../src/notification_subscriber_manager.cpp | 14 +- services/ans/test/unittest/BUILD.gn | 10 +- .../mock/distributed_kv_data_manager.cpp | 2 +- .../mock/include/mock_single_kv_store.h | 2 +- .../unittest/mock/mock_single_kv_store.cpp | 59 +++--- .../notification_subscriber_manager_test.cpp | 4 +- .../dialog/dialog_ui/js/BUILD.gn | 8 +- .../dialog/dialog_ui/js/common/.gitkeep | 0 .../dialog/dialog_ui/js/i18n/en-US.json | 0 .../dialog/dialog_ui/js/i18n/zh-CN.json | 0 .../dialog/dialog_ui/js/pages/index/index.css | 0 .../dialog/dialog_ui/js/pages/index/index.hml | 0 .../dialog/dialog_ui/js/pages/index/index.js | 0 services/distributed/BUILD.gn | 8 +- .../include/distributed_database.h | 6 +- .../include/distributed_database_callback.h | 6 +- .../include/distributed_device_callback.h | 6 +- .../include/distributed_flow_control.h | 6 +- .../distributed_notification_manager.h | 6 +- .../include/distributed_preferences.h | 6 +- .../distributed_preferences_database.h | 6 +- .../include/distributed_preferences_info.h | 6 +- .../distributed_screen_status_manager.h | 6 +- services/distributed/test/unittest/BUILD.gn | 14 +- .../mock/ans_test_single_kv_store.cpp | 171 ------------------ .../mock/mock_distributed_kv_data_manager.cpp | 4 +- .../unittest/mock/mock_single_kv_store.cpp | 171 ++++++++++++++++++ ...ngle_kv_store.h => mock_single_kv_store.h} | 2 +- services/test/moduletest/BUILD.gn | 10 +- .../mock/distributed_kv_data_manager.cpp | 2 +- .../mock/include/mock_bundle_manager.h | 6 +- .../mock/include/mock_single_kv_store.h | 2 +- .../moduletest/mock/mock_bundle_manager.cpp | 4 +- .../moduletest/mock/mock_single_kv_store.cpp | 58 +++--- test/BUILD.gn | 2 +- .../notification_publish_test/BUILD.gn | 14 +- .../notification_services_test/BUILD.gn | 12 +- .../acts/actsnotificationfuzztest/BUILD.gn | 35 ++-- test/fuzztest/BUILD.gn | 2 - .../addnotificationslotgroups_fuzzer/BUILD.gn | 9 +- .../addnotificationslots_fuzzer/BUILD.gn | 9 +- test/fuzztest/addslotbytype_fuzzer/BUILD.gn | 9 +- .../cancelnotification_fuzzer/BUILD.gn | 9 +- .../getnotificationslot_fuzzer/BUILD.gn | 9 +- .../getnotificationslotgroup_fuzzer/BUILD.gn | 9 +- .../BUILD.gn | 9 +- .../publishnotification_fuzzer/BUILD.gn | 9 +- .../removenotification_fuzzer/BUILD.gn | 9 +- .../removenotificationslot_fuzzer/BUILD.gn | 9 +- .../BUILD.gn | 9 +- .../setnotificationbadgenum_fuzzer/BUILD.gn | 9 +- test/resource/ansSTSlotGroupTest/BUILD.gn | 12 +- test/systemtest/acts/ansDump/BUILD.gn | 6 +- tools/BUILD.gn | 2 +- tools/dump/BUILD.gn | 8 +- .../dump/include/notification_shell_command.h | 6 +- tools/dump/include/shell_command.h | 6 +- 248 files changed, 1125 insertions(+), 1162 deletions(-) delete mode 100644 frameworks/BUILD.gn rename frameworks/ans/{native => }/BUILD.gn (88%) delete mode 100644 frameworks/ans/core/BUILD.gn rename frameworks/ans/{native => }/src/enabled_notification_callback_data.cpp (100%) rename frameworks/ans/{native => }/src/message_user.cpp (100%) rename frameworks/ans/{native => }/src/notification.cpp (100%) rename frameworks/ans/{native => }/src/notification_action_button.cpp (100%) rename frameworks/ans/{native => }/src/notification_basic_content.cpp (100%) rename frameworks/ans/{native => }/src/notification_bundle_option.cpp (100%) rename frameworks/ans/{native => }/src/notification_constant.cpp (100%) rename frameworks/ans/{native => }/src/notification_content.cpp (100%) rename frameworks/ans/{native => }/src/notification_conversational_content.cpp (100%) rename frameworks/ans/{native => }/src/notification_conversational_message.cpp (100%) rename frameworks/ans/{native => }/src/notification_distributed_options.cpp (100%) rename frameworks/ans/{native => }/src/notification_do_not_disturb_date.cpp (100%) rename frameworks/ans/{native => }/src/notification_flags.cpp (100%) rename frameworks/ans/{native => }/src/notification_helper.cpp (100%) rename frameworks/ans/{native => }/src/notification_long_text_content.cpp (100%) rename frameworks/ans/{native => }/src/notification_media_content.cpp (100%) rename frameworks/ans/{native => }/src/notification_multiline_content.cpp (100%) rename frameworks/ans/{native => }/src/notification_normal_content.cpp (100%) rename frameworks/ans/{native => }/src/notification_picture_content.cpp (100%) rename frameworks/ans/{native => }/src/notification_request.cpp (100%) rename frameworks/ans/{native => }/src/notification_slot.cpp (100%) rename frameworks/ans/{native => }/src/notification_slot_group.cpp (100%) rename frameworks/ans/{native => }/src/notification_sorting.cpp (100%) rename frameworks/ans/{native => }/src/notification_sorting_map.cpp (100%) rename frameworks/ans/{native => }/src/notification_subscribe_info.cpp (100%) rename frameworks/ans/{native => }/src/notification_subscriber.cpp (98%) rename frameworks/ans/{native => }/src/notification_template.cpp (100%) rename frameworks/ans/{native => }/src/notification_user_input.cpp (100%) rename frameworks/ans/{native => }/src/reminder_helper.cpp (100%) rename frameworks/ans/{native => }/src/reminder_request.cpp (100%) rename frameworks/ans/{native => }/src/reminder_request_alarm.cpp (100%) rename frameworks/ans/{native => }/src/reminder_request_calendar.cpp (100%) rename frameworks/ans/{native => }/src/reminder_request_timer.cpp (100%) rename frameworks/ans/{native => }/src/reminder_store.cpp (100%) rename frameworks/ans/{native => }/test/unittest/BUILD.gn (76%) rename frameworks/ans/{native => }/test/unittest/reminder_request_alarm_test.cpp (100%) rename frameworks/ans/{native => }/test/unittest/reminder_request_calendar_test.cpp (100%) rename frameworks/ans/{native => }/test/unittest/reminder_request_test.cpp (100%) rename frameworks/ans/{native => }/test/unittest/reminder_request_timer_test.cpp (100%) create mode 100644 frameworks/core/BUILD.gn rename frameworks/{ans => }/core/common/include/ans_const_define.h (100%) rename frameworks/{ans => }/core/common/include/ans_inner_errors.h (100%) rename frameworks/{ans => }/core/common/include/ans_log_wrapper.h (98%) rename frameworks/{ans => }/core/common/include/ans_permission_def.h (100%) rename frameworks/{ans => }/core/common/include/ans_watchdog.h (100%) rename frameworks/{ans => }/core/common/src/ans_log_wrapper.cpp (100%) rename frameworks/{ans => }/core/common/src/ans_watchdog.cpp (100%) rename frameworks/{ans => }/core/include/ans_image_util.h (100%) rename frameworks/{ans => }/core/include/ans_manager_death_recipient.h (100%) rename frameworks/{ans => }/core/include/ans_manager_interface.h (98%) rename frameworks/{ans => }/core/include/ans_manager_proxy.h (98%) rename frameworks/{ans => }/core/include/ans_manager_stub.h (99%) rename frameworks/{ans => }/core/include/ans_notification.h (99%) rename frameworks/{ans => }/core/include/ans_subscriber_interface.h (93%) rename frameworks/{ans => }/core/include/ans_subscriber_proxy.h (98%) rename frameworks/{ans => }/core/include/ans_subscriber_stub.h (98%) rename frameworks/{ans => }/core/src/ans_image_util.cpp (100%) rename frameworks/{ans => }/core/src/ans_manager_death_recipient.cpp (100%) rename frameworks/{ans => }/core/src/ans_manager_proxy.cpp (99%) rename frameworks/{ans => }/core/src/ans_manager_stub.cpp (99%) rename frameworks/{ans => }/core/src/ans_notification.cpp (99%) rename frameworks/{ans => }/core/src/ans_subscriber_proxy.cpp (99%) rename frameworks/{ans => }/core/src/ans_subscriber_stub.cpp (97%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/BUILD.gn (84%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/ans_template.h (74%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/cancel.h (77%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/common.h (99%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/constant.h (83%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/display_badge.h (74%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/distributed.h (80%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/disturb_mode.h (76%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/enable_notification.h (76%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/get_active.h (76%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/init.h (81%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/publish.h (76%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/reminder/native_module.h (76%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/reminder/publish.h (87%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/reminder/reminder_common.h (93%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/remove.h (78%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/slot.h (84%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/subscribe.h (95%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/include/unsubscribe.h (73%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/ans_template.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/cancel.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/common.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/constant.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/display_badge.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/distributed.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/disturb_mode.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/enable_notification.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/get_active.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/init.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/publish.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/reminder/BUILD.gn (87%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/reminder/native_module.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/reminder/publish.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/reminder/reminder_common.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/remove.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/slot.cpp (98%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/subscribe.cpp (100%) rename {interfaces/kits/napi/ans => frameworks/js/napi}/src/unsubscribe.cpp (100%) rename frameworks/{ans => }/test/moduletest/BUILD.gn (76%) rename frameworks/{ans => }/test/moduletest/ReminderHelperTest.js (100%) rename frameworks/{ans => }/test/moduletest/ans_fw_module_test.cpp (97%) rename frameworks/{ans => }/test/moduletest/ans_innerkits_module_publish_test.cpp (97%) rename frameworks/{ans => }/test/moduletest/ans_innerkits_module_setting_test.cpp (90%) rename frameworks/{ans => }/test/moduletest/ans_innerkits_module_slot_test.cpp (95%) rename frameworks/{ans => }/test/moduletest/config.json (100%) rename frameworks/{ans => }/test/moduletest/mock/blob.cpp (100%) rename frameworks/{ans => }/test/moduletest/mock/distributed_kv_data_manager.cpp (93%) rename frameworks/{ans => }/test/moduletest/mock/include/mock_bundle_manager.h (99%) rename frameworks/{ans => }/test/moduletest/mock/include/mock_ipc_skeleton.h (95%) rename frameworks/{ans => }/test/moduletest/mock/include/mock_single_kv_store.h (98%) rename frameworks/{ans => }/test/moduletest/mock/mock_accesstoken_kit.cpp (100%) rename frameworks/{ans => }/test/moduletest/mock/mock_bundle_manager.cpp (88%) rename frameworks/{ans => }/test/moduletest/mock/mock_bundle_manager_helper.cpp (100%) rename frameworks/{ans => }/test/moduletest/mock/mock_bundle_mgr_proxy.cpp (100%) rename frameworks/{ans => }/test/moduletest/mock/mock_change_notification.cpp (100%) rename frameworks/{ans => }/test/moduletest/mock/mock_common_event_data.cpp (100%) rename frameworks/{ans => }/test/moduletest/mock/mock_common_event_manager.cpp (100%) rename frameworks/{ans => }/test/moduletest/mock/mock_event_handler.cpp (100%) rename frameworks/{ans => }/test/moduletest/mock/mock_ipc.cpp (87%) rename frameworks/{ans => }/test/moduletest/mock/mock_message_parcel.cpp (100%) rename frameworks/{ans => }/test/moduletest/mock/mock_single_kv_store.cpp (60%) delete mode 100644 interfaces/BUILD.gn rename interfaces/{innerkits/ans/native/include => inner_api}/enabled_notification_callback_data.h (88%) rename interfaces/{innerkits/ans/native/include => inner_api}/message_user.h (94%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification.h (97%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_action_button.h (97%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_basic_content.h (91%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_bundle_option.h (89%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_constant.h (95%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_content.h (96%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_conversational_content.h (94%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_conversational_message.h (93%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_distributed_options.h (92%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_do_not_disturb_date.h (91%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_flags.h (90%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_helper.h (99%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_json_convert.h (92%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_long_text_content.h (93%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_media_content.h (93%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_multiline_content.h (93%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_normal_content.h (86%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_picture_content.h (93%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_request.h (99%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_slot.h (98%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_slot_group.h (94%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_sorting.h (94%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_sorting_map.h (89%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_subscribe_info.h (90%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_subscriber.h (93%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_template.h (88%) rename interfaces/{innerkits/ans/native/include => inner_api}/notification_user_input.h (97%) rename interfaces/{innerkits/ans/native/include => inner_api}/reminder_helper.h (94%) rename interfaces/{innerkits/ans/native/include => inner_api}/reminder_request.h (98%) rename interfaces/{innerkits/ans/native/include => inner_api}/reminder_request_alarm.h (94%) rename interfaces/{innerkits/ans/native/include => inner_api}/reminder_request_calendar.h (95%) rename interfaces/{innerkits/ans/native/include => inner_api}/reminder_request_timer.h (90%) rename interfaces/{innerkits/ans/native/include => inner_api}/reminder_store.h (90%) rename {frameworks/ans => services}/dialog/dialog_ui/js/BUILD.gn (79%) rename {frameworks/ans => services}/dialog/dialog_ui/js/common/.gitkeep (100%) rename {frameworks/ans => services}/dialog/dialog_ui/js/i18n/en-US.json (100%) rename {frameworks/ans => services}/dialog/dialog_ui/js/i18n/zh-CN.json (100%) rename {frameworks/ans => services}/dialog/dialog_ui/js/pages/index/index.css (100%) rename {frameworks/ans => services}/dialog/dialog_ui/js/pages/index/index.hml (100%) rename {frameworks/ans => services}/dialog/dialog_ui/js/pages/index/index.js (100%) delete mode 100644 services/distributed/test/unittest/mock/ans_test_single_kv_store.cpp create mode 100644 services/distributed/test/unittest/mock/mock_single_kv_store.cpp rename services/distributed/test/unittest/mock/{ans_test_single_kv_store.h => mock_single_kv_store.h} (99%) diff --git a/README_zh.md b/README_zh.md index a4899d52..6e80b850 100644 --- a/README_zh.md +++ b/README_zh.md @@ -17,7 +17,7 @@ OpenHarmony通过ANS(Advanced Notification Service,通知系统服务)对 ## 目录 ``` -/base/notification/ans_standard/ +/base/notification/distributed_notification_service/ ├── frameworks # 接口实现 ├── interfaces │ ├── innerkits # 对内接口目录 diff --git a/bundle.json b/bundle.json index c72a2822..dcba3a97 100644 --- a/bundle.json +++ b/bundle.json @@ -15,7 +15,8 @@ ], "keywords": [ "notification", - "ans" + "ans", + "distributed_notification_service" ], "envs": [], "dirs": [], @@ -32,10 +33,10 @@ } ], "segment": { - "destPath": "base/notification/ans_standard" + "destPath": "base/notification/distributed_notification_service" }, "component": { - "name": "ans_standard", + "name": "distributed_notification_service", "subsystem": "notification", "syscap": [ "SystemCapability.Notification.Notification", @@ -74,22 +75,23 @@ }, "build": { "sub_component": [ - "//base/notification/ans_standard/frameworks:frameworks_target", - "//base/notification/ans_standard/interfaces:interfaces_target", - "//base/notification/ans_standard/sa_profile:ans_sa_profile", - "//base/notification/ans_standard/services:services_target", - "//base/notification/ans_standard/tools:tools_target" + "//base/notification/distributed_notification_service/frameworks/ans:ans_client", + "//base/notification/distributed_notification_service/frameworks/core:ans_core", + "//base/notification/distributed_notification_service/frameworks/js/napi:napi_notification", + "//base/notification/distributed_notification_service/frameworks/js/napi:napi_reminder", + "//base/notification/distributed_notification_service/sa_profile:ans_sa_profile", + "//base/notification/distributed_notification_service/services:ans_service", + "//base/notification/distributed_notification_service/tools:tools_shell" ], - "inner_kits": [], "test": [ - "//base/notification/ans_standard/services/ans/test/unittest:ans_unit_test", - "//base/notification/ans_standard/services/distributed/test/unittest:ans_distributed_unit_test_target", - "//base/notification/ans_standard/services/test/moduletest:moduletest", - "//base/notification/ans_standard/frameworks/ans/test/moduletest:moduletest", - "//base/notification/ans_standard/frameworks/ans/native/test/unittest:unittest", - "//base/notification/ans_standard/test:systemtest", - "//base/notification/ans_standard/test/bechmarktest:benchmarktest", - "//base/notification/ans_standard/test/fuzztest:fuzztest" + "//base/notification/distributed_notification_service/services/ans/test/unittest:ans_unit_test", + "//base/notification/distributed_notification_service/services/distributed/test/unittest:ans_unit_test", + "//base/notification/distributed_notification_service/services/test/moduletest:moduletest", + "//base/notification/distributed_notification_service/frameworks/test/moduletest:moduletest", + "//base/notification/distributed_notification_service/frameworks/ans/test/unittest:unittest", + "//base/notification/distributed_notification_service/test:systemtest", + "//base/notification/distributed_notification_service/test/bechmarktest:benchmarktest", + "//base/notification/distributed_notification_service/test/fuzztest:fuzztest" ] } } diff --git a/frameworks/BUILD.gn b/frameworks/BUILD.gn deleted file mode 100644 index a923cf46..00000000 --- a/frameworks/BUILD.gn +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2021 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. - -group("frameworks_target") { - deps = [ - "ans/core:ans_core_target", - "ans/native:native_targets", - ] -} diff --git a/frameworks/ans/native/BUILD.gn b/frameworks/ans/BUILD.gn similarity index 88% rename from frameworks/ans/native/BUILD.gn rename to frameworks/ans/BUILD.gn index 0f128fa6..2b022314 100644 --- a/frameworks/ans/native/BUILD.gn +++ b/frameworks/ans/BUILD.gn @@ -11,10 +11,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") -group("native_targets") { +group("ans_client") { deps = [ ":ans_innerkits" ] } @@ -22,9 +22,9 @@ config("ans_innerkits_public_config") { visibility = [ ":*" ] include_dirs = [ - "${interfaces_path}/innerkits/ans/native/include", - "${frameworks_path}/ans/core/common/include", - "${frameworks_path}/ans/core/include", + "${inner_api_path}", + "${core_path}/common/include", + "${core_path}/include", "//third_party/json/single_include", "//third_party/jsoncpp/include", "//utils/system/safwk/native/include", @@ -37,7 +37,7 @@ config("ans_innerkits_public_config") { ohos_shared_library("ans_innerkits") { include_dirs = [ - "${interfaces_path}/innerkits/ans/native/include", + "${inner_api_path}", "//utils/system/safwk/native/include", "//third_party/jsoncpp/include", ] @@ -81,7 +81,7 @@ ohos_shared_library("ans_innerkits") { public_configs = [ ":ans_innerkits_public_config" ] deps = [ - "${frameworks_path}/ans/core:ans_core", + "${core_path}:ans_core", "//third_party/jsoncpp:jsoncpp", "//utils/native/base:utils", ] @@ -101,6 +101,6 @@ ohos_shared_library("ans_innerkits") { cflags = [ "-DCONFIG_DUAL_FRAMEWORK" ] } - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } diff --git a/frameworks/ans/core/BUILD.gn b/frameworks/ans/core/BUILD.gn deleted file mode 100644 index 718c3916..00000000 --- a/frameworks/ans/core/BUILD.gn +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright (c) 2021-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/notification/ans_standard/notification.gni") -import("//build/ohos.gni") - -group("ans_core_target") { - deps = [ ":ans_core" ] -} - -config("private_config") { - include_dirs = [ "//utils/system/safwk/native/include" ] -} - -config("public_ans_core_config") { - include_dirs = [ - "${core_path}/common/include", - "${core_path}/include", - "${interfaces_path}/innerkits/ans/native/include", - - "//utils/native/base/include", - "//third_party/json/single_include", - "//third_party/jsoncpp/include", - ] -} - -ohos_shared_library("ans_core") { - sources = [ - "${core_path}/common/src/ans_log_wrapper.cpp", - "${core_path}/common/src/ans_watchdog.cpp", - "${core_path}/src/ans_image_util.cpp", - "${core_path}/src/ans_manager_death_recipient.cpp", - "${core_path}/src/ans_manager_proxy.cpp", - "${core_path}/src/ans_manager_stub.cpp", - "${core_path}/src/ans_notification.cpp", - "${core_path}/src/ans_subscriber_proxy.cpp", - "${core_path}/src/ans_subscriber_stub.cpp", - "${frameworks_path}/ans/native/src/enabled_notification_callback_data.cpp", - "${frameworks_path}/ans/native/src/message_user.cpp", - "${frameworks_path}/ans/native/src/notification.cpp", - "${frameworks_path}/ans/native/src/notification_action_button.cpp", - "${frameworks_path}/ans/native/src/notification_basic_content.cpp", - "${frameworks_path}/ans/native/src/notification_bundle_option.cpp", - "${frameworks_path}/ans/native/src/notification_constant.cpp", - "${frameworks_path}/ans/native/src/notification_content.cpp", - "${frameworks_path}/ans/native/src/notification_conversational_content.cpp", - "${frameworks_path}/ans/native/src/notification_conversational_message.cpp", - "${frameworks_path}/ans/native/src/notification_distributed_options.cpp", - "${frameworks_path}/ans/native/src/notification_do_not_disturb_date.cpp", - "${frameworks_path}/ans/native/src/notification_flags.cpp", - "${frameworks_path}/ans/native/src/notification_helper.cpp", - "${frameworks_path}/ans/native/src/notification_long_text_content.cpp", - "${frameworks_path}/ans/native/src/notification_media_content.cpp", - "${frameworks_path}/ans/native/src/notification_multiline_content.cpp", - "${frameworks_path}/ans/native/src/notification_normal_content.cpp", - "${frameworks_path}/ans/native/src/notification_picture_content.cpp", - "${frameworks_path}/ans/native/src/notification_request.cpp", - "${frameworks_path}/ans/native/src/notification_slot.cpp", - "${frameworks_path}/ans/native/src/notification_slot_group.cpp", - "${frameworks_path}/ans/native/src/notification_sorting.cpp", - "${frameworks_path}/ans/native/src/notification_sorting_map.cpp", - "${frameworks_path}/ans/native/src/notification_subscribe_info.cpp", - "${frameworks_path}/ans/native/src/notification_subscriber.cpp", - "${frameworks_path}/ans/native/src/notification_template.cpp", - "${frameworks_path}/ans/native/src/notification_user_input.cpp", - "${frameworks_path}/ans/native/src/reminder_helper.cpp", - "${frameworks_path}/ans/native/src/reminder_request.cpp", - "${frameworks_path}/ans/native/src/reminder_request_alarm.cpp", - "${frameworks_path}/ans/native/src/reminder_request_calendar.cpp", - "${frameworks_path}/ans/native/src/reminder_request_timer.cpp", - "${frameworks_path}/ans/native/src/reminder_store.cpp", - ] - - configs = [ ":private_config" ] - - public_configs = [ ":public_ans_core_config" ] - - deps = [ - "//third_party/jsoncpp:jsoncpp", - "//utils/native/base:utils", - ] - - external_deps = [ - "ability_base:want", - "ability_base:zuri", - "ability_runtime:wantagent_innerkits", - "bundle_framework:appexecfwk_base", - "eventhandler:libeventhandler", - "hicollie_native:libhicollie", - "hiviewdfx_hilog_native:libhilog", - "ipc:ipc_core", - "multimedia_image_standard:image_native", - "os_account:os_account_innerkits", - "relational_store:native_rdb", - "samgr_standard:samgr_proxy", - "time_native:time_service", - ] - - part_name = "ans_standard" - subsystem_name = "notification" -} diff --git a/frameworks/ans/native/src/enabled_notification_callback_data.cpp b/frameworks/ans/src/enabled_notification_callback_data.cpp similarity index 100% rename from frameworks/ans/native/src/enabled_notification_callback_data.cpp rename to frameworks/ans/src/enabled_notification_callback_data.cpp diff --git a/frameworks/ans/native/src/message_user.cpp b/frameworks/ans/src/message_user.cpp similarity index 100% rename from frameworks/ans/native/src/message_user.cpp rename to frameworks/ans/src/message_user.cpp diff --git a/frameworks/ans/native/src/notification.cpp b/frameworks/ans/src/notification.cpp similarity index 100% rename from frameworks/ans/native/src/notification.cpp rename to frameworks/ans/src/notification.cpp diff --git a/frameworks/ans/native/src/notification_action_button.cpp b/frameworks/ans/src/notification_action_button.cpp similarity index 100% rename from frameworks/ans/native/src/notification_action_button.cpp rename to frameworks/ans/src/notification_action_button.cpp diff --git a/frameworks/ans/native/src/notification_basic_content.cpp b/frameworks/ans/src/notification_basic_content.cpp similarity index 100% rename from frameworks/ans/native/src/notification_basic_content.cpp rename to frameworks/ans/src/notification_basic_content.cpp diff --git a/frameworks/ans/native/src/notification_bundle_option.cpp b/frameworks/ans/src/notification_bundle_option.cpp similarity index 100% rename from frameworks/ans/native/src/notification_bundle_option.cpp rename to frameworks/ans/src/notification_bundle_option.cpp diff --git a/frameworks/ans/native/src/notification_constant.cpp b/frameworks/ans/src/notification_constant.cpp similarity index 100% rename from frameworks/ans/native/src/notification_constant.cpp rename to frameworks/ans/src/notification_constant.cpp diff --git a/frameworks/ans/native/src/notification_content.cpp b/frameworks/ans/src/notification_content.cpp similarity index 100% rename from frameworks/ans/native/src/notification_content.cpp rename to frameworks/ans/src/notification_content.cpp diff --git a/frameworks/ans/native/src/notification_conversational_content.cpp b/frameworks/ans/src/notification_conversational_content.cpp similarity index 100% rename from frameworks/ans/native/src/notification_conversational_content.cpp rename to frameworks/ans/src/notification_conversational_content.cpp diff --git a/frameworks/ans/native/src/notification_conversational_message.cpp b/frameworks/ans/src/notification_conversational_message.cpp similarity index 100% rename from frameworks/ans/native/src/notification_conversational_message.cpp rename to frameworks/ans/src/notification_conversational_message.cpp diff --git a/frameworks/ans/native/src/notification_distributed_options.cpp b/frameworks/ans/src/notification_distributed_options.cpp similarity index 100% rename from frameworks/ans/native/src/notification_distributed_options.cpp rename to frameworks/ans/src/notification_distributed_options.cpp diff --git a/frameworks/ans/native/src/notification_do_not_disturb_date.cpp b/frameworks/ans/src/notification_do_not_disturb_date.cpp similarity index 100% rename from frameworks/ans/native/src/notification_do_not_disturb_date.cpp rename to frameworks/ans/src/notification_do_not_disturb_date.cpp diff --git a/frameworks/ans/native/src/notification_flags.cpp b/frameworks/ans/src/notification_flags.cpp similarity index 100% rename from frameworks/ans/native/src/notification_flags.cpp rename to frameworks/ans/src/notification_flags.cpp diff --git a/frameworks/ans/native/src/notification_helper.cpp b/frameworks/ans/src/notification_helper.cpp similarity index 100% rename from frameworks/ans/native/src/notification_helper.cpp rename to frameworks/ans/src/notification_helper.cpp diff --git a/frameworks/ans/native/src/notification_long_text_content.cpp b/frameworks/ans/src/notification_long_text_content.cpp similarity index 100% rename from frameworks/ans/native/src/notification_long_text_content.cpp rename to frameworks/ans/src/notification_long_text_content.cpp diff --git a/frameworks/ans/native/src/notification_media_content.cpp b/frameworks/ans/src/notification_media_content.cpp similarity index 100% rename from frameworks/ans/native/src/notification_media_content.cpp rename to frameworks/ans/src/notification_media_content.cpp diff --git a/frameworks/ans/native/src/notification_multiline_content.cpp b/frameworks/ans/src/notification_multiline_content.cpp similarity index 100% rename from frameworks/ans/native/src/notification_multiline_content.cpp rename to frameworks/ans/src/notification_multiline_content.cpp diff --git a/frameworks/ans/native/src/notification_normal_content.cpp b/frameworks/ans/src/notification_normal_content.cpp similarity index 100% rename from frameworks/ans/native/src/notification_normal_content.cpp rename to frameworks/ans/src/notification_normal_content.cpp diff --git a/frameworks/ans/native/src/notification_picture_content.cpp b/frameworks/ans/src/notification_picture_content.cpp similarity index 100% rename from frameworks/ans/native/src/notification_picture_content.cpp rename to frameworks/ans/src/notification_picture_content.cpp diff --git a/frameworks/ans/native/src/notification_request.cpp b/frameworks/ans/src/notification_request.cpp similarity index 100% rename from frameworks/ans/native/src/notification_request.cpp rename to frameworks/ans/src/notification_request.cpp diff --git a/frameworks/ans/native/src/notification_slot.cpp b/frameworks/ans/src/notification_slot.cpp similarity index 100% rename from frameworks/ans/native/src/notification_slot.cpp rename to frameworks/ans/src/notification_slot.cpp diff --git a/frameworks/ans/native/src/notification_slot_group.cpp b/frameworks/ans/src/notification_slot_group.cpp similarity index 100% rename from frameworks/ans/native/src/notification_slot_group.cpp rename to frameworks/ans/src/notification_slot_group.cpp diff --git a/frameworks/ans/native/src/notification_sorting.cpp b/frameworks/ans/src/notification_sorting.cpp similarity index 100% rename from frameworks/ans/native/src/notification_sorting.cpp rename to frameworks/ans/src/notification_sorting.cpp diff --git a/frameworks/ans/native/src/notification_sorting_map.cpp b/frameworks/ans/src/notification_sorting_map.cpp similarity index 100% rename from frameworks/ans/native/src/notification_sorting_map.cpp rename to frameworks/ans/src/notification_sorting_map.cpp diff --git a/frameworks/ans/native/src/notification_subscribe_info.cpp b/frameworks/ans/src/notification_subscribe_info.cpp similarity index 100% rename from frameworks/ans/native/src/notification_subscribe_info.cpp rename to frameworks/ans/src/notification_subscribe_info.cpp diff --git a/frameworks/ans/native/src/notification_subscriber.cpp b/frameworks/ans/src/notification_subscriber.cpp similarity index 98% rename from frameworks/ans/native/src/notification_subscriber.cpp rename to frameworks/ans/src/notification_subscriber.cpp index e77d7add..2f521439 100644 --- a/frameworks/ans/native/src/notification_subscriber.cpp +++ b/frameworks/ans/src/notification_subscriber.cpp @@ -114,7 +114,7 @@ bool NotificationSubscriber::SubscriberImpl::GetAnsManagerProxy() return false; } - proxy_ = iface_cast(remoteObject); + proxy_ = iface_cast(remoteObject); if ((proxy_ == nullptr) || (proxy_->AsObject() == nullptr)) { return false; } diff --git a/frameworks/ans/native/src/notification_template.cpp b/frameworks/ans/src/notification_template.cpp similarity index 100% rename from frameworks/ans/native/src/notification_template.cpp rename to frameworks/ans/src/notification_template.cpp diff --git a/frameworks/ans/native/src/notification_user_input.cpp b/frameworks/ans/src/notification_user_input.cpp similarity index 100% rename from frameworks/ans/native/src/notification_user_input.cpp rename to frameworks/ans/src/notification_user_input.cpp diff --git a/frameworks/ans/native/src/reminder_helper.cpp b/frameworks/ans/src/reminder_helper.cpp similarity index 100% rename from frameworks/ans/native/src/reminder_helper.cpp rename to frameworks/ans/src/reminder_helper.cpp diff --git a/frameworks/ans/native/src/reminder_request.cpp b/frameworks/ans/src/reminder_request.cpp similarity index 100% rename from frameworks/ans/native/src/reminder_request.cpp rename to frameworks/ans/src/reminder_request.cpp diff --git a/frameworks/ans/native/src/reminder_request_alarm.cpp b/frameworks/ans/src/reminder_request_alarm.cpp similarity index 100% rename from frameworks/ans/native/src/reminder_request_alarm.cpp rename to frameworks/ans/src/reminder_request_alarm.cpp diff --git a/frameworks/ans/native/src/reminder_request_calendar.cpp b/frameworks/ans/src/reminder_request_calendar.cpp similarity index 100% rename from frameworks/ans/native/src/reminder_request_calendar.cpp rename to frameworks/ans/src/reminder_request_calendar.cpp diff --git a/frameworks/ans/native/src/reminder_request_timer.cpp b/frameworks/ans/src/reminder_request_timer.cpp similarity index 100% rename from frameworks/ans/native/src/reminder_request_timer.cpp rename to frameworks/ans/src/reminder_request_timer.cpp diff --git a/frameworks/ans/native/src/reminder_store.cpp b/frameworks/ans/src/reminder_store.cpp similarity index 100% rename from frameworks/ans/native/src/reminder_store.cpp rename to frameworks/ans/src/reminder_store.cpp diff --git a/frameworks/ans/native/test/unittest/BUILD.gn b/frameworks/ans/test/unittest/BUILD.gn similarity index 76% rename from frameworks/ans/native/test/unittest/BUILD.gn rename to frameworks/ans/test/unittest/BUILD.gn index e6838ce0..8d52837a 100644 --- a/frameworks/ans/native/test/unittest/BUILD.gn +++ b/frameworks/ans/test/unittest/BUILD.gn @@ -11,11 +11,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "ans_standard/unittest" +module_output_path = "${component_name}/unittest" config("exception") { cflags_cc = [ "-fexceptions" ] @@ -34,10 +34,10 @@ ohos_unittest("ans_reminder_unit_test") { ] sources = [ - "${native_path}/test/unittest/reminder_request_alarm_test.cpp", - "${native_path}/test/unittest/reminder_request_calendar_test.cpp", - "${native_path}/test/unittest/reminder_request_test.cpp", - "${native_path}/test/unittest/reminder_request_timer_test.cpp", + "${frameworks_module_ans_path}/test/unittest/reminder_request_alarm_test.cpp", + "${frameworks_module_ans_path}/test/unittest/reminder_request_calendar_test.cpp", + "${frameworks_module_ans_path}/test/unittest/reminder_request_test.cpp", + "${frameworks_module_ans_path}/test/unittest/reminder_request_timer_test.cpp", ] configs = [ @@ -47,7 +47,7 @@ ohos_unittest("ans_reminder_unit_test") { deps = [ "${core_path}:ans_core", - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] @@ -70,8 +70,8 @@ ohos_unittest("ans_reminder_unit_test") { "samgr_standard:samgr_proxy", ] - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } group("unittest") { diff --git a/frameworks/ans/native/test/unittest/reminder_request_alarm_test.cpp b/frameworks/ans/test/unittest/reminder_request_alarm_test.cpp similarity index 100% rename from frameworks/ans/native/test/unittest/reminder_request_alarm_test.cpp rename to frameworks/ans/test/unittest/reminder_request_alarm_test.cpp diff --git a/frameworks/ans/native/test/unittest/reminder_request_calendar_test.cpp b/frameworks/ans/test/unittest/reminder_request_calendar_test.cpp similarity index 100% rename from frameworks/ans/native/test/unittest/reminder_request_calendar_test.cpp rename to frameworks/ans/test/unittest/reminder_request_calendar_test.cpp diff --git a/frameworks/ans/native/test/unittest/reminder_request_test.cpp b/frameworks/ans/test/unittest/reminder_request_test.cpp similarity index 100% rename from frameworks/ans/native/test/unittest/reminder_request_test.cpp rename to frameworks/ans/test/unittest/reminder_request_test.cpp diff --git a/frameworks/ans/native/test/unittest/reminder_request_timer_test.cpp b/frameworks/ans/test/unittest/reminder_request_timer_test.cpp similarity index 100% rename from frameworks/ans/native/test/unittest/reminder_request_timer_test.cpp rename to frameworks/ans/test/unittest/reminder_request_timer_test.cpp diff --git a/frameworks/core/BUILD.gn b/frameworks/core/BUILD.gn new file mode 100644 index 00000000..c85c3f36 --- /dev/null +++ b/frameworks/core/BUILD.gn @@ -0,0 +1,106 @@ +# Copyright (c) 2021-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/notification/distributed_notification_service/notification.gni") +import("//build/ohos.gni") + +config("private_config") { + include_dirs = [ "//utils/system/safwk/native/include" ] +} + +config("public_ans_core_config") { + include_dirs = [ + "${core_path}/common/include", + "${core_path}/include", + "${inner_api_path}", + + "//utils/native/base/include", + "//third_party/json/single_include", + "//third_party/jsoncpp/include", + ] +} + +ohos_shared_library("ans_core") { + sources = [ + "${core_path}/common/src/ans_log_wrapper.cpp", + "${core_path}/common/src/ans_watchdog.cpp", + "${core_path}/src/ans_image_util.cpp", + "${core_path}/src/ans_manager_death_recipient.cpp", + "${core_path}/src/ans_manager_proxy.cpp", + "${core_path}/src/ans_manager_stub.cpp", + "${core_path}/src/ans_notification.cpp", + "${core_path}/src/ans_subscriber_proxy.cpp", + "${core_path}/src/ans_subscriber_stub.cpp", + "${frameworks_module_ans_path}/src/enabled_notification_callback_data.cpp", + "${frameworks_module_ans_path}/src/message_user.cpp", + "${frameworks_module_ans_path}/src/notification.cpp", + "${frameworks_module_ans_path}/src/notification_action_button.cpp", + "${frameworks_module_ans_path}/src/notification_basic_content.cpp", + "${frameworks_module_ans_path}/src/notification_bundle_option.cpp", + "${frameworks_module_ans_path}/src/notification_constant.cpp", + "${frameworks_module_ans_path}/src/notification_content.cpp", + "${frameworks_module_ans_path}/src/notification_conversational_content.cpp", + "${frameworks_module_ans_path}/src/notification_conversational_message.cpp", + "${frameworks_module_ans_path}/src/notification_distributed_options.cpp", + "${frameworks_module_ans_path}/src/notification_do_not_disturb_date.cpp", + "${frameworks_module_ans_path}/src/notification_flags.cpp", + "${frameworks_module_ans_path}/src/notification_helper.cpp", + "${frameworks_module_ans_path}/src/notification_long_text_content.cpp", + "${frameworks_module_ans_path}/src/notification_media_content.cpp", + "${frameworks_module_ans_path}/src/notification_multiline_content.cpp", + "${frameworks_module_ans_path}/src/notification_normal_content.cpp", + "${frameworks_module_ans_path}/src/notification_picture_content.cpp", + "${frameworks_module_ans_path}/src/notification_request.cpp", + "${frameworks_module_ans_path}/src/notification_slot.cpp", + "${frameworks_module_ans_path}/src/notification_slot_group.cpp", + "${frameworks_module_ans_path}/src/notification_sorting.cpp", + "${frameworks_module_ans_path}/src/notification_sorting_map.cpp", + "${frameworks_module_ans_path}/src/notification_subscribe_info.cpp", + "${frameworks_module_ans_path}/src/notification_subscriber.cpp", + "${frameworks_module_ans_path}/src/notification_template.cpp", + "${frameworks_module_ans_path}/src/notification_user_input.cpp", + "${frameworks_module_ans_path}/src/reminder_helper.cpp", + "${frameworks_module_ans_path}/src/reminder_request.cpp", + "${frameworks_module_ans_path}/src/reminder_request_alarm.cpp", + "${frameworks_module_ans_path}/src/reminder_request_calendar.cpp", + "${frameworks_module_ans_path}/src/reminder_request_timer.cpp", + "${frameworks_module_ans_path}/src/reminder_store.cpp", + ] + + configs = [ ":private_config" ] + + public_configs = [ ":public_ans_core_config" ] + + deps = [ + "//third_party/jsoncpp:jsoncpp", + "//utils/native/base:utils", + ] + + external_deps = [ + "ability_base:want", + "ability_base:zuri", + "ability_runtime:wantagent_innerkits", + "bundle_framework:appexecfwk_base", + "eventhandler:libeventhandler", + "hicollie_native:libhicollie", + "hiviewdfx_hilog_native:libhilog", + "ipc:ipc_core", + "multimedia_image_standard:image_native", + "os_account:os_account_innerkits", + "relational_store:native_rdb", + "samgr_standard:samgr_proxy", + "time_native:time_service", + ] + + part_name = "${component_name}" + subsystem_name = "${subsystem_name}" +} diff --git a/frameworks/ans/core/common/include/ans_const_define.h b/frameworks/core/common/include/ans_const_define.h similarity index 100% rename from frameworks/ans/core/common/include/ans_const_define.h rename to frameworks/core/common/include/ans_const_define.h diff --git a/frameworks/ans/core/common/include/ans_inner_errors.h b/frameworks/core/common/include/ans_inner_errors.h similarity index 100% rename from frameworks/ans/core/common/include/ans_inner_errors.h rename to frameworks/core/common/include/ans_inner_errors.h diff --git a/frameworks/ans/core/common/include/ans_log_wrapper.h b/frameworks/core/common/include/ans_log_wrapper.h similarity index 98% rename from frameworks/ans/core/common/include/ans_log_wrapper.h rename to frameworks/core/common/include/ans_log_wrapper.h index 720de8d6..8449eda9 100644 --- a/frameworks/ans/core/common/include/ans_log_wrapper.h +++ b/frameworks/core/common/include/ans_log_wrapper.h @@ -27,12 +27,12 @@ namespace Notification { #endif #ifndef ANS_LOG_TAG -#define ANS_LOG_TAG NULL +#define ANS_LOG_TAG "NOTIFICATION" #endif enum class AnsLogLevel : uint8_t { DEBUG = 0, INFO, WARN, ERROR, FATAL }; -static constexpr OHOS::HiviewDFX::HiLogLabel ANS_LABEL = {LOG_CORE, LOG_DOMAIN, "ANS_STANDARD"}; +static constexpr OHOS::HiviewDFX::HiLogLabel ANS_LABEL = {LOG_CORE, LOG_DOMAIN, ANS_LOG_TAG}; static constexpr OHOS::HiviewDFX::HiLogLabel ANS_REMINDER_LABEL = {LOG_CORE, LOG_DOMAIN, "ANS_REMINDER"}; class AnsLogWrapper { diff --git a/frameworks/ans/core/common/include/ans_permission_def.h b/frameworks/core/common/include/ans_permission_def.h similarity index 100% rename from frameworks/ans/core/common/include/ans_permission_def.h rename to frameworks/core/common/include/ans_permission_def.h diff --git a/frameworks/ans/core/common/include/ans_watchdog.h b/frameworks/core/common/include/ans_watchdog.h similarity index 100% rename from frameworks/ans/core/common/include/ans_watchdog.h rename to frameworks/core/common/include/ans_watchdog.h diff --git a/frameworks/ans/core/common/src/ans_log_wrapper.cpp b/frameworks/core/common/src/ans_log_wrapper.cpp similarity index 100% rename from frameworks/ans/core/common/src/ans_log_wrapper.cpp rename to frameworks/core/common/src/ans_log_wrapper.cpp diff --git a/frameworks/ans/core/common/src/ans_watchdog.cpp b/frameworks/core/common/src/ans_watchdog.cpp similarity index 100% rename from frameworks/ans/core/common/src/ans_watchdog.cpp rename to frameworks/core/common/src/ans_watchdog.cpp diff --git a/frameworks/ans/core/include/ans_image_util.h b/frameworks/core/include/ans_image_util.h similarity index 100% rename from frameworks/ans/core/include/ans_image_util.h rename to frameworks/core/include/ans_image_util.h diff --git a/frameworks/ans/core/include/ans_manager_death_recipient.h b/frameworks/core/include/ans_manager_death_recipient.h similarity index 100% rename from frameworks/ans/core/include/ans_manager_death_recipient.h rename to frameworks/core/include/ans_manager_death_recipient.h diff --git a/frameworks/ans/core/include/ans_manager_interface.h b/frameworks/core/include/ans_manager_interface.h similarity index 98% rename from frameworks/ans/core/include/ans_manager_interface.h rename to frameworks/core/include/ans_manager_interface.h index 960f1e29..4f294c66 100644 --- a/frameworks/ans/core/include/ans_manager_interface.h +++ b/frameworks/core/include/ans_manager_interface.h @@ -32,13 +32,13 @@ namespace OHOS { namespace Notification { -class IAnsManager : public IRemoteBroker { +class AnsManagerInterface : public IRemoteBroker { public: - IAnsManager() = default; - virtual ~IAnsManager() = default; - DISALLOW_COPY_AND_MOVE(IAnsManager); + AnsManagerInterface() = default; + virtual ~AnsManagerInterface() = default; + DISALLOW_COPY_AND_MOVE(AnsManagerInterface); - DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Notification.IAnsManager"); + DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Notification.AnsManagerInterface"); /** * @brief Publishes a notification with a specified label. @@ -453,7 +453,8 @@ public: * @param info Indicates the NotificationSubscribeInfo object. * @return Returns ERR_OK on success, others on failure. */ - virtual ErrCode Subscribe(const sptr &subscriber, const sptr &info) = 0; + virtual ErrCode Subscribe(const sptr &subscriber, + const sptr &info) = 0; /** * @brief Unsubscribes notifications. @@ -463,7 +464,7 @@ public: * @return Returns ERR_OK on success, others on failure. */ virtual ErrCode Unsubscribe( - const sptr &subscriber, const sptr &info) = 0; + const sptr &subscriber, const sptr &info) = 0; /** * @brief Obtains whether notifications are suspended. diff --git a/frameworks/ans/core/include/ans_manager_proxy.h b/frameworks/core/include/ans_manager_proxy.h similarity index 98% rename from frameworks/ans/core/include/ans_manager_proxy.h rename to frameworks/core/include/ans_manager_proxy.h index c8ccab39..81711067 100644 --- a/frameworks/ans/core/include/ans_manager_proxy.h +++ b/frameworks/core/include/ans_manager_proxy.h @@ -21,7 +21,7 @@ namespace OHOS { namespace Notification { -class AnsManagerProxy : public IRemoteProxy { +class AnsManagerProxy : public IRemoteProxy { public: AnsManagerProxy() = delete; explicit AnsManagerProxy(const sptr &impl); @@ -440,7 +440,8 @@ public: * @param info Indicates the NotificationSubscribeInfo object. * @return Returns ERR_OK on success, others on failure. */ - ErrCode Subscribe(const sptr &subscriber, const sptr &info) override; + ErrCode Subscribe(const sptr &subscriber, + const sptr &info) override; /** * @brief Unsubscribes notifications. @@ -449,7 +450,8 @@ public: * @param info Indicates the NotificationSubscribeInfo object. * @return Returns ERR_OK on success, others on failure. */ - ErrCode Unsubscribe(const sptr &subscriber, const sptr &info) override; + ErrCode Unsubscribe(const sptr &subscriber, + const sptr &info) override; /** * @brief Obtains whether notifications are suspended. diff --git a/frameworks/ans/core/include/ans_manager_stub.h b/frameworks/core/include/ans_manager_stub.h similarity index 99% rename from frameworks/ans/core/include/ans_manager_stub.h rename to frameworks/core/include/ans_manager_stub.h index 09a09586..1ed812ce 100644 --- a/frameworks/ans/core/include/ans_manager_stub.h +++ b/frameworks/core/include/ans_manager_stub.h @@ -24,7 +24,7 @@ namespace OHOS { namespace Notification { -class AnsManagerStub : public IRemoteStub { +class AnsManagerStub : public IRemoteStub { public: AnsManagerStub(); ~AnsManagerStub() override; @@ -459,7 +459,7 @@ public: * @return Returns ERR_OK on success, others on failure. */ virtual ErrCode Subscribe( - const sptr &subscriber, const sptr &info) override; + const sptr &subscriber, const sptr &info) override; /** * @brief Unsubscribes notifications. @@ -469,7 +469,7 @@ public: * @return Returns ERR_OK on success, others on failure. */ virtual ErrCode Unsubscribe( - const sptr &subscriber, const sptr &info) override; + const sptr &subscriber, const sptr &info) override; /** * @brief Obtains whether notifications are suspended. diff --git a/frameworks/ans/core/include/ans_notification.h b/frameworks/core/include/ans_notification.h similarity index 99% rename from frameworks/ans/core/include/ans_notification.h rename to frameworks/core/include/ans_notification.h index 57d1f899..d79746ff 100644 --- a/frameworks/ans/core/include/ans_notification.h +++ b/frameworks/core/include/ans_notification.h @@ -900,7 +900,7 @@ private: private: std::mutex mutex_; - sptr ansManagerProxy_; + sptr ansManagerProxy_; sptr recipient_; }; } // namespace Notification diff --git a/frameworks/ans/core/include/ans_subscriber_interface.h b/frameworks/core/include/ans_subscriber_interface.h similarity index 93% rename from frameworks/ans/core/include/ans_subscriber_interface.h rename to frameworks/core/include/ans_subscriber_interface.h index 97f5a15b..60182990 100644 --- a/frameworks/ans/core/include/ans_subscriber_interface.h +++ b/frameworks/core/include/ans_subscriber_interface.h @@ -28,13 +28,13 @@ namespace OHOS { namespace Notification { -class IAnsSubscriber : public IRemoteBroker { +class AnsSubscriberInterface : public IRemoteBroker { public: - IAnsSubscriber() = default; - virtual ~IAnsSubscriber() override = default; - DISALLOW_COPY_AND_MOVE(IAnsSubscriber); + AnsSubscriberInterface() = default; + virtual ~AnsSubscriberInterface() override = default; + DISALLOW_COPY_AND_MOVE(AnsSubscriberInterface); - DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Notification.IAnsSubscriber"); + DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Notification.AnsSubscriberInterface"); /** * @brief The callback function for the subscriber to establish a connection. diff --git a/frameworks/ans/core/include/ans_subscriber_proxy.h b/frameworks/core/include/ans_subscriber_proxy.h similarity index 98% rename from frameworks/ans/core/include/ans_subscriber_proxy.h rename to frameworks/core/include/ans_subscriber_proxy.h index 8f5fa10e..a7c88b47 100644 --- a/frameworks/ans/core/include/ans_subscriber_proxy.h +++ b/frameworks/core/include/ans_subscriber_proxy.h @@ -21,7 +21,7 @@ namespace OHOS { namespace Notification { -class AnsSubscriberProxy : public IRemoteProxy { +class AnsSubscriberProxy : public IRemoteProxy { public: AnsSubscriberProxy() = delete; explicit AnsSubscriberProxy(const sptr &impl); diff --git a/frameworks/ans/core/include/ans_subscriber_stub.h b/frameworks/core/include/ans_subscriber_stub.h similarity index 98% rename from frameworks/ans/core/include/ans_subscriber_stub.h rename to frameworks/core/include/ans_subscriber_stub.h index 678e85b3..d0772a2b 100644 --- a/frameworks/ans/core/include/ans_subscriber_stub.h +++ b/frameworks/core/include/ans_subscriber_stub.h @@ -21,7 +21,7 @@ namespace OHOS { namespace Notification { -class AnsSubscriberStub : public IRemoteStub { +class AnsSubscriberStub : public IRemoteStub { public: AnsSubscriberStub(); ~AnsSubscriberStub() override; diff --git a/frameworks/ans/core/src/ans_image_util.cpp b/frameworks/core/src/ans_image_util.cpp similarity index 100% rename from frameworks/ans/core/src/ans_image_util.cpp rename to frameworks/core/src/ans_image_util.cpp diff --git a/frameworks/ans/core/src/ans_manager_death_recipient.cpp b/frameworks/core/src/ans_manager_death_recipient.cpp similarity index 100% rename from frameworks/ans/core/src/ans_manager_death_recipient.cpp rename to frameworks/core/src/ans_manager_death_recipient.cpp diff --git a/frameworks/ans/core/src/ans_manager_proxy.cpp b/frameworks/core/src/ans_manager_proxy.cpp similarity index 99% rename from frameworks/ans/core/src/ans_manager_proxy.cpp rename to frameworks/core/src/ans_manager_proxy.cpp index 8d32ef7e..c97236d3 100644 --- a/frameworks/ans/core/src/ans_manager_proxy.cpp +++ b/frameworks/core/src/ans_manager_proxy.cpp @@ -26,7 +26,7 @@ namespace OHOS { namespace Notification { -AnsManagerProxy::AnsManagerProxy(const sptr &impl) : IRemoteProxy(impl) +AnsManagerProxy::AnsManagerProxy(const sptr &impl) : IRemoteProxy(impl) {} AnsManagerProxy::~AnsManagerProxy() @@ -1531,7 +1531,8 @@ ErrCode AnsManagerProxy::GetShowBadgeEnabled(bool &enabled) return result; } -ErrCode AnsManagerProxy::Subscribe(const sptr &subscriber, const sptr &info) +ErrCode AnsManagerProxy::Subscribe(const sptr &subscriber, + const sptr &info) { if (subscriber == nullptr) { ANS_LOGE("[Subscribe] fail: subscriber is empty."); @@ -1579,7 +1580,7 @@ ErrCode AnsManagerProxy::Subscribe(const sptr &subscriber, const } ErrCode AnsManagerProxy::Unsubscribe( - const sptr &subscriber, const sptr &info) + const sptr &subscriber, const sptr &info) { if (subscriber == nullptr) { ANS_LOGE("[Unsubscribe] fail: subscriber is empty."); diff --git a/frameworks/ans/core/src/ans_manager_stub.cpp b/frameworks/core/src/ans_manager_stub.cpp similarity index 99% rename from frameworks/ans/core/src/ans_manager_stub.cpp rename to frameworks/core/src/ans_manager_stub.cpp index 92b68738..8acd2396 100644 --- a/frameworks/ans/core/src/ans_manager_stub.cpp +++ b/frameworks/core/src/ans_manager_stub.cpp @@ -283,13 +283,13 @@ int32_t AnsManagerStub::OnRemoteRequest(uint32_t code, MessageParcel &data, Mess auto it = interfaces_.find(code); if (it == interfaces_.end()) { ANS_LOGE("[OnRemoteRequest] fail: unknown code!"); - return IRemoteStub::OnRemoteRequest(code, data, reply, flags); + return IRemoteStub::OnRemoteRequest(code, data, reply, flags); } auto fun = it->second; if (fun == nullptr) { ANS_LOGE("[OnRemoteRequest] fail: not find function!"); - return IRemoteStub::OnRemoteRequest(code, data, reply, flags); + return IRemoteStub::OnRemoteRequest(code, data, reply, flags); } ErrCode result = fun(this, data, reply); @@ -423,9 +423,7 @@ ErrCode AnsManagerStub::HandleAddSlots(MessageParcel &data, MessageParcel &reply ANS_LOGE("[HandleAddSlots] fail: read slotsSize failed"); return ERR_ANS_PARCELABLE_FAILED; } - ErrCode result = AddSlots(slots); - if (!reply.WriteInt32(result)) { ANS_LOGE("[HandleAddSlots] fail: write result failed, ErrCode=%{public}d", result); return ERR_ANS_PARCELABLE_FAILED; @@ -1193,7 +1191,7 @@ ErrCode AnsManagerStub::HandleSubscribe(MessageParcel &data, MessageParcel &repl } } - ErrCode result = Subscribe(iface_cast(subscriber), info); + ErrCode result = Subscribe(iface_cast(subscriber), info); if (!reply.WriteInt32(result)) { ANS_LOGE("[HandleSubscribe] fail: write result failed, ErrCode=%{public}d", result); return ERR_ANS_PARCELABLE_FAILED; @@ -1224,7 +1222,7 @@ ErrCode AnsManagerStub::HandleUnsubscribe(MessageParcel &data, MessageParcel &re } } - ErrCode result = Unsubscribe(iface_cast(subscriber), info); + ErrCode result = Unsubscribe(iface_cast(subscriber), info); if (!reply.WriteInt32(result)) { ANS_LOGE("[HandleUnsubscribe] fail: write result failed, ErrCode=%{public}d", result); return ERR_ANS_PARCELABLE_FAILED; @@ -1626,15 +1624,12 @@ ErrCode AnsManagerStub::HandleIsSupportTemplate(MessageParcel &data, MessageParc ANS_LOGE("[HandleIsSupportTemplate] fail: read template name failed."); return ERR_ANS_PARCELABLE_FAILED; } - bool support = false; ErrCode result = IsSupportTemplate(templateName, support); - if (!reply.WriteInt32(result)) { ANS_LOGE("[HandleIsSupportTemplate] fail: write result failed, ErrCode=%{public}d", result); return ERR_ANS_PARCELABLE_FAILED; } - if (!reply.WriteBool(support)) { ANS_LOGE("[HandleIsSupportTemplate] fail: write support failed."); return ERR_ANS_PARCELABLE_FAILED; @@ -2081,13 +2076,15 @@ ErrCode AnsManagerStub::GetShowBadgeEnabled(bool &enabled) return ERR_INVALID_OPERATION; } -ErrCode AnsManagerStub::Subscribe(const sptr &subscriber, const sptr &info) +ErrCode AnsManagerStub::Subscribe(const sptr &subscriber, + const sptr &info) { ANS_LOGE("AnsManagerStub::Subscribe called!"); return ERR_INVALID_OPERATION; } -ErrCode AnsManagerStub::Unsubscribe(const sptr &subscriber, const sptr &info) +ErrCode AnsManagerStub::Unsubscribe(const sptr &subscriber, + const sptr &info) { ANS_LOGE("AnsManagerStub::Unsubscribe called!"); return ERR_INVALID_OPERATION; diff --git a/frameworks/ans/core/src/ans_notification.cpp b/frameworks/core/src/ans_notification.cpp similarity index 99% rename from frameworks/ans/core/src/ans_notification.cpp rename to frameworks/core/src/ans_notification.cpp index 81625449..39aad8f0 100644 --- a/frameworks/ans/core/src/ans_notification.cpp +++ b/frameworks/core/src/ans_notification.cpp @@ -1071,7 +1071,7 @@ bool AnsNotification::GetAnsManagerProxy() return false; } - ansManagerProxy_ = iface_cast(remoteObject); + ansManagerProxy_ = iface_cast(remoteObject); if ((!ansManagerProxy_) || (!ansManagerProxy_->AsObject())) { ANS_LOGE("Failed to get notification Manager's proxy"); return false; diff --git a/frameworks/ans/core/src/ans_subscriber_proxy.cpp b/frameworks/core/src/ans_subscriber_proxy.cpp similarity index 99% rename from frameworks/ans/core/src/ans_subscriber_proxy.cpp rename to frameworks/core/src/ans_subscriber_proxy.cpp index 148f1f1c..0efe13cf 100644 --- a/frameworks/ans/core/src/ans_subscriber_proxy.cpp +++ b/frameworks/core/src/ans_subscriber_proxy.cpp @@ -22,7 +22,7 @@ namespace OHOS { namespace Notification { -AnsSubscriberProxy::AnsSubscriberProxy(const sptr &impl) : IRemoteProxy(impl) +AnsSubscriberProxy::AnsSubscriberProxy(const sptr &impl) : IRemoteProxy(impl) {} AnsSubscriberProxy::~AnsSubscriberProxy() diff --git a/frameworks/ans/core/src/ans_subscriber_stub.cpp b/frameworks/core/src/ans_subscriber_stub.cpp similarity index 97% rename from frameworks/ans/core/src/ans_subscriber_stub.cpp rename to frameworks/core/src/ans_subscriber_stub.cpp index 12e81767..f28c238c 100644 --- a/frameworks/ans/core/src/ans_subscriber_stub.cpp +++ b/frameworks/core/src/ans_subscriber_stub.cpp @@ -64,13 +64,13 @@ int32_t AnsSubscriberStub::OnRemoteRequest( auto it = interfaces_.find(code); if (it == interfaces_.end()) { ANS_LOGW("[OnRemoteRequest] fail: unknown code!"); - return IRemoteStub::OnRemoteRequest(code, data, reply, flags); + return IRemoteStub::OnRemoteRequest(code, data, reply, flags); } auto fun = it->second; if (fun == nullptr) { ANS_LOGW("[OnRemoteRequest] fail: not find function!"); - return IRemoteStub::OnRemoteRequest(code, data, reply, flags); + return IRemoteStub::OnRemoteRequest(code, data, reply, flags); } fun(data, reply); diff --git a/interfaces/kits/napi/ans/BUILD.gn b/frameworks/js/napi/BUILD.gn similarity index 84% rename from interfaces/kits/napi/ans/BUILD.gn rename to frameworks/js/napi/BUILD.gn index 6c1e9137..dc967b11 100644 --- a/interfaces/kits/napi/ans/BUILD.gn +++ b/frameworks/js/napi/BUILD.gn @@ -11,9 +11,21 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") +group("napi_reminder") { + deps = [ + "src/reminder:reminderagent", + ] +} + +group("napi_notification") { + deps = [ + ":notification", + ] +} + cflags = [] config("native_module_config") { @@ -26,7 +38,7 @@ config("native_module_config") { } defines = [ - "APP_LOG_TAG = \"ANS_STANDARD\"", + "ANS_LOG_TAG = \"NOTIFICATION_NAPI\"", "LOG_DOMAIN = 0xD001800", ] } @@ -64,8 +76,8 @@ ohos_shared_library("notification") { ] deps = [ - "${frameworks_path}/ans/core:ans_core", - "${frameworks_path}/ans/native:ans_innerkits", + "${core_path}:ans_core", + "${frameworks_module_ans_path}:ans_innerkits", "//foundation/aafwk/standard/interfaces/kits/napi/aafwk/inner/napi_common:napi_common", "//foundation/multimedia/image_standard/interfaces/innerkits:image", "//third_party/jsoncpp:jsoncpp", @@ -86,6 +98,6 @@ ohos_shared_library("notification") { ] relative_install_dir = "module" - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } diff --git a/interfaces/kits/napi/ans/include/ans_template.h b/frameworks/js/napi/include/ans_template.h similarity index 74% rename from interfaces/kits/napi/ans/include/ans_template.h rename to frameworks/js/napi/include/ans_template.h index 2919b623..c3ed2dde 100644 --- a/interfaces/kits/napi/ans/include/ans_template.h +++ b/frameworks/js/napi/include/ans_template.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_TEMPLATE_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_TEMPLATE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_TEMPLATE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_TEMPLATE_H #include "common.h" @@ -26,4 +26,4 @@ napi_value IsSupportTemplate(napi_env env, napi_callback_info info); } // namespace NotificationNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_TEMPLATE_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_TEMPLATE_H \ No newline at end of file diff --git a/interfaces/kits/napi/ans/include/cancel.h b/frameworks/js/napi/include/cancel.h similarity index 77% rename from interfaces/kits/napi/ans/include/cancel.h rename to frameworks/js/napi/include/cancel.h index 49b306db..30b357af 100644 --- a/interfaces/kits/napi/ans/include/cancel.h +++ b/frameworks/js/napi/include/cancel.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_CANCEL_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_CANCEL_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_CANCEL_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_CANCEL_H #include "common.h" @@ -29,4 +29,4 @@ napi_value CancelAsBundle(napi_env env, napi_callback_info info); } // namespace NotificationNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_CANCEL_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_CANCEL_H \ No newline at end of file diff --git a/interfaces/kits/napi/ans/include/common.h b/frameworks/js/napi/include/common.h similarity index 99% rename from interfaces/kits/napi/ans/include/common.h rename to frameworks/js/napi/include/common.h index b79276d4..4d7ceb87 100644 --- a/interfaces/kits/napi/ans/include/common.h +++ b/frameworks/js/napi/include/common.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_COMMON_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_COMMON_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_COMMON_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_COMMON_H #include "ans_log_wrapper.h" #include "napi/native_api.h" @@ -1538,4 +1538,4 @@ private: } // namespace NotificationNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_COMMON_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_COMMON_H \ No newline at end of file diff --git a/interfaces/kits/napi/ans/include/constant.h b/frameworks/js/napi/include/constant.h similarity index 83% rename from interfaces/kits/napi/ans/include/constant.h rename to frameworks/js/napi/include/constant.h index d5f8f3e9..a3cca0fa 100644 --- a/interfaces/kits/napi/ans/include/constant.h +++ b/frameworks/js/napi/include/constant.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_CONSTANT_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_CONSTANT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_CONSTANT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_CONSTANT_H #include "common.h" @@ -33,4 +33,4 @@ napi_value ConstantInit(napi_env env, napi_value exports); } // namespace NotificationNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_CONSTANT_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_CONSTANT_H \ No newline at end of file diff --git a/interfaces/kits/napi/ans/include/display_badge.h b/frameworks/js/napi/include/display_badge.h similarity index 74% rename from interfaces/kits/napi/ans/include/display_badge.h rename to frameworks/js/napi/include/display_badge.h index 992a41de..671e5330 100644 --- a/interfaces/kits/napi/ans/include/display_badge.h +++ b/frameworks/js/napi/include/display_badge.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_DISPLAY_BADGE_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_DISPLAY_BADGE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_DISPLAY_BADGE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_DISPLAY_BADGE_H #include "common.h" @@ -25,4 +25,4 @@ napi_value DisplayBadge(napi_env env, napi_callback_info info); napi_value IsBadgeDisplayed(napi_env env, napi_callback_info info); } // namespace NotificationNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_DISPLAY_BADGE_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_DISPLAY_BADGE_H \ No newline at end of file diff --git a/interfaces/kits/napi/ans/include/distributed.h b/frameworks/js/napi/include/distributed.h similarity index 80% rename from interfaces/kits/napi/ans/include/distributed.h rename to frameworks/js/napi/include/distributed.h index ad379f9d..755db443 100644 --- a/interfaces/kits/napi/ans/include/distributed.h +++ b/frameworks/js/napi/include/distributed.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_DISTRIBUTED_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_DISTRIBUTED_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_DISTRIBUTED_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_DISTRIBUTED_H #include "common.h" @@ -31,4 +31,4 @@ napi_value GetDeviceRemindType(napi_env env, napi_callback_info info); } // namespace NotificationNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_DISTRIBUTED_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_DISTRIBUTED_H \ No newline at end of file diff --git a/interfaces/kits/napi/ans/include/disturb_mode.h b/frameworks/js/napi/include/disturb_mode.h similarity index 76% rename from interfaces/kits/napi/ans/include/disturb_mode.h rename to frameworks/js/napi/include/disturb_mode.h index 3a2d668b..5c0fef0a 100644 --- a/interfaces/kits/napi/ans/include/disturb_mode.h +++ b/frameworks/js/napi/include/disturb_mode.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_DISTURB_MODE_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_DISTURB_MODE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_DISTURB_MODE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_DISTURB_MODE_H #include "common.h" @@ -26,4 +26,4 @@ napi_value GetDoNotDisturbDate(napi_env env, napi_callback_info info); napi_value SupportDoNotDisturbMode(napi_env env, napi_callback_info info); } // namespace NotificationNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_DISTURB_MODE_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_DISTURB_MODE_H \ No newline at end of file diff --git a/interfaces/kits/napi/ans/include/enable_notification.h b/frameworks/js/napi/include/enable_notification.h similarity index 76% rename from interfaces/kits/napi/ans/include/enable_notification.h rename to frameworks/js/napi/include/enable_notification.h index 3926ae21..20f46801 100644 --- a/interfaces/kits/napi/ans/include/enable_notification.h +++ b/frameworks/js/napi/include/enable_notification.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_ENABLE_NOTIFICATION_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_ENABLE_NOTIFICATION_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_ENABLE_NOTIFICATION_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_ENABLE_NOTIFICATION_H #include "common.h" @@ -27,4 +27,4 @@ napi_value IsNotificationEnabledSelf(napi_env env, napi_callback_info info); napi_value RequestEnableNotification(napi_env env, napi_callback_info info); } // namespace NotificationNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_ENABLE_NOTIFICATION_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_ENABLE_NOTIFICATION_H \ No newline at end of file diff --git a/interfaces/kits/napi/ans/include/get_active.h b/frameworks/js/napi/include/get_active.h similarity index 76% rename from interfaces/kits/napi/ans/include/get_active.h rename to frameworks/js/napi/include/get_active.h index 37865304..837747dc 100644 --- a/interfaces/kits/napi/ans/include/get_active.h +++ b/frameworks/js/napi/include/get_active.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_GET_ACTIVE_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_GET_ACTIVE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_GET_ACTIVE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_GET_ACTIVE_H #include "common.h" @@ -28,4 +28,4 @@ napi_value GetActiveNotificationCount(napi_env env, napi_callback_info info); } // namespace NotificationNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_GET_ACTIVE_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_GET_ACTIVE_H \ No newline at end of file diff --git a/interfaces/kits/napi/ans/include/init.h b/frameworks/js/napi/include/init.h similarity index 81% rename from interfaces/kits/napi/ans/include/init.h rename to frameworks/js/napi/include/init.h index d8306a66..9bb117aa 100644 --- a/interfaces/kits/napi/ans/include/init.h +++ b/frameworks/js/napi/include/init.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_INIT_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_INIT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_INIT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_INIT_H #include "napi/native_api.h" #include "napi/native_node_api.h" @@ -48,4 +48,4 @@ napi_module _module = { }; } // namespace NotificationNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_INIT_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_INIT_H diff --git a/interfaces/kits/napi/ans/include/publish.h b/frameworks/js/napi/include/publish.h similarity index 76% rename from interfaces/kits/napi/ans/include/publish.h rename to frameworks/js/napi/include/publish.h index 40db6ba7..44de7e95 100644 --- a/interfaces/kits/napi/ans/include/publish.h +++ b/frameworks/js/napi/include/publish.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_PUBLISH_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_PUBLISH_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_PUBLISH_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_PUBLISH_H #include "common.h" @@ -25,4 +25,4 @@ napi_value ShowNotification(napi_env env, napi_callback_info info); napi_value PublishAsBundle(napi_env env, napi_callback_info info); } // namespace NotificationNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_PUBLISH_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_PUBLISH_H \ No newline at end of file diff --git a/interfaces/kits/napi/ans/include/reminder/native_module.h b/frameworks/js/napi/include/reminder/native_module.h similarity index 76% rename from interfaces/kits/napi/ans/include/reminder/native_module.h rename to frameworks/js/napi/include/reminder/native_module.h index b720a915..5e10df33 100644 --- a/interfaces/kits/napi/ans/include/reminder/native_module.h +++ b/frameworks/js/napi/include/reminder/native_module.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_REMINDER_NATIVE_MODULE_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_REMINDER_NATIVE_MODULE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_REMINDER_NATIVE_MODULE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_REMINDER_NATIVE_MODULE_H #include "napi/native_api.h" #include "napi/native_node_api.h" @@ -36,4 +36,4 @@ static napi_value Init(napi_env env, napi_value exports); } // namespace OHOS } // namespace ReminderAgentNapi -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_REMINDER_NATIVE_MODULE_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_REMINDER_NATIVE_MODULE_H \ No newline at end of file diff --git a/interfaces/kits/napi/ans/include/reminder/publish.h b/frameworks/js/napi/include/reminder/publish.h similarity index 87% rename from interfaces/kits/napi/ans/include/reminder/publish.h rename to frameworks/js/napi/include/reminder/publish.h index c9a824c9..d5075ee5 100644 --- a/interfaces/kits/napi/ans/include/reminder/publish.h +++ b/frameworks/js/napi/include/reminder/publish.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_REMINDER_PUBLISH_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_REMINDER_PUBLISH_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_REMINDER_PUBLISH_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_REMINDER_PUBLISH_H #include "reminder/reminder_common.h" @@ -66,4 +66,4 @@ napi_value AddSlot(napi_env env, napi_callback_info info); } // namespace ReminderAgentNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_REMINDER_PUBLISH_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_REMINDER_PUBLISH_H diff --git a/interfaces/kits/napi/ans/include/reminder/reminder_common.h b/frameworks/js/napi/include/reminder/reminder_common.h similarity index 93% rename from interfaces/kits/napi/ans/include/reminder/reminder_common.h rename to frameworks/js/napi/include/reminder/reminder_common.h index 3a682160..c56836e0 100644 --- a/interfaces/kits/napi/ans/include/reminder/reminder_common.h +++ b/frameworks/js/napi/include/reminder/reminder_common.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_REMINDER_COMMON_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_REMINDER_COMMON_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_REMINDER_COMMON_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_REMINDER_COMMON_H #include "ans_log_wrapper.h" #include "napi/native_api.h" @@ -119,4 +119,4 @@ private: } // namespace OHOS } // namespace ReminderAgentNapi -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_REMINDER_COMMON_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_REMINDER_COMMON_H diff --git a/interfaces/kits/napi/ans/include/remove.h b/frameworks/js/napi/include/remove.h similarity index 78% rename from interfaces/kits/napi/ans/include/remove.h rename to frameworks/js/napi/include/remove.h index 56bc61c2..5beb3a8c 100644 --- a/interfaces/kits/napi/ans/include/remove.h +++ b/frameworks/js/napi/include/remove.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_REMOVE_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_REMOVE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_REMOVE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_REMOVE_H #include "common.h" @@ -28,4 +28,4 @@ napi_value RemoveAll(napi_env env, napi_callback_info info); napi_value RemoveGroupByBundle(napi_env env, napi_callback_info info); } // namespace NotificationNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_REMOVE_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_REMOVE_H \ No newline at end of file diff --git a/interfaces/kits/napi/ans/include/slot.h b/frameworks/js/napi/include/slot.h similarity index 84% rename from interfaces/kits/napi/ans/include/slot.h rename to frameworks/js/napi/include/slot.h index 5ea7ec97..72017d1c 100644 --- a/interfaces/kits/napi/ans/include/slot.h +++ b/frameworks/js/napi/include/slot.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_SLOT_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_SLOT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_SLOT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_SLOT_H #include "common.h" @@ -35,4 +35,4 @@ napi_value IsEnableNotificationSlot(napi_env env, napi_callback_info info); } // namespace NotificationNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_SLOT_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_SLOT_H \ No newline at end of file diff --git a/interfaces/kits/napi/ans/include/subscribe.h b/frameworks/js/napi/include/subscribe.h similarity index 95% rename from interfaces/kits/napi/ans/include/subscribe.h rename to frameworks/js/napi/include/subscribe.h index a579aecd..06c1286d 100644 --- a/interfaces/kits/napi/ans/include/subscribe.h +++ b/frameworks/js/napi/include/subscribe.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_SUBSCRIBE_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_SUBSCRIBE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_SUBSCRIBE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_SUBSCRIBE_H #include "common.h" @@ -167,4 +167,4 @@ void DelDeletingSubscriber(SubscriberInstance *subscriber); napi_value Subscribe(napi_env env, napi_callback_info info); } // namespace NotificationNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_SUBSCRIBE_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_SUBSCRIBE_H \ No newline at end of file diff --git a/interfaces/kits/napi/ans/include/unsubscribe.h b/frameworks/js/napi/include/unsubscribe.h similarity index 73% rename from interfaces/kits/napi/ans/include/unsubscribe.h rename to frameworks/js/napi/include/unsubscribe.h index 670b257a..b40c3a27 100644 --- a/interfaces/kits/napi/ans/include/unsubscribe.h +++ b/frameworks/js/napi/include/unsubscribe.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_UNSUBSCRIBE_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_UNSUBSCRIBE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_UNSUBSCRIBE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_UNSUBSCRIBE_H #include "common.h" @@ -25,4 +25,4 @@ napi_value Unsubscribe(napi_env env, napi_callback_info info); } // namespace NotificationNapi } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NAPI_INCLUDE_UNSUBSCRIBE_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_UNSUBSCRIBE_H \ No newline at end of file diff --git a/interfaces/kits/napi/ans/src/ans_template.cpp b/frameworks/js/napi/src/ans_template.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/ans_template.cpp rename to frameworks/js/napi/src/ans_template.cpp diff --git a/interfaces/kits/napi/ans/src/cancel.cpp b/frameworks/js/napi/src/cancel.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/cancel.cpp rename to frameworks/js/napi/src/cancel.cpp diff --git a/interfaces/kits/napi/ans/src/common.cpp b/frameworks/js/napi/src/common.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/common.cpp rename to frameworks/js/napi/src/common.cpp diff --git a/interfaces/kits/napi/ans/src/constant.cpp b/frameworks/js/napi/src/constant.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/constant.cpp rename to frameworks/js/napi/src/constant.cpp diff --git a/interfaces/kits/napi/ans/src/display_badge.cpp b/frameworks/js/napi/src/display_badge.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/display_badge.cpp rename to frameworks/js/napi/src/display_badge.cpp diff --git a/interfaces/kits/napi/ans/src/distributed.cpp b/frameworks/js/napi/src/distributed.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/distributed.cpp rename to frameworks/js/napi/src/distributed.cpp diff --git a/interfaces/kits/napi/ans/src/disturb_mode.cpp b/frameworks/js/napi/src/disturb_mode.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/disturb_mode.cpp rename to frameworks/js/napi/src/disturb_mode.cpp diff --git a/interfaces/kits/napi/ans/src/enable_notification.cpp b/frameworks/js/napi/src/enable_notification.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/enable_notification.cpp rename to frameworks/js/napi/src/enable_notification.cpp diff --git a/interfaces/kits/napi/ans/src/get_active.cpp b/frameworks/js/napi/src/get_active.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/get_active.cpp rename to frameworks/js/napi/src/get_active.cpp diff --git a/interfaces/kits/napi/ans/src/init.cpp b/frameworks/js/napi/src/init.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/init.cpp rename to frameworks/js/napi/src/init.cpp diff --git a/interfaces/kits/napi/ans/src/publish.cpp b/frameworks/js/napi/src/publish.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/publish.cpp rename to frameworks/js/napi/src/publish.cpp diff --git a/interfaces/kits/napi/ans/src/reminder/BUILD.gn b/frameworks/js/napi/src/reminder/BUILD.gn similarity index 87% rename from interfaces/kits/napi/ans/src/reminder/BUILD.gn rename to frameworks/js/napi/src/reminder/BUILD.gn index 8979ca6e..76fe8a95 100644 --- a/interfaces/kits/napi/ans/src/reminder/BUILD.gn +++ b/frameworks/js/napi/src/reminder/BUILD.gn @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") cflags = [] @@ -26,7 +26,7 @@ config("native_module_config") { } defines = [ - "APP_LOG_TAG = \"ANS_STANDARD\"", + "APP_LOG_TAG = \"NOTIFICATION_REMINDER\"", "LOG_DOMAIN = 0xD001800", ] } @@ -53,8 +53,8 @@ ohos_shared_library("reminderagent") { ] deps = [ - "${frameworks_path}/ans/core:ans_core", - "${frameworks_path}/ans/native:ans_innerkits", + "${core_path}:ans_core", + "${frameworks_module_ans_path}:ans_innerkits", "//foundation/aafwk/standard/interfaces/kits/napi/aafwk/inner/napi_common:napi_common", "//foundation/multimedia/image_standard/interfaces/innerkits:image", "//third_party/jsoncpp:jsoncpp", @@ -75,6 +75,6 @@ ohos_shared_library("reminderagent") { ] relative_install_dir = "module" - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } diff --git a/interfaces/kits/napi/ans/src/reminder/native_module.cpp b/frameworks/js/napi/src/reminder/native_module.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/reminder/native_module.cpp rename to frameworks/js/napi/src/reminder/native_module.cpp diff --git a/interfaces/kits/napi/ans/src/reminder/publish.cpp b/frameworks/js/napi/src/reminder/publish.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/reminder/publish.cpp rename to frameworks/js/napi/src/reminder/publish.cpp diff --git a/interfaces/kits/napi/ans/src/reminder/reminder_common.cpp b/frameworks/js/napi/src/reminder/reminder_common.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/reminder/reminder_common.cpp rename to frameworks/js/napi/src/reminder/reminder_common.cpp diff --git a/interfaces/kits/napi/ans/src/remove.cpp b/frameworks/js/napi/src/remove.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/remove.cpp rename to frameworks/js/napi/src/remove.cpp diff --git a/interfaces/kits/napi/ans/src/slot.cpp b/frameworks/js/napi/src/slot.cpp similarity index 98% rename from interfaces/kits/napi/ans/src/slot.cpp rename to frameworks/js/napi/src/slot.cpp index 71d452ef..909f672d 100644 --- a/interfaces/kits/napi/ans/src/slot.cpp +++ b/frameworks/js/napi/src/slot.cpp @@ -29,7 +29,7 @@ const int32_t SET_ENABLE_SLOT_MAX_PARA = 4; struct ParametersInfoAddSlot { NotificationSlot slot; - enum NotificationConstant::SlotType inType = NotificationConstant::SlotType::OTHER; + NotificationConstant::SlotType inType = NotificationConstant::SlotType::OTHER; bool isAddSlotByType = false; napi_ref callback = nullptr; }; @@ -38,7 +38,7 @@ struct AsyncCallbackInfoAddSlot { napi_env env = nullptr; napi_async_work asyncWork = nullptr; NotificationSlot slot; - enum NotificationConstant::SlotType inType = NotificationConstant::SlotType::OTHER; + NotificationConstant::SlotType inType = NotificationConstant::SlotType::OTHER; bool isAddSlotByType = false; CallbackPromiseInfo info; }; @@ -69,14 +69,14 @@ struct AsyncCallbackInfoSetSlotByBundle { }; struct ParametersInfoGetSlot { - enum NotificationConstant::SlotType outType = NotificationConstant::SlotType::OTHER; + NotificationConstant::SlotType outType = NotificationConstant::SlotType::OTHER; napi_ref callback = nullptr; }; struct AsyncCallbackInfoGetSlot { napi_env env = nullptr; napi_async_work asyncWork = nullptr; - enum NotificationConstant::SlotType outType = NotificationConstant::SlotType::OTHER; + NotificationConstant::SlotType outType = NotificationConstant::SlotType::OTHER; CallbackPromiseInfo info; sptr slot = nullptr; }; @@ -115,14 +115,14 @@ struct AsyncCallbackInfoGetSlotsByBundle { }; struct ParametersInfoRemoveSlot { - enum NotificationConstant::SlotType outType = NotificationConstant::SlotType::OTHER; + NotificationConstant::SlotType outType = NotificationConstant::SlotType::OTHER; napi_ref callback = nullptr; }; struct AsyncCallbackInfoRemoveSlot { napi_env env = nullptr; napi_async_work asyncWork = nullptr; - enum NotificationConstant::SlotType outType = NotificationConstant::SlotType::OTHER; + NotificationConstant::SlotType outType = NotificationConstant::SlotType::OTHER; CallbackPromiseInfo info; }; @@ -134,7 +134,7 @@ struct AsyncCallbackInfoRemoveAllSlots { struct ParametersInfoEnableSlot { NotificationBundleOption option; - enum NotificationConstant::SlotType outType = NotificationConstant::SlotType::OTHER; + NotificationConstant::SlotType outType = NotificationConstant::SlotType::OTHER; bool enable = false; napi_ref callback = nullptr; }; @@ -148,7 +148,7 @@ struct AsyncCallbackInfoInfoEnableSlot { struct ParametersInfoIsEnableSlot { NotificationBundleOption option; - enum NotificationConstant::SlotType outType = NotificationConstant::SlotType::OTHER; + NotificationConstant::SlotType outType = NotificationConstant::SlotType::OTHER; napi_ref callback = nullptr; }; diff --git a/interfaces/kits/napi/ans/src/subscribe.cpp b/frameworks/js/napi/src/subscribe.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/subscribe.cpp rename to frameworks/js/napi/src/subscribe.cpp diff --git a/interfaces/kits/napi/ans/src/unsubscribe.cpp b/frameworks/js/napi/src/unsubscribe.cpp similarity index 100% rename from interfaces/kits/napi/ans/src/unsubscribe.cpp rename to frameworks/js/napi/src/unsubscribe.cpp diff --git a/frameworks/ans/test/moduletest/BUILD.gn b/frameworks/test/moduletest/BUILD.gn similarity index 76% rename from frameworks/ans/test/moduletest/BUILD.gn rename to frameworks/test/moduletest/BUILD.gn index d6307598..ea024698 100644 --- a/frameworks/ans/test/moduletest/BUILD.gn +++ b/frameworks/test/moduletest/BUILD.gn @@ -11,11 +11,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "ans_standard/moduletest" +module_output_path = "${component_name}/moduletest" config("public_ans_config") { include_dirs = [ @@ -31,21 +31,20 @@ ohos_moduletest("ans_fw_module_test") { include_dirs = [ "include", "${core_path}/include", - "${interfaces_path}/ans/native/include", - "${frameworks_path}/ans/core/common/include", - "${frameworks_path}/ans/core/include", - "//utils/native/base/include", - "//utils/system/safwk/native/include", - "//base/notification/ans_standard/services/ans/include", - "//third_party/json/include", - "//base/notification/ans_standard/interfaces/innerkits/ans/native/test/moduletest/mock/include", - "//base/notification/ans_standard/interfaces/innerkits/ans/native/include", + "${inner_api_path}", "${core_path}/common/include", "${core_path}/include", - "${interfaces_path}/innerkits/ans/native/include", + "//utils/native/base/include", + "//utils/system/safwk/native/include", + "${component_path}/services/ans/include", + "//third_party/json/include", + "${inner_api_path}", + "${core_path}/common/include", + "${core_path}/include", + "${inner_api_path}", "//utils/native/base/include", "//third_party/jsoncpp/include", - "//base/notification/ans_standard/frameworks/ans/test/moduletest/mock/include", + "${frameworks_path}/test/moduletest/mock/include", ] sources = [ @@ -66,8 +65,8 @@ ohos_moduletest("ans_fw_module_test") { configs = [ "//utils/native/base:utils_config" ] deps = [ - "${frameworks_path}/ans/core:ans_core", - "${frameworks_path}/ans/native:ans_innerkits", + "${core_path}:ans_core", + "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -97,8 +96,8 @@ ohos_moduletest("ans_fw_module_test") { "samgr_standard:samgr_proxy", ] - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } ohos_moduletest("ans_innerkits_module_publish_test") { @@ -106,21 +105,20 @@ ohos_moduletest("ans_innerkits_module_publish_test") { include_dirs = [ "include", "${core_path}/include", - "${interfaces_path}/ans/native/include", - "${frameworks_path}/ans/core/common/include", - "${frameworks_path}/ans/core/include", - "//utils/native/base/include", - "//utils/system/safwk/native/include", - "//base/notification/ans_standard/services/ans/include", - "//third_party/json/include", - "//base/notification/ans_standard/interfaces/innerkits/ans/native/test/moduletest/mock/include", - "//base/notification/ans_standard/interfaces/innerkits/ans/native/include", + "${inner_api_path}", "${core_path}/common/include", "${core_path}/include", - "${interfaces_path}/innerkits/ans/native/include", + "//utils/native/base/include", + "//utils/system/safwk/native/include", + "${component_path}/services/ans/include", + "//third_party/json/include", + "${inner_api_path}", + "${core_path}/common/include", + "${core_path}/include", + "${inner_api_path}", "//utils/native/base/include", "//third_party/jsoncpp/include", - "//base/notification/ans_standard/frameworks/ans/test/moduletest/mock/include", + "${frameworks_path}/test/moduletest/mock/include", ] sources = [ @@ -141,8 +139,8 @@ ohos_moduletest("ans_innerkits_module_publish_test") { configs = [ "//utils/native/base:utils_config" ] deps = [ - "${frameworks_path}/ans/core:ans_core", - "${frameworks_path}/ans/native:ans_innerkits", + "${core_path}:ans_core", + "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -173,8 +171,8 @@ ohos_moduletest("ans_innerkits_module_publish_test") { "samgr_standard:samgr_proxy", ] - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } ohos_moduletest("ans_innerkits_module_slot_test") { @@ -182,21 +180,20 @@ ohos_moduletest("ans_innerkits_module_slot_test") { include_dirs = [ "include", "${core_path}/include", - "${interfaces_path}/ans/native/include", + "${inner_api_path}", "${frameworks_path}/ans/core/common/include", "${frameworks_path}/ans/core/include", "//utils/native/base/include", "//utils/system/safwk/native/include", - "//base/notification/ans_standard/services/ans/include", + "${component_path}/services/ans/include", "//third_party/json/include", - "//base/notification/ans_standard/interfaces/innerkits/ans/native/test/moduletest/mock/include", - "//base/notification/ans_standard/interfaces/innerkits/ans/native/include", + "${inner_api_path}", "${core_path}/common/include", "${core_path}/include", - "${interfaces_path}/innerkits/ans/native/include", + "${inner_api_path}", "//utils/native/base/include", "//third_party/jsoncpp/include", - "//base/notification/ans_standard/frameworks/ans/test/moduletest/mock/include", + "${frameworks_path}/test/moduletest/mock/include", ] sources = [ @@ -217,8 +214,8 @@ ohos_moduletest("ans_innerkits_module_slot_test") { configs = [ "//utils/native/base:utils_config" ] deps = [ - "${frameworks_path}/ans/core:ans_core", - "${frameworks_path}/ans/native:ans_innerkits", + "${core_path}:ans_core", + "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -248,8 +245,8 @@ ohos_moduletest("ans_innerkits_module_slot_test") { "samgr_standard:samgr_proxy", ] - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } ohos_moduletest("ans_innerkits_module_setting_test") { @@ -257,21 +254,20 @@ ohos_moduletest("ans_innerkits_module_setting_test") { include_dirs = [ "include", "${core_path}/include", - "${interfaces_path}/ans/native/include", + "${inner_api_path}", "${frameworks_path}/ans/core/common/include", "${frameworks_path}/ans/core/include", "//utils/native/base/include", "//utils/system/safwk/native/include", - "//base/notification/ans_standard/services/ans/include", + "${component_path}/services/ans/include", "//third_party/json/include", - "//base/notification/ans_standard/interfaces/innerkits/ans/native/test/moduletest/mock/include", - "//base/notification/ans_standard/interfaces/innerkits/ans/native/include", + "${inner_api_path}", "${core_path}/common/include", "${core_path}/include", - "${interfaces_path}/innerkits/ans/native/include", + "${inner_api_path}", "//utils/native/base/include", "//third_party/jsoncpp/include", - "//base/notification/ans_standard/frameworks/ans/test/moduletest/mock/include", + "${frameworks_path}/test/moduletest/mock/include", ] sources = [ @@ -291,8 +287,8 @@ ohos_moduletest("ans_innerkits_module_setting_test") { configs = [ "//utils/native/base:utils_config" ] deps = [ - "${frameworks_path}/ans/core:ans_core", - "${frameworks_path}/ans/native:ans_innerkits", + "${core_path}:ans_core", + "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -322,8 +318,8 @@ ohos_moduletest("ans_innerkits_module_setting_test") { "samgr_standard:samgr_proxy", ] - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } ohos_js_unittest("ReminderAgentJsTest") { diff --git a/frameworks/ans/test/moduletest/ReminderHelperTest.js b/frameworks/test/moduletest/ReminderHelperTest.js similarity index 100% rename from frameworks/ans/test/moduletest/ReminderHelperTest.js rename to frameworks/test/moduletest/ReminderHelperTest.js diff --git a/frameworks/ans/test/moduletest/ans_fw_module_test.cpp b/frameworks/test/moduletest/ans_fw_module_test.cpp similarity index 97% rename from frameworks/ans/test/moduletest/ans_fw_module_test.cpp rename to frameworks/test/moduletest/ans_fw_module_test.cpp index d4e0b3a4..456841af 100644 --- a/frameworks/ans/test/moduletest/ans_fw_module_test.cpp +++ b/frameworks/test/moduletest/ans_fw_module_test.cpp @@ -442,8 +442,8 @@ public: { DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID}; DistributedKv::StoreId storeId = {.storeId = KVSTORE_SCREEN_STATUS_STORE_ID}; - std::shared_ptr pointer = - DistributedKv::AnsTestSingleKvStore::GetMockKvStorePointer(appId, storeId); + std::shared_ptr pointer = + DistributedKv::MockSingleKvStore::GetMockKvStorePointer(appId, storeId); if (pointer) { DistributedKv::Key key("" + DELIMITER + "screen_status"); DistributedKv::Value value(isScreenOn ? "on" : "off"); @@ -1736,8 +1736,8 @@ HWTEST_F(AnsFWModuleTest, DistributedNotification_Publish_00100, Function | Medi DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID}; DistributedKv::StoreId storeId = {.storeId = KVSTORE_NOTIFICATION_STORE_ID}; - std::shared_ptr pointer = - DistributedKv::AnsTestSingleKvStore::GetMockKvStorePointer(appId, storeId); + std::shared_ptr pointer = + DistributedKv::MockSingleKvStore::GetMockKvStorePointer(appId, storeId); std::vector entries; ASSERT_EQ(NotificationHelper::PublishNotification(request), ERR_OK); @@ -1761,8 +1761,8 @@ HWTEST_F(AnsFWModuleTest, DistributedNotification_Publish_00200, Function | Medi DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID}; DistributedKv::StoreId storeId = {.storeId = KVSTORE_NOTIFICATION_STORE_ID}; - std::shared_ptr pointer = - DistributedKv::AnsTestSingleKvStore::GetMockKvStorePointer(appId, storeId); + std::shared_ptr pointer = + DistributedKv::MockSingleKvStore::GetMockKvStorePointer(appId, storeId); std::vector entries; ASSERT_EQ(NotificationHelper::PublishNotification(request), ERR_OK); @@ -1786,8 +1786,8 @@ HWTEST_F(AnsFWModuleTest, DistributedNotification_Publish_00300, Function | Medi DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID}; DistributedKv::StoreId storeId = {.storeId = KVSTORE_NOTIFICATION_STORE_ID}; - std::shared_ptr pointer = - DistributedKv::AnsTestSingleKvStore::GetMockKvStorePointer(appId, storeId); + std::shared_ptr pointer = + DistributedKv::MockSingleKvStore::GetMockKvStorePointer(appId, storeId); std::vector entries; AppExecFwk::MockSetDistributedNotificationEnabled(false); @@ -1812,8 +1812,8 @@ HWTEST_F(AnsFWModuleTest, DistributedNotification_Cancel_00100, Function | Mediu DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID}; DistributedKv::StoreId storeId = {.storeId = KVSTORE_NOTIFICATION_STORE_ID}; - std::shared_ptr pointer = - DistributedKv::AnsTestSingleKvStore::GetMockKvStorePointer(appId, storeId); + std::shared_ptr pointer = + DistributedKv::MockSingleKvStore::GetMockKvStorePointer(appId, storeId); std::vector entries; ASSERT_EQ(NotificationHelper::PublishNotification(request), ERR_OK); @@ -1840,8 +1840,8 @@ HWTEST_F(AnsFWModuleTest, DistributedNotification_Cancel_00200, Function | Mediu DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID}; DistributedKv::StoreId storeId = {.storeId = KVSTORE_NOTIFICATION_STORE_ID}; - std::shared_ptr pointer = - DistributedKv::AnsTestSingleKvStore::GetMockKvStorePointer(appId, storeId); + std::shared_ptr pointer = + DistributedKv::MockSingleKvStore::GetMockKvStorePointer(appId, storeId); std::vector entries; ASSERT_EQ(NotificationHelper::PublishNotification(request), ERR_OK); @@ -1873,8 +1873,8 @@ HWTEST_F(AnsFWModuleTest, DistributedNotification_Remove_00100, Function | Mediu DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID}; DistributedKv::StoreId storeId = {.storeId = KVSTORE_NOTIFICATION_STORE_ID}; - std::shared_ptr pointer = - DistributedKv::AnsTestSingleKvStore::GetMockKvStorePointer(appId, storeId); + std::shared_ptr pointer = + DistributedKv::MockSingleKvStore::GetMockKvStorePointer(appId, storeId); std::vector entries; ASSERT_EQ(NotificationHelper::PublishNotification(request), ERR_OK); @@ -1903,8 +1903,8 @@ HWTEST_F(AnsFWModuleTest, DistributedNotification_Remove_00200, Function | Mediu DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID}; DistributedKv::StoreId storeId = {.storeId = KVSTORE_NOTIFICATION_STORE_ID}; - std::shared_ptr pointer = - DistributedKv::AnsTestSingleKvStore::GetMockKvStorePointer(appId, storeId); + std::shared_ptr pointer = + DistributedKv::MockSingleKvStore::GetMockKvStorePointer(appId, storeId); std::vector entries; ASSERT_EQ(NotificationHelper::PublishNotification(request), ERR_OK); @@ -1936,8 +1936,8 @@ HWTEST_F(AnsFWModuleTest, DistributedNotification_Remove_00300, Function | Mediu DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID}; DistributedKv::StoreId storeId = {.storeId = KVSTORE_NOTIFICATION_STORE_ID}; - std::shared_ptr pointer = - DistributedKv::AnsTestSingleKvStore::GetMockKvStorePointer(appId, storeId); + std::shared_ptr pointer = + DistributedKv::MockSingleKvStore::GetMockKvStorePointer(appId, storeId); std::vector entries; ASSERT_EQ(NotificationHelper::PublishNotification(request), ERR_OK); @@ -1972,8 +1972,8 @@ HWTEST_F(AnsFWModuleTest, DistributedNotification_Subscribe_00100, Function | Me DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID}; DistributedKv::StoreId storeId = {.storeId = KVSTORE_NOTIFICATION_STORE_ID}; - std::shared_ptr pointer = - DistributedKv::AnsTestSingleKvStore::GetMockKvStorePointer(appId, storeId); + std::shared_ptr pointer = + DistributedKv::MockSingleKvStore::GetMockKvStorePointer(appId, storeId); std::vector entries; TestAnsSubscriber subscriber; @@ -2033,8 +2033,8 @@ HWTEST_F(AnsFWModuleTest, DistributedNotification_Subscribe_00200, Function | Me DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID}; DistributedKv::StoreId storeId = {.storeId = KVSTORE_NOTIFICATION_STORE_ID}; - std::shared_ptr pointer = - DistributedKv::AnsTestSingleKvStore::GetMockKvStorePointer(appId, storeId); + std::shared_ptr pointer = + DistributedKv::MockSingleKvStore::GetMockKvStorePointer(appId, storeId); std::vector entries; TestAnsSubscriber subscriber; @@ -2087,8 +2087,8 @@ HWTEST_F(AnsFWModuleTest, ScreenStatusChange_00100, Function | MediumTest | Leve ANS_LOGI("%{public}s", test_info_->name()); DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID}; DistributedKv::StoreId storeId = {.storeId = KVSTORE_SCREEN_STATUS_STORE_ID}; - std::shared_ptr pointer = - DistributedKv::AnsTestSingleKvStore::GetMockKvStorePointer(appId, storeId); + std::shared_ptr pointer = + DistributedKv::MockSingleKvStore::GetMockKvStorePointer(appId, storeId); DistributedKv::Key key(""); std::vector entries; @@ -2250,8 +2250,8 @@ HWTEST_F(AnsFWModuleTest, DefaultRemindPolicy_00500, Function | MediumTest | Lev DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID}; DistributedKv::StoreId storeId = {.storeId = KVSTORE_NOTIFICATION_STORE_ID}; - std::shared_ptr pointer = - DistributedKv::AnsTestSingleKvStore::GetMockKvStorePointer(appId, storeId); + std::shared_ptr pointer = + DistributedKv::MockSingleKvStore::GetMockKvStorePointer(appId, storeId); TestAnsSubscriber subscriber; EXPECT_EQ(NotificationHelper::SubscribeNotification(subscriber), ERR_OK); @@ -2295,8 +2295,8 @@ HWTEST_F(AnsFWModuleTest, DefaultRemindPolicy_00600, Function | MediumTest | Lev DistributedKv::AppId appId = {.appId = KVSTORE_APP_ID}; DistributedKv::StoreId storeId = {.storeId = KVSTORE_NOTIFICATION_STORE_ID}; - std::shared_ptr pointer = - DistributedKv::AnsTestSingleKvStore::GetMockKvStorePointer(appId, storeId); + std::shared_ptr pointer = + DistributedKv::MockSingleKvStore::GetMockKvStorePointer(appId, storeId); TestAnsSubscriber subscriber; EXPECT_EQ(NotificationHelper::SubscribeNotification(subscriber), ERR_OK); @@ -2321,7 +2321,7 @@ HWTEST_F(AnsFWModuleTest, DefaultRemindPolicy_00600, Function | MediumTest | Lev HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07100, Function | MediumTest | Level1) { - IPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); + MockIPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); TestAnsSubscriber subscriber; EXPECT_EQ(NotificationHelper::SubscribeNotification(subscriber), ERR_OK); @@ -2342,7 +2342,7 @@ HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07100, Function EXPECT_EQ(NotificationHelper::GetAllActiveNotifications(notifications), ERR_OK); EXPECT_NE((int)notifications.size(), (int)0); int32_t id = notifications[0]->GetId(); - IPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); + MockIPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); EXPECT_EQ(NotificationHelper::CancelContinuousTaskNotification(NOTIFICATION_LABEL_0, id), ERR_OK); EXPECT_EQ(NotificationHelper::GetAllActiveNotifications(notifications), ERR_OK); EXPECT_EQ((int)notifications.size(), (int)0); @@ -2355,12 +2355,12 @@ HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07100, Function EXPECT_TRUE(eventParser.GetWaitOnCanceledWithSortingMapAndDeleteReason()); subscriber.ClearEvents(); SleepForFC(); - IPCSkeleton::SetCallingUid(1); + MockIPCSkeleton::SetCallingUid(1); } HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07200, Function | MediumTest | Level1) { - IPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); + MockIPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); TestAnsSubscriber subscriber; EXPECT_EQ(NotificationHelper::SubscribeNotification(subscriber), ERR_OK); @@ -2383,7 +2383,7 @@ HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07200, Function std::string key = notifications[0]->GetKey().c_str(); EXPECT_EQ(NotificationHelper::RemoveNotification(key), (int)ERR_OK); int32_t id = notifications[0]->GetId(); - IPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); + MockIPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); EXPECT_EQ(NotificationHelper::CancelContinuousTaskNotification(NOTIFICATION_LABEL_0, id), ERR_OK); EXPECT_EQ(NotificationHelper::GetAllActiveNotifications(notifications), ERR_OK); EXPECT_EQ((int)notifications.size(), (int)0); @@ -2396,12 +2396,12 @@ HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07200, Function EXPECT_TRUE(eventParser.GetWaitOnCanceledWithSortingMapAndDeleteReason()); subscriber.ClearEvents(); SleepForFC(); - IPCSkeleton::SetCallingUid(1); + MockIPCSkeleton::SetCallingUid(1); } HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07300, Function | MediumTest | Level1) { - IPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); + MockIPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); TestAnsSubscriber subscriber; EXPECT_EQ(NotificationHelper::SubscribeNotification(subscriber), ERR_OK); @@ -2423,7 +2423,7 @@ HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07300, Function EXPECT_NE((int)notifications.size(), (int)0); int32_t id = notifications[0]->GetId(); EXPECT_EQ(NotificationHelper::CancelNotification(id), (int)ERR_ANS_NOTIFICATION_NOT_EXISTS); - IPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); + MockIPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); EXPECT_EQ(NotificationHelper::CancelContinuousTaskNotification(NOTIFICATION_LABEL_0, id), ERR_OK); EXPECT_EQ(NotificationHelper::GetAllActiveNotifications(notifications), ERR_OK); EXPECT_EQ((int)notifications.size(), (int)0); @@ -2436,7 +2436,7 @@ HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07300, Function EXPECT_TRUE(eventParser.GetWaitOnCanceledWithSortingMapAndDeleteReason()); subscriber.ClearEvents(); SleepForFC(); - IPCSkeleton::SetCallingUid(1); + MockIPCSkeleton::SetCallingUid(1); } HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07400, Function | MediumTest | Level1) @@ -2487,7 +2487,7 @@ HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07500, Function HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07600, Function | MediumTest | Level1) { - IPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); + MockIPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); TestAnsSubscriber subscriber; EXPECT_EQ(NotificationHelper::SubscribeNotification(subscriber), ERR_OK); @@ -2512,12 +2512,12 @@ HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07600, Function EXPECT_EQ(NotificationHelper::UnSubscribeNotification(subscriber), ERR_OK); SleepForFC(); subscriber.ClearEvents(); - IPCSkeleton::SetCallingUid(1); + MockIPCSkeleton::SetCallingUid(1); } HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07700, Function | MediumTest | Level1) { - IPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); + MockIPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); TestAnsSubscriber subscriber; EXPECT_EQ(NotificationHelper::SubscribeNotification(subscriber), ERR_OK); @@ -2539,7 +2539,7 @@ HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07700, Function EXPECT_NE((int)notifications.size(), (int)0); int32_t id = notifications[0]->GetId(); EXPECT_EQ(NotificationHelper::CancelAllNotifications(), (int)ERR_OK); - IPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); + MockIPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); EXPECT_EQ(NotificationHelper::GetAllActiveNotifications(notifications), ERR_OK); EXPECT_NE((int)notifications.size(), (int)0); EXPECT_EQ(NotificationHelper::CancelContinuousTaskNotification(NOTIFICATION_LABEL_0, id), ERR_OK); @@ -2554,12 +2554,12 @@ HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07700, Function EXPECT_TRUE(eventParser.GetWaitOnCanceledWithSortingMapAndDeleteReason()); subscriber.ClearEvents(); SleepForFC(); - IPCSkeleton::SetCallingUid(1); + MockIPCSkeleton::SetCallingUid(1); } HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07800, Function | MediumTest | Level1) { - IPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); + MockIPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); TestAnsSubscriber subscriber; EXPECT_EQ(NotificationHelper::SubscribeNotification(subscriber), ERR_OK); @@ -2583,7 +2583,7 @@ HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07800, Function EXPECT_EQ(NotificationHelper::RemoveNotifications(), (int)ERR_OK); EXPECT_EQ(NotificationHelper::GetAllActiveNotifications(notifications), ERR_OK); EXPECT_NE((int)notifications.size(), (int)0); - IPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); + MockIPCSkeleton::SetCallingUid(SYSTEM_SERVICE_UID); EXPECT_EQ(NotificationHelper::CancelContinuousTaskNotification(NOTIFICATION_LABEL_0, id), ERR_OK); EXPECT_EQ(NotificationHelper::GetAllActiveNotifications(notifications), ERR_OK); EXPECT_EQ((int)notifications.size(), (int)0); @@ -2596,7 +2596,7 @@ HWTEST_F(AnsFWModuleTest, ANS_Interface_MT_PublishContinuousTask_07800, Function EXPECT_TRUE(eventParser.GetWaitOnCanceledWithSortingMapAndDeleteReason()); subscriber.ClearEvents(); SleepForFC(); - IPCSkeleton::SetCallingUid(1); + MockIPCSkeleton::SetCallingUid(1); } } // namespace Notification } // namespace OHOS \ No newline at end of file diff --git a/frameworks/ans/test/moduletest/ans_innerkits_module_publish_test.cpp b/frameworks/test/moduletest/ans_innerkits_module_publish_test.cpp similarity index 97% rename from frameworks/ans/test/moduletest/ans_innerkits_module_publish_test.cpp rename to frameworks/test/moduletest/ans_innerkits_module_publish_test.cpp index 505128d9..b9cb493d 100644 --- a/frameworks/ans/test/moduletest/ans_innerkits_module_publish_test.cpp +++ b/frameworks/test/moduletest/ans_innerkits_module_publish_test.cpp @@ -412,7 +412,7 @@ class CompletedCallbackTest : public AbilityRuntime::WantAgent::CompletedCallbac } }; -class AnsInterfaceModulePublishTest : public testing::Test { +class AnsInnerKitsModulePublishTest : public testing::Test { public: static void SetUpTestCase(); static void TearDownTestCase(); @@ -424,21 +424,21 @@ public: void CheckJsonConverter(const NotificationRequest *request); }; -void AnsInterfaceModulePublishTest::SetUpTestCase() +void AnsInnerKitsModulePublishTest::SetUpTestCase() { sptr service = OHOS::Notification::AdvancedNotificationService::GetInstance(); OHOS::ISystemAbilityManager::SAExtraProp saExtraProp; systemAbilityManager->AddSystemAbility(OHOS::ADVANCED_NOTIFICATION_SERVICE_ABILITY_ID, service, saExtraProp); - IPCSkeleton::SetCallingUid(CALLING_UID); + MockIPCSkeleton::SetCallingUid(CALLING_UID); } -void AnsInterfaceModulePublishTest::TearDownTestCase() +void AnsInnerKitsModulePublishTest::TearDownTestCase() {} -void AnsInterfaceModulePublishTest::SetUp() +void AnsInnerKitsModulePublishTest::SetUp() {} -void AnsInterfaceModulePublishTest::TearDown() +void AnsInnerKitsModulePublishTest::TearDown() { OnConsumedReceived = false; g_subscribe_mtx.unlock(); @@ -446,7 +446,7 @@ void AnsInterfaceModulePublishTest::TearDown() g_unsubscribe_mtx.unlock(); } -void AnsInterfaceModulePublishTest::WaitOnSubscribeResult() +void AnsInnerKitsModulePublishTest::WaitOnSubscribeResult() { struct tm subscribeTime = {0}; EXPECT_EQ(OHOS::GetSystemCurrentTime(&subscribeTime), true); @@ -463,7 +463,7 @@ void AnsInterfaceModulePublishTest::WaitOnSubscribeResult() } } -void AnsInterfaceModulePublishTest::WaitOnConsumed() +void AnsInnerKitsModulePublishTest::WaitOnConsumed() { struct tm publishTime = {0}; EXPECT_EQ(OHOS::GetSystemCurrentTime(&publishTime), true); @@ -481,7 +481,7 @@ void AnsInterfaceModulePublishTest::WaitOnConsumed() EXPECT_EQ(OnConsumedReceived, true); } -void AnsInterfaceModulePublishTest::WaitOnUnsubscribeResult() +void AnsInnerKitsModulePublishTest::WaitOnUnsubscribeResult() { struct tm unsubscribeTime = {0}; EXPECT_EQ(OHOS::GetSystemCurrentTime(&unsubscribeTime), true); @@ -498,7 +498,7 @@ void AnsInterfaceModulePublishTest::WaitOnUnsubscribeResult() } } -void AnsInterfaceModulePublishTest::CheckJsonConverter(const NotificationRequest *request) +void AnsInnerKitsModulePublishTest::CheckJsonConverter(const NotificationRequest *request) { nlohmann::json jsonObject; auto ret0 = NotificationJsonConverter::ConvertToJson(request, jsonObject); @@ -540,7 +540,7 @@ void AnsInterfaceModulePublishTest::CheckJsonConverter(const NotificationRequest * @tc.desc : Add notification slot(type is OTHER), make a subscriber and publish a media notification. * @tc.expected : Add notification slot success, make a subscriber and publish a media notification success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00100, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_00100, Function | MediumTest | Level1) { GTEST_LOG_(INFO) << "ANS_Interface_MT_Publish_00100 start ==========>"; NotificationSlot slot(NotificationConstant::OTHER); @@ -624,7 +624,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00100, Function * @tc.expected : Add notification slot success, make a subscriber and publish a local notification with input box * success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00200, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_00200, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::OTHER); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); @@ -686,7 +686,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00200, Function * @tc.expected : Add notification slot success, make a subscriber and publish a local notification with ActionButton * success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00300, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_00300, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::OTHER); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); @@ -739,7 +739,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00300, Function * @tc.expected : Add notification slot success, make a subscriber and publish a local conversation notification * success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00400, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_00400, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::OTHER); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); @@ -790,7 +790,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00400, Function * @tc.desc : Add notification slot(type is OTHER), make a subscriber and publish a local multiline notification. * @tc.expected : Add notification slot success, make a subscriber and publish a local multiline notification success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00500, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_00500, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::OTHER); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); @@ -829,7 +829,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00500, Function * @tc.desc : Add notification slot(type is OTHER), make a subscriber and publish a local picture notification. * @tc.expected : Add notification slot success, make a subscriber and publish a local picture notification success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00600, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_00600, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::OTHER); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); @@ -868,7 +868,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00600, Function * @tc.desc : Add notification slot(type is OTHER), make a subscriber and publish a local long text notification. * @tc.expected : Add notification slot success, make a subscriber and publish a local long text notification success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00700, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_00700, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::OTHER); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); @@ -909,7 +909,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00700, Function * notification. * @tc.expected : Add notification slot success, make a subscriber and publish a local normal notification success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00800, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_00800, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::CONTENT_INFORMATION); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); @@ -953,7 +953,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00800, Function * notification. * @tc.expected : Add notification slot success, make a subscriber and publish a local normal notification success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00900, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_00900, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::OTHER); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); @@ -1000,7 +1000,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_00900, Function * notification. * @tc.expected : Add notification slot success, make a subscriber and publish a local normal notification success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_01000, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_01000, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::SERVICE_REMINDER); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); @@ -1034,7 +1034,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_01000, Function * notification. * @tc.expected : Add notification slot success, make a subscriber and publish a local normal notification success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_02000, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_02000, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::SOCIAL_COMMUNICATION); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); @@ -1066,7 +1066,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_02000, Function * notification. * @tc.expected : Add notification slot success, make a subscriber and publish a local normal notification success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_03000, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_03000, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::CUSTOM); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); @@ -1099,7 +1099,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_03000, Function * notification. * @tc.expected : Add notification slot success, make a subscriber and publish a local group notification success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_07000, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_07000, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::SOCIAL_COMMUNICATION); slot.EnableBypassDnd(true); @@ -1135,7 +1135,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_07000, Function * @tc.expected : Get the active notifications success and the number of active notifications of the current * application is right. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_GetActiveNotifications_00100, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_GetActiveNotifications_00100, Function | MediumTest | Level1) { auto subscriber = TestAnsSubscriber(); NotificationSubscribeInfo info = NotificationSubscribeInfo(); @@ -1196,7 +1196,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_GetActiveNotifications_ * @tc.desc : Cancel the notifications of the same group. * @tc.expected : All notifications of the same group have been cancelled. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_CancelGroup_10100, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_CancelGroup_10100, Function | MediumTest | Level1) { NotificationSubscribeInfo info = NotificationSubscribeInfo(); info.AddAppName("bundleName"); @@ -1269,7 +1269,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_CancelGroup_10100, Func * @tc.desc : Add notification slot(type is OTHER), make a subscriber and publish a template notification. * @tc.expected : Add notification slot success, make a subscriber and publish a ltemplate notification success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_04000, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_04000, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::OTHER); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); @@ -1314,7 +1314,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_04000, Function * @tc.desc : . * @tc.expected : . */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_08000, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_08000, Function | MediumTest | Level1) { GTEST_LOG_(INFO) << "ANS_Interface_MT_Publish_08000::convert Json start ############==========>"; @@ -1382,7 +1382,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_08000, Function * @tc.desc : Add notification slot(type is OTHER), make a subscriber and publish a flags notification. * @tc.expected : Add notification slot success, make a subscriber and publish a flags notification success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_05000, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_05000, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::OTHER); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); @@ -1422,7 +1422,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_05000, Function * @tc.desc : Add notification slot(type is OTHER), make a subscriber and publish a flags notification. * @tc.expected : Add notification slot success, make a subscriber and publish default flags notification success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_06000, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_06000, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::OTHER); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); @@ -1457,7 +1457,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Publish_06000, Function * make a subscriber and publish a flags notification. * @tc.expected : Add notification slot success, make a subscriber and publish default flags notification success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Slot_Enalbe_00100, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Slot_Enalbe_00100, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::CONTENT_INFORMATION); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); @@ -1487,7 +1487,7 @@ HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Slot_Enalbe_00100, Func * @tc.desc : Add notification slot(type is SERVICE_REMINDER), make a subscriber and publish a flags notification. * @tc.expected : Add notification slot success, make a subscriber and publish default flags notification success. */ -HWTEST_F(AnsInterfaceModulePublishTest, ANS_Interface_MT_Slot_Enalbe_00200, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Slot_Enalbe_00200, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::SERVICE_REMINDER); EXPECT_EQ(0, NotificationHelper::AddNotificationSlot(slot)); diff --git a/frameworks/ans/test/moduletest/ans_innerkits_module_setting_test.cpp b/frameworks/test/moduletest/ans_innerkits_module_setting_test.cpp similarity index 90% rename from frameworks/ans/test/moduletest/ans_innerkits_module_setting_test.cpp rename to frameworks/test/moduletest/ans_innerkits_module_setting_test.cpp index 726b6d3b..22848504 100644 --- a/frameworks/ans/test/moduletest/ans_innerkits_module_setting_test.cpp +++ b/frameworks/test/moduletest/ans_innerkits_module_setting_test.cpp @@ -32,7 +32,7 @@ static sptr systemAbilityManager = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); const int32_t CALLING_UID = 9998; -class AnsInterfaceModuleSettingTest : public testing::Test { +class AnsInnerKitsModuleSettingTest : public testing::Test { public: static void SetUpTestCase(); static void TearDownTestCase(); @@ -40,21 +40,21 @@ public: void TearDown(); }; -void AnsInterfaceModuleSettingTest::SetUpTestCase() +void AnsInnerKitsModuleSettingTest::SetUpTestCase() { sptr service = OHOS::Notification::AdvancedNotificationService::GetInstance(); OHOS::ISystemAbilityManager::SAExtraProp saExtraProp; systemAbilityManager->AddSystemAbility(OHOS::ADVANCED_NOTIFICATION_SERVICE_ABILITY_ID, service, saExtraProp); - IPCSkeleton::SetCallingUid(CALLING_UID); + MockIPCSkeleton::SetCallingUid(CALLING_UID); } -void AnsInterfaceModuleSettingTest::TearDownTestCase() +void AnsInnerKitsModuleSettingTest::TearDownTestCase() {} -void AnsInterfaceModuleSettingTest::SetUp() +void AnsInnerKitsModuleSettingTest::SetUp() {} -void AnsInterfaceModuleSettingTest::TearDown() +void AnsInnerKitsModuleSettingTest::TearDown() {} /** @@ -63,7 +63,7 @@ void AnsInterfaceModuleSettingTest::TearDown() * @tc.desc : Set a specified application to show badge, get the specified application can show badge. * @tc.expected : Set a specified application to show badge success, get the specified application can show badge. */ -HWTEST_F(AnsInterfaceModuleSettingTest, ANS_Interface_MT_NotificationSetting_00100, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSettingTest, ANS_Interface_MT_NotificationSetting_00100, Function | MediumTest | Level1) { NotificationBundleOption bundleOption; bundleOption.SetBundleName("bundlename"); @@ -84,7 +84,7 @@ HWTEST_F(AnsInterfaceModuleSettingTest, ANS_Interface_MT_NotificationSetting_001 * @tc.expected : Set a specified application do not show badge success, get the specified application can not show * badge. */ -HWTEST_F(AnsInterfaceModuleSettingTest, ANS_Interface_MT_NotificationSetting_00200, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSettingTest, ANS_Interface_MT_NotificationSetting_00200, Function | MediumTest | Level1) { NotificationBundleOption bundleOption("bundlename", CALLING_UID); EXPECT_EQ(0, NotificationHelper::SetShowBadgeEnabledForBundle(bundleOption, false)); @@ -103,7 +103,7 @@ HWTEST_F(AnsInterfaceModuleSettingTest, ANS_Interface_MT_NotificationSetting_002 * @tc.expected : Set a specified application can publish notification success, get the specified application can * publish notification. */ -HWTEST_F(AnsInterfaceModuleSettingTest, ANS_Interface_MT_NotificationSetting_00300, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSettingTest, ANS_Interface_MT_NotificationSetting_00300, Function | MediumTest | Level1) { NotificationBundleOption bundleOption("bundlename", CALLING_UID); std::string deviceId; @@ -123,7 +123,7 @@ HWTEST_F(AnsInterfaceModuleSettingTest, ANS_Interface_MT_NotificationSetting_003 * @tc.expected : Set a specified application do not publish notification success, get the specified application can * not publish notification. */ -HWTEST_F(AnsInterfaceModuleSettingTest, ANS_Interface_MT_NotificationSetting_00400, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSettingTest, ANS_Interface_MT_NotificationSetting_00400, Function | MediumTest | Level1) { NotificationBundleOption bundleOption("bundlename", CALLING_UID); std::string deviceId; @@ -141,7 +141,7 @@ HWTEST_F(AnsInterfaceModuleSettingTest, ANS_Interface_MT_NotificationSetting_004 * @tc.desc : If the template configuration file does not exist, query whether the template exists. * @tc.expected : Query return failed. */ -HWTEST_F(AnsInterfaceModuleSettingTest, ANS_Interface_MT_NotificationSetting_00500, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSettingTest, ANS_Interface_MT_NotificationSetting_00500, Function | MediumTest | Level1) { std::string templateName("process"); bool support = false; @@ -156,7 +156,7 @@ HWTEST_F(AnsInterfaceModuleSettingTest, ANS_Interface_MT_NotificationSetting_005 * @tc.desc : The template does not exist in the system, query whether the template exists. * @tc.expected : Query return failed. */ -HWTEST_F(AnsInterfaceModuleSettingTest, ANS_Interface_MT_NotificationSetting_00700, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSettingTest, ANS_Interface_MT_NotificationSetting_00700, Function | MediumTest | Level1) { std::string templateName("template123"); bool support = false; diff --git a/frameworks/ans/test/moduletest/ans_innerkits_module_slot_test.cpp b/frameworks/test/moduletest/ans_innerkits_module_slot_test.cpp similarity index 95% rename from frameworks/ans/test/moduletest/ans_innerkits_module_slot_test.cpp rename to frameworks/test/moduletest/ans_innerkits_module_slot_test.cpp index 07139983..1605499a 100644 --- a/frameworks/ans/test/moduletest/ans_innerkits_module_slot_test.cpp +++ b/frameworks/test/moduletest/ans_innerkits_module_slot_test.cpp @@ -33,7 +33,7 @@ static sptr systemAbilityManager = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); const int32_t CALLING_UID = 9998; -class AnsInterfaceModuleSlotTest : public testing::Test { +class AnsInnerKitsModuleSlotTest : public testing::Test { public: static void SetUpTestCase(); static void TearDownTestCase(); @@ -41,21 +41,21 @@ public: void TearDown(); }; -void AnsInterfaceModuleSlotTest::SetUpTestCase() +void AnsInnerKitsModuleSlotTest::SetUpTestCase() { sptr service = OHOS::Notification::AdvancedNotificationService::GetInstance(); OHOS::ISystemAbilityManager::SAExtraProp saExtraProp; systemAbilityManager->AddSystemAbility(OHOS::ADVANCED_NOTIFICATION_SERVICE_ABILITY_ID, service, saExtraProp); - IPCSkeleton::SetCallingUid(CALLING_UID); + MockIPCSkeleton::SetCallingUid(CALLING_UID); } -void AnsInterfaceModuleSlotTest::TearDownTestCase() +void AnsInnerKitsModuleSlotTest::TearDownTestCase() {} -void AnsInterfaceModuleSlotTest::SetUp() +void AnsInnerKitsModuleSlotTest::SetUp() {} -void AnsInterfaceModuleSlotTest::TearDown() +void AnsInnerKitsModuleSlotTest::TearDown() {} /** @@ -65,7 +65,7 @@ void AnsInterfaceModuleSlotTest::TearDown() * slot. * @tc.expected : Add notification slot success, get notification slot correctly and remove notification slot success. */ -HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00100, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSlotTest, ANS_Interface_MT_NotificationSlot_00100, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::SOCIAL_COMMUNICATION); slot.SetEnableLight(true); @@ -116,7 +116,7 @@ HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00100, Fu * @tc.desc : Add notification slot(type is SERVICE_REMINDER), get notification slot and remove notification slot. * @tc.expected : Add notification slot success, get notification slot correctly and remove notification slot success. */ -HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00200, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSlotTest, ANS_Interface_MT_NotificationSlot_00200, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::SERVICE_REMINDER); slot.SetEnableLight(true); @@ -167,7 +167,7 @@ HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00200, Fu * slot. * @tc.expected : Add notification slot success, get notification slot correctly and remove notification slot success. */ -HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00300, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSlotTest, ANS_Interface_MT_NotificationSlot_00300, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::CONTENT_INFORMATION); slot.SetEnableLight(true); @@ -217,7 +217,7 @@ HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00300, Fu * @tc.desc : Add notification slot(type is OTHER), get notification slot and remove notification slot. * @tc.expected : Add notification slot success, get notification slot correctly and remove notification slot success. */ -HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00400, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSlotTest, ANS_Interface_MT_NotificationSlot_00400, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::OTHER); slot.SetEnableLight(true); @@ -268,7 +268,7 @@ HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00400, Fu * characters, get notification slot and remove notification slot. * @tc.expected : Add notification slot success, get notification slot correctly and remove notification slot success. */ -HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00500, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSlotTest, ANS_Interface_MT_NotificationSlot_00500, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::OTHER); slot.SetEnableLight(true); @@ -321,7 +321,7 @@ HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00500, Fu * @tc.desc : Create notification slot(type is SOCIAL_COMMUNICATION), get sound and vibration. * @tc.expected : Create notification slot success, get sound and vibration success. */ -HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00600, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSlotTest, ANS_Interface_MT_NotificationSlot_00600, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::SOCIAL_COMMUNICATION); EXPECT_EQ("SOCIAL_COMMUNICATION", slot.GetName()); @@ -338,7 +338,7 @@ HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00600, Fu * @tc.desc : Create notification slot(type is SERVICE_REMINDER), get sound and vibration. * @tc.expected : Create notification slot success, get sound and vibration success. */ -HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00700, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSlotTest, ANS_Interface_MT_NotificationSlot_00700, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::SERVICE_REMINDER); EXPECT_EQ("SERVICE_REMINDER", slot.GetName()); @@ -355,7 +355,7 @@ HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00700, Fu * @tc.desc : Create notification slot(type is CONTENT_INFORMATION), get sound and vibration. * @tc.expected : Create notification slot success, get sound and vibration success. */ -HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00800, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSlotTest, ANS_Interface_MT_NotificationSlot_00800, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::CONTENT_INFORMATION); EXPECT_EQ("CONTENT_INFORMATION", slot.GetName()); @@ -372,7 +372,7 @@ HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00800, Fu * @tc.desc : Create notification slot(type is OTHER), get sound and vibration. * @tc.expected : Create notification slot success, get sound and vibration success. */ -HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00900, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSlotTest, ANS_Interface_MT_NotificationSlot_00900, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::OTHER); EXPECT_EQ("OTHER", slot.GetName()); @@ -390,7 +390,7 @@ HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlot_00900, Fu * @tc.expected : Add notification slot group success, get notification slot group correctly and remove notification * slot group success. */ -HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlotGroup_00100, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSlotTest, ANS_Interface_MT_NotificationSlotGroup_00100, Function | MediumTest | Level1) { NotificationSlotGroup slotGroup("id", "name"); slotGroup.SetDescription("description"); @@ -420,7 +420,7 @@ HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlotGroup_0010 * @tc.expected : Add notification slot group success, get notification slot group correctly and remove notification * slot group success. */ -HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlotGroup_00200, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSlotTest, ANS_Interface_MT_NotificationSlotGroup_00200, Function | MediumTest | Level1) { NotificationSlotGroup slotGroup("id", "name"); std::string description(2000, 'c'); @@ -451,7 +451,7 @@ HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlotGroup_0020 * @tc.desc : Two different slots added to the same slot group. * @tc.expected : Add success. */ -HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlotGroup_00300, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSlotTest, ANS_Interface_MT_NotificationSlotGroup_00300, Function | MediumTest | Level1) { NotificationSlot slotA(NotificationConstant::OTHER); slotA.SetSlotGroup("id"); @@ -491,7 +491,7 @@ HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_NotificationSlotGroup_0030 * set and get slot enable. * @tc.expected : Add notification slot success, slot default enalbe is true, get is the same as setting. */ -HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_SetEnabledForBundleSlot_00100, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSlotTest, ANS_Interface_MT_SetEnabledForBundleSlot_00100, Function | MediumTest | Level1) { NotificationSlot slot(NotificationConstant::SOCIAL_COMMUNICATION); slot.SetEnableLight(true); @@ -524,7 +524,7 @@ HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_SetEnabledForBundleSlot_00 * @tc.desc : Add slot when there is no type slot, add it. (SOCIAL_COMMUNICATION) * @tc.expected : Set success, and get success. */ -HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_SetEnabledForBundleSlot_00200, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSlotTest, ANS_Interface_MT_SetEnabledForBundleSlot_00200, Function | MediumTest | Level1) { bool enable = true; NotificationBundleOption bo("bundleName", CALLING_UID); @@ -545,7 +545,7 @@ HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_SetEnabledForBundleSlot_00 * @tc.desc : Add slot when there is no type slot, add it. (SERVICE_REMINDER) * @tc.expected : Set false, and get false. */ -HWTEST_F(AnsInterfaceModuleSlotTest, ANS_Interface_MT_SetEnabledForBundleSlot_00300, Function | MediumTest | Level1) +HWTEST_F(AnsInnerKitsModuleSlotTest, ANS_Interface_MT_SetEnabledForBundleSlot_00300, Function | MediumTest | Level1) { bool enable = false; NotificationBundleOption bo("bundleName", CALLING_UID); diff --git a/frameworks/ans/test/moduletest/config.json b/frameworks/test/moduletest/config.json similarity index 100% rename from frameworks/ans/test/moduletest/config.json rename to frameworks/test/moduletest/config.json diff --git a/frameworks/ans/test/moduletest/mock/blob.cpp b/frameworks/test/moduletest/mock/blob.cpp similarity index 100% rename from frameworks/ans/test/moduletest/mock/blob.cpp rename to frameworks/test/moduletest/mock/blob.cpp diff --git a/frameworks/ans/test/moduletest/mock/distributed_kv_data_manager.cpp b/frameworks/test/moduletest/mock/distributed_kv_data_manager.cpp similarity index 93% rename from frameworks/ans/test/moduletest/mock/distributed_kv_data_manager.cpp rename to frameworks/test/moduletest/mock/distributed_kv_data_manager.cpp index cc1b371d..eeb97581 100644 --- a/frameworks/ans/test/moduletest/mock/distributed_kv_data_manager.cpp +++ b/frameworks/test/moduletest/mock/distributed_kv_data_manager.cpp @@ -31,8 +31,8 @@ Status DistributedKvDataManager::GetSingleKvStore(const Options &options, const std::shared_ptr &kvStore) { std::string storeIdTmp = storeId.storeId; - kvStore = std::make_shared(); - AnsTestSingleKvStore::InsertMockKvStore(appId, storeId, kvStore); + kvStore = std::make_shared(); + MockSingleKvStore::InsertMockKvStore(appId, storeId, kvStore); return Status::SUCCESS; } @@ -48,7 +48,7 @@ Status DistributedKvDataManager::CloseKvStore(const AppId &appId, std::shared_pt Status DistributedKvDataManager::DeleteKvStore(const AppId &appId, const StoreId &storeId) { - AnsTestSingleKvStore::RemoveMockKvStore(appId, storeId); + MockSingleKvStore::RemoveMockKvStore(appId, storeId); return Status::SUCCESS; } diff --git a/frameworks/ans/test/moduletest/mock/include/mock_bundle_manager.h b/frameworks/test/moduletest/mock/include/mock_bundle_manager.h similarity index 99% rename from frameworks/ans/test/moduletest/mock/include/mock_bundle_manager.h rename to frameworks/test/moduletest/mock/include/mock_bundle_manager.h index c9ce5c3a..564eef74 100644 --- a/frameworks/ans/test/moduletest/mock/include/mock_bundle_manager.h +++ b/frameworks/test/moduletest/mock/include/mock_bundle_manager.h @@ -28,12 +28,12 @@ namespace OHOS { namespace AppExecFwk { -class MockBundleMgrService : public BundleMgrHost { +class MockBundleManager : public BundleMgrHost { public: - MockBundleMgrService() + MockBundleManager() {} - ~MockBundleMgrService() + ~MockBundleManager() {} /** diff --git a/frameworks/ans/test/moduletest/mock/include/mock_ipc_skeleton.h b/frameworks/test/moduletest/mock/include/mock_ipc_skeleton.h similarity index 95% rename from frameworks/ans/test/moduletest/mock/include/mock_ipc_skeleton.h rename to frameworks/test/moduletest/mock/include/mock_ipc_skeleton.h index 4d825c97..daa5f1da 100644 --- a/frameworks/ans/test/moduletest/mock/include/mock_ipc_skeleton.h +++ b/frameworks/test/moduletest/mock/include/mock_ipc_skeleton.h @@ -19,10 +19,10 @@ #include "iremote_object.h" namespace OHOS { -class IPCSkeleton { +class MockIPCSkeleton { public: - IPCSkeleton() = default; - ~IPCSkeleton() = default; + MockIPCSkeleton() = default; + ~MockIPCSkeleton() = default; /** * @brief Set the max number of work thread. @@ -83,7 +83,7 @@ public: * * @return Indicates the instance. */ - static IPCSkeleton &GetInstance(); + static MockIPCSkeleton &GetInstance(); /** * @brief Get the object of context. diff --git a/frameworks/ans/test/moduletest/mock/include/mock_single_kv_store.h b/frameworks/test/moduletest/mock/include/mock_single_kv_store.h similarity index 98% rename from frameworks/ans/test/moduletest/mock/include/mock_single_kv_store.h rename to frameworks/test/moduletest/mock/include/mock_single_kv_store.h index 4b6b6cea..ffae6b4b 100644 --- a/frameworks/ans/test/moduletest/mock/include/mock_single_kv_store.h +++ b/frameworks/test/moduletest/mock/include/mock_single_kv_store.h @@ -30,7 +30,7 @@ namespace OHOS { namespace DistributedKv { -class AnsTestSingleKvStore : public SingleKvStore { +class MockSingleKvStore : public SingleKvStore { public: /** * @brief Get all entries in this store which key start with prefixKey. @@ -329,7 +329,7 @@ public: * @param storeId Indicates the id of store. * @return Indicates the kvstore. */ - static std::shared_ptr GetMockKvStorePointer(AppId appId, StoreId storeId); + static std::shared_ptr GetMockKvStorePointer(AppId appId, StoreId storeId); struct Compare { bool operator()(const Key &a, const Key &b) const { @@ -364,7 +364,7 @@ private: static std::mutex mutex_; static std::map, std::shared_ptr> kvStoreMap_; std::shared_ptr observer_; - std::map kvstore_; + std::map kvstore_; }; } // namespace DistributedKv } // namespace OHOS diff --git a/frameworks/ans/test/moduletest/mock/mock_accesstoken_kit.cpp b/frameworks/test/moduletest/mock/mock_accesstoken_kit.cpp similarity index 100% rename from frameworks/ans/test/moduletest/mock/mock_accesstoken_kit.cpp rename to frameworks/test/moduletest/mock/mock_accesstoken_kit.cpp diff --git a/frameworks/ans/test/moduletest/mock/mock_bundle_manager.cpp b/frameworks/test/moduletest/mock/mock_bundle_manager.cpp similarity index 88% rename from frameworks/ans/test/moduletest/mock/mock_bundle_manager.cpp rename to frameworks/test/moduletest/mock/mock_bundle_manager.cpp index 5d1d97a7..5c3a8f11 100644 --- a/frameworks/ans/test/moduletest/mock/mock_bundle_manager.cpp +++ b/frameworks/test/moduletest/mock/mock_bundle_manager.cpp @@ -21,13 +21,13 @@ namespace OHOS { namespace AppExecFwk { constexpr int SYSTEM_APP_UUID = 1000; -void MockBundleMgrService::MockSetIsSystemApp(bool isSystemApp) +void MockBundleManager::MockSetIsSystemApp(bool isSystemApp) { isSystemAppMock_ = true; isSystemApp_ = isSystemApp; } -bool MockBundleMgrService::CheckIsSystemAppByUid(const int uid) +bool MockBundleManager::CheckIsSystemAppByUid(const int uid) { if (isSystemAppMock_) { return isSystemApp_; diff --git a/frameworks/ans/test/moduletest/mock/mock_bundle_manager_helper.cpp b/frameworks/test/moduletest/mock/mock_bundle_manager_helper.cpp similarity index 100% rename from frameworks/ans/test/moduletest/mock/mock_bundle_manager_helper.cpp rename to frameworks/test/moduletest/mock/mock_bundle_manager_helper.cpp diff --git a/frameworks/ans/test/moduletest/mock/mock_bundle_mgr_proxy.cpp b/frameworks/test/moduletest/mock/mock_bundle_mgr_proxy.cpp similarity index 100% rename from frameworks/ans/test/moduletest/mock/mock_bundle_mgr_proxy.cpp rename to frameworks/test/moduletest/mock/mock_bundle_mgr_proxy.cpp diff --git a/frameworks/ans/test/moduletest/mock/mock_change_notification.cpp b/frameworks/test/moduletest/mock/mock_change_notification.cpp similarity index 100% rename from frameworks/ans/test/moduletest/mock/mock_change_notification.cpp rename to frameworks/test/moduletest/mock/mock_change_notification.cpp diff --git a/frameworks/ans/test/moduletest/mock/mock_common_event_data.cpp b/frameworks/test/moduletest/mock/mock_common_event_data.cpp similarity index 100% rename from frameworks/ans/test/moduletest/mock/mock_common_event_data.cpp rename to frameworks/test/moduletest/mock/mock_common_event_data.cpp diff --git a/frameworks/ans/test/moduletest/mock/mock_common_event_manager.cpp b/frameworks/test/moduletest/mock/mock_common_event_manager.cpp similarity index 100% rename from frameworks/ans/test/moduletest/mock/mock_common_event_manager.cpp rename to frameworks/test/moduletest/mock/mock_common_event_manager.cpp diff --git a/frameworks/ans/test/moduletest/mock/mock_event_handler.cpp b/frameworks/test/moduletest/mock/mock_event_handler.cpp similarity index 100% rename from frameworks/ans/test/moduletest/mock/mock_event_handler.cpp rename to frameworks/test/moduletest/mock/mock_event_handler.cpp diff --git a/frameworks/ans/test/moduletest/mock/mock_ipc.cpp b/frameworks/test/moduletest/mock/mock_ipc.cpp similarity index 87% rename from frameworks/ans/test/moduletest/mock/mock_ipc.cpp rename to frameworks/test/moduletest/mock/mock_ipc.cpp index 925cb455..102f1665 100644 --- a/frameworks/ans/test/moduletest/mock/mock_ipc.cpp +++ b/frameworks/test/moduletest/mock/mock_ipc.cpp @@ -22,18 +22,18 @@ using namespace IPC_SINGLE; int uid_ = 1; -int IPCSkeleton::GetCallingUid() +int MockIPCSkeleton::GetCallingUid() { return uid_; } -int IPCSkeleton::GetCallingPid() +int MockIPCSkeleton::GetCallingPid() { uid_ = 1; return uid_; } -void IPCSkeleton::SetCallingUid(int uid) +void MockIPCSkeleton::SetCallingUid(int uid) { uid_ = uid; } diff --git a/frameworks/ans/test/moduletest/mock/mock_message_parcel.cpp b/frameworks/test/moduletest/mock/mock_message_parcel.cpp similarity index 100% rename from frameworks/ans/test/moduletest/mock/mock_message_parcel.cpp rename to frameworks/test/moduletest/mock/mock_message_parcel.cpp diff --git a/frameworks/ans/test/moduletest/mock/mock_single_kv_store.cpp b/frameworks/test/moduletest/mock/mock_single_kv_store.cpp similarity index 60% rename from frameworks/ans/test/moduletest/mock/mock_single_kv_store.cpp rename to frameworks/test/moduletest/mock/mock_single_kv_store.cpp index 899a0ed5..07e54579 100644 --- a/frameworks/ans/test/moduletest/mock/mock_single_kv_store.cpp +++ b/frameworks/test/moduletest/mock/mock_single_kv_store.cpp @@ -19,33 +19,33 @@ namespace OHOS { namespace DistributedKv { -std::mutex AnsTestSingleKvStore::mutex_; -std::map, std::shared_ptr> AnsTestSingleKvStore::kvStoreMap_; +std::mutex MockSingleKvStore::mutex_; +std::map, std::shared_ptr> MockSingleKvStore::kvStoreMap_; -void AnsTestSingleKvStore::InsertMockKvStore(AppId appId, StoreId storeId, std::shared_ptr store) +void MockSingleKvStore::InsertMockKvStore(AppId appId, StoreId storeId, std::shared_ptr store) { std::lock_guard lock(mutex_); kvStoreMap_[std::pair(appId.appId, storeId.storeId)] = store; } -void AnsTestSingleKvStore::RemoveMockKvStore(AppId appId, StoreId storeId) +void MockSingleKvStore::RemoveMockKvStore(AppId appId, StoreId storeId) { kvStoreMap_.erase(std::pair(appId.appId, storeId.storeId)); } -std::shared_ptr AnsTestSingleKvStore::GetMockKvStorePointer(AppId appId, StoreId storeId) +std::shared_ptr MockSingleKvStore::GetMockKvStorePointer(AppId appId, StoreId storeId) { for (auto kvstore : kvStoreMap_) { if (kvstore.first == std::pair(appId.appId, storeId.storeId)) { - return std::static_pointer_cast(kvstore.second); + return std::static_pointer_cast(kvstore.second); } } return nullptr; } -void AnsTestSingleKvStore::InsertDataToDoCallback(const Key &key, const Value &value) +void MockSingleKvStore::InsertDataToDoCallback(const Key &key, const Value &value) { Put(key, value); if (observer_ != nullptr) { @@ -62,7 +62,7 @@ void AnsTestSingleKvStore::InsertDataToDoCallback(const Key &key, const Value &v } } -void AnsTestSingleKvStore::UpdateDataToDoCallback(const Key &key, const Value &value) +void MockSingleKvStore::UpdateDataToDoCallback(const Key &key, const Value &value) { Put(key, value); if (observer_ != nullptr) { @@ -79,7 +79,7 @@ void AnsTestSingleKvStore::UpdateDataToDoCallback(const Key &key, const Value &v } } -void AnsTestSingleKvStore::DeleteDataToDoCallback(const Key &key) +void MockSingleKvStore::DeleteDataToDoCallback(const Key &key) { Value value; Get(key, value); @@ -98,7 +98,7 @@ void AnsTestSingleKvStore::DeleteDataToDoCallback(const Key &key) } } -Status AnsTestSingleKvStore::GetEntries(const Key &prefixKey, std::vector &entries) const +Status MockSingleKvStore::GetEntries(const Key &prefixKey, std::vector &entries) const { entries.clear(); @@ -114,52 +114,52 @@ Status AnsTestSingleKvStore::GetEntries(const Key &prefixKey, std::vector return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetEntries(const DataQuery &query, std::vector &entries) const +Status MockSingleKvStore::GetEntries(const DataQuery &query, std::vector &entries) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetResultSet(const Key &prefixKey, std::shared_ptr &resultSet) const +Status MockSingleKvStore::GetResultSet(const Key &prefixKey, std::shared_ptr &resultSet) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetResultSet(const DataQuery &query, std::shared_ptr &resultSet) const +Status MockSingleKvStore::GetResultSet(const DataQuery &query, std::shared_ptr &resultSet) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::CloseResultSet(std::shared_ptr &resultSet) +Status MockSingleKvStore::CloseResultSet(std::shared_ptr &resultSet) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetCount(const DataQuery &query, int &result) const +Status MockSingleKvStore::GetCount(const DataQuery &query, int &result) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Sync( +Status MockSingleKvStore::Sync( const std::vector &deviceIds, SyncMode mode, uint32_t allowedDelayMs) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::RemoveDeviceData(const std::string &device) +Status MockSingleKvStore::RemoveDeviceData(const std::string &device) { kvstore_.clear(); return Status::SUCCESS; } -StoreId AnsTestSingleKvStore::GetStoreId() const +StoreId MockSingleKvStore::GetStoreId() const { StoreId storeId; storeId.storeId = ""; return storeId; } -Status AnsTestSingleKvStore::Delete(const Key &key) +Status MockSingleKvStore::Delete(const Key &key) { if (kvstore_.erase(key) != 0) { return Status::SUCCESS; @@ -168,14 +168,14 @@ Status AnsTestSingleKvStore::Delete(const Key &key) return Status::KEY_NOT_FOUND; } -Status AnsTestSingleKvStore::Put(const Key &key, const Value &value) +Status MockSingleKvStore::Put(const Key &key, const Value &value) { kvstore_[key] = value; return Status::SUCCESS; } -Status AnsTestSingleKvStore::Get(const Key &key, Value &value) +Status MockSingleKvStore::Get(const Key &key, Value &value) { for (auto iter : kvstore_) { if (iter.first == key) { @@ -187,91 +187,91 @@ Status AnsTestSingleKvStore::Get(const Key &key, Value &value) return Status::KEY_NOT_FOUND; } -Status AnsTestSingleKvStore::SubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) +Status MockSingleKvStore::SubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) { observer_ = observer; return Status::SUCCESS; } -Status AnsTestSingleKvStore::UnSubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) +Status MockSingleKvStore::UnSubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) { observer_ = nullptr; return Status::SUCCESS; } -Status AnsTestSingleKvStore::RegisterSyncCallback(std::shared_ptr callback) +Status MockSingleKvStore::RegisterSyncCallback(std::shared_ptr callback) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::UnRegisterSyncCallback() +Status MockSingleKvStore::UnRegisterSyncCallback() { return Status::SUCCESS; } -Status AnsTestSingleKvStore::PutBatch(const std::vector &entries) +Status MockSingleKvStore::PutBatch(const std::vector &entries) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::DeleteBatch(const std::vector &keys) +Status MockSingleKvStore::DeleteBatch(const std::vector &keys) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::StartTransaction() +Status MockSingleKvStore::StartTransaction() { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Commit() +Status MockSingleKvStore::Commit() { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Rollback() +Status MockSingleKvStore::Rollback() { return Status::SUCCESS; } -Status AnsTestSingleKvStore::SetSyncParam(const KvSyncParam &syncParam) +Status MockSingleKvStore::SetSyncParam(const KvSyncParam &syncParam) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetSyncParam(KvSyncParam &syncParam) +Status MockSingleKvStore::GetSyncParam(KvSyncParam &syncParam) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::SetCapabilityEnabled(bool enabled) const +Status MockSingleKvStore::SetCapabilityEnabled(bool enabled) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::SetCapabilityRange( +Status MockSingleKvStore::SetCapabilityRange( const std::vector &localLabels, const std::vector &remoteSupportLabels) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetSecurityLevel(SecurityLevel &securityLevel) const +Status MockSingleKvStore::GetSecurityLevel(SecurityLevel &securityLevel) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Sync(const std::vector &deviceIds, SyncMode mode, +Status MockSingleKvStore::Sync(const std::vector &deviceIds, SyncMode mode, const DataQuery &query, std::shared_ptr syncCallback) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::SubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) +Status MockSingleKvStore::SubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::UnsubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) +Status MockSingleKvStore::UnsubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) { return Status::SUCCESS; } diff --git a/interfaces/BUILD.gn b/interfaces/BUILD.gn deleted file mode 100644 index 3fb13765..00000000 --- a/interfaces/BUILD.gn +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2021 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. - -group("interfaces_target") { - deps = [ - "kits/napi/ans:notification", - "kits/napi/ans/src/reminder:reminderagent", - ] -} diff --git a/interfaces/innerkits/ans/native/include/enabled_notification_callback_data.h b/interfaces/inner_api/enabled_notification_callback_data.h similarity index 88% rename from interfaces/innerkits/ans/native/include/enabled_notification_callback_data.h rename to interfaces/inner_api/enabled_notification_callback_data.h index 2d57d7eb..15f2db0e 100644 --- a/interfaces/innerkits/ans/native/include/enabled_notification_callback_data.h +++ b/interfaces/inner_api/enabled_notification_callback_data.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_NATIVE_INCLUDE_NOTIFICATION_ENABLED_NOTIFICATION_DATA_H -#define BASE_NOTIFICATION_ANS_STANDARD_NATIVE_INCLUDE_NOTIFICATION_ENABLED_NOTIFICATION_DATA_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_ENABLED_CALLBACK_DATA_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_ENABLED_CALLBACK_DATA_H #include "notification_constant.h" #include "parcel.h" @@ -85,4 +85,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_NATIVE_INCLUDE_NOTIFICATION_ENABLED_NOTIFICATION_DATA_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_ENABLED_CALLBACK_DATA_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/message_user.h b/interfaces/inner_api/message_user.h similarity index 94% rename from interfaces/innerkits/ans/native/include/message_user.h rename to interfaces/inner_api/message_user.h index e4f1044c..ddae65b2 100644 --- a/interfaces/innerkits/ans/native/include/message_user.h +++ b/interfaces/inner_api/message_user.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_MESSAGE_USER_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_MESSAGE_USER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_MESSAGE_USER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_MESSAGE_USER_H #include "notification_json_convert.h" #include "pixel_map.h" @@ -180,4 +180,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_MESSAGE_USER_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_MESSAGE_USER_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification.h b/interfaces/inner_api/notification.h similarity index 97% rename from interfaces/innerkits/ans/native/include/notification.h rename to interfaces/inner_api/notification.h index 44d81eb4..4f590862 100644 --- a/interfaces/innerkits/ans/native/include/notification.h +++ b/interfaces/inner_api/notification.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_H #include "notification_request.h" #include "parcel.h" @@ -293,4 +293,4 @@ private: }; } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_action_button.h b/interfaces/inner_api/notification_action_button.h similarity index 97% rename from interfaces/innerkits/ans/native/include/notification_action_button.h rename to interfaces/inner_api/notification_action_button.h index d5280b57..2d1d68fd 100644 --- a/interfaces/innerkits/ans/native/include/notification_action_button.h +++ b/interfaces/inner_api/notification_action_button.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_ACTION_BUTTON_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_ACTION_BUTTON_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_ACTION_BUTTON_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_ACTION_BUTTON_H #include "notification_constant.h" #include "notification_json_convert.h" @@ -268,4 +268,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_ACTION_BUTTON_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_ACTION_BUTTON_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_basic_content.h b/interfaces/inner_api/notification_basic_content.h similarity index 91% rename from interfaces/innerkits/ans/native/include/notification_basic_content.h rename to interfaces/inner_api/notification_basic_content.h index 62d860b1..33dc3302 100644 --- a/interfaces/innerkits/ans/native/include/notification_basic_content.h +++ b/interfaces/inner_api/notification_basic_content.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_BASIC_CONTENT_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_BASIC_CONTENT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_BASIC_CONTENT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_BASIC_CONTENT_H #include "notification_json_convert.h" #include "parcel.h" @@ -118,4 +118,4 @@ protected: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_BASIC_CONTENT_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_BASIC_CONTENT_H diff --git a/interfaces/innerkits/ans/native/include/notification_bundle_option.h b/interfaces/inner_api/notification_bundle_option.h similarity index 89% rename from interfaces/innerkits/ans/native/include/notification_bundle_option.h rename to interfaces/inner_api/notification_bundle_option.h index a47eff34..60467a4d 100644 --- a/interfaces/innerkits/ans/native/include/notification_bundle_option.h +++ b/interfaces/inner_api/notification_bundle_option.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_BUNDLE_OPTION_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_BUNDLE_OPTION_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_BUNDLE_OPTION_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_BUNDLE_OPTION_H #include "parcel.h" @@ -101,4 +101,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_CONTENT_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_BUNDLE_OPTION_H diff --git a/interfaces/innerkits/ans/native/include/notification_constant.h b/interfaces/inner_api/notification_constant.h similarity index 95% rename from interfaces/innerkits/ans/native/include/notification_constant.h rename to interfaces/inner_api/notification_constant.h index 0d349c1b..6be92c23 100644 --- a/interfaces/innerkits/ans/native/include/notification_constant.h +++ b/interfaces/inner_api/notification_constant.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_CONSTANT_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_CONSTANT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_CONSTANT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_CONSTANT_H #include @@ -184,4 +184,4 @@ public: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_CONSTANT_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_CONSTANT_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_content.h b/interfaces/inner_api/notification_content.h similarity index 96% rename from interfaces/innerkits/ans/native/include/notification_content.h rename to interfaces/inner_api/notification_content.h index 425b1247..41d1957f 100644 --- a/interfaces/innerkits/ans/native/include/notification_content.h +++ b/interfaces/inner_api/notification_content.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_CONTENT_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_CONTENT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_CONTENT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_CONTENT_H #include "notification_basic_content.h" #include "notification_conversational_content.h" @@ -213,4 +213,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_CONTENT_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_CONTENT_H diff --git a/interfaces/innerkits/ans/native/include/notification_conversational_content.h b/interfaces/inner_api/notification_conversational_content.h similarity index 94% rename from interfaces/innerkits/ans/native/include/notification_conversational_content.h rename to interfaces/inner_api/notification_conversational_content.h index 90db3cfd..ddcbccda 100644 --- a/interfaces/innerkits/ans/native/include/notification_conversational_content.h +++ b/interfaces/inner_api/notification_conversational_content.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_CONVERSATIONAL_CONTENT_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_CONVERSATIONAL_CONTENT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_CONVERSATIONAL_CONTENT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_CONVERSATIONAL_CONTENT_H #include "message_user.h" #include "notification_basic_content.h" @@ -164,4 +164,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_CONVERSATIONAL_CONTENT_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_CONVERSATIONAL_CONTENT_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_conversational_message.h b/interfaces/inner_api/notification_conversational_message.h similarity index 93% rename from interfaces/innerkits/ans/native/include/notification_conversational_message.h rename to interfaces/inner_api/notification_conversational_message.h index 61e471ad..631655f5 100644 --- a/interfaces/innerkits/ans/native/include/notification_conversational_message.h +++ b/interfaces/inner_api/notification_conversational_message.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_CONVERSATIONAL_MESSAGE_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_CONVERSATIONAL_MESSAGE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_CONVERSATIONAL_MESSAGE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_CONVERSATIONAL_MESSAGE_H #include "message_user.h" #include "notification_json_convert.h" @@ -141,4 +141,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_CONVERSATIONAL_MESSAGE_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_CONVERSATIONAL_MESSAGE_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_distributed_options.h b/interfaces/inner_api/notification_distributed_options.h similarity index 92% rename from interfaces/innerkits/ans/native/include/notification_distributed_options.h rename to interfaces/inner_api/notification_distributed_options.h index 6d0ad4c6..dc1ba397 100644 --- a/interfaces/innerkits/ans/native/include/notification_distributed_options.h +++ b/interfaces/inner_api/notification_distributed_options.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_NATIVE_INCLUDE_NOTIFICATION_DISTRIBUTED_OPTIONS_H -#define BASE_NOTIFICATION_ANS_STANDARD_NATIVE_INCLUDE_NOTIFICATION_DISTRIBUTED_OPTIONS_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_DISTRIBUTED_OPTIONS_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_DISTRIBUTED_OPTIONS_H #include "notification_json_convert.h" #include "parcel.h" @@ -135,4 +135,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_NATIVE_INCLUDE_NOTIFICATION_DISTRIBUTED_OPTIONS_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_DISTRIBUTED_OPTIONS_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_do_not_disturb_date.h b/interfaces/inner_api/notification_do_not_disturb_date.h similarity index 91% rename from interfaces/innerkits/ans/native/include/notification_do_not_disturb_date.h rename to interfaces/inner_api/notification_do_not_disturb_date.h index 0f08ea71..29e06cc7 100644 --- a/interfaces/innerkits/ans/native/include/notification_do_not_disturb_date.h +++ b/interfaces/inner_api/notification_do_not_disturb_date.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_NATIVE_INCLUDE_NOTIFICATION_DO_NOT_DISTURB_DATE_H -#define BASE_NOTIFICATION_ANS_STANDARD_NATIVE_INCLUDE_NOTIFICATION_DO_NOT_DISTURB_DATE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_DO_NOT_DISTURB_DATE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_DO_NOT_DISTURB_DATE_H #include "notification_constant.h" #include "parcel.h" @@ -113,4 +113,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_NATIVE_INCLUDE_NOTIFICATION_DO_NOT_DISTURB_DATE_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_DO_NOT_DISTURB_DATE_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_flags.h b/interfaces/inner_api/notification_flags.h similarity index 90% rename from interfaces/innerkits/ans/native/include/notification_flags.h rename to interfaces/inner_api/notification_flags.h index a2cc0d56..8dd3d798 100644 --- a/interfaces/innerkits/ans/native/include/notification_flags.h +++ b/interfaces/inner_api/notification_flags.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_FLAGS_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_FLAGS_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_FLAGS_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_FLAGS_H #include #include "parcel.h" @@ -105,5 +105,5 @@ private: } // namespace Notification } // namespace OHOS -#endif // #define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_FLAGS_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_FLAGS_H diff --git a/interfaces/innerkits/ans/native/include/notification_helper.h b/interfaces/inner_api/notification_helper.h similarity index 99% rename from interfaces/innerkits/ans/native/include/notification_helper.h rename to interfaces/inner_api/notification_helper.h index 8ebfb8b8..bcd14df6 100644 --- a/interfaces/innerkits/ans/native/include/notification_helper.h +++ b/interfaces/inner_api/notification_helper.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_HELPER_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_HELPER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_HELPER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_HELPER_H #include "notification_bundle_option.h" #include "notification_do_not_disturb_date.h" @@ -808,4 +808,4 @@ public: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_HELPER_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_HELPER_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_json_convert.h b/interfaces/inner_api/notification_json_convert.h similarity index 92% rename from interfaces/innerkits/ans/native/include/notification_json_convert.h rename to interfaces/inner_api/notification_json_convert.h index 77720da4..1250c898 100644 --- a/interfaces/innerkits/ans/native/include/notification_json_convert.h +++ b/interfaces/inner_api/notification_json_convert.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_NOTIFICATION_JSON_CONVERT_H -#define BASE_NOTIFICATION_ANS_STANDARD_NOTIFICATION_JSON_CONVERT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_JSON_CONVERT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_JSON_CONVERT_H #include #include "ans_log_wrapper.h" @@ -119,4 +119,4 @@ public: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_NOTIFICATION_JSON_CONVERT_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_JSON_CONVERT_H diff --git a/interfaces/innerkits/ans/native/include/notification_long_text_content.h b/interfaces/inner_api/notification_long_text_content.h similarity index 93% rename from interfaces/innerkits/ans/native/include/notification_long_text_content.h rename to interfaces/inner_api/notification_long_text_content.h index e98b0af5..10066beb 100644 --- a/interfaces/innerkits/ans/native/include/notification_long_text_content.h +++ b/interfaces/inner_api/notification_long_text_content.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_LONG_TEXT_CONTENT_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_LONG_TEXT_CONTENT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_LONG_TEXT_CONTENT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_LONG_TEXT_CONTENT_H #include "notification_basic_content.h" #include "parcel.h" @@ -144,4 +144,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_LONG_TEXT_CONTENT_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_LONG_TEXT_CONTENT_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_media_content.h b/interfaces/inner_api/notification_media_content.h similarity index 93% rename from interfaces/innerkits/ans/native/include/notification_media_content.h rename to interfaces/inner_api/notification_media_content.h index 57e06ae0..26b248a8 100644 --- a/interfaces/innerkits/ans/native/include/notification_media_content.h +++ b/interfaces/inner_api/notification_media_content.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_MEDIA_CONTENT_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_MEDIA_CONTENT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_MEDIA_CONTENT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_MEDIA_CONTENT_H #include "notification_basic_content.h" #include "parcel.h" @@ -122,4 +122,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_MEDIA_CONTENT_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_MEDIA_CONTENT_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_multiline_content.h b/interfaces/inner_api/notification_multiline_content.h similarity index 93% rename from interfaces/innerkits/ans/native/include/notification_multiline_content.h rename to interfaces/inner_api/notification_multiline_content.h index 61daf92f..c5841bfd 100644 --- a/interfaces/innerkits/ans/native/include/notification_multiline_content.h +++ b/interfaces/inner_api/notification_multiline_content.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_MULTILINE_CONTENT_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_MULTILINE_CONTENT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_MULTILINE_CONTENT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_MULTILINE_CONTENT_H #include "notification_basic_content.h" #include "parcel.h" @@ -139,4 +139,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_MULTILINE_CONTENT_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_MULTILINE_CONTENT_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_normal_content.h b/interfaces/inner_api/notification_normal_content.h similarity index 86% rename from interfaces/innerkits/ans/native/include/notification_normal_content.h rename to interfaces/inner_api/notification_normal_content.h index 45183b13..a2572a93 100644 --- a/interfaces/innerkits/ans/native/include/notification_normal_content.h +++ b/interfaces/inner_api/notification_normal_content.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_NORMAL_CONTENT_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_NORMAL_CONTENT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_NORMAL_CONTENT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_NORMAL_CONTENT_H #include "notification_basic_content.h" #include "parcel.h" @@ -69,4 +69,4 @@ public: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_NORMAL_CONTENT_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_NORMAL_CONTENT_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_picture_content.h b/interfaces/inner_api/notification_picture_content.h similarity index 93% rename from interfaces/innerkits/ans/native/include/notification_picture_content.h rename to interfaces/inner_api/notification_picture_content.h index fe2e21c7..2092f0ec 100644 --- a/interfaces/innerkits/ans/native/include/notification_picture_content.h +++ b/interfaces/inner_api/notification_picture_content.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_PICTURE_CONTENT_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_PICTURE_CONTENT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_PICTURE_CONTENT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_PICTURE_CONTENT_H #include "notification_basic_content.h" #include "parcel.h" @@ -133,4 +133,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_PICTURE_CONTENT_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_PICTURE_CONTENT_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_request.h b/interfaces/inner_api/notification_request.h similarity index 99% rename from interfaces/innerkits/ans/native/include/notification_request.h rename to interfaces/inner_api/notification_request.h index b4a2737f..4c54274b 100644 --- a/interfaces/innerkits/ans/native/include/notification_request.h +++ b/interfaces/inner_api/notification_request.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_REQUEST_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_REQUEST_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_REQUEST_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_REQUEST_H #include "ans_const_define.h" #include "message_user.h" @@ -1202,4 +1202,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_REQUEST_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_REQUEST_H diff --git a/interfaces/innerkits/ans/native/include/notification_slot.h b/interfaces/inner_api/notification_slot.h similarity index 98% rename from interfaces/innerkits/ans/native/include/notification_slot.h rename to interfaces/inner_api/notification_slot.h index c4203d8c..903e877b 100644 --- a/interfaces/innerkits/ans/native/include/notification_slot.h +++ b/interfaces/inner_api/notification_slot.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_SLOT_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_SLOT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SLOT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SLOT_H #include "notification_content.h" #include "notification_request.h" @@ -381,4 +381,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_SLOT_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SLOT_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_slot_group.h b/interfaces/inner_api/notification_slot_group.h similarity index 94% rename from interfaces/innerkits/ans/native/include/notification_slot_group.h rename to interfaces/inner_api/notification_slot_group.h index 874f9c9a..09c34133 100644 --- a/interfaces/innerkits/ans/native/include/notification_slot_group.h +++ b/interfaces/inner_api/notification_slot_group.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_SLOT_GROUP_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_SLOT_GROUP_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SLOT_GROUP_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SLOT_GROUP_H #include "notification_slot.h" @@ -142,4 +142,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_SLOT_GROUP_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SLOT_GROUP_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_sorting.h b/interfaces/inner_api/notification_sorting.h similarity index 94% rename from interfaces/innerkits/ans/native/include/notification_sorting.h rename to interfaces/inner_api/notification_sorting.h index d904a947..32410161 100644 --- a/interfaces/innerkits/ans/native/include/notification_sorting.h +++ b/interfaces/inner_api/notification_sorting.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_SORTING_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_SORTING_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SORTING_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SORTING_H #include "ans_log_wrapper.h" #include "notification_slot.h" @@ -170,4 +170,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_SORTING_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SORTING_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_sorting_map.h b/interfaces/inner_api/notification_sorting_map.h similarity index 89% rename from interfaces/innerkits/ans/native/include/notification_sorting_map.h rename to interfaces/inner_api/notification_sorting_map.h index 8051365b..b8de4a73 100644 --- a/interfaces/innerkits/ans/native/include/notification_sorting_map.h +++ b/interfaces/inner_api/notification_sorting_map.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_SORTING_MAP_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_SORTING_MAP_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SORTING_MAP_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SORTING_MAP_H #include "notification_sorting.h" #include "parcel.h" @@ -87,4 +87,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_SORTING_MAP_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SORTING_MAP_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_subscribe_info.h b/interfaces/inner_api/notification_subscribe_info.h similarity index 90% rename from interfaces/innerkits/ans/native/include/notification_subscribe_info.h rename to interfaces/inner_api/notification_subscribe_info.h index 05c58997..61634261 100644 --- a/interfaces/innerkits/ans/native/include/notification_subscribe_info.h +++ b/interfaces/inner_api/notification_subscribe_info.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATIN_SUBSCRIBER_INFO_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATIN_SUBSCRIBER_INFO_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SUBSCRIBER_INFO_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SUBSCRIBER_INFO_H #include "parcel.h" @@ -105,4 +105,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATIN_SUBSCRIBER_INFO_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SUBSCRIBER_INFO_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_subscriber.h b/interfaces/inner_api/notification_subscriber.h similarity index 93% rename from interfaces/innerkits/ans/native/include/notification_subscriber.h rename to interfaces/inner_api/notification_subscriber.h index 5bf1f3b0..973b643b 100644 --- a/interfaces/innerkits/ans/native/include/notification_subscriber.h +++ b/interfaces/inner_api/notification_subscriber.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_SUBSCRIBER_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_SUBSCRIBER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SUBSCRIBER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SUBSCRIBER_H #include "ans_manager_interface.h" #include "ans_subscriber_stub.h" @@ -145,7 +145,7 @@ private: public: NotificationSubscriber &subscriber_; sptr recipient_ {nullptr}; - sptr proxy_ {nullptr}; + sptr proxy_ {nullptr}; std::mutex mutex_ {}; }; @@ -160,4 +160,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_SUBSCRIBER_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_SUBSCRIBER_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/notification_template.h b/interfaces/inner_api/notification_template.h similarity index 88% rename from interfaces/innerkits/ans/native/include/notification_template.h rename to interfaces/inner_api/notification_template.h index 497bc813..0f6ef1ee 100644 --- a/interfaces/innerkits/ans/native/include/notification_template.h +++ b/interfaces/inner_api/notification_template.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_TEMPLATE_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_TEMPLATE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_TEMPLATE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_TEMPLATE_H #include #include @@ -91,5 +91,5 @@ private: } // namespace Notification } // namespace OHOS -#endif // #define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_TEMPLATE_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_TEMPLATE_H diff --git a/interfaces/innerkits/ans/native/include/notification_user_input.h b/interfaces/inner_api/notification_user_input.h similarity index 97% rename from interfaces/innerkits/ans/native/include/notification_user_input.h rename to interfaces/inner_api/notification_user_input.h index f3e91393..5dcf6905 100644 --- a/interfaces/innerkits/ans/native/include/notification_user_input.h +++ b/interfaces/inner_api/notification_user_input.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_USER_INPUT_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_USER_INPUT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_USER_INPUT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_USER_INPUT_H #include "notification_constant.h" #include "notification_json_convert.h" @@ -317,4 +317,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_NOTIFICATION_USER_INPUT_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_NOTIFICATION_USER_INPUT_H diff --git a/interfaces/innerkits/ans/native/include/reminder_helper.h b/interfaces/inner_api/reminder_helper.h similarity index 94% rename from interfaces/innerkits/ans/native/include/reminder_helper.h rename to interfaces/inner_api/reminder_helper.h index 639b2be8..f35bffba 100644 --- a/interfaces/innerkits/ans/native/include/reminder_helper.h +++ b/interfaces/inner_api/reminder_helper.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_REMINDER_HELPER_H -#define BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_REMINDER_HELPER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_HELPER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_HELPER_H #include @@ -103,4 +103,4 @@ private: } // namespace Reminder } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_KITS_NATIVE_INCLUDE_REMINDER_HELPER_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_HELPER_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/reminder_request.h b/interfaces/inner_api/reminder_request.h similarity index 98% rename from interfaces/innerkits/ans/native/include/reminder_request.h rename to interfaces/inner_api/reminder_request.h index a032d6f6..9d93bc5a 100644 --- a/interfaces/innerkits/ans/native/include/reminder_request.h +++ b/interfaces/inner_api/reminder_request.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_REQUEST_H -#define BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_REQUEST_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_REQUEST_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_REQUEST_H #include #include @@ -742,4 +742,4 @@ private: }; } // namespace Reminder } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_REQUEST_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_REQUEST_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/reminder_request_alarm.h b/interfaces/inner_api/reminder_request_alarm.h similarity index 94% rename from interfaces/innerkits/ans/native/include/reminder_request_alarm.h rename to interfaces/inner_api/reminder_request_alarm.h index e0dd931f..86ab1748 100644 --- a/interfaces/innerkits/ans/native/include/reminder_request_alarm.h +++ b/interfaces/inner_api/reminder_request_alarm.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_REQUEST_ALARM_H -#define BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_REQUEST_ALARM_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_REQUEST_ALARM_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_REQUEST_ALARM_H #include "reminder_request.h" @@ -171,4 +171,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_REQUEST_ALARM_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_REQUEST_ALARM_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/reminder_request_calendar.h b/interfaces/inner_api/reminder_request_calendar.h similarity index 95% rename from interfaces/innerkits/ans/native/include/reminder_request_calendar.h rename to interfaces/inner_api/reminder_request_calendar.h index 1023f233..2e4478e1 100644 --- a/interfaces/innerkits/ans/native/include/reminder_request_calendar.h +++ b/interfaces/inner_api/reminder_request_calendar.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_REQUEST_CALENDAR_H -#define BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_REQUEST_CALENDAR_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_REQUEST_CALENDAR_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_REQUEST_CALENDAR_H #include "reminder_request.h" @@ -223,4 +223,4 @@ private: }; } } -#endif // BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_REQUEST_CALENDAR_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_REQUEST_CALENDAR_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/reminder_request_timer.h b/interfaces/inner_api/reminder_request_timer.h similarity index 90% rename from interfaces/innerkits/ans/native/include/reminder_request_timer.h rename to interfaces/inner_api/reminder_request_timer.h index 0b703709..0f26928f 100644 --- a/interfaces/innerkits/ans/native/include/reminder_request_timer.h +++ b/interfaces/inner_api/reminder_request_timer.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_REQUEST_TIMER_H -#define BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_REQUEST_TIMER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_REQUEST_TIMER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_REQUEST_TIMER_H #include "reminder_request.h" @@ -82,4 +82,4 @@ private: }; } // namespace Reminder } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_REQUEST_TIMER_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_REQUEST_TIMER_H \ No newline at end of file diff --git a/interfaces/innerkits/ans/native/include/reminder_store.h b/interfaces/inner_api/reminder_store.h similarity index 90% rename from interfaces/innerkits/ans/native/include/reminder_store.h rename to interfaces/inner_api/reminder_store.h index da291460..fe2e76b6 100644 --- a/interfaces/innerkits/ans/native/include/reminder_store.h +++ b/interfaces/inner_api/reminder_store.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_INTERFACES_INNERKITS_ANS_NATIVE_INCLUDE_REMINDER_STORE_H -#define BASE_NOTIFICATION_ANS_STANDARD_INTERFACES_INNERKITS_ANS_NATIVE_INCLUDE_REMINDER_STORE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_STORE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_STORE_H #include @@ -62,7 +62,7 @@ private: void GetStringVal(std::shared_ptr &resultSet, const std::string &name, std::string &value) const; std::vector> GetReminders(const std::string &queryCondition); - void GenerateData(const sptr &remindert, + void GenerateData(const sptr &reminder, const sptr &bundleOption, NativeRdb::ValuesBucket &values) const; bool IsReminderExist(const sptr &reminder); int64_t Insert(const sptr &reminder, const sptr &bundleOption); @@ -80,4 +80,4 @@ private: }; } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_INTERFACES_INNERKITS_ANS_NATIVE_INCLUDE_REMINDER_STORE_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_STORE_H \ No newline at end of file diff --git a/notification.gni b/notification.gni index a74487da..aa18e772 100644 --- a/notification.gni +++ b/notification.gni @@ -12,30 +12,22 @@ # limitations under the License. aafwk_inner_api_path = "//foundation/aafwk/standard/interfaces/innerkits" - aafwk_services_path = "//foundation/aafwk/standard/services" - aafwk_kits_path = "//foundation/aafwk/standard/frameworks/kits" - -ans_standard_path = "//base/notification/ans_standard" - -services_path = "${ans_standard_path}/services" - -frameworks_path = "${ans_standard_path}/frameworks" - -interfaces_path = "${ans_standard_path}/interfaces" - -core_path = "${frameworks_path}/ans/core" - -native_path = "${frameworks_path}/ans/native" - -test_path = "${ans_standard_path}/test" - -tools_path = "${ans_standard_path}/tools" - +component_name = "distributed_notification_service" +component_path = "//base/notification/distributed_notification_service" +services_path = "${component_path}/services" +frameworks_path = "${component_path}/frameworks" +frameworks_module_ans_path = "${frameworks_path}/ans" +interfaces_path = "${component_path}/interfaces" +inner_api_path = "${interfaces_path}/inner_api" +core_path = "${frameworks_path}/core" +test_path = "${component_path}/test" +tools_path = "${component_path}/tools" aafwk_path = "//foundation/aafwk/standard" - -ans_standard_external_deps = [ +distributed_notification_supported = true +subsystem_name = "notification" +component_external_deps = [ "ability_base:base", "ability_base:want", "ability_base:zuri", @@ -48,5 +40,3 @@ ans_standard_external_deps = [ "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", ] - -distributed_notification_supported = true diff --git a/sa_profile/BUILD.gn b/sa_profile/BUILD.gn index cd42149e..9640ee37 100644 --- a/sa_profile/BUILD.gn +++ b/sa_profile/BUILD.gn @@ -15,5 +15,5 @@ import("//build/ohos/sa_profile/sa_profile.gni") ohos_sa_profile("ans_sa_profile") { sources = [ "3203.xml" ] - part_name = "ans_standard" + part_name = "distributed_notification_service" } diff --git a/services/BUILD.gn b/services/BUILD.gn index 6f1abec6..8a6dde62 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -11,9 +11,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") -group("services_target") { +group("ans_service") { deps = [ "ans:ans_targets" ] if (distributed_notification_supported) { diff --git a/services/ans/BUILD.gn b/services/ans/BUILD.gn index bfa66da9..38c75911 100644 --- a/services/ans/BUILD.gn +++ b/services/ans/BUILD.gn @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") group("ans_targets") { @@ -21,7 +21,7 @@ group("ans_targets") { config("public_ans_config") { include_dirs = [ "${services_path}/ans/include" ] defines = [ - "APP_LOG_TAG = \"Ans\"", + "ANS_LOG_TAG = \"NOTIFICATION_SERVICE\"", "LOG_DOMAIN = 0xD002200", ] } @@ -58,8 +58,8 @@ ohos_shared_library("libans") { ":downloadTemplate.js", ":external.json", "${core_path}:ans_core", - "${frameworks_path}/ans/dialog/dialog_ui/js:dialog_js_files_etc", - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", + "${services_path}/dialog/dialog_ui/js:dialog_js_files_etc", "//foundation/arkui/ace_engine/interfaces/inner_api/ui_service_manager:ui_service_mgr", "//utils/native/base:utils", ] @@ -86,30 +86,29 @@ ohos_shared_library("libans") { "time_native:time_service", "window_manager:libwm", ] - external_deps += ans_standard_external_deps + external_deps += component_external_deps - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } ohos_prebuilt_etc("external.json") { - source = - "//base/notification/ans_standard/services/ans/resource/external.json" + source = "${services_path}/ans/resource/external.json" relative_install_dir = "notification_template" - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } ohos_prebuilt_etc("downloadTemplate.abc") { - source = "//base/notification/ans_standard/services/ans/resource/downloadTemplate.abc" + source = "${services_path}/ans/resource/downloadTemplate.abc" relative_install_dir = "notification_template/assets/js" - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } ohos_prebuilt_etc("downloadTemplate.js") { - source = "//base/notification/ans_standard/services/ans/resource/downloadTemplate.js" + source = "${services_path}/ans/resource/downloadTemplate.js" relative_install_dir = "notification_template/assets/js" - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } diff --git a/services/ans/include/access_token_helper.h b/services/ans/include/access_token_helper.h index cc8ec8fb..11de4e9d 100644 --- a/services/ans/include/access_token_helper.h +++ b/services/ans/include/access_token_helper.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_ACCESS_TOKEN_HELPER_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_ACCESS_TOKEN_HELPER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_ACCESS_TOKEN_HELPER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_ACCESS_TOKEN_HELPER_H #include @@ -37,4 +37,4 @@ public: }; } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_ACCESS_TOKEN_HELPER_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_ACCESS_TOKEN_HELPER_H \ No newline at end of file diff --git a/services/ans/include/advanced_notification_service.h b/services/ans/include/advanced_notification_service.h index bf6864d6..a5dd2291 100644 --- a/services/ans/include/advanced_notification_service.h +++ b/services/ans/include/advanced_notification_service.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_ADVANCED_NOTIFICATION_SERVICE_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_ADVANCED_NOTIFICATION_SERVICE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_ADVANCED_NOTIFICATION_SERVICE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_ADVANCED_NOTIFICATION_SERVICE_H #include #include @@ -452,7 +452,8 @@ public: * @param info Indicates the NotificationSubscribeInfo object. * @return Returns ERR_OK on success, others on failure. */ - ErrCode Subscribe(const sptr &subscriber, const sptr &info) override; + ErrCode Subscribe(const sptr &subscriber, + const sptr &info) override; /** * @brief Unsubscribes notifications. @@ -461,7 +462,8 @@ public: * @param info Indicates the NotificationSubscribeInfo object. * @return Returns ERR_OK on success, others on failure. */ - ErrCode Unsubscribe(const sptr &subscriber, const sptr &info) override; + ErrCode Unsubscribe(const sptr &subscriber, + const sptr &info) override; /** * @brief Checks whether this device is allowed to publish notifications. @@ -829,4 +831,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // ADVANCED_NOTIFICATION_SERVICE_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_ADVANCED_NOTIFICATION_SERVICE_H diff --git a/services/ans/include/advanced_notification_service_ability.h b/services/ans/include/advanced_notification_service_ability.h index 65e872ca..eb3d7edc 100644 --- a/services/ans/include/advanced_notification_service_ability.h +++ b/services/ans/include/advanced_notification_service_ability.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_ADVANCED_NOTIFICATION_SERVICE_ABILITY_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_ADVANCED_NOTIFICATION_SERVICE_ABILITY_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_NOTIFICATION_SERVICE_ABILITY_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_NOTIFICATION_SERVICE_ABILITY_H #include "system_ability.h" @@ -53,4 +53,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_ADVANCED_NOTIFICATION_SERVICE_ABILITY_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_NOTIFICATION_SERVICE_ABILITY_H \ No newline at end of file diff --git a/services/ans/include/bundle_manager_helper.h b/services/ans/include/bundle_manager_helper.h index 12a53f37..2bde977c 100644 --- a/services/ans/include/bundle_manager_helper.h +++ b/services/ans/include/bundle_manager_helper.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_BUNDLE_MANAGER_HELPER_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_BUNDLE_MANAGER_HELPER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_BUNDLE_MANAGER_HELPER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_BUNDLE_MANAGER_HELPER_H #include #include @@ -102,4 +102,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_BUNDLE_MANAGER_HELPER_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_BUNDLE_MANAGER_HELPER_H \ No newline at end of file diff --git a/services/ans/include/distributed_kvstore_death_recipient.h b/services/ans/include/distributed_kvstore_death_recipient.h index d886d171..95091e4b 100644 --- a/services/ans/include/distributed_kvstore_death_recipient.h +++ b/services/ans/include/distributed_kvstore_death_recipient.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_DISTRIBUTED_KVSTORE_DEATH_RECIPIENT_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_DISTRIBUTED_KVSTORE_DEATH_RECIPIENT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_DISTRIBUTED_KVSTORE_DEATH_RECIPIENT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_DISTRIBUTED_KVSTORE_DEATH_RECIPIENT_H #include @@ -55,4 +55,4 @@ private: }; } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_DISTRIBUTED_KVSTORE_DEATH_RECIPIENT_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_DISTRIBUTED_KVSTORE_DEATH_RECIPIENT_H \ No newline at end of file diff --git a/services/ans/include/interface_system_event.h b/services/ans/include/interface_system_event.h index 9d8513c1..7be3c05d 100644 --- a/services/ans/include/interface_system_event.h +++ b/services/ans/include/interface_system_event.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_INTERFACE_SYSTEM_EVENT_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_INTERFACE_SYSTEM_EVENT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_INTERFACE_SYSTEM_EVENT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_INTERFACE_SYSTEM_EVENT_H #include #include @@ -35,4 +35,4 @@ struct ISystemEvent { } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_INTERFACE_SYSTEM_EVENT_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_INTERFACE_SYSTEM_EVENT_H \ No newline at end of file diff --git a/services/ans/include/notification_filter.h b/services/ans/include/notification_filter.h index 1d98a0e1..3573fc09 100644 --- a/services/ans/include/notification_filter.h +++ b/services/ans/include/notification_filter.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_NOTIFICATION_FILTER_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_NOTIFICATION_FILTER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_NOTIFICATION_FILTER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_NOTIFICATION_FILTER_H #include @@ -50,4 +50,4 @@ public: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_NOTIFICATION_FILTER_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_NOTIFICATION_FILTER_H \ No newline at end of file diff --git a/services/ans/include/notification_preferences.h b/services/ans/include/notification_preferences.h index 717f5026..2c55af91 100644 --- a/services/ans/include/notification_preferences.h +++ b/services/ans/include/notification_preferences.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_NOTIFICATION_PREFERENCES_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_NOTIFICATION_PREFERENCES_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_NOTIFICATION_PREFERENCES_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_NOTIFICATION_PREFERENCES_H #include "refbase.h" #include "singleton.h" @@ -356,4 +356,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // NOTIFICATION_PREFERENCES_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_NOTIFICATION_PREFERENCES_H diff --git a/services/ans/include/notification_preferences_database.h b/services/ans/include/notification_preferences_database.h index b570b6dd..4c3e3c7f 100644 --- a/services/ans/include/notification_preferences_database.h +++ b/services/ans/include/notification_preferences_database.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_NOTIFICATION_PREFERENCES_DATABASE_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_NOTIFICATION_PREFERENCES_DATABASE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_NOTIFICATION_PREFERENCES_DATABASE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_NOTIFICATION_PREFERENCES_DATABASE_H #include #include @@ -32,8 +32,8 @@ public: /** * @brief Put notification slots into disturbe DB. * - * @param bundleName Indicates bunlde name. - * @param bundleUid Indicates bunlde uid. + * @param bundleName Indicates bundle name. + * @param bundleUid Indicates bundle uid. * @param slots Indicates notification slots. * @return Return true on success, false on failure. */ @@ -43,8 +43,8 @@ public: /** * @brief Put notification slot groups into disturbe DB. * - * @param bundleName Indicates bunlde name. - * @param bundleUid Indicates bunlde uid. + * @param bundleName Indicates bundle name. + * @param bundleUid Indicates bundle uid. * @param groups Indicates notification groups. * @return Return true on success, false on failure. */ @@ -54,7 +54,7 @@ public: /** * @brief Put notification bundle into disturbe DB. * - * @param bundleInfo Indicates bunlde info. + * @param bundleInfo Indicates bundle info. * @return Return true on success, false on failure. */ bool PutBundlePropertyToDisturbeDB(const NotificationPreferencesInfo::BundleInfo &bundleInfo); @@ -62,7 +62,7 @@ public: /** * @brief Put show badge in the of bundle into disturbe DB. * - * @param bundleInfo Indicates bunlde info. + * @param bundleInfo Indicates bundle info. * @param enable Indicates to whether show badge. * @return Return true on success, false on failure. */ @@ -71,7 +71,7 @@ public: /** * @brief Put importance in the of bundle into disturbe DB. * - * @param bundleInfo Indicates bunlde info. + * @param bundleInfo Indicates bundle info. * @param importance Indicates to importance level which can be LEVEL_NONE, LEVEL_MIN, LEVEL_LOW, LEVEL_DEFAULT, LEVEL_HIGH, or LEVEL_UNDEFINED. * @return Return true on success, false on failure. @@ -81,7 +81,7 @@ public: /** * @brief Put badge total nums in the of bundle into disturbe DB. * - * @param bundleInfo Indicates bunlde info. + * @param bundleInfo Indicates bundle info. * @param totalBadgeNum Indicates to total badge num. * @return Return true on success, false on failure. */ @@ -90,7 +90,7 @@ public: /** * @brief Put private notification allowed in the of bundle into disturbe DB. * - * @param bundleInfo Indicates bunlde info. + * @param bundleInfo Indicates bundle info. * @param allow Indicates to whether to allow * @return Return true on success, false on failure. */ @@ -99,7 +99,7 @@ public: /** * @brief Put enable notification in the of bundle into disturbe DB. * - * @param bundleInfo Indicates bunlde info. + * @param bundleInfo Indicates bundle info. * @param enabled Indicates to whether to enabled * @return Return true on success, false on failure. */ @@ -288,4 +288,4 @@ private: }; } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_NOTIFICATION_PREFERENCES_DATABASE_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_NOTIFICATION_PREFERENCES_DATABASE_H diff --git a/services/ans/include/notification_preferences_info.h b/services/ans/include/notification_preferences_info.h index 530577a3..5a567efc 100644 --- a/services/ans/include/notification_preferences_info.h +++ b/services/ans/include/notification_preferences_info.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_NOTIFICATION_PREFERENCES_INFO_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_NOTIFICATION_PREFERENCES_INFO_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_NOTIFICATION_PREFERENCES_INFO_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_NOTIFICATION_PREFERENCES_INFO_H #include #include @@ -343,4 +343,4 @@ private: }; } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_NOTIFICATION_PREFERENCES_INFO_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_NOTIFICATION_PREFERENCES_INFO_H \ No newline at end of file diff --git a/services/ans/include/notification_record.h b/services/ans/include/notification_record.h index 9939e09a..d14c3d36 100644 --- a/services/ans/include/notification_record.h +++ b/services/ans/include/notification_record.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_NOTIFICATION_RECORD_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_NOTIFICATION_RECORD_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_NOTIFICATION_RECORD_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_NOTIFICATION_RECORD_H #include "refbase.h" @@ -39,4 +39,4 @@ struct NotificationRecord { } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_NOTIFICATION_RECORD_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_NOTIFICATION_RECORD_H \ No newline at end of file diff --git a/services/ans/include/notification_slot_filter.h b/services/ans/include/notification_slot_filter.h index 3fa6d544..2b3d95b7 100644 --- a/services/ans/include/notification_slot_filter.h +++ b/services/ans/include/notification_slot_filter.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_NOTIFICATION_SLOT_FILTER_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_NOTIFICATION_SLOT_FILTER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_NOTIFICATION_SLOT_FILTER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_NOTIFICATION_SLOT_FILTER_H #include "notification_filter.h" @@ -46,4 +46,4 @@ public: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_NOTIFICATION_SLOT_FILTER_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_NOTIFICATION_SLOT_FILTER_H \ No newline at end of file diff --git a/services/ans/include/notification_subscriber_manager.h b/services/ans/include/notification_subscriber_manager.h index 004f5268..69f919cc 100644 --- a/services/ans/include/notification_subscriber_manager.h +++ b/services/ans/include/notification_subscriber_manager.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_NOTIFICATIONMGR_INCLUDE_NOTIFICATION_SUBSCRIBER_MANAGER_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_NOTIFICATIONMGR_INCLUDE_NOTIFICATION_SUBSCRIBER_MANAGER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_INCLUDE_NOTIFICATION_SUBSCRIBER_MANAGER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_INCLUDE_NOTIFICATION_SUBSCRIBER_MANAGER_H #include #include @@ -41,21 +41,22 @@ public: /** * @brief Add a subscriber. * - * @param subscriber Indicates the IAnsSubscriber object. + * @param subscriber Indicates the AnsSubscriberInterface object. * @param subscribeInfo Indicates the NotificationSubscribeInfo object. * @return Indicates the result code. */ - ErrCode AddSubscriber(const sptr &subscriber, const sptr &subscribeInfo); + ErrCode AddSubscriber(const sptr &subscriber, + const sptr &subscribeInfo); /** * @brief Remove a subscriber. * - * @param subscriber Indicates the IAnsSubscriber object. + * @param subscriber Indicates the AnsSubscriberInterface object. * @param subscribeInfo Indicates the NotificationSubscribeInfo object. * @return Indicates the result code. */ ErrCode RemoveSubscriber( - const sptr &subscriber, const sptr &subscribeInfo); + const sptr &subscriber, const sptr &subscribeInfo); /** * @brief Notify all subscribers on counsumed. @@ -102,16 +103,16 @@ private: struct SubscriberRecord; std::shared_ptr FindSubscriberRecord(const wptr &object); - std::shared_ptr FindSubscriberRecord(const sptr &subscriber); - std::shared_ptr CreateSubscriberRecord(const sptr &subscriber); + std::shared_ptr FindSubscriberRecord(const sptr &subscriber); + std::shared_ptr CreateSubscriberRecord(const sptr &subscriber); void AddRecordInfo( std::shared_ptr &record, const sptr &subscribeInfo); void RemoveRecordInfo( std::shared_ptr &record, const sptr &subscribeInfo); ErrCode AddSubscriberInner( - const sptr &subscriber, const sptr &subscribeInfo); + const sptr &subscriber, const sptr &subscribeInfo); ErrCode RemoveSubscriberInner( - const sptr &subscriber, const sptr &subscribeInfo); + const sptr &subscriber, const sptr &subscribeInfo); void NotifyConsumedInner( const sptr ¬ification, const sptr ¬ificationMap); @@ -126,7 +127,7 @@ private: std::list> subscriberRecordList_ {}; std::shared_ptr runner_ {}; std::shared_ptr handler_ {}; - sptr ansSubscriberProxy_ {}; + sptr ansSubscriberProxy_ {}; sptr recipient_ {}; DECLARE_DELAYED_SINGLETON(NotificationSubscriberManager); @@ -135,4 +136,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_NOTIFICATIONMGR_INCLUDE_NOTIFICATION_SUBSCRIBER_MANAGER_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_INCLUDE_NOTIFICATION_SUBSCRIBER_MANAGER_H \ No newline at end of file diff --git a/services/ans/include/permission_filter.h b/services/ans/include/permission_filter.h index b14536da..dc3466b4 100644 --- a/services/ans/include/permission_filter.h +++ b/services/ans/include/permission_filter.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_PERMISSION_FILTER_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_PERMISSION_FILTER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_PERMISSION_FILTER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_PERMISSION_FILTER_H #include "notification_filter.h" @@ -46,4 +46,4 @@ public: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_PERMISSION_FILTER_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_PERMISSION_FILTER_H \ No newline at end of file diff --git a/services/ans/include/preferences_constant.h b/services/ans/include/preferences_constant.h index f8546b2a..80434070 100644 --- a/services/ans/include/preferences_constant.h +++ b/services/ans/include/preferences_constant.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_PREFERENCES_CONSTANT_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_PREFERENCES_CONSTANT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_PREFERENCES_CONSTANT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_PREFERENCES_CONSTANT_H namespace OHOS { namespace Notification { @@ -249,4 +249,4 @@ enum class BundleType { } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_PREFERENCES_CONSTANT_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_PREFERENCES_CONSTANT_H \ No newline at end of file diff --git a/services/ans/include/reminder_data_manager.h b/services/ans/include/reminder_data_manager.h index e9a727ec..e28db03d 100644 --- a/services/ans/include/reminder_data_manager.h +++ b/services/ans/include/reminder_data_manager.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_DATA_MANAGER_H -#define BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_DATA_MANAGER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_DATA_MANAGER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_DATA_MANAGER_H #include #include @@ -496,5 +496,5 @@ private: std::shared_ptr store_ = nullptr; }; } // namespace OHOS -} // namespace Nofitifcation -#endif // BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_DATA_MANAGER_H \ No newline at end of file +} // namespace Notification +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_DATA_MANAGER_H \ No newline at end of file diff --git a/services/ans/include/reminder_event_manager.h b/services/ans/include/reminder_event_manager.h index 09c73164..dbc625f2 100644 --- a/services/ans/include/reminder_event_manager.h +++ b/services/ans/include/reminder_event_manager.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_EVENT_MANAGER_H -#define BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_EVENT_MANAGER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_EVENT_MANAGER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_EVENT_MANAGER_H #include "common_event_subscriber.h" #include "reminder_data_manager.h" @@ -59,4 +59,4 @@ private: }; } // namespace OHOS } // namespace Notification -#endif // BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_EVENT_MANAGER_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_EVENT_MANAGER_H diff --git a/services/ans/include/reminder_timer_info.h b/services/ans/include/reminder_timer_info.h index ca8f5757..ef4920a7 100644 --- a/services/ans/include/reminder_timer_info.h +++ b/services/ans/include/reminder_timer_info.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_TIMER_INFO_H -#define BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_TIMER_INFO_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_TIMER_INFO_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_TIMER_INFO_H #include "advanced_notification_service.h" #include "itimer_info.h" @@ -67,4 +67,4 @@ private: } // namespace OHOS } // namespace Notification -#endif // BASE_NOTIFICATION_ANS_STANDARD_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_TIMER_INFO_H +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_ANS_CORE_INCLUDE_REMINDER_TIMER_INFO_H diff --git a/services/ans/include/remote_death_recipient.h b/services/ans/include/remote_death_recipient.h index 6c876bc6..da1b9563 100644 --- a/services/ans/include/remote_death_recipient.h +++ b/services/ans/include/remote_death_recipient.h @@ -12,8 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_REMOTE_DEATH_RECIPIENT_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_REMOTE_DEATH_RECIPIENT_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_REMOTE_DEATH_RECIPIENT_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_REMOTE_DEATH_RECIPIENT_H #include @@ -58,4 +58,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_REMOTE_DEATH_RECIPIENT_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_REMOTE_DEATH_RECIPIENT_H \ No newline at end of file diff --git a/services/ans/include/system_event_observer.h b/services/ans/include/system_event_observer.h index 85629c59..4d99c03b 100644 --- a/services/ans/include/system_event_observer.h +++ b/services/ans/include/system_event_observer.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_SYSTEM_EVENT_OBSERVER_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_SYSTEM_EVENT_OBSERVER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_SYSTEM_EVENT_OBSERVER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_SYSTEM_EVENT_OBSERVER_H #include @@ -51,4 +51,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_SYSTEM_EVENT_OBSERVER_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_SYSTEM_EVENT_OBSERVER_H \ No newline at end of file diff --git a/services/ans/include/system_event_subscriber.h b/services/ans/include/system_event_subscriber.h index a1adbeb3..20566f14 100644 --- a/services/ans/include/system_event_subscriber.h +++ b/services/ans/include/system_event_subscriber.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_SYSTEM_EVENT_SUBSCRIBER_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_SYSTEM_EVENT_SUBSCRIBER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_SYSTEM_EVENT_SUBSCRIBER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_SYSTEM_EVENT_SUBSCRIBER_H #include @@ -59,4 +59,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_ANS_INCLUDE_SYSTEM_EVENT_SUBSCRIBER_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_SYSTEM_EVENT_SUBSCRIBER_H \ No newline at end of file diff --git a/services/ans/src/advanced_notification_service.cpp b/services/ans/src/advanced_notification_service.cpp index 8fe812c6..e8fadd2d 100644 --- a/services/ans/src/advanced_notification_service.cpp +++ b/services/ans/src/advanced_notification_service.cpp @@ -1292,7 +1292,7 @@ ErrCode AdvancedNotificationService::RemoveFromNotificationListForDeleteAll( } ErrCode AdvancedNotificationService::Subscribe( - const sptr &subscriber, const sptr &info) + const sptr &subscriber, const sptr &info) { ANS_LOGD("%{public}s", __FUNCTION__); @@ -1314,7 +1314,7 @@ ErrCode AdvancedNotificationService::Subscribe( } ErrCode AdvancedNotificationService::Unsubscribe( - const sptr &subscriber, const sptr &info) + const sptr &subscriber, const sptr &info) { ANS_LOGD("%{public}s", __FUNCTION__); diff --git a/services/ans/src/notification_subscriber_manager.cpp b/services/ans/src/notification_subscriber_manager.cpp index 96d85e0a..ff144a62 100644 --- a/services/ans/src/notification_subscriber_manager.cpp +++ b/services/ans/src/notification_subscriber_manager.cpp @@ -30,7 +30,7 @@ namespace OHOS { namespace Notification { struct NotificationSubscriberManager::SubscriberRecord { - sptr subscriber {nullptr}; + sptr subscriber {nullptr}; std::set bundleList_ {}; bool subscribedAll {false}; int32_t userId {SUBSCRIBE_USER_INIT}; @@ -51,7 +51,7 @@ NotificationSubscriberManager::~NotificationSubscriberManager() } ErrCode NotificationSubscriberManager::AddSubscriber( - const sptr &subscriber, const sptr &subscribeInfo) + const sptr &subscriber, const sptr &subscribeInfo) { if (subscriber == nullptr) { ANS_LOGE("subscriber is null."); @@ -89,7 +89,7 @@ ErrCode NotificationSubscriberManager::AddSubscriber( } ErrCode NotificationSubscriberManager::RemoveSubscriber( - const sptr &subscriber, const sptr &subscribeInfo) + const sptr &subscriber, const sptr &subscribeInfo) { if (subscriber == nullptr) { ANS_LOGE("subscriber is null."); @@ -198,7 +198,7 @@ std::shared_ptr NotificationSub } std::shared_ptr NotificationSubscriberManager::FindSubscriberRecord( - const sptr &subscriber) + const sptr &subscriber) { auto iter = subscriberRecordList_.begin(); @@ -211,7 +211,7 @@ std::shared_ptr NotificationSub } std::shared_ptr NotificationSubscriberManager::CreateSubscriberRecord( - const sptr &subscriber) + const sptr &subscriber) { std::shared_ptr record = std::make_shared(); if (record != nullptr) { @@ -255,7 +255,7 @@ void NotificationSubscriberManager::RemoveRecordInfo( } ErrCode NotificationSubscriberManager::AddSubscriberInner( - const sptr &subscriber, const sptr &subscribeInfo) + const sptr &subscriber, const sptr &subscribeInfo) { std::shared_ptr record = FindSubscriberRecord(subscriber); if (record == nullptr) { @@ -278,7 +278,7 @@ ErrCode NotificationSubscriberManager::AddSubscriberInner( } ErrCode NotificationSubscriberManager::RemoveSubscriberInner( - const sptr &subscriber, const sptr &subscribeInfo) + const sptr &subscriber, const sptr &subscribeInfo) { std::shared_ptr record = FindSubscriberRecord(subscriber); diff --git a/services/ans/test/unittest/BUILD.gn b/services/ans/test/unittest/BUILD.gn index 625aca85..694f0a71 100644 --- a/services/ans/test/unittest/BUILD.gn +++ b/services/ans/test/unittest/BUILD.gn @@ -11,11 +11,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "ans_standard/unittest" +module_output_path = "${component_name}/unittest" ohos_unittest("ans_unit_test") { module_out_path = module_output_path @@ -63,7 +63,7 @@ ohos_unittest("ans_unit_test") { deps = [ "${core_path}:ans_core", - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//foundation/arkui/ace_engine/interfaces/inner_api/ui_service_manager:ui_service_mgr", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -98,8 +98,8 @@ ohos_unittest("ans_unit_test") { "time_native:time_service", ] - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } group("unittest") { diff --git a/services/ans/test/unittest/mock/distributed_kv_data_manager.cpp b/services/ans/test/unittest/mock/distributed_kv_data_manager.cpp index 8e348f6d..c65c9b0b 100644 --- a/services/ans/test/unittest/mock/distributed_kv_data_manager.cpp +++ b/services/ans/test/unittest/mock/distributed_kv_data_manager.cpp @@ -31,7 +31,7 @@ Status DistributedKvDataManager::GetSingleKvStore(const Options &options, const std::shared_ptr &kvStore) { std::string storeIdTmp = storeId.storeId; - kvStore = std::make_shared(); + kvStore = std::make_shared(); return Status::SUCCESS; } diff --git a/services/ans/test/unittest/mock/include/mock_single_kv_store.h b/services/ans/test/unittest/mock/include/mock_single_kv_store.h index 1b0de70a..01db4cd4 100644 --- a/services/ans/test/unittest/mock/include/mock_single_kv_store.h +++ b/services/ans/test/unittest/mock/include/mock_single_kv_store.h @@ -31,7 +31,7 @@ namespace OHOS { namespace DistributedKv { // This is a public interface. Implementation of this class is in AppKvStoreImpl. // This class provides put, delete, search, sync and subscribe functions of a key-value store. -class AnsTestSingleKvStore : public SingleKvStore { +class MockSingleKvStore : public SingleKvStore { public: /** * @brief Get all entries in this store which key start with prefixKey. diff --git a/services/ans/test/unittest/mock/mock_single_kv_store.cpp b/services/ans/test/unittest/mock/mock_single_kv_store.cpp index 33ddc024..aba77bce 100644 --- a/services/ans/test/unittest/mock/mock_single_kv_store.cpp +++ b/services/ans/test/unittest/mock/mock_single_kv_store.cpp @@ -18,152 +18,151 @@ namespace OHOS { namespace DistributedKv { -Status AnsTestSingleKvStore::GetEntries(const Key &prefixKey, std::vector &entries) const +Status MockSingleKvStore::GetEntries(const Key &prefixKey, std::vector &entries) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetEntries(const DataQuery &query, std::vector &entries) const +Status MockSingleKvStore::GetEntries(const DataQuery &query, std::vector &entries) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetResultSet(const Key &prefixKey, std::shared_ptr &resultSet) const +Status MockSingleKvStore::GetResultSet(const Key &prefixKey, std::shared_ptr &resultSet) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetResultSet(const DataQuery &query, - std::shared_ptr &resultSet) const +Status MockSingleKvStore::GetResultSet(const DataQuery &query, std::shared_ptr &resultSet) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::CloseResultSet(std::shared_ptr &resultSet) +Status MockSingleKvStore::CloseResultSet(std::shared_ptr &resultSet) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetCount(const DataQuery &query, int &result) const +Status MockSingleKvStore::GetCount(const DataQuery &query, int &result) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Sync(const std::vector &deviceIds, SyncMode mode, uint32_t delayMs) +Status MockSingleKvStore::Sync(const std::vector &deviceIds, SyncMode mode, uint32_t delayMs) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::RemoveDeviceData(const std::string &device) +Status MockSingleKvStore::RemoveDeviceData(const std::string &device) { return Status::SUCCESS; } -StoreId AnsTestSingleKvStore::GetStoreId() const +StoreId MockSingleKvStore::GetStoreId() const { StoreId storeId; storeId.storeId = ""; return storeId; } -Status AnsTestSingleKvStore::Delete(const Key &key) +Status MockSingleKvStore::Delete(const Key &key) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Put(const Key &key, const Value &value) +Status MockSingleKvStore::Put(const Key &key, const Value &value) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Get(const Key &key, Value &value) +Status MockSingleKvStore::Get(const Key &key, Value &value) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::SubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) +Status MockSingleKvStore::SubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::UnSubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) +Status MockSingleKvStore::UnSubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::RegisterSyncCallback(std::shared_ptr callback) +Status MockSingleKvStore::RegisterSyncCallback(std::shared_ptr callback) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::UnRegisterSyncCallback() +Status MockSingleKvStore::UnRegisterSyncCallback() { return Status::SUCCESS; } -Status AnsTestSingleKvStore::PutBatch(const std::vector &entries) +Status MockSingleKvStore::PutBatch(const std::vector &entries) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::DeleteBatch(const std::vector &keys) +Status MockSingleKvStore::DeleteBatch(const std::vector &keys) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::StartTransaction() +Status MockSingleKvStore::StartTransaction() { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Commit() +Status MockSingleKvStore::Commit() { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Rollback() +Status MockSingleKvStore::Rollback() { return Status::SUCCESS; } -Status AnsTestSingleKvStore::SetSyncParam(const KvSyncParam &syncParam) +Status MockSingleKvStore::SetSyncParam(const KvSyncParam &syncParam) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetSyncParam(KvSyncParam &syncParam) +Status MockSingleKvStore::GetSyncParam(KvSyncParam &syncParam) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::SetCapabilityEnabled(bool enabled) const +Status MockSingleKvStore::SetCapabilityEnabled(bool enabled) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::SetCapabilityRange( +Status MockSingleKvStore::SetCapabilityRange( const std::vector &localLabels, const std::vector &remoteSupportLabels) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetSecurityLevel(SecurityLevel &securityLevel) const +Status MockSingleKvStore::GetSecurityLevel(SecurityLevel &securityLevel) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Sync(const std::vector &deviceIds, SyncMode mode, const DataQuery &query, +Status MockSingleKvStore::Sync(const std::vector &deviceIds, SyncMode mode, const DataQuery &query, std::shared_ptr syncCallback) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::SubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) +Status MockSingleKvStore::SubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::UnsubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) +Status MockSingleKvStore::UnsubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) { return Status::SUCCESS; } diff --git a/services/ans/test/unittest/notification_subscriber_manager_test.cpp b/services/ans/test/unittest/notification_subscriber_manager_test.cpp index 445e8c7c..d93432c3 100644 --- a/services/ans/test/unittest/notification_subscriber_manager_test.cpp +++ b/services/ans/test/unittest/notification_subscriber_manager_test.cpp @@ -62,13 +62,13 @@ private: static std::shared_ptr notificationSubscriberManager_; static TestAnsSubscriber testAnsSubscriber_; - static sptr subscriber_; + static sptr subscriber_; }; std::shared_ptr NotificationSubscriberManagerTest::notificationSubscriberManager_ = nullptr; NotificationSubscriberManagerTest::TestAnsSubscriber NotificationSubscriberManagerTest::testAnsSubscriber_; -sptr NotificationSubscriberManagerTest::subscriber_ = nullptr; +sptr NotificationSubscriberManagerTest::subscriber_ = nullptr; void NotificationSubscriberManagerTest::SetUpTestCase() { diff --git a/frameworks/ans/dialog/dialog_ui/js/BUILD.gn b/services/dialog/dialog_ui/js/BUILD.gn similarity index 79% rename from frameworks/ans/dialog/dialog_ui/js/BUILD.gn rename to services/dialog/dialog_ui/js/BUILD.gn index cfedaace..a083daf0 100644 --- a/frameworks/ans/dialog/dialog_ui/js/BUILD.gn +++ b/services/dialog/dialog_ui/js/BUILD.gn @@ -11,17 +11,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//foundation/arkui/ace_engine/build/ace_gen_sa_dialog_js.gni") gen_sa_dialog_js("dialog_js_files_etc") { - project_path = "${frameworks_path}/ans/dialog/dialog_ui/js/" + project_path = "${services_path}/dialog/dialog_ui/js/" i18n_files = [ "i18n/en-US.json", "i18n/zh-CN.json", ] common_files = [] dialog_name = "notification_dialog" - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } diff --git a/frameworks/ans/dialog/dialog_ui/js/common/.gitkeep b/services/dialog/dialog_ui/js/common/.gitkeep similarity index 100% rename from frameworks/ans/dialog/dialog_ui/js/common/.gitkeep rename to services/dialog/dialog_ui/js/common/.gitkeep diff --git a/frameworks/ans/dialog/dialog_ui/js/i18n/en-US.json b/services/dialog/dialog_ui/js/i18n/en-US.json similarity index 100% rename from frameworks/ans/dialog/dialog_ui/js/i18n/en-US.json rename to services/dialog/dialog_ui/js/i18n/en-US.json diff --git a/frameworks/ans/dialog/dialog_ui/js/i18n/zh-CN.json b/services/dialog/dialog_ui/js/i18n/zh-CN.json similarity index 100% rename from frameworks/ans/dialog/dialog_ui/js/i18n/zh-CN.json rename to services/dialog/dialog_ui/js/i18n/zh-CN.json diff --git a/frameworks/ans/dialog/dialog_ui/js/pages/index/index.css b/services/dialog/dialog_ui/js/pages/index/index.css similarity index 100% rename from frameworks/ans/dialog/dialog_ui/js/pages/index/index.css rename to services/dialog/dialog_ui/js/pages/index/index.css diff --git a/frameworks/ans/dialog/dialog_ui/js/pages/index/index.hml b/services/dialog/dialog_ui/js/pages/index/index.hml similarity index 100% rename from frameworks/ans/dialog/dialog_ui/js/pages/index/index.hml rename to services/dialog/dialog_ui/js/pages/index/index.hml diff --git a/frameworks/ans/dialog/dialog_ui/js/pages/index/index.js b/services/dialog/dialog_ui/js/pages/index/index.js similarity index 100% rename from frameworks/ans/dialog/dialog_ui/js/pages/index/index.js rename to services/dialog/dialog_ui/js/pages/index/index.js diff --git a/services/distributed/BUILD.gn b/services/distributed/BUILD.gn index 86107793..10b19877 100644 --- a/services/distributed/BUILD.gn +++ b/services/distributed/BUILD.gn @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") config("ans_distributed_config") { @@ -39,7 +39,7 @@ ohos_shared_library("libans_distributed") { configs = [ ":ans_distributed_config", "${core_path}:public_ans_core_config", - "${frameworks_path}/ans/native:ans_innerkits_public_config", + "${frameworks_module_ans_path}:ans_innerkits_public_config", ] deps = [ "${core_path}:ans_core" ] @@ -55,6 +55,6 @@ ohos_shared_library("libans_distributed") { "utils_base:utils", ] - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } diff --git a/services/distributed/include/distributed_database.h b/services/distributed/include/distributed_database.h index 3508780f..4bde7ada 100644 --- a/services/distributed/include/distributed_database.h +++ b/services/distributed/include/distributed_database.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_DATABASE_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_DATABASE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_DATABASE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_DATABASE_H #include #include @@ -143,4 +143,4 @@ private: } // namespace Notification } // namespace OHOS -#endif /* BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_DATABASE_H */ \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_DATABASE_H \ No newline at end of file diff --git a/services/distributed/include/distributed_database_callback.h b/services/distributed/include/distributed_database_callback.h index 2b4764a5..f5cfdb00 100644 --- a/services/distributed/include/distributed_database_callback.h +++ b/services/distributed/include/distributed_database_callback.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_DATABASE_CALLBACK_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_DATABASE_CALLBACK_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_DATABASE_CALLBACK_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_DATABASE_CALLBACK_H #include @@ -54,4 +54,4 @@ private: } // namespace Notification } // namespace OHOS -#endif /* BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_DATABASE_CALLBACK_H */ \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_DATABASE_CALLBACK_H \ No newline at end of file diff --git a/services/distributed/include/distributed_device_callback.h b/services/distributed/include/distributed_device_callback.h index 86ac2c60..cdb837e4 100644 --- a/services/distributed/include/distributed_device_callback.h +++ b/services/distributed/include/distributed_device_callback.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_DEVICE_CALLBACK_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_DEVICE_CALLBACK_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_DEVICE_CALLBACK_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_DEVICE_CALLBACK_H #include @@ -55,4 +55,4 @@ private: } // namespace Notification } // namespace OHOS -#endif /* BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_DEVICE_CALLBACK_H */ \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_DEVICE_CALLBACK_H \ No newline at end of file diff --git a/services/distributed/include/distributed_flow_control.h b/services/distributed/include/distributed_flow_control.h index 90accf6c..22e945c3 100644 --- a/services/distributed/include/distributed_flow_control.h +++ b/services/distributed/include/distributed_flow_control.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_FLOW_CONTROL_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_FLOW_CONTROL_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_FLOW_CONTROL_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_FLOW_CONTROL_H #include #include @@ -77,4 +77,4 @@ private: } // namespace Notification } // namespace OHOS -#endif /* BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_FLOW_CONTROL_H */ \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_FLOW_CONTROL_H \ No newline at end of file diff --git a/services/distributed/include/distributed_notification_manager.h b/services/distributed/include/distributed_notification_manager.h index 796a9a54..9d453e15 100644 --- a/services/distributed/include/distributed_notification_manager.h +++ b/services/distributed/include/distributed_notification_manager.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_NOTIFICATION_MANAGER_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_NOTIFICATION_MANAGER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_NOTIFICATION_MANAGER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_NOTIFICATION_MANAGER_H #include @@ -173,4 +173,4 @@ private: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_NOTIFICATION_MANAGER_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_NOTIFICATION_MANAGER_H \ No newline at end of file diff --git a/services/distributed/include/distributed_preferences.h b/services/distributed/include/distributed_preferences.h index 4f043688..108414c5 100644 --- a/services/distributed/include/distributed_preferences.h +++ b/services/distributed/include/distributed_preferences.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_PREFERENCES_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_PREFERENCES_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_PREFERENCES_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_PREFERENCES_H #include #include @@ -100,4 +100,4 @@ private: }; } // namespace Notification } // namespace OHOS -#endif /* BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_PREFERENCES_H */ +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_PREFERENCES_H diff --git a/services/distributed/include/distributed_preferences_database.h b/services/distributed/include/distributed_preferences_database.h index 9668c349..6248c6d0 100644 --- a/services/distributed/include/distributed_preferences_database.h +++ b/services/distributed/include/distributed_preferences_database.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_PREFERENCES_DATABASE_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_PREFERENCES_DATABASE_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_PREFERENCES_DATABASE_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_PREFERENCES_DATABASE_H #include #include @@ -94,4 +94,4 @@ private: } // namespace Notification } // namespace OHOS -#endif /* BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_DATABASE_H */ \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_PREFERENCES_DATABASE_H \ No newline at end of file diff --git a/services/distributed/include/distributed_preferences_info.h b/services/distributed/include/distributed_preferences_info.h index 16288af7..efefe583 100644 --- a/services/distributed/include/distributed_preferences_info.h +++ b/services/distributed/include/distributed_preferences_info.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_PREFERENCES_INFO_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_PREFERENCES_INFO_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_PREFERENCES_INFO_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_PREFERENCES_INFO_H #include #include @@ -81,4 +81,4 @@ private: } // namespace Notification } // namespace OHOS -#endif /* BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_PREFERENCES_INFO_H */ \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_PREFERENCES_INFO_H \ No newline at end of file diff --git a/services/distributed/include/distributed_screen_status_manager.h b/services/distributed/include/distributed_screen_status_manager.h index 049fe52a..7d2c81be 100644 --- a/services/distributed/include/distributed_screen_status_manager.h +++ b/services/distributed/include/distributed_screen_status_manager.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_SCREEN_STATUS_MANAGER_H -#define BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_SCREEN_STATUS_MANAGER_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_SCREEN_STATUS_MANAGER_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_SCREEN_STATUS_MANAGER_H #include @@ -74,4 +74,4 @@ private: } // namespace Notification } // namespace OHOS -#endif /* BASE_NOTIFICATION_ANS_STANDARD_SERVICES_DISTRIBUTED_INCLUDE_DISTRIBUTED_SCREEN_STATUS_MANAGER_H */ +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_DISTRIBUTED_INCLUDE_SCREEN_STATUS_MANAGER_H diff --git a/services/distributed/test/unittest/BUILD.gn b/services/distributed/test/unittest/BUILD.gn index 216faf74..53159472 100644 --- a/services/distributed/test/unittest/BUILD.gn +++ b/services/distributed/test/unittest/BUILD.gn @@ -11,11 +11,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") import("//build/test.gni") -group("ans_distributed_unit_test_target") { +group("ans_unit_test") { testonly = true deps = [] @@ -25,7 +25,7 @@ group("ans_distributed_unit_test_target") { } ohos_unittest("ans_distributed_unit_test") { - module_out_path = "ans_standard/unittest" + module_out_path = "${component_name}/unittest" include_dirs = [ "/${services_path}/distributed/include", "//utils/native/base/include", @@ -45,17 +45,17 @@ ohos_unittest("ans_distributed_unit_test") { "${services_path}/distributed/test/unittest/distributed_notification_manager_test.cpp", "${services_path}/distributed/test/unittest/distributed_preferences_test.cpp", "${services_path}/distributed/test/unittest/distributed_screen_status_manager_test.cpp", - "${services_path}/distributed/test/unittest/mock/ans_test_single_kv_store.cpp", "${services_path}/distributed/test/unittest/mock/mock_blob.cpp", "${services_path}/distributed/test/unittest/mock/mock_change_notification.cpp", "${services_path}/distributed/test/unittest/mock/mock_distributed_kv_data_manager.cpp", "${services_path}/distributed/test/unittest/mock/mock_event_handler.cpp", + "${services_path}/distributed/test/unittest/mock/mock_single_kv_store.cpp", ] configs = [ "${services_path}/distributed/:ans_distributed_config", "${core_path}:public_ans_core_config", - "${frameworks_path}/ans/native:ans_innerkits_public_config", + "${frameworks_module_ans_path}:ans_innerkits_public_config", ] deps = [ @@ -77,6 +77,6 @@ ohos_unittest("ans_distributed_unit_test") { "multimedia_image_standard:image_native", ] - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } diff --git a/services/distributed/test/unittest/mock/ans_test_single_kv_store.cpp b/services/distributed/test/unittest/mock/ans_test_single_kv_store.cpp deleted file mode 100644 index db41e31b..00000000 --- a/services/distributed/test/unittest/mock/ans_test_single_kv_store.cpp +++ /dev/null @@ -1,171 +0,0 @@ -/* - * 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. - */ - -#include "ans_test_single_kv_store.h" -#include "types.h" - -namespace OHOS { -namespace DistributedKv { -Status AnsTestSingleKvStore::GetEntries(const Key &prefixKey, std::vector &entries) const -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::GetEntries(const DataQuery &query, std::vector &entries) const -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::GetResultSet(const Key &prefixKey, std::shared_ptr &resultSet) const -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::GetResultSet( - const DataQuery &query, std::shared_ptr &resultSet) const -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::CloseResultSet(std::shared_ptr &resultSet) -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::GetCount(const DataQuery &query, int &result) const -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::Sync(const std::vector &deviceIds, SyncMode mode, uint32_t allowedDelayMs) -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::RemoveDeviceData(const std::string &device) -{ - return Status::SUCCESS; -} - -StoreId AnsTestSingleKvStore::GetStoreId() const -{ - StoreId storeId; - storeId.storeId = ""; - return storeId; -} - -Status AnsTestSingleKvStore::Delete(const Key &key) -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::Put(const Key &key, const Value &value) -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::Get(const Key &key, Value &value) -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::SubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::UnSubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::RegisterSyncCallback(std::shared_ptr callback) -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::UnRegisterSyncCallback() -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::PutBatch(const std::vector &entries) -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::DeleteBatch(const std::vector &keys) -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::StartTransaction() -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::Commit() -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::Rollback() -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::SetSyncParam(const KvSyncParam &syncParam) -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::GetSyncParam(KvSyncParam &syncParam) -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::SetCapabilityEnabled(bool enabled) const -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::SetCapabilityRange( - const std::vector &localLabels, const std::vector &remoteSupportLabels) const -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::GetSecurityLevel(SecurityLevel &securityLevel) const -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::Sync(const std::vector &deviceIds, SyncMode mode, - const DataQuery &query, std::shared_ptr syncCallback) -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::SubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) -{ - return Status::SUCCESS; -} - -Status AnsTestSingleKvStore::UnsubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) -{ - return Status::SUCCESS; -} -} // namespace DistributedKv -} // namespace OHOS diff --git a/services/distributed/test/unittest/mock/mock_distributed_kv_data_manager.cpp b/services/distributed/test/unittest/mock/mock_distributed_kv_data_manager.cpp index 7d4c8601..611b3c8d 100644 --- a/services/distributed/test/unittest/mock/mock_distributed_kv_data_manager.cpp +++ b/services/distributed/test/unittest/mock/mock_distributed_kv_data_manager.cpp @@ -15,7 +15,7 @@ #include "distributed_kv_data_manager.h" -#include "ans_test_single_kv_store.h" +#include "mock_single_kv_store.h" namespace OHOS { namespace DistributedKv { @@ -38,7 +38,7 @@ Status DistributedKvDataManager::StopWatchDeviceChange(std::shared_ptr &singleKvStore) { - std::shared_ptr kvStore = std::make_shared(); + std::shared_ptr kvStore = std::make_shared(); singleKvStore = std::static_pointer_cast(kvStore); return DistributedKv::Status::SUCCESS; } diff --git a/services/distributed/test/unittest/mock/mock_single_kv_store.cpp b/services/distributed/test/unittest/mock/mock_single_kv_store.cpp new file mode 100644 index 00000000..2c0862cd --- /dev/null +++ b/services/distributed/test/unittest/mock/mock_single_kv_store.cpp @@ -0,0 +1,171 @@ +/* + * 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. + */ + +#include "mock_single_kv_store.h" +#include "types.h" + +namespace OHOS { +namespace DistributedKv { +Status MockSingleKvStore::GetEntries(const Key &prefixKey, std::vector &entries) const +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::GetEntries(const DataQuery &query, std::vector &entries) const +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::GetResultSet(const Key &prefixKey, std::shared_ptr &resultSet) const +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::GetResultSet( + const DataQuery &query, std::shared_ptr &resultSet) const +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::CloseResultSet(std::shared_ptr &resultSet) +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::GetCount(const DataQuery &query, int &result) const +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::Sync(const std::vector &deviceIds, SyncMode mode, uint32_t allowedDelayMs) +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::RemoveDeviceData(const std::string &device) +{ + return Status::SUCCESS; +} + +StoreId MockSingleKvStore::GetStoreId() const +{ + StoreId storeId; + storeId.storeId = ""; + return storeId; +} + +Status MockSingleKvStore::Delete(const Key &key) +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::Put(const Key &key, const Value &value) +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::Get(const Key &key, Value &value) +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::SubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::UnSubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::RegisterSyncCallback(std::shared_ptr callback) +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::UnRegisterSyncCallback() +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::PutBatch(const std::vector &entries) +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::DeleteBatch(const std::vector &keys) +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::StartTransaction() +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::Commit() +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::Rollback() +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::SetSyncParam(const KvSyncParam &syncParam) +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::GetSyncParam(KvSyncParam &syncParam) +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::SetCapabilityEnabled(bool enabled) const +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::SetCapabilityRange( + const std::vector &localLabels, const std::vector &remoteSupportLabels) const +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::GetSecurityLevel(SecurityLevel &securityLevel) const +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::Sync(const std::vector &deviceIds, SyncMode mode, + const DataQuery &query, std::shared_ptr syncCallback) +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::SubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) +{ + return Status::SUCCESS; +} + +Status MockSingleKvStore::UnsubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) +{ + return Status::SUCCESS; +} +} // namespace DistributedKv +} // namespace OHOS diff --git a/services/distributed/test/unittest/mock/ans_test_single_kv_store.h b/services/distributed/test/unittest/mock/mock_single_kv_store.h similarity index 99% rename from services/distributed/test/unittest/mock/ans_test_single_kv_store.h rename to services/distributed/test/unittest/mock/mock_single_kv_store.h index ae800cfd..2479cbca 100644 --- a/services/distributed/test/unittest/mock/ans_test_single_kv_store.h +++ b/services/distributed/test/unittest/mock/mock_single_kv_store.h @@ -31,7 +31,7 @@ namespace OHOS { namespace DistributedKv { // This is a public interface. Implementation of this class is in AppKvStoreImpl. // This class provides put, delete, search, sync and subscribe functions of a key-value store. -class AnsTestSingleKvStore : public SingleKvStore { +class MockSingleKvStore : public SingleKvStore { public: /** * @brief Get all entries in this store which key start with prefixKey. diff --git a/services/test/moduletest/BUILD.gn b/services/test/moduletest/BUILD.gn index dc91527e..897b4f03 100644 --- a/services/test/moduletest/BUILD.gn +++ b/services/test/moduletest/BUILD.gn @@ -11,11 +11,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") import("//build/test.gni") -module_output_path = "ans_standard/moduletest" +module_output_path = "${component_name}/moduletest" ohos_moduletest("ans_module_test") { module_out_path = module_output_path @@ -56,7 +56,7 @@ ohos_moduletest("ans_module_test") { deps = [ "${core_path}:ans_core", - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//foundation/arkui/ace_engine/interfaces/inner_api/ui_service_manager:ui_service_mgr", "//utils/native/base:utils", ] @@ -84,8 +84,8 @@ ohos_moduletest("ans_module_test") { "time_native:time_service", ] - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } group("moduletest") { diff --git a/services/test/moduletest/mock/distributed_kv_data_manager.cpp b/services/test/moduletest/mock/distributed_kv_data_manager.cpp index 8e348f6d..c65c9b0b 100644 --- a/services/test/moduletest/mock/distributed_kv_data_manager.cpp +++ b/services/test/moduletest/mock/distributed_kv_data_manager.cpp @@ -31,7 +31,7 @@ Status DistributedKvDataManager::GetSingleKvStore(const Options &options, const std::shared_ptr &kvStore) { std::string storeIdTmp = storeId.storeId; - kvStore = std::make_shared(); + kvStore = std::make_shared(); return Status::SUCCESS; } diff --git a/services/test/moduletest/mock/include/mock_bundle_manager.h b/services/test/moduletest/mock/include/mock_bundle_manager.h index caa83a30..56f641cb 100644 --- a/services/test/moduletest/mock/include/mock_bundle_manager.h +++ b/services/test/moduletest/mock/include/mock_bundle_manager.h @@ -28,13 +28,13 @@ namespace OHOS { namespace AppExecFwk { -class MockBundleMgrService : public BundleMgrHost { +class MockBundleManager : public BundleMgrHost { public: - MockBundleMgrService() + MockBundleManager() { } - ~MockBundleMgrService() + ~MockBundleManager() {} /** diff --git a/services/test/moduletest/mock/include/mock_single_kv_store.h b/services/test/moduletest/mock/include/mock_single_kv_store.h index 2b2d3fdf..347cc59a 100644 --- a/services/test/moduletest/mock/include/mock_single_kv_store.h +++ b/services/test/moduletest/mock/include/mock_single_kv_store.h @@ -31,7 +31,7 @@ namespace OHOS { namespace DistributedKv { // This is a public interface. Implementation of this class is in AppKvStoreImpl. // This class provides put, delete, search, sync and subscribe functions of a key-value store. -class AnsTestSingleKvStore : public SingleKvStore { +class MockSingleKvStore : public SingleKvStore { public: /** * @brief Get all entries in this store which key start with prefixKey. diff --git a/services/test/moduletest/mock/mock_bundle_manager.cpp b/services/test/moduletest/mock/mock_bundle_manager.cpp index b6da2c96..16bd484d 100644 --- a/services/test/moduletest/mock/mock_bundle_manager.cpp +++ b/services/test/moduletest/mock/mock_bundle_manager.cpp @@ -21,13 +21,13 @@ namespace OHOS { namespace AppExecFwk { constexpr int SYSTEMAPP_UUID = 1000; -void MockBundleMgrService::MockSetIsSystemApp(bool isSystemApp) +void MockBundleManager::MockSetIsSystemApp(bool isSystemApp) { isSystemAppMock_ = true; isSystemApp_ = isSystemApp; } -bool MockBundleMgrService::CheckIsSystemAppByUid(const int uid) +bool MockBundleManager::CheckIsSystemAppByUid(const int uid) { if (isSystemAppMock_) { return isSystemApp_; diff --git a/services/test/moduletest/mock/mock_single_kv_store.cpp b/services/test/moduletest/mock/mock_single_kv_store.cpp index 9313653e..446e9bb0 100644 --- a/services/test/moduletest/mock/mock_single_kv_store.cpp +++ b/services/test/moduletest/mock/mock_single_kv_store.cpp @@ -18,152 +18,152 @@ namespace OHOS { namespace DistributedKv { -Status AnsTestSingleKvStore::GetEntries(const Key &prefixKey, std::vector &entries) const +Status MockSingleKvStore::GetEntries(const Key &prefixKey, std::vector &entries) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetEntries(const DataQuery &query, std::vector &entries) const +Status MockSingleKvStore::GetEntries(const DataQuery &query, std::vector &entries) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetResultSet(const Key &prefixKey, std::shared_ptr &resultSet) const +Status MockSingleKvStore::GetResultSet(const Key &prefixKey, std::shared_ptr &resultSet) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetResultSet(const DataQuery &query, std::shared_ptr &resultSet) const +Status MockSingleKvStore::GetResultSet(const DataQuery &query, std::shared_ptr &resultSet) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::CloseResultSet(std::shared_ptr &resultSet) +Status MockSingleKvStore::CloseResultSet(std::shared_ptr &resultSet) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetCount(const DataQuery &query, int &result) const +Status MockSingleKvStore::GetCount(const DataQuery &query, int &result) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Sync( +Status MockSingleKvStore::Sync( const std::vector &deviceIds, SyncMode mode, uint32_t allowedDelayMs) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::RemoveDeviceData(const std::string &device) +Status MockSingleKvStore::RemoveDeviceData(const std::string &device) { return Status::SUCCESS; } -StoreId AnsTestSingleKvStore::GetStoreId() const +StoreId MockSingleKvStore::GetStoreId() const { StoreId storeId; storeId.storeId = ""; return storeId; } -Status AnsTestSingleKvStore::Delete(const Key &key) +Status MockSingleKvStore::Delete(const Key &key) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Put(const Key &key, const Value &value) +Status MockSingleKvStore::Put(const Key &key, const Value &value) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Get(const Key &key, Value &value) +Status MockSingleKvStore::Get(const Key &key, Value &value) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::SubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) +Status MockSingleKvStore::SubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::UnSubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) +Status MockSingleKvStore::UnSubscribeKvStore(SubscribeType subscribeType, std::shared_ptr observer) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::RegisterSyncCallback(std::shared_ptr callback) +Status MockSingleKvStore::RegisterSyncCallback(std::shared_ptr callback) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::UnRegisterSyncCallback() +Status MockSingleKvStore::UnRegisterSyncCallback() { return Status::SUCCESS; } -Status AnsTestSingleKvStore::PutBatch(const std::vector &entries) +Status MockSingleKvStore::PutBatch(const std::vector &entries) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::DeleteBatch(const std::vector &keys) +Status MockSingleKvStore::DeleteBatch(const std::vector &keys) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::StartTransaction() +Status MockSingleKvStore::StartTransaction() { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Commit() +Status MockSingleKvStore::Commit() { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Rollback() +Status MockSingleKvStore::Rollback() { return Status::SUCCESS; } -Status AnsTestSingleKvStore::SetSyncParam(const KvSyncParam &syncParam) +Status MockSingleKvStore::SetSyncParam(const KvSyncParam &syncParam) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetSyncParam(KvSyncParam &syncParam) +Status MockSingleKvStore::GetSyncParam(KvSyncParam &syncParam) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::SetCapabilityEnabled(bool enabled) const +Status MockSingleKvStore::SetCapabilityEnabled(bool enabled) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::SetCapabilityRange( +Status MockSingleKvStore::SetCapabilityRange( const std::vector &localLabels, const std::vector &remoteSupportLabels) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::GetSecurityLevel(SecurityLevel &securityLevel) const +Status MockSingleKvStore::GetSecurityLevel(SecurityLevel &securityLevel) const { return Status::SUCCESS; } -Status AnsTestSingleKvStore::Sync(const std::vector &deviceIds, SyncMode mode, const DataQuery &query, +Status MockSingleKvStore::Sync(const std::vector &deviceIds, SyncMode mode, const DataQuery &query, std::shared_ptr syncCallback) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::SubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) +Status MockSingleKvStore::SubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) { return Status::SUCCESS; } -Status AnsTestSingleKvStore::UnsubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) +Status MockSingleKvStore::UnsubscribeWithQuery(const std::vector &deviceIds, const DataQuery &query) { return Status::SUCCESS; } diff --git a/test/BUILD.gn b/test/BUILD.gn index 9692d01f..2bea0d4e 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") import("//build/test.gni") diff --git a/test/bechmarktest/notification_publish_test/BUILD.gn b/test/bechmarktest/notification_publish_test/BUILD.gn index cf43f025..d2057137 100644 --- a/test/bechmarktest/notification_publish_test/BUILD.gn +++ b/test/bechmarktest/notification_publish_test/BUILD.gn @@ -11,23 +11,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/test.gni") -module_output_path = "ans_standard/benchmarktest" +module_output_path = "${component_name}/benchmarktest" ohos_benchmarktest("Benchmark_Publish_Test") { module_out_path = module_output_path include_dirs = [ - "${interfaces_path}/ans/native/include", + "${inner_api_path}", "${services_path}/ans/include", ] sources = [ "notification_publish_test.cpp" ] deps = [ - "${frameworks_path}/ans/core:ans_core", - "${frameworks_path}/ans/native:ans_innerkits", + "${core_path}:ans_core", + "${frameworks_module_ans_path}:ans_innerkits", "//third_party/benchmark:benchmark", "//third_party/googletest:gtest_main", "//utils/native/base:utils", @@ -40,8 +40,8 @@ ohos_benchmarktest("Benchmark_Publish_Test") { "multimedia_image_standard:image_native", "relational_store:native_rdb", ] - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } group("benchmarktest") { diff --git a/test/bechmarktest/notification_services_test/BUILD.gn b/test/bechmarktest/notification_services_test/BUILD.gn index 907ca8e0..37a95969 100644 --- a/test/bechmarktest/notification_services_test/BUILD.gn +++ b/test/bechmarktest/notification_services_test/BUILD.gn @@ -11,10 +11,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/test.gni") -module_output_path = "ans_standard/benchmarktest" +module_output_path = "${component_name}/benchmarktest" ohos_benchmarktest("Benchmark_Notification_Servece_Test") { module_out_path = module_output_path @@ -31,8 +31,8 @@ ohos_benchmarktest("Benchmark_Notification_Servece_Test") { ] deps = [ - "${frameworks_path}/ans/core:ans_core", - "${frameworks_path}/ans/native:ans_innerkits", + "${core_path}:ans_core", + "${frameworks_module_ans_path}:ans_innerkits", "${services_path}/ans:libans", "//third_party/benchmark:benchmark", "//third_party/googletest:gtest_main", @@ -47,8 +47,8 @@ ohos_benchmarktest("Benchmark_Notification_Servece_Test") { "multimedia_image_standard:image_native", "relational_store:native_rdb", ] - subsystem_name = "notification" - part_name = "ans_standard" + subsystem_name = "${subsystem_name}" + part_name = "${component_name}" } group("benchmarktest") { diff --git a/test/common/acts/actsnotificationfuzztest/BUILD.gn b/test/common/acts/actsnotificationfuzztest/BUILD.gn index be3fb407..370249f4 100644 --- a/test/common/acts/actsnotificationfuzztest/BUILD.gn +++ b/test/common/acts/actsnotificationfuzztest/BUILD.gn @@ -11,35 +11,35 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/test.gni") -module_output_path = "ans_standard/systemtest" +module_output_path = "${component_name}/systemtest" ohos_systemtest("ActsNotificationFuzzTest") { module_out_path = module_output_path resource_config_file = - "${ans_standard_path}/test/resource/notificationfuzztest/ohos_test.xml" + "${component_path}/test/resource/notificationfuzztest/ohos_test.xml" sources = [ - "${ans_standard_path}/test/resource/notificationfuzztest/src/notificationfuzztestmanager.cpp", - "${ans_standard_path}/test/resource/notificationfuzztest/src/notificationgetparam.cpp", + "${component_path}/test/resource/notificationfuzztest/src/notificationfuzztestmanager.cpp", + "${component_path}/test/resource/notificationfuzztest/src/notificationgetparam.cpp", "actsnotificationfuzztest.cpp", ] - configs = [ "${ans_standard_path}/test/common/acts:ansfwk_kits_test_config" ] + configs = [ "${component_path}/test/common/acts:ansfwk_kits_test_config" ] include_dirs = [ - "//utils/native/base/include", - "//base/notification/ans_standard/frameworks/ans/core/include", - "//base/notification/ans_standard/interfaces/innerkits/ans/native/include", - "//base/notification/ans_standard/services/ans/include", - "//third_party/json/single_include", "${aafwk_inner_api_path}/ability_manager/include", "${aafwk_kits_path}/ability/native/include", - "${aafwk_services_path}/abilitymgr/include", - "//foundation/multimodalinput/input/interfaces/native/innerkits/event/include", "${aafwk_kits_path}/app/native/app/include/task", + "${aafwk_services_path}/abilitymgr/include", + "${core_path}/include", + "${inner_api_path}", + "${services_path}/ans/include", + "//foundation/multimodalinput/input/interfaces/native/innerkits/event/include", + "//third_party/json/single_include", + "//utils/native/base/include", ] cflags = [] @@ -51,18 +51,17 @@ ohos_systemtest("ActsNotificationFuzzTest") { deps = [ "${aafwk_kits_path}/appkit:appkit_native", "${aafwk_services_path}/abilitymgr:abilityms", + "${core_path}:ans_core", + "${frameworks_module_ans_path}:ans_innerkits", + "${services_path}/ans:ans_targets", "//base/global/resource_management/frameworks/resmgr:global_resmgr", - "//base/notification/ans_standard/frameworks/ans/core:ans_core", - "//base/notification/ans_standard/frameworks/ans/native:ans_innerkits", - "//base/notification/ans_standard/frameworks/wantagent:native_wantagent", - "//base/notification/ans_standard/services/ans:ans_targets", "//foundation/multimodalinput/input/frameworks/proxy:libmmi-client", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] defines = [ - "APP_LOG_TAG = \"AnsFwkKitsTest\"", + "ANS_LOG_TAG = \"AnsFwkKitsTest\"", "LOG_DOMAIN = 0xD002200", ] external_deps = [ diff --git a/test/fuzztest/BUILD.gn b/test/fuzztest/BUILD.gn index fe320032..558518d3 100644 --- a/test/fuzztest/BUILD.gn +++ b/test/fuzztest/BUILD.gn @@ -11,8 +11,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") - group("fuzztest") { testonly = true diff --git a/test/fuzztest/addnotificationslotgroups_fuzzer/BUILD.gn b/test/fuzztest/addnotificationslotgroups_fuzzer/BUILD.gn index dca2199a..ec9d2224 100644 --- a/test/fuzztest/addnotificationslotgroups_fuzzer/BUILD.gn +++ b/test/fuzztest/addnotificationslotgroups_fuzzer/BUILD.gn @@ -12,15 +12,16 @@ # limitations under the License. #####################hydra-fuzz################### -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/config/features.gni") import("//build/test.gni") -module_output_path = "ans_standard/services" +module_output_path = "${component_name}/fuzztest" ##############################fuzztest########################################## ohos_fuzztest("AddNotificationSlotGroupsFuzzTest") { module_out_path = module_output_path - fuzz_config_file = "//base/notification/ans_standard/test/fuzztest/addnotificationslotgroups_fuzzer" + fuzz_config_file = + "${component_path}/test/fuzztest/addnotificationslotgroups_fuzzer" include_dirs = [] cflags = [ @@ -32,7 +33,7 @@ ohos_fuzztest("AddNotificationSlotGroupsFuzzTest") { sources = [ "addnotificationslotgroups_fuzzer.cpp" ] deps = [ - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//utils/native/base:utils", ] diff --git a/test/fuzztest/addnotificationslots_fuzzer/BUILD.gn b/test/fuzztest/addnotificationslots_fuzzer/BUILD.gn index 80fe89d2..4d91b98a 100644 --- a/test/fuzztest/addnotificationslots_fuzzer/BUILD.gn +++ b/test/fuzztest/addnotificationslots_fuzzer/BUILD.gn @@ -12,15 +12,16 @@ # limitations under the License. #####################hydra-fuzz################### -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/config/features.gni") import("//build/test.gni") -module_output_path = "ans_standard/services" +module_output_path = "${component_name}/fuzztest" ##############################fuzztest########################################## ohos_fuzztest("AddNotificationSlotsFuzzTest") { module_out_path = module_output_path - fuzz_config_file = "//base/notification/ans_standard/test/fuzztest/addnotificationslots_fuzzer" + fuzz_config_file = + "${component_path}/test/fuzztest/addnotificationslots_fuzzer" include_dirs = [] cflags = [ @@ -32,7 +33,7 @@ ohos_fuzztest("AddNotificationSlotsFuzzTest") { sources = [ "addnotificationslots_fuzzer.cpp" ] deps = [ - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//utils/native/base:utils", ] diff --git a/test/fuzztest/addslotbytype_fuzzer/BUILD.gn b/test/fuzztest/addslotbytype_fuzzer/BUILD.gn index 0e18e303..bfd38d72 100644 --- a/test/fuzztest/addslotbytype_fuzzer/BUILD.gn +++ b/test/fuzztest/addslotbytype_fuzzer/BUILD.gn @@ -12,16 +12,15 @@ # limitations under the License. #####################hydra-fuzz################### -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/config/features.gni") import("//build/test.gni") -module_output_path = "ans_standard/services" +module_output_path = "${component_name}/fuzztest" ##############################fuzztest########################################## ohos_fuzztest("AddSlotByTypeFuzzTest") { module_out_path = module_output_path - fuzz_config_file = - "//base/notification/ans_standard/test/fuzztest/addslotbytype_fuzzer" + fuzz_config_file = "${component_path}/test/fuzztest/addslotbytype_fuzzer" include_dirs = [] cflags = [ @@ -33,7 +32,7 @@ ohos_fuzztest("AddSlotByTypeFuzzTest") { sources = [ "addslotbytype_fuzzer.cpp" ] deps = [ - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//utils/native/base:utils", ] diff --git a/test/fuzztest/cancelnotification_fuzzer/BUILD.gn b/test/fuzztest/cancelnotification_fuzzer/BUILD.gn index 2a710f28..bb9ca5f5 100644 --- a/test/fuzztest/cancelnotification_fuzzer/BUILD.gn +++ b/test/fuzztest/cancelnotification_fuzzer/BUILD.gn @@ -12,16 +12,15 @@ # limitations under the License. #####################hydra-fuzz################### -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/config/features.gni") import("//build/test.gni") -module_output_path = "ans_standard/services" +module_output_path = "${component_name}/fuzztest" ##############################fuzztest########################################## ohos_fuzztest("CancelNotificationFuzzTest") { module_out_path = module_output_path - fuzz_config_file = - "//base/notification/ans_standard/test/fuzztest/cancelnotification_fuzzer" + fuzz_config_file = "${component_path}/test/fuzztest/cancelnotification_fuzzer" include_dirs = [] cflags = [ @@ -33,7 +32,7 @@ ohos_fuzztest("CancelNotificationFuzzTest") { sources = [ "cancelnotification_fuzzer.cpp" ] deps = [ - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//utils/native/base:utils", ] diff --git a/test/fuzztest/getnotificationslot_fuzzer/BUILD.gn b/test/fuzztest/getnotificationslot_fuzzer/BUILD.gn index 483ae919..be0cae9b 100644 --- a/test/fuzztest/getnotificationslot_fuzzer/BUILD.gn +++ b/test/fuzztest/getnotificationslot_fuzzer/BUILD.gn @@ -12,15 +12,16 @@ # limitations under the License. #####################hydra-fuzz################### -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/config/features.gni") import("//build/test.gni") -module_output_path = "ans_standard/services" +module_output_path = "${component_name}/fuzztest" ##############################fuzztest########################################## ohos_fuzztest("GetNotificationSlotFuzzTest") { module_out_path = module_output_path - fuzz_config_file = "//base/notification/ans_standard/test/fuzztest/getnotificationslot_fuzzer" + fuzz_config_file = + "${component_path}/test/fuzztest/getnotificationslot_fuzzer" include_dirs = [] cflags = [ @@ -32,7 +33,7 @@ ohos_fuzztest("GetNotificationSlotFuzzTest") { sources = [ "getnotificationslot_fuzzer.cpp" ] deps = [ - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//utils/native/base:utils", ] diff --git a/test/fuzztest/getnotificationslotgroup_fuzzer/BUILD.gn b/test/fuzztest/getnotificationslotgroup_fuzzer/BUILD.gn index 943950ed..f67a8b4c 100644 --- a/test/fuzztest/getnotificationslotgroup_fuzzer/BUILD.gn +++ b/test/fuzztest/getnotificationslotgroup_fuzzer/BUILD.gn @@ -12,15 +12,16 @@ # limitations under the License. #####################hydra-fuzz################### -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/config/features.gni") import("//build/test.gni") -module_output_path = "ans_standard/services" +module_output_path = "${component_name}/fuzztest" ##############################fuzztest########################################## ohos_fuzztest("GetNotificationSlotGroupFuzzTest") { module_out_path = module_output_path - fuzz_config_file = "//base/notification/ans_standard/test/fuzztest/getnotificationslotgroup_fuzzer" + fuzz_config_file = + "${component_path}/test/fuzztest/getnotificationslotgroup_fuzzer" include_dirs = [] cflags = [ @@ -32,7 +33,7 @@ ohos_fuzztest("GetNotificationSlotGroupFuzzTest") { sources = [ "getnotificationslotgroup_fuzzer.cpp" ] deps = [ - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//utils/native/base:utils", ] diff --git a/test/fuzztest/getnotificationslotnumasbundle_fuzzer/BUILD.gn b/test/fuzztest/getnotificationslotnumasbundle_fuzzer/BUILD.gn index ffc0999f..31812144 100644 --- a/test/fuzztest/getnotificationslotnumasbundle_fuzzer/BUILD.gn +++ b/test/fuzztest/getnotificationslotnumasbundle_fuzzer/BUILD.gn @@ -12,15 +12,16 @@ # limitations under the License. #####################hydra-fuzz################### -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/config/features.gni") import("//build/test.gni") -module_output_path = "ans_standard/services" +module_output_path = "${component_name}/fuzztest" ##############################fuzztest########################################## ohos_fuzztest("GetNotificationSlotNumAsBundleFuzzTest") { module_out_path = module_output_path - fuzz_config_file = "//base/notification/ans_standard/test/fuzztest/getnotificationslotnumasbundle_fuzzer" + fuzz_config_file = + "${component_path}/test/fuzztest/getnotificationslotnumasbundle_fuzzer" include_dirs = [] cflags = [ @@ -32,7 +33,7 @@ ohos_fuzztest("GetNotificationSlotNumAsBundleFuzzTest") { sources = [ "getnotificationslotnumasbundle_fuzzer.cpp" ] deps = [ - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//utils/native/base:utils", ] diff --git a/test/fuzztest/publishnotification_fuzzer/BUILD.gn b/test/fuzztest/publishnotification_fuzzer/BUILD.gn index 2fd8179b..084064f9 100644 --- a/test/fuzztest/publishnotification_fuzzer/BUILD.gn +++ b/test/fuzztest/publishnotification_fuzzer/BUILD.gn @@ -12,15 +12,16 @@ # limitations under the License. #####################hydra-fuzz################### -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/config/features.gni") import("//build/test.gni") -module_output_path = "ans_standard/services" +module_output_path = "${component_name}/fuzztest" ##############################fuzztest########################################## ohos_fuzztest("PublishNotificationFuzzTest") { module_out_path = module_output_path - fuzz_config_file = "//base/notification/ans_standard/test/fuzztest/publishnotification_fuzzer" + fuzz_config_file = + "${component_path}/test/fuzztest/publishnotification_fuzzer" include_dirs = [] cflags = [ @@ -32,7 +33,7 @@ ohos_fuzztest("PublishNotificationFuzzTest") { sources = [ "publishnotification_fuzzer.cpp" ] deps = [ - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//utils/native/base:utils", ] diff --git a/test/fuzztest/removenotification_fuzzer/BUILD.gn b/test/fuzztest/removenotification_fuzzer/BUILD.gn index 85da26a1..de591d3f 100644 --- a/test/fuzztest/removenotification_fuzzer/BUILD.gn +++ b/test/fuzztest/removenotification_fuzzer/BUILD.gn @@ -12,16 +12,15 @@ # limitations under the License. #####################hydra-fuzz################### -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/config/features.gni") import("//build/test.gni") -module_output_path = "ans_standard/services" +module_output_path = "${component_name}/fuzztest" ##############################fuzztest########################################## ohos_fuzztest("RemoveNotificationFuzzTest") { module_out_path = module_output_path - fuzz_config_file = - "//base/notification/ans_standard/test/fuzztest/removenotification_fuzzer" + fuzz_config_file = "${component_path}/test/fuzztest/removenotification_fuzzer" include_dirs = [] cflags = [ @@ -33,7 +32,7 @@ ohos_fuzztest("RemoveNotificationFuzzTest") { sources = [ "removenotification_fuzzer.cpp" ] deps = [ - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//utils/native/base:utils", ] diff --git a/test/fuzztest/removenotificationslot_fuzzer/BUILD.gn b/test/fuzztest/removenotificationslot_fuzzer/BUILD.gn index 5a0a6282..0bd40661 100644 --- a/test/fuzztest/removenotificationslot_fuzzer/BUILD.gn +++ b/test/fuzztest/removenotificationslot_fuzzer/BUILD.gn @@ -12,15 +12,16 @@ # limitations under the License. #####################hydra-fuzz################### -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/config/features.gni") import("//build/test.gni") -module_output_path = "ans_standard/services" +module_output_path = "${component_name}/fuzztest" ##############################fuzztest########################################## ohos_fuzztest("RemoveNotificationSlotFuzzTest") { module_out_path = module_output_path - fuzz_config_file = "//base/notification/ans_standard/test/fuzztest/removenotificationslot_fuzzer" + fuzz_config_file = + "${component_path}/test/fuzztest/removenotificationslot_fuzzer" include_dirs = [] cflags = [ @@ -32,7 +33,7 @@ ohos_fuzztest("RemoveNotificationSlotFuzzTest") { sources = [ "removenotificationslot_fuzzer.cpp" ] deps = [ - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//utils/native/base:utils", ] diff --git a/test/fuzztest/removenotificationslotgroup_fuzzer/BUILD.gn b/test/fuzztest/removenotificationslotgroup_fuzzer/BUILD.gn index 23ee0655..c98614bf 100644 --- a/test/fuzztest/removenotificationslotgroup_fuzzer/BUILD.gn +++ b/test/fuzztest/removenotificationslotgroup_fuzzer/BUILD.gn @@ -12,15 +12,16 @@ # limitations under the License. #####################hydra-fuzz################### -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/config/features.gni") import("//build/test.gni") -module_output_path = "ans_standard/services" +module_output_path = "${component_name}/fuzztest" ##############################fuzztest########################################## ohos_fuzztest("RemoveNotificationSlotGroupFuzzTest") { module_out_path = module_output_path - fuzz_config_file = "//base/notification/ans_standard/test/fuzztest/removenotificationslotgroup_fuzzer" + fuzz_config_file = + "${component_path}/test/fuzztest/removenotificationslotgroup_fuzzer" include_dirs = [] cflags = [ @@ -32,7 +33,7 @@ ohos_fuzztest("RemoveNotificationSlotGroupFuzzTest") { sources = [ "removenotificationslotgroup_fuzzer.cpp" ] deps = [ - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//utils/native/base:utils", ] diff --git a/test/fuzztest/setnotificationbadgenum_fuzzer/BUILD.gn b/test/fuzztest/setnotificationbadgenum_fuzzer/BUILD.gn index 704a7ed3..a6996f4a 100644 --- a/test/fuzztest/setnotificationbadgenum_fuzzer/BUILD.gn +++ b/test/fuzztest/setnotificationbadgenum_fuzzer/BUILD.gn @@ -12,15 +12,16 @@ # limitations under the License. #####################hydra-fuzz################### -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/config/features.gni") import("//build/test.gni") -module_output_path = "ans_standard/services" +module_output_path = "${component_name}/fuzztest" ##############################fuzztest########################################## ohos_fuzztest("SetNotificationBadgeNumFuzzTest") { module_out_path = module_output_path - fuzz_config_file = "//base/notification/ans_standard/test/fuzztest/setnotificationbadgenum_fuzzer" + fuzz_config_file = + "${component_path}/test/fuzztest/setnotificationbadgenum_fuzzer" include_dirs = [] cflags = [ @@ -32,7 +33,7 @@ ohos_fuzztest("SetNotificationBadgeNumFuzzTest") { sources = [ "setnotificationbadgenum_fuzzer.cpp" ] deps = [ - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//utils/native/base:utils", ] diff --git a/test/resource/ansSTSlotGroupTest/BUILD.gn b/test/resource/ansSTSlotGroupTest/BUILD.gn index fa3ea9f5..7013b63d 100644 --- a/test/resource/ansSTSlotGroupTest/BUILD.gn +++ b/test/resource/ansSTSlotGroupTest/BUILD.gn @@ -11,11 +11,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") import("//build/test.gni") -SUBDEMOSYSTEM_DIR = "${ans_standard_path}/test/resource/ansSTSlotGroupTest" +SUBDEMOSYSTEM_DIR = "${component_path}/test/resource/ansSTSlotGroupTest" group("ansSTSlotGroupTest") { deps = [ ":libraryAnsSTSlotGroupTest" ] @@ -28,7 +28,7 @@ config("ansSTSlotGroupTestConfig") { "${SUBDEMOSYSTEM_DIR}/include", "${aafwk_kits_path}/appkit/native/app", "${aafwk_services_path}/abilitymgr/include", - "${interfaces_path}/innerkits/ans/native/include", + "${inner_api_path}", ] defines = [ @@ -45,7 +45,7 @@ ohos_shared_library("libraryAnsSTSlotGroupTest") { deps = [ "${aafwk_kits_path}/appkit:appkit_native", "${core_path}:ans_core", - "${frameworks_path}/ans/native:ans_innerkits", + "${frameworks_module_ans_path}:ans_innerkits", "//utils/native/base:utilsbase", ] @@ -59,6 +59,6 @@ ohos_shared_library("libraryAnsSTSlotGroupTest") { "ipc:ipc_core", ] - subsystem_name = "anssystemtest" - part_name = "test" + subsystem_name = "${subsystem_name}" + part_name = "${subsystem_name}" } diff --git a/test/systemtest/acts/ansDump/BUILD.gn b/test/systemtest/acts/ansDump/BUILD.gn index 34a48724..41735618 100644 --- a/test/systemtest/acts/ansDump/BUILD.gn +++ b/test/systemtest/acts/ansDump/BUILD.gn @@ -11,10 +11,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/test.gni") -module_output_path = "ans_standard/systemtest" +module_output_path = "${component_name}/systemtest" ohos_systemtest("AnsDumpTest") { module_out_path = module_output_path @@ -33,7 +33,7 @@ ohos_systemtest("AnsDumpTest") { } deps = [ - "${frameworks_path}/ans/core:ans_core", + "${core_path}:ans_core", "//third_party/googletest:gtest_main", "//utils/native/base:utils", ] diff --git a/tools/BUILD.gn b/tools/BUILD.gn index a123d494..9f575507 100644 --- a/tools/BUILD.gn +++ b/tools/BUILD.gn @@ -11,6 +11,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -group("tools_target") { +group("tools_shell") { deps = [ "dump:anm_target" ] } diff --git a/tools/dump/BUILD.gn b/tools/dump/BUILD.gn index aa6c3ce3..5bf0206b 100644 --- a/tools/dump/BUILD.gn +++ b/tools/dump/BUILD.gn @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//base/notification/ans_standard/notification.gni") +import("//base/notification/distributed_notification_service/notification.gni") import("//build/ohos.gni") group("anm_target") { @@ -52,9 +52,9 @@ ohos_executable("anm") { "multimedia_image_standard:image_native", "relational_store:native_rdb", ] - external_deps += ans_standard_external_deps + external_deps += component_external_deps install_enable = true - part_name = "ans_standard" - subsystem_name = "notification" + part_name = "${component_name}" + subsystem_name = "${subsystem_name}" } diff --git a/tools/dump/include/notification_shell_command.h b/tools/dump/include/notification_shell_command.h index 2d481dc3..716a3728 100644 --- a/tools/dump/include/notification_shell_command.h +++ b/tools/dump/include/notification_shell_command.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_TOOLS_DUMP_INCLUDE_NOTIFICATION_SHELL_COMMAND_H -#define BASE_NOTIFICATION_ANS_STANDARD_TOOLS_DUMP_INCLUDE_NOTIFICATION_SHELL_COMMAND_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_TOOLS_DUMP_INCLUDE_NOTIFICATION_SHELL_COMMAND_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_TOOLS_DUMP_INCLUDE_NOTIFICATION_SHELL_COMMAND_H #include "shell_command.h" #include "ans_notification.h" @@ -55,4 +55,4 @@ private: }; } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_TOOLS_DUMP_INCLUDE_NOTIFICATION_SHELL_COMMAND_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_TOOLS_DUMP_INCLUDE_NOTIFICATION_SHELL_COMMAND_H \ No newline at end of file diff --git a/tools/dump/include/shell_command.h b/tools/dump/include/shell_command.h index 3e335aaa..1c741c87 100644 --- a/tools/dump/include/shell_command.h +++ b/tools/dump/include/shell_command.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef BASE_NOTIFICATION_ANS_STANDARD_TOOLS_DUMP_INCLUDE_SHELL_COMMAND_H -#define BASE_NOTIFICATION_ANS_STANDARD_TOOLS_DUMP_INCLUDE_SHELL_COMMAND_H +#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_TOOLS_DUMP_INCLUDE_SHELL_COMMAND_H +#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_TOOLS_DUMP_INCLUDE_SHELL_COMMAND_H #include #include @@ -115,4 +115,4 @@ protected: } // namespace Notification } // namespace OHOS -#endif // BASE_NOTIFICATION_ANS_STANDARD_TOOLS_DUMP_INCLUDE_SHELL_COMMAND_H \ No newline at end of file +#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_TOOLS_DUMP_INCLUDE_SHELL_COMMAND_H \ No newline at end of file