/base/notification/distributed_notification_service/services/ans/test/unittest/ |
D | reminder_data_manager_test.cpp | 52 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() 75 sptr<ReminderRequest> reminder = new ReminderRequestTimer(10); in HWTEST_F() local 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 119 manager->CreateTimerInfo(ReminderDataManager::TimerType::TRIGGER_TIMER, reminder); in HWTEST_F() [all …]
|
/base/notification/distributed_notification_service/services/ans/src/ |
D | reminder_data_manager.cpp | 45 ErrCode ReminderDataManager::PublishReminder(const sptr<ReminderRequest> &reminder, in PublishReminder() argument 51 UpdateAndSaveReminderLocked(reminder, bundleOption); in PublishReminder() 59 …sptr<ReminderRequest> reminder = FindReminderRequestLocked(reminderId, bundleOption->GetBundleName… in CancelReminder() local 60 if (reminder == nullptr) { in CancelReminder() 70 StopSoundAndVibrationLocked(reminder); in CancelReminder() 75 CancelNotification(reminder); in CancelReminder() 153 bool ReminderDataManager::IsMatched(const sptr<ReminderRequest> &reminder, in IsMatched() argument 156 auto mit = notificationBundleOptionMap_.find(reminder->GetReminderId()); in IsMatched() 158 … ANS_LOGE("Failed to get bundle information. reminderId=%{public}d", reminder->GetReminderId()); in IsMatched() 173 void ReminderDataManager::CancelNotification(const sptr<ReminderRequest> &reminder) const in CancelNotification() [all …]
|
/base/notification/distributed_notification_service/services/ans/include/ |
D | reminder_data_manager.h | 123 ErrCode PublishReminder(const sptr<ReminderRequest> &reminder, 140 bool ShouldAlert(const sptr<ReminderRequest> &reminder) const; 192 void AddDefaultSlotIfNeeded(sptr<ReminderRequest> &reminder); 199 void AddToShowedReminders(const sptr<ReminderRequest> &reminder); 216 void CancelNotification(const sptr<ReminderRequest> &reminder) const; 225 void CloseReminder(const sptr<ReminderRequest> &reminder, bool cancelNotification); 241 std::string GetSoundUri(const sptr<ReminderRequest> &reminder); 287 … sptr<ReminderRequest> HandleRefreshReminder(const uint8_t &type, sptr<ReminderRequest> &reminder); 295 void HandleSameNotificationIdShowing(const sptr<ReminderRequest> reminder); 297 bool HandleSysTimeChange(const sptr<ReminderRequest> reminder) const; [all …]
|
/base/notification/distributed_notification_service/frameworks/ans/src/ |
D | reminder_store.cpp | 175 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 …]
|
D | reminder_helper.cpp | 25 ErrCode ReminderHelper::PublishReminder(ReminderRequest &reminder) in PublishReminder() argument 28 NotificationHelper::AddSlotByType(reminder.GetSlotType()); in PublishReminder() 29 return DelayedSingleton<AnsNotification>::GetInstance()->PublishReminder(reminder); in PublishReminder()
|
D | reminder_request.cpp | 1553 void ReminderRequest::AppendValuesBucket(const sptr<ReminderRequest> &reminder, in AppendValuesBucket() argument 1556 values.PutInt(REMINDER_ID, reminder->GetReminderId()); in AppendValuesBucket() 1558 values.PutInt(USER_ID, reminder->GetUserId()); in AppendValuesBucket() 1559 values.PutInt(UID, reminder->GetUid()); in AppendValuesBucket() 1561 values.PutInt(REMINDER_TYPE, static_cast<int32_t>(reminder->GetReminderType())); in AppendValuesBucket() 1562 values.PutLong(REMINDER_TIME, reminder->GetReminderTimeInMilli()); in AppendValuesBucket() 1563 values.PutLong(TRIGGER_TIME, reminder->GetTriggerTimeInMilli()); in AppendValuesBucket() 1565 … RTC_TRIGGER_TIME, reminder->GetTriggerTimeInMilli()); // no use, compatible with old version. in AppendValuesBucket() 1566 values.PutLong(TIME_INTERVAL, reminder->GetTimeInterval()); in AppendValuesBucket() 1567 values.PutInt(SNOOZE_TIMES, reminder->GetSnoozeTimes()); in AppendValuesBucket() [all …]
|
D | reminder_request_alarm.cpp | 329 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()
|
D | reminder_request_calendar.cpp | 560 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/src/reminder/ |
D | reminder_common.cpp | 30 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder) in GetReminderRequest() argument 40 if (GenReminder(env, value, reminder) == nullptr) { in GetReminderRequest() 47 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder) in GenActionButtons() argument 83 … reminder->SetActionButton(title, static_cast<ReminderRequest::ActionButtonType>(buttonType)); in GenActionButtons() 94 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder) in GenWantAgent() argument 107 reminder->SetWantAgentInfo(wantAgentInfo); in GenWantAgent() 112 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder) in GenMaxScreenWantAgent() argument 126 reminder->SetMaxScreenWantAgentInfo(maxScreenWantAgentInfo); in GenMaxScreenWantAgent() 130 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder) in CreateReminder() argument 138 CreateReminderTimer(env, value, reminder); in CreateReminder() [all …]
|
D | publish.cpp | 54 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/frameworks/js/napi/include/reminder/ |
D | reminder_common.h | 79 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder); 114 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder); 117 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder); 120 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); 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); 135 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);
|
/base/notification/distributed_notification_service/test/fuzztest/reminderhelper_fuzzer/ |
D | reminderhelper_fuzzer.cpp | 31 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/ |
D | reminder_store.h | 41 …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…
|
D | reminder_helper.h | 51 static ErrCode PublishReminder(ReminderRequest &reminder);
|
D | reminder_request_alarm.h | 108 static void AppendValuesBucket(const sptr<ReminderRequest> &reminder,
|
D | reminder_request_calendar.h | 146 static void AppendValuesBucket(const sptr<ReminderRequest> &reminder,
|
/base/notification/distributed_notification_service/frameworks/ans/test/unittest/ |
D | reminder_store_test.cpp | 129 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_);
|
D | reminder_helper_test.cpp | 46 ReminderRequest reminder; variable 48 ErrCode ret = reminderHelper.PublishReminder(reminder);
|
/base/notification/distributed_notification_service/frameworks/js/napi/ |
D | BUILD.gn | 19 "src/reminder:reminderagent", 20 "src/reminder:reminderagentmanager",
|
/base/notification/distributed_notification_service/frameworks/core/src/ |
D | ans_manager_proxy.cpp | 2031 ErrCode AnsManagerProxy::PublishReminder(sptr<ReminderRequest> &reminder) in PublishReminder() argument 2039 if (reminder == nullptr) { in PublishReminder() 2043 if (!data.WriteUint8(static_cast<uint8_t>(reminder->GetReminderType()))) { in PublishReminder() 2047 if (!data.WriteParcelable(reminder)) { in PublishReminder() 2064 reminder->SetReminderId(reminderId); in PublishReminder() 2065 ANSR_LOGD("ReminderId=%{public}d", reminder->GetReminderId()); in PublishReminder() 2170 sptr<ReminderRequest> reminder; in ReadReminders() local 2173 reminder = reply.ReadParcelable<ReminderRequestAlarm>(); in ReadReminders() 2176 reminder = reply.ReadParcelable<ReminderRequestTimer>(); in ReadReminders() 2179 reminder = reply.ReadParcelable<ReminderRequestCalendar>(); in ReadReminders() [all …]
|
D | ans_notification.cpp | 920 ErrCode AnsNotification::PublishReminder(ReminderRequest &reminder) in PublishReminder() argument 927 switch (reminder.GetReminderType()) { in PublishReminder() 930 ReminderRequestTimer &timer = (ReminderRequestTimer &)reminder; in PublishReminder() 936 ReminderRequestAlarm &alarm = (ReminderRequestAlarm &)reminder; in PublishReminder() 942 ReminderRequestCalendar &calendar = (ReminderRequestCalendar &)reminder; in PublishReminder() 952 reminder.SetReminderId(tarReminder->GetReminderId()); in PublishReminder()
|
D | ans_manager_stub.cpp | 1426 sptr<ReminderRequest> reminder; in HandlePublishReminder() local 1429 reminder = data.ReadParcelable<ReminderRequestAlarm>(); in HandlePublishReminder() 1432 reminder = data.ReadParcelable<ReminderRequestTimer>(); in HandlePublishReminder() 1435 reminder = data.ReadParcelable<ReminderRequestCalendar>(); in HandlePublishReminder() 1440 if (!reminder) { in HandlePublishReminder() 1445 ErrCode result = PublishReminder(reminder); in HandlePublishReminder() 1447 if (!reply.WriteInt32(reminder->GetReminderId())) { in HandlePublishReminder() 1498 sptr<ReminderRequest> reminder = (*it); in HandleGetValidReminders() local 1499 uint8_t reminderType = static_cast<uint8_t>(reminder->GetReminderType()); in HandleGetValidReminders() 1505 if (!reply.WriteParcelable(reminder)) { in HandleGetValidReminders() [all …]
|
/base/notification/distributed_notification_service/test/fuzztest/ansmanagerstub_fuzzer/ |
D | ansmanagerstub_fuzzer.cpp | 195 sptr<Notification::ReminderRequest> reminder = new Notification::ReminderRequest(); in DoSomethingInterestingWithMyAPI() local 196 ansManagerStub.PublishReminder(reminder); in DoSomethingInterestingWithMyAPI()
|
/base/notification/distributed_notification_service/frameworks/core/include/ |
D | ans_notification.h | 688 ErrCode PublishReminder(ReminderRequest &reminder);
|
/base/notification/distributed_notification_service/frameworks/core/test/unittest/ans_manager_stub_test/ |
D | ans_manager_stub_test.cpp | 2736 sptr<ReminderRequest> reminder = new ReminderRequest(); variable 2742 data.WriteStrongParcelable(reminder); 2763 sptr<ReminderRequest> reminder = new ReminderRequest(); variable 2767 data.WriteParcelable(reminder); 2806 sptr<ReminderRequest> reminder = new ReminderRequest(); variable 2812 data.WriteStrongParcelable(reminder); 2833 sptr<ReminderRequest> reminder = new ReminderRequest(); variable 2839 data.WriteStrongParcelable(reminder); 2859 sptr<ReminderRequest> reminder = new ReminderRequest(); variable 2864 data.WriteStrongParcelable(reminder); [all …]
|