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

#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gstdio.h>
#include <gio/gio.h>
#include <gee.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_GROUP (proton_plus_models_group_get_type ())
#define PROTON_PLUS_MODELS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroup))
#define PROTON_PLUS_MODELS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroupClass))
#define PROTON_PLUS_MODELS_IS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_GROUP))
#define PROTON_PLUS_MODELS_IS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_GROUP))
#define PROTON_PLUS_MODELS_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroupClass))

typedef struct _ProtonPlusModelsGroup ProtonPlusModelsGroup;
typedef struct _ProtonPlusModelsGroupClass ProtonPlusModelsGroupClass;
typedef struct _ProtonPlusModelsGroupPrivate ProtonPlusModelsGroupPrivate;

#define PROTON_PLUS_MODELS_TYPE_RUNNER (proton_plus_models_runner_get_type ())
#define PROTON_PLUS_MODELS_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_RUNNER, ProtonPlusModelsRunner))
#define PROTON_PLUS_MODELS_RUNNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_RUNNER, ProtonPlusModelsRunnerClass))
#define PROTON_PLUS_MODELS_IS_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_RUNNER))
#define PROTON_PLUS_MODELS_IS_RUNNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_RUNNER))
#define PROTON_PLUS_MODELS_RUNNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_RUNNER, ProtonPlusModelsRunnerClass))

typedef struct _ProtonPlusModelsRunner ProtonPlusModelsRunner;
typedef struct _ProtonPlusModelsRunnerClass ProtonPlusModelsRunnerClass;

#define PROTON_PLUS_MODELS_TYPE_LAUNCHER (proton_plus_models_launcher_get_type ())
#define PROTON_PLUS_MODELS_LAUNCHER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_LAUNCHER, ProtonPlusModelsLauncher))
#define PROTON_PLUS_MODELS_LAUNCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_LAUNCHER, ProtonPlusModelsLauncherClass))
#define PROTON_PLUS_MODELS_IS_LAUNCHER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_LAUNCHER))
#define PROTON_PLUS_MODELS_IS_LAUNCHER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_LAUNCHER))
#define PROTON_PLUS_MODELS_LAUNCHER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_LAUNCHER, ProtonPlusModelsLauncherClass))

typedef struct _ProtonPlusModelsLauncher ProtonPlusModelsLauncher;
typedef struct _ProtonPlusModelsLauncherClass ProtonPlusModelsLauncherClass;
enum  {
	PROTON_PLUS_MODELS_GROUP_0_PROPERTY,
	PROTON_PLUS_MODELS_GROUP_TITLE_PROPERTY,
	PROTON_PLUS_MODELS_GROUP_DESCRIPTION_PROPERTY,
	PROTON_PLUS_MODELS_GROUP_DIRECTORY_PROPERTY,
	PROTON_PLUS_MODELS_GROUP_LAUNCHER_PROPERTY,
	PROTON_PLUS_MODELS_GROUP_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _ProtonPlusModelsLauncherPrivate ProtonPlusModelsLauncherPrivate;

#define PROTON_PLUS_MODELS_TYPE_GAME (proton_plus_models_game_get_type ())
#define PROTON_PLUS_MODELS_GAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_GAME, ProtonPlusModelsGame))
#define PROTON_PLUS_MODELS_GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_GAME, ProtonPlusModelsGameClass))
#define PROTON_PLUS_MODELS_IS_GAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_GAME))
#define PROTON_PLUS_MODELS_IS_GAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_GAME))
#define PROTON_PLUS_MODELS_GAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_GAME, ProtonPlusModelsGameClass))

typedef struct _ProtonPlusModelsGame ProtonPlusModelsGame;
typedef struct _ProtonPlusModelsGameClass ProtonPlusModelsGameClass;

#define PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER (proton_plus_models_simple_runner_get_type ())
#define PROTON_PLUS_MODELS_SIMPLE_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER, ProtonPlusModelsSimpleRunner))
#define PROTON_PLUS_MODELS_SIMPLE_RUNNER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER, ProtonPlusModelsSimpleRunnerClass))
#define PROTON_PLUS_MODELS_IS_SIMPLE_RUNNER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER))
#define PROTON_PLUS_MODELS_IS_SIMPLE_RUNNER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER))
#define PROTON_PLUS_MODELS_SIMPLE_RUNNER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_TYPE_SIMPLE_RUNNER, ProtonPlusModelsSimpleRunnerClass))

typedef struct _ProtonPlusModelsSimpleRunner ProtonPlusModelsSimpleRunner;
typedef struct _ProtonPlusModelsSimpleRunnerClass ProtonPlusModelsSimpleRunnerClass;
typedef enum  {
	PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SYSTEM,
	PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_FLATPAK,
	PROTON_PLUS_MODELS_LAUNCHER_INSTALLATION_TYPES_SNAP
} ProtonPlusModelsLauncherInstallationTypes;

#define PROTON_PLUS_MODELS_LAUNCHER_TYPE_INSTALLATION_TYPES (proton_plus_models_launcher_installation_types_get_type ())
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

struct _ProtonPlusModelsGroup {
	GObject parent_instance;
	ProtonPlusModelsGroupPrivate * priv;
	GList* runners;
};

struct _ProtonPlusModelsGroupClass {
	GObjectClass parent_class;
};

struct _ProtonPlusModelsGroupPrivate {
	gchar* _title;
	gchar* _description;
	gchar* _directory;
	ProtonPlusModelsLauncher* _launcher;
};

struct _ProtonPlusModelsLauncher {
	GObject parent_instance;
	ProtonPlusModelsLauncherPrivate * priv;
	gchar* title;
	gchar* icon_path;
	gchar* directory;
	gboolean installed;
	gboolean has_library_support;
	GList* games;
	GeeArrayList* compatibility_tools;
	ProtonPlusModelsGroup** groups;
	gint groups_length1;
	ProtonPlusModelsLauncherInstallationTypes installation_type;
};

struct _ProtonPlusModelsLauncherClass {
	GObjectClass parent_class;
	void (*load_game_library) (ProtonPlusModelsLauncher* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*load_game_library_finish) (ProtonPlusModelsLauncher* self, GAsyncResult* _res_);
	gint (*get_compatibility_tool_usage_count) (ProtonPlusModelsLauncher* self, const gchar* compatibility_tool_name);
};

static gint ProtonPlusModelsGroup_private_offset;
static gpointer proton_plus_models_group_parent_class = NULL;

VALA_EXTERN GType proton_plus_models_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGroup, g_object_unref)
VALA_EXTERN GType proton_plus_models_runner_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsRunner, g_object_unref)
VALA_EXTERN GType proton_plus_models_launcher_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsLauncher, g_object_unref)
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
VALA_EXTERN ProtonPlusModelsGroup* proton_plus_models_group_new (const gchar* title,
                                                     const gchar* description,
                                                     const gchar* directory,
                                                     ProtonPlusModelsLauncher* launcher);
VALA_EXTERN ProtonPlusModelsGroup* proton_plus_models_group_construct (GType object_type,
                                                           const gchar* title,
                                                           const gchar* description,
                                                           const gchar* directory,
                                                           ProtonPlusModelsLauncher* launcher);
VALA_EXTERN void proton_plus_models_group_set_title (ProtonPlusModelsGroup* self,
                                         const gchar* value);
VALA_EXTERN void proton_plus_models_group_set_description (ProtonPlusModelsGroup* self,
                                               const gchar* value);
VALA_EXTERN void proton_plus_models_group_set_directory (ProtonPlusModelsGroup* self,
                                             const gchar* value);
VALA_EXTERN void proton_plus_models_group_set_launcher (ProtonPlusModelsGroup* self,
                                            ProtonPlusModelsLauncher* value);
VALA_EXTERN GType proton_plus_models_game_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGame, g_object_unref)
VALA_EXTERN GType proton_plus_models_simple_runner_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsSimpleRunner, g_object_unref)
VALA_EXTERN GType proton_plus_models_launcher_installation_types_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void proton_plus_utils_filesystem_create_directory (const gchar* path,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
VALA_EXTERN gboolean proton_plus_utils_filesystem_create_directory_finish (GAsyncResult* _res_);
static void ___lambda73_ (ProtonPlusModelsGroup* self,
                   GObject* obj,
                   GAsyncResult* res);
static void ____lambda73__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
VALA_EXTERN GList* proton_plus_models_group_get_compatibility_tool_directories (ProtonPlusModelsGroup* self);
VALA_EXTERN ProtonPlusModelsLauncher* proton_plus_models_group_get_launcher (ProtonPlusModelsGroup* self);
VALA_EXTERN const gchar* proton_plus_models_group_get_directory (ProtonPlusModelsGroup* self);
static void _g_free0_ (gpointer var);
static inline void _g_list_free__g_free0_ (GList* self);
VALA_EXTERN void proton_plus_models_group_bob (ProtonPlusModelsGroup* self);
VALA_EXTERN const gchar* proton_plus_models_group_get_title (ProtonPlusModelsGroup* self);
VALA_EXTERN const gchar* proton_plus_models_group_get_description (ProtonPlusModelsGroup* self);
static void proton_plus_models_group_finalize (GObject * obj);
static GType proton_plus_models_group_get_type_once (void);
static void _vala_proton_plus_models_group_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec);
static void _vala_proton_plus_models_group_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec);

static inline gpointer
proton_plus_models_group_get_instance_private (ProtonPlusModelsGroup* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsGroup_private_offset);
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

static void
___lambda73_ (ProtonPlusModelsGroup* self,
              GObject* obj,
              GAsyncResult* res)
{
	g_return_if_fail (res != NULL);
	proton_plus_utils_filesystem_create_directory_finish (res);
}

static void
____lambda73__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda73_ ((ProtonPlusModelsGroup*) self, source_object, res);
	g_object_unref (self);
}

ProtonPlusModelsGroup*
proton_plus_models_group_construct (GType object_type,
                                    const gchar* title,
                                    const gchar* description,
                                    const gchar* directory,
                                    ProtonPlusModelsLauncher* launcher)
{
	ProtonPlusModelsGroup * self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_;
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (description != NULL, NULL);
	g_return_val_if_fail (directory != NULL, NULL);
	g_return_val_if_fail (launcher != NULL, NULL);
	self = (ProtonPlusModelsGroup*) g_object_new (object_type, NULL);
	proton_plus_models_group_set_title (self, title);
	proton_plus_models_group_set_description (self, description);
	proton_plus_models_group_set_directory (self, directory);
	proton_plus_models_group_set_launcher (self, launcher);
	_tmp0_ = launcher->directory;
	_tmp1_ = g_strconcat (_tmp0_, directory, NULL);
	_tmp2_ = _tmp1_;
	_tmp3_ = !g_file_test (_tmp2_, G_FILE_TEST_IS_DIR);
	_g_free0 (_tmp2_);
	if (_tmp3_) {
		const gchar* _tmp4_;
		gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp4_ = launcher->directory;
		_tmp5_ = g_strconcat (_tmp4_, directory, NULL);
		_tmp6_ = _tmp5_;
		proton_plus_utils_filesystem_create_directory (_tmp6_, ____lambda73__gasync_ready_callback, g_object_ref (self));
		_g_free0 (_tmp6_);
	}
	return self;
}

ProtonPlusModelsGroup*
proton_plus_models_group_new (const gchar* title,
                              const gchar* description,
                              const gchar* directory,
                              ProtonPlusModelsLauncher* launcher)
{
	return proton_plus_models_group_construct (PROTON_PLUS_MODELS_TYPE_GROUP, title, description, directory, launcher);
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static inline void
_g_list_free__g_free0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_free0_);
}

GList*
proton_plus_models_group_get_compatibility_tool_directories (ProtonPlusModelsGroup* self)
{
	GList* directories = NULL;
	GError* _inner_error0_ = NULL;
	GList* result;
	g_return_val_if_fail (self != NULL, NULL);
	directories = NULL;
	{
		gchar* directory_path = NULL;
		ProtonPlusModelsLauncher* _tmp0_;
		const gchar* _tmp1_;
		const gchar* _tmp2_;
		gchar* _tmp3_;
		GFile* directory = NULL;
		const gchar* _tmp4_;
		GFile* _tmp5_;
		GFileEnumerator* enumerator = NULL;
		GFile* _tmp6_;
		GFileEnumerator* _tmp7_;
		GFileEnumerator* _tmp8_;
		_tmp0_ = self->priv->_launcher;
		_tmp1_ = _tmp0_->directory;
		_tmp2_ = self->priv->_directory;
		_tmp3_ = g_strconcat (_tmp1_, _tmp2_, NULL);
		directory_path = _tmp3_;
		_tmp4_ = directory_path;
		_tmp5_ = g_file_new_for_path (_tmp4_);
		directory = _tmp5_;
		_tmp6_ = directory;
		_tmp7_ = g_file_enumerate_children (_tmp6_, "standard::*", G_FILE_QUERY_INFO_NONE, NULL, &_inner_error0_);
		enumerator = _tmp7_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (directory);
			_g_free0 (directory_path);
			goto __catch0_g_error;
		}
		_tmp8_ = enumerator;
		if (_tmp8_ != NULL) {
			GFileInfo* file_info = NULL;
			while (TRUE) {
				GFileInfo* _tmp9_ = NULL;
				GFileEnumerator* _tmp10_;
				GFileInfo* _tmp11_;
				GFileInfo* _tmp12_;
				GFileInfo* _tmp13_;
				GFileInfo* _tmp14_;
				gchar* title = NULL;
				GFileInfo* _tmp15_;
				const gchar* _tmp16_;
				gchar* _tmp17_;
				const gchar* _tmp18_;
				_tmp10_ = enumerator;
				_tmp11_ = g_file_enumerator_next_file (_tmp10_, NULL, &_inner_error0_);
				_tmp9_ = _tmp11_;
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					_g_object_unref0 (file_info);
					_g_object_unref0 (enumerator);
					_g_object_unref0 (directory);
					_g_free0 (directory_path);
					goto __catch0_g_error;
				}
				_tmp12_ = _tmp9_;
				_tmp9_ = NULL;
				_g_object_unref0 (file_info);
				file_info = _tmp12_;
				_tmp13_ = file_info;
				if (!(_tmp13_ != NULL)) {
					_g_object_unref0 (_tmp9_);
					break;
				}
				_tmp14_ = file_info;
				if (g_file_info_get_file_type (_tmp14_) != G_FILE_TYPE_DIRECTORY) {
					_g_object_unref0 (_tmp9_);
					continue;
				}
				_tmp15_ = file_info;
				_tmp16_ = g_file_info_get_name (_tmp15_);
				_tmp17_ = g_strdup (_tmp16_);
				title = _tmp17_;
				_tmp18_ = title;
				if (g_strcmp0 (_tmp18_, "LegacyRuntime") != 0) {
					const gchar* _tmp19_;
					gchar* _tmp20_;
					_tmp19_ = title;
					_tmp20_ = g_strdup (_tmp19_);
					directories = g_list_append (directories, _tmp20_);
				}
				_g_free0 (title);
				_g_object_unref0 (_tmp9_);
			}
			_g_object_unref0 (file_info);
		}
		_g_object_unref0 (enumerator);
		_g_object_unref0 (directory);
		_g_free0 (directory_path);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp21_;
		const gchar* _tmp22_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp21_ = e;
		_tmp22_ = _tmp21_->message;
		g_warning ("group.vala:44: %s", _tmp22_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		(directories == NULL) ? NULL : (directories = (_g_list_free__g_free0_ (directories), 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 NULL;
	}
	result = directories;
	return result;
}

void
proton_plus_models_group_bob (ProtonPlusModelsGroup* self)
{
	g_return_if_fail (self != NULL);
}

const gchar*
proton_plus_models_group_get_title (ProtonPlusModelsGroup* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_title;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_group_set_title (ProtonPlusModelsGroup* self,
                                    const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_group_get_title (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_title);
		self->priv->_title = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_TITLE_PROPERTY]);
	}
}

const gchar*
proton_plus_models_group_get_description (ProtonPlusModelsGroup* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_description;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_group_set_description (ProtonPlusModelsGroup* self,
                                          const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_group_get_description (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_description);
		self->priv->_description = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_DESCRIPTION_PROPERTY]);
	}
}

const gchar*
proton_plus_models_group_get_directory (ProtonPlusModelsGroup* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_directory;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_group_set_directory (ProtonPlusModelsGroup* self,
                                        const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_group_get_directory (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_directory);
		self->priv->_directory = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_DIRECTORY_PROPERTY]);
	}
}

ProtonPlusModelsLauncher*
proton_plus_models_group_get_launcher (ProtonPlusModelsGroup* self)
{
	ProtonPlusModelsLauncher* result;
	ProtonPlusModelsLauncher* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_launcher;
	result = _tmp0_;
	return result;
}

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

void
proton_plus_models_group_set_launcher (ProtonPlusModelsGroup* self,
                                       ProtonPlusModelsLauncher* value)
{
	ProtonPlusModelsLauncher* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_group_get_launcher (self);
	if (old_value != value) {
		ProtonPlusModelsLauncher* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_launcher);
		self->priv->_launcher = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_LAUNCHER_PROPERTY]);
	}
}

static void
proton_plus_models_group_class_init (ProtonPlusModelsGroupClass * klass,
                                     gpointer klass_data)
{
	proton_plus_models_group_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsGroup_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_models_group_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_models_group_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_models_group_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GROUP_TITLE_PROPERTY, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GROUP_DESCRIPTION_PROPERTY, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_DESCRIPTION_PROPERTY] = g_param_spec_string ("description", "description", "description", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GROUP_DIRECTORY_PROPERTY, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_DIRECTORY_PROPERTY] = g_param_spec_string ("directory", "directory", "directory", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_GROUP_LAUNCHER_PROPERTY, proton_plus_models_group_properties[PROTON_PLUS_MODELS_GROUP_LAUNCHER_PROPERTY] = g_param_spec_object ("launcher", "launcher", "launcher", PROTON_PLUS_MODELS_TYPE_LAUNCHER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
proton_plus_models_group_instance_init (ProtonPlusModelsGroup * self,
                                        gpointer klass)
{
	self->priv = proton_plus_models_group_get_instance_private (self);
}

static void
proton_plus_models_group_finalize (GObject * obj)
{
	ProtonPlusModelsGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroup);
	_g_free0 (self->priv->_title);
	_g_free0 (self->priv->_description);
	_g_free0 (self->priv->_directory);
	_g_object_unref0 (self->priv->_launcher);
	(self->runners == NULL) ? NULL : (self->runners = (_g_list_free__g_object_unref0_ (self->runners), NULL));
	G_OBJECT_CLASS (proton_plus_models_group_parent_class)->finalize (obj);
}

static GType
proton_plus_models_group_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsGroupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_group_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsGroup), 0, (GInstanceInitFunc) proton_plus_models_group_instance_init, NULL };
	GType proton_plus_models_group_type_id;
	proton_plus_models_group_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusModelsGroup", &g_define_type_info, 0);
	ProtonPlusModelsGroup_private_offset = g_type_add_instance_private (proton_plus_models_group_type_id, sizeof (ProtonPlusModelsGroupPrivate));
	return proton_plus_models_group_type_id;
}

GType
proton_plus_models_group_get_type (void)
{
	static volatile gsize proton_plus_models_group_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_group_type_id__once)) {
		GType proton_plus_models_group_type_id;
		proton_plus_models_group_type_id = proton_plus_models_group_get_type_once ();
		g_once_init_leave (&proton_plus_models_group_type_id__once, proton_plus_models_group_type_id);
	}
	return proton_plus_models_group_type_id__once;
}

static void
_vala_proton_plus_models_group_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec)
{
	ProtonPlusModelsGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroup);
	switch (property_id) {
		case PROTON_PLUS_MODELS_GROUP_TITLE_PROPERTY:
		g_value_set_string (value, proton_plus_models_group_get_title (self));
		break;
		case PROTON_PLUS_MODELS_GROUP_DESCRIPTION_PROPERTY:
		g_value_set_string (value, proton_plus_models_group_get_description (self));
		break;
		case PROTON_PLUS_MODELS_GROUP_DIRECTORY_PROPERTY:
		g_value_set_string (value, proton_plus_models_group_get_directory (self));
		break;
		case PROTON_PLUS_MODELS_GROUP_LAUNCHER_PROPERTY:
		g_value_set_object (value, proton_plus_models_group_get_launcher (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_models_group_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec)
{
	ProtonPlusModelsGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_GROUP, ProtonPlusModelsGroup);
	switch (property_id) {
		case PROTON_PLUS_MODELS_GROUP_TITLE_PROPERTY:
		proton_plus_models_group_set_title (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_GROUP_DESCRIPTION_PROPERTY:
		proton_plus_models_group_set_description (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_GROUP_DIRECTORY_PROPERTY:
		proton_plus_models_group_set_directory (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_GROUP_LAUNCHER_PROPERTY:
		proton_plus_models_group_set_launcher (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

