/* rygel-http-post-test.c generated by valac 0.20.1.2-ca5c2, the Vala compiler
 * generated from rygel-http-post-test.vala, do not modify */

/*
 * Copyright (C) 2010 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 <libsoup/soup.h>
#include <string.h>
#include <gee.h>
#include <stdlib.h>
#include <libgupnp/gupnp.h>
#include <gio/gio.h>
#include <glib/gstdio.h>
#include <libgssdp/gssdp.h>
#include <glib/gi18n-lib.h>
#include <gobject/gvaluecollector.h>


#define RYGEL_TYPE_CLIENT_HACKS (rygel_client_hacks_get_type ())
#define RYGEL_CLIENT_HACKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_CLIENT_HACKS, RygelClientHacks))
#define RYGEL_CLIENT_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_CLIENT_HACKS, RygelClientHacksClass))
#define RYGEL_IS_CLIENT_HACKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_CLIENT_HACKS))
#define RYGEL_IS_CLIENT_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_CLIENT_HACKS))
#define RYGEL_CLIENT_HACKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_CLIENT_HACKS, RygelClientHacksClass))

typedef struct _RygelClientHacks RygelClientHacks;
typedef struct _RygelClientHacksClass RygelClientHacksClass;
typedef struct _RygelClientHacksPrivate RygelClientHacksPrivate;

#define RYGEL_TYPE_MEDIA_OBJECT (rygel_media_object_get_type ())
#define RYGEL_MEDIA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_MEDIA_OBJECT, RygelMediaObject))
#define RYGEL_MEDIA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_MEDIA_OBJECT, RygelMediaObjectClass))
#define RYGEL_IS_MEDIA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_MEDIA_OBJECT))
#define RYGEL_IS_MEDIA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_MEDIA_OBJECT))
#define RYGEL_MEDIA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_MEDIA_OBJECT, RygelMediaObjectClass))

typedef struct _RygelMediaObject RygelMediaObject;
typedef struct _RygelMediaObjectClass RygelMediaObjectClass;

#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 _RygelParamSpecClientHacks RygelParamSpecClientHacks;

#define RYGEL_TYPE_TEST_REQUEST_FACTORY (rygel_test_request_factory_get_type ())
#define RYGEL_TEST_REQUEST_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_TEST_REQUEST_FACTORY, RygelTestRequestFactory))
#define RYGEL_TEST_REQUEST_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_TEST_REQUEST_FACTORY, RygelTestRequestFactoryClass))
#define RYGEL_IS_TEST_REQUEST_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_TEST_REQUEST_FACTORY))
#define RYGEL_IS_TEST_REQUEST_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_TEST_REQUEST_FACTORY))
#define RYGEL_TEST_REQUEST_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_TEST_REQUEST_FACTORY, RygelTestRequestFactoryClass))

typedef struct _RygelTestRequestFactory RygelTestRequestFactory;
typedef struct _RygelTestRequestFactoryClass RygelTestRequestFactoryClass;
typedef struct _RygelTestRequestFactoryPrivate RygelTestRequestFactoryPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL)))

#define RYGEL_TYPE_HTTP_SERVER (rygel_http_server_get_type ())
#define RYGEL_HTTP_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_SERVER, RygelHTTPServer))
#define RYGEL_HTTP_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_SERVER, RygelHTTPServerClass))
#define RYGEL_IS_HTTP_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_SERVER))
#define RYGEL_IS_HTTP_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_SERVER))
#define RYGEL_HTTP_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_SERVER, RygelHTTPServerClass))

typedef struct _RygelHTTPServer RygelHTTPServer;
typedef struct _RygelHTTPServerClass RygelHTTPServerClass;

#define RYGEL_TYPE_HTTP_REQUEST (rygel_http_request_get_type ())
#define RYGEL_HTTP_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_REQUEST, RygelHTTPRequest))
#define RYGEL_HTTP_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_REQUEST, RygelHTTPRequestClass))
#define RYGEL_IS_HTTP_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_REQUEST))
#define RYGEL_IS_HTTP_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_REQUEST))
#define RYGEL_HTTP_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_REQUEST, RygelHTTPRequestClass))

typedef struct _RygelHTTPRequest RygelHTTPRequest;
typedef struct _RygelHTTPRequestClass RygelHTTPRequestClass;

#define RYGEL_TYPE_HTTP_POST (rygel_http_post_get_type ())
#define RYGEL_HTTP_POST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_POST, RygelHTTPPost))
#define RYGEL_HTTP_POST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_POST, RygelHTTPPostClass))
#define RYGEL_IS_HTTP_POST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_POST))
#define RYGEL_IS_HTTP_POST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_POST))
#define RYGEL_HTTP_POST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_POST, RygelHTTPPostClass))

typedef struct _RygelHTTPPost RygelHTTPPost;
typedef struct _RygelHTTPPostClass RygelHTTPPostClass;
typedef struct _RygelParamSpecTestRequestFactory RygelParamSpecTestRequestFactory;

#define RYGEL_TYPE_HTTP_POST_TEST (rygel_http_post_test_get_type ())
#define RYGEL_HTTP_POST_TEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_POST_TEST, RygelHTTPPostTest))
#define RYGEL_HTTP_POST_TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_POST_TEST, RygelHTTPPostTestClass))
#define RYGEL_IS_HTTP_POST_TEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_POST_TEST))
#define RYGEL_IS_HTTP_POST_TEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_POST_TEST))
#define RYGEL_HTTP_POST_TEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_POST_TEST, RygelHTTPPostTestClass))

typedef struct _RygelHTTPPostTest RygelHTTPPostTest;
typedef struct _RygelHTTPPostTestClass RygelHTTPPostTestClass;
typedef struct _RygelHTTPPostTestPrivate RygelHTTPPostTestPrivate;

#define RYGEL_TYPE_HTTP_CLIENT (rygel_http_client_get_type ())
#define RYGEL_HTTP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_CLIENT, RygelHTTPClient))
#define RYGEL_HTTP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_CLIENT, RygelHTTPClientClass))
#define RYGEL_IS_HTTP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_CLIENT))
#define RYGEL_IS_HTTP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_CLIENT))
#define RYGEL_HTTP_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_CLIENT, RygelHTTPClientClass))

typedef struct _RygelHTTPClient RygelHTTPClient;
typedef struct _RygelHTTPClientClass RygelHTTPClientClass;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _rygel_test_request_factory_unref0(var) ((var == NULL) ? NULL : (var = (rygel_test_request_factory_unref (var), NULL)))
typedef struct _RygelHTTPServerPrivate RygelHTTPServerPrivate;

#define RYGEL_TYPE_MEDIA_CONTAINER (rygel_media_container_get_type ())
#define RYGEL_MEDIA_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_MEDIA_CONTAINER, RygelMediaContainer))
#define RYGEL_MEDIA_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_MEDIA_CONTAINER, RygelMediaContainerClass))
#define RYGEL_IS_MEDIA_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_MEDIA_CONTAINER))
#define RYGEL_IS_MEDIA_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_MEDIA_CONTAINER))
#define RYGEL_MEDIA_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_MEDIA_CONTAINER, RygelMediaContainerClass))

typedef struct _RygelMediaContainer RygelMediaContainer;
typedef struct _RygelMediaContainerClass RygelMediaContainerClass;

#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;
typedef struct _RygelHTTPClientPrivate RygelHTTPClientPrivate;
typedef struct _RygelHttpPostTestHandleClientMessageData RygelHttpPostTestHandleClientMessageData;
typedef struct _RygelMediaObjectPrivate RygelMediaObjectPrivate;
typedef struct _RygelMediaContainerPrivate RygelMediaContainerPrivate;
typedef struct _RygelMediaItemPrivate RygelMediaItemPrivate;
typedef struct _RygelHttpPostTestCheckResultData RygelHttpPostTestCheckResultData;

#define RYGEL_TYPE_HTTP_ITEM_URI (rygel_http_item_uri_get_type ())
#define RYGEL_HTTP_ITEM_URI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_HTTP_ITEM_URI, RygelHTTPItemURI))
#define RYGEL_HTTP_ITEM_URI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_HTTP_ITEM_URI, RygelHTTPItemURIClass))
#define RYGEL_IS_HTTP_ITEM_URI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_HTTP_ITEM_URI))
#define RYGEL_IS_HTTP_ITEM_URI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_HTTP_ITEM_URI))
#define RYGEL_HTTP_ITEM_URI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_HTTP_ITEM_URI, RygelHTTPItemURIClass))

typedef struct _RygelHTTPItemURI RygelHTTPItemURI;
typedef struct _RygelHTTPItemURIClass RygelHTTPItemURIClass;

#define RYGEL_TYPE_TRANSCODER (rygel_transcoder_get_type ())
#define RYGEL_TRANSCODER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_TRANSCODER, RygelTranscoder))
#define RYGEL_TRANSCODER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_TRANSCODER, RygelTranscoderClass))
#define RYGEL_IS_TRANSCODER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_TRANSCODER))
#define RYGEL_IS_TRANSCODER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_TRANSCODER))
#define RYGEL_TRANSCODER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_TRANSCODER, RygelTranscoderClass))

typedef struct _RygelTranscoder RygelTranscoder;
typedef struct _RygelTranscoderClass RygelTranscoderClass;
typedef struct _Block1Data Block1Data;
typedef struct _RygelHttpClientRunData RygelHttpClientRunData;
typedef struct _Block2Data Block2Data;
typedef struct _RygelMediaContainerFindObjectData RygelMediaContainerFindObjectData;
typedef struct _Block3Data Block3Data;
typedef struct _RygelMediaItemGetWritableData RygelMediaItemGetWritableData;

#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;
typedef struct _RygelHTTPRequestPrivate RygelHTTPRequestPrivate;
typedef struct _Block4Data Block4Data;
typedef struct _RygelHttpResponseRunData RygelHttpResponseRunData;

#define RYGEL_TYPE_OBJECT_REMOVAL_QUEUE (rygel_object_removal_queue_get_type ())
#define RYGEL_OBJECT_REMOVAL_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_OBJECT_REMOVAL_QUEUE, RygelObjectRemovalQueue))
#define RYGEL_OBJECT_REMOVAL_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_OBJECT_REMOVAL_QUEUE, RygelObjectRemovalQueueClass))
#define RYGEL_IS_OBJECT_REMOVAL_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_OBJECT_REMOVAL_QUEUE))
#define RYGEL_IS_OBJECT_REMOVAL_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_OBJECT_REMOVAL_QUEUE))
#define RYGEL_OBJECT_REMOVAL_QUEUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_OBJECT_REMOVAL_QUEUE, RygelObjectRemovalQueueClass))

typedef struct _RygelObjectRemovalQueue RygelObjectRemovalQueue;
typedef struct _RygelObjectRemovalQueueClass RygelObjectRemovalQueueClass;
typedef struct _RygelObjectRemovalQueuePrivate RygelObjectRemovalQueuePrivate;
typedef struct _RygelObjectRemovalQueueRemoveNowData RygelObjectRemovalQueueRemoveNowData;

#define RYGEL_TYPE_THUMBNAIL (rygel_thumbnail_get_type ())
#define RYGEL_THUMBNAIL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_THUMBNAIL, RygelThumbnail))
#define RYGEL_THUMBNAIL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_THUMBNAIL, RygelThumbnailClass))
#define RYGEL_IS_THUMBNAIL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_THUMBNAIL))
#define RYGEL_IS_THUMBNAIL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_THUMBNAIL))
#define RYGEL_THUMBNAIL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_THUMBNAIL, RygelThumbnailClass))

typedef struct _RygelThumbnail RygelThumbnail;
typedef struct _RygelThumbnailClass RygelThumbnailClass;
typedef struct _RygelThumbnailPrivate RygelThumbnailPrivate;

#define RYGEL_TYPE_VISUAL_ITEM (rygel_visual_item_get_type ())
#define RYGEL_VISUAL_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_VISUAL_ITEM, RygelVisualItem))
#define RYGEL_VISUAL_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_VISUAL_ITEM, RygelVisualItemClass))
#define RYGEL_IS_VISUAL_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_VISUAL_ITEM))
#define RYGEL_IS_VISUAL_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_VISUAL_ITEM))
#define RYGEL_VISUAL_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_VISUAL_ITEM, RygelVisualItemClass))

typedef struct _RygelVisualItem RygelVisualItem;
typedef struct _RygelVisualItemClass RygelVisualItemClass;
typedef struct _RygelVisualItemPrivate RygelVisualItemPrivate;

#define RYGEL_TYPE_SUBTITLE (rygel_subtitle_get_type ())
#define RYGEL_SUBTITLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_SUBTITLE, RygelSubtitle))
#define RYGEL_SUBTITLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_SUBTITLE, RygelSubtitleClass))
#define RYGEL_IS_SUBTITLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_SUBTITLE))
#define RYGEL_IS_SUBTITLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_SUBTITLE))
#define RYGEL_SUBTITLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_SUBTITLE, RygelSubtitleClass))

typedef struct _RygelSubtitle RygelSubtitle;
typedef struct _RygelSubtitleClass RygelSubtitleClass;
typedef struct _RygelSubtitlePrivate RygelSubtitlePrivate;

#define RYGEL_TYPE_VIDEO_ITEM (rygel_video_item_get_type ())
#define RYGEL_VIDEO_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_VIDEO_ITEM, RygelVideoItem))
#define RYGEL_VIDEO_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_VIDEO_ITEM, RygelVideoItemClass))
#define RYGEL_IS_VIDEO_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_VIDEO_ITEM))
#define RYGEL_IS_VIDEO_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_VIDEO_ITEM))
#define RYGEL_VIDEO_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_VIDEO_ITEM, RygelVideoItemClass))

typedef struct _RygelVideoItem RygelVideoItem;
typedef struct _RygelVideoItemClass RygelVideoItemClass;
typedef struct _RygelVideoItemPrivate RygelVideoItemPrivate;

#define RYGEL_TYPE_MUSIC_ITEM (rygel_music_item_get_type ())
#define RYGEL_MUSIC_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_MUSIC_ITEM, RygelMusicItem))
#define RYGEL_MUSIC_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_MUSIC_ITEM, RygelMusicItemClass))
#define RYGEL_IS_MUSIC_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_MUSIC_ITEM))
#define RYGEL_IS_MUSIC_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_MUSIC_ITEM))
#define RYGEL_MUSIC_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_MUSIC_ITEM, RygelMusicItemClass))

typedef struct _RygelMusicItem RygelMusicItem;
typedef struct _RygelMusicItemClass RygelMusicItemClass;
typedef struct _RygelMusicItemPrivate RygelMusicItemPrivate;
typedef struct _RygelTranscoderPrivate RygelTranscoderPrivate;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

typedef enum  {
	RYGEL_TEST_ERROR_SKIP = 77,
	RYGEL_TEST_ERROR_TIMEOUT
} RygelTestError;
#define RYGEL_TEST_ERROR rygel_test_error_quark ()
typedef enum  {
	RYGEL_CLIENT_HACKS_ERROR_NA
} RygelClientHacksError;
#define RYGEL_CLIENT_HACKS_ERROR rygel_client_hacks_error_quark ()
struct _RygelClientHacks {
	GTypeInstance parent_instance;
	volatile int ref_count;
	RygelClientHacksPrivate * priv;
};

struct _RygelClientHacksClass {
	GTypeClass parent_class;
	void (*finalize) (RygelClientHacks *self);
};

struct _RygelParamSpecClientHacks {
	GParamSpec parent_instance;
};

struct _RygelTestRequestFactory {
	GTypeInstance parent_instance;
	volatile int ref_count;
	RygelTestRequestFactoryPrivate * priv;
	SoupMessage* msg;
	SoupKnownStatusCode* expected_code;
	gboolean cancel;
};

struct _RygelTestRequestFactoryClass {
	GTypeClass parent_class;
	void (*finalize) (RygelTestRequestFactory *self);
};

struct _RygelParamSpecTestRequestFactory {
	GParamSpec parent_instance;
};

struct _RygelHTTPPostTest {
	GObject parent_instance;
	RygelHTTPPostTestPrivate * priv;
	RygelHTTPServer* server;
	RygelHTTPClient* client;
};

struct _RygelHTTPPostTestClass {
	GObjectClass parent_class;
	void (*run) (RygelHTTPPostTest* self, GError** error);
};

struct _RygelHTTPPostTestPrivate {
	gboolean server_done;
	gboolean client_done;
	gboolean ready;
	GMainLoop* main_loop;
	GError* error;
	GeeArrayList* requests;
	RygelTestRequestFactory* current_request;
};

struct _RygelHTTPServer {
	GObject parent_instance;
	RygelHTTPServerPrivate * priv;
	RygelMediaContainer* root_container;
	GUPnPContext* context;
};

struct _RygelHTTPServerClass {
	GObjectClass parent_class;
};

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 _RygelHTTPClient {
	GObject parent_instance;
	RygelHTTPClientPrivate * priv;
	guint8* content;
	gint content_length1;
	GUPnPContext* context;
	SoupMessage* msg;
};

struct _RygelHTTPClientClass {
	GObjectClass parent_class;
};

struct _RygelHttpPostTestHandleClientMessageData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelHTTPPostTest* self;
	SoupMessage* msg;
	SoupMessage* _tmp0_;
	RygelHTTPRequest* _tmp1_;
	RygelHTTPRequest* request;
	RygelTestRequestFactory* _tmp2_;
	gboolean _tmp3_;
	RygelHTTPRequest* _tmp4_;
	GCancellable* _tmp5_;
	GCancellable* _tmp6_;
	RygelHTTPRequest* _tmp7_;
	SoupMessage* _tmp8_;
	guint _tmp9_;
	guint _tmp10_;
	SoupMessage* _tmp11_;
	guint _tmp12_;
	guint _tmp13_;
	RygelTestRequestFactory* _tmp14_;
	SoupKnownStatusCode* _tmp15_;
	gboolean _tmp16_;
	GMainLoop* _tmp17_;
	gboolean _tmp18_;
	GError* _error_;
	GError* _tmp19_;
	GError* _tmp20_;
	GMainLoop* _tmp21_;
	GError * _inner_error_;
};

struct _RygelMediaObject {
	GObject parent_instance;
	RygelMediaObjectPrivate * priv;
	gchar* id;
	RygelMediaContainer* parent;
	gchar* mime_type;
};

struct _RygelMediaObjectClass {
	GObjectClass parent_class;
};

struct _RygelMediaContainer {
	RygelMediaObject parent_instance;
	RygelMediaContainerPrivate * priv;
	RygelMediaItem* item;
	GFile* file;
};

struct _RygelMediaContainerClass {
	RygelMediaObjectClass parent_class;
};

struct _RygelMediaItem {
	RygelMediaObject parent_instance;
	RygelMediaItemPrivate * priv;
	glong size;
	glong duration;
	GeeArrayList* uris;
	gboolean place_holder;
	GFile* file;
};

struct _RygelMediaItemClass {
	RygelMediaObjectClass parent_class;
};

struct _RygelHttpPostTestCheckResultData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelHTTPPostTest* self;
	RygelHTTPServer* _tmp0_;
	RygelMediaContainer* _tmp1_;
	RygelMediaItem* _tmp2_;
	GFile* _tmp3_;
	GFile* _tmp4_;
	GFile* file;
	GFile* _tmp5_;
	GFileInputStream* _tmp6_;
	GFileInputStream* stream;
	guint8* _tmp7_;
	guint8* buffer;
	gint buffer_length1;
	gint _buffer_size_;
	GFileInputStream* _tmp8_;
	guint8* _tmp9_;
	gint _tmp9__length1;
	gint i;
	gboolean _tmp10_;
	gboolean _tmp11_;
	gint _tmp12_;
	gint _tmp13_;
	guint8* _tmp14_;
	gint _tmp14__length1;
	gint _tmp15_;
	guint8 _tmp16_;
	RygelHTTPClient* _tmp17_;
	guint8* _tmp18_;
	gint _tmp18__length1;
	gint _tmp19_;
	guint8 _tmp20_;
	GError* e;
	GError* _error_;
	GError* _tmp21_;
	GError* _tmp22_;
	GMainLoop* _tmp23_;
	GError * _inner_error_;
};

typedef enum  {
	RYGEL_HTTP_REQUEST_ERROR_UNACCEPTABLE = SOUP_STATUS_NOT_ACCEPTABLE,
	RYGEL_HTTP_REQUEST_ERROR_BAD_REQUEST = SOUP_STATUS_BAD_REQUEST,
	RYGEL_HTTP_REQUEST_ERROR_NOT_FOUND = SOUP_STATUS_NOT_FOUND,
	RYGEL_HTTP_REQUEST_ERROR_INTERNAL_SERVER_ERROR = SOUP_STATUS_INTERNAL_SERVER_ERROR
} RygelHTTPRequestError;
#define RYGEL_HTTP_REQUEST_ERROR rygel_http_request_error_quark ()
struct _RygelHTTPClientPrivate {
	GCancellable* _cancellable;
};

struct _Block1Data {
	int _ref_count_;
	RygelHTTPClient * self;
	GSourceFunc run_continue;
	gpointer run_continue_target;
	GDestroyNotify run_continue_target_destroy_notify;
	gpointer _async_data_;
};

struct _RygelHttpClientRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelHTTPClient* self;
	Block1Data* _data1_;
	SoupMessage* _tmp0_;
	SoupMessageBody* _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	GUPnPContext* _tmp3_;
	SoupSession* _tmp4_;
	SoupSession* _tmp5_;
	SoupMessage* _tmp6_;
	SoupMessage* _tmp7_;
};

struct _RygelMediaContainerPrivate {
	gboolean vanish;
	gboolean error;
	GFileMonitor* monitor;
};

struct _Block2Data {
	int _ref_count_;
	RygelMediaContainer * self;
	GSourceFunc find_object_continue;
	gpointer find_object_continue_target;
	GDestroyNotify find_object_continue_target_destroy_notify;
	gpointer _async_data_;
};

typedef enum  {
	RYGEL_CONTENT_DIRECTORY_ERROR_INVALID_ARGS = 402
} RygelContentDirectoryError;
#define RYGEL_CONTENT_DIRECTORY_ERROR rygel_content_directory_error_quark ()
struct _RygelMediaContainerFindObjectData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelMediaContainer* self;
	gchar* item_id;
	GCancellable* cancellable;
	RygelMediaObject* result;
	Block2Data* _data2_;
	gboolean _tmp0_;
	const gchar* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* msg;
	GFile* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	GError* _tmp9_;
	gboolean _tmp10_;
	const gchar* _tmp11_;
	gboolean _tmp12_;
	gboolean _tmp13_;
	gboolean _tmp14_;
	const gchar* _tmp15_;
	gboolean _tmp16_;
	gboolean _tmp17_;
	GFile* _tmp18_;
	gboolean _tmp19_;
	const gchar* _tmp20_;
	gboolean _tmp21_;
	gboolean _tmp22_;
	const gchar* _tmp23_;
	RygelMediaItem* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	RygelMediaItem* _tmp27_;
	RygelMediaItem* _tmp28_;
	RygelMediaObject* _tmp29_;
	GError * _inner_error_;
};

struct _Block3Data {
	int _ref_count_;
	RygelMediaItem * self;
	GSourceFunc get_writable_continue;
	gpointer get_writable_continue_target;
	GDestroyNotify get_writable_continue_target_destroy_notify;
	gpointer _async_data_;
};

struct _RygelMediaItemGetWritableData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelMediaItem* self;
	GCancellable* cancellable;
	GFile* result;
	Block3Data* _data3_;
	const gchar* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	GFile* _tmp3_;
	GError * _inner_error_;
};

struct _RygelHTTPResponse {
	GObject parent_instance;
	RygelHTTPResponsePrivate * priv;
};

struct _RygelHTTPResponseClass {
	GObjectClass parent_class;
};

struct _RygelHTTPResponsePrivate {
	GCancellable* _cancellable;
	SoupMessage* msg;
	SoupServer* server;
};

struct _RygelHTTPRequest {
	GObject parent_instance;
	RygelHTTPRequestPrivate * priv;
	RygelHTTPServer* http_server;
	SoupServer* server;
	SoupMessage* msg;
	RygelHTTPItemURI* uri;
	RygelMediaObject* object;
	RygelClientHacks* hack;
};

struct _RygelHTTPRequestClass {
	GObjectClass parent_class;
	void (*handle) (RygelHTTPRequest* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*handle_finish) (RygelHTTPRequest* self, GAsyncResult* _res_, GError** error);
	void (*find_item) (RygelHTTPRequest* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*find_item_finish) (RygelHTTPRequest* self, GAsyncResult* _res_, GError** error);
};

struct _Block4Data {
	int _ref_count_;
	RygelHTTPResponse * self;
	GSourceFunc run_continue;
	gpointer run_continue_target;
	GDestroyNotify run_continue_target_destroy_notify;
	gpointer _async_data_;
};

struct _RygelHttpResponseRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelHTTPResponse* self;
	Block4Data* _data4_;
	SoupMessage* _tmp0_;
	SoupServer* _tmp1_;
	SoupMessage* _tmp2_;
};

struct _RygelObjectRemovalQueue {
	GObject parent_instance;
	RygelObjectRemovalQueuePrivate * priv;
};

struct _RygelObjectRemovalQueueClass {
	GObjectClass parent_class;
};

struct _RygelObjectRemovalQueueRemoveNowData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelObjectRemovalQueue* self;
	RygelMediaObject* item;
	GCancellable* cancellable;
};

struct _RygelThumbnail {
	GObject parent_instance;
	RygelThumbnailPrivate * priv;
	gchar* file_extension;
};

struct _RygelThumbnailClass {
	GObjectClass parent_class;
};

struct _RygelVisualItem {
	RygelMediaItem parent_instance;
	RygelVisualItemPrivate * priv;
	GeeArrayList* thumbnails;
};

struct _RygelVisualItemClass {
	RygelMediaItemClass parent_class;
};

struct _RygelSubtitle {
	GObject parent_instance;
	RygelSubtitlePrivate * priv;
	gchar* caption_type;
};

struct _RygelSubtitleClass {
	GObjectClass parent_class;
};

struct _RygelVideoItem {
	RygelVisualItem parent_instance;
	RygelVideoItemPrivate * priv;
	GeeArrayList* subtitles;
};

struct _RygelVideoItemClass {
	RygelVisualItemClass parent_class;
};

struct _RygelMusicItem {
	RygelMediaItem parent_instance;
	RygelMusicItemPrivate * priv;
	RygelThumbnail* album_art;
};

struct _RygelMusicItemClass {
	RygelMediaItemClass parent_class;
};

struct _RygelTranscoder {
	GObject parent_instance;
	RygelTranscoderPrivate * priv;
};

struct _RygelTranscoderClass {
	GObjectClass parent_class;
};

struct _RygelTranscoderPrivate {
	gchar* _extension;
};


static gpointer rygel_client_hacks_parent_class = NULL;
static gpointer rygel_test_request_factory_parent_class = NULL;
static gpointer rygel_http_post_test_parent_class = NULL;
static gpointer rygel_http_server_parent_class = NULL;
static gpointer rygel_http_client_parent_class = NULL;
static RygelStateMachineIface* rygel_http_client_rygel_state_machine_parent_iface = NULL;
static gpointer rygel_media_container_parent_class = NULL;
static gpointer rygel_media_item_parent_class = NULL;
static gpointer rygel_http_response_parent_class = NULL;
static RygelStateMachineIface* rygel_http_response_rygel_state_machine_parent_iface = NULL;
static gpointer rygel_object_removal_queue_parent_class = NULL;
static gpointer rygel_media_object_parent_class = NULL;
static gpointer rygel_thumbnail_parent_class = NULL;
static gpointer rygel_visual_item_parent_class = NULL;
static gpointer rygel_subtitle_parent_class = NULL;
static gpointer rygel_video_item_parent_class = NULL;
static gpointer rygel_music_item_parent_class = NULL;
static gpointer rygel_transcoder_parent_class = NULL;

GQuark rygel_test_error_quark (void);
GQuark rygel_client_hacks_error_quark (void);
gpointer rygel_client_hacks_ref (gpointer instance);
void rygel_client_hacks_unref (gpointer instance);
GParamSpec* rygel_param_spec_client_hacks (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void rygel_value_set_client_hacks (GValue* value, gpointer v_object);
void rygel_value_take_client_hacks (GValue* value, gpointer v_object);
gpointer rygel_value_get_client_hacks (const GValue* value);
GType rygel_client_hacks_get_type (void) G_GNUC_CONST;
enum  {
	RYGEL_CLIENT_HACKS_DUMMY_PROPERTY
};
RygelClientHacks* rygel_client_hacks_create (SoupMessage* message, GError** error);
GType rygel_media_object_get_type (void) G_GNUC_CONST;
GType rygel_media_item_get_type (void) G_GNUC_CONST;
void rygel_client_hacks_apply (RygelClientHacks* self, RygelMediaItem* item);
RygelClientHacks* rygel_client_hacks_new (void);
RygelClientHacks* rygel_client_hacks_construct (GType object_type);
static void rygel_client_hacks_finalize (RygelClientHacks* obj);
gpointer rygel_test_request_factory_ref (gpointer instance);
void rygel_test_request_factory_unref (gpointer instance);
GParamSpec* rygel_param_spec_test_request_factory (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void rygel_value_set_test_request_factory (GValue* value, gpointer v_object);
void rygel_value_take_test_request_factory (GValue* value, gpointer v_object);
gpointer rygel_value_get_test_request_factory (const GValue* value);
GType rygel_test_request_factory_get_type (void) G_GNUC_CONST;
enum  {
	RYGEL_TEST_REQUEST_FACTORY_DUMMY_PROPERTY
};
RygelTestRequestFactory* rygel_test_request_factory_new (SoupMessage* msg, SoupKnownStatusCode* expected_code, gboolean cancel);
RygelTestRequestFactory* rygel_test_request_factory_construct (GType object_type, SoupMessage* msg, SoupKnownStatusCode* expected_code, gboolean cancel);
static SoupKnownStatusCode* _soup_known_status_code_dup (SoupKnownStatusCode* self);
GType rygel_http_server_get_type (void) G_GNUC_CONST;
GType rygel_http_request_get_type (void) G_GNUC_CONST;
GType rygel_http_post_get_type (void) G_GNUC_CONST;
RygelHTTPPost* rygel_test_request_factory_create_post (RygelTestRequestFactory* self, RygelHTTPServer* http_server, SoupServer* server, SoupMessage* msg);
RygelHTTPPost* rygel_http_post_new (RygelHTTPServer* http_server, SoupServer* server, SoupMessage* msg);
RygelHTTPPost* rygel_http_post_construct (GType object_type, RygelHTTPServer* http_server, SoupServer* server, SoupMessage* msg);
static void rygel_test_request_factory_finalize (RygelTestRequestFactory* obj);
GType rygel_http_post_test_get_type (void) G_GNUC_CONST;
GType rygel_http_client_get_type (void) G_GNUC_CONST;
#define RYGEL_HTTP_POST_TEST_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RYGEL_TYPE_HTTP_POST_TEST, RygelHTTPPostTestPrivate))
enum  {
	RYGEL_HTTP_POST_TEST_DUMMY_PROPERTY
};
gint rygel_http_post_test_main (gchar** args, int args_length1);
RygelHTTPPostTest* rygel_http_post_test_new (GError** error);
RygelHTTPPostTest* rygel_http_post_test_construct (GType object_type, GError** error);
void rygel_http_post_test_run (RygelHTTPPostTest* self, GError** error);
RygelHTTPServer* rygel_http_server_new (GError** error);
RygelHTTPServer* rygel_http_server_construct (GType object_type, GError** error);
GType rygel_media_container_get_type (void) G_GNUC_CONST;
RygelHTTPClient* rygel_http_client_new (GUPnPContext* context);
RygelHTTPClient* rygel_http_client_construct (GType object_type, GUPnPContext* context);
static void rygel_http_post_test_create_test_messages (RygelHTTPPostTest* self);
static void rygel_http_post_test_real_run (RygelHTTPPostTest* self, GError** error);
#define RYGEL_MEDIA_ITEM_URI "file:///tmp/rygel-upload-test.wav"
static gboolean rygel_http_post_test_on_timeout (RygelHTTPPostTest* self);
static gboolean _rygel_http_post_test_on_timeout_gsource_func (gpointer self);
static void rygel_http_post_test_on_message_received (RygelHTTPPostTest* self, RygelHTTPServer* server, SoupMessage* msg);
static void _rygel_http_post_test_on_message_received_rygel_http_server_message_received (RygelHTTPServer* _sender, SoupMessage* message, gpointer self);
GType rygel_state_machine_get_type (void) G_GNUC_CONST;
static void rygel_http_post_test_on_client_completed (RygelHTTPPostTest* self, RygelStateMachine* client);
static void _rygel_http_post_test_on_client_completed_rygel_state_machine_completed (RygelStateMachine* _sender, gpointer self);
static void rygel_http_post_test_start_next_test_request (RygelHTTPPostTest* self);
gchar* rygel_http_server_get_uri (RygelHTTPServer* self);
gchar* rygel_http_server_create_uri (RygelHTTPServer* self, const gchar* item_id);
static RygelHTTPRequest* rygel_http_post_test_create_request (RygelHTTPPostTest* self, SoupMessage* msg, GError** error);
void rygel_state_machine_run (RygelStateMachine* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void rygel_state_machine_run_finish (RygelStateMachine* self, GAsyncResult* _res_);
static void rygel_http_post_test_handle_client_message (RygelHTTPPostTest* self, SoupMessage* msg, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void rygel_http_post_test_handle_client_message_finish (RygelHTTPPostTest* self, GAsyncResult* _res_);
static void rygel_http_post_test_handle_client_message_data_free (gpointer _data);
static gboolean rygel_http_post_test_handle_client_message_co (RygelHttpPostTestHandleClientMessageData* _data_);
GCancellable* rygel_state_machine_get_cancellable (RygelStateMachine* self);
static void rygel_http_post_test_handle_client_message_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void rygel_http_post_test_check_result (RygelHTTPPostTest* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void rygel_http_post_test_check_result_finish (RygelHTTPPostTest* self, GAsyncResult* _res_);
static void rygel_http_post_test_check_result_data_free (gpointer _data);
static gboolean rygel_http_post_test_check_result_co (RygelHttpPostTestCheckResultData* _data_);
static void rygel_http_post_test_check_result_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
#define RYGEL_HTTP_CLIENT_LENGTH ((gsize) 1024)
static void rygel_http_post_test_finalize (GObject* obj);
enum  {
	RYGEL_HTTP_SERVER_DUMMY_PROPERTY,
	RYGEL_HTTP_SERVER_PATH_ROOT,
	RYGEL_HTTP_SERVER_URI
};
#define RYGEL_HTTP_SERVER_SERVER_PATH "/RygelHTTPServer/Rygel/Test"
RygelMediaItem* rygel_media_item_new (const gchar* id, RygelMediaContainer* parent);
RygelMediaItem* rygel_media_item_construct (GType object_type, const gchar* id, RygelMediaContainer* parent);
RygelHTTPItemURI* rygel_http_item_uri_new (RygelMediaObject* object, RygelHTTPServer* http_server, gint thumbnail_index, gint subtitle_index, const gchar* transcode_target, const gchar* playlist_format);
RygelHTTPItemURI* rygel_http_item_uri_construct (GType object_type, RygelMediaObject* object, RygelHTTPServer* http_server, gint thumbnail_index, gint subtitle_index, const gchar* transcode_target, const gchar* playlist_format);
GType rygel_http_item_uri_get_type (void) G_GNUC_CONST;
gchar* rygel_http_item_uri_to_string (RygelHTTPItemURI* self);
static void rygel_http_server_on_request_started (RygelHTTPServer* self, SoupServer* server, SoupMessage* msg, SoupClientContext* client);
static void _rygel_http_server_on_request_started_soup_server_request_started (SoupServer* _sender, SoupMessage* msg, SoupClientContext* client, gpointer self);
RygelMediaContainer* rygel_media_container_new (void);
RygelMediaContainer* rygel_media_container_construct (GType object_type);
static void rygel_http_server_on_got_headers (RygelHTTPServer* self, SoupMessage* msg);
static void _rygel_http_server_on_got_headers_soup_message_got_headers (SoupMessage* _sender, gpointer self);
GType rygel_transcoder_get_type (void) G_GNUC_CONST;
RygelTranscoder* rygel_http_server_get_transcoder (RygelHTTPServer* self, const gchar* target, GError** error);
RygelTranscoder* rygel_transcoder_new (const gchar* extension);
RygelTranscoder* rygel_transcoder_construct (GType object_type, const gchar* extension);
GQuark rygel_http_request_error_quark (void);
const gchar* rygel_http_server_get_path_root (RygelHTTPServer* self);
#define RYGEL_MEDIA_CONTAINER_ITEM_ID "TestItem"
static void rygel_http_server_finalize (GObject* obj);
static void _vala_rygel_http_server_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
#define RYGEL_HTTP_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RYGEL_TYPE_HTTP_CLIENT, RygelHTTPClientPrivate))
enum  {
	RYGEL_HTTP_CLIENT_DUMMY_PROPERTY,
	RYGEL_HTTP_CLIENT_CANCELLABLE
};
static void rygel_http_client_real_run_data_free (gpointer _data);
static void rygel_http_client_real_run (RygelStateMachine* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean rygel_http_client_real_run_co (RygelHttpClientRunData* _data_);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static gboolean _rygel_http_client_real_run_co_gsource_func (gpointer self);
static void __lambda6_ (Block1Data* _data1_, SoupSession* session, SoupMessage* msg);
static void ___lambda6__soup_session_callback (SoupSession* session, SoupMessage* msg, gpointer self);
static void rygel_http_client_finalize (GObject* obj);
static void _vala_rygel_http_client_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
void rygel_state_machine_set_cancellable (RygelStateMachine* self, GCancellable* value);
static void _vala_rygel_http_client_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
#define RYGEL_MEDIA_CONTAINER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RYGEL_TYPE_MEDIA_CONTAINER, RygelMediaContainerPrivate))
enum  {
	RYGEL_MEDIA_CONTAINER_DUMMY_PROPERTY
};
RygelMediaObject* rygel_media_object_new (void);
RygelMediaObject* rygel_media_object_construct (GType object_type);
void rygel_media_container_on_file_changed (RygelMediaContainer* self, GFileMonitor* monitor, GFile* file, GFile* other_file, GFileMonitorEvent event_type);
static void _rygel_media_container_on_file_changed_g_file_monitor_changed (GFileMonitor* _sender, GFile* file, GFile* other_file, GFileMonitorEvent event_type, gpointer self);
static void rygel_media_container_find_object_data_free (gpointer _data);
void rygel_media_container_find_object (RygelMediaContainer* self, const gchar* item_id, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
RygelMediaObject* rygel_media_container_find_object_finish (RygelMediaContainer* self, GAsyncResult* _res_, GError** error);
static gboolean rygel_media_container_find_object_co (RygelMediaContainerFindObjectData* _data_);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static gboolean _rygel_media_container_find_object_co_gsource_func (gpointer self);
static gboolean __lambda2_ (Block2Data* _data2_);
static gboolean ___lambda2__gsource_func (gpointer self);
GQuark rygel_content_directory_error_quark (void);
static void rygel_media_container_finalize (GObject* obj);
enum  {
	RYGEL_MEDIA_ITEM_DUMMY_PROPERTY
};
RygelMediaItem* rygel_media_item_new_for_visual_item (void);
RygelMediaItem* rygel_media_item_construct_for_visual_item (GType object_type);
static void rygel_media_item_get_writable_data_free (gpointer _data);
void rygel_media_item_get_writable (RygelMediaItem* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
GFile* rygel_media_item_get_writable_finish (RygelMediaItem* self, GAsyncResult* _res_, GError** error);
static gboolean rygel_media_item_get_writable_co (RygelMediaItemGetWritableData* _data_);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static gboolean _rygel_media_item_get_writable_co_gsource_func (gpointer self);
static gboolean __lambda3_ (Block3Data* _data3_);
static gboolean ___lambda3__gsource_func (gpointer self);
static void rygel_media_item_finalize (GObject* obj);
GType rygel_http_response_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_CANCELLABLE
};
RygelHTTPResponse* rygel_http_response_new (RygelHTTPPost* get_request);
RygelHTTPResponse* rygel_http_response_construct (GType object_type, RygelHTTPPost* get_request);
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_);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (void * _userdata_);
static gboolean _rygel_http_response_real_run_co_gsource_func (gpointer self);
static gboolean __lambda7_ (Block4Data* _data4_);
static gboolean ___lambda7__gsource_func (gpointer 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);
GType rygel_object_removal_queue_get_type (void) G_GNUC_CONST;
enum  {
	RYGEL_OBJECT_REMOVAL_QUEUE_DUMMY_PROPERTY
};
RygelObjectRemovalQueue* rygel_object_removal_queue_get_default (void);
RygelObjectRemovalQueue* rygel_object_removal_queue_new (void);
RygelObjectRemovalQueue* rygel_object_removal_queue_construct (GType object_type);
gboolean rygel_object_removal_queue_dequeue (RygelObjectRemovalQueue* self, RygelMediaObject* item);
static void rygel_object_removal_queue_remove_now_data_free (gpointer _data);
void rygel_object_removal_queue_remove_now (RygelObjectRemovalQueue* self, RygelMediaObject* item, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void rygel_object_removal_queue_remove_now_finish (RygelObjectRemovalQueue* self, GAsyncResult* _res_);
static gboolean rygel_object_removal_queue_remove_now_co (RygelObjectRemovalQueueRemoveNowData* _data_);
static gboolean _rygel_object_removal_queue_remove_now_co_gsource_func (gpointer self);
enum  {
	RYGEL_MEDIA_OBJECT_DUMMY_PROPERTY
};
static void rygel_media_object_finalize (GObject* obj);
GType rygel_thumbnail_get_type (void) G_GNUC_CONST;
enum  {
	RYGEL_THUMBNAIL_DUMMY_PROPERTY
};
RygelThumbnail* rygel_thumbnail_new (void);
RygelThumbnail* rygel_thumbnail_construct (GType object_type);
static void rygel_thumbnail_finalize (GObject* obj);
GType rygel_visual_item_get_type (void) G_GNUC_CONST;
enum  {
	RYGEL_VISUAL_ITEM_DUMMY_PROPERTY
};
RygelVisualItem* rygel_visual_item_new (void);
RygelVisualItem* rygel_visual_item_construct (GType object_type);
static void rygel_visual_item_finalize (GObject* obj);
GType rygel_subtitle_get_type (void) G_GNUC_CONST;
enum  {
	RYGEL_SUBTITLE_DUMMY_PROPERTY
};
RygelSubtitle* rygel_subtitle_new (void);
RygelSubtitle* rygel_subtitle_construct (GType object_type);
static void rygel_subtitle_finalize (GObject* obj);
GType rygel_video_item_get_type (void) G_GNUC_CONST;
enum  {
	RYGEL_VIDEO_ITEM_DUMMY_PROPERTY
};
RygelVideoItem* rygel_video_item_new (void);
RygelVideoItem* rygel_video_item_construct (GType object_type);
static void rygel_video_item_finalize (GObject* obj);
GType rygel_music_item_get_type (void) G_GNUC_CONST;
enum  {
	RYGEL_MUSIC_ITEM_DUMMY_PROPERTY
};
RygelMusicItem* rygel_music_item_new (const gchar* id, RygelMediaContainer* parent);
RygelMusicItem* rygel_music_item_construct (GType object_type, const gchar* id, RygelMediaContainer* parent);
static void rygel_music_item_finalize (GObject* obj);
#define RYGEL_TRANSCODER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RYGEL_TYPE_TRANSCODER, RygelTranscoderPrivate))
enum  {
	RYGEL_TRANSCODER_DUMMY_PROPERTY,
	RYGEL_TRANSCODER_EXTENSION
};
void rygel_transcoder_set_extension (RygelTranscoder* self, const gchar* value);
const gchar* rygel_transcoder_get_extension (RygelTranscoder* self);
static void rygel_transcoder_finalize (GObject* obj);
static void _vala_rygel_transcoder_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_rygel_transcoder_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


GQuark rygel_test_error_quark (void) {
	return g_quark_from_static_string ("rygel_test_error-quark");
}


GQuark rygel_client_hacks_error_quark (void) {
	return g_quark_from_static_string ("rygel_client_hacks_error-quark");
}


RygelClientHacks* rygel_client_hacks_create (SoupMessage* message, GError** error) {
	RygelClientHacks* result = NULL;
	GError* _tmp0_;
	GError * _inner_error_ = NULL;
	_tmp0_ = g_error_new_literal (RYGEL_CLIENT_HACKS_ERROR, RYGEL_CLIENT_HACKS_ERROR_NA, "");
	_inner_error_ = _tmp0_;
	g_propagate_error (error, _inner_error_);
	return NULL;
	return result;
}


void rygel_client_hacks_apply (RygelClientHacks* self, RygelMediaItem* item) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
}


RygelClientHacks* rygel_client_hacks_construct (GType object_type) {
	RygelClientHacks* self = NULL;
	self = (RygelClientHacks*) g_type_create_instance (object_type);
	return self;
}


RygelClientHacks* rygel_client_hacks_new (void) {
	return rygel_client_hacks_construct (RYGEL_TYPE_CLIENT_HACKS);
}


static void rygel_value_client_hacks_init (GValue* value) {
	value->data[0].v_pointer = NULL;
}


static void rygel_value_client_hacks_free_value (GValue* value) {
	if (value->data[0].v_pointer) {
		rygel_client_hacks_unref (value->data[0].v_pointer);
	}
}


static void rygel_value_client_hacks_copy_value (const GValue* src_value, GValue* dest_value) {
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = rygel_client_hacks_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}


static gpointer rygel_value_client_hacks_peek_pointer (const GValue* value) {
	return value->data[0].v_pointer;
}


static gchar* rygel_value_client_hacks_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		RygelClientHacks* object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = rygel_client_hacks_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* rygel_value_client_hacks_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	RygelClientHacks** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = rygel_client_hacks_ref (value->data[0].v_pointer);
	}
	return NULL;
}


GParamSpec* rygel_param_spec_client_hacks (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	RygelParamSpecClientHacks* spec;
	g_return_val_if_fail (g_type_is_a (object_type, RYGEL_TYPE_CLIENT_HACKS), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}


gpointer rygel_value_get_client_hacks (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_TYPE_CLIENT_HACKS), NULL);
	return value->data[0].v_pointer;
}


void rygel_value_set_client_hacks (GValue* value, gpointer v_object) {
	RygelClientHacks* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_TYPE_CLIENT_HACKS));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, RYGEL_TYPE_CLIENT_HACKS));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		rygel_client_hacks_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		rygel_client_hacks_unref (old);
	}
}


void rygel_value_take_client_hacks (GValue* value, gpointer v_object) {
	RygelClientHacks* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_TYPE_CLIENT_HACKS));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, RYGEL_TYPE_CLIENT_HACKS));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		rygel_client_hacks_unref (old);
	}
}


static void rygel_client_hacks_class_init (RygelClientHacksClass * klass) {
	rygel_client_hacks_parent_class = g_type_class_peek_parent (klass);
	RYGEL_CLIENT_HACKS_CLASS (klass)->finalize = rygel_client_hacks_finalize;
}


static void rygel_client_hacks_instance_init (RygelClientHacks * self) {
	self->ref_count = 1;
}


static void rygel_client_hacks_finalize (RygelClientHacks* obj) {
	RygelClientHacks * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_CLIENT_HACKS, RygelClientHacks);
}


GType rygel_client_hacks_get_type (void) {
	static volatile gsize rygel_client_hacks_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_client_hacks_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { rygel_value_client_hacks_init, rygel_value_client_hacks_free_value, rygel_value_client_hacks_copy_value, rygel_value_client_hacks_peek_pointer, "p", rygel_value_client_hacks_collect_value, "p", rygel_value_client_hacks_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (RygelClientHacksClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_client_hacks_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelClientHacks), 0, (GInstanceInitFunc) rygel_client_hacks_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType rygel_client_hacks_type_id;
		rygel_client_hacks_type_id = g_type_register_fundamental (g_type_fundamental_next (), "RygelClientHacks", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&rygel_client_hacks_type_id__volatile, rygel_client_hacks_type_id);
	}
	return rygel_client_hacks_type_id__volatile;
}


gpointer rygel_client_hacks_ref (gpointer instance) {
	RygelClientHacks* self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}


void rygel_client_hacks_unref (gpointer instance) {
	RygelClientHacks* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		RYGEL_CLIENT_HACKS_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


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


static SoupKnownStatusCode* _soup_known_status_code_dup (SoupKnownStatusCode* self) {
	SoupKnownStatusCode* dup;
	dup = g_new0 (SoupKnownStatusCode, 1);
	memcpy (dup, self, sizeof (SoupKnownStatusCode));
	return dup;
}


static gpointer __soup_known_status_code_dup0 (gpointer self) {
	return self ? _soup_known_status_code_dup (self) : NULL;
}


RygelTestRequestFactory* rygel_test_request_factory_construct (GType object_type, SoupMessage* msg, SoupKnownStatusCode* expected_code, gboolean cancel) {
	RygelTestRequestFactory* self = NULL;
	SoupMessage* _tmp0_;
	SoupMessage* _tmp1_;
	SoupKnownStatusCode* _tmp2_;
	SoupKnownStatusCode* _tmp3_;
	gboolean _tmp4_;
	g_return_val_if_fail (msg != NULL, NULL);
	self = (RygelTestRequestFactory*) g_type_create_instance (object_type);
	_tmp0_ = msg;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->msg);
	self->msg = _tmp1_;
	_tmp2_ = expected_code;
	_tmp3_ = __soup_known_status_code_dup0 (_tmp2_);
	_g_free0 (self->expected_code);
	self->expected_code = _tmp3_;
	_tmp4_ = cancel;
	self->cancel = _tmp4_;
	return self;
}


RygelTestRequestFactory* rygel_test_request_factory_new (SoupMessage* msg, SoupKnownStatusCode* expected_code, gboolean cancel) {
	return rygel_test_request_factory_construct (RYGEL_TYPE_TEST_REQUEST_FACTORY, msg, expected_code, cancel);
}


RygelHTTPPost* rygel_test_request_factory_create_post (RygelTestRequestFactory* self, RygelHTTPServer* http_server, SoupServer* server, SoupMessage* msg) {
	RygelHTTPPost* result = NULL;
	RygelHTTPServer* _tmp0_;
	SoupServer* _tmp1_;
	SoupMessage* _tmp2_;
	RygelHTTPPost* _tmp3_;
	RygelHTTPPost* request;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (http_server != NULL, NULL);
	g_return_val_if_fail (server != NULL, NULL);
	g_return_val_if_fail (msg != NULL, NULL);
	_tmp0_ = http_server;
	_tmp1_ = server;
	_tmp2_ = msg;
	_tmp3_ = rygel_http_post_new (_tmp0_, _tmp1_, _tmp2_);
	request = _tmp3_;
	result = request;
	return result;
}


static void rygel_value_test_request_factory_init (GValue* value) {
	value->data[0].v_pointer = NULL;
}


static void rygel_value_test_request_factory_free_value (GValue* value) {
	if (value->data[0].v_pointer) {
		rygel_test_request_factory_unref (value->data[0].v_pointer);
	}
}


static void rygel_value_test_request_factory_copy_value (const GValue* src_value, GValue* dest_value) {
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = rygel_test_request_factory_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}


static gpointer rygel_value_test_request_factory_peek_pointer (const GValue* value) {
	return value->data[0].v_pointer;
}


static gchar* rygel_value_test_request_factory_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		RygelTestRequestFactory* object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = rygel_test_request_factory_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


static gchar* rygel_value_test_request_factory_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	RygelTestRequestFactory** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = rygel_test_request_factory_ref (value->data[0].v_pointer);
	}
	return NULL;
}


GParamSpec* rygel_param_spec_test_request_factory (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	RygelParamSpecTestRequestFactory* spec;
	g_return_val_if_fail (g_type_is_a (object_type, RYGEL_TYPE_TEST_REQUEST_FACTORY), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}


gpointer rygel_value_get_test_request_factory (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_TYPE_TEST_REQUEST_FACTORY), NULL);
	return value->data[0].v_pointer;
}


void rygel_value_set_test_request_factory (GValue* value, gpointer v_object) {
	RygelTestRequestFactory* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_TYPE_TEST_REQUEST_FACTORY));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, RYGEL_TYPE_TEST_REQUEST_FACTORY));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		rygel_test_request_factory_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		rygel_test_request_factory_unref (old);
	}
}


void rygel_value_take_test_request_factory (GValue* value, gpointer v_object) {
	RygelTestRequestFactory* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_TYPE_TEST_REQUEST_FACTORY));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, RYGEL_TYPE_TEST_REQUEST_FACTORY));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		rygel_test_request_factory_unref (old);
	}
}


static void rygel_test_request_factory_class_init (RygelTestRequestFactoryClass * klass) {
	rygel_test_request_factory_parent_class = g_type_class_peek_parent (klass);
	RYGEL_TEST_REQUEST_FACTORY_CLASS (klass)->finalize = rygel_test_request_factory_finalize;
}


static void rygel_test_request_factory_instance_init (RygelTestRequestFactory * self) {
	self->ref_count = 1;
}


static void rygel_test_request_factory_finalize (RygelTestRequestFactory* obj) {
	RygelTestRequestFactory * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_TEST_REQUEST_FACTORY, RygelTestRequestFactory);
	_g_object_unref0 (self->msg);
	_g_free0 (self->expected_code);
}


GType rygel_test_request_factory_get_type (void) {
	static volatile gsize rygel_test_request_factory_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_test_request_factory_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { rygel_value_test_request_factory_init, rygel_value_test_request_factory_free_value, rygel_value_test_request_factory_copy_value, rygel_value_test_request_factory_peek_pointer, "p", rygel_value_test_request_factory_collect_value, "p", rygel_value_test_request_factory_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (RygelTestRequestFactoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_test_request_factory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelTestRequestFactory), 0, (GInstanceInitFunc) rygel_test_request_factory_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType rygel_test_request_factory_type_id;
		rygel_test_request_factory_type_id = g_type_register_fundamental (g_type_fundamental_next (), "RygelTestRequestFactory", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&rygel_test_request_factory_type_id__volatile, rygel_test_request_factory_type_id);
	}
	return rygel_test_request_factory_type_id__volatile;
}


gpointer rygel_test_request_factory_ref (gpointer instance) {
	RygelTestRequestFactory* self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}


void rygel_test_request_factory_unref (gpointer instance) {
	RygelTestRequestFactory* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		RYGEL_TEST_REQUEST_FACTORY_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}


gint rygel_http_post_test_main (gchar** args, int args_length1) {
	gint result = 0;
	GError * _inner_error_ = NULL;
	{
		RygelHTTPPostTest* _tmp0_;
		RygelHTTPPostTest* test;
		RygelHTTPPostTest* _tmp1_;
		_tmp0_ = rygel_http_post_test_new (&_inner_error_);
		test = _tmp0_;
		if (_inner_error_ != NULL) {
			if (g_error_matches (_inner_error_, RYGEL_TEST_ERROR, RYGEL_TEST_ERROR_SKIP)) {
				goto __catch0_rygel_test_error_skip;
			}
			goto __catch0_g_error;
		}
		_tmp1_ = test;
		rygel_http_post_test_run (_tmp1_, &_inner_error_);
		if (_inner_error_ != NULL) {
			_g_object_unref0 (test);
			if (g_error_matches (_inner_error_, RYGEL_TEST_ERROR, RYGEL_TEST_ERROR_SKIP)) {
				goto __catch0_rygel_test_error_skip;
			}
			goto __catch0_g_error;
		}
		_g_object_unref0 (test);
	}
	goto __finally0;
	__catch0_rygel_test_error_skip:
	{
		GError* _error_ = NULL;
		GError* _tmp2_;
		gint _tmp3_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp2_ = _error_;
		_tmp3_ = _tmp2_->code;
		result = _tmp3_;
		_g_error_free0 (_error_);
		return result;
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp4_;
		const gchar* _tmp5_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp4_ = _error_;
		_tmp5_ = _tmp4_->message;
		g_critical ("rygel-http-post-test.vala:88: %s", _tmp5_);
		result = -1;
		_g_error_free0 (_error_);
		return result;
	}
	__finally0:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return 0;
	}
	result = 0;
	return result;
}


int main (int argc, char ** argv) {
	g_type_init ();
	return rygel_http_post_test_main (argv, argc);
}


RygelHTTPPostTest* rygel_http_post_test_construct (GType object_type, GError** error) {
	RygelHTTPPostTest * self = NULL;
	RygelHTTPServer* _tmp0_;
	RygelHTTPServer* _tmp1_;
	RygelHTTPServer* _tmp2_;
	GUPnPContext* _tmp3_;
	RygelHTTPClient* _tmp4_;
	GMainLoop* _tmp5_;
	GError * _inner_error_ = NULL;
	self = (RygelHTTPPostTest*) g_object_new (object_type, NULL);
	_tmp0_ = rygel_http_server_new (&_inner_error_);
	_tmp1_ = _tmp0_;
	if (_inner_error_ != NULL) {
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (self);
		return NULL;
	}
	_g_object_unref0 (self->server);
	self->server = _tmp1_;
	_tmp2_ = self->server;
	_tmp3_ = _tmp2_->context;
	_tmp4_ = rygel_http_client_new (_tmp3_);
	_g_object_unref0 (self->client);
	self->client = _tmp4_;
	_tmp5_ = g_main_loop_new (NULL, FALSE);
	_g_main_loop_unref0 (self->priv->main_loop);
	self->priv->main_loop = _tmp5_;
	rygel_http_post_test_create_test_messages (self);
	return self;
}


RygelHTTPPostTest* rygel_http_post_test_new (GError** error) {
	return rygel_http_post_test_construct (RYGEL_TYPE_HTTP_POST_TEST, error);
}


static gboolean _rygel_http_post_test_on_timeout_gsource_func (gpointer self) {
	gboolean result;
	result = rygel_http_post_test_on_timeout (self);
	return result;
}


static void _rygel_http_post_test_on_message_received_rygel_http_server_message_received (RygelHTTPServer* _sender, SoupMessage* message, gpointer self) {
	rygel_http_post_test_on_message_received (self, _sender, message);
}


static void _rygel_http_post_test_on_client_completed_rygel_state_machine_completed (RygelStateMachine* _sender, gpointer self) {
	rygel_http_post_test_on_client_completed (self, _sender);
}


static gpointer _g_error_copy0 (gpointer self) {
	return self ? g_error_copy (self) : NULL;
}


static void rygel_http_post_test_real_run (RygelHTTPPostTest* self, GError** error) {
	GFile* _tmp0_ = NULL;
	GFile* file;
	GFile* _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_;
	RygelHTTPServer* _tmp4_;
	RygelHTTPClient* _tmp5_;
	GMainLoop* _tmp6_;
	GError* _tmp7_;
	GError * _inner_error_ = NULL;
	_tmp0_ = g_file_new_for_uri (RYGEL_MEDIA_ITEM_URI);
	file = _tmp0_;
	_tmp1_ = file;
	_tmp2_ = g_file_get_path (_tmp1_);
	_tmp3_ = _tmp2_;
	g_remove (_tmp3_);
	_g_free0 (_tmp3_);
	g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, (guint) 3, _rygel_http_post_test_on_timeout_gsource_func, g_object_ref (self), g_object_unref);
	_tmp4_ = self->server;
	g_signal_connect_object (_tmp4_, "message-received", (GCallback) _rygel_http_post_test_on_message_received_rygel_http_server_message_received, self, 0);
	_tmp5_ = self->client;
	g_signal_connect_object ((RygelStateMachine*) _tmp5_, "completed", (GCallback) _rygel_http_post_test_on_client_completed_rygel_state_machine_completed, self, 0);
	rygel_http_post_test_start_next_test_request (self);
	_tmp6_ = self->priv->main_loop;
	g_main_loop_run (_tmp6_);
	_tmp7_ = self->priv->error;
	if (_tmp7_ != NULL) {
		GError* _tmp8_;
		GError* _tmp9_;
		_tmp8_ = self->priv->error;
		_tmp9_ = _g_error_copy0 (_tmp8_);
		_inner_error_ = _tmp9_;
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (file);
		return;
	}
	_g_object_unref0 (file);
}


void rygel_http_post_test_run (RygelHTTPPostTest* self, GError** error) {
	g_return_if_fail (self != NULL);
	RYGEL_HTTP_POST_TEST_GET_CLASS (self)->run (self, error);
}


static void rygel_http_post_test_create_test_messages (RygelHTTPPostTest* self) {
	GeeArrayList* _tmp0_;
	RygelHTTPServer* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	SoupMessage* _tmp5_;
	SoupMessage* _tmp6_;
	SoupMessage* request;
	GeeArrayList* _tmp7_;
	SoupMessage* _tmp8_;
	SoupKnownStatusCode _tmp9_;
	RygelTestRequestFactory* _tmp10_;
	RygelTestRequestFactory* _tmp11_;
	RygelHTTPServer* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	SoupMessage* _tmp16_;
	GeeArrayList* _tmp17_;
	SoupMessage* _tmp18_;
	SoupKnownStatusCode _tmp19_;
	RygelTestRequestFactory* _tmp20_;
	RygelTestRequestFactory* _tmp21_;
	RygelHTTPServer* _tmp22_;
	gchar* _tmp23_ = NULL;
	gchar* _tmp24_;
	SoupMessage* _tmp25_;
	GeeArrayList* _tmp26_;
	SoupMessage* _tmp27_;
	SoupKnownStatusCode _tmp28_;
	RygelTestRequestFactory* _tmp29_;
	RygelTestRequestFactory* _tmp30_;
	RygelHTTPServer* _tmp31_;
	gchar* _tmp32_ = NULL;
	gchar* _tmp33_;
	SoupMessage* _tmp34_;
	GeeArrayList* _tmp35_;
	SoupMessage* _tmp36_;
	SoupKnownStatusCode _tmp37_;
	RygelTestRequestFactory* _tmp38_;
	RygelTestRequestFactory* _tmp39_;
	RygelHTTPServer* _tmp40_;
	gchar* _tmp41_ = NULL;
	gchar* _tmp42_;
	SoupMessage* _tmp43_;
	GeeArrayList* _tmp44_;
	SoupMessage* _tmp45_;
	SoupKnownStatusCode _tmp46_;
	RygelTestRequestFactory* _tmp47_;
	RygelTestRequestFactory* _tmp48_;
	RygelHTTPServer* _tmp49_;
	gchar* _tmp50_ = NULL;
	gchar* _tmp51_;
	SoupMessage* _tmp52_;
	GeeArrayList* _tmp53_;
	SoupMessage* _tmp54_;
	SoupKnownStatusCode _tmp55_;
	RygelTestRequestFactory* _tmp56_;
	RygelTestRequestFactory* _tmp57_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gee_array_list_new (RYGEL_TYPE_TEST_REQUEST_FACTORY, (GBoxedCopyFunc) rygel_test_request_factory_ref, rygel_test_request_factory_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->requests);
	self->priv->requests = _tmp0_;
	_tmp1_ = self->server;
	_tmp2_ = rygel_http_server_get_uri (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	_tmp5_ = soup_message_new ("POST", _tmp4_);
	_tmp6_ = _tmp5_;
	_g_free0 (_tmp4_);
	request = _tmp6_;
	_tmp7_ = self->priv->requests;
	_tmp8_ = request;
	_tmp9_ = SOUP_STATUS_OK;
	_tmp10_ = rygel_test_request_factory_new (_tmp8_, &_tmp9_, FALSE);
	_tmp11_ = _tmp10_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp7_, _tmp11_);
	_rygel_test_request_factory_unref0 (_tmp11_);
	_tmp12_ = self->server;
	_tmp13_ = rygel_http_server_get_uri (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = _tmp14_;
	_tmp16_ = soup_message_new ("POST", _tmp15_);
	_g_object_unref0 (request);
	request = _tmp16_;
	_g_free0 (_tmp15_);
	_tmp17_ = self->priv->requests;
	_tmp18_ = request;
	_tmp19_ = SOUP_STATUS_NOT_FOUND;
	_tmp20_ = rygel_test_request_factory_new (_tmp18_, &_tmp19_, FALSE);
	_tmp21_ = _tmp20_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp17_, _tmp21_);
	_rygel_test_request_factory_unref0 (_tmp21_);
	_tmp22_ = self->server;
	_tmp23_ = rygel_http_server_create_uri (_tmp22_, "NullItem");
	_tmp24_ = _tmp23_;
	_tmp25_ = soup_message_new ("POST", _tmp24_);
	_g_object_unref0 (request);
	request = _tmp25_;
	_g_free0 (_tmp24_);
	_tmp26_ = self->priv->requests;
	_tmp27_ = request;
	_tmp28_ = SOUP_STATUS_BAD_REQUEST;
	_tmp29_ = rygel_test_request_factory_new (_tmp27_, &_tmp28_, FALSE);
	_tmp30_ = _tmp29_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp26_, _tmp30_);
	_rygel_test_request_factory_unref0 (_tmp30_);
	_tmp31_ = self->server;
	_tmp32_ = rygel_http_server_create_uri (_tmp31_, "ErrorItem");
	_tmp33_ = _tmp32_;
	_tmp34_ = soup_message_new ("POST", _tmp33_);
	_g_object_unref0 (request);
	request = _tmp34_;
	_g_free0 (_tmp33_);
	_tmp35_ = self->priv->requests;
	_tmp36_ = request;
	_tmp37_ = SOUP_STATUS_OK;
	_tmp38_ = rygel_test_request_factory_new (_tmp36_, &_tmp37_, FALSE);
	_tmp39_ = _tmp38_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp35_, _tmp39_);
	_rygel_test_request_factory_unref0 (_tmp39_);
	_tmp40_ = self->server;
	_tmp41_ = rygel_http_server_create_uri (_tmp40_, "CancelItem");
	_tmp42_ = _tmp41_;
	_tmp43_ = soup_message_new ("POST", _tmp42_);
	_g_object_unref0 (request);
	request = _tmp43_;
	_g_free0 (_tmp42_);
	_tmp44_ = self->priv->requests;
	_tmp45_ = request;
	_tmp46_ = SOUP_STATUS_OK;
	_tmp47_ = rygel_test_request_factory_new (_tmp45_, &_tmp46_, TRUE);
	_tmp48_ = _tmp47_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp44_, _tmp48_);
	_rygel_test_request_factory_unref0 (_tmp48_);
	_tmp49_ = self->server;
	_tmp50_ = rygel_http_server_create_uri (_tmp49_, "VanishingItem");
	_tmp51_ = _tmp50_;
	_tmp52_ = soup_message_new ("POST", _tmp51_);
	_g_object_unref0 (request);
	request = _tmp52_;
	_g_free0 (_tmp51_);
	_tmp53_ = self->priv->requests;
	_tmp54_ = request;
	_tmp55_ = SOUP_STATUS_OK;
	_tmp56_ = rygel_test_request_factory_new (_tmp54_, &_tmp55_, FALSE);
	_tmp57_ = _tmp56_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp53_, _tmp57_);
	_rygel_test_request_factory_unref0 (_tmp57_);
	_g_object_unref0 (request);
}


static RygelHTTPRequest* rygel_http_post_test_create_request (RygelHTTPPostTest* self, SoupMessage* msg, GError** error) {
	RygelHTTPRequest* result = NULL;
	RygelHTTPServer* _tmp0_;
	GUPnPContext* _tmp1_;
	SoupServer* _tmp2_;
	SoupServer* _tmp3_;
	SoupServer* _tmp4_;
	SoupServer* srv;
	RygelTestRequestFactory* _tmp5_;
	RygelHTTPServer* _tmp6_;
	SoupMessage* _tmp7_;
	RygelHTTPPost* _tmp8_ = NULL;
	RygelHTTPPost* request;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (msg != NULL, NULL);
	_tmp0_ = self->server;
	_tmp1_ = _tmp0_->context;
	_tmp2_ = gupnp_context_get_server (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	srv = _tmp4_;
	_tmp5_ = self->priv->current_request;
	_tmp6_ = self->server;
	_tmp7_ = msg;
	_tmp8_ = rygel_test_request_factory_create_post (_tmp5_, _tmp6_, srv, _tmp7_);
	request = _tmp8_;
	result = (RygelHTTPRequest*) request;
	_g_object_unref0 (srv);
	return result;
}


static void rygel_http_post_test_start_next_test_request (RygelHTTPPostTest* self) {
	GeeArrayList* _tmp0_;
	gpointer _tmp1_ = NULL;
	RygelHTTPClient* _tmp2_;
	RygelTestRequestFactory* _tmp3_;
	SoupMessage* _tmp4_;
	SoupMessage* _tmp5_;
	RygelHTTPClient* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->requests;
	_tmp1_ = gee_abstract_list_remove_at ((GeeAbstractList*) _tmp0_, 0);
	_rygel_test_request_factory_unref0 (self->priv->current_request);
	self->priv->current_request = (RygelTestRequestFactory*) _tmp1_;
	_tmp2_ = self->client;
	_tmp3_ = self->priv->current_request;
	_tmp4_ = _tmp3_->msg;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_g_object_unref0 (_tmp2_->msg);
	_tmp2_->msg = _tmp5_;
	_tmp6_ = self->client;
	rygel_state_machine_run ((RygelStateMachine*) _tmp6_, NULL, NULL);
}


static void rygel_http_post_test_on_client_completed (RygelHTTPPostTest* self, RygelStateMachine* client) {
	GeeArrayList* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (client != NULL);
	_tmp0_ = self->priv->requests;
	_tmp1_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_ > 0) {
		gboolean _tmp3_;
		_tmp3_ = self->priv->server_done;
		if (_tmp3_) {
			self->priv->server_done = FALSE;
			rygel_http_post_test_start_next_test_request (self);
		} else {
			self->priv->ready = TRUE;
		}
	} else {
		gboolean _tmp4_;
		_tmp4_ = self->priv->server_done;
		if (_tmp4_) {
			GMainLoop* _tmp5_;
			_tmp5_ = self->priv->main_loop;
			g_main_loop_quit (_tmp5_);
		}
		self->priv->client_done = TRUE;
	}
}


static void rygel_http_post_test_on_message_received (RygelHTTPPostTest* self, RygelHTTPServer* server, SoupMessage* msg) {
	SoupMessage* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (server != NULL);
	g_return_if_fail (msg != NULL);
	_tmp0_ = msg;
	rygel_http_post_test_handle_client_message (self, _tmp0_, NULL, NULL);
}


static void rygel_http_post_test_handle_client_message_data_free (gpointer _data) {
	RygelHttpPostTestHandleClientMessageData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->msg);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelHttpPostTestHandleClientMessageData, _data_);
}


static void rygel_http_post_test_handle_client_message (RygelHTTPPostTest* self, SoupMessage* msg, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelHttpPostTestHandleClientMessageData* _data_;
	RygelHTTPPostTest* _tmp0_;
	SoupMessage* _tmp1_;
	SoupMessage* _tmp2_;
	_data_ = g_slice_new0 (RygelHttpPostTestHandleClientMessageData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_http_post_test_handle_client_message);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_http_post_test_handle_client_message_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = msg;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->msg);
	_data_->msg = _tmp2_;
	rygel_http_post_test_handle_client_message_co (_data_);
}


static void rygel_http_post_test_handle_client_message_finish (RygelHTTPPostTest* self, GAsyncResult* _res_) {
	RygelHttpPostTestHandleClientMessageData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void rygel_http_post_test_handle_client_message_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelHttpPostTestHandleClientMessageData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	rygel_http_post_test_handle_client_message_co (_data_);
}


static gboolean rygel_http_post_test_handle_client_message_co (RygelHttpPostTestHandleClientMessageData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->msg;
		_data_->_tmp1_ = NULL;
		_data_->_tmp1_ = rygel_http_post_test_create_request (_data_->self, _data_->_tmp0_, &_data_->_inner_error_);
		_data_->request = _data_->_tmp1_;
		if (_data_->_inner_error_ != NULL) {
			goto __catch1_g_error;
		}
		_data_->_tmp2_ = _data_->self->priv->current_request;
		_data_->_tmp3_ = _data_->_tmp2_->cancel;
		if (_data_->_tmp3_) {
			_data_->_tmp4_ = _data_->request;
			_data_->_tmp5_ = rygel_state_machine_get_cancellable ((RygelStateMachine*) _data_->_tmp4_);
			_data_->_tmp6_ = _data_->_tmp5_;
			g_cancellable_cancel (_data_->_tmp6_);
		} else {
			_data_->_tmp7_ = _data_->request;
			_data_->_state_ = 1;
			rygel_state_machine_run ((RygelStateMachine*) _data_->_tmp7_, rygel_http_post_test_handle_client_message_ready, _data_);
			return FALSE;
			_state_1:
			rygel_state_machine_run_finish ((RygelStateMachine*) _data_->_tmp7_, _data_->_res_);
			_data_->_tmp8_ = _data_->msg;
			_data_->_tmp9_ = 0U;
			g_object_get (_data_->_tmp8_, "status-code", &_data_->_tmp9_, NULL);
			_data_->_tmp10_ = _data_->_tmp9_;
			g_debug ("rygel-http-post-test.vala:194: status.code: %d", (gint) _data_->_tmp10_);
			_data_->_tmp11_ = _data_->msg;
			_data_->_tmp12_ = 0U;
			g_object_get (_data_->_tmp11_, "status-code", &_data_->_tmp12_, NULL);
			_data_->_tmp13_ = _data_->_tmp12_;
			_data_->_tmp14_ = _data_->self->priv->current_request;
			_data_->_tmp15_ = _data_->_tmp14_->expected_code;
			_vala_assert ((_data_->_tmp13_) == (*_data_->_tmp15_), "msg.status_code == this.current_request.expected_code");
			rygel_http_post_test_check_result (_data_->self, NULL, NULL);
		}
		_data_->_tmp16_ = _data_->self->priv->client_done;
		if (_data_->_tmp16_) {
			_data_->_tmp17_ = _data_->self->priv->main_loop;
			g_main_loop_quit (_data_->_tmp17_);
		} else {
			_data_->_tmp18_ = _data_->self->priv->ready;
			if (_data_->_tmp18_) {
				_data_->self->priv->ready = FALSE;
				rygel_http_post_test_start_next_test_request (_data_->self);
			} else {
				_data_->self->priv->server_done = TRUE;
			}
		}
		_g_object_unref0 (_data_->request);
	}
	goto __finally1;
	__catch1_g_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp19_ = _data_->_error_;
		_data_->_tmp20_ = _g_error_copy0 (_data_->_tmp19_);
		_g_error_free0 (_data_->self->priv->error);
		_data_->self->priv->error = _data_->_tmp20_;
		_data_->_tmp21_ = _data_->self->priv->main_loop;
		g_main_loop_quit (_data_->_tmp21_);
		_g_error_free0 (_data_->_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	__finally1:
	if (_data_->_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static gboolean rygel_http_post_test_on_timeout (RygelHTTPPostTest* self) {
	gboolean result = FALSE;
	GError* _tmp0_;
	GMainLoop* _tmp1_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = g_error_new_literal (RYGEL_TEST_ERROR, RYGEL_TEST_ERROR_TIMEOUT, "Timeout");
	_g_error_free0 (self->priv->error);
	self->priv->error = _tmp0_;
	_tmp1_ = self->priv->main_loop;
	g_main_loop_quit (_tmp1_);
	result = FALSE;
	return result;
}


static void rygel_http_post_test_check_result_data_free (gpointer _data) {
	RygelHttpPostTestCheckResultData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelHttpPostTestCheckResultData, _data_);
}


static void rygel_http_post_test_check_result (RygelHTTPPostTest* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelHttpPostTestCheckResultData* _data_;
	RygelHTTPPostTest* _tmp0_;
	_data_ = g_slice_new0 (RygelHttpPostTestCheckResultData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_http_post_test_check_result);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_http_post_test_check_result_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	rygel_http_post_test_check_result_co (_data_);
}


static void rygel_http_post_test_check_result_finish (RygelHTTPPostTest* self, GAsyncResult* _res_) {
	RygelHttpPostTestCheckResultData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void rygel_http_post_test_check_result_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelHttpPostTestCheckResultData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	rygel_http_post_test_check_result_co (_data_);
}


static gboolean rygel_http_post_test_check_result_co (RygelHttpPostTestCheckResultData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->self->server;
		_data_->_tmp1_ = _data_->_tmp0_->root_container;
		_data_->_tmp2_ = _data_->_tmp1_->item;
		_data_->_tmp3_ = _data_->_tmp2_->file;
		_data_->_tmp4_ = _g_object_ref0 (_data_->_tmp3_);
		_data_->file = _data_->_tmp4_;
		_data_->_tmp5_ = _data_->file;
		_data_->_state_ = 1;
		g_file_read_async (_data_->_tmp5_, G_PRIORITY_HIGH, NULL, rygel_http_post_test_check_result_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp6_ = NULL;
		_data_->_tmp6_ = g_file_read_finish (_data_->_tmp5_, _data_->_res_, &_data_->_inner_error_);
		_data_->stream = _data_->_tmp6_;
		if (_data_->_inner_error_ != NULL) {
			_g_object_unref0 (_data_->file);
			if (g_error_matches (_data_->_inner_error_, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) {
				goto __catch2_g_io_error_not_found;
			}
			goto __catch2_g_error;
		}
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = g_new0 (guint8, RYGEL_HTTP_CLIENT_LENGTH);
		_data_->buffer = _data_->_tmp7_;
		_data_->buffer_length1 = RYGEL_HTTP_CLIENT_LENGTH;
		_data_->_buffer_size_ = _data_->buffer_length1;
		_data_->_tmp8_ = _data_->stream;
		_data_->_tmp9_ = _data_->buffer;
		_data_->_tmp9__length1 = _data_->buffer_length1;
		_data_->_state_ = 2;
		g_input_stream_read_async ((GInputStream*) _data_->_tmp8_, (void*) _data_->_tmp9_, (gsize) _data_->_tmp9__length1, G_PRIORITY_HIGH, NULL, rygel_http_post_test_check_result_ready, _data_);
		return FALSE;
		_state_2:
		g_input_stream_read_finish ((GInputStream*) _data_->_tmp8_, _data_->_res_, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			_data_->buffer = (g_free (_data_->buffer), NULL);
			_g_object_unref0 (_data_->stream);
			_g_object_unref0 (_data_->file);
			if (g_error_matches (_data_->_inner_error_, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) {
				goto __catch2_g_io_error_not_found;
			}
			goto __catch2_g_error;
		}
		{
			_data_->i = 0;
			{
				_data_->_tmp10_ = TRUE;
				while (TRUE) {
					_data_->_tmp11_ = _data_->_tmp10_;
					if (!_data_->_tmp11_) {
						_data_->_tmp12_ = _data_->i;
						_data_->i = _data_->_tmp12_ + 1;
					}
					_data_->_tmp10_ = FALSE;
					_data_->_tmp13_ = _data_->i;
					if (!(((gsize) _data_->_tmp13_) < RYGEL_HTTP_CLIENT_LENGTH)) {
						break;
					}
					_data_->_tmp14_ = _data_->buffer;
					_data_->_tmp14__length1 = _data_->buffer_length1;
					_data_->_tmp15_ = _data_->i;
					_data_->_tmp16_ = _data_->_tmp14_[_data_->_tmp15_];
					_data_->_tmp17_ = _data_->self->client;
					_data_->_tmp18_ = _data_->_tmp17_->content;
					_data_->_tmp18__length1 = _data_->_tmp17_->content_length1;
					_data_->_tmp19_ = _data_->i;
					_data_->_tmp20_ = _data_->_tmp18_[_data_->_tmp19_];
					_vala_assert (_data_->_tmp16_ == _data_->_tmp20_, "buffer[i] == this.client.content[i]");
				}
			}
		}
		_data_->buffer = (g_free (_data_->buffer), NULL);
		_g_object_unref0 (_data_->stream);
		_g_object_unref0 (_data_->file);
	}
	goto __finally2;
	__catch2_g_io_error_not_found:
	{
		_data_->e = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_g_error_free0 (_data_->e);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	goto __finally2;
	__catch2_g_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp21_ = _data_->_error_;
		_data_->_tmp22_ = _g_error_copy0 (_data_->_tmp21_);
		_g_error_free0 (_data_->self->priv->error);
		_data_->self->priv->error = _data_->_tmp22_;
		_data_->_tmp23_ = _data_->self->priv->main_loop;
		g_main_loop_quit (_data_->_tmp23_);
		_g_error_free0 (_data_->_error_);
	}
	__finally2:
	if (_data_->_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void rygel_http_post_test_class_init (RygelHTTPPostTestClass * klass) {
	rygel_http_post_test_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (RygelHTTPPostTestPrivate));
	RYGEL_HTTP_POST_TEST_CLASS (klass)->run = rygel_http_post_test_real_run;
	G_OBJECT_CLASS (klass)->finalize = rygel_http_post_test_finalize;
}


static void rygel_http_post_test_instance_init (RygelHTTPPostTest * self) {
	self->priv = RYGEL_HTTP_POST_TEST_GET_PRIVATE (self);
}


static void rygel_http_post_test_finalize (GObject* obj) {
	RygelHTTPPostTest * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_HTTP_POST_TEST, RygelHTTPPostTest);
	_g_object_unref0 (self->server);
	_g_object_unref0 (self->client);
	_g_main_loop_unref0 (self->priv->main_loop);
	_g_error_free0 (self->priv->error);
	_g_object_unref0 (self->priv->requests);
	_rygel_test_request_factory_unref0 (self->priv->current_request);
	G_OBJECT_CLASS (rygel_http_post_test_parent_class)->finalize (obj);
}


GType rygel_http_post_test_get_type (void) {
	static volatile gsize rygel_http_post_test_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_http_post_test_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelHTTPPostTestClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_http_post_test_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelHTTPPostTest), 0, (GInstanceInitFunc) rygel_http_post_test_instance_init, NULL };
		GType rygel_http_post_test_type_id;
		rygel_http_post_test_type_id = g_type_register_static (G_TYPE_OBJECT, "RygelHTTPPostTest", &g_define_type_info, 0);
		g_once_init_leave (&rygel_http_post_test_type_id__volatile, rygel_http_post_test_type_id);
	}
	return rygel_http_post_test_type_id__volatile;
}


gchar* rygel_http_server_create_uri (RygelHTTPServer* self, const gchar* item_id) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	RygelMediaContainer* _tmp1_;
	RygelMediaItem* _tmp2_;
	RygelMediaItem* item;
	RygelHTTPItemURI* _tmp3_;
	RygelHTTPItemURI* item_uri;
	gchar* _tmp4_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (item_id != NULL, NULL);
	_tmp0_ = item_id;
	_tmp1_ = self->root_container;
	_tmp2_ = rygel_media_item_new (_tmp0_, _tmp1_);
	item = _tmp2_;
	_tmp3_ = rygel_http_item_uri_new ((RygelMediaObject*) item, self, -1, -1, NULL, NULL);
	item_uri = _tmp3_;
	_tmp4_ = rygel_http_item_uri_to_string (item_uri);
	result = _tmp4_;
	_g_object_unref0 (item_uri);
	_g_object_unref0 (item);
	return result;
}


static void _rygel_http_server_on_request_started_soup_server_request_started (SoupServer* _sender, SoupMessage* msg, SoupClientContext* client, gpointer self) {
	rygel_http_server_on_request_started (self, _sender, msg, client);
}


RygelHTTPServer* rygel_http_server_construct (GType object_type, GError** error) {
	RygelHTTPServer * self = NULL;
	GUPnPContext* _tmp3_;
	GUPnPContext* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	GUPnPContext* _tmp7_;
	guint _tmp8_;
	guint _tmp9_;
	GUPnPContext* _tmp10_;
	SoupServer* _tmp11_;
	SoupServer* _tmp12_;
	RygelMediaContainer* _tmp13_;
	GError * _inner_error_ = NULL;
	self = (RygelHTTPServer*) g_object_new (object_type, NULL);
	{
		GUPnPContext* _tmp0_;
		GUPnPContext* _tmp1_;
		_tmp0_ = gupnp_context_new (NULL, "lo", (guint) 0, &_inner_error_);
		_tmp1_ = _tmp0_;
		if (_inner_error_ != NULL) {
			goto __catch3_g_error;
		}
		_g_object_unref0 (self->context);
		self->context = _tmp1_;
	}
	goto __finally3;
	__catch3_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp2_;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_tmp2_ = g_error_new_literal (RYGEL_TEST_ERROR, RYGEL_TEST_ERROR_SKIP, "Network context not available");
		_inner_error_ = _tmp2_;
		_g_error_free0 (_error_);
		goto __finally3;
	}
	__finally3:
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == RYGEL_TEST_ERROR) {
			g_propagate_error (error, _inner_error_);
			_g_object_unref0 (self);
			return NULL;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return NULL;
		}
	}
	_tmp3_ = self->context;
	_vala_assert (_tmp3_ != NULL, "this.context != null");
	_tmp4_ = self->context;
	_tmp5_ = gssdp_client_get_host_ip ((GSSDPClient*) _tmp4_);
	_tmp6_ = _tmp5_;
	_vala_assert (_tmp6_ != NULL, "this.context.host_ip != null");
	_tmp7_ = self->context;
	_tmp8_ = gupnp_context_get_port (_tmp7_);
	_tmp9_ = _tmp8_;
	_vala_assert (_tmp9_ > ((guint) 0), "this.context.port > 0");
	_tmp10_ = self->context;
	_tmp11_ = gupnp_context_get_server (_tmp10_);
	_tmp12_ = _tmp11_;
	g_signal_connect_object (_tmp12_, "request-started", (GCallback) _rygel_http_server_on_request_started_soup_server_request_started, self, 0);
	_tmp13_ = rygel_media_container_new ();
	_g_object_unref0 (self->root_container);
	self->root_container = _tmp13_;
	return self;
}


RygelHTTPServer* rygel_http_server_new (GError** error) {
	return rygel_http_server_construct (RYGEL_TYPE_HTTP_SERVER, error);
}


static void _rygel_http_server_on_got_headers_soup_message_got_headers (SoupMessage* _sender, gpointer self) {
	rygel_http_server_on_got_headers (self, _sender);
}


static void rygel_http_server_on_request_started (RygelHTTPServer* self, SoupServer* server, SoupMessage* msg, SoupClientContext* client) {
	SoupMessage* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (server != NULL);
	g_return_if_fail (msg != NULL);
	g_return_if_fail (client != NULL);
	_tmp0_ = msg;
	g_signal_connect_object (_tmp0_, "got-headers", (GCallback) _rygel_http_server_on_got_headers_soup_message_got_headers, self, 0);
}


static void rygel_http_server_on_got_headers (RygelHTTPServer* self, SoupMessage* msg) {
	SoupMessage* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (msg != NULL);
	_tmp0_ = msg;
	g_signal_emit_by_name (self, "message-received", _tmp0_);
}


RygelTranscoder* rygel_http_server_get_transcoder (RygelHTTPServer* self, const gchar* target, GError** error) {
	RygelTranscoder* result = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp2_;
	GError* _tmp3_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (target != NULL, NULL);
	_tmp0_ = target;
	if (g_strcmp0 (_tmp0_, "MP3") == 0) {
		RygelTranscoder* _tmp1_;
		_tmp1_ = rygel_transcoder_new ("mp3");
		result = _tmp1_;
		return result;
	}
	_tmp2_ = target;
	_tmp3_ = g_error_new (RYGEL_HTTP_REQUEST_ERROR, RYGEL_HTTP_REQUEST_ERROR_NOT_FOUND, "No transcoder available for target format '%s'", _tmp2_);
	_inner_error_ = _tmp3_;
	g_propagate_error (error, _inner_error_);
	return NULL;
}


const gchar* rygel_http_server_get_path_root (RygelHTTPServer* self) {
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = RYGEL_HTTP_SERVER_SERVER_PATH;
	return result;
}


gchar* rygel_http_server_get_uri (RygelHTTPServer* self) {
	gchar* result;
	RygelMediaContainer* _tmp0_;
	RygelMediaItem* _tmp1_;
	RygelMediaItem* item;
	RygelHTTPItemURI* _tmp2_;
	RygelHTTPItemURI* item_uri;
	gchar* _tmp3_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->root_container;
	_tmp1_ = rygel_media_item_new (RYGEL_MEDIA_CONTAINER_ITEM_ID, _tmp0_);
	item = _tmp1_;
	_tmp2_ = rygel_http_item_uri_new ((RygelMediaObject*) item, self, -1, -1, NULL, NULL);
	item_uri = _tmp2_;
	_tmp3_ = rygel_http_item_uri_to_string (item_uri);
	result = _tmp3_;
	_g_object_unref0 (item_uri);
	_g_object_unref0 (item);
	return result;
}


static void rygel_http_server_class_init (RygelHTTPServerClass * klass) {
	rygel_http_server_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->get_property = _vala_rygel_http_server_get_property;
	G_OBJECT_CLASS (klass)->finalize = rygel_http_server_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_HTTP_SERVER_PATH_ROOT, g_param_spec_string ("path-root", "path-root", "path-root", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_HTTP_SERVER_URI, g_param_spec_string ("uri", "uri", "uri", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_signal_new ("message_received", RYGEL_TYPE_HTTP_SERVER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, soup_message_get_type ());
}


static void rygel_http_server_instance_init (RygelHTTPServer * self) {
}


static void rygel_http_server_finalize (GObject* obj) {
	RygelHTTPServer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_HTTP_SERVER, RygelHTTPServer);
	_g_object_unref0 (self->root_container);
	_g_object_unref0 (self->context);
	G_OBJECT_CLASS (rygel_http_server_parent_class)->finalize (obj);
}


GType rygel_http_server_get_type (void) {
	static volatile gsize rygel_http_server_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_http_server_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelHTTPServerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_http_server_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelHTTPServer), 0, (GInstanceInitFunc) rygel_http_server_instance_init, NULL };
		GType rygel_http_server_type_id;
		rygel_http_server_type_id = g_type_register_static (G_TYPE_OBJECT, "RygelHTTPServer", &g_define_type_info, 0);
		g_once_init_leave (&rygel_http_server_type_id__volatile, rygel_http_server_type_id);
	}
	return rygel_http_server_type_id__volatile;
}


static void _vala_rygel_http_server_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	RygelHTTPServer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_TYPE_HTTP_SERVER, RygelHTTPServer);
	switch (property_id) {
		case RYGEL_HTTP_SERVER_PATH_ROOT:
		g_value_set_string (value, rygel_http_server_get_path_root (self));
		break;
		case RYGEL_HTTP_SERVER_URI:
		g_value_take_string (value, rygel_http_server_get_uri (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


RygelHTTPClient* rygel_http_client_construct (GType object_type, GUPnPContext* context) {
	RygelHTTPClient * self = NULL;
	GUPnPContext* _tmp0_;
	GUPnPContext* _tmp1_;
	guint8* _tmp2_ = NULL;
	g_return_val_if_fail (context != NULL, NULL);
	self = (RygelHTTPClient*) g_object_new (object_type, NULL);
	_tmp0_ = context;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->context);
	self->context = _tmp1_;
	_tmp2_ = g_new0 (guint8, 1024);
	self->content = (g_free (self->content), NULL);
	self->content = _tmp2_;
	self->content_length1 = 1024;
	return self;
}


RygelHTTPClient* rygel_http_client_new (GUPnPContext* context) {
	return rygel_http_client_construct (RYGEL_TYPE_HTTP_CLIENT, context);
}


static void rygel_http_client_real_run_data_free (gpointer _data) {
	RygelHttpClientRunData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelHttpClientRunData, _data_);
}


static void rygel_http_client_real_run (RygelStateMachine* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelHTTPClient * self;
	RygelHttpClientRunData* _data_;
	RygelHTTPClient* _tmp0_;
	self = (RygelHTTPClient*) base;
	_data_ = g_slice_new0 (RygelHttpClientRunData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_http_client_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_http_client_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	rygel_http_client_real_run_co (_data_);
}


static void rygel_http_client_real_run_finish (RygelStateMachine* base, GAsyncResult* _res_) {
	RygelHttpClientRunData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static Block1Data* block1_data_ref (Block1Data* _data1_) {
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}


static void block1_data_unref (void * _userdata_) {
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		RygelHTTPClient * self;
		self = _data1_->self;
		(_data1_->run_continue_target_destroy_notify == NULL) ? NULL : (_data1_->run_continue_target_destroy_notify (_data1_->run_continue_target), NULL);
		_data1_->run_continue = NULL;
		_data1_->run_continue_target = NULL;
		_data1_->run_continue_target_destroy_notify = NULL;
		_g_object_unref0 (self);
		g_slice_free (Block1Data, _data1_);
	}
}


static gboolean _rygel_http_client_real_run_co_gsource_func (gpointer self) {
	gboolean result;
	result = rygel_http_client_real_run_co (self);
	return result;
}


static void __lambda6_ (Block1Data* _data1_, SoupSession* session, SoupMessage* msg) {
	RygelHTTPClient * self;
	self = _data1_->self;
	g_return_if_fail (session != NULL);
	g_return_if_fail (msg != NULL);
	_data1_->run_continue (_data1_->run_continue_target);
}


static void ___lambda6__soup_session_callback (SoupSession* session, SoupMessage* msg, gpointer self) {
	__lambda6_ (self, session, msg);
}


static gboolean rygel_http_client_real_run_co (RygelHttpClientRunData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data1_ = g_slice_new0 (Block1Data);
	_data_->_data1_->_ref_count_ = 1;
	_data_->_data1_->self = g_object_ref (_data_->self);
	_data_->_data1_->_async_data_ = _data_;
	_data_->_data1_->run_continue = _rygel_http_client_real_run_co_gsource_func;
	_data_->_data1_->run_continue_target = _data_;
	_data_->_data1_->run_continue_target_destroy_notify = NULL;
	_data_->_tmp0_ = _data_->self->msg;
	_data_->_tmp1_ = _data_->_tmp0_->request_body;
	_data_->_tmp2_ = _data_->self->content;
	_data_->_tmp2__length1 = _data_->self->content_length1;
	soup_message_body_append (_data_->_tmp1_, SOUP_MEMORY_COPY, _data_->_tmp2_, (gsize) _data_->_tmp2__length1);
	_data_->_tmp3_ = _data_->self->context;
	_data_->_tmp4_ = gupnp_context_get_session (_data_->_tmp3_);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = _data_->self->msg;
	_data_->_tmp7_ = _g_object_ref0 (_data_->_tmp6_);
	soup_session_queue_message (_data_->_tmp5_, _data_->_tmp7_, ___lambda6__soup_session_callback, _data_->_data1_);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	g_signal_emit_by_name ((RygelStateMachine*) _data_->self, "completed");
	block1_data_unref (_data_->_data1_);
	_data_->_data1_ = NULL;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static GCancellable* rygel_http_client_real_get_cancellable (RygelStateMachine* base) {
	GCancellable* result;
	RygelHTTPClient* self;
	GCancellable* _tmp0_;
	self = (RygelHTTPClient*) base;
	_tmp0_ = self->priv->_cancellable;
	result = _tmp0_;
	return result;
}


static void rygel_http_client_real_set_cancellable (RygelStateMachine* base, GCancellable* value) {
	RygelHTTPClient* self;
	GCancellable* _tmp0_;
	GCancellable* _tmp1_;
	self = (RygelHTTPClient*) base;
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_cancellable);
	self->priv->_cancellable = _tmp1_;
	g_object_notify ((GObject *) self, "cancellable");
}


static void rygel_http_client_class_init (RygelHTTPClientClass * klass) {
	rygel_http_client_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (RygelHTTPClientPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_rygel_http_client_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_rygel_http_client_set_property;
	G_OBJECT_CLASS (klass)->finalize = rygel_http_client_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_HTTP_CLIENT_CANCELLABLE, g_param_spec_object ("cancellable", "cancellable", "cancellable", g_cancellable_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void rygel_http_client_rygel_state_machine_interface_init (RygelStateMachineIface * iface) {
	rygel_http_client_rygel_state_machine_parent_iface = g_type_interface_peek_parent (iface);
	iface->run = (void (*)(RygelStateMachine*)) rygel_http_client_real_run;
	iface->run_finish = rygel_http_client_real_run_finish;
	iface->get_cancellable = rygel_http_client_real_get_cancellable;
	iface->set_cancellable = rygel_http_client_real_set_cancellable;
}


static void rygel_http_client_instance_init (RygelHTTPClient * self) {
	self->priv = RYGEL_HTTP_CLIENT_GET_PRIVATE (self);
}


static void rygel_http_client_finalize (GObject* obj) {
	RygelHTTPClient * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_HTTP_CLIENT, RygelHTTPClient);
	self->content = (g_free (self->content), NULL);
	_g_object_unref0 (self->context);
	_g_object_unref0 (self->msg);
	_g_object_unref0 (self->priv->_cancellable);
	G_OBJECT_CLASS (rygel_http_client_parent_class)->finalize (obj);
}


GType rygel_http_client_get_type (void) {
	static volatile gsize rygel_http_client_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_http_client_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelHTTPClientClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_http_client_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelHTTPClient), 0, (GInstanceInitFunc) rygel_http_client_instance_init, NULL };
		static const GInterfaceInfo rygel_state_machine_info = { (GInterfaceInitFunc) rygel_http_client_rygel_state_machine_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType rygel_http_client_type_id;
		rygel_http_client_type_id = g_type_register_static (G_TYPE_OBJECT, "RygelHTTPClient", &g_define_type_info, 0);
		g_type_add_interface_static (rygel_http_client_type_id, RYGEL_TYPE_STATE_MACHINE, &rygel_state_machine_info);
		g_once_init_leave (&rygel_http_client_type_id__volatile, rygel_http_client_type_id);
	}
	return rygel_http_client_type_id__volatile;
}


static void _vala_rygel_http_client_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	RygelHTTPClient * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_TYPE_HTTP_CLIENT, RygelHTTPClient);
	switch (property_id) {
		case RYGEL_HTTP_CLIENT_CANCELLABLE:
		g_value_set_object (value, rygel_state_machine_get_cancellable ((RygelStateMachine*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_rygel_http_client_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	RygelHTTPClient * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_TYPE_HTTP_CLIENT, RygelHTTPClient);
	switch (property_id) {
		case RYGEL_HTTP_CLIENT_CANCELLABLE:
		rygel_state_machine_set_cancellable ((RygelStateMachine*) self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _rygel_media_container_on_file_changed_g_file_monitor_changed (GFileMonitor* _sender, GFile* file, GFile* other_file, GFileMonitorEvent event_type, gpointer self) {
	rygel_media_container_on_file_changed (self, _sender, file, other_file, event_type);
}


RygelMediaContainer* rygel_media_container_construct (GType object_type) {
	RygelMediaContainer * self = NULL;
	GFile* _tmp0_ = NULL;
	RygelMediaItem* _tmp1_;
	gchar* _tmp2_;
	GFileMonitor* _tmp6_;
	GError * _inner_error_ = NULL;
	self = (RygelMediaContainer*) rygel_media_object_construct (object_type);
	_tmp0_ = g_file_new_for_uri (RYGEL_MEDIA_ITEM_URI);
	_g_object_unref0 (self->file);
	self->file = _tmp0_;
	_tmp1_ = rygel_media_item_new (RYGEL_MEDIA_CONTAINER_ITEM_ID, self);
	_g_object_unref0 (self->item);
	self->item = _tmp1_;
	self->priv->vanish = FALSE;
	self->priv->error = FALSE;
	_tmp2_ = g_strdup ("TesContainer");
	_g_free0 (((RygelMediaObject*) self)->id);
	((RygelMediaObject*) self)->id = _tmp2_;
	{
		GFile* _tmp3_;
		GFileMonitor* _tmp4_ = NULL;
		GFileMonitor* _tmp5_;
		_tmp3_ = self->file;
		_tmp4_ = g_file_monitor_file (_tmp3_, G_FILE_MONITOR_NONE, NULL, &_inner_error_);
		_tmp5_ = _tmp4_;
		if (_inner_error_ != NULL) {
			goto __catch5_g_error;
		}
		_g_object_unref0 (self->priv->monitor);
		self->priv->monitor = _tmp5_;
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (_error_);
	}
	__finally5:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return NULL;
	}
	_tmp6_ = self->priv->monitor;
	g_signal_connect_object (_tmp6_, "changed", (GCallback) _rygel_media_container_on_file_changed_g_file_monitor_changed, self, 0);
	return self;
}


RygelMediaContainer* rygel_media_container_new (void) {
	return rygel_media_container_construct (RYGEL_TYPE_MEDIA_CONTAINER);
}


static void rygel_media_container_find_object_data_free (gpointer _data) {
	RygelMediaContainerFindObjectData* _data_;
	_data_ = _data;
	_g_free0 (_data_->item_id);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelMediaContainerFindObjectData, _data_);
}


void rygel_media_container_find_object (RygelMediaContainer* self, const gchar* item_id, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelMediaContainerFindObjectData* _data_;
	RygelMediaContainer* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
	_data_ = g_slice_new0 (RygelMediaContainerFindObjectData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_media_container_find_object);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_media_container_find_object_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = item_id;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->item_id);
	_data_->item_id = _tmp2_;
	_tmp3_ = cancellable;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp4_;
	rygel_media_container_find_object_co (_data_);
}


RygelMediaObject* rygel_media_container_find_object_finish (RygelMediaContainer* self, GAsyncResult* _res_, GError** error) {
	RygelMediaObject* result;
	RygelMediaContainerFindObjectData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static Block2Data* block2_data_ref (Block2Data* _data2_) {
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}


static void block2_data_unref (void * _userdata_) {
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		RygelMediaContainer * self;
		self = _data2_->self;
		(_data2_->find_object_continue_target_destroy_notify == NULL) ? NULL : (_data2_->find_object_continue_target_destroy_notify (_data2_->find_object_continue_target), NULL);
		_data2_->find_object_continue = NULL;
		_data2_->find_object_continue_target = NULL;
		_data2_->find_object_continue_target_destroy_notify = NULL;
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}


static gboolean _rygel_media_container_find_object_co_gsource_func (gpointer self) {
	gboolean result;
	result = rygel_media_container_find_object_co (self);
	return result;
}


static gboolean __lambda2_ (Block2Data* _data2_) {
	RygelMediaContainer * self;
	gboolean result = FALSE;
	GSourceFunc _tmp0_;
	void* _tmp0__target;
	self = _data2_->self;
	_tmp0_ = _data2_->find_object_continue;
	_tmp0__target = _data2_->find_object_continue_target;
	_tmp0_ (_tmp0__target);
	result = FALSE;
	return result;
}


static gboolean ___lambda2__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda2_ (self);
	return result;
}


static gboolean rygel_media_container_find_object_co (RygelMediaContainerFindObjectData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data2_ = g_slice_new0 (Block2Data);
	_data_->_data2_->_ref_count_ = 1;
	_data_->_data2_->self = g_object_ref (_data_->self);
	_data_->_data2_->_async_data_ = _data_;
	_data_->_data2_->find_object_continue = _rygel_media_container_find_object_co_gsource_func;
	_data_->_data2_->find_object_continue_target = _data_;
	_data_->_data2_->find_object_continue_target_destroy_notify = NULL;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda2__gsource_func, block2_data_ref (_data_->_data2_), block2_data_unref);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	_data_->_tmp1_ = _data_->item_id;
	if (g_strcmp0 (_data_->_tmp1_, "ErrorItem") == 0) {
		_data_->_tmp2_ = _data_->self->priv->error;
		_data_->_tmp0_ = _data_->_tmp2_;
	} else {
		_data_->_tmp0_ = FALSE;
	}
	_data_->_tmp3_ = _data_->_tmp0_;
	if (_data_->_tmp3_) {
		_data_->_tmp4_ = NULL;
		_data_->_tmp4_ = _ ("Fake error caused by %s object.");
		_data_->_tmp5_ = g_strdup (_data_->_tmp4_);
		_data_->msg = _data_->_tmp5_;
		_data_->_tmp6_ = _data_->self->file;
		g_file_delete (_data_->_tmp6_, NULL, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_free0 (_data_->msg);
			block2_data_unref (_data_->_data2_);
			_data_->_data2_ = NULL;
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp7_ = _data_->msg;
		_data_->_tmp8_ = _data_->item_id;
		_data_->_tmp9_ = g_error_new (RYGEL_CONTENT_DIRECTORY_ERROR, RYGEL_CONTENT_DIRECTORY_ERROR_INVALID_ARGS, _data_->_tmp7_, _data_->_tmp8_);
		_data_->_inner_error_ = _data_->_tmp9_;
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_free0 (_data_->msg);
		block2_data_unref (_data_->_data2_);
		_data_->_data2_ = NULL;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	} else {
		_data_->_tmp11_ = _data_->item_id;
		if (g_strcmp0 (_data_->_tmp11_, "ErrorItem") == 0) {
			_data_->_tmp12_ = _data_->self->priv->error;
			_data_->_tmp10_ = !_data_->_tmp12_;
		} else {
			_data_->_tmp10_ = FALSE;
		}
		_data_->_tmp13_ = _data_->_tmp10_;
		if (_data_->_tmp13_) {
			_data_->self->priv->error = TRUE;
		}
	}
	_data_->_tmp15_ = _data_->item_id;
	if (g_strcmp0 (_data_->_tmp15_, "VanishingItem") == 0) {
		_data_->_tmp16_ = _data_->self->priv->vanish;
		_data_->_tmp14_ = _data_->_tmp16_;
	} else {
		_data_->_tmp14_ = FALSE;
	}
	_data_->_tmp17_ = _data_->_tmp14_;
	if (_data_->_tmp17_) {
		_data_->_tmp18_ = _data_->self->file;
		g_file_delete (_data_->_tmp18_, NULL, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			block2_data_unref (_data_->_data2_);
			_data_->_data2_ = NULL;
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->result = NULL;
		block2_data_unref (_data_->_data2_);
		_data_->_data2_ = NULL;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	} else {
		_data_->_tmp20_ = _data_->item_id;
		if (g_strcmp0 (_data_->_tmp20_, "VanishingItem") == 0) {
			_data_->_tmp21_ = _data_->self->priv->vanish;
			_data_->_tmp19_ = !_data_->_tmp21_;
		} else {
			_data_->_tmp19_ = FALSE;
		}
		_data_->_tmp22_ = _data_->_tmp19_;
		if (_data_->_tmp22_) {
			_data_->self->priv->vanish = TRUE;
		}
	}
	_data_->_tmp23_ = _data_->item_id;
	_data_->_tmp24_ = _data_->self->item;
	_data_->_tmp25_ = ((RygelMediaObject*) _data_->_tmp24_)->id;
	if (g_strcmp0 (_data_->_tmp23_, _data_->_tmp25_) != 0) {
		_data_->_tmp26_ = _data_->item_id;
		_data_->_tmp27_ = rygel_media_item_new (_data_->_tmp26_, _data_->self);
		_g_object_unref0 (_data_->self->item);
		_data_->self->item = _data_->_tmp27_;
	}
	_data_->_tmp28_ = _data_->self->item;
	_data_->_tmp29_ = _g_object_ref0 ((RygelMediaObject*) _data_->_tmp28_);
	_data_->result = _data_->_tmp29_;
	block2_data_unref (_data_->_data2_);
	_data_->_data2_ = NULL;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	block2_data_unref (_data_->_data2_);
	_data_->_data2_ = NULL;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


void rygel_media_container_on_file_changed (RygelMediaContainer* self, GFileMonitor* monitor, GFile* file, GFile* other_file, GFileMonitorEvent event_type) {
	RygelMediaItem* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (monitor != NULL);
	g_return_if_fail (file != NULL);
	_tmp0_ = self->item;
	_tmp0_->place_holder = FALSE;
	g_signal_emit_by_name (self, "container-updated", self);
}


static void rygel_media_container_class_init (RygelMediaContainerClass * klass) {
	rygel_media_container_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (RygelMediaContainerPrivate));
	G_OBJECT_CLASS (klass)->finalize = rygel_media_container_finalize;
	g_signal_new ("container_updated", RYGEL_TYPE_MEDIA_CONTAINER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, RYGEL_TYPE_MEDIA_CONTAINER);
}


static void rygel_media_container_instance_init (RygelMediaContainer * self) {
	self->priv = RYGEL_MEDIA_CONTAINER_GET_PRIVATE (self);
}


static void rygel_media_container_finalize (GObject* obj) {
	RygelMediaContainer * self;
	GError * _inner_error_ = NULL;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_MEDIA_CONTAINER, RygelMediaContainer);
	{
		GFile* _tmp0_;
		_tmp0_ = self->file;
		g_file_delete (_tmp0_, NULL, &_inner_error_);
		if (_inner_error_ != NULL) {
			goto __catch4_g_error;
		}
	}
	goto __finally4;
	__catch4_g_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (_error_);
	}
	__finally4:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
	}
	_g_object_unref0 (self->item);
	_g_object_unref0 (self->file);
	_g_object_unref0 (self->priv->monitor);
	G_OBJECT_CLASS (rygel_media_container_parent_class)->finalize (obj);
}


GType rygel_media_container_get_type (void) {
	static volatile gsize rygel_media_container_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_media_container_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelMediaContainerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_media_container_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelMediaContainer), 0, (GInstanceInitFunc) rygel_media_container_instance_init, NULL };
		GType rygel_media_container_type_id;
		rygel_media_container_type_id = g_type_register_static (RYGEL_TYPE_MEDIA_OBJECT, "RygelMediaContainer", &g_define_type_info, 0);
		g_once_init_leave (&rygel_media_container_type_id__volatile, rygel_media_container_type_id);
	}
	return rygel_media_container_type_id__volatile;
}


RygelMediaItem* rygel_media_item_construct_for_visual_item (GType object_type) {
	RygelMediaItem * self = NULL;
	self = (RygelMediaItem*) rygel_media_object_construct (object_type);
	return self;
}


RygelMediaItem* rygel_media_item_new_for_visual_item (void) {
	return rygel_media_item_construct_for_visual_item (RYGEL_TYPE_MEDIA_ITEM);
}


RygelMediaItem* rygel_media_item_construct (GType object_type, const gchar* id, RygelMediaContainer* parent) {
	RygelMediaItem * self = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	RygelMediaContainer* _tmp2_;
	RygelMediaContainer* _tmp3_;
	GFile* _tmp4_;
	GFile* _tmp5_;
	g_return_val_if_fail (id != NULL, NULL);
	g_return_val_if_fail (parent != NULL, NULL);
	self = (RygelMediaItem*) rygel_media_object_construct (object_type);
	_tmp0_ = id;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (((RygelMediaObject*) self)->id);
	((RygelMediaObject*) self)->id = _tmp1_;
	_tmp2_ = parent;
	((RygelMediaObject*) self)->parent = _tmp2_;
	_tmp3_ = parent;
	_tmp4_ = _tmp3_->file;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_g_object_unref0 (self->file);
	self->file = _tmp5_;
	return self;
}


RygelMediaItem* rygel_media_item_new (const gchar* id, RygelMediaContainer* parent) {
	return rygel_media_item_construct (RYGEL_TYPE_MEDIA_ITEM, id, parent);
}


static void rygel_media_item_get_writable_data_free (gpointer _data) {
	RygelMediaItemGetWritableData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelMediaItemGetWritableData, _data_);
}


void rygel_media_item_get_writable (RygelMediaItem* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelMediaItemGetWritableData* _data_;
	RygelMediaItem* _tmp0_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
	_data_ = g_slice_new0 (RygelMediaItemGetWritableData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_media_item_get_writable);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_media_item_get_writable_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = cancellable;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp2_;
	rygel_media_item_get_writable_co (_data_);
}


GFile* rygel_media_item_get_writable_finish (RygelMediaItem* self, GAsyncResult* _res_, GError** error) {
	GFile* result;
	RygelMediaItemGetWritableData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static Block3Data* block3_data_ref (Block3Data* _data3_) {
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}


static void block3_data_unref (void * _userdata_) {
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		RygelMediaItem * self;
		self = _data3_->self;
		(_data3_->get_writable_continue_target_destroy_notify == NULL) ? NULL : (_data3_->get_writable_continue_target_destroy_notify (_data3_->get_writable_continue_target), NULL);
		_data3_->get_writable_continue = NULL;
		_data3_->get_writable_continue_target = NULL;
		_data3_->get_writable_continue_target_destroy_notify = NULL;
		_g_object_unref0 (self);
		g_slice_free (Block3Data, _data3_);
	}
}


static gboolean _rygel_media_item_get_writable_co_gsource_func (gpointer self) {
	gboolean result;
	result = rygel_media_item_get_writable_co (self);
	return result;
}


static gboolean __lambda3_ (Block3Data* _data3_) {
	RygelMediaItem * self;
	gboolean result = FALSE;
	GSourceFunc _tmp0_;
	void* _tmp0__target;
	self = _data3_->self;
	_tmp0_ = _data3_->get_writable_continue;
	_tmp0__target = _data3_->get_writable_continue_target;
	_tmp0_ (_tmp0__target);
	result = FALSE;
	return result;
}


static gboolean ___lambda3__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda3_ (self);
	return result;
}


static gboolean rygel_media_item_get_writable_co (RygelMediaItemGetWritableData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data3_ = g_slice_new0 (Block3Data);
	_data_->_data3_->_ref_count_ = 1;
	_data_->_data3_->self = g_object_ref (_data_->self);
	_data_->_data3_->_async_data_ = _data_;
	_data_->_data3_->get_writable_continue = _rygel_media_item_get_writable_co_gsource_func;
	_data_->_data3_->get_writable_continue_target = _data_;
	_data_->_data3_->get_writable_continue_target_destroy_notify = NULL;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda3__gsource_func, block3_data_ref (_data_->_data3_), block3_data_unref);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	_data_->_tmp0_ = ((RygelMediaObject*) _data_->self)->id;
	if (g_strcmp0 (_data_->_tmp0_, "NullItem") == 0) {
		_data_->_tmp1_ = _data_->self->file;
		g_file_delete (_data_->_tmp1_, NULL, &_data_->_inner_error_);
		if (_data_->_inner_error_ != NULL) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			block3_data_unref (_data_->_data3_);
			_data_->_data3_ = NULL;
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->result = NULL;
		block3_data_unref (_data_->_data3_);
		_data_->_data3_ = NULL;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	} else {
		_data_->_tmp2_ = _data_->self->file;
		_data_->_tmp3_ = _g_object_ref0 (_data_->_tmp2_);
		_data_->result = _data_->_tmp3_;
		block3_data_unref (_data_->_data3_);
		_data_->_data3_ = NULL;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	block3_data_unref (_data_->_data3_);
	_data_->_data3_ = NULL;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void rygel_media_item_class_init (RygelMediaItemClass * klass) {
	rygel_media_item_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = rygel_media_item_finalize;
}


static void rygel_media_item_instance_init (RygelMediaItem * self) {
	GeeArrayList* _tmp0_;
	self->size = (glong) 1024;
	self->duration = (glong) 1024;
	_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
	self->uris = _tmp0_;
	self->place_holder = TRUE;
}


static void rygel_media_item_finalize (GObject* obj) {
	RygelMediaItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_MEDIA_ITEM, RygelMediaItem);
	_g_object_unref0 (self->uris);
	_g_object_unref0 (self->file);
	G_OBJECT_CLASS (rygel_media_item_parent_class)->finalize (obj);
}


GType rygel_media_item_get_type (void) {
	static volatile gsize rygel_media_item_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_media_item_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelMediaItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_media_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelMediaItem), 0, (GInstanceInitFunc) rygel_media_item_instance_init, NULL };
		GType rygel_media_item_type_id;
		rygel_media_item_type_id = g_type_register_static (RYGEL_TYPE_MEDIA_OBJECT, "RygelMediaItem", &g_define_type_info, 0);
		g_once_init_leave (&rygel_media_item_type_id__volatile, rygel_media_item_type_id);
	}
	return rygel_media_item_type_id__volatile;
}


RygelHTTPResponse* rygel_http_response_construct (GType object_type, RygelHTTPPost* get_request) {
	RygelHTTPResponse * self = NULL;
	RygelHTTPPost* _tmp0_;
	SoupMessage* _tmp1_;
	SoupMessage* _tmp2_;
	RygelHTTPPost* _tmp3_;
	SoupServer* _tmp4_;
	SoupServer* _tmp5_;
	g_return_val_if_fail (get_request != NULL, NULL);
	self = (RygelHTTPResponse*) g_object_new (object_type, NULL);
	_tmp0_ = get_request;
	_tmp1_ = ((RygelHTTPRequest*) _tmp0_)->msg;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (self->priv->msg);
	self->priv->msg = _tmp2_;
	_tmp3_ = get_request;
	_tmp4_ = ((RygelHTTPRequest*) _tmp3_)->server;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	_g_object_unref0 (self->priv->server);
	self->priv->server = _tmp5_;
	return self;
}


RygelHTTPResponse* rygel_http_response_new (RygelHTTPPost* get_request) {
	return rygel_http_response_construct (RYGEL_TYPE_HTTP_RESPONSE, get_request);
}


static void rygel_http_response_real_run_data_free (gpointer _data) {
	RygelHttpResponseRunData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelHttpResponseRunData, _data_);
}


static void rygel_http_response_real_run (RygelStateMachine* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelHTTPResponse * self;
	RygelHttpResponseRunData* _data_;
	RygelHTTPResponse* _tmp0_;
	self = (RygelHTTPResponse*) base;
	_data_ = g_slice_new0 (RygelHttpResponseRunData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_http_response_real_run);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_http_response_real_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	rygel_http_response_real_run_co (_data_);
}


static void rygel_http_response_real_run_finish (RygelStateMachine* base, GAsyncResult* _res_) {
	RygelHttpResponseRunData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static Block4Data* block4_data_ref (Block4Data* _data4_) {
	g_atomic_int_inc (&_data4_->_ref_count_);
	return _data4_;
}


static void block4_data_unref (void * _userdata_) {
	Block4Data* _data4_;
	_data4_ = (Block4Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
		RygelHTTPResponse * self;
		self = _data4_->self;
		(_data4_->run_continue_target_destroy_notify == NULL) ? NULL : (_data4_->run_continue_target_destroy_notify (_data4_->run_continue_target), NULL);
		_data4_->run_continue = NULL;
		_data4_->run_continue_target = NULL;
		_data4_->run_continue_target_destroy_notify = NULL;
		_g_object_unref0 (self);
		g_slice_free (Block4Data, _data4_);
	}
}


static gboolean _rygel_http_response_real_run_co_gsource_func (gpointer self) {
	gboolean result;
	result = rygel_http_response_real_run_co (self);
	return result;
}


static gboolean __lambda7_ (Block4Data* _data4_) {
	RygelHTTPResponse * self;
	gboolean result = FALSE;
	self = _data4_->self;
	_data4_->run_continue (_data4_->run_continue_target);
	result = FALSE;
	return result;
}


static gboolean ___lambda7__gsource_func (gpointer self) {
	gboolean result;
	result = __lambda7_ (self);
	return result;
}


static gboolean rygel_http_response_real_run_co (RygelHttpResponseRunData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data4_ = g_slice_new0 (Block4Data);
	_data_->_data4_->_ref_count_ = 1;
	_data_->_data4_->self = g_object_ref (_data_->self);
	_data_->_data4_->_async_data_ = _data_;
	_data_->_data4_->run_continue = _rygel_http_response_real_run_co_gsource_func;
	_data_->_data4_->run_continue_target = _data_;
	_data_->_data4_->run_continue_target_destroy_notify = NULL;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda7__gsource_func, block4_data_ref (_data_->_data4_), block4_data_unref);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	_data_->_tmp0_ = _data_->self->priv->msg;
	soup_message_set_status (_data_->_tmp0_, (guint) SOUP_STATUS_OK);
	_data_->_tmp1_ = _data_->self->priv->server;
	_data_->_tmp2_ = _data_->self->priv->msg;
	soup_server_unpause_message (_data_->_tmp1_, _data_->_tmp2_);
	g_signal_emit_by_name ((RygelStateMachine*) _data_->self, "completed");
	block4_data_unref (_data_->_data4_);
	_data_->_data4_ = NULL;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static GCancellable* rygel_http_response_real_get_cancellable (RygelStateMachine* base) {
	GCancellable* result;
	RygelHTTPResponse* self;
	GCancellable* _tmp0_;
	self = (RygelHTTPResponse*) base;
	_tmp0_ = self->priv->_cancellable;
	result = _tmp0_;
	return result;
}


static void rygel_http_response_real_set_cancellable (RygelStateMachine* base, GCancellable* value) {
	RygelHTTPResponse* self;
	GCancellable* _tmp0_;
	GCancellable* _tmp1_;
	self = (RygelHTTPResponse*) base;
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_cancellable);
	self->priv->_cancellable = _tmp1_;
	g_object_notify ((GObject *) self, "cancellable");
}


static void rygel_http_response_class_init (RygelHTTPResponseClass * klass) {
	rygel_http_response_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (RygelHTTPResponsePrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_rygel_http_response_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_rygel_http_response_set_property;
	G_OBJECT_CLASS (klass)->finalize = rygel_http_response_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_HTTP_RESPONSE_CANCELLABLE, g_param_spec_object ("cancellable", "cancellable", "cancellable", g_cancellable_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void rygel_http_response_rygel_state_machine_interface_init (RygelStateMachineIface * iface) {
	rygel_http_response_rygel_state_machine_parent_iface = g_type_interface_peek_parent (iface);
	iface->run = (void (*)(RygelStateMachine*)) rygel_http_response_real_run;
	iface->run_finish = rygel_http_response_real_run_finish;
	iface->get_cancellable = rygel_http_response_real_get_cancellable;
	iface->set_cancellable = rygel_http_response_real_set_cancellable;
}


static void rygel_http_response_instance_init (RygelHTTPResponse * self) {
	self->priv = RYGEL_HTTP_RESPONSE_GET_PRIVATE (self);
}


static void rygel_http_response_finalize (GObject* obj) {
	RygelHTTPResponse * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_HTTP_RESPONSE, RygelHTTPResponse);
	_g_object_unref0 (self->priv->_cancellable);
	_g_object_unref0 (self->priv->msg);
	_g_object_unref0 (self->priv->server);
	G_OBJECT_CLASS (rygel_http_response_parent_class)->finalize (obj);
}


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 = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_TYPE_HTTP_RESPONSE, RygelHTTPResponse);
	switch (property_id) {
		case RYGEL_HTTP_RESPONSE_CANCELLABLE:
		g_value_set_object (value, rygel_state_machine_get_cancellable ((RygelStateMachine*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_rygel_http_response_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	RygelHTTPResponse * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_TYPE_HTTP_RESPONSE, RygelHTTPResponse);
	switch (property_id) {
		case RYGEL_HTTP_RESPONSE_CANCELLABLE:
		rygel_state_machine_set_cancellable ((RygelStateMachine*) self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


RygelObjectRemovalQueue* rygel_object_removal_queue_get_default (void) {
	RygelObjectRemovalQueue* result = NULL;
	RygelObjectRemovalQueue* _tmp0_;
	_tmp0_ = rygel_object_removal_queue_new ();
	result = _tmp0_;
	return result;
}


gboolean rygel_object_removal_queue_dequeue (RygelObjectRemovalQueue* self, RygelMediaObject* item) {
	gboolean result = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (item != NULL, FALSE);
	result = TRUE;
	return result;
}


static void rygel_object_removal_queue_remove_now_data_free (gpointer _data) {
	RygelObjectRemovalQueueRemoveNowData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->item);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelObjectRemovalQueueRemoveNowData, _data_);
}


void rygel_object_removal_queue_remove_now (RygelObjectRemovalQueue* self, RygelMediaObject* item, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelObjectRemovalQueueRemoveNowData* _data_;
	RygelObjectRemovalQueue* _tmp0_;
	RygelMediaObject* _tmp1_;
	RygelMediaObject* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
	_data_ = g_slice_new0 (RygelObjectRemovalQueueRemoveNowData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_object_removal_queue_remove_now);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_object_removal_queue_remove_now_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = item;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->item);
	_data_->item = _tmp2_;
	_tmp3_ = cancellable;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp4_;
	rygel_object_removal_queue_remove_now_co (_data_);
}


void rygel_object_removal_queue_remove_now_finish (RygelObjectRemovalQueue* self, GAsyncResult* _res_) {
	RygelObjectRemovalQueueRemoveNowData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean _rygel_object_removal_queue_remove_now_co_gsource_func (gpointer self) {
	gboolean result;
	result = rygel_object_removal_queue_remove_now_co (self);
	return result;
}


static gboolean rygel_object_removal_queue_remove_now_co (RygelObjectRemovalQueueRemoveNowData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _rygel_object_removal_queue_remove_now_co_gsource_func, _data_, NULL);
	_data_->_state_ = 1;
	return FALSE;
	_state_1:
	;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


RygelObjectRemovalQueue* rygel_object_removal_queue_construct (GType object_type) {
	RygelObjectRemovalQueue * self = NULL;
	self = (RygelObjectRemovalQueue*) g_object_new (object_type, NULL);
	return self;
}


RygelObjectRemovalQueue* rygel_object_removal_queue_new (void) {
	return rygel_object_removal_queue_construct (RYGEL_TYPE_OBJECT_REMOVAL_QUEUE);
}


static void rygel_object_removal_queue_class_init (RygelObjectRemovalQueueClass * klass) {
	rygel_object_removal_queue_parent_class = g_type_class_peek_parent (klass);
}


static void rygel_object_removal_queue_instance_init (RygelObjectRemovalQueue * self) {
}


GType rygel_object_removal_queue_get_type (void) {
	static volatile gsize rygel_object_removal_queue_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_object_removal_queue_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelObjectRemovalQueueClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_object_removal_queue_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelObjectRemovalQueue), 0, (GInstanceInitFunc) rygel_object_removal_queue_instance_init, NULL };
		GType rygel_object_removal_queue_type_id;
		rygel_object_removal_queue_type_id = g_type_register_static (G_TYPE_OBJECT, "RygelObjectRemovalQueue", &g_define_type_info, 0);
		g_once_init_leave (&rygel_object_removal_queue_type_id__volatile, rygel_object_removal_queue_type_id);
	}
	return rygel_object_removal_queue_type_id__volatile;
}


RygelMediaObject* rygel_media_object_construct (GType object_type) {
	RygelMediaObject * self = NULL;
	self = (RygelMediaObject*) g_object_new (object_type, NULL);
	return self;
}


RygelMediaObject* rygel_media_object_new (void) {
	return rygel_media_object_construct (RYGEL_TYPE_MEDIA_OBJECT);
}


static void rygel_media_object_class_init (RygelMediaObjectClass * klass) {
	rygel_media_object_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = rygel_media_object_finalize;
}


static void rygel_media_object_instance_init (RygelMediaObject * self) {
	gchar* _tmp0_;
	_tmp0_ = g_strdup ("");
	self->mime_type = _tmp0_;
}


static void rygel_media_object_finalize (GObject* obj) {
	RygelMediaObject * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_MEDIA_OBJECT, RygelMediaObject);
	_g_free0 (self->id);
	_g_free0 (self->mime_type);
	G_OBJECT_CLASS (rygel_media_object_parent_class)->finalize (obj);
}


GType rygel_media_object_get_type (void) {
	static volatile gsize rygel_media_object_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_media_object_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelMediaObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_media_object_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelMediaObject), 0, (GInstanceInitFunc) rygel_media_object_instance_init, NULL };
		GType rygel_media_object_type_id;
		rygel_media_object_type_id = g_type_register_static (G_TYPE_OBJECT, "RygelMediaObject", &g_define_type_info, 0);
		g_once_init_leave (&rygel_media_object_type_id__volatile, rygel_media_object_type_id);
	}
	return rygel_media_object_type_id__volatile;
}


RygelThumbnail* rygel_thumbnail_construct (GType object_type) {
	RygelThumbnail * self = NULL;
	self = (RygelThumbnail*) g_object_new (object_type, NULL);
	return self;
}


RygelThumbnail* rygel_thumbnail_new (void) {
	return rygel_thumbnail_construct (RYGEL_TYPE_THUMBNAIL);
}


static void rygel_thumbnail_class_init (RygelThumbnailClass * klass) {
	rygel_thumbnail_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = rygel_thumbnail_finalize;
}


static void rygel_thumbnail_instance_init (RygelThumbnail * self) {
}


static void rygel_thumbnail_finalize (GObject* obj) {
	RygelThumbnail * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_THUMBNAIL, RygelThumbnail);
	_g_free0 (self->file_extension);
	G_OBJECT_CLASS (rygel_thumbnail_parent_class)->finalize (obj);
}


GType rygel_thumbnail_get_type (void) {
	static volatile gsize rygel_thumbnail_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_thumbnail_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelThumbnailClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_thumbnail_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelThumbnail), 0, (GInstanceInitFunc) rygel_thumbnail_instance_init, NULL };
		GType rygel_thumbnail_type_id;
		rygel_thumbnail_type_id = g_type_register_static (G_TYPE_OBJECT, "RygelThumbnail", &g_define_type_info, 0);
		g_once_init_leave (&rygel_thumbnail_type_id__volatile, rygel_thumbnail_type_id);
	}
	return rygel_thumbnail_type_id__volatile;
}


RygelVisualItem* rygel_visual_item_construct (GType object_type) {
	RygelVisualItem * self = NULL;
	self = (RygelVisualItem*) rygel_media_item_construct_for_visual_item (object_type);
	return self;
}


RygelVisualItem* rygel_visual_item_new (void) {
	return rygel_visual_item_construct (RYGEL_TYPE_VISUAL_ITEM);
}


static void rygel_visual_item_class_init (RygelVisualItemClass * klass) {
	rygel_visual_item_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = rygel_visual_item_finalize;
}


static void rygel_visual_item_instance_init (RygelVisualItem * self) {
	GeeArrayList* _tmp0_;
	_tmp0_ = gee_array_list_new (RYGEL_TYPE_THUMBNAIL, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
	self->thumbnails = _tmp0_;
}


static void rygel_visual_item_finalize (GObject* obj) {
	RygelVisualItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_VISUAL_ITEM, RygelVisualItem);
	_g_object_unref0 (self->thumbnails);
	G_OBJECT_CLASS (rygel_visual_item_parent_class)->finalize (obj);
}


GType rygel_visual_item_get_type (void) {
	static volatile gsize rygel_visual_item_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_visual_item_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelVisualItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_visual_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelVisualItem), 0, (GInstanceInitFunc) rygel_visual_item_instance_init, NULL };
		GType rygel_visual_item_type_id;
		rygel_visual_item_type_id = g_type_register_static (RYGEL_TYPE_MEDIA_ITEM, "RygelVisualItem", &g_define_type_info, 0);
		g_once_init_leave (&rygel_visual_item_type_id__volatile, rygel_visual_item_type_id);
	}
	return rygel_visual_item_type_id__volatile;
}


RygelSubtitle* rygel_subtitle_construct (GType object_type) {
	RygelSubtitle * self = NULL;
	self = (RygelSubtitle*) g_object_new (object_type, NULL);
	return self;
}


RygelSubtitle* rygel_subtitle_new (void) {
	return rygel_subtitle_construct (RYGEL_TYPE_SUBTITLE);
}


static void rygel_subtitle_class_init (RygelSubtitleClass * klass) {
	rygel_subtitle_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = rygel_subtitle_finalize;
}


static void rygel_subtitle_instance_init (RygelSubtitle * self) {
}


static void rygel_subtitle_finalize (GObject* obj) {
	RygelSubtitle * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_SUBTITLE, RygelSubtitle);
	_g_free0 (self->caption_type);
	G_OBJECT_CLASS (rygel_subtitle_parent_class)->finalize (obj);
}


GType rygel_subtitle_get_type (void) {
	static volatile gsize rygel_subtitle_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_subtitle_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelSubtitleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_subtitle_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelSubtitle), 0, (GInstanceInitFunc) rygel_subtitle_instance_init, NULL };
		GType rygel_subtitle_type_id;
		rygel_subtitle_type_id = g_type_register_static (G_TYPE_OBJECT, "RygelSubtitle", &g_define_type_info, 0);
		g_once_init_leave (&rygel_subtitle_type_id__volatile, rygel_subtitle_type_id);
	}
	return rygel_subtitle_type_id__volatile;
}


RygelVideoItem* rygel_video_item_construct (GType object_type) {
	RygelVideoItem * self = NULL;
	self = (RygelVideoItem*) rygel_visual_item_construct (object_type);
	return self;
}


RygelVideoItem* rygel_video_item_new (void) {
	return rygel_video_item_construct (RYGEL_TYPE_VIDEO_ITEM);
}


static void rygel_video_item_class_init (RygelVideoItemClass * klass) {
	rygel_video_item_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = rygel_video_item_finalize;
}


static void rygel_video_item_instance_init (RygelVideoItem * self) {
	GeeArrayList* _tmp0_;
	_tmp0_ = gee_array_list_new (RYGEL_TYPE_SUBTITLE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
	self->subtitles = _tmp0_;
}


static void rygel_video_item_finalize (GObject* obj) {
	RygelVideoItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_VIDEO_ITEM, RygelVideoItem);
	_g_object_unref0 (self->subtitles);
	G_OBJECT_CLASS (rygel_video_item_parent_class)->finalize (obj);
}


GType rygel_video_item_get_type (void) {
	static volatile gsize rygel_video_item_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_video_item_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelVideoItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_video_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelVideoItem), 0, (GInstanceInitFunc) rygel_video_item_instance_init, NULL };
		GType rygel_video_item_type_id;
		rygel_video_item_type_id = g_type_register_static (RYGEL_TYPE_VISUAL_ITEM, "RygelVideoItem", &g_define_type_info, 0);
		g_once_init_leave (&rygel_video_item_type_id__volatile, rygel_video_item_type_id);
	}
	return rygel_video_item_type_id__volatile;
}


RygelMusicItem* rygel_music_item_construct (GType object_type, const gchar* id, RygelMediaContainer* parent) {
	RygelMusicItem * self = NULL;
	const gchar* _tmp0_;
	RygelMediaContainer* _tmp1_;
	g_return_val_if_fail (id != NULL, NULL);
	g_return_val_if_fail (parent != NULL, NULL);
	_tmp0_ = id;
	_tmp1_ = parent;
	self = (RygelMusicItem*) rygel_media_item_construct (object_type, _tmp0_, _tmp1_);
	return self;
}


RygelMusicItem* rygel_music_item_new (const gchar* id, RygelMediaContainer* parent) {
	return rygel_music_item_construct (RYGEL_TYPE_MUSIC_ITEM, id, parent);
}


static void rygel_music_item_class_init (RygelMusicItemClass * klass) {
	rygel_music_item_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = rygel_music_item_finalize;
}


static void rygel_music_item_instance_init (RygelMusicItem * self) {
}


static void rygel_music_item_finalize (GObject* obj) {
	RygelMusicItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_MUSIC_ITEM, RygelMusicItem);
	_g_object_unref0 (self->album_art);
	G_OBJECT_CLASS (rygel_music_item_parent_class)->finalize (obj);
}


GType rygel_music_item_get_type (void) {
	static volatile gsize rygel_music_item_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_music_item_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelMusicItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_music_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelMusicItem), 0, (GInstanceInitFunc) rygel_music_item_instance_init, NULL };
		GType rygel_music_item_type_id;
		rygel_music_item_type_id = g_type_register_static (RYGEL_TYPE_MEDIA_ITEM, "RygelMusicItem", &g_define_type_info, 0);
		g_once_init_leave (&rygel_music_item_type_id__volatile, rygel_music_item_type_id);
	}
	return rygel_music_item_type_id__volatile;
}


GQuark rygel_content_directory_error_quark (void) {
	return g_quark_from_static_string ("rygel_content_directory_error-quark");
}


RygelTranscoder* rygel_transcoder_construct (GType object_type, const gchar* extension) {
	RygelTranscoder * self = NULL;
	const gchar* _tmp0_;
	g_return_val_if_fail (extension != NULL, NULL);
	self = (RygelTranscoder*) g_object_new (object_type, NULL);
	_tmp0_ = extension;
	rygel_transcoder_set_extension (self, _tmp0_);
	return self;
}


RygelTranscoder* rygel_transcoder_new (const gchar* extension) {
	return rygel_transcoder_construct (RYGEL_TYPE_TRANSCODER, extension);
}


const gchar* rygel_transcoder_get_extension (RygelTranscoder* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_extension;
	result = _tmp0_;
	return result;
}


void rygel_transcoder_set_extension (RygelTranscoder* self, const gchar* value) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_extension);
	self->priv->_extension = _tmp1_;
	g_object_notify ((GObject *) self, "extension");
}


static void rygel_transcoder_class_init (RygelTranscoderClass * klass) {
	rygel_transcoder_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (RygelTranscoderPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_rygel_transcoder_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_rygel_transcoder_set_property;
	G_OBJECT_CLASS (klass)->finalize = rygel_transcoder_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_TRANSCODER_EXTENSION, g_param_spec_string ("extension", "extension", "extension", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void rygel_transcoder_instance_init (RygelTranscoder * self) {
	self->priv = RYGEL_TRANSCODER_GET_PRIVATE (self);
}


static void rygel_transcoder_finalize (GObject* obj) {
	RygelTranscoder * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_TRANSCODER, RygelTranscoder);
	_g_free0 (self->priv->_extension);
	G_OBJECT_CLASS (rygel_transcoder_parent_class)->finalize (obj);
}


GType rygel_transcoder_get_type (void) {
	static volatile gsize rygel_transcoder_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_transcoder_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelTranscoderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_transcoder_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelTranscoder), 0, (GInstanceInitFunc) rygel_transcoder_instance_init, NULL };
		GType rygel_transcoder_type_id;
		rygel_transcoder_type_id = g_type_register_static (G_TYPE_OBJECT, "RygelTranscoder", &g_define_type_info, 0);
		g_once_init_leave (&rygel_transcoder_type_id__volatile, rygel_transcoder_type_id);
	}
	return rygel_transcoder_type_id__volatile;
}


static void _vala_rygel_transcoder_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	RygelTranscoder * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_TYPE_TRANSCODER, RygelTranscoder);
	switch (property_id) {
		case RYGEL_TRANSCODER_EXTENSION:
		g_value_set_string (value, rygel_transcoder_get_extension (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_rygel_transcoder_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	RygelTranscoder * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_TYPE_TRANSCODER, RygelTranscoder);
	switch (property_id) {
		case RYGEL_TRANSCODER_EXTENSION:
		rygel_transcoder_set_extension (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



