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