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

/*
* Copyright (c) 2017 Robert San <robertsanseries@gmail.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 2 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, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/

#include <glib-object.h>
#include <gee.h>
#include <gtk/gtk.h>
#include <granite.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>
#include <gio/gio.h>
#include <gobject/gvaluecollector.h>

#define CIANO_CONFIGS_PROPERTIES_TEXT_SELECT_FILE _ ("Select file")
#define CIANO_CONFIGS_PROPERTIES_TEXT_CANCEL _ ("Cancel")
#define CIANO_CONFIGS_PROPERTIES_TEXT_ADD _ ("Add")
#define CIANO_CONFIGS_CONSTANTS_LIST_BOX_VIEW "list-box-view"
#define CIANO_CONFIGS_PROPERTIES_TEXT_SUCESS_IN_CONVERSION _ ("Conversion completed")
#define CIANO_CONFIGS_PROPERTIES_TEXT_ERROR_IN_CONVERSION _ ("Error in conversion")
#define CIANO_CONFIGS_PROPERTIES_TEXT_CANCEL_IN_CONVERSION _ ("Conversion canceled")
#define CIANO_CONFIGS_CONSTANTS_WELCOME_VIEW "welcome-view"
#define CIANO_UTILS_STRING_UTIL_EMPTY ""
#define CIANO_CONFIGS_PROPERTIES_TEXT_PERCENTAGE _ ("percentage: ")
#define CIANO_CONFIGS_PROPERTIES_TEXT_SIZE_CUSTOM _ (" - size: ")
#define CIANO_CONFIGS_PROPERTIES_TEXT_TIME_CUSTOM _ (" - time: ")
#define CIANO_CONFIGS_PROPERTIES_TEXT_BITRATE_CUSTOM _ (" - bitrate: ")
#define CIANO_CONFIGS_PROPERTIES_MSG_ERROR_NO_SUCH_FILE_DIRECTORY _ ("Error: No such file or directory")
#define CIANO_CONFIGS_PROPERTIES_MSG_ERROR_INVALID_ARGUMENT _ ("Error: Invalid argument")
#define CIANO_CONFIGS_PROPERTIES_MSG_ERROR_CODECS _ ("Error: Experimental codecs are not enabled")
#define CIANO_CONFIGS_PROPERTIES_MSG_ERROR_INVALID_INPUT_DATA _ ("Error: Invalid data found when processing input")
#define CIANO_CONFIGS_CONSTANTS_TEXT_MP4 "MP4"
#define CIANO_CONFIGS_CONSTANTS_TEXT_3GP "3GP"
#define CIANO_CONFIGS_CONSTANTS_TEXT_MPG "MPG"
#define CIANO_CONFIGS_CONSTANTS_TEXT_AVI "AVI"
#define CIANO_CONFIGS_CONSTANTS_TEXT_WMV "WMV"
#define CIANO_CONFIGS_CONSTANTS_TEXT_FLV "FLV"
#define CIANO_CONFIGS_CONSTANTS_TEXT_SWF "SWF"
#define CIANO_CONFIGS_CONSTANTS_TEXT_MOV "MOV"
#define CIANO_CONFIGS_CONSTANTS_TEXT_MKV "MKV"
#define CIANO_CONFIGS_CONSTANTS_TEXT_VOB "VOB"
#define CIANO_CONFIGS_CONSTANTS_TEXT_OGV "OGV"
#define CIANO_CONFIGS_CONSTANTS_TEXT_WEBM "WEBM"
#define CIANO_CONFIGS_CONSTANTS_TEXT_MP3 "MP3"
#define CIANO_CONFIGS_CONSTANTS_TEXT_WMA "WMA"
#define CIANO_CONFIGS_CONSTANTS_TEXT_OGG "OGG"
#define CIANO_CONFIGS_CONSTANTS_TEXT_WAV "WAV"
#define CIANO_CONFIGS_CONSTANTS_TEXT_AAC "AAC"
#define CIANO_CONFIGS_CONSTANTS_TEXT_FLAC "FLAC"
#define CIANO_CONFIGS_CONSTANTS_TEXT_AIFF "AIFF"
#define CIANO_CONFIGS_CONSTANTS_TEXT_MMF "MMF"
#define CIANO_CONFIGS_CONSTANTS_TEXT_M4A "M4A"
#define CIANO_CONFIGS_CONSTANTS_TEXT_OPUS "OPUS"
#define CIANO_CONFIGS_CONSTANTS_TEXT_AT9 "AT9"
#define CIANO_CONFIGS_CONSTANTS_TEXT_JPG "JPG"
#define CIANO_CONFIGS_CONSTANTS_TEXT_BMP "BMP"
#define CIANO_CONFIGS_CONSTANTS_TEXT_PNG "PNG"
#define CIANO_CONFIGS_CONSTANTS_TEXT_TIF "TIF"
#define CIANO_CONFIGS_CONSTANTS_TEXT_ICO "ICO"
#define CIANO_CONFIGS_CONSTANTS_TEXT_GIF "GIF"
#define CIANO_CONFIGS_CONSTANTS_TEXT_TGA "TGA"
#define CIANO_CONFIGS_CONSTANTS_TEXT_WEBP "WEBP"
#define CIANO_CONFIGS_CONSTANTS_TEXT_AMR "AMR"
#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 CIANO_CONTROLLERS_TYPE_CONVERTER_CONTROLLER (ciano_controllers_converter_controller_get_type ())
#define CIANO_CONTROLLERS_CONVERTER_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CIANO_CONTROLLERS_TYPE_CONVERTER_CONTROLLER, CianoControllersConverterController))
#define CIANO_CONTROLLERS_CONVERTER_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CIANO_CONTROLLERS_TYPE_CONVERTER_CONTROLLER, CianoControllersConverterControllerClass))
#define CIANO_CONTROLLERS_IS_CONVERTER_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CIANO_CONTROLLERS_TYPE_CONVERTER_CONTROLLER))
#define CIANO_CONTROLLERS_IS_CONVERTER_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CIANO_CONTROLLERS_TYPE_CONVERTER_CONTROLLER))
#define CIANO_CONTROLLERS_CONVERTER_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CIANO_CONTROLLERS_TYPE_CONVERTER_CONTROLLER, CianoControllersConverterControllerClass))

typedef struct _CianoControllersConverterController CianoControllersConverterController;
typedef struct _CianoControllersConverterControllerClass CianoControllersConverterControllerClass;
typedef struct _CianoControllersConverterControllerPrivate CianoControllersConverterControllerPrivate;

#define CIANO_WIDGETS_TYPE_ROW_CONVERSION (ciano_widgets_row_conversion_get_type ())
#define CIANO_WIDGETS_ROW_CONVERSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CIANO_WIDGETS_TYPE_ROW_CONVERSION, CianoWidgetsRowConversion))
#define CIANO_WIDGETS_ROW_CONVERSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CIANO_WIDGETS_TYPE_ROW_CONVERSION, CianoWidgetsRowConversionClass))
#define CIANO_WIDGETS_IS_ROW_CONVERSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CIANO_WIDGETS_TYPE_ROW_CONVERSION))
#define CIANO_WIDGETS_IS_ROW_CONVERSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CIANO_WIDGETS_TYPE_ROW_CONVERSION))
#define CIANO_WIDGETS_ROW_CONVERSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CIANO_WIDGETS_TYPE_ROW_CONVERSION, CianoWidgetsRowConversionClass))

typedef struct _CianoWidgetsRowConversion CianoWidgetsRowConversion;
typedef struct _CianoWidgetsRowConversionClass CianoWidgetsRowConversionClass;

#define CIANO_OBJECTS_TYPE_ITEM_CONVERSION (ciano_objects_item_conversion_get_type ())
#define CIANO_OBJECTS_ITEM_CONVERSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CIANO_OBJECTS_TYPE_ITEM_CONVERSION, CianoObjectsItemConversion))
#define CIANO_OBJECTS_ITEM_CONVERSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CIANO_OBJECTS_TYPE_ITEM_CONVERSION, CianoObjectsItemConversionClass))
#define CIANO_OBJECTS_IS_ITEM_CONVERSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CIANO_OBJECTS_TYPE_ITEM_CONVERSION))
#define CIANO_OBJECTS_IS_ITEM_CONVERSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CIANO_OBJECTS_TYPE_ITEM_CONVERSION))
#define CIANO_OBJECTS_ITEM_CONVERSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CIANO_OBJECTS_TYPE_ITEM_CONVERSION, CianoObjectsItemConversionClass))

typedef struct _CianoObjectsItemConversion CianoObjectsItemConversion;
typedef struct _CianoObjectsItemConversionClass CianoObjectsItemConversionClass;

#define CIANO_SERVICES_TYPE_SETTINGS (ciano_services_settings_get_type ())
#define CIANO_SERVICES_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CIANO_SERVICES_TYPE_SETTINGS, CianoServicesSettings))
#define CIANO_SERVICES_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CIANO_SERVICES_TYPE_SETTINGS, CianoServicesSettingsClass))
#define CIANO_SERVICES_IS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CIANO_SERVICES_TYPE_SETTINGS))
#define CIANO_SERVICES_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CIANO_SERVICES_TYPE_SETTINGS))
#define CIANO_SERVICES_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CIANO_SERVICES_TYPE_SETTINGS, CianoServicesSettingsClass))

typedef struct _CianoServicesSettings CianoServicesSettings;
typedef struct _CianoServicesSettingsClass CianoServicesSettingsClass;

#define CIANO_VIEWS_TYPE_CONVERTER_VIEW (ciano_views_converter_view_get_type ())
#define CIANO_VIEWS_CONVERTER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CIANO_VIEWS_TYPE_CONVERTER_VIEW, CianoViewsConverterView))
#define CIANO_VIEWS_CONVERTER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CIANO_VIEWS_TYPE_CONVERTER_VIEW, CianoViewsConverterViewClass))
#define CIANO_VIEWS_IS_CONVERTER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CIANO_VIEWS_TYPE_CONVERTER_VIEW))
#define CIANO_VIEWS_IS_CONVERTER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CIANO_VIEWS_TYPE_CONVERTER_VIEW))
#define CIANO_VIEWS_CONVERTER_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CIANO_VIEWS_TYPE_CONVERTER_VIEW, CianoViewsConverterViewClass))

typedef struct _CianoViewsConverterView CianoViewsConverterView;
typedef struct _CianoViewsConverterViewClass CianoViewsConverterViewClass;

#define CIANO_WIDGETS_TYPE_DIALOG_PREFERENCES (ciano_widgets_dialog_preferences_get_type ())
#define CIANO_WIDGETS_DIALOG_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CIANO_WIDGETS_TYPE_DIALOG_PREFERENCES, CianoWidgetsDialogPreferences))
#define CIANO_WIDGETS_DIALOG_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CIANO_WIDGETS_TYPE_DIALOG_PREFERENCES, CianoWidgetsDialogPreferencesClass))
#define CIANO_WIDGETS_IS_DIALOG_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CIANO_WIDGETS_TYPE_DIALOG_PREFERENCES))
#define CIANO_WIDGETS_IS_DIALOG_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CIANO_WIDGETS_TYPE_DIALOG_PREFERENCES))
#define CIANO_WIDGETS_DIALOG_PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CIANO_WIDGETS_TYPE_DIALOG_PREFERENCES, CianoWidgetsDialogPreferencesClass))

typedef struct _CianoWidgetsDialogPreferences CianoWidgetsDialogPreferences;
typedef struct _CianoWidgetsDialogPreferencesClass CianoWidgetsDialogPreferencesClass;

#define CIANO_WIDGETS_TYPE_DIALOG_CONVERT_FILE (ciano_widgets_dialog_convert_file_get_type ())
#define CIANO_WIDGETS_DIALOG_CONVERT_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CIANO_WIDGETS_TYPE_DIALOG_CONVERT_FILE, CianoWidgetsDialogConvertFile))
#define CIANO_WIDGETS_DIALOG_CONVERT_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CIANO_WIDGETS_TYPE_DIALOG_CONVERT_FILE, CianoWidgetsDialogConvertFileClass))
#define CIANO_WIDGETS_IS_DIALOG_CONVERT_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CIANO_WIDGETS_TYPE_DIALOG_CONVERT_FILE))
#define CIANO_WIDGETS_IS_DIALOG_CONVERT_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CIANO_WIDGETS_TYPE_DIALOG_CONVERT_FILE))
#define CIANO_WIDGETS_DIALOG_CONVERT_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CIANO_WIDGETS_TYPE_DIALOG_CONVERT_FILE, CianoWidgetsDialogConvertFileClass))

typedef struct _CianoWidgetsDialogConvertFile CianoWidgetsDialogConvertFile;
typedef struct _CianoWidgetsDialogConvertFileClass CianoWidgetsDialogConvertFileClass;
typedef enum  {
	CIANO_ENUMS_TYPE_ITEM_ENUM_VIDEO,
	CIANO_ENUMS_TYPE_ITEM_ENUM_MUSIC,
	CIANO_ENUMS_TYPE_ITEM_ENUM_IMAGE
} CianoEnumsTypeItemEnum;

#define CIANO_ENUMS_TYPE_TYPE_ITEM_ENUM (ciano_enums_type_item_enum_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _Block1Data Block1Data;
#define _ciano_controllers_converter_controller_unref0(var) ((var == NULL) ? NULL : (var = (ciano_controllers_converter_controller_unref (var), NULL)))
typedef struct _CianoViewsConverterViewPrivate CianoViewsConverterViewPrivate;

#define CIANO_WIDGETS_TYPE_HEADER_BAR (ciano_widgets_header_bar_get_type ())
#define CIANO_WIDGETS_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CIANO_WIDGETS_TYPE_HEADER_BAR, CianoWidgetsHeaderBar))
#define CIANO_WIDGETS_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CIANO_WIDGETS_TYPE_HEADER_BAR, CianoWidgetsHeaderBarClass))
#define CIANO_WIDGETS_IS_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CIANO_WIDGETS_TYPE_HEADER_BAR))
#define CIANO_WIDGETS_IS_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CIANO_WIDGETS_TYPE_HEADER_BAR))
#define CIANO_WIDGETS_HEADER_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CIANO_WIDGETS_TYPE_HEADER_BAR, CianoWidgetsHeaderBarClass))

typedef struct _CianoWidgetsHeaderBar CianoWidgetsHeaderBar;
typedef struct _CianoWidgetsHeaderBarClass CianoWidgetsHeaderBarClass;

#define CIANO_WIDGETS_TYPE_SOURCE_LIST (ciano_widgets_source_list_get_type ())
#define CIANO_WIDGETS_SOURCE_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CIANO_WIDGETS_TYPE_SOURCE_LIST, CianoWidgetsSourceList))
#define CIANO_WIDGETS_SOURCE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CIANO_WIDGETS_TYPE_SOURCE_LIST, CianoWidgetsSourceListClass))
#define CIANO_WIDGETS_IS_SOURCE_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CIANO_WIDGETS_TYPE_SOURCE_LIST))
#define CIANO_WIDGETS_IS_SOURCE_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CIANO_WIDGETS_TYPE_SOURCE_LIST))
#define CIANO_WIDGETS_SOURCE_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CIANO_WIDGETS_TYPE_SOURCE_LIST, CianoWidgetsSourceListClass))

typedef struct _CianoWidgetsSourceList CianoWidgetsSourceList;
typedef struct _CianoWidgetsSourceListClass CianoWidgetsSourceListClass;

#define CIANO_WIDGETS_TYPE_SOURCE_LIST_SIDEBAR (ciano_widgets_source_list_sidebar_get_type ())
#define CIANO_WIDGETS_SOURCE_LIST_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CIANO_WIDGETS_TYPE_SOURCE_LIST_SIDEBAR, CianoWidgetsSourceListSidebar))
#define CIANO_WIDGETS_SOURCE_LIST_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CIANO_WIDGETS_TYPE_SOURCE_LIST_SIDEBAR, CianoWidgetsSourceListSidebarClass))
#define CIANO_WIDGETS_IS_SOURCE_LIST_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CIANO_WIDGETS_TYPE_SOURCE_LIST_SIDEBAR))
#define CIANO_WIDGETS_IS_SOURCE_LIST_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CIANO_WIDGETS_TYPE_SOURCE_LIST_SIDEBAR))
#define CIANO_WIDGETS_SOURCE_LIST_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CIANO_WIDGETS_TYPE_SOURCE_LIST_SIDEBAR, CianoWidgetsSourceListSidebarClass))

typedef struct _CianoWidgetsSourceListSidebar CianoWidgetsSourceListSidebar;
typedef struct _CianoWidgetsSourceListSidebarClass CianoWidgetsSourceListSidebarClass;

#define CIANO_WIDGETS_TYPE_LIST_CONVERSION (ciano_widgets_list_conversion_get_type ())
#define CIANO_WIDGETS_LIST_CONVERSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CIANO_WIDGETS_TYPE_LIST_CONVERSION, CianoWidgetsListConversion))
#define CIANO_WIDGETS_LIST_CONVERSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CIANO_WIDGETS_TYPE_LIST_CONVERSION, CianoWidgetsListConversionClass))
#define CIANO_WIDGETS_IS_LIST_CONVERSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CIANO_WIDGETS_TYPE_LIST_CONVERSION))
#define CIANO_WIDGETS_IS_LIST_CONVERSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CIANO_WIDGETS_TYPE_LIST_CONVERSION))
#define CIANO_WIDGETS_LIST_CONVERSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CIANO_WIDGETS_TYPE_LIST_CONVERSION, CianoWidgetsListConversionClass))

typedef struct _CianoWidgetsListConversion CianoWidgetsListConversion;
typedef struct _CianoWidgetsListConversionClass CianoWidgetsListConversionClass;
typedef struct _Block2Data Block2Data;

#define CIANO_WIDGETS_SOURCE_LIST_TYPE_ITEM (ciano_widgets_source_list_item_get_type ())
#define CIANO_WIDGETS_SOURCE_LIST_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CIANO_WIDGETS_SOURCE_LIST_TYPE_ITEM, CianoWidgetsSourceListItem))
#define CIANO_WIDGETS_SOURCE_LIST_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CIANO_WIDGETS_SOURCE_LIST_TYPE_ITEM, CianoWidgetsSourceListItemClass))
#define CIANO_WIDGETS_SOURCE_LIST_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CIANO_WIDGETS_SOURCE_LIST_TYPE_ITEM))
#define CIANO_WIDGETS_SOURCE_LIST_IS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CIANO_WIDGETS_SOURCE_LIST_TYPE_ITEM))
#define CIANO_WIDGETS_SOURCE_LIST_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CIANO_WIDGETS_SOURCE_LIST_TYPE_ITEM, CianoWidgetsSourceListItemClass))

typedef struct _CianoWidgetsSourceListItem CianoWidgetsSourceListItem;
typedef struct _CianoWidgetsSourceListItemClass CianoWidgetsSourceListItemClass;
#define __vala_GtkTreePath_free0(var) ((var == NULL) ? NULL : (var = (_vala_GtkTreePath_free (var), NULL)))
typedef struct _Block3Data Block3Data;
typedef struct _CianoWidgetsListConversionPrivate CianoWidgetsListConversionPrivate;
#define _ciano_objects_item_conversion_unref0(var) ((var == NULL) ? NULL : (var = (ciano_objects_item_conversion_unref (var), NULL)))
typedef struct _Block4Data Block4Data;
typedef struct _Block5Data Block5Data;
typedef struct _CianoWidgetsRowConversionPrivate CianoWidgetsRowConversionPrivate;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _CianoControllersConverterControllerConvertAsyncData CianoControllersConverterControllerConvertAsyncData;
typedef struct _Block6Data Block6Data;
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
typedef struct _CianoControllersParamSpecConverterController CianoControllersParamSpecConverterController;

struct _CianoControllersConverterController {
	GTypeInstance parent_instance;
	volatile int ref_count;
	CianoControllersConverterControllerPrivate * priv;
	GeeArrayList* convertions;
};

struct _CianoControllersConverterControllerClass {
	GTypeClass parent_class;
	void (*finalize) (CianoControllersConverterController *self);
};

struct _CianoControllersConverterControllerPrivate {
	GeeArrayList* list_items;
	GtkApplication* application;
	CianoServicesSettings* settings;
	CianoViewsConverterView* converter_view;
	CianoWidgetsDialogPreferences* dialog_preferences;
	CianoWidgetsDialogConvertFile* dialog_convert_file;
	CianoEnumsTypeItemEnum type_item;
	gchar* name_format_selected;
	gint id_item;
};

struct _Block1Data {
	int _ref_count_;
	CianoControllersConverterController* self;
	GtkApplicationWindow* window;
};

struct _CianoViewsConverterView {
	GtkGrid parent_instance;
	CianoViewsConverterViewPrivate * priv;
	CianoWidgetsHeaderBar* headerbar;
	CianoWidgetsSourceListSidebar* source_list;
	CianoWidgetsListConversion* list_conversion;
};

struct _CianoViewsConverterViewClass {
	GtkGridClass parent_class;
};

struct _Block2Data {
	int _ref_count_;
	CianoControllersConverterController* self;
	GtkApplicationWindow* window;
};

struct _Block3Data {
	int _ref_count_;
	CianoControllersConverterController* self;
	GtkListStore* list_store;
	gchar* name_format;
};

struct _CianoWidgetsListConversion {
	GtkGrid parent_instance;
	CianoWidgetsListConversionPrivate * priv;
	GtkStack* stack;
	GtkListBox* list_box;
	GraniteWidgetsWelcome* welcome;
	gint item_quantity;
};

struct _CianoWidgetsListConversionClass {
	GtkGridClass parent_class;
};

struct _Block4Data {
	int _ref_count_;
	CianoControllersConverterController* self;
	CianoObjectsItemConversion* item;
};

struct _Block5Data {
	int _ref_count_;
	Block4Data * _data4_;
	GSubprocess* subprocess;
	gint _error_;
	CianoWidgetsRowConversion* row;
};

struct _CianoWidgetsRowConversion {
	GtkListBoxRow parent_instance;
	CianoWidgetsRowConversionPrivate * priv;
	gint row_id;
	GtkProgressBar* progress_bar;
	GtkLabel* name_video;
	GtkLabel* value_progress;
	GtkLabel* status;
	GtkButton* button_cancel;
	GtkButton* button_remove;
	GtkLabel* convert_to;
};

struct _CianoWidgetsRowConversionClass {
	GtkListBoxRowClass parent_class;
};

struct _CianoControllersConverterControllerConvertAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	CianoControllersConverterController* self;
	GInputStream* input_stream;
	CianoWidgetsRowConversion* row;
	CianoObjectsItemConversion* item;
	gint _error_;
	GCharsetConverter* charset_converter;
	GCharsetConverter* _tmp0_;
	GConverterInputStream* costream;
	GCharsetConverter* _tmp1_;
	GConverterInputStream* _tmp2_;
	GDataInputStream* data_input_stream;
	GConverterInputStream* _tmp3_;
	GDataInputStream* _tmp4_;
	GDataInputStream* _tmp5_;
	gint total;
	gchar* str_return;
	GDataInputStream* _tmp6_;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	CianoEnumsTypeItemEnum _tmp9_;
	CianoEnumsTypeItemEnum _tmp10_;
	const gchar* _tmp11_;
	CianoServicesSettings* _tmp12_;
	gboolean _tmp13_;
	gboolean _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	gint _tmp17_;
	GError* e;
	GError* _tmp18_;
	const gchar* _tmp19_;
	GError* _inner_error0_;
};

struct _Block6Data {
	int _ref_count_;
	CianoControllersConverterController* self;
	CianoWidgetsRowConversion* row;
	GSubprocess* subprocess;
	gboolean btn_cancel;
};

struct _CianoControllersParamSpecConverterController {
	GParamSpec parent_instance;
};

static gint CianoControllersConverterController_private_offset;
static gpointer ciano_controllers_converter_controller_parent_class = NULL;

VALA_EXTERN gpointer ciano_controllers_converter_controller_ref (gpointer instance);
VALA_EXTERN void ciano_controllers_converter_controller_unref (gpointer instance);
VALA_EXTERN GParamSpec* ciano_controllers_param_spec_converter_controller (const gchar* name,
                                                               const gchar* nick,
                                                               const gchar* blurb,
                                                               GType object_type,
                                                               GParamFlags flags);
VALA_EXTERN void ciano_controllers_value_set_converter_controller (GValue* value,
                                                       gpointer v_object);
VALA_EXTERN void ciano_controllers_value_take_converter_controller (GValue* value,
                                                        gpointer v_object);
VALA_EXTERN gpointer ciano_controllers_value_get_converter_controller (const GValue* value);
VALA_EXTERN GType ciano_controllers_converter_controller_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CianoControllersConverterController, ciano_controllers_converter_controller_unref)
VALA_EXTERN GType ciano_widgets_row_conversion_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CianoWidgetsRowConversion, g_object_unref)
VALA_EXTERN gpointer ciano_objects_item_conversion_ref (gpointer instance);
VALA_EXTERN void ciano_objects_item_conversion_unref (gpointer instance);
VALA_EXTERN GParamSpec* ciano_objects_param_spec_item_conversion (const gchar* name,
                                                      const gchar* nick,
                                                      const gchar* blurb,
                                                      GType object_type,
                                                      GParamFlags flags);
VALA_EXTERN void ciano_objects_value_set_item_conversion (GValue* value,
                                              gpointer v_object);
VALA_EXTERN void ciano_objects_value_take_item_conversion (GValue* value,
                                               gpointer v_object);
VALA_EXTERN gpointer ciano_objects_value_get_item_conversion (const GValue* value);
VALA_EXTERN GType ciano_objects_item_conversion_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CianoObjectsItemConversion, ciano_objects_item_conversion_unref)
VALA_EXTERN GType ciano_services_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CianoServicesSettings, g_object_unref)
VALA_EXTERN GType ciano_views_converter_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CianoViewsConverterView, g_object_unref)
VALA_EXTERN GType ciano_widgets_dialog_preferences_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CianoWidgetsDialogPreferences, g_object_unref)
VALA_EXTERN GType ciano_widgets_dialog_convert_file_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CianoWidgetsDialogConvertFile, g_object_unref)
VALA_EXTERN GType ciano_enums_type_item_enum_get_type (void) G_GNUC_CONST ;
VALA_EXTERN CianoControllersConverterController* ciano_controllers_converter_controller_new (GtkApplicationWindow* window,
                                                                                 GtkApplication* application,
                                                                                 CianoViewsConverterView* converter_view);
VALA_EXTERN CianoControllersConverterController* ciano_controllers_converter_controller_construct (GType object_type,
                                                                                       GtkApplicationWindow* window,
                                                                                       GtkApplication* application,
                                                                                       CianoViewsConverterView* converter_view);
VALA_EXTERN CianoServicesSettings* ciano_services_settings_get_instance (void);
static void ciano_controllers_converter_controller_on_activate_button_preferences (CianoControllersConverterController* self,
                                                                            GtkApplicationWindow* window);
static void ciano_controllers_converter_controller_on_activate_button_item (CianoControllersConverterController* self,
                                                                     GtkApplicationWindow* window);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
VALA_EXTERN GType ciano_widgets_header_bar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CianoWidgetsHeaderBar, g_object_unref)
VALA_EXTERN GType ciano_widgets_source_list_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CianoWidgetsSourceList, g_object_unref)
VALA_EXTERN GType ciano_widgets_source_list_sidebar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CianoWidgetsSourceListSidebar, g_object_unref)
VALA_EXTERN GType ciano_widgets_list_conversion_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CianoWidgetsListConversion, g_object_unref)
static void __lambda20_ (Block1Data* _data1_);
VALA_EXTERN CianoWidgetsDialogPreferences* ciano_widgets_dialog_preferences_new (GtkWindow* parent);
VALA_EXTERN CianoWidgetsDialogPreferences* ciano_widgets_dialog_preferences_construct (GType object_type,
                                                                           GtkWindow* parent);
static void ___lambda20__ciano_widgets_header_bar_item_selected (CianoWidgetsHeaderBar* _sender,
                                                          gpointer self);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
VALA_EXTERN GType ciano_widgets_source_list_item_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (CianoWidgetsSourceListItem, g_object_unref)
static void __lambda21_ (Block2Data* _data2_,
                  CianoWidgetsSourceListItem* item);
VALA_EXTERN const gchar* ciano_widgets_source_list_item_get_name (CianoWidgetsSourceListItem* self);
static gchar** ciano_controllers_converter_controller_mount_array_with_supported_formats (CianoControllersConverterController* self,
                                                                                   const gchar* name_format,
                                                                                   gint* result_length1);
VALA_EXTERN CianoWidgetsDialogConvertFile* ciano_widgets_dialog_convert_file_new (CianoControllersConverterController* converter_controller,
                                                                      gchar** formats,
                                                                      gint formats_length1,
                                                                      const gchar* name_format,
                                                                      GtkWindow* parent);
VALA_EXTERN CianoWidgetsDialogConvertFile* ciano_widgets_dialog_convert_file_construct (GType object_type,
                                                                            CianoControllersConverterController* converter_controller,
                                                                            gchar** formats,
                                                                            gint formats_length1,
                                                                            const gchar* name_format,
                                                                            GtkWindow* parent);
static void ___lambda21__ciano_widgets_source_list_item_selected (CianoWidgetsSourceList* _sender,
                                                           CianoWidgetsSourceListItem* item,
                                                           gpointer self);
VALA_EXTERN void ciano_controllers_converter_controller_on_activate_button_add_file (CianoControllersConverterController* self,
                                                                         GtkDialog* parent_dialog,
                                                                         GtkTreeView* tree_view,
                                                                         GtkTreeIter* iter,
                                                                         GtkListStore* list_store,
                                                                         gchar** formats,
                                                                         gint formats_length1);
static void _g_free0_ (gpointer var);
static inline void _g_slist_free__g_free0_ (GSList* self);
VALA_EXTERN void ciano_controllers_converter_controller_on_activate_button_remove (CianoControllersConverterController* self,
                                                                       GtkDialog* parent_dialog,
                                                                       GtkTreeView* tree_view,
                                                                       GtkListStore* list_store,
                                                                       GtkToolButton* button_remove);
static void _vala_GtkTreePath_free (GtkTreePath* self);
VALA_EXTERN void ciano_controllers_converter_controller_on_activate_button_start_conversion (CianoControllersConverterController* self,
                                                                                 GtkListStore* list_store,
                                                                                 const gchar* name_format);
static Block3Data* block3_data_ref (Block3Data* _data3_);
static void block3_data_unref (void * _userdata_);
static gboolean __lambda16_ (Block3Data* _data3_,
                      GtkTreeModel* model,
                      GtkTreePath* path,
                      GtkTreeIter* iter);
VALA_EXTERN CianoObjectsItemConversion* ciano_objects_item_conversion_new (gint id,
                                                               const gchar* name,
                                                               const gchar* directory,
                                                               const gchar* convert_to,
                                                               gdouble* progress,
                                                               CianoEnumsTypeItemEnum type_item);
VALA_EXTERN CianoObjectsItemConversion* ciano_objects_item_conversion_construct (GType object_type,
                                                                     gint id,
                                                                     const gchar* name,
                                                                     const gchar* directory,
                                                                     const gchar* convert_to,
                                                                     gdouble* progress,
                                                                     CianoEnumsTypeItemEnum type_item);
static void ciano_controllers_converter_controller_start_conversion_process (CianoControllersConverterController* self,
                                                                      CianoObjectsItemConversion* item,
                                                                      const gchar* name_format);
static gboolean ___lambda16__gtk_tree_model_foreach_func (GtkTreeModel* model,
                                                   GtkTreePath* path,
                                                   GtkTreeIter* iter,
                                                   gpointer self);
static Block4Data* block4_data_ref (Block4Data* _data4_);
static void block4_data_unref (void * _userdata_);
static Block5Data* block5_data_ref (Block5Data* _data5_);
static void block5_data_unref (void * _userdata_);
VALA_EXTERN gboolean ciano_services_settings_get_output_source_file_folder (CianoServicesSettings* self);
VALA_EXTERN const gchar* ciano_services_settings_get_output_folder (CianoServicesSettings* self);
VALA_EXTERN const gchar* ciano_objects_item_conversion_get_directory (CianoObjectsItemConversion* self);
VALA_EXTERN const gchar* ciano_objects_item_conversion_get_name (CianoObjectsItemConversion* self);
VALA_EXTERN gchar** ciano_controllers_converter_controller_get_command (CianoControllersConverterController* self,
                                                            const gchar* uri,
                                                            gint* result_length1);
static gchar* ciano_controllers_converter_controller_get_type_icon (CianoControllersConverterController* self,
                                                             CianoObjectsItemConversion* item);
static CianoWidgetsRowConversion* ciano_controllers_converter_controller_create_row_conversion (CianoControllersConverterController* self,
                                                                                         const gchar* icon,
                                                                                         const gchar* item_name,
                                                                                         const gchar* name_format,
                                                                                         GSubprocess* subprocess,
                                                                                         gboolean btn_cancel);
VALA_EXTERN void ciano_controllers_converter_controller_convert_async (CianoControllersConverterController* self,
                                                           GInputStream* input_stream,
                                                           CianoWidgetsRowConversion* row,
                                                           CianoObjectsItemConversion* item,
                                                           gint _error_,
                                                           GAsyncReadyCallback _callback_,
                                                           gpointer _user_data_);
VALA_EXTERN void ciano_controllers_converter_controller_convert_finish (CianoControllersConverterController* self,
                                                            GAsyncResult* _res_);
static void ___lambda19_ (Block5Data* _data5_,
                   GObject* obj,
                   GAsyncResult* async_res);
VALA_EXTERN void ciano_utils_widget_util_set_visible (GtkWidget* widget,
                                          gboolean visible);
static void ciano_controllers_converter_controller_validate_process_completed (CianoControllersConverterController* self,
                                                                        GSubprocess* subprocess,
                                                                        CianoWidgetsRowConversion* row,
                                                                        CianoObjectsItemConversion* item,
                                                                        gint _error_,
                                                                        GError** error);
static void ciano_controllers_converter_controller_validate_error_in_process (CianoControllersConverterController* self,
                                                                       GSubprocess* subprocess,
                                                                       CianoWidgetsRowConversion* row,
                                                                       CianoObjectsItemConversion* item,
                                                                       gint _error_);
static void ____lambda19__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
VALA_EXTERN gboolean ciano_services_settings_get_complete_notify (CianoServicesSettings* self);
static void ciano_controllers_converter_controller_send_notification (CianoControllersConverterController* self,
                                                               const gchar* file_name,
                                                               const gchar* body_text);
static void ciano_controllers_converter_controller_convert_async_data_free (gpointer _data);
static gboolean ciano_controllers_converter_controller_convert_async_co (CianoControllersConverterControllerConvertAsyncData* _data_);
static void ciano_controllers_converter_controller_convert_async_ready (GObject* source_object,
                                                                 GAsyncResult* _res_,
                                                                 gpointer _user_data_);
VALA_EXTERN CianoEnumsTypeItemEnum ciano_objects_item_conversion_get_type_item (CianoObjectsItemConversion* self);
static void ciano_controllers_converter_controller_process_line (CianoControllersConverterController* self,
                                                          const gchar* str_return,
                                                          CianoWidgetsRowConversion* row,
                                                          gint* total,
                                                          gint _error_);
VALA_EXTERN gboolean ciano_services_settings_get_error_notify (CianoServicesSettings* self);
static Block6Data* block6_data_ref (Block6Data* _data6_);
static void block6_data_unref (void * _userdata_);
VALA_EXTERN CianoWidgetsRowConversion* ciano_widgets_row_conversion_new (const gchar* icon,
                                                             const gchar* name,
                                                             gdouble progress,
                                                             const gchar* name_format);
VALA_EXTERN CianoWidgetsRowConversion* ciano_widgets_row_conversion_construct (GType object_type,
                                                                   const gchar* icon,
                                                                   const gchar* name,
                                                                   gdouble progress,
                                                                   const gchar* name_format);
static void __lambda17_ (Block6Data* _data6_);
static void ___lambda17__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda18_ (Block6Data* _data6_);
static void ___lambda18__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
VALA_EXTERN gint ciano_utils_time_util_duration_in_seconds (const gchar* duration);
static gchar* ciano_controllers_converter_controller_get_uri_new_file (CianoControllersConverterController* self,
                                                                const gchar* uri);
static gchar** _vala_array_dup1 (gchar** self,
                          gssize length);
static GPtrArray* ciano_controllers_converter_controller_get_array_formats_videos (CianoControllersConverterController* self,
                                                                            const gchar* format_video);
VALA_EXTERN GPtrArray* ciano_utils_array_util_join_generic_string_arrays (GPtrArray* array1,
                                                              GPtrArray* array2);
static GPtrArray* ciano_controllers_converter_controller_get_array_formats_music (CianoControllersConverterController* self,
                                                                           const gchar* format_music);
static GPtrArray* ciano_controllers_converter_controller_get_array_formats_image (CianoControllersConverterController* self,
                                                                           const gchar* format_image);
static gchar** _vala_array_dup2 (gchar** self,
                          gssize length);
static void ciano_controllers_converter_controller_finalize (CianoControllersConverterController * obj);
static GType ciano_controllers_converter_controller_get_type_once (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 inline gpointer
ciano_controllers_converter_controller_get_instance_private (CianoControllersConverterController* self)
{
	return G_STRUCT_MEMBER_P (self, CianoControllersConverterController_private_offset);
}

/**
         * Constructs a new object {@code ConverterView} responsible for:
         * 1 - Initialize values that are handled by the class.
         * 2 - Get an instance of the {@code Settings} class.
         * 3 - Start the Items array for conversion and the item counter.
         * 4 - Load the methods that are responsible for the action of the dialogs. 
         *
         * @see Ciano.Views.ConverterView
         * @see Ciano.Config.Settings
         * @see Ciano.Objects.ItemConversion
         * @see on_activate_button_preferences
         * @see on_activate_button_item
         * @param {@code Gtk.ApplicationWindow} window
         * @param {@code Gtk.Application}       application
         * @param {@code ConverterView}         converter_view
         */
static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

CianoControllersConverterController*
ciano_controllers_converter_controller_construct (GType object_type,
                                                  GtkApplicationWindow* window,
                                                  GtkApplication* application,
                                                  CianoViewsConverterView* converter_view)
{
	CianoControllersConverterController* self = NULL;
	CianoViewsConverterView* _tmp0_;
	GtkApplication* _tmp1_;
	CianoServicesSettings* _tmp2_;
	CianoServicesSettings* _tmp3_;
	GeeArrayList* _tmp4_;
	g_return_val_if_fail (window != NULL, NULL);
	g_return_val_if_fail (application != NULL, NULL);
	g_return_val_if_fail (converter_view != NULL, NULL);
	self = (CianoControllersConverterController*) g_type_create_instance (object_type);
	_tmp0_ = _g_object_ref0 (converter_view);
	_g_object_unref0 (self->priv->converter_view);
	self->priv->converter_view = _tmp0_;
	_tmp1_ = _g_object_ref0 (application);
	_g_object_unref0 (self->priv->application);
	self->priv->application = _tmp1_;
	_tmp2_ = ciano_services_settings_get_instance ();
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->priv->settings);
	self->priv->settings = _tmp3_;
	_tmp4_ = gee_array_list_new (CIANO_OBJECTS_TYPE_ITEM_CONVERSION, (GBoxedCopyFunc) ciano_objects_item_conversion_ref, (GDestroyNotify) ciano_objects_item_conversion_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->list_items);
	self->priv->list_items = _tmp4_;
	self->priv->id_item = 1;
	ciano_controllers_converter_controller_on_activate_button_preferences (self, window);
	ciano_controllers_converter_controller_on_activate_button_item (self, window);
	return self;
}

CianoControllersConverterController*
ciano_controllers_converter_controller_new (GtkApplicationWindow* window,
                                            GtkApplication* application,
                                            CianoViewsConverterView* converter_view)
{
	return ciano_controllers_converter_controller_construct (CIANO_CONTROLLERS_TYPE_CONVERTER_CONTROLLER, window, application, converter_view);
}

/**
         * When select the preferences option in the settings icon located in the headerbar, 
         * this method will call the "DialogPreferences".
         *
         * @see Ciano.Widgets.DialogPreferences
         * @param  {@code Gtk.ApplicationWindow} window
         * @return {@code void}
         */
static Block1Data*
block1_data_ref (Block1Data* _data1_)
{
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}

static void
block1_data_unref (void * _userdata_)
{
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		CianoControllersConverterController* self;
		self = _data1_->self;
		_g_object_unref0 (_data1_->window);
		_ciano_controllers_converter_controller_unref0 (self);
		g_slice_free (Block1Data, _data1_);
	}
}

static void
__lambda20_ (Block1Data* _data1_)
{
	CianoControllersConverterController* self;
	CianoWidgetsDialogPreferences* _tmp0_;
	CianoWidgetsDialogPreferences* _tmp1_;
	self = _data1_->self;
	_tmp0_ = ciano_widgets_dialog_preferences_new ((GtkWindow*) _data1_->window);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->dialog_preferences);
	self->priv->dialog_preferences = _tmp0_;
	_tmp1_ = self->priv->dialog_preferences;
	gtk_widget_show_all ((GtkWidget*) _tmp1_);
}

static void
___lambda20__ciano_widgets_header_bar_item_selected (CianoWidgetsHeaderBar* _sender,
                                                     gpointer self)
{
	__lambda20_ (self);
}

static void
ciano_controllers_converter_controller_on_activate_button_preferences (CianoControllersConverterController* self,
                                                                       GtkApplicationWindow* window)
{
	Block1Data* _data1_;
	GtkApplicationWindow* _tmp0_;
	CianoViewsConverterView* _tmp1_;
	CianoWidgetsHeaderBar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (window != NULL);
	_data1_ = g_slice_new0 (Block1Data);
	_data1_->_ref_count_ = 1;
	_data1_->self = ciano_controllers_converter_controller_ref (self);
	_tmp0_ = _g_object_ref0 (window);
	_g_object_unref0 (_data1_->window);
	_data1_->window = _tmp0_;
	_tmp1_ = self->priv->converter_view;
	_tmp2_ = _tmp1_->headerbar;
	g_signal_connect_data (_tmp2_, "item-selected", (GCallback) ___lambda20__ciano_widgets_header_bar_item_selected, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
	block1_data_unref (_data1_);
	_data1_ = NULL;
}

/**
         * When selecting which type to convert:
         * 1 - Stores the name of the selected type.
         * 2 - Call the {@code mount_array_with_supported_formats} method to define the types of formats that will be
         *     possible to add in the {@code Gtk.TreeView} of {@code DialogConvertFile} for conversion.
         * 3 - Build the {@code DialogConvertFile}.
         *
         * @see Ciano.Widgets.DialogConvertFile
         * @see mount_array_with_supported_formats
         * @param  {@code Gtk.ApplicationWindow} window
         * @return {@code void}
         */
static Block2Data*
block2_data_ref (Block2Data* _data2_)
{
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}

static void
block2_data_unref (void * _userdata_)
{
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		CianoControllersConverterController* self;
		self = _data2_->self;
		_g_object_unref0 (_data2_->window);
		_ciano_controllers_converter_controller_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}

static void
__lambda21_ (Block2Data* _data2_,
             CianoWidgetsSourceListItem* item)
{
	CianoControllersConverterController* self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** types = NULL;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gint _tmp5_ = 0;
	gchar** _tmp6_;
	gint types_length1;
	gint _types_size_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	CianoWidgetsDialogConvertFile* _tmp9_;
	CianoWidgetsDialogConvertFile* _tmp10_;
	self = _data2_->self;
	_tmp0_ = ciano_widgets_source_list_item_get_name (item);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (self->priv->name_format_selected);
	self->priv->name_format_selected = _tmp2_;
	_tmp3_ = ciano_widgets_source_list_item_get_name (item);
	_tmp4_ = _tmp3_;
	_tmp6_ = ciano_controllers_converter_controller_mount_array_with_supported_formats (self, _tmp4_, &_tmp5_);
	types = _tmp6_;
	types_length1 = _tmp5_;
	_types_size_ = types_length1;
	_tmp7_ = ciano_widgets_source_list_item_get_name (item);
	_tmp8_ = _tmp7_;
	_tmp9_ = ciano_widgets_dialog_convert_file_new (self, types, types_length1, _tmp8_, (GtkWindow*) _data2_->window);
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->priv->dialog_convert_file);
	self->priv->dialog_convert_file = _tmp9_;
	_tmp10_ = self->priv->dialog_convert_file;
	gtk_widget_show_all ((GtkWidget*) _tmp10_);
	types = (_vala_array_free (types, types_length1, (GDestroyNotify) g_free), NULL);
}

static void
___lambda21__ciano_widgets_source_list_item_selected (CianoWidgetsSourceList* _sender,
                                                      CianoWidgetsSourceListItem* item,
                                                      gpointer self)
{
	__lambda21_ (self, item);
}

static void
ciano_controllers_converter_controller_on_activate_button_item (CianoControllersConverterController* self,
                                                                GtkApplicationWindow* window)
{
	Block2Data* _data2_;
	GtkApplicationWindow* _tmp0_;
	CianoViewsConverterView* _tmp1_;
	CianoWidgetsSourceListSidebar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (window != NULL);
	_data2_ = g_slice_new0 (Block2Data);
	_data2_->_ref_count_ = 1;
	_data2_->self = ciano_controllers_converter_controller_ref (self);
	_tmp0_ = _g_object_ref0 (window);
	_g_object_unref0 (_data2_->window);
	_data2_->window = _tmp0_;
	_tmp1_ = self->priv->converter_view;
	_tmp2_ = _tmp1_->source_list;
	g_signal_connect_data ((CianoWidgetsSourceList*) _tmp2_, "item-selected", (GCallback) ___lambda21__ciano_widgets_source_list_item_selected, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
	block2_data_unref (_data2_);
	_data2_ = NULL;
}

/**
         * Method responsible for adding one or more files to {@code Gtk.TreeView} from {@code DialogConvertFile}.
         *
         * @see Ciano.Widgets.DialogConvertFile
         * @see Ciano.Configs.Properties
         * @param  {@code Gtk.Dialog}    parent_dialog
         * @param  {@code Gtk.TreeView}  tree_view
         * @param  {@code Gtk.TreeIter}  iter
         * @param  {@code Gtk.ListStore} list_store
         * @param  {@code string []}     formats
         * @return {@code void}
         */
static gint
string_last_index_of (const gchar* self,
                      const gchar* needle,
                      gint start_index)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (needle != NULL, -1);
	_tmp0_ = g_strrstr (((gchar*) self) + start_index, (gchar*) needle);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static inline void
_g_slist_free__g_free0_ (GSList* self)
{
	g_slist_free_full (self, (GDestroyNotify) _g_free0_);
}

void
ciano_controllers_converter_controller_on_activate_button_add_file (CianoControllersConverterController* self,
                                                                    GtkDialog* parent_dialog,
                                                                    GtkTreeView* tree_view,
                                                                    GtkTreeIter* iter,
                                                                    GtkListStore* list_store,
                                                                    gchar** formats,
                                                                    gint formats_length1)
{
	GtkFileChooserDialog* chooser_file = NULL;
	GtkFileChooserDialog* _tmp0_;
	GtkFileChooserDialog* _tmp1_;
	GtkFileFilter* filter = NULL;
	GtkFileFilter* _tmp2_;
	GtkFileChooserDialog* _tmp10_;
	GtkFileFilter* _tmp11_;
	GtkFileChooserDialog* _tmp12_;
	GtkFileChooserDialog* _tmp13_;
	GtkFileChooserDialog* _tmp29_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (parent_dialog != NULL);
	g_return_if_fail (tree_view != NULL);
	g_return_if_fail (iter != NULL);
	g_return_if_fail (list_store != NULL);
	_tmp0_ = (GtkFileChooserDialog*) gtk_file_chooser_dialog_new (CIANO_CONFIGS_PROPERTIES_TEXT_SELECT_FILE, (GtkWindow*) parent_dialog, GTK_FILE_CHOOSER_ACTION_OPEN, NULL);
	g_object_ref_sink (_tmp0_);
	chooser_file = _tmp0_;
	_tmp1_ = chooser_file;
	gtk_file_chooser_set_select_multiple ((GtkFileChooser*) _tmp1_, TRUE);
	_tmp2_ = gtk_file_filter_new ();
	g_object_ref_sink (_tmp2_);
	filter = _tmp2_;
	{
		gchar** format_collection = NULL;
		gint format_collection_length1 = 0;
		gint _format_collection_size_ = 0;
		gint format_it = 0;
		format_collection = formats;
		format_collection_length1 = formats_length1;
		for (format_it = 0; format_it < format_collection_length1; format_it = format_it + 1) {
			gchar* _tmp3_;
			gchar* format = NULL;
			_tmp3_ = g_strdup (format_collection[format_it]);
			format = _tmp3_;
			{
				GtkFileFilter* _tmp4_;
				const gchar* _tmp5_;
				gchar* _tmp6_;
				gchar* _tmp7_;
				gchar* _tmp8_;
				gchar* _tmp9_;
				_tmp4_ = filter;
				_tmp5_ = format;
				_tmp6_ = g_utf8_strdown (_tmp5_, (gssize) -1);
				_tmp7_ = _tmp6_;
				_tmp8_ = g_strconcat ("*.", _tmp7_, NULL);
				_tmp9_ = _tmp8_;
				gtk_file_filter_add_pattern (_tmp4_, _tmp9_);
				_g_free0 (_tmp9_);
				_g_free0 (_tmp7_);
				_g_free0 (format);
			}
		}
	}
	_tmp10_ = chooser_file;
	_tmp11_ = filter;
	gtk_file_chooser_set_filter ((GtkFileChooser*) _tmp10_, _tmp11_);
	_tmp12_ = chooser_file;
	gtk_dialog_add_buttons ((GtkDialog*) _tmp12_, CIANO_CONFIGS_PROPERTIES_TEXT_CANCEL, GTK_RESPONSE_CANCEL, CIANO_CONFIGS_PROPERTIES_TEXT_ADD, GTK_RESPONSE_OK, NULL);
	_tmp13_ = chooser_file;
	if (gtk_dialog_run ((GtkDialog*) _tmp13_) == ((gint) GTK_RESPONSE_OK)) {
		GSList* uris = NULL;
		GtkFileChooserDialog* _tmp14_;
		GSList* _tmp15_;
		GSList* _tmp16_;
		_tmp14_ = chooser_file;
		_tmp15_ = gtk_file_chooser_get_filenames ((GtkFileChooser*) _tmp14_);
		uris = _tmp15_;
		_tmp16_ = uris;
		{
			GSList* uri_collection = NULL;
			GSList* uri_it = NULL;
			uri_collection = _tmp16_;
			for (uri_it = uri_collection; uri_it != NULL; uri_it = uri_it->next) {
				const gchar* uri = NULL;
				uri = (const gchar*) uri_it->data;
				{
					gint index = 0;
					const gchar* _tmp17_;
					gchar* name = NULL;
					const gchar* _tmp18_;
					gchar* _tmp19_;
					gchar* directory = NULL;
					const gchar* _tmp20_;
					gchar* _tmp21_;
					gchar* _tmp22_;
					gchar* _tmp23_;
					gchar* _tmp24_;
					GtkTreeIter _tmp25_ = {0};
					GtkTreeIter _tmp26_;
					const gchar* _tmp27_;
					const gchar* _tmp28_;
					_tmp17_ = uri;
					index = string_last_index_of (_tmp17_, "/", 0);
					_tmp18_ = uri;
					_tmp19_ = g_path_get_basename (_tmp18_);
					name = _tmp19_;
					_tmp20_ = uri;
					_tmp21_ = g_path_get_dirname (_tmp20_);
					_tmp22_ = _tmp21_;
					_tmp23_ = g_strconcat (_tmp22_, "/", NULL);
					_tmp24_ = _tmp23_;
					_g_free0 (_tmp22_);
					directory = _tmp24_;
					gtk_list_store_append (list_store, &_tmp25_);
					*iter = _tmp25_;
					_tmp26_ = *iter;
					_tmp27_ = name;
					_tmp28_ = directory;
					gtk_list_store_set (list_store, &_tmp26_, 0, _tmp27_, 1, _tmp28_, -1);
					gtk_tree_view_expand_all (tree_view);
					_g_free0 (directory);
					_g_free0 (name);
				}
			}
		}
		(uris == NULL) ? NULL : (uris = (_g_slist_free__g_free0_ (uris), NULL));
	}
	_tmp29_ = chooser_file;
	gtk_widget_hide ((GtkWidget*) _tmp29_);
	_g_object_unref0 (filter);
	_g_object_unref0 (chooser_file);
}

/**
         * Removeable add-on method added in {@code Gtk.TreeView} {@code DialogConvertFile}
         * 
         * @param  {@code Gtk.Dialog}     parent_dialog
         * @param  {@code Gtk.TreeView}   tree_view
         * @param  {@code Gtk.ListStore}  list_store
         * @param  {@code Gtk.ToolButton} button_remove
         * @return {@code void}
         */
static void
_vala_GtkTreePath_free (GtkTreePath* self)
{
	g_boxed_free (gtk_tree_path_get_type (), self);
}

void
ciano_controllers_converter_controller_on_activate_button_remove (CianoControllersConverterController* self,
                                                                  GtkDialog* parent_dialog,
                                                                  GtkTreeView* tree_view,
                                                                  GtkListStore* list_store,
                                                                  GtkToolButton* button_remove)
{
	GtkTreePath* path = NULL;
	GtkTreeViewColumn* column = NULL;
	GtkTreePath* _tmp0_ = NULL;
	GtkTreeViewColumn* _tmp1_ = NULL;
	GtkTreeViewColumn* _tmp2_;
	GtkTreePath* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (parent_dialog != NULL);
	g_return_if_fail (tree_view != NULL);
	g_return_if_fail (list_store != NULL);
	g_return_if_fail (button_remove != NULL);
	gtk_tree_view_get_cursor (tree_view, &_tmp0_, &_tmp1_);
	__vala_GtkTreePath_free0 (path);
	path = _tmp0_;
	_g_object_unref0 (column);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	column = _tmp2_;
	_tmp3_ = path;
	if (_tmp3_ != NULL) {
		GtkTreeIter iter = {0};
		GtkTreePath* _tmp4_;
		GtkTreeIter _tmp5_ = {0};
		GtkTreePath* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		gboolean _tmp9_;
		_tmp4_ = path;
		gtk_tree_model_get_iter ((GtkTreeModel*) list_store, &_tmp5_, _tmp4_);
		iter = _tmp5_;
		gtk_list_store_remove (list_store, &iter);
		_tmp6_ = path;
		_tmp7_ = gtk_tree_path_to_string (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp9_ = g_strcmp0 (_tmp8_, "0") == 0;
		_g_free0 (_tmp8_);
		if (_tmp9_) {
			gtk_widget_set_sensitive ((GtkWidget*) button_remove, FALSE);
		}
	}
	_g_object_unref0 (column);
	__vala_GtkTreePath_free0 (path);
}

/**
         * Method responsible for initiating action when user clicks "start conversion" 
         * button on {@code Gtk.TreeView} from {@code DialogConvertFile}.
         * 
         * In each foreach item {@code load_list_for_conversion} will perform the following action:
         * 1 - Get the name and directory of the file.
         * 2 - Creates an {@code ItemConversion} to store the status of each item.
         * 3 - Adds {@code ItemConversion} to {@code list list_items}.
         * 4 - {@code start_conversion_process} method responsible for starting the item conversion..
         * 
         * @see Ciano.Configs.Constants
         * @see Ciano.Objects.ItemConvertion
         * @see start_conversion_process
         * @param  {@code Gtk.ListStore} list_store
         * @param  {@code string}        name_format
         * @return {@code void}
         */
static Block3Data*
block3_data_ref (Block3Data* _data3_)
{
	g_atomic_int_inc (&_data3_->_ref_count_);
	return _data3_;
}

static void
block3_data_unref (void * _userdata_)
{
	Block3Data* _data3_;
	_data3_ = (Block3Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) {
		CianoControllersConverterController* self;
		self = _data3_->self;
		_g_object_unref0 (_data3_->list_store);
		_g_free0 (_data3_->name_format);
		_ciano_controllers_converter_controller_unref0 (self);
		g_slice_free (Block3Data, _data3_);
	}
}

static gboolean
__lambda16_ (Block3Data* _data3_,
             GtkTreeModel* model,
             GtkTreePath* path,
             GtkTreeIter* iter)
{
	CianoControllersConverterController* self;
	GValue cell1 = {0};
	GValue cell2 = {0};
	GtkTreeIter _tmp0_;
	GValue _tmp1_ = {0};
	GtkTreeIter _tmp2_;
	GValue _tmp3_ = {0};
	CianoObjectsItemConversion* item = NULL;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gdouble _tmp7_;
	CianoObjectsItemConversion* _tmp8_;
	GeeArrayList* _tmp9_;
	gint _tmp10_;
	gboolean result;
	self = _data3_->self;
	g_return_val_if_fail (model != NULL, FALSE);
	g_return_val_if_fail (path != NULL, FALSE);
	g_return_val_if_fail (iter != NULL, FALSE);
	_tmp0_ = *iter;
	gtk_tree_model_get_value ((GtkTreeModel*) _data3_->list_store, &_tmp0_, 0, &_tmp1_);
	G_IS_VALUE (&cell1) ? (g_value_unset (&cell1), NULL) : NULL;
	cell1 = _tmp1_;
	_tmp2_ = *iter;
	gtk_tree_model_get_value ((GtkTreeModel*) _data3_->list_store, &_tmp2_, 1, &_tmp3_);
	G_IS_VALUE (&cell2) ? (g_value_unset (&cell2), NULL) : NULL;
	cell2 = _tmp3_;
	_tmp4_ = g_value_get_string (&cell1);
	_tmp5_ = g_value_get_string (&cell2);
	_tmp6_ = self->priv->name_format_selected;
	_tmp7_ = (gdouble) 0;
	_tmp8_ = ciano_objects_item_conversion_new (self->priv->id_item, _tmp4_, _tmp5_, _tmp6_, &_tmp7_, self->priv->type_item);
	item = _tmp8_;
	_tmp9_ = self->priv->list_items;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, item);
	ciano_controllers_converter_controller_start_conversion_process (self, item, _data3_->name_format);
	_tmp10_ = self->priv->id_item;
	self->priv->id_item = _tmp10_ + 1;
	result = FALSE;
	_ciano_objects_item_conversion_unref0 (item);
	G_IS_VALUE (&cell2) ? (g_value_unset (&cell2), NULL) : NULL;
	G_IS_VALUE (&cell1) ? (g_value_unset (&cell1), NULL) : NULL;
	return result;
}

static gboolean
___lambda16__gtk_tree_model_foreach_func (GtkTreeModel* model,
                                          GtkTreePath* path,
                                          GtkTreeIter* iter,
                                          gpointer self)
{
	gboolean result;
	result = __lambda16_ (self, model, path, iter);
	return result;
}

void
ciano_controllers_converter_controller_on_activate_button_start_conversion (CianoControllersConverterController* self,
                                                                            GtkListStore* list_store,
                                                                            const gchar* name_format)
{
	Block3Data* _data3_;
	GtkListStore* _tmp0_;
	gchar* _tmp1_;
	CianoViewsConverterView* _tmp2_;
	CianoWidgetsListConversion* _tmp3_;
	GtkStack* _tmp4_;
	CianoViewsConverterView* _tmp5_;
	CianoWidgetsListConversion* _tmp6_;
	GtkStack* _tmp7_;
	GtkTreeModelForeachFunc load_list_for_conversion = NULL;
	gpointer load_list_for_conversion_target;
	GDestroyNotify load_list_for_conversion_target_destroy_notify;
	g_return_if_fail (self != NULL);
	g_return_if_fail (list_store != NULL);
	g_return_if_fail (name_format != NULL);
	_data3_ = g_slice_new0 (Block3Data);
	_data3_->_ref_count_ = 1;
	_data3_->self = ciano_controllers_converter_controller_ref (self);
	_tmp0_ = _g_object_ref0 (list_store);
	_g_object_unref0 (_data3_->list_store);
	_data3_->list_store = _tmp0_;
	_tmp1_ = g_strdup (name_format);
	_g_free0 (_data3_->name_format);
	_data3_->name_format = _tmp1_;
	_tmp2_ = self->priv->converter_view;
	_tmp3_ = _tmp2_->list_conversion;
	_tmp4_ = _tmp3_->stack;
	gtk_stack_set_visible_child_name (_tmp4_, CIANO_CONFIGS_CONSTANTS_LIST_BOX_VIEW);
	_tmp5_ = self->priv->converter_view;
	_tmp6_ = _tmp5_->list_conversion;
	_tmp7_ = _tmp6_->stack;
	gtk_widget_show_all ((GtkWidget*) _tmp7_);
	load_list_for_conversion = ___lambda16__gtk_tree_model_foreach_func;
	load_list_for_conversion_target = block3_data_ref (_data3_);
	load_list_for_conversion_target_destroy_notify = block3_data_unref;
	gtk_tree_model_foreach ((GtkTreeModel*) _data3_->list_store, load_list_for_conversion, load_list_for_conversion_target);
	(load_list_for_conversion_target_destroy_notify == NULL) ? NULL : (load_list_for_conversion_target_destroy_notify (load_list_for_conversion_target), NULL);
	load_list_for_conversion = NULL;
	load_list_for_conversion_target = NULL;
	load_list_for_conversion_target_destroy_notify = NULL;
	block3_data_unref (_data3_);
	_data3_ = NULL;
}

/**
         * Method responsible for conversion suprocess.
         *
         * @see Ciano.Widgets.Properties
         * @see Ciano.Widgets.RowConversion
         * @see get_command
         * @see get_type_icon
         * @see create_row_conversion
         * @see convert_async
         * @see validate_process_completed
         * @see validate_error_in_process
         * @param  {@code ItemConversion} item
         * @param  {@code string}         name_format
         * @return {@code void}
         */
static gpointer
_ciano_objects_item_conversion_ref0 (gpointer self)
{
	return self ? ciano_objects_item_conversion_ref (self) : NULL;
}

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

static void
block4_data_unref (void * _userdata_)
{
	Block4Data* _data4_;
	_data4_ = (Block4Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) {
		CianoControllersConverterController* self;
		self = _data4_->self;
		_ciano_objects_item_conversion_unref0 (_data4_->item);
		_ciano_controllers_converter_controller_unref0 (self);
		g_slice_free (Block4Data, _data4_);
	}
}

static Block5Data*
block5_data_ref (Block5Data* _data5_)
{
	g_atomic_int_inc (&_data5_->_ref_count_);
	return _data5_;
}

static void
block5_data_unref (void * _userdata_)
{
	Block5Data* _data5_;
	_data5_ = (Block5Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data5_->_ref_count_)) {
		CianoControllersConverterController* self;
		self = _data5_->_data4_->self;
		_g_object_unref0 (_data5_->row);
		_g_object_unref0 (_data5_->subprocess);
		block4_data_unref (_data5_->_data4_);
		_data5_->_data4_ = NULL;
		g_slice_free (Block5Data, _data5_);
	}
}

static void
___lambda19_ (Block5Data* _data5_,
              GObject* obj,
              GAsyncResult* async_res)
{
	Block4Data* _data4_;
	CianoControllersConverterController* self;
	GError* _inner_error0_ = NULL;
	_data4_ = _data5_->_data4_;
	self = _data4_->self;
	g_return_if_fail (async_res != NULL);
	{
		CianoWidgetsRowConversion* _tmp0_;
		GtkButton* _tmp1_;
		CianoWidgetsRowConversion* _tmp2_;
		GtkButton* _tmp3_;
		gboolean _tmp4_ = FALSE;
		GSubprocess* _tmp5_;
		_tmp0_ = _data5_->row;
		_tmp1_ = _tmp0_->button_cancel;
		ciano_utils_widget_util_set_visible ((GtkWidget*) _tmp1_, FALSE);
		_tmp2_ = _data5_->row;
		_tmp3_ = _tmp2_->button_remove;
		ciano_utils_widget_util_set_visible ((GtkWidget*) _tmp3_, TRUE);
		_tmp5_ = _data5_->subprocess;
		_tmp4_ = g_subprocess_wait_check (_tmp5_, NULL, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		if (_tmp4_) {
			GSubprocess* _tmp6_;
			CianoWidgetsRowConversion* _tmp7_;
			_tmp6_ = _data5_->subprocess;
			_tmp7_ = _data5_->row;
			ciano_controllers_converter_controller_validate_process_completed (self, _tmp6_, _tmp7_, _data4_->item, _data5_->_error_, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GSubprocess* _tmp8_;
		CianoWidgetsRowConversion* _tmp9_;
		GError* _tmp10_;
		const gchar* _tmp11_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp8_ = _data5_->subprocess;
		_tmp9_ = _data5_->row;
		ciano_controllers_converter_controller_validate_error_in_process (self, _tmp8_, _tmp9_, _data4_->item, _data5_->_error_);
		_tmp10_ = e;
		_tmp11_ = _tmp10_->message;
		g_warning ("ConverterController.vala:280: Error: %s\n", _tmp11_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
____lambda19__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	___lambda19_ (self, source_object, res);
	block5_data_unref (self);
}

static void
ciano_controllers_converter_controller_start_conversion_process (CianoControllersConverterController* self,
                                                                 CianoObjectsItemConversion* item,
                                                                 const gchar* name_format)
{
	Block4Data* _data4_;
	CianoObjectsItemConversion* _tmp0_;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (item != NULL);
	g_return_if_fail (name_format != NULL);
	_data4_ = g_slice_new0 (Block4Data);
	_data4_->_ref_count_ = 1;
	_data4_->self = ciano_controllers_converter_controller_ref (self);
	_tmp0_ = _ciano_objects_item_conversion_ref0 (item);
	_ciano_objects_item_conversion_unref0 (_data4_->item);
	_data4_->item = _tmp0_;
	{
		Block5Data* _data5_;
		CianoServicesSettings* _tmp1_;
		gboolean _tmp2_;
		gboolean _tmp3_;
		gchar* uri = NULL;
		const gchar* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		gchar* _tmp14_;
		GSubprocessLauncher* launcher = NULL;
		GSubprocessLauncher* _tmp15_;
		GSubprocessLauncher* _tmp16_;
		const gchar* _tmp17_;
		gint _tmp18_ = 0;
		gchar** _tmp19_;
		gchar** _tmp20_;
		gint _tmp20__length1;
		GSubprocess* _tmp21_;
		GSubprocess* _tmp22_;
		GInputStream* input_stream = NULL;
		GSubprocess* _tmp23_;
		GInputStream* _tmp24_;
		GInputStream* _tmp25_;
		gboolean btn_cancel = FALSE;
		gchar* icon = NULL;
		gchar* _tmp26_;
		const gchar* _tmp27_;
		const gchar* _tmp28_;
		const gchar* _tmp29_;
		GSubprocess* _tmp30_;
		CianoWidgetsRowConversion* _tmp31_;
		CianoViewsConverterView* _tmp32_;
		CianoWidgetsListConversion* _tmp33_;
		GtkListBox* _tmp34_;
		CianoWidgetsRowConversion* _tmp35_;
		GInputStream* _tmp36_;
		CianoWidgetsRowConversion* _tmp37_;
		_data5_ = g_slice_new0 (Block5Data);
		_data5_->_ref_count_ = 1;
		_data5_->_data4_ = block4_data_ref (_data4_);
		_tmp1_ = self->priv->settings;
		_tmp2_ = ciano_services_settings_get_output_source_file_folder (_tmp1_);
		_tmp3_ = _tmp2_;
		if (!_tmp3_) {
			GFile* directory = NULL;
			CianoServicesSettings* _tmp4_;
			const gchar* _tmp5_;
			const gchar* _tmp6_;
			GFile* _tmp7_;
			GFile* _tmp8_;
			_tmp4_ = self->priv->settings;
			_tmp5_ = ciano_services_settings_get_output_folder (_tmp4_);
			_tmp6_ = _tmp5_;
			_tmp7_ = g_file_new_for_path (_tmp6_);
			directory = _tmp7_;
			_tmp8_ = directory;
			if (!g_file_query_exists (_tmp8_, NULL)) {
				GFile* _tmp9_;
				_tmp9_ = directory;
				g_file_make_directory_with_parents (_tmp9_, NULL, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					_g_object_unref0 (directory);
					block5_data_unref (_data5_);
					_data5_ = NULL;
					goto __catch0_g_error;
				}
			}
			_g_object_unref0 (directory);
		}
		_tmp10_ = ciano_objects_item_conversion_get_directory (_data4_->item);
		_tmp11_ = _tmp10_;
		_tmp12_ = ciano_objects_item_conversion_get_name (_data4_->item);
		_tmp13_ = _tmp12_;
		_tmp14_ = g_strconcat (_tmp11_, _tmp13_, NULL);
		uri = _tmp14_;
		_tmp15_ = g_subprocess_launcher_new (G_SUBPROCESS_FLAGS_STDERR_PIPE);
		launcher = _tmp15_;
		_tmp16_ = launcher;
		_tmp17_ = uri;
		_tmp19_ = ciano_controllers_converter_controller_get_command (self, _tmp17_, &_tmp18_);
		_tmp20_ = _tmp19_;
		_tmp20__length1 = _tmp18_;
		_tmp21_ = g_subprocess_launcher_spawnv (_tmp16_, _tmp20_, &_inner_error0_);
		_tmp22_ = _tmp21_;
		_tmp20_ = (_vala_array_free (_tmp20_, _tmp20__length1, (GDestroyNotify) g_free), NULL);
		_data5_->subprocess = _tmp22_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (launcher);
			_g_free0 (uri);
			block5_data_unref (_data5_);
			_data5_ = NULL;
			goto __catch0_g_error;
		}
		_tmp23_ = _data5_->subprocess;
		_tmp24_ = g_subprocess_get_stderr_pipe (_tmp23_);
		_tmp25_ = _g_object_ref0 (_tmp24_);
		input_stream = _tmp25_;
		_data5_->_error_ = 0;
		btn_cancel = FALSE;
		_tmp26_ = ciano_controllers_converter_controller_get_type_icon (self, _data4_->item);
		icon = _tmp26_;
		_tmp27_ = icon;
		_tmp28_ = ciano_objects_item_conversion_get_name (_data4_->item);
		_tmp29_ = _tmp28_;
		_tmp30_ = _data5_->subprocess;
		_tmp31_ = ciano_controllers_converter_controller_create_row_conversion (self, _tmp27_, _tmp29_, name_format, _tmp30_, btn_cancel);
		_data5_->row = _tmp31_;
		_tmp32_ = self->priv->converter_view;
		_tmp33_ = _tmp32_->list_conversion;
		_tmp34_ = _tmp33_->list_box;
		_tmp35_ = _data5_->row;
		gtk_container_add ((GtkContainer*) _tmp34_, (GtkWidget*) _tmp35_);
		_tmp36_ = input_stream;
		_tmp37_ = _data5_->row;
		ciano_controllers_converter_controller_convert_async (self, _tmp36_, _tmp37_, _data4_->item, _data5_->_error_, ____lambda19__gasync_ready_callback, block5_data_ref (_data5_));
		_g_free0 (icon);
		_g_object_unref0 (input_stream);
		_g_object_unref0 (launcher);
		_g_free0 (uri);
		block5_data_unref (_data5_);
		_data5_ = NULL;
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp38_;
		const gchar* _tmp39_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp38_ = e;
		_tmp39_ = _tmp38_->message;
		g_warning ("ConverterController.vala:284: Error: %s\n", _tmp39_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		block4_data_unref (_data4_);
		_data4_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	block4_data_unref (_data4_);
	_data4_ = NULL;
}

/**
         * If the conversion worked correctly: update row data.
         *
         * @see Ciano.Configs.Properties
         * @see Ciano.Utils.WidgetUtil
         * @see Ciano.Widgets.RowConversion
         * @param  {@code Subprocess}    subprocess
         * @param  {@code RowConversion} row
         * @param  {@code ItemConversion} item
         * @return {@code void}
         */
static void
ciano_controllers_converter_controller_validate_process_completed (CianoControllersConverterController* self,
                                                                   GSubprocess* subprocess,
                                                                   CianoWidgetsRowConversion* row,
                                                                   CianoObjectsItemConversion* item,
                                                                   gint _error_,
                                                                   GError** error)
{
	GtkProgressBar* _tmp0_;
	GtkLabel* _tmp1_;
	CianoServicesSettings* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (subprocess != NULL);
	g_return_if_fail (row != NULL);
	g_return_if_fail (item != NULL);
	_tmp0_ = row->progress_bar;
	gtk_progress_bar_set_fraction (_tmp0_, (gdouble) 1);
	_tmp1_ = row->status;
	gtk_label_set_label (_tmp1_, CIANO_CONFIGS_PROPERTIES_TEXT_SUCESS_IN_CONVERSION);
	_tmp2_ = self->priv->settings;
	_tmp3_ = ciano_services_settings_get_complete_notify (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp5_ = ciano_objects_item_conversion_get_name (item);
		_tmp6_ = _tmp5_;
		ciano_controllers_converter_controller_send_notification (self, _tmp6_, CIANO_CONFIGS_PROPERTIES_TEXT_SUCESS_IN_CONVERSION);
	}
}

/**
         * Validates whether the process has been canceled (subprocess.get_exit_status () == 9) 
         * or if there has been an error (subprocess.get_exit_status () == 1).
         *
         * @see Ciano.Configs.Properties 
         * @see Ciano.Utils.WidgetUtil
         * @see Ciano.Widgets.RowConversion
         * @param  {@code Subprocess}     subprocess
         * @param  {@code RowConversion}  row
         * @param  {@code ItemConversion} item
         * @return {@code void}
         */
static void
ciano_controllers_converter_controller_validate_error_in_process (CianoControllersConverterController* self,
                                                                  GSubprocess* subprocess,
                                                                  CianoWidgetsRowConversion* row,
                                                                  CianoObjectsItemConversion* item,
                                                                  gint _error_)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (subprocess != NULL);
	g_return_if_fail (row != NULL);
	g_return_if_fail (item != NULL);
	if (g_subprocess_get_status (subprocess) == 1) {
		GtkProgressBar* _tmp0_;
		CianoServicesSettings* _tmp2_;
		gboolean _tmp3_;
		gboolean _tmp4_;
		_tmp0_ = row->progress_bar;
		gtk_progress_bar_set_fraction (_tmp0_, (gdouble) 0);
		if (_error_ == 0) {
			GtkLabel* _tmp1_;
			_tmp1_ = row->status;
			gtk_label_set_label (_tmp1_, CIANO_CONFIGS_PROPERTIES_TEXT_ERROR_IN_CONVERSION);
		}
		_tmp2_ = self->priv->settings;
		_tmp3_ = ciano_services_settings_get_complete_notify (_tmp2_);
		_tmp4_ = _tmp3_;
		if (_tmp4_) {
			const gchar* _tmp5_;
			const gchar* _tmp6_;
			_tmp5_ = ciano_objects_item_conversion_get_name (item);
			_tmp6_ = _tmp5_;
			ciano_controllers_converter_controller_send_notification (self, _tmp6_, CIANO_CONFIGS_PROPERTIES_TEXT_ERROR_IN_CONVERSION);
		}
	}
	if (g_subprocess_get_status (subprocess) == 9) {
		GtkProgressBar* _tmp7_;
		GtkLabel* _tmp8_;
		_tmp7_ = row->progress_bar;
		gtk_progress_bar_set_fraction (_tmp7_, (gdouble) 0);
		_tmp8_ = row->status;
		gtk_label_set_label (_tmp8_, CIANO_CONFIGS_PROPERTIES_TEXT_CANCEL_IN_CONVERSION);
	}
}

static void
ciano_controllers_converter_controller_convert_async_data_free (gpointer _data)
{
	CianoControllersConverterControllerConvertAsyncData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->input_stream);
	_g_object_unref0 (_data_->row);
	_ciano_objects_item_conversion_unref0 (_data_->item);
	_ciano_controllers_converter_controller_unref0 (_data_->self);
	g_slice_free (CianoControllersConverterControllerConvertAsyncData, _data_);
}

static gpointer
_ciano_controllers_converter_controller_ref0 (gpointer self)
{
	return self ? ciano_controllers_converter_controller_ref (self) : NULL;
}

void
ciano_controllers_converter_controller_convert_async (CianoControllersConverterController* self,
                                                      GInputStream* input_stream,
                                                      CianoWidgetsRowConversion* row,
                                                      CianoObjectsItemConversion* item,
                                                      gint _error_,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_)
{
	CianoControllersConverterControllerConvertAsyncData* _data_;
	CianoControllersConverterController* _tmp0_;
	GInputStream* _tmp1_;
	CianoWidgetsRowConversion* _tmp2_;
	CianoObjectsItemConversion* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (input_stream != NULL);
	g_return_if_fail (row != NULL);
	g_return_if_fail (item != NULL);
	_data_ = g_slice_new0 (CianoControllersConverterControllerConvertAsyncData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, ciano_controllers_converter_controller_convert_async_data_free);
	_tmp0_ = _ciano_controllers_converter_controller_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (input_stream);
	_g_object_unref0 (_data_->input_stream);
	_data_->input_stream = _tmp1_;
	_tmp2_ = _g_object_ref0 (row);
	_g_object_unref0 (_data_->row);
	_data_->row = _tmp2_;
	_tmp3_ = _ciano_objects_item_conversion_ref0 (item);
	_ciano_objects_item_conversion_unref0 (_data_->item);
	_data_->item = _tmp3_;
	_data_->_error_ = _error_;
	ciano_controllers_converter_controller_convert_async_co (_data_);
}

void
ciano_controllers_converter_controller_convert_finish (CianoControllersConverterController* self,
                                                       GAsyncResult* _res_)
{
	CianoControllersConverterControllerConvertAsyncData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

/**
         * Method to execute the command assembled by the {@code get_command} method and create a subprocess to get the
         * command output response. Doing the manipulation with each returned return (every new string returned).
         * 1 - Execute the command.
         * 2 - Create the subprocess
         * 3 - Force the return for each new line using {@code yield}.
         * 4 - Checks if you hear any errors during the conversion.
         * 5 - Validates the notation rule defined in DialogPreferences.
         *
         * @see Ciano.Configs.Properties
         * @see Ciano.Widgets.RowConversion
         * @see Ciano.Widgets.ItemConversion
         * @param  {@code string[]}       spawn_args
         * @param  {@code ItemConversion} item
         * @param  {@code string}         name_format
         * @return {@code void}
         */
static void
ciano_controllers_converter_controller_convert_async_ready (GObject* source_object,
                                                            GAsyncResult* _res_,
                                                            gpointer _user_data_)
{
	CianoControllersConverterControllerConvertAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	ciano_controllers_converter_controller_convert_async_co (_data_);
}

static gboolean
ciano_controllers_converter_controller_convert_async_co (CianoControllersConverterControllerConvertAsyncData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = g_charset_converter_new ("utf-8", "iso-8859-1", &_data_->_inner_error0_);
		_data_->charset_converter = _data_->_tmp0_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp1_ = _data_->charset_converter;
		_data_->_tmp2_ = (GConverterInputStream*) g_converter_input_stream_new (_data_->input_stream, (GConverter*) _data_->_tmp1_);
		_data_->costream = _data_->_tmp2_;
		_data_->_tmp3_ = _data_->costream;
		_data_->_tmp4_ = g_data_input_stream_new ((GInputStream*) _data_->_tmp3_);
		_data_->data_input_stream = _data_->_tmp4_;
		_data_->_tmp5_ = _data_->data_input_stream;
		g_data_input_stream_set_newline_type (_data_->_tmp5_, G_DATA_STREAM_NEWLINE_TYPE_ANY);
		_data_->total = 0;
		while (TRUE) {
			_data_->_tmp6_ = _data_->data_input_stream;
			_data_->_state_ = 1;
			g_data_input_stream_read_line_async (_data_->_tmp6_, G_PRIORITY_DEFAULT, NULL, ciano_controllers_converter_controller_convert_async_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp7_ = g_data_input_stream_read_line_finish_utf8 (_data_->_tmp6_, _data_->_res_, NULL, &_data_->_inner_error0_);
			_data_->str_return = _data_->_tmp7_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_object_unref0 (_data_->data_input_stream);
				_g_object_unref0 (_data_->costream);
				_g_object_unref0 (_data_->charset_converter);
				goto __catch0_g_error;
			}
			_data_->_tmp8_ = _data_->str_return;
			if (_data_->_tmp8_ == NULL) {
				_g_free0 (_data_->str_return);
				break;
			} else {
				_data_->_tmp9_ = ciano_objects_item_conversion_get_type_item (_data_->item);
				_data_->_tmp10_ = _data_->_tmp9_;
				if (_data_->_tmp10_ != CIANO_ENUMS_TYPE_ITEM_ENUM_IMAGE) {
					_data_->_tmp11_ = _data_->str_return;
					ciano_controllers_converter_controller_process_line (_data_->self, _data_->_tmp11_, _data_->row, &_data_->total, _data_->_error_);
					if (_data_->_error_ > 0) {
						_data_->_tmp12_ = _data_->self->priv->settings;
						_data_->_tmp13_ = ciano_services_settings_get_error_notify (_data_->_tmp12_);
						_data_->_tmp14_ = _data_->_tmp13_;
						if (_data_->_tmp14_) {
							_data_->_tmp15_ = ciano_objects_item_conversion_get_name (_data_->item);
							_data_->_tmp16_ = _data_->_tmp15_;
							ciano_controllers_converter_controller_send_notification (_data_->self, _data_->_tmp16_, CIANO_CONFIGS_PROPERTIES_TEXT_ERROR_IN_CONVERSION);
						}
						_g_free0 (_data_->str_return);
						break;
					}
				} else {
					_data_->_tmp17_ = _data_->_error_;
					_data_->_error_ = _data_->_tmp17_ + 1;
					_g_free0 (_data_->str_return);
					break;
				}
			}
			_g_free0 (_data_->str_return);
		}
		_g_object_unref0 (_data_->data_input_stream);
		_g_object_unref0 (_data_->costream);
		_g_object_unref0 (_data_->charset_converter);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp18_ = _data_->e;
		_data_->_tmp19_ = _data_->_tmp18_->message;
		g_critical ("ConverterController.vala:388: Error: %s\n", _data_->_tmp19_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_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;
}

/**
         * Create row conversion.
         *
         * @see Ciano.Widgets.RowConversion 
         * @see Ciano.Utils.WidgetUtil
         * @param  {@code string}     icon
         * @param  {@code string}     item_name
         * @param  {@code string}     name_format
         * @param  {@code Subprocess} subprocess
         * @return {@code void}
         */
static Block6Data*
block6_data_ref (Block6Data* _data6_)
{
	g_atomic_int_inc (&_data6_->_ref_count_);
	return _data6_;
}

static void
block6_data_unref (void * _userdata_)
{
	Block6Data* _data6_;
	_data6_ = (Block6Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data6_->_ref_count_)) {
		CianoControllersConverterController* self;
		self = _data6_->self;
		_g_object_unref0 (_data6_->row);
		_g_object_unref0 (_data6_->subprocess);
		_ciano_controllers_converter_controller_unref0 (self);
		g_slice_free (Block6Data, _data6_);
	}
}

static void
__lambda17_ (Block6Data* _data6_)
{
	CianoControllersConverterController* self;
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	self = _data6_->self;
	g_subprocess_force_exit (_data6_->subprocess);
	_data6_->btn_cancel = TRUE;
	_tmp0_ = _data6_->row->button_cancel;
	ciano_utils_widget_util_set_visible ((GtkWidget*) _tmp0_, FALSE);
	_tmp1_ = _data6_->row->button_remove;
	ciano_utils_widget_util_set_visible ((GtkWidget*) _tmp1_, TRUE);
}

static void
___lambda17__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda17_ (self);
}

static void
__lambda18_ (Block6Data* _data6_)
{
	CianoControllersConverterController* self;
	CianoViewsConverterView* _tmp0_;
	CianoWidgetsListConversion* _tmp1_;
	CianoViewsConverterView* _tmp2_;
	CianoWidgetsListConversion* _tmp3_;
	CianoViewsConverterView* _tmp4_;
	CianoWidgetsListConversion* _tmp5_;
	self = _data6_->self;
	gtk_widget_destroy ((GtkWidget*) _data6_->row);
	_tmp0_ = self->priv->converter_view;
	_tmp1_ = _tmp0_->list_conversion;
	_tmp2_ = self->priv->converter_view;
	_tmp3_ = _tmp2_->list_conversion;
	_tmp3_->item_quantity = _tmp3_->item_quantity + -1;
	_tmp4_ = self->priv->converter_view;
	_tmp5_ = _tmp4_->list_conversion;
	if (_tmp5_->item_quantity == 0) {
		CianoViewsConverterView* _tmp6_;
		CianoWidgetsListConversion* _tmp7_;
		GtkStack* _tmp8_;
		_tmp6_ = self->priv->converter_view;
		_tmp7_ = _tmp6_->list_conversion;
		_tmp8_ = _tmp7_->stack;
		gtk_stack_set_visible_child_full (_tmp8_, CIANO_CONFIGS_CONSTANTS_WELCOME_VIEW, GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT);
	}
}

static void
___lambda18__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda18_ (self);
}

static CianoWidgetsRowConversion*
ciano_controllers_converter_controller_create_row_conversion (CianoControllersConverterController* self,
                                                              const gchar* icon,
                                                              const gchar* item_name,
                                                              const gchar* name_format,
                                                              GSubprocess* subprocess,
                                                              gboolean btn_cancel)
{
	Block6Data* _data6_;
	GSubprocess* _tmp0_;
	CianoWidgetsRowConversion* _tmp1_;
	GtkButton* _tmp2_;
	GtkButton* _tmp3_;
	CianoViewsConverterView* _tmp4_;
	CianoWidgetsListConversion* _tmp5_;
	CianoViewsConverterView* _tmp6_;
	CianoWidgetsListConversion* _tmp7_;
	GtkButton* _tmp8_;
	CianoWidgetsRowConversion* _tmp9_;
	CianoWidgetsRowConversion* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (icon != NULL, NULL);
	g_return_val_if_fail (item_name != NULL, NULL);
	g_return_val_if_fail (name_format != NULL, NULL);
	g_return_val_if_fail (subprocess != NULL, NULL);
	_data6_ = g_slice_new0 (Block6Data);
	_data6_->_ref_count_ = 1;
	_data6_->self = ciano_controllers_converter_controller_ref (self);
	_tmp0_ = _g_object_ref0 (subprocess);
	_g_object_unref0 (_data6_->subprocess);
	_data6_->subprocess = _tmp0_;
	_data6_->btn_cancel = btn_cancel;
	_tmp1_ = ciano_widgets_row_conversion_new (icon, item_name, (gdouble) 0, name_format);
	g_object_ref_sink (_tmp1_);
	_data6_->row = _tmp1_;
	_tmp2_ = _data6_->row->button_cancel;
	g_signal_connect_data (_tmp2_, "clicked", (GCallback) ___lambda17__gtk_button_clicked, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0);
	_tmp3_ = _data6_->row->button_remove;
	g_signal_connect_data (_tmp3_, "clicked", (GCallback) ___lambda18__gtk_button_clicked, block6_data_ref (_data6_), (GClosureNotify) block6_data_unref, 0);
	_tmp4_ = self->priv->converter_view;
	_tmp5_ = _tmp4_->list_conversion;
	_tmp6_ = self->priv->converter_view;
	_tmp7_ = _tmp6_->list_conversion;
	_tmp7_->item_quantity = _tmp7_->item_quantity + 1;
	_tmp8_ = _data6_->row->button_remove;
	ciano_utils_widget_util_set_visible ((GtkWidget*) _tmp8_, FALSE);
	_tmp9_ = _g_object_ref0 (_data6_->row);
	result = _tmp9_;
	block6_data_unref (_data6_);
	_data6_ = NULL;
	return result;
}

/**
         * Responsible for returning the icon name to the type defined in {@code ItemConversion}.
         *
         * @see Ciano.Objects.ItemConversion
         * @see Ciano.Enums.TypeItemEnum
         * @see Ciano.Utils.StringUtil
         * @param  {@code ItemConversion} item
         * @return {@code string}         icon
         */
static gchar*
ciano_controllers_converter_controller_get_type_icon (CianoControllersConverterController* self,
                                                      CianoObjectsItemConversion* item)
{
	gchar* icon = NULL;
	gchar* _tmp0_;
	CianoEnumsTypeItemEnum _tmp1_;
	CianoEnumsTypeItemEnum _tmp2_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (item != NULL, NULL);
	_tmp0_ = g_strdup (CIANO_UTILS_STRING_UTIL_EMPTY);
	icon = _tmp0_;
	_tmp1_ = ciano_objects_item_conversion_get_type_item (item);
	_tmp2_ = _tmp1_;
	switch (_tmp2_) {
		case CIANO_ENUMS_TYPE_ITEM_ENUM_VIDEO:
		{
			gchar* _tmp3_;
			_tmp3_ = g_strdup ("video-x-generic");
			_g_free0 (icon);
			icon = _tmp3_;
			break;
		}
		case CIANO_ENUMS_TYPE_ITEM_ENUM_MUSIC:
		{
			gchar* _tmp4_;
			_tmp4_ = g_strdup ("audio-x-generic");
			_g_free0 (icon);
			icon = _tmp4_;
			break;
		}
		case CIANO_ENUMS_TYPE_ITEM_ENUM_IMAGE:
		{
			gchar* _tmp5_;
			_tmp5_ = g_strdup ("image-x-generic");
			_g_free0 (icon);
			icon = _tmp5_;
			break;
		}
		default:
		{
			gchar* _tmp6_;
			_tmp6_ = g_strdup ("text-x-generic");
			_g_free0 (icon);
			icon = _tmp6_;
			break;
		}
	}
	result = icon;
	return result;
}

/**
         * Responsible for processing the returned row and validate the return and execution of actions accordingly.
         * 1 - Monitors the time, size, duration, and bitrate of each item.
         * 2 - Also check the error if it happens.
         *
         * @see Ciano.Widgets.RowConversion
         * @see Ciano.Configs.Properties
         * @see Ciano.Utils.StringUtil
         * @see Ciano.Utils.TimeUtil
         * @param      {@code string}           str_return
         * @param  ref {@code Gtk.ProgressBar}  progress_bar
         * @param  ref {@code Gtk.Label}        status
         * @param  ref {@code int}              total
         * @return {@code void}
         */
static gboolean
string_contains (const gchar* self,
                 const gchar* needle)
{
	gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (needle != NULL, FALSE);
	_tmp0_ = strstr ((gchar*) self, (gchar*) needle);
	result = _tmp0_ != NULL;
	return result;
}

static gint
string_index_of (const gchar* self,
                 const gchar* needle,
                 gint start_index)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	g_return_val_if_fail (needle != NULL, -1);
	_tmp0_ = strstr (((gchar*) self) + start_index, (gchar*) needle);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}

static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	glong result;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}

static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp3_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	if (offset >= ((glong) 0)) {
		_tmp0_ = len >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		string_length = string_strnlen ((gchar*) self, offset + len);
	} else {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = strlen (self);
		_tmp2_ = _tmp1_;
		string_length = (glong) _tmp2_;
	}
	if (offset < ((glong) 0)) {
		offset = string_length + offset;
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
	} else {
		g_return_val_if_fail (offset <= string_length, NULL);
	}
	if (len < ((glong) 0)) {
		len = string_length - offset;
	}
	g_return_val_if_fail ((offset + len) <= string_length, NULL);
	_tmp3_ = g_strndup (((gchar*) self) + offset, (gsize) len);
	result = _tmp3_;
	return result;
}

static gchar*
double_to_string (gdouble self)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gint _tmp1__length1;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* result;
	_tmp0_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
	_tmp1_ = _tmp0_;
	_tmp1__length1 = G_ASCII_DTOSTR_BUF_SIZE;
	_tmp2_ = g_ascii_dtostr (_tmp1_, (gint) G_ASCII_DTOSTR_BUF_SIZE, self);
	_tmp3_ = g_strdup (_tmp2_);
	_tmp4_ = _tmp3_;
	_tmp1_ = (g_free (_tmp1_), NULL);
	result = _tmp4_;
	return result;
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

static void
ciano_controllers_converter_controller_process_line (CianoControllersConverterController* self,
                                                     const gchar* str_return,
                                                     CianoWidgetsRowConversion* row,
                                                     gint* total,
                                                     gint _error_)
{
	gchar* time = NULL;
	gchar* _tmp0_;
	gchar* size = NULL;
	gchar* _tmp1_;
	gchar* bitrate = NULL;
	gchar* _tmp2_;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	g_return_if_fail (self != NULL);
	g_return_if_fail (str_return != NULL);
	g_return_if_fail (row != NULL);
	_tmp0_ = g_strdup (CIANO_UTILS_STRING_UTIL_EMPTY);
	time = _tmp0_;
	_tmp1_ = g_strdup (CIANO_UTILS_STRING_UTIL_EMPTY);
	size = _tmp1_;
	_tmp2_ = g_strdup (CIANO_UTILS_STRING_UTIL_EMPTY);
	bitrate = _tmp2_;
	if (string_contains (str_return, "Duration:")) {
		gint index = 0;
		gchar* duration = NULL;
		gchar* _tmp3_;
		const gchar* _tmp4_;
		index = string_index_of (str_return, "Duration:", 0);
		_tmp3_ = string_substring (str_return, (glong) (index + 10), (glong) 11);
		duration = _tmp3_;
		_tmp4_ = duration;
		*total = ciano_utils_time_util_duration_in_seconds (_tmp4_);
		_g_free0 (duration);
	}
	if (string_contains (str_return, "time=")) {
		_tmp6_ = string_contains (str_return, "size=");
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		_tmp5_ = string_contains (str_return, "bitrate=");
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		gint index_time = 0;
		gchar* _tmp7_;
		gchar* time_to_display = NULL;
		const gchar* _tmp8_;
		gchar* _tmp9_;
		const gchar* _tmp10_;
		gint loading = 0;
		const gchar* _tmp13_;
		gdouble progress = 0.0;
		GtkProgressBar* _tmp14_;
		gint index_size = 0;
		gchar* _tmp15_;
		gint index_bitrate = 0;
		gchar* _tmp16_;
		const gchar* _tmp17_;
		GtkLabel* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		gchar* _tmp23_;
		gchar* _tmp24_;
		gchar* _tmp25_;
		gchar* _tmp26_;
		gchar* _tmp27_;
		const gchar* _tmp28_;
		gchar* _tmp29_;
		gchar* _tmp30_;
		gchar* _tmp31_;
		gchar* _tmp32_;
		gchar* _tmp33_;
		gchar* _tmp34_;
		const gchar* _tmp35_;
		gchar* _tmp36_;
		gchar* _tmp37_;
		gchar* _tmp38_;
		gchar* _tmp39_;
		gchar* _tmp40_;
		gchar* _tmp41_;
		const gchar* _tmp42_;
		gchar* _tmp43_;
		gchar* _tmp44_;
		gchar* _tmp45_;
		gchar* _tmp46_;
		index_time = string_index_of (str_return, "time=", 0);
		_tmp7_ = string_substring (str_return, (glong) (index_time + 5), (glong) 11);
		_g_free0 (time);
		time = _tmp7_;
		_tmp8_ = time;
		_tmp9_ = g_strdup (_tmp8_);
		time_to_display = _tmp9_;
		_tmp10_ = time;
		if (string_contains (_tmp10_, "N/A")) {
			gchar* _tmp11_;
			gchar* _tmp12_;
			_tmp11_ = g_strdup ("00:00:00.00");
			_g_free0 (time);
			time = _tmp11_;
			_tmp12_ = g_strdup ("N/A");
			_g_free0 (time_to_display);
			time_to_display = _tmp12_;
		}
		_tmp13_ = time;
		loading = ciano_utils_time_util_duration_in_seconds (_tmp13_);
		progress = (gdouble) ((100 * loading) / (*total));
		_tmp14_ = row->progress_bar;
		gtk_progress_bar_set_fraction (_tmp14_, progress / 100);
		index_size = string_index_of (str_return, "size=", 0);
		_tmp15_ = string_substring (str_return, (glong) (index_size + 5), (glong) 11);
		_g_free0 (size);
		size = _tmp15_;
		index_bitrate = string_index_of (str_return, "bitrate=", 0);
		_tmp16_ = string_substring (str_return, (glong) (index_bitrate + 8), (glong) 11);
		_g_free0 (bitrate);
		bitrate = _tmp16_;
		_tmp17_ = bitrate;
		if (string_contains (_tmp17_, "N/A")) {
			gchar* _tmp18_;
			_tmp18_ = g_strdup ("N/A");
			_g_free0 (bitrate);
			bitrate = _tmp18_;
		}
		_tmp19_ = row->status;
		_tmp20_ = double_to_string (progress);
		_tmp21_ = _tmp20_;
		_tmp22_ = g_strconcat (CIANO_CONFIGS_PROPERTIES_TEXT_PERCENTAGE, _tmp21_, NULL);
		_tmp23_ = _tmp22_;
		_tmp24_ = g_strconcat (_tmp23_, "%", NULL);
		_tmp25_ = _tmp24_;
		_tmp26_ = g_strconcat (_tmp25_, CIANO_CONFIGS_PROPERTIES_TEXT_SIZE_CUSTOM, NULL);
		_tmp27_ = _tmp26_;
		_tmp28_ = size;
		_tmp29_ = string_strip (_tmp28_);
		_tmp30_ = _tmp29_;
		_tmp31_ = g_strconcat (_tmp27_, _tmp30_, NULL);
		_tmp32_ = _tmp31_;
		_tmp33_ = g_strconcat (_tmp32_, CIANO_CONFIGS_PROPERTIES_TEXT_TIME_CUSTOM, NULL);
		_tmp34_ = _tmp33_;
		_tmp35_ = time_to_display;
		_tmp36_ = string_strip (_tmp35_);
		_tmp37_ = _tmp36_;
		_tmp38_ = g_strconcat (_tmp34_, _tmp37_, NULL);
		_tmp39_ = _tmp38_;
		_tmp40_ = g_strconcat (_tmp39_, CIANO_CONFIGS_PROPERTIES_TEXT_BITRATE_CUSTOM, NULL);
		_tmp41_ = _tmp40_;
		_tmp42_ = bitrate;
		_tmp43_ = string_strip (_tmp42_);
		_tmp44_ = _tmp43_;
		_tmp45_ = g_strconcat (_tmp41_, _tmp44_, NULL);
		_tmp46_ = _tmp45_;
		gtk_label_set_label (_tmp19_, _tmp46_);
		_g_free0 (_tmp46_);
		_g_free0 (_tmp44_);
		_g_free0 (_tmp41_);
		_g_free0 (_tmp39_);
		_g_free0 (_tmp37_);
		_g_free0 (_tmp34_);
		_g_free0 (_tmp32_);
		_g_free0 (_tmp30_);
		_g_free0 (_tmp27_);
		_g_free0 (_tmp25_);
		_g_free0 (_tmp23_);
		_g_free0 (_tmp21_);
		_g_free0 (time_to_display);
	}
	if (string_contains (str_return, "No such file or directory")) {
		GtkLabel* _tmp47_;
		GtkLabel* _tmp48_;
		GtkStyleContext* _tmp49_;
		gint _tmp50_;
		_tmp47_ = row->status;
		gtk_label_set_label (_tmp47_, CIANO_CONFIGS_PROPERTIES_MSG_ERROR_NO_SUCH_FILE_DIRECTORY);
		_tmp48_ = row->status;
		_tmp49_ = gtk_widget_get_style_context ((GtkWidget*) _tmp48_);
		gtk_style_context_add_class (_tmp49_, "color-label-error");
		_tmp50_ = _error_;
		_error_ = _tmp50_ + 1;
	} else {
		if (string_contains (str_return, "Invalid argument")) {
			GtkLabel* _tmp51_;
			GtkLabel* _tmp52_;
			GtkStyleContext* _tmp53_;
			gint _tmp54_;
			_tmp51_ = row->status;
			gtk_label_set_label (_tmp51_, CIANO_CONFIGS_PROPERTIES_MSG_ERROR_INVALID_ARGUMENT);
			_tmp52_ = row->status;
			_tmp53_ = gtk_widget_get_style_context ((GtkWidget*) _tmp52_);
			gtk_style_context_add_class (_tmp53_, "color-label-error");
			_tmp54_ = _error_;
			_error_ = _tmp54_ + 1;
		} else {
			if (string_contains (str_return, "Experimental codecs are not enabled")) {
				GtkLabel* _tmp55_;
				GtkLabel* _tmp56_;
				GtkStyleContext* _tmp57_;
				gint _tmp58_;
				_tmp55_ = row->status;
				gtk_label_set_label (_tmp55_, CIANO_CONFIGS_PROPERTIES_MSG_ERROR_CODECS);
				_tmp56_ = row->status;
				_tmp57_ = gtk_widget_get_style_context ((GtkWidget*) _tmp56_);
				gtk_style_context_add_class (_tmp57_, "color-label-error");
				_tmp58_ = _error_;
				_error_ = _tmp58_ + 1;
			} else {
				if (string_contains (str_return, "Invalid data found when processing input")) {
					GtkLabel* _tmp59_;
					GtkLabel* _tmp60_;
					GtkStyleContext* _tmp61_;
					gint _tmp62_;
					_tmp59_ = row->status;
					gtk_label_set_label (_tmp59_, CIANO_CONFIGS_PROPERTIES_MSG_ERROR_INVALID_INPUT_DATA);
					_tmp60_ = row->status;
					_tmp61_ = gtk_widget_get_style_context ((GtkWidget*) _tmp60_);
					gtk_style_context_add_class (_tmp61_, "color-label-error");
					_tmp62_ = _error_;
					_error_ = _tmp62_ + 1;
				}
			}
		}
	}
	_g_free0 (bitrate);
	_g_free0 (size);
	_g_free0 (time);
}

/**
         * Assemble the command to be executed by the terminal depending on the type of the item.
         *
         * @see Ciano.Enums.TypeItemEnum
         * @see get_uri_new_file
         * @param  {@code string} uri
         * @return {@code void}
         */
static gchar**
_vala_array_dup1 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

gchar**
ciano_controllers_converter_controller_get_command (CianoControllersConverterController* self,
                                                    const gchar* uri,
                                                    gint* result_length1)
{
	GPtrArray* array = NULL;
	GPtrArray* _tmp0_;
	gchar* new_file = NULL;
	gchar* _tmp1_;
	gboolean _tmp2_ = FALSE;
	GPtrArray* _tmp49_;
	gpointer* _tmp50_;
	gint _tmp50__length1;
	gchar** _tmp51_;
	gint _tmp51__length1;
	gchar** _tmp52_;
	gint _tmp52__length1;
	gchar** result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (uri != NULL, NULL);
	_tmp0_ = g_ptr_array_new_full ((guint) 0, _g_free0_);
	array = _tmp0_;
	_tmp1_ = ciano_controllers_converter_controller_get_uri_new_file (self, uri);
	new_file = _tmp1_;
	if (self->priv->type_item == CIANO_ENUMS_TYPE_ITEM_ENUM_VIDEO) {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = self->priv->type_item == CIANO_ENUMS_TYPE_ITEM_ENUM_MUSIC;
	}
	if (_tmp2_) {
		GPtrArray* _tmp3_;
		gchar* _tmp4_;
		GPtrArray* _tmp5_;
		gchar* _tmp6_;
		GPtrArray* _tmp7_;
		gchar* _tmp8_;
		GPtrArray* _tmp9_;
		gchar* _tmp10_;
		gboolean _tmp11_ = FALSE;
		const gchar* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		gboolean _tmp15_;
		const gchar* _tmp27_;
		gchar* _tmp28_;
		gchar* _tmp29_;
		gboolean _tmp30_;
		GPtrArray* _tmp35_;
		gchar* _tmp36_;
		GPtrArray* _tmp37_;
		gchar* _tmp38_;
		GPtrArray* _tmp39_;
		const gchar* _tmp40_;
		gchar* _tmp41_;
		_tmp3_ = array;
		_tmp4_ = g_strdup ("ffmpeg");
		g_ptr_array_add (_tmp3_, _tmp4_);
		_tmp5_ = array;
		_tmp6_ = g_strdup ("-y");
		g_ptr_array_add (_tmp5_, _tmp6_);
		_tmp7_ = array;
		_tmp8_ = g_strdup ("-i");
		g_ptr_array_add (_tmp7_, _tmp8_);
		_tmp9_ = array;
		_tmp10_ = g_strdup (uri);
		g_ptr_array_add (_tmp9_, _tmp10_);
		_tmp12_ = self->priv->name_format_selected;
		_tmp13_ = g_utf8_strdown (_tmp12_, (gssize) -1);
		_tmp14_ = _tmp13_;
		_tmp15_ = g_strcmp0 (_tmp14_, "3gp") == 0;
		_g_free0 (_tmp14_);
		if (_tmp15_) {
			_tmp11_ = TRUE;
		} else {
			const gchar* _tmp16_;
			gchar* _tmp17_;
			gchar* _tmp18_;
			_tmp16_ = self->priv->name_format_selected;
			_tmp17_ = g_utf8_strdown (_tmp16_, (gssize) -1);
			_tmp18_ = _tmp17_;
			_tmp11_ = g_strcmp0 (_tmp18_, "flv") == 0;
			_g_free0 (_tmp18_);
		}
		if (_tmp11_) {
			GPtrArray* _tmp19_;
			gchar* _tmp20_;
			GPtrArray* _tmp21_;
			gchar* _tmp22_;
			GPtrArray* _tmp23_;
			gchar* _tmp24_;
			GPtrArray* _tmp25_;
			gchar* _tmp26_;
			_tmp19_ = array;
			_tmp20_ = g_strdup ("-vcodec");
			g_ptr_array_add (_tmp19_, _tmp20_);
			_tmp21_ = array;
			_tmp22_ = g_strdup ("libx264");
			g_ptr_array_add (_tmp21_, _tmp22_);
			_tmp23_ = array;
			_tmp24_ = g_strdup ("-acodec");
			g_ptr_array_add (_tmp23_, _tmp24_);
			_tmp25_ = array;
			_tmp26_ = g_strdup ("aac");
			g_ptr_array_add (_tmp25_, _tmp26_);
		}
		_tmp27_ = self->priv->name_format_selected;
		_tmp28_ = g_utf8_strdown (_tmp27_, (gssize) -1);
		_tmp29_ = _tmp28_;
		_tmp30_ = g_strcmp0 (_tmp29_, "mmf") == 0;
		_g_free0 (_tmp29_);
		if (_tmp30_) {
			GPtrArray* _tmp31_;
			gchar* _tmp32_;
			GPtrArray* _tmp33_;
			gchar* _tmp34_;
			_tmp31_ = array;
			_tmp32_ = g_strdup ("-ar");
			g_ptr_array_add (_tmp31_, _tmp32_);
			_tmp33_ = array;
			_tmp34_ = g_strdup ("44100");
			g_ptr_array_add (_tmp33_, _tmp34_);
		}
		_tmp35_ = array;
		_tmp36_ = g_strdup ("-strict");
		g_ptr_array_add (_tmp35_, _tmp36_);
		_tmp37_ = array;
		_tmp38_ = g_strdup ("-2");
		g_ptr_array_add (_tmp37_, _tmp38_);
		_tmp39_ = array;
		_tmp40_ = new_file;
		_tmp41_ = g_strdup (_tmp40_);
		g_ptr_array_add (_tmp39_, _tmp41_);
	} else {
		if (self->priv->type_item == CIANO_ENUMS_TYPE_ITEM_ENUM_IMAGE) {
			GPtrArray* _tmp42_;
			gchar* _tmp43_;
			GPtrArray* _tmp44_;
			gchar* _tmp45_;
			GPtrArray* _tmp46_;
			const gchar* _tmp47_;
			gchar* _tmp48_;
			_tmp42_ = array;
			_tmp43_ = g_strdup ("convert");
			g_ptr_array_add (_tmp42_, _tmp43_);
			_tmp44_ = array;
			_tmp45_ = g_strdup (uri);
			g_ptr_array_add (_tmp44_, _tmp45_);
			_tmp46_ = array;
			_tmp47_ = new_file;
			_tmp48_ = g_strdup (_tmp47_);
			g_ptr_array_add (_tmp46_, _tmp48_);
		}
	}
	_tmp49_ = array;
	_tmp50_ = _tmp49_->pdata;
	_tmp50__length1 = _tmp49_->len;
	_tmp51_ = (_tmp50_ != NULL) ? _vala_array_dup1 (_tmp50_, _tmp50__length1) : _tmp50_;
	_tmp51__length1 = _tmp50__length1;
	_tmp52_ = _tmp51_;
	_tmp52__length1 = _tmp51__length1;
	if (result_length1) {
		*result_length1 = _tmp52__length1;
	}
	result = _tmp52_;
	_g_free0 (new_file);
	_g_ptr_array_unref0 (array);
	return result;
}

/**
         * Return the uri with the filename and extension to which it will be converted.
         * Method obeys the "paste output" rules in {@code DialogPreferences}.
         * 
         * @param  {@code string uri}
         * @return {@code void}
         */
static gchar*
ciano_controllers_converter_controller_get_uri_new_file (CianoControllersConverterController* self,
                                                         const gchar* uri)
{
	gchar* new_file = NULL;
	CianoServicesSettings* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (uri != NULL, NULL);
	_tmp0_ = self->priv->settings;
	_tmp1_ = ciano_services_settings_get_output_source_file_folder (_tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		gint index = 0;
		gchar* _tmp3_;
		gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		gchar* _tmp8_;
		index = string_last_index_of (uri, ".", 0);
		_tmp3_ = string_substring (uri, (glong) 0, (glong) (index + 1));
		_tmp4_ = _tmp3_;
		_tmp5_ = self->priv->name_format_selected;
		_tmp6_ = g_utf8_strdown (_tmp5_, (gssize) -1);
		_tmp7_ = _tmp6_;
		_tmp8_ = g_strconcat (_tmp4_, _tmp7_, NULL);
		_g_free0 (new_file);
		new_file = _tmp8_;
		_g_free0 (_tmp7_);
		_g_free0 (_tmp4_);
	} else {
		gint index_start = 0;
		gint index_end = 0;
		gchar* file = NULL;
		gchar* _tmp9_;
		gint index = 0;
		const gchar* _tmp10_;
		CianoServicesSettings* _tmp11_;
		const gchar* _tmp12_;
		const gchar* _tmp13_;
		const gchar* _tmp14_;
		gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		gchar* _tmp18_;
		const gchar* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		gchar* _tmp22_;
		index_start = string_last_index_of (uri, "/", 0);
		index_end = string_last_index_of (uri, ".", 0);
		_tmp9_ = string_substring (uri, (glong) index_start, (glong) (index_start - index_end));
		file = _tmp9_;
		_tmp10_ = file;
		index = string_last_index_of (_tmp10_, ".", 0);
		_tmp11_ = self->priv->settings;
		_tmp12_ = ciano_services_settings_get_output_folder (_tmp11_);
		_tmp13_ = _tmp12_;
		_tmp14_ = file;
		_tmp15_ = string_substring (_tmp14_, (glong) 0, (glong) (index + 1));
		_tmp16_ = _tmp15_;
		_tmp17_ = g_strconcat (_tmp13_, _tmp16_, NULL);
		_tmp18_ = _tmp17_;
		_tmp19_ = self->priv->name_format_selected;
		_tmp20_ = g_utf8_strdown (_tmp19_, (gssize) -1);
		_tmp21_ = _tmp20_;
		_tmp22_ = g_strconcat (_tmp18_, _tmp21_, NULL);
		_g_free0 (new_file);
		new_file = _tmp22_;
		_g_free0 (_tmp21_);
		_g_free0 (_tmp18_);
		_g_free0 (_tmp16_);
		_g_free0 (file);
	}
	result = new_file;
	return result;
}

/**
         * Send notification.
         * 
         * @param  {@code string}    file_name
         * @param  {@code string}    body_text
         * @return {@code void}
         */
static void
ciano_controllers_converter_controller_send_notification (CianoControllersConverterController* self,
                                                          const gchar* file_name,
                                                          const gchar* body_text)
{
	GNotification* notification = NULL;
	GNotification* _tmp0_;
	GtkImage* image = NULL;
	GtkImage* _tmp1_;
	GIcon* _tmp2_;
	GIcon* _tmp3_;
	GIcon* _tmp4_;
	GtkApplication* _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (file_name != NULL);
	g_return_if_fail (body_text != NULL);
	_tmp0_ = g_notification_new (file_name);
	notification = _tmp0_;
	_tmp1_ = (GtkImage*) gtk_image_new_from_icon_name ("com.github.robertsanseries.ciano", (GtkIconSize) GTK_ICON_SIZE_DIALOG);
	g_object_ref_sink (_tmp1_);
	image = _tmp1_;
	g_notification_set_body (notification, body_text);
	g_object_get (image, "gicon", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = _tmp3_;
	g_notification_set_icon (notification, _tmp4_);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = self->priv->application;
	g_application_send_notification ((GApplication*) _tmp5_, "finished", notification);
	_g_object_unref0 (image);
	_g_object_unref0 (notification);
}

/**
         * Mount array with supported formats.
         *
         * @see Ciano.Configs.Constants
         * @see get_array_formats_videos
         * @param  {@code string} name_format
         * @return {@code void}
         */
static gchar**
_vala_array_dup2 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static gchar**
ciano_controllers_converter_controller_mount_array_with_supported_formats (CianoControllersConverterController* self,
                                                                           const gchar* name_format,
                                                                           gint* result_length1)
{
	GPtrArray* formats = NULL;
	GPtrArray* _tmp0_;
	const gchar* _tmp1_;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	static GQuark _tmp2_label1 = 0;
	static GQuark _tmp2_label2 = 0;
	static GQuark _tmp2_label3 = 0;
	static GQuark _tmp2_label4 = 0;
	static GQuark _tmp2_label5 = 0;
	static GQuark _tmp2_label6 = 0;
	static GQuark _tmp2_label7 = 0;
	static GQuark _tmp2_label8 = 0;
	static GQuark _tmp2_label9 = 0;
	static GQuark _tmp2_label10 = 0;
	static GQuark _tmp2_label11 = 0;
	static GQuark _tmp2_label12 = 0;
	static GQuark _tmp2_label13 = 0;
	static GQuark _tmp2_label14 = 0;
	static GQuark _tmp2_label15 = 0;
	static GQuark _tmp2_label16 = 0;
	static GQuark _tmp2_label17 = 0;
	static GQuark _tmp2_label18 = 0;
	static GQuark _tmp2_label19 = 0;
	static GQuark _tmp2_label20 = 0;
	static GQuark _tmp2_label21 = 0;
	static GQuark _tmp2_label22 = 0;
	static GQuark _tmp2_label23 = 0;
	static GQuark _tmp2_label24 = 0;
	static GQuark _tmp2_label25 = 0;
	static GQuark _tmp2_label26 = 0;
	static GQuark _tmp2_label27 = 0;
	static GQuark _tmp2_label28 = 0;
	static GQuark _tmp2_label29 = 0;
	static GQuark _tmp2_label30 = 0;
	GPtrArray* _tmp79_;
	gpointer* _tmp80_;
	gint _tmp80__length1;
	gchar** _tmp81_;
	gint _tmp81__length1;
	gchar** _tmp82_;
	gint _tmp82__length1;
	gchar** result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (name_format != NULL, NULL);
	_tmp0_ = g_ptr_array_new_full ((guint) 0, _g_free0_);
	formats = _tmp0_;
	_tmp1_ = name_format;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_MP4)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp4_;
				_tmp4_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_CONFIGS_CONSTANTS_TEXT_MP4);
				_g_ptr_array_unref0 (formats);
				formats = _tmp4_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_3GP)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp5_;
				_tmp5_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_CONFIGS_CONSTANTS_TEXT_3GP);
				_g_ptr_array_unref0 (formats);
				formats = _tmp5_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_MPG)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp6_;
				_tmp6_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_CONFIGS_CONSTANTS_TEXT_MPG);
				_g_ptr_array_unref0 (formats);
				formats = _tmp6_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_AVI)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp7_;
				_tmp7_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_CONFIGS_CONSTANTS_TEXT_AVI);
				_g_ptr_array_unref0 (formats);
				formats = _tmp7_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_WMV)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp8_;
				_tmp8_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_CONFIGS_CONSTANTS_TEXT_WMV);
				_g_ptr_array_unref0 (formats);
				formats = _tmp8_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label5) ? _tmp2_label5 : (_tmp2_label5 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_FLV)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp9_;
				_tmp9_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_CONFIGS_CONSTANTS_TEXT_FLV);
				_g_ptr_array_unref0 (formats);
				formats = _tmp9_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label6) ? _tmp2_label6 : (_tmp2_label6 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_SWF)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp10_;
				_tmp10_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_CONFIGS_CONSTANTS_TEXT_SWF);
				_g_ptr_array_unref0 (formats);
				formats = _tmp10_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label7) ? _tmp2_label7 : (_tmp2_label7 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_MOV)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp11_;
				_tmp11_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_CONFIGS_CONSTANTS_TEXT_MOV);
				_g_ptr_array_unref0 (formats);
				formats = _tmp11_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label8) ? _tmp2_label8 : (_tmp2_label8 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_MKV)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp12_;
				_tmp12_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_CONFIGS_CONSTANTS_TEXT_MKV);
				_g_ptr_array_unref0 (formats);
				formats = _tmp12_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label9) ? _tmp2_label9 : (_tmp2_label9 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_VOB)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp13_;
				_tmp13_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_CONFIGS_CONSTANTS_TEXT_VOB);
				_g_ptr_array_unref0 (formats);
				formats = _tmp13_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label10) ? _tmp2_label10 : (_tmp2_label10 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_OGV)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp14_;
				_tmp14_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_CONFIGS_CONSTANTS_TEXT_OGV);
				_g_ptr_array_unref0 (formats);
				formats = _tmp14_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label11) ? _tmp2_label11 : (_tmp2_label11 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_WEBM)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp15_;
				_tmp15_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_CONFIGS_CONSTANTS_TEXT_WEBM);
				_g_ptr_array_unref0 (formats);
				formats = _tmp15_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label12) ? _tmp2_label12 : (_tmp2_label12 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_MP3)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp16_;
				GPtrArray* _tmp17_;
				GPtrArray* _tmp18_;
				GPtrArray* _tmp19_;
				GPtrArray* _tmp20_;
				_tmp16_ = ciano_controllers_converter_controller_get_array_formats_music (self, CIANO_CONFIGS_CONSTANTS_TEXT_MP3);
				_tmp17_ = _tmp16_;
				_tmp18_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_UTILS_STRING_UTIL_EMPTY);
				_tmp19_ = _tmp18_;
				_tmp20_ = ciano_utils_array_util_join_generic_string_arrays (_tmp17_, _tmp19_);
				_g_ptr_array_unref0 (formats);
				formats = _tmp20_;
				_g_ptr_array_unref0 (_tmp19_);
				_g_ptr_array_unref0 (_tmp17_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label13) ? _tmp2_label13 : (_tmp2_label13 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_WMA)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp21_;
				GPtrArray* _tmp22_;
				GPtrArray* _tmp23_;
				GPtrArray* _tmp24_;
				GPtrArray* _tmp25_;
				_tmp21_ = ciano_controllers_converter_controller_get_array_formats_music (self, CIANO_CONFIGS_CONSTANTS_TEXT_WMA);
				_tmp22_ = _tmp21_;
				_tmp23_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_UTILS_STRING_UTIL_EMPTY);
				_tmp24_ = _tmp23_;
				_tmp25_ = ciano_utils_array_util_join_generic_string_arrays (_tmp22_, _tmp24_);
				_g_ptr_array_unref0 (formats);
				formats = _tmp25_;
				_g_ptr_array_unref0 (_tmp24_);
				_g_ptr_array_unref0 (_tmp22_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label14) ? _tmp2_label14 : (_tmp2_label14 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_OGG)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp26_;
				GPtrArray* _tmp27_;
				GPtrArray* _tmp28_;
				GPtrArray* _tmp29_;
				GPtrArray* _tmp30_;
				_tmp26_ = ciano_controllers_converter_controller_get_array_formats_music (self, CIANO_CONFIGS_CONSTANTS_TEXT_OGG);
				_tmp27_ = _tmp26_;
				_tmp28_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_UTILS_STRING_UTIL_EMPTY);
				_tmp29_ = _tmp28_;
				_tmp30_ = ciano_utils_array_util_join_generic_string_arrays (_tmp27_, _tmp29_);
				_g_ptr_array_unref0 (formats);
				formats = _tmp30_;
				_g_ptr_array_unref0 (_tmp29_);
				_g_ptr_array_unref0 (_tmp27_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label15) ? _tmp2_label15 : (_tmp2_label15 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_WAV)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp31_;
				GPtrArray* _tmp32_;
				GPtrArray* _tmp33_;
				GPtrArray* _tmp34_;
				GPtrArray* _tmp35_;
				_tmp31_ = ciano_controllers_converter_controller_get_array_formats_music (self, CIANO_CONFIGS_CONSTANTS_TEXT_WAV);
				_tmp32_ = _tmp31_;
				_tmp33_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_UTILS_STRING_UTIL_EMPTY);
				_tmp34_ = _tmp33_;
				_tmp35_ = ciano_utils_array_util_join_generic_string_arrays (_tmp32_, _tmp34_);
				_g_ptr_array_unref0 (formats);
				formats = _tmp35_;
				_g_ptr_array_unref0 (_tmp34_);
				_g_ptr_array_unref0 (_tmp32_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label16) ? _tmp2_label16 : (_tmp2_label16 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_AAC)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp36_;
				GPtrArray* _tmp37_;
				GPtrArray* _tmp38_;
				GPtrArray* _tmp39_;
				GPtrArray* _tmp40_;
				_tmp36_ = ciano_controllers_converter_controller_get_array_formats_music (self, CIANO_CONFIGS_CONSTANTS_TEXT_AAC);
				_tmp37_ = _tmp36_;
				_tmp38_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_UTILS_STRING_UTIL_EMPTY);
				_tmp39_ = _tmp38_;
				_tmp40_ = ciano_utils_array_util_join_generic_string_arrays (_tmp37_, _tmp39_);
				_g_ptr_array_unref0 (formats);
				formats = _tmp40_;
				_g_ptr_array_unref0 (_tmp39_);
				_g_ptr_array_unref0 (_tmp37_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label17) ? _tmp2_label17 : (_tmp2_label17 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_FLAC)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp41_;
				GPtrArray* _tmp42_;
				GPtrArray* _tmp43_;
				GPtrArray* _tmp44_;
				GPtrArray* _tmp45_;
				_tmp41_ = ciano_controllers_converter_controller_get_array_formats_music (self, CIANO_CONFIGS_CONSTANTS_TEXT_FLAC);
				_tmp42_ = _tmp41_;
				_tmp43_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_UTILS_STRING_UTIL_EMPTY);
				_tmp44_ = _tmp43_;
				_tmp45_ = ciano_utils_array_util_join_generic_string_arrays (_tmp42_, _tmp44_);
				_g_ptr_array_unref0 (formats);
				formats = _tmp45_;
				_g_ptr_array_unref0 (_tmp44_);
				_g_ptr_array_unref0 (_tmp42_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label18) ? _tmp2_label18 : (_tmp2_label18 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_AIFF)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp46_;
				GPtrArray* _tmp47_;
				GPtrArray* _tmp48_;
				GPtrArray* _tmp49_;
				GPtrArray* _tmp50_;
				_tmp46_ = ciano_controllers_converter_controller_get_array_formats_music (self, CIANO_CONFIGS_CONSTANTS_TEXT_AIFF);
				_tmp47_ = _tmp46_;
				_tmp48_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_UTILS_STRING_UTIL_EMPTY);
				_tmp49_ = _tmp48_;
				_tmp50_ = ciano_utils_array_util_join_generic_string_arrays (_tmp47_, _tmp49_);
				_g_ptr_array_unref0 (formats);
				formats = _tmp50_;
				_g_ptr_array_unref0 (_tmp49_);
				_g_ptr_array_unref0 (_tmp47_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label19) ? _tmp2_label19 : (_tmp2_label19 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_MMF)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp51_;
				GPtrArray* _tmp52_;
				GPtrArray* _tmp53_;
				GPtrArray* _tmp54_;
				GPtrArray* _tmp55_;
				_tmp51_ = ciano_controllers_converter_controller_get_array_formats_music (self, CIANO_CONFIGS_CONSTANTS_TEXT_MMF);
				_tmp52_ = _tmp51_;
				_tmp53_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_UTILS_STRING_UTIL_EMPTY);
				_tmp54_ = _tmp53_;
				_tmp55_ = ciano_utils_array_util_join_generic_string_arrays (_tmp52_, _tmp54_);
				_g_ptr_array_unref0 (formats);
				formats = _tmp55_;
				_g_ptr_array_unref0 (_tmp54_);
				_g_ptr_array_unref0 (_tmp52_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label20) ? _tmp2_label20 : (_tmp2_label20 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_M4A)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp56_;
				GPtrArray* _tmp57_;
				GPtrArray* _tmp58_;
				GPtrArray* _tmp59_;
				GPtrArray* _tmp60_;
				_tmp56_ = ciano_controllers_converter_controller_get_array_formats_music (self, CIANO_CONFIGS_CONSTANTS_TEXT_M4A);
				_tmp57_ = _tmp56_;
				_tmp58_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_UTILS_STRING_UTIL_EMPTY);
				_tmp59_ = _tmp58_;
				_tmp60_ = ciano_utils_array_util_join_generic_string_arrays (_tmp57_, _tmp59_);
				_g_ptr_array_unref0 (formats);
				formats = _tmp60_;
				_g_ptr_array_unref0 (_tmp59_);
				_g_ptr_array_unref0 (_tmp57_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label21) ? _tmp2_label21 : (_tmp2_label21 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_OPUS)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp61_;
				GPtrArray* _tmp62_;
				GPtrArray* _tmp63_;
				GPtrArray* _tmp64_;
				GPtrArray* _tmp65_;
				_tmp61_ = ciano_controllers_converter_controller_get_array_formats_music (self, CIANO_CONFIGS_CONSTANTS_TEXT_OPUS);
				_tmp62_ = _tmp61_;
				_tmp63_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_UTILS_STRING_UTIL_EMPTY);
				_tmp64_ = _tmp63_;
				_tmp65_ = ciano_utils_array_util_join_generic_string_arrays (_tmp62_, _tmp64_);
				_g_ptr_array_unref0 (formats);
				formats = _tmp65_;
				_g_ptr_array_unref0 (_tmp64_);
				_g_ptr_array_unref0 (_tmp62_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label22) ? _tmp2_label22 : (_tmp2_label22 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_AT9)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp66_;
				GPtrArray* _tmp67_;
				GPtrArray* _tmp68_;
				GPtrArray* _tmp69_;
				GPtrArray* _tmp70_;
				_tmp66_ = ciano_controllers_converter_controller_get_array_formats_music (self, CIANO_CONFIGS_CONSTANTS_TEXT_AT9);
				_tmp67_ = _tmp66_;
				_tmp68_ = ciano_controllers_converter_controller_get_array_formats_videos (self, CIANO_UTILS_STRING_UTIL_EMPTY);
				_tmp69_ = _tmp68_;
				_tmp70_ = ciano_utils_array_util_join_generic_string_arrays (_tmp67_, _tmp69_);
				_g_ptr_array_unref0 (formats);
				formats = _tmp70_;
				_g_ptr_array_unref0 (_tmp69_);
				_g_ptr_array_unref0 (_tmp67_);
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label23) ? _tmp2_label23 : (_tmp2_label23 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_JPG)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp71_;
				_tmp71_ = ciano_controllers_converter_controller_get_array_formats_image (self, CIANO_CONFIGS_CONSTANTS_TEXT_JPG);
				_g_ptr_array_unref0 (formats);
				formats = _tmp71_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label24) ? _tmp2_label24 : (_tmp2_label24 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_BMP)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp72_;
				_tmp72_ = ciano_controllers_converter_controller_get_array_formats_image (self, CIANO_CONFIGS_CONSTANTS_TEXT_BMP);
				_g_ptr_array_unref0 (formats);
				formats = _tmp72_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label25) ? _tmp2_label25 : (_tmp2_label25 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_PNG)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp73_;
				_tmp73_ = ciano_controllers_converter_controller_get_array_formats_image (self, CIANO_CONFIGS_CONSTANTS_TEXT_PNG);
				_g_ptr_array_unref0 (formats);
				formats = _tmp73_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label26) ? _tmp2_label26 : (_tmp2_label26 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_TIF)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp74_;
				_tmp74_ = ciano_controllers_converter_controller_get_array_formats_image (self, CIANO_CONFIGS_CONSTANTS_TEXT_TIF);
				_g_ptr_array_unref0 (formats);
				formats = _tmp74_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label27) ? _tmp2_label27 : (_tmp2_label27 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_ICO)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp75_;
				_tmp75_ = ciano_controllers_converter_controller_get_array_formats_image (self, CIANO_CONFIGS_CONSTANTS_TEXT_ICO);
				_g_ptr_array_unref0 (formats);
				formats = _tmp75_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label28) ? _tmp2_label28 : (_tmp2_label28 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_GIF)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp76_;
				_tmp76_ = ciano_controllers_converter_controller_get_array_formats_image (self, CIANO_CONFIGS_CONSTANTS_TEXT_GIF);
				_g_ptr_array_unref0 (formats);
				formats = _tmp76_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label29) ? _tmp2_label29 : (_tmp2_label29 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_TGA)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp77_;
				_tmp77_ = ciano_controllers_converter_controller_get_array_formats_image (self, CIANO_CONFIGS_CONSTANTS_TEXT_TGA);
				_g_ptr_array_unref0 (formats);
				formats = _tmp77_;
				break;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label30) ? _tmp2_label30 : (_tmp2_label30 = g_quark_from_static_string (CIANO_CONFIGS_CONSTANTS_TEXT_WEBP)))) {
		switch (0) {
			default:
			{
				GPtrArray* _tmp78_;
				_tmp78_ = ciano_controllers_converter_controller_get_array_formats_image (self, CIANO_CONFIGS_CONSTANTS_TEXT_WEBP);
				_g_ptr_array_unref0 (formats);
				formats = _tmp78_;
				break;
			}
		}
	}
	_tmp79_ = formats;
	_tmp80_ = _tmp79_->pdata;
	_tmp80__length1 = _tmp79_->len;
	_tmp81_ = (_tmp80_ != NULL) ? _vala_array_dup2 (_tmp80_, _tmp80__length1) : _tmp80_;
	_tmp81__length1 = _tmp80__length1;
	_tmp82_ = _tmp81_;
	_tmp82__length1 = _tmp81__length1;
	if (result_length1) {
		*result_length1 = _tmp82__length1;
	}
	result = _tmp82_;
	_g_ptr_array_unref0 (formats);
	return result;
}

/**
         * Get array formats videos.
         *
         * @see Ciano.Configs.Constants
         * @see Ciano.Enums.TypeItemEnum
         * @param  {@code string} format_video
         * @return {@code string []}
         */
static GPtrArray*
ciano_controllers_converter_controller_get_array_formats_videos (CianoControllersConverterController* self,
                                                                 const gchar* format_video)
{
	GPtrArray* array = NULL;
	GPtrArray* _tmp0_;
	GPtrArray* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (format_video != NULL, NULL);
	_tmp0_ = g_ptr_array_new_full ((guint) 0, _g_free0_);
	array = _tmp0_;
	if (g_strcmp0 (format_video, CIANO_UTILS_STRING_UTIL_EMPTY) != 0) {
		self->priv->type_item = CIANO_ENUMS_TYPE_ITEM_ENUM_VIDEO;
	}
	if (g_strcmp0 (format_video, CIANO_CONFIGS_CONSTANTS_TEXT_MP4) != 0) {
		GPtrArray* _tmp1_;
		gchar* _tmp2_;
		GPtrArray* _tmp3_;
		gchar* _tmp4_;
		_tmp1_ = array;
		_tmp2_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_MP4);
		g_ptr_array_add (_tmp1_, _tmp2_);
		_tmp3_ = array;
		_tmp4_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_MP4, (gssize) -1);
		g_ptr_array_add (_tmp3_, _tmp4_);
	}
	if (g_strcmp0 (format_video, CIANO_CONFIGS_CONSTANTS_TEXT_3GP) != 0) {
		GPtrArray* _tmp5_;
		gchar* _tmp6_;
		GPtrArray* _tmp7_;
		gchar* _tmp8_;
		_tmp5_ = array;
		_tmp6_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_3GP);
		g_ptr_array_add (_tmp5_, _tmp6_);
		_tmp7_ = array;
		_tmp8_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_3GP, (gssize) -1);
		g_ptr_array_add (_tmp7_, _tmp8_);
	}
	if (g_strcmp0 (format_video, CIANO_CONFIGS_CONSTANTS_TEXT_MPG) != 0) {
		GPtrArray* _tmp9_;
		gchar* _tmp10_;
		GPtrArray* _tmp11_;
		gchar* _tmp12_;
		_tmp9_ = array;
		_tmp10_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_MPG);
		g_ptr_array_add (_tmp9_, _tmp10_);
		_tmp11_ = array;
		_tmp12_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_MPG, (gssize) -1);
		g_ptr_array_add (_tmp11_, _tmp12_);
	}
	if (g_strcmp0 (format_video, CIANO_CONFIGS_CONSTANTS_TEXT_AVI) != 0) {
		GPtrArray* _tmp13_;
		gchar* _tmp14_;
		GPtrArray* _tmp15_;
		gchar* _tmp16_;
		_tmp13_ = array;
		_tmp14_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_AVI);
		g_ptr_array_add (_tmp13_, _tmp14_);
		_tmp15_ = array;
		_tmp16_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_AVI, (gssize) -1);
		g_ptr_array_add (_tmp15_, _tmp16_);
	}
	if (g_strcmp0 (format_video, CIANO_CONFIGS_CONSTANTS_TEXT_WMV) != 0) {
		GPtrArray* _tmp17_;
		gchar* _tmp18_;
		GPtrArray* _tmp19_;
		gchar* _tmp20_;
		_tmp17_ = array;
		_tmp18_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_WMV);
		g_ptr_array_add (_tmp17_, _tmp18_);
		_tmp19_ = array;
		_tmp20_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_WMV, (gssize) -1);
		g_ptr_array_add (_tmp19_, _tmp20_);
	}
	if (g_strcmp0 (format_video, CIANO_CONFIGS_CONSTANTS_TEXT_FLV) != 0) {
		GPtrArray* _tmp21_;
		gchar* _tmp22_;
		GPtrArray* _tmp23_;
		gchar* _tmp24_;
		_tmp21_ = array;
		_tmp22_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_FLV);
		g_ptr_array_add (_tmp21_, _tmp22_);
		_tmp23_ = array;
		_tmp24_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_FLV, (gssize) -1);
		g_ptr_array_add (_tmp23_, _tmp24_);
	}
	if (g_strcmp0 (format_video, CIANO_CONFIGS_CONSTANTS_TEXT_SWF) != 0) {
		GPtrArray* _tmp25_;
		gchar* _tmp26_;
		GPtrArray* _tmp27_;
		gchar* _tmp28_;
		_tmp25_ = array;
		_tmp26_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_SWF);
		g_ptr_array_add (_tmp25_, _tmp26_);
		_tmp27_ = array;
		_tmp28_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_SWF, (gssize) -1);
		g_ptr_array_add (_tmp27_, _tmp28_);
	}
	if (g_strcmp0 (format_video, CIANO_CONFIGS_CONSTANTS_TEXT_MOV) != 0) {
		GPtrArray* _tmp29_;
		gchar* _tmp30_;
		GPtrArray* _tmp31_;
		gchar* _tmp32_;
		_tmp29_ = array;
		_tmp30_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_MOV);
		g_ptr_array_add (_tmp29_, _tmp30_);
		_tmp31_ = array;
		_tmp32_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_MOV, (gssize) -1);
		g_ptr_array_add (_tmp31_, _tmp32_);
	}
	if (g_strcmp0 (format_video, CIANO_CONFIGS_CONSTANTS_TEXT_MKV) != 0) {
		GPtrArray* _tmp33_;
		gchar* _tmp34_;
		GPtrArray* _tmp35_;
		gchar* _tmp36_;
		_tmp33_ = array;
		_tmp34_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_MKV);
		g_ptr_array_add (_tmp33_, _tmp34_);
		_tmp35_ = array;
		_tmp36_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_MKV, (gssize) -1);
		g_ptr_array_add (_tmp35_, _tmp36_);
	}
	if (g_strcmp0 (format_video, CIANO_CONFIGS_CONSTANTS_TEXT_VOB) != 0) {
		GPtrArray* _tmp37_;
		gchar* _tmp38_;
		GPtrArray* _tmp39_;
		gchar* _tmp40_;
		_tmp37_ = array;
		_tmp38_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_VOB);
		g_ptr_array_add (_tmp37_, _tmp38_);
		_tmp39_ = array;
		_tmp40_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_VOB, (gssize) -1);
		g_ptr_array_add (_tmp39_, _tmp40_);
	}
	if (g_strcmp0 (format_video, CIANO_CONFIGS_CONSTANTS_TEXT_OGV) != 0) {
		GPtrArray* _tmp41_;
		gchar* _tmp42_;
		GPtrArray* _tmp43_;
		gchar* _tmp44_;
		_tmp41_ = array;
		_tmp42_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_OGV);
		g_ptr_array_add (_tmp41_, _tmp42_);
		_tmp43_ = array;
		_tmp44_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_OGV, (gssize) -1);
		g_ptr_array_add (_tmp43_, _tmp44_);
	}
	if (g_strcmp0 (format_video, CIANO_CONFIGS_CONSTANTS_TEXT_WEBM) != 0) {
		GPtrArray* _tmp45_;
		gchar* _tmp46_;
		GPtrArray* _tmp47_;
		gchar* _tmp48_;
		_tmp45_ = array;
		_tmp46_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_WEBM);
		g_ptr_array_add (_tmp45_, _tmp46_);
		_tmp47_ = array;
		_tmp48_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_WEBM, (gssize) -1);
		g_ptr_array_add (_tmp47_, _tmp48_);
	}
	result = array;
	return result;
}

/**
         * Get array formats music.
         *
         * @see Ciano.Configs.Constants
         * @see Ciano.Enums.TypeItemEnum
         * @param  {@code string} format_music
         * @return {@code void}
         */
static GPtrArray*
ciano_controllers_converter_controller_get_array_formats_music (CianoControllersConverterController* self,
                                                                const gchar* format_music)
{
	GPtrArray* array = NULL;
	GPtrArray* _tmp0_;
	GPtrArray* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (format_music != NULL, NULL);
	_tmp0_ = g_ptr_array_new_full ((guint) 0, _g_free0_);
	array = _tmp0_;
	if (g_strcmp0 (format_music, CIANO_UTILS_STRING_UTIL_EMPTY) != 0) {
		self->priv->type_item = CIANO_ENUMS_TYPE_ITEM_ENUM_MUSIC;
	}
	if (g_strcmp0 (format_music, CIANO_CONFIGS_CONSTANTS_TEXT_MP3) != 0) {
		GPtrArray* _tmp1_;
		gchar* _tmp2_;
		GPtrArray* _tmp3_;
		gchar* _tmp4_;
		_tmp1_ = array;
		_tmp2_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_MP3);
		g_ptr_array_add (_tmp1_, _tmp2_);
		_tmp3_ = array;
		_tmp4_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_MP3, (gssize) -1);
		g_ptr_array_add (_tmp3_, _tmp4_);
	}
	if (g_strcmp0 (format_music, CIANO_CONFIGS_CONSTANTS_TEXT_WMA) != 0) {
		GPtrArray* _tmp5_;
		gchar* _tmp6_;
		GPtrArray* _tmp7_;
		gchar* _tmp8_;
		_tmp5_ = array;
		_tmp6_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_WMA);
		g_ptr_array_add (_tmp5_, _tmp6_);
		_tmp7_ = array;
		_tmp8_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_WMA, (gssize) -1);
		g_ptr_array_add (_tmp7_, _tmp8_);
	}
	if (g_strcmp0 (format_music, CIANO_CONFIGS_CONSTANTS_TEXT_AMR) != 0) {
		GPtrArray* _tmp9_;
		gchar* _tmp10_;
		GPtrArray* _tmp11_;
		gchar* _tmp12_;
		_tmp9_ = array;
		_tmp10_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_AMR);
		g_ptr_array_add (_tmp9_, _tmp10_);
		_tmp11_ = array;
		_tmp12_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_AMR, (gssize) -1);
		g_ptr_array_add (_tmp11_, _tmp12_);
	}
	if (g_strcmp0 (format_music, CIANO_CONFIGS_CONSTANTS_TEXT_OGG) != 0) {
		GPtrArray* _tmp13_;
		gchar* _tmp14_;
		GPtrArray* _tmp15_;
		gchar* _tmp16_;
		_tmp13_ = array;
		_tmp14_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_OGG);
		g_ptr_array_add (_tmp13_, _tmp14_);
		_tmp15_ = array;
		_tmp16_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_OGG, (gssize) -1);
		g_ptr_array_add (_tmp15_, _tmp16_);
	}
	if (g_strcmp0 (format_music, CIANO_CONFIGS_CONSTANTS_TEXT_WAV) != 0) {
		GPtrArray* _tmp17_;
		gchar* _tmp18_;
		GPtrArray* _tmp19_;
		gchar* _tmp20_;
		_tmp17_ = array;
		_tmp18_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_WAV);
		g_ptr_array_add (_tmp17_, _tmp18_);
		_tmp19_ = array;
		_tmp20_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_WAV, (gssize) -1);
		g_ptr_array_add (_tmp19_, _tmp20_);
	}
	if (g_strcmp0 (format_music, CIANO_CONFIGS_CONSTANTS_TEXT_AAC) != 0) {
		GPtrArray* _tmp21_;
		gchar* _tmp22_;
		GPtrArray* _tmp23_;
		gchar* _tmp24_;
		_tmp21_ = array;
		_tmp22_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_AAC);
		g_ptr_array_add (_tmp21_, _tmp22_);
		_tmp23_ = array;
		_tmp24_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_AAC, (gssize) -1);
		g_ptr_array_add (_tmp23_, _tmp24_);
	}
	if (g_strcmp0 (format_music, CIANO_CONFIGS_CONSTANTS_TEXT_FLAC) != 0) {
		GPtrArray* _tmp25_;
		gchar* _tmp26_;
		GPtrArray* _tmp27_;
		gchar* _tmp28_;
		_tmp25_ = array;
		_tmp26_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_FLAC);
		g_ptr_array_add (_tmp25_, _tmp26_);
		_tmp27_ = array;
		_tmp28_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_FLAC, (gssize) -1);
		g_ptr_array_add (_tmp27_, _tmp28_);
	}
	if (g_strcmp0 (format_music, CIANO_CONFIGS_CONSTANTS_TEXT_AIFF) != 0) {
		GPtrArray* _tmp29_;
		gchar* _tmp30_;
		GPtrArray* _tmp31_;
		gchar* _tmp32_;
		_tmp29_ = array;
		_tmp30_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_AIFF);
		g_ptr_array_add (_tmp29_, _tmp30_);
		_tmp31_ = array;
		_tmp32_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_AIFF, (gssize) -1);
		g_ptr_array_add (_tmp31_, _tmp32_);
	}
	if (g_strcmp0 (format_music, CIANO_CONFIGS_CONSTANTS_TEXT_MMF) != 0) {
		GPtrArray* _tmp33_;
		gchar* _tmp34_;
		GPtrArray* _tmp35_;
		gchar* _tmp36_;
		_tmp33_ = array;
		_tmp34_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_MMF);
		g_ptr_array_add (_tmp33_, _tmp34_);
		_tmp35_ = array;
		_tmp36_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_MMF, (gssize) -1);
		g_ptr_array_add (_tmp35_, _tmp36_);
	}
	if (g_strcmp0 (format_music, CIANO_CONFIGS_CONSTANTS_TEXT_M4A) != 0) {
		GPtrArray* _tmp37_;
		gchar* _tmp38_;
		GPtrArray* _tmp39_;
		gchar* _tmp40_;
		_tmp37_ = array;
		_tmp38_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_M4A);
		g_ptr_array_add (_tmp37_, _tmp38_);
		_tmp39_ = array;
		_tmp40_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_M4A, (gssize) -1);
		g_ptr_array_add (_tmp39_, _tmp40_);
	}
	if (g_strcmp0 (format_music, CIANO_CONFIGS_CONSTANTS_TEXT_OPUS) != 0) {
		GPtrArray* _tmp41_;
		gchar* _tmp42_;
		GPtrArray* _tmp43_;
		gchar* _tmp44_;
		_tmp41_ = array;
		_tmp42_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_OPUS);
		g_ptr_array_add (_tmp41_, _tmp42_);
		_tmp43_ = array;
		_tmp44_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_OPUS, (gssize) -1);
		g_ptr_array_add (_tmp43_, _tmp44_);
	}
	result = array;
	return result;
}

/**
         * Get array formats image.
         *
         * @see Ciano.Configs.Constants
         * @see Ciano.Enums.TypeItemEnum
         * @param  {@code string} format_image
         * @return {@code string []}
         * @since 0.1.5
         */
static GPtrArray*
ciano_controllers_converter_controller_get_array_formats_image (CianoControllersConverterController* self,
                                                                const gchar* format_image)
{
	GPtrArray* array = NULL;
	GPtrArray* _tmp0_;
	GPtrArray* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (format_image != NULL, NULL);
	_tmp0_ = g_ptr_array_new_full ((guint) 0, _g_free0_);
	array = _tmp0_;
	if (g_strcmp0 (format_image, CIANO_UTILS_STRING_UTIL_EMPTY) != 0) {
		self->priv->type_item = CIANO_ENUMS_TYPE_ITEM_ENUM_IMAGE;
	}
	if (g_strcmp0 (format_image, CIANO_CONFIGS_CONSTANTS_TEXT_JPG) != 0) {
		GPtrArray* _tmp1_;
		gchar* _tmp2_;
		GPtrArray* _tmp3_;
		gchar* _tmp4_;
		_tmp1_ = array;
		_tmp2_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_JPG);
		g_ptr_array_add (_tmp1_, _tmp2_);
		_tmp3_ = array;
		_tmp4_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_JPG, (gssize) -1);
		g_ptr_array_add (_tmp3_, _tmp4_);
	}
	if (g_strcmp0 (format_image, CIANO_CONFIGS_CONSTANTS_TEXT_BMP) != 0) {
		GPtrArray* _tmp5_;
		gchar* _tmp6_;
		GPtrArray* _tmp7_;
		gchar* _tmp8_;
		_tmp5_ = array;
		_tmp6_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_BMP);
		g_ptr_array_add (_tmp5_, _tmp6_);
		_tmp7_ = array;
		_tmp8_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_BMP, (gssize) -1);
		g_ptr_array_add (_tmp7_, _tmp8_);
	}
	if (g_strcmp0 (format_image, CIANO_CONFIGS_CONSTANTS_TEXT_PNG) != 0) {
		GPtrArray* _tmp9_;
		gchar* _tmp10_;
		GPtrArray* _tmp11_;
		gchar* _tmp12_;
		_tmp9_ = array;
		_tmp10_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_PNG);
		g_ptr_array_add (_tmp9_, _tmp10_);
		_tmp11_ = array;
		_tmp12_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_PNG, (gssize) -1);
		g_ptr_array_add (_tmp11_, _tmp12_);
	}
	if (g_strcmp0 (format_image, CIANO_CONFIGS_CONSTANTS_TEXT_TIF) != 0) {
		GPtrArray* _tmp13_;
		gchar* _tmp14_;
		GPtrArray* _tmp15_;
		gchar* _tmp16_;
		_tmp13_ = array;
		_tmp14_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_TIF);
		g_ptr_array_add (_tmp13_, _tmp14_);
		_tmp15_ = array;
		_tmp16_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_TIF, (gssize) -1);
		g_ptr_array_add (_tmp15_, _tmp16_);
	}
	if (g_strcmp0 (format_image, CIANO_CONFIGS_CONSTANTS_TEXT_ICO) != 0) {
		GPtrArray* _tmp17_;
		gchar* _tmp18_;
		GPtrArray* _tmp19_;
		gchar* _tmp20_;
		_tmp17_ = array;
		_tmp18_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_ICO);
		g_ptr_array_add (_tmp17_, _tmp18_);
		_tmp19_ = array;
		_tmp20_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_ICO, (gssize) -1);
		g_ptr_array_add (_tmp19_, _tmp20_);
	}
	if (g_strcmp0 (format_image, CIANO_CONFIGS_CONSTANTS_TEXT_GIF) != 0) {
		GPtrArray* _tmp21_;
		gchar* _tmp22_;
		GPtrArray* _tmp23_;
		gchar* _tmp24_;
		_tmp21_ = array;
		_tmp22_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_GIF);
		g_ptr_array_add (_tmp21_, _tmp22_);
		_tmp23_ = array;
		_tmp24_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_GIF, (gssize) -1);
		g_ptr_array_add (_tmp23_, _tmp24_);
	}
	if (g_strcmp0 (format_image, CIANO_CONFIGS_CONSTANTS_TEXT_TGA) != 0) {
		GPtrArray* _tmp25_;
		gchar* _tmp26_;
		GPtrArray* _tmp27_;
		gchar* _tmp28_;
		_tmp25_ = array;
		_tmp26_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_TGA);
		g_ptr_array_add (_tmp25_, _tmp26_);
		_tmp27_ = array;
		_tmp28_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_TGA, (gssize) -1);
		g_ptr_array_add (_tmp27_, _tmp28_);
	}
	if (g_strcmp0 (format_image, CIANO_CONFIGS_CONSTANTS_TEXT_WEBP) != 0) {
		GPtrArray* _tmp29_;
		gchar* _tmp30_;
		GPtrArray* _tmp31_;
		gchar* _tmp32_;
		_tmp29_ = array;
		_tmp30_ = g_strdup (CIANO_CONFIGS_CONSTANTS_TEXT_WEBP);
		g_ptr_array_add (_tmp29_, _tmp30_);
		_tmp31_ = array;
		_tmp32_ = g_utf8_strup (CIANO_CONFIGS_CONSTANTS_TEXT_WEBP, (gssize) -1);
		g_ptr_array_add (_tmp31_, _tmp32_);
	}
	result = array;
	return result;
}

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

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

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

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

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

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

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

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

void
ciano_controllers_value_set_converter_controller (GValue* value,
                                                  gpointer v_object)
{
	CianoControllersConverterController * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, CIANO_CONTROLLERS_TYPE_CONVERTER_CONTROLLER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, CIANO_CONTROLLERS_TYPE_CONVERTER_CONTROLLER));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		ciano_controllers_converter_controller_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		ciano_controllers_converter_controller_unref (old);
	}
}

void
ciano_controllers_value_take_converter_controller (GValue* value,
                                                   gpointer v_object)
{
	CianoControllersConverterController * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, CIANO_CONTROLLERS_TYPE_CONVERTER_CONTROLLER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, CIANO_CONTROLLERS_TYPE_CONVERTER_CONTROLLER));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		ciano_controllers_converter_controller_unref (old);
	}
}

static void
ciano_controllers_converter_controller_class_init (CianoControllersConverterControllerClass * klass,
                                                   gpointer klass_data)
{
	ciano_controllers_converter_controller_parent_class = g_type_class_peek_parent (klass);
	((CianoControllersConverterControllerClass *) klass)->finalize = ciano_controllers_converter_controller_finalize;
	g_type_class_adjust_private_offset (klass, &CianoControllersConverterController_private_offset);
}

static void
ciano_controllers_converter_controller_instance_init (CianoControllersConverterController * self,
                                                      gpointer klass)
{
	self->priv = ciano_controllers_converter_controller_get_instance_private (self);
	self->ref_count = 1;
}

static void
ciano_controllers_converter_controller_finalize (CianoControllersConverterController * obj)
{
	CianoControllersConverterController * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CIANO_CONTROLLERS_TYPE_CONVERTER_CONTROLLER, CianoControllersConverterController);
	g_signal_handlers_destroy (self);
	_g_object_unref0 (self->convertions);
	_g_object_unref0 (self->priv->list_items);
	_g_object_unref0 (self->priv->application);
	_g_object_unref0 (self->priv->settings);
	_g_object_unref0 (self->priv->converter_view);
	_g_object_unref0 (self->priv->dialog_preferences);
	_g_object_unref0 (self->priv->dialog_convert_file);
	_g_free0 (self->priv->name_format_selected);
}

/**
     * The {@code ConverterController} class is responsible for handling all the major
     * rules and actions of the application.
     *
     * @since 0.1.0
     */
static GType
ciano_controllers_converter_controller_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { ciano_controllers_value_converter_controller_init, ciano_controllers_value_converter_controller_free_value, ciano_controllers_value_converter_controller_copy_value, ciano_controllers_value_converter_controller_peek_pointer, "p", ciano_controllers_value_converter_controller_collect_value, "p", ciano_controllers_value_converter_controller_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (CianoControllersConverterControllerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ciano_controllers_converter_controller_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (CianoControllersConverterController), 0, (GInstanceInitFunc) ciano_controllers_converter_controller_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType ciano_controllers_converter_controller_type_id;
	ciano_controllers_converter_controller_type_id = g_type_register_fundamental (g_type_fundamental_next (), "CianoControllersConverterController", &g_define_type_info, &g_define_type_fundamental_info, 0);
	CianoControllersConverterController_private_offset = g_type_add_instance_private (ciano_controllers_converter_controller_type_id, sizeof (CianoControllersConverterControllerPrivate));
	return ciano_controllers_converter_controller_type_id;
}

GType
ciano_controllers_converter_controller_get_type (void)
{
	static volatile gsize ciano_controllers_converter_controller_type_id__once = 0;
	if (g_once_init_enter (&ciano_controllers_converter_controller_type_id__once)) {
		GType ciano_controllers_converter_controller_type_id;
		ciano_controllers_converter_controller_type_id = ciano_controllers_converter_controller_get_type_once ();
		g_once_init_leave (&ciano_controllers_converter_controller_type_id__once, ciano_controllers_converter_controller_type_id);
	}
	return ciano_controllers_converter_controller_type_id__once;
}

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

void
ciano_controllers_converter_controller_unref (gpointer instance)
{
	CianoControllersConverterController * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		CIANO_CONTROLLERS_CONVERTER_CONTROLLER_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

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);
}

