client-cpp  0.10.0
IKaaChannelManager.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2016 CyberVision, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
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 IKAACHANNELMANAGER_HPP_
18 #define IKAACHANNELMANAGER_HPP_
19 
20 #include <list>
21 #include <string>
22 
27 
28 namespace kaa {
29 
30 class IIServerInfo;
31 
36 {
37 public:
38 
39  virtual void setFailoverStrategy(IFailoverStrategyPtr strategy) = 0;
40 
49  virtual void setChannel(TransportType type, IDataChannelPtr channel) = 0;
50 
58  virtual void addChannel(IDataChannelPtr channel) = 0;
59 
67  virtual void removeChannel(const std::string& id) = 0;
68 
76  virtual void removeChannel(IDataChannelPtr channel) = 0;
77 
85  virtual std::list<IDataChannelPtr> getChannels() = 0;
86 
98 
108  virtual IDataChannelPtr getChannel(const std::string& channelId) = 0;
109 
120  virtual void onServerFailed(ITransportConnectionInfoPtr connectionInfo, KaaFailoverReason reason) = 0;
121 
127  virtual void onConnected(const EndpointConnectionInfo& connection) = 0;
128 
136  virtual void onTransportConnectionInfoUpdated(ITransportConnectionInfoPtr connectionInfo) = 0;
137 
141  virtual void clearChannelList() = 0;
142 
150  virtual void setConnectivityChecker(ConnectivityCheckerPtr checker) = 0;
151 
156  virtual void shutdown() = 0;
157 
162  virtual void pause() = 0;
163 
168  virtual void resume() = 0;
169 
170  virtual ~IKaaChannelManager() {}
171 };
172 
174 
175 } // namespace kaa
176 
177 
178 #endif /* IKAACHANNELMANAGER_HPP_ */
virtual void onTransportConnectionInfoUpdated(ITransportConnectionInfoPtr connectionInfo)=0
virtual void setConnectivityChecker(ConnectivityCheckerPtr checker)=0
KaaFailoverReason
std::shared_ptr< IConnectivityChecker > ConnectivityCheckerPtr
std::shared_ptr< IFailoverStrategy > IFailoverStrategyPtr
virtual void onServerFailed(ITransportConnectionInfoPtr connectionInfo, KaaFailoverReason reason)=0
virtual IDataChannelPtr getChannelByTransportType(TransportType type)=0
virtual void addChannel(IDataChannelPtr channel)=0
virtual void pause()=0
virtual void setFailoverStrategy(IFailoverStrategyPtr strategy)=0
virtual void clearChannelList()=0
virtual void removeChannel(const std::string &id)=0
IKaaChannelManager * IKaaChannelManagerPtr
virtual std::list< IDataChannelPtr > getChannels()=0
virtual void onConnected(const EndpointConnectionInfo &connection)=0
virtual IDataChannelPtr getChannel(const std::string &channelId)=0
virtual void shutdown()=0
virtual void setChannel(TransportType type, IDataChannelPtr channel)=0
virtual void resume()=0
std::shared_ptr< ITransportConnectionInfo > ITransportConnectionInfoPtr