mirror of
https://github.com/openharmony/notification_ans_standard.git
synced 2026-06-30 21:57:55 -04:00
notification directory modify
Signed-off-by: zero-cyc <chenlien@huawei.com> Change-Id: I5c8cb4ec680df5ad2728f721eb91d910d2353f7c
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ OpenHarmony通过ANS(Advanced Notification Service,通知系统服务)对
|
||||
## 目录
|
||||
|
||||
```
|
||||
/base/notification/ans_standard/
|
||||
/base/notification/distributed_notification_service/
|
||||
├── frameworks # 接口实现
|
||||
├── interfaces
|
||||
│ ├── innerkits # 对内接口目录
|
||||
|
||||
+19
-17
@@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
]
|
||||
}
|
||||
@@ -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}"
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
+1
-1
@@ -114,7 +114,7 @@ bool NotificationSubscriber::SubscriberImpl::GetAnsManagerProxy()
|
||||
return false;
|
||||
}
|
||||
|
||||
proxy_ = iface_cast<IAnsManager>(remoteObject);
|
||||
proxy_ = iface_cast<AnsManagerInterface>(remoteObject);
|
||||
if ((proxy_ == nullptr) || (proxy_->AsObject() == nullptr)) {
|
||||
return false;
|
||||
}
|
||||
+9
-9
@@ -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") {
|
||||
@@ -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}"
|
||||
}
|
||||
+2
-2
@@ -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 {
|
||||
+8
-7
@@ -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<IAnsSubscriber> &subscriber, const sptr<NotificationSubscribeInfo> &info) = 0;
|
||||
virtual ErrCode Subscribe(const sptr<AnsSubscriberInterface> &subscriber,
|
||||
const sptr<NotificationSubscribeInfo> &info) = 0;
|
||||
|
||||
/**
|
||||
* @brief Unsubscribes notifications.
|
||||
@@ -463,7 +464,7 @@ public:
|
||||
* @return Returns ERR_OK on success, others on failure.
|
||||
*/
|
||||
virtual ErrCode Unsubscribe(
|
||||
const sptr<IAnsSubscriber> &subscriber, const sptr<NotificationSubscribeInfo> &info) = 0;
|
||||
const sptr<AnsSubscriberInterface> &subscriber, const sptr<NotificationSubscribeInfo> &info) = 0;
|
||||
|
||||
/**
|
||||
* @brief Obtains whether notifications are suspended.
|
||||
+5
-3
@@ -21,7 +21,7 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace Notification {
|
||||
class AnsManagerProxy : public IRemoteProxy<IAnsManager> {
|
||||
class AnsManagerProxy : public IRemoteProxy<AnsManagerInterface> {
|
||||
public:
|
||||
AnsManagerProxy() = delete;
|
||||
explicit AnsManagerProxy(const sptr<IRemoteObject> &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<IAnsSubscriber> &subscriber, const sptr<NotificationSubscribeInfo> &info) override;
|
||||
ErrCode Subscribe(const sptr<AnsSubscriberInterface> &subscriber,
|
||||
const sptr<NotificationSubscribeInfo> &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<IAnsSubscriber> &subscriber, const sptr<NotificationSubscribeInfo> &info) override;
|
||||
ErrCode Unsubscribe(const sptr<AnsSubscriberInterface> &subscriber,
|
||||
const sptr<NotificationSubscribeInfo> &info) override;
|
||||
|
||||
/**
|
||||
* @brief Obtains whether notifications are suspended.
|
||||
+3
-3
@@ -24,7 +24,7 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace Notification {
|
||||
class AnsManagerStub : public IRemoteStub<IAnsManager> {
|
||||
class AnsManagerStub : public IRemoteStub<AnsManagerInterface> {
|
||||
public:
|
||||
AnsManagerStub();
|
||||
~AnsManagerStub() override;
|
||||
@@ -459,7 +459,7 @@ public:
|
||||
* @return Returns ERR_OK on success, others on failure.
|
||||
*/
|
||||
virtual ErrCode Subscribe(
|
||||
const sptr<IAnsSubscriber> &subscriber, const sptr<NotificationSubscribeInfo> &info) override;
|
||||
const sptr<AnsSubscriberInterface> &subscriber, const sptr<NotificationSubscribeInfo> &info) override;
|
||||
|
||||
/**
|
||||
* @brief Unsubscribes notifications.
|
||||
@@ -469,7 +469,7 @@ public:
|
||||
* @return Returns ERR_OK on success, others on failure.
|
||||
*/
|
||||
virtual ErrCode Unsubscribe(
|
||||
const sptr<IAnsSubscriber> &subscriber, const sptr<NotificationSubscribeInfo> &info) override;
|
||||
const sptr<AnsSubscriberInterface> &subscriber, const sptr<NotificationSubscribeInfo> &info) override;
|
||||
|
||||
/**
|
||||
* @brief Obtains whether notifications are suspended.
|
||||
+1
-1
@@ -900,7 +900,7 @@ private:
|
||||
|
||||
private:
|
||||
std::mutex mutex_;
|
||||
sptr<IAnsManager> ansManagerProxy_;
|
||||
sptr<AnsManagerInterface> ansManagerProxy_;
|
||||
sptr<AnsManagerDeathRecipient> recipient_;
|
||||
};
|
||||
} // namespace Notification
|
||||
+5
-5
@@ -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.
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace Notification {
|
||||
class AnsSubscriberProxy : public IRemoteProxy<IAnsSubscriber> {
|
||||
class AnsSubscriberProxy : public IRemoteProxy<AnsSubscriberInterface> {
|
||||
public:
|
||||
AnsSubscriberProxy() = delete;
|
||||
explicit AnsSubscriberProxy(const sptr<IRemoteObject> &impl);
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace Notification {
|
||||
class AnsSubscriberStub : public IRemoteStub<IAnsSubscriber> {
|
||||
class AnsSubscriberStub : public IRemoteStub<AnsSubscriberInterface> {
|
||||
public:
|
||||
AnsSubscriberStub();
|
||||
~AnsSubscriberStub() override;
|
||||
+4
-3
@@ -26,7 +26,7 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace Notification {
|
||||
AnsManagerProxy::AnsManagerProxy(const sptr<IRemoteObject> &impl) : IRemoteProxy<IAnsManager>(impl)
|
||||
AnsManagerProxy::AnsManagerProxy(const sptr<IRemoteObject> &impl) : IRemoteProxy<AnsManagerInterface>(impl)
|
||||
{}
|
||||
|
||||
AnsManagerProxy::~AnsManagerProxy()
|
||||
@@ -1531,7 +1531,8 @@ ErrCode AnsManagerProxy::GetShowBadgeEnabled(bool &enabled)
|
||||
return result;
|
||||
}
|
||||
|
||||
ErrCode AnsManagerProxy::Subscribe(const sptr<IAnsSubscriber> &subscriber, const sptr<NotificationSubscribeInfo> &info)
|
||||
ErrCode AnsManagerProxy::Subscribe(const sptr<AnsSubscriberInterface> &subscriber,
|
||||
const sptr<NotificationSubscribeInfo> &info)
|
||||
{
|
||||
if (subscriber == nullptr) {
|
||||
ANS_LOGE("[Subscribe] fail: subscriber is empty.");
|
||||
@@ -1579,7 +1580,7 @@ ErrCode AnsManagerProxy::Subscribe(const sptr<IAnsSubscriber> &subscriber, const
|
||||
}
|
||||
|
||||
ErrCode AnsManagerProxy::Unsubscribe(
|
||||
const sptr<IAnsSubscriber> &subscriber, const sptr<NotificationSubscribeInfo> &info)
|
||||
const sptr<AnsSubscriberInterface> &subscriber, const sptr<NotificationSubscribeInfo> &info)
|
||||
{
|
||||
if (subscriber == nullptr) {
|
||||
ANS_LOGE("[Unsubscribe] fail: subscriber is empty.");
|
||||
+8
-11
@@ -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<IAnsManager>::OnRemoteRequest(code, data, reply, flags);
|
||||
return IRemoteStub<AnsManagerInterface>::OnRemoteRequest(code, data, reply, flags);
|
||||
}
|
||||
|
||||
auto fun = it->second;
|
||||
if (fun == nullptr) {
|
||||
ANS_LOGE("[OnRemoteRequest] fail: not find function!");
|
||||
return IRemoteStub<IAnsManager>::OnRemoteRequest(code, data, reply, flags);
|
||||
return IRemoteStub<AnsManagerInterface>::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<IAnsSubscriber>(subscriber), info);
|
||||
ErrCode result = Subscribe(iface_cast<AnsSubscriberInterface>(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<IAnsSubscriber>(subscriber), info);
|
||||
ErrCode result = Unsubscribe(iface_cast<AnsSubscriberInterface>(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<IAnsSubscriber> &subscriber, const sptr<NotificationSubscribeInfo> &info)
|
||||
ErrCode AnsManagerStub::Subscribe(const sptr<AnsSubscriberInterface> &subscriber,
|
||||
const sptr<NotificationSubscribeInfo> &info)
|
||||
{
|
||||
ANS_LOGE("AnsManagerStub::Subscribe called!");
|
||||
return ERR_INVALID_OPERATION;
|
||||
}
|
||||
|
||||
ErrCode AnsManagerStub::Unsubscribe(const sptr<IAnsSubscriber> &subscriber, const sptr<NotificationSubscribeInfo> &info)
|
||||
ErrCode AnsManagerStub::Unsubscribe(const sptr<AnsSubscriberInterface> &subscriber,
|
||||
const sptr<NotificationSubscribeInfo> &info)
|
||||
{
|
||||
ANS_LOGE("AnsManagerStub::Unsubscribe called!");
|
||||
return ERR_INVALID_OPERATION;
|
||||
+1
-1
@@ -1071,7 +1071,7 @@ bool AnsNotification::GetAnsManagerProxy()
|
||||
return false;
|
||||
}
|
||||
|
||||
ansManagerProxy_ = iface_cast<IAnsManager>(remoteObject);
|
||||
ansManagerProxy_ = iface_cast<AnsManagerInterface>(remoteObject);
|
||||
if ((!ansManagerProxy_) || (!ansManagerProxy_->AsObject())) {
|
||||
ANS_LOGE("Failed to get notification Manager's proxy");
|
||||
return false;
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace Notification {
|
||||
AnsSubscriberProxy::AnsSubscriberProxy(const sptr<IRemoteObject> &impl) : IRemoteProxy<IAnsSubscriber>(impl)
|
||||
AnsSubscriberProxy::AnsSubscriberProxy(const sptr<IRemoteObject> &impl) : IRemoteProxy<AnsSubscriberInterface>(impl)
|
||||
{}
|
||||
|
||||
AnsSubscriberProxy::~AnsSubscriberProxy()
|
||||
+2
-2
@@ -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<IAnsSubscriber>::OnRemoteRequest(code, data, reply, flags);
|
||||
return IRemoteStub<AnsSubscriberInterface>::OnRemoteRequest(code, data, reply, flags);
|
||||
}
|
||||
|
||||
auto fun = it->second;
|
||||
if (fun == nullptr) {
|
||||
ANS_LOGW("[OnRemoteRequest] fail: not find function!");
|
||||
return IRemoteStub<IAnsSubscriber>::OnRemoteRequest(code, data, reply, flags);
|
||||
return IRemoteStub<AnsSubscriberInterface>::OnRemoteRequest(code, data, reply, flags);
|
||||
}
|
||||
|
||||
fun(data, reply);
|
||||
@@ -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}"
|
||||
}
|
||||
+3
-3
@@ -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
|
||||
#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_TEMPLATE_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
|
||||
#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_CANCEL_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
|
||||
#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_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_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
|
||||
#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_CONSTANT_H
|
||||
+3
-3
@@ -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
|
||||
#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_DISPLAY_BADGE_H
|
||||
+3
-3
@@ -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
|
||||
#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_DISTRIBUTED_H
|
||||
+3
-3
@@ -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
|
||||
#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_DISTURB_MODE_H
|
||||
+3
-3
@@ -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
|
||||
#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_ENABLE_NOTIFICATION_H
|
||||
+3
-3
@@ -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
|
||||
#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_GET_ACTIVE_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
|
||||
@@ -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
|
||||
#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_PUBLISH_H
|
||||
+3
-3
@@ -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
|
||||
#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_REMINDER_NATIVE_MODULE_H
|
||||
+3
-3
@@ -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
|
||||
+3
-3
@@ -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
|
||||
@@ -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
|
||||
#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_REMOVE_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
|
||||
#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_SLOT_H
|
||||
+3
-3
@@ -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
|
||||
#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_SUBSCRIBE_H
|
||||
+3
-3
@@ -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
|
||||
#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_FRAMEWORKS_JS_NAPI_INCLUDE_UNSUBSCRIBE_H
|
||||
+6
-6
@@ -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}"
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user