/* rygel-lms-music-root.c generated by valac 0.56.1, the Vala compiler
 * generated from rygel-lms-music-root.vala, do not modify */

/*
 * Copyright (C) 2013 Intel Corporation.
 *
 * Author: Jussi Kukkonen <jussi.kukkonen@intel.com>
 *
 * This file is part of Rygel.
 *
 * Rygel is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * Rygel is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include "rygel-lms.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "rygel-server.h"
#include <glib/gi18n-lib.h>

enum  {
	RYGEL_LMS_MUSIC_ROOT_0_PROPERTY,
	RYGEL_LMS_MUSIC_ROOT_NUM_PROPERTIES
};
static GParamSpec* rygel_lms_music_root_properties[RYGEL_LMS_MUSIC_ROOT_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

static gpointer rygel_lms_music_root_parent_class = NULL;

static GType rygel_lms_music_root_get_type_once (void);

RygelLMSMusicRoot*
rygel_lms_music_root_construct (GType object_type,
                                const gchar* id,
                                RygelMediaContainer* parent,
                                const gchar* title,
                                RygelLMSDatabase* lms_db)
{
	RygelLMSMusicRoot * self = NULL;
	RygelLMSAllMusic* _tmp0_;
	RygelLMSAllMusic* _tmp1_;
	RygelLMSArtists* _tmp2_;
	RygelLMSArtists* _tmp3_;
	RygelLMSAlbums* _tmp4_;
	RygelLMSAlbums* _tmp5_;
	g_return_val_if_fail (id != NULL, NULL);
	g_return_val_if_fail (parent != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (lms_db != NULL, NULL);
	self = (RygelLMSMusicRoot*) rygel_simple_container_construct (object_type, id, parent, title);
	_tmp0_ = rygel_lms_all_music_new ((RygelMediaContainer*) self, lms_db);
	_tmp1_ = _tmp0_;
	rygel_simple_container_add_child_container ((RygelSimpleContainer*) self, (RygelMediaContainer*) _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = rygel_lms_artists_new ("artists", (RygelMediaContainer*) self, _ ("Artists"), lms_db);
	_tmp3_ = _tmp2_;
	rygel_simple_container_add_child_container ((RygelSimpleContainer*) self, (RygelMediaContainer*) _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = rygel_lms_albums_new ((RygelMediaContainer*) self, lms_db);
	_tmp5_ = _tmp4_;
	rygel_simple_container_add_child_container ((RygelSimpleContainer*) self, (RygelMediaContainer*) _tmp5_);
	_g_object_unref0 (_tmp5_);
	return self;
}

RygelLMSMusicRoot*
rygel_lms_music_root_new (const gchar* id,
                          RygelMediaContainer* parent,
                          const gchar* title,
                          RygelLMSDatabase* lms_db)
{
	return rygel_lms_music_root_construct (RYGEL_LMS_TYPE_MUSIC_ROOT, id, parent, title, lms_db);
}

static void
rygel_lms_music_root_class_init (RygelLMSMusicRootClass * klass,
                                 gpointer klass_data)
{
	rygel_lms_music_root_parent_class = g_type_class_peek_parent (klass);
}

static void
rygel_lms_music_root_instance_init (RygelLMSMusicRoot * self,
                                    gpointer klass)
{
}

static GType
rygel_lms_music_root_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (RygelLMSMusicRootClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_lms_music_root_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelLMSMusicRoot), 0, (GInstanceInitFunc) rygel_lms_music_root_instance_init, NULL };
	GType rygel_lms_music_root_type_id;
	rygel_lms_music_root_type_id = g_type_register_static (RYGEL_TYPE_SIMPLE_CONTAINER, "RygelLMSMusicRoot", &g_define_type_info, 0);
	return rygel_lms_music_root_type_id;
}

GType
rygel_lms_music_root_get_type (void)
{
	static volatile gsize rygel_lms_music_root_type_id__once = 0;
	if (g_once_init_enter (&rygel_lms_music_root_type_id__once)) {
		GType rygel_lms_music_root_type_id;
		rygel_lms_music_root_type_id = rygel_lms_music_root_get_type_once ();
		g_once_init_leave (&rygel_lms_music_root_type_id__once, rygel_lms_music_root_type_id);
	}
	return rygel_lms_music_root_type_id__once;
}

