Add a macro for tv profile
[platform/core/connectivity/stc-manager.git] / src / database / db-common.c
old mode 100755 (executable)
new mode 100644 (file)
index f5f1770..372eb03
@@ -19,6 +19,7 @@
 #include "table-statistics.h"
 #include "table-restrictions.h"
 #include "table-counters.h"
+#include "table-firewall.h"
 
 #ifndef DATABASE_FULL_PATH
 #define DATABASE_FULL_PATH "/opt/usr/dbspace/.stc-manager-datausage.db"
@@ -108,9 +109,12 @@ stc_error_e stc_db_initialize(void)
 
        stc_db_initialize_once();
 
+#ifndef TIZEN_TV_EXT
        EXEC(STC_ERROR_NONE, table_statistics_prepare(database));
        EXEC(STC_ERROR_NONE, table_restrictions_prepare(database));
        EXEC(STC_ERROR_NONE, table_counters_prepare(database));
+#endif
+       EXEC(STC_ERROR_NONE, table_firewall_prepare(database));
        EXEC(STC_ERROR_NONE, stc_init_db_guard());
 
        __STC_LOG_FUNC_EXIT__;
@@ -130,9 +134,12 @@ gboolean stc_db_deinitialize(void)
                return TRUE; //LCOV_EXCL_LINE
        }
 
+#ifndef TIZEN_TV_EXT
        table_statistics_finalize();
        table_restrictions_finalize();
        table_counters_finalize();
+#endif
+       table_firewall_finalize();
        sqlite3_close(database);
 
        __STC_LOG_FUNC_EXIT__;