DuxReiNummariae 1.0.0-alpha.23
Simple and powerful budgeting application
 
Loading...
Searching...
No Matches
drn::networking::ReplyNotifier Class Referencefinal

Monitors and notifies the status of a network request. More...

#include <ReplyNotifier.hpp>

Inheritance diagram for drn::networking::ReplyNotifier:
Collaboration diagram for drn::networking::ReplyNotifier:

Signals

void replyReceived (const pecunia::Expected< drn::networking::SuccessReply, drn::networking::FailureReply > &response)
 Emitted when the reply for a sent request is received.
 

Public Member Functions

 ReplyNotifier ()
 Fully initialises the object for use.
 
bool isFinished () const noexcept
 Checks if the notification of a reply for a sent network request is finished.
 
void notify (const pecunia::Expected< SuccessReply, FailureReply > &response)
 Notifies all listeners about the result of a network request.
 

Detailed Description

Monitors and notifies the status of a network request.

Constructor & Destructor Documentation

◆ ReplyNotifier()

drn::networking::ReplyNotifier::ReplyNotifier ( )

Fully initialises the object for use.

Member Function Documentation

◆ isFinished()

bool drn::networking::ReplyNotifier::isFinished ( ) const
nodiscardnoexcept

Checks if the notification of a reply for a sent network request is finished.

Returns
True if the reply is finished, otherwise false.

◆ notify()

void drn::networking::ReplyNotifier::notify ( const pecunia::Expected< SuccessReply, FailureReply > & response)

Notifies all listeners about the result of a network request.

Parameters
responseAn object containing the information of the reply.
Postcondition
The object is marked as finished. All subsequent invocations do nothing.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ replyReceived

void drn::networking::ReplyNotifier::replyReceived ( const pecunia::Expected< drn::networking::SuccessReply, drn::networking::FailureReply > & response)
signal

Emitted when the reply for a sent request is received.

Parameters
responseAn object containing the information of the reply.