Added data limits monitoring for daily, weekly and monthly
[platform/core/connectivity/stc-manager.git] / src / database / include / table-counters.h
index a0ef60d..5faff83 100644 (file)
 typedef struct {
        uint64_t restriction_id;
        int64_t data_counter;
+       int64_t warn_counter;
+       int64_t monthly_counter;
+       int64_t weekly_counter;
+       int64_t daily_counter;
+       int32_t month_start_date;
+       int64_t month_start_ts;
+       int64_t week_start_ts;
+       int64_t day_start_ts;
 } table_counters_info;
 
 typedef stc_cb_ret_e(*table_counters_info_cb)(const table_counters_info *info,
@@ -30,7 +38,10 @@ stc_error_e table_counters_get(uint64_t restriction_id,
 
 stc_error_e table_counters_update_counters(const table_counters_info *info);
 
-stc_error_e table_counters_insert(const table_counters_info *info);
+stc_error_e table_counters_get_timestamps(uint64_t restriction_id,
+                                       table_counters_info *info);
+
+stc_error_e table_counters_update_timestamps(const table_counters_info *info);
 
 stc_error_e table_counters_delete(uint64_t restriction_id);