Home
last modified time | relevance | path

Searched refs:reminder (Results 1 – 25 of 38) sorted by relevance

12

/base/notification/distributed_notification_service/services/ans/test/unittest/
Dreminder_data_manager_test.cpp52 sptr<ReminderRequest> reminder = new ReminderRequestTimer(10); in HWTEST_F() local
54 manager->PublishReminder(reminder, option); in HWTEST_F()
58 manager->IsMatched(reminder, "", -1); in HWTEST_F()
74 sptr<ReminderRequest> reminder = new ReminderRequestTimer(10); in HWTEST_F() local
75 manager->CheckReminderLimitExceededLocked(option, reminder); in HWTEST_F()
76 manager->CancelNotification(reminder); in HWTEST_F()
77 reminder->SetReminderId(10); in HWTEST_F()
78 manager->AddToShowedReminders(reminder); in HWTEST_F()
79 manager->AddToShowedReminders(reminder); in HWTEST_F()
118 sptr<ReminderRequest> reminder = new ReminderRequestTimer(10); in HWTEST_F() local
[all …]
/base/notification/distributed_notification_service/services/ans/src/
Dreminder_data_manager.cpp60 ErrCode ReminderDataManager::PublishReminder(const sptr<ReminderRequest> &reminder, in PublishReminder() argument
63 if (CheckReminderLimitExceededLocked(bundleOption, reminder)) { in PublishReminder()
66 UpdateAndSaveReminderLocked(reminder, bundleOption); in PublishReminder()
74 …sptr<ReminderRequest> reminder = FindReminderRequestLocked(reminderId, bundleOption->GetBundleName… in CancelReminder() local
75 if (reminder == nullptr) { in CancelReminder()
85 StopSoundAndVibrationLocked(reminder); in CancelReminder()
89 CancelNotification(reminder); in CancelReminder()
168 bool ReminderDataManager::IsMatched(const sptr<ReminderRequest> &reminder, in IsMatched() argument
171 auto mit = notificationBundleOptionMap_.find(reminder->GetReminderId()); in IsMatched()
173 … ANS_LOGE("Failed to get bundle information. reminderId=%{public}d", reminder->GetReminderId()); in IsMatched()
[all …]
/base/notification/distributed_notification_service/services/ans/include/
Dreminder_data_manager.h123 ErrCode PublishReminder(const sptr<ReminderRequest> &reminder,
140 bool ShouldAlert(const sptr<ReminderRequest> &reminder) const;
197 void AddDefaultSlotIfNeeded(sptr<ReminderRequest> &reminder);
204 void AddToShowedReminders(const sptr<ReminderRequest> &reminder);
221 void CancelNotification(const sptr<ReminderRequest> &reminder) const;
230 const sptr<ReminderRequest> &reminder) const;
231 void CloseReminder(const sptr<ReminderRequest> &reminder, bool cancelNotification);
247 std::string GetSoundUri(const sptr<ReminderRequest> &reminder);
293 … sptr<ReminderRequest> HandleRefreshReminder(const uint8_t &type, sptr<ReminderRequest> &reminder);
301 void HandleSameNotificationIdShowing(const sptr<ReminderRequest> reminder);
[all …]
/base/notification/distributed_notification_service/frameworks/ans/src/
Dreminder_store.cpp175 const sptr<ReminderRequest> &reminder, const sptr<NotificationBundleOption> &bundleOption) in UpdateOrInsert() argument
177 if (reminder->GetReminderType() == ReminderRequest::ReminderType::TIMER) { in UpdateOrInsert()
190 if (IsReminderExist(reminder)) { in UpdateOrInsert()
191 isSuccess = Update(reminder, bundleOption); in UpdateOrInsert()
193 isSuccess = Insert(reminder, bundleOption); in UpdateOrInsert()
199 const sptr<ReminderRequest> &reminder, const sptr<NotificationBundleOption> &bundleOption) in Insert() argument
207 ReminderStore::GenerateData(reminder, bundleOption, values); in Insert()
211 result, reminder->GetReminderId()); in Insert()
214 ANSR_LOGD("Insert successfully, reminderId=%{public}d.", reminder->GetReminderId()); in Insert()
219 const sptr<ReminderRequest> &reminder, const sptr<NotificationBundleOption> &bundleOption) in Update() argument
[all …]
Dreminder_helper.cpp25 ErrCode ReminderHelper::PublishReminder(ReminderRequest &reminder) in PublishReminder() argument
28 NotificationHelper::AddSlotByType(reminder.GetSlotType()); in PublishReminder()
29 return DelayedSingleton<AnsNotification>::GetInstance()->PublishReminder(reminder); in PublishReminder()
Dreminder_request.cpp1730 void ReminderRequest::AppendValuesBucket(const sptr<ReminderRequest> &reminder, in AppendValuesBucket() argument
1733 values.PutInt(REMINDER_ID, reminder->GetReminderId()); in AppendValuesBucket()
1735 values.PutInt(USER_ID, reminder->GetUserId()); in AppendValuesBucket()
1736 values.PutInt(UID, reminder->GetUid()); in AppendValuesBucket()
1737 values.PutString(SYS_APP, reminder->IsSystemApp() ? "true" : "false"); in AppendValuesBucket()
1739 values.PutInt(REMINDER_TYPE, static_cast<int32_t>(reminder->GetReminderType())); in AppendValuesBucket()
1740 values.PutLong(REMINDER_TIME, reminder->GetReminderTimeInMilli()); in AppendValuesBucket()
1741 values.PutLong(TRIGGER_TIME, reminder->GetTriggerTimeInMilli()); in AppendValuesBucket()
1743 … RTC_TRIGGER_TIME, reminder->GetTriggerTimeInMilli()); // no use, compatible with old version. in AppendValuesBucket()
1744 values.PutLong(TIME_INTERVAL, reminder->GetTimeInterval()); in AppendValuesBucket()
[all …]
Dreminder_request_alarm.cpp329 void ReminderRequestAlarm::AppendValuesBucket(const sptr<ReminderRequest> &reminder, in AppendValuesBucket() argument
335 if (reminder->GetReminderType() == ReminderRequest::ReminderType::ALARM) { in AppendValuesBucket()
336 ReminderRequestAlarm* alarm = static_cast<ReminderRequestAlarm*>(reminder.GetRefPtr()); in AppendValuesBucket()
Dreminder_request_calendar.cpp560 void ReminderRequestCalendar::AppendValuesBucket(const sptr<ReminderRequest> &reminder, in AppendValuesBucket() argument
573 if (reminder->GetReminderType() == ReminderRequest::ReminderType::CALENDAR) { in AppendValuesBucket()
574 … ReminderRequestCalendar* calendar = static_cast<ReminderRequestCalendar*>(reminder.GetRefPtr()); in AppendValuesBucket()
/base/notification/distributed_notification_service/frameworks/js/napi/include/reminder/
Dreminder_common.h85 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder);
123 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder);
126 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder);
129 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder);
132 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder);
138 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder);
141 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder);
144 …const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder, bool isS…
147 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder);
157 …std::shared_ptr<ReminderRequest>& reminder, std::shared_ptr<ReminderRequest::ButtonWantAgent>& wan…
[all …]
/base/notification/distributed_notification_service/frameworks/js/napi/src/reminder/
Dreminder_common.cpp32 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder) in GetReminderRequest() argument
42 if (GenReminder(env, value, reminder) == nullptr) { in GetReminderRequest()
49 …const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder, bool isS… in GenActionButtons() argument
89 GetButtonWantAgent(env, actionButton, reminder, buttonWantAgent); in GenActionButtons()
91reminder->SetActionButton(title, static_cast<ReminderRequest::ActionButtonType>(buttonType), in GenActionButtons()
102 bool ReminderCommon::IsSelfSystemApp(std::shared_ptr<ReminderRequest>& reminder) in IsSelfSystemApp() argument
109 reminder->SetSystemApp(true); in IsSelfSystemApp()
114 …std::shared_ptr<ReminderRequest>& reminder, std::shared_ptr<ReminderRequest::ButtonWantAgent>& but… in GetButtonWantAgent() argument
129 reminder->SetCustomButtonUri(str); in GetButtonWantAgent()
135 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder) in GenWantAgent() argument
[all …]
Dpublish.cpp54 std::shared_ptr<ReminderRequest> reminder = nullptr; member
64 std::shared_ptr<ReminderRequest> reminder = nullptr; member
111 if (ReminderCommon::GetReminderRequest(env, argv[0], params.reminder) == nullptr) { in ParseParameters()
406 void ParseReminderTimer(const napi_env &env, const ReminderRequest &reminder, napi_value &result) in ParseReminderTimer() argument
409 ReminderRequestTimer& timer = (ReminderRequestTimer&)reminder; in ParseReminderTimer()
414 void ParseReminderAlarm(const napi_env &env, const ReminderRequest &reminder, napi_value &result) in ParseReminderAlarm() argument
418 ReminderRequestAlarm& alarm = (ReminderRequestAlarm&)reminder; in ParseReminderAlarm()
440 void ParseReminderCalendar(const napi_env &env, const ReminderRequest &reminder, napi_value &result) in ParseReminderCalendar() argument
444 ReminderRequestCalendar& calendar = (ReminderRequestCalendar&)reminder; in ParseReminderCalendar()
486 …const napi_env &env, const ReminderRequest::ReminderType &type, const ReminderRequest &reminder, n… in ParseReminder() argument
[all …]
/base/notification/distributed_notification_service/test/fuzztest/reminderhelper_fuzzer/
Dreminderhelper_fuzzer.cpp31 Notification::ReminderRequest reminder; in DoSomethingInterestingWithMyAPI() local
32 reminder.SetContent(stringData); in DoSomethingInterestingWithMyAPI()
33 reminder.SetExpiredContent(stringData); in DoSomethingInterestingWithMyAPI()
34 Notification::ReminderHelper::PublishReminder(reminder); in DoSomethingInterestingWithMyAPI()
/base/notification/distributed_notification_service/interfaces/inner_api/
Dreminder_store.h41 …int64_t UpdateOrInsert(const sptr<ReminderRequest> &reminder, const sptr<NotificationBundleOption>…
65 void GenerateData(const sptr<ReminderRequest> &reminder,
67 bool IsReminderExist(const sptr<ReminderRequest> &reminder);
68 …int64_t Insert(const sptr<ReminderRequest> &reminder, const sptr<NotificationBundleOption> &bundle…
70 …int64_t Update(const sptr<ReminderRequest> &reminder, const sptr<NotificationBundleOption> &bundle…
Dreminder_helper.h51 static ErrCode PublishReminder(ReminderRequest &reminder);
Dreminder_request_alarm.h108 static void AppendValuesBucket(const sptr<ReminderRequest> &reminder,
Dreminder_request_calendar.h146 static void AppendValuesBucket(const sptr<ReminderRequest> &reminder,
/base/notification/distributed_notification_service/frameworks/ans/test/unittest/
Dreminder_store_test.cpp129 sptr<ReminderRequest> reminder = nullptr; variable
131 int64_t ret = reminderStore.Insert(reminder, bundleOption_);
143 sptr<ReminderRequest> reminder = nullptr; variable
145 int64_t ret = reminderStore.Update(reminder, bundleOption_);
Dreminder_helper_test.cpp46 ReminderRequest reminder; variable
48 ErrCode ret = reminderHelper.PublishReminder(reminder);
/base/notification/distributed_notification_service/frameworks/core/test/unittest/ans_notification_annex_test/
Dans_notification_annex_test.cpp268 ReminderRequest reminder = ReminderRequest(ReminderRequest::ReminderType::TIMER); variable
269 ErrCode ret = ans_->PublishReminder(reminder);
282 ReminderRequest reminder = ReminderRequest(ReminderRequest::ReminderType::ALARM); variable
283 ErrCode ret = ans_->PublishReminder(reminder);
296 ReminderRequest reminder = ReminderRequest(ReminderRequest::ReminderType::CALENDAR); variable
297 ErrCode ret = ans_->PublishReminder(reminder);
/base/notification/distributed_notification_service/frameworks/js/napi/
DBUILD.gn19 "src/reminder:reminderagent",
20 "src/reminder:reminderagentmanager",
/base/notification/distributed_notification_service/test/fuzztest/advancednotificationservice_fuzzer/
Dadvancednotificationservice_fuzzer.cpp113 sptr<Notification::ReminderRequest> reminder = new Notification::ReminderRequest(); in DoSomethingInterestingWithMyAPI() local
114 advancedNotificationService.PublishReminder(reminder); in DoSomethingInterestingWithMyAPI()
/base/notification/distributed_notification_service/frameworks/core/src/
Dans_notification.cpp879 ErrCode AnsNotification::PublishReminder(ReminderRequest &reminder) in PublishReminder() argument
886 switch (reminder.GetReminderType()) { in PublishReminder()
889 ReminderRequestTimer &timer = (ReminderRequestTimer &)reminder; in PublishReminder()
895 ReminderRequestAlarm &alarm = (ReminderRequestAlarm &)reminder; in PublishReminder()
901 ReminderRequestCalendar &calendar = (ReminderRequestCalendar &)reminder; in PublishReminder()
911 reminder.SetReminderId(tarReminder->GetReminderId()); in PublishReminder()
Dans_manager_proxy.cpp1931 ErrCode AnsManagerProxy::PublishReminder(sptr<ReminderRequest> &reminder) in PublishReminder() argument
1939 if (reminder == nullptr) { in PublishReminder()
1943 if (!data.WriteUint8(static_cast<uint8_t>(reminder->GetReminderType()))) { in PublishReminder()
1947 if (!data.WriteParcelable(reminder)) { in PublishReminder()
1964 reminder->SetReminderId(reminderId); in PublishReminder()
1965 ANSR_LOGD("ReminderId=%{public}d", reminder->GetReminderId()); in PublishReminder()
2070 sptr<ReminderRequest> reminder; in ReadReminders() local
2073 reminder = reply.ReadParcelable<ReminderRequestAlarm>(); in ReadReminders()
2076 reminder = reply.ReadParcelable<ReminderRequestTimer>(); in ReadReminders()
2079 reminder = reply.ReadParcelable<ReminderRequestCalendar>(); in ReadReminders()
[all …]
Dans_manager_stub.cpp1383 sptr<ReminderRequest> reminder; in HandlePublishReminder() local
1386 reminder = data.ReadParcelable<ReminderRequestAlarm>(); in HandlePublishReminder()
1389 reminder = data.ReadParcelable<ReminderRequestTimer>(); in HandlePublishReminder()
1392 reminder = data.ReadParcelable<ReminderRequestCalendar>(); in HandlePublishReminder()
1397 if (!reminder) { in HandlePublishReminder()
1402 ErrCode result = PublishReminder(reminder); in HandlePublishReminder()
1404 if (!reply.WriteInt32(reminder->GetReminderId())) { in HandlePublishReminder()
1455 sptr<ReminderRequest> reminder = (*it); in HandleGetValidReminders() local
1456 uint8_t reminderType = static_cast<uint8_t>(reminder->GetReminderType()); in HandleGetValidReminders()
1462 if (!reply.WriteParcelable(reminder)) { in HandleGetValidReminders()
[all …]
/base/notification/distributed_notification_service/test/fuzztest/ansmanagerstub_fuzzer/
Dansmanagerstub_fuzzer.cpp178 sptr<Notification::ReminderRequest> reminder = new Notification::ReminderRequest(); in DoSomethingInterestingWithMyAPI() local
179 ansManagerStub.PublishReminder(reminder); in DoSomethingInterestingWithMyAPI()

12