Home
last modified time | relevance | path

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

12

/base/notification/distributed_notification_service/services/ans/test/unittest/
Dreminder_data_manager_test.cpp69 sptr<ReminderRequest> reminder = new ReminderRequestTimer(10); in HWTEST_F() local
71 manager->PublishReminder(reminder, option); in HWTEST_F()
75 manager->IsMatched(reminder, "", -1); in HWTEST_F()
91 sptr<ReminderRequest> reminder = new ReminderRequestTimer(10); in HWTEST_F() local
92 manager->CheckReminderLimitExceededLocked(option, reminder); in HWTEST_F()
93 manager->CancelNotification(reminder); in HWTEST_F()
94 reminder->SetReminderId(10); in HWTEST_F()
95 manager->AddToShowedReminders(reminder); in HWTEST_F()
96 manager->AddToShowedReminders(reminder); in HWTEST_F()
135 sptr<ReminderRequest> reminder = new ReminderRequestTimer(10); in HWTEST_F() local
[all …]
/base/notification/distributed_notification_service/services/ans/src/
Dreminder_data_manager.cpp83 ErrCode ReminderDataManager::PublishReminder(const sptr<ReminderRequest> &reminder, in PublishReminder() argument
92 if (!IsActionButtonDataShareValid(reminder, callerTokenId)) { in PublishReminder()
96 if (CheckReminderLimitExceededLocked(bundleOption, reminder)) { in PublishReminder()
99 UpdateAndSaveReminderLocked(reminder, bundleOption); in PublishReminder()
100 queue_->submit([this, reminder]() { in PublishReminder()
101 UpdateReminderLanguageLocked(reminder); in PublishReminder()
111 …sptr<ReminderRequest> reminder = FindReminderRequestLocked(reminderId, bundleOption->GetBundleName… in CancelReminder() local
112 if (reminder == nullptr) { in CancelReminder()
116 if (!CheckIsSameApp(reminder, bundleOption)) { in CancelReminder()
126 StopSoundAndVibrationLocked(reminder); in CancelReminder()
[all …]
Dadvanced_notification_reminder_service.cpp52 ErrCode AdvancedNotificationService::PublishReminder(sptr<ReminderRequest> &reminder) in PublishReminder() argument
55 if (!reminder) { in PublishReminder()
65 reminder->SetSystemApp(AccessTokenHelper::IsSystemApp()); in PublishReminder()
66 sptr<NotificationRequest> notificationRequest = reminder->GetNotificationRequest(); in PublishReminder()
68 reminder->InitCreatorBundleName(bundle); in PublishReminder()
69 … if (reminder->GetWantAgentInfo() == nullptr || reminder->GetMaxScreenWantAgentInfo() == nullptr) { in PublishReminder()
73 std::string wantAgentName = reminder->GetWantAgentInfo()->pkgName; in PublishReminder()
74 std::string msWantAgentName = reminder->GetMaxScreenWantAgentInfo()->pkgName; in PublishReminder()
97 if (!reminder->IsSystemApp() && (result != ERR_OK || !allowedNotify)) { in PublishReminder()
105 return rdm->PublishReminder(reminder, bundleOption); in PublishReminder()
/base/notification/distributed_notification_service/services/ans/include/
Dreminder_data_manager.h169 ErrCode PublishReminder(const sptr<ReminderRequest> &reminder,
186 bool ShouldAlert(const sptr<ReminderRequest> &reminder) const;
245 void UpdateReminderLanguage(const sptr<ReminderRequest> &reminder);
246 void UpdateReminderLanguageLocked(const sptr<ReminderRequest> &reminder);
273 void AddDefaultSlotIfNeeded(sptr<ReminderRequest> &reminder);
280 void AddToShowedReminders(const sptr<ReminderRequest> &reminder);
292 bool CheckUpdateConditions(const sptr<ReminderRequest> &reminder,
302 void UpdateAppDatabase(const sptr<ReminderRequest> &reminder,
336 std::string GetCustomRingUri(const sptr<ReminderRequest> &reminder);
361 void CancelNotification(const sptr<ReminderRequest> &reminder) const;
[all …]
/base/notification/distributed_notification_service/frameworks/ans/src/
Dreminder_store.cpp167 sptr<ReminderRequest> reminder = nullptr; in GetOldReminders() local
170 reminder = new (std::nothrow) ReminderRequestTimer(reminderId); in GetOldReminders()
174 reminder = new (std::nothrow) ReminderRequestCalendar(reminderId); in GetOldReminders()
178 reminder = new (std::nothrow) ReminderRequestAlarm(reminderId); in GetOldReminders()
185 if (reminder != nullptr) { in GetOldReminders()
186 reminder->RecoverFromOldVersion(queryResultSet); in GetOldReminders()
187 reminders.push_back(reminder); in GetOldReminders()
197 for (auto reminder : reminders) { in InsertNewReminders() local
203 bundleOption->SetBundleName(reminder->GetBundleName()); in InsertNewReminders()
205 ReminderRequest::AppendValuesBucket(reminder, bundleOption, baseValues, true); in InsertNewReminders()
[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_timer.cpp163 void ReminderRequestTimer::AppendValuesBucket(const sptr<ReminderRequest> &reminder, in AppendValuesBucket() argument
167 if (reminder->GetReminderType() == ReminderRequest::ReminderType::TIMER) { in AppendValuesBucket()
168 ReminderRequestTimer* timer = static_cast<ReminderRequestTimer*>(reminder.GetRefPtr()); in AppendValuesBucket()
171 values.PutInt(ReminderTimerTable::REMINDER_ID, reminder->GetReminderId()); in AppendValuesBucket()
Dreminder_request_alarm.cpp227 void ReminderRequestAlarm::AppendValuesBucket(const sptr<ReminderRequest> &reminder, in AppendValuesBucket() argument
233 if (reminder->GetReminderType() == ReminderRequest::ReminderType::ALARM) { in AppendValuesBucket()
234 ReminderRequestAlarm* alarm = static_cast<ReminderRequestAlarm*>(reminder.GetRefPtr()); in AppendValuesBucket()
239 values.PutInt(ReminderAlarmTable::REMINDER_ID, reminder->GetReminderId()); in AppendValuesBucket()
Dreminder_request.cpp1874 void ReminderRequest::AppendWantAgentValuesBucket(const sptr<ReminderRequest>& reminder, in AppendWantAgentValuesBucket() argument
1881 auto wantAgentInfo = reminder->GetWantAgentInfo(); in AppendWantAgentValuesBucket()
1897 auto maxScreenWantAgentInfo = reminder->GetMaxScreenWantAgentInfo(); in AppendWantAgentValuesBucket()
1913 void ReminderRequest::AppendValuesBucket(const sptr<ReminderRequest> &reminder, in AppendValuesBucket() argument
1916 values.PutInt(ReminderBaseTable::REMINDER_ID, reminder->GetReminderId()); in AppendValuesBucket()
1917 values.PutString(ReminderBaseTable::PACKAGE_NAME, reminder->GetBundleName()); in AppendValuesBucket()
1918 values.PutInt(ReminderBaseTable::USER_ID, reminder->GetUserId()); in AppendValuesBucket()
1919 values.PutInt(ReminderBaseTable::UID, reminder->GetUid()); in AppendValuesBucket()
1920 values.PutString(ReminderBaseTable::SYSTEM_APP, reminder->IsSystemApp() ? "true" : "false"); in AppendValuesBucket()
1921 …values.PutInt(ReminderBaseTable::REMINDER_TYPE, static_cast<int32_t>(reminder->GetReminderType())); in AppendValuesBucket()
[all …]
/base/startup/appspawn/test/unittest/app_spawn_standard_test/
Dapp_spawn_appmgr_test.cpp317 uint32_t reminder = 0; variable
321 uint32_t *inputReminder[inputCount] = {nullptr, &reminder};
366 uint32_t reminder = 0; variable
370 ret = GetAppSpawnMsgFromBuffer(buffer.data(), currLen, &outMsg, &msgRecvLen, &reminder);
375 …tAppSpawnMsgFromBuffer(buffer.data() + currLen, sizeof(uint32_t), &outMsg, &msgRecvLen, &reminder);
380 EXPECT_EQ(0, reminder);
384 sizeof(AppSpawnMsg) - currLen, &outMsg, &msgRecvLen, &reminder);
389 EXPECT_EQ(0, reminder);
392 … ret = GetAppSpawnMsgFromBuffer(buffer.data() + currLen, msgLen, &outMsg, &msgRecvLen, &reminder);
396 EXPECT_EQ(sizeof(AppSpawnMsg), reminder);
[all …]
/base/notification/distributed_notification_service/frameworks/js/napi/include/reminder/
Dreminder_common.h103 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder);
149 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder);
152 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder);
155 …nv &env, const napi_value &value, const bool isSysApp, std::shared_ptr<ReminderRequest>& reminder);
158 …v &env, const napi_value &value, const bool isSysApp, std::shared_ptr<ReminderRequest>& reminder);
167 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder);
170 …const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder, bool isS…
173 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder);
176 std::shared_ptr<ReminderRequest>& reminder, const char* str, int32_t buttonType);
179 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder);
[all …]
/base/notification/distributed_notification_service/frameworks/core/src/
Dans_manager_proxy_reminder.cpp33 ErrCode AnsManagerProxy::PublishReminder(sptr<ReminderRequest> &reminder) in PublishReminder() argument
41 if (reminder == nullptr) { in PublishReminder()
45 if (!data.WriteUint8(static_cast<uint8_t>(reminder->GetReminderType()))) { in PublishReminder()
49 if (!data.WriteParcelable(reminder)) { in PublishReminder()
66 reminder->SetReminderId(reminderId); in PublishReminder()
67 ANSR_LOGD("ReminderId=%{public}d", reminder->GetReminderId()); in PublishReminder()
272 sptr<ReminderRequest> reminder; in ReadReminders() local
275 reminder = reply.ReadParcelable<ReminderRequestAlarm>(); in ReadReminders()
278 reminder = reply.ReadParcelable<ReminderRequestTimer>(); in ReadReminders()
281 reminder = reply.ReadParcelable<ReminderRequestCalendar>(); in ReadReminders()
[all …]
/base/notification/distributed_notification_service/frameworks/js/napi/src/reminder/
Dreminder_common.cpp34 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder) in GetReminderRequest() argument
44 if (GenReminder(env, value, reminder) == nullptr) { in GetReminderRequest()
51 …const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder, bool isS… in GenActionButtons() argument
88 HandleActionButtonTitle(env, actionButton, reminder, str, buttonType); in GenActionButtons()
98 std::shared_ptr<ReminderRequest>& reminder, const char* str, int32_t buttonType) in HandleActionButtonTitle() argument
110 GetButtonWantAgent(env, actionButton, reminder, buttonWantAgent); in HandleActionButtonTitle()
117 reminder->SetActionButton(title, static_cast<ReminderRequest::ActionButtonType>(buttonType), in HandleActionButtonTitle()
134 …std::shared_ptr<ReminderRequest>& reminder, std::shared_ptr<ReminderRequest::ButtonWantAgent>& but… in GetButtonWantAgent() argument
149 reminder->SetCustomButtonUri(str); in GetButtonWantAgent()
407 const napi_env &env, const napi_value &value, std::shared_ptr<ReminderRequest>& reminder) in GenMaxScreenWantAgent() argument
[all …]
Dpublish.cpp60 std::shared_ptr<ReminderRequest> reminder = nullptr; member
72 std::shared_ptr<ReminderRequest> reminder = nullptr; member
119 if (ReminderCommon::GetReminderRequest(env, argv[0], params.reminder) == nullptr) { in ParseParameters()
416 void ParseReminderTimer(const napi_env &env, const ReminderRequest &reminder, napi_value &result) in ParseReminderTimer() argument
419 ReminderRequestTimer& timer = (ReminderRequestTimer&)reminder; in ParseReminderTimer()
424 void ParseReminderAlarm(const napi_env &env, const ReminderRequest &reminder, napi_value &result) in ParseReminderAlarm() argument
428 ReminderRequestAlarm& alarm = (ReminderRequestAlarm&)reminder; in ParseReminderAlarm()
440 for (auto day : reminder.GetDaysOfWeek()) { in ParseReminderAlarm()
450 void ParseReminderCalendar(const napi_env &env, const ReminderRequest &reminder, napi_value &result) in ParseReminderCalendar() argument
454 ReminderRequestCalendar& calendar = (ReminderRequestCalendar&)reminder; in ParseReminderCalendar()
[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/frameworks/ans/test/unittest/
Dreminder_store_test.cpp132 sptr<ReminderRequest> reminder = nullptr; variable
134 int64_t ret = reminderStore.Insert(reminder, bundleOption_);
146 sptr<ReminderRequest> reminder = nullptr; variable
148 int64_t ret = reminderStore.Update(reminder, bundleOption_);
261 sptr<ReminderRequest> reminder = nullptr; variable
263 int64_t ret = reminderStore.UpdateOrInsert(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.cpp272 ReminderRequestTimer reminder = ReminderRequestTimer(countDownTimeInSeconds); variable
273 ErrCode ret = ans_->PublishReminder(reminder);
287 ReminderRequestAlarm reminder = ReminderRequestAlarm(0, 0, daysOfWeek); variable
288 ErrCode ret = ans_->PublishReminder(reminder);
305 …ReminderRequestCalendar reminder = ReminderRequestCalendar(dateTime, repeatMonths, repeatDays, day… variable
306 ErrCode ret = ans_->PublishReminder(reminder);
/base/notification/distributed_notification_service/interfaces/inner_api/
Dreminder_store.h40 …int32_t UpdateOrInsert(const sptr<ReminderRequest>& reminder, const sptr<NotificationBundleOption>…
77 …int32_t Insert(const sptr<ReminderRequest>& reminder, const sptr<NotificationBundleOption>& bundle…
78 …int32_t Update(const sptr<ReminderRequest>& reminder, const sptr<NotificationBundleOption>& bundle…
80 bool IsReminderExist(const sptr<ReminderRequest>& reminder);
Dreminder_helper.h51 static ErrCode PublishReminder(ReminderRequest &reminder);
Dreminder_request_timer.h73 static void AppendValuesBucket(const sptr<ReminderRequest> &reminder,
Dreminder_request_alarm.h100 static void AppendValuesBucket(const sptr<ReminderRequest> &reminder,
/base/notification/distributed_notification_service/frameworks/js/napi/
DBUILD.gn19 "src/reminder:reminderagent",
20 "src/reminder:reminderagentmanager",
/base/startup/appspawn/standard/
Dappspawn_msgmgr.c293 AppSpawnMsgNode **outMsg, uint32_t *msgRecvLen, uint32_t *reminder) in GetAppSpawnMsgFromBuffer() argument
296 APPSPAWN_CHECK_ONLY_EXPER(msgRecvLen != NULL && reminder != NULL, return APPSPAWN_MSG_INVALID); in GetAppSpawnMsgFromBuffer()
297 *reminder = 0; in GetAppSpawnMsgFromBuffer()
340 *reminder = reminderLen - realCopy; in GetAppSpawnMsgFromBuffer()
/base/notification/distributed_notification_service/test/fuzztest/advancednotificationservice_fuzzer/
Dadvancednotificationservice_fuzzer.cpp111 sptr<Notification::ReminderRequest> reminder = new Notification::ReminderRequest(); in DoSomethingInterestingWithMyAPI() local
112 advancedNotificationService.PublishReminder(reminder); in DoSomethingInterestingWithMyAPI()

12