client-cpp
0.10.0
|
#include <IKaaClient.hpp>
Public Member Functions | |
virtual void | start ()=0 |
Starts Kaa's workflow. More... | |
virtual void | stop ()=0 |
Stops Kaa's workflow. More... | |
virtual void | pause ()=0 |
Pauses Kaa's workflow. More... | |
virtual void | resume ()=0 |
Resumes Kaa's workflow. More... | |
virtual void | setProfileContainer (IProfileContainerPtr container)=0 |
Sets profile container implemented by the user. More... | |
virtual void | updateProfile ()=0 |
Notifies server about profile changes. More... | |
virtual EventFamilyFactory & | getEventFamilyFactory ()=0 |
virtual void | addTopicListListener (INotificationTopicListListener &listener)=0 |
Adds the listener which receives updates on the list of available topics. More... | |
virtual void | removeTopicListListener (INotificationTopicListListener &listener)=0 |
Removes listener which receives updates on the list of available topics. More... | |
virtual Topics | getTopics ()=0 |
Retrieves the list of available topics. More... | |
virtual void | addNotificationListener (INotificationListener &listener)=0 |
Adds the listener which receives notifications on all available topics. More... | |
virtual void | addNotificationListener (std::int64_t topicId, INotificationListener &listener)=0 |
Adds the listener which receives notifications on the specified topic. More... | |
virtual void | removeNotificationListener (INotificationListener &listener)=0 |
Removes the listener which receives notifications on all available topics. More... | |
virtual void | removeNotificationListener (std::int64_t topicId, INotificationListener &listener)=0 |
Removes the listener which receives notifications on the specified topic. More... | |
virtual void | subscribeToTopic (std::int64_t id, bool forceSync=true)=0 |
Subscribes to the specified optional topic to receive notifications on that topic. More... | |
virtual void | subscribeToTopics (const std::list< std::int64_t > &idList, bool forceSync=true)=0 |
Subscribes to the specified list of optional topics to receive notifications on those topics. More... | |
virtual void | unsubscribeFromTopic (std::int64_t id, bool forceSync=true)=0 |
Unsubscribes from the specified optional topic to stop receiving notifications on that topic. More... | |
virtual void | unsubscribeFromTopics (const std::list< std::int64_t > &idList, bool forceSync=true)=0 |
Unsubscribes from the specified list of optional topics to stop receiving notifications on those topics. More... | |
virtual void | syncTopicSubscriptions ()=0 |
Sends subscription request(s) to the Operations server. More... | |
virtual void | addConfigurationListener (IConfigurationReceiver &receiver)=0 |
virtual void | removeConfigurationListener (IConfigurationReceiver &receiver)=0 |
virtual const KaaRootConfiguration & | getConfiguration ()=0 |
virtual void | setConfigurationStorage (IConfigurationStoragePtr storage)=0 |
virtual void | attachEndpoint (const std::string &endpointAccessToken, IAttachEndpointCallbackPtr listener=IAttachEndpointCallbackPtr())=0 |
Attaches the specified endpoint to the user to which the current endpoint is attached. More... | |
virtual void | detachEndpoint (const std::string &endpointKeyHash, IDetachEndpointCallbackPtr listener=IDetachEndpointCallbackPtr())=0 |
Detaches the specified endpoint from the user to which the current endpoint is attached. More... | |
virtual void | attachUser (const std::string &userExternalId, const std::string &userAccessToken, IUserAttachCallbackPtr listener=IUserAttachCallbackPtr())=0 |
Attaches the current endpoint to the specifier user. The user verification is carried out by the default verifier. More... | |
virtual void | attachUser (const std::string &userExternalId, const std::string &userAccessToken, const std::string &userVerifierToken, IUserAttachCallbackPtr listener=IUserAttachCallbackPtr())=0 |
virtual void | setAttachStatusListener (IAttachStatusListenerPtr listener)=0 |
Sets listener to notify of the current endpoint is attached/detached by another one. More... | |
virtual bool | isAttachedToUser ()=0 |
Checks if the current endpoint is already attached to some user. More... | |
virtual std::int32_t | findEventListeners (const std::list< std::string > &eventFQNs, IFetchEventListenersPtr listener)=0 |
Submits an event listeners resolution request. More... | |
virtual RecordFuture | addLogRecord (const KaaUserLogRecord &record)=0 |
Adds a new log record to the log storage. More... | |
virtual void | setLogDeliveryListener (ILogDeliveryListenerPtr listener)=0 |
Set a listener which receives a delivery status of each log bucket. More... | |
virtual void | setLogStorage (ILogStoragePtr storage)=0 |
Sets the new log storage. More... | |
virtual void | setLogUploadStrategy (ILogUploadStrategyPtr strategy)=0 |
Sets the new log upload strategy. More... | |
virtual void | setFailoverStrategy (IFailoverStrategyPtr strategy)=0 |
virtual IKaaChannelManager & | getChannelManager ()=0 |
Retrieves the Channel Manager. More... | |
virtual const KeyPair & | getClientKeyPair ()=0 |
Retrieves the client's public and private key. More... | |
virtual void | setEndpointAccessToken (const std::string &token)=0 |
Set new access token for a current endpoint. More... | |
virtual std::string | refreshEndpointAccessToken ()=0 |
Generate new access token for a current endpoint. More... | |
virtual std::string | getEndpointAccessToken () const =0 |
Retrieve an access token for a current endpoint. More... | |
virtual std::string | getEndpointKeyHash () const =0 |
virtual IKaaDataMultiplexer & | getOperationMultiplexer ()=0 |
Retrieves Kaa operations data multiplexer. More... | |
virtual IKaaDataDemultiplexer & | getOperationDemultiplexer ()=0 |
Retrieves Kaa operations data demultiplexer. More... | |
virtual IKaaDataMultiplexer & | getBootstrapMultiplexer ()=0 |
Retrieves Kaa bootstrap data multiplexer. More... | |
virtual IKaaDataDemultiplexer & | getBootstrapDemultiplexer ()=0 |
Retrieves Kaa bootstrap data demultiplexer. More... | |
virtual IKaaClientContext & | getKaaClientContext ()=0 |
Retrieves Kaa context data. More... | |
virtual | ~IKaaClient () |
Interface for the Kaa client.
Base interface to operate with Kaa library.
Definition at line 57 of file IKaaClient.hpp.
|
inlinevirtual |
Definition at line 488 of file IKaaClient.hpp.
|
pure virtual |
Subscribes listener of configuration updates.
receiver | Listener to be added to notification list. |
Implemented in kaa::KaaClient.
|
pure virtual |
Adds a new log record to the log storage.
To store log records, MemoryLogStorage
is used by default. Use setStorage() to set your own implementation.
[in] | record | The log record to be added. |
Implemented in kaa::KaaClient.
|
pure virtual |
Adds the listener which receives notifications on all available topics.
[in] | listener | The listener which receives notifications. |
Implemented in kaa::KaaClient.
|
pure virtual |
Adds the listener which receives notifications on the specified topic.
Listener(s) for optional topics may be added/removed irrespective to whether subscription is already done or not.
[in] | topicId | The id of the topic (either mandatory or optional). |
[in] | listener | The listener which receives notifications. |
UnavailableTopicException | Throws if the unknown topic id is provided. |
Implemented in kaa::KaaClient.
|
pure virtual |
Adds the listener which receives updates on the list of available topics.
[in] | listener | The listener which receives updates. |
Implemented in kaa::KaaClient.
|
pure virtual |
Attaches the specified endpoint to the user to which the current endpoint is attached.
[in] | endpointAccessToken | The access token of the endpoint to be attached to the user. |
[in] | listener | The optional listener to notify of the result. |
BadCredentials | The endpoint access token is empty. |
TransportNotFoundException | The Kaa SDK isn't fully initialized. |
KaaException | Some other failure has happened. |
Implemented in kaa::KaaClient.
|
pure virtual |
Attaches the current endpoint to the specifier user. The user verification is carried out by the default verifier.
NOTE: If the default user verifier (DEFAULT_USER_VERIFIER_TOKEN) is not specified, the attach attempt fails with the KaaException
exception.
Only endpoints associated with the same user can exchange events.
[in] | userExternalId | The external user ID. |
[in] | userAccessToken | The user access token. |
BadCredentials | The endpoint access token is empty. |
TransportNotFoundException | The Kaa SDK isn't fully initialized. |
KaaException | Some other failure has happened. |
Implemented in kaa::KaaClient.
|
pure virtual |
Implemented in kaa::KaaClient.
|
pure virtual |
Detaches the specified endpoint from the user to which the current endpoint is attached.
[in] | endpointKeyHash | The key hash of the endpoint to be detached from the user. |
[in] | listener | The optional listener to notify of the result. |
BadCredentials | The endpoint access token is empty. |
TransportNotFoundException | The Kaa SDK isn't fully initialized. |
KaaException | Some other failure has happened. |
Implemented in kaa::KaaClient.
|
pure virtual |
Submits an event listeners resolution request.
eventFQNs | List of event class FQNs which have to be supported by endpoint. |
listener | Result listener IFetchEventListeners} |
KaaException | when data is invalid (empty list or null listener) |
Implemented in kaa::KaaClient.
|
pure virtual |
Retrieves Kaa bootstrap data demultiplexer.
Implemented in kaa::KaaClient.
|
pure virtual |
Retrieves Kaa bootstrap data multiplexer.
Implemented in kaa::KaaClient.
|
pure virtual |
Retrieves the Channel Manager.
Implemented in kaa::KaaClient.
|
pure virtual |
Retrieves the client's public and private key.
Required in user implementation of an operation data channel. Public key hash (SHA-1) is used by servers as identification number to uniquely identify each connected endpoint.
Private key is used by encryption schema between endpoint and servers.
Implemented in kaa::KaaClient.
|
pure virtual |
Returns full configuration tree which is actual at current moment.
Implemented in kaa::KaaClient.
|
pure virtual |
Retrieve an access token for a current endpoint.
Implemented in kaa::KaaClient.
|
pure virtual |
Retrieve Endpoint Key Hash.
Implemented in kaa::KaaClient.
|
pure virtual |
Retrieves Kaa event family factory.
Implemented in kaa::KaaClient.
|
pure virtual |
|
pure virtual |
Retrieves Kaa operations data demultiplexer.
Implemented in kaa::KaaClient.
|
pure virtual |
Retrieves Kaa operations data multiplexer.
Implemented in kaa::KaaClient.
|
pure virtual |
Retrieves the list of available topics.
Implemented in kaa::KaaClient.
|
pure virtual |
Checks if the current endpoint is already attached to some user.
Implemented in kaa::KaaClient.
|
pure virtual |
Pauses Kaa's workflow.
Implemented in kaa::KaaClient.
|
pure virtual |
Generate new access token for a current endpoint.
Implemented in kaa::KaaClient.
|
pure virtual |
Unsubscribes listener of configuration updates.
receiver | Listener to be removed from notification list. |
Implemented in kaa::KaaClient.
|
pure virtual |
Removes the listener which receives notifications on all available topics.
[in] | listener | The listener which receives notifications. |
Implemented in kaa::KaaClient.
|
pure virtual |
Removes the listener which receives notifications on the specified topic.
Listener(s) for optional topics may be added/removed irrespective to whether subscription is already done or not.
[in] | topicId | The id of topic (either mandatory or optional). |
[in] | listener | The listener which receives notifications. |
UnavailableTopicException | Throws if the unknown topic id is provided. |
Implemented in kaa::KaaClient.
|
pure virtual |
Removes listener which receives updates on the list of available topics.
[in] | listener | The listener which receives updates. |
Implemented in kaa::KaaClient.
|
pure virtual |
Resumes Kaa's workflow.
Implemented in kaa::KaaClient.
|
pure virtual |
Sets listener to notify of the current endpoint is attached/detached by another one.
[in] | listener | Listener to notify of the attach status is changed. |
Implemented in kaa::KaaClient.
|
pure virtual |
Registers new configuration persistence routines. Replaces previously set value. Memory pointed by given parameter should be managed by user.
storage | User-defined persistence routines. |
Implemented in kaa::KaaClient.
|
pure virtual |
Set new access token for a current endpoint.
[in] | token | The new access token. |
Implemented in kaa::KaaClient.
|
pure virtual |
Implemented in kaa::KaaClient.
|
pure virtual |
Set a listener which receives a delivery status of each log bucket.
listener[in] | the listener |
Implemented in kaa::KaaClient.
|
pure virtual |
Sets the new log storage.
MemoryLogStorage
is used by default.
[in] | storage | The ILogStorage implementation. |
KaaException | The storage is NULL. |
Implemented in kaa::KaaClient.
|
pure virtual |
Sets the new log upload strategy.
DefaultLogUploadStrategy
is used by default.
[in] | strategy | The ILogUploadStrategy implementation. |
KaaException | The strategy is NULL. |
Implemented in kaa::KaaClient.
|
pure virtual |
Sets profile container implemented by the user.
container | User-defined container |
Implemented in kaa::KaaClient.
|
pure virtual |
Starts Kaa's workflow.
Implemented in kaa::KaaClient.
|
pure virtual |
Stops Kaa's workflow.
Implemented in kaa::KaaClient.
|
pure virtual |
Subscribes to the specified optional topic to receive notifications on that topic.
[in] | topicId | The id of the optional topic. |
[in] | forceSync | Indicates whether the subscription request should be sent immediately to the Operations server. If false , the request postpones to the explicit call of syncTopicSubscriptions() or to the first call of subscribeToTopic(), subscribeToTopics(), unsubscribeFromTopic() or unsubscribeFromTopics() with the true value for the forceSync parameter. |
UnavailableTopicException | Throws if the unknown topic id is provided or the topic isn't optional. |
Implemented in kaa::KaaClient.
|
pure virtual |
Subscribes to the specified list of optional topics to receive notifications on those topics.
[in] | topicIds | The list of optional topic id-s. |
[in] | forceSync | Indicates whether the subscription request should be sent immediately to the Operations server. If false , the request postpones to the explicit call of syncTopicSubscriptions() or to the first call of subscribeToTopic(), subscribeToTopics(), unsubscribeFromTopic() or unsubscribeFromTopics() with the true value for the forceSync parameter. |
UnavailableTopicException | Throws if the unknown topic id is provided or the topic isn't optional. |
Implemented in kaa::KaaClient.
|
pure virtual |
Sends subscription request(s) to the Operations server.
Use as a convenient way to send several subscription requests at once.
Implemented in kaa::KaaClient.
|
pure virtual |
Unsubscribes from the specified optional topic to stop receiving notifications on that topic.
[in] | topicId | The id of the optional topic. |
[in] | forceSync | Indicates whether the subscription request should be sent immediately to the Operations server. If false , the request postpones to the explicit call of syncTopicSubscriptions() or to the first call of subscribeToTopic(), subscribeToTopics(), unsubscribeFromTopic() or unsubscribeFromTopics() with the true value for the forceSync parameter. |
UnavailableTopicException | Throws if the unknown topic id is provided or the topic isn't optional. |
Implemented in kaa::KaaClient.
|
pure virtual |
Unsubscribes from the specified list of optional topics to stop receiving notifications on those topics.
[in] | topicId | The list of optional topic id-s. |
[in] | forceSync | Indicates whether the subscription request should be sent immediately to the Operations server. If false , the request postpones to the explicit call of syncTopicSubscriptions() or to the first call of subscribeToTopic(), subscribeToTopics(), unsubscribeFromTopic() or unsubscribeFromTopics() with the true value for the forceSync parameter. |
UnavailableTopicException | Throws if the unknown topic id is provided or the topic isn't optional. |
Implemented in kaa::KaaClient.
|
pure virtual |
Notifies server about profile changes.
Implemented in kaa::KaaClient.