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 SetMatchType(int32_t type); 37 bool SetLocalDeviceId(const std::string& deviceId); 38 bool SetResponseResult(int32_t result); 39 40 bool GetNotificationHashCode(std::string& hashCode) const; 41 bool GetOperationEventId(std::string& eventId) const; 42 bool GetActionName(std::string& actionName) const; 43 bool GetUserInput(std::string& userInput) const; 44 bool GetOperationType(int32_t& type) const; 45 bool GetMatchType(int32_t& type) const; 46 bool GetLocalDeviceId(std::string& deviceId) const; 47 bool GetResponseResult(int32_t& result) const; 48 }; 49 } // namespace Notification 50 } // namespace OHOS 51 #endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_TLV_BOX_H 52