/* SessionStatus.c generated by valac 0.56.19, the Vala compiler
 * generated from SessionStatus.vala, do not modify */

/* SessionStatus.vala
 *
 * Copyright 2020 Dylan McCall <dylan@dylanmccall.ca>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#include "daemon.h"
#include <gio/gio.h>
#include "common.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib-object.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	BREAK_TIMER_DAEMON_SESSION_STATUS_0_PROPERTY,
	BREAK_TIMER_DAEMON_SESSION_STATUS_NUM_PROPERTIES
};
static GParamSpec* break_timer_daemon_session_status_properties[BREAK_TIMER_DAEMON_SESSION_STATUS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

struct _BreakTimerDaemonSessionStatusPrivate {
	GDBusConnection* dbus_connection;
	BreakTimerCommonIGnomeScreenSaver* screensaver;
	gboolean screensaver_is_active;
};

static gint BreakTimerDaemonSessionStatus_private_offset;
static gpointer break_timer_daemon_session_status_parent_class = NULL;
static BreakTimerCommonISessionStatusIface * break_timer_daemon_session_status_break_timer_common_isession_status_parent_iface = NULL;
static GInitableIface * break_timer_daemon_session_status_g_initable_parent_iface = NULL;

static gboolean break_timer_daemon_session_status_real_init (GInitable* base,
                                                      GCancellable* cancellable,
                                                      GError** error);
static void break_timer_daemon_session_status_screensaver_appeared (BreakTimerDaemonSessionStatus* self);
static void _break_timer_daemon_session_status_screensaver_appeared_gbus_name_appeared_callback (GDBusConnection* connection,
                                                                                          const gchar* name,
                                                                                          const gchar* name_owner,
                                                                                          gpointer self);
static void break_timer_daemon_session_status_screensaver_disappeared (BreakTimerDaemonSessionStatus* self);
static void _break_timer_daemon_session_status_screensaver_disappeared_gbus_name_vanished_callback (GDBusConnection* connection,
                                                                                             const gchar* name,
                                                                                             gpointer self);
static void break_timer_daemon_session_status_screensaver_active_changed_cb (BreakTimerDaemonSessionStatus* self,
                                                                      gboolean active);
static void _break_timer_daemon_session_status_screensaver_active_changed_cb_break_timer_common_ignome_screen_saver_active_changed (BreakTimerCommonIGnomeScreenSaver* _sender,
                                                                                                                             gboolean active,
                                                                                                                             gpointer self);
static gboolean break_timer_daemon_session_status_real_is_locked (BreakTimerCommonISessionStatus* base);
static void break_timer_daemon_session_status_real_lock_screen (BreakTimerCommonISessionStatus* base);
static void break_timer_daemon_session_status_real_blank_screen (BreakTimerCommonISessionStatus* base);
static void break_timer_daemon_session_status_real_unblank_screen (BreakTimerCommonISessionStatus* base);
static void break_timer_daemon_session_status_finalize (GObject * obj);
static GType break_timer_daemon_session_status_get_type_once (void);

static inline gpointer
break_timer_daemon_session_status_get_instance_private (BreakTimerDaemonSessionStatus* self)
{
	return G_STRUCT_MEMBER_P (self, BreakTimerDaemonSessionStatus_private_offset);
}

static void
_break_timer_daemon_session_status_screensaver_appeared_gbus_name_appeared_callback (GDBusConnection* connection,
                                                                                     const gchar* name,
                                                                                     const gchar* name_owner,
                                                                                     gpointer self)
{
	break_timer_daemon_session_status_screensaver_appeared ((BreakTimerDaemonSessionStatus*) self);
}

static void
_break_timer_daemon_session_status_screensaver_disappeared_gbus_name_vanished_callback (GDBusConnection* connection,
                                                                                        const gchar* name,
                                                                                        gpointer self)
{
	break_timer_daemon_session_status_screensaver_disappeared ((BreakTimerDaemonSessionStatus*) self);
}

static gboolean
break_timer_daemon_session_status_real_init (GInitable* base,
                                             GCancellable* cancellable,
                                             GError** error)
{
	BreakTimerDaemonSessionStatus * self;
	GDBusConnection* _tmp0_ = NULL;
	GDBusConnection* _tmp1_;
	GDBusConnection* _tmp3_;
	GDBusConnection* _tmp4_;
	GError* _inner_error0_ = NULL;
	gboolean result;
	self = (BreakTimerDaemonSessionStatus*) base;
	_tmp1_ = g_bus_get_sync (G_BUS_TYPE_SESSION, cancellable, &_inner_error0_);
	_tmp0_ = _tmp1_;
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gboolean _tmp2_ = FALSE;
		g_propagate_error (error, _inner_error0_);
		return _tmp2_;
	}
	_tmp3_ = _tmp0_;
	_tmp0_ = NULL;
	_g_object_unref0 (self->priv->dbus_connection);
	self->priv->dbus_connection = _tmp3_;
	_tmp4_ = self->priv->dbus_connection;
	g_bus_watch_name_on_connection_with_closures (_tmp4_, "org.gnome.ScreenSaver", G_BUS_NAME_WATCHER_FLAGS_NONE, (GClosure*) ((_break_timer_daemon_session_status_screensaver_appeared_gbus_name_appeared_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _break_timer_daemon_session_status_screensaver_appeared_gbus_name_appeared_callback, g_object_ref (self), (GClosureNotify) g_object_unref)), (GClosure*) ((_break_timer_daemon_session_status_screensaver_disappeared_gbus_name_vanished_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _break_timer_daemon_session_status_screensaver_disappeared_gbus_name_vanished_callback, g_object_ref (self), (GClosureNotify) g_object_unref)));
	result = TRUE;
	_g_object_unref0 (_tmp0_);
	return result;
}

static void
_break_timer_daemon_session_status_screensaver_active_changed_cb_break_timer_common_ignome_screen_saver_active_changed (BreakTimerCommonIGnomeScreenSaver* _sender,
                                                                                                                        gboolean active,
                                                                                                                        gpointer self)
{
	break_timer_daemon_session_status_screensaver_active_changed_cb ((BreakTimerDaemonSessionStatus*) self, active);
}

static void
break_timer_daemon_session_status_screensaver_appeared (BreakTimerDaemonSessionStatus* self)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	{
		BreakTimerCommonIGnomeScreenSaver* _tmp0_ = NULL;
		GDBusConnection* _tmp1_;
		BreakTimerCommonIGnomeScreenSaver* _tmp2_;
		BreakTimerCommonIGnomeScreenSaver* _tmp3_;
		BreakTimerCommonIGnomeScreenSaver* _tmp4_;
		gboolean _tmp5_ = FALSE;
		BreakTimerCommonIGnomeScreenSaver* _tmp6_;
		_tmp1_ = self->priv->dbus_connection;
		_tmp2_ = (BreakTimerCommonIGnomeScreenSaver*) g_initable_new (BREAK_TIMER_COMMON_TYPE_IGNOME_SCREEN_SAVER_PROXY, NULL, &_inner_error0_, "g-flags", 0, "g-name", "org.gnome.ScreenSaver", "g-connection", _tmp1_, "g-object-path", "/org/gnome/ScreenSaver", "g-interface-name", "org.gnome.ScreenSaver", NULL);
		_tmp0_ = (BreakTimerCommonIGnomeScreenSaver*) _tmp2_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			if (_inner_error0_->domain == G_IO_ERROR) {
				goto __catch0_g_io_error;
			}
			if (_inner_error0_->domain == G_DBUS_ERROR) {
				goto __catch0_g_dbus_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		_tmp3_ = _tmp0_;
		_tmp0_ = NULL;
		_g_object_unref0 (self->priv->screensaver);
		self->priv->screensaver = _tmp3_;
		_tmp4_ = self->priv->screensaver;
		g_signal_connect_object (_tmp4_, "active-changed", (GCallback) _break_timer_daemon_session_status_screensaver_active_changed_cb_break_timer_common_ignome_screen_saver_active_changed, self, 0);
		_tmp6_ = self->priv->screensaver;
		_tmp5_ = break_timer_common_ignome_screen_saver_get_active (_tmp6_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (_tmp0_);
			if (_inner_error0_->domain == G_IO_ERROR) {
				goto __catch0_g_io_error;
			}
			if (_inner_error0_->domain == G_DBUS_ERROR) {
				goto __catch0_g_dbus_error;
			}
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		self->priv->screensaver_is_active = _tmp5_;
		_g_object_unref0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_io_error:
	{
		GError* _error_ = NULL;
		GError* _tmp7_;
		const gchar* _tmp8_;
		_error_ = _inner_error0_;
		_inner_error0_ = NULL;
		_g_object_unref0 (self->priv->screensaver);
		self->priv->screensaver = NULL;
		_tmp7_ = _error_;
		_tmp8_ = _tmp7_->message;
		g_warning ("SessionStatus.vala:58: Error connecting to screensaver service: %s", _tmp8_);
		_g_error_free0 (_error_);
	}
	goto __finally0;
	__catch0_g_dbus_error:
	{
		GError* _error_ = NULL;
		GError* _tmp9_;
		const gchar* _tmp10_;
		_error_ = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp9_ = _error_;
		_tmp10_ = _tmp9_->message;
		g_warning ("SessionStatus.vala:60: Error getting screensaver active status: %s", _tmp10_);
		_g_error_free0 (_error_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
break_timer_daemon_session_status_screensaver_disappeared (BreakTimerDaemonSessionStatus* self)
{
	BreakTimerCommonIGnomeScreenSaver* _tmp0_;
	guint _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->screensaver;
	g_signal_parse_name ("active-changed", BREAK_TIMER_COMMON_TYPE_IGNOME_SCREEN_SAVER, &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp0_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _break_timer_daemon_session_status_screensaver_active_changed_cb_break_timer_common_ignome_screen_saver_active_changed, self);
	_g_object_unref0 (self->priv->screensaver);
	self->priv->screensaver = NULL;
}

static void
break_timer_daemon_session_status_screensaver_active_changed_cb (BreakTimerDaemonSessionStatus* self,
                                                                 gboolean active)
{
	g_return_if_fail (self != NULL);
	self->priv->screensaver_is_active = active;
	if (active) {
		g_signal_emit_by_name ((BreakTimerCommonISessionStatus*) self, "locked");
	} else {
		g_signal_emit_by_name ((BreakTimerCommonISessionStatus*) self, "unlocked");
	}
}

static gboolean
break_timer_daemon_session_status_real_is_locked (BreakTimerCommonISessionStatus* base)
{
	BreakTimerDaemonSessionStatus * self;
	BreakTimerCommonIGnomeScreenSaver* _tmp0_;
	gboolean result;
	self = (BreakTimerDaemonSessionStatus*) base;
	_tmp0_ = self->priv->screensaver;
	if (_tmp0_ != NULL) {
		result = self->priv->screensaver_is_active;
		return result;
	} else {
		result = FALSE;
		return result;
	}
}

static void
break_timer_daemon_session_status_real_lock_screen (BreakTimerCommonISessionStatus* base)
{
	BreakTimerDaemonSessionStatus * self;
	BreakTimerCommonIGnomeScreenSaver* _tmp0_;
	GError* _inner_error0_ = NULL;
	self = (BreakTimerDaemonSessionStatus*) base;
	_tmp0_ = self->priv->screensaver;
	if (_tmp0_ != NULL) {
		{
			BreakTimerCommonIGnomeScreenSaver* _tmp1_;
			_tmp1_ = self->priv->screensaver;
			break_timer_common_ignome_screen_saver_lock (_tmp1_, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				if (_inner_error0_->domain == G_IO_ERROR) {
					goto __catch0_g_io_error;
				}
				if (_inner_error0_->domain == G_DBUS_ERROR) {
					goto __catch0_g_dbus_error;
				}
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
				g_clear_error (&_inner_error0_);
				return;
			}
		}
		goto __finally0;
		__catch0_g_io_error:
		{
			GError* _error_ = NULL;
			GError* _tmp2_;
			const gchar* _tmp3_;
			_error_ = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp2_ = _error_;
			_tmp3_ = _tmp2_->message;
			g_warning ("SessionStatus.vala:91: Error connecting to screensaver service: %s", _tmp3_);
			_g_error_free0 (_error_);
		}
		goto __finally0;
		__catch0_g_dbus_error:
		{
			GError* _error_ = NULL;
			GError* _tmp4_;
			const gchar* _tmp5_;
			_error_ = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp4_ = _error_;
			_tmp5_ = _tmp4_->message;
			g_warning ("SessionStatus.vala:93: Error locking screen: %s", _tmp5_);
			_g_error_free0 (_error_);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
}

static void
break_timer_daemon_session_status_real_blank_screen (BreakTimerCommonISessionStatus* base)
{
	BreakTimerDaemonSessionStatus * self;
	BreakTimerCommonIGnomeScreenSaver* _tmp0_;
	GError* _inner_error0_ = NULL;
	self = (BreakTimerDaemonSessionStatus*) base;
	_tmp0_ = self->priv->screensaver;
	if (_tmp0_ != NULL) {
		{
			BreakTimerCommonIGnomeScreenSaver* _tmp1_;
			_tmp1_ = self->priv->screensaver;
			break_timer_common_ignome_screen_saver_set_active (_tmp1_, TRUE, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				if (_inner_error0_->domain == G_IO_ERROR) {
					goto __catch0_g_io_error;
				}
				if (_inner_error0_->domain == G_DBUS_ERROR) {
					goto __catch0_g_dbus_error;
				}
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
				g_clear_error (&_inner_error0_);
				return;
			}
		}
		goto __finally0;
		__catch0_g_io_error:
		{
			GError* _error_ = NULL;
			GError* _tmp2_;
			const gchar* _tmp3_;
			_error_ = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp2_ = _error_;
			_tmp3_ = _tmp2_->message;
			g_warning ("SessionStatus.vala:103: Error connecting to screensaver service: %s", _tmp3_);
			_g_error_free0 (_error_);
		}
		goto __finally0;
		__catch0_g_dbus_error:
		{
			GError* _error_ = NULL;
			GError* _tmp4_;
			const gchar* _tmp5_;
			_error_ = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp4_ = _error_;
			_tmp5_ = _tmp4_->message;
			g_warning ("SessionStatus.vala:105: Error blanking screeen: %s", _tmp5_);
			_g_error_free0 (_error_);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
}

static void
break_timer_daemon_session_status_real_unblank_screen (BreakTimerCommonISessionStatus* base)
{
	BreakTimerDaemonSessionStatus * self;
	BreakTimerCommonIGnomeScreenSaver* _tmp0_;
	GError* _inner_error0_ = NULL;
	self = (BreakTimerDaemonSessionStatus*) base;
	_tmp0_ = self->priv->screensaver;
	if (_tmp0_ != NULL) {
		{
			BreakTimerCommonIGnomeScreenSaver* _tmp1_;
			_tmp1_ = self->priv->screensaver;
			break_timer_common_ignome_screen_saver_set_active (_tmp1_, FALSE, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				if (_inner_error0_->domain == G_IO_ERROR) {
					goto __catch0_g_io_error;
				}
				if (_inner_error0_->domain == G_DBUS_ERROR) {
					goto __catch0_g_dbus_error;
				}
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
				g_clear_error (&_inner_error0_);
				return;
			}
		}
		goto __finally0;
		__catch0_g_io_error:
		{
			GError* _error_ = NULL;
			GError* _tmp2_;
			const gchar* _tmp3_;
			_error_ = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp2_ = _error_;
			_tmp3_ = _tmp2_->message;
			g_warning ("SessionStatus.vala:115: Error connecting to screensaver service: %s", _tmp3_);
			_g_error_free0 (_error_);
		}
		goto __finally0;
		__catch0_g_dbus_error:
		{
			GError* _error_ = NULL;
			GError* _tmp4_;
			const gchar* _tmp5_;
			_error_ = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp4_ = _error_;
			_tmp5_ = _tmp4_->message;
			g_warning ("SessionStatus.vala:117: Error unblanking screeen: %s", _tmp5_);
			_g_error_free0 (_error_);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
	}
}

BreakTimerDaemonSessionStatus*
break_timer_daemon_session_status_construct (GType object_type)
{
	BreakTimerDaemonSessionStatus * self = NULL;
	self = (BreakTimerDaemonSessionStatus*) g_object_new (object_type, NULL);
	return self;
}

BreakTimerDaemonSessionStatus*
break_timer_daemon_session_status_new (void)
{
	return break_timer_daemon_session_status_construct (BREAK_TIMER_DAEMON_TYPE_SESSION_STATUS);
}

static void
break_timer_daemon_session_status_class_init (BreakTimerDaemonSessionStatusClass * klass,
                                              gpointer klass_data)
{
	break_timer_daemon_session_status_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BreakTimerDaemonSessionStatus_private_offset);
	G_OBJECT_CLASS (klass)->finalize = break_timer_daemon_session_status_finalize;
}

static void
break_timer_daemon_session_status_break_timer_common_isession_status_interface_init (BreakTimerCommonISessionStatusIface * iface,
                                                                                     gpointer iface_data)
{
	break_timer_daemon_session_status_break_timer_common_isession_status_parent_iface = g_type_interface_peek_parent (iface);
	iface->is_locked = (gboolean (*) (BreakTimerCommonISessionStatus*)) break_timer_daemon_session_status_real_is_locked;
	iface->lock_screen = (void (*) (BreakTimerCommonISessionStatus*)) break_timer_daemon_session_status_real_lock_screen;
	iface->blank_screen = (void (*) (BreakTimerCommonISessionStatus*)) break_timer_daemon_session_status_real_blank_screen;
	iface->unblank_screen = (void (*) (BreakTimerCommonISessionStatus*)) break_timer_daemon_session_status_real_unblank_screen;
}

static void
break_timer_daemon_session_status_g_initable_interface_init (GInitableIface * iface,
                                                             gpointer iface_data)
{
	break_timer_daemon_session_status_g_initable_parent_iface = g_type_interface_peek_parent (iface);
	iface->init = (gboolean (*) (GInitable*, GCancellable*, GError**)) break_timer_daemon_session_status_real_init;
}

static void
break_timer_daemon_session_status_instance_init (BreakTimerDaemonSessionStatus * self,
                                                 gpointer klass)
{
	self->priv = break_timer_daemon_session_status_get_instance_private (self);
	self->priv->screensaver_is_active = FALSE;
}

static void
break_timer_daemon_session_status_finalize (GObject * obj)
{
	BreakTimerDaemonSessionStatus * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BREAK_TIMER_DAEMON_TYPE_SESSION_STATUS, BreakTimerDaemonSessionStatus);
	_g_object_unref0 (self->priv->dbus_connection);
	_g_object_unref0 (self->priv->screensaver);
	G_OBJECT_CLASS (break_timer_daemon_session_status_parent_class)->finalize (obj);
}

/**
 * Abstraction of GNOME Screensaver's dbus interface with gentle defaults in
 * case we are unable to connect.
 */
static GType
break_timer_daemon_session_status_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BreakTimerDaemonSessionStatusClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) break_timer_daemon_session_status_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BreakTimerDaemonSessionStatus), 0, (GInstanceInitFunc) break_timer_daemon_session_status_instance_init, NULL };
	static const GInterfaceInfo break_timer_common_isession_status_info = { (GInterfaceInitFunc) break_timer_daemon_session_status_break_timer_common_isession_status_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo g_initable_info = { (GInterfaceInitFunc) break_timer_daemon_session_status_g_initable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType break_timer_daemon_session_status_type_id;
	break_timer_daemon_session_status_type_id = g_type_register_static (G_TYPE_OBJECT, "BreakTimerDaemonSessionStatus", &g_define_type_info, 0);
	g_type_add_interface_static (break_timer_daemon_session_status_type_id, BREAK_TIMER_COMMON_TYPE_ISESSION_STATUS, &break_timer_common_isession_status_info);
	g_type_add_interface_static (break_timer_daemon_session_status_type_id, g_initable_get_type (), &g_initable_info);
	BreakTimerDaemonSessionStatus_private_offset = g_type_add_instance_private (break_timer_daemon_session_status_type_id, sizeof (BreakTimerDaemonSessionStatusPrivate));
	return break_timer_daemon_session_status_type_id;
}

GType
break_timer_daemon_session_status_get_type (void)
{
	static volatile gsize break_timer_daemon_session_status_type_id__once = 0;
	if (g_once_init_enter (&break_timer_daemon_session_status_type_id__once)) {
		GType break_timer_daemon_session_status_type_id;
		break_timer_daemon_session_status_type_id = break_timer_daemon_session_status_get_type_once ();
		g_once_init_leave (&break_timer_daemon_session_status_type_id__once, break_timer_daemon_session_status_type_id);
	}
	return break_timer_daemon_session_status_type_id__once;
}

