/* system.c generated by valac 0.56.19, the Vala compiler
 * generated from system.vala, do not modify */

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU LGPL (version 2.1 or later).
 * See the COPYING file in this distribution.
 */
/* Return the directory in which Shotwell is installed, or null if uninstalled.*/

#include <gio/gio.h>
#include <glib.h>
#include <glib/gstdio.h>
#include <stdlib.h>
#include <string.h>
#include <config.h>
#include <glib-object.h>
#include <unistd.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>

#define RESOURCES_PREFIX _PREFIX
#define ORG_FREEDESKTOP_FILE_MANAGER1_NAME "org.freedesktop.FileManager1"
#define ORG_FREEDESKTOP_FILE_MANAGER1_PATH "/org/freedesktop/FileManager1"
#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define ORG_FREEDESKTOP_TYPE_FILE_MANAGER1 (org_freedesktop_file_manager1_get_type ())
#define ORG_FREEDESKTOP_FILE_MANAGER1(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ORG_FREEDESKTOP_TYPE_FILE_MANAGER1, orgfreedesktopFileManager1))
#define ORG_FREEDESKTOP_IS_FILE_MANAGER1(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ORG_FREEDESKTOP_TYPE_FILE_MANAGER1))
#define ORG_FREEDESKTOP_FILE_MANAGER1_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ORG_FREEDESKTOP_TYPE_FILE_MANAGER1, orgfreedesktopFileManager1Iface))

typedef struct _orgfreedesktopFileManager1 orgfreedesktopFileManager1;
typedef struct _orgfreedesktopFileManager1Iface orgfreedesktopFileManager1Iface;

#define ORG_FREEDESKTOP_TYPE_FILE_MANAGER1_PROXY (org_freedesktop_file_manager1_proxy_get_type ())
typedef GDBusProxy orgfreedesktopFileManager1Proxy;
typedef GDBusProxyClass orgfreedesktopFileManager1ProxyClass;
typedef struct _OrgFreedesktopFileManager1ShowFoldersReadyData OrgFreedesktopFileManager1ShowFoldersReadyData;
typedef struct _OrgFreedesktopFileManager1ShowItemsReadyData OrgFreedesktopFileManager1ShowItemsReadyData;
typedef struct _OrgFreedesktopFileManager1ShowItemPropertiesReadyData OrgFreedesktopFileManager1ShowItemPropertiesReadyData;

#define TYPE_PAGE_WINDOW (page_window_get_type ())
#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow))
#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass))
#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW))
#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW))
#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass))

typedef struct _PageWindow PageWindow;
typedef struct _PageWindowClass PageWindowClass;

#define TYPE_APP_WINDOW (app_window_get_type ())
#define APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_WINDOW, AppWindow))
#define APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_WINDOW, AppWindowClass))
#define IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_WINDOW))
#define IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_WINDOW))
#define APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_WINDOW, AppWindowClass))

typedef struct _AppWindow AppWindow;
typedef struct _AppWindowClass AppWindowClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _ShowFileInFilemanagerData ShowFileInFilemanagerData;

struct _orgfreedesktopFileManager1Iface {
	GTypeInterface parent_iface;
	void (*show_folders) (orgfreedesktopFileManager1* self, gchar** uris, gint uris_length1, const gchar* startup_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*show_folders_finish) (orgfreedesktopFileManager1* self, GAsyncResult* _res_, GError** error);
	void (*show_items) (orgfreedesktopFileManager1* self, gchar** uris, gint uris_length1, const gchar* startup_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*show_items_finish) (orgfreedesktopFileManager1* self, GAsyncResult* _res_, GError** error);
	void (*show_item_properties) (orgfreedesktopFileManager1* self, gchar** uris, gint uris_length1, const gchar* startup_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*show_item_properties_finish) (orgfreedesktopFileManager1* self, GAsyncResult* _res_, GError** error);
};

struct _OrgFreedesktopFileManager1ShowFoldersReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar** uris;
	gint uris_length1;
	gchar* startup_id;
};

struct _OrgFreedesktopFileManager1ShowItemsReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar** uris;
	gint uris_length1;
	gchar* startup_id;
};

struct _OrgFreedesktopFileManager1ShowItemPropertiesReadyData {
	GDBusMethodInvocation* _invocation_;
	gchar** uris;
	gint uris_length1;
	gchar* startup_id;
};

struct _ShowFileInFilemanagerData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GFile* file;
	orgfreedesktopFileManager1* manager;
	orgfreedesktopFileManager1* _tmp0_;
	gchar* id;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	orgfreedesktopFileManager1* _tmp7_;
	gchar* _tmp8_;
	gchar** _tmp9_;
	gchar** _tmp10_;
	gint _tmp10__length1;
	const gchar* _tmp11_;
	GError* e;
	GError* _tmp12_;
	const gchar* _tmp13_;
	AppWindow* _tmp14_;
	AppWindow* _tmp15_;
	GFile* _tmp16_;
	GFile* _tmp17_;
	gchar* _tmp18_;
	gchar* _tmp19_;
	GError* _inner_error0_;
};

VALA_EXTERN GFile* get_sys_install_dir (GFile* exec_dir);
VALA_EXTERN GType org_freedesktop_file_manager1_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint org_freedesktop_file_manager1_register_object (void* object,
                                                     GDBusConnection* connection,
                                                     const gchar* path,
                                                     GError** error);
VALA_EXTERN GType org_freedesktop_file_manager1_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (orgfreedesktopFileManager1, g_object_unref)
VALA_EXTERN void org_freedesktop_file_manager1_show_folders (orgfreedesktopFileManager1* self,
                                                 gchar** uris,
                                                 gint uris_length1,
                                                 const gchar* startup_id,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_);
VALA_EXTERN void org_freedesktop_file_manager1_show_folders_finish (orgfreedesktopFileManager1* self,
                                                        GAsyncResult* _res_,
                                                        GError** error);
VALA_EXTERN void org_freedesktop_file_manager1_show_items (orgfreedesktopFileManager1* self,
                                               gchar** uris,
                                               gint uris_length1,
                                               const gchar* startup_id,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_);
VALA_EXTERN void org_freedesktop_file_manager1_show_items_finish (orgfreedesktopFileManager1* self,
                                                      GAsyncResult* _res_,
                                                      GError** error);
VALA_EXTERN void org_freedesktop_file_manager1_show_item_properties (orgfreedesktopFileManager1* self,
                                                         gchar** uris,
                                                         gint uris_length1,
                                                         const gchar* startup_id,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
VALA_EXTERN void org_freedesktop_file_manager1_show_item_properties_finish (orgfreedesktopFileManager1* self,
                                                                GAsyncResult* _res_,
                                                                GError** error);
static GType org_freedesktop_file_manager1_get_type_once (void);
static void org_freedesktop_file_manager1_proxy_g_signal (GDBusProxy* proxy,
                                                   const gchar* sender_name,
                                                   const gchar* signal_name,
                                                   GVariant* parameters);
static void _vala_g_async_ready_callback (GObject *source_object,
                                   GAsyncResult *res,
                                   void *user_data);
static void org_freedesktop_file_manager1_proxy_show_folders_async (orgfreedesktopFileManager1* self,
                                                             gchar** uris,
                                                             gint uris_length1,
                                                             const gchar* startup_id,
                                                             GAsyncReadyCallback _callback_,
                                                             gpointer _user_data_);
static void org_freedesktop_file_manager1_proxy_show_folders_finish (orgfreedesktopFileManager1* self,
                                                              GAsyncResult* _res_,
                                                              GError** error);
static void org_freedesktop_file_manager1_proxy_show_items_async (orgfreedesktopFileManager1* self,
                                                           gchar** uris,
                                                           gint uris_length1,
                                                           const gchar* startup_id,
                                                           GAsyncReadyCallback _callback_,
                                                           gpointer _user_data_);
static void org_freedesktop_file_manager1_proxy_show_items_finish (orgfreedesktopFileManager1* self,
                                                            GAsyncResult* _res_,
                                                            GError** error);
static void org_freedesktop_file_manager1_proxy_show_item_properties_async (orgfreedesktopFileManager1* self,
                                                                     gchar** uris,
                                                                     gint uris_length1,
                                                                     const gchar* startup_id,
                                                                     GAsyncReadyCallback _callback_,
                                                                     gpointer _user_data_);
static void org_freedesktop_file_manager1_proxy_show_item_properties_finish (orgfreedesktopFileManager1* self,
                                                                      GAsyncResult* _res_,
                                                                      GError** error);
static void org_freedesktop_file_manager1_proxy_org_freedesktop_file_manager1_interface_init (orgfreedesktopFileManager1Iface* iface);
static void _dbus_org_freedesktop_file_manager1_show_folders (orgfreedesktopFileManager1* self,
                                                       GVariant* _parameters_,
                                                       GDBusMethodInvocation* invocation);
static void _dbus_org_freedesktop_file_manager1_show_folders_ready (GObject * source_object,
                                                             GAsyncResult * _res_,
                                                             gpointer _user_data_);
static void _dbus_org_freedesktop_file_manager1_show_items (orgfreedesktopFileManager1* self,
                                                     GVariant* _parameters_,
                                                     GDBusMethodInvocation* invocation);
static void _dbus_org_freedesktop_file_manager1_show_items_ready (GObject * source_object,
                                                           GAsyncResult * _res_,
                                                           gpointer _user_data_);
static void _dbus_org_freedesktop_file_manager1_show_item_properties (orgfreedesktopFileManager1* self,
                                                               GVariant* _parameters_,
                                                               GDBusMethodInvocation* invocation);
static void _dbus_org_freedesktop_file_manager1_show_item_properties_ready (GObject * source_object,
                                                                     GAsyncResult * _res_,
                                                                     gpointer _user_data_);
static void org_freedesktop_file_manager1_dbus_interface_method_call (GDBusConnection* connection,
                                                               const gchar* sender,
                                                               const gchar* object_path,
                                                               const gchar* interface_name,
                                                               const gchar* method_name,
                                                               GVariant* parameters,
                                                               GDBusMethodInvocation* invocation,
                                                               gpointer user_data);
static GVariant* org_freedesktop_file_manager1_dbus_interface_get_property (GDBusConnection* connection,
                                                                     const gchar* sender,
                                                                     const gchar* object_path,
                                                                     const gchar* interface_name,
                                                                     const gchar* property_name,
                                                                     GError** error,
                                                                     gpointer user_data);
static gboolean org_freedesktop_file_manager1_dbus_interface_set_property (GDBusConnection* connection,
                                                                    const gchar* sender,
                                                                    const gchar* object_path,
                                                                    const gchar* interface_name,
                                                                    const gchar* property_name,
                                                                    GVariant* value,
                                                                    GError** error,
                                                                    gpointer user_data);
static void _org_freedesktop_file_manager1_unregister_object (gpointer user_data);
static void show_file_in_filemanager_data_free (gpointer _data);
VALA_EXTERN void show_file_in_filemanager (GFile* file,
                               GAsyncReadyCallback _callback_,
                               gpointer _user_data_);
VALA_EXTERN void show_file_in_filemanager_finish (GAsyncResult* _res_,
                                      GError** error);
static gboolean show_file_in_filemanager_co (ShowFileInFilemanagerData* _data_);
static void show_file_in_filemanager_ready (GObject* source_object,
                                     GAsyncResult* _res_,
                                     gpointer _user_data_);
VALA_EXTERN GType page_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PageWindow, g_object_unref)
VALA_EXTERN GType app_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AppWindow, g_object_unref)
VALA_EXTERN AppWindow* app_window_get_instance (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static const GDBusArgInfo _org_freedesktop_file_manager1_dbus_arg_info_show_folders_uris = {-1, "uris", "as", NULL};
static const GDBusArgInfo _org_freedesktop_file_manager1_dbus_arg_info_show_folders_startup_id = {-1, "startup_id", "s", NULL};
static const GDBusArgInfo * const _org_freedesktop_file_manager1_dbus_arg_info_show_folders_in[] = {&_org_freedesktop_file_manager1_dbus_arg_info_show_folders_uris, &_org_freedesktop_file_manager1_dbus_arg_info_show_folders_startup_id, NULL};
static const GDBusArgInfo * const _org_freedesktop_file_manager1_dbus_arg_info_show_folders_out[] = {NULL};
static const GDBusMethodInfo _org_freedesktop_file_manager1_dbus_method_info_show_folders = {-1, "ShowFolders", (GDBusArgInfo **) (&_org_freedesktop_file_manager1_dbus_arg_info_show_folders_in), (GDBusArgInfo **) (&_org_freedesktop_file_manager1_dbus_arg_info_show_folders_out), NULL};
static const GDBusArgInfo _org_freedesktop_file_manager1_dbus_arg_info_show_items_uris = {-1, "uris", "as", NULL};
static const GDBusArgInfo _org_freedesktop_file_manager1_dbus_arg_info_show_items_startup_id = {-1, "startup_id", "s", NULL};
static const GDBusArgInfo * const _org_freedesktop_file_manager1_dbus_arg_info_show_items_in[] = {&_org_freedesktop_file_manager1_dbus_arg_info_show_items_uris, &_org_freedesktop_file_manager1_dbus_arg_info_show_items_startup_id, NULL};
static const GDBusArgInfo * const _org_freedesktop_file_manager1_dbus_arg_info_show_items_out[] = {NULL};
static const GDBusMethodInfo _org_freedesktop_file_manager1_dbus_method_info_show_items = {-1, "ShowItems", (GDBusArgInfo **) (&_org_freedesktop_file_manager1_dbus_arg_info_show_items_in), (GDBusArgInfo **) (&_org_freedesktop_file_manager1_dbus_arg_info_show_items_out), NULL};
static const GDBusArgInfo _org_freedesktop_file_manager1_dbus_arg_info_show_item_properties_uris = {-1, "uris", "as", NULL};
static const GDBusArgInfo _org_freedesktop_file_manager1_dbus_arg_info_show_item_properties_startup_id = {-1, "startup_id", "s", NULL};
static const GDBusArgInfo * const _org_freedesktop_file_manager1_dbus_arg_info_show_item_properties_in[] = {&_org_freedesktop_file_manager1_dbus_arg_info_show_item_properties_uris, &_org_freedesktop_file_manager1_dbus_arg_info_show_item_properties_startup_id, NULL};
static const GDBusArgInfo * const _org_freedesktop_file_manager1_dbus_arg_info_show_item_properties_out[] = {NULL};
static const GDBusMethodInfo _org_freedesktop_file_manager1_dbus_method_info_show_item_properties = {-1, "ShowItemProperties", (GDBusArgInfo **) (&_org_freedesktop_file_manager1_dbus_arg_info_show_item_properties_in), (GDBusArgInfo **) (&_org_freedesktop_file_manager1_dbus_arg_info_show_item_properties_out), NULL};
static const GDBusMethodInfo * const _org_freedesktop_file_manager1_dbus_method_info[] = {&_org_freedesktop_file_manager1_dbus_method_info_show_folders, &_org_freedesktop_file_manager1_dbus_method_info_show_items, &_org_freedesktop_file_manager1_dbus_method_info_show_item_properties, NULL};
static const GDBusSignalInfo * const _org_freedesktop_file_manager1_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _org_freedesktop_file_manager1_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _org_freedesktop_file_manager1_dbus_interface_info = {-1, "org.freedesktop.FileManager1", (GDBusMethodInfo **) (&_org_freedesktop_file_manager1_dbus_method_info), (GDBusSignalInfo **) (&_org_freedesktop_file_manager1_dbus_signal_info), (GDBusPropertyInfo **) (&_org_freedesktop_file_manager1_dbus_property_info), NULL};
static const GDBusInterfaceVTable _org_freedesktop_file_manager1_dbus_interface_vtable = {org_freedesktop_file_manager1_dbus_interface_method_call, org_freedesktop_file_manager1_dbus_interface_get_property, org_freedesktop_file_manager1_dbus_interface_set_property};

GFile*
get_sys_install_dir (GFile* exec_dir)
{
	GFile* child = NULL;
	GFile* _tmp0_;
	GFile* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gboolean _tmp4_;
	GFile* result;
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (exec_dir, g_file_get_type ()), NULL);
	_tmp0_ = g_file_get_child (exec_dir, "ui");
	child = _tmp0_;
	_tmp1_ = child;
	_tmp2_ = g_file_get_path (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = !g_file_test (_tmp3_, G_FILE_TEST_IS_DIR | G_FILE_TEST_EXISTS);
	_g_free0 (_tmp3_);
	if (_tmp4_) {
		gchar* _tmp5_;
		gchar* _tmp6_;
		gboolean _tmp7_;
		GFile* _tmp8_;
		_tmp5_ = g_file_get_basename (exec_dir);
		_tmp6_ = _tmp5_;
		_tmp7_ = g_strcmp0 (_tmp6_, "src") == 0;
		_g_free0 (_tmp6_);
		if (_tmp7_) {
			result = NULL;
			_g_object_unref0 (child);
			return result;
		}
		_tmp8_ = g_file_new_for_path (RESOURCES_PREFIX);
		result = _tmp8_;
		_g_object_unref0 (child);
		return result;
	}
	result = NULL;
	_g_object_unref0 (child);
	return result;
}

void
org_freedesktop_file_manager1_show_folders (orgfreedesktopFileManager1* self,
                                            gchar** uris,
                                            gint uris_length1,
                                            const gchar* startup_id,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_)
{
	orgfreedesktopFileManager1Iface* _iface_;
	_iface_ = ORG_FREEDESKTOP_FILE_MANAGER1_GET_INTERFACE (self);
	if (_iface_->show_folders) {
		_iface_->show_folders (self, uris, uris_length1, startup_id, _callback_, _user_data_);
	}
}

void
org_freedesktop_file_manager1_show_folders_finish (orgfreedesktopFileManager1* self,
                                                   GAsyncResult* _res_,
                                                   GError** error)
{
	orgfreedesktopFileManager1Iface* _iface_;
	_iface_ = ORG_FREEDESKTOP_FILE_MANAGER1_GET_INTERFACE (self);
	if (_iface_->show_folders_finish) {
		_iface_->show_folders_finish (self, _res_, error);
	}
}

void
org_freedesktop_file_manager1_show_items (orgfreedesktopFileManager1* self,
                                          gchar** uris,
                                          gint uris_length1,
                                          const gchar* startup_id,
                                          GAsyncReadyCallback _callback_,
                                          gpointer _user_data_)
{
	orgfreedesktopFileManager1Iface* _iface_;
	_iface_ = ORG_FREEDESKTOP_FILE_MANAGER1_GET_INTERFACE (self);
	if (_iface_->show_items) {
		_iface_->show_items (self, uris, uris_length1, startup_id, _callback_, _user_data_);
	}
}

void
org_freedesktop_file_manager1_show_items_finish (orgfreedesktopFileManager1* self,
                                                 GAsyncResult* _res_,
                                                 GError** error)
{
	orgfreedesktopFileManager1Iface* _iface_;
	_iface_ = ORG_FREEDESKTOP_FILE_MANAGER1_GET_INTERFACE (self);
	if (_iface_->show_items_finish) {
		_iface_->show_items_finish (self, _res_, error);
	}
}

void
org_freedesktop_file_manager1_show_item_properties (orgfreedesktopFileManager1* self,
                                                    gchar** uris,
                                                    gint uris_length1,
                                                    const gchar* startup_id,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	orgfreedesktopFileManager1Iface* _iface_;
	_iface_ = ORG_FREEDESKTOP_FILE_MANAGER1_GET_INTERFACE (self);
	if (_iface_->show_item_properties) {
		_iface_->show_item_properties (self, uris, uris_length1, startup_id, _callback_, _user_data_);
	}
}

void
org_freedesktop_file_manager1_show_item_properties_finish (orgfreedesktopFileManager1* self,
                                                           GAsyncResult* _res_,
                                                           GError** error)
{
	orgfreedesktopFileManager1Iface* _iface_;
	_iface_ = ORG_FREEDESKTOP_FILE_MANAGER1_GET_INTERFACE (self);
	if (_iface_->show_item_properties_finish) {
		_iface_->show_item_properties_finish (self, _res_, error);
	}
}

static void
org_freedesktop_file_manager1_default_init (orgfreedesktopFileManager1Iface * iface,
                                            gpointer iface_data)
{
}

static GType
org_freedesktop_file_manager1_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (orgfreedesktopFileManager1Iface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) org_freedesktop_file_manager1_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType org_freedesktop_file_manager1_type_id;
	org_freedesktop_file_manager1_type_id = g_type_register_static (G_TYPE_INTERFACE, "orgfreedesktopFileManager1", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (org_freedesktop_file_manager1_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (org_freedesktop_file_manager1_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) org_freedesktop_file_manager1_proxy_get_type);
	g_type_set_qdata (org_freedesktop_file_manager1_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "org.freedesktop.FileManager1");
	g_type_set_qdata (org_freedesktop_file_manager1_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_org_freedesktop_file_manager1_dbus_interface_info));
	g_type_set_qdata (org_freedesktop_file_manager1_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) org_freedesktop_file_manager1_register_object);
	return org_freedesktop_file_manager1_type_id;
}

GType
org_freedesktop_file_manager1_get_type (void)
{
	static volatile gsize org_freedesktop_file_manager1_type_id__once = 0;
	if (g_once_init_enter (&org_freedesktop_file_manager1_type_id__once)) {
		GType org_freedesktop_file_manager1_type_id;
		org_freedesktop_file_manager1_type_id = org_freedesktop_file_manager1_get_type_once ();
		g_once_init_leave (&org_freedesktop_file_manager1_type_id__once, org_freedesktop_file_manager1_type_id);
	}
	return org_freedesktop_file_manager1_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (orgfreedesktopFileManager1Proxy, org_freedesktop_file_manager1_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (ORG_FREEDESKTOP_TYPE_FILE_MANAGER1, org_freedesktop_file_manager1_proxy_org_freedesktop_file_manager1_interface_init) )
static void
org_freedesktop_file_manager1_proxy_class_init (orgfreedesktopFileManager1ProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = org_freedesktop_file_manager1_proxy_g_signal;
}

static void
org_freedesktop_file_manager1_proxy_g_signal (GDBusProxy* proxy,
                                              const gchar* sender_name,
                                              const gchar* signal_name,
                                              GVariant* parameters)
{
}

static void
org_freedesktop_file_manager1_proxy_init (orgfreedesktopFileManager1Proxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_org_freedesktop_file_manager1_dbus_interface_info));
}

static void
_vala_g_async_ready_callback (GObject *source_object,
                              GAsyncResult *res,
                              void *user_data)
{
	g_task_return_pointer (user_data, g_object_ref (res), g_object_unref);
	g_object_unref (user_data);
}

static void
org_freedesktop_file_manager1_proxy_show_folders_async (orgfreedesktopFileManager1* self,
                                                        gchar** uris,
                                                        gint uris_length1,
                                                        const gchar* startup_id,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	gchar** _tmp0_;
	GVariantBuilder _tmp1_;
	gint _tmp2_;
	G_IO_ERROR;
	G_DBUS_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.FileManager1", "ShowFolders");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_tmp0_ = uris;
	g_variant_builder_init (&_tmp1_, G_VARIANT_TYPE ("as"));
	for (_tmp2_ = 0; _tmp2_ < uris_length1; _tmp2_++) {
		g_variant_builder_add_value (&_tmp1_, g_variant_new_string (*_tmp0_));
		_tmp0_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp1_));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (startup_id));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
org_freedesktop_file_manager1_proxy_show_folders_finish (orgfreedesktopFileManager1* self,
                                                         GAsyncResult* _res_,
                                                         GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
org_freedesktop_file_manager1_proxy_show_items_async (orgfreedesktopFileManager1* self,
                                                      gchar** uris,
                                                      gint uris_length1,
                                                      const gchar* startup_id,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	gchar** _tmp3_;
	GVariantBuilder _tmp4_;
	gint _tmp5_;
	G_IO_ERROR;
	G_DBUS_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.FileManager1", "ShowItems");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_tmp3_ = uris;
	g_variant_builder_init (&_tmp4_, G_VARIANT_TYPE ("as"));
	for (_tmp5_ = 0; _tmp5_ < uris_length1; _tmp5_++) {
		g_variant_builder_add_value (&_tmp4_, g_variant_new_string (*_tmp3_));
		_tmp3_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp4_));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (startup_id));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
org_freedesktop_file_manager1_proxy_show_items_finish (orgfreedesktopFileManager1* self,
                                                       GAsyncResult* _res_,
                                                       GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
org_freedesktop_file_manager1_proxy_show_item_properties_async (orgfreedesktopFileManager1* self,
                                                                gchar** uris,
                                                                gint uris_length1,
                                                                const gchar* startup_id,
                                                                GAsyncReadyCallback _callback_,
                                                                gpointer _user_data_)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	gchar** _tmp6_;
	GVariantBuilder _tmp7_;
	gint _tmp8_;
	G_IO_ERROR;
	G_DBUS_ERROR;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "org.freedesktop.FileManager1", "ShowItemProperties");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_tmp6_ = uris;
	g_variant_builder_init (&_tmp7_, G_VARIANT_TYPE ("as"));
	for (_tmp8_ = 0; _tmp8_ < uris_length1; _tmp8_++) {
		g_variant_builder_add_value (&_tmp7_, g_variant_new_string (*_tmp6_));
		_tmp6_++;
	}
	g_variant_builder_add_value (&_arguments_builder, g_variant_builder_end (&_tmp7_));
	g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (startup_id));
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	if (_callback_ != NULL) {
		g_dbus_connection_send_message_with_reply (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, _vala_g_async_ready_callback, g_task_new ((GObject *) self, NULL, _callback_, _user_data_));
	} else {
		g_dbus_message_set_flags (_message, G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED);
		g_dbus_connection_send_message (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	}
	g_object_unref (_message);
}

static void
org_freedesktop_file_manager1_proxy_show_item_properties_finish (orgfreedesktopFileManager1* self,
                                                                 GAsyncResult* _res_,
                                                                 GError** error)
{
	GAsyncResult *_inner_res;
	GDBusMessage *_reply_message;
	_inner_res = g_task_propagate_pointer ((GTask *) _res_, NULL);
	_reply_message = g_dbus_connection_send_message_with_reply_finish (g_dbus_proxy_get_connection ((GDBusProxy *) self), _inner_res, error);
	g_object_unref (_inner_res);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
org_freedesktop_file_manager1_proxy_org_freedesktop_file_manager1_interface_init (orgfreedesktopFileManager1Iface* iface)
{
	iface->show_folders = org_freedesktop_file_manager1_proxy_show_folders_async;
	iface->show_folders_finish = org_freedesktop_file_manager1_proxy_show_folders_finish;
	iface->show_items = org_freedesktop_file_manager1_proxy_show_items_async;
	iface->show_items_finish = org_freedesktop_file_manager1_proxy_show_items_finish;
	iface->show_item_properties = org_freedesktop_file_manager1_proxy_show_item_properties_async;
	iface->show_item_properties_finish = org_freedesktop_file_manager1_proxy_show_item_properties_finish;
}

static void
_dbus_org_freedesktop_file_manager1_show_folders (orgfreedesktopFileManager1* self,
                                                  GVariant* _parameters_,
                                                  GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	OrgFreedesktopFileManager1ShowFoldersReadyData* _ready_data;
	GVariant* _tmp9_;
	gchar** _tmp10_;
	gint _tmp10__length;
	gint _tmp10__size;
	gint _tmp10__length1;
	GVariantIter _tmp11_;
	GVariant* _tmp12_;
	GVariant* _tmp13_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (OrgFreedesktopFileManager1ShowFoldersReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp9_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp10_ = g_new (gchar*, 5);
	_tmp10__length = 0;
	_tmp10__size = 4;
	_tmp10__length1 = 0;
	g_variant_iter_init (&_tmp11_, _tmp9_);
	for (; (_tmp12_ = g_variant_iter_next_value (&_tmp11_)) != NULL; _tmp10__length1++) {
		if (_tmp10__size == _tmp10__length) {
			_tmp10__size = 2 * _tmp10__size;
			_tmp10_ = g_renew (gchar*, _tmp10_, _tmp10__size + 1);
		}
		_tmp10_[_tmp10__length++] = g_variant_dup_string (_tmp12_, NULL);
		g_variant_unref (_tmp12_);
	}
	_ready_data->uris_length1 = _tmp10__length1;
	_tmp10_[_tmp10__length] = NULL;
	_ready_data->uris = _tmp10_;
	g_variant_unref (_tmp9_);
	_tmp13_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->startup_id = g_variant_dup_string (_tmp13_, NULL);
	g_variant_unref (_tmp13_);
	org_freedesktop_file_manager1_show_folders (self, _ready_data->uris, _ready_data->uris_length1, _ready_data->startup_id, (GAsyncReadyCallback) _dbus_org_freedesktop_file_manager1_show_folders_ready, _ready_data);
	_error:
	;
}

static void
_dbus_org_freedesktop_file_manager1_show_folders_ready (GObject * source_object,
                                                        GAsyncResult * _res_,
                                                        gpointer _user_data_)
{
	OrgFreedesktopFileManager1ShowFoldersReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	org_freedesktop_file_manager1_show_folders_finish ((orgfreedesktopFileManager1*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_ready_data->uris = (_vala_array_free (_ready_data->uris, _ready_data->uris_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (_ready_data->startup_id);
	g_slice_free (OrgFreedesktopFileManager1ShowFoldersReadyData, _ready_data);
}

static void
_dbus_org_freedesktop_file_manager1_show_items (orgfreedesktopFileManager1* self,
                                                GVariant* _parameters_,
                                                GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	OrgFreedesktopFileManager1ShowItemsReadyData* _ready_data;
	GVariant* _tmp14_;
	gchar** _tmp15_;
	gint _tmp15__length;
	gint _tmp15__size;
	gint _tmp15__length1;
	GVariantIter _tmp16_;
	GVariant* _tmp17_;
	GVariant* _tmp18_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (OrgFreedesktopFileManager1ShowItemsReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp14_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp15_ = g_new (gchar*, 5);
	_tmp15__length = 0;
	_tmp15__size = 4;
	_tmp15__length1 = 0;
	g_variant_iter_init (&_tmp16_, _tmp14_);
	for (; (_tmp17_ = g_variant_iter_next_value (&_tmp16_)) != NULL; _tmp15__length1++) {
		if (_tmp15__size == _tmp15__length) {
			_tmp15__size = 2 * _tmp15__size;
			_tmp15_ = g_renew (gchar*, _tmp15_, _tmp15__size + 1);
		}
		_tmp15_[_tmp15__length++] = g_variant_dup_string (_tmp17_, NULL);
		g_variant_unref (_tmp17_);
	}
	_ready_data->uris_length1 = _tmp15__length1;
	_tmp15_[_tmp15__length] = NULL;
	_ready_data->uris = _tmp15_;
	g_variant_unref (_tmp14_);
	_tmp18_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->startup_id = g_variant_dup_string (_tmp18_, NULL);
	g_variant_unref (_tmp18_);
	org_freedesktop_file_manager1_show_items (self, _ready_data->uris, _ready_data->uris_length1, _ready_data->startup_id, (GAsyncReadyCallback) _dbus_org_freedesktop_file_manager1_show_items_ready, _ready_data);
	_error:
	;
}

static void
_dbus_org_freedesktop_file_manager1_show_items_ready (GObject * source_object,
                                                      GAsyncResult * _res_,
                                                      gpointer _user_data_)
{
	OrgFreedesktopFileManager1ShowItemsReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	org_freedesktop_file_manager1_show_items_finish ((orgfreedesktopFileManager1*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_ready_data->uris = (_vala_array_free (_ready_data->uris, _ready_data->uris_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (_ready_data->startup_id);
	g_slice_free (OrgFreedesktopFileManager1ShowItemsReadyData, _ready_data);
}

static void
_dbus_org_freedesktop_file_manager1_show_item_properties (orgfreedesktopFileManager1* self,
                                                          GVariant* _parameters_,
                                                          GDBusMethodInvocation* invocation)
{
	GVariantIter _arguments_iter;
	OrgFreedesktopFileManager1ShowItemPropertiesReadyData* _ready_data;
	GVariant* _tmp19_;
	gchar** _tmp20_;
	gint _tmp20__length;
	gint _tmp20__size;
	gint _tmp20__length1;
	GVariantIter _tmp21_;
	GVariant* _tmp22_;
	GVariant* _tmp23_;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	_ready_data = g_slice_new0 (OrgFreedesktopFileManager1ShowItemPropertiesReadyData);
	_ready_data->_invocation_ = invocation;
	_tmp19_ = g_variant_iter_next_value (&_arguments_iter);
	_tmp20_ = g_new (gchar*, 5);
	_tmp20__length = 0;
	_tmp20__size = 4;
	_tmp20__length1 = 0;
	g_variant_iter_init (&_tmp21_, _tmp19_);
	for (; (_tmp22_ = g_variant_iter_next_value (&_tmp21_)) != NULL; _tmp20__length1++) {
		if (_tmp20__size == _tmp20__length) {
			_tmp20__size = 2 * _tmp20__size;
			_tmp20_ = g_renew (gchar*, _tmp20_, _tmp20__size + 1);
		}
		_tmp20_[_tmp20__length++] = g_variant_dup_string (_tmp22_, NULL);
		g_variant_unref (_tmp22_);
	}
	_ready_data->uris_length1 = _tmp20__length1;
	_tmp20_[_tmp20__length] = NULL;
	_ready_data->uris = _tmp20_;
	g_variant_unref (_tmp19_);
	_tmp23_ = g_variant_iter_next_value (&_arguments_iter);
	_ready_data->startup_id = g_variant_dup_string (_tmp23_, NULL);
	g_variant_unref (_tmp23_);
	org_freedesktop_file_manager1_show_item_properties (self, _ready_data->uris, _ready_data->uris_length1, _ready_data->startup_id, (GAsyncReadyCallback) _dbus_org_freedesktop_file_manager1_show_item_properties_ready, _ready_data);
	_error:
	;
}

static void
_dbus_org_freedesktop_file_manager1_show_item_properties_ready (GObject * source_object,
                                                                GAsyncResult * _res_,
                                                                gpointer _user_data_)
{
	OrgFreedesktopFileManager1ShowItemPropertiesReadyData* _ready_data;
	GDBusMethodInvocation* invocation;
	GError* error = NULL;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	_ready_data = _user_data_;
	invocation = _ready_data->_invocation_;
	org_freedesktop_file_manager1_show_item_properties_finish ((orgfreedesktopFileManager1*) source_object, _res_, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		goto _error;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
	_error:
	_ready_data->uris = (_vala_array_free (_ready_data->uris, _ready_data->uris_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (_ready_data->startup_id);
	g_slice_free (OrgFreedesktopFileManager1ShowItemPropertiesReadyData, _ready_data);
}

static void
org_freedesktop_file_manager1_dbus_interface_method_call (GDBusConnection* connection,
                                                          const gchar* sender,
                                                          const gchar* object_path,
                                                          const gchar* interface_name,
                                                          const gchar* method_name,
                                                          GVariant* parameters,
                                                          GDBusMethodInvocation* invocation,
                                                          gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "ShowFolders") == 0) {
		_dbus_org_freedesktop_file_manager1_show_folders (object, parameters, invocation);
	} else if (strcmp (method_name, "ShowItems") == 0) {
		_dbus_org_freedesktop_file_manager1_show_items (object, parameters, invocation);
	} else if (strcmp (method_name, "ShowItemProperties") == 0) {
		_dbus_org_freedesktop_file_manager1_show_item_properties (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
org_freedesktop_file_manager1_dbus_interface_get_property (GDBusConnection* connection,
                                                           const gchar* sender,
                                                           const gchar* object_path,
                                                           const gchar* interface_name,
                                                           const gchar* property_name,
                                                           GError** error,
                                                           gpointer user_data)
{
	return NULL;
}

static gboolean
org_freedesktop_file_manager1_dbus_interface_set_property (GDBusConnection* connection,
                                                           const gchar* sender,
                                                           const gchar* object_path,
                                                           const gchar* interface_name,
                                                           const gchar* property_name,
                                                           GVariant* value,
                                                           GError** error,
                                                           gpointer user_data)
{
	return FALSE;
}

guint
org_freedesktop_file_manager1_register_object (gpointer object,
                                               GDBusConnection* connection,
                                               const gchar* path,
                                               GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_org_freedesktop_file_manager1_dbus_interface_info), &_org_freedesktop_file_manager1_dbus_interface_vtable, data, _org_freedesktop_file_manager1_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_org_freedesktop_file_manager1_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

static void
show_file_in_filemanager_data_free (gpointer _data)
{
	ShowFileInFilemanagerData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->file);
	g_slice_free (ShowFileInFilemanagerData, _data_);
}

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

void
show_file_in_filemanager (GFile* file,
                          GAsyncReadyCallback _callback_,
                          gpointer _user_data_)
{
	ShowFileInFilemanagerData* _data_;
	GFile* _tmp0_;
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (file, g_file_get_type ()));
	_data_ = g_slice_new0 (ShowFileInFilemanagerData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, show_file_in_filemanager_data_free);
	_tmp0_ = _g_object_ref0 (file);
	_g_object_unref0 (_data_->file);
	_data_->file = _tmp0_;
	show_file_in_filemanager_co (_data_);
}

void
show_file_in_filemanager_finish (GAsyncResult* _res_,
                                 GError** error)
{
	ShowFileInFilemanagerData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static void
show_file_in_filemanager_ready (GObject* source_object,
                                GAsyncResult* _res_,
                                gpointer _user_data_)
{
	ShowFileInFilemanagerData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	show_file_in_filemanager_co (_data_);
}

static gboolean
show_file_in_filemanager_co (ShowFileInFilemanagerData* _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_->_state_ = 1;
		g_async_initable_new_async (ORG_FREEDESKTOP_TYPE_FILE_MANAGER1_PROXY, 0, NULL, show_file_in_filemanager_ready, _data_, "g-flags", G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS, "g-name", ORG_FREEDESKTOP_FILE_MANAGER1_NAME, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", ORG_FREEDESKTOP_FILE_MANAGER1_PATH, "g-interface-name", "org.freedesktop.FileManager1", NULL);
		return FALSE;
		_state_1:
		_data_->_tmp0_ = (orgfreedesktopFileManager1*) g_async_initable_new_finish ((GAsyncInitable *) _data_->_source_object_, _data_->_res_, &_data_->_inner_error0_);
		_data_->manager = (orgfreedesktopFileManager1*) _data_->_tmp0_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp1_ = g_get_prgname ();
		_data_->_tmp2_ = g_get_host_name ();
		_data_->_tmp3_ = g_strdup_printf ("%" G_GINT64_FORMAT, g_get_monotonic_time ());
		_data_->_tmp4_ = _data_->_tmp3_;
		_data_->_tmp5_ = g_strdup_printf ("%s_%s_%d_%s", _data_->_tmp1_, _data_->_tmp2_, (gint) getpid (), _data_->_tmp4_);
		_data_->_tmp6_ = _data_->_tmp5_;
		_g_free0 (_data_->_tmp4_);
		_data_->id = _data_->_tmp6_;
		_data_->_tmp7_ = _data_->manager;
		_data_->_tmp8_ = g_file_get_uri (_data_->file);
		_data_->_tmp9_ = g_new0 (gchar*, 1 + 1);
		_data_->_tmp9_[0] = _data_->_tmp8_;
		_data_->_tmp10_ = _data_->_tmp9_;
		_data_->_tmp10__length1 = 1;
		_data_->_tmp11_ = _data_->id;
		_data_->_state_ = 2;
		org_freedesktop_file_manager1_show_items (_data_->_tmp7_, _data_->_tmp10_, (gint) 1, _data_->_tmp11_, show_file_in_filemanager_ready, _data_);
		return FALSE;
		_state_2:
		org_freedesktop_file_manager1_show_items_finish (_data_->_tmp7_, _data_->_res_, &_data_->_inner_error0_);
		_data_->_tmp10_ = (_vala_array_free (_data_->_tmp10_, _data_->_tmp10__length1, (GDestroyNotify) g_free), NULL);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_free0 (_data_->id);
			_g_object_unref0 (_data_->manager);
			goto __catch0_g_error;
		}
		_g_free0 (_data_->id);
		_g_object_unref0 (_data_->manager);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp12_ = _data_->e;
		_data_->_tmp13_ = _data_->_tmp12_->message;
		g_warning ("system.vala:46: Failed to launch file manager using DBus, using fall-b" \
"ack: %s", _data_->_tmp13_);
		_data_->_tmp14_ = app_window_get_instance ();
		_data_->_tmp15_ = _data_->_tmp14_;
		_data_->_tmp16_ = g_file_get_parent (_data_->file);
		_data_->_tmp17_ = _data_->_tmp16_;
		_data_->_tmp18_ = g_file_get_uri (_data_->_tmp17_);
		_data_->_tmp19_ = _data_->_tmp18_;
		gtk_show_uri_on_window (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp15_, gtk_window_get_type (), GtkWindow), _data_->_tmp19_, (guint32) GDK_CURRENT_TIME, &_data_->_inner_error0_);
		_g_free0 (_data_->_tmp19_);
		_g_object_unref0 (_data_->_tmp17_);
		_g_object_unref0 (_data_->_tmp15_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_error_free0 (_data_->e);
			goto __finally0;
		}
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

