client-cpp  0.10.0
ConfigurationTransport.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 CONFIGURATIONTRANSPORT_HPP_
18 #define CONFIGURATIONTRANSPORT_HPP_
19 
20 #include "kaa/KaaDefaults.hpp"
21 
26 
27 namespace kaa {
28 
29 class IKaaChannelManager;
30 class IConfigurationProcessor;
31 class IConfigurationHashContainer;
32 
33 class ConfigurationTransport : public AbstractKaaTransport<TransportType::CONFIGURATION>,
35 public:
37 
38  virtual void sync();
39 
40  virtual std::shared_ptr<ConfigurationSyncRequest> createConfigurationRequest();
41  virtual void onConfigurationResponse(const ConfigurationSyncResponse &response);
42 
44  {
45  hashContainer_ = container;
46  }
47 
49  {
50  configurationProcessor_ = processor;
51  }
52 
53  virtual ~ConfigurationTransport() noexcept {}
54 
55 private:
56  IConfigurationProcessor *configurationProcessor_;
57  IConfigurationHashContainer *hashContainer_;
58 };
59 
60 } // namespace kaa
61 
62 #endif /* CONFIGURATIONTRANSPORT_HPP_ */
virtual void setConfigurationProcessor(IConfigurationProcessor *processor)
virtual void onConfigurationResponse(const ConfigurationSyncResponse &response)
ConfigurationTransport(IKaaChannelManager &channelManager, IKaaClientContext &context)
virtual std::shared_ptr< ConfigurationSyncRequest > createConfigurationRequest()
virtual ~ConfigurationTransport() noexcept
virtual void setConfigurationHashContainer(IConfigurationHashContainer *container)