client-cpp  0.6.1
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 
23 #include "kaa/gen/BootstrapGen.hpp"
29 #include "kaa/gen/BootstrapGen.hpp"
33 
34 namespace kaa {
35 
36 class IPingServerStorage;
37 
41 class IDataChannel {
42 public:
43 
51  virtual void sync(TransportType type) = 0;
52 
56  virtual void syncAll() = 0;
57 
61  virtual void syncAck(TransportType type) = 0;
62 
70  virtual const std::string& getId() const = 0;
71 
79  virtual ChannelType getChannelType() const = 0;
80 
88  virtual ServerType getServerType() const = 0;
89 
97  virtual void setMultiplexer(IKaaDataMultiplexer *multiplexer) = 0;
98 
106  virtual void setDemultiplexer(IKaaDataDemultiplexer *demultiplexer) = 0;
107 
115  virtual void setServer(IServerInfoPtr server) = 0;
116 
125  virtual const std::map<TransportType, ChannelDirection>& getSupportedTransportTypes() const = 0;
126 
134  virtual void setConnectivityChecker(ConnectivityCheckerPtr checker) = 0;
135 
140  virtual void shutdown() = 0;
141 
146  virtual void pause() = 0;
147 
152  virtual void resume() = 0;
153 
154  virtual ~IDataChannel() {}
155 
156 };
157 
159 
160 } // namespace kaa
161 
162 
163 #endif /* IDATACHANNEL_HPP_ */
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
std::shared_ptr< IServerInfo > IServerInfoPtr
Definition: IServerInfo.hpp:53
virtual void setServer(IServerInfoPtr server)=0
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 ChannelType getChannelType() const =0
virtual void setDemultiplexer(IKaaDataDemultiplexer *demultiplexer)=0
virtual ~IDataChannel()