26 #ifndef __mqtt_will_options_h 27 #define __mqtt_will_options_h 29 #include "MQTTAsync.h" 37 class connect_options;
62 MQTTAsync_willOptions opts_;
94 return sr ? sr.
to_string().c_str() :
nullptr;
99 using ptr_t = std::shared_ptr<will_options>;
189 #if defined(UNIT_TESTS) 190 const MQTTAsync_willOptions& c_struct()
const {
return opts_; }
243 void set_qos(
const int qos) { opts_.qos = qos; }
280 #endif // __mqtt_will_options_h message::const_ptr_t const_message_ptr
Definition: message.h:368
const properties & get_properties() const
Definition: will_options.h:254
will_options::unique_ptr_t will_options_unique_ptr
Definition: will_options.h:274
buffer_ref< char > binary_ref
Definition: buffer_ref.h:298
bool to_bool(int n)
Definition: types.h:161
std::string string
Definition: types.h:40
void set_payload(string msg)
Definition: will_options.h:238
string get_topic() const
Definition: will_options.h:196
static PAHO_MQTTPP_EXPORT const bool DFLT_RETAINED
Definition: will_options.h:55
int get_qos() const
Definition: will_options.h:211
const blob & to_string() const
Definition: buffer_ref.h:251
Definition: connect_options.h:48
string get_payload_str() const
Definition: will_options.h:206
void set_topic(string_ref top)
will_options::const_ptr_t const_will_options_ptr
Definition: will_options.h:271
void set_retained(bool retained)
Definition: will_options.h:249
const_message_ptr get_message() const
Definition: will_options.h:221
static ptr_t create(string_ref topic, const void *payload, size_t len, int qos, bool retained, const properties &props=properties())
Definition: message.h:168
Definition: properties.h:255
std::unique_ptr< will_options > unique_ptr_t
Definition: will_options.h:103
std::shared_ptr< const will_options > const_ptr_t
Definition: will_options.h:101
void set_properties(const properties &props)
Definition: will_options.h:259
bool is_retained() const
Definition: will_options.h:216
#define PAHO_MQTTPP_EXPORT
Definition: export.h:40
std::shared_ptr< will_options > ptr_t
Definition: will_options.h:99
void set_properties(properties &&props)
Definition: will_options.h:264
will_options & operator=(const will_options &opt)
int to_int(bool b)
Definition: types.h:167
Definition: async_client.h:49
static PAHO_MQTTPP_EXPORT const int DFLT_QOS
Definition: will_options.h:53
will_options::ptr_t will_options_ptr
Definition: will_options.h:268
Definition: will_options.h:49
void set_payload(binary_ref msg)
void set_qos(const int qos)
Definition: will_options.h:243
const binary_ref & get_payload() const
Definition: will_options.h:201