client-cpp  0.6.3
IDataChannel.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");
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 
30 
31 namespace kaa {
32 
33 class IPingServerStorage;
34 
38 class IDataChannel {
39 public:
40 
48  virtual void sync(TransportType type) = 0;
49 
53  virtual void syncAll() = 0;
54 
58  virtual void syncAck(TransportType type) = 0;
59 
67  virtual const std::string& getId() const = 0;
68 
76  virtual TransportProtocolId getTransportProtocolId() const = 0;
77 
85  virtual ServerType getServerType() const = 0;
86 
94  virtual void setMultiplexer(IKaaDataMultiplexer *multiplexer) = 0;
95 
103  virtual void setDemultiplexer(IKaaDataDemultiplexer *demultiplexer) = 0;
104 
112  virtual void setServer(ITransportConnectionInfoPtr connectionInfo) = 0;
113 
122  virtual const std::map<TransportType, ChannelDirection>& getSupportedTransportTypes() const = 0;
123 
131  virtual void setConnectivityChecker(ConnectivityCheckerPtr checker) = 0;
132 
137  virtual void shutdown() = 0;
138 
143  virtual void pause() = 0;
144 
149  virtual void resume() = 0;
150 
151  virtual ~IDataChannel() {}
152 
153 };
154 
156 
157 } // namespace kaa
158 
159 
160 #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 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 void setDemultiplexer(IKaaDataDemultiplexer *demultiplexer)=0
virtual ~IDataChannel()
std::shared_ptr< ITransportConnectionInfo > ITransportConnectionInfoPtr