/* cue-sheet-track-node.c generated by valac 0.36.6.6-c7bee, the Vala compiler
 * generated from cue-sheet-track-node.vala, do not modify */

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

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


#define GAMES_TYPE_CUE_SHEET_TRACK_NODE (games_cue_sheet_track_node_get_type ())
#define GAMES_CUE_SHEET_TRACK_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_CUE_SHEET_TRACK_NODE, GamesCueSheetTrackNode))
#define GAMES_CUE_SHEET_TRACK_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_CUE_SHEET_TRACK_NODE, GamesCueSheetTrackNodeClass))
#define GAMES_IS_CUE_SHEET_TRACK_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_CUE_SHEET_TRACK_NODE))
#define GAMES_IS_CUE_SHEET_TRACK_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_CUE_SHEET_TRACK_NODE))
#define GAMES_CUE_SHEET_TRACK_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_CUE_SHEET_TRACK_NODE, GamesCueSheetTrackNodeClass))

typedef struct _GamesCueSheetTrackNode GamesCueSheetTrackNode;
typedef struct _GamesCueSheetTrackNodeClass GamesCueSheetTrackNodeClass;
typedef struct _GamesCueSheetTrackNodePrivate GamesCueSheetTrackNodePrivate;

#define GAMES_TYPE_CUE_SHEET_FILE_NODE (games_cue_sheet_file_node_get_type ())
#define GAMES_CUE_SHEET_FILE_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_CUE_SHEET_FILE_NODE, GamesCueSheetFileNode))
#define GAMES_CUE_SHEET_FILE_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_CUE_SHEET_FILE_NODE, GamesCueSheetFileNodeClass))
#define GAMES_IS_CUE_SHEET_FILE_NODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_CUE_SHEET_FILE_NODE))
#define GAMES_IS_CUE_SHEET_FILE_NODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_CUE_SHEET_FILE_NODE))
#define GAMES_CUE_SHEET_FILE_NODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_CUE_SHEET_FILE_NODE, GamesCueSheetFileNodeClass))

typedef struct _GamesCueSheetFileNode GamesCueSheetFileNode;
typedef struct _GamesCueSheetFileNodeClass GamesCueSheetFileNodeClass;

#define GAMES_TYPE_CUE_SHEET_TRACK_MODE (games_cue_sheet_track_mode_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _GamesCueSheetTrackNode {
	GObject parent_instance;
	GamesCueSheetTrackNodePrivate * priv;
};

struct _GamesCueSheetTrackNodeClass {
	GObjectClass parent_class;
};

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;

struct _GamesCueSheetTrackNodePrivate {
	GamesCueSheetFileNode* _file;
	gint _track_number;
	GamesCueSheetTrackMode _track_mode;
};


static gpointer games_cue_sheet_track_node_parent_class = NULL;

GType games_cue_sheet_track_node_get_type (void) G_GNUC_CONST;
GType games_cue_sheet_file_node_get_type (void) G_GNUC_CONST;
GType games_cue_sheet_track_mode_get_type (void) G_GNUC_CONST;
#define GAMES_CUE_SHEET_TRACK_NODE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GAMES_TYPE_CUE_SHEET_TRACK_NODE, GamesCueSheetTrackNodePrivate))
enum  {
	GAMES_CUE_SHEET_TRACK_NODE_0_PROPERTY,
	GAMES_CUE_SHEET_TRACK_NODE_FILE_PROPERTY,
	GAMES_CUE_SHEET_TRACK_NODE_TRACK_NUMBER_PROPERTY,
	GAMES_CUE_SHEET_TRACK_NODE_TRACK_MODE_PROPERTY
};
GamesCueSheetTrackNode* games_cue_sheet_track_node_new (GamesCueSheetFileNode* file, gint track_number, GamesCueSheetTrackMode track_mode);
GamesCueSheetTrackNode* games_cue_sheet_track_node_construct (GType object_type, GamesCueSheetFileNode* file, gint track_number, GamesCueSheetTrackMode track_mode);
GamesCueSheetFileNode* games_cue_sheet_track_node_get_file (GamesCueSheetTrackNode* self);
static void games_cue_sheet_track_node_set_file (GamesCueSheetTrackNode* self, GamesCueSheetFileNode* value);
gint games_cue_sheet_track_node_get_track_number (GamesCueSheetTrackNode* self);
static void games_cue_sheet_track_node_set_track_number (GamesCueSheetTrackNode* self, gint value);
GamesCueSheetTrackMode games_cue_sheet_track_node_get_track_mode (GamesCueSheetTrackNode* self);
static void games_cue_sheet_track_node_set_track_mode (GamesCueSheetTrackNode* self, GamesCueSheetTrackMode value);
static void games_cue_sheet_track_node_finalize (GObject * obj);
static void _vala_games_cue_sheet_track_node_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_games_cue_sheet_track_node_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


GamesCueSheetTrackNode* games_cue_sheet_track_node_construct (GType object_type, GamesCueSheetFileNode* file, gint track_number, GamesCueSheetTrackMode track_mode) {
	GamesCueSheetTrackNode * self = NULL;
	GamesCueSheetFileNode* _tmp0_;
	gint _tmp1_;
	GamesCueSheetTrackMode _tmp2_;
	g_return_val_if_fail (file != NULL, NULL);
	_tmp0_ = file;
	_tmp1_ = track_number;
	_tmp2_ = track_mode;
	self = (GamesCueSheetTrackNode*) g_object_new (object_type, "file", _tmp0_, "track-number", _tmp1_, "track-mode", _tmp2_, NULL);
	return self;
}


GamesCueSheetTrackNode* games_cue_sheet_track_node_new (GamesCueSheetFileNode* file, gint track_number, GamesCueSheetTrackMode track_mode) {
	return games_cue_sheet_track_node_construct (GAMES_TYPE_CUE_SHEET_TRACK_NODE, file, track_number, track_mode);
}


GamesCueSheetFileNode* games_cue_sheet_track_node_get_file (GamesCueSheetTrackNode* self) {
	GamesCueSheetFileNode* result;
	GamesCueSheetFileNode* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_file;
	result = _tmp0_;
	return result;
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static void games_cue_sheet_track_node_set_file (GamesCueSheetTrackNode* self, GamesCueSheetFileNode* value) {
	g_return_if_fail (self != NULL);
	if (games_cue_sheet_track_node_get_file (self) != value) {
		GamesCueSheetFileNode* _tmp0_;
		GamesCueSheetFileNode* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_g_object_unref0 (self->priv->_file);
		self->priv->_file = _tmp1_;
		g_object_notify ((GObject *) self, "file");
	}
}


gint games_cue_sheet_track_node_get_track_number (GamesCueSheetTrackNode* self) {
	gint result;
	gint _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_track_number;
	result = _tmp0_;
	return result;
}


static void games_cue_sheet_track_node_set_track_number (GamesCueSheetTrackNode* self, gint value) {
	g_return_if_fail (self != NULL);
	if (games_cue_sheet_track_node_get_track_number (self) != value) {
		gint _tmp0_;
		_tmp0_ = value;
		self->priv->_track_number = _tmp0_;
		g_object_notify ((GObject *) self, "track-number");
	}
}


GamesCueSheetTrackMode games_cue_sheet_track_node_get_track_mode (GamesCueSheetTrackNode* self) {
	GamesCueSheetTrackMode result;
	GamesCueSheetTrackMode _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_track_mode;
	result = _tmp0_;
	return result;
}


static void games_cue_sheet_track_node_set_track_mode (GamesCueSheetTrackNode* self, GamesCueSheetTrackMode value) {
	g_return_if_fail (self != NULL);
	if (games_cue_sheet_track_node_get_track_mode (self) != value) {
		GamesCueSheetTrackMode _tmp0_;
		_tmp0_ = value;
		self->priv->_track_mode = _tmp0_;
		g_object_notify ((GObject *) self, "track-mode");
	}
}


static void games_cue_sheet_track_node_class_init (GamesCueSheetTrackNodeClass * klass) {
	games_cue_sheet_track_node_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GamesCueSheetTrackNodePrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_games_cue_sheet_track_node_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_games_cue_sheet_track_node_set_property;
	G_OBJECT_CLASS (klass)->finalize = games_cue_sheet_track_node_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_CUE_SHEET_TRACK_NODE_FILE_PROPERTY, g_param_spec_object ("file", "file", "file", GAMES_TYPE_CUE_SHEET_FILE_NODE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_CUE_SHEET_TRACK_NODE_TRACK_NUMBER_PROPERTY, g_param_spec_int ("track-number", "track-number", "track-number", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_CUE_SHEET_TRACK_NODE_TRACK_MODE_PROPERTY, g_param_spec_enum ("track-mode", "track-mode", "track-mode", GAMES_TYPE_CUE_SHEET_TRACK_MODE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}


static void games_cue_sheet_track_node_instance_init (GamesCueSheetTrackNode * self) {
	self->priv = GAMES_CUE_SHEET_TRACK_NODE_GET_PRIVATE (self);
}


static void games_cue_sheet_track_node_finalize (GObject * obj) {
	GamesCueSheetTrackNode * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GAMES_TYPE_CUE_SHEET_TRACK_NODE, GamesCueSheetTrackNode);
	_g_object_unref0 (self->priv->_file);
	G_OBJECT_CLASS (games_cue_sheet_track_node_parent_class)->finalize (obj);
}


GType games_cue_sheet_track_node_get_type (void) {
	static volatile gsize games_cue_sheet_track_node_type_id__volatile = 0;
	if (g_once_init_enter (&games_cue_sheet_track_node_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GamesCueSheetTrackNodeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) games_cue_sheet_track_node_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GamesCueSheetTrackNode), 0, (GInstanceInitFunc) games_cue_sheet_track_node_instance_init, NULL };
		GType games_cue_sheet_track_node_type_id;
		games_cue_sheet_track_node_type_id = g_type_register_static (G_TYPE_OBJECT, "GamesCueSheetTrackNode", &g_define_type_info, 0);
		g_once_init_leave (&games_cue_sheet_track_node_type_id__volatile, games_cue_sheet_track_node_type_id);
	}
	return games_cue_sheet_track_node_type_id__volatile;
}


static void _vala_games_cue_sheet_track_node_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GamesCueSheetTrackNode * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GAMES_TYPE_CUE_SHEET_TRACK_NODE, GamesCueSheetTrackNode);
	switch (property_id) {
		case GAMES_CUE_SHEET_TRACK_NODE_FILE_PROPERTY:
		g_value_set_object (value, games_cue_sheet_track_node_get_file (self));
		break;
		case GAMES_CUE_SHEET_TRACK_NODE_TRACK_NUMBER_PROPERTY:
		g_value_set_int (value, games_cue_sheet_track_node_get_track_number (self));
		break;
		case GAMES_CUE_SHEET_TRACK_NODE_TRACK_MODE_PROPERTY:
		g_value_set_enum (value, games_cue_sheet_track_node_get_track_mode (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_games_cue_sheet_track_node_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GamesCueSheetTrackNode * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GAMES_TYPE_CUE_SHEET_TRACK_NODE, GamesCueSheetTrackNode);
	switch (property_id) {
		case GAMES_CUE_SHEET_TRACK_NODE_FILE_PROPERTY:
		games_cue_sheet_track_node_set_file (self, g_value_get_object (value));
		break;
		case GAMES_CUE_SHEET_TRACK_NODE_TRACK_NUMBER_PROPERTY:
		games_cue_sheet_track_node_set_track_number (self, g_value_get_int (value));
		break;
		case GAMES_CUE_SHEET_TRACK_NODE_TRACK_MODE_PROPERTY:
		games_cue_sheet_track_node_set_track_mode (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



