VirtualFileLocalResponseInterface¶
-
class
kanzi::connect
::
VirtualFileLocalResponseInterface
¶ Defines an interface for local virtual file responses.
Subclassed by VirtualFileService
Public Functions
-
inline virtual
~VirtualFileLocalResponseInterface
()¶ Virtual destructor.
Provide response as a path to existing file.
- Parameters
workItem – where to store the data
filepath – full path to local file
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
Provide response as HTTP redirect.
- Parameters
workItem – where to store the data
redirectUri – Address where to redirect the client to.
-
virtual bool
provideFileDirectly
(const string &uri, vector<char> &buffer, const unsigned int blockSize) = 0¶ 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.
-
inline virtual