Defines an interface for local virtual file responses.
More...
#include <virtualfileresponseinterface.hpp>
Defines an interface for local virtual file responses.
◆ ~VirtualFileLocalResponseInterface()
| virtual kanzi::connect::VirtualFileLocalResponseInterface::~VirtualFileLocalResponseInterface |
( |
| ) |
|
|
inlinevirtual |
◆ provideAsFileThroughHttp()
| virtual void kanzi::connect::VirtualFileLocalResponseInterface::provideAsFileThroughHttp |
( |
VirtualFileWorkItemSharedPtr |
workItem, |
|
|
const string & |
filepath |
|
) |
| |
|
pure virtual |
Provide response as a path to existing file.
- Parameters
-
| workItem | where to store the data |
| filepath | full path to local file |
Implemented in kanzi::connect::VirtualFileService.
◆ provideAsHttpContent()
| virtual void kanzi::connect::VirtualFileLocalResponseInterface::provideAsHttpContent |
( |
VirtualFileWorkItemSharedPtr |
workItem, |
|
|
const string & |
mime, |
|
|
const unsigned char * |
blob, |
|
|
size_t |
length |
|
) |
| |
|
pure virtual |
Provide requested file as inline content through HTTP.
- Parameters
-
| workItem | where to store the data |
| mime | mime type of the data |
| blob | binary data buffer |
| length | size of binary data buffer |
Implemented in kanzi::connect::VirtualFileService.
◆ provideAsRedirectUri()
| virtual void kanzi::connect::VirtualFileLocalResponseInterface::provideAsRedirectUri |
( |
VirtualFileWorkItemSharedPtr |
workItem, |
|
|
const string & |
redirecturi |
|
) |
| |
|
pure virtual |
Provide response as HTTP redirect.
- Parameters
-
| workItem | where to store the data |
| redirectUri | Address where to redirect the client to. |
Implemented in kanzi::connect::VirtualFileService.
◆ provideFileDirectly()
| virtual bool kanzi::connect::VirtualFileLocalResponseInterface::provideFileDirectly |
( |
const string & |
uri, |
|
|
vector< char > & |
buffer, |
|
|
const unsigned int |
blockSize |
|
) |
| |
|
pure virtual |
Provide response as file contents through the connection adapters.
- Parameters
-
| uri | Identifies the file |
| buffer | The data to provide |
| blockSize | Defines in what size chunks to send the file contents |
- Returns
- bool indicating whether file transfer was initiated.
Implemented in kanzi::connect::VirtualFileService.
The documentation for this class was generated from the following file:
- virtualfile_service/virtualfileresponseinterface.hpp