SNode.C
Loading...
Searching...
No Matches
iot::mqtt::MqttContext Class Referenceabstract

#include <MqttContext.h>

Inheritance diagram for iot::mqtt::MqttContext:
Collaboration diagram for iot::mqtt::MqttContext:

Public Member Functions

 MqttContext (Mqtt *mqtt)
 
 MqttContext (const MqttContext &)=default
 
MqttContextoperator= (const MqttContext &)=default
 
virtual ~MqttContext ()
 
virtual std::size_t recv (char *chunk, std::size_t chunklen)=0
 
virtual void send (const char *chunk, std::size_t chunklen)=0
 
virtual core::socket::stream::SocketConnectiongetSocketConnection () const =0
 
virtual void end (bool fatal=false)=0
 
virtual void close ()=0
 
void onConnected ()
 
std::size_t onReceivedFromPeer ()
 
void onDisconnected ()
 
bool onSignal (int sig)
 

Protected Attributes

Mqttmqtt
 

Detailed Description

Definition at line 39 of file MqttContext.h.

Constructor & Destructor Documentation

◆ MqttContext() [1/2]

iot::mqtt::MqttContext::MqttContext ( Mqtt * mqtt)
explicit

Definition at line 30 of file MqttContext.cpp.

31 : mqtt(mqtt) {
32 mqtt->setMqttContext(this);
33 }
void setMqttContext(MqttContext *mqttContext)
Definition Mqtt.cpp:65

References mqtt, and iot::mqtt::Mqtt::setMqttContext().

Referenced by iot::mqtt::SocketContext::SocketContext().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MqttContext() [2/2]

iot::mqtt::MqttContext::MqttContext ( const MqttContext & )
default

◆ ~MqttContext()

iot::mqtt::MqttContext::~MqttContext ( )
virtual

Definition at line 35 of file MqttContext.cpp.

35 {
36 delete mqtt;
37 }

References mqtt.

Member Function Documentation

◆ close()

virtual void iot::mqtt::MqttContext::close ( )
pure virtual

◆ end()

virtual void iot::mqtt::MqttContext::end ( bool fatal = false)
pure virtual

◆ getSocketConnection()

virtual core::socket::stream::SocketConnection * iot::mqtt::MqttContext::getSocketConnection ( ) const
pure virtual

◆ onConnected()

void iot::mqtt::MqttContext::onConnected ( )

Definition at line 39 of file MqttContext.cpp.

39 {
41 }
virtual void onConnected()
Definition Mqtt.cpp:73

References mqtt, and iot::mqtt::Mqtt::onConnected().

Referenced by iot::mqtt::SocketContext::onConnected().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onDisconnected()

void iot::mqtt::MqttContext::onDisconnected ( )

Definition at line 47 of file MqttContext.cpp.

47 {
49 }
virtual void onDisconnected()
Definition Mqtt.cpp:144

References mqtt, and iot::mqtt::Mqtt::onDisconnected().

Referenced by iot::mqtt::SocketContext::onDisconnected().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onReceivedFromPeer()

std::size_t iot::mqtt::MqttContext::onReceivedFromPeer ( )

Definition at line 43 of file MqttContext.cpp.

43 {
44 return mqtt->onReceivedFromPeer();
45 }
std::size_t onReceivedFromPeer()
Definition Mqtt.cpp:77

References mqtt, and iot::mqtt::Mqtt::onReceivedFromPeer().

Referenced by iot::mqtt::SocketContext::onReceivedFromPeer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onSignal()

bool iot::mqtt::MqttContext::onSignal ( int sig)

Definition at line 51 of file MqttContext.cpp.

51 {
52 return mqtt->onSignal(sig);
53 }
virtual bool onSignal(int sig)=0

References mqtt, and iot::mqtt::Mqtt::onSignal().

Referenced by iot::mqtt::SocketContext::onSignal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

MqttContext & iot::mqtt::MqttContext::operator= ( const MqttContext & )
default

◆ recv()

virtual std::size_t iot::mqtt::MqttContext::recv ( char * chunk,
std::size_t chunklen )
pure virtual

◆ send()

virtual void iot::mqtt::MqttContext::send ( const char * chunk,
std::size_t chunklen )
pure virtual

Member Data Documentation

◆ mqtt

Mqtt* iot::mqtt::MqttContext::mqtt
protected

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