VirtualFileRequestHandler implements the CivetHandler for defined local URI.
More...
#include <virtualfilerequesthandler.hpp>
VirtualFileRequestHandler implements the CivetHandler for defined local URI.
◆ VirtualFileRequestHandler() [1/2]
kanzi::connect::VirtualFileRequestHandler::VirtualFileRequestHandler |
( |
const string & | path, |
|
|
ServiceInterface & | sif, |
|
|
shared_ptr< VirtualfileServiceConcept::Session > | session ) |
Constructs an object from a Session.
Effectively this type of object is created for remotely connecting clients
- Parameters
-
path | the path |
sif | service interface where to requests are routed |
session | service session. |
◆ VirtualFileRequestHandler() [2/2]
Construct an object and binds it to a local file provider.
- Parameters
-
path | the path |
sif | service interface where to requests are routed. |
provider | pointer that effectively can handle the requests. |
◆ ~VirtualFileRequestHandler()
virtual kanzi::connect::VirtualFileRequestHandler::~VirtualFileRequestHandler |
( |
| ) |
|
|
virtual |
Virtual desctructor for object cleanup.
◆ getProvider()
retrieve configured provider
- Returns
- pointer to provider. can be nullptr. ownership not transfered.
◆ getSession()
shared_ptr< VirtualfileServiceConcept::Session > kanzi::connect::VirtualFileRequestHandler::getSession |
( |
| ) |
const |
retrieve configured session
- Returns
- pointer to session. can be nullptr. ownership not transfered.
◆ handleGet()
virtual bool kanzi::connect::VirtualFileRequestHandler::handleGet |
( |
CivetServer * | server, |
|
|
struct mg_connection * | conn ) |
|
virtual |
Handles GET requests for the specified local URI.
- Parameters
-
server | Server to which the request is attached |
conn | Civet connection entity that is attached to this particular request. |
- Returns
- Boolean telling the Civet framework whether a message was handled, always true.
◆ handlePost()
virtual bool kanzi::connect::VirtualFileRequestHandler::handlePost |
( |
CivetServer * | server, |
|
|
struct mg_connection * | conn ) |
|
virtual |
Handles POST requests for the specified local URI.
- Parameters
-
server | Server to which the request is attached |
conn | Civet connection entity that is attached to this particular request. |
- Returns
- Boolean telling the Civet framework whether a message was handled, always true.
◆ localUri()
const string & kanzi::connect::VirtualFileRequestHandler::localUri |
( |
| ) |
|
Local URI that is handled by this instance.
The documentation for this class was generated from the following file:
- virtualfile_service/virtualfilerequesthandler.hpp