Change-Id: I34cecc24a805bc577669d64fa05cf7fbab4460c7
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
Name: stc-manager
Summary: STC(Smart Traffic Control) manager
Name: stc-manager
Summary: STC(Smart Traffic Control) manager
Release: 0
Group: Network & Connectivity/Other
License: Apache-2.0
Release: 0
Group: Network & Connectivity/Other
License: Apache-2.0
export CFLAGS="$CFLAGS -D_GNU_SOURCE"
export CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE"
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} \
%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DBIN_DIR=%{_bindir} \
-DLIB_PATH=%{_lib} \
stc_db_initialize_once();
stc_db_initialize_once();
EXEC(STC_ERROR_NONE, table_statistics_prepare(database));
EXEC(STC_ERROR_NONE, table_restrictions_prepare(database));
EXEC(STC_ERROR_NONE, table_counters_prepare(database));
EXEC(STC_ERROR_NONE, table_statistics_prepare(database));
EXEC(STC_ERROR_NONE, table_restrictions_prepare(database));
EXEC(STC_ERROR_NONE, table_counters_prepare(database));
EXEC(STC_ERROR_NONE, table_firewall_prepare(database));
EXEC(STC_ERROR_NONE, stc_init_db_guard());
EXEC(STC_ERROR_NONE, table_firewall_prepare(database));
EXEC(STC_ERROR_NONE, stc_init_db_guard());
return TRUE; //LCOV_EXCL_LINE
}
return TRUE; //LCOV_EXCL_LINE
}
table_statistics_finalize();
table_restrictions_finalize();
table_counters_finalize();
table_statistics_finalize();
table_restrictions_finalize();
table_counters_finalize();
table_firewall_finalize();
sqlite3_close(database);
table_firewall_finalize();
sqlite3_close(database);
inotify_initialize();
inotify_register(INFO_STORAGE_DIR, __stc_inotify_handler);
inotify_initialize();
inotify_register(INFO_STORAGE_DIR, __stc_inotify_handler);
cgroup_set_release_agent(NET_CLS_SUBSYS, NET_RELEASE_AGENT);
cgroup_set_release_agent(NET_CLS_SUBSYS, NET_RELEASE_AGENT);
err = stc_db_initialize();
if (err != STC_ERROR_NONE) {
err = stc_db_initialize();
if (err != STC_ERROR_NONE) {
return NULL; //LCOV_EXCL_LINE
}
return NULL; //LCOV_EXCL_LINE
}
stc_plugin_appstatus_init();
stc_plugin_exception_init();
stc_plugin_procfs_init();
stc_plugin_tether_init();
stc_plugin_appstatus_init();
stc_plugin_exception_init();
stc_plugin_procfs_init();
stc_plugin_tether_init();
err = stc_monitor_init();
if (err != STC_ERROR_NONE) {
STC_LOGD("Failed to initialize stc manager"); //LCOV_EXCL_LINE
err = stc_monitor_init();
if (err != STC_ERROR_NONE) {
STC_LOGD("Failed to initialize stc manager"); //LCOV_EXCL_LINE
}
stc_plugin_procfs_load_pid();
}
stc_plugin_procfs_load_pid();
stc_manager_gdbus_init((gpointer)stc);
STC_LOGI("stc manager initialized");
stc_manager_gdbus_init((gpointer)stc);
STC_LOGI("stc manager initialized");