/* nintendo-64-pak.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from nintendo-64-pak.vala, do not modify */

/* This file is part of GNOME Games. License: GPL-3.0+.*/

#include "games-nintendo-64-plugin.h"
#include <stdlib.h>
#include <string.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

static GamesNintendo64Pak* _games_nintendo64_pak_dup (GamesNintendo64Pak* self);

gchar*
games_nintendo64_pak_get_value (GamesNintendo64Pak self)
{
	gchar* result;
	switch (self) {
		case GAMES_NINTENDO64_PAK_MEMORY:
		{
			gchar* _tmp0_;
			_tmp0_ = g_strdup ("memory");
			result = _tmp0_;
			return result;
		}
		case GAMES_NINTENDO64_PAK_RUMBLE:
		{
			gchar* _tmp1_;
			_tmp1_ = g_strdup ("rumble");
			result = _tmp1_;
			return result;
		}
		case GAMES_NINTENDO64_PAK_NONE:
		{
			gchar* _tmp2_;
			_tmp2_ = g_strdup ("none");
			result = _tmp2_;
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}

static GamesNintendo64Pak*
_games_nintendo64_pak_dup (GamesNintendo64Pak* self)
{
	GamesNintendo64Pak* dup;
	dup = g_new0 (GamesNintendo64Pak, 1);
	memcpy (dup, self, sizeof (GamesNintendo64Pak));
	return dup;
}

static gpointer
__games_nintendo64_pak_dup0 (gpointer self)
{
	return self ? _games_nintendo64_pak_dup (self) : NULL;
}

GamesNintendo64Pak*
games_nintendo64_pak_from_value (const gchar* value)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	GamesNintendo64Pak* result;
	g_return_val_if_fail (value != NULL, NULL);
	_tmp0_ = value;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("memory")))) {
		switch (0) {
			default:
			{
				GamesNintendo64Pak _tmp3_;
				GamesNintendo64Pak* _tmp4_;
				_tmp3_ = GAMES_NINTENDO64_PAK_MEMORY;
				_tmp4_ = __games_nintendo64_pak_dup0 (&_tmp3_);
				result = _tmp4_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("rumble")))) {
		switch (0) {
			default:
			{
				GamesNintendo64Pak _tmp5_;
				GamesNintendo64Pak* _tmp6_;
				_tmp5_ = GAMES_NINTENDO64_PAK_RUMBLE;
				_tmp6_ = __games_nintendo64_pak_dup0 (&_tmp5_);
				result = _tmp6_;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("none")))) {
		switch (0) {
			default:
			{
				GamesNintendo64Pak _tmp7_;
				GamesNintendo64Pak* _tmp8_;
				_tmp7_ = GAMES_NINTENDO64_PAK_NONE;
				_tmp8_ = __games_nintendo64_pak_dup0 (&_tmp7_);
				result = _tmp8_;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				g_warning ("nintendo-64-pak.vala:36: Unknown screen layout: %s\n", value);
				result = NULL;
				return result;
			}
		}
	}
}

static GType
games_nintendo64_pak_get_type_once (void)
{
	static const GEnumValue values[] = {{GAMES_NINTENDO64_PAK_MEMORY, "GAMES_NINTENDO64_PAK_MEMORY", "memory"}, {GAMES_NINTENDO64_PAK_RUMBLE, "GAMES_NINTENDO64_PAK_RUMBLE", "rumble"}, {GAMES_NINTENDO64_PAK_NONE, "GAMES_NINTENDO64_PAK_NONE", "none"}, {0, NULL, NULL}};
	GType games_nintendo64_pak_type_id;
	games_nintendo64_pak_type_id = g_enum_register_static ("GamesNintendo64Pak", values);
	return games_nintendo64_pak_type_id;
}

GType
games_nintendo64_pak_get_type (void)
{
	static volatile gsize games_nintendo64_pak_type_id__once = 0;
	if (g_once_init_enter (&games_nintendo64_pak_type_id__once)) {
		GType games_nintendo64_pak_type_id;
		games_nintendo64_pak_type_id = games_nintendo64_pak_get_type_once ();
		g_once_init_leave (&games_nintendo64_pak_type_id__once, games_nintendo64_pak_type_id);
	}
	return games_nintendo64_pak_type_id__once;
}

