/* cue-sheet-track-mode.c generated by valac 0.36.12.13-3ae08, the Vala compiler
 * generated from cue-sheet-track-mode.vala, do not modify */

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

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


#define GAMES_TYPE_CUE_SHEET_TRACK_MODE (games_cue_sheet_track_mode_get_type ())

typedef enum  {
	GAMES_CUE_SHEET_TRACK_MODE_INVALID,
	GAMES_CUE_SHEET_TRACK_MODE_AUDIO,
	GAMES_CUE_SHEET_TRACK_MODE_CDG,
	GAMES_CUE_SHEET_TRACK_MODE_MODE1_2048,
	GAMES_CUE_SHEET_TRACK_MODE_MODE1_2352,
	GAMES_CUE_SHEET_TRACK_MODE_MODE2_2336,
	GAMES_CUE_SHEET_TRACK_MODE_MODE2_2352,
	GAMES_CUE_SHEET_TRACK_MODE_CDI_2336,
	GAMES_CUE_SHEET_TRACK_MODE_CDI_2352
} GamesCueSheetTrackMode;



GType games_cue_sheet_track_mode_get_type (void) G_GNUC_CONST;
GamesCueSheetTrackMode games_cue_sheet_track_mode_parse_string (const gchar* value);
gboolean games_cue_sheet_track_mode_is_mode1 (GamesCueSheetTrackMode self);


GamesCueSheetTrackMode games_cue_sheet_track_mode_parse_string (const gchar* value) {
	GamesCueSheetTrackMode result = 0;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	static GQuark _tmp2_label1 = 0;
	static GQuark _tmp2_label2 = 0;
	static GQuark _tmp2_label3 = 0;
	static GQuark _tmp2_label4 = 0;
	static GQuark _tmp2_label5 = 0;
	static GQuark _tmp2_label6 = 0;
	static GQuark _tmp2_label7 = 0;
	g_return_val_if_fail (value != NULL, 0);
	_tmp0_ = value;
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("AUDIO")))) {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_TRACK_MODE_AUDIO;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("CDG")))) {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_TRACK_MODE_CDG;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("MODE1/2048")))) {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_TRACK_MODE_MODE1_2048;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("MODE1/2352")))) {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_TRACK_MODE_MODE1_2352;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("MODE2/2336")))) {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_TRACK_MODE_MODE2_2336;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label5) ? _tmp2_label5 : (_tmp2_label5 = g_quark_from_static_string ("MODE2/2352")))) {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_TRACK_MODE_MODE2_2352;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label6) ? _tmp2_label6 : (_tmp2_label6 = g_quark_from_static_string ("CDI/2336")))) {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_TRACK_MODE_CDI_2336;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label7) ? _tmp2_label7 : (_tmp2_label7 = g_quark_from_static_string ("CDI/2352")))) {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_TRACK_MODE_CDI_2352;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = GAMES_CUE_SHEET_TRACK_MODE_INVALID;
				return result;
			}
		}
	}
}


gboolean games_cue_sheet_track_mode_is_mode1 (GamesCueSheetTrackMode self) {
	gboolean result = FALSE;
	switch (self) {
		case GAMES_CUE_SHEET_TRACK_MODE_MODE1_2048:
		case GAMES_CUE_SHEET_TRACK_MODE_MODE1_2352:
		{
			result = TRUE;
			return result;
		}
		default:
		{
			result = FALSE;
			return result;
		}
	}
}


GType games_cue_sheet_track_mode_get_type (void) {
	static volatile gsize games_cue_sheet_track_mode_type_id__volatile = 0;
	if (g_once_init_enter (&games_cue_sheet_track_mode_type_id__volatile)) {
		static const GEnumValue values[] = {{GAMES_CUE_SHEET_TRACK_MODE_INVALID, "GAMES_CUE_SHEET_TRACK_MODE_INVALID", "invalid"}, {GAMES_CUE_SHEET_TRACK_MODE_AUDIO, "GAMES_CUE_SHEET_TRACK_MODE_AUDIO", "audio"}, {GAMES_CUE_SHEET_TRACK_MODE_CDG, "GAMES_CUE_SHEET_TRACK_MODE_CDG", "cdg"}, {GAMES_CUE_SHEET_TRACK_MODE_MODE1_2048, "GAMES_CUE_SHEET_TRACK_MODE_MODE1_2048", "mode1-2048"}, {GAMES_CUE_SHEET_TRACK_MODE_MODE1_2352, "GAMES_CUE_SHEET_TRACK_MODE_MODE1_2352", "mode1-2352"}, {GAMES_CUE_SHEET_TRACK_MODE_MODE2_2336, "GAMES_CUE_SHEET_TRACK_MODE_MODE2_2336", "mode2-2336"}, {GAMES_CUE_SHEET_TRACK_MODE_MODE2_2352, "GAMES_CUE_SHEET_TRACK_MODE_MODE2_2352", "mode2-2352"}, {GAMES_CUE_SHEET_TRACK_MODE_CDI_2336, "GAMES_CUE_SHEET_TRACK_MODE_CDI_2336", "cdi-2336"}, {GAMES_CUE_SHEET_TRACK_MODE_CDI_2352, "GAMES_CUE_SHEET_TRACK_MODE_CDI_2352", "cdi-2352"}, {0, NULL, NULL}};
		GType games_cue_sheet_track_mode_type_id;
		games_cue_sheet_track_mode_type_id = g_enum_register_static ("GamesCueSheetTrackMode", values);
		g_once_init_leave (&games_cue_sheet_track_mode_type_id__volatile, games_cue_sheet_track_mode_type_id);
	}
	return games_cue_sheet_track_mode_type_id__volatile;
}



