A class that integrates Kanzi Connect client to Kanzi UI event loop. More...
#include <worker.hpp>
Public Member Functions | |
const string & | getIdentity () |
Returns the identity of this client, usually describing the owner of the device (ie. | |
const string & | getName () |
Returns the name of this client (ie. | |
Worker (ClientSharedPtr client) | |
Constructor. | |
virtual | ~Worker () |
Destructor. | |
![]() | |
void | configure (Domain &domain, ConnectionConfigurationParser &parser, const ConnectionConfigurationReadIf::Configuration &config, const string &serverName) |
Configure the worker with parsed connection configuration. | |
const string | getActiveAddress () |
Retrieve the IP Address of the host that is to be connected next. | |
string | getFileServerAddress () const |
Retrieve file server address. | |
const string & | getIdentity () |
Returns the identity of this client, usually describing the owner of the device (ie. | |
const string & | getName () |
Returns the name of this client (ie. | |
const string | getServerName () |
Retrieve the IP Address of the host that is to be connected next. | |
void | start () |
Starts the worker, connects to server and starts operation. | |
void | stop () |
Stops the worker, disconnects from server and stops operation. | |
WorkerBase (ClientSharedPtr client, const string filename) | |
Constructor. | |
virtual | ~WorkerBase () |
Destructor. | |
![]() | |
virtual | ~WorkNotifyCallback () |
Virtual destructor for cleanup. | |
Protected Member Functions | |
virtual void | onConnectionStateChanged (Connection::State state) |
Virtual method - inherited classes must invoke the base class method. | |
![]() | |
string | buildFilenameFromAttribute (const string attributeName) |
Constructs a filename from a defined attribute. | |
bool | cacheReferredFile (const string attributeName) |
Check whether specific attribute points to a valid path. | |
bool | connect () |
void | disconnect () |
string | getSSLAttributeValue (const string name) |
Retrieve SSL attribute with specific name. | |
bool | hasSSLAttribute (const string &name, map< string, string > &map) |
Checks whether there is SSL attribute with specific name. | |
bool | hasSSLAttribute (const string &name, unordered_map< string, string > &map) |
Checks whether there is SSL attribute with specific name. | |
bool | readAndStoreFile (const string filename, const string filenameBase) |
Reads specific file and stores contents into local variable. | |
string | readReferredFile (const string attributeName) |
Read the referred attribute value. | |
void | seekToNextAddress () |
In case multiple addresses configured, advances to the next address after a unsuccessful connect. | |
void | setPollTimerState (bool running, int interval=0) |
Controls the poll timer state and interval. | |
void | taskWork (int interval) |
void | workAvailable () |
Invoked to notify that work is available. | |
A class that integrates Kanzi Connect client to Kanzi UI event loop.
kanzi::connect::Worker::Worker | ( | ClientSharedPtr | client | ) |
Constructor.
client | Kanzi Connect client instance that is managed by this worker. |
|
virtual |
Destructor.
|
inline |
Returns the identity of this client, usually describing the owner of the device (ie.
'John').
|
inline |
Returns the name of this client (ie.
'Cluster', 'HUD').
|
protectedvirtual |
Virtual method - inherited classes must invoke the base class method.
state | new state. |
Reimplemented from kanzi::connect::WorkerBase.