SNode.C
Loading...
Searching...
No Matches
web::http::client::commands::UpgradeCommand Class Reference

#include <UpgradeCommand.h>

Inheritance diagram for web::http::client::commands::UpgradeCommand:
Collaboration diagram for web::http::client::commands::UpgradeCommand:

Public Member Functions

 UpgradeCommand (const std::string &url, const std::string &protocols, const std::function< void(bool)> &onUpgradeInitiate, 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)
 ~UpgradeCommand () override=default
bool execute (const std::shared_ptr< MasterRequest > &request) override
Public Member Functions inherited from 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)
 RequestCommand (const RequestCommand &)=delete
 RequestCommand (RequestCommand &&) noexcept=delete
RequestCommandoperator= (const RequestCommand &)=delete
RequestCommandoperator= (RequestCommand &&) noexcept=delete
virtual ~RequestCommand ()
bool getError () const

Private Attributes

std::string url
std::string protocols
const std::function< void(bool)> onUpgradeInitiate

Additional Inherited Members

Public Attributes inherited from web::http::client::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
Protected Attributes inherited from web::http::client::RequestCommand
bool error = false

Detailed Description

Definition at line 60 of file UpgradeCommand.h.

Constructor & Destructor Documentation

◆ UpgradeCommand()

web::http::client::commands::UpgradeCommand::UpgradeCommand ( const std::string & url,
const std::string & protocols,
const std::function< void(bool)> & onUpgradeInitiate,
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 52 of file UpgradeCommand.cpp.

58 : web::http::client::RequestCommand(onResponseReceived, onResponseParseError)
59 , url(url)
62 }
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
const std::function< void(bool)> onUpgradeInitiate

References onUpgradeInitiate, protocols, web::http::client::RequestCommand::RequestCommand(), and url.

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

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

◆ ~UpgradeCommand()

web::http::client::commands::UpgradeCommand::~UpgradeCommand ( )
overridedefault

Member Function Documentation

◆ execute()

bool web::http::client::commands::UpgradeCommand::execute ( const std::shared_ptr< MasterRequest > & request)
overridevirtual

Implements web::http::client::RequestCommand.

Definition at line 64 of file UpgradeCommand.cpp.

64 {
65 const bool ret = request->executeUpgrade(url, protocols, onUpgradeInitiate);
66
67 return ret;
68 }

References web::http::client::MasterRequest::executeUpgrade(), onUpgradeInitiate, protocols, and url.

Here is the call graph for this function:

Member Data Documentation

◆ onUpgradeInitiate

const std::function<void(bool)> web::http::client::commands::UpgradeCommand::onUpgradeInitiate
private

Definition at line 75 of file UpgradeCommand.h.

Referenced by execute(), and UpgradeCommand().

◆ protocols

std::string web::http::client::commands::UpgradeCommand::protocols
private

Definition at line 74 of file UpgradeCommand.h.

Referenced by execute(), and UpgradeCommand().

◆ url

std::string web::http::client::commands::UpgradeCommand::url
private

Definition at line 73 of file UpgradeCommand.h.

Referenced by execute(), and UpgradeCommand().


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