#include "stc-statistics.h"
#include "stc-restriction.h"
#include "stc-default-connection.h"
-#include "stc-application-lifecycle.h"
+#include "stc-manager-plugin.h"
+#include "stc-app-lifecycle.h"
static gboolean __stc_manager_gdbus_statistics_init(stc_s *stc)
{
G_CALLBACK(handle_restriction_get_state),
stc);
- g_signal_connect(restriction, "handle-remove",
- G_CALLBACK(handle_restriction_remove), stc);
+ g_signal_connect(restriction, "handle-unset",
+ G_CALLBACK(handle_restriction_unset), stc);
/* Export the object (@manager takes its own reference to @object) */
g_dbus_object_manager_server_export(stc->obj_mgr,
g_dbus_object_manager_server_set_connection(stc->obj_mgr,
stc->connection);
- stc_application_lifecycle_monitor_init(stc);
stc_default_connection_monitor_init(stc);
+ stc_register_state_changed_cb(stc, stc_manager_app_status_changed, NULL);
__STC_LOG_FUNC_EXIT__;
}
{
__STC_LOG_FUNC_ENTER__;
stc_s *stc = (stc_s *)stc_data;
- stc_application_lifecycle_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__;