client-cpp  0.10.0
SyncDataProcessor.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 SYNC_DATA_PROCESSOR_HPP_
18 #define SYNC_DATA_PROCESSOR_HPP_
19 
23 #include "kaa/gen/EndpointGen.hpp"
24 
36 
37 namespace kaa {
38 
39 typedef std::shared_ptr<IMetaDataTransport> IMetaDataTransportPtr;
40 typedef std::shared_ptr<IBootstrapTransport> IBootstrapTransportPtr;
41 typedef std::shared_ptr<IConfigurationTransport> IConfigurationTransportPtr;
42 typedef std::shared_ptr<INotificationTransport> INotificationTransportPtr;
43 typedef std::shared_ptr<IUserTransport> IUserTransportPtr;
44 typedef std::shared_ptr<IEventTransport> IEventTransportPtr;
45 typedef std::shared_ptr<ILoggingTransport> ILoggingTransportPtr;
46 typedef std::shared_ptr<IRedirectionTransport> IRedirectionTransportPtr;
47 
49 public:
60 
61  virtual std::vector<std::uint8_t> compileRequest(const std::map<TransportType, ChannelDirection>& transportTypes);
62  virtual DemultiplexerReturnCode processResponse(const std::vector<std::uint8_t> &response);
63 private:
64  AvroByteArrayConverter<SyncRequest> requestConverter_;
65  AvroByteArrayConverter<SyncResponse> responseConverter_;
66 
67  IMetaDataTransportPtr metaDataTransport_;
68  IBootstrapTransportPtr bootstrapTransport_;
69  IProfileTransportPtr profileTransport_;
70  IConfigurationTransportPtr configurationTransport_;
71  INotificationTransportPtr notificationTransport_;
72  IUserTransportPtr userTransport_;
73  IEventTransportPtr eventTransport_;
74  ILoggingTransportPtr loggingTransport_;
75  IRedirectionTransportPtr redirectionTransport_;
76 
77  IKaaClientStateStoragePtr clientStatus_;
78 
79  std::int32_t requestId;
80 
81  IKaaClientContext &context_;
82 };
83 
84 } // namespace kaa
85 
86 
87 #endif /* SYNC_DATA_PROCESSOR_HPP_ */
virtual DemultiplexerReturnCode processResponse(const std::vector< std::uint8_t > &response)
virtual std::vector< std::uint8_t > compileRequest(const std::map< TransportType, ChannelDirection > &transportTypes)
std::shared_ptr< IConfigurationTransport > IConfigurationTransportPtr
std::shared_ptr< IBootstrapTransport > IBootstrapTransportPtr
std::shared_ptr< IUserTransport > IUserTransportPtr
std::shared_ptr< IKaaClientStateStorage > IKaaClientStateStoragePtr
std::shared_ptr< ILoggingTransport > ILoggingTransportPtr
std::shared_ptr< IMetaDataTransport > IMetaDataTransportPtr
std::shared_ptr< INotificationTransport > INotificationTransportPtr
std::shared_ptr< IRedirectionTransport > IRedirectionTransportPtr
SyncDataProcessor(IMetaDataTransportPtr, IBootstrapTransportPtr, IProfileTransportPtr, IConfigurationTransportPtr, INotificationTransportPtr, IUserTransportPtr, IEventTransportPtr, ILoggingTransportPtr, IRedirectionTransportPtr, IKaaClientContext &)
std::shared_ptr< IEventTransport > IEventTransportPtr
std::shared_ptr< IProfileTransport > IProfileTransportPtr