AWS IoT Device SDK C++ v2  1.34.0
AWS IoT Device SDK C++ v2
Public Member Functions | List of all members
Aws::Crt::Mqtt5::PublishResult Class Reference

#include <Mqtt5Packets.h>

Public Member Functions

 PublishResult ()
 
 PublishResult (std::shared_ptr< PubAckPacket > puback)
 
 PublishResult (int errorCode)
 
bool wasSuccessful () const
 
int getErrorCode () const
 
std::shared_ptr< IPacketgetAck () const
 
 ~PublishResult () noexcept
 
 PublishResult (const PublishResult &toCopy) noexcept=delete
 
 PublishResult (PublishResult &&toMove) noexcept=delete
 
PublishResultoperator= (const PublishResult &toCopy) noexcept=delete
 
PublishResultoperator= (PublishResult &&toMove) noexcept=delete
 

Detailed Description

PublishResult returned with onPublishCompletionCallback after Publish get called

Publish with QoS0: Ack will be nullptr QoS1: Ack will contains a PubAckPacket

Constructor & Destructor Documentation

◆ PublishResult() [1/5]

Aws::Crt::Mqtt5::PublishResult::PublishResult ( )

◆ PublishResult() [2/5]

Aws::Crt::Mqtt5::PublishResult::PublishResult ( std::shared_ptr< PubAckPacket puback)

◆ PublishResult() [3/5]

Aws::Crt::Mqtt5::PublishResult::PublishResult ( int  errorCode)

◆ ~PublishResult()

Aws::Crt::Mqtt5::PublishResult::~PublishResult ( )
noexcept

◆ PublishResult() [4/5]

Aws::Crt::Mqtt5::PublishResult::PublishResult ( const PublishResult toCopy)
deletenoexcept

◆ PublishResult() [5/5]

Aws::Crt::Mqtt5::PublishResult::PublishResult ( PublishResult &&  toMove)
deletenoexcept

Member Function Documentation

◆ getAck()

std::shared_ptr<IPacket> Aws::Crt::Mqtt5::PublishResult::getAck ( ) const
inline

Get Publish ack packet

Returns
std::shared_ptr<IPacket> contains a PubAckPacket if client Publish with QoS1, otherwise nullptr.

◆ getErrorCode()

int Aws::Crt::Mqtt5::PublishResult::getErrorCode ( ) const
inline

Get the error code value

Returns
the error code

◆ operator=() [1/2]

PublishResult& Aws::Crt::Mqtt5::PublishResult::operator= ( const PublishResult toCopy)
deletenoexcept

◆ operator=() [2/2]

PublishResult& Aws::Crt::Mqtt5::PublishResult::operator= ( PublishResult &&  toMove)
deletenoexcept

◆ wasSuccessful()

bool Aws::Crt::Mqtt5::PublishResult::wasSuccessful ( ) const
inline

Get if the publish succeed or not

Returns
true if error code == 0 and publish succeed

The documentation for this class was generated from the following files: