Low-Level C++ SDK  v1.2.0
Loading...
Searching...
No Matches
MiddlewareStatusListener Class Reference

Listens and notifies about middleware status changes. More...

#include <MiddlewareStatusListener.h>

Inheritance diagram for MiddlewareStatusListener:
[legend]

Public Member Functions

 MiddlewareStatusListener ()
 
virtual void OnMessageReceived (WeArtMessage *message) override
 Callback called when an accepted message is received.
 
void AddStatusCallback (std::function< void(MiddlewareStatusUpdate)> callback)
 Adds a callback notified on every new status update from the middleware.
 
MiddlewareStatusUpdate lastStatus ()
 Gets the last status received.
 
- Public Member Functions inherited from WeArtMessageListener
 WeArtMessageListener (std::set< std::string > ids)
 Basic message listener constructor.
 
bool accept (std::string id)
 Tells if a given ID can be processed by the listener.
 
virtual void OnMessageReceived (WeArtMessage *message)=0
 Callback called when an accepted message is received.
 

Additional Inherited Members

- Protected Attributes inherited from WeArtMessageListener
std::set< std::string > acceptedIds
 

Detailed Description

Listens and notifies about middleware status changes.

Constructor & Destructor Documentation

◆ MiddlewareStatusListener()

MiddlewareStatusListener::MiddlewareStatusListener ( )
inline

Member Function Documentation

◆ AddStatusCallback()

void MiddlewareStatusListener::AddStatusCallback ( std::function< void(MiddlewareStatusUpdate)>  callback)

Adds a callback notified on every new status update from the middleware.

Parameters
callbackMethod called when the sdk receives a status update from the middleware

◆ lastStatus()

MiddlewareStatusUpdate MiddlewareStatusListener::lastStatus ( )

Gets the last status received.

Returns
last status received

◆ OnMessageReceived()

void MiddlewareStatusListener::OnMessageReceived ( WeArtMessage *  message)
overridevirtual

Callback called when an accepted message is received.

Parameters
messageReceived message

Implements WeArtMessageListener.


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