/* rygel-lms-all-music.c generated by valac 0.32.1, the Vala compiler
 * generated from rygel-lms-all-music.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 <glib.h>
#include <glib-object.h>
#include <rygel-server.h>
#include <sqlite3.h>
#include <stdlib.h>
#include <string.h>
#include <rygel-db.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>


#define RYGEL_LMS_TYPE_CATEGORY_CONTAINER (rygel_lms_category_container_get_type ())
#define RYGEL_LMS_CATEGORY_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_LMS_TYPE_CATEGORY_CONTAINER, RygelLMSCategoryContainer))
#define RYGEL_LMS_CATEGORY_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_LMS_TYPE_CATEGORY_CONTAINER, RygelLMSCategoryContainerClass))
#define RYGEL_LMS_IS_CATEGORY_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_LMS_TYPE_CATEGORY_CONTAINER))
#define RYGEL_LMS_IS_CATEGORY_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_LMS_TYPE_CATEGORY_CONTAINER))
#define RYGEL_LMS_CATEGORY_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_LMS_TYPE_CATEGORY_CONTAINER, RygelLMSCategoryContainerClass))

typedef struct _RygelLMSCategoryContainer RygelLMSCategoryContainer;
typedef struct _RygelLMSCategoryContainerClass RygelLMSCategoryContainerClass;
typedef struct _RygelLMSCategoryContainerPrivate RygelLMSCategoryContainerPrivate;

#define RYGEL_LMS_TYPE_ALL_MUSIC (rygel_lms_all_music_get_type ())
#define RYGEL_LMS_ALL_MUSIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_LMS_TYPE_ALL_MUSIC, RygelLMSAllMusic))
#define RYGEL_LMS_ALL_MUSIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_LMS_TYPE_ALL_MUSIC, RygelLMSAllMusicClass))
#define RYGEL_LMS_IS_ALL_MUSIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_LMS_TYPE_ALL_MUSIC))
#define RYGEL_LMS_IS_ALL_MUSIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_LMS_TYPE_ALL_MUSIC))
#define RYGEL_LMS_ALL_MUSIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_LMS_TYPE_ALL_MUSIC, RygelLMSAllMusicClass))

typedef struct _RygelLMSAllMusic RygelLMSAllMusic;
typedef struct _RygelLMSAllMusicClass RygelLMSAllMusicClass;
typedef struct _RygelLMSAllMusicPrivate RygelLMSAllMusicPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define RYGEL_LMS_TYPE_DATABASE (rygel_lms_database_get_type ())
#define RYGEL_LMS_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_LMS_TYPE_DATABASE, RygelLMSDatabase))
#define RYGEL_LMS_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_LMS_TYPE_DATABASE, RygelLMSDatabaseClass))
#define RYGEL_LMS_IS_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_LMS_TYPE_DATABASE))
#define RYGEL_LMS_IS_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_LMS_TYPE_DATABASE))
#define RYGEL_LMS_DATABASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_LMS_TYPE_DATABASE, RygelLMSDatabaseClass))

typedef struct _RygelLMSDatabase RygelLMSDatabase;
typedef struct _RygelLMSDatabaseClass RygelLMSDatabaseClass;

struct _RygelLMSCategoryContainer {
	RygelMediaContainer parent_instance;
	RygelLMSCategoryContainerPrivate * priv;
	RygelDatabaseCursor* cursor_all;
	RygelDatabaseCursor* cursor_find_object;
	RygelDatabaseCursor* cursor_added;
	RygelDatabaseCursor* cursor_removed;
	gchar* child_prefix;
	gchar* ref_prefix;
};

struct _RygelLMSCategoryContainerClass {
	RygelMediaContainerClass parent_class;
	RygelMediaObject* (*object_from_statement) (RygelLMSCategoryContainer* self, sqlite3_stmt* statement);
	gchar* (*get_sql_all_with_filter) (RygelLMSCategoryContainer* self, const gchar* filter);
	gchar* (*get_sql_count_with_filter) (RygelLMSCategoryContainer* self, const gchar* filter);
	guint (*get_child_count_with_filter) (RygelLMSCategoryContainer* self, const gchar* where_filter, GValueArray* args);
	RygelMediaObjects* (*get_children_with_filter) (RygelLMSCategoryContainer* self, const gchar* where_filter, GValueArray* args, const gchar* sort_criteria, guint offset, guint max_count);
};

struct _RygelLMSAllMusic {
	RygelLMSCategoryContainer parent_instance;
	RygelLMSAllMusicPrivate * priv;
};

struct _RygelLMSAllMusicClass {
	RygelLMSCategoryContainerClass parent_class;
};


static gpointer rygel_lms_all_music_parent_class = NULL;

GType rygel_lms_category_container_get_type (void) G_GNUC_CONST;
GType rygel_lms_all_music_get_type (void) G_GNUC_CONST;
enum  {
	RYGEL_LMS_ALL_MUSIC_DUMMY_PROPERTY
};
#define RYGEL_LMS_ALL_MUSIC_SQL_ALL_TEMPLATE "SELECT files.id, files.path, files.size, " "audios.title as title, audios.trackno, audios.length, " "audios.channels, audios.sampling_rate, audios.bitrate, " "audios.dlna_profile, audios.dlna_mime, " "audio_artists.name as artist, " "audio_albums.name, " "files.mtime, " "audio_genres.name " "FROM audios, files " "LEFT JOIN audio_artists " "ON audios.artist_id = audio_artists.id " "LEFT JOIN audio_albums " "ON audios.album_id = audio_albums.id " "LEFT JOIN audio_genres " "ON audios.genre_id = audio_genres.id " "WHERE dtime = 0 AND audios.id = files.id %s " "LIMIT ? OFFSET ?;"
#define RYGEL_LMS_ALL_MUSIC_SQL_COUNT "SELECT COUNT(audios.id) " "FROM audios, files " "WHERE dtime = 0 AND audios.id = files.id;"
#define RYGEL_LMS_ALL_MUSIC_SQL_COUNT_WITH_FILTER_TEMPLATE "SELECT COUNT(audios.id), audios.title as title, " "audio_artists.name as artist " "FROM audios, files " "LEFT JOIN audio_artists " "ON audios.artist_id = audio_artists.id " "WHERE dtime = 0 AND audios.id = files.id %s;"
#define RYGEL_LMS_ALL_MUSIC_SQL_FIND_OBJECT "SELECT files.id, files.path, files.size, " "audios.title, audios.trackno, audios.length, " "audios.channels, audios.sampling_rate, audios.bitrate, " "audios.dlna_profile, audios.dlna_mime, " "audio_artists.name, " "audio_albums.name, " "files.mtime, " "audio_genres.name " "FROM audios, files " "LEFT JOIN audio_artists " "ON audios.artist_id = audio_artists.id " "LEFT JOIN audio_albums " "ON audios.album_id = audio_albums.id " "LEFT JOIN audio_genres " "ON audios.genre_id = audio_genres.id " "WHERE dtime = 0 AND files.id = ? AND audios.id = files.id;"
#define RYGEL_LMS_ALL_MUSIC_SQL_ADDED "SELECT files.id, files.path, files.size, " "audios.title as title, audios.trackno, audios.length, " "audios.channels, audios.sampling_rate, audios.bitrate, " "audios.dlna_profile, audios.dlna_mime, " "audio_artists.name as artist, " "audio_albums.name, " "files.mtime, " "audio_genres.name " "FROM audios, files " "LEFT JOIN audio_artists " "ON audios.artist_id = audio_artists.id " "LEFT JOIN audio_albums " "ON audios.album_id = audio_albums.id " "LEFT JOIN audio_genres " "ON audios.genre_id = audio_genres.id " "WHERE dtime = 0 AND audios.id = files.id " "AND update_id > ? AND update_id <= ?;"
#define RYGEL_LMS_ALL_MUSIC_SQL_REMOVED "SELECT files.id, files.path, files.size, " "audios.title as title, audios.trackno, audios.length, " "audios.channels, audios.sampling_rate, audios.bitrate, " "audios.dlna_profile, audios.dlna_mime, " "audio_artists.name as artist, " "audio_albums.name, " "files.mtime, " "audio_genres.name " "FROM audios, files " "LEFT JOIN audio_artists " "ON audios.artist_id = audio_artists.id " "LEFT JOIN audio_albums " "ON audios.album_id = audio_albums.id " "LEFT JOIN audio_genres " "ON audios.genre_id = audio_genres.id " "WHERE dtime <> 0 AND audios.id = files.id " "AND update_id > ? AND update_id <= ?;"
static gchar* rygel_lms_all_music_real_get_sql_all_with_filter (RygelLMSCategoryContainer* base, const gchar* filter);
const gchar* rygel_lms_category_container_get_sql_all (RygelLMSCategoryContainer* self);
static gchar* rygel_lms_all_music_real_get_sql_count_with_filter (RygelLMSCategoryContainer* base, const gchar* filter);
const gchar* rygel_lms_category_container_get_sql_count (RygelLMSCategoryContainer* self);
static RygelMediaObject* rygel_lms_all_music_real_object_from_statement (RygelLMSCategoryContainer* base, sqlite3_stmt* statement);
gchar* rygel_lms_category_container_build_child_id (RygelLMSCategoryContainer* self, gint db_id);
GType rygel_lms_database_get_type (void) G_GNUC_CONST;
RygelLMSAllMusic* rygel_lms_all_music_new (RygelMediaContainer* parent, RygelLMSDatabase* lms_db);
RygelLMSAllMusic* rygel_lms_all_music_construct (GType object_type, RygelMediaContainer* parent, RygelLMSDatabase* lms_db);
RygelLMSCategoryContainer* rygel_lms_category_container_construct (GType object_type, const gchar* db_id, RygelMediaContainer* parent, const gchar* title, RygelLMSDatabase* lms_db, const gchar* sql_all, const gchar* sql_find_object, const gchar* sql_count, const gchar* sql_added, const gchar* sql_removed);


static gchar* rygel_lms_all_music_real_get_sql_all_with_filter (RygelLMSCategoryContainer* base, const gchar* filter) {
	RygelLMSAllMusic * self;
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	gchar* filter_str = NULL;
	const gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	self = (RygelLMSAllMusic*) base;
	g_return_val_if_fail (filter != NULL, NULL);
	_tmp0_ = filter;
	_tmp1_ = strlen (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == 0) {
		const gchar* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		_tmp3_ = rygel_lms_category_container_get_sql_all ((RygelLMSCategoryContainer*) self);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_strdup (_tmp4_);
		result = _tmp5_;
		return result;
	}
	_tmp6_ = filter;
	_tmp7_ = g_strdup_printf ("AND %s", _tmp6_);
	filter_str = _tmp7_;
	_tmp8_ = filter_str;
	_tmp9_ = g_strdup_printf (RYGEL_LMS_ALL_MUSIC_SQL_ALL_TEMPLATE, _tmp8_);
	result = _tmp9_;
	_g_free0 (filter_str);
	return result;
}


static gchar* rygel_lms_all_music_real_get_sql_count_with_filter (RygelLMSCategoryContainer* base, const gchar* filter) {
	RygelLMSAllMusic * self;
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	gchar* filter_str = NULL;
	const gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	self = (RygelLMSAllMusic*) base;
	g_return_val_if_fail (filter != NULL, NULL);
	_tmp0_ = filter;
	_tmp1_ = strlen (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ == 0) {
		const gchar* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
		_tmp3_ = rygel_lms_category_container_get_sql_count ((RygelLMSCategoryContainer*) self);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_strdup (_tmp4_);
		result = _tmp5_;
		return result;
	}
	_tmp6_ = filter;
	_tmp7_ = g_strdup_printf ("AND %s", _tmp6_);
	filter_str = _tmp7_;
	_tmp8_ = filter_str;
	_tmp9_ = g_strdup_printf (RYGEL_LMS_ALL_MUSIC_SQL_COUNT_WITH_FILTER_TEMPLATE, _tmp8_);
	result = _tmp9_;
	_g_free0 (filter_str);
	return result;
}


static RygelMediaObject* rygel_lms_all_music_real_object_from_statement (RygelLMSCategoryContainer* base, sqlite3_stmt* statement) {
	RygelLMSAllMusic * self;
	RygelMediaObject* result = NULL;
	gint id = 0;
	sqlite3_stmt* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gchar* path = NULL;
	sqlite3_stmt* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* mime_type = NULL;
	sqlite3_stmt* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gboolean _tmp8_ = FALSE;
	const gchar* _tmp9_ = NULL;
	gchar* title = NULL;
	sqlite3_stmt* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	gchar* _tmp17_ = NULL;
	gchar* song_id = NULL;
	gint _tmp18_ = 0;
	gchar* _tmp19_ = NULL;
	RygelMusicItem* song = NULL;
	RygelMusicItem* _tmp20_ = NULL;
	sqlite3_stmt* _tmp21_ = NULL;
	gint _tmp22_ = 0;
	sqlite3_stmt* _tmp23_ = NULL;
	gint _tmp24_ = 0;
	sqlite3_stmt* _tmp25_ = NULL;
	gint _tmp26_ = 0;
	sqlite3_stmt* _tmp27_ = NULL;
	gint _tmp28_ = 0;
	sqlite3_stmt* _tmp29_ = NULL;
	gint _tmp30_ = 0;
	sqlite3_stmt* _tmp31_ = NULL;
	gint _tmp32_ = 0;
	sqlite3_stmt* _tmp33_ = NULL;
	const gchar* _tmp34_ = NULL;
	const gchar* _tmp35_ = NULL;
	sqlite3_stmt* _tmp36_ = NULL;
	const gchar* _tmp37_ = NULL;
	sqlite3_stmt* _tmp38_ = NULL;
	const gchar* _tmp39_ = NULL;
	GTimeVal tv = {0};
	sqlite3_stmt* _tmp40_ = NULL;
	gint _tmp41_ = 0;
	GTimeVal _tmp42_ = {0};
	gchar* _tmp43_ = NULL;
	gchar* _tmp44_ = NULL;
	sqlite3_stmt* _tmp45_ = NULL;
	const gchar* _tmp46_ = NULL;
	GFile* file = NULL;
	const gchar* _tmp47_ = NULL;
	GFile* _tmp48_ = NULL;
	gchar* _tmp49_ = NULL;
	gchar* _tmp50_ = NULL;
	self = (RygelLMSAllMusic*) base;
	g_return_val_if_fail (statement != NULL, NULL);
	_tmp0_ = statement;
	_tmp1_ = sqlite3_column_int (_tmp0_, 0);
	id = _tmp1_;
	_tmp2_ = statement;
	_tmp3_ = sqlite3_column_text (_tmp2_, 1);
	_tmp4_ = g_strdup (_tmp3_);
	path = _tmp4_;
	_tmp5_ = statement;
	_tmp6_ = sqlite3_column_text (_tmp5_, 10);
	_tmp7_ = g_strdup (_tmp6_);
	mime_type = _tmp7_;
	_tmp9_ = mime_type;
	if (_tmp9_ == NULL) {
		_tmp8_ = TRUE;
	} else {
		const gchar* _tmp10_ = NULL;
		gint _tmp11_ = 0;
		gint _tmp12_ = 0;
		_tmp10_ = mime_type;
		_tmp11_ = strlen (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp8_ = _tmp12_ == 0;
	}
	if (_tmp8_) {
		gint _tmp13_ = 0;
		const gchar* _tmp14_ = NULL;
		_tmp13_ = id;
		_tmp14_ = path;
		g_debug ("rygel-lms-all-music.vala:143: Music item %d (%s) has no MIME type", _tmp13_, _tmp14_);
	}
	_tmp15_ = statement;
	_tmp16_ = sqlite3_column_text (_tmp15_, 3);
	_tmp17_ = g_strdup (_tmp16_);
	title = _tmp17_;
	_tmp18_ = id;
	_tmp19_ = rygel_lms_category_container_build_child_id ((RygelLMSCategoryContainer*) self, _tmp18_);
	song_id = _tmp19_;
	_tmp20_ = rygel_music_item_new (song_id, (RygelMediaContainer*) self, title, RYGEL_MUSIC_ITEM_UPNP_CLASS);
	song = _tmp20_;
	_tmp21_ = statement;
	_tmp22_ = sqlite3_column_int (_tmp21_, 2);
	rygel_media_file_item_set_size ((RygelMediaFileItem*) song, (gint64) _tmp22_);
	_tmp23_ = statement;
	_tmp24_ = sqlite3_column_int (_tmp23_, 4);
	rygel_music_item_set_track_number (song, _tmp24_);
	_tmp25_ = statement;
	_tmp26_ = sqlite3_column_int (_tmp25_, 5);
	rygel_audio_item_set_duration ((RygelAudioItem*) song, (glong) _tmp26_);
	_tmp27_ = statement;
	_tmp28_ = sqlite3_column_int (_tmp27_, 6);
	rygel_audio_item_set_channels ((RygelAudioItem*) song, _tmp28_);
	_tmp29_ = statement;
	_tmp30_ = sqlite3_column_int (_tmp29_, 7);
	rygel_audio_item_set_sample_freq ((RygelAudioItem*) song, _tmp30_);
	_tmp31_ = statement;
	_tmp32_ = sqlite3_column_int (_tmp31_, 8);
	rygel_audio_item_set_bitrate ((RygelAudioItem*) song, _tmp32_);
	_tmp33_ = statement;
	_tmp34_ = sqlite3_column_text (_tmp33_, 9);
	rygel_media_file_item_set_dlna_profile ((RygelMediaFileItem*) song, _tmp34_);
	_tmp35_ = mime_type;
	rygel_media_file_item_set_mime_type ((RygelMediaFileItem*) song, _tmp35_);
	_tmp36_ = statement;
	_tmp37_ = sqlite3_column_text (_tmp36_, 11);
	rygel_media_object_set_artist ((RygelMediaObject*) song, _tmp37_);
	_tmp38_ = statement;
	_tmp39_ = sqlite3_column_text (_tmp38_, 12);
	rygel_audio_item_set_album ((RygelAudioItem*) song, _tmp39_);
	_tmp40_ = statement;
	_tmp41_ = sqlite3_column_int (_tmp40_, 13);
	_tmp42_.tv_sec = (glong) _tmp41_;
	_tmp42_.tv_usec = (glong) 0;
	tv = _tmp42_;
	_tmp43_ = g_time_val_to_iso8601 (&tv);
	_tmp44_ = _tmp43_;
	rygel_media_object_set_date ((RygelMediaObject*) song, _tmp44_);
	_g_free0 (_tmp44_);
	_tmp45_ = statement;
	_tmp46_ = sqlite3_column_text (_tmp45_, 14);
	rygel_media_object_set_genre ((RygelMediaObject*) song, _tmp46_);
	_tmp47_ = path;
	_tmp48_ = g_file_new_for_path (_tmp47_);
	file = _tmp48_;
	_tmp49_ = g_file_get_uri (file);
	_tmp50_ = _tmp49_;
	rygel_media_object_add_uri ((RygelMediaObject*) song, _tmp50_);
	_g_free0 (_tmp50_);
	result = (RygelMediaObject*) song;
	_g_object_unref0 (file);
	_g_free0 (song_id);
	_g_free0 (title);
	_g_free0 (mime_type);
	_g_free0 (path);
	return result;
}


RygelLMSAllMusic* rygel_lms_all_music_construct (GType object_type, RygelMediaContainer* parent, RygelLMSDatabase* lms_db) {
	RygelLMSAllMusic * self = NULL;
	RygelMediaContainer* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	RygelLMSDatabase* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	g_return_val_if_fail (parent != NULL, NULL);
	g_return_val_if_fail (lms_db != NULL, NULL);
	_tmp0_ = parent;
	_tmp1_ = _ ("All");
	_tmp2_ = lms_db;
	_tmp3_ = g_strdup_printf (RYGEL_LMS_ALL_MUSIC_SQL_ALL_TEMPLATE, "");
	_tmp4_ = _tmp3_;
	self = (RygelLMSAllMusic*) rygel_lms_category_container_construct (object_type, "all", _tmp0_, _tmp1_, _tmp2_, _tmp4_, RYGEL_LMS_ALL_MUSIC_SQL_FIND_OBJECT, RYGEL_LMS_ALL_MUSIC_SQL_COUNT, RYGEL_LMS_ALL_MUSIC_SQL_ADDED, RYGEL_LMS_ALL_MUSIC_SQL_REMOVED);
	_g_free0 (_tmp4_);
	return self;
}


RygelLMSAllMusic* rygel_lms_all_music_new (RygelMediaContainer* parent, RygelLMSDatabase* lms_db) {
	return rygel_lms_all_music_construct (RYGEL_LMS_TYPE_ALL_MUSIC, parent, lms_db);
}


static void rygel_lms_all_music_class_init (RygelLMSAllMusicClass * klass) {
	rygel_lms_all_music_parent_class = g_type_class_peek_parent (klass);
	((RygelLMSCategoryContainerClass *) klass)->get_sql_all_with_filter = rygel_lms_all_music_real_get_sql_all_with_filter;
	((RygelLMSCategoryContainerClass *) klass)->get_sql_count_with_filter = rygel_lms_all_music_real_get_sql_count_with_filter;
	((RygelLMSCategoryContainerClass *) klass)->object_from_statement = rygel_lms_all_music_real_object_from_statement;
}


static void rygel_lms_all_music_instance_init (RygelLMSAllMusic * self) {
}


GType rygel_lms_all_music_get_type (void) {
	static volatile gsize rygel_lms_all_music_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_lms_all_music_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelLMSAllMusicClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_lms_all_music_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelLMSAllMusic), 0, (GInstanceInitFunc) rygel_lms_all_music_instance_init, NULL };
		GType rygel_lms_all_music_type_id;
		rygel_lms_all_music_type_id = g_type_register_static (RYGEL_LMS_TYPE_CATEGORY_CONTAINER, "RygelLMSAllMusic", &g_define_type_info, 0);
		g_once_init_leave (&rygel_lms_all_music_type_id__volatile, rygel_lms_all_music_type_id);
	}
	return rygel_lms_all_music_type_id__volatile;
}



