Add a macro for tv profile 87/192087/1
authorhyunuktak <hyunuk.tak@samsung.com>
Tue, 30 Oct 2018 05:35:50 +0000 (14:35 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Tue, 30 Oct 2018 05:35:52 +0000 (14:35 +0900)
Change-Id: I34cecc24a805bc577669d64fa05cf7fbab4460c7
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
packaging/stc-manager.spec
src/database/db-common.c
src/stc-manager.c

index d524683..e6285e0 100644 (file)
@@ -1,6 +1,6 @@
 Name:       stc-manager
 Summary:    STC(Smart Traffic Control) manager
-Version:    0.0.79
+Version:    0.0.80
 Release:    0
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
@@ -72,6 +72,10 @@ chmod 644 %{SOURCE0}
 export CFLAGS="$CFLAGS -D_GNU_SOURCE"
 export CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE"
 
+%if "%{tizen_profile_name}" == "tv"
+       CFLAGS+=" -DTIZEN_TV_EXT"
+%endif
+
 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
        -DBIN_DIR=%{_bindir} \
        -DLIB_PATH=%{_lib} \
index a4c2a3d..372eb03 100644 (file)
@@ -109,9 +109,11 @@ 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());
 
@@ -132,9 +134,11 @@ 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);
 
index a61a8ac..79acd88 100644 (file)
@@ -118,7 +118,9 @@ static stc_s *__stc_manager_init(void)
        inotify_initialize();
        inotify_register(INFO_STORAGE_DIR, __stc_inotify_handler);
 
+#ifndef TIZEN_TV_EXT
        cgroup_set_release_agent(NET_CLS_SUBSYS, NET_RELEASE_AGENT);
+#endif
 
        err = stc_db_initialize();
        if (err != STC_ERROR_NONE) {
@@ -126,13 +128,16 @@ static stc_s *__stc_manager_init(void)
                return NULL; //LCOV_EXCL_LINE
        }
 
+#ifndef TIZEN_TV_EXT
        stc_plugin_appstatus_init();
        stc_plugin_exception_init();
        stc_plugin_procfs_init();
        stc_plugin_tether_init();
+#endif
 
        stc_firewall_init();
 
+#ifndef TIZEN_TV_EXT
        err = stc_monitor_init();
        if (err != STC_ERROR_NONE) {
                STC_LOGD("Failed to initialize stc manager"); //LCOV_EXCL_LINE
@@ -140,6 +145,8 @@ static stc_s *__stc_manager_init(void)
        }
 
        stc_plugin_procfs_load_pid();
+#endif
+
        stc_manager_gdbus_init((gpointer)stc);
 
        STC_LOGI("stc manager initialized");