|
client-cpp
0.8.1
|
#include <KaaClient.hpp>
Inheritance diagram for kaa::KaaClient:
Collaboration diagram for kaa::KaaClient:Public Member Functions | |
| KaaClient (IKaaClientPlatformContextPtr context, IKaaClientStateListenerPtr listener) | |
| virtual void | start () |
| Starts Kaa's workflow. More... | |
| virtual void | stop () |
| Stops Kaa's workflow. More... | |
| virtual void | pause () |
| Pauses Kaa's workflow. More... | |
| virtual void | resume () |
| Resumes Kaa's workflow. More... | |
| virtual void | updateProfile () |
| Notifies server about profile changes. More... | |
| virtual IKaaChannelManager & | getChannelManager () |
| Retrieves the Channel Manager. More... | |
| virtual const KeyPair & | getClientKeyPair () |
| Retrieves the client's public and private key. More... | |
| virtual void | setEndpointAccessToken (const std::string &token) |
| Set new access token for a current endpoint. More... | |
| virtual std::string | refreshEndpointAccessToken () |
| Generate new access token for a current endpoint. More... | |
| virtual std::string | getEndpointAccessToken () |
| Retrieve an access token for a current endpoint. More... | |
| virtual IKaaDataMultiplexer & | getOperationMultiplexer () |
| Retrieves Kaa operations data multiplexer. More... | |
| virtual IKaaDataDemultiplexer & | getOperationDemultiplexer () |
| Retrieves Kaa operations data demultiplexer. More... | |
| virtual EventFamilyFactory & | getEventFamilyFactory () |
| virtual RecordFuture | addLogRecord (const KaaUserLogRecord &record) |
| Adds a new log record to the log storage. More... | |
| virtual void | setLogDeliveryListener (ILogDeliveryListenerPtr listener) |
| Set a listener which receives a delivery status of each log bucket. More... | |
| virtual void | setLogStorage (ILogStoragePtr storage) |
| Sets the new log storage. More... | |
| virtual void | setLogUploadStrategy (ILogUploadStrategyPtr strategy) |
| Sets the new log upload strategy. More... | |
| virtual void | setFailoverStrategy (IFailoverStrategyPtr strategy) |
| virtual void | setProfileContainer (IProfileContainerPtr container) |
| Sets profile container implemented by the user. More... | |
| virtual void | addTopicListListener (INotificationTopicListListener &listener) |
| Adds the listener which receives updates on the list of available topics. More... | |
| virtual void | removeTopicListListener (INotificationTopicListListener &listener) |
| Removes listener which receives updates on the list of available topics. More... | |
| virtual Topics | getTopics () |
| Retrieves the list of available topics. More... | |
| virtual void | addNotificationListener (INotificationListener &listener) |
| Adds the listener which receives notifications on all available topics. More... | |
| virtual void | addNotificationListener (std::int64_t topicId, INotificationListener &listener) |
| Adds the listener which receives notifications on the specified topic. More... | |
| virtual void | removeNotificationListener (INotificationListener &listener) |
| Removes the listener which receives notifications on all available topics. More... | |
| virtual void | removeNotificationListener (std::int64_t topicId, INotificationListener &listener) |
| Removes the listener which receives notifications on the specified topic. More... | |
| virtual void | subscribeToTopic (std::int64_t id, bool forceSync) |
| 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) |
| Subscribes to the specified list of optional topics to receive notifications on those topics. More... | |
| virtual void | unsubscribeFromTopic (std::int64_t id, bool forceSync) |
| 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) |
| Unsubscribes from the specified list of optional topics to stop receiving notifications on those topics. More... | |
| virtual void | syncTopicSubscriptions () |
| Sends subscription request(s) to the Operations server. More... | |
| virtual void | addConfigurationListener (IConfigurationReceiver &receiver) |
| virtual void | removeConfigurationListener (IConfigurationReceiver &receiver) |
| virtual const KaaRootConfiguration & | getConfiguration () |
| virtual void | setConfigurationStorage (IConfigurationStoragePtr storage) |
| virtual void | attachEndpoint (const std::string &endpointAccessToken, IAttachEndpointCallbackPtr listener=IAttachEndpointCallbackPtr()) |
| 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()) |
| 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()) |
| 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()) |
| virtual void | setAttachStatusListener (IAttachStatusListenerPtr listener) |
| Sets listener to notify of the current endpoint is attached/detached by another one. More... | |
| virtual bool | isAttachedToUser () |
| 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) |
| Submits an event listeners resolution request. More... | |
| virtual IKaaDataMultiplexer & | getBootstrapMultiplexer () |
| Retrieves Kaa bootstrap data multiplexer. More... | |
| virtual IKaaDataDemultiplexer & | getBootstrapDemultiplexer () |
| Retrieves Kaa bootstrap data demultiplexer. More... | |
| virtual IKaaClientContext & | getKaaClientContext () |
| Retrieves Kaa context data. More... | |
Public Member Functions inherited from kaa::IKaaClient | |
| virtual | ~IKaaClient () |
Definition at line 47 of file KaaClient.hpp.
| kaa::KaaClient::KaaClient | ( | IKaaClientPlatformContextPtr | context, |
| IKaaClientStateListenerPtr | listener | ||
| ) |
|
virtual |
Subscribes listener of configuration updates.
| receiver | Listener to be added to notification list. |
Implements kaa::IKaaClient.
|
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. |
Implements kaa::IKaaClient.
|
virtual |
Adds the listener which receives notifications on all available topics.
| [in] | listener | The listener which receives notifications. |
Implements kaa::IKaaClient.
|
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. |
Implements kaa::IKaaClient.
|
virtual |
Adds the listener which receives updates on the list of available topics.
| [in] | listener | The listener which receives updates. |
Implements kaa::IKaaClient.
|
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. |
Implements kaa::IKaaClient.
|
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. |
Implements kaa::IKaaClient.
|
virtual |
Implements kaa::IKaaClient.
|
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. |
Implements kaa::IKaaClient.
|
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) |
Implements kaa::IKaaClient.
|
virtual |
Retrieves Kaa bootstrap data demultiplexer.
Implements kaa::IKaaClient.
|
virtual |
Retrieves Kaa bootstrap data multiplexer.
Implements kaa::IKaaClient.
|
virtual |
Retrieves the Channel Manager.
Implements kaa::IKaaClient.
|
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.
Implements kaa::IKaaClient.
|
virtual |
Returns full configuration tree which is actual at current moment.
Implements kaa::IKaaClient.
|
virtual |
Retrieve an access token for a current endpoint.
Implements kaa::IKaaClient.
|
virtual |
|
virtual |
|
virtual |
Retrieves Kaa operations data demultiplexer.
Implements kaa::IKaaClient.
|
virtual |
Retrieves Kaa operations data multiplexer.
Implements kaa::IKaaClient.
|
virtual |
Retrieves the list of available topics.
Implements kaa::IKaaClient.
|
virtual |
Checks if the current endpoint is already attached to some user.
Implements kaa::IKaaClient.
|
virtual |
Pauses Kaa's workflow.
Implements kaa::IKaaClient.
|
virtual |
Generate new access token for a current endpoint.
Implements kaa::IKaaClient.
|
virtual |
Unsubscribes listener of configuration updates.
| receiver | Listener to be removed from notification list. |
Implements kaa::IKaaClient.
|
virtual |
Removes the listener which receives notifications on all available topics.
| [in] | listener | The listener which receives notifications. |
Implements kaa::IKaaClient.
|
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. |
Implements kaa::IKaaClient.
|
virtual |
Removes listener which receives updates on the list of available topics.
| [in] | listener | The listener which receives updates. |
Implements kaa::IKaaClient.
|
virtual |
Resumes Kaa's workflow.
Implements kaa::IKaaClient.
|
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. |
Implements kaa::IKaaClient.
|
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. |
Implements kaa::IKaaClient.
|
virtual |
Set new access token for a current endpoint.
| [in] | token | The new access token. |
Implements kaa::IKaaClient.
|
virtual |
Implements kaa::IKaaClient.
|
virtual |
Set a listener which receives a delivery status of each log bucket.
| listener[in] | the listener |
Implements kaa::IKaaClient.
|
virtual |
Sets the new log storage.
MemoryLogStorage is used by default.
| [in] | storage | The ILogStorage implementation. |
| KaaException | The storage is NULL. |
Implements kaa::IKaaClient.
|
virtual |
Sets the new log upload strategy.
DefaultLogUploadStrategy is used by default.
| [in] | strategy | The ILogUploadStrategy implementation. |
| KaaException | The strategy is NULL. |
Implements kaa::IKaaClient.
|
virtual |
Sets profile container implemented by the user.
| container | User-defined container |
Implements kaa::IKaaClient.
|
virtual |
Starts Kaa's workflow.
Implements kaa::IKaaClient.
|
virtual |
Stops Kaa's workflow.
Implements kaa::IKaaClient.
|
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. |
Implements kaa::IKaaClient.
|
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. |
Implements kaa::IKaaClient.
|
virtual |
Sends subscription request(s) to the Operations server.
Use as a convenient way to send several subscription requests at once.
Implements kaa::IKaaClient.
|
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. |
Implements kaa::IKaaClient.
|
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. |
Implements kaa::IKaaClient.
|
virtual |
Notifies server about profile changes.
Implements kaa::IKaaClient.