/* rygel-lms-plugin.c generated by valac 0.40.8, the Vala compiler
 * generated from rygel-lms-plugin.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 <stdlib.h>
#include <string.h>
#include <rygel-core.h>


#define RYGEL_LMS_TYPE_PLUGIN (rygel_lms_plugin_get_type ())
#define RYGEL_LMS_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_LMS_TYPE_PLUGIN, RygelLMSPlugin))
#define RYGEL_LMS_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_LMS_TYPE_PLUGIN, RygelLMSPluginClass))
#define RYGEL_LMS_IS_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_LMS_TYPE_PLUGIN))
#define RYGEL_LMS_IS_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_LMS_TYPE_PLUGIN))
#define RYGEL_LMS_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_LMS_TYPE_PLUGIN, RygelLMSPluginClass))

typedef struct _RygelLMSPlugin RygelLMSPlugin;
typedef struct _RygelLMSPluginClass RygelLMSPluginClass;
typedef struct _RygelLMSPluginPrivate RygelLMSPluginPrivate;
enum  {
	RYGEL_LMS_PLUGIN_0_PROPERTY,
	RYGEL_LMS_PLUGIN_NUM_PROPERTIES
};
static GParamSpec* rygel_lms_plugin_properties[RYGEL_LMS_PLUGIN_NUM_PROPERTIES];

#define RYGEL_LMS_TYPE_ROOT_CONTAINER (rygel_lms_root_container_get_type ())
#define RYGEL_LMS_ROOT_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_LMS_TYPE_ROOT_CONTAINER, RygelLMSRootContainer))
#define RYGEL_LMS_ROOT_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_LMS_TYPE_ROOT_CONTAINER, RygelLMSRootContainerClass))
#define RYGEL_LMS_IS_ROOT_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_LMS_TYPE_ROOT_CONTAINER))
#define RYGEL_LMS_IS_ROOT_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_LMS_TYPE_ROOT_CONTAINER))
#define RYGEL_LMS_ROOT_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_LMS_TYPE_ROOT_CONTAINER, RygelLMSRootContainerClass))

typedef struct _RygelLMSRootContainer RygelLMSRootContainer;
typedef struct _RygelLMSRootContainerClass RygelLMSRootContainerClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _RygelLMSPlugin {
	RygelMediaServerPlugin parent_instance;
	RygelLMSPluginPrivate * priv;
};

struct _RygelLMSPluginClass {
	RygelMediaServerPluginClass parent_class;
};


static gpointer rygel_lms_plugin_parent_class = NULL;
static RygelLMSRootContainer* rygel_lms_plugin_root;
static RygelLMSRootContainer* rygel_lms_plugin_root = NULL;

GType rygel_lms_plugin_get_type (void) G_GNUC_CONST;
GType rygel_lms_root_container_get_type (void) G_GNUC_CONST;
#define RYGEL_LMS_PLUGIN_NAME "LMS"
RygelLMSPlugin* rygel_lms_plugin_new (void);
RygelLMSPlugin* rygel_lms_plugin_construct (GType object_type);
RygelLMSRootContainer* rygel_lms_root_container_new (void);
RygelLMSRootContainer* rygel_lms_root_container_construct (GType object_type);
static void rygel_lms_plugin_finalize (GObject * obj);


RygelLMSPlugin*
rygel_lms_plugin_construct (GType object_type)
{
	RygelLMSPlugin * self = NULL;
	RygelLMSRootContainer* _tmp0_;
	RygelLMSRootContainer* _tmp2_;
	_tmp0_ = rygel_lms_plugin_root;
	if (_tmp0_ == NULL) {
		RygelLMSRootContainer* _tmp1_;
		_tmp1_ = rygel_lms_root_container_new ();
		_g_object_unref0 (rygel_lms_plugin_root);
		rygel_lms_plugin_root = _tmp1_;
	}
	_tmp2_ = rygel_lms_plugin_root;
	self = (RygelLMSPlugin*) rygel_media_server_plugin_construct (object_type, (RygelMediaContainer*) _tmp2_, RYGEL_LMS_PLUGIN_NAME, NULL, RYGEL_PLUGIN_CAPABILITIES_TRACK_CHANGES);
	return self;
}


RygelLMSPlugin*
rygel_lms_plugin_new (void)
{
	return rygel_lms_plugin_construct (RYGEL_LMS_TYPE_PLUGIN);
}


static void
rygel_lms_plugin_class_init (RygelLMSPluginClass * klass)
{
	rygel_lms_plugin_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = rygel_lms_plugin_finalize;
}


static void
rygel_lms_plugin_instance_init (RygelLMSPlugin * self)
{
}


static void
rygel_lms_plugin_finalize (GObject * obj)
{
	RygelLMSPlugin * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_LMS_TYPE_PLUGIN, RygelLMSPlugin);
	G_OBJECT_CLASS (rygel_lms_plugin_parent_class)->finalize (obj);
}


GType
rygel_lms_plugin_get_type (void)
{
	static volatile gsize rygel_lms_plugin_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_lms_plugin_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelLMSPluginClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_lms_plugin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelLMSPlugin), 0, (GInstanceInitFunc) rygel_lms_plugin_instance_init, NULL };
		GType rygel_lms_plugin_type_id;
		rygel_lms_plugin_type_id = g_type_register_static (RYGEL_TYPE_MEDIA_SERVER_PLUGIN, "RygelLMSPlugin", &g_define_type_info, 0);
		g_once_init_leave (&rygel_lms_plugin_type_id__volatile, rygel_lms_plugin_type_id);
	}
	return rygel_lms_plugin_type_id__volatile;
}



