1 /* 2 * Copyright (c) 2024 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_REQUEST_BOX_H 17 #define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_REQUEST_BOX_H 18 19 #include <vector> 20 #include <string> 21 #include <map> 22 #include "pixel_map.h" 23 #include "tlv_box.h" 24 #include "box_base.h" 25 26 namespace OHOS { 27 namespace Notification { 28 class NotifticationRequestBox : public BoxBase { 29 public: 30 NotifticationRequestBox(); 31 NotifticationRequestBox(std::shared_ptr<TlvBox> box); 32 bool SetNotificationHashCode(const std::string& hasdCode); 33 bool SetSlotType(int32_t type); 34 bool SetContentType(int32_t type); 35 bool SetReminderFlag(int32_t flag); 36 bool SetCreatorBundleName(const std::string& bundleName); 37 bool SetNotificationTitle(const std::string& title); 38 bool SetNotificationText(const std::string& text); 39 bool SetNotificationAdditionalText(const std::string& text); 40 bool SetNotificationBriefText(const std::string& text); 41 bool SetNotificationExpandedTitle(const std::string& text); 42 bool SetNotificationLongText(const std::string& text); 43 bool SetNotificationAllLines(const std::vector<std::string>& allLines); 44 bool SetNotificationBigPicture(const std::shared_ptr<Media::PixelMap>& bigPicture); 45 bool SetNotificationActionName(const std::string& actionName); 46 bool SetNotificationUserInput(const std::string& userInput); 47 bool SetBigIcon(const std::shared_ptr<Media::PixelMap>& bigIcon); 48 bool SetOverlayIcon(const std::shared_ptr<Media::PixelMap>& overlayIcon); 49 bool SetCommonLiveView(const std::vector<uint8_t>& byteSequence); 50 bool SetFinishTime(int64_t time); 51 bool SetAutoDeleteTime(int64_t time); 52 53 bool GetNotificationHashCode(std::string& hasdCode) const; 54 bool GetSlotType(int32_t& type) const; 55 bool GetContentType(int32_t& type) const; 56 bool GetReminderFlag(int32_t& flag) const; 57 bool GetCreatorBundleName(std::string& bundleName) const; 58 bool GetNotificationTitle(std::string& title) const; 59 bool GetNotificationText(std::string& text) const; 60 bool GetNotificationAdditionalText(std::string& text) const; 61 bool GetNotificationBriefText(std::string& text) const; 62 bool GetNotificationExpandedTitle(std::string& text) const; 63 bool GetNotificationLongText(std::string& text) const; 64 bool GetNotificationAllLines(std::vector<std::string>& allLines) const; 65 bool GetNotificationBigPicture(std::shared_ptr<Media::PixelMap>& bigPicture) const; 66 bool GetNotificationActionName(std::string& actionName) const; 67 bool GetNotificationUserInput(std::string& userInput) const; 68 bool GetBigIcon(std::shared_ptr<Media::PixelMap>& bigIcon) const; 69 bool GetOverlayIcon(std::shared_ptr<Media::PixelMap>& overlayIcon) const; 70 bool GetCommonLiveView(std::vector<uint8_t>& byteSequence) const; 71 bool GetFinishTime(int64_t& time) const; 72 bool GetAutoDeleteTime(int64_t& time) const; 73 }; 74 } // namespace Notification 75 } // namespace OHOS 76 #endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_TLV_BOX_H 77