Prusa MINI Firmware overview
IResponse Class Referenceabstract

#include <lwsapi_app.hpp>

Inheritance diagram for IResponse:
Collaboration diagram for IResponse:

Public Types

typedef std::unique_ptr< IResponseunique_ptr_t
 

Public Member Functions

 IResponse (const IResponse &)=delete
 
 IResponse ()
 
virtual Message_t generator (const struct pbuf *input=nullptr)=0
 WSAPI generator (called more time from WSAPI http server). More...
 
- Public Member Functions inherited from LwIPClass
virtual ~LwIPClass ()
 

Additional Inherited Members

- Static Public Member Functions inherited from LwIPClass
static voidoperator new (size_t size)
 
static void operator delete (void *ptr)
 

Member Typedef Documentation

◆ unique_ptr_t

typedef std::unique_ptr<IResponse> IResponse::unique_ptr_t

Constructor & Destructor Documentation

◆ IResponse() [1/2]

IResponse::IResponse ( const IResponse )
delete

◆ IResponse() [2/2]

IResponse::IResponse ( )
221 {}

Member Function Documentation

◆ generator()

virtual Message_t IResponse::generator ( const struct pbuf input = nullptr)
pure virtual

WSAPI generator (called more time from WSAPI http server).

This is generator method must iterative return response content.

Parameters
inputis LwIP input buffer chain.
Returns
Message contains response, headers, payload and length. If length is EOF, all data was sent. Response must be set in first time, headers second time and payload could be send moretimes. When response or headers in message exists, that will be send. All data in message must exists to next generator call!

Implemented in WaitResponse, BufferResponse, and FileResponse.