/* rygel-rendering-control.c generated by valac 0.25.3.10-37e0, the Vala compiler
 * generated from rygel-rendering-control.vala, do not modify */

/*
 * Copyright (C) 2008 OpenedHand Ltd.
 * Copyright (C) 2009 Nokia Corporation.
 *
 * Author: Jorn Baayen <jorn@openedhand.com>
 *         Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
 *                               <zeeshan.ali@nokia.com>
 *
 * 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 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 program; 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 <libgupnp/gupnp.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <rygel-core.h>
#include <glib/gi18n-lib.h>


#define RYGEL_TYPE_RENDERING_CONTROL (rygel_rendering_control_get_type ())
#define RYGEL_RENDERING_CONTROL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_RENDERING_CONTROL, RygelRenderingControl))
#define RYGEL_RENDERING_CONTROL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_RENDERING_CONTROL, RygelRenderingControlClass))
#define RYGEL_IS_RENDERING_CONTROL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_RENDERING_CONTROL))
#define RYGEL_IS_RENDERING_CONTROL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_RENDERING_CONTROL))
#define RYGEL_RENDERING_CONTROL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_RENDERING_CONTROL, RygelRenderingControlClass))

typedef struct _RygelRenderingControl RygelRenderingControl;
typedef struct _RygelRenderingControlClass RygelRenderingControlClass;
typedef struct _RygelRenderingControlPrivate RygelRenderingControlPrivate;

#define RYGEL_TYPE_CHANGE_LOG (rygel_change_log_get_type ())
#define RYGEL_CHANGE_LOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_CHANGE_LOG, RygelChangeLog))
#define RYGEL_CHANGE_LOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_CHANGE_LOG, RygelChangeLogClass))
#define RYGEL_IS_CHANGE_LOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_CHANGE_LOG))
#define RYGEL_IS_CHANGE_LOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_CHANGE_LOG))
#define RYGEL_CHANGE_LOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_CHANGE_LOG, RygelChangeLogClass))

typedef struct _RygelChangeLog RygelChangeLog;
typedef struct _RygelChangeLogClass RygelChangeLogClass;

#define RYGEL_TYPE_MEDIA_PLAYER (rygel_media_player_get_type ())
#define RYGEL_MEDIA_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_MEDIA_PLAYER, RygelMediaPlayer))
#define RYGEL_IS_MEDIA_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_MEDIA_PLAYER))
#define RYGEL_MEDIA_PLAYER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), RYGEL_TYPE_MEDIA_PLAYER, RygelMediaPlayerIface))

typedef struct _RygelMediaPlayer RygelMediaPlayer;
typedef struct _RygelMediaPlayerIface RygelMediaPlayerIface;
#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_TYPE_MEDIA_RENDERER_PLUGIN (rygel_media_renderer_plugin_get_type ())
#define RYGEL_MEDIA_RENDERER_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_MEDIA_RENDERER_PLUGIN, RygelMediaRendererPlugin))
#define RYGEL_MEDIA_RENDERER_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_MEDIA_RENDERER_PLUGIN, RygelMediaRendererPluginClass))
#define RYGEL_IS_MEDIA_RENDERER_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_MEDIA_RENDERER_PLUGIN))
#define RYGEL_IS_MEDIA_RENDERER_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_MEDIA_RENDERER_PLUGIN))
#define RYGEL_MEDIA_RENDERER_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_MEDIA_RENDERER_PLUGIN, RygelMediaRendererPluginClass))

typedef struct _RygelMediaRendererPlugin RygelMediaRendererPlugin;
typedef struct _RygelMediaRendererPluginClass RygelMediaRendererPluginClass;

struct _RygelRenderingControl {
	GUPnPService parent_instance;
	RygelRenderingControlPrivate * priv;
};

struct _RygelRenderingControlClass {
	GUPnPServiceClass parent_class;
};

struct _RygelMediaPlayerIface {
	GTypeInterface parent_iface;
	gboolean (*seek) (RygelMediaPlayer* self, gint64 time);
	gboolean (*seek_bytes) (RygelMediaPlayer* self, gint64 bytes);
	gchar** (*get_protocols) (RygelMediaPlayer* self, int* result_length1);
	gchar** (*get_mime_types) (RygelMediaPlayer* self, int* result_length1);
	gchar* (*get_playback_state) (RygelMediaPlayer* self);
	void (*set_playback_state) (RygelMediaPlayer* self, const gchar* value);
	gchar** (*get_allowed_playback_speeds) (RygelMediaPlayer* self, int* result_length1);
	gchar* (*get_playback_speed) (RygelMediaPlayer* self);
	void (*set_playback_speed) (RygelMediaPlayer* self, const gchar* value);
	gchar* (*get_uri) (RygelMediaPlayer* self);
	void (*set_uri) (RygelMediaPlayer* self, const gchar* value);
	gdouble (*get_volume) (RygelMediaPlayer* self);
	void (*set_volume) (RygelMediaPlayer* self, gdouble value);
	gint64 (*get_duration) (RygelMediaPlayer* self);
	gint64 (*get_size) (RygelMediaPlayer* self);
	gchar* (*get_metadata) (RygelMediaPlayer* self);
	void (*set_metadata) (RygelMediaPlayer* self, const gchar* value);
	gchar* (*get_mime_type) (RygelMediaPlayer* self);
	void (*set_mime_type) (RygelMediaPlayer* self, const gchar* value);
	gboolean (*get_can_seek) (RygelMediaPlayer* self);
	gboolean (*get_can_seek_bytes) (RygelMediaPlayer* self);
	gchar* (*get_content_features) (RygelMediaPlayer* self);
	void (*set_content_features) (RygelMediaPlayer* self, const gchar* value);
	gint64 (*get_position) (RygelMediaPlayer* self);
	gint64 (*get_byte_position) (RygelMediaPlayer* self);
};

struct _RygelRenderingControlPrivate {
	gboolean _mute;
	guint _volume;
	gchar* preset_name_list;
	RygelChangeLog* changelog;
	RygelMediaPlayer* player;
};


static gpointer rygel_rendering_control_parent_class = NULL;

GType rygel_rendering_control_get_type (void) G_GNUC_CONST;
GType rygel_change_log_get_type (void) G_GNUC_CONST;
GType rygel_media_player_get_type (void) G_GNUC_CONST;
#define RYGEL_RENDERING_CONTROL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RYGEL_TYPE_RENDERING_CONTROL, RygelRenderingControlPrivate))
enum  {
	RYGEL_RENDERING_CONTROL_DUMMY_PROPERTY,
	RYGEL_RENDERING_CONTROL_MUTE,
	RYGEL_RENDERING_CONTROL_VOLUME
};
#define RYGEL_RENDERING_CONTROL_UPNP_ID "urn:upnp-org:serviceId:RenderingControl"
#define RYGEL_RENDERING_CONTROL_UPNP_TYPE "urn:schemas-upnp-org:service:RenderingControl:2"
#define RYGEL_RENDERING_CONTROL_DESCRIPTION_PATH "xml/RenderingControl2.xml"
#define RYGEL_RENDERING_CONTROL_LAST_CHANGE_NS "urn:schemas-upnp-org:metadata-1-0/RCS/"
static void rygel_rendering_control_real_constructed (GObject* base);
RygelChangeLog* rygel_change_log_new (GUPnPService* service, const gchar* service_ns);
RygelChangeLog* rygel_change_log_construct (GType object_type, GUPnPService* service, const gchar* service_ns);
static RygelMediaPlayer* rygel_rendering_control_get_player (RygelRenderingControl* self);
static void rygel_rendering_control_query_last_change_cb (RygelRenderingControl* self, GUPnPService* service, const gchar* variable, GValue* value);
static void _rygel_rendering_control_query_last_change_cb_gupnp_service_query_variable (GUPnPService* _sender, const gchar* variable, GValue* value, gpointer self);
static void rygel_rendering_control_list_presets_cb (RygelRenderingControl* self, GUPnPService* service, GUPnPServiceAction* action);
static void _rygel_rendering_control_list_presets_cb_gupnp_service_action_invoked (GUPnPService* _sender, GUPnPServiceAction* action, gpointer self);
static void rygel_rendering_control_select_preset_cb (RygelRenderingControl* self, GUPnPService* service, GUPnPServiceAction* action);
static void _rygel_rendering_control_select_preset_cb_gupnp_service_action_invoked (GUPnPService* _sender, GUPnPServiceAction* action, gpointer self);
static void rygel_rendering_control_get_mute_cb (RygelRenderingControl* self, GUPnPService* service, GUPnPServiceAction* action);
static void _rygel_rendering_control_get_mute_cb_gupnp_service_action_invoked (GUPnPService* _sender, GUPnPServiceAction* action, gpointer self);
static void rygel_rendering_control_set_mute_cb (RygelRenderingControl* self, GUPnPService* service, GUPnPServiceAction* action);
static void _rygel_rendering_control_set_mute_cb_gupnp_service_action_invoked (GUPnPService* _sender, GUPnPServiceAction* action, gpointer self);
static void rygel_rendering_control_get_volume_cb (RygelRenderingControl* self, GUPnPService* service, GUPnPServiceAction* action);
static void _rygel_rendering_control_get_volume_cb_gupnp_service_action_invoked (GUPnPService* _sender, GUPnPServiceAction* action, gpointer self);
static void rygel_rendering_control_set_volume_cb (RygelRenderingControl* self, GUPnPService* service, GUPnPServiceAction* action);
static void _rygel_rendering_control_set_volume_cb_gupnp_service_action_invoked (GUPnPService* _sender, GUPnPServiceAction* action, gpointer self);
static void rygel_rendering_control_notify_volume_cb (RygelRenderingControl* self, GObject* player, GParamSpec* p);
static void _rygel_rendering_control_notify_volume_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
gdouble rygel_media_player_get_volume (RygelMediaPlayer* self);
guint rygel_volume_to_percentage (gdouble volume);
gboolean rygel_rendering_control_get_mute (RygelRenderingControl* self);
void rygel_change_log_log_with_channel (RygelChangeLog* self, const gchar* variable, const gchar* value, const gchar* channel);
guint rygel_rendering_control_get_volume (RygelRenderingControl* self);
gchar* rygel_change_log_finish (RygelChangeLog* self);
GType rygel_media_renderer_plugin_get_type (void) G_GNUC_CONST;
RygelMediaPlayer* rygel_media_renderer_plugin_get_player (RygelMediaRendererPlugin* self);
static gboolean rygel_rendering_control_check_instance_id (RygelRenderingControl* self, GUPnPServiceAction* action);
static gboolean rygel_rendering_control_check_channel (RygelRenderingControl* self, GUPnPServiceAction* action);
void rygel_rendering_control_set_mute (RygelRenderingControl* self, gboolean value);
void rygel_rendering_control_set_volume (RygelRenderingControl* self, guint value);
RygelRenderingControl* rygel_rendering_control_new (void);
RygelRenderingControl* rygel_rendering_control_construct (GType object_type);
void rygel_media_player_set_volume (RygelMediaPlayer* self, gdouble value);
gdouble rygel_volume_from_percentage (guint percentage);
static void rygel_rendering_control_finalize (GObject* obj);
static void _vala_rygel_rendering_control_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_rygel_rendering_control_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


static void _rygel_rendering_control_query_last_change_cb_gupnp_service_query_variable (GUPnPService* _sender, const gchar* variable, GValue* value, gpointer self) {
	rygel_rendering_control_query_last_change_cb ((RygelRenderingControl*) self, _sender, variable, value);
}


static void _rygel_rendering_control_list_presets_cb_gupnp_service_action_invoked (GUPnPService* _sender, GUPnPServiceAction* action, gpointer self) {
	rygel_rendering_control_list_presets_cb ((RygelRenderingControl*) self, _sender, action);
}


static void _rygel_rendering_control_select_preset_cb_gupnp_service_action_invoked (GUPnPService* _sender, GUPnPServiceAction* action, gpointer self) {
	rygel_rendering_control_select_preset_cb ((RygelRenderingControl*) self, _sender, action);
}


static void _rygel_rendering_control_get_mute_cb_gupnp_service_action_invoked (GUPnPService* _sender, GUPnPServiceAction* action, gpointer self) {
	rygel_rendering_control_get_mute_cb ((RygelRenderingControl*) self, _sender, action);
}


static void _rygel_rendering_control_set_mute_cb_gupnp_service_action_invoked (GUPnPService* _sender, GUPnPServiceAction* action, gpointer self) {
	rygel_rendering_control_set_mute_cb ((RygelRenderingControl*) self, _sender, action);
}


static void _rygel_rendering_control_get_volume_cb_gupnp_service_action_invoked (GUPnPService* _sender, GUPnPServiceAction* action, gpointer self) {
	rygel_rendering_control_get_volume_cb ((RygelRenderingControl*) self, _sender, action);
}


static void _rygel_rendering_control_set_volume_cb_gupnp_service_action_invoked (GUPnPService* _sender, GUPnPServiceAction* action, gpointer self) {
	rygel_rendering_control_set_volume_cb ((RygelRenderingControl*) self, _sender, action);
}


static void _rygel_rendering_control_notify_volume_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
	rygel_rendering_control_notify_volume_cb ((RygelRenderingControl*) self, _sender, pspec);
}


static void rygel_rendering_control_real_constructed (GObject* base) {
	RygelRenderingControl * self;
	RygelChangeLog* _tmp0_ = NULL;
	RygelMediaPlayer* _tmp1_ = NULL;
	RygelMediaPlayer* _tmp2_ = NULL;
	RygelMediaPlayer* _tmp3_ = NULL;
	gdouble _tmp4_ = 0.0;
	gdouble _tmp5_ = 0.0;
	RygelMediaPlayer* _tmp6_ = NULL;
	gdouble _tmp7_ = 0.0;
	gdouble _tmp8_ = 0.0;
	guint _tmp9_ = 0U;
	self = (RygelRenderingControl*) base;
	G_OBJECT_CLASS (rygel_rendering_control_parent_class)->constructed ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, gupnp_service_get_type (), GUPnPService));
	_tmp0_ = rygel_change_log_new ((GUPnPService*) self, RYGEL_RENDERING_CONTROL_LAST_CHANGE_NS);
	_g_object_unref0 (self->priv->changelog);
	self->priv->changelog = _tmp0_;
	_tmp1_ = rygel_rendering_control_get_player (self);
	_g_object_unref0 (self->priv->player);
	self->priv->player = _tmp1_;
	g_signal_connect_object ((GUPnPService*) self, "query-variable::LastChange", (GCallback) _rygel_rendering_control_query_last_change_cb_gupnp_service_query_variable, self, 0);
	g_signal_connect_object ((GUPnPService*) self, "action-invoked::ListPresets", (GCallback) _rygel_rendering_control_list_presets_cb_gupnp_service_action_invoked, self, 0);
	g_signal_connect_object ((GUPnPService*) self, "action-invoked::SelectPreset", (GCallback) _rygel_rendering_control_select_preset_cb_gupnp_service_action_invoked, self, 0);
	g_signal_connect_object ((GUPnPService*) self, "action-invoked::GetMute", (GCallback) _rygel_rendering_control_get_mute_cb_gupnp_service_action_invoked, self, 0);
	g_signal_connect_object ((GUPnPService*) self, "action-invoked::SetMute", (GCallback) _rygel_rendering_control_set_mute_cb_gupnp_service_action_invoked, self, 0);
	g_signal_connect_object ((GUPnPService*) self, "action-invoked::GetVolume", (GCallback) _rygel_rendering_control_get_volume_cb_gupnp_service_action_invoked, self, 0);
	g_signal_connect_object ((GUPnPService*) self, "action-invoked::SetVolume", (GCallback) _rygel_rendering_control_set_volume_cb_gupnp_service_action_invoked, self, 0);
	_tmp2_ = self->priv->player;
	g_signal_connect_object ((GObject*) _tmp2_, "notify::volume", (GCallback) _rygel_rendering_control_notify_volume_cb_g_object_notify, self, 0);
	_tmp3_ = self->priv->player;
	_tmp4_ = rygel_media_player_get_volume (_tmp3_);
	_tmp5_ = _tmp4_;
	self->priv->_mute = _tmp5_ == ((gdouble) 0);
	_tmp6_ = self->priv->player;
	_tmp7_ = rygel_media_player_get_volume (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = rygel_volume_to_percentage (_tmp8_);
	self->priv->_volume = _tmp9_;
}


static void rygel_rendering_control_query_last_change_cb (RygelRenderingControl* self, GUPnPService* service, const gchar* variable, GValue* value) {
	RygelChangeLog* log = NULL;
	RygelChangeLog* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	RygelChangeLog* _tmp4_ = NULL;
	RygelChangeLog* _tmp5_ = NULL;
	guint _tmp6_ = 0U;
	guint _tmp7_ = 0U;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	RygelChangeLog* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	RygelChangeLog* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	gchar* _tmp14_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (service != NULL);
	g_return_if_fail (variable != NULL);
	g_return_if_fail (value != NULL);
	_tmp0_ = rygel_change_log_new (NULL, RYGEL_RENDERING_CONTROL_LAST_CHANGE_NS);
	log = _tmp0_;
	_tmp2_ = rygel_rendering_control_get_mute (self);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		_tmp1_ = "1";
	} else {
		_tmp1_ = "0";
	}
	_tmp4_ = log;
	rygel_change_log_log_with_channel (_tmp4_, "Mute", _tmp1_, "Master");
	_tmp5_ = log;
	_tmp6_ = rygel_rendering_control_get_volume (self);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup_printf ("%u", _tmp7_);
	_tmp9_ = _tmp8_;
	rygel_change_log_log_with_channel (_tmp5_, "Volume", _tmp9_, "Master");
	_g_free0 (_tmp9_);
	_tmp10_ = log;
	_tmp11_ = self->priv->preset_name_list;
	rygel_change_log_log_with_channel (_tmp10_, "PresetNameList", _tmp11_, "Master");
	g_value_init (value, G_TYPE_STRING);
	_tmp12_ = log;
	_tmp13_ = rygel_change_log_finish (_tmp12_);
	_tmp14_ = _tmp13_;
	g_value_set_string (value, _tmp14_);
	_g_free0 (_tmp14_);
	_g_object_unref0 (log);
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static RygelMediaPlayer* rygel_rendering_control_get_player (RygelRenderingControl* self) {
	RygelMediaPlayer* result = NULL;
	RygelMediaRendererPlugin* plugin = NULL;
	GUPnPRootDevice* _tmp0_ = NULL;
	GUPnPRootDevice* _tmp1_ = NULL;
	GUPnPRootDevice* _tmp2_ = NULL;
	GUPnPResourceFactory* _tmp3_ = NULL;
	GUPnPResourceFactory* _tmp4_ = NULL;
	RygelMediaRendererPlugin* _tmp5_ = NULL;
	RygelMediaRendererPlugin* _tmp6_ = NULL;
	RygelMediaPlayer* _tmp7_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_object_get ((GUPnPService*) self, "root-device", &_tmp0_, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = _tmp1_;
	_tmp3_ = gupnp_device_info_get_resource_factory ((GUPnPDeviceInfo*) _tmp2_);
	_tmp4_ = _tmp3_;
	_tmp5_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, RYGEL_TYPE_MEDIA_RENDERER_PLUGIN) ? ((RygelMediaRendererPlugin*) _tmp4_) : NULL);
	_tmp6_ = _tmp5_;
	_g_object_unref0 (_tmp2_);
	plugin = _tmp6_;
	_tmp7_ = rygel_media_renderer_plugin_get_player (plugin);
	result = _tmp7_;
	_g_object_unref0 (plugin);
	return result;
}


static gboolean int64_try_parse (const gchar* str, gint64* _result_) {
	gint64 _vala_result = 0LL;
	gboolean result = FALSE;
	gchar* endptr = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gint64 _tmp2_ = 0LL;
	gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gint _tmp6_ = 0;
	gint _tmp7_ = 0;
	g_return_val_if_fail (str != NULL, FALSE);
	_tmp0_ = str;
	_tmp2_ = g_ascii_strtoll (_tmp0_, &_tmp1_, (guint) 0);
	endptr = _tmp1_;
	_vala_result = _tmp2_;
	_tmp3_ = endptr;
	_tmp4_ = str;
	_tmp5_ = str;
	_tmp6_ = strlen (_tmp5_);
	_tmp7_ = _tmp6_;
	if (_tmp3_ == (((gchar*) _tmp4_) + _tmp7_)) {
		result = TRUE;
		if (_result_) {
			*_result_ = _vala_result;
		}
		return result;
	} else {
		result = FALSE;
		if (_result_) {
			*_result_ = _vala_result;
		}
		return result;
	}
	if (_result_) {
		*_result_ = _vala_result;
	}
}


static gboolean rygel_rendering_control_check_instance_id (RygelRenderingControl* self, GUPnPServiceAction* action) {
	gboolean result = FALSE;
	gchar* instance_id_string = NULL;
	gint64 instance_id = 0LL;
	GUPnPServiceAction* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	const gchar* _tmp2_ = NULL;
	gint64 _tmp8_ = 0LL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (action != NULL, FALSE);
	instance_id = (gint64) (-1);
	_tmp0_ = action;
	gupnp_service_action_get (_tmp0_, "InstanceID", G_TYPE_STRING, &instance_id_string, NULL);
	_tmp2_ = instance_id_string;
	if (_tmp2_ == NULL) {
		_tmp1_ = TRUE;
	} else {
		const gchar* _tmp3_ = NULL;
		gint64 _tmp4_ = 0LL;
		gboolean _tmp5_ = FALSE;
		_tmp3_ = instance_id_string;
		_tmp5_ = int64_try_parse (_tmp3_, &_tmp4_);
		instance_id = _tmp4_;
		_tmp1_ = !_tmp5_;
	}
	if (_tmp1_) {
		GUPnPServiceAction* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		_tmp6_ = action;
		_tmp7_ = _ ("Invalid argument");
		gupnp_service_action_return_error (_tmp6_, (guint) 402, _tmp7_);
		result = FALSE;
		_g_free0 (instance_id_string);
		return result;
	}
	_tmp8_ = instance_id;
	if (_tmp8_ != ((gint64) 0)) {
		GUPnPServiceAction* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
		_tmp9_ = action;
		_tmp10_ = _ ("Invalid InstanceID");
		gupnp_service_action_return_error (_tmp9_, (guint) 702, _tmp10_);
		result = FALSE;
		_g_free0 (instance_id_string);
		return result;
	}
	result = TRUE;
	_g_free0 (instance_id_string);
	return result;
}


static void rygel_rendering_control_list_presets_cb (RygelRenderingControl* self, GUPnPService* service, GUPnPServiceAction* action) {
	GUPnPServiceAction* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	GUPnPServiceAction* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GUPnPServiceAction* _tmp4_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (service != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = action;
	_tmp1_ = rygel_rendering_control_check_instance_id (self, _tmp0_);
	if (!_tmp1_) {
		return;
	}
	_tmp2_ = action;
	_tmp3_ = self->priv->preset_name_list;
	gupnp_service_action_set (_tmp2_, "CurrentPresetNameList", G_TYPE_STRING, _tmp3_, NULL);
	_tmp4_ = action;
	gupnp_service_action_return (_tmp4_);
}


static void rygel_rendering_control_select_preset_cb (RygelRenderingControl* self, GUPnPService* service, GUPnPServiceAction* action) {
	GUPnPServiceAction* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gchar* preset_name = NULL;
	GUPnPServiceAction* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GUPnPServiceAction* _tmp6_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (service != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = action;
	_tmp1_ = rygel_rendering_control_check_instance_id (self, _tmp0_);
	if (!_tmp1_) {
		return;
	}
	_tmp2_ = action;
	gupnp_service_action_get (_tmp2_, "PresetName", G_TYPE_STRING, &preset_name, NULL);
	_tmp3_ = preset_name;
	if (g_strcmp0 (_tmp3_, "") != 0) {
		GUPnPServiceAction* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		_tmp4_ = action;
		_tmp5_ = _ ("Invalid Name");
		gupnp_service_action_return_error (_tmp4_, (guint) 701, _tmp5_);
		_g_free0 (preset_name);
		return;
	}
	_tmp6_ = action;
	gupnp_service_action_return (_tmp6_);
	_g_free0 (preset_name);
}


static gboolean rygel_rendering_control_check_channel (RygelRenderingControl* self, GUPnPServiceAction* action) {
	gboolean result = FALSE;
	gchar* channel = NULL;
	GUPnPServiceAction* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (action != NULL, FALSE);
	_tmp0_ = action;
	gupnp_service_action_get (_tmp0_, "Channel", G_TYPE_STRING, &channel, NULL);
	_tmp1_ = channel;
	if (g_strcmp0 (_tmp1_, "Master") != 0) {
		GUPnPServiceAction* _tmp2_ = NULL;
		const gchar* _tmp3_ = NULL;
		_tmp2_ = action;
		_tmp3_ = _ ("Invalid Channel");
		gupnp_service_action_return_error (_tmp2_, (guint) 703, _tmp3_);
		result = FALSE;
		_g_free0 (channel);
		return result;
	}
	result = TRUE;
	_g_free0 (channel);
	return result;
}


static void rygel_rendering_control_get_mute_cb (RygelRenderingControl* self, GUPnPService* service, GUPnPServiceAction* action) {
	GUPnPServiceAction* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	GUPnPServiceAction* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	GUPnPServiceAction* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	GUPnPServiceAction* _tmp7_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (service != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = action;
	_tmp1_ = rygel_rendering_control_check_instance_id (self, _tmp0_);
	if (!_tmp1_) {
		return;
	}
	_tmp2_ = action;
	_tmp3_ = rygel_rendering_control_check_channel (self, _tmp2_);
	if (!_tmp3_) {
		return;
	}
	_tmp4_ = action;
	_tmp5_ = rygel_rendering_control_get_mute (self);
	_tmp6_ = _tmp5_;
	gupnp_service_action_set (_tmp4_, "CurrentMute", G_TYPE_BOOLEAN, _tmp6_, NULL);
	_tmp7_ = action;
	gupnp_service_action_return (_tmp7_);
}


static void rygel_rendering_control_set_mute_cb (RygelRenderingControl* self, GUPnPService* service, GUPnPServiceAction* action) {
	GUPnPServiceAction* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	GUPnPServiceAction* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gchar* mute_str = NULL;
	GUPnPServiceAction* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	gboolean mute = FALSE;
	GUPnPServiceAction* _tmp9_ = NULL;
	gboolean _tmp10_ = FALSE;
	GUPnPServiceAction* _tmp11_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (service != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = action;
	_tmp1_ = rygel_rendering_control_check_instance_id (self, _tmp0_);
	if (!_tmp1_) {
		return;
	}
	_tmp2_ = action;
	_tmp3_ = rygel_rendering_control_check_channel (self, _tmp2_);
	if (!_tmp3_) {
		return;
	}
	_tmp4_ = action;
	gupnp_service_action_get (_tmp4_, "DesiredMute", G_TYPE_STRING, &mute_str, NULL);
	_tmp5_ = mute_str;
	_tmp6_ = g_str_has_prefix (_tmp5_, "-");
	if (_tmp6_) {
		GUPnPServiceAction* _tmp7_ = NULL;
		const gchar* _tmp8_ = NULL;
		_tmp7_ = action;
		_tmp8_ = _ ("Action Failed");
		gupnp_service_action_return_error (_tmp7_, (guint) 501, _tmp8_);
		_g_free0 (mute_str);
		return;
	}
	_tmp9_ = action;
	gupnp_service_action_get (_tmp9_, "DesiredMute", G_TYPE_BOOLEAN, &mute, NULL);
	_tmp10_ = mute;
	rygel_rendering_control_set_mute (self, _tmp10_);
	_tmp11_ = action;
	gupnp_service_action_return (_tmp11_);
	_g_free0 (mute_str);
}


static void rygel_rendering_control_get_volume_cb (RygelRenderingControl* self, GUPnPService* service, GUPnPServiceAction* action) {
	GUPnPServiceAction* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	GUPnPServiceAction* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	GUPnPServiceAction* _tmp4_ = NULL;
	guint _tmp5_ = 0U;
	guint _tmp6_ = 0U;
	GUPnPServiceAction* _tmp7_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (service != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = action;
	_tmp1_ = rygel_rendering_control_check_instance_id (self, _tmp0_);
	if (!_tmp1_) {
		return;
	}
	_tmp2_ = action;
	_tmp3_ = rygel_rendering_control_check_channel (self, _tmp2_);
	if (!_tmp3_) {
		return;
	}
	_tmp4_ = action;
	_tmp5_ = rygel_rendering_control_get_volume (self);
	_tmp6_ = _tmp5_;
	gupnp_service_action_set (_tmp4_, "CurrentVolume", G_TYPE_UINT, _tmp6_, NULL);
	_tmp7_ = action;
	gupnp_service_action_return (_tmp7_);
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = needle;
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
	result = _tmp1_ != NULL;
	return result;
}


static void rygel_rendering_control_set_volume_cb (RygelRenderingControl* self, GUPnPService* service, GUPnPServiceAction* action) {
	GUPnPServiceAction* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	GUPnPServiceAction* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	gchar* volume_str = NULL;
	GUPnPServiceAction* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
	const gchar* _tmp6_ = NULL;
	gboolean _tmp7_ = FALSE;
	guint volume = 0U;
	GUPnPServiceAction* _tmp12_ = NULL;
	guint _tmp13_ = 0U;
	guint _tmp16_ = 0U;
	GUPnPServiceAction* _tmp17_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (service != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = action;
	_tmp1_ = rygel_rendering_control_check_instance_id (self, _tmp0_);
	if (!_tmp1_) {
		return;
	}
	_tmp2_ = action;
	_tmp3_ = rygel_rendering_control_check_channel (self, _tmp2_);
	if (!_tmp3_) {
		return;
	}
	_tmp4_ = action;
	gupnp_service_action_get (_tmp4_, "DesiredVolume", G_TYPE_STRING, &volume_str, NULL);
	_tmp6_ = volume_str;
	_tmp7_ = string_contains (_tmp6_, ".");
	if (_tmp7_) {
		_tmp5_ = TRUE;
	} else {
		const gchar* _tmp8_ = NULL;
		gboolean _tmp9_ = FALSE;
		_tmp8_ = volume_str;
		_tmp9_ = string_contains (_tmp8_, ",");
		_tmp5_ = _tmp9_;
	}
	if (_tmp5_) {
		GUPnPServiceAction* _tmp10_ = NULL;
		const gchar* _tmp11_ = NULL;
		_tmp10_ = action;
		_tmp11_ = _ ("Action Failed");
		gupnp_service_action_return_error (_tmp10_, (guint) 501, _tmp11_);
		_g_free0 (volume_str);
		return;
	}
	_tmp12_ = action;
	gupnp_service_action_get (_tmp12_, "DesiredVolume", G_TYPE_UINT, &volume, NULL);
	_tmp13_ = volume;
	if (_tmp13_ > ((guint) 100)) {
		GUPnPServiceAction* _tmp14_ = NULL;
		const gchar* _tmp15_ = NULL;
		_tmp14_ = action;
		_tmp15_ = _ ("Action Failed");
		gupnp_service_action_return_error (_tmp14_, (guint) 501, _tmp15_);
		_g_free0 (volume_str);
		return;
	}
	_tmp16_ = volume;
	rygel_rendering_control_set_volume (self, _tmp16_);
	_tmp17_ = action;
	gupnp_service_action_return (_tmp17_);
	_g_free0 (volume_str);
}


static void rygel_rendering_control_notify_volume_cb (RygelRenderingControl* self, GObject* player, GParamSpec* p) {
	RygelMediaPlayer* _tmp0_ = NULL;
	gdouble _tmp1_ = 0.0;
	gdouble _tmp2_ = 0.0;
	guint _tmp3_ = 0U;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	RygelChangeLog* _tmp10_ = NULL;
	guint _tmp11_ = 0U;
	guint _tmp12_ = 0U;
	gchar* _tmp13_ = NULL;
	gchar* _tmp14_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (player != NULL);
	g_return_if_fail (p != NULL);
	_tmp0_ = self->priv->player;
	_tmp1_ = rygel_media_player_get_volume (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = rygel_volume_to_percentage (_tmp2_);
	self->priv->_volume = _tmp3_;
	_tmp5_ = self->priv->_mute;
	if (_tmp5_) {
		RygelMediaPlayer* _tmp6_ = NULL;
		gdouble _tmp7_ = 0.0;
		gdouble _tmp8_ = 0.0;
		_tmp6_ = self->priv->player;
		_tmp7_ = rygel_media_player_get_volume (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp4_ = _tmp8_ > ((gdouble) 0);
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		RygelChangeLog* _tmp9_ = NULL;
		self->priv->_mute = FALSE;
		_tmp9_ = self->priv->changelog;
		rygel_change_log_log_with_channel (_tmp9_, "Mute", "0", "Master");
	}
	_tmp10_ = self->priv->changelog;
	_tmp11_ = rygel_rendering_control_get_volume (self);
	_tmp12_ = _tmp11_;
	_tmp13_ = g_strdup_printf ("%u", _tmp12_);
	_tmp14_ = _tmp13_;
	rygel_change_log_log_with_channel (_tmp10_, "Volume", _tmp14_, "Master");
	_g_free0 (_tmp14_);
}


RygelRenderingControl* rygel_rendering_control_construct (GType object_type) {
	RygelRenderingControl * self = NULL;
	self = (RygelRenderingControl*) g_object_new (object_type, NULL);
	return self;
}


RygelRenderingControl* rygel_rendering_control_new (void) {
	return rygel_rendering_control_construct (RYGEL_TYPE_RENDERING_CONTROL);
}


gboolean rygel_rendering_control_get_mute (RygelRenderingControl* self) {
	gboolean result;
	gboolean _tmp0_ = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_mute;
	result = _tmp0_;
	return result;
}


void rygel_rendering_control_set_mute (RygelRenderingControl* self, gboolean value) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	const gchar* _tmp7_ = NULL;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	RygelChangeLog* _tmp10_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_mute = _tmp0_;
	_tmp1_ = self->priv->_mute;
	if (_tmp1_) {
		RygelMediaPlayer* _tmp2_ = NULL;
		_tmp2_ = self->priv->player;
		rygel_media_player_set_volume (_tmp2_, (gdouble) 0);
	} else {
		RygelMediaPlayer* _tmp3_ = NULL;
		guint _tmp4_ = 0U;
		guint _tmp5_ = 0U;
		gdouble _tmp6_ = 0.0;
		_tmp3_ = self->priv->player;
		_tmp4_ = rygel_rendering_control_get_volume (self);
		_tmp5_ = _tmp4_;
		_tmp6_ = rygel_volume_from_percentage (_tmp5_);
		rygel_media_player_set_volume (_tmp3_, _tmp6_);
	}
	_tmp8_ = rygel_rendering_control_get_mute (self);
	_tmp9_ = _tmp8_;
	if (_tmp9_) {
		_tmp7_ = "1";
	} else {
		_tmp7_ = "0";
	}
	_tmp10_ = self->priv->changelog;
	rygel_change_log_log_with_channel (_tmp10_, "Mute", _tmp7_, "Master");
	g_object_notify ((GObject *) self, "mute");
}


guint rygel_rendering_control_get_volume (RygelRenderingControl* self) {
	guint result;
	guint _tmp0_ = 0U;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = self->priv->_volume;
	result = _tmp0_;
	return result;
}


void rygel_rendering_control_set_volume (RygelRenderingControl* self, guint value) {
	guint _tmp0_ = 0U;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	RygelChangeLog* _tmp7_ = NULL;
	guint _tmp8_ = 0U;
	guint _tmp9_ = 0U;
	gchar* _tmp10_ = NULL;
	gchar* _tmp11_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_volume = _tmp0_;
	_tmp1_ = rygel_rendering_control_get_mute (self);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		RygelMediaPlayer* _tmp3_ = NULL;
		guint _tmp4_ = 0U;
		guint _tmp5_ = 0U;
		gdouble _tmp6_ = 0.0;
		_tmp3_ = self->priv->player;
		_tmp4_ = rygel_rendering_control_get_volume (self);
		_tmp5_ = _tmp4_;
		_tmp6_ = rygel_volume_from_percentage (_tmp5_);
		rygel_media_player_set_volume (_tmp3_, _tmp6_);
	}
	_tmp7_ = self->priv->changelog;
	_tmp8_ = rygel_rendering_control_get_volume (self);
	_tmp9_ = _tmp8_;
	_tmp10_ = g_strdup_printf ("%u", _tmp9_);
	_tmp11_ = _tmp10_;
	rygel_change_log_log_with_channel (_tmp7_, "Volume", _tmp11_, "Master");
	_g_free0 (_tmp11_);
	g_object_notify ((GObject *) self, "volume");
}


static void rygel_rendering_control_class_init (RygelRenderingControlClass * klass) {
	rygel_rendering_control_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (RygelRenderingControlPrivate));
	((GObjectClass *) klass)->constructed = rygel_rendering_control_real_constructed;
	G_OBJECT_CLASS (klass)->get_property = _vala_rygel_rendering_control_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_rygel_rendering_control_set_property;
	G_OBJECT_CLASS (klass)->finalize = rygel_rendering_control_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_RENDERING_CONTROL_MUTE, g_param_spec_boolean ("mute", "mute", "mute", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_RENDERING_CONTROL_VOLUME, g_param_spec_uint ("volume", "volume", "volume", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void rygel_rendering_control_instance_init (RygelRenderingControl * self) {
	gchar* _tmp0_ = NULL;
	self->priv = RYGEL_RENDERING_CONTROL_GET_PRIVATE (self);
	self->priv->_mute = FALSE;
	self->priv->_volume = (guint) 0;
	_tmp0_ = g_strdup ("FactoryDefaults");
	self->priv->preset_name_list = _tmp0_;
}


static void rygel_rendering_control_finalize (GObject* obj) {
	RygelRenderingControl * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_RENDERING_CONTROL, RygelRenderingControl);
	_g_free0 (self->priv->preset_name_list);
	_g_object_unref0 (self->priv->changelog);
	_g_object_unref0 (self->priv->player);
	G_OBJECT_CLASS (rygel_rendering_control_parent_class)->finalize (obj);
}


GType rygel_rendering_control_get_type (void) {
	static volatile gsize rygel_rendering_control_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_rendering_control_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelRenderingControlClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_rendering_control_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelRenderingControl), 0, (GInstanceInitFunc) rygel_rendering_control_instance_init, NULL };
		GType rygel_rendering_control_type_id;
		rygel_rendering_control_type_id = g_type_register_static (gupnp_service_get_type (), "RygelRenderingControl", &g_define_type_info, 0);
		g_once_init_leave (&rygel_rendering_control_type_id__volatile, rygel_rendering_control_type_id);
	}
	return rygel_rendering_control_type_id__volatile;
}


static void _vala_rygel_rendering_control_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	RygelRenderingControl * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_TYPE_RENDERING_CONTROL, RygelRenderingControl);
	switch (property_id) {
		case RYGEL_RENDERING_CONTROL_MUTE:
		g_value_set_boolean (value, rygel_rendering_control_get_mute (self));
		break;
		case RYGEL_RENDERING_CONTROL_VOLUME:
		g_value_set_uint (value, rygel_rendering_control_get_volume (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_rygel_rendering_control_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	RygelRenderingControl * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_TYPE_RENDERING_CONTROL, RygelRenderingControl);
	switch (property_id) {
		case RYGEL_RENDERING_CONTROL_MUTE:
		rygel_rendering_control_set_mute (self, g_value_get_boolean (value));
		break;
		case RYGEL_RENDERING_CONTROL_VOLUME:
		rygel_rendering_control_set_volume (self, g_value_get_uint (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



