Loading...
Searching...
No Matches
mqtt::iaction_listener Class Referenceabstract

`#include <iaction_listener.h>`

## Public Types

using | ptr_t = std::shared_ptr<iaction_listener>
using | const_ptr_t = std::shared_ptr<const iaction_listener>

## Public Member Functions

virtual | ~iaction_listener ()
virtual void | on_failure (const token &asyncActionToken)=0
virtual void | on_success (const token &asyncActionToken)=0

## Detailed Description

Provides a mechanism for tracking the completion of an asynchronous action.

A listener is registered on a token and that token is associated with an action like connect or publish. When used with tokens on the async_client the listener will be called back on the MQTT client's thread. The listener will be informed if the action succeeds or fails. It is important that the listener returns control quickly otherwise the operation of the MQTT client will be stalled.

## Member Typedef Documentation

## ptr_t

using mqtt::iaction_listener::ptr_t = std::shared_ptr<iaction_listener>

Smart/shared pointer to an object of this class.

## const_ptr_t

using mqtt::iaction_listener::const_ptr_t = std::shared_ptr<const iaction_listener>

Smart/shared pointer to a const object of this class.

## Constructor & Destructor Documentation

## ~iaction_listener()

virtual mqtt::iaction_listener::~iaction_listener | ( |  | ) |

inline virtual

Virtual base destructor.

## Member Function Documentation

## on_failure()

virtual void mqtt::iaction_listener::on_failure | ( | const token & | asyncActionToken | ) |

pure virtual

This method is invoked when an action fails.

Parameters

  asyncActionToken | The token

## on_success()

virtual void mqtt::iaction_listener::on_success | ( | const token & | asyncActionToken | ) |

pure virtual

This method is invoked when an action has completed successfully.

Parameters

  asyncActionToken | The token

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

- iaction_listener.h