mqtt_cpp
retain_t.hpp
Go to the documentation of this file.
1 // Copyright Takatoshi Kondo 2020
2 //
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 
7 #if !defined(MQTT_BROKER_RETAIN_T_HPP)
8 #define MQTT_BROKER_RETAIN_T_HPP
9 
10 #include <mqtt/config.hpp>
11 
12 #include <boost/asio/steady_timer.hpp>
13 
15 #include <mqtt/buffer.hpp>
18 
20 
21 struct session_state;
22 
23 // A collection of messages that have been retained in
24 // case clients add a new subscription to the associated topics.
25 struct retain_t {
27  buffer topic,
30  qos qos_value,
31  std::shared_ptr<as::steady_timer> tim_message_expiry = std::shared_ptr<as::steady_timer>())
37  { }
38 
43  std::shared_ptr<as::steady_timer> tim_message_expiry;
44 };
45 
47 
48 #endif // MQTT_BROKER_RETAIN_T_HPP
#define MQTT_BROKER_NS_END
Definition: broker_namespace.hpp:22
#define MQTT_BROKER_NS_BEGIN
Definition: broker_namespace.hpp:21
std::vector< property_variant > properties
Definition: property_variant.hpp:51
constexpr std::remove_reference_t< T > && force_move(T &&t)
Definition: move.hpp:20
qos
Definition: subscribe_options.hpp:34
const_buffer buffer(MQTT_NS::buffer const &data)
create boost::asio::const_buffer from the MQTT_NS::buffer boost::asio::const_buffer is a kind of view...
Definition: buffer.hpp:253
Definition: retain_t.hpp:25
retain_t(buffer topic, buffer contents, v5::properties props, qos qos_value, std::shared_ptr< as::steady_timer > tim_message_expiry=std::shared_ptr< as::steady_timer >())
Definition: retain_t.hpp:26
buffer contents
Definition: retain_t.hpp:40
qos qos_value
Definition: retain_t.hpp:42
buffer topic
Definition: retain_t.hpp:39
v5::properties props
Definition: retain_t.hpp:41
std::shared_ptr< as::steady_timer > tim_message_expiry
Definition: retain_t.hpp:43
Definition: session_state.hpp:53