VirtualFileLocalClient¶
-
class
kanzi::connect
::
VirtualFileLocalClient
: public VirtualFileClient¶ Local interface to access HTTP Virtual file interface in server.
Public Functions
-
string
getPath
(RegistrationToken token) const¶ Retrieve the path associated with the registration.
- Return
full path in form: http://<server>:8080/somepath/ empty string is returned if registration has failed, or it is still in progress.
- Parameters
token
: The token that identifies the registration.
-
RegistrationToken
registerPath
(const string &scheme, const string &path, VirtualFileProvider *provider)¶ Registers a path to HTTP Server.
Registration is an asynchronous operation for remote clients.
- Return
Opaque token that identifies this registration.
- Parameters
scheme
: Requested protocol. Either HTTP or HTTPS expected. If you do not set a value, uses HTTP.pathProposal
: clients proposal of the path where the serving is to be done.provider
: pointer to callback interface that is, if successfully registered, invoked for every file request made under the registered path. Caller must guarantee that the provided callback interface remains valid until corresponding unregisterPath call is made.
-
RegistrationStatus
registrationStatus
(RegistrationToken token)¶ Checks the registration status.
For remote operations registration is asynchronous and thus it is not complete until this method returns either Registered or RegistrationFailed. Also, if for example connection is lost, then the registration status changes even if it has been completed earlier.
- Return
enumerated status.
- Parameters
token
: The token that identifies the registration.
-
void
unregisterPath
(RegistrationToken token)¶ Unregisters previously registered path.
- Parameters
token
: opaque handle got using the registerPath
Public Static Functions
Factory function to create instance of a class.
- Parameters
manager
: service manager.
-
string