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

/*
 * Copyright (C) 2008 Zeeshan Ali <zeenix@gmail.com>.
 *
 * Author: Zeeshan Ali <zeenix@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-tracker3.h"
#include <glib.h>
#include <glib/gi18n-lib.h>
#include "rygel-server.h"
#include "rygel-core.h"

enum  {
	RYGEL_TRACKER_PLUGIN_0_PROPERTY,
	RYGEL_TRACKER_PLUGIN_NUM_PROPERTIES
};
static GParamSpec* rygel_tracker_plugin_properties[RYGEL_TRACKER_PLUGIN_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

static gpointer rygel_tracker_plugin_parent_class = NULL;
static RygelTrackerRootContainer* rygel_tracker_plugin_root;
static RygelTrackerRootContainer* rygel_tracker_plugin_root = NULL;

static void rygel_tracker_plugin_finalize (GObject * obj);
static GType rygel_tracker_plugin_get_type_once (void);

RygelTrackerPlugin*
rygel_tracker_plugin_construct (GType object_type,
                                GError** error)
{
	RygelTrackerPlugin * self = NULL;
	RygelTrackerRootContainer* _tmp0_;
	RygelTrackerRootContainer* _tmp4_;
	GError* _inner_error0_ = NULL;
	_tmp0_ = rygel_tracker_plugin_root;
	if (_tmp0_ == NULL) {
		RygelTrackerRootContainer* _tmp1_ = NULL;
		RygelTrackerRootContainer* _tmp2_;
		RygelTrackerRootContainer* _tmp3_;
		_tmp2_ = rygel_tracker_root_container_new (_ ("@REALNAME@’s media"), &_inner_error0_);
		_tmp1_ = _tmp2_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_propagate_error (error, _inner_error0_);
			_g_object_unref0 (self);
			return NULL;
		}
		_tmp3_ = _tmp1_;
		_tmp1_ = NULL;
		_g_object_unref0 (rygel_tracker_plugin_root);
		rygel_tracker_plugin_root = _tmp3_;
		_g_object_unref0 (_tmp1_);
	}
	_tmp4_ = rygel_tracker_plugin_root;
	self = (RygelTrackerPlugin*) rygel_media_server_plugin_construct (object_type, (RygelMediaContainer*) _tmp4_, RYGEL_TRACKER_PLUGIN_NAME, NULL, RYGEL_PLUGIN_CAPABILITIES_NONE);
	return self;
}

RygelTrackerPlugin*
rygel_tracker_plugin_new (GError** error)
{
	return rygel_tracker_plugin_construct (RYGEL_TRACKER_TYPE_PLUGIN, error);
}

static void
rygel_tracker_plugin_class_init (RygelTrackerPluginClass * klass,
                                 gpointer klass_data)
{
	rygel_tracker_plugin_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = rygel_tracker_plugin_finalize;
}

static void
rygel_tracker_plugin_instance_init (RygelTrackerPlugin * self,
                                    gpointer klass)
{
}

static void
rygel_tracker_plugin_finalize (GObject * obj)
{
	RygelTrackerPlugin * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TRACKER_TYPE_PLUGIN, RygelTrackerPlugin);
	G_OBJECT_CLASS (rygel_tracker_plugin_parent_class)->finalize (obj);
}

static GType
rygel_tracker_plugin_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (RygelTrackerPluginClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_tracker_plugin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelTrackerPlugin), 0, (GInstanceInitFunc) rygel_tracker_plugin_instance_init, NULL };
	GType rygel_tracker_plugin_type_id;
	rygel_tracker_plugin_type_id = g_type_register_static (RYGEL_TYPE_MEDIA_SERVER_PLUGIN, "RygelTrackerPlugin", &g_define_type_info, 0);
	return rygel_tracker_plugin_type_id;
}

GType
rygel_tracker_plugin_get_type (void)
{
	static volatile gsize rygel_tracker_plugin_type_id__once = 0;
	if (g_once_init_enter (&rygel_tracker_plugin_type_id__once)) {
		GType rygel_tracker_plugin_type_id;
		rygel_tracker_plugin_type_id = rygel_tracker_plugin_get_type_once ();
		g_once_init_leave (&rygel_tracker_plugin_type_id__once, rygel_tracker_plugin_type_id);
	}
	return rygel_tracker_plugin_type_id__once;
}

