async_mqtt 5.0.0
Loading...
Searching...
No Matches
async_mqtt::topic_subopts Class Reference

subsscription entry More...

#include <topic_subopts.hpp>

Public Member Functions

 topic_subopts (buffer all_topic, sub::opts opts)
 constructor
 
buffer consttopic () const
 Get topic.
 
buffer constsharename () const
 Get sharename.
 
buffer constall_topic () const
 Get all_topic.
 
sub::opts constopts () const
 Get subscribe options.
 
 operator bool () const
 bool conversion
 

Friends

bool operator< (topic_subopts const &lhs, topic_subopts const &rhs)
 less than operator
 
bool operator== (topic_subopts const &lhs, topic_subopts const &rhs)
 equal operator
 

Detailed Description

subsscription entry

Constructor & Destructor Documentation

◆ topic_subopts()

async_mqtt::topic_subopts::topic_subopts ( buffer all_topic,
sub::opts opts )
inline

constructor

Parameters
all_topicTopicFilter. It could contain sharename on MQTT v5.0.
optssubscribe options

Member Function Documentation

◆ all_topic()

buffer const & async_mqtt::topic_subopts::all_topic ( ) const
inline

Get all_topic.

If sharename is contained, $share/ prefix is contained.

Returns
all_topic that is given to the constructor.

◆ operator bool()

async_mqtt::topic_subopts::operator bool ( ) const
inline

bool conversion

Returns
if topic is empty (invalid) then return false, otherwise true.

◆ opts()

sub::opts const & async_mqtt::topic_subopts::opts ( ) const
inline

Get subscribe options.

Returns
subscribe options

◆ sharename()

buffer const & async_mqtt::topic_subopts::sharename ( ) const
inline

Get sharename.

Returns
sharename. If no sharename then return empty size buffer.

◆ topic()

buffer const & async_mqtt::topic_subopts::topic ( ) const
inline

Get topic.

Returns
topic

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