/base/notification/distributed_notification_service/frameworks/ans/src/ |
H A D | notification_bundle_option.cpp | 25 NotificationBundleOption::NotificationBundleOption(const std::string &bundleName, const int32_t uid) in NotificationBundleOption() function in OHOS::Notification::NotificationBundleOption 29 NotificationBundleOption::~NotificationBundleOption() in ~NotificationBundleOption() 32 void NotificationBundleOption::SetBundleName(const std::string &bundleName) in SetBundleName() 37 std::string NotificationBundleOption::GetBundleName() const in GetBundleName() 42 void NotificationBundleOption::SetUid(const int32_t uid) in SetUid() 47 int32_t NotificationBundleOption::GetUid() const in GetUid() 52 void NotificationBundleOption::SetInstanceKey(const int32_t key) in SetInstanceKey() 57 int32_t NotificationBundleOption [all...] |
H A D | notification_helper.cpp | 58 ErrCode NotificationHelper::GetNotificationSlotNumAsBundle(const NotificationBundleOption &bundleOption, uint64_t &num) in GetNotificationSlotNumAsBundle() 63 ErrCode NotificationHelper::GetNotificationSlotFlagsAsBundle(const NotificationBundleOption &bundleOption, in GetNotificationSlotFlagsAsBundle() 69 ErrCode NotificationHelper::SetNotificationSlotFlagsAsBundle(const NotificationBundleOption &bundleOption, in SetNotificationSlotFlagsAsBundle() 113 const NotificationBundleOption &bundleOption, int32_t notificationId) in CancelAsBundle() 234 ErrCode NotificationHelper::TriggerLocalLiveView(const NotificationBundleOption &bundleOption, in TriggerLocalLiveView() 246 ErrCode NotificationHelper::RemoveNotification(const NotificationBundleOption &bundleOption, in RemoveNotification() 253 ErrCode NotificationHelper::RemoveAllNotifications(const NotificationBundleOption &bundleOption) in RemoveAllNotifications() 263 ErrCode NotificationHelper::RemoveNotificationsByBundle(const NotificationBundleOption &bundleOption) in RemoveNotificationsByBundle() 274 const NotificationBundleOption &bundleOption, std::vector<sptr<NotificationSlot>> &slots) in GetNotificationSlotsForBundle() 280 const NotificationBundleOption in GetNotificationSlotForBundle() [all...] |
/base/notification/distributed_notification_service/services/ans/include/ |
H A D | notification_preferences.h | 47 const sptr<NotificationBundleOption> &bundleOption, const std::vector<sptr<NotificationSlot>> &slots); 55 ErrCode AddNotificationBundleProperty(const sptr<NotificationBundleOption> &bundleOption); 65 const sptr<NotificationBundleOption> &bundleOption, const NotificationConstant::SlotType &slotType); 73 ErrCode RemoveNotificationAllSlots(const sptr<NotificationBundleOption> &bundleOption); 81 ErrCode RemoveNotificationForBundle(const sptr<NotificationBundleOption> &bundleOption); 91 const sptr<NotificationBundleOption> &bundleOption, const std::vector<sptr<NotificationSlot>> &slot); 101 ErrCode GetNotificationSlot(const sptr<NotificationBundleOption> &bundleOption, 112 const sptr<NotificationBundleOption> &bundleOption, std::vector<sptr<NotificationSlot>> &slots); 121 ErrCode GetNotificationSlotsNumForBundle(const sptr<NotificationBundleOption> &bundleOption, uint64_t &num); 130 ErrCode IsShowBadge(const sptr<NotificationBundleOption> [all...] |
H A D | notification_clone_disturb_service.h | 34 void OnBundleDataAdd(const sptr<NotificationBundleOption> &bundleOption); 35 void OnBundleDataUpdate(const sptr<NotificationBundleOption> &bundleOption); 39 std::vector<NotificationBundleOption> trustList, std::vector<NotificationBundleOption>& exitBunldleList, 40 std::vector<NotificationBundleOption>& notExitBunldleList); 41 void CheckBundleInfo(std::vector<NotificationBundleOption>& trustList, 42 std::vector<NotificationBundleOption>& bundleList, const NotificationBundleOption& bundle);
|
H A D | advanced_notification_service.h | 61 sptr<NotificationBundleOption> bundleOption {nullptr}; 158 ErrCode CancelAsBundle(const sptr<NotificationBundleOption> &bundleOption, int32_t notificationId) override; 171 const sptr<NotificationBundleOption> &bundleOption, int32_t notificationId, int32_t userId) override; 230 ErrCode GetSlotNumAsBundle(const sptr<NotificationBundleOption> &bundleOption, uint64_t &num) override; 272 const sptr<NotificationBundleOption> &bundleOption, const int32_t notificationId, const std::string &label, 353 ErrCode TriggerLocalLiveView(const sptr<NotificationBundleOption> &bundleOption, 359 * @param bundleOption Indicates the NotificationBundleOption of the notification. 365 ErrCode RemoveNotification(const sptr<NotificationBundleOption> &bundleOption, int32_t notificationId, 371 * @param bundleOption Indicates the NotificationBundleOption of notifications. 374 ErrCode RemoveAllNotifications(const sptr<NotificationBundleOption> [all...] |
H A D | notification_dialog_manager.h | 34 class NotificationBundleOption; 74 sptr<NotificationBundleOption> bundleOption; 85 const sptr<NotificationBundleOption>& bundle, 103 ErrCode AddDialogInfo(const sptr<NotificationBundleOption>& bundle, const sptr<AnsDialogCallback>& callback); 109 void RemoveDialogInfoByBundleOption(const sptr<NotificationBundleOption>& bundle, 117 static bool SetHasPoppedDialog(const sptr<NotificationBundleOption>& bundleOption, bool hasPopped); 120 bool AddDialogInfoIfNotExist(const sptr<NotificationBundleOption>& bundle, const sptr<AnsDialogCallback>& callback); 121 sptr<NotificationBundleOption> GetBundleOptionByBundleName(const std::string& bundleName, const int32_t& uid); 129 bool HandleOneDialogClosed(sptr<NotificationBundleOption> bundleOption, EnabledDialogStatus status);
|
H A D | interface_system_event.h | 27 std::function<void(const sptr<NotificationBundleOption> &)> onBundleRemoved; 33 std::function<void(const sptr<NotificationBundleOption> &)> onBundleDataCleared; 34 std::function<void(const sptr<NotificationBundleOption> &)> onBundleAdd; 35 std::function<void(const sptr<NotificationBundleOption> &)> onBundleUpdate;
|
/base/notification/distributed_notification_service/frameworks/ans/test/unittest/ |
H A D | notification_do_not_disturb_profile_test.cpp | 46 std::vector<NotificationBundleOption> trustlist; in HWTEST_F() 47 NotificationBundleOption bundleOption; in HWTEST_F() 63 std::vector<NotificationBundleOption> trustlist; in HWTEST_F() 64 NotificationBundleOption bundleOption; in HWTEST_F() 80 std::vector<NotificationBundleOption> trustlist; in HWTEST_F() 81 NotificationBundleOption bundleOption; in HWTEST_F() 84 std::vector<NotificationBundleOption> myTrustlist; in HWTEST_F() 103 std::vector<NotificationBundleOption> trustlist; in HWTEST_F() 104 NotificationBundleOption bundleOption; in HWTEST_F() 121 std::vector<NotificationBundleOption> trustlis in HWTEST_F() [all...] |
H A D | notification_bundle_option_test.cpp | 46 auto rrc = std::make_shared<NotificationBundleOption>(bundleName, uid); in HWTEST_F() 62 auto rrc = std::make_shared<NotificationBundleOption>(bundleName, uid); in HWTEST_F() 77 auto rrc = std::make_shared<NotificationBundleOption>(bundleName, uid); in HWTEST_F() 79 "NotificationBundleOption{ bundleName = BundleName, uid = 10, instanceKey = 0, appIndex = -1 }"; in HWTEST_F() 94 auto rrc = std::make_shared<NotificationBundleOption>(bundleName, uid); in HWTEST_F() 110 std::shared_ptr<NotificationBundleOption> result = in HWTEST_F() 111 std::make_shared<NotificationBundleOption>(bundleName, uid); in HWTEST_F() 132 auto rrc = std::make_shared<NotificationBundleOption>(bundleName, uid); in HWTEST_F() 146 auto rrc = std::make_shared<NotificationBundleOption>(bundleName, uid); in HWTEST_F()
|
/base/notification/distributed_notification_service/interfaces/inner_api/ |
H A D | notification_helper.h | 91 const NotificationBundleOption &bundleOption, const std::vector<sptr<NotificationSlot>> &slots); 117 static ErrCode GetNotificationSlotNumAsBundle(const NotificationBundleOption &bundleOption, uint64_t &num); 128 const NotificationBundleOption &bundleOption, std::vector<sptr<NotificationSlot>> &slots); 139 const NotificationBundleOption &bundleOption, const NotificationConstant::SlotType &slotType, 151 static ErrCode SetEnabledForBundleSlot(const NotificationBundleOption &bundleOption, 163 const NotificationBundleOption &bundleOption, const NotificationConstant::SlotType &slotType, bool &enabled); 181 static ErrCode GetNotificationSlotFlagsAsBundle(const NotificationBundleOption &bundleOption, uint32_t &slotFlags); 190 static ErrCode SetNotificationSlotFlagsAsBundle(const NotificationBundleOption &bundleOption, uint32_t slotFlags); 274 static ErrCode CancelAsBundle(const NotificationBundleOption &bundleOption, int32_t notificationId); 516 static ErrCode TriggerLocalLiveView(const NotificationBundleOption [all...] |
H A D | notification_bundle_option.h | 24 class NotificationBundleOption : public Parcelable, public NotificationJsonConvertionBase { class 26 NotificationBundleOption() = default; 29 * @brief A constructor used to create a NotificationBundleOption instance based on the creator bundle name and uid. 34 NotificationBundleOption(const std::string &bundleName, const int32_t uid); 36 virtual ~NotificationBundleOption(); 113 * @return Returns the NotificationBundleOption 115 static NotificationBundleOption *Unmarshalling(Parcel &parcel); 129 * @return Returns the NotificationBundleOption. 131 static NotificationBundleOption *FromJson(const nlohmann::json &jsonObject);
|
H A D | notification_do_not_disturb_profile.h | 39 int32_t id, const std::string &name, const std::vector<NotificationBundleOption> &trustList); 64 * For available values, see NotificationBundleOption. 66 void SetProfileTrustList(const std::vector<NotificationBundleOption> &trustList); 86 * For available values, see NotificationBundleOption. 88 std::vector<NotificationBundleOption> GetProfileTrustList() const; 112 std::vector<NotificationBundleOption> trustList_;
|
/base/notification/distributed_notification_service/frameworks/core/include/ |
H A D | ans_manager_interface.h | 108 virtual ErrCode CancelAsBundle(const sptr<NotificationBundleOption> &bundleOption, int32_t notificationId) = 0; 121 const sptr<NotificationBundleOption> &bundleOption, int32_t notificationId, int32_t userId) = 0; 180 virtual ErrCode GetSlotNumAsBundle(const sptr<NotificationBundleOption> &bundleOption, uint64_t &num) = 0; 233 const sptr<NotificationBundleOption> &bundleOption, const int32_t notificationId, const std::string &label, 314 virtual ErrCode TriggerLocalLiveView(const sptr<NotificationBundleOption> &bundleOption, 329 * @param bundleOption Indicates the NotificationBundleOption of the notification. 335 virtual ErrCode RemoveNotification(const sptr<NotificationBundleOption> &bundleOption, int notificationId, 341 * @param bundleOption Indicates the NotificationBundleOption of notifications. 344 virtual ErrCode RemoveAllNotifications(const sptr<NotificationBundleOption> &bundleOption) = 0; 351 * @param bundleOption Indicates the NotificationBundleOption o [all...] |
H A D | ans_manager_proxy.h | 95 ErrCode CancelAsBundle(const sptr<NotificationBundleOption> &bundleOption, int32_t notificationId) override; 108 const sptr<NotificationBundleOption> &bundleOption, int32_t notificationId, int32_t userId) override; 167 ErrCode GetSlotNumAsBundle(const sptr<NotificationBundleOption> &bundleOption, uint64_t &num) override; 220 const sptr<NotificationBundleOption> &bundleOption, const int32_t notificationId, const std::string &label, 301 ErrCode TriggerLocalLiveView(const sptr<NotificationBundleOption> &bundleOption, 307 * @param bundleOption Indicates the NotificationBundleOption of the notification. 313 ErrCode RemoveNotification(const sptr<NotificationBundleOption> &bundleOption, int32_t notificationId, 319 * @param bundleOption Indicates the NotificationBundleOption of notifications. 322 ErrCode RemoveAllNotifications(const sptr<NotificationBundleOption> &bundleOption) override; 338 * @param bundleOption Indicates the NotificationBundleOption o [all...] |
H A D | ans_notification.h | 107 ErrCode GetNotificationSlotNumAsBundle(const NotificationBundleOption &bundleOption, uint64_t &num); 116 ErrCode GetNotificationSlotFlagsAsBundle(const NotificationBundleOption &bundleOption, uint32_t &slotFlags); 125 ErrCode SetNotificationSlotFlagsAsBundle(const NotificationBundleOption &bundleOption, uint32_t slotFlags); 209 ErrCode CancelAsBundle(const NotificationBundleOption &bundleOption, int32_t notificationId); 449 ErrCode TriggerLocalLiveView(const NotificationBundleOption &bundleOption, 472 ErrCode RemoveNotification(const NotificationBundleOption &bundleOption, const int32_t notificationId, 482 ErrCode RemoveAllNotifications(const NotificationBundleOption &bundleOption); 493 ErrCode RemoveNotificationsByBundle(const NotificationBundleOption &bundleOption); 511 const NotificationBundleOption &bundleOption, std::vector<sptr<NotificationSlot>> &slots); 522 const NotificationBundleOption [all...] |
/base/notification/distributed_notification_service/frameworks/core/src/ |
H A D | ans_manager_stub_invalid.cpp | 59 ErrCode AnsManagerStub::CancelAsBundle(const sptr<NotificationBundleOption> &bundleOption, int32_t notificationId) in CancelAsBundle() 66 const sptr<NotificationBundleOption> &bundleOption, int32_t notificationId, int32_t userId) in CancelAsBundle() 108 ErrCode AnsManagerStub::GetSlotNumAsBundle(const sptr<NotificationBundleOption> &bundleOption, uint64_t &num) in GetSlotNumAsBundle() 141 const sptr<NotificationBundleOption> &bundleOption, const int32_t notificationId, const std::string &label, in GetActiveNotificationByFilter() 185 ErrCode AnsManagerStub::GetSlotFlagsAsBundle(const sptr<NotificationBundleOption> &bundleOption, uint32_t &slotFlags) in GetSlotFlagsAsBundle() 191 ErrCode AnsManagerStub::SetSlotFlagsAsBundle(const sptr<NotificationBundleOption> &bundleOption, uint32_t slotFlags) in SetSlotFlagsAsBundle() 203 ErrCode AnsManagerStub::TriggerLocalLiveView(const sptr<NotificationBundleOption> &bundleOption, in TriggerLocalLiveView() 210 ErrCode AnsManagerStub::RemoveNotification(const sptr<NotificationBundleOption> &bundleOption, in RemoveNotification() 217 ErrCode AnsManagerStub::RemoveAllNotifications(const sptr<NotificationBundleOption> &bundleOption) in RemoveAllNotifications() 235 ErrCode AnsManagerStub::DeleteByBundle(const sptr<NotificationBundleOption> [all...] |
H A D | ans_notification.cpp | 129 ErrCode AnsNotification::GetNotificationSlotNumAsBundle(const NotificationBundleOption &bundleOption, uint64_t &num) in GetNotificationSlotNumAsBundle() 142 sptr<NotificationBundleOption> bo(new (std::nothrow) NotificationBundleOption(bundleOption)); in GetNotificationSlotNumAsBundle() 146 ErrCode AnsNotification::GetNotificationSlotFlagsAsBundle(const NotificationBundleOption &bundleOption, in GetNotificationSlotFlagsAsBundle() 160 sptr<NotificationBundleOption> bo(new (std::nothrow) NotificationBundleOption(bundleOption)); in GetNotificationSlotFlagsAsBundle() 164 ErrCode AnsNotification::SetNotificationSlotFlagsAsBundle(const NotificationBundleOption &bundleOption, in SetNotificationSlotFlagsAsBundle() 178 sptr<NotificationBundleOption> bo(new (std::nothrow) NotificationBundleOption(bundleOption)); in SetNotificationSlotFlagsAsBundle() 336 const NotificationBundleOption in CancelAsBundle() [all...] |
/base/notification/distributed_notification_service/services/ans/test/unittest/ |
H A D | advanced_notification_slot_service_test.cpp | 134 sptr<NotificationBundleOption> bundle = nullptr; in HWTEST_F() 149 sptr<NotificationBundleOption> bundle = new NotificationBundleOption("test", 1); in HWTEST_F() 165 sptr<NotificationBundleOption> bundle = nullptr; in HWTEST_F() 168 bundle = new NotificationBundleOption("test", 1); in HWTEST_F() 188 sptr<NotificationBundleOption> bundle = new NotificationBundleOption("test", 1); in HWTEST_F() 243 sptr<NotificationBundleOption> bundle = new NotificationBundleOption("test", 1); in HWTEST_F() 262 sptr<NotificationBundleOption> bundl in HWTEST_F() [all...] |
H A D | advanced_notification_service_branch_test.cpp | 277 new NotificationBundleOption(TEST_DEFUALT_BUNDLE, NON_SYSTEM_APP_UID)), ERR_ANS_PERMISSION_DENIED); in HWTEST_F() 292 new NotificationBundleOption(TEST_DEFUALT_BUNDLE, NON_SYSTEM_APP_UID)), ERR_ANS_NON_SYSTEM_APP); in HWTEST_F() 322 new NotificationBundleOption(TEST_DEFUALT_BUNDLE, SYSTEM_APP_UID), slots), ERR_ANS_NON_SYSTEM_APP); in HWTEST_F() 338 new NotificationBundleOption(TEST_DEFUALT_BUNDLE, SYSTEM_APP_UID), slots), ERR_ANS_PERMISSION_DENIED); in HWTEST_F() 356 new NotificationBundleOption(TEST_DEFUALT_BUNDLE, SYSTEM_APP_UID), slots), ERR_ANS_NON_SYSTEM_APP); in HWTEST_F() 374 new NotificationBundleOption(TEST_DEFUALT_BUNDLE, SYSTEM_APP_UID), slots), ERR_ANS_PERMISSION_DENIED); in HWTEST_F() 389 new NotificationBundleOption(TEST_DEFUALT_BUNDLE, NON_SYSTEM_APP_UID), true), ERR_ANS_PERMISSION_DENIED); in HWTEST_F() 405 new NotificationBundleOption(TEST_DEFUALT_BUNDLE, NON_SYSTEM_APP_UID), allow), ERR_ANS_NON_SYSTEM_APP); in HWTEST_F() 421 new NotificationBundleOption(TEST_DEFUALT_BUNDLE, NON_SYSTEM_APP_UID), allow), ERR_ANS_PERMISSION_DENIED); in HWTEST_F() 566 std::string(), new NotificationBundleOption(TEST_DEFUALT_BUNDL in HWTEST_F() [all...] |
H A D | permission_filter_test.cpp | 63 new NotificationBundleOption(TEST_DEFUALT_BUNDLE, SYSTEM_APP_UID), slots); in HWTEST_F() 65 record->bundleOption = new NotificationBundleOption(TEST_DEFUALT_BUNDLE, SYSTEM_APP_UID); in HWTEST_F() 89 new NotificationBundleOption(TEST_DEFUALT_BUNDLE, SYSTEM_APP_UID), slots); in HWTEST_F() 91 new NotificationBundleOption(TEST_DEFUALT_BUNDLE, SYSTEM_APP_UID), false); in HWTEST_F() 93 record->bundleOption = new NotificationBundleOption(TEST_DEFUALT_BUNDLE, SYSTEM_APP_UID); in HWTEST_F()
|
H A D | advanced_notification_utils_test.cpp | 60 void TestAddNotification(int notificationId, const sptr<NotificationBundleOption> &bundle); 126 void AnsUtilsTest::TestAddNotification(int notificationId, const sptr<NotificationBundleOption> &bundle) in TestAddNotification() 173 sptr<NotificationBundleOption> bundle = new NotificationBundleOption("test", 1); in HWTEST_F() 175 record->bundleOption = new NotificationBundleOption("test", 1); in HWTEST_F() 197 auto bundleOption = new NotificationBundleOption("test", 1); in HWTEST_F() 214 sptr<NotificationBundleOption> bundle; in HWTEST_F() 246 sptr<NotificationBundleOption> bundle = new NotificationBundleOption("test", 1); in HWTEST_F() 307 sptr<NotificationBundleOption> bundl in HWTEST_F() [all...] |
/base/notification/distributed_notification_service/services/distributed/test/unittest/distributed_preferences_branch_test/ |
H A D | distributed_preferences_branch_test.cpp | 113 sptr<NotificationBundleOption> bundleOption = nullptr;
in HWTEST_F() 138 sptr<NotificationBundleOption> bundleOption = nullptr;
in HWTEST_F() 150 sptr<NotificationBundleOption> bundleOption = new NotificationBundleOption("<bundleName>", 783);
in HWTEST_F() 164 sptr<NotificationBundleOption> bundleOption = nullptr;
in HWTEST_F() 176 sptr<NotificationBundleOption> bundleOption = nullptr;
in HWTEST_F() 187 sptr<NotificationBundleOption> bundleOption = new NotificationBundleOption("<bundleName>", 783);
in HWTEST_F()
|
/base/notification/distributed_notification_service/services/ans/src/clone/ |
H A D | notification_clone_disturb_service.cpp | 91 std::vector<NotificationBundleOption> exitBunldleList; in OnRestore() 92 std::vector<NotificationBundleOption> notExitBunldleList; in OnRestore() 119 std::vector<NotificationBundleOption> trustList, std::vector<NotificationBundleOption>& exitBunldleList, in GetProfileUid() 120 std::vector<NotificationBundleOption>& notExitBunldleList) in GetProfileUid() 142 void NotificationCloneDisturb::OnBundleDataAdd(const sptr<NotificationBundleOption> &bundleOption) in OnBundleDataAdd() 147 void NotificationCloneDisturb::OnBundleDataUpdate(const sptr<NotificationBundleOption> &bundleOption) in OnBundleDataUpdate() 173 NotificationBundleOption bundle(bundleName, uid); in HandlerBundleEvent() 185 std::vector<NotificationBundleOption> bundleList; in HandlerBundleEvent() 206 void NotificationCloneDisturb::CheckBundleInfo(std::vector<NotificationBundleOption> [all...] |
/base/notification/distributed_notification_service/services/distributed/include/ |
H A D | distributed_preferences.h | 57 ErrCode SetDistributedBundleEnable(const sptr<NotificationBundleOption> &bundleOption, bool isEnable); 66 ErrCode GetDistributedBundleEnable(const sptr<NotificationBundleOption> &bundleOption, bool &isEnable); 74 ErrCode DeleteDistributedBundleInfo(const sptr<NotificationBundleOption> &bundleOption); 96 void GetDistributedBundleKey(const sptr<NotificationBundleOption> &bundleOption, std::string &key);
|
/base/notification/distributed_notification_service/services/ans/src/ |
H A D | advanced_notification_slot_service.cpp | 62 sptr<NotificationBundleOption> bundleOption = GenerateBundleOption(); in AddSlots() 105 sptr<NotificationBundleOption> bundleOption = GenerateBundleOption(); in GetSlots() 128 const sptr<NotificationBundleOption> &bundleOption, std::vector<sptr<NotificationSlot>> &slots) in GetSlotsByBundle() 142 sptr<NotificationBundleOption> bundle = GenerateValidBundleOption(bundleOption); in GetSlotsByBundle() 167 const sptr<NotificationBundleOption> &bundleOption, const NotificationConstant::SlotType &slotType, in GetSlotByBundle() 182 sptr<NotificationBundleOption> bundle = GenerateValidBundleOption(bundleOption); in GetSlotByBundle() 206 const sptr<NotificationBundleOption> &bundleOption, const std::vector<sptr<NotificationSlot>> &slots) in UpdateSlots() 220 sptr<NotificationBundleOption> bundle = GenerateValidBundleOption(bundleOption); in UpdateSlots() 250 sptr<NotificationBundleOption> bundleOption = GenerateBundleOption(); in RemoveAllSlots() 302 sptr<NotificationBundleOption> bundleOptio in AddSlotByType() [all...] |