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

#include <glib-object.h>
#include <gio/gio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#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_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;
typedef struct _ProtonPlusModelsRunnerPrivate ProtonPlusModelsRunnerPrivate;

#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;

#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 enum  {
	PROTON_PLUS_RETURN_CODE_UNKNOWN_ERROR,
	PROTON_PLUS_RETURN_CODE_RELEASES_LOADED,
	PROTON_PLUS_RETURN_CODE_NOTHING_TO_UPDATE,
	PROTON_PLUS_RETURN_CODE_RUNNERS_UPDATED,
	PROTON_PLUS_RETURN_CODE_RUNNER_UPDATED,
	PROTON_PLUS_RETURN_CODE_VALID_REQUEST,
	PROTON_PLUS_RETURN_CODE_CONNECTION_ISSUE,
	PROTON_PLUS_RETURN_CODE_CONNECTION_REFUSED,
	PROTON_PLUS_RETURN_CODE_CONNECTION_UNKNOWN,
	PROTON_PLUS_RETURN_CODE_API_LIMIT_REACHED,
	PROTON_PLUS_RETURN_CODE_INVALID_ACCESS_TOKEN
} ProtonPlusReturnCode;

#define PROTON_PLUS_TYPE_RETURN_CODE (proton_plus_return_code_get_type ())

#define PROTON_PLUS_MODELS_RUNNERS_TYPE_BASIC (proton_plus_models_runners_basic_get_type ())
#define PROTON_PLUS_MODELS_RUNNERS_BASIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_RUNNERS_TYPE_BASIC, ProtonPlusModelsRunnersBasic))
#define PROTON_PLUS_MODELS_RUNNERS_BASIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_RUNNERS_TYPE_BASIC, ProtonPlusModelsRunnersBasicClass))
#define PROTON_PLUS_MODELS_RUNNERS_IS_BASIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_RUNNERS_TYPE_BASIC))
#define PROTON_PLUS_MODELS_RUNNERS_IS_BASIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_RUNNERS_TYPE_BASIC))
#define PROTON_PLUS_MODELS_RUNNERS_BASIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_RUNNERS_TYPE_BASIC, ProtonPlusModelsRunnersBasicClass))

typedef struct _ProtonPlusModelsRunnersBasic ProtonPlusModelsRunnersBasic;
typedef struct _ProtonPlusModelsRunnersBasicClass ProtonPlusModelsRunnersBasicClass;
typedef struct _ProtonPlusModelsRunnersBasicPrivate ProtonPlusModelsRunnersBasicPrivate;

#define PROTON_PLUS_MODELS_RUNNERS_TYPE_GIT_HUB (proton_plus_models_runners_git_hub_get_type ())
#define PROTON_PLUS_MODELS_RUNNERS_GIT_HUB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_RUNNERS_TYPE_GIT_HUB, ProtonPlusModelsRunnersGitHub))
#define PROTON_PLUS_MODELS_RUNNERS_GIT_HUB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_RUNNERS_TYPE_GIT_HUB, ProtonPlusModelsRunnersGitHubClass))
#define PROTON_PLUS_MODELS_RUNNERS_IS_GIT_HUB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_RUNNERS_TYPE_GIT_HUB))
#define PROTON_PLUS_MODELS_RUNNERS_IS_GIT_HUB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_RUNNERS_TYPE_GIT_HUB))
#define PROTON_PLUS_MODELS_RUNNERS_GIT_HUB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_RUNNERS_TYPE_GIT_HUB, ProtonPlusModelsRunnersGitHubClass))

typedef struct _ProtonPlusModelsRunnersGitHub ProtonPlusModelsRunnersGitHub;
typedef struct _ProtonPlusModelsRunnersGitHubClass ProtonPlusModelsRunnersGitHubClass;
typedef struct _ProtonPlusModelsRunnersGitHubPrivate ProtonPlusModelsRunnersGitHubPrivate;

#define PROTON_PLUS_MODELS_RUNNERS_TYPE_INSTALLED (proton_plus_models_runners_installed_get_type ())
#define PROTON_PLUS_MODELS_RUNNERS_INSTALLED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_MODELS_RUNNERS_TYPE_INSTALLED, ProtonPlusModelsRunnersInstalled))
#define PROTON_PLUS_MODELS_RUNNERS_INSTALLED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_MODELS_RUNNERS_TYPE_INSTALLED, ProtonPlusModelsRunnersInstalledClass))
#define PROTON_PLUS_MODELS_RUNNERS_IS_INSTALLED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_MODELS_RUNNERS_TYPE_INSTALLED))
#define PROTON_PLUS_MODELS_RUNNERS_IS_INSTALLED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_MODELS_RUNNERS_TYPE_INSTALLED))
#define PROTON_PLUS_MODELS_RUNNERS_INSTALLED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_MODELS_RUNNERS_TYPE_INSTALLED, ProtonPlusModelsRunnersInstalledClass))

typedef struct _ProtonPlusModelsRunnersInstalled ProtonPlusModelsRunnersInstalled;
typedef struct _ProtonPlusModelsRunnersInstalledClass ProtonPlusModelsRunnersInstalledClass;
typedef struct _ProtonPlusModelsRunnersInstalledPrivate ProtonPlusModelsRunnersInstalledPrivate;
enum  {
	PROTON_PLUS_MODELS_RUNNERS_INSTALLED_0_PROPERTY,
	PROTON_PLUS_MODELS_RUNNERS_INSTALLED_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_runners_installed_properties[PROTON_PLUS_MODELS_RUNNERS_INSTALLED_NUM_PROPERTIES];

#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;

struct _ProtonPlusModelsRunner {
	GObject parent_instance;
	ProtonPlusModelsRunnerPrivate * priv;
	GList* releases;
};

struct _ProtonPlusModelsRunnerClass {
	GObjectClass parent_class;
	void (*load) (ProtonPlusModelsRunner* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	ProtonPlusReturnCode (*load_finish) (ProtonPlusModelsRunner* self, GAsyncResult* _res_, GList** releases);
};

struct _ProtonPlusModelsRunnersBasic {
	ProtonPlusModelsRunner parent_instance;
	ProtonPlusModelsRunnersBasicPrivate * priv;
};

struct _ProtonPlusModelsRunnersBasicClass {
	ProtonPlusModelsRunnerClass parent_class;
	gchar* (*get_directory_name) (ProtonPlusModelsRunnersBasic* self, const gchar* release_name);
};

struct _ProtonPlusModelsRunnersGitHub {
	ProtonPlusModelsRunnersBasic parent_instance;
	ProtonPlusModelsRunnersGitHubPrivate * priv;
};

struct _ProtonPlusModelsRunnersGitHubClass {
	ProtonPlusModelsRunnersBasicClass parent_class;
};

struct _ProtonPlusModelsRunnersInstalled {
	ProtonPlusModelsRunnersGitHub parent_instance;
	ProtonPlusModelsRunnersInstalledPrivate * priv;
};

struct _ProtonPlusModelsRunnersInstalledClass {
	ProtonPlusModelsRunnersGitHubClass parent_class;
};

static gpointer proton_plus_models_runners_installed_parent_class = NULL;

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_base_release_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsBaseRelease, 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_return_code_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType proton_plus_models_runners_basic_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsRunnersBasic, g_object_unref)
VALA_EXTERN GType proton_plus_models_runners_git_hub_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsRunnersGitHub, g_object_unref)
VALA_EXTERN GType proton_plus_models_runners_installed_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsRunnersInstalled, g_object_unref)
VALA_EXTERN gchar* proton_plus_models_runners_basic_get_directory_name (ProtonPlusModelsRunnersBasic* self,
                                                            const gchar* release_name);
VALA_EXTERN GType proton_plus_models_group_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusModelsGroup, g_object_unref)
VALA_EXTERN ProtonPlusModelsRunnersInstalled* proton_plus_models_runners_installed_new (ProtonPlusModelsGroup* group);
VALA_EXTERN ProtonPlusModelsRunnersInstalled* proton_plus_models_runners_installed_construct (GType object_type,
                                                                                  ProtonPlusModelsGroup* group);
static gchar* proton_plus_models_runners_installed_real_get_directory_name (ProtonPlusModelsRunnersBasic* base,
                                                                     const gchar* release_name);
static GType proton_plus_models_runners_installed_get_type_once (void);

ProtonPlusModelsRunnersInstalled*
proton_plus_models_runners_installed_construct (GType object_type,
                                                ProtonPlusModelsGroup* group)
{
	ProtonPlusModelsRunnersInstalled * self = NULL;
	g_return_val_if_fail (group != NULL, NULL);
	self = (ProtonPlusModelsRunnersInstalled*) g_object_new (object_type, "group", group, NULL);
	return self;
}

ProtonPlusModelsRunnersInstalled*
proton_plus_models_runners_installed_new (ProtonPlusModelsGroup* group)
{
	return proton_plus_models_runners_installed_construct (PROTON_PLUS_MODELS_RUNNERS_TYPE_INSTALLED, group);
}

static gchar*
proton_plus_models_runners_installed_real_get_directory_name (ProtonPlusModelsRunnersBasic* base,
                                                              const gchar* release_name)
{
	ProtonPlusModelsRunnersInstalled * self;
	gchar* _tmp0_;
	gchar* result;
	self = (ProtonPlusModelsRunnersInstalled*) base;
	g_return_val_if_fail (release_name != NULL, NULL);
	_tmp0_ = g_strdup (release_name);
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_runners_installed_class_init (ProtonPlusModelsRunnersInstalledClass * klass,
                                                 gpointer klass_data)
{
	proton_plus_models_runners_installed_parent_class = g_type_class_peek_parent (klass);
	((ProtonPlusModelsRunnersBasicClass *) klass)->get_directory_name = (gchar* (*) (ProtonPlusModelsRunnersBasic*, const gchar*)) proton_plus_models_runners_installed_real_get_directory_name;
}

static void
proton_plus_models_runners_installed_instance_init (ProtonPlusModelsRunnersInstalled * self,
                                                    gpointer klass)
{
}

static GType
proton_plus_models_runners_installed_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsRunnersInstalledClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_runners_installed_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsRunnersInstalled), 0, (GInstanceInitFunc) proton_plus_models_runners_installed_instance_init, NULL };
	GType proton_plus_models_runners_installed_type_id;
	proton_plus_models_runners_installed_type_id = g_type_register_static (PROTON_PLUS_MODELS_RUNNERS_TYPE_GIT_HUB, "ProtonPlusModelsRunnersInstalled", &g_define_type_info, 0);
	return proton_plus_models_runners_installed_type_id;
}

GType
proton_plus_models_runners_installed_get_type (void)
{
	static volatile gsize proton_plus_models_runners_installed_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_runners_installed_type_id__once)) {
		GType proton_plus_models_runners_installed_type_id;
		proton_plus_models_runners_installed_type_id = proton_plus_models_runners_installed_get_type_once ();
		g_once_init_leave (&proton_plus_models_runners_installed_type_id__once, proton_plus_models_runners_installed_type_id);
	}
	return proton_plus_models_runners_installed_type_id__once;
}

