Defines an interface for virtual file remote responses.
More...
#include <virtualfileresponseinterface.hpp>
|
virtual void | provideAsFileThroughHttp (int handle, const string &filepath)=0 |
| Provide requested file as existing file in filesystem through http protocol.
|
|
virtual void | provideAsHttpContent (int handle, const string &mime, const unsigned char *blob, size_t length)=0 |
| Provide requested file as inline content through http.
|
|
virtual void | provideAsRedirectUri (int handle, const string &uri)=0 |
| Provide requested file as HTTP redirect request.
|
|
virtual bool | provideFileDirectly (int handle, const string &uri, vector< char > &buffer, const unsigned int blockSize)=0 |
| Provide response as file contents through the connection adapters.
|
|
virtual | ~VirtualFileRemoteResponseInterface () |
| Virtual destructor.
|
|
Defines an interface for virtual file remote responses.
◆ ~VirtualFileRemoteResponseInterface()
virtual kanzi::connect::VirtualFileRemoteResponseInterface::~VirtualFileRemoteResponseInterface |
( |
| ) |
|
|
inlinevirtual |
◆ provideAsFileThroughHttp()
virtual void kanzi::connect::VirtualFileRemoteResponseInterface::provideAsFileThroughHttp |
( |
int | handle, |
|
|
const string & | filepath ) |
|
pure virtual |
Provide requested file as existing file in filesystem through http protocol.
- Parameters
-
handle | value provided in request |
filepath | full path to file to provide |
◆ provideAsHttpContent()
virtual void kanzi::connect::VirtualFileRemoteResponseInterface::provideAsHttpContent |
( |
int | handle, |
|
|
const string & | mime, |
|
|
const unsigned char * | blob, |
|
|
size_t | length ) |
|
pure virtual |
Provide requested file as inline content through http.
- Parameters
-
handle | value provided in request |
mime | mime type of the provided content |
blob | The content. |
length | size of the content in bytes. |
◆ provideAsRedirectUri()
virtual void kanzi::connect::VirtualFileRemoteResponseInterface::provideAsRedirectUri |
( |
int | handle, |
|
|
const string & | uri ) |
|
pure virtual |
Provide requested file as HTTP redirect request.
- Parameters
-
handle | value provided in request |
uri | unique resource identifier where to redirect the client. |
◆ provideFileDirectly()
virtual bool kanzi::connect::VirtualFileRemoteResponseInterface::provideFileDirectly |
( |
int | handle, |
|
|
const string & | uri, |
|
|
vector< char > & | buffer, |
|
|
const unsigned int | blockSize ) |
|
pure virtual |
Provide response as file contents through the connection adapters.
- Parameters
-
handle | The value provided in the request. |
uri | The file path to requested file. |
buffer | The data to provide. |
blockSize | Defines the size chunks in which to send the file contents. |
- Returns
- Indicates whether file transfer was initiated.
The documentation for this class was generated from the following file:
- virtualfile_service/virtualfileresponseinterface.hpp