/* release-source-registry.c generated by valac 0.56.19, the Vala compiler
 * generated from release-source-registry.vala, do not modify */

#include "protonplus_core.h"
#include <glib.h>
#include <glib-object.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

enum  {
	PROTON_PLUS_PROVIDERS_SOURCES_RELEASE_SOURCE_REGISTRY_0_PROPERTY,
	PROTON_PLUS_PROVIDERS_SOURCES_RELEASE_SOURCE_REGISTRY_NUM_PROPERTIES
};
static GParamSpec* proton_plus_providers_sources_release_source_registry_properties[PROTON_PLUS_PROVIDERS_SOURCES_RELEASE_SOURCE_REGISTRY_NUM_PROPERTIES];

static gpointer proton_plus_providers_sources_release_source_registry_parent_class = NULL;

static GType proton_plus_providers_sources_release_source_registry_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

ProtonPlusProvidersSourcesReleaseSource*
proton_plus_providers_sources_release_source_registry_create (ProtonPlusModelsProvidersSourceType source_type)
{
	ProtonPlusProvidersSourcesReleaseSource* result;
	switch (source_type) {
		case PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_GITHUB:
		{
			ProtonPlusProvidersSourcesGitHubReleaseSource* _tmp0_;
			_tmp0_ = proton_plus_providers_sources_git_hub_release_source_new ();
			result = (ProtonPlusProvidersSourcesReleaseSource*) _tmp0_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_GITHUB_ACTIONS:
		{
			ProtonPlusProvidersSourcesGitHubActionsReleaseSource* _tmp1_;
			_tmp1_ = proton_plus_providers_sources_git_hub_actions_release_source_new ();
			result = (ProtonPlusProvidersSourcesReleaseSource*) _tmp1_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_GITLAB:
		{
			ProtonPlusProvidersSourcesGitLabReleaseSource* _tmp2_;
			_tmp2_ = proton_plus_providers_sources_git_lab_release_source_new ();
			result = (ProtonPlusProvidersSourcesReleaseSource*) _tmp2_;
			return result;
		}
		case PROTON_PLUS_MODELS_PROVIDERS_SOURCE_TYPE_FORGEJO:
		{
			ProtonPlusProvidersSourcesForgejoReleaseSource* _tmp3_;
			_tmp3_ = proton_plus_providers_sources_forgejo_release_source_new ();
			result = (ProtonPlusProvidersSourcesReleaseSource*) _tmp3_;
			return result;
		}
		default:
		{
			result = NULL;
			return result;
		}
	}
}

ProtonPlusProvidersSourcesReleaseSourceRegistry*
proton_plus_providers_sources_release_source_registry_construct (GType object_type)
{
	ProtonPlusProvidersSourcesReleaseSourceRegistry * self = NULL;
	self = (ProtonPlusProvidersSourcesReleaseSourceRegistry*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusProvidersSourcesReleaseSourceRegistry*
proton_plus_providers_sources_release_source_registry_new (void)
{
	return proton_plus_providers_sources_release_source_registry_construct (PROTON_PLUS_PROVIDERS_SOURCES_TYPE_RELEASE_SOURCE_REGISTRY);
}

static void
proton_plus_providers_sources_release_source_registry_class_init (ProtonPlusProvidersSourcesReleaseSourceRegistryClass * klass,
                                                                  gpointer klass_data)
{
	proton_plus_providers_sources_release_source_registry_parent_class = g_type_class_peek_parent (klass);
}

static void
proton_plus_providers_sources_release_source_registry_instance_init (ProtonPlusProvidersSourcesReleaseSourceRegistry * self,
                                                                     gpointer klass)
{
}

static GType
proton_plus_providers_sources_release_source_registry_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusProvidersSourcesReleaseSourceRegistryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_providers_sources_release_source_registry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusProvidersSourcesReleaseSourceRegistry), 0, (GInstanceInitFunc) proton_plus_providers_sources_release_source_registry_instance_init, NULL };
	GType proton_plus_providers_sources_release_source_registry_type_id;
	proton_plus_providers_sources_release_source_registry_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusProvidersSourcesReleaseSourceRegistry", &g_define_type_info, 0);
	return proton_plus_providers_sources_release_source_registry_type_id;
}

GType
proton_plus_providers_sources_release_source_registry_get_type (void)
{
	static volatile gsize proton_plus_providers_sources_release_source_registry_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_providers_sources_release_source_registry_type_id__once)) {
		GType proton_plus_providers_sources_release_source_registry_type_id;
		proton_plus_providers_sources_release_source_registry_type_id = proton_plus_providers_sources_release_source_registry_get_type_once ();
		g_once_init_leave (&proton_plus_providers_sources_release_source_registry_type_id__once, proton_plus_providers_sources_release_source_registry_type_id);
	}
	return proton_plus_providers_sources_release_source_registry_type_id__once;
}

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

