/* localsearch-music.c generated by valac 0.56.19, the Vala compiler
 * generated from localsearch-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-localsearch.h"
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "rygel-server.h"
#include <gee.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

enum  {
	RYGEL_LOCAL_SEARCH_MUSIC_0_PROPERTY,
	RYGEL_LOCAL_SEARCH_MUSIC_NUM_PROPERTIES
};
static GParamSpec* rygel_local_search_music_properties[RYGEL_LOCAL_SEARCH_MUSIC_NUM_PROPERTIES];
#define _rygel_local_search_item_factory_unref0(var) ((var == NULL) ? NULL : (var = (rygel_local_search_item_factory_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

static gpointer rygel_local_search_music_parent_class = NULL;

static GType rygel_local_search_music_get_type_once (void);

RygelLocalSearchMusic*
rygel_local_search_music_construct (GType object_type,
                                    const gchar* id,
                                    RygelMediaContainer* parent,
                                    const gchar* title)
{
	RygelLocalSearchMusic * self = NULL;
	RygelLocalSearchMusicItemFactory* _tmp0_;
	RygelLocalSearchMusicItemFactory* _tmp1_;
	RygelLocalSearchArtists* _tmp2_;
	RygelLocalSearchArtists* _tmp3_;
	RygelLocalSearchAlbums* _tmp4_;
	RygelLocalSearchAlbums* _tmp5_;
	RygelLocalSearchGenre* _tmp6_;
	RygelLocalSearchGenre* _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_local_search_music_item_factory_new ();
	_tmp1_ = _tmp0_;
	self = (RygelLocalSearchMusic*) rygel_local_search_category_container_construct (object_type, id, parent, title, (RygelLocalSearchItemFactory*) _tmp1_);
	_rygel_local_search_item_factory_unref0 (_tmp1_);
	_tmp2_ = rygel_local_search_artists_new (self);
	_tmp3_ = _tmp2_;
	rygel_simple_container_add_child_container ((RygelSimpleContainer*) self, (RygelMediaContainer*) _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = rygel_local_search_albums_new (self);
	_tmp5_ = _tmp4_;
	rygel_simple_container_add_child_container ((RygelSimpleContainer*) self, (RygelMediaContainer*) _tmp5_);
	_g_object_unref0 (_tmp5_);
	_tmp6_ = rygel_local_search_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_local_search_category_container_add_create_class ((RygelLocalSearchCategoryContainer*) self, RYGEL_AUDIO_ITEM_UPNP_CLASS);
	return self;
}

RygelLocalSearchMusic*
rygel_local_search_music_new (const gchar* id,
                              RygelMediaContainer* parent,
                              const gchar* title)
{
	return rygel_local_search_music_construct (RYGEL_LOCAL_SEARCH_TYPE_MUSIC, id, parent, title);
}

static void
rygel_local_search_music_class_init (RygelLocalSearchMusicClass * klass,
                                     gpointer klass_data)
{
	rygel_local_search_music_parent_class = g_type_class_peek_parent (klass);
}

static void
rygel_local_search_music_instance_init (RygelLocalSearchMusic * self,
                                        gpointer klass)
{
}

/**
 * Container listing Music content hierarchy.
 */
 G_GNUC_NO_INLINE static GType
rygel_local_search_music_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (RygelLocalSearchMusicClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_local_search_music_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelLocalSearchMusic), 0, (GInstanceInitFunc) rygel_local_search_music_instance_init, NULL };
	GType rygel_local_search_music_type_id;
	rygel_local_search_music_type_id = g_type_register_static (RYGEL_LOCAL_SEARCH_TYPE_CATEGORY_CONTAINER, "RygelLocalSearchMusic", &g_define_type_info, 0);
	return rygel_local_search_music_type_id;
}

GType
rygel_local_search_music_get_type (void)
{
	static volatile gsize rygel_local_search_music_type_id__once = 0;
	if (g_once_init_enter (&rygel_local_search_music_type_id__once)) {
		GType rygel_local_search_music_type_id;
		rygel_local_search_music_type_id = rygel_local_search_music_get_type_once ();
		g_once_init_leave (&rygel_local_search_music_type_id__once, rygel_local_search_music_type_id);
	}
	return rygel_local_search_music_type_id__once;
}

