client-cpp  0.10.0
IDataChannel.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 IDATACHANNEL_HPP_
18 #define IDATACHANNEL_HPP_
19 
20 #include <vector>
21 #include <map>
22 
31 
32 namespace kaa {
33 
34 class IPingServerStorage;
35 
39 class IDataChannel {
40 public:
41 
42 
43  virtual void setFailoverStrategy(IFailoverStrategyPtr strategy) = 0;
44 
52  virtual void sync(TransportType type) = 0;
53 
57  virtual void syncAll() = 0;
58 
62  virtual void syncAck(TransportType type) = 0;
63 
71  virtual const std::string& getId() const = 0;
72 
80  virtual TransportProtocolId getTransportProtocolId() const = 0;
81 
89  virtual ServerType getServerType() const = 0;
90 
98  virtual void setMultiplexer(IKaaDataMultiplexer *multiplexer) = 0;
99 
107  virtual void setDemultiplexer(IKaaDataDemultiplexer *demultiplexer) = 0;
108 
116  virtual void setServer(ITransportConnectionInfoPtr connectionInfo) = 0;
117 
126 
135  virtual const std::map<TransportType, ChannelDirection>& getSupportedTransportTypes() const = 0;
136 
144  virtual void setConnectivityChecker(ConnectivityCheckerPtr checker) = 0;
145 
150  virtual void shutdown() = 0;
151 
156  virtual void pause() = 0;
157 
162  virtual void resume() = 0;
163 
164  virtual ~IDataChannel() {}
165 
166 };
167 
169 
170 } // namespace kaa
171 
172 
173 #endif /* IDATACHANNEL_HPP_ */
virtual void setServer(ITransportConnectionInfoPtr connectionInfo)=0
virtual TransportProtocolId getTransportProtocolId() const =0
virtual void pause()=0
std::shared_ptr< IConnectivityChecker > ConnectivityCheckerPtr
virtual void setFailoverStrategy(IFailoverStrategyPtr strategy)=0
std::shared_ptr< IFailoverStrategy > IFailoverStrategyPtr
virtual void syncAck(TransportType type)=0
virtual void setConnectivityChecker(ConnectivityCheckerPtr checker)=0
virtual void syncAll()=0
virtual void sync(TransportType type)=0
ServerType
Definition: ServerType.hpp:22
IDataChannel * IDataChannelPtr
virtual const std::string & getId() const =0
virtual const std::map< TransportType, ChannelDirection > & getSupportedTransportTypes() const =0
virtual ServerType getServerType() const =0
virtual void shutdown()=0
virtual void setMultiplexer(IKaaDataMultiplexer *multiplexer)=0
virtual void resume()=0
virtual ITransportConnectionInfoPtr getServer()=0
virtual void setDemultiplexer(IKaaDataDemultiplexer *demultiplexer)=0
virtual ~IDataChannel()
std::shared_ptr< ITransportConnectionInfo > ITransportConnectionInfoPtr