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

/*
* Copyright (c) 2018 elementary LLC (https://elementary.io)
*
* 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 2 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, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/

#include "display.h"
#include <glib.h>
#include <gio/gio.h>
#include <string.h>
#include <glib-object.h>
#include <stdlib.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

typedef GDBusProxy DisplayNightLightInterfaceProxy;
typedef GDBusProxyClass DisplayNightLightInterfaceProxyClass;
enum  {
	DISPLAY_NIGHT_LIGHT_MANAGER_0_PROPERTY,
	DISPLAY_NIGHT_LIGHT_MANAGER_SNOOZED_PROPERTY,
	DISPLAY_NIGHT_LIGHT_MANAGER_NUM_PROPERTIES
};
static GParamSpec* display_night_light_manager_properties[DISPLAY_NIGHT_LIGHT_MANAGER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_variant_type_free0(var) ((var == NULL) ? NULL : (var = (g_variant_type_free (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

struct _DisplayNightLightManagerPrivate {
	DisplayNightLightInterface* night_light_interface;
	gboolean snooze_cache;
};

static gint DisplayNightLightManager_private_offset;
static gpointer display_night_light_manager_parent_class = NULL;
static DisplayNightLightManager* display_night_light_manager_instance;
static DisplayNightLightManager* display_night_light_manager_instance = NULL;

static GType display_night_light_interface_get_type_once (void);
static void display_night_light_interface_proxy_g_signal (GDBusProxy* proxy,
                                                   const gchar* sender_name,
                                                   const gchar* signal_name,
                                                   GVariant* parameters);
static gboolean display_night_light_interface_dbus_proxy_get_disabled_until_tomorrow (DisplayNightLightInterface* self);
static void display_night_light_interface_dbus_proxy_set_disabled_until_tomorrow (DisplayNightLightInterface* self,
                                                                           gboolean value);
static void display_night_light_interface_proxy_display_night_light_interface_interface_init (DisplayNightLightInterfaceIface* iface);
static void display_night_light_interface_dbus_interface_method_call (GDBusConnection* connection,
                                                               const gchar* sender,
                                                               const gchar* object_path,
                                                               const gchar* interface_name,
                                                               const gchar* method_name,
                                                               GVariant* parameters,
                                                               GDBusMethodInvocation* invocation,
                                                               gpointer user_data);
static GVariant* display_night_light_interface_dbus_interface_get_property (GDBusConnection* connection,
                                                                     const gchar* sender,
                                                                     const gchar* object_path,
                                                                     const gchar* interface_name,
                                                                     const gchar* property_name,
                                                                     GError** error,
                                                                     gpointer user_data);
static GVariant* _dbus_display_night_light_interface_get_disabled_until_tomorrow (DisplayNightLightInterface* self);
static gboolean display_night_light_interface_dbus_interface_set_property (GDBusConnection* connection,
                                                                    const gchar* sender,
                                                                    const gchar* object_path,
                                                                    const gchar* interface_name,
                                                                    const gchar* property_name,
                                                                    GVariant* value,
                                                                    GError** error,
                                                                    gpointer user_data);
static void _dbus_display_night_light_interface_set_disabled_until_tomorrow (DisplayNightLightInterface* self,
                                                                      GVariant* _value);
static void _display_night_light_interface_unregister_object (gpointer user_data);
static DisplayNightLightManager* display_night_light_manager_new (void);
static DisplayNightLightManager* display_night_light_manager_construct (GType object_type);
static GObject * display_night_light_manager_constructor (GType type,
                                                   guint n_construct_properties,
                                                   GObjectConstructParam * construct_properties);
static void _display_night_light_manager____lambda25_ (DisplayNightLightManager* self,
                                                GVariant* changed,
                                                gchar** invalid);
static void __display_night_light_manager____lambda25__g_dbus_proxy_g_properties_changed (GDBusProxy* _sender,
                                                                                   GVariant* changed_properties,
                                                                                   gchar** invalidated_properties,
                                                                                   gpointer self);
static void display_night_light_manager_finalize (GObject * obj);
static GType display_night_light_manager_get_type_once (void);
static void _vala_display_night_light_manager_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec);
static void _vala_display_night_light_manager_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec);

static const GDBusMethodInfo * const _display_night_light_interface_dbus_method_info[] = {NULL};
static const GDBusSignalInfo * const _display_night_light_interface_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo _display_night_light_interface_dbus_property_info_disabled_until_tomorrow = {-1, "DisabledUntilTomorrow", "b", G_DBUS_PROPERTY_INFO_FLAGS_READABLE | G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE, NULL};
static const GDBusPropertyInfo * const _display_night_light_interface_dbus_property_info[] = {&_display_night_light_interface_dbus_property_info_disabled_until_tomorrow, NULL};
static const GDBusInterfaceInfo _display_night_light_interface_dbus_interface_info = {-1, "org.gnome.SettingsDaemon.Color", (GDBusMethodInfo **) (&_display_night_light_interface_dbus_method_info), (GDBusSignalInfo **) (&_display_night_light_interface_dbus_signal_info), (GDBusPropertyInfo **) (&_display_night_light_interface_dbus_property_info), NULL};
static const GDBusInterfaceVTable _display_night_light_interface_dbus_interface_vtable = {display_night_light_interface_dbus_interface_method_call, display_night_light_interface_dbus_interface_get_property, display_night_light_interface_dbus_interface_set_property};

gboolean
display_night_light_interface_get_disabled_until_tomorrow (DisplayNightLightInterface* self)
{
	DisplayNightLightInterfaceIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = DISPLAY_NIGHT_LIGHT_INTERFACE_GET_INTERFACE (self);
	if (_iface_->get_disabled_until_tomorrow) {
		return _iface_->get_disabled_until_tomorrow (self);
	}
	return FALSE;
}

void
display_night_light_interface_set_disabled_until_tomorrow (DisplayNightLightInterface* self,
                                                           gboolean value)
{
	DisplayNightLightInterfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = DISPLAY_NIGHT_LIGHT_INTERFACE_GET_INTERFACE (self);
	if (_iface_->set_disabled_until_tomorrow) {
		_iface_->set_disabled_until_tomorrow (self, value);
	}
}

static void
display_night_light_interface_default_init (DisplayNightLightInterfaceIface * iface,
                                            gpointer iface_data)
{
}

static GType
display_night_light_interface_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DisplayNightLightInterfaceIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) display_night_light_interface_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType display_night_light_interface_type_id;
	display_night_light_interface_type_id = g_type_register_static (G_TYPE_INTERFACE, "DisplayNightLightInterface", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (display_night_light_interface_type_id, g_dbus_proxy_get_type ());
	g_type_set_qdata (display_night_light_interface_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) display_night_light_interface_proxy_get_type);
	g_type_set_qdata (display_night_light_interface_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.gnome.SettingsDaemon.Color");
	g_type_set_qdata (display_night_light_interface_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_display_night_light_interface_dbus_interface_info));
	g_type_set_qdata (display_night_light_interface_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) display_night_light_interface_register_object);
	return display_night_light_interface_type_id;
}

GType
display_night_light_interface_get_type (void)
{
	static volatile gsize display_night_light_interface_type_id__once = 0;
	if (g_once_init_enter (&display_night_light_interface_type_id__once)) {
		GType display_night_light_interface_type_id;
		display_night_light_interface_type_id = display_night_light_interface_get_type_once ();
		g_once_init_leave (&display_night_light_interface_type_id__once, display_night_light_interface_type_id);
	}
	return display_night_light_interface_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (DisplayNightLightInterfaceProxy, display_night_light_interface_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (DISPLAY_TYPE_NIGHT_LIGHT_INTERFACE, display_night_light_interface_proxy_display_night_light_interface_interface_init) )
static void
display_night_light_interface_proxy_class_init (DisplayNightLightInterfaceProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = display_night_light_interface_proxy_g_signal;
}

static void
display_night_light_interface_proxy_g_signal (GDBusProxy* proxy,
                                              const gchar* sender_name,
                                              const gchar* signal_name,
                                              GVariant* parameters)
{
}

static void
display_night_light_interface_proxy_init (DisplayNightLightInterfaceProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_display_night_light_interface_dbus_interface_info));
}

static gboolean
display_night_light_interface_dbus_proxy_get_disabled_until_tomorrow (DisplayNightLightInterface* self)
{
	GVariant *_inner_reply;
	gboolean _result;
	_inner_reply = g_dbus_proxy_get_cached_property ((GDBusProxy *) self, "DisabledUntilTomorrow");
	if (!_inner_reply) {
		GVariant *_arguments;
		GVariant *_reply;
		GVariantBuilder _arguments_builder;
		g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.gnome.SettingsDaemon.Color"));
		g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("DisabledUntilTomorrow"));
		_arguments = g_variant_builder_end (&_arguments_builder);
		_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Get", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
		if (!_reply) {
			gboolean _tmp18_ = FALSE;
			return _tmp18_;
		}
		g_variant_get (_reply, "(v)", &_inner_reply);
		g_variant_unref (_reply);
	}
	_result = g_variant_get_boolean (_inner_reply);
	g_variant_unref (_inner_reply);
	return _result;
}

static void
display_night_light_interface_dbus_proxy_set_disabled_until_tomorrow (DisplayNightLightInterface* self,
                                                                      gboolean value)
{
	GVariant *_arguments;
	GVariant *_reply;
	GVariantBuilder _arguments_builder;
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("org.gnome.SettingsDaemon.Color"));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string ("DisabledUntilTomorrow"));
	g_variant_builder_open (&_arguments_builder, G_VARIANT_TYPE_VARIANT);
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_boolean (value));
	g_variant_builder_close (&_arguments_builder);
	_arguments = g_variant_builder_end (&_arguments_builder);
	_reply = g_dbus_proxy_call_sync ((GDBusProxy *) self, "org.freedesktop.DBus.Properties.Set", _arguments, G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL);
	if (!_reply) {
		return;
	}
	g_variant_unref (_reply);
}

static void
display_night_light_interface_proxy_display_night_light_interface_interface_init (DisplayNightLightInterfaceIface* iface)
{
	iface->get_disabled_until_tomorrow = display_night_light_interface_dbus_proxy_get_disabled_until_tomorrow;
	iface->set_disabled_until_tomorrow = display_night_light_interface_dbus_proxy_set_disabled_until_tomorrow;
}

static void
display_night_light_interface_dbus_interface_method_call (GDBusConnection* connection,
                                                          const gchar* sender,
                                                          const gchar* object_path,
                                                          const gchar* interface_name,
                                                          const gchar* method_name,
                                                          GVariant* parameters,
                                                          GDBusMethodInvocation* invocation,
                                                          gpointer user_data)
{
	g_object_unref (invocation);
}

static GVariant*
_dbus_display_night_light_interface_get_disabled_until_tomorrow (DisplayNightLightInterface* self)
{
	gboolean result;
	GVariant* _reply;
	result = display_night_light_interface_get_disabled_until_tomorrow (self);
	_reply = g_variant_new_boolean (result);
	return _reply;
}

static GVariant*
display_night_light_interface_dbus_interface_get_property (GDBusConnection* connection,
                                                           const gchar* sender,
                                                           const gchar* object_path,
                                                           const gchar* interface_name,
                                                           const gchar* property_name,
                                                           GError** error,
                                                           gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "DisabledUntilTomorrow") == 0) {
		return _dbus_display_night_light_interface_get_disabled_until_tomorrow (object);
	}
	return NULL;
}

static void
_dbus_display_night_light_interface_set_disabled_until_tomorrow (DisplayNightLightInterface* self,
                                                                 GVariant* _value)
{
	gboolean value = FALSE;
	value = g_variant_get_boolean (_value);
	display_night_light_interface_set_disabled_until_tomorrow (self, value);
}

static gboolean
display_night_light_interface_dbus_interface_set_property (GDBusConnection* connection,
                                                           const gchar* sender,
                                                           const gchar* object_path,
                                                           const gchar* interface_name,
                                                           const gchar* property_name,
                                                           GVariant* value,
                                                           GError** error,
                                                           gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (property_name, "DisabledUntilTomorrow") == 0) {
		_dbus_display_night_light_interface_set_disabled_until_tomorrow (object, value);
		return TRUE;
	}
	return FALSE;
}

guint
display_night_light_interface_register_object (gpointer object,
                                               GDBusConnection* connection,
                                               const gchar* path,
                                               GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_display_night_light_interface_dbus_interface_info), &_display_night_light_interface_dbus_interface_vtable, data, _display_night_light_interface_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_display_night_light_interface_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

static inline gpointer
display_night_light_manager_get_instance_private (DisplayNightLightManager* self)
{
	return G_STRUCT_MEMBER_P (self, DisplayNightLightManager_private_offset);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

DisplayNightLightManager*
display_night_light_manager_get_instance (void)
{
	DisplayNightLightManager* _tmp0_;
	DisplayNightLightManager* _tmp2_;
	DisplayNightLightManager* _tmp3_;
	DisplayNightLightManager* result;
	_tmp0_ = display_night_light_manager_instance;
	if (_tmp0_ == NULL) {
		DisplayNightLightManager* _tmp1_;
		_tmp1_ = display_night_light_manager_new ();
		_g_object_unref0 (display_night_light_manager_instance);
		display_night_light_manager_instance = _tmp1_;
	}
	_tmp2_ = display_night_light_manager_instance;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	result = _tmp3_;
	return result;
}

static DisplayNightLightManager*
display_night_light_manager_construct (GType object_type)
{
	DisplayNightLightManager * self = NULL;
	self = (DisplayNightLightManager*) g_object_new (object_type, NULL);
	return self;
}

static DisplayNightLightManager*
display_night_light_manager_new (void)
{
	return display_night_light_manager_construct (DISPLAY_TYPE_NIGHT_LIGHT_MANAGER);
}

gboolean
display_night_light_manager_get_snoozed (DisplayNightLightManager* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->snooze_cache;
	return result;
}

void
display_night_light_manager_set_snoozed (DisplayNightLightManager* self,
                                         gboolean value)
{
	g_return_if_fail (self != NULL);
	if (value != self->priv->snooze_cache) {
		DisplayNightLightInterface* _tmp0_;
		self->priv->snooze_cache = value;
		_tmp0_ = self->priv->night_light_interface;
		display_night_light_interface_set_disabled_until_tomorrow (_tmp0_, value);
	}
	g_object_notify_by_pspec ((GObject *) self, display_night_light_manager_properties[DISPLAY_NIGHT_LIGHT_MANAGER_SNOOZED_PROPERTY]);
}

static void
_display_night_light_manager____lambda25_ (DisplayNightLightManager* self,
                                           GVariant* changed,
                                           gchar** invalid)
{
	GVariant* snooze = NULL;
	GVariantType* _tmp0_;
	GVariantType* _tmp1_;
	GVariant* _tmp2_;
	GVariant* _tmp3_;
	GVariant* _tmp4_;
	g_return_if_fail (changed != NULL);
	_tmp0_ = g_variant_type_new ("b");
	_tmp1_ = _tmp0_;
	_tmp2_ = g_variant_lookup_value (changed, "DisabledUntilTomorrow", _tmp1_);
	_tmp3_ = _tmp2_;
	_g_variant_type_free0 (_tmp1_);
	snooze = _tmp3_;
	_tmp4_ = snooze;
	if (_tmp4_ != NULL) {
		GVariant* _tmp5_;
		_tmp5_ = snooze;
		self->priv->snooze_cache = g_variant_get_boolean (_tmp5_);
	}
	_g_variant_unref0 (snooze);
}

static void
__display_night_light_manager____lambda25__g_dbus_proxy_g_properties_changed (GDBusProxy* _sender,
                                                                              GVariant* changed_properties,
                                                                              gchar** invalidated_properties,
                                                                              gpointer self)
{
	_display_night_light_manager____lambda25_ ((DisplayNightLightManager*) self, changed_properties, invalidated_properties);
}

static GObject *
display_night_light_manager_constructor (GType type,
                                         guint n_construct_properties,
                                         GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DisplayNightLightManager * self;
	GError* _inner_error0_ = NULL;
	parent_class = G_OBJECT_CLASS (display_night_light_manager_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DISPLAY_TYPE_NIGHT_LIGHT_MANAGER, DisplayNightLightManager);
	{
		DisplayNightLightInterface* _tmp0_ = NULL;
		DisplayNightLightInterface* _tmp1_;
		DisplayNightLightInterface* _tmp2_;
		DisplayNightLightInterface* _tmp3_;
		gboolean _tmp4_;
		gboolean _tmp5_;
		DisplayNightLightInterface* _tmp6_;
		_tmp1_ = (DisplayNightLightInterface*) g_initable_new (DISPLAY_TYPE_NIGHT_LIGHT_INTERFACE_PROXY, NULL, &_inner_error0_, "g-flags", G_DBUS_PROXY_FLAGS_NONE, "g-name", "org.gnome.SettingsDaemon.Color", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/org/gnome/SettingsDaemon/Color", "g-interface-name", "org.gnome.SettingsDaemon.Color", NULL);
		_tmp0_ = (DisplayNightLightInterface*) _tmp1_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp2_ = _tmp0_;
		_tmp0_ = NULL;
		_g_object_unref0 (self->priv->night_light_interface);
		self->priv->night_light_interface = _tmp2_;
		_tmp3_ = self->priv->night_light_interface;
		_tmp4_ = display_night_light_interface_get_disabled_until_tomorrow (_tmp3_);
		_tmp5_ = _tmp4_;
		self->priv->snooze_cache = _tmp5_;
		_tmp6_ = self->priv->night_light_interface;
		g_signal_connect_object ((GDBusProxy*) _tmp6_, "g-properties-changed", (GCallback) __display_night_light_manager____lambda25__g_dbus_proxy_g_properties_changed, self, 0);
		_g_object_unref0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp7_;
		const gchar* _tmp8_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp7_ = e;
		_tmp8_ = _tmp7_->message;
		g_warning ("NightLightManager.vala:69: Could not connect to color interface: %s", _tmp8_);
		_g_error_free0 (e);
	}
	__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 obj;
}

static void
display_night_light_manager_class_init (DisplayNightLightManagerClass * klass,
                                        gpointer klass_data)
{
	display_night_light_manager_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DisplayNightLightManager_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_display_night_light_manager_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_display_night_light_manager_set_property;
	G_OBJECT_CLASS (klass)->constructor = display_night_light_manager_constructor;
	G_OBJECT_CLASS (klass)->finalize = display_night_light_manager_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DISPLAY_NIGHT_LIGHT_MANAGER_SNOOZED_PROPERTY, display_night_light_manager_properties[DISPLAY_NIGHT_LIGHT_MANAGER_SNOOZED_PROPERTY] = g_param_spec_boolean ("snoozed", "snoozed", "snoozed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
display_night_light_manager_instance_init (DisplayNightLightManager * self,
                                           gpointer klass)
{
	self->priv = display_night_light_manager_get_instance_private (self);
}

static void
display_night_light_manager_finalize (GObject * obj)
{
	DisplayNightLightManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DISPLAY_TYPE_NIGHT_LIGHT_MANAGER, DisplayNightLightManager);
	_g_object_unref0 (self->priv->night_light_interface);
	G_OBJECT_CLASS (display_night_light_manager_parent_class)->finalize (obj);
}

static GType
display_night_light_manager_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DisplayNightLightManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) display_night_light_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DisplayNightLightManager), 0, (GInstanceInitFunc) display_night_light_manager_instance_init, NULL };
	GType display_night_light_manager_type_id;
	display_night_light_manager_type_id = g_type_register_static (G_TYPE_OBJECT, "DisplayNightLightManager", &g_define_type_info, 0);
	DisplayNightLightManager_private_offset = g_type_add_instance_private (display_night_light_manager_type_id, sizeof (DisplayNightLightManagerPrivate));
	return display_night_light_manager_type_id;
}

GType
display_night_light_manager_get_type (void)
{
	static volatile gsize display_night_light_manager_type_id__once = 0;
	if (g_once_init_enter (&display_night_light_manager_type_id__once)) {
		GType display_night_light_manager_type_id;
		display_night_light_manager_type_id = display_night_light_manager_get_type_once ();
		g_once_init_leave (&display_night_light_manager_type_id__once, display_night_light_manager_type_id);
	}
	return display_night_light_manager_type_id__once;
}

static void
_vala_display_night_light_manager_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec)
{
	DisplayNightLightManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DISPLAY_TYPE_NIGHT_LIGHT_MANAGER, DisplayNightLightManager);
	switch (property_id) {
		case DISPLAY_NIGHT_LIGHT_MANAGER_SNOOZED_PROPERTY:
		g_value_set_boolean (value, display_night_light_manager_get_snoozed (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_display_night_light_manager_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec)
{
	DisplayNightLightManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DISPLAY_TYPE_NIGHT_LIGHT_MANAGER, DisplayNightLightManager);
	switch (property_id) {
		case DISPLAY_NIGHT_LIGHT_MANAGER_SNOOZED_PROPERTY:
		display_night_light_manager_set_snoozed (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

