Refactoring structures for monitoring and restrictions
[platform/core/connectivity/stc-manager.git] / src / database / include / table-restrictions.h
old mode 100755 (executable)
new mode 100644 (file)
index d972b87..e9d46bf
@@ -21,11 +21,16 @@ typedef struct {
        char *app_id;
        char *ifname;
        char *subscriber_id;
+       char *mac;
        stc_iface_type_e iftype;
-       stc_restriction_state_e rst_state;
+       stc_rstn_type_e rstn_type;
        stc_roaming_type_e roaming;
        int64_t data_limit;
        int64_t data_warn_limit;
+       int64_t monthly_limit;
+       int64_t weekly_limit;
+       int64_t daily_limit;
+       int month_start_date;
        uint64_t restriction_id;
 } table_restrictions_info;
 
@@ -41,20 +46,22 @@ stc_error_e table_restrictions_per_app(const gchar *app_id,
                                       void *user_data);
 
 
-stc_error_e table_restrictions_get_restriction_state_subscriber_id(const char *app_id,
+stc_error_e table_restrictions_get_restriction_type_subscriber_id(const char *app_id,
                                                          stc_iface_type_e iftype,
                                                          const char *subscriber_id,
-                                                         stc_restriction_state_e *state);
+                                                         stc_rstn_type_e *type);
 
-stc_error_e table_restrictions_get_restriction_state(const char *app_id,
+stc_error_e table_restrictions_get_restriction_type(const char *app_id,
                                                     stc_iface_type_e iftype,
-                                                    stc_restriction_state_e *state);
+                                                    stc_rstn_type_e *type);
 
 stc_error_e table_restrictions_update(table_restrictions_info *info);
 
 stc_error_e table_restrictions_delete(const char *app_id,
                                      const stc_iface_type_e iftype,
-                                     const char *subscriber_id);
+                                     const char *ifname,
+                                     const char *subscriber_id,
+                                     const stc_roaming_type_e roaming);
 
 stc_error_e table_restrictions_prepare(sqlite3 *db);