client-cpp  0.10.0
ILogCollector.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 ILOGCOLLECTOR_HPP_
18 #define ILOGCOLLECTOR_HPP_
19 
20 #include <future>
21 
22 #include "kaa/log/gen/LogDefinitions.hpp"
23 #include "kaa/log/ILogStorage.hpp"
26 #include "kaa/log/RecordFuture.hpp"
27 
33 namespace kaa {
34 
35 /*
36  * Forward declaration.
37  */
38 struct LogSyncResponse;
39 
55 public:
67  virtual RecordFuture addLogRecord(const KaaUserLogRecord& record) = 0;
68 
78  virtual void setStorage(ILogStoragePtr storage) = 0;
79 
89  virtual void setUploadStrategy(ILogUploadStrategyPtr strategy) = 0;
90 
94  virtual void setLogDeliveryListener(ILogDeliveryListenerPtr listener) = 0;
95 
96  virtual ~ILogCollector() {}
97 };
98 
99 } // namespace kaa
100 
101 #endif /* ILOGCOLLECTOR_HPP_ */
std::shared_ptr< ILogDeliveryListener > ILogDeliveryListenerPtr
virtual void setStorage(ILogStoragePtr storage)=0
Sets the new log storage.
std::shared_ptr< ILogStorage > ILogStoragePtr
Definition: ILogStorage.hpp:93
virtual RecordFuture addLogRecord(const KaaUserLogRecord &record)=0
Adds a new log record to the log storage.
virtual void setUploadStrategy(ILogUploadStrategyPtr strategy)=0
Sets the new log upload strategy.
The public interface to the Kaa log collecting subsystem.
virtual void setLogDeliveryListener(ILogDeliveryListenerPtr listener)=0
Set a listener which receives a delivery status of each log bucket.
std::shared_ptr< ILogUploadStrategy > ILogUploadStrategyPtr
virtual ~ILogCollector()