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

#include <SendFileCommand.h>

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

Public Member Functions

 SendFileCommand (const std::string &file, const std::function< void(int)> &onStatus)
 
 ~SendFileCommand () override=default
 
bool execute (Request *request) override
 
- Public Member Functions inherited from web::http::client::RequestCommand
 RequestCommand ()=default
 
 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 file
 
std::function< void(int errnum)> onStatus
 

Additional Inherited Members

- Protected Attributes inherited from web::http::client::RequestCommand
bool error = false
 

Detailed Description

Definition at line 34 of file SendFileCommand.h.

Constructor & Destructor Documentation

◆ SendFileCommand()

web::http::client::commands::SendFileCommand::SendFileCommand ( const std::string & file,
const std::function< void(int)> & onStatus )

Definition at line 30 of file SendFileCommand.cpp.

◆ ~SendFileCommand()

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

Member Function Documentation

◆ execute()

bool web::http::client::commands::SendFileCommand::execute ( Request * request)
overridevirtual

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

Definition at line 35 of file SendFileCommand.cpp.

35 {
36 return error = request->executeSendFile(file, onStatus);
37 }

Member Data Documentation

◆ file

std::string web::http::client::commands::SendFileCommand::file
private

Definition at line 43 of file SendFileCommand.h.

◆ onStatus

std::function<void(int errnum)> web::http::client::commands::SendFileCommand::onStatus
private

Definition at line 44 of file SendFileCommand.h.


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