SNode.C
Loading...
Searching...
No Matches
web::http::client::RequestCommand Class Referenceabstract

#include <RequestCommand.h>

Inheritance diagram for web::http::client::RequestCommand:
Collaboration diagram for web::http::client::RequestCommand:

Public Member Functions

 RequestCommand (const std::function< void(const std::shared_ptr< Request > &, const std::shared_ptr< Response > &)> &onResponseReceived, const std::function< void(const std::shared_ptr< Request > &, const std::string &)> &onResponseParseError)
 RequestCommand (const RequestCommand &)=delete
 RequestCommand (RequestCommand &&) noexcept=delete
RequestCommandoperator= (const RequestCommand &)=delete
RequestCommandoperator= (RequestCommand &&) noexcept=delete
virtual ~RequestCommand ()
virtual bool execute (const std::shared_ptr< MasterRequest > &request)=0
bool getError () const

Public Attributes

const std::function< void(const std::shared_ptr< Request > &, const std::shared_ptr< Response > &)> onResponseReceived
const std::function< void(const std::shared_ptr< Request > &, const std::string &)> onResponseParseError

Protected Attributes

bool error = false

Detailed Description

Definition at line 60 of file RequestCommand.h.

Constructor & Destructor Documentation

◆ RequestCommand() [1/3]

web::http::client::RequestCommand::RequestCommand ( const std::function< void(const std::shared_ptr< Request > &, const std::shared_ptr< Response > &)> & onResponseReceived,
const std::function< void(const std::shared_ptr< Request > &, const std::string &)> & onResponseParseError )

Definition at line 49 of file RequestCommand.cpp.

54 }
const std::function< void(const std::shared_ptr< Request > &, const std::shared_ptr< Response > &)> onResponseReceived
const std::function< void(const std::shared_ptr< Request > &, const std::string &)> onResponseParseError

References onResponseParseError, and onResponseReceived.

Referenced by web::http::client::commands::EndCommand::EndCommand(), web::http::client::commands::SendFileCommand::SendFileCommand(), web::http::client::commands::SendFragmentCommand::SendFragmentCommand(), web::http::client::commands::SendHeaderCommand::SendHeaderCommand(), web::http::client::commands::SseCommand::SseCommand(), and web::http::client::commands::UpgradeCommand::UpgradeCommand().

Here is the caller graph for this function:

◆ RequestCommand() [2/3]

web::http::client::RequestCommand::RequestCommand ( const RequestCommand & )
delete

◆ RequestCommand() [3/3]

web::http::client::RequestCommand::RequestCommand ( RequestCommand && )
deletenoexcept

◆ ~RequestCommand()

web::http::client::RequestCommand::~RequestCommand ( )
virtual

Definition at line 56 of file RequestCommand.cpp.

56 {
57 }

Member Function Documentation

◆ execute()

virtual bool web::http::client::RequestCommand::execute ( const std::shared_ptr< MasterRequest > & request)
pure virtual

◆ getError()

bool web::http::client::RequestCommand::getError ( ) const

Definition at line 59 of file RequestCommand.cpp.

59 {
60 return error;
61 }

References error.

Referenced by web::http::client::MasterRequest::initiate().

Here is the caller graph for this function:

◆ operator=() [1/2]

RequestCommand & web::http::client::RequestCommand::operator= ( const RequestCommand & )
delete

◆ operator=() [2/2]

RequestCommand & web::http::client::RequestCommand::operator= ( RequestCommand && )
deletenoexcept

Member Data Documentation

◆ error

bool web::http::client::RequestCommand::error = false
protected

◆ onResponseParseError

const std::function<void(const std::shared_ptr<Request>&, const std::string&)> web::http::client::RequestCommand::onResponseParseError

Definition at line 78 of file RequestCommand.h.

Referenced by web::http::client::MasterRequest::initiate(), and RequestCommand().

◆ onResponseReceived

const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&)> web::http::client::RequestCommand::onResponseReceived

Definition at line 77 of file RequestCommand.h.

Referenced by web::http::client::MasterRequest::initiate(), and RequestCommand().


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