Kaa client C SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ext_log_upload_strategies.h
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 KAA_EXT_LOG_UPLOAD_STRATEGIES_H_
18 #define KAA_EXT_LOG_UPLOAD_STRATEGIES_H_
19 
20 #include <stdint.h>
21 #include "kaa_common.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #define THRESHOLD_VOLUME_FLAG 0x01
28 #define THRESHOLD_COUNT_FLAG 0x02
29 #define TIMEOUT_FLAG 0x04
30 
31 #define KAA_LOG_UPLOAD_VOLUME_STRATEGY (THRESHOLD_VOLUME_FLAG | THRESHOLD_COUNT_FLAG)
32 #define KAA_LOG_UPLOAD_BY_TIMEOUT_STRATEGY (TIMEOUT_FLAG)
33 #define KAA_LOG_UPLOAD_BY_RECORD_COUNT (THRESHOLD_COUNT_FLAG)
34 #define KAA_LOG_UPLOAD_BY_RECORD_COUNT_AND_TIMELIMIT (THRESHOLD_COUNT_FLAG | TIMEOUT_FLAG)
35 #define KAA_LOG_UPLOAD_BY_STORAGE_SIZE (THRESHOLD_VOLUME_FLAG)
36 #define KAA_LOG_UPLOAD_BY_STORAGE_SIZE_AND_TIMELIMIT (THRESHOLD_VOLUME_FLAG | TIMEOUT_FLAG)
37 
38 
39 kaa_error_t ext_log_upload_strategy_change_strategy(void *strategy, uint8_t type);
40 
48 kaa_error_t ext_log_upload_strategy_set_threshold_volume(void *strategy, size_t threshold_volume);
49 
50 
51 
59 kaa_error_t ext_log_upload_strategy_set_threshold_count(void *strategy, size_t threshold_count);
60 
61 
62 
70 kaa_error_t ext_log_upload_strategy_set_upload_timeout(void *strategy, size_t upload_timeout);
71 
72 
73 
82 
83 
91 kaa_error_t ext_log_upload_strategy_set_upload_retry_period(void *strategy, size_t upload_retry_period);
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 
97 #endif /* KAA_EXT_LOG_UPLOAD_STRATEGIES_H_ */
kaa_error_t ext_log_upload_strategy_set_upload_timeout(void *strategy, size_t upload_timeout)
Sets the new upload timeout to the strategy.
Common C EP SDK definitions and small utilities.
kaa_error_t ext_log_upload_strategy_set_max_parallel_uploads(void *strategy, size_t count)
Sets the max amount of log batches allowed to be uploaded parallel.
kaa_error_t
Definition: kaa_error.h:31
kaa_error_t ext_log_upload_strategy_set_threshold_volume(void *strategy, size_t threshold_volume)
Sets the new threshold log volume to the strategy.
kaa_error_t ext_log_upload_strategy_set_threshold_count(void *strategy, size_t threshold_count)
Sets the new threshold log count to the strategy.
kaa_error_t ext_log_upload_strategy_change_strategy(void *strategy, uint8_t type)
kaa_error_t ext_log_upload_strategy_set_upload_retry_period(void *strategy, size_t upload_retry_period)
Sets the new upload retry period to the strategy.