/base/notification/distributed_notification_service/services/ans/test/unittest/ |
D | reminder_data_manager_test.cpp | 69 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/ |
D | reminder_data_manager.cpp | 83 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 …]
|
D | advanced_notification_reminder_service.cpp | 52 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/ |
D | reminder_data_manager.h | 169 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/ |
D | reminder_store.cpp | 167 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 …]
|
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_timer.cpp | 163 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()
|
D | reminder_request_alarm.cpp | 227 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()
|
D | reminder_request.cpp | 1874 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/ |
D | app_spawn_appmgr_test.cpp | 317 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/ |
D | reminder_common.h | 103 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/ |
D | ans_manager_proxy_reminder.cpp | 33 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/ |
D | reminder_common.cpp | 34 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 …]
|
D | publish.cpp | 60 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/ |
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/frameworks/ans/test/unittest/ |
D | reminder_store_test.cpp | 132 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_);
|
D | reminder_helper_test.cpp | 46 ReminderRequest reminder; variable 48 ErrCode ret = reminderHelper.PublishReminder(reminder);
|
/base/notification/distributed_notification_service/frameworks/core/test/unittest/ans_notification_annex_test/ |
D | ans_notification_annex_test.cpp | 272 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/ |
D | reminder_store.h | 40 …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);
|
D | reminder_helper.h | 51 static ErrCode PublishReminder(ReminderRequest &reminder);
|
D | reminder_request_timer.h | 73 static void AppendValuesBucket(const sptr<ReminderRequest> &reminder,
|
D | reminder_request_alarm.h | 100 static void AppendValuesBucket(const sptr<ReminderRequest> &reminder,
|
/base/notification/distributed_notification_service/frameworks/js/napi/ |
D | BUILD.gn | 19 "src/reminder:reminderagent", 20 "src/reminder:reminderagentmanager",
|
/base/startup/appspawn/standard/ |
D | appspawn_msgmgr.c | 293 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/ |
D | advancednotificationservice_fuzzer.cpp | 111 sptr<Notification::ReminderRequest> reminder = new Notification::ReminderRequest(); in DoSomethingInterestingWithMyAPI() local 112 advancedNotificationService.PublishReminder(reminder); in DoSomethingInterestingWithMyAPI()
|