/* rygel-tracker-music.c generated by valac 0.48.5, the Vala compiler
 * generated from rygel-tracker-music.vala, do not modify */

/*
 * Copyright (C) 2009 Nokia Corporation.
 *
 * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
 *                               <zeeshan.ali@nokia.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-server.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gee.h>

#define RYGEL_TRACKER_TYPE_CATEGORY_CONTAINER (rygel_tracker_category_container_get_type ())
#define RYGEL_TRACKER_CATEGORY_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TRACKER_TYPE_CATEGORY_CONTAINER, RygelTrackerCategoryContainer))
#define RYGEL_TRACKER_CATEGORY_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TRACKER_TYPE_CATEGORY_CONTAINER, RygelTrackerCategoryContainerClass))
#define RYGEL_TRACKER_IS_CATEGORY_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TRACKER_TYPE_CATEGORY_CONTAINER))
#define RYGEL_TRACKER_IS_CATEGORY_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TRACKER_TYPE_CATEGORY_CONTAINER))
#define RYGEL_TRACKER_CATEGORY_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TRACKER_TYPE_CATEGORY_CONTAINER, RygelTrackerCategoryContainerClass))

typedef struct _RygelTrackerCategoryContainer RygelTrackerCategoryContainer;
typedef struct _RygelTrackerCategoryContainerClass RygelTrackerCategoryContainerClass;
typedef struct _RygelTrackerCategoryContainerPrivate RygelTrackerCategoryContainerPrivate;

#define RYGEL_TRACKER_TYPE_ITEM_FACTORY (rygel_tracker_item_factory_get_type ())
#define RYGEL_TRACKER_ITEM_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TRACKER_TYPE_ITEM_FACTORY, RygelTrackerItemFactory))
#define RYGEL_TRACKER_ITEM_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TRACKER_TYPE_ITEM_FACTORY, RygelTrackerItemFactoryClass))
#define RYGEL_TRACKER_IS_ITEM_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TRACKER_TYPE_ITEM_FACTORY))
#define RYGEL_TRACKER_IS_ITEM_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TRACKER_TYPE_ITEM_FACTORY))
#define RYGEL_TRACKER_ITEM_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TRACKER_TYPE_ITEM_FACTORY, RygelTrackerItemFactoryClass))

typedef struct _RygelTrackerItemFactory RygelTrackerItemFactory;
typedef struct _RygelTrackerItemFactoryClass RygelTrackerItemFactoryClass;

#define RYGEL_TRACKER_TYPE_MUSIC (rygel_tracker_music_get_type ())
#define RYGEL_TRACKER_MUSIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TRACKER_TYPE_MUSIC, RygelTrackerMusic))
#define RYGEL_TRACKER_MUSIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TRACKER_TYPE_MUSIC, RygelTrackerMusicClass))
#define RYGEL_TRACKER_IS_MUSIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TRACKER_TYPE_MUSIC))
#define RYGEL_TRACKER_IS_MUSIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TRACKER_TYPE_MUSIC))
#define RYGEL_TRACKER_MUSIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TRACKER_TYPE_MUSIC, RygelTrackerMusicClass))

typedef struct _RygelTrackerMusic RygelTrackerMusic;
typedef struct _RygelTrackerMusicClass RygelTrackerMusicClass;
typedef struct _RygelTrackerMusicPrivate RygelTrackerMusicPrivate;
enum  {
	RYGEL_TRACKER_MUSIC_0_PROPERTY,
	RYGEL_TRACKER_MUSIC_NUM_PROPERTIES
};
static GParamSpec* rygel_tracker_music_properties[RYGEL_TRACKER_MUSIC_NUM_PROPERTIES];

#define RYGEL_TRACKER_TYPE_MUSIC_ITEM_FACTORY (rygel_tracker_music_item_factory_get_type ())
#define RYGEL_TRACKER_MUSIC_ITEM_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TRACKER_TYPE_MUSIC_ITEM_FACTORY, RygelTrackerMusicItemFactory))
#define RYGEL_TRACKER_MUSIC_ITEM_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TRACKER_TYPE_MUSIC_ITEM_FACTORY, RygelTrackerMusicItemFactoryClass))
#define RYGEL_TRACKER_IS_MUSIC_ITEM_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TRACKER_TYPE_MUSIC_ITEM_FACTORY))
#define RYGEL_TRACKER_IS_MUSIC_ITEM_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TRACKER_TYPE_MUSIC_ITEM_FACTORY))
#define RYGEL_TRACKER_MUSIC_ITEM_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TRACKER_TYPE_MUSIC_ITEM_FACTORY, RygelTrackerMusicItemFactoryClass))

typedef struct _RygelTrackerMusicItemFactory RygelTrackerMusicItemFactory;
typedef struct _RygelTrackerMusicItemFactoryClass RygelTrackerMusicItemFactoryClass;
#define _rygel_tracker_item_factory_unref0(var) ((var == NULL) ? NULL : (var = (rygel_tracker_item_factory_unref (var), NULL)))

#define RYGEL_TRACKER_TYPE_METADATA_CONTAINER (rygel_tracker_metadata_container_get_type ())
#define RYGEL_TRACKER_METADATA_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TRACKER_TYPE_METADATA_CONTAINER, RygelTrackerMetadataContainer))
#define RYGEL_TRACKER_METADATA_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TRACKER_TYPE_METADATA_CONTAINER, RygelTrackerMetadataContainerClass))
#define RYGEL_TRACKER_IS_METADATA_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TRACKER_TYPE_METADATA_CONTAINER))
#define RYGEL_TRACKER_IS_METADATA_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TRACKER_TYPE_METADATA_CONTAINER))
#define RYGEL_TRACKER_METADATA_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TRACKER_TYPE_METADATA_CONTAINER, RygelTrackerMetadataContainerClass))

typedef struct _RygelTrackerMetadataContainer RygelTrackerMetadataContainer;
typedef struct _RygelTrackerMetadataContainerClass RygelTrackerMetadataContainerClass;

#define RYGEL_TRACKER_TYPE_METADATA_VALUES (rygel_tracker_metadata_values_get_type ())
#define RYGEL_TRACKER_METADATA_VALUES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TRACKER_TYPE_METADATA_VALUES, RygelTrackerMetadataValues))
#define RYGEL_TRACKER_METADATA_VALUES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TRACKER_TYPE_METADATA_VALUES, RygelTrackerMetadataValuesClass))
#define RYGEL_TRACKER_IS_METADATA_VALUES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TRACKER_TYPE_METADATA_VALUES))
#define RYGEL_TRACKER_IS_METADATA_VALUES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TRACKER_TYPE_METADATA_VALUES))
#define RYGEL_TRACKER_METADATA_VALUES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TRACKER_TYPE_METADATA_VALUES, RygelTrackerMetadataValuesClass))

typedef struct _RygelTrackerMetadataValues RygelTrackerMetadataValues;
typedef struct _RygelTrackerMetadataValuesClass RygelTrackerMetadataValuesClass;

#define RYGEL_TRACKER_TYPE_ARTISTS (rygel_tracker_artists_get_type ())
#define RYGEL_TRACKER_ARTISTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TRACKER_TYPE_ARTISTS, RygelTrackerArtists))
#define RYGEL_TRACKER_ARTISTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TRACKER_TYPE_ARTISTS, RygelTrackerArtistsClass))
#define RYGEL_TRACKER_IS_ARTISTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TRACKER_TYPE_ARTISTS))
#define RYGEL_TRACKER_IS_ARTISTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TRACKER_TYPE_ARTISTS))
#define RYGEL_TRACKER_ARTISTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TRACKER_TYPE_ARTISTS, RygelTrackerArtistsClass))

typedef struct _RygelTrackerArtists RygelTrackerArtists;
typedef struct _RygelTrackerArtistsClass RygelTrackerArtistsClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define RYGEL_TRACKER_TYPE_ALBUMS (rygel_tracker_albums_get_type ())
#define RYGEL_TRACKER_ALBUMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TRACKER_TYPE_ALBUMS, RygelTrackerAlbums))
#define RYGEL_TRACKER_ALBUMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TRACKER_TYPE_ALBUMS, RygelTrackerAlbumsClass))
#define RYGEL_TRACKER_IS_ALBUMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TRACKER_TYPE_ALBUMS))
#define RYGEL_TRACKER_IS_ALBUMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TRACKER_TYPE_ALBUMS))
#define RYGEL_TRACKER_ALBUMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TRACKER_TYPE_ALBUMS, RygelTrackerAlbumsClass))

typedef struct _RygelTrackerAlbums RygelTrackerAlbums;
typedef struct _RygelTrackerAlbumsClass RygelTrackerAlbumsClass;

#define RYGEL_TRACKER_TYPE_GENRE (rygel_tracker_genre_get_type ())
#define RYGEL_TRACKER_GENRE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TRACKER_TYPE_GENRE, RygelTrackerGenre))
#define RYGEL_TRACKER_GENRE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TRACKER_TYPE_GENRE, RygelTrackerGenreClass))
#define RYGEL_TRACKER_IS_GENRE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TRACKER_TYPE_GENRE))
#define RYGEL_TRACKER_IS_GENRE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TRACKER_TYPE_GENRE))
#define RYGEL_TRACKER_GENRE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TRACKER_TYPE_GENRE, RygelTrackerGenreClass))

typedef struct _RygelTrackerGenre RygelTrackerGenre;
typedef struct _RygelTrackerGenreClass RygelTrackerGenreClass;

struct _RygelTrackerCategoryContainer {
	RygelSimpleContainer parent_instance;
	RygelTrackerCategoryContainerPrivate * priv;
	RygelTrackerItemFactory* item_factory;
};

struct _RygelTrackerCategoryContainerClass {
	RygelSimpleContainerClass parent_class;
};

struct _RygelTrackerMusic {
	RygelTrackerCategoryContainer parent_instance;
	RygelTrackerMusicPrivate * priv;
};

struct _RygelTrackerMusicClass {
	RygelTrackerCategoryContainerClass parent_class;
};

static gpointer rygel_tracker_music_parent_class = NULL;

GType rygel_tracker_category_container_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RygelTrackerCategoryContainer, g_object_unref)
gpointer rygel_tracker_item_factory_ref (gpointer instance);
void rygel_tracker_item_factory_unref (gpointer instance);
GParamSpec* rygel_tracker_param_spec_item_factory (const gchar* name,
                                                   const gchar* nick,
                                                   const gchar* blurb,
                                                   GType object_type,
                                                   GParamFlags flags);
void rygel_tracker_value_set_item_factory (GValue* value,
                                           gpointer v_object);
void rygel_tracker_value_take_item_factory (GValue* value,
                                            gpointer v_object);
gpointer rygel_tracker_value_get_item_factory (const GValue* value);
GType rygel_tracker_item_factory_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RygelTrackerItemFactory, rygel_tracker_item_factory_unref)
GType rygel_tracker_music_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RygelTrackerMusic, g_object_unref)
RygelTrackerMusic* rygel_tracker_music_new (const gchar* id,
                                            RygelMediaContainer* parent,
                                            const gchar* title);
RygelTrackerMusic* rygel_tracker_music_construct (GType object_type,
                                                  const gchar* id,
                                                  RygelMediaContainer* parent,
                                                  const gchar* title);
RygelTrackerMusicItemFactory* rygel_tracker_music_item_factory_new (void);
RygelTrackerMusicItemFactory* rygel_tracker_music_item_factory_construct (GType object_type);
GType rygel_tracker_music_item_factory_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RygelTrackerMusicItemFactory, rygel_tracker_item_factory_unref)
RygelTrackerCategoryContainer* rygel_tracker_category_container_construct (GType object_type,
                                                                           const gchar* id,
                                                                           RygelMediaContainer* parent,
                                                                           const gchar* title,
                                                                           RygelTrackerItemFactory* item_factory);
RygelTrackerArtists* rygel_tracker_artists_new (RygelTrackerMusic* parent);
RygelTrackerArtists* rygel_tracker_artists_construct (GType object_type,
                                                      RygelTrackerMusic* parent);
GType rygel_tracker_metadata_container_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RygelTrackerMetadataContainer, g_object_unref)
GType rygel_tracker_metadata_values_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RygelTrackerMetadataValues, g_object_unref)
GType rygel_tracker_artists_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RygelTrackerArtists, g_object_unref)
RygelTrackerAlbums* rygel_tracker_albums_new (RygelTrackerMusic* parent);
RygelTrackerAlbums* rygel_tracker_albums_construct (GType object_type,
                                                    RygelTrackerMusic* parent);
GType rygel_tracker_albums_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RygelTrackerAlbums, g_object_unref)
RygelTrackerGenre* rygel_tracker_genre_new (RygelTrackerMusic* parent);
RygelTrackerGenre* rygel_tracker_genre_construct (GType object_type,
                                                  RygelTrackerMusic* parent);
GType rygel_tracker_genre_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (RygelTrackerGenre, g_object_unref)
void rygel_tracker_category_container_add_create_class (RygelTrackerCategoryContainer* self,
                                                        const gchar* create_class);
static GType rygel_tracker_music_get_type_once (void);

RygelTrackerMusic*
rygel_tracker_music_construct (GType object_type,
                               const gchar* id,
                               RygelMediaContainer* parent,
                               const gchar* title)
{
	RygelTrackerMusic * self = NULL;
	RygelTrackerMusicItemFactory* _tmp0_;
	RygelTrackerMusicItemFactory* _tmp1_;
	RygelTrackerArtists* _tmp2_;
	RygelTrackerArtists* _tmp3_;
	RygelTrackerAlbums* _tmp4_;
	RygelTrackerAlbums* _tmp5_;
	RygelTrackerGenre* _tmp6_;
	RygelTrackerGenre* _tmp7_;
	GeeArrayList* _tmp8_;
	GeeArrayList* _tmp9_;
	GeeArrayList* _tmp10_;
	GeeArrayList* _tmp11_;
	g_return_val_if_fail (id != NULL, NULL);
	g_return_val_if_fail (parent != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	_tmp0_ = rygel_tracker_music_item_factory_new ();
	_tmp1_ = _tmp0_;
	self = (RygelTrackerMusic*) rygel_tracker_category_container_construct (object_type, id, parent, title, (RygelTrackerItemFactory*) _tmp1_);
	_rygel_tracker_item_factory_unref0 (_tmp1_);
	_tmp2_ = rygel_tracker_artists_new (self);
	_tmp3_ = _tmp2_;
	rygel_simple_container_add_child_container ((RygelSimpleContainer*) self, (RygelMediaContainer*) _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = rygel_tracker_albums_new (self);
	_tmp5_ = _tmp4_;
	rygel_simple_container_add_child_container ((RygelSimpleContainer*) self, (RygelMediaContainer*) _tmp5_);
	_g_object_unref0 (_tmp5_);
	_tmp6_ = rygel_tracker_genre_new (self);
	_tmp7_ = _tmp6_;
	rygel_simple_container_add_child_container ((RygelSimpleContainer*) self, (RygelMediaContainer*) _tmp7_);
	_g_object_unref0 (_tmp7_);
	_tmp8_ = rygel_searchable_container_get_search_classes ((RygelSearchableContainer*) self);
	_tmp9_ = _tmp8_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, RYGEL_AUDIO_ITEM_UPNP_CLASS);
	_tmp10_ = rygel_searchable_container_get_search_classes ((RygelSearchableContainer*) self);
	_tmp11_ = _tmp10_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp11_, RYGEL_MUSIC_ITEM_UPNP_CLASS);
	rygel_tracker_category_container_add_create_class ((RygelTrackerCategoryContainer*) self, RYGEL_AUDIO_ITEM_UPNP_CLASS);
	return self;
}

RygelTrackerMusic*
rygel_tracker_music_new (const gchar* id,
                         RygelMediaContainer* parent,
                         const gchar* title)
{
	return rygel_tracker_music_construct (RYGEL_TRACKER_TYPE_MUSIC, id, parent, title);
}

static void
rygel_tracker_music_class_init (RygelTrackerMusicClass * klass,
                                gpointer klass_data)
{
	rygel_tracker_music_parent_class = g_type_class_peek_parent (klass);
}

static void
rygel_tracker_music_instance_init (RygelTrackerMusic * self,
                                   gpointer klass)
{
}

/**
 * Container listing Music content hierarchy.
 */
static GType
rygel_tracker_music_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (RygelTrackerMusicClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_tracker_music_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelTrackerMusic), 0, (GInstanceInitFunc) rygel_tracker_music_instance_init, NULL };
	GType rygel_tracker_music_type_id;
	rygel_tracker_music_type_id = g_type_register_static (RYGEL_TRACKER_TYPE_CATEGORY_CONTAINER, "RygelTrackerMusic", &g_define_type_info, 0);
	return rygel_tracker_music_type_id;
}

GType
rygel_tracker_music_get_type (void)
{
	static volatile gsize rygel_tracker_music_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_tracker_music_type_id__volatile)) {
		GType rygel_tracker_music_type_id;
		rygel_tracker_music_type_id = rygel_tracker_music_get_type_once ();
		g_once_init_leave (&rygel_tracker_music_type_id__volatile, rygel_tracker_music_type_id);
	}
	return rygel_tracker_music_type_id__volatile;
}

