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

#include <glib-object.h>
#include <gio/gio.h>
#include <glib.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define PROTON_PLUS_MODELS_TYPE_BASE_RELEASE (proton_plus_models_base_release_get_type ())
#define PROTON_PLUS_MODELS_BASE_RELEASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_BASE_RELEASE, ProtonPlusModelsBaseRelease))
#define PROTON_PLUS_MODELS_BASE_RELEASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_BASE_RELEASE, ProtonPlusModelsBaseReleaseClass))
#define PROTON_PLUS_MODELS_IS_BASE_RELEASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_BASE_RELEASE))
#define PROTON_PLUS_MODELS_IS_BASE_RELEASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_BASE_RELEASE))
#define PROTON_PLUS_MODELS_BASE_RELEASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_BASE_RELEASE, ProtonPlusModelsBaseReleaseClass))

typedef struct _ProtonPlusModelsBaseRelease ProtonPlusModelsBaseRelease;
typedef struct _ProtonPlusModelsBaseReleaseClass ProtonPlusModelsBaseReleaseClass;
typedef struct _ProtonPlusModelsBaseReleasePrivate ProtonPlusModelsBaseReleasePrivate;

#define PROTON_PLUS_MODELS_TYPE_PARAMETERS (proton_plus_models_parameters_get_type ())
#define PROTON_PLUS_MODELS_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_PARAMETERS, ProtonPlusModelsParameters))
#define PROTON_PLUS_MODELS_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_PARAMETERS, ProtonPlusModelsParametersClass))
#define PROTON_PLUS_MODELS_IS_PARAMETERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_PARAMETERS))
#define PROTON_PLUS_MODELS_IS_PARAMETERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_PARAMETERS))
#define PROTON_PLUS_MODELS_PARAMETERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_PARAMETERS, ProtonPlusModelsParametersClass))

typedef struct _ProtonPlusModelsParameters ProtonPlusModelsParameters;
typedef struct _ProtonPlusModelsParametersClass ProtonPlusModelsParametersClass;

#define PROTON_PLUS_MODELS_TYPE_RELEASE (proton_plus_models_release_get_type ())
#define PROTON_PLUS_MODELS_RELEASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_RELEASE, ProtonPlusModelsRelease))
#define PROTON_PLUS_MODELS_RELEASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_RELEASE, ProtonPlusModelsReleaseClass))
#define PROTON_PLUS_MODELS_IS_RELEASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_RELEASE))
#define PROTON_PLUS_MODELS_IS_RELEASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_RELEASE))
#define PROTON_PLUS_MODELS_RELEASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_RELEASE, ProtonPlusModelsReleaseClass))

typedef struct _ProtonPlusModelsRelease ProtonPlusModelsRelease;
typedef struct _ProtonPlusModelsReleaseClass ProtonPlusModelsReleaseClass;
typedef struct _ProtonPlusModelsReleasePrivate ProtonPlusModelsReleasePrivate;

#define PROTON_PLUS_MODELS_RELEASES_TYPE_UPDATE (proton_plus_models_releases_update_get_type ())
#define PROTON_PLUS_MODELS_RELEASES_UPDATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_RELEASES_TYPE_UPDATE, ProtonPlusModelsReleasesUpdate))
#define PROTON_PLUS_MODELS_RELEASES_UPDATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_RELEASES_TYPE_UPDATE, ProtonPlusModelsReleasesUpdateClass))
#define PROTON_PLUS_MODELS_RELEASES_IS_UPDATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_RELEASES_TYPE_UPDATE))
#define PROTON_PLUS_MODELS_RELEASES_IS_UPDATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_RELEASES_TYPE_UPDATE))
#define PROTON_PLUS_MODELS_RELEASES_UPDATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_RELEASES_TYPE_UPDATE, ProtonPlusModelsReleasesUpdateClass))

typedef struct _ProtonPlusModelsReleasesUpdate ProtonPlusModelsReleasesUpdate;
typedef struct _ProtonPlusModelsReleasesUpdateClass ProtonPlusModelsReleasesUpdateClass;
typedef struct _ProtonPlusModelsReleasesUpdatePrivate ProtonPlusModelsReleasesUpdatePrivate;
enum  {
	PROTON_PLUS_MODELS_RELEASES_UPDATE_0_PROPERTY,
	PROTON_PLUS_MODELS_RELEASES_UPDATE_R_TYPE,
	PROTON_PLUS_MODELS_RELEASES_UPDATE_R_DUP_FUNC,
	PROTON_PLUS_MODELS_RELEASES_UPDATE_R_DESTROY_FUNC,
	PROTON_PLUS_MODELS_RELEASES_UPDATE_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_releases_update_properties[PROTON_PLUS_MODELS_RELEASES_UPDATE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define PROTON_PLUS_MODELS_TYPE_DOWNLOAD_MANAGER (proton_plus_models_download_manager_get_type ())
#define PROTON_PLUS_MODELS_DOWNLOAD_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_DOWNLOAD_MANAGER, ProtonPlusModelsDownloadManager))
#define PROTON_PLUS_MODELS_DOWNLOAD_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_DOWNLOAD_MANAGER, ProtonPlusModelsDownloadManagerClass))
#define PROTON_PLUS_MODELS_IS_DOWNLOAD_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_DOWNLOAD_MANAGER))
#define PROTON_PLUS_MODELS_IS_DOWNLOAD_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_DOWNLOAD_MANAGER))
#define PROTON_PLUS_MODELS_DOWNLOAD_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_DOWNLOAD_MANAGER, ProtonPlusModelsDownloadManagerClass))

typedef struct _ProtonPlusModelsDownloadManager ProtonPlusModelsDownloadManager;
typedef struct _ProtonPlusModelsDownloadManagerClass ProtonPlusModelsDownloadManagerClass;
typedef enum  {
	PROTON_PLUS_MODELS_BASE_RELEASE_STATE_NOT_INSTALLED,
	PROTON_PLUS_MODELS_BASE_RELEASE_STATE_UPDATE_AVAILABLE,
	PROTON_PLUS_MODELS_BASE_RELEASE_STATE_UP_TO_DATE,
	PROTON_PLUS_MODELS_BASE_RELEASE_STATE_BUSY_INSTALLING,
	PROTON_PLUS_MODELS_BASE_RELEASE_STATE_BUSY_REMOVING,
	PROTON_PLUS_MODELS_BASE_RELEASE_STATE_BUSY_UPDATING
} ProtonPlusModelsBaseReleaseState;

#define PROTON_PLUS_MODELS_BASE_RELEASE_TYPE_STATE (proton_plus_models_base_release_state_get_type ())
typedef struct _ProtonPlusModelsReleasesUpdateUpdateData ProtonPlusModelsReleasesUpdateUpdateData;

struct _ProtonPlusModelsBaseRelease {
	GObject parent_instance;
	ProtonPlusModelsBaseReleasePrivate * priv;
};

struct _ProtonPlusModelsBaseReleaseClass {
	GObjectClass parent_class;
	void (*install) (ProtonPlusModelsBaseRelease* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*install_finish) (ProtonPlusModelsBaseRelease* self, GAsyncResult* _res_);
	void (*_start_install) (ProtonPlusModelsBaseRelease* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*_start_install_finish) (ProtonPlusModelsBaseRelease* self, GAsyncResult* _res_);
	void (*remove) (ProtonPlusModelsBaseRelease* self, ProtonPlusModelsParameters* parameters, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*remove_finish) (ProtonPlusModelsBaseRelease* self, GAsyncResult* _res_);
	void (*refresh_state) (ProtonPlusModelsBaseRelease* self);
};

struct _ProtonPlusModelsRelease {
	ProtonPlusModelsBaseRelease parent_instance;
	ProtonPlusModelsReleasePrivate * priv;
};

struct _ProtonPlusModelsReleaseClass {
	ProtonPlusModelsBaseReleaseClass parent_class;
	void (*_start_remove) (ProtonPlusModelsRelease* self, gconstpointer parameters, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*_start_remove_finish) (ProtonPlusModelsRelease* self, GAsyncResult* _res_);
};

struct _ProtonPlusModelsReleasesUpdate {
	ProtonPlusModelsRelease parent_instance;
	ProtonPlusModelsReleasesUpdatePrivate * priv;
};

struct _ProtonPlusModelsReleasesUpdateClass {
	ProtonPlusModelsReleaseClass parent_class;
	void (*_start_update) (ProtonPlusModelsReleasesUpdate* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*_start_update_finish) (ProtonPlusModelsReleasesUpdate* self, GAsyncResult* _res_);
};

struct _ProtonPlusModelsReleasesUpdatePrivate {
	GType r_type;
	GBoxedCopyFunc r_dup_func;
	GDestroyNotify r_destroy_func;
};

struct _ProtonPlusModelsReleasesUpdateUpdateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	ProtonPlusModelsReleasesUpdate* self;
	gboolean result;
	ProtonPlusModelsDownloadManager* _tmp0_;
	ProtonPlusModelsDownloadManager* _tmp1_;
	ProtonPlusModelsDownloadManager* _tmp2_;
	ProtonPlusModelsDownloadManager* _tmp3_;
	gboolean update_success;
	ProtonPlusModelsDownloadManager* _tmp4_;
	ProtonPlusModelsDownloadManager* _tmp5_;
};

static gint ProtonPlusModelsReleasesUpdate_private_offset;
static gpointer proton_plus_models_releases_update_parent_class = NULL;

VALA_EXTERN GType proton_plus_models_base_release_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsBaseRelease, g_object_unref)
VALA_EXTERN GType proton_plus_models_parameters_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsParameters, g_object_unref)
VALA_EXTERN GType proton_plus_models_release_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsRelease, g_object_unref)
VALA_EXTERN GType proton_plus_models_releases_update_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsReleasesUpdate, g_object_unref)
static void proton_plus_models_releases_update_update_data_free (gpointer _data);
VALA_EXTERN void proton_plus_models_releases_update_update (ProtonPlusModelsReleasesUpdate* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
VALA_EXTERN gboolean proton_plus_models_releases_update_update_finish (ProtonPlusModelsReleasesUpdate* self,
                                                           GAsyncResult* _res_);
static gboolean proton_plus_models_releases_update_update_co (ProtonPlusModelsReleasesUpdateUpdateData* _data_);
VALA_EXTERN GType proton_plus_models_download_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsDownloadManager, g_object_unref)
VALA_EXTERN ProtonPlusModelsDownloadManager* proton_plus_models_download_manager_get_instance (void);
VALA_EXTERN gboolean proton_plus_models_download_manager_is_downloading (ProtonPlusModelsDownloadManager* self,
                                                             ProtonPlusModelsBaseRelease* release);
VALA_EXTERN void proton_plus_models_base_release_set_canceled (ProtonPlusModelsBaseRelease* self,
                                                   gboolean value);
VALA_EXTERN GType proton_plus_models_base_release_state_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void proton_plus_models_base_release_set_state (ProtonPlusModelsBaseRelease* self,
                                                ProtonPlusModelsBaseReleaseState value);
VALA_EXTERN void proton_plus_models_download_manager_add_download (ProtonPlusModelsDownloadManager* self,
                                                       ProtonPlusModelsBaseRelease* release);
VALA_EXTERN void _proton_plus_models_releases_update_start_update (ProtonPlusModelsReleasesUpdate* self,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_);
VALA_EXTERN gboolean _proton_plus_models_releases_update_start_update_finish (ProtonPlusModelsReleasesUpdate* self,
                                                                  GAsyncResult* _res_);
static void proton_plus_models_releases_update_update_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_);
VALA_EXTERN void proton_plus_models_download_manager_remove_download (ProtonPlusModelsDownloadManager* self,
                                                          ProtonPlusModelsBaseRelease* release);
VALA_EXTERN void proton_plus_models_base_release_refresh_state (ProtonPlusModelsBaseRelease* self);
VALA_EXTERN ProtonPlusModelsReleasesUpdate* proton_plus_models_releases_update_construct (GType object_type,
                                                                              GType r_type,
                                                                              GBoxedCopyFunc r_dup_func,
                                                                              GDestroyNotify r_destroy_func);
VALA_EXTERN ProtonPlusModelsRelease* proton_plus_models_release_construct (GType object_type,
                                                               GType r_type,
                                                               GBoxedCopyFunc r_dup_func,
                                                               GDestroyNotify r_destroy_func);
static GType proton_plus_models_releases_update_get_type_once (void);
static void _vala_proton_plus_models_releases_update_get_property (GObject * object,
                                                            guint property_id,
                                                            GValue * value,
                                                            GParamSpec * pspec);
static void _vala_proton_plus_models_releases_update_set_property (GObject * object,
                                                            guint property_id,
                                                            const GValue * value,
                                                            GParamSpec * pspec);

static inline gpointer
proton_plus_models_releases_update_get_instance_private (ProtonPlusModelsReleasesUpdate* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsReleasesUpdate_private_offset);
}

static void
proton_plus_models_releases_update_update_data_free (gpointer _data)
{
	ProtonPlusModelsReleasesUpdateUpdateData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (ProtonPlusModelsReleasesUpdateUpdateData, _data_);
}

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

void
proton_plus_models_releases_update_update (ProtonPlusModelsReleasesUpdate* self,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	ProtonPlusModelsReleasesUpdateUpdateData* _data_;
	ProtonPlusModelsReleasesUpdate* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (ProtonPlusModelsReleasesUpdateUpdateData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, proton_plus_models_releases_update_update_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	proton_plus_models_releases_update_update_co (_data_);
}

gboolean
proton_plus_models_releases_update_update_finish (ProtonPlusModelsReleasesUpdate* self,
                                                  GAsyncResult* _res_)
{
	gboolean result;
	ProtonPlusModelsReleasesUpdateUpdateData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static void
proton_plus_models_releases_update_update_ready (GObject* source_object,
                                                 GAsyncResult* _res_,
                                                 gpointer _user_data_)
{
	ProtonPlusModelsReleasesUpdateUpdateData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	proton_plus_models_releases_update_update_co (_data_);
}

static gboolean
proton_plus_models_releases_update_update_co (ProtonPlusModelsReleasesUpdateUpdateData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = proton_plus_models_download_manager_get_instance ();
	_data_->_tmp1_ = _data_->_tmp0_;
	if (proton_plus_models_download_manager_is_downloading (_data_->_tmp1_, (ProtonPlusModelsBaseRelease*) _data_->self)) {
		_data_->result = FALSE;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	proton_plus_models_base_release_set_canceled ((ProtonPlusModelsBaseRelease*) _data_->self, FALSE);
	proton_plus_models_base_release_set_state ((ProtonPlusModelsBaseRelease*) _data_->self, PROTON_PLUS_MODELS_BASE_RELEASE_STATE_BUSY_UPDATING);
	_data_->_tmp2_ = proton_plus_models_download_manager_get_instance ();
	_data_->_tmp3_ = _data_->_tmp2_;
	proton_plus_models_download_manager_add_download (_data_->_tmp3_, (ProtonPlusModelsBaseRelease*) _data_->self);
	_data_->_state_ = 1;
	_proton_plus_models_releases_update_start_update (_data_->self, proton_plus_models_releases_update_update_ready, _data_);
	return FALSE;
	_state_1:
	_data_->update_success = _proton_plus_models_releases_update_start_update_finish (_data_->self, _data_->_res_);
	_data_->_tmp4_ = proton_plus_models_download_manager_get_instance ();
	_data_->_tmp5_ = _data_->_tmp4_;
	proton_plus_models_download_manager_remove_download (_data_->_tmp5_, (ProtonPlusModelsBaseRelease*) _data_->self);
	proton_plus_models_base_release_refresh_state ((ProtonPlusModelsBaseRelease*) _data_->self);
	_data_->result = _data_->update_success;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
_proton_plus_models_releases_update_start_update (ProtonPlusModelsReleasesUpdate* self,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_)
{
	ProtonPlusModelsReleasesUpdateClass* _klass_;
	_klass_ = PROTON_PLUS_MODELS_RELEASES_UPDATE_GET_CLASS (self);
	if (_klass_->_start_update) {
		_klass_->_start_update (self, _callback_, _user_data_);
	}
}

gboolean
_proton_plus_models_releases_update_start_update_finish (ProtonPlusModelsReleasesUpdate* self,
                                                         GAsyncResult* _res_)
{
	ProtonPlusModelsReleasesUpdateClass* _klass_;
	_klass_ = PROTON_PLUS_MODELS_RELEASES_UPDATE_GET_CLASS (self);
	if (_klass_->_start_update_finish) {
		return _klass_->_start_update_finish (self, _res_);
	}
	return FALSE;
}

ProtonPlusModelsReleasesUpdate*
proton_plus_models_releases_update_construct (GType object_type,
                                              GType r_type,
                                              GBoxedCopyFunc r_dup_func,
                                              GDestroyNotify r_destroy_func)
{
	ProtonPlusModelsReleasesUpdate * self = NULL;
	self = (ProtonPlusModelsReleasesUpdate*) proton_plus_models_release_construct (object_type, r_type, (GBoxedCopyFunc) r_dup_func, (GDestroyNotify) r_destroy_func);
	self->priv->r_type = r_type;
	self->priv->r_dup_func = r_dup_func;
	self->priv->r_destroy_func = r_destroy_func;
	return self;
}

static void
proton_plus_models_releases_update_class_init (ProtonPlusModelsReleasesUpdateClass * klass,
                                               gpointer klass_data)
{
	proton_plus_models_releases_update_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsReleasesUpdate_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_models_releases_update_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_models_releases_update_set_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASES_UPDATE_R_TYPE, g_param_spec_gtype ("r-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASES_UPDATE_R_DUP_FUNC, g_param_spec_pointer ("r-dup-func", "dup func", "dup func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_RELEASES_UPDATE_R_DESTROY_FUNC, g_param_spec_pointer ("r-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}

static void
proton_plus_models_releases_update_instance_init (ProtonPlusModelsReleasesUpdate * self,
                                                  gpointer klass)
{
	self->priv = proton_plus_models_releases_update_get_instance_private (self);
}

static GType
proton_plus_models_releases_update_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsReleasesUpdateClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_releases_update_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsReleasesUpdate), 0, (GInstanceInitFunc) proton_plus_models_releases_update_instance_init, NULL };
	GType proton_plus_models_releases_update_type_id;
	proton_plus_models_releases_update_type_id = g_type_register_static (PROTON_PLUS_MODELS_TYPE_RELEASE, "ProtonPlusModelsReleasesUpdate", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	ProtonPlusModelsReleasesUpdate_private_offset = g_type_add_instance_private (proton_plus_models_releases_update_type_id, sizeof (ProtonPlusModelsReleasesUpdatePrivate));
	return proton_plus_models_releases_update_type_id;
}

GType
proton_plus_models_releases_update_get_type (void)
{
	static volatile gsize proton_plus_models_releases_update_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_releases_update_type_id__once)) {
		GType proton_plus_models_releases_update_type_id;
		proton_plus_models_releases_update_type_id = proton_plus_models_releases_update_get_type_once ();
		g_once_init_leave (&proton_plus_models_releases_update_type_id__once, proton_plus_models_releases_update_type_id);
	}
	return proton_plus_models_releases_update_type_id__once;
}

static void
_vala_proton_plus_models_releases_update_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec)
{
	ProtonPlusModelsReleasesUpdate * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_RELEASES_TYPE_UPDATE, ProtonPlusModelsReleasesUpdate);
	switch (property_id) {
		case PROTON_PLUS_MODELS_RELEASES_UPDATE_R_TYPE:
		g_value_set_gtype (value, self->priv->r_type);
		break;
		case PROTON_PLUS_MODELS_RELEASES_UPDATE_R_DUP_FUNC:
		g_value_set_pointer (value, self->priv->r_dup_func);
		break;
		case PROTON_PLUS_MODELS_RELEASES_UPDATE_R_DESTROY_FUNC:
		g_value_set_pointer (value, self->priv->r_destroy_func);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_models_releases_update_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec)
{
	ProtonPlusModelsReleasesUpdate * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_RELEASES_TYPE_UPDATE, ProtonPlusModelsReleasesUpdate);
	switch (property_id) {
		case PROTON_PLUS_MODELS_RELEASES_UPDATE_R_TYPE:
		self->priv->r_type = g_value_get_gtype (value);
		break;
		case PROTON_PLUS_MODELS_RELEASES_UPDATE_R_DUP_FUNC:
		self->priv->r_dup_func = g_value_get_pointer (value);
		break;
		case PROTON_PLUS_MODELS_RELEASES_UPDATE_R_DESTROY_FUNC:
		self->priv->r_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

