1 /* 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_REQUEST_H 17 #define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_REQUEST_H 18 19 #include <map> 20 #include <string> 21 22 #include "abs_shared_result_set.h" 23 #include "notification_bundle_option.h" 24 #include "notification_constant.h" 25 #include "notification_request.h" 26 #include "values_bucket.h" 27 28 namespace OHOS { 29 namespace Notification { 30 class ReminderRequest : public Parcelable { 31 public: 32 /** 33 * @brief Supported reminder type. 34 */ 35 enum class ReminderType : uint8_t { 36 /** 37 * Indicates the classification of reminder for timer. 38 */ 39 TIMER, 40 41 /** 42 * Indicates the classification of reminder for calendar. 43 */ 44 CALENDAR, 45 46 /** 47 * Indicates the classification of reminder for alarm. 48 */ 49 ALARM, 50 INVALID 51 }; 52 53 /** 54 * @brief Supported action button type. 55 */ 56 enum class ActionButtonType : uint8_t { 57 /** 58 * @brief Indicates that this action button is used to close reminder's notification. 59 * It always works well, whether the application is running at the time. 60 * 61 */ 62 CLOSE, 63 64 /** 65 * @brief Indicates that this action button is used to snooze reminder. 66 * It always work well, whether the application is running at the time. 67 * 68 */ 69 SNOOZE, 70 INVALID 71 }; 72 73 /** 74 * @brief Supported notification update type. 75 */ 76 enum class UpdateNotificationType : uint8_t { 77 COMMON, 78 REMOVAL_WANT_AGENT, 79 WANT_AGENT, 80 MAX_SCREEN_WANT_AGENT, 81 BUNDLE_INFO, 82 CONTENT 83 }; 84 85 /** 86 * @brief Enumerates the Time type for converting between c time and acture time. 87 */ 88 enum class TimeTransferType : uint8_t { 89 YEAR, 90 MONTH, 91 WEEK 92 }; 93 94 /** 95 * @brief Enumerates the Time format for print. 96 */ 97 enum class TimeFormat : uint8_t { 98 YMDHMS, 99 HM 100 }; 101 102 /** 103 * @brief Attributes of action button. 104 */ 105 struct ActionButtonInfo { 106 /** 107 * Type of the button. 108 */ 109 ActionButtonType type; 110 111 /** 112 * Content show on the button. 113 */ 114 std::string title = ""; 115 }; 116 117 /** 118 * @brief Want agent information. Indicates the package and the ability to switch to. 119 */ 120 struct WantAgentInfo { 121 std::string pkgName = ""; 122 std::string abilityName = ""; 123 }; 124 125 struct MaxScreenAgentInfo { 126 std::string pkgName = ""; 127 std::string abilityName = ""; 128 }; 129 130 /** 131 * @brief Copy construct from an exist reminder. 132 * 133 * @param Indicates the exist reminder. 134 */ 135 explicit ReminderRequest(const ReminderRequest &other); 136 137 /** 138 * @brief This constructor should only be used in background proxy service process 139 * when reminder instance recovery from database. 140 * 141 * @param reminderId Indicates reminder id. 142 */ 143 explicit ReminderRequest(int32_t reminderId); 144 ReminderRequest& operator = (const ReminderRequest &other); ~ReminderRequest()145 virtual ~ReminderRequest() override {}; 146 147 /** 148 * @brief Marshal a NotificationRequest object into a Parcel. 149 * 150 * @param parcel the object into the parcel 151 */ 152 virtual bool Marshalling(Parcel &parcel) const override; 153 154 /** 155 * @brief Unmarshal object from a Parcel. 156 * 157 * @return the NotificationRequest 158 */ 159 static ReminderRequest *Unmarshalling(Parcel &parcel); 160 virtual bool ReadFromParcel(Parcel &parcel); 161 162 /** 163 * @brief If the reminder is showing on the notification panel, it should not be removed automatically. 164 * 165 * @return true if it can be removed automatically. 166 */ 167 bool CanRemove() const; 168 169 bool CanShow() const; 170 171 /** 172 * @brief Obtains all the information of the reminder. 173 * 174 * @return Information of the reminder. 175 */ 176 std::string Dump() const; 177 178 /** 179 * @brief Obtains the configured action buttons. 180 * 181 * @return map of action buttons. 182 */ 183 std::map<ActionButtonType, ActionButtonInfo> GetActionButtons() const; 184 185 /** 186 * @brief Obtains the configured content. 187 * 188 * @return content text. 189 */ 190 std::string GetContent() const; 191 192 /** 193 * @brief Obtains the configured expired content. 194 * 195 * @return expired content text. 196 */ 197 std::string GetExpiredContent() const; 198 199 std::shared_ptr<MaxScreenAgentInfo> GetMaxScreenWantAgentInfo() const; 200 201 /** 202 * @brief Obtains notification id. 203 * 204 * @return notification id. 205 */ 206 int32_t GetNotificationId() const; 207 208 /** 209 * @brief Obtains notification request. 210 * 211 * @return notification request instance. 212 */ 213 sptr<NotificationRequest> GetNotificationRequest() const; 214 215 /** 216 * @brief Obtains reminder id. 217 * 218 * @return reminder id. 219 */ 220 int32_t GetReminderId() const; 221 222 uint64_t GetReminderTimeInMilli() const; 223 224 /** 225 * @brief Obtains reminder type. 226 * 227 * @return reminder type. 228 */ 229 ReminderType GetReminderType() const; 230 231 /** 232 * @brief Obtains the ringing or vibration duration configured for this reminder. 233 * 234 * @return uint16_t The ringing or vibration duration in seconds. 235 */ 236 uint16_t GetRingDuration() const; 237 238 /** 239 * @brief Obtains slot type. 240 * 241 * @return slot type. 242 */ 243 NotificationConstant::SlotType GetSlotType() const; 244 245 std::string GetSnoozeContent() const; 246 uint8_t GetSnoozeTimes() const; 247 uint8_t GetSnoozeTimesDynamic() const; 248 uint8_t GetState() const; 249 250 /** 251 * @brief Obtains the Time Interval in seconds. 252 * 253 * @return uint64_t Time Interval in seconds. 254 */ 255 uint64_t GetTimeInterval() const; 256 257 /** 258 * @brief Obtains title. 259 * 260 * @return title. 261 */ 262 std::string GetTitle() const; 263 264 /** 265 * @brief Obtains trigger time in milli. 266 * 267 * @return trigger time. 268 */ 269 uint64_t GetTriggerTimeInMilli() const; 270 271 int32_t GetUserId() const; 272 int32_t GetUid() const; 273 274 /** 275 * @brief Obtains want agent information. 276 * 277 * @return want agent information. 278 */ 279 std::shared_ptr<WantAgentInfo> GetWantAgentInfo() const; 280 281 /** 282 * @brief Inits reminder id when publish reminder success. 283 * Assign a unique reminder id for each reminder. 284 */ 285 void InitReminderId(); 286 287 /** 288 * @brief Inits reminder userId when publish reminder success. 289 * 290 * When package remove, user id is sended by wantAgent, but we cannot get the uid according user id as the 291 * package has been removed, and the bundleOption can not be create with correct uid. so we need to record 292 * the user id, and use it to judge which user the reminder belong to. 293 * 294 * @param userId Indicates the userId which the reminder belong to. 295 */ 296 void InitUserId(const int32_t &userId); 297 298 /** 299 * @brief Inites reminder uid when publish reminder success. 300 * 301 * When system reboot and recovery from database, we cannot get the uid according user id as BMS has not be 302 * ready. So we need to record the uid in order to create correct bundleOption. 303 * 304 * @param uid Indicates the uid which the reminder belong to. 305 */ 306 void InitUid(const int32_t &uid); 307 308 /** 309 * @brief Check the reminder is alerting or not. 310 * 311 * @return true if the reminder is playing sound or vibrating. 312 */ 313 bool IsAlerting() const; 314 315 /** 316 * @brief Check the reminder is expired or not. 317 * 318 * @return true is the reminder is expired. 319 */ 320 bool IsExpired() const; 321 322 /** 323 * @brief Check the reminder is showing on the panel. 324 * 325 * @return true if the reminder is showing on the panel. 326 */ 327 bool IsShowing() const; 328 329 /** 330 * @brief Closes the reminder by manual. 331 * 332 * 1) Resets the state of "Alering/Showing/Snooze" 333 * 2) Resets snoozeTimesDynamic_ if update to next trigger time, otherwise set reminder to expired. 334 * 335 * @param updateNext Whether to update to next reminder. 336 */ 337 void OnClose(bool updateNext); 338 339 /** 340 * @brief When date/time change, reminder need to refresh next trigger time. 341 * 342 * @return true if need to show reminder immediately. 343 */ 344 virtual bool OnDateTimeChange(); 345 346 /** 347 * When shown notification is covered by a new notification with the same id, we should remove 348 * the state of showing, so that the reminder can be removed automatically when it is expired. 349 */ 350 void OnSameNotificationIdCovered(); 351 352 /** 353 * @brief Shows the reminder on panel. TriggerTime will be updated to next. 354 * 355 * @param isPlaySoundOrVibration true means it is play sound or vibration. 356 * @param isSysTimeChanged true means it is called when the system time is changed by user, otherwise false. 357 * @param allowToNotify true means that the notification will be shown as normal, otherwise false. 358 */ 359 void OnShow(bool isPlaySoundOrVibration, bool isSysTimeChanged, bool allowToNotify); 360 361 /** 362 * @brief Reset the state of "Showing" when the reminder is shown failed. 363 */ 364 void OnShowFail(); 365 366 /** 367 * @brief Snooze the reminder by manual. 368 * 369 * 1) Updates the trigger time to the next one. 370 * 2) Updates the notification content for "Snooze". 371 * 3) Switches the state from "Showing[, Alerting]" to "Snooze". 372 */ 373 bool OnSnooze(); 374 375 /** 376 * @brief Starts the reminder 377 * 378 * Sets the state from "Inactive" to "Active". 379 */ 380 void OnStart(); 381 382 /** 383 * @brief Stops the reminder. 384 * 385 * Sets the state from "Active" to "Inactive". 386 */ 387 void OnStop(); 388 389 /** 390 * @brief Terminate the alerting reminder, which is executed when the ring duration is over. 391 * 392 * 1) Disables the state of "Alerting". 393 * 2) Updates the notification content for "Alert". 394 * 395 * @return false if alerting state has already been set false before calling the method. 396 */ 397 bool OnTerminate(); 398 399 /** 400 * @brief When timezone change, reminder need to refresh next trigger time. 401 * 402 * @return true if need to show reminder immediately. 403 */ 404 virtual bool OnTimeZoneChange(); 405 406 /** 407 * @brief Recovery reminder instance from database record. 408 * 409 * @param resultSet Indicates the resultSet with pointer to the row of record data. 410 */ 411 virtual void RecoverFromDb(const std::shared_ptr<NativeRdb::AbsSharedResultSet> &resultSet); 412 void RecoverActionButton(const std::shared_ptr<NativeRdb::AbsSharedResultSet> &resultSet); 413 void RecoverWantAgent(const std::string &wantAgentInfo, const uint8_t &type); 414 415 /** 416 * @brief Sets action button. 417 * 418 * @param title Indicates the title of the button. 419 * @param type Indicates the type of the button. 420 * @return Current reminder self. 421 */ 422 ReminderRequest& SetActionButton(const std::string &title, const ActionButtonType &type); 423 424 /** 425 * @brief Sets reminder content. 426 * 427 * @param content Indicates content text. 428 * @return Current reminder self. 429 */ 430 ReminderRequest& SetContent(const std::string &content); 431 432 /** 433 * @brief Sets reminder is expired or not. 434 * 435 * @param isExpired Indicates the reminder is expired or not. 436 */ 437 void SetExpired(bool isExpired); 438 439 /** 440 * @brief Sets expired content. 441 * 442 * @param expiredContent Indicates expired content. 443 * @return Current reminder self. 444 */ 445 ReminderRequest& SetExpiredContent(const std::string &expiredContent); 446 447 ReminderRequest& SetMaxScreenWantAgentInfo(const std::shared_ptr<MaxScreenAgentInfo> &maxScreenWantAgentInfo); 448 449 /** 450 * @brief Sets notification id. 451 * 452 * @param notificationId Indicates notification id. 453 * @return Current reminder self. 454 */ 455 ReminderRequest& SetNotificationId(int32_t notificationId); 456 457 /** 458 * @brief Sets reminder id. 459 * 460 * @param reminderId Indicates reminder id. 461 */ 462 void SetReminderId(int32_t reminderId); 463 464 void SetReminderTimeInMilli(const uint64_t reminderTimeInMilli); 465 466 /** 467 * @brief Sets the ringing or vibration duration for this reminder, in seconds. 468 * 469 * @param ringDurationInSeconds Indicates the duration. The default is 1 second. 470 * @return Current reminder self. 471 */ 472 ReminderRequest& SetRingDuration(const uint64_t ringDurationInSeconds); 473 474 /** 475 * @brief Sets slot type. 476 * 477 * @param slotType Indicates slot type. 478 * @return Current reminder self. 479 */ 480 ReminderRequest& SetSlotType(const NotificationConstant::SlotType &slotType); 481 482 ReminderRequest& SetSnoozeContent(const std::string &snoozeContent); 483 484 /** 485 * @brief Set the number of snooze times for this reminder. 486 * 487 * @note If the value of snoozeTimes is less than or equals to 0, this reminder is a one-shot 488 * reminder and will not be snoozed. 489 * 490 * It the value of snoozeTimes is greater than 0, for example, snoozeTimes=3, this reminder 491 * will be snoozed three times after the first alarm, that is, this reminder will be triggered 492 * for four times. 493 * 494 * This method does not take affect on the reminders for countdown timers. 495 * 496 * @param snoozeTimes Indicates the number of times that the reminder will be snoozed. 497 * @return ReminderRequest& Current reminder self. 498 */ 499 ReminderRequest& SetSnoozeTimes(const uint8_t snoozeTimes); 500 501 ReminderRequest& SetSnoozeTimesDynamic(const uint8_t snooziTimes); 502 503 /** 504 * @brief Sets the Time Interval for this reminder, in seconds. The default value is 0. 505 * 506 * @note The minimum snooze interval is 5 minute. If the snooze interval is set to a value greater 507 * than 0 and less than 5 minutes, the system converts it to 5 minutes by default. 508 * 509 * This method does not take effect on the reminders for countdown timers. 510 * 511 * @param timeIntervalInSeconds Indicates the snooze interval to set. If the value is less or equals to 0, 512 * the reminder will not be snoozed. 513 * @return ReminderRequest& Current reminder self. 514 */ 515 ReminderRequest& SetTimeInterval(const uint64_t timeIntervalInSeconds); 516 517 /** 518 * @brief Sets title. 519 * 520 * @param title Indicates title. 521 * @return Current reminder self. 522 */ 523 ReminderRequest& SetTitle(const std::string &title); 524 525 /** 526 * @brief Sets trigger time. 527 * 528 * @param triggerTimeInMilli Indicates trigger time in milli. 529 */ 530 void SetTriggerTimeInMilli(uint64_t triggerTimeInMilli); 531 532 /** 533 * @brief Sets want agent information. 534 * 535 * @param wantAgentInfo Indicates want agent information. 536 * @return Current reminder self. 537 */ 538 ReminderRequest& SetWantAgentInfo(const std::shared_ptr<WantAgentInfo> &wantAgentInfo); 539 540 bool ShouldShowImmediately() const; 541 542 /** 543 * @brief Updates {@link triggerTimeInMilli_} to next. 544 * @note If next trigger time not exist, {@link isExpired_} flag will be set with true. 545 * 546 * @return true if next trigger time exist and set success. 547 */ 548 virtual bool UpdateNextReminder(); 549 virtual bool SetNextTriggerTime(); 550 551 /** 552 * @brief Update notification attributes. 553 * 554 * Some attributes need to be updated after the reminder published or before the notification publish. 555 * For example, action button should not init until the reminder is published successfully, as the reminder id is 556 * assigned after that. 557 * 558 * @param type Indicates the update type. 559 * @param extra Indicates the extra content. 560 */ 561 void UpdateNotificationRequest(UpdateNotificationType type, std::string extra); 562 563 static int32_t GetActualTime(const TimeTransferType &type, int32_t cTime); 564 static int32_t GetCTime(const TimeTransferType &type, int32_t actualTime); 565 static uint64_t GetDurationSinceEpochInMilli(const time_t target); 566 static int32_t GetUid(const int32_t &userId, const std::string &bundleName); 567 static int32_t GetUserId(const int32_t &uid); 568 static void AppendValuesBucket(const sptr<ReminderRequest> &reminder, 569 const sptr<NotificationBundleOption> &bundleOption, NativeRdb::ValuesBucket &values); 570 571 static int32_t GLOBAL_ID; 572 static const uint64_t INVALID_LONG_LONG_VALUE; 573 static const uint16_t INVALID_U16_VALUE; 574 static const uint8_t INVALID_U8_VALUE; 575 static const uint16_t MILLI_SECONDS; 576 static const uint16_t SAME_TIME_DISTINGUISH_MILLISECONDS; 577 static const std::string NOTIFICATION_LABEL; 578 static const int32_t SUNDAY; 579 580 /** 581 * @brief Show the reminder with a notification. 582 */ 583 static const std::string REMINDER_EVENT_ALARM_ALERT; 584 585 /** 586 * @brief Close the reminder when click the close button of notification. 587 */ 588 static const std::string REMINDER_EVENT_CLOSE_ALERT; 589 590 /** 591 * @brief Snooze the reminder when click the snooze button of notification. 592 */ 593 static const std::string REMINDER_EVENT_SNOOZE_ALERT; 594 595 /** 596 * @brief Used to control ring duration. 597 */ 598 static const std::string REMINDER_EVENT_ALERT_TIMEOUT; 599 600 /** 601 * @brief Update the reminder when remove notification from the systemUI. 602 */ 603 static const std::string REMINDER_EVENT_REMOVE_NOTIFICATION; 604 static const std::string PARAM_REMINDER_ID; 605 static const uint8_t REMINDER_STATUS_INACTIVE; 606 static const uint8_t REMINDER_STATUS_ACTIVE; 607 static const uint8_t REMINDER_STATUS_ALERTING; 608 static const uint8_t REMINDER_STATUS_SHOWING; 609 static const uint8_t REMINDER_STATUS_SNOOZE; 610 611 // For database recovery. 612 static void InitDbColumns(); 613 static const std::string REMINDER_ID; 614 static const std::string PKG_NAME; 615 static const std::string USER_ID; 616 static const std::string UID; 617 static const std::string APP_LABEL; 618 static const std::string REMINDER_TYPE; 619 static const std::string REMINDER_TIME; 620 static const std::string TRIGGER_TIME; 621 static const std::string RTC_TRIGGER_TIME; 622 static const std::string TIME_INTERVAL; 623 static const std::string SNOOZE_TIMES; 624 static const std::string DYNAMIC_SNOOZE_TIMES; 625 static const std::string RING_DURATION; 626 static const std::string IS_EXPIRED; 627 static const std::string IS_ACTIVE; 628 static const std::string STATE; 629 static const std::string ZONE_ID; 630 static const std::string HAS_SCHEDULED_TIMEOUT; 631 static const std::string ACTION_BUTTON_INFO; 632 static const std::string SLOT_ID; 633 static const std::string NOTIFICATION_ID; 634 static const std::string TITLE; 635 static const std::string CONTENT; 636 static const std::string SNOOZE_CONTENT; 637 static const std::string EXPIRED_CONTENT; 638 static const std::string AGENT; 639 static const std::string MAX_SCREEN_AGENT; 640 static std::string sqlOfAddColumns; 641 static std::vector<std::string> columns; 642 643 protected: 644 enum class DbRecoveryType : uint8_t { 645 INT, 646 LONG 647 }; 648 ReminderRequest(); 649 explicit ReminderRequest(ReminderType reminderType); 650 std::string GetDateTimeInfo(const time_t &timeInSecond) const; PreGetNextTriggerTimeIgnoreSnooze(bool ignoreRepeat,bool forceToGetNext)651 virtual uint64_t PreGetNextTriggerTimeIgnoreSnooze(bool ignoreRepeat, bool forceToGetNext) const 652 { 653 return INVALID_LONG_LONG_VALUE; 654 } 655 int64_t RecoverInt64FromDb(const std::shared_ptr<NativeRdb::AbsSharedResultSet> &resultSet, 656 const std::string &columnName, const DbRecoveryType &columnType); 657 658 /** 659 * @brief For database recovery. 660 * 661 * Add column to create table of database. 662 * 663 * @param name Indicates the column name. 664 * @param type Indicates the type of the column. 665 * @param isEnd Indicates whether it is the last column. 666 */ 667 static void AddColumn(const std::string &name, const std::string &type, const bool &isEnd); 668 669 private: 670 void AddActionButtons(const bool includeSnooze); 671 void AddRemovalWantAgent(); 672 std::shared_ptr<AbilityRuntime::WantAgent::WantAgent> CreateWantAgent(AppExecFwk::ElementName &element) const; 673 std::string GetButtonInfo() const; 674 uint64_t GetNowInstantMilli() const; 675 std::string GetShowTime(const uint64_t showTime) const; 676 std::string GetTimeInfoInner(const time_t &timeInSecond, const TimeFormat &format) const; 677 std::string GetState(const uint8_t state) const; 678 bool HandleSysTimeChange(uint64_t oriTriggerTime, uint64_t optTriggerTime); 679 bool HandleTimeZoneChange(uint64_t oldZoneTriggerTime, uint64_t newZoneTriggerTime, uint64_t optTriggerTime); 680 bool InitNotificationRequest(); 681 void InitServerObj(); 682 void SetMaxScreenWantAgent(AppExecFwk::ElementName &element); 683 void SetState(bool deSet, const uint8_t newState, std::string function); 684 void SetWantAgent(AppExecFwk::ElementName &element); 685 std::vector<std::string> StringSplit(std::string source, const std::string &split) const; 686 void UpdateActionButtons(const bool &setSnooze); 687 bool UpdateNextReminder(const bool &force); 688 void UpdateNotificationContent(const bool &setSnooze); 689 void UpdateNotificationCommon(); 690 691 /** 692 * @brief Used for reminder recovery from database. 693 * 694 * @param bundleName Indicates the third part bundle name. 695 */ 696 void UpdateNotificationBundleInfo(); 697 698 /** 699 * @brief Update the notification, which will be shown for the "Alerting" reminder. 700 * 1. Update the notification label/content. 701 * 2. Restore the snooze action button. 702 */ 703 void UpdateNotificationStateForAlert(); 704 705 /** 706 * @brief Update the notification, which will be shown when user do a snooze. 707 * 1. Update the notification label/content. 708 * 2. Remove the snooze action button. 709 */ 710 void UpdateNotificationStateForSnooze(); 711 712 static const uint32_t MIN_TIME_INTERVAL_IN_MILLI; 713 static const std::string SEP_BUTTON_SINGLE; 714 static const std::string SEP_BUTTON_MULTI; 715 static const std::string SEP_WANT_AGENT; 716 717 std::string content_ {}; 718 std::string expiredContent_ {}; 719 std::string snoozeContent_ {}; 720 std::string displayContent_ {}; 721 std::string title_ {}; 722 std::string bundleName_ {}; 723 bool isExpired_ {false}; 724 uint8_t snoozeTimes_ {0}; 725 uint8_t snoozeTimesDynamic_ {0}; 726 uint8_t state_ {0}; 727 int32_t notificationId_ {0}; 728 int32_t reminderId_ {-1}; 729 int32_t userId_ {-1}; 730 int32_t uid_ {-1}; 731 732 // Indicates the reminder has been shown in the past time. 733 // When the reminder has been created but not showed, it is equals to 0. 734 uint64_t reminderTimeInMilli_ {0}; 735 uint64_t ringDurationInMilli_ {MILLI_SECONDS}; 736 uint64_t triggerTimeInMilli_ {0}; 737 uint64_t timeIntervalInMilli_ {0}; 738 ReminderType reminderType_ {ReminderType::INVALID}; 739 NotificationConstant::SlotType slotType_ {NotificationConstant::SlotType::SOCIAL_COMMUNICATION}; 740 sptr<NotificationRequest> notificationRequest_ = nullptr; 741 std::shared_ptr<WantAgentInfo> wantAgentInfo_ = nullptr; 742 std::shared_ptr<MaxScreenAgentInfo> maxScreenWantAgentInfo_ = nullptr; 743 std::map<ActionButtonType, ActionButtonInfo> actionButtonMap_ {}; 744 }; 745 } // namespace Reminder 746 } // namespace OHOS 747 #endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_INTERFACES_INNER_API_REMINDER_REQUEST_H