Kanzi Connect  1.1.10
Kanzi Connect C++ API
kanzi::connect::VirtualFileLocalResponseInterface Class Referenceabstract

Defines an interface for local virtual file responses. More...

#include <virtualfileresponseinterface.hpp>

Inheritance diagram for kanzi::connect::VirtualFileLocalResponseInterface:
kanzi::connect::VirtualFileService

Public Member Functions

virtual void provideAsFileThroughHttp (VirtualFileWorkItemSharedPtr workItem, const string &filepath)=0
 Provide response as a path to existing file. More...
 
virtual void provideAsHttpContent (VirtualFileWorkItemSharedPtr workItem, const string &mime, const unsigned char *blob, size_t length)=0
 Provide requested file as inline content through HTTP. More...
 
virtual void provideAsRedirectUri (VirtualFileWorkItemSharedPtr workItem, const string &redirecturi)=0
 Provide response as HTTP redirect. More...
 
virtual bool provideFileDirectly (const string &uri, vector< char > &buffer, const unsigned int blockSize)=0
 Provide response as file contents through the connection adapters. More...
 
virtual ~VirtualFileLocalResponseInterface ()
 Virtual destructor. More...
 

Detailed Description

Defines an interface for local virtual file responses.

Constructor & Destructor Documentation

◆ ~VirtualFileLocalResponseInterface()

virtual kanzi::connect::VirtualFileLocalResponseInterface::~VirtualFileLocalResponseInterface ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

◆ provideAsFileThroughHttp()

virtual void kanzi::connect::VirtualFileLocalResponseInterface::provideAsFileThroughHttp ( VirtualFileWorkItemSharedPtr  workItem,
const string &  filepath 
)
pure virtual

Provide response as a path to existing file.

Parameters
workItemwhere to store the data
filepathfull 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
workItemwhere to store the data
mimemime type of the data
blobbinary data buffer
lengthsize 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
workItemwhere to store the data
redirectUriAddress 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
uriIdentifies the file
bufferThe data to provide
blockSizeDefines 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: