DuxReiNummariae 1.1.0-alpha.19
Simple and powerful budgeting application
Loading...
Searching...
No Matches
drn::networking::RequestManager Class Referencefinal

Manages all network requests and handles their responses. More...

#include <RequestManager.hpp>

Inheritance diagram for drn::networking::RequestManager:
Collaboration diagram for drn::networking::RequestManager:

Public Member Functions

 RequestManager (const RequestManager &)=delete
 RequestManager (foundation::UniqueQtPtr< RequestSender > sender, const foundation::QtPtr<::QObject > &parent)
 Full initialisation constructor initializes the object with a given network request sender. It also sets up a cleanup timer to manage finished notifications, ensuring efficient resource management.
 RequestManager (RequestManager &&)=delete
 ~RequestManager () override
RequestManageroperator= (const RequestManager &)=delete
RequestManageroperator= (RequestManager &&)=delete
const std::map< RequestId, SentRequestReply > & replies () const noexcept
 Retrieves the map of all sent requests and their respective replies. Useful primarily in testing.
RequestSenderrequestSender () noexcept
 Provides access to the request sender used.
foundation::QtPtr< ReplyNotifiersend (const RequestBuilder &request) override
 Sends a network request and returns a notifier for the reply.
Public Member Functions inherited from drn::networking::NotifyingSender
 NotifyingSender ()=default
 NotifyingSender (const NotifyingSender &)=delete
 NotifyingSender (NotifyingSender &&)=default
virtual ~NotifyingSender ()=default
NotifyingSenderoperator= (const NotifyingSender &)=delete
NotifyingSenderoperator= (NotifyingSender &&)=default

Detailed Description

Manages all network requests and handles their responses.

Constructor & Destructor Documentation

◆ RequestManager() [1/3]

drn::networking::RequestManager::RequestManager ( foundation::UniqueQtPtr< RequestSender > sender,
const foundation::QtPtr<::QObject > & parent )
explicit

Full initialisation constructor initializes the object with a given network request sender. It also sets up a cleanup timer to manage finished notifications, ensuring efficient resource management.

Parameters
senderAn object responsible for sending network requests and responses.
parentThe parent used to manage the memory and lifecycle of this instance, and ensuring it follows the Qt object hierarchy.
Here is the caller graph for this function:

◆ RequestManager() [2/3]

drn::networking::RequestManager::RequestManager ( const RequestManager & )
delete
Here is the call graph for this function:

◆ RequestManager() [3/3]

drn::networking::RequestManager::RequestManager ( RequestManager && )
delete
Here is the call graph for this function:

◆ ~RequestManager()

drn::networking::RequestManager::~RequestManager ( )
override

Member Function Documentation

◆ operator=() [1/2]

RequestManager & drn::networking::RequestManager::operator= ( const RequestManager & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

RequestManager & drn::networking::RequestManager::operator= ( RequestManager && )
delete
Here is the call graph for this function:

◆ replies()

const std::map< RequestId, SentRequestReply > & drn::networking::RequestManager::replies ( ) const
nodiscardnoexcept

Retrieves the map of all sent requests and their respective replies. Useful primarily in testing.

Returns
The container of request IDs and their corresponding replies.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ requestSender()

RequestSender & drn::networking::RequestManager::requestSender ( )
nodiscardnoexcept

Provides access to the request sender used.

Returns
The object responsible for sending requests.

◆ send()

foundation::QtPtr< ReplyNotifier > drn::networking::RequestManager::send ( const RequestBuilder & request)
nodiscardoverridevirtual

Sends a network request and returns a notifier for the reply.

Exceptions
ReplyErrorWhen the request to be sent, cannot be sent.
Parameters
requestThe network request to be sent.
Returns
An object that will be notified about any status of the request.

Implements drn::networking::NotifyingSender.

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