AbstractServiceClient¶
-
class
kanzi::connect::AbstractServiceClient¶ Abstract client-side base class for Kanzi Connect services.
Subclassed by ContentClient, ExternalClientAdapter, StreamServiceClient, VirtualFileClient
Public Types
-
typedef function<void(void)>
SessionRunningFunction¶
-
typedef shared_ptr<void>
SessionRunningSubscriptionToken¶
-
typedef function<void(void)>
SessionStoppedFunction¶
Public Functions
-
AbstractServiceClient()¶ Constructor.
-
~AbstractServiceClient()¶ Destructor.
-
AbstractSession::MessageSubscriptionToken
addMessageSubscription(const string &messageType, AbstractSession::MessageReceivedFunction function)¶
-
SessionRunningSubscriptionToken
addSessionRunningSubscription(SessionRunningFunction function)¶
-
SessionRunningSubscriptionToken
addSessionStoppedSubscription(SessionStoppedFunction function)¶
-
optional<int>
getActiveSessionIdentifier()¶
-
string
getIdentifier() const = 0¶ Returns the type of the service.
- Return
Identifier of the service, as a string.
-
optional<const AbstractSession::ServiceAttributes>
getServiceAttributes()¶
-
void
onSessionRunning()¶
-
void
onSessionStopped()¶
-
void
removeMessageSubscription(const string &messageType, AbstractSession::MessageSubscriptionToken token)¶
-
void
removeSessionRunningSubscription(SessionRunningSubscriptionToken token)¶
-
void
removeSessionStoppedSubscription(SessionRunningSubscriptionToken token)¶
-
void
setEnabledState(bool newEnabledState)¶ Enable/disable the service by allowing or blocking traffic between client and server.
- Parameters
newEnabledState: True enables and false disables the service
-
bool
transmit(const MessagePackage &message)¶
-
void
work()¶ Carry out asynchronous work bound to Kanzi Connect client main thread.
-
typedef function<void(void)>