client-cpp  0.0.1-SNAPSHOT
IEndpointRegistrationManager.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014 CyberVision, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License") = 0;
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef IENDPOINTREGISTRATIONMANAGER_HPP_
18 #define IENDPOINTREGISTRATIONMANAGER_HPP_
19 
20 #include <list>
21 #include <string>
22 
23 namespace kaa {
24 
25 typedef std::map<std::string/*epToken*/, std::string/*epHash*/> AttachedEndpoints;
26 
29 
34 {
35 public:
39  virtual void regenerateEndpointAccessToken() = 0;
40 
44  virtual const std::string& getEndpointAccessToken() = 0;
45 
53  virtual void attachEndpoint(const std::string& endpointAccessToken
54  , IEndpointAttachStatusListener* listener = nullptr) = 0;
55 
63  virtual void detachEndpoint(const std::string& endpointKeyHash
64  , IEndpointAttachStatusListener* listener = nullptr) = 0;
65 
71  virtual void detachEndpoint(IEndpointAttachStatusListener* listener = nullptr) = 0;
72 
81  virtual void attachUser(const std::string& userExternalId
82  , const std::string& userAccessToken
83  , IEndpointAttachStatusListener* listener = nullptr) = 0;
84 
90  virtual const AttachedEndpoints& getAttachedEndpoints() = 0;
91 
98 
105 
109  virtual bool isCurrentEndpointAttached() = 0;
110 
117  virtual void setAttachStatusListener(IEndpointAttachStatusListener* listener) = 0;
118 
120 };
121 
122 }
123 
124 #endif /* IENDPOINTREGISTRATIONMANAGER_HPP_ */
virtual void setAttachStatusListener(IEndpointAttachStatusListener *listener)=0
std::map< std::string, std::string > AttachedEndpoints
virtual void regenerateEndpointAccessToken()=0
virtual void detachEndpoint(const std::string &endpointKeyHash, IEndpointAttachStatusListener *listener=nullptr)=0
virtual bool isCurrentEndpointAttached()=0
virtual void addAttachedEndpointListListener(IAttachedEndpointListListener *listener)=0
virtual void removeAttachedEndpointListListener(IAttachedEndpointListListener *listener)=0
virtual const std::string & getEndpointAccessToken()=0
virtual void attachUser(const std::string &userExternalId, const std::string &userAccessToken, IEndpointAttachStatusListener *listener=nullptr)=0
virtual const AttachedEndpoints & getAttachedEndpoints()=0
virtual void attachEndpoint(const std::string &endpointAccessToken, IEndpointAttachStatusListener *listener=nullptr)=0