VirtualFileRemoteResponseInterface¶
-
class
kanzi::connect
::
VirtualFileRemoteResponseInterface
¶ Defines an interface for virtual file remote responses.
Public Functions
-
~VirtualFileRemoteResponseInterface
()¶ Virtual destructor.
-
void
provideAsFileThroughHttp
(int handle, const string &filepath) = 0¶ Provide requested file as existing file in filesystem through http protocol.
- Parameters
handle
: value provided in requestfilepath
: full path to file to provide
-
void
provideAsHttpContent
(int handle, const string &mime, const unsigned char *blob, size_t length) = 0¶ Provide requested file as inline content through http.
- Parameters
handle
: value provided in requestmime
: mime type of the provided contentblob
: The content.length
: size of the content in bytes.
-
void
provideAsRedirectUri
(int handle, const string &uri) = 0¶ Provide requested file as HTTP redirect request.
- Parameters
handle
: value provided in requesturi
: unique resource identifier where to redirect the client.
-
bool
provideFileDirectly
(int handle, const string &uri, vector<char> &buffer, const unsigned int blockSize) = 0¶ Provide response as file contents through the connection adapters.
- Return
Indicates whether file transfer was initiated.
- 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.
-