![]() |
Paho C++
1.0
The Paho MQTT C++ Client Library
|
Holds the set of options that govern the Last Will and Testament feature. More...
#include <will_options.h>
Public Types | |
| using | ptr_t = std::shared_ptr< will_options > |
| Smart/shared pointer to this class. More... | |
| using | const_ptr_t = std::shared_ptr< const will_options > |
| Smart/shared pointer to a const object of this class. More... | |
Public Member Functions | |
| will_options () | |
| Constructs a new object using the default values. | |
| will_options (string_ref top, const void *payload, size_t payload_len, int qos=DFLT_QOS, bool retained=DFLT_RETAINED) | |
| Sets the "Last Will and Testament" (LWT) for the connection. More... | |
| will_options (const topic &top, const void *payload, size_t payload_len, int qos=DFLT_QOS, bool retained=DFLT_RETAINED) | |
| Sets the "Last Will and Testament" (LWT) for the connection. More... | |
| will_options (string_ref top, binary_ref payload, int qos=DFLT_QOS, bool retained=DFLT_RETAINED) | |
| Sets the "Last Will and Testament" (LWT) for the connection. More... | |
| will_options (string_ref top, const string &payload, int qos=DFLT_QOS, bool retained=DFLT_QOS) | |
| Sets the "Last Will and Testament" (LWT) for the connection. More... | |
| will_options (const message &msg) | |
| Sets the "Last Will and Testament" (LWT) for the connection. More... | |
| will_options (const will_options &opt) | |
| Copy constructor for the LWT options. More... | |
| will_options (will_options &&opt) | |
| Move constructor for the LWT options. More... | |
| will_options & | operator= (const will_options &opt) |
| Copy assignment for the LWT options. More... | |
| will_options & | operator= (will_options &&opt) |
| Move assignment for the LWT options. More... | |
| string | get_topic () const |
| Gets the LWT message topic name. More... | |
| const binary_ref & | get_payload () const |
| Gets the LWT message payload. More... | |
| string | get_payload_str () const |
| Gets the LWT message payload as a string. More... | |
| int | get_qos () const |
| Gets the QoS value for the LWT message. More... | |
| bool | is_retained () const |
| Gets the 'retained' flag for the LWT message. More... | |
| const_message_ptr | get_message () const |
| Gets the LWT message as a message object. More... | |
| void | set_topic (string_ref top) |
| Sets the LWT message topic name. More... | |
| void | set_payload (binary_ref msg) |
| Sets the LWT message text. More... | |
| void | set_payload (string msg) |
| Sets the LWT message text. More... | |
| void | set_qos (const int qos) |
| Sets the QoS value. More... | |
| void | set_retained (bool retained) |
| Sets the retained flag. More... | |
Friends | |
| class | connect_options |
| The connect options has special access. | |
| class | connect_options_test |
| class | will_options_test |
Holds the set of options that govern the Last Will and Testament feature.
| using mqtt::will_options::const_ptr_t = std::shared_ptr<const will_options> |
Smart/shared pointer to a const object of this class.
| using mqtt::will_options::ptr_t = std::shared_ptr<will_options> |
Smart/shared pointer to this class.
| mqtt::will_options::will_options | ( | string_ref | top, |
| const void * | payload, | ||
| size_t | payload_len, | ||
| int | qos = DFLT_QOS, |
||
| bool | retained = DFLT_RETAINED |
||
| ) |
Sets the "Last Will and Testament" (LWT) for the connection.
| top | The LWT message is published to the this topic. |
| payload | The message that is published to the Will Topic. |
| payload_len | The message size in bytes |
| qos | The message Quality of Service. |
| retained | Tell the broker to keep the LWT message after send to subscribers. |
| mqtt::will_options::will_options | ( | const topic & | top, |
| const void * | payload, | ||
| size_t | payload_len, | ||
| int | qos = DFLT_QOS, |
||
| bool | retained = DFLT_RETAINED |
||
| ) |
Sets the "Last Will and Testament" (LWT) for the connection.
| top | The LWT message is published to the this topic. |
| payload | The message that is published to the Will Topic. |
| payload_len | The message size in bytes. |
| qos | The message Quality of Service. |
| retained | Tell the broker to keep the LWT message after send to subscribers. |
| mqtt::will_options::will_options | ( | string_ref | top, |
| binary_ref | payload, | ||
| int | qos = DFLT_QOS, |
||
| bool | retained = DFLT_RETAINED |
||
| ) |
Sets the "Last Will and Testament" (LWT) for the connection.
| top | The LWT message is published to the this topic. |
| payload | The message payload that is published to the Will Topic. |
| qos | The message Quality of Service. |
| retained | Tell the broker to keep the LWT message after send to subscribers. |
| mqtt::will_options::will_options | ( | string_ref | top, |
| const string & | payload, | ||
| int | qos = DFLT_QOS, |
||
| bool | retained = DFLT_QOS |
||
| ) |
Sets the "Last Will and Testament" (LWT) for the connection.
| top | The LWT message is published to the this topic. |
| payload | The message payload that is published to the Will Topic, as a string. |
| qos | The message Quality of Service. |
| retained | Tell the broker to keep the LWT message after send to subscribers. |
| mqtt::will_options::will_options | ( | const message & | msg | ) |
Sets the "Last Will and Testament" (LWT) for the connection.
| msg | The message that is published to the Will Topic. |
| mqtt::will_options::will_options | ( | const will_options & | opt | ) |
Copy constructor for the LWT options.
| opt | The other options. |
| mqtt::will_options::will_options | ( | will_options && | opt | ) |
Move constructor for the LWT options.
| opt | The other options. |
|
inline |
Gets the LWT message as a message object.
|
inline |
Gets the LWT message payload.
|
inline |
Gets the LWT message payload as a string.
|
inline |
Gets the QoS value for the LWT message.
|
inline |
Gets the LWT message topic name.
|
inline |
Gets the 'retained' flag for the LWT message.
| will_options& mqtt::will_options::operator= | ( | const will_options & | opt | ) |
Copy assignment for the LWT options.
| opt | The other options. |
| will_options& mqtt::will_options::operator= | ( | will_options && | opt | ) |
Move assignment for the LWT options.
| opt | The other options. |
| void mqtt::will_options::set_payload | ( | binary_ref | msg | ) |
Sets the LWT message text.
| msg | The LWT message |
|
inline |
Sets the LWT message text.
| msg | The LWT message |
|
inline |
Sets the QoS value.
| qos | The LWT message QoS |
|
inline |
Sets the retained flag.
| retained | Tell the broker to keep the LWT message after send to subscribers. |
| void mqtt::will_options::set_topic | ( | string_ref | top | ) |
Sets the LWT message topic name.
| top | The topic where to sent the message |