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

/* RestBreakController.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 <glib.h>
#include <json-glib/json-glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.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_REST_BREAK_REST_BREAK_CONTROLLER_0_PROPERTY,
	BREAK_TIMER_DAEMON_REST_BREAK_REST_BREAK_CONTROLLER_LOCK_SCREEN_ENABLED_PROPERTY,
	BREAK_TIMER_DAEMON_REST_BREAK_REST_BREAK_CONTROLLER_NUM_PROPERTIES
};
static GParamSpec* break_timer_daemon_rest_break_rest_break_controller_properties[BREAK_TIMER_DAEMON_REST_BREAK_REST_BREAK_CONTROLLER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	BREAK_TIMER_DAEMON_REST_BREAK_REST_BREAK_CONTROLLER_CURRENT_DURATION_CHANGED_SIGNAL,
	BREAK_TIMER_DAEMON_REST_BREAK_REST_BREAK_CONTROLLER_NUM_SIGNALS
};
static guint break_timer_daemon_rest_break_rest_break_controller_signals[BREAK_TIMER_DAEMON_REST_BREAK_REST_BREAK_CONTROLLER_NUM_SIGNALS] = {0};

struct _BreakTimerDaemonRestBreakRestBreakControllerPrivate {
	gboolean _lock_screen_enabled;
	BreakTimerDaemonUtilCountdown* reminder_countdown;
};

static gint BreakTimerDaemonRestBreakRestBreakController_private_offset;
static gpointer break_timer_daemon_rest_break_rest_break_controller_parent_class = NULL;

static void __lambda14_ (BreakTimerDaemonRestBreakRestBreakController* self,
                  GObject* s,
                  GParamSpec* p);
static void ___lambda14__g_object_notify (GObject* _sender,
                                   GParamSpec* pspec,
                                   gpointer self);
static void __lambda15_ (BreakTimerDaemonRestBreakRestBreakController* self);
static void ___lambda15__break_timer_daemon_break_break_controller_activated (BreakTimerDaemonBreakBreakController* _sender,
                                                                       gpointer self);
static void break_timer_daemon_rest_break_rest_break_controller_counting_cb (BreakTimerDaemonRestBreakRestBreakController* self,
                                                                      gint lap_time,
                                                                      gint total_time);
static void _break_timer_daemon_rest_break_rest_break_controller_counting_cb_break_timer_daemon_timer_break_timer_break_controller_counting (BreakTimerDaemonTimerBreakTimerBreakController* _sender,
                                                                                                                                      gint lap_time,
                                                                                                                                      gint total_time,
                                                                                                                                      gpointer self);
static void break_timer_daemon_rest_break_rest_break_controller_delayed_cb (BreakTimerDaemonRestBreakRestBreakController* self,
                                                                     gint lap_time,
                                                                     gint total_time);
static void _break_timer_daemon_rest_break_rest_break_controller_delayed_cb_break_timer_daemon_timer_break_timer_break_controller_delayed (BreakTimerDaemonTimerBreakTimerBreakController* _sender,
                                                                                                                                    gint lap_time,
                                                                                                                                    gint total_time,
                                                                                                                                    gpointer self);
static JsonObject* break_timer_daemon_rest_break_rest_break_controller_real_serialize (BreakTimerDaemonBreakBreakController* base);
static void break_timer_daemon_rest_break_rest_break_controller_real_deserialize (BreakTimerDaemonBreakBreakController* base,
                                                                           JsonObject** json_root);
static void break_timer_daemon_rest_break_rest_break_controller_finalize (GObject * obj);
static GType break_timer_daemon_rest_break_rest_break_controller_get_type_once (void);
static void _vala_break_timer_daemon_rest_break_rest_break_controller_get_property (GObject * object,
                                                                             guint property_id,
                                                                             GValue * value,
                                                                             GParamSpec * pspec);
static void _vala_break_timer_daemon_rest_break_rest_break_controller_set_property (GObject * object,
                                                                             guint property_id,
                                                                             const GValue * value,
                                                                             GParamSpec * pspec);

static inline gpointer
break_timer_daemon_rest_break_rest_break_controller_get_instance_private (BreakTimerDaemonRestBreakRestBreakController* self)
{
	return G_STRUCT_MEMBER_P (self, BreakTimerDaemonRestBreakRestBreakController_private_offset);
}

static void
__lambda14_ (BreakTimerDaemonRestBreakRestBreakController* self,
             GObject* s,
             GParamSpec* p)
{
	BreakTimerDaemonUtilCountdown* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (s != NULL);
	g_return_if_fail (p != NULL);
	_tmp0_ = self->priv->reminder_countdown;
	_tmp1_ = break_timer_daemon_timer_break_timer_break_controller_get_interval ((BreakTimerDaemonTimerBreakTimerBreakController*) self);
	_tmp2_ = _tmp1_;
	break_timer_daemon_util_countdown_set_base_duration (_tmp0_, _tmp2_ / 4);
}

static void
___lambda14__g_object_notify (GObject* _sender,
                              GParamSpec* pspec,
                              gpointer self)
{
	__lambda14_ ((BreakTimerDaemonRestBreakRestBreakController*) self, _sender, pspec);
}

static void
__lambda15_ (BreakTimerDaemonRestBreakRestBreakController* self)
{
	BreakTimerDaemonUtilCountdown* _tmp0_;
	_tmp0_ = self->priv->reminder_countdown;
	break_timer_daemon_util_countdown_reset (_tmp0_);
}

static void
___lambda15__break_timer_daemon_break_break_controller_activated (BreakTimerDaemonBreakBreakController* _sender,
                                                                  gpointer self)
{
	__lambda15_ ((BreakTimerDaemonRestBreakRestBreakController*) self);
}

static void
_break_timer_daemon_rest_break_rest_break_controller_counting_cb_break_timer_daemon_timer_break_timer_break_controller_counting (BreakTimerDaemonTimerBreakTimerBreakController* _sender,
                                                                                                                                 gint lap_time,
                                                                                                                                 gint total_time,
                                                                                                                                 gpointer self)
{
	break_timer_daemon_rest_break_rest_break_controller_counting_cb ((BreakTimerDaemonRestBreakRestBreakController*) self, lap_time, total_time);
}

static void
_break_timer_daemon_rest_break_rest_break_controller_delayed_cb_break_timer_daemon_timer_break_timer_break_controller_delayed (BreakTimerDaemonTimerBreakTimerBreakController* _sender,
                                                                                                                               gint lap_time,
                                                                                                                               gint total_time,
                                                                                                                               gpointer self)
{
	break_timer_daemon_rest_break_rest_break_controller_delayed_cb ((BreakTimerDaemonRestBreakRestBreakController*) self, lap_time, total_time);
}

BreakTimerDaemonRestBreakRestBreakController*
break_timer_daemon_rest_break_rest_break_controller_construct (GType object_type,
                                                               BreakTimerDaemonActivityActivityMonitor* activity_monitor)
{
	BreakTimerDaemonRestBreakRestBreakController * self = NULL;
	gint _tmp0_;
	gint _tmp1_;
	BreakTimerDaemonUtilCountdown* _tmp2_;
	g_return_val_if_fail (activity_monitor != NULL, NULL);
	self = (BreakTimerDaemonRestBreakRestBreakController*) break_timer_daemon_timer_break_timer_break_controller_construct (object_type, activity_monitor, 5);
	_tmp0_ = break_timer_daemon_timer_break_timer_break_controller_get_interval ((BreakTimerDaemonTimerBreakTimerBreakController*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = break_timer_daemon_util_countdown_new (_tmp1_ / 4);
	_g_object_unref0 (self->priv->reminder_countdown);
	self->priv->reminder_countdown = _tmp2_;
	g_signal_connect_object ((GObject*) self, "notify::interval", (GCallback) ___lambda14__g_object_notify, self, 0);
	g_signal_connect_object ((BreakTimerDaemonBreakBreakController*) self, "activated", (GCallback) ___lambda15__break_timer_daemon_break_break_controller_activated, self, 0);
	g_signal_connect_object ((BreakTimerDaemonTimerBreakTimerBreakController*) self, "counting", (GCallback) _break_timer_daemon_rest_break_rest_break_controller_counting_cb_break_timer_daemon_timer_break_timer_break_controller_counting, self, 0);
	g_signal_connect_object ((BreakTimerDaemonTimerBreakTimerBreakController*) self, "delayed", (GCallback) _break_timer_daemon_rest_break_rest_break_controller_delayed_cb_break_timer_daemon_timer_break_timer_break_controller_delayed, self, 0);
	return self;
}

BreakTimerDaemonRestBreakRestBreakController*
break_timer_daemon_rest_break_rest_break_controller_new (BreakTimerDaemonActivityActivityMonitor* activity_monitor)
{
	return break_timer_daemon_rest_break_rest_break_controller_construct (BREAK_TIMER_DAEMON_REST_BREAK_TYPE_REST_BREAK_CONTROLLER, activity_monitor);
}

static JsonObject*
break_timer_daemon_rest_break_rest_break_controller_real_serialize (BreakTimerDaemonBreakBreakController* base)
{
	BreakTimerDaemonRestBreakRestBreakController * self;
	JsonObject* json_root = NULL;
	JsonObject* _tmp0_;
	BreakTimerDaemonUtilCountdown* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	JsonObject* result;
	self = (BreakTimerDaemonRestBreakRestBreakController*) base;
	_tmp0_ = BREAK_TIMER_DAEMON_BREAK_BREAK_CONTROLLER_CLASS (break_timer_daemon_rest_break_rest_break_controller_parent_class)->serialize ((BreakTimerDaemonBreakBreakController*) G_TYPE_CHECK_INSTANCE_CAST (self, BREAK_TIMER_DAEMON_TIMER_BREAK_TYPE_TIMER_BREAK_CONTROLLER, BreakTimerDaemonTimerBreakTimerBreakController));
	json_root = _tmp0_;
	_tmp1_ = self->priv->reminder_countdown;
	_tmp2_ = break_timer_daemon_util_countdown_serialize (_tmp1_);
	_tmp3_ = _tmp2_;
	json_object_set_string_member (json_root, "reminder_countdown", _tmp3_);
	_g_free0 (_tmp3_);
	result = json_root;
	return result;
}

static void
break_timer_daemon_rest_break_rest_break_controller_real_deserialize (BreakTimerDaemonBreakBreakController* base,
                                                                      JsonObject** json_root)
{
	BreakTimerDaemonRestBreakRestBreakController * self;
	BreakTimerDaemonUtilCountdown* _tmp0_;
	const gchar* _tmp1_;
	self = (BreakTimerDaemonRestBreakRestBreakController*) base;
	g_return_if_fail (*json_root != NULL);
	BREAK_TIMER_DAEMON_BREAK_BREAK_CONTROLLER_CLASS (break_timer_daemon_rest_break_rest_break_controller_parent_class)->deserialize ((BreakTimerDaemonBreakBreakController*) G_TYPE_CHECK_INSTANCE_CAST (self, BREAK_TIMER_DAEMON_TIMER_BREAK_TYPE_TIMER_BREAK_CONTROLLER, BreakTimerDaemonTimerBreakTimerBreakController), json_root);
	_tmp0_ = self->priv->reminder_countdown;
	_tmp1_ = json_object_get_string_member (*json_root, "reminder_countdown");
	break_timer_daemon_util_countdown_deserialize (_tmp0_, _tmp1_, FALSE);
}

static void
break_timer_daemon_rest_break_rest_break_controller_counting_cb (BreakTimerDaemonRestBreakRestBreakController* self,
                                                                 gint lap_time,
                                                                 gint total_time)
{
	BreakTimerDaemonUtilCountdown* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->reminder_countdown;
	break_timer_daemon_util_countdown_pause (_tmp0_);
	if (lap_time > 60) {
		BreakTimerDaemonUtilCountdown* _tmp1_;
		_tmp1_ = self->priv->reminder_countdown;
		break_timer_daemon_util_countdown_reset (_tmp1_);
	}
}

static void
break_timer_daemon_rest_break_rest_break_controller_delayed_cb (BreakTimerDaemonRestBreakRestBreakController* self,
                                                                gint lap_time,
                                                                gint total_time)
{
	gboolean _tmp0_ = FALSE;
	BreakTimerDaemonBreakBreakControllerState _tmp1_;
	BreakTimerDaemonBreakBreakControllerState _tmp2_;
	BreakTimerDaemonUtilCountdown* _tmp4_;
	BreakTimerDaemonUtilCountdown* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp1_ = break_timer_daemon_break_break_controller_get_state ((BreakTimerDaemonBreakBreakController*) self);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == BREAK_TIMER_DAEMON_BREAK_BREAK_CONTROLLER_STATE_WAITING) {
		_tmp0_ = lap_time > 10;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		BreakTimerDaemonUtilCountdown* _tmp3_;
		_tmp3_ = ((BreakTimerDaemonTimerBreakTimerBreakController*) self)->duration_countdown;
		break_timer_daemon_util_countdown_reset (_tmp3_);
	}
	_tmp4_ = self->priv->reminder_countdown;
	break_timer_daemon_util_countdown_continue (_tmp4_);
	_tmp5_ = self->priv->reminder_countdown;
	if (break_timer_daemon_util_countdown_is_finished (_tmp5_)) {
		gint new_penalty = 0;
		BreakTimerDaemonUtilCountdown* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		gint _tmp10_;
		BreakTimerDaemonUtilCountdown* _tmp11_;
		BreakTimerDaemonUtilCountdown* _tmp12_;
		BreakTimerDaemonUtilCountdown* _tmp13_;
		_tmp6_ = ((BreakTimerDaemonTimerBreakTimerBreakController*) self)->duration_countdown;
		_tmp7_ = break_timer_daemon_timer_break_timer_break_controller_get_duration ((BreakTimerDaemonTimerBreakTimerBreakController*) self);
		_tmp8_ = _tmp7_;
		new_penalty = break_timer_daemon_util_countdown_get_penalty (_tmp6_) + (_tmp8_ / 4);
		_tmp9_ = break_timer_daemon_timer_break_timer_break_controller_get_duration ((BreakTimerDaemonTimerBreakTimerBreakController*) self);
		_tmp10_ = _tmp9_;
		new_penalty = MIN (new_penalty, _tmp10_ / 2);
		_tmp11_ = ((BreakTimerDaemonTimerBreakTimerBreakController*) self)->duration_countdown;
		break_timer_daemon_util_countdown_reset (_tmp11_);
		_tmp12_ = ((BreakTimerDaemonTimerBreakTimerBreakController*) self)->duration_countdown;
		break_timer_daemon_util_countdown_set_penalty (_tmp12_, new_penalty);
		g_signal_emit (self, break_timer_daemon_rest_break_rest_break_controller_signals[BREAK_TIMER_DAEMON_REST_BREAK_REST_BREAK_CONTROLLER_CURRENT_DURATION_CHANGED_SIGNAL], 0);
		_tmp13_ = self->priv->reminder_countdown;
		break_timer_daemon_util_countdown_start (_tmp13_);
	}
}

gboolean
break_timer_daemon_rest_break_rest_break_controller_get_lock_screen_enabled (BreakTimerDaemonRestBreakRestBreakController* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_lock_screen_enabled;
	return result;
}

void
break_timer_daemon_rest_break_rest_break_controller_set_lock_screen_enabled (BreakTimerDaemonRestBreakRestBreakController* self,
                                                                             gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = break_timer_daemon_rest_break_rest_break_controller_get_lock_screen_enabled (self);
	if (old_value != value) {
		self->priv->_lock_screen_enabled = value;
		g_object_notify_by_pspec ((GObject *) self, break_timer_daemon_rest_break_rest_break_controller_properties[BREAK_TIMER_DAEMON_REST_BREAK_REST_BREAK_CONTROLLER_LOCK_SCREEN_ENABLED_PROPERTY]);
	}
}

static void
break_timer_daemon_rest_break_rest_break_controller_class_init (BreakTimerDaemonRestBreakRestBreakControllerClass * klass,
                                                                gpointer klass_data)
{
	break_timer_daemon_rest_break_rest_break_controller_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &BreakTimerDaemonRestBreakRestBreakController_private_offset);
	((BreakTimerDaemonBreakBreakControllerClass *) klass)->serialize = (JsonObject* (*) (BreakTimerDaemonBreakBreakController*)) break_timer_daemon_rest_break_rest_break_controller_real_serialize;
	((BreakTimerDaemonBreakBreakControllerClass *) klass)->deserialize = (void (*) (BreakTimerDaemonBreakBreakController*, JsonObject**)) break_timer_daemon_rest_break_rest_break_controller_real_deserialize;
	G_OBJECT_CLASS (klass)->get_property = _vala_break_timer_daemon_rest_break_rest_break_controller_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_break_timer_daemon_rest_break_rest_break_controller_set_property;
	G_OBJECT_CLASS (klass)->finalize = break_timer_daemon_rest_break_rest_break_controller_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BREAK_TIMER_DAEMON_REST_BREAK_REST_BREAK_CONTROLLER_LOCK_SCREEN_ENABLED_PROPERTY, break_timer_daemon_rest_break_rest_break_controller_properties[BREAK_TIMER_DAEMON_REST_BREAK_REST_BREAK_CONTROLLER_LOCK_SCREEN_ENABLED_PROPERTY] = g_param_spec_boolean ("lock-screen-enabled", "lock-screen-enabled", "lock-screen-enabled", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	break_timer_daemon_rest_break_rest_break_controller_signals[BREAK_TIMER_DAEMON_REST_BREAK_REST_BREAK_CONTROLLER_CURRENT_DURATION_CHANGED_SIGNAL] = g_signal_new ("current-duration-changed", BREAK_TIMER_DAEMON_REST_BREAK_TYPE_REST_BREAK_CONTROLLER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
break_timer_daemon_rest_break_rest_break_controller_instance_init (BreakTimerDaemonRestBreakRestBreakController * self,
                                                                   gpointer klass)
{
	self->priv = break_timer_daemon_rest_break_rest_break_controller_get_instance_private (self);
}

static void
break_timer_daemon_rest_break_rest_break_controller_finalize (GObject * obj)
{
	BreakTimerDaemonRestBreakRestBreakController * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BREAK_TIMER_DAEMON_REST_BREAK_TYPE_REST_BREAK_CONTROLLER, BreakTimerDaemonRestBreakRestBreakController);
	_g_object_unref0 (self->priv->reminder_countdown);
	G_OBJECT_CLASS (break_timer_daemon_rest_break_rest_break_controller_parent_class)->finalize (obj);
}

/**
 * A type of timer break designed for longer durations. Satisfied when the user
 * is inactive for its entire duration, but allows the user to interact with
 * the computer while it counts down. The timer will stop until the user has
 * finished using the computer, and then it will start to count down again.
 */
static GType
break_timer_daemon_rest_break_rest_break_controller_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BreakTimerDaemonRestBreakRestBreakControllerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) break_timer_daemon_rest_break_rest_break_controller_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BreakTimerDaemonRestBreakRestBreakController), 0, (GInstanceInitFunc) break_timer_daemon_rest_break_rest_break_controller_instance_init, NULL };
	GType break_timer_daemon_rest_break_rest_break_controller_type_id;
	break_timer_daemon_rest_break_rest_break_controller_type_id = g_type_register_static (BREAK_TIMER_DAEMON_TIMER_BREAK_TYPE_TIMER_BREAK_CONTROLLER, "BreakTimerDaemonRestBreakRestBreakController", &g_define_type_info, 0);
	BreakTimerDaemonRestBreakRestBreakController_private_offset = g_type_add_instance_private (break_timer_daemon_rest_break_rest_break_controller_type_id, sizeof (BreakTimerDaemonRestBreakRestBreakControllerPrivate));
	return break_timer_daemon_rest_break_rest_break_controller_type_id;
}

GType
break_timer_daemon_rest_break_rest_break_controller_get_type (void)
{
	static volatile gsize break_timer_daemon_rest_break_rest_break_controller_type_id__once = 0;
	if (g_once_init_enter (&break_timer_daemon_rest_break_rest_break_controller_type_id__once)) {
		GType break_timer_daemon_rest_break_rest_break_controller_type_id;
		break_timer_daemon_rest_break_rest_break_controller_type_id = break_timer_daemon_rest_break_rest_break_controller_get_type_once ();
		g_once_init_leave (&break_timer_daemon_rest_break_rest_break_controller_type_id__once, break_timer_daemon_rest_break_rest_break_controller_type_id);
	}
	return break_timer_daemon_rest_break_rest_break_controller_type_id__once;
}

static void
_vala_break_timer_daemon_rest_break_rest_break_controller_get_property (GObject * object,
                                                                        guint property_id,
                                                                        GValue * value,
                                                                        GParamSpec * pspec)
{
	BreakTimerDaemonRestBreakRestBreakController * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BREAK_TIMER_DAEMON_REST_BREAK_TYPE_REST_BREAK_CONTROLLER, BreakTimerDaemonRestBreakRestBreakController);
	switch (property_id) {
		case BREAK_TIMER_DAEMON_REST_BREAK_REST_BREAK_CONTROLLER_LOCK_SCREEN_ENABLED_PROPERTY:
		g_value_set_boolean (value, break_timer_daemon_rest_break_rest_break_controller_get_lock_screen_enabled (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_break_timer_daemon_rest_break_rest_break_controller_set_property (GObject * object,
                                                                        guint property_id,
                                                                        const GValue * value,
                                                                        GParamSpec * pspec)
{
	BreakTimerDaemonRestBreakRestBreakController * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BREAK_TIMER_DAEMON_REST_BREAK_TYPE_REST_BREAK_CONTROLLER, BreakTimerDaemonRestBreakRestBreakController);
	switch (property_id) {
		case BREAK_TIMER_DAEMON_REST_BREAK_REST_BREAK_CONTROLLER_LOCK_SCREEN_ENABLED_PROPERTY:
		break_timer_daemon_rest_break_rest_break_controller_set_lock_screen_enabled (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

