/* rygel-playbin-module.c generated by valac 0.56.1, the Vala compiler
 * generated from rygel-playbin-module.vala, do not modify */

/*
 * Copyright (C) 2012 Openismus GmbH.
 *
 * Author: Jens Georg <jensg@openismus.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-playbin.h"
#include "rygel-core.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gst/gst.h>
#include "rygel-renderer.h"
#include <glib-object.h>

#define RYGEL_TYPE_PLAYBIN_PLUGIN (rygel_playbin_plugin_get_type ())
#define RYGEL_PLAYBIN_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_PLAYBIN_PLUGIN, RygelPlaybinPlugin))
#define RYGEL_PLAYBIN_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_PLAYBIN_PLUGIN, RygelPlaybinPluginClass))
#define RYGEL_IS_PLAYBIN_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_PLAYBIN_PLUGIN))
#define RYGEL_IS_PLAYBIN_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_PLAYBIN_PLUGIN))
#define RYGEL_PLAYBIN_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_PLAYBIN_PLUGIN, RygelPlaybinPluginClass))

typedef struct _RygelPlaybinPlugin RygelPlaybinPlugin;
typedef struct _RygelPlaybinPluginClass RygelPlaybinPluginClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

VALA_EXTERN GType rygel_playbin_plugin_get_type (void) G_GNUC_CONST ;
VALA_EXTERN RygelPlaybinPlugin* rygel_playbin_plugin_new (GError** error);
VALA_EXTERN RygelPlaybinPlugin* rygel_playbin_plugin_construct (GType object_type,
                                                    GError** error);

void
module_init (RygelPluginLoader* loader)
{
	gchar** args = NULL;
	gint args_length1;
	gint _args_size_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (loader != NULL);
	args = NULL;
	args_length1 = 0;
	_args_size_ = args_length1;
	gst_init ((gint*) (&args_length1), &args);
	_args_size_ = args_length1;
	{
		RygelPlaybinPlugin* plugin = NULL;
		RygelPlaybinPlugin* _tmp0_;
		_tmp0_ = rygel_playbin_plugin_new (&_inner_error0_);
		plugin = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		rygel_plugin_loader_add_plugin (loader, (RygelPlugin*) plugin);
		_g_object_unref0 (plugin);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		_error_ = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = _error_;
		_tmp2_ = _tmp1_->message;
		g_warning ("rygel-playbin-module.vala:35: %s", _tmp2_);
		_g_error_free0 (_error_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

