client-c  0.6.3
ext_log_upload_strategy.h File Reference

External log upload strategy interface used by Kaa data collection subsystem to decide when to upload or cleanup logs. Must be implemented in a concrete application for the data collection feature to function. More...

+ Include dependency graph for ext_log_upload_strategy.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  ext_log_upload_decision_t { NOOP = 0, UPLOAD = 1, CLEANUP = 2 }
 

Functions

ext_log_upload_decision_t ext_log_upload_strategy_decide (void *context, const void *log_storage_context, size_t *volume)
 Makes a decision whether to upload logs or cleanup the storage. More...
 

Detailed Description

External log upload strategy interface used by Kaa data collection subsystem to decide when to upload or cleanup logs. Must be implemented in a concrete application for the data collection feature to function.

Definition in file ext_log_upload_strategy.h.

Enumeration Type Documentation

Log upload decisions.

Enumerator
NOOP 

Nothing to do yet.

UPLOAD 

Trigger log upload.

CLEANUP 

Trigger log storage cleanup.

Definition at line 37 of file ext_log_upload_strategy.h.

Function Documentation

ext_log_upload_decision_t ext_log_upload_strategy_decide ( void *  context,
const void *  log_storage_context,
size_t *  volume 
)

Makes a decision whether to upload logs or cleanup the storage.

Parameters
[in]contextLog upload strategy context.
[in]log_storage_contextLog storage instance to operate against.
[out]volumeVolume of logs to process (in bytes). Zero if decision is NOOP.
Returns
Log upload decision.