Creating seperate chains[STC_IN, STC_OUT, STC_FRWD] for STC Framework's rules.
[platform/core/connectivity/stc-manager.git] / src / stc-manager-gdbus.c
index 31a808d..bf556e6 100755 (executable)
@@ -18,7 +18,9 @@
 #include "stc-statistics.h"
 #include "stc-restriction.h"
 #include "stc-default-connection.h"
-#include "stc-app-ground-status.h"
+#include "stc-manager-plugin.h"
+#include "stc-app-lifecycle.h"
+#include "helper-iptables.h"
 
 static gboolean __stc_manager_gdbus_statistics_init(stc_s *stc)
 {
@@ -153,8 +155,9 @@ static void __stc_manager_gdbus_on_bus_acquired(GDBusConnection *connection,
        g_dbus_object_manager_server_set_connection(stc->obj_mgr,
                                                    stc->connection);
 
-       stc_app_ground_status_monitor_init(stc);
+       iptables_init();
        stc_default_connection_monitor_init(stc);
+       stc_register_state_changed_cb(stc, stc_manager_app_status_changed, NULL);
 
        __STC_LOG_FUNC_EXIT__;
 }
@@ -194,9 +197,12 @@ void stc_manager_gdbus_deinit(gpointer stc_data)
 {
        __STC_LOG_FUNC_ENTER__;
        stc_s *stc = (stc_s *)stc_data;
-       stc_app_ground_status_monitor_deinit(stc);
+
+       stc_deregister_state_changed_cb(stc);
        stc_default_connection_monitor_deinit(stc);
+
        g_bus_unown_name(stc->gdbus_owner_id);
+
        stc->statistics_obj = NULL;
        stc->restriction_obj = NULL;
        __STC_LOG_FUNC_EXIT__;