Abstract client-side base class for Kanzi Connect services. More...
#include <abstract_service_client.hpp>
Public Types | |
typedef function< void(void)> | SessionRunningFunction |
typedef shared_ptr< void > | SessionRunningSubscriptionToken |
typedef function< void(void)> | SessionStoppedFunction |
Protected Types | |
enum | SessionState { INITIALIZED = 0 , RUNNING = 1 , STOPPED = 2 } |
Protected Member Functions | |
virtual AbstractSessionSharedPtr | getSession () |
Protected Attributes | |
SessionState | m_sessionState |
Abstract client-side base class for Kanzi Connect services.
typedef function<void(void)> kanzi::connect::AbstractServiceClient::SessionRunningFunction |
typedef shared_ptr<void> kanzi::connect::AbstractServiceClient::SessionRunningSubscriptionToken |
typedef function<void(void)> kanzi::connect::AbstractServiceClient::SessionStoppedFunction |
|
protected |
kanzi::connect::AbstractServiceClient::AbstractServiceClient | ( | ) |
Constructor.
|
virtual |
Destructor.
|
inline |
SessionRunningSubscriptionToken kanzi::connect::AbstractServiceClient::addSessionRunningSubscription | ( | SessionRunningFunction | function | ) |
SessionRunningSubscriptionToken kanzi::connect::AbstractServiceClient::addSessionStoppedSubscription | ( | SessionStoppedFunction | function | ) |
|
inline |
|
pure virtual |
Returns the type of the service.
Implemented in kanzi::connect::ExternalClientAdapter, kanzi::connect::ContentClient, kanzi::connect::VirtualFileClient, and kanzi::connect::StreamServiceClient.
|
inline |
|
inlineprotectedvirtual |
|
virtual |
Reimplemented in kanzi::connect::ExternalClientAdapter.
|
virtual |
Reimplemented in kanzi::connect::ExternalClientAdapter.
|
inline |
void kanzi::connect::AbstractServiceClient::removeSessionRunningSubscription | ( | SessionRunningSubscriptionToken | token | ) |
void kanzi::connect::AbstractServiceClient::removeSessionStoppedSubscription | ( | SessionRunningSubscriptionToken | token | ) |
void kanzi::connect::AbstractServiceClient::setEnabledState | ( | bool | newEnabledState | ) |
Enable/disable the service by allowing or blocking traffic between client and server.
newEnabledState | True enables and false disables the service |
|
inline |
|
inlinevirtual |
Carry out asynchronous work bound to Kanzi Connect client main thread.
Reimplemented in kanzi::connect::ContentClient, and kanzi::connect::RemoteContentClient.
|
protected |