client-cpp  0.9.0
kaa::IEndpointRegistrationManager Class Referenceabstract

The interface to a module which associates endpoints with users. More...

#include <IEndpointRegistrationManager.hpp>

+ Inheritance diagram for kaa::IEndpointRegistrationManager:

Public Member Functions

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
 Attaches the endpoint to a user entity. The user verification will be carried out by the specified verifier. More...
 
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 ~IEndpointRegistrationManager ()
 

Detailed Description

The interface to a module which associates endpoints with users.

NOTE: According to the Kaa architecture, endpoints must be associated with the same user in order to be able to communicate with each other.

Definition at line 37 of file IEndpointRegistrationManager.hpp.

Constructor & Destructor Documentation

virtual kaa::IEndpointRegistrationManager::~IEndpointRegistrationManager ( )
inlinevirtual

Definition at line 119 of file IEndpointRegistrationManager.hpp.

Member Function Documentation

virtual void kaa::IEndpointRegistrationManager::attachEndpoint ( const std::string &  endpointAccessToken,
IAttachEndpointCallbackPtr  listener = IAttachEndpointCallbackPtr() 
)
pure virtual

Attaches the specified endpoint to the user to which the current endpoint is attached.

Parameters
[in]endpointAccessTokenThe access token of the endpoint to be attached to the user.
[in]listenerThe optional listener to notify of the result.
Exceptions
BadCredentialsThe endpoint access token is empty.
TransportNotFoundExceptionThe Kaa SDK isn't fully initialized.
KaaExceptionSome other failure has happened.

Implemented in kaa::EndpointRegistrationManager.

virtual void kaa::IEndpointRegistrationManager::attachUser ( const std::string &  userExternalId,
const std::string &  userAccessToken,
IUserAttachCallbackPtr  listener = IUserAttachCallbackPtr() 
)
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.

Parameters
[in]userExternalIdThe external user ID.
[in]userAccessTokenThe user access token.
Exceptions
BadCredentialsThe endpoint access token is empty.
TransportNotFoundExceptionThe Kaa SDK isn't fully initialized.
KaaExceptionSome other failure has happened.

Implemented in kaa::EndpointRegistrationManager.

virtual void kaa::IEndpointRegistrationManager::attachUser ( const std::string &  userExternalId,
const std::string &  userAccessToken,
const std::string &  userVerifierToken,
IUserAttachCallbackPtr  listener = IUserAttachCallbackPtr() 
)
pure virtual

Attaches the endpoint to a user entity. The user verification will be carried out by the specified verifier.

Only endpoints associated with the same user can exchange events.

Parameters
[in]userExternalIdThe external user ID.
[in]userAccessTokenThe user access token.
[in]userVerifierTokenThe user verifier token.
[in]listenerThe optional listener to notify of the result.
Exceptions
BadCredentialsThe endpoint access token is empty.
TransportNotFoundExceptionThe Kaa SDK isn't fully initialized.
KaaExceptionSome other failure has happened.

Implemented in kaa::EndpointRegistrationManager.

virtual void kaa::IEndpointRegistrationManager::detachEndpoint ( const std::string &  endpointKeyHash,
IDetachEndpointCallbackPtr  listener = IDetachEndpointCallbackPtr() 
)
pure virtual

Detaches the specified endpoint from the user to which the current endpoint is attached.

Parameters
[in]endpointKeyHashThe key hash of the endpoint to be detached from the user.
[in]listenerThe optional listener to notify of the result.
Exceptions
BadCredentialsThe endpoint access token is empty.
TransportNotFoundExceptionThe Kaa SDK isn't fully initialized.
KaaExceptionSome other failure has happened.

Implemented in kaa::EndpointRegistrationManager.

virtual bool kaa::IEndpointRegistrationManager::isAttachedToUser ( )
pure virtual

Checks if the current endpoint is already attached to some user.

Returns
TRUE if the current endpoint is attached, FALSE otherwise.

Implemented in kaa::EndpointRegistrationManager.

virtual void kaa::IEndpointRegistrationManager::setAttachStatusListener ( IAttachStatusListenerPtr  listener)
pure virtual

Sets listener to notify of the current endpoint is attached/detached by another one.

Parameters
[in]listenerListener to notify of the attach status is changed.

Implemented in kaa::EndpointRegistrationManager.


The documentation for this class was generated from the following file: