33 return m_name == other.m_name && m_value == other.m_value;
56 const aws_mqtt5_packet_publish_view &raw_options,
129 PublishPacket &WithMessageExpiryIntervalSec(uint32_t second) noexcept;
204 bool initializeRawOptions(aws_mqtt5_packet_publish_view &raw_options) noexcept;
214 const
ByteCursor &getPayload() const noexcept;
225 Mqtt5::
QOS getQOS() const noexcept;
236 bool getRetain() const noexcept;
246 const Crt::
String &getTopic() const noexcept;
273 const Crt::
Optional<uint32_t> &getMessageExpiryIntervalSec() const noexcept;
285 const Crt::
Optional<uint16_t> &getTopicAlias() const noexcept;
319 const Crt::
Vector<uint32_t> &getSubscriptionIdentifiers() const noexcept;
341 PublishPacket(const PublishPacket &) = delete;
342 PublishPacket(PublishPacket &&) noexcept = delete;
343 PublishPacket &operator=(const PublishPacket &) = delete;
344 PublishPacket &operator=(PublishPacket &&) noexcept = delete;
405 Crt::
Optional<uint32_t> m_messageExpiryIntervalSec;
415 Crt::
Optional<uint16_t> m_topicAlias;
455 Crt::
Vector<uint32_t> m_subscriptionIdentifiers;
469 ByteBuf m_correlationDataStorage;
470 Crt::
String m_responseTopicString;
471 struct aws_mqtt5_user_property *m_userPropertiesStorage;
491 const aws_mqtt5_negotiated_settings &negotiated_settings,
503 uint32_t getSessionExpiryIntervalSec()
const noexcept;
509 uint16_t getReceiveMaximumFromServer()
const noexcept;
517 uint32_t getMaximumPacketSizeBytes()
const noexcept;
522 uint32_t getMaximumPacketSizeToServer()
const noexcept;
527 uint16_t getTopicAliasMaximumToServer()
const noexcept;
532 uint16_t getTopicAliasMaximumToClient()
const noexcept;
541 uint16_t getServerKeepAliveSec()
const noexcept;
552 uint16_t getServerKeepAlive()
const noexcept;
557 bool getRetainAvailable()
const noexcept;
562 bool getWildcardSubscriptionsAvailable()
const noexcept;
567 bool getSubscriptionIdentifiersAvailable()
const noexcept;
572 bool getSharedSubscriptionsAvailable()
const noexcept;
577 bool getRejoinedSession()
const noexcept;
590 NegotiatedSettings(
const NegotiatedSettings &) =
delete;
591 NegotiatedSettings(NegotiatedSettings &&) noexcept = delete;
592 NegotiatedSettings &operator=(const NegotiatedSettings &) = delete;
593 NegotiatedSettings &operator=(NegotiatedSettings &&) noexcept = delete;
599 Mqtt5::
QOS m_maximumQOS;
604 uint32_t m_sessionExpiryIntervalSec;
609 uint16_t m_receiveMaximumFromServer;
614 uint32_t m_maximumPacketSizeBytes;
619 uint16_t m_topicAliasMaximumToServer;
624 uint16_t m_topicAliasMaximumToClient;
631 uint16_t m_serverKeepAliveSec;
636 bool m_retainAvailable;
641 bool m_wildcardSubscriptionsAvailable;
646 bool m_subscriptionIdentifiersAvailable;
651 bool m_sharedSubscriptionsAvailable;
656 bool m_rejoinedSession;
698 ConnectPacket &WithKeepAliveIntervalSec(uint16_t keepAliveInteralSeconds) noexcept;
751 ConnectPacket &WithSessionExpiryIntervalSec(uint32_t sessionExpiryIntervalSeconds) noexcept;
765 ConnectPacket &WithRequestResponseInformation(
bool requestResponseInformation) noexcept;
779 ConnectPacket &WithRequestProblemInformation(
bool requestProblemInformation) noexcept;
792 ConnectPacket &WithReceiveMaximum(uint16_t receiveMaximum) noexcept;
804 ConnectPacket &WithMaximumPacketSizeBytes(uint32_t maximumPacketSizeBytes) noexcept;
819 ConnectPacket &WithWillDelayIntervalSec(uint32_t willDelayIntervalSeconds) noexcept;
832 ConnectPacket &WithWill(std::shared_ptr<PublishPacket> will) noexcept;
884 uint16_t getKeepAliveIntervalSec() const noexcept;
898 const Crt::
String &getClientId() const noexcept;
932 const Crt::
Optional<uint32_t> &getSessionExpiryIntervalSec() const noexcept;
944 const Crt::
Optional<
bool> &getRequestResponseInformation() const noexcept;
956 const Crt::
Optional<
bool> &getRequestProblemInformation() const noexcept;
967 const Crt::
Optional<uint16_t> &getReceiveMaximum() const noexcept;
980 const Crt::
Optional<uint32_t> &getMaximumPacketSizeBytes() const noexcept;
991 const Crt::
Optional<uint32_t> &getMaximumPacketSizeToServer() const noexcept;
1005 const Crt::
Optional<uint32_t> &getWillDelayIntervalSec() const noexcept;
1017 const Crt::
Optional<
std::shared_ptr<PublishPacket>> &getWill() const noexcept;
1037 bool initializeRawOptions(aws_mqtt5_packet_connect_view &raw_options,
Allocator *allocator) noexcept;
1040 ConnectPacket(const ConnectPacket &) = delete;
1041 ConnectPacket(ConnectPacket &&) noexcept = delete;
1042 ConnectPacket &operator=(const ConnectPacket &) = delete;
1043 ConnectPacket &operator=(ConnectPacket &&) noexcept = delete;
1058 uint16_t m_keepAliveIntervalSec;
1097 Crt::
Optional<uint32_t> m_sessionExpiryIntervalSec;
1107 Crt::
Optional<
bool> m_requestResponseInformation;
1116 Crt::
Optional<
bool> m_requestProblemInformation;
1125 Crt::
Optional<uint16_t> m_receiveMaximum;
1134 Crt::
Optional<uint32_t> m_maximumPacketSizeBytes;
1145 Crt::
Optional<uint32_t> m_willDelayIntervalSeconds;
1154 Crt::
Optional<
std::shared_ptr<PublishPacket>> m_will;
1167 struct aws_byte_cursor m_usernameCursor;
1168 struct aws_byte_buf m_passowrdStorage;
1169 struct aws_mqtt5_packet_publish_view m_willStorage;
1170 struct aws_mqtt5_user_property *m_userPropertiesStorage;
1171 uint8_t m_requestResponseInformationStorage;
1172 uint8_t m_requestProblemInformationStorage;
1183 const aws_mqtt5_packet_connack_view &packet,
1197 bool getSessionPresent() const noexcept;
1219 const Crt::
Optional<uint32_t> &getSessionExpiryIntervalSec() const noexcept;
1233 const Crt::
Optional<uint32_t> &getSessionExpiryInterval() const noexcept;
1245 const Crt::
Optional<uint16_t> &getReceiveMaximum() const noexcept;
1255 const Crt::
Optional<
QOS> &getMaximumQOS() const noexcept;
1266 const Crt::
Optional<
bool> &getRetainAvailable() const noexcept;
1277 const Crt::
Optional<uint32_t> &getMaximumPacketSize() const noexcept;
1288 const Crt::
Optional<
String> &getAssignedClientIdentifier() const noexcept;
1298 const Crt::
Optional<uint16_t> getTopicAliasMaximum() const noexcept;
1329 const Crt::
Optional<
bool> &getWildcardSubscriptionsAvailable() const noexcept;
1340 const Crt::
Optional<
bool> &getSubscriptionIdentifiersAvailable() const noexcept;
1351 const Crt::
Optional<
bool> &getSharedSubscriptionsAvailable() const noexcept;
1362 const Crt::
Optional<uint16_t> &getServerKeepAliveSec() const noexcept;
1374 const Crt::
Optional<uint16_t> &getServerKeepAlive() const noexcept;
1385 const Crt::
Optional<
String> &getResponseInformation() const noexcept;
1398 const Crt::
Optional<
String> &getServerReference() const noexcept;
1413 bool m_sessionPresent;
1430 Crt::
Optional<uint32_t> m_sessionExpiryIntervalSec;
1439 Crt::
Optional<uint16_t> m_receiveMaximum;
1455 Crt::
Optional<
bool> m_retainAvailable;
1464 Crt::
Optional<uint32_t> m_maximumPacketSize;
1481 Crt::
Optional<uint16_t> m_topicAliasMaximum;
1498 Crt::
Optional<
bool> m_wildcardSubscriptionsAvailable;
1507 Crt::
Optional<
bool> m_subscriptionIdentifiersAvailable;
1516 Crt::
Optional<
bool> m_sharedSubscriptionsAvailable;
1525 Crt::
Optional<uint16_t> m_serverKeepAliveSec;
1564 const aws_mqtt5_packet_disconnect_view &raw_options,
1569 bool initializeRawOptions(aws_mqtt5_packet_disconnect_view &raw_options) noexcept;
1593 DisconnectPacket &WithSessionExpiryIntervalSec(
const uint32_t sessionExpiryIntervalSeconds) noexcept;
1675 const Crt::
Optional<uint32_t> &getSessionExpiryIntervalSec() const noexcept;
1685 const Crt::
Optional<Crt::
String> &getReasonString() const noexcept;
1698 const Crt::
Optional<Crt::
String> &getServerReference() const noexcept;
1711 DisconnectPacket(const DisconnectPacket &) = delete;
1712 DisconnectPacket(DisconnectPacket &&) noexcept = delete;
1713 DisconnectPacket &operator=(const DisconnectPacket &) = delete;
1714 DisconnectPacket &operator=(DisconnectPacket &&) noexcept = delete;
1735 Crt::
Optional<uint32_t> m_sessionExpiryIntervalSec;
1766 struct aws_byte_cursor m_reasonStringCursor;
1767 struct aws_byte_cursor m_serverReferenceCursor;
1768 struct aws_mqtt5_user_property *m_userPropertiesStorage;
1779 const aws_mqtt5_packet_puback_view &packet,
1802 const Crt::
Optional<Crt::
String> &getReasonString() const noexcept;
1856 PublishResult(std::shared_ptr<PubAckPacket> puback);
1857 PublishResult(
int errorCode);
1879 std::shared_ptr<IPacket>
getAck()
const {
return m_ack; };
1881 ~PublishResult() noexcept;
1882 PublishResult(const PublishResult &toCopy) noexcept = delete;
1883 PublishResult(PublishResult &&toMove) noexcept = delete;
1884 PublishResult &operator=(const PublishResult &toCopy) noexcept = delete;
1885 PublishResult &operator=(PublishResult &&toMove) noexcept = delete;
1888 std::shared_ptr<IPacket> m_ack;
1914 Subscription &WithTopicFilter(
Crt::String topicFilter) noexcept;
1938 Subscription &WithNoLocal(
bool noLocal) noexcept;
1950 Subscription &WithRetainAsPublished(
bool retain) noexcept;
1964 Subscription &WithRetain(
bool retain) noexcept;
1976 Subscription &WithRetainHandlingType(
RetainHandlingType retainHandlingType) noexcept;
1978 bool initializeRawOptions(aws_mqtt5_subscription_view &raw_options)
const noexcept;
1981 Subscription(
const Subscription &) noexcept;
1982 Subscription(Subscription &&) noexcept;
1983 Subscription &operator=(const Subscription &) noexcept;
1984 Subscription &operator=(Subscription &&) noexcept;
1995 Crt::
String m_topicFilter;
2021 bool m_retainAsPublished;
2088 SubscribePacket &WithSubscriptionIdentifier(uint32_t subscriptionIdentifier) noexcept;
2115 SubscribePacket &WithSubscription(Subscription &&subscription) noexcept;
2117 bool initializeRawOptions(aws_mqtt5_packet_subscribe_view &raw_options) noexcept;
2120 SubscribePacket(const SubscribePacket &) noexcept = delete;
2121 SubscribePacket(SubscribePacket &&) noexcept = delete;
2122 SubscribePacket &operator=(const SubscribePacket &) noexcept = delete;
2123 SubscribePacket &operator=(SubscribePacket &&) noexcept = delete;
2134 Crt::
Vector<Subscription> m_subscriptions;
2143 Crt::
Optional<uint32_t> m_subscriptionIdentifier;
2156 struct aws_mqtt5_subscription_view *m_subscriptionViewStorage;
2157 struct aws_mqtt5_user_property *m_userPropertiesStorage;
2168 const aws_mqtt5_packet_suback_view &packet,
2302 bool initializeRawOptions(aws_mqtt5_packet_unsubscribe_view &raw_options) noexcept;
2305 UnsubscribePacket(const UnsubscribePacket &) noexcept = delete;
2306 UnsubscribePacket(UnsubscribePacket &&) noexcept = delete;
2307 UnsubscribePacket &operator=(const UnsubscribePacket &) noexcept = delete;
2308 UnsubscribePacket &operator=(UnsubscribePacket &&) noexcept = delete;
2332 struct aws_array_list m_topicFiltersList;
2333 struct aws_mqtt5_user_property *m_userPropertiesStorage;
2344 const aws_mqtt5_packet_unsuback_view &packet,
virtual ~NegotiatedSettings()
Definition: Mqtt5Packets.h:589
virtual ~Subscription()
Definition: Mqtt5Packets.h:1980
Definition: Mqtt5Packets.h:2164
PacketType getType() override
Definition: Mqtt5Packets.h:2043
aws_mqtt5_qos QOS
Definition: Mqtt5Types.h:29
aws_mqtt5_retain_handling_type RetainHandlingType
Definition: Mqtt5Types.h:278
PacketType getType() override
Definition: Mqtt5Packets.h:2249
const Crt::String & getValue() const noexcept
Definition: Mqtt5Packets.h:29
aws_mqtt5_disconnect_reason_code DisconnectReasonCode
Definition: Mqtt5Types.h:107
Definition: Mqtt5Packets.h:1852
aws_mqtt5_unsuback_reason_code UnSubAckReasonCode
Definition: Mqtt5Types.h:169
aws_mqtt5_connect_reason_code ConnectReasonCode
Definition: Mqtt5Types.h:65
PacketType getType() override
Definition: Mqtt5Packets.h:2172
Definition: Mqtt5Packets.h:1179
#define AWS_CRT_CPP_API
Definition: Exports.h:36
Definition: Mqtt5Packets.h:2037
int getErrorCode() const
Definition: Mqtt5Packets.h:1871
bool wasSuccessful() const
Definition: Mqtt5Packets.h:1864
PacketType getType() override
Definition: Mqtt5Packets.h:1567
PacketType getType() override
Definition: Mqtt5Packets.h:2348
Definition: Mqtt5Packets.h:671
const Crt::String & getName() const noexcept
Definition: Mqtt5Packets.h:28
Definition: StringView.h:861
aws_byte_buf ByteBuf
Definition: Types.h:30
std::basic_string< char, std::char_traits< char >, StlAllocator< char >> String
Definition: Types.h:45
Definition: Mqtt5Packets.h:22
std::shared_ptr< IPacket > getAck() const
Definition: Mqtt5Packets.h:1879
aws_allocator Allocator
Definition: Allocator.h:14
aws_byte_cursor ByteCursor
Definition: Types.h:31
Definition: Mqtt5Packets.h:1559
Definition: Mqtt5Packets.h:2340
Definition: Mqtt5Packets.h:1898
Definition: Mqtt5Packets.h:2243
AWS_CRT_CPP_API Allocator * ApiAllocator() noexcept
Definition: Allocator.cpp:24
Definition: Optional.h:18
Definition: Mqtt5Packets.h:1775
PacketType getType() override
Definition: Mqtt5Packets.h:1782
Definition: Mqtt5Packets.h:41
Definition: Mqtt5Packets.h:487
std::vector< T, StlAllocator< T >> Vector
Definition: Types.h:53
aws_mqtt5_puback_reason_code PubAckReasonCode
Definition: Mqtt5Types.h:127
PacketType getType() override
Definition: Mqtt5Packets.h:1187
aws_mqtt5_suback_reason_code SubAckReasonCode
Definition: Mqtt5Types.h:148
aws_mqtt5_payload_format_indicator PayloadFormatIndicator
Definition: Mqtt5Types.h:259
PacketType getType() override
Definition: Mqtt5Packets.h:678
PacketType getType() override
Definition: Mqtt5Packets.h:64
bool operator==(const UserProperty &other) const
Definition: Mqtt5Packets.h:31
Definition: Mqtt5Packets.h:52
aws_mqtt5_packet_type PacketType
Definition: Mqtt5Types.h:308
Definition: Allocator.h:10