/* rygel-http-response.c generated by valac 0.15.1.36-84b2b, the Vala compiler
 * generated from rygel-http-response.vala, do not modify */

/*
 * Copyright (C) 2008 Nokia Corporation.
 *
 * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
 *                               <zeeshan.ali@nokia.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 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 <gio/gio.h>
#include <libsoup/soup.h>
#include <gst/gst.h>
#include <stdlib.h>
#include <string.h>
#include <gst/base/gstbasesink.h>
#include <glib/gi18n-lib.h>


#define RYGEL_TYPE_STATE_MACHINE (rygel_state_machine_get_type ())
#define RYGEL_STATE_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_STATE_MACHINE, RygelStateMachine))
#define RYGEL_IS_STATE_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_STATE_MACHINE))
#define RYGEL_STATE_MACHINE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), RYGEL_TYPE_STATE_MACHINE, RygelStateMachineIface))

typedef struct _RygelStateMachine RygelStateMachine;
typedef struct _RygelStateMachineIface RygelStateMachineIface;

#define RYGEL_TYPE_HTTP_RESPONSE (rygel_http_response_get_type ())
#define RYGEL_HTTP_RESPONSE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_RESPONSE, RygelHTTPResponse))
#define RYGEL_HTTP_RESPONSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_RESPONSE, RygelHTTPResponseClass))
#define RYGEL_IS_HTTP_RESPONSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_RESPONSE))
#define RYGEL_IS_HTTP_RESPONSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_RESPONSE))
#define RYGEL_HTTP_RESPONSE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_RESPONSE, RygelHTTPResponseClass))

typedef struct _RygelHTTPResponse RygelHTTPResponse;
typedef struct _RygelHTTPResponseClass RygelHTTPResponseClass;
typedef struct _RygelHTTPResponsePrivate RygelHTTPResponsePrivate;

#define RYGEL_TYPE_HTTP_SEEK (rygel_http_seek_get_type ())
#define RYGEL_HTTP_SEEK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_SEEK, RygelHTTPSeek))
#define RYGEL_HTTP_SEEK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_SEEK, RygelHTTPSeekClass))
#define RYGEL_IS_HTTP_SEEK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_SEEK))
#define RYGEL_IS_HTTP_SEEK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_SEEK))
#define RYGEL_HTTP_SEEK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_SEEK, RygelHTTPSeekClass))

typedef struct _RygelHTTPSeek RygelHTTPSeek;
typedef struct _RygelHTTPSeekClass RygelHTTPSeekClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _gst_object_unref0(var) ((var == NULL) ? NULL : (var = (gst_object_unref (var), NULL)))

#define RYGEL_TYPE_HTTP_GET (rygel_http_get_get_type ())
#define RYGEL_HTTP_GET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_GET, RygelHTTPGet))
#define RYGEL_HTTP_GET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_GET, RygelHTTPGetClass))
#define RYGEL_IS_HTTP_GET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_GET))
#define RYGEL_IS_HTTP_GET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_GET))
#define RYGEL_HTTP_GET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_GET, RygelHTTPGetClass))

typedef struct _RygelHTTPGet RygelHTTPGet;
typedef struct _RygelHTTPGetClass RygelHTTPGetClass;

#define RYGEL_TYPE_HTTP_GET_HANDLER (rygel_http_get_handler_get_type ())
#define RYGEL_HTTP_GET_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_GET_HANDLER, RygelHTTPGetHandler))
#define RYGEL_HTTP_GET_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_GET_HANDLER, RygelHTTPGetHandlerClass))
#define RYGEL_IS_HTTP_GET_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_GET_HANDLER))
#define RYGEL_IS_HTTP_GET_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_GET_HANDLER))
#define RYGEL_HTTP_GET_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_GET_HANDLER, RygelHTTPGetHandlerClass))

typedef struct _RygelHTTPGetHandler RygelHTTPGetHandler;
typedef struct _RygelHTTPGetHandlerClass RygelHTTPGetHandlerClass;
typedef struct _RygelHTTPGetPrivate RygelHTTPGetPrivate;

#define RYGEL_TYPE_MEDIA_ITEM (rygel_media_item_get_type ())
#define RYGEL_MEDIA_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_MEDIA_ITEM, RygelMediaItem))
#define RYGEL_MEDIA_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_MEDIA_ITEM, RygelMediaItemClass))
#define RYGEL_IS_MEDIA_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_MEDIA_ITEM))
#define RYGEL_IS_MEDIA_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_MEDIA_ITEM))
#define RYGEL_MEDIA_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_MEDIA_ITEM, RygelMediaItemClass))

typedef struct _RygelMediaItem RygelMediaItem;
typedef struct _RygelMediaItemClass RygelMediaItemClass;
typedef struct _RygelHTTPGetHandlerPrivate RygelHTTPGetHandlerPrivate;
typedef struct _RygelHttpResponseRunData RygelHttpResponseRunData;

#define RYGEL_TYPE_HTTP_GST_SINK (rygel_http_gst_sink_get_type ())
#define RYGEL_HTTP_GST_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_GST_SINK, RygelHTTPGstSink))
#define RYGEL_HTTP_GST_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_GST_SINK, RygelHTTPGstSinkClass))
#define RYGEL_IS_HTTP_GST_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_GST_SINK))
#define RYGEL_IS_HTTP_GST_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_GST_SINK))
#define RYGEL_HTTP_GST_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_GST_SINK, RygelHTTPGstSinkClass))

typedef struct _RygelHTTPGstSink RygelHTTPGstSink;
typedef struct _RygelHTTPGstSinkClass RygelHTTPGstSinkClass;
typedef struct _RygelHTTPGstSinkPrivate RygelHTTPGstSinkPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _gst_caps_unref0(var) ((var == NULL) ? NULL : (var = (gst_caps_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define RYGEL_TYPE_HTTP_TIME_SEEK (rygel_http_time_seek_get_type ())
#define RYGEL_HTTP_TIME_SEEK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_TIME_SEEK, RygelHTTPTimeSeek))
#define RYGEL_HTTP_TIME_SEEK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_TIME_SEEK, RygelHTTPTimeSeekClass))
#define RYGEL_IS_HTTP_TIME_SEEK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_TIME_SEEK))
#define RYGEL_IS_HTTP_TIME_SEEK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_TIME_SEEK))
#define RYGEL_HTTP_TIME_SEEK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_TIME_SEEK, RygelHTTPTimeSeekClass))

typedef struct _RygelHTTPTimeSeek RygelHTTPTimeSeek;
typedef struct _RygelHTTPTimeSeekClass RygelHTTPTimeSeekClass;

struct _RygelStateMachineIface {
	GTypeInterface parent_iface;
	void (*run) (RygelStateMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*run_finish) (RygelStateMachine* self, GAsyncResult* _res_);
	GCancellable* (*get_cancellable) (RygelStateMachine* self);
	void (*set_cancellable) (RygelStateMachine* self, GCancellable* value);
};

struct _RygelHTTPResponse {
	GObject parent_instance;
	RygelHTTPResponsePrivate * priv;
	SoupMessage* msg;
	RygelHTTPSeek* seek;
};

struct _RygelHTTPResponseClass {
	GObjectClass parent_class;
	void (*end) (RygelHTTPResponse* self, gboolean aborted, guint status);
};

struct _RygelHTTPResponsePrivate {
	SoupServer* _server;
	GCancellable* _cancellable;
	GSourceFunc run_continue;
	gpointer run_continue_target;
	GDestroyNotify run_continue_target_destroy_notify;
	gint _priority;
	GstPipeline* pipeline;
	guint bus_watch_id;
	gboolean unref_soup_server;
};

struct _RygelHTTPGet {
	GObject parent_instance;
	RygelHTTPGetPrivate * priv;
	SoupServer* server;
	SoupMessage* msg;
	GCancellable* cancellable;
	RygelMediaItem* item;
	RygelHTTPSeek* seek;
};

struct _RygelHTTPGetClass {
	GObjectClass parent_class;
};

struct _RygelHTTPGetHandler {
	GObject parent_instance;
	RygelHTTPGetHandlerPrivate * priv;
	GCancellable* cancellable;
};

struct _RygelHTTPGetHandlerClass {
	GObjectClass parent_class;
};

struct _RygelHttpResponseRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelHTTPResponse* self;
	gboolean _tmp0_;
	RygelHTTPSeek* _tmp1_;
	RygelHTTPSeek* _tmp2_;
	gint64 _tmp3_;
	gint64 _tmp4_;
	gboolean _tmp5_;
	GstPipeline* _tmp6_;
	GstPipeline* _tmp7_;
};

struct _RygelHTTPGstSink {
	GstBaseSink parent_instance;
	RygelHTTPGstSinkPrivate * priv;
	GCancellable* cancellable;
};

struct _RygelHTTPGstSinkClass {
	GstBaseSinkClass parent_class;
};

typedef enum  {
	RYGEL_GST_ERROR_MISSING_PLUGIN,
	RYGEL_GST_ERROR_LINK
} RygelGstError;
#define RYGEL_GST_ERROR rygel_gst_error_quark ()

static gpointer rygel_http_response_parent_class = NULL;
static RygelStateMachineIface* rygel_http_response_rygel_state_machine_parent_iface = NULL;

GType rygel_state_machine_get_type (void) G_GNUC_CONST;
GType rygel_http_response_get_type (void) G_GNUC_CONST;
GType rygel_http_seek_get_type (void) G_GNUC_CONST;
#define RYGEL_HTTP_RESPONSE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RYGEL_TYPE_HTTP_RESPONSE, RygelHTTPResponsePrivate))
enum  {
	RYGEL_HTTP_RESPONSE_DUMMY_PROPERTY,
	RYGEL_HTTP_RESPONSE_SERVER,
	RYGEL_HTTP_RESPONSE_CANCELLABLE,
	RYGEL_HTTP_RESPONSE_PRIORITY
};
SoupServer* rygel_http_response_get_server (RygelHTTPResponse* self);
static void rygel_http_response_on_server_weak_ref (RygelHTTPResponse* self, GObject* object);
static void _rygel_http_response_on_server_weak_ref_gweak_notify (gpointer self, GObject* object);
GType rygel_http_get_get_type (void) G_GNUC_CONST;
GType rygel_http_get_handler_get_type (void) G_GNUC_CONST;
RygelHTTPResponse* rygel_http_response_new (RygelHTTPGet* request, RygelHTTPGetHandler* request_handler, GstElement* src, GError** error);
RygelHTTPResponse* rygel_http_response_construct (GType object_type, RygelHTTPGet* request, RygelHTTPGetHandler* request_handler, GstElement* src, GError** error);
gpointer rygel_media_item_ref (gpointer instance);
void rygel_media_item_unref (gpointer instance);
GParamSpec* rygel_param_spec_media_item (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void rygel_value_set_media_item (GValue* value, gpointer v_object);
void rygel_value_take_media_item (GValue* value, gpointer v_object);
gpointer rygel_value_get_media_item (const GValue* value);
GType rygel_media_item_get_type (void) G_GNUC_CONST;
static void rygel_http_response_set_server (RygelHTTPResponse* self, SoupServer* value);
void rygel_state_machine_set_cancellable (RygelStateMachine* self, GCancellable* value);
GCancellable* rygel_state_machine_get_cancellable (RygelStateMachine* self);
static void rygel_http_response_on_cancelled (RygelHTTPResponse* self, GCancellable* cancellable);
static void _rygel_http_response_on_cancelled_g_cancellable_cancelled (GCancellable* _sender, gpointer self);
static void rygel_http_response_prepare_pipeline (RygelHTTPResponse* self, const gchar* name, GstElement* src, GError** error);
static void rygel_http_response_real_run_data_free (gpointer _data);
static void rygel_http_response_real_run (RygelStateMachine* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean rygel_http_response_real_run_co (RygelHttpResponseRunData* _data_);
gint64 rygel_http_seek_get_start (RygelHTTPSeek* self);
void rygel_state_machine_run (RygelStateMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void rygel_state_machine_run_finish (RygelStateMachine* self, GAsyncResult* _res_);
static gboolean _rygel_http_response_real_run_co_gsource_func (gpointer self);
void rygel_http_response_push_data (RygelHTTPResponse* self, guint8* data, int data_length1);
void rygel_http_response_end (RygelHTTPResponse* self, gboolean aborted, guint status);
static void rygel_http_response_real_end (RygelHTTPResponse* self, gboolean aborted, guint status);
#define RYGEL_HTTP_GST_SINK_NAME "http-gst-sink"
GType rygel_http_gst_sink_get_type (void) G_GNUC_CONST;
RygelHTTPGstSink* rygel_http_gst_sink_new (RygelHTTPResponse* response);
RygelHTTPGstSink* rygel_http_gst_sink_construct (GType object_type, RygelHTTPResponse* response);
static void rygel_http_response_src_pad_added (RygelHTTPResponse* self, GstElement* src, GstPad* src_pad);
static void _rygel_http_response_src_pad_added_gst_element_pad_added (GstElement* _sender, GstPad* pad, gpointer self);
GQuark rygel_gst_error_quark (void);
static gboolean rygel_http_response_bus_handler (RygelHTTPResponse* self, GstBus* bus, GstMessage* message);
static gboolean _rygel_http_response_bus_handler_gst_bus_func (GstBus* bus, GstMessage* message, gpointer self);
GstElement* rygel_gst_utils_get_rtp_depayloader (GstCaps* caps);
static gboolean rygel_http_response_perform_seek (RygelHTTPResponse* self);
gint rygel_http_response_get_priority (RygelHTTPResponse* self);
static gboolean ___lambda5_ (RygelHTTPResponse* self);
static gboolean ____lambda5__gsource_func (gpointer self);
GType rygel_http_time_seek_get_type (void) G_GNUC_CONST;
gint64 rygel_http_seek_get_stop (RygelHTTPSeek* self);
static void rygel_http_response_finalize (GObject* obj);
static void _vala_rygel_http_response_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_rygel_http_response_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


static void _rygel_http_response_on_server_weak_ref_gweak_notify (gpointer self, GObject* object) {
#line 85 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_on_server_weak_ref (self, object);
#line 282 "rygel-http-response.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 68 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return self ? g_object_ref (self) : NULL;
#line 289 "rygel-http-response.c"
}


static void _rygel_http_response_on_cancelled_g_cancellable_cancelled (GCancellable* _sender, gpointer self) {
#line 73 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_on_cancelled (self, _sender);
#line 296 "rygel-http-response.c"
}


RygelHTTPResponse* rygel_http_response_construct (GType object_type, RygelHTTPGet* request, RygelHTTPGetHandler* request_handler, GstElement* src, GError** error) {
	RygelHTTPResponse * self = NULL;
	RygelHTTPGet* _tmp0_;
	SoupServer* _tmp1_;
	RygelHTTPGet* _tmp2_;
	SoupMessage* _tmp3_;
	SoupMessage* _tmp4_;
	RygelHTTPGetHandler* _tmp5_;
	GCancellable* _tmp6_;
	RygelHTTPGet* _tmp7_;
	RygelHTTPSeek* _tmp8_;
	RygelHTTPSeek* _tmp9_;
	GCancellable* _tmp10_;
	GCancellable* _tmp11_;
	SoupMessage* _tmp14_;
	SoupMessageBody* _tmp15_;
	GstElement* _tmp16_;
	SoupServer* _tmp17_;
	GError * _inner_error_ = NULL;
#line 64 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (request != NULL, NULL);
#line 64 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (request_handler != NULL, NULL);
#line 64 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (src != NULL, NULL);
#line 64 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self = (RygelHTTPResponse*) g_object_new (object_type, NULL);
#line 67 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = request;
#line 67 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = _tmp0_->server;
#line 67 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_set_server (self, _tmp1_);
#line 68 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = request;
#line 68 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp3_ = _tmp2_->msg;
#line 68 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 68 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_object_unref0 (self->msg);
#line 68 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->msg = _tmp4_;
#line 69 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp5_ = request_handler;
#line 69 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp6_ = _tmp5_->cancellable;
#line 69 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_state_machine_set_cancellable ((RygelStateMachine*) self, _tmp6_);
#line 70 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp7_ = request;
#line 70 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp8_ = _tmp7_->seek;
#line 70 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp9_ = _g_object_ref0 (_tmp8_);
#line 70 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_object_unref0 (self->seek);
#line 70 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->seek = _tmp9_;
#line 72 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp10_ = rygel_state_machine_get_cancellable ((RygelStateMachine*) self);
#line 72 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp11_ = _tmp10_;
#line 72 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp11_ != NULL) {
#line 365 "rygel-http-response.c"
		GCancellable* _tmp12_;
		GCancellable* _tmp13_;
#line 73 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp12_ = rygel_state_machine_get_cancellable ((RygelStateMachine*) self);
#line 73 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp13_ = _tmp12_;
#line 73 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_signal_connect_object (_tmp13_, "cancelled", (GCallback) _rygel_http_response_on_cancelled_g_cancellable_cancelled, self, 0);
#line 374 "rygel-http-response.c"
	}
#line 76 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp14_ = self->msg;
#line 76 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp15_ = _tmp14_->response_body;
#line 76 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	soup_message_body_set_accumulate (_tmp15_, FALSE);
#line 78 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp16_ = src;
#line 78 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_prepare_pipeline (self, "RygelHTTPGstResponse", _tmp16_, &_inner_error_);
#line 78 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_inner_error_ != NULL) {
#line 78 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_propagate_error (error, _inner_error_);
#line 78 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_g_object_unref0 (self);
#line 78 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		return NULL;
#line 394 "rygel-http-response.c"
	}
#line 79 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp17_ = self->priv->_server;
#line 79 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_weak_ref ((GObject*) _tmp17_, _rygel_http_response_on_server_weak_ref_gweak_notify, self);
#line 80 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->unref_soup_server = TRUE;
#line 64 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return self;
#line 404 "rygel-http-response.c"
}


RygelHTTPResponse* rygel_http_response_new (RygelHTTPGet* request, RygelHTTPGetHandler* request_handler, GstElement* src, GError** error) {
#line 64 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return rygel_http_response_construct (RYGEL_TYPE_HTTP_RESPONSE, request, request_handler, src, error);
#line 411 "rygel-http-response.c"
}


static void rygel_http_response_real_run_data_free (gpointer _data) {
	RygelHttpResponseRunData* _data_;
	_data_ = _data;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_object_unref0 (_data_->self);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_slice_free (RygelHttpResponseRunData, _data_);
#line 422 "rygel-http-response.c"
}


static void rygel_http_response_real_run (RygelStateMachine* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelHTTPResponse * self;
	RygelHttpResponseRunData* _data_;
	RygelHTTPResponse* _tmp0_;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self = (RygelHTTPResponse*) base;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_ = g_slice_new0 (RygelHttpResponseRunData);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_http_response_real_run);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_http_response_real_run_data_free);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->self = _tmp0_;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_real_run_co (_data_);
#line 444 "rygel-http-response.c"
}


static void rygel_http_response_real_run_finish (RygelStateMachine* base, GAsyncResult* _res_) {
	RygelHttpResponseRunData* _data_;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 452 "rygel-http-response.c"
}


static gboolean _rygel_http_response_real_run_co_gsource_func (gpointer self) {
	gboolean result;
	result = rygel_http_response_real_run_co (self);
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 461 "rygel-http-response.c"
}


static gboolean rygel_http_response_real_run_co (RygelHttpResponseRunData* _data_) {
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	switch (_data_->_state_) {
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		case 0:
#line 470 "rygel-http-response.c"
		goto _state_0;
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		case 1:
#line 474 "rygel-http-response.c"
		goto _state_1;
		default:
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_assert_not_reached ();
#line 479 "rygel-http-response.c"
	}
	_state_0:
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->_tmp1_ = _data_->self->seek;
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_data_->_tmp1_ != NULL) {
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_data_->_tmp2_ = _data_->self->seek;
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_data_->_tmp3_ = rygel_http_seek_get_start (_data_->_tmp2_);
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_data_->_tmp4_ = _data_->_tmp3_;
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_data_->_tmp0_ = _data_->_tmp4_ > ((gint64) 0);
#line 494 "rygel-http-response.c"
	} else {
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_data_->_tmp0_ = FALSE;
#line 498 "rygel-http-response.c"
	}
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->_tmp5_ = _data_->_tmp0_;
#line 91 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_data_->_tmp5_) {
#line 92 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_data_->_tmp6_ = _data_->self->priv->pipeline;
#line 92 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		gst_element_set_state ((GstElement*) _data_->_tmp6_, GST_STATE_PAUSED);
#line 508 "rygel-http-response.c"
	} else {
#line 94 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_data_->_tmp7_ = _data_->self->priv->pipeline;
#line 94 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		gst_element_set_state ((GstElement*) _data_->_tmp7_, GST_STATE_PLAYING);
#line 514 "rygel-http-response.c"
	}
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	(_data_->self->priv->run_continue_target_destroy_notify == NULL) ? NULL : (_data_->self->priv->run_continue_target_destroy_notify (_data_->self->priv->run_continue_target), NULL);
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->self->priv->run_continue = NULL;
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->self->priv->run_continue_target = NULL;
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->self->priv->run_continue_target_destroy_notify = NULL;
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->self->priv->run_continue = _rygel_http_response_real_run_co_gsource_func;
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->self->priv->run_continue_target = _data_;
#line 97 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->self->priv->run_continue_target_destroy_notify = NULL;
#line 99 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_data_->_state_ = 1;
#line 99 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return FALSE;
#line 534 "rygel-http-response.c"
	_state_1:
	;
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_data_->_state_ == 0) {
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 541 "rygel-http-response.c"
	} else {
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 545 "rygel-http-response.c"
	}
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_unref (_data_->_async_result);
#line 89 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return FALSE;
#line 551 "rygel-http-response.c"
}


void rygel_http_response_push_data (RygelHTTPResponse* self, guint8* data, int data_length1) {
	SoupMessage* _tmp0_;
	SoupMessageBody* _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	SoupServer* _tmp3_;
	SoupMessage* _tmp4_;
#line 102 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (self != NULL);
#line 103 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = self->msg;
#line 103 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = _tmp0_->response_body;
#line 103 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = data;
#line 103 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2__length1 = data_length1;
#line 103 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	soup_message_body_append (_tmp1_, SOUP_MEMORY_COPY, _tmp2_, (gsize) _tmp2__length1);
#line 105 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp3_ = self->priv->_server;
#line 105 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp4_ = self->msg;
#line 105 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	soup_server_unpause_message (_tmp3_, _tmp4_);
#line 580 "rygel-http-response.c"
}


static void rygel_http_response_real_end (RygelHTTPResponse* self, gboolean aborted, guint status) {
	GstPipeline* _tmp0_;
	GstElement* _tmp1_ = NULL;
	RygelHTTPGstSink* sink;
	RygelHTTPGstSink* _tmp2_;
	GCancellable* _tmp3_;
	GstPipeline* _tmp4_;
	guint _tmp5_;
	SoupMessage* _tmp6_;
	SoupMessageHeaders* _tmp7_;
	SoupEncoding _tmp8_ = 0;
	SoupEncoding encoding;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_;
	gboolean _tmp12_;
	GSourceFunc _tmp17_;
	void* _tmp17__target;
	guint _tmp19_;
#line 109 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = self->priv->pipeline;
#line 109 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = gst_bin_get_by_name ((GstBin*) _tmp0_, RYGEL_HTTP_GST_SINK_NAME);
#line 109 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	sink = RYGEL_IS_HTTP_GST_SINK (_tmp1_) ? ((RygelHTTPGstSink*) _tmp1_) : NULL;
#line 110 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = sink;
#line 110 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp3_ = _tmp2_->cancellable;
#line 110 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_cancellable_cancel (_tmp3_);
#line 112 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp4_ = self->priv->pipeline;
#line 112 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	gst_element_set_state ((GstElement*) _tmp4_, GST_STATE_NULL);
#line 113 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp5_ = self->priv->bus_watch_id;
#line 113 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_source_remove (_tmp5_);
#line 115 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp6_ = self->msg;
#line 115 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp7_ = _tmp6_->response_headers;
#line 115 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp8_ = soup_message_headers_get_encoding (_tmp7_);
#line 115 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	encoding = _tmp8_;
#line 117 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp10_ = aborted;
#line 117 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (!_tmp10_) {
#line 634 "rygel-http-response.c"
		SoupEncoding _tmp11_;
#line 117 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp11_ = encoding;
#line 117 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp9_ = _tmp11_ != SOUP_ENCODING_CONTENT_LENGTH;
#line 640 "rygel-http-response.c"
	} else {
#line 117 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp9_ = FALSE;
#line 644 "rygel-http-response.c"
	}
#line 117 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp12_ = _tmp9_;
#line 117 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp12_) {
#line 650 "rygel-http-response.c"
		SoupMessage* _tmp13_;
		SoupMessageBody* _tmp14_;
		SoupServer* _tmp15_;
		SoupMessage* _tmp16_;
#line 118 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp13_ = self->msg;
#line 118 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp14_ = _tmp13_->response_body;
#line 118 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		soup_message_body_complete (_tmp14_);
#line 119 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp15_ = self->priv->_server;
#line 119 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp16_ = self->msg;
#line 119 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		soup_server_unpause_message (_tmp15_, _tmp16_);
#line 667 "rygel-http-response.c"
	}
#line 122 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp17_ = self->priv->run_continue;
#line 122 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp17__target = self->priv->run_continue_target;
#line 122 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp17_ != NULL) {
#line 675 "rygel-http-response.c"
		GSourceFunc _tmp18_;
		void* _tmp18__target;
#line 123 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp18_ = self->priv->run_continue;
#line 123 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp18__target = self->priv->run_continue_target;
#line 123 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp18_ (_tmp18__target);
#line 684 "rygel-http-response.c"
	}
#line 126 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp19_ = status;
#line 126 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp19_ != ((guint) SOUP_STATUS_NONE)) {
#line 690 "rygel-http-response.c"
		SoupMessage* _tmp20_;
		guint _tmp21_;
#line 127 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp20_ = self->msg;
#line 127 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp21_ = status;
#line 127 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		soup_message_set_status (_tmp20_, _tmp21_);
#line 699 "rygel-http-response.c"
	}
#line 130 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_signal_emit_by_name ((RygelStateMachine*) self, "completed");
#line 108 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (sink);
#line 705 "rygel-http-response.c"
}


void rygel_http_response_end (RygelHTTPResponse* self, gboolean aborted, guint status) {
#line 108 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (self != NULL);
#line 108 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	RYGEL_HTTP_RESPONSE_GET_CLASS (self)->end (self, aborted, status);
#line 714 "rygel-http-response.c"
}


static void rygel_http_response_on_cancelled (RygelHTTPResponse* self, GCancellable* cancellable) {
#line 133 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (self != NULL);
#line 133 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (cancellable != NULL);
#line 134 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_end (self, TRUE, (guint) SOUP_STATUS_CANCELLED);
#line 725 "rygel-http-response.c"
}


static void rygel_http_response_on_server_weak_ref (RygelHTTPResponse* self, GObject* object) {
	GCancellable* _tmp0_;
	GCancellable* _tmp1_;
#line 137 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (self != NULL);
#line 137 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (object != NULL);
#line 138 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->unref_soup_server = FALSE;
#line 139 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = rygel_state_machine_get_cancellable ((RygelStateMachine*) self);
#line 139 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = _tmp0_;
#line 139 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_cancellable_cancel (_tmp1_);
#line 744 "rygel-http-response.c"
}


static void _rygel_http_response_src_pad_added_gst_element_pad_added (GstElement* _sender, GstPad* pad, gpointer self) {
#line 152 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_src_pad_added (self, _sender, pad);
#line 751 "rygel-http-response.c"
}


static gboolean _rygel_http_response_bus_handler_gst_bus_func (GstBus* bus, GstMessage* message, gpointer self) {
	gboolean result;
	result = rygel_http_response_bus_handler (self, bus, message);
#line 164 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 760 "rygel-http-response.c"
}


static void rygel_http_response_prepare_pipeline (RygelHTTPResponse* self, const gchar* name, GstElement* src, GError** error) {
	RygelHTTPGstSink* _tmp0_;
	RygelHTTPGstSink* sink;
	const gchar* _tmp1_;
	GstPipeline* _tmp2_;
	GstPipeline* _tmp3_;
	GstPipeline* _tmp4_;
	GstElement* _tmp5_;
	RygelHTTPGstSink* _tmp6_;
	GstElement* _tmp7_;
	guint16 _tmp8_;
	GstPipeline* _tmp24_;
	GstBus* _tmp25_ = NULL;
	GstBus* bus;
	GstBus* _tmp26_;
	guint _tmp27_ = 0U;
	GError * _inner_error_ = NULL;
#line 142 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (self != NULL);
#line 142 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (name != NULL);
#line 142 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (src != NULL);
#line 143 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = rygel_http_gst_sink_new (self);
#line 143 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	gst_object_ref_sink (_tmp0_);
#line 143 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	sink = _tmp0_;
#line 145 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = name;
#line 145 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = (GstPipeline*) gst_pipeline_new (_tmp1_);
#line 145 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	gst_object_ref_sink (_tmp2_);
#line 145 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (self->priv->pipeline);
#line 145 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->pipeline = _tmp2_;
#line 146 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp3_ = self->priv->pipeline;
#line 146 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_assert (_tmp3_ != NULL);
#line 148 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp4_ = self->priv->pipeline;
#line 148 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp5_ = src;
#line 148 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp6_ = sink;
#line 148 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	gst_bin_add_many ((GstBin*) _tmp4_, _tmp5_, (GstElement*) _tmp6_, NULL);
#line 150 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp7_ = src;
#line 150 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp8_ = _tmp7_->numsrcpads;
#line 150 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (((gint) _tmp8_) == 0) {
#line 821 "rygel-http-response.c"
		GstElement* _tmp9_;
#line 152 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp9_ = src;
#line 152 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_signal_connect_object (_tmp9_, "pad-added", (GCallback) _rygel_http_response_src_pad_added_gst_element_pad_added, self, 0);
#line 827 "rygel-http-response.c"
	} else {
		GstElement* _tmp10_;
		RygelHTTPGstSink* _tmp11_;
		gboolean _tmp12_ = FALSE;
#line 155 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp10_ = src;
#line 155 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp11_ = sink;
#line 155 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp12_ = gst_element_link (_tmp10_, (GstElement*) _tmp11_);
#line 155 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		if (!_tmp12_) {
#line 840 "rygel-http-response.c"
			const gchar* _tmp13_ = NULL;
			GstElement* _tmp14_;
			gchar* _tmp15_;
			gchar* _tmp16_;
			gchar* _tmp17_;
			RygelHTTPGstSink* _tmp18_;
			gchar* _tmp19_;
			gchar* _tmp20_;
			gchar* _tmp21_;
			GError* _tmp22_;
			GError* _tmp23_;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp13_ = _ ("Failed to link %s to %s");
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp14_ = src;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp15_ = gst_object_get_name ((GstObject*) _tmp14_);
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp16_ = _tmp15_;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp17_ = _tmp16_;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp18_ = sink;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp19_ = gst_object_get_name ((GstObject*) _tmp18_);
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp20_ = _tmp19_;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp21_ = _tmp20_;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp22_ = g_error_new (RYGEL_GST_ERROR, RYGEL_GST_ERROR_LINK, _tmp13_, _tmp17_, _tmp21_);
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp23_ = _tmp22_;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_g_free0 (_tmp21_);
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_g_free0 (_tmp17_);
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_inner_error_ = _tmp23_;
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			g_propagate_error (error, _inner_error_);
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_gst_object_unref0 (sink);
#line 156 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			return;
#line 886 "rygel-http-response.c"
		}
	}
#line 163 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp24_ = self->priv->pipeline;
#line 163 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp25_ = gst_pipeline_get_bus (_tmp24_);
#line 163 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	bus = _tmp25_;
#line 164 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp26_ = bus;
#line 164 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp27_ = gst_bus_add_watch_full (_tmp26_, G_PRIORITY_DEFAULT, _rygel_http_response_bus_handler_gst_bus_func, g_object_ref (self), g_object_unref);
#line 164 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->bus_watch_id = _tmp27_;
#line 142 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (bus);
#line 142 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (sink);
#line 905 "rygel-http-response.c"
}


static void rygel_http_response_src_pad_added (RygelHTTPResponse* self, GstElement* src, GstPad* src_pad) {
	GstPad* _tmp0_;
	GstCaps* _tmp1_ = NULL;
	GstCaps* caps;
	GstPipeline* _tmp2_;
	GstElement* _tmp3_ = NULL;
	GstElement* sink;
	GstPad* sink_pad = NULL;
	GstCaps* _tmp4_;
	GstElement* _tmp5_ = NULL;
	GstElement* depay;
	GstElement* _tmp6_;
	GstPad* _tmp29_;
	GstPad* _tmp30_;
	GstPadLinkReturn _tmp31_ = 0;
	GstElement* _tmp41_;
#line 167 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (self != NULL);
#line 167 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (src != NULL);
#line 167 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (src_pad != NULL);
#line 168 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = src_pad;
#line 168 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = gst_pad_get_caps_reffed (_tmp0_);
#line 168 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	caps = _tmp1_;
#line 170 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = self->priv->pipeline;
#line 170 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp3_ = gst_bin_get_by_name ((GstBin*) _tmp2_, RYGEL_HTTP_GST_SINK_NAME);
#line 170 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	sink = _tmp3_;
#line 173 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp4_ = caps;
#line 173 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp5_ = rygel_gst_utils_get_rtp_depayloader (_tmp4_);
#line 173 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	depay = _tmp5_;
#line 174 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp6_ = depay;
#line 174 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp6_ != NULL) {
#line 953 "rygel-http-response.c"
		GstPipeline* _tmp7_;
		GstElement* _tmp8_;
		GstElement* _tmp9_;
		GstElement* _tmp10_;
		gboolean _tmp11_ = FALSE;
		GstElement* _tmp21_;
		GstPad* _tmp22_;
		GstCaps* _tmp23_;
		GstPad* _tmp24_ = NULL;
#line 175 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp7_ = self->priv->pipeline;
#line 175 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp8_ = depay;
#line 175 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		gst_bin_add ((GstBin*) _tmp7_, _tmp8_);
#line 176 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp9_ = depay;
#line 176 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp10_ = sink;
#line 176 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp11_ = gst_element_link (_tmp9_, _tmp10_);
#line 176 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		if (!_tmp11_) {
#line 977 "rygel-http-response.c"
			const gchar* _tmp12_ = NULL;
			GstElement* _tmp13_;
			gchar* _tmp14_;
			gchar* _tmp15_;
			gchar* _tmp16_;
			GstElement* _tmp17_;
			gchar* _tmp18_;
			gchar* _tmp19_;
			gchar* _tmp20_;
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp12_ = _ ("Failed to link %s to %s");
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp13_ = depay;
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp14_ = gst_object_get_name ((GstObject*) _tmp13_);
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp15_ = _tmp14_;
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp16_ = _tmp15_;
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp17_ = sink;
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp18_ = gst_object_get_name ((GstObject*) _tmp17_);
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp19_ = _tmp18_;
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp20_ = _tmp19_;
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			g_critical (_tmp12_, _tmp16_, _tmp20_);
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_g_free0 (_tmp20_);
#line 177 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_g_free0 (_tmp16_);
#line 181 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			rygel_http_response_end (self, FALSE, (guint) SOUP_STATUS_NONE);
#line 183 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_gst_object_unref0 (depay);
#line 183 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_gst_object_unref0 (sink_pad);
#line 183 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_gst_object_unref0 (sink);
#line 183 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_gst_caps_unref0 (caps);
#line 183 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			return;
#line 1023 "rygel-http-response.c"
		}
#line 186 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp21_ = depay;
#line 186 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp22_ = src_pad;
#line 186 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp23_ = caps;
#line 186 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp24_ = gst_element_get_compatible_pad (_tmp21_, _tmp22_, _tmp23_);
#line 186 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_gst_object_unref0 (sink_pad);
#line 186 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		sink_pad = _tmp24_;
#line 1037 "rygel-http-response.c"
	} else {
		GstElement* _tmp25_;
		GstPad* _tmp26_;
		GstCaps* _tmp27_;
		GstPad* _tmp28_ = NULL;
#line 188 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp25_ = sink;
#line 188 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp26_ = src_pad;
#line 188 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp27_ = caps;
#line 188 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp28_ = gst_element_get_compatible_pad (_tmp25_, _tmp26_, _tmp27_);
#line 188 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_gst_object_unref0 (sink_pad);
#line 188 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		sink_pad = _tmp28_;
#line 1055 "rygel-http-response.c"
	}
#line 191 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp29_ = src_pad;
#line 191 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp30_ = sink_pad;
#line 191 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp31_ = gst_pad_link (_tmp29_, _tmp30_);
#line 191 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp31_ != GST_PAD_LINK_OK) {
#line 1065 "rygel-http-response.c"
		const gchar* _tmp32_ = NULL;
		GstPad* _tmp33_;
		gchar* _tmp34_;
		gchar* _tmp35_;
		gchar* _tmp36_;
		GstPad* _tmp37_;
		gchar* _tmp38_;
		gchar* _tmp39_;
		gchar* _tmp40_;
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp32_ = _ ("Failed to link pad %s to %s");
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp33_ = src_pad;
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp34_ = gst_object_get_name ((GstObject*) _tmp33_);
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp35_ = _tmp34_;
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp36_ = _tmp35_;
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp37_ = sink_pad;
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp38_ = gst_object_get_name ((GstObject*) _tmp37_);
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp39_ = _tmp38_;
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp40_ = _tmp39_;
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_critical (_tmp32_, _tmp36_, _tmp40_);
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_g_free0 (_tmp40_);
#line 192 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_g_free0 (_tmp36_);
#line 195 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		rygel_http_response_end (self, FALSE, (guint) SOUP_STATUS_NONE);
#line 197 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_gst_object_unref0 (depay);
#line 197 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_gst_object_unref0 (sink_pad);
#line 197 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_gst_object_unref0 (sink);
#line 197 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_gst_caps_unref0 (caps);
#line 197 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		return;
#line 1111 "rygel-http-response.c"
	}
#line 200 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp41_ = depay;
#line 200 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp41_ != NULL) {
#line 1117 "rygel-http-response.c"
		GstElement* _tmp42_;
#line 201 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp42_ = depay;
#line 201 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		gst_element_sync_state_with_parent (_tmp42_);
#line 1123 "rygel-http-response.c"
	}
#line 167 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (depay);
#line 167 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (sink_pad);
#line 167 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (sink);
#line 167 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_caps_unref0 (caps);
#line 1133 "rygel-http-response.c"
}


static gboolean ___lambda5_ (RygelHTTPResponse* self) {
	gboolean result = FALSE;
	GCancellable* _tmp0_;
	GCancellable* _tmp1_;
	gboolean _tmp2_ = FALSE;
#line 252 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = rygel_state_machine_get_cancellable ((RygelStateMachine*) self);
#line 252 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = _tmp0_;
#line 252 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = g_cancellable_is_cancelled (_tmp1_);
#line 252 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (!_tmp2_) {
#line 253 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		rygel_http_response_end (self, FALSE, (guint) SOUP_STATUS_NONE);
#line 1152 "rygel-http-response.c"
	}
#line 256 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	result = FALSE;
#line 256 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 1158 "rygel-http-response.c"
}


static gboolean ____lambda5__gsource_func (gpointer self) {
	gboolean result;
	result = ___lambda5_ (self);
#line 251 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 1167 "rygel-http-response.c"
}


static gboolean rygel_http_response_bus_handler (RygelHTTPResponse* self, GstBus* bus, GstMessage* message) {
	gboolean result = FALSE;
	gboolean ret;
	GstMessage* _tmp0_;
	GstMessageType _tmp1_;
	gboolean _tmp44_;
#line 205 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 205 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (bus != NULL, FALSE);
#line 205 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (message != NULL, FALSE);
#line 206 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	ret = TRUE;
#line 208 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = message;
#line 208 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = _tmp0_->type;
#line 208 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp1_ == GST_MESSAGE_EOS) {
#line 209 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		ret = FALSE;
#line 1193 "rygel-http-response.c"
	} else {
		GstMessage* _tmp2_;
		GstMessageType _tmp3_;
#line 210 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp2_ = message;
#line 210 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp3_ = _tmp2_->type;
#line 210 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		if (_tmp3_ == GST_MESSAGE_STATE_CHANGED) {
#line 1203 "rygel-http-response.c"
			GstMessage* _tmp4_;
			GstObject* _tmp5_;
			GstPipeline* _tmp6_;
			gboolean _tmp7_ = FALSE;
			RygelHTTPSeek* _tmp8_;
			gboolean _tmp12_;
#line 211 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp4_ = message;
#line 211 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp5_ = _tmp4_->src;
#line 211 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp6_ = self->priv->pipeline;
#line 211 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			if (_tmp5_ != GST_OBJECT (_tmp6_)) {
#line 212 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				result = TRUE;
#line 212 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				return result;
#line 1222 "rygel-http-response.c"
			}
#line 215 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp8_ = self->seek;
#line 215 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			if (_tmp8_ != NULL) {
#line 1228 "rygel-http-response.c"
				RygelHTTPSeek* _tmp9_;
				gint64 _tmp10_;
				gint64 _tmp11_;
#line 215 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp9_ = self->seek;
#line 215 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp10_ = rygel_http_seek_get_start (_tmp9_);
#line 215 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp11_ = _tmp10_;
#line 215 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp7_ = _tmp11_ > ((gint64) 0);
#line 1240 "rygel-http-response.c"
			} else {
#line 215 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp7_ = FALSE;
#line 1244 "rygel-http-response.c"
			}
#line 215 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp12_ = _tmp7_;
#line 215 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			if (_tmp12_) {
#line 1250 "rygel-http-response.c"
				GstState old_state = 0;
				GstState new_state = 0;
				GstMessage* _tmp13_;
				GstState _tmp14_ = 0;
				GstState _tmp15_ = 0;
				gboolean _tmp16_ = FALSE;
				GstState _tmp17_;
				gboolean _tmp19_;
#line 219 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp13_ = message;
#line 219 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				gst_message_parse_state_changed (_tmp13_, &_tmp14_, &_tmp15_, NULL);
#line 219 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				old_state = _tmp14_;
#line 219 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				new_state = _tmp15_;
#line 223 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp17_ = old_state;
#line 223 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				if (_tmp17_ == GST_STATE_READY) {
#line 1271 "rygel-http-response.c"
					GstState _tmp18_;
#line 223 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp18_ = new_state;
#line 223 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp16_ = _tmp18_ == GST_STATE_PAUSED;
#line 1277 "rygel-http-response.c"
				} else {
#line 223 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp16_ = FALSE;
#line 1281 "rygel-http-response.c"
				}
#line 223 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp19_ = _tmp16_;
#line 223 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				if (_tmp19_) {
#line 1287 "rygel-http-response.c"
					gboolean _tmp20_ = FALSE;
#line 224 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp20_ = rygel_http_response_perform_seek (self);
#line 224 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					if (_tmp20_) {
#line 1293 "rygel-http-response.c"
						GstPipeline* _tmp21_;
#line 225 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
						_tmp21_ = self->priv->pipeline;
#line 225 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
						gst_element_set_state ((GstElement*) _tmp21_, GST_STATE_PLAYING);
#line 1299 "rygel-http-response.c"
					}
				}
			}
		} else {
			GError* err = NULL;
			gchar* err_msg = NULL;
			GstMessage* _tmp22_;
			GstMessageType _tmp23_;
#line 233 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp22_ = message;
#line 233 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp23_ = _tmp22_->type;
#line 233 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			if (_tmp23_ == GST_MESSAGE_ERROR) {
#line 1314 "rygel-http-response.c"
				GstMessage* _tmp24_;
				GError* _tmp25_ = NULL;
				gchar* _tmp26_ = NULL;
				const gchar* _tmp27_ = NULL;
				GstPipeline* _tmp28_;
				gchar* _tmp29_;
				gchar* _tmp30_;
				gchar* _tmp31_;
				const gchar* _tmp32_;
#line 234 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp24_ = message;
#line 234 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				gst_message_parse_error (_tmp24_, &_tmp25_, &_tmp26_);
#line 234 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_g_error_free0 (err);
#line 234 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				err = _tmp25_;
#line 234 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_g_free0 (err_msg);
#line 234 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				err_msg = _tmp26_;
#line 235 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp27_ = _ ("Error from pipeline %s: %s");
#line 235 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp28_ = self->priv->pipeline;
#line 235 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp29_ = gst_object_get_name ((GstObject*) _tmp28_);
#line 235 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp30_ = _tmp29_;
#line 235 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp31_ = _tmp30_;
#line 235 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp32_ = err_msg;
#line 235 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				g_critical (_tmp27_, _tmp31_, _tmp32_);
#line 235 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_g_free0 (_tmp31_);
#line 239 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				ret = FALSE;
#line 1354 "rygel-http-response.c"
			} else {
				GstMessage* _tmp33_;
				GstMessageType _tmp34_;
#line 240 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp33_ = message;
#line 240 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				_tmp34_ = _tmp33_->type;
#line 240 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				if (_tmp34_ == GST_MESSAGE_WARNING) {
#line 1364 "rygel-http-response.c"
					GstMessage* _tmp35_;
					GError* _tmp36_ = NULL;
					gchar* _tmp37_ = NULL;
					const gchar* _tmp38_ = NULL;
					GstPipeline* _tmp39_;
					gchar* _tmp40_;
					gchar* _tmp41_;
					gchar* _tmp42_;
					const gchar* _tmp43_;
#line 241 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp35_ = message;
#line 241 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					gst_message_parse_warning (_tmp35_, &_tmp36_, &_tmp37_);
#line 241 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_g_error_free0 (err);
#line 241 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					err = _tmp36_;
#line 241 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_g_free0 (err_msg);
#line 241 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					err_msg = _tmp37_;
#line 242 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp38_ = _ ("Warning from pipeline %s: %s");
#line 242 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp39_ = self->priv->pipeline;
#line 242 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp40_ = gst_object_get_name ((GstObject*) _tmp39_);
#line 242 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp41_ = _tmp40_;
#line 242 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp42_ = _tmp41_;
#line 242 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_tmp43_ = err_msg;
#line 242 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					g_warning (_tmp38_, _tmp42_, _tmp43_);
#line 242 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
					_g_free0 (_tmp42_);
#line 1402 "rygel-http-response.c"
				}
			}
#line 210 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_g_free0 (err_msg);
#line 210 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_g_error_free0 (err);
#line 1409 "rygel-http-response.c"
		}
	}
#line 250 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp44_ = ret;
#line 250 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (!_tmp44_) {
#line 1416 "rygel-http-response.c"
		gint _tmp45_;
		gint _tmp46_;
#line 251 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp45_ = rygel_http_response_get_priority (self);
#line 251 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp46_ = _tmp45_;
#line 251 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_idle_add_full (_tmp46_, ____lambda5__gsource_func, g_object_ref (self), g_object_unref);
#line 1425 "rygel-http-response.c"
	}
#line 260 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	result = ret;
#line 260 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 1431 "rygel-http-response.c"
}


static gboolean rygel_http_response_perform_seek (RygelHTTPResponse* self) {
	gboolean result = FALSE;
	GstSeekType stop_type;
	GstFormat format = 0;
	RygelHTTPSeek* _tmp0_;
	RygelHTTPSeek* _tmp1_;
	gint64 _tmp2_;
	gint64 _tmp3_;
	GstPipeline* _tmp4_;
	GstFormat _tmp5_;
	RygelHTTPSeek* _tmp6_;
	gint64 _tmp7_;
	gint64 _tmp8_;
	GstSeekType _tmp9_;
	RygelHTTPSeek* _tmp10_;
	gint64 _tmp11_;
	gint64 _tmp12_;
	gboolean _tmp13_ = FALSE;
#line 263 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 264 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	stop_type = GST_SEEK_TYPE_NONE;
#line 267 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = self->seek;
#line 267 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (RYGEL_IS_HTTP_TIME_SEEK (_tmp0_)) {
#line 268 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		format = GST_FORMAT_TIME;
#line 1463 "rygel-http-response.c"
	} else {
#line 271 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		format = GST_FORMAT_BYTES;
#line 1467 "rygel-http-response.c"
	}
#line 274 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = self->seek;
#line 274 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = rygel_http_seek_get_stop (_tmp1_);
#line 274 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp3_ = _tmp2_;
#line 274 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp3_ > ((gint64) 0)) {
#line 275 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		stop_type = GST_SEEK_TYPE_SET;
#line 1479 "rygel-http-response.c"
	}
#line 278 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp4_ = self->priv->pipeline;
#line 278 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp5_ = format;
#line 278 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp6_ = self->seek;
#line 278 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp7_ = rygel_http_seek_get_start (_tmp6_);
#line 278 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp8_ = _tmp7_;
#line 278 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp9_ = stop_type;
#line 278 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp10_ = self->seek;
#line 278 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp11_ = rygel_http_seek_get_stop (_tmp10_);
#line 278 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp12_ = _tmp11_;
#line 278 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp13_ = gst_element_seek ((GstElement*) _tmp4_, 1.0, _tmp5_, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, GST_SEEK_TYPE_SET, _tmp8_, _tmp9_, _tmp12_ + 1);
#line 278 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (!_tmp13_) {
#line 1503 "rygel-http-response.c"
		const gchar* _tmp14_ = NULL;
		RygelHTTPSeek* _tmp15_;
		gint64 _tmp16_;
		gint64 _tmp17_;
#line 285 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp14_ = _ ("Failed to seek to offset %lld");
#line 285 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp15_ = self->seek;
#line 285 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp16_ = rygel_http_seek_get_start (_tmp15_);
#line 285 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp17_ = _tmp16_;
#line 285 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_warning (_tmp14_, _tmp17_);
#line 287 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		rygel_http_response_end (self, FALSE, (guint) SOUP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE);
#line 289 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		result = FALSE;
#line 289 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		return result;
#line 1524 "rygel-http-response.c"
	}
#line 292 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	result = TRUE;
#line 292 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 1530 "rygel-http-response.c"
}


SoupServer* rygel_http_response_get_server (RygelHTTPResponse* self) {
	SoupServer* result;
	SoupServer* _tmp0_;
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = self->priv->_server;
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	result = _tmp0_;
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 1545 "rygel-http-response.c"
}


static void rygel_http_response_set_server (RygelHTTPResponse* self, SoupServer* value) {
	SoupServer* _tmp0_;
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_if_fail (self != NULL);
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = value;
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->_server = _tmp0_;
#line 28 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_notify ((GObject *) self, "server");
#line 1559 "rygel-http-response.c"
}


static GCancellable* rygel_http_response_real_get_cancellable (RygelStateMachine* base) {
	GCancellable* result;
	RygelHTTPResponse* self;
	GCancellable* _tmp0_;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self = (RygelHTTPResponse*) base;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = self->priv->_cancellable;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	result = _tmp0_;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 1575 "rygel-http-response.c"
}


static void rygel_http_response_real_set_cancellable (RygelStateMachine* base, GCancellable* value) {
	RygelHTTPResponse* self;
	GCancellable* _tmp0_;
	GCancellable* _tmp1_;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self = (RygelHTTPResponse*) base;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = value;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_object_unref0 (self->priv->_cancellable);
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->_cancellable = _tmp1_;
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_notify ((GObject *) self, "cancellable");
#line 1595 "rygel-http-response.c"
}


gint rygel_http_response_get_priority (RygelHTTPResponse* self) {
	gint result;
	gint _tmp0_;
	SoupMessage* _tmp2_;
	SoupMessageHeaders* _tmp3_;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_;
	gchar* mode;
	gboolean _tmp6_ = FALSE;
	const gchar* _tmp7_;
	gboolean _tmp9_;
	gint _tmp12_;
#line 38 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 39 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = self->priv->_priority;
#line 39 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp0_ != (-1)) {
#line 1617 "rygel-http-response.c"
		gint _tmp1_;
#line 40 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp1_ = self->priv->_priority;
#line 40 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		result = _tmp1_;
#line 40 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		return result;
#line 1625 "rygel-http-response.c"
	}
#line 43 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp2_ = self->msg;
#line 43 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp3_ = _tmp2_->request_headers;
#line 43 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp4_ = soup_message_headers_get_one (_tmp3_, "transferMode.dlna.org");
#line 43 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp5_ = g_strdup (_tmp4_);
#line 43 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	mode = _tmp5_;
#line 46 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp7_ = mode;
#line 46 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp7_ == NULL) {
#line 46 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp6_ = TRUE;
#line 1643 "rygel-http-response.c"
	} else {
		const gchar* _tmp8_;
#line 46 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp8_ = mode;
#line 46 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp6_ = g_strcmp0 (_tmp8_, "Interactive") == 0;
#line 1650 "rygel-http-response.c"
	}
#line 46 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp9_ = _tmp6_;
#line 46 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp9_) {
#line 47 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		self->priv->_priority = G_PRIORITY_DEFAULT;
#line 1658 "rygel-http-response.c"
	} else {
		const gchar* _tmp10_;
#line 48 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp10_ = mode;
#line 48 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		if (g_strcmp0 (_tmp10_, "Streaming") == 0) {
#line 49 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			self->priv->_priority = G_PRIORITY_HIGH;
#line 1667 "rygel-http-response.c"
		} else {
			const gchar* _tmp11_;
#line 50 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			_tmp11_ = mode;
#line 50 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
			if (g_strcmp0 (_tmp11_, "Background") == 0) {
#line 51 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				self->priv->_priority = G_PRIORITY_LOW;
#line 1676 "rygel-http-response.c"
			} else {
#line 53 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
				self->priv->_priority = G_PRIORITY_DEFAULT;
#line 1680 "rygel-http-response.c"
			}
		}
	}
#line 56 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp12_ = self->priv->_priority;
#line 56 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	result = _tmp12_;
#line 56 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_free0 (mode);
#line 56 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	return result;
#line 1692 "rygel-http-response.c"
}


static void rygel_http_response_class_init (RygelHTTPResponseClass * klass) {
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_parent_class = g_type_class_peek_parent (klass);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_type_class_add_private (klass, sizeof (RygelHTTPResponsePrivate));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	RYGEL_HTTP_RESPONSE_CLASS (klass)->end = rygel_http_response_real_end;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_rygel_http_response_get_property;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_rygel_http_response_set_property;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	G_OBJECT_CLASS (klass)->finalize = rygel_http_response_finalize;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_HTTP_RESPONSE_SERVER, g_param_spec_object ("server", "server", "server", soup_server_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_HTTP_RESPONSE_CANCELLABLE, g_param_spec_object ("cancellable", "cancellable", "cancellable", G_TYPE_CANCELLABLE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_HTTP_RESPONSE_PRIORITY, g_param_spec_int ("priority", "priority", "priority", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 1715 "rygel-http-response.c"
}


static void rygel_http_response_rygel_state_machine_interface_init (RygelStateMachineIface * iface) {
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	rygel_http_response_rygel_state_machine_parent_iface = g_type_interface_peek_parent (iface);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	iface->run = (void (*)(RygelStateMachine*)) rygel_http_response_real_run;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	iface->run_finish = rygel_http_response_real_run_finish;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	iface->get_cancellable = rygel_http_response_real_get_cancellable;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	iface->set_cancellable = rygel_http_response_real_set_cancellable;
#line 1730 "rygel-http-response.c"
}


static void rygel_http_response_instance_init (RygelHTTPResponse * self) {
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv = RYGEL_HTTP_RESPONSE_GET_PRIVATE (self);
#line 36 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->_priority = -1;
#line 1739 "rygel-http-response.c"
}


static void rygel_http_response_finalize (GObject* obj) {
	RygelHTTPResponse * self;
	gboolean _tmp0_;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self = RYGEL_HTTP_RESPONSE (obj);
#line 84 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_tmp0_ = self->priv->unref_soup_server;
#line 84 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	if (_tmp0_) {
#line 1752 "rygel-http-response.c"
		SoupServer* _tmp1_;
#line 85 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		_tmp1_ = self->priv->_server;
#line 85 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_object_weak_unref ((GObject*) _tmp1_, _rygel_http_response_on_server_weak_ref_gweak_notify, self);
#line 1758 "rygel-http-response.c"
	}
#line 29 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_object_unref0 (self->msg);
#line 31 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_object_unref0 (self->priv->_cancellable);
#line 33 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_g_object_unref0 (self->seek);
#line 35 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	(self->priv->run_continue_target_destroy_notify == NULL) ? NULL : (self->priv->run_continue_target_destroy_notify (self->priv->run_continue_target), NULL);
#line 35 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->run_continue = NULL;
#line 35 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->run_continue_target = NULL;
#line 35 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	self->priv->run_continue_target_destroy_notify = NULL;
#line 60 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	_gst_object_unref0 (self->priv->pipeline);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	G_OBJECT_CLASS (rygel_http_response_parent_class)->finalize (obj);
#line 1778 "rygel-http-response.c"
}


GType rygel_http_response_get_type (void) {
	static volatile gsize rygel_http_response_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_http_response_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelHTTPResponseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_http_response_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelHTTPResponse), 0, (GInstanceInitFunc) rygel_http_response_instance_init, NULL };
		static const GInterfaceInfo rygel_state_machine_info = { (GInterfaceInitFunc) rygel_http_response_rygel_state_machine_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType rygel_http_response_type_id;
		rygel_http_response_type_id = g_type_register_static (G_TYPE_OBJECT, "RygelHTTPResponse", &g_define_type_info, 0);
		g_type_add_interface_static (rygel_http_response_type_id, RYGEL_TYPE_STATE_MACHINE, &rygel_state_machine_info);
		g_once_init_leave (&rygel_http_response_type_id__volatile, rygel_http_response_type_id);
	}
	return rygel_http_response_type_id__volatile;
}


static void _vala_rygel_http_response_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	RygelHTTPResponse * self;
	self = RYGEL_HTTP_RESPONSE (object);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	switch (property_id) {
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		case RYGEL_HTTP_RESPONSE_SERVER:
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_value_set_object (value, rygel_http_response_get_server (self));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		break;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		case RYGEL_HTTP_RESPONSE_CANCELLABLE:
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_value_set_object (value, rygel_state_machine_get_cancellable ((RygelStateMachine*) self));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		break;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		case RYGEL_HTTP_RESPONSE_PRIORITY:
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		g_value_set_int (value, rygel_http_response_get_priority (self));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		break;
#line 1819 "rygel-http-response.c"
		default:
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		break;
#line 1825 "rygel-http-response.c"
	}
}


static void _vala_rygel_http_response_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	RygelHTTPResponse * self;
	self = RYGEL_HTTP_RESPONSE (object);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
	switch (property_id) {
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		case RYGEL_HTTP_RESPONSE_SERVER:
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		rygel_http_response_set_server (self, g_value_get_object (value));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		break;
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		case RYGEL_HTTP_RESPONSE_CANCELLABLE:
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		rygel_state_machine_set_cancellable ((RygelStateMachine*) self, g_value_get_object (value));
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		break;
#line 1847 "rygel-http-response.c"
		default:
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 27 "/home/jens/Source/rygel/tests/rygel-http-response.vala"
		break;
#line 1853 "rygel-http-response.c"
	}
}



