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