/* rygel-gst-launch-plugin.c generated by valac 0.56.1, the Vala compiler
 * generated from rygel-gst-launch-plugin.vala, do not modify */

/*
 * Copyright (C) 2009 Thijs Vermeir <thijsvermeir@gmail.com>
 *
 * Author: Thijs Vermeir <thijsvermeir@gmail.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-gst-launch.h"
#include "rygel-core.h"
#include <glib.h>
#include <glib-object.h>
#include "rygel-server.h"

#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	RYGEL_GST_LAUNCH_PLUGIN_0_PROPERTY,
	RYGEL_GST_LAUNCH_PLUGIN_NUM_PROPERTIES
};
static GParamSpec* rygel_gst_launch_plugin_properties[RYGEL_GST_LAUNCH_PLUGIN_NUM_PROPERTIES];

static gpointer rygel_gst_launch_plugin_parent_class = NULL;

static void rygel_gst_launch_plugin_real_constructed (GObject* base);
static GType rygel_gst_launch_plugin_get_type_once (void);

void
module_init (RygelPluginLoader* loader)
{
	RygelGstLaunchPlugin* plugin = NULL;
	RygelGstLaunchPlugin* _tmp0_;
	g_return_if_fail (loader != NULL);
	_tmp0_ = rygel_gst_launch_plugin_new ();
	plugin = _tmp0_;
	rygel_plugin_loader_add_plugin (loader, (RygelPlugin*) plugin);
	_g_object_unref0 (plugin);
}

RygelGstLaunchPlugin*
rygel_gst_launch_plugin_construct (GType object_type)
{
	RygelGstLaunchPlugin * self = NULL;
	RygelGstLaunchRootContainer* root_container = NULL;
	RygelGstLaunchRootContainer* _tmp0_;
	_tmp0_ = rygel_gst_launch_root_container_new ("Gst Launch");
	root_container = _tmp0_;
	self = (RygelGstLaunchPlugin*) rygel_media_server_plugin_construct (object_type, (RygelMediaContainer*) root_container, RYGEL_GST_LAUNCH_PLUGIN_NAME, NULL, RYGEL_PLUGIN_CAPABILITIES_NONE);
	_g_object_unref0 (root_container);
	return self;
}

RygelGstLaunchPlugin*
rygel_gst_launch_plugin_new (void)
{
	return rygel_gst_launch_plugin_construct (RYGEL_GST_LAUNCH_TYPE_PLUGIN);
}

static void
rygel_gst_launch_plugin_real_constructed (GObject* base)
{
	RygelGstLaunchPlugin * self;
	RygelMediaContainer* _tmp0_;
	RygelMediaContainer* _tmp1_;
	self = (RygelGstLaunchPlugin*) base;
	G_OBJECT_CLASS (rygel_gst_launch_plugin_parent_class)->constructed ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, RYGEL_TYPE_MEDIA_SERVER_PLUGIN, RygelMediaServerPlugin));
	_tmp0_ = rygel_media_server_plugin_get_root_container ((RygelMediaServerPlugin*) self);
	_tmp1_ = _tmp0_;
	rygel_gst_launch_root_container_init (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, RYGEL_GST_LAUNCH_TYPE_ROOT_CONTAINER, RygelGstLaunchRootContainer));
}

static void
rygel_gst_launch_plugin_class_init (RygelGstLaunchPluginClass * klass,
                                    gpointer klass_data)
{
	rygel_gst_launch_plugin_parent_class = g_type_class_peek_parent (klass);
	((GObjectClass *) klass)->constructed = (void (*) (GObject*)) rygel_gst_launch_plugin_real_constructed;
}

static void
rygel_gst_launch_plugin_instance_init (RygelGstLaunchPlugin * self,
                                       gpointer klass)
{
}

static GType
rygel_gst_launch_plugin_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (RygelGstLaunchPluginClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_gst_launch_plugin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelGstLaunchPlugin), 0, (GInstanceInitFunc) rygel_gst_launch_plugin_instance_init, NULL };
	GType rygel_gst_launch_plugin_type_id;
	rygel_gst_launch_plugin_type_id = g_type_register_static (RYGEL_TYPE_MEDIA_SERVER_PLUGIN, "RygelGstLaunchPlugin", &g_define_type_info, 0);
	return rygel_gst_launch_plugin_type_id;
}

GType
rygel_gst_launch_plugin_get_type (void)
{
	static volatile gsize rygel_gst_launch_plugin_type_id__once = 0;
	if (g_once_init_enter (&rygel_gst_launch_plugin_type_id__once)) {
		GType rygel_gst_launch_plugin_type_id;
		rygel_gst_launch_plugin_type_id = rygel_gst_launch_plugin_get_type_once ();
		g_once_init_leave (&rygel_gst_launch_plugin_type_id__once, rygel_gst_launch_plugin_type_id);
	}
	return rygel_gst_launch_plugin_type_id__once;
}

