/* rygel-client-hacks.c generated by valac 0.34.7, the Vala compiler
 * generated from rygel-client-hacks.vala, do not modify */

/*
 * Copyright (C) 2011 Red Hat, Inc.
 * Copyright (C) 2010 Nokia Corporation.
 *
 * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
 *
 * This file is part of Rygel.
 *
 * Rygel is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * Rygel is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <gee.h>
#include <libsoup/soup.h>
#include <glib/gi18n-lib.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_QUERY_ACTION (rygel_media_query_action_get_type ())
#define RYGEL_MEDIA_QUERY_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_MEDIA_QUERY_ACTION, RygelMediaQueryAction))
#define RYGEL_MEDIA_QUERY_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_MEDIA_QUERY_ACTION, RygelMediaQueryActionClass))
#define RYGEL_IS_MEDIA_QUERY_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_MEDIA_QUERY_ACTION))
#define RYGEL_IS_MEDIA_QUERY_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_MEDIA_QUERY_ACTION))
#define RYGEL_MEDIA_QUERY_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_MEDIA_QUERY_ACTION, RygelMediaQueryActionClass))

typedef struct _RygelMediaQueryAction RygelMediaQueryAction;
typedef struct _RygelMediaQueryActionClass RygelMediaQueryActionClass;

#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_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_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_SEARCHABLE_CONTAINER (rygel_searchable_container_get_type ())
#define RYGEL_SEARCHABLE_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_SEARCHABLE_CONTAINER, RygelSearchableContainer))
#define RYGEL_IS_SEARCHABLE_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_SEARCHABLE_CONTAINER))
#define RYGEL_SEARCHABLE_CONTAINER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), RYGEL_TYPE_SEARCHABLE_CONTAINER, RygelSearchableContainerIface))

typedef struct _RygelSearchableContainer RygelSearchableContainer;
typedef struct _RygelSearchableContainerIface RygelSearchableContainerIface;

#define RYGEL_TYPE_SEARCH_EXPRESSION (rygel_search_expression_get_type ())
#define RYGEL_SEARCH_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_SEARCH_EXPRESSION, RygelSearchExpression))
#define RYGEL_SEARCH_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_SEARCH_EXPRESSION, RygelSearchExpressionClass))
#define RYGEL_IS_SEARCH_EXPRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_SEARCH_EXPRESSION))
#define RYGEL_IS_SEARCH_EXPRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_SEARCH_EXPRESSION))
#define RYGEL_SEARCH_EXPRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_SEARCH_EXPRESSION, RygelSearchExpressionClass))

typedef struct _RygelSearchExpression RygelSearchExpression;
typedef struct _RygelSearchExpressionClass RygelSearchExpressionClass;

#define RYGEL_TYPE_MEDIA_OBJECTS (rygel_media_objects_get_type ())
#define RYGEL_MEDIA_OBJECTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_MEDIA_OBJECTS, RygelMediaObjects))
#define RYGEL_MEDIA_OBJECTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_MEDIA_OBJECTS, RygelMediaObjectsClass))
#define RYGEL_IS_MEDIA_OBJECTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_MEDIA_OBJECTS))
#define RYGEL_IS_MEDIA_OBJECTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_MEDIA_OBJECTS))
#define RYGEL_MEDIA_OBJECTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_MEDIA_OBJECTS, RygelMediaObjectsClass))

typedef struct _RygelMediaObjects RygelMediaObjects;
typedef struct _RygelMediaObjectsClass RygelMediaObjectsClass;
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define RYGEL_TYPE_PANASONIC_HACKS (rygel_panasonic_hacks_get_type ())
#define RYGEL_PANASONIC_HACKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_PANASONIC_HACKS, RygelPanasonicHacks))
#define RYGEL_PANASONIC_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_PANASONIC_HACKS, RygelPanasonicHacksClass))
#define RYGEL_IS_PANASONIC_HACKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_PANASONIC_HACKS))
#define RYGEL_IS_PANASONIC_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_PANASONIC_HACKS))
#define RYGEL_PANASONIC_HACKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_PANASONIC_HACKS, RygelPanasonicHacksClass))

typedef struct _RygelPanasonicHacks RygelPanasonicHacks;
typedef struct _RygelPanasonicHacksClass RygelPanasonicHacksClass;

#define RYGEL_TYPE_XBMC_HACKS (rygel_xbmc_hacks_get_type ())
#define RYGEL_XBMC_HACKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_XBMC_HACKS, RygelXBMCHacks))
#define RYGEL_XBMC_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_XBMC_HACKS, RygelXBMCHacksClass))
#define RYGEL_IS_XBMC_HACKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_XBMC_HACKS))
#define RYGEL_IS_XBMC_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_XBMC_HACKS))
#define RYGEL_XBMC_HACKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_XBMC_HACKS, RygelXBMCHacksClass))

typedef struct _RygelXBMCHacks RygelXBMCHacks;
typedef struct _RygelXBMCHacksClass RygelXBMCHacksClass;

#define RYGEL_TYPE_XBM_C4_XBOX_HACKS (rygel_xbm_c4_xbox_hacks_get_type ())
#define RYGEL_XBM_C4_XBOX_HACKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_XBM_C4_XBOX_HACKS, RygelXBMC4XBoxHacks))
#define RYGEL_XBM_C4_XBOX_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_XBM_C4_XBOX_HACKS, RygelXBMC4XBoxHacksClass))
#define RYGEL_IS_XBM_C4_XBOX_HACKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_XBM_C4_XBOX_HACKS))
#define RYGEL_IS_XBM_C4_XBOX_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_XBM_C4_XBOX_HACKS))
#define RYGEL_XBM_C4_XBOX_HACKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_XBM_C4_XBOX_HACKS, RygelXBMC4XBoxHacksClass))

typedef struct _RygelXBMC4XBoxHacks RygelXBMC4XBoxHacks;
typedef struct _RygelXBMC4XBoxHacksClass RygelXBMC4XBoxHacksClass;

#define RYGEL_TYPE_XBOX_HACKS (rygel_xbox_hacks_get_type ())
#define RYGEL_XBOX_HACKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_XBOX_HACKS, RygelXBoxHacks))
#define RYGEL_XBOX_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_XBOX_HACKS, RygelXBoxHacksClass))
#define RYGEL_IS_XBOX_HACKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_XBOX_HACKS))
#define RYGEL_IS_XBOX_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_XBOX_HACKS))
#define RYGEL_XBOX_HACKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_XBOX_HACKS, RygelXBoxHacksClass))

typedef struct _RygelXBoxHacks RygelXBoxHacks;
typedef struct _RygelXBoxHacksClass RygelXBoxHacksClass;

#define RYGEL_TYPE_WMP_HACKS (rygel_wmp_hacks_get_type ())
#define RYGEL_WMP_HACKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_WMP_HACKS, RygelWMPHacks))
#define RYGEL_WMP_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_WMP_HACKS, RygelWMPHacksClass))
#define RYGEL_IS_WMP_HACKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_WMP_HACKS))
#define RYGEL_IS_WMP_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_WMP_HACKS))
#define RYGEL_WMP_HACKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_WMP_HACKS, RygelWMPHacksClass))

typedef struct _RygelWMPHacks RygelWMPHacks;
typedef struct _RygelWMPHacksClass RygelWMPHacksClass;

#define RYGEL_TYPE_SAMSUNG_TV_HACKS (rygel_samsung_tv_hacks_get_type ())
#define RYGEL_SAMSUNG_TV_HACKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_SAMSUNG_TV_HACKS, RygelSamsungTVHacks))
#define RYGEL_SAMSUNG_TV_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_SAMSUNG_TV_HACKS, RygelSamsungTVHacksClass))
#define RYGEL_IS_SAMSUNG_TV_HACKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_SAMSUNG_TV_HACKS))
#define RYGEL_IS_SAMSUNG_TV_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_SAMSUNG_TV_HACKS))
#define RYGEL_SAMSUNG_TV_HACKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_SAMSUNG_TV_HACKS, RygelSamsungTVHacksClass))

typedef struct _RygelSamsungTVHacks RygelSamsungTVHacks;
typedef struct _RygelSamsungTVHacksClass RygelSamsungTVHacksClass;

#define RYGEL_TYPE_SEEK_HACKS (rygel_seek_hacks_get_type ())
#define RYGEL_SEEK_HACKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_SEEK_HACKS, RygelSeekHacks))
#define RYGEL_SEEK_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_SEEK_HACKS, RygelSeekHacksClass))
#define RYGEL_IS_SEEK_HACKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_SEEK_HACKS))
#define RYGEL_IS_SEEK_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_SEEK_HACKS))
#define RYGEL_SEEK_HACKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_SEEK_HACKS, RygelSeekHacksClass))

typedef struct _RygelSeekHacks RygelSeekHacks;
typedef struct _RygelSeekHacksClass RygelSeekHacksClass;

#define RYGEL_TYPE_LGTV_HACKS (rygel_lgtv_hacks_get_type ())
#define RYGEL_LGTV_HACKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_LGTV_HACKS, RygelLGTVHacks))
#define RYGEL_LGTV_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_LGTV_HACKS, RygelLGTVHacksClass))
#define RYGEL_IS_LGTV_HACKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_LGTV_HACKS))
#define RYGEL_IS_LGTV_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_LGTV_HACKS))
#define RYGEL_LGTV_HACKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_LGTV_HACKS, RygelLGTVHacksClass))

typedef struct _RygelLGTVHacks RygelLGTVHacks;
typedef struct _RygelLGTVHacksClass RygelLGTVHacksClass;

#define RYGEL_TYPE_PHILLIPS_HACKS (rygel_phillips_hacks_get_type ())
#define RYGEL_PHILLIPS_HACKS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_PHILLIPS_HACKS, RygelPhillipsHacks))
#define RYGEL_PHILLIPS_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_PHILLIPS_HACKS, RygelPhillipsHacksClass))
#define RYGEL_IS_PHILLIPS_HACKS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_PHILLIPS_HACKS))
#define RYGEL_IS_PHILLIPS_HACKS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_PHILLIPS_HACKS))
#define RYGEL_PHILLIPS_HACKS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_PHILLIPS_HACKS, RygelPhillipsHacksClass))

typedef struct _RygelPhillipsHacks RygelPhillipsHacks;
typedef struct _RygelPhillipsHacksClass RygelPhillipsHacksClass;
#define _rygel_search_expression_unref0(var) ((var == NULL) ? NULL : (var = (rygel_search_expression_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _RygelClientHacksSearchData RygelClientHacksSearchData;
#define __vala_SoupMessageHeaders_free0(var) ((var == NULL) ? NULL : (var = (_vala_SoupMessageHeaders_free (var), NULL)))

typedef enum  {
	RYGEL_CLIENT_HACKS_ERROR_NA
} RygelClientHacksError;
#define RYGEL_CLIENT_HACKS_ERROR rygel_client_hacks_error_quark ()
struct _RygelSearchableContainerIface {
	GTypeInterface parent_iface;
	void (*search) (RygelSearchableContainer* self, RygelSearchExpression* expression, guint offset, guint max_count, const gchar* sort_criteria, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	RygelMediaObjects* (*search_finish) (RygelSearchableContainer* self, GAsyncResult* _res_, guint* total_matches, GError** error);
	GeeArrayList* (*get_search_classes) (RygelSearchableContainer* self);
	void (*set_search_classes) (RygelSearchableContainer* self, GeeArrayList* value);
};

struct _RygelClientHacks {
	GObject parent_instance;
	RygelClientHacksPrivate * priv;
	GRegex* agent_regex;
};

struct _RygelClientHacksClass {
	GObjectClass parent_class;
	void (*translate_container_id) (RygelClientHacks* self, RygelMediaQueryAction* action, gchar** container_id);
	void (*apply) (RygelClientHacks* self, RygelMediaObject* object);
	void (*filter_sort_criteria) (RygelClientHacks* self, gchar** sort_criteria);
	gboolean (*force_seek) (RygelClientHacks* self);
	void (*modify_headers) (RygelClientHacks* self, RygelHTTPRequest* request);
	void (*search) (RygelClientHacks* self, RygelSearchableContainer* container, RygelSearchExpression* expression, guint offset, guint max_count, const gchar* sort_criteria, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	RygelMediaObjects* (*search_finish) (RygelClientHacks* self, GAsyncResult* _res_, guint* total_matches, GError** error);
};

struct _RygelClientHacksPrivate {
	const gchar* _object_id;
};

struct _RygelClientHacksSearchData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelClientHacks* self;
	RygelSearchableContainer* container;
	RygelSearchExpression* expression;
	guint offset;
	guint max_count;
	guint total_matches;
	gchar* sort_criteria;
	GCancellable* cancellable;
	RygelMediaObjects* result;
	RygelMediaObjects* _tmp0_;
	RygelSearchableContainer* _tmp1_;
	RygelSearchExpression* _tmp2_;
	guint _tmp3_;
	guint _tmp4_;
	const gchar* _tmp5_;
	GCancellable* _tmp6_;
	guint _tmp7_;
	RygelMediaObjects* _tmp8_;
	RygelMediaObjects* _tmp9_;
	GError * _inner_error_;
};


static gpointer rygel_client_hacks_parent_class = NULL;
static GeeHashMap* rygel_client_hacks_client_agent_cache;
static GeeHashMap* rygel_client_hacks_client_agent_cache = NULL;

GQuark rygel_client_hacks_error_quark (void);
GType rygel_client_hacks_get_type (void) G_GNUC_CONST;
GType rygel_media_query_action_get_type (void) G_GNUC_CONST;
GType rygel_media_object_get_type (void) G_GNUC_CONST;
GType rygel_http_request_get_type (void) G_GNUC_CONST;
GType rygel_media_container_get_type (void) G_GNUC_CONST;
gpointer rygel_search_expression_ref (gpointer instance);
void rygel_search_expression_unref (gpointer instance);
GParamSpec* rygel_param_spec_search_expression (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void rygel_value_set_search_expression (GValue* value, gpointer v_object);
void rygel_value_take_search_expression (GValue* value, gpointer v_object);
gpointer rygel_value_get_search_expression (const GValue* value);
GType rygel_search_expression_get_type (void) G_GNUC_CONST;
GType rygel_media_objects_get_type (void) G_GNUC_CONST;
GType rygel_searchable_container_get_type (void) G_GNUC_CONST;
#define RYGEL_CLIENT_HACKS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RYGEL_TYPE_CLIENT_HACKS, RygelClientHacksPrivate))
enum  {
	RYGEL_CLIENT_HACKS_DUMMY_PROPERTY,
	RYGEL_CLIENT_HACKS_OBJECT_ID
};
#define RYGEL_CLIENT_HACKS_CORRECT_OBJECT_ID "ObjectID"
RygelClientHacks* rygel_client_hacks_construct (GType object_type, const gchar* agent, SoupMessage* message, GError** error);
static void rygel_client_hacks_check_headers (RygelClientHacks* self, SoupMessage* message, GError** error);
RygelClientHacks* rygel_client_hacks_create (SoupMessage* message, GError** error);
GType rygel_panasonic_hacks_get_type (void) G_GNUC_CONST;
RygelPanasonicHacks* rygel_panasonic_hacks_new (SoupMessage* message, GError** error);
RygelPanasonicHacks* rygel_panasonic_hacks_construct (GType object_type, SoupMessage* message, GError** error);
GType rygel_xbmc_hacks_get_type (void) G_GNUC_CONST;
GType rygel_xbm_c4_xbox_hacks_get_type (void) G_GNUC_CONST;
RygelXBMC4XBoxHacks* rygel_xbm_c4_xbox_hacks_new (SoupMessage* message, GError** error);
RygelXBMC4XBoxHacks* rygel_xbm_c4_xbox_hacks_construct (GType object_type, SoupMessage* message, GError** error);
GType rygel_xbox_hacks_get_type (void) G_GNUC_CONST;
RygelXBoxHacks* rygel_xbox_hacks_new (SoupMessage* message, GError** error);
RygelXBoxHacks* rygel_xbox_hacks_construct (GType object_type, SoupMessage* message, GError** error);
GType rygel_wmp_hacks_get_type (void) G_GNUC_CONST;
RygelWMPHacks* rygel_wmp_hacks_new (SoupMessage* message, GError** error);
RygelWMPHacks* rygel_wmp_hacks_construct (GType object_type, SoupMessage* message, GError** error);
GType rygel_samsung_tv_hacks_get_type (void) G_GNUC_CONST;
RygelSamsungTVHacks* rygel_samsung_tv_hacks_new (SoupMessage* message, GError** error);
RygelSamsungTVHacks* rygel_samsung_tv_hacks_construct (GType object_type, SoupMessage* message, GError** error);
GType rygel_seek_hacks_get_type (void) G_GNUC_CONST;
RygelSeekHacks* rygel_seek_hacks_new (SoupMessage* message, GError** error);
RygelSeekHacks* rygel_seek_hacks_construct (GType object_type, SoupMessage* message, GError** error);
GType rygel_lgtv_hacks_get_type (void) G_GNUC_CONST;
RygelLGTVHacks* rygel_lgtv_hacks_new (SoupMessage* message, GError** error);
RygelLGTVHacks* rygel_lgtv_hacks_construct (GType object_type, SoupMessage* message, GError** error);
GType rygel_phillips_hacks_get_type (void) G_GNUC_CONST;
RygelPhillipsHacks* rygel_phillips_hacks_new (SoupMessage* message, GError** error);
RygelPhillipsHacks* rygel_phillips_hacks_construct (GType object_type, SoupMessage* message, GError** error);
RygelXBMCHacks* rygel_xbmc_hacks_new (SoupMessage* message, const gchar* agent, GError** error);
RygelXBMCHacks* rygel_xbmc_hacks_construct (GType object_type, SoupMessage* message, const gchar* agent, GError** error);
void rygel_client_hacks_translate_container_id (RygelClientHacks* self, RygelMediaQueryAction* action, gchar** container_id);
static void rygel_client_hacks_real_translate_container_id (RygelClientHacks* self, RygelMediaQueryAction* action, gchar** container_id);
void rygel_client_hacks_apply (RygelClientHacks* self, RygelMediaObject* object);
static void rygel_client_hacks_real_apply (RygelClientHacks* self, RygelMediaObject* object);
void rygel_client_hacks_filter_sort_criteria (RygelClientHacks* self, gchar** sort_criteria);
static void rygel_client_hacks_real_filter_sort_criteria (RygelClientHacks* self, gchar** sort_criteria);
gboolean rygel_client_hacks_force_seek (RygelClientHacks* self);
static gboolean rygel_client_hacks_real_force_seek (RygelClientHacks* self);
void rygel_client_hacks_modify_headers (RygelClientHacks* self, RygelHTTPRequest* request);
static void rygel_client_hacks_real_modify_headers (RygelClientHacks* self, RygelHTTPRequest* request);
static void rygel_client_hacks_real_search_data_free (gpointer _data);
static void rygel_client_hacks_real_search (RygelClientHacks* self, RygelSearchableContainer* container, RygelSearchExpression* expression, guint offset, guint max_count, const gchar* sort_criteria, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void rygel_client_hacks_search (RygelClientHacks* self, RygelSearchableContainer* container, RygelSearchExpression* expression, guint offset, guint max_count, const gchar* sort_criteria, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
RygelMediaObjects* rygel_client_hacks_search_finish (RygelClientHacks* self, GAsyncResult* _res_, guint* total_matches, GError** error);
static gboolean rygel_client_hacks_real_search_co (RygelClientHacksSearchData* _data_);
void rygel_searchable_container_search (RygelSearchableContainer* self, RygelSearchExpression* expression, guint offset, guint max_count, const gchar* sort_criteria, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
RygelMediaObjects* rygel_searchable_container_search_finish (RygelSearchableContainer* self, GAsyncResult* _res_, guint* total_matches, GError** error);
static void rygel_client_hacks_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static SoupMessageHeaders* _vala_SoupMessageHeaders_copy (SoupMessageHeaders* self);
static void _vala_SoupMessageHeaders_free (SoupMessageHeaders* self);
const gchar* rygel_client_hacks_get_object_id (RygelClientHacks* self);
void rygel_client_hacks_set_object_id (RygelClientHacks* self, const gchar* value);
static void rygel_client_hacks_finalize (GObject* obj);
static void _vala_rygel_client_hacks_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_rygel_client_hacks_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


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


RygelClientHacks* rygel_client_hacks_construct (GType object_type, const gchar* agent, SoupMessage* message, GError** error) {
	RygelClientHacks * self = NULL;
	SoupMessage* _tmp4_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (agent != NULL, NULL);
	self = (RygelClientHacks*) g_object_new (object_type, NULL);
	{
		GRegex* _tmp0_ = NULL;
		const gchar* _tmp1_ = NULL;
		GRegex* _tmp2_ = NULL;
		GRegex* _tmp3_ = NULL;
		_tmp1_ = agent;
		_tmp2_ = g_regex_new (_tmp1_, G_REGEX_CASELESS | G_REGEX_RAW, 0, &_inner_error_);
		_tmp0_ = _tmp2_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch23_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected 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_ = _tmp0_;
		_tmp0_ = NULL;
		_g_regex_unref0 (self->agent_regex);
		self->agent_regex = _tmp3_;
		_g_regex_unref0 (_tmp0_);
	}
	goto __finally23;
	__catch23_g_regex_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (_error_);
	}
	__finally23:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		if (_inner_error_->domain == RYGEL_CLIENT_HACKS_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;
		}
	}
	_tmp4_ = message;
	if (_tmp4_ != NULL) {
		SoupMessage* _tmp5_ = NULL;
		_tmp5_ = message;
		rygel_client_hacks_check_headers (self, _tmp5_, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			if (_inner_error_->domain == RYGEL_CLIENT_HACKS_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;
			}
		}
	}
	return self;
}


RygelClientHacks* rygel_client_hacks_create (SoupMessage* message, GError** error) {
	RygelClientHacks* result = NULL;
	RygelXBMCHacks* _tmp32_ = NULL;
	SoupMessage* _tmp33_ = NULL;
	RygelXBMCHacks* _tmp34_ = NULL;
	RygelXBMCHacks* _tmp35_ = NULL;
	GError * _inner_error_ = NULL;
	{
		RygelPanasonicHacks* _tmp0_ = NULL;
		SoupMessage* _tmp1_ = NULL;
		RygelPanasonicHacks* _tmp2_ = NULL;
		RygelPanasonicHacks* _tmp3_ = NULL;
		_tmp1_ = message;
		_tmp2_ = rygel_panasonic_hacks_new (_tmp1_, &_inner_error_);
		_tmp0_ = _tmp2_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch24_g_error;
		}
		_tmp3_ = _tmp0_;
		_tmp0_ = NULL;
		result = (RygelClientHacks*) _tmp3_;
		_g_object_unref0 (_tmp0_);
		return result;
	}
	goto __finally24;
	__catch24_g_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (_error_);
	}
	__finally24:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		if (_inner_error_->domain == RYGEL_CLIENT_HACKS_ERROR) {
			g_propagate_error (error, _inner_error_);
			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;
		}
	}
	{
		RygelXBMC4XBoxHacks* _tmp4_ = NULL;
		SoupMessage* _tmp5_ = NULL;
		RygelXBMC4XBoxHacks* _tmp6_ = NULL;
		RygelXBMC4XBoxHacks* _tmp7_ = NULL;
		_tmp5_ = message;
		_tmp6_ = rygel_xbm_c4_xbox_hacks_new (_tmp5_, &_inner_error_);
		_tmp4_ = _tmp6_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch25_g_error;
		}
		_tmp7_ = _tmp4_;
		_tmp4_ = NULL;
		result = (RygelClientHacks*) _tmp7_;
		_g_object_unref0 (_tmp4_);
		return result;
	}
	goto __finally25;
	__catch25_g_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (_error_);
	}
	__finally25:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		if (_inner_error_->domain == RYGEL_CLIENT_HACKS_ERROR) {
			g_propagate_error (error, _inner_error_);
			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;
		}
	}
	{
		RygelXBoxHacks* _tmp8_ = NULL;
		SoupMessage* _tmp9_ = NULL;
		RygelXBoxHacks* _tmp10_ = NULL;
		RygelXBoxHacks* _tmp11_ = NULL;
		_tmp9_ = message;
		_tmp10_ = rygel_xbox_hacks_new (_tmp9_, &_inner_error_);
		_tmp8_ = _tmp10_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch26_g_error;
		}
		_tmp11_ = _tmp8_;
		_tmp8_ = NULL;
		result = (RygelClientHacks*) _tmp11_;
		_g_object_unref0 (_tmp8_);
		return result;
	}
	goto __finally26;
	__catch26_g_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (_error_);
	}
	__finally26:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		if (_inner_error_->domain == RYGEL_CLIENT_HACKS_ERROR) {
			g_propagate_error (error, _inner_error_);
			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;
		}
	}
	{
		RygelWMPHacks* _tmp12_ = NULL;
		SoupMessage* _tmp13_ = NULL;
		RygelWMPHacks* _tmp14_ = NULL;
		RygelWMPHacks* _tmp15_ = NULL;
		_tmp13_ = message;
		_tmp14_ = rygel_wmp_hacks_new (_tmp13_, &_inner_error_);
		_tmp12_ = _tmp14_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch27_g_error;
		}
		_tmp15_ = _tmp12_;
		_tmp12_ = NULL;
		result = (RygelClientHacks*) _tmp15_;
		_g_object_unref0 (_tmp12_);
		return result;
	}
	goto __finally27;
	__catch27_g_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (_error_);
	}
	__finally27:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		if (_inner_error_->domain == RYGEL_CLIENT_HACKS_ERROR) {
			g_propagate_error (error, _inner_error_);
			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;
		}
	}
	{
		RygelSamsungTVHacks* _tmp16_ = NULL;
		SoupMessage* _tmp17_ = NULL;
		RygelSamsungTVHacks* _tmp18_ = NULL;
		RygelSamsungTVHacks* _tmp19_ = NULL;
		_tmp17_ = message;
		_tmp18_ = rygel_samsung_tv_hacks_new (_tmp17_, &_inner_error_);
		_tmp16_ = _tmp18_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch28_g_error;
		}
		_tmp19_ = _tmp16_;
		_tmp16_ = NULL;
		result = (RygelClientHacks*) _tmp19_;
		_g_object_unref0 (_tmp16_);
		return result;
	}
	goto __finally28;
	__catch28_g_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (_error_);
	}
	__finally28:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		if (_inner_error_->domain == RYGEL_CLIENT_HACKS_ERROR) {
			g_propagate_error (error, _inner_error_);
			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;
		}
	}
	{
		RygelSeekHacks* _tmp20_ = NULL;
		SoupMessage* _tmp21_ = NULL;
		RygelSeekHacks* _tmp22_ = NULL;
		RygelSeekHacks* _tmp23_ = NULL;
		_tmp21_ = message;
		_tmp22_ = rygel_seek_hacks_new (_tmp21_, &_inner_error_);
		_tmp20_ = _tmp22_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch29_g_error;
		}
		_tmp23_ = _tmp20_;
		_tmp20_ = NULL;
		result = (RygelClientHacks*) _tmp23_;
		_g_object_unref0 (_tmp20_);
		return result;
	}
	goto __finally29;
	__catch29_g_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (_error_);
	}
	__finally29:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		if (_inner_error_->domain == RYGEL_CLIENT_HACKS_ERROR) {
			g_propagate_error (error, _inner_error_);
			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;
		}
	}
	{
		RygelLGTVHacks* _tmp24_ = NULL;
		SoupMessage* _tmp25_ = NULL;
		RygelLGTVHacks* _tmp26_ = NULL;
		RygelLGTVHacks* _tmp27_ = NULL;
		_tmp25_ = message;
		_tmp26_ = rygel_lgtv_hacks_new (_tmp25_, &_inner_error_);
		_tmp24_ = _tmp26_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch30_g_error;
		}
		_tmp27_ = _tmp24_;
		_tmp24_ = NULL;
		result = (RygelClientHacks*) _tmp27_;
		_g_object_unref0 (_tmp24_);
		return result;
	}
	goto __finally30;
	__catch30_g_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (_error_);
	}
	__finally30:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		if (_inner_error_->domain == RYGEL_CLIENT_HACKS_ERROR) {
			g_propagate_error (error, _inner_error_);
			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;
		}
	}
	{
		RygelPhillipsHacks* _tmp28_ = NULL;
		SoupMessage* _tmp29_ = NULL;
		RygelPhillipsHacks* _tmp30_ = NULL;
		RygelPhillipsHacks* _tmp31_ = NULL;
		_tmp29_ = message;
		_tmp30_ = rygel_phillips_hacks_new (_tmp29_, &_inner_error_);
		_tmp28_ = _tmp30_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch31_g_error;
		}
		_tmp31_ = _tmp28_;
		_tmp28_ = NULL;
		result = (RygelClientHacks*) _tmp31_;
		_g_object_unref0 (_tmp28_);
		return result;
	}
	goto __finally31;
	__catch31_g_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		_g_error_free0 (_error_);
	}
	__finally31:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		if (_inner_error_->domain == RYGEL_CLIENT_HACKS_ERROR) {
			g_propagate_error (error, _inner_error_);
			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;
		}
	}
	_tmp33_ = message;
	_tmp34_ = rygel_xbmc_hacks_new (_tmp33_, NULL, &_inner_error_);
	_tmp32_ = _tmp34_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		if (_inner_error_->domain == RYGEL_CLIENT_HACKS_ERROR) {
			g_propagate_error (error, _inner_error_);
			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;
		}
	}
	_tmp35_ = _tmp32_;
	_tmp32_ = NULL;
	result = (RygelClientHacks*) _tmp35_;
	_g_object_unref0 (_tmp32_);
	return result;
}


static void rygel_client_hacks_real_translate_container_id (RygelClientHacks* self, RygelMediaQueryAction* action, gchar** container_id) {
	g_return_if_fail (action != NULL);
	g_return_if_fail (*container_id != NULL);
}


void rygel_client_hacks_translate_container_id (RygelClientHacks* self, RygelMediaQueryAction* action, gchar** container_id) {
	g_return_if_fail (self != NULL);
	RYGEL_CLIENT_HACKS_GET_CLASS (self)->translate_container_id (self, action, container_id);
}


/**
     * Modify the passed media object.
     *
     * Called before serializing the Object to DIDL-Lite.
     */
static void rygel_client_hacks_real_apply (RygelClientHacks* self, RygelMediaObject* object) {
	g_return_if_fail (object != NULL);
}


void rygel_client_hacks_apply (RygelClientHacks* self, RygelMediaObject* object) {
	g_return_if_fail (self != NULL);
	RYGEL_CLIENT_HACKS_GET_CLASS (self)->apply (self, object);
}


static void rygel_client_hacks_real_filter_sort_criteria (RygelClientHacks* self, gchar** sort_criteria) {
	g_return_if_fail (*sort_criteria != NULL);
}


void rygel_client_hacks_filter_sort_criteria (RygelClientHacks* self, gchar** sort_criteria) {
	g_return_if_fail (self != NULL);
	RYGEL_CLIENT_HACKS_GET_CLASS (self)->filter_sort_criteria (self, sort_criteria);
}


static gboolean rygel_client_hacks_real_force_seek (RygelClientHacks* self) {
	gboolean result = FALSE;
	result = FALSE;
	return result;
}


gboolean rygel_client_hacks_force_seek (RygelClientHacks* self) {
	g_return_val_if_fail (self != NULL, FALSE);
	return RYGEL_CLIENT_HACKS_GET_CLASS (self)->force_seek (self);
}


static void rygel_client_hacks_real_modify_headers (RygelClientHacks* self, RygelHTTPRequest* request) {
	g_return_if_fail (request != NULL);
}


void rygel_client_hacks_modify_headers (RygelClientHacks* self, RygelHTTPRequest* request) {
	g_return_if_fail (self != NULL);
	RYGEL_CLIENT_HACKS_GET_CLASS (self)->modify_headers (self, request);
}


static void rygel_client_hacks_real_search_data_free (gpointer _data) {
	RygelClientHacksSearchData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->container);
	_rygel_search_expression_unref0 (_data_->expression);
	_g_free0 (_data_->sort_criteria);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelClientHacksSearchData, _data_);
}


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


static gpointer _rygel_search_expression_ref0 (gpointer self) {
	return self ? rygel_search_expression_ref (self) : NULL;
}


static void rygel_client_hacks_real_search (RygelClientHacks* self, RygelSearchableContainer* container, RygelSearchExpression* expression, guint offset, guint max_count, const gchar* sort_criteria, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelClientHacksSearchData* _data_;
	RygelClientHacks* _tmp0_ = NULL;
	RygelSearchableContainer* _tmp1_ = NULL;
	RygelSearchableContainer* _tmp2_ = NULL;
	RygelSearchExpression* _tmp3_ = NULL;
	RygelSearchExpression* _tmp4_ = NULL;
	guint _tmp5_ = 0U;
	guint _tmp6_ = 0U;
	const gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	GCancellable* _tmp9_ = NULL;
	GCancellable* _tmp10_ = NULL;
	_data_ = g_slice_new0 (RygelClientHacksSearchData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_client_hacks_real_search);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_client_hacks_real_search_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = container;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->container);
	_data_->container = _tmp2_;
	_tmp3_ = expression;
	_tmp4_ = _rygel_search_expression_ref0 (_tmp3_);
	_rygel_search_expression_unref0 (_data_->expression);
	_data_->expression = _tmp4_;
	_tmp5_ = offset;
	_data_->offset = _tmp5_;
	_tmp6_ = max_count;
	_data_->max_count = _tmp6_;
	_tmp7_ = sort_criteria;
	_tmp8_ = g_strdup (_tmp7_);
	_g_free0 (_data_->sort_criteria);
	_data_->sort_criteria = _tmp8_;
	_tmp9_ = cancellable;
	_tmp10_ = _g_object_ref0 (_tmp9_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp10_;
	rygel_client_hacks_real_search_co (_data_);
}


static RygelMediaObjects* rygel_client_hacks_real_search_finish (RygelClientHacks* self, GAsyncResult* _res_, guint* total_matches, GError** error) {
	RygelMediaObjects* result;
	RygelClientHacksSearchData* _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_));
	if (total_matches) {
		*total_matches = _data_->total_matches;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void rygel_client_hacks_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelClientHacksSearchData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	rygel_client_hacks_real_search_co (_data_);
}


static gboolean rygel_client_hacks_real_search_co (RygelClientHacksSearchData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->container;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = _data_->expression;
	_data_->_tmp3_ = 0U;
	_data_->_tmp3_ = _data_->offset;
	_data_->_tmp4_ = 0U;
	_data_->_tmp4_ = _data_->max_count;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = _data_->sort_criteria;
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = _data_->cancellable;
	_data_->_tmp7_ = 0U;
	_data_->_state_ = 1;
	rygel_searchable_container_search (_data_->_tmp1_, _data_->_tmp2_, _data_->_tmp3_, _data_->_tmp4_, _data_->_tmp5_, _data_->_tmp6_, rygel_client_hacks_search_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = rygel_searchable_container_search_finish (_data_->_tmp1_, _data_->_res_, &_data_->_tmp7_, &_data_->_inner_error_);
	_data_->total_matches = _data_->_tmp7_;
	_data_->_tmp0_ = _data_->_tmp8_;
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_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;
	}
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = _data_->_tmp0_;
	_data_->_tmp0_ = NULL;
	_data_->result = _data_->_tmp9_;
	_g_object_unref0 (_data_->_tmp0_);
	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;
	_g_object_unref0 (_data_->_tmp0_);
	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_client_hacks_search (RygelClientHacks* self, RygelSearchableContainer* container, RygelSearchExpression* expression, guint offset, guint max_count, const gchar* sort_criteria, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RYGEL_CLIENT_HACKS_GET_CLASS (self)->search (self, container, expression, offset, max_count, sort_criteria, cancellable, _callback_, _user_data_);
}


RygelMediaObjects* rygel_client_hacks_search_finish (RygelClientHacks* self, GAsyncResult* _res_, guint* total_matches, GError** error) {
	return RYGEL_CLIENT_HACKS_GET_CLASS (self)->search_finish (self, _res_, total_matches, error);
}


static SoupMessageHeaders* _vala_SoupMessageHeaders_copy (SoupMessageHeaders* self) {
	return g_boxed_copy (soup_message_headers_get_type (), self);
}


static gpointer __vala_SoupMessageHeaders_copy0 (gpointer self) {
	return self ? _vala_SoupMessageHeaders_copy (self) : NULL;
}


static void _vala_SoupMessageHeaders_free (SoupMessageHeaders* self) {
	g_boxed_free (soup_message_headers_get_type (), self);
}


static void rygel_client_hacks_check_headers (RygelClientHacks* self, SoupMessage* message, GError** error) {
	SoupMessageHeaders* headers = NULL;
	SoupMessage* _tmp0_ = NULL;
	SoupMessageHeaders* _tmp1_ = NULL;
	SoupMessageHeaders* _tmp2_ = NULL;
	gchar* agent = NULL;
	SoupMessageHeaders* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	const gchar* _tmp7_ = NULL;
	const gchar* _tmp16_ = NULL;
	gboolean _tmp26_ = FALSE;
	const gchar* _tmp27_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (message != NULL);
	_tmp0_ = message;
	_tmp1_ = _tmp0_->request_headers;
	_tmp2_ = __vala_SoupMessageHeaders_copy0 (_tmp1_);
	headers = _tmp2_;
	_tmp3_ = headers;
	_tmp4_ = soup_message_headers_get_one (_tmp3_, "User-Agent");
	_tmp5_ = g_strdup (_tmp4_);
	agent = _tmp5_;
	_tmp7_ = agent;
	if (_tmp7_ == NULL) {
		GeeHashMap* _tmp8_ = NULL;
		_tmp8_ = rygel_client_hacks_client_agent_cache;
		_tmp6_ = _tmp8_ != NULL;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		SoupAddress* address = NULL;
		SoupMessage* _tmp9_ = NULL;
		SoupAddress* _tmp10_ = NULL;
		SoupAddress* _tmp11_ = NULL;
		GeeHashMap* _tmp12_ = NULL;
		SoupAddress* _tmp13_ = NULL;
		const gchar* _tmp14_ = NULL;
		gpointer _tmp15_ = NULL;
		_tmp9_ = message;
		_tmp10_ = soup_message_get_address (_tmp9_);
		_tmp11_ = _g_object_ref0 (_tmp10_);
		address = _tmp11_;
		_tmp12_ = rygel_client_hacks_client_agent_cache;
		_tmp13_ = address;
		_tmp14_ = soup_address_get_physical (_tmp13_);
		_tmp15_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp12_, _tmp14_);
		_g_free0 (agent);
		agent = (gchar*) _tmp15_;
		_g_object_unref0 (address);
	}
	_tmp16_ = agent;
	if (_tmp16_ != NULL) {
		SoupAddress* address = NULL;
		SoupMessage* _tmp17_ = NULL;
		SoupAddress* _tmp18_ = NULL;
		SoupAddress* _tmp19_ = NULL;
		GeeHashMap* _tmp20_ = NULL;
		GeeHashMap* _tmp22_ = NULL;
		SoupAddress* _tmp23_ = NULL;
		const gchar* _tmp24_ = NULL;
		const gchar* _tmp25_ = NULL;
		_tmp17_ = message;
		_tmp18_ = soup_message_get_address (_tmp17_);
		_tmp19_ = _g_object_ref0 (_tmp18_);
		address = _tmp19_;
		_tmp20_ = rygel_client_hacks_client_agent_cache;
		if (_tmp20_ == NULL) {
			GeeHashMap* _tmp21_ = NULL;
			_tmp21_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
			_g_object_unref0 (rygel_client_hacks_client_agent_cache);
			rygel_client_hacks_client_agent_cache = _tmp21_;
		}
		_tmp22_ = rygel_client_hacks_client_agent_cache;
		_tmp23_ = address;
		_tmp24_ = soup_address_get_physical (_tmp23_);
		_tmp25_ = agent;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp22_, _tmp24_, _tmp25_);
		_g_object_unref0 (address);
	}
	_tmp27_ = agent;
	if (_tmp27_ == NULL) {
		_tmp26_ = TRUE;
	} else {
		GRegex* _tmp28_ = NULL;
		const gchar* _tmp29_ = NULL;
		gboolean _tmp30_ = FALSE;
		_tmp28_ = self->agent_regex;
		_tmp29_ = agent;
		_tmp30_ = g_regex_match (_tmp28_, _tmp29_, 0, NULL);
		_tmp26_ = !_tmp30_;
	}
	if (_tmp26_) {
		const gchar* _tmp31_ = NULL;
		GError* _tmp32_ = NULL;
		_tmp31_ = _ ("Not Applicable");
		_tmp32_ = g_error_new_literal (RYGEL_CLIENT_HACKS_ERROR, RYGEL_CLIENT_HACKS_ERROR_NA, _tmp31_);
		_inner_error_ = _tmp32_;
		if (_inner_error_->domain == RYGEL_CLIENT_HACKS_ERROR) {
			g_propagate_error (error, _inner_error_);
			_g_free0 (agent);
			__vala_SoupMessageHeaders_free0 (headers);
			return;
		} else {
			_g_free0 (agent);
			__vala_SoupMessageHeaders_free0 (headers);
			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;
		}
	}
	_g_free0 (agent);
	__vala_SoupMessageHeaders_free0 (headers);
}


const gchar* rygel_client_hacks_get_object_id (RygelClientHacks* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_object_id;
	result = _tmp0_;
	return result;
}


void rygel_client_hacks_set_object_id (RygelClientHacks* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_object_id = _tmp0_;
	g_object_notify ((GObject *) self, "object-id");
}


static void rygel_client_hacks_class_init (RygelClientHacksClass * klass) {
	rygel_client_hacks_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (RygelClientHacksPrivate));
	((RygelClientHacksClass *) klass)->translate_container_id = (void (*)(RygelClientHacks*, RygelMediaQueryAction*, gchar**)) rygel_client_hacks_real_translate_container_id;
	((RygelClientHacksClass *) klass)->apply = (void (*)(RygelClientHacks*, RygelMediaObject*)) rygel_client_hacks_real_apply;
	((RygelClientHacksClass *) klass)->filter_sort_criteria = (void (*)(RygelClientHacks*, gchar**)) rygel_client_hacks_real_filter_sort_criteria;
	((RygelClientHacksClass *) klass)->force_seek = (gboolean (*)(RygelClientHacks*)) rygel_client_hacks_real_force_seek;
	((RygelClientHacksClass *) klass)->modify_headers = (void (*)(RygelClientHacks*, RygelHTTPRequest*)) rygel_client_hacks_real_modify_headers;
	((RygelClientHacksClass *) klass)->search = (void (*)(RygelClientHacks*, RygelSearchableContainer*, RygelSearchExpression*, guint, guint, const gchar*, GCancellable*, GAsyncReadyCallback, gpointer)) rygel_client_hacks_real_search;
	((RygelClientHacksClass *) klass)->search_finish = (RygelMediaObjects* (*)(RygelClientHacks*, GAsyncResult*, guint*, GError**)) rygel_client_hacks_real_search_finish;
	G_OBJECT_CLASS (klass)->get_property = _vala_rygel_client_hacks_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_rygel_client_hacks_set_property;
	G_OBJECT_CLASS (klass)->finalize = rygel_client_hacks_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_CLIENT_HACKS_OBJECT_ID, g_param_spec_string ("object-id", "object-id", "object-id", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void rygel_client_hacks_instance_init (RygelClientHacks * self) {
	self->priv = RYGEL_CLIENT_HACKS_GET_PRIVATE (self);
	self->priv->_object_id = RYGEL_CLIENT_HACKS_CORRECT_OBJECT_ID;
}


static void rygel_client_hacks_finalize (GObject* obj) {
	RygelClientHacks * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_CLIENT_HACKS, RygelClientHacks);
	_g_regex_unref0 (self->agent_regex);
	G_OBJECT_CLASS (rygel_client_hacks_parent_class)->finalize (obj);
}


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 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, NULL };
		GType rygel_client_hacks_type_id;
		rygel_client_hacks_type_id = g_type_register_static (G_TYPE_OBJECT, "RygelClientHacks", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&rygel_client_hacks_type_id__volatile, rygel_client_hacks_type_id);
	}
	return rygel_client_hacks_type_id__volatile;
}


static void _vala_rygel_client_hacks_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	RygelClientHacks * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_TYPE_CLIENT_HACKS, RygelClientHacks);
	switch (property_id) {
		case RYGEL_CLIENT_HACKS_OBJECT_ID:
		g_value_set_string (value, rygel_client_hacks_get_object_id (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_rygel_client_hacks_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	RygelClientHacks * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_TYPE_CLIENT_HACKS, RygelClientHacks);
	switch (property_id) {
		case RYGEL_CLIENT_HACKS_OBJECT_ID:
		rygel_client_hacks_set_object_id (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



