/* cue-sheet-file-format.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from cue-sheet-file-format.vala, do not modify */

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

#include "gnome-games.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 inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

GamesCueSheetFileFormat
games_cue_sheet_file_format_parse_string (const gchar* value)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	static GQuark _tmp1_label2 = 0;
	static GQuark _tmp1_label3 = 0;
	static GQuark _tmp1_label4 = 0;
	static GQuark _tmp1_label5 = 0;
	static GQuark _tmp1_label6 = 0;
	GamesCueSheetFileFormat result;
	_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 ("AIFF")))) {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_FILE_FORMAT_AIFF;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("BINARY")))) {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_FILE_FORMAT_BINARY;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label2) ? _tmp1_label2 : (_tmp1_label2 = g_quark_from_static_string ("MOTOROLA")))) {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_FILE_FORMAT_MOTOROLA;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label3) ? _tmp1_label3 : (_tmp1_label3 = g_quark_from_static_string ("MP3")))) {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_FILE_FORMAT_MP3;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label4) ? _tmp1_label4 : (_tmp1_label4 = g_quark_from_static_string ("VORBIS")))) {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_FILE_FORMAT_VORBIS;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label5) ? _tmp1_label5 : (_tmp1_label5 = g_quark_from_static_string ("WAVE")))) {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_FILE_FORMAT_WAVE;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label6) ? _tmp1_label6 : (_tmp1_label6 = g_quark_from_static_string (NULL)))) {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_FILE_FORMAT_UNKNOWN;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_FILE_FORMAT_INVALID;
				return result;
			}
		}
	}
}

static GType
games_cue_sheet_file_format_get_type_once (void)
{
	static const GEnumValue values[] = {{GAMES_CUE_SHEET_FILE_FORMAT_INVALID, "GAMES_CUE_SHEET_FILE_FORMAT_INVALID", "invalid"}, {GAMES_CUE_SHEET_FILE_FORMAT_AIFF, "GAMES_CUE_SHEET_FILE_FORMAT_AIFF", "aiff"}, {GAMES_CUE_SHEET_FILE_FORMAT_BINARY, "GAMES_CUE_SHEET_FILE_FORMAT_BINARY", "binary"}, {GAMES_CUE_SHEET_FILE_FORMAT_MOTOROLA, "GAMES_CUE_SHEET_FILE_FORMAT_MOTOROLA", "motorola"}, {GAMES_CUE_SHEET_FILE_FORMAT_MP3, "GAMES_CUE_SHEET_FILE_FORMAT_MP3", "mp3"}, {GAMES_CUE_SHEET_FILE_FORMAT_VORBIS, "GAMES_CUE_SHEET_FILE_FORMAT_VORBIS", "vorbis"}, {GAMES_CUE_SHEET_FILE_FORMAT_WAVE, "GAMES_CUE_SHEET_FILE_FORMAT_WAVE", "wave"}, {GAMES_CUE_SHEET_FILE_FORMAT_UNKNOWN, "GAMES_CUE_SHEET_FILE_FORMAT_UNKNOWN", "unknown"}, {0, NULL, NULL}};
	GType games_cue_sheet_file_format_type_id;
	games_cue_sheet_file_format_type_id = g_enum_register_static ("GamesCueSheetFileFormat", values);
	return games_cue_sheet_file_format_type_id;
}

GType
games_cue_sheet_file_format_get_type (void)
{
	static volatile gsize games_cue_sheet_file_format_type_id__once = 0;
	if (g_once_init_enter (&games_cue_sheet_file_format_type_id__once)) {
		GType games_cue_sheet_file_format_type_id;
		games_cue_sheet_file_format_type_id = games_cue_sheet_file_format_get_type_once ();
		g_once_init_leave (&games_cue_sheet_file_format_type_id__once, games_cue_sheet_file_format_type_id);
	}
	return games_cue_sheet_file_format_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;
}

