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

/*
    Services.vala
    Copyright (C) 2010 Maia Kozheva <sikon@ubuntu.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program 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 General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>

#define STEADYFLOW_UI_UI_UTIL_MESSAGE_FORMAT "<span weight='bold' size='larger'>%s</span>\n\n%s\n"
#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 STEADYFLOW_TYPE_SERVICES (steadyflow_services_get_type ())
#define STEADYFLOW_SERVICES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), STEADYFLOW_TYPE_SERVICES, SteadyflowServices))
#define STEADYFLOW_SERVICES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), STEADYFLOW_TYPE_SERVICES, SteadyflowServicesClass))
#define STEADYFLOW_IS_SERVICES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STEADYFLOW_TYPE_SERVICES))
#define STEADYFLOW_IS_SERVICES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), STEADYFLOW_TYPE_SERVICES))
#define STEADYFLOW_SERVICES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), STEADYFLOW_TYPE_SERVICES, SteadyflowServicesClass))

typedef struct _SteadyflowServices SteadyflowServices;
typedef struct _SteadyflowServicesClass SteadyflowServicesClass;
typedef struct _SteadyflowServicesPrivate SteadyflowServicesPrivate;
enum  {
	STEADYFLOW_SERVICES_0_PROPERTY,
	STEADYFLOW_SERVICES_NUM_PROPERTIES
};
static GParamSpec* steadyflow_services_properties[STEADYFLOW_SERVICES_NUM_PROPERTIES];

#define STEADYFLOW_CORE_TYPE_IDOWNLOAD_SERVICE (steadyflow_core_idownload_service_get_type ())
#define STEADYFLOW_CORE_IDOWNLOAD_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), STEADYFLOW_CORE_TYPE_IDOWNLOAD_SERVICE, SteadyflowCoreIDownloadService))
#define STEADYFLOW_CORE_IS_IDOWNLOAD_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STEADYFLOW_CORE_TYPE_IDOWNLOAD_SERVICE))
#define STEADYFLOW_CORE_IDOWNLOAD_SERVICE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), STEADYFLOW_CORE_TYPE_IDOWNLOAD_SERVICE, SteadyflowCoreIDownloadServiceIface))

typedef struct _SteadyflowCoreIDownloadService SteadyflowCoreIDownloadService;
typedef struct _SteadyflowCoreIDownloadServiceIface SteadyflowCoreIDownloadServiceIface;

#define STEADYFLOW_CORE_TYPE_IDOWNLOAD_FILE (steadyflow_core_idownload_file_get_type ())
#define STEADYFLOW_CORE_IDOWNLOAD_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), STEADYFLOW_CORE_TYPE_IDOWNLOAD_FILE, SteadyflowCoreIDownloadFile))
#define STEADYFLOW_CORE_IS_IDOWNLOAD_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STEADYFLOW_CORE_TYPE_IDOWNLOAD_FILE))
#define STEADYFLOW_CORE_IDOWNLOAD_FILE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), STEADYFLOW_CORE_TYPE_IDOWNLOAD_FILE, SteadyflowCoreIDownloadFileIface))

typedef struct _SteadyflowCoreIDownloadFile SteadyflowCoreIDownloadFile;
typedef struct _SteadyflowCoreIDownloadFileIface SteadyflowCoreIDownloadFileIface;
typedef enum  {
	STEADYFLOW_CORE_IDOWNLOAD_FILE_STATUS_CONNECTING = 0,
	STEADYFLOW_CORE_IDOWNLOAD_FILE_STATUS_DOWNLOADING,
	STEADYFLOW_CORE_IDOWNLOAD_FILE_STATUS_PAUSED,
	STEADYFLOW_CORE_IDOWNLOAD_FILE_STATUS_FINISHED,
	STEADYFLOW_CORE_IDOWNLOAD_FILE_STATUS_NETWORK_ERROR
} SteadyflowCoreIDownloadFileStatus;

#define STEADYFLOW_CORE_IDOWNLOAD_FILE_TYPE_STATUS (steadyflow_core_idownload_file_status_get_type ())
typedef enum  {
	STEADYFLOW_CORE_IDOWNLOAD_FILE_FINISH_ACTION_DO_NOTHING = 0,
	STEADYFLOW_CORE_IDOWNLOAD_FILE_FINISH_ACTION_OPEN_FILE,
	STEADYFLOW_CORE_IDOWNLOAD_FILE_FINISH_ACTION_OPEN_FOLDER,
	STEADYFLOW_CORE_IDOWNLOAD_FILE_FINISH_ACTION_RUN_COMMAND
} SteadyflowCoreIDownloadFileFinishAction;

#define STEADYFLOW_CORE_IDOWNLOAD_FILE_TYPE_FINISH_ACTION (steadyflow_core_idownload_file_finish_action_get_type ())

#define STEADYFLOW_CORE_TYPE_ISETTINGS_SERVICE (steadyflow_core_isettings_service_get_type ())
#define STEADYFLOW_CORE_ISETTINGS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), STEADYFLOW_CORE_TYPE_ISETTINGS_SERVICE, SteadyflowCoreISettingsService))
#define STEADYFLOW_CORE_IS_ISETTINGS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STEADYFLOW_CORE_TYPE_ISETTINGS_SERVICE))
#define STEADYFLOW_CORE_ISETTINGS_SERVICE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), STEADYFLOW_CORE_TYPE_ISETTINGS_SERVICE, SteadyflowCoreISettingsServiceIface))

typedef struct _SteadyflowCoreISettingsService SteadyflowCoreISettingsService;
typedef struct _SteadyflowCoreISettingsServiceIface SteadyflowCoreISettingsServiceIface;

#define STEADYFLOW_UI_TYPE_IINDICATOR_SERVICE (steadyflow_ui_iindicator_service_get_type ())
#define STEADYFLOW_UI_IINDICATOR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), STEADYFLOW_UI_TYPE_IINDICATOR_SERVICE, SteadyflowUIIIndicatorService))
#define STEADYFLOW_UI_IS_IINDICATOR_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STEADYFLOW_UI_TYPE_IINDICATOR_SERVICE))
#define STEADYFLOW_UI_IINDICATOR_SERVICE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), STEADYFLOW_UI_TYPE_IINDICATOR_SERVICE, SteadyflowUIIIndicatorServiceIface))

typedef struct _SteadyflowUIIIndicatorService SteadyflowUIIIndicatorService;
typedef struct _SteadyflowUIIIndicatorServiceIface SteadyflowUIIIndicatorServiceIface;

#define STEADYFLOW_CORE_TYPE_UTIL (steadyflow_core_util_get_type ())
#define STEADYFLOW_CORE_UTIL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), STEADYFLOW_CORE_TYPE_UTIL, SteadyflowCoreUtil))
#define STEADYFLOW_CORE_UTIL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), STEADYFLOW_CORE_TYPE_UTIL, SteadyflowCoreUtilClass))
#define STEADYFLOW_CORE_IS_UTIL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STEADYFLOW_CORE_TYPE_UTIL))
#define STEADYFLOW_CORE_IS_UTIL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), STEADYFLOW_CORE_TYPE_UTIL))
#define STEADYFLOW_CORE_UTIL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), STEADYFLOW_CORE_TYPE_UTIL, SteadyflowCoreUtilClass))

typedef struct _SteadyflowCoreUtil SteadyflowCoreUtil;
typedef struct _SteadyflowCoreUtilClass SteadyflowCoreUtilClass;

#define STEADYFLOW_CORE_TYPE_DOWNLOAD_SERVICE (steadyflow_core_download_service_get_type ())
#define STEADYFLOW_CORE_DOWNLOAD_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), STEADYFLOW_CORE_TYPE_DOWNLOAD_SERVICE, SteadyflowCoreDownloadService))
#define STEADYFLOW_CORE_DOWNLOAD_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), STEADYFLOW_CORE_TYPE_DOWNLOAD_SERVICE, SteadyflowCoreDownloadServiceClass))
#define STEADYFLOW_CORE_IS_DOWNLOAD_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), STEADYFLOW_CORE_TYPE_DOWNLOAD_SERVICE))
#define STEADYFLOW_CORE_IS_DOWNLOAD_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), STEADYFLOW_CORE_TYPE_DOWNLOAD_SERVICE))
#define STEADYFLOW_CORE_DOWNLOAD_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), STEADYFLOW_CORE_TYPE_DOWNLOAD_SERVICE, SteadyflowCoreDownloadServiceClass))

typedef struct _SteadyflowCoreDownloadService SteadyflowCoreDownloadService;
typedef struct _SteadyflowCoreDownloadServiceClass SteadyflowCoreDownloadServiceClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

struct _SteadyflowServices {
	GObject parent_instance;
	SteadyflowServicesPrivate * priv;
};

struct _SteadyflowServicesClass {
	GObjectClass parent_class;
};

struct _SteadyflowCoreIDownloadFileIface {
	GTypeInterface parent_iface;
	void (*start) (SteadyflowCoreIDownloadFile* self, gboolean resume);
	void (*pause) (SteadyflowCoreIDownloadFile* self);
	void (*serialize) (SteadyflowCoreIDownloadFile* self, GKeyFile* file);
	SteadyflowCoreIDownloadFileStatus (*get_status) (SteadyflowCoreIDownloadFile* self);
	gint (*get_uid) (SteadyflowCoreIDownloadFile* self);
	const gchar* (*get_url) (SteadyflowCoreIDownloadFile* self);
	const gchar* (*get_local_name) (SteadyflowCoreIDownloadFile* self);
	const gchar* (*get_local_basename) (SteadyflowCoreIDownloadFile* self);
	gint64 (*get_size) (SteadyflowCoreIDownloadFile* self);
	gint64 (*get_downloaded_size) (SteadyflowCoreIDownloadFile* self);
	gint (*get_speed) (SteadyflowCoreIDownloadFile* self);
	const gchar* (*get_icon_name) (SteadyflowCoreIDownloadFile* self);
	SteadyflowCoreIDownloadFileFinishAction (*get_finish_action) (SteadyflowCoreIDownloadFile* self);
	const gchar* (*get_finish_command) (SteadyflowCoreIDownloadFile* self);
	GError* (*get_error) (SteadyflowCoreIDownloadFile* self);
};

struct _SteadyflowCoreIDownloadServiceIface {
	GTypeInterface parent_iface;
	SteadyflowCoreIDownloadFile* (*get_file_by_uid) (SteadyflowCoreIDownloadService* self, gint uid);
	SteadyflowCoreIDownloadFile* (*add_file) (SteadyflowCoreIDownloadService* self, const gchar* url, const gchar* local_name, SteadyflowCoreIDownloadFileFinishAction finish_action, const gchar* finish_command, GError** error);
	void (*remove_file) (SteadyflowCoreIDownloadService* self, SteadyflowCoreIDownloadFile* file);
	GeeList* (*get_files) (SteadyflowCoreIDownloadService* self);
};

struct _SteadyflowCoreISettingsServiceIface {
	GTypeInterface parent_iface;
	gboolean (*get_boolean) (SteadyflowCoreISettingsService* self, const gchar* key);
	gint (*get_int) (SteadyflowCoreISettingsService* self, const gchar* key);
	gint (*get_enum) (SteadyflowCoreISettingsService* self, const gchar* key);
	gchar* (*get_string) (SteadyflowCoreISettingsService* self, const gchar* key);
	void (*set_boolean) (SteadyflowCoreISettingsService* self, const gchar* key, gboolean value);
	void (*set_int) (SteadyflowCoreISettingsService* self, const gchar* key, gint value);
	void (*set_enum) (SteadyflowCoreISettingsService* self, const gchar* key, gint value);
	void (*set_string) (SteadyflowCoreISettingsService* self, const gchar* key, const gchar* value);
	void (*save) (SteadyflowCoreISettingsService* self);
};

struct _SteadyflowUIIIndicatorServiceIface {
	GTypeInterface parent_iface;
	void (*set_menu) (SteadyflowUIIIndicatorService* self, GtkMenu* menu);
	gchar* (*get_icon_name) (SteadyflowUIIIndicatorService* self);
	void (*set_icon_name) (SteadyflowUIIIndicatorService* self, const gchar* value);
	gboolean (*get_visible) (SteadyflowUIIIndicatorService* self);
	void (*set_visible) (SteadyflowUIIIndicatorService* self, gboolean value);
};

static gpointer steadyflow_services_parent_class = NULL;
static SteadyflowCoreIDownloadService* steadyflow_services__download;
static SteadyflowCoreIDownloadService* steadyflow_services__download = NULL;
static SteadyflowCoreISettingsService* steadyflow_services__settings;
static SteadyflowCoreISettingsService* steadyflow_services__settings = NULL;
static SteadyflowUIIIndicatorService* steadyflow_services__indicator;
static SteadyflowUIIIndicatorService* steadyflow_services__indicator = NULL;

VALA_EXTERN GType steadyflow_services_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SteadyflowServices, g_object_unref)
VALA_EXTERN GType steadyflow_core_idownload_file_status_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType steadyflow_core_idownload_file_finish_action_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType steadyflow_core_idownload_file_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SteadyflowCoreIDownloadFile, g_object_unref)
VALA_EXTERN GType steadyflow_core_idownload_service_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SteadyflowCoreIDownloadService, g_object_unref)
VALA_EXTERN GType steadyflow_core_isettings_service_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SteadyflowCoreISettingsService, g_object_unref)
VALA_EXTERN GType steadyflow_ui_iindicator_service_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SteadyflowUIIIndicatorService, g_object_unref)
static SteadyflowServices* steadyflow_services_new (void);
static SteadyflowServices* steadyflow_services_construct (GType object_type);
VALA_EXTERN void steadyflow_services_init (void);
VALA_EXTERN GType steadyflow_core_util_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SteadyflowCoreUtil, g_object_unref)
VALA_EXTERN SteadyflowCoreUtil* steadyflow_core_util_get_signaller (void);
static void steadyflow_services_exit_with_error (GError* e,
                                          const gchar* message);
static void _steadyflow_services_exit_with_error_steadyflow_core_util_fatal_error_sig (SteadyflowCoreUtil* _sender,
                                                                                GError* e,
                                                                                const gchar* message,
                                                                                gpointer self);
VALA_EXTERN SteadyflowCoreDownloadService* steadyflow_core_download_service_new (void);
VALA_EXTERN SteadyflowCoreDownloadService* steadyflow_core_download_service_construct (GType object_type);
VALA_EXTERN GType steadyflow_core_download_service_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SteadyflowCoreDownloadService, g_object_unref)
static void steadyflow_services_set_download (SteadyflowCoreIDownloadService* value);
VALA_EXTERN SteadyflowCoreISettingsService* steadyflow_core_app_config_create_settings (const gchar* schema);
static void steadyflow_services_set_settings (SteadyflowCoreISettingsService* value);
VALA_EXTERN SteadyflowUIIIndicatorService* steadyflow_core_app_config_create_indicator (void);
static void steadyflow_services_set_indicator (SteadyflowUIIIndicatorService* value);
VALA_EXTERN void steadyflow_services_done (void);
VALA_EXTERN gchar* steadyflow_services_get_default_download_folder (void);
VALA_EXTERN SteadyflowCoreISettingsService* steadyflow_services_get_settings (void);
VALA_EXTERN gchar* steadyflow_core_isettings_service_get_string (SteadyflowCoreISettingsService* self,
                                                     const gchar* key);
VALA_EXTERN SteadyflowCoreIDownloadService* steadyflow_services_get_download (void);
VALA_EXTERN SteadyflowUIIIndicatorService* steadyflow_services_get_indicator (void);
static void steadyflow_services_finalize (GObject * obj);
static GType steadyflow_services_get_type_once (void);
static void _vala_steadyflow_services_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec);
static void _vala_steadyflow_services_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec);

static SteadyflowServices*
steadyflow_services_construct (GType object_type)
{
	SteadyflowServices * self = NULL;
	self = (SteadyflowServices*) g_object_new (object_type, NULL);
	return self;
}

static SteadyflowServices*
steadyflow_services_new (void)
{
	return steadyflow_services_construct (STEADYFLOW_TYPE_SERVICES);
}

static void
_steadyflow_services_exit_with_error_steadyflow_core_util_fatal_error_sig (SteadyflowCoreUtil* _sender,
                                                                           GError* e,
                                                                           const gchar* message,
                                                                           gpointer self)
{
	steadyflow_services_exit_with_error (e, message);
}

void
steadyflow_services_init (void)
{
	SteadyflowCoreUtil* _tmp0_;
	SteadyflowCoreUtil* _tmp1_;
	SteadyflowCoreDownloadService* _tmp2_;
	SteadyflowCoreDownloadService* _tmp3_;
	SteadyflowCoreISettingsService* _tmp4_;
	SteadyflowCoreISettingsService* _tmp5_;
	SteadyflowUIIIndicatorService* _tmp6_;
	SteadyflowUIIIndicatorService* _tmp7_;
	_tmp0_ = steadyflow_core_util_get_signaller ();
	_tmp1_ = _tmp0_;
	g_signal_connect (_tmp1_, "fatal-error-sig", (GCallback) _steadyflow_services_exit_with_error_steadyflow_core_util_fatal_error_sig, NULL);
	_tmp2_ = steadyflow_core_download_service_new ();
	_tmp3_ = _tmp2_;
	steadyflow_services_set_download ((SteadyflowCoreIDownloadService*) _tmp3_);
	_g_object_unref0 (_tmp3_);
	_tmp4_ = steadyflow_core_app_config_create_settings ("net.launchpad.steadyflow");
	_tmp5_ = _tmp4_;
	steadyflow_services_set_settings (_tmp5_);
	_g_object_unref0 (_tmp5_);
	_tmp6_ = steadyflow_core_app_config_create_indicator ();
	_tmp7_ = _tmp6_;
	steadyflow_services_set_indicator (_tmp7_);
	_g_object_unref0 (_tmp7_);
}

void
steadyflow_services_done (void)
{
	steadyflow_services_set_download (NULL);
	steadyflow_services_set_indicator (NULL);
	steadyflow_services_set_settings (NULL);
}

gchar*
steadyflow_services_get_default_download_folder (void)
{
	gchar* path = NULL;
	SteadyflowCoreISettingsService* _tmp0_;
	SteadyflowCoreISettingsService* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_ = NULL;
	const gchar* _tmp4_;
	gchar* _tmp7_;
	gchar* result;
	_tmp0_ = steadyflow_services_get_settings ();
	_tmp1_ = _tmp0_;
	_tmp2_ = steadyflow_core_isettings_service_get_string (_tmp1_, "default-download-folder");
	path = _tmp2_;
	_tmp4_ = path;
	if (g_strcmp0 (_tmp4_, "") == 0) {
		const gchar* _tmp5_;
		_tmp5_ = g_get_user_special_dir (G_USER_DIRECTORY_DOWNLOAD);
		_tmp3_ = _tmp5_;
	} else {
		const gchar* _tmp6_;
		_tmp6_ = path;
		_tmp3_ = _tmp6_;
	}
	_tmp7_ = g_strdup (_tmp3_);
	result = _tmp7_;
	_g_free0 (path);
	return result;
}

static void
steadyflow_services_exit_with_error (GError* e,
                                     const gchar* message)
{
	GtkMessageDialog* md = NULL;
	gchar* _tmp1_;
	gchar* _tmp2_;
	GtkMessageDialog* _tmp3_;
	GtkMessageDialog* _tmp4_;
	g_return_if_fail (e != NULL);
	if (message == NULL) {
		const gchar* _tmp0_;
		_tmp0_ = e->message;
		message = _tmp0_;
	}
	_tmp1_ = g_strdup_printf (_ ("Steadyflow has experienced a problem and needs to close. Please pass t" \
"he following " "information to the developer:\n\nError Code %d:\n\n%s"), e->code, message);
	_tmp2_ = _tmp1_;
	_tmp3_ = (GtkMessageDialog*) gtk_message_dialog_new_with_markup (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, STEADYFLOW_UI_UI_UTIL_MESSAGE_FORMAT, _ ("Whoopsie!"), _tmp2_);
	g_object_ref_sink (_tmp3_);
	_tmp4_ = _tmp3_;
	_g_free0 (_tmp2_);
	md = _tmp4_;
	gtk_dialog_run ((GtkDialog*) md);
	exit (1);
}

SteadyflowCoreIDownloadService*
steadyflow_services_get_download (void)
{
	SteadyflowCoreIDownloadService* result;
	SteadyflowCoreIDownloadService* _tmp0_;
	_tmp0_ = steadyflow_services__download;
	result = _tmp0_;
	return result;
}

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

static void
steadyflow_services_set_download (SteadyflowCoreIDownloadService* value)
{
	SteadyflowCoreIDownloadService* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (steadyflow_services__download);
	steadyflow_services__download = _tmp0_;
}

SteadyflowCoreISettingsService*
steadyflow_services_get_settings (void)
{
	SteadyflowCoreISettingsService* result;
	SteadyflowCoreISettingsService* _tmp0_;
	_tmp0_ = steadyflow_services__settings;
	result = _tmp0_;
	return result;
}

static void
steadyflow_services_set_settings (SteadyflowCoreISettingsService* value)
{
	SteadyflowCoreISettingsService* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (steadyflow_services__settings);
	steadyflow_services__settings = _tmp0_;
}

SteadyflowUIIIndicatorService*
steadyflow_services_get_indicator (void)
{
	SteadyflowUIIIndicatorService* result;
	SteadyflowUIIIndicatorService* _tmp0_;
	_tmp0_ = steadyflow_services__indicator;
	result = _tmp0_;
	return result;
}

static void
steadyflow_services_set_indicator (SteadyflowUIIIndicatorService* value)
{
	SteadyflowUIIIndicatorService* _tmp0_;
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (steadyflow_services__indicator);
	steadyflow_services__indicator = _tmp0_;
}

static void
steadyflow_services_class_init (SteadyflowServicesClass * klass,
                                gpointer klass_data)
{
	steadyflow_services_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->get_property = _vala_steadyflow_services_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_steadyflow_services_set_property;
	G_OBJECT_CLASS (klass)->finalize = steadyflow_services_finalize;
}

static void
steadyflow_services_instance_init (SteadyflowServices * self,
                                   gpointer klass)
{
}

static void
steadyflow_services_finalize (GObject * obj)
{
	SteadyflowServices * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, STEADYFLOW_TYPE_SERVICES, SteadyflowServices);
	G_OBJECT_CLASS (steadyflow_services_parent_class)->finalize (obj);
}

static GType
steadyflow_services_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SteadyflowServicesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) steadyflow_services_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SteadyflowServices), 0, (GInstanceInitFunc) steadyflow_services_instance_init, NULL };
	GType steadyflow_services_type_id;
	steadyflow_services_type_id = g_type_register_static (G_TYPE_OBJECT, "SteadyflowServices", &g_define_type_info, 0);
	return steadyflow_services_type_id;
}

GType
steadyflow_services_get_type (void)
{
	static volatile gsize steadyflow_services_type_id__once = 0;
	if (g_once_init_enter (&steadyflow_services_type_id__once)) {
		GType steadyflow_services_type_id;
		steadyflow_services_type_id = steadyflow_services_get_type_once ();
		g_once_init_leave (&steadyflow_services_type_id__once, steadyflow_services_type_id);
	}
	return steadyflow_services_type_id__once;
}

static void
_vala_steadyflow_services_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	SteadyflowServices * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, STEADYFLOW_TYPE_SERVICES, SteadyflowServices);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_steadyflow_services_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	SteadyflowServices * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, STEADYFLOW_TYPE_SERVICES, SteadyflowServices);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

