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

/*
* Copyright 2020 elementary, Inc. (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 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, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* Authored by: Marius Meisenzahl <mariusmeisenzahl@gmail.com>
*/

#include "system.h"
#include <fwupd.h>
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <granite-7.h>
#include <float.h>
#include <math.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.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  {
	ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_0_PROPERTY,
	ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_DEVICE_PROPERTY,
	ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_RELEASE_PROPERTY,
	ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_IS_UPDATABLE_PROPERTY,
	ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_NUM_PROPERTIES
};
static GParamSpec* about_widgets_firmware_update_row_properties[ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_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))
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
enum  {
	ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_UPDATE_SIGNAL,
	ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_NUM_SIGNALS
};
static guint about_widgets_firmware_update_row_signals[ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_NUM_SIGNALS] = {0};

struct _AboutWidgetsFirmwareUpdateRowPrivate {
	FwupdDevice* _device;
	FwupdRelease* _release;
	gboolean _is_updatable;
};

static gint AboutWidgetsFirmwareUpdateRow_private_offset;
static gpointer about_widgets_firmware_update_row_parent_class = NULL;

static void about_widgets_firmware_update_row_set_is_updatable (AboutWidgetsFirmwareUpdateRow* self,
                                                         gboolean value);
static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static GObject * about_widgets_firmware_update_row_constructor (GType type,
                                                         guint n_construct_properties,
                                                         GObjectConstructParam * construct_properties);
static void _about_widgets_firmware_update_row____lambda26_ (AboutWidgetsFirmwareUpdateRow* self);
static void __about_widgets_firmware_update_row____lambda26__gtk_button_clicked (GtkButton* _sender,
                                                                          gpointer self);
static void about_widgets_firmware_update_row_finalize (GObject * obj);
static GType about_widgets_firmware_update_row_get_type_once (void);
static void _vala_about_widgets_firmware_update_row_get_property (GObject * object,
                                                           guint property_id,
                                                           GValue * value,
                                                           GParamSpec * pspec);
static void _vala_about_widgets_firmware_update_row_set_property (GObject * object,
                                                           guint property_id,
                                                           const GValue * value,
                                                           GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
about_widgets_firmware_update_row_get_instance_private (AboutWidgetsFirmwareUpdateRow* self)
{
	return G_STRUCT_MEMBER_P (self, AboutWidgetsFirmwareUpdateRow_private_offset);
}

AboutWidgetsFirmwareUpdateRow*
about_widgets_firmware_update_row_construct (GType object_type,
                                             FwupdDevice* device,
                                             FwupdRelease* release)
{
	AboutWidgetsFirmwareUpdateRow * self = NULL;
	g_return_val_if_fail (device != NULL, NULL);
	self = (AboutWidgetsFirmwareUpdateRow*) g_object_new (object_type, "device", device, "release", release, NULL);
	return self;
}

AboutWidgetsFirmwareUpdateRow*
about_widgets_firmware_update_row_new (FwupdDevice* device,
                                       FwupdRelease* release)
{
	return about_widgets_firmware_update_row_construct (ABOUT_WIDGETS_TYPE_FIRMWARE_UPDATE_ROW, device, release);
}

FwupdDevice*
about_widgets_firmware_update_row_get_device (AboutWidgetsFirmwareUpdateRow* self)
{
	FwupdDevice* result;
	FwupdDevice* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_device;
	result = _tmp0_;
	return result;
}

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

static void
about_widgets_firmware_update_row_set_device (AboutWidgetsFirmwareUpdateRow* self,
                                              FwupdDevice* value)
{
	FwupdDevice* old_value;
	g_return_if_fail (self != NULL);
	old_value = about_widgets_firmware_update_row_get_device (self);
	if (old_value != value) {
		FwupdDevice* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_device);
		self->priv->_device = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, about_widgets_firmware_update_row_properties[ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_DEVICE_PROPERTY]);
	}
}

FwupdRelease*
about_widgets_firmware_update_row_get_release (AboutWidgetsFirmwareUpdateRow* self)
{
	FwupdRelease* result;
	FwupdRelease* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_release;
	result = _tmp0_;
	return result;
}

static void
about_widgets_firmware_update_row_set_release (AboutWidgetsFirmwareUpdateRow* self,
                                               FwupdRelease* value)
{
	FwupdRelease* old_value;
	g_return_if_fail (self != NULL);
	old_value = about_widgets_firmware_update_row_get_release (self);
	if (old_value != value) {
		FwupdRelease* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_release);
		self->priv->_release = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, about_widgets_firmware_update_row_properties[ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_RELEASE_PROPERTY]);
	}
}

gboolean
about_widgets_firmware_update_row_get_is_updatable (AboutWidgetsFirmwareUpdateRow* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_updatable;
	return result;
}

static void
about_widgets_firmware_update_row_set_is_updatable (AboutWidgetsFirmwareUpdateRow* self,
                                                    gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = about_widgets_firmware_update_row_get_is_updatable (self);
	if (old_value != value) {
		self->priv->_is_updatable = value;
		g_object_notify_by_pspec ((GObject *) self, about_widgets_firmware_update_row_properties[ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_IS_UPDATABLE_PROPERTY]);
	}
}

static void
g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_OBJECT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), data2);
}

static gpointer
_g_ptr_array_ref0 (gpointer self)
{
	return self ? g_ptr_array_ref (self) : NULL;
}

static void
_about_widgets_firmware_update_row____lambda26_ (AboutWidgetsFirmwareUpdateRow* self)
{
	FwupdDevice* _tmp0_;
	FwupdRelease* _tmp1_;
	_tmp0_ = self->priv->_device;
	_tmp1_ = self->priv->_release;
	g_signal_emit (self, about_widgets_firmware_update_row_signals[ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_UPDATE_SIGNAL], 0, _tmp0_, _tmp1_);
}

static void
__about_widgets_firmware_update_row____lambda26__gtk_button_clicked (GtkButton* _sender,
                                                                     gpointer self)
{
	_about_widgets_firmware_update_row____lambda26_ ((AboutWidgetsFirmwareUpdateRow*) self);
}

static GObject *
about_widgets_firmware_update_row_constructor (GType type,
                                               guint n_construct_properties,
                                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	AboutWidgetsFirmwareUpdateRow * self;
	GtkImage* image = NULL;
	GtkImage* _tmp0_ = NULL;
	GtkLabel* device_name_label = NULL;
	FwupdDevice* _tmp1_;
	const gchar* _tmp2_;
	GtkLabel* _tmp3_ = NULL;
	GtkLabel* _tmp4_;
	GtkLabel* version_label = NULL;
	FwupdDevice* _tmp5_;
	const gchar* _tmp6_;
	GtkLabel* _tmp7_ = NULL;
	GtkGrid* grid = NULL;
	GtkGrid* _tmp8_ = NULL;
	GtkGrid* _tmp9_;
	GtkImage* _tmp10_;
	GtkGrid* _tmp11_;
	GtkLabel* _tmp12_;
	GtkGrid* _tmp13_;
	GtkLabel* _tmp14_;
	GPtrArray* icons = NULL;
	FwupdDevice* _tmp15_;
	GPtrArray* _tmp16_;
	GPtrArray* _tmp17_;
	GPtrArray* _tmp18_;
	gpointer* _tmp19_;
	gint _tmp19__length1;
	gboolean _tmp25_ = FALSE;
	FwupdRelease* _tmp26_;
	GtkGrid* _tmp42_;
	parent_class = G_OBJECT_CLASS (about_widgets_firmware_update_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ABOUT_WIDGETS_TYPE_FIRMWARE_UPDATE_ROW, AboutWidgetsFirmwareUpdateRow);
	_tmp0_ = (GtkImage*) gtk_image_new_from_icon_name ("application-x-firmware");
	gtk_image_set_pixel_size (_tmp0_, 32);
	g_object_ref_sink (_tmp0_);
	image = _tmp0_;
	_tmp1_ = self->priv->_device;
	_tmp2_ = fwupd_device_get_name (_tmp1_);
	_tmp3_ = (GtkLabel*) gtk_label_new (_tmp2_);
	gtk_widget_set_halign ((GtkWidget*) _tmp3_, GTK_ALIGN_START);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp3_, TRUE);
	g_object_ref_sink (_tmp3_);
	device_name_label = _tmp3_;
	_tmp4_ = device_name_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp4_, GRANITE_STYLE_CLASS_H3_LABEL);
	_tmp5_ = self->priv->_device;
	_tmp6_ = fwupd_device_get_version (_tmp5_);
	_tmp7_ = (GtkLabel*) gtk_label_new (_tmp6_);
	gtk_label_set_wrap (_tmp7_, TRUE);
	gtk_label_set_xalign (_tmp7_, (gfloat) 0);
	g_object_ref_sink (_tmp7_);
	version_label = _tmp7_;
	_tmp8_ = (GtkGrid*) gtk_grid_new ();
	gtk_grid_set_column_spacing (_tmp8_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp8_, 6);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp8_, 6);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp8_, 6);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp8_, 6);
	g_object_ref_sink (_tmp8_);
	grid = _tmp8_;
	_tmp9_ = grid;
	_tmp10_ = image;
	gtk_grid_attach (_tmp9_, (GtkWidget*) _tmp10_, 0, 0, 1, 2);
	_tmp11_ = grid;
	_tmp12_ = device_name_label;
	gtk_grid_attach (_tmp11_, (GtkWidget*) _tmp12_, 1, 0, 1, 1);
	_tmp13_ = grid;
	_tmp14_ = version_label;
	gtk_grid_attach (_tmp13_, (GtkWidget*) _tmp14_, 1, 1, 1, 1);
	_tmp15_ = self->priv->_device;
	_tmp16_ = fwupd_device_get_icons (_tmp15_);
	_tmp17_ = _g_ptr_array_ref0 (_tmp16_);
	icons = _tmp17_;
	_tmp18_ = icons;
	_tmp19_ = _tmp18_->pdata;
	_tmp19__length1 = _tmp18_->len;
	if (_tmp19_ != NULL) {
		GtkImage* _tmp20_;
		GPtrArray* _tmp21_;
		gpointer* _tmp22_;
		gint _tmp22__length1;
		GThemedIcon* _tmp23_;
		GThemedIcon* _tmp24_;
		_tmp20_ = image;
		_tmp21_ = icons;
		_tmp22_ = _tmp21_->pdata;
		_tmp22__length1 = _tmp21_->len;
		_tmp23_ = (GThemedIcon*) g_themed_icon_new_from_names (_tmp22_, _tmp22__length1);
		_tmp24_ = _tmp23_;
		g_object_set (_tmp20_, "gicon", (GIcon*) _tmp24_, NULL);
		_g_object_unref0 (_tmp24_);
	}
	_tmp26_ = self->priv->_release;
	if (_tmp26_ != NULL) {
		FwupdDevice* _tmp27_;
		const gchar* _tmp28_;
		FwupdRelease* _tmp29_;
		const gchar* _tmp30_;
		_tmp27_ = self->priv->_device;
		_tmp28_ = fwupd_device_get_version (_tmp27_);
		_tmp29_ = self->priv->_release;
		_tmp30_ = fwupd_release_get_version (_tmp29_);
		_tmp25_ = g_strcmp0 (_tmp28_, _tmp30_) != 0;
	} else {
		_tmp25_ = FALSE;
	}
	if (_tmp25_) {
		GtkLabel* _tmp31_;
		FwupdDevice* _tmp32_;
		const gchar* _tmp33_;
		FwupdRelease* _tmp34_;
		const gchar* _tmp35_;
		gchar* _tmp36_;
		gchar* _tmp37_;
		GtkButton* update_button = NULL;
		GtkButton* _tmp38_ = NULL;
		GtkButton* _tmp39_;
		GtkGrid* _tmp40_;
		GtkButton* _tmp41_;
		about_widgets_firmware_update_row_set_is_updatable (self, TRUE);
		_tmp31_ = version_label;
		_tmp32_ = self->priv->_device;
		_tmp33_ = fwupd_device_get_version (_tmp32_);
		_tmp34_ = self->priv->_release;
		_tmp35_ = fwupd_release_get_version (_tmp34_);
		_tmp36_ = g_strdup_printf ("%s → %s", _tmp33_, _tmp35_);
		_tmp37_ = _tmp36_;
		gtk_label_set_label (_tmp31_, _tmp37_);
		_g_free0 (_tmp37_);
		_tmp38_ = (GtkButton*) gtk_button_new_with_label (_ ("Update"));
		gtk_widget_set_valign ((GtkWidget*) _tmp38_, GTK_ALIGN_CENTER);
		g_object_ref_sink (_tmp38_);
		update_button = _tmp38_;
		_tmp39_ = update_button;
		g_signal_connect_object (_tmp39_, "clicked", (GCallback) __about_widgets_firmware_update_row____lambda26__gtk_button_clicked, self, 0);
		_tmp40_ = grid;
		_tmp41_ = update_button;
		gtk_grid_attach (_tmp40_, (GtkWidget*) _tmp41_, 2, 0, 1, 2);
		_g_object_unref0 (update_button);
	}
	_tmp42_ = grid;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp42_);
	_g_ptr_array_unref0 (icons);
	_g_object_unref0 (grid);
	_g_object_unref0 (version_label);
	_g_object_unref0 (device_name_label);
	_g_object_unref0 (image);
	return obj;
}

static void
about_widgets_firmware_update_row_class_init (AboutWidgetsFirmwareUpdateRowClass * klass,
                                              gpointer klass_data)
{
	about_widgets_firmware_update_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &AboutWidgetsFirmwareUpdateRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_about_widgets_firmware_update_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_about_widgets_firmware_update_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = about_widgets_firmware_update_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = about_widgets_firmware_update_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_DEVICE_PROPERTY, about_widgets_firmware_update_row_properties[ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_DEVICE_PROPERTY] = g_param_spec_object ("device", "device", "device", fwupd_device_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_RELEASE_PROPERTY, about_widgets_firmware_update_row_properties[ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_RELEASE_PROPERTY] = g_param_spec_object ("release", "release", "release", fwupd_release_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_IS_UPDATABLE_PROPERTY, about_widgets_firmware_update_row_properties[ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_IS_UPDATABLE_PROPERTY] = g_param_spec_boolean ("is-updatable", "is-updatable", "is-updatable", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	about_widgets_firmware_update_row_signals[ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_UPDATE_SIGNAL] = g_signal_new ("update", ABOUT_WIDGETS_TYPE_FIRMWARE_UPDATE_ROW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, fwupd_device_get_type (), fwupd_release_get_type ());
}

static void
about_widgets_firmware_update_row_instance_init (AboutWidgetsFirmwareUpdateRow * self,
                                                 gpointer klass)
{
	self->priv = about_widgets_firmware_update_row_get_instance_private (self);
}

static void
about_widgets_firmware_update_row_finalize (GObject * obj)
{
	AboutWidgetsFirmwareUpdateRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ABOUT_WIDGETS_TYPE_FIRMWARE_UPDATE_ROW, AboutWidgetsFirmwareUpdateRow);
	_g_object_unref0 (self->priv->_device);
	_g_object_unref0 (self->priv->_release);
	G_OBJECT_CLASS (about_widgets_firmware_update_row_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
about_widgets_firmware_update_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (AboutWidgetsFirmwareUpdateRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) about_widgets_firmware_update_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AboutWidgetsFirmwareUpdateRow), 0, (GInstanceInitFunc) about_widgets_firmware_update_row_instance_init, NULL };
	GType about_widgets_firmware_update_row_type_id;
	about_widgets_firmware_update_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "AboutWidgetsFirmwareUpdateRow", &g_define_type_info, 0);
	AboutWidgetsFirmwareUpdateRow_private_offset = g_type_add_instance_private (about_widgets_firmware_update_row_type_id, sizeof (AboutWidgetsFirmwareUpdateRowPrivate));
	return about_widgets_firmware_update_row_type_id;
}

GType
about_widgets_firmware_update_row_get_type (void)
{
	static volatile gsize about_widgets_firmware_update_row_type_id__once = 0;
	if (g_once_init_enter (&about_widgets_firmware_update_row_type_id__once)) {
		GType about_widgets_firmware_update_row_type_id;
		about_widgets_firmware_update_row_type_id = about_widgets_firmware_update_row_get_type_once ();
		g_once_init_leave (&about_widgets_firmware_update_row_type_id__once, about_widgets_firmware_update_row_type_id);
	}
	return about_widgets_firmware_update_row_type_id__once;
}

static void
_vala_about_widgets_firmware_update_row_get_property (GObject * object,
                                                      guint property_id,
                                                      GValue * value,
                                                      GParamSpec * pspec)
{
	AboutWidgetsFirmwareUpdateRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ABOUT_WIDGETS_TYPE_FIRMWARE_UPDATE_ROW, AboutWidgetsFirmwareUpdateRow);
	switch (property_id) {
		case ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_DEVICE_PROPERTY:
		g_value_set_object (value, about_widgets_firmware_update_row_get_device (self));
		break;
		case ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_RELEASE_PROPERTY:
		g_value_set_object (value, about_widgets_firmware_update_row_get_release (self));
		break;
		case ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_IS_UPDATABLE_PROPERTY:
		g_value_set_boolean (value, about_widgets_firmware_update_row_get_is_updatable (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_about_widgets_firmware_update_row_set_property (GObject * object,
                                                      guint property_id,
                                                      const GValue * value,
                                                      GParamSpec * pspec)
{
	AboutWidgetsFirmwareUpdateRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ABOUT_WIDGETS_TYPE_FIRMWARE_UPDATE_ROW, AboutWidgetsFirmwareUpdateRow);
	switch (property_id) {
		case ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_DEVICE_PROPERTY:
		about_widgets_firmware_update_row_set_device (self, g_value_get_object (value));
		break;
		case ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_RELEASE_PROPERTY:
		about_widgets_firmware_update_row_set_release (self, g_value_get_object (value));
		break;
		case ABOUT_WIDGETS_FIRMWARE_UPDATE_ROW_IS_UPDATABLE_PROPERTY:
		about_widgets_firmware_update_row_set_is_updatable (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

