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_RESPONSE_BOX_H 17 #define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_RESPONSE_BOX_H 18 19 #include <string> 20 21 #include "box_base.h" 22 #include "tlv_box.h" 23 24 namespace OHOS { 25 namespace Notification { 26 class NotificationResponseBox : public BoxBase { 27 public: 28 NotificationResponseBox(); 29 NotificationResponseBox(std::shared_ptr<TlvBox> box); 30 bool SetMessageType(int32_t messageType); 31 bool SetNotificationHashCode(const std::string& hashCode); 32 bool SetOperationEventId(const std::string& eventId); 33 bool SetActionName(const std::string& actionName); 34 bool SetUserInput(const std::string& userInput); 35 bool SetOperationType(int32_t type); 36 bool SetOperationBtnIndex(const int32_t index); 37 bool SetOperationJumpType(const int32_t jumpType); 38 bool SetMatchType(int32_t type); 39 bool SetLocalDeviceId(const std::string& deviceId); 40 bool SetResponseResult(int32_t result); 41 42 bool GetNotificationHashCode(std::string& hashCode) const; 43 bool GetOperationEventId(std::string& eventId) const; 44 bool GetActionName(std::string& actionName) const; 45 bool GetUserInput(std::string& userInput) const; 46 bool GetOperationType(int32_t& type) const; 47 bool GetOperationBtnIndex(int32_t& index) const; 48 bool GetOperationJumpType(int32_t& jumpType) const; 49 bool GetMatchType(int32_t& type) const; 50 bool GetLocalDeviceId(std::string& deviceId) const; 51 bool GetResponseResult(int32_t& result) const; 52 }; 53 } // namespace Notification 54 } // namespace OHOS 55 #endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_TLV_BOX_H 56