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

/*
 * Copyright © 2025 Alain M. (https://github.com/alainm23/planify)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA
 *
 * Authored by: Alain M. <alainmh23@gmail.com>
 */

#include <adwaita.h>
#include <glib-object.h>
#include <gee.h>
#include <glib.h>
#include "planify.h"
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>

#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 DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE (dialogs_preferences_pages_base_page_get_type ())
#define DIALOGS_PREFERENCES_PAGES_BASE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, DialogsPreferencesPagesBasePage))
#define DIALOGS_PREFERENCES_PAGES_BASE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, DialogsPreferencesPagesBasePageClass))
#define DIALOGS_PREFERENCES_PAGES_IS_BASE_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE))
#define DIALOGS_PREFERENCES_PAGES_IS_BASE_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE))
#define DIALOGS_PREFERENCES_PAGES_BASE_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, DialogsPreferencesPagesBasePageClass))

typedef struct _DialogsPreferencesPagesBasePage DialogsPreferencesPagesBasePage;
typedef struct _DialogsPreferencesPagesBasePageClass DialogsPreferencesPagesBasePageClass;
typedef struct _DialogsPreferencesPagesBasePagePrivate DialogsPreferencesPagesBasePagePrivate;

#define DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP (dialogs_preferences_pages_nextcloud_setup_get_type ())
#define DIALOGS_PREFERENCES_PAGES_NEXTCLOUD_SETUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP, DialogsPreferencesPagesNextcloudSetup))
#define DIALOGS_PREFERENCES_PAGES_NEXTCLOUD_SETUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP, DialogsPreferencesPagesNextcloudSetupClass))
#define DIALOGS_PREFERENCES_PAGES_IS_NEXTCLOUD_SETUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP))
#define DIALOGS_PREFERENCES_PAGES_IS_NEXTCLOUD_SETUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP))
#define DIALOGS_PREFERENCES_PAGES_NEXTCLOUD_SETUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP, DialogsPreferencesPagesNextcloudSetupClass))

typedef struct _DialogsPreferencesPagesNextcloudSetup DialogsPreferencesPagesNextcloudSetup;
typedef struct _DialogsPreferencesPagesNextcloudSetupClass DialogsPreferencesPagesNextcloudSetupClass;
typedef struct _DialogsPreferencesPagesNextcloudSetupPrivate DialogsPreferencesPagesNextcloudSetupPrivate;

#define DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS (dialogs_preferences_pages_accounts_get_type ())
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS, DialogsPreferencesPagesAccounts))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS, DialogsPreferencesPagesAccountsClass))
#define DIALOGS_PREFERENCES_PAGES_IS_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS))
#define DIALOGS_PREFERENCES_PAGES_IS_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS, DialogsPreferencesPagesAccountsClass))

typedef struct _DialogsPreferencesPagesAccounts DialogsPreferencesPagesAccounts;
typedef struct _DialogsPreferencesPagesAccountsClass DialogsPreferencesPagesAccountsClass;

#define WIDGETS_TYPE_IGNORE_SSL_SWITCH_ROW (widgets_ignore_ssl_switch_row_get_type ())
#define WIDGETS_IGNORE_SSL_SWITCH_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_IGNORE_SSL_SWITCH_ROW, WidgetsIgnoreSSLSwitchRow))
#define WIDGETS_IGNORE_SSL_SWITCH_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_IGNORE_SSL_SWITCH_ROW, WidgetsIgnoreSSLSwitchRowClass))
#define WIDGETS_IS_IGNORE_SSL_SWITCH_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_IGNORE_SSL_SWITCH_ROW))
#define WIDGETS_IS_IGNORE_SSL_SWITCH_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_IGNORE_SSL_SWITCH_ROW))
#define WIDGETS_IGNORE_SSL_SWITCH_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_IGNORE_SSL_SWITCH_ROW, WidgetsIgnoreSSLSwitchRowClass))

typedef struct _WidgetsIgnoreSSLSwitchRow WidgetsIgnoreSSLSwitchRow;
typedef struct _WidgetsIgnoreSSLSwitchRowClass WidgetsIgnoreSSLSwitchRowClass;
enum  {
	DIALOGS_PREFERENCES_PAGES_NEXTCLOUD_SETUP_0_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_NEXTCLOUD_SETUP_ACCOUNTS_PAGE_PROPERTY,
	DIALOGS_PREFERENCES_PAGES_NEXTCLOUD_SETUP_NUM_PROPERTIES
};
static GParamSpec* dialogs_preferences_pages_nextcloud_setup_properties[DIALOGS_PREFERENCES_PAGES_NEXTCLOUD_SETUP_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block110Data Block110Data;
typedef struct _Block111Data Block111Data;
#define _http_response_unref0(var) ((var == NULL) ? NULL : (var = (http_response_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE (dialogs_preferences_pages_accounts_loading_page_get_type ())
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE, DialogsPreferencesPagesAccountsLoadingPage))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE, DialogsPreferencesPagesAccountsLoadingPageClass))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_IS_LOADING_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_IS_LOADING_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE))
#define DIALOGS_PREFERENCES_PAGES_ACCOUNTS_LOADING_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIALOGS_PREFERENCES_PAGES_ACCOUNTS_TYPE_LOADING_PAGE, DialogsPreferencesPagesAccountsLoadingPageClass))

typedef struct _DialogsPreferencesPagesAccountsLoadingPage DialogsPreferencesPagesAccountsLoadingPage;
typedef struct _DialogsPreferencesPagesAccountsLoadingPageClass DialogsPreferencesPagesAccountsLoadingPageClass;
typedef struct _Block112Data Block112Data;

struct _DialogsPreferencesPagesBasePage {
	AdwNavigationPage parent_instance;
	DialogsPreferencesPagesBasePagePrivate * priv;
	GeeHashMap* signal_map;
};

struct _DialogsPreferencesPagesBasePageClass {
	AdwNavigationPageClass parent_class;
	void (*clean_up) (DialogsPreferencesPagesBasePage* self);
};

struct _DialogsPreferencesPagesNextcloudSetup {
	DialogsPreferencesPagesBasePage parent_instance;
	DialogsPreferencesPagesNextcloudSetupPrivate * priv;
};

struct _DialogsPreferencesPagesNextcloudSetupClass {
	DialogsPreferencesPagesBasePageClass parent_class;
};

struct _DialogsPreferencesPagesNextcloudSetupPrivate {
	DialogsPreferencesPagesAccounts* _accounts_page;
	AdwEntryRow* server_entry;
	WidgetsLoadingButton* login_button;
	GtkButton* cancel_button;
	GtkStack* main_stack;
	WidgetsIgnoreSSLSwitchRow* ignore_ssl_row;
};

struct _Block110Data {
	int _ref_count_;
	DialogsPreferencesPagesNextcloudSetup* self;
	GCancellable* cancellable;
	ServicesCalDAVCore* core_service;
	ServicesCalDAVProvidersNextcloud* nextcloud_provider;
};

struct _Block111Data {
	int _ref_count_;
	Block110Data * _data110_;
	HttpResponse* response;
};

struct _Block112Data {
	int _ref_count_;
	DialogsPreferencesPagesNextcloudSetup* self;
	DialogsPreferencesPagesAccountsLoadingPage* loading_page;
};

static gint DialogsPreferencesPagesNextcloudSetup_private_offset;
static gpointer dialogs_preferences_pages_nextcloud_setup_parent_class = NULL;

VALA_EXTERN GType dialogs_preferences_pages_base_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesBasePage, g_object_unref)
VALA_EXTERN GType dialogs_preferences_pages_nextcloud_setup_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesNextcloudSetup, g_object_unref)
VALA_EXTERN GType dialogs_preferences_pages_accounts_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesAccounts, g_object_unref)
VALA_EXTERN GType widgets_ignore_ssl_switch_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsIgnoreSSLSwitchRow, g_object_unref)
VALA_EXTERN DialogsPreferencesPagesNextcloudSetup* dialogs_preferences_pages_nextcloud_setup_new (AdwPreferencesDialog* preferences_dialog,
                                                                                      DialogsPreferencesPagesAccounts* accounts_page);
VALA_EXTERN DialogsPreferencesPagesNextcloudSetup* dialogs_preferences_pages_nextcloud_setup_construct (GType object_type,
                                                                                            AdwPreferencesDialog* preferences_dialog,
                                                                                            DialogsPreferencesPagesAccounts* accounts_page);
static void dialogs_preferences_pages_nextcloud_setup_on_login_button_clicked (DialogsPreferencesPagesNextcloudSetup* self);
static Block110Data* block110_data_ref (Block110Data* _data110_);
static void block110_data_unref (void * _userdata_);
static void __lambda312_ (Block110Data* _data110_);
static void ___lambda312__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
VALA_EXTERN gboolean widgets_ignore_ssl_switch_row_get_active (WidgetsIgnoreSSLSwitchRow* self);
static void __lambda313_ (Block110Data* _data110_,
                   GObject* obj,
                   GAsyncResult* res);
static Block111Data* block111_data_ref (Block111Data* _data111_);
static void block111_data_unref (void * _userdata_);
static void ___lambda314_ (Block111Data* _data111_,
                    GObject* obj,
                    GAsyncResult* res);
VALA_EXTERN AdwPreferencesDialog* dialogs_preferences_pages_base_page_get_preferences_dialog (DialogsPreferencesPagesBasePage* self);
VALA_EXTERN DialogsPreferencesPagesAccounts* dialogs_preferences_pages_nextcloud_setup_get_accounts_page (DialogsPreferencesPagesNextcloudSetup* self);
VALA_EXTERN void dialogs_preferences_pages_accounts_show_message_error (DialogsPreferencesPagesAccounts* self,
                                                            gint error_code,
                                                            const gchar* error_message,
                                                            gboolean visible_issue_button);
static void ____lambda314__gasync_ready_callback (GObject* source_object,
                                           GAsyncResult* res,
                                           gpointer self);
static void ___lambda313__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static gboolean dialogs_preferences_pages_nextcloud_setup_is_valid_url (DialogsPreferencesPagesNextcloudSetup* self,
                                                                 const gchar* uri);
static void dialogs_preferences_pages_nextcloud_setup_set_accounts_page (DialogsPreferencesPagesNextcloudSetup* self,
                                                                  DialogsPreferencesPagesAccounts* value);
static GObject * dialogs_preferences_pages_nextcloud_setup_constructor (GType type,
                                                                 guint n_construct_properties,
                                                                 GObjectConstructParam * construct_properties);
VALA_EXTERN GType dialogs_preferences_pages_accounts_loading_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DialogsPreferencesPagesAccountsLoadingPage, g_object_unref)
static Block112Data* block112_data_ref (Block112Data* _data112_);
static void block112_data_unref (void * _userdata_);
VALA_EXTERN WidgetsIgnoreSSLSwitchRow* widgets_ignore_ssl_switch_row_new (void);
VALA_EXTERN WidgetsIgnoreSSLSwitchRow* widgets_ignore_ssl_switch_row_construct (GType object_type);
VALA_EXTERN DialogsPreferencesPagesAccountsLoadingPage* dialogs_preferences_pages_accounts_loading_page_new (void);
VALA_EXTERN DialogsPreferencesPagesAccountsLoadingPage* dialogs_preferences_pages_accounts_loading_page_construct (GType object_type);
VALA_EXTERN void dialogs_preferences_pages_accounts_loading_page_set_show_progress (DialogsPreferencesPagesAccountsLoadingPage* self,
                                                                        gboolean value);
static void _dialogs_preferences_pages_nextcloud_setup___lambda315_ (DialogsPreferencesPagesNextcloudSetup* self);
static void __dialogs_preferences_pages_nextcloud_setup___lambda315__gtk_editable_changed (GtkEditable* _sender,
                                                                                    gpointer self);
static void _dialogs_preferences_pages_nextcloud_setup___lambda316_ (DialogsPreferencesPagesNextcloudSetup* self);
static void __dialogs_preferences_pages_nextcloud_setup___lambda316__adw_entry_row_entry_activated (AdwEntryRow* _sender,
                                                                                             gpointer self);
static void _dialogs_preferences_pages_nextcloud_setup___lambda317_ (DialogsPreferencesPagesNextcloudSetup* self);
static void __dialogs_preferences_pages_nextcloud_setup___lambda317__gtk_button_clicked (GtkButton* _sender,
                                                                                  gpointer self);
static void _dialogs_preferences_pages_nextcloud_setup___lambda318_ (Block112Data* _data112_,
                                                              gint current,
                                                              gint total,
                                                              const gchar* message);
VALA_EXTERN void dialogs_preferences_pages_accounts_loading_page_set_sync_label (DialogsPreferencesPagesAccountsLoadingPage* self,
                                                                     const gchar* value);
VALA_EXTERN void dialogs_preferences_pages_accounts_loading_page_set_progress (DialogsPreferencesPagesAccountsLoadingPage* self,
                                                                   gdouble value);
static void __dialogs_preferences_pages_nextcloud_setup___lambda318__services_cal_dav_core_sync_progress (ServicesCalDAVCore* _sender,
                                                                                                   gint current,
                                                                                                   gint total,
                                                                                                   const gchar* message,
                                                                                                   gpointer self);
static void _dialogs_preferences_pages_nextcloud_setup___lambda319_ (DialogsPreferencesPagesNextcloudSetup* self);
VALA_EXTERN void dialogs_preferences_pages_base_page_clean_up (DialogsPreferencesPagesBasePage* self);
static void __dialogs_preferences_pages_nextcloud_setup___lambda319__gtk_widget_destroy (GtkWidget* _sender,
                                                                                  gpointer self);
static void dialogs_preferences_pages_nextcloud_setup_finalize (GObject * obj);
static GType dialogs_preferences_pages_nextcloud_setup_get_type_once (void);
static void _vala_dialogs_preferences_pages_nextcloud_setup_get_property (GObject * object,
                                                                   guint property_id,
                                                                   GValue * value,
                                                                   GParamSpec * pspec);
static void _vala_dialogs_preferences_pages_nextcloud_setup_set_property (GObject * object,
                                                                   guint property_id,
                                                                   const GValue * value,
                                                                   GParamSpec * pspec);
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
dialogs_preferences_pages_nextcloud_setup_get_instance_private (DialogsPreferencesPagesNextcloudSetup* self)
{
	return G_STRUCT_MEMBER_P (self, DialogsPreferencesPagesNextcloudSetup_private_offset);
}

DialogsPreferencesPagesNextcloudSetup*
dialogs_preferences_pages_nextcloud_setup_construct (GType object_type,
                                                     AdwPreferencesDialog* preferences_dialog,
                                                     DialogsPreferencesPagesAccounts* accounts_page)
{
	DialogsPreferencesPagesNextcloudSetup * self = NULL;
	g_return_val_if_fail (preferences_dialog != NULL, NULL);
	g_return_val_if_fail (accounts_page != NULL, NULL);
	self = (DialogsPreferencesPagesNextcloudSetup*) g_object_new (object_type, "preferences-dialog", preferences_dialog, "accounts-page", accounts_page, "title", _ ("Nextcloud"), NULL);
	return self;
}

DialogsPreferencesPagesNextcloudSetup*
dialogs_preferences_pages_nextcloud_setup_new (AdwPreferencesDialog* preferences_dialog,
                                               DialogsPreferencesPagesAccounts* accounts_page)
{
	return dialogs_preferences_pages_nextcloud_setup_construct (DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP, preferences_dialog, accounts_page);
}

static Block110Data*
block110_data_ref (Block110Data* _data110_)
{
	g_atomic_int_inc (&_data110_->_ref_count_);
	return _data110_;
}

static void
block110_data_unref (void * _userdata_)
{
	Block110Data* _data110_;
	_data110_ = (Block110Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data110_->_ref_count_)) {
		DialogsPreferencesPagesNextcloudSetup* self;
		self = _data110_->self;
		_g_object_unref0 (_data110_->nextcloud_provider);
		_g_object_unref0 (_data110_->core_service);
		_g_object_unref0 (_data110_->cancellable);
		_g_object_unref0 (self);
		g_slice_free (Block110Data, _data110_);
	}
}

static void
__lambda312_ (Block110Data* _data110_)
{
	DialogsPreferencesPagesNextcloudSetup* self;
	ServicesLogService* _tmp0_;
	ServicesLogService* _tmp1_;
	self = _data110_->self;
	_tmp0_ = services_log_service_get_default ();
	_tmp1_ = _tmp0_;
	services_log_service_info (_tmp1_, "NextcloudSetup", "Login cancelled by user");
	_g_object_unref0 (_tmp1_);
	g_cancellable_cancel (_data110_->cancellable);
}

static void
___lambda312__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	__lambda312_ (self);
}

static Block111Data*
block111_data_ref (Block111Data* _data111_)
{
	g_atomic_int_inc (&_data111_->_ref_count_);
	return _data111_;
}

static void
block111_data_unref (void * _userdata_)
{
	Block111Data* _data111_;
	_data111_ = (Block111Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data111_->_ref_count_)) {
		DialogsPreferencesPagesNextcloudSetup* self;
		self = _data111_->_data110_->self;
		_http_response_unref0 (_data111_->response);
		block110_data_unref (_data111_->_data110_);
		_data111_->_data110_ = NULL;
		g_slice_free (Block111Data, _data111_);
	}
}

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

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
___lambda314_ (Block111Data* _data111_,
               GObject* obj,
               GAsyncResult* res)
{
	Block110Data* _data110_;
	DialogsPreferencesPagesNextcloudSetup* self;
	HttpResponse* _tmp0_;
	HttpResponse* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	_data110_ = _data111_->_data110_;
	self = _data110_->self;
	g_return_if_fail (res != NULL);
	_tmp0_ = services_cal_dav_core_add_caldav_account_finish (_data110_->core_service, res);
	_http_response_unref0 (_data111_->response);
	_data111_->response = _tmp0_;
	_tmp1_ = _data111_->response;
	_tmp2_ = http_response_get_status (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		ServicesLogService* _tmp4_;
		ServicesLogService* _tmp5_;
		AdwPreferencesDialog* _tmp6_;
		AdwPreferencesDialog* _tmp7_;
		_tmp4_ = services_log_service_get_default ();
		_tmp5_ = _tmp4_;
		services_log_service_info (_tmp5_, "NextcloudSetup", "Account synced successfully");
		_g_object_unref0 (_tmp5_);
		_tmp6_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
		_tmp7_ = _tmp6_;
		adw_preferences_dialog_pop_subpage (_tmp7_);
	} else {
		ServicesLogService* _tmp8_;
		ServicesLogService* _tmp9_;
		HttpResponse* _tmp10_;
		const gchar* _tmp11_;
		const gchar* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		GtkStack* _tmp15_;
		WidgetsLoadingButton* _tmp16_;
		GtkButton* _tmp17_;
		DialogsPreferencesPagesAccounts* _tmp18_;
		HttpResponse* _tmp19_;
		gint _tmp20_;
		gint _tmp21_;
		HttpResponse* _tmp22_;
		const gchar* _tmp23_;
		const gchar* _tmp24_;
		gchar* _tmp25_;
		gchar* _tmp26_;
		_tmp8_ = services_log_service_get_default ();
		_tmp9_ = _tmp8_;
		_tmp10_ = _data111_->response;
		_tmp11_ = http_response_get_error (_tmp10_);
		_tmp12_ = _tmp11_;
		_tmp13_ = g_strdup_printf ("Account sync failed: %s", _tmp12_);
		_tmp14_ = _tmp13_;
		services_log_service_error (_tmp9_, "NextcloudSetup", _tmp14_);
		_g_free0 (_tmp14_);
		_g_object_unref0 (_tmp9_);
		_tmp15_ = self->priv->main_stack;
		gtk_stack_set_visible_child_name (_tmp15_, "main-page");
		_tmp16_ = self->priv->login_button;
		widgets_loading_button_set_is_loading (_tmp16_, FALSE);
		_tmp17_ = self->priv->cancel_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp17_, FALSE);
		_tmp18_ = self->priv->_accounts_page;
		_tmp19_ = _data111_->response;
		_tmp20_ = http_response_get_error_code (_tmp19_);
		_tmp21_ = _tmp20_;
		_tmp22_ = _data111_->response;
		_tmp23_ = http_response_get_error (_tmp22_);
		_tmp24_ = _tmp23_;
		_tmp25_ = string_strip (_tmp24_);
		_tmp26_ = _tmp25_;
		dialogs_preferences_pages_accounts_show_message_error (_tmp18_, _tmp21_, _tmp26_, TRUE);
		_g_free0 (_tmp26_);
	}
}

static void
____lambda314__gasync_ready_callback (GObject* source_object,
                                      GAsyncResult* res,
                                      gpointer self)
{
	___lambda314_ (self, source_object, res);
	block111_data_unref (self);
}

static void
__lambda313_ (Block110Data* _data110_,
              GObject* obj,
              GAsyncResult* res)
{
	DialogsPreferencesPagesNextcloudSetup* self;
	Block111Data* _data111_;
	HttpResponse* _tmp0_;
	HttpResponse* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	self = _data110_->self;
	g_return_if_fail (res != NULL);
	_data111_ = g_slice_new0 (Block111Data);
	_data111_->_ref_count_ = 1;
	_data111_->_data110_ = block110_data_ref (_data110_);
	_tmp0_ = services_cal_dav_providers_nextcloud_start_login_flow_finish (_data110_->nextcloud_provider, res);
	_data111_->response = _tmp0_;
	_tmp1_ = _data111_->response;
	_tmp2_ = http_response_get_status (_tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_) {
		ServicesLogService* _tmp4_;
		ServicesLogService* _tmp5_;
		ObjectsSource* source = NULL;
		HttpResponse* _tmp6_;
		GValue _tmp7_ = {0};
		GValue _tmp8_;
		GObject* _tmp9_;
		ObjectsSource* _tmp10_;
		GtkStack* _tmp11_;
		ObjectsSource* _tmp12_;
		_tmp4_ = services_log_service_get_default ();
		_tmp5_ = _tmp4_;
		services_log_service_info (_tmp5_, "NextcloudSetup", "Login successful, syncing account");
		_g_object_unref0 (_tmp5_);
		_tmp6_ = _data111_->response;
		http_response_get_data_object (_tmp6_, &_tmp7_);
		_tmp8_ = _tmp7_;
		_tmp9_ = g_value_get_object (&_tmp8_);
		_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, OBJECTS_TYPE_SOURCE, ObjectsSource));
		source = _tmp10_;
		_tmp11_ = self->priv->main_stack;
		gtk_stack_set_visible_child_name (_tmp11_, "loading-page");
		_tmp12_ = source;
		services_cal_dav_core_add_caldav_account (_data110_->core_service, _tmp12_, _data110_->cancellable, ____lambda314__gasync_ready_callback, block111_data_ref (_data111_));
		_g_object_unref0 (source);
	} else {
		ServicesLogService* _tmp13_;
		ServicesLogService* _tmp14_;
		HttpResponse* _tmp15_;
		const gchar* _tmp16_;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp19_;
		WidgetsLoadingButton* _tmp20_;
		GtkButton* _tmp21_;
		HttpResponse* _tmp22_;
		gint _tmp23_;
		gint _tmp24_;
		_tmp13_ = services_log_service_get_default ();
		_tmp14_ = _tmp13_;
		_tmp15_ = _data111_->response;
		_tmp16_ = http_response_get_error (_tmp15_);
		_tmp17_ = _tmp16_;
		_tmp18_ = g_strdup_printf ("Login flow failed: %s", _tmp17_);
		_tmp19_ = _tmp18_;
		services_log_service_error (_tmp14_, "NextcloudSetup", _tmp19_);
		_g_free0 (_tmp19_);
		_g_object_unref0 (_tmp14_);
		_tmp20_ = self->priv->login_button;
		widgets_loading_button_set_is_loading (_tmp20_, FALSE);
		_tmp21_ = self->priv->cancel_button;
		gtk_widget_set_visible ((GtkWidget*) _tmp21_, FALSE);
		_tmp22_ = _data111_->response;
		_tmp23_ = http_response_get_error_code (_tmp22_);
		_tmp24_ = _tmp23_;
		if (_tmp24_ == 409) {
			AdwToast* toast = NULL;
			HttpResponse* _tmp25_;
			const gchar* _tmp26_;
			const gchar* _tmp27_;
			gchar* _tmp28_;
			gchar* _tmp29_;
			AdwToast* _tmp30_;
			AdwToast* _tmp31_;
			AdwToast* _tmp32_;
			AdwPreferencesDialog* _tmp33_;
			AdwPreferencesDialog* _tmp34_;
			AdwToast* _tmp35_;
			AdwToast* _tmp36_;
			_tmp25_ = _data111_->response;
			_tmp26_ = http_response_get_error (_tmp25_);
			_tmp27_ = _tmp26_;
			_tmp28_ = string_strip (_tmp27_);
			_tmp29_ = _tmp28_;
			_tmp30_ = adw_toast_new (_tmp29_);
			_tmp31_ = _tmp30_;
			_g_free0 (_tmp29_);
			toast = _tmp31_;
			_tmp32_ = toast;
			adw_toast_set_timeout (_tmp32_, (guint) 3);
			_tmp33_ = dialogs_preferences_pages_base_page_get_preferences_dialog ((DialogsPreferencesPagesBasePage*) self);
			_tmp34_ = _tmp33_;
			_tmp35_ = toast;
			_tmp36_ = _g_object_ref0 (_tmp35_);
			adw_preferences_dialog_add_toast (_tmp34_, _tmp36_);
			_g_object_unref0 (toast);
		} else {
			DialogsPreferencesPagesAccounts* _tmp37_;
			HttpResponse* _tmp38_;
			gint _tmp39_;
			gint _tmp40_;
			HttpResponse* _tmp41_;
			const gchar* _tmp42_;
			const gchar* _tmp43_;
			gchar* _tmp44_;
			gchar* _tmp45_;
			_tmp37_ = self->priv->_accounts_page;
			_tmp38_ = _data111_->response;
			_tmp39_ = http_response_get_error_code (_tmp38_);
			_tmp40_ = _tmp39_;
			_tmp41_ = _data111_->response;
			_tmp42_ = http_response_get_error (_tmp41_);
			_tmp43_ = _tmp42_;
			_tmp44_ = string_strip (_tmp43_);
			_tmp45_ = _tmp44_;
			dialogs_preferences_pages_accounts_show_message_error (_tmp37_, _tmp40_, _tmp45_, TRUE);
			_g_free0 (_tmp45_);
		}
	}
	block111_data_unref (_data111_);
	_data111_ = NULL;
}

static void
___lambda313__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda313_ (self, source_object, res);
	block110_data_unref (self);
}

static void
dialogs_preferences_pages_nextcloud_setup_on_login_button_clicked (DialogsPreferencesPagesNextcloudSetup* self)
{
	Block110Data* _data110_;
	ServicesLogService* _tmp0_;
	ServicesLogService* _tmp1_;
	GCancellable* _tmp2_;
	WidgetsLoadingButton* _tmp3_;
	GtkButton* _tmp4_;
	GeeHashMap* _tmp5_;
	GtkButton* _tmp6_;
	gulong _tmp7_;
	GtkButton* _tmp8_;
	ServicesCalDAVCore* _tmp9_;
	ServicesCalDAVProvidersNextcloud* _tmp10_;
	ServicesLogService* _tmp11_;
	ServicesLogService* _tmp12_;
	AdwEntryRow* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	WidgetsIgnoreSSLSwitchRow* _tmp16_;
	gboolean _tmp17_;
	gboolean _tmp18_;
	g_return_if_fail (self != NULL);
	_data110_ = g_slice_new0 (Block110Data);
	_data110_->_ref_count_ = 1;
	_data110_->self = g_object_ref (self);
	_tmp0_ = services_log_service_get_default ();
	_tmp1_ = _tmp0_;
	services_log_service_info (_tmp1_, "NextcloudSetup", "Login button clicked");
	_g_object_unref0 (_tmp1_);
	_tmp2_ = g_cancellable_new ();
	_data110_->cancellable = _tmp2_;
	_tmp3_ = self->priv->login_button;
	widgets_loading_button_set_is_loading (_tmp3_, TRUE);
	_tmp4_ = self->priv->cancel_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp4_, TRUE);
	_tmp5_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp6_ = self->priv->cancel_button;
	_tmp7_ = g_signal_connect_data (_tmp6_, "clicked", (GCallback) ___lambda312__gtk_button_clicked, block110_data_ref (_data110_), (GClosureNotify) block110_data_unref, 0);
	_tmp8_ = self->priv->cancel_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, (gpointer) ((guintptr) _tmp7_), (GObject*) _tmp8_);
	_tmp9_ = services_cal_dav_core_get_default ();
	_data110_->core_service = _tmp9_;
	_tmp10_ = services_cal_dav_providers_nextcloud_new ();
	_data110_->nextcloud_provider = _tmp10_;
	_tmp11_ = services_log_service_get_default ();
	_tmp12_ = _tmp11_;
	services_log_service_info (_tmp12_, "NextcloudSetup", "Starting Nextcloud login flow");
	_g_object_unref0 (_tmp12_);
	_tmp13_ = self->priv->server_entry;
	_tmp14_ = gtk_editable_get_text ((GtkEditable*) _tmp13_);
	_tmp15_ = _tmp14_;
	_tmp16_ = self->priv->ignore_ssl_row;
	_tmp17_ = widgets_ignore_ssl_switch_row_get_active (_tmp16_);
	_tmp18_ = _tmp17_;
	services_cal_dav_providers_nextcloud_start_login_flow (_data110_->nextcloud_provider, _tmp15_, _data110_->cancellable, _tmp18_, ___lambda313__gasync_ready_callback, block110_data_ref (_data110_));
	block110_data_unref (_data110_);
	_data110_ = NULL;
}

static gboolean
dialogs_preferences_pages_nextcloud_setup_is_valid_url (DialogsPreferencesPagesNextcloudSetup* self,
                                                        const gchar* uri)
{
	gchar* scheme = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (uri != NULL, FALSE);
	_tmp0_ = g_uri_parse_scheme (uri);
	scheme = _tmp0_;
	_tmp1_ = scheme;
	if (_tmp1_ == NULL) {
		result = FALSE;
		_g_free0 (scheme);
		return result;
	}
	_tmp2_ = scheme;
	result = g_str_has_prefix (_tmp2_, "http");
	_g_free0 (scheme);
	return result;
}

DialogsPreferencesPagesAccounts*
dialogs_preferences_pages_nextcloud_setup_get_accounts_page (DialogsPreferencesPagesNextcloudSetup* self)
{
	DialogsPreferencesPagesAccounts* result;
	DialogsPreferencesPagesAccounts* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_accounts_page;
	result = _tmp0_;
	return result;
}

static void
dialogs_preferences_pages_nextcloud_setup_set_accounts_page (DialogsPreferencesPagesNextcloudSetup* self,
                                                             DialogsPreferencesPagesAccounts* value)
{
	DialogsPreferencesPagesAccounts* old_value;
	g_return_if_fail (self != NULL);
	old_value = dialogs_preferences_pages_nextcloud_setup_get_accounts_page (self);
	if (old_value != value) {
		DialogsPreferencesPagesAccounts* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_accounts_page);
		self->priv->_accounts_page = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dialogs_preferences_pages_nextcloud_setup_properties[DIALOGS_PREFERENCES_PAGES_NEXTCLOUD_SETUP_ACCOUNTS_PAGE_PROPERTY]);
	}
}

static Block112Data*
block112_data_ref (Block112Data* _data112_)
{
	g_atomic_int_inc (&_data112_->_ref_count_);
	return _data112_;
}

static void
block112_data_unref (void * _userdata_)
{
	Block112Data* _data112_;
	_data112_ = (Block112Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data112_->_ref_count_)) {
		DialogsPreferencesPagesNextcloudSetup* self;
		self = _data112_->self;
		_g_object_unref0 (_data112_->loading_page);
		_g_object_unref0 (self);
		g_slice_free (Block112Data, _data112_);
	}
}

static void
_dialogs_preferences_pages_nextcloud_setup___lambda315_ (DialogsPreferencesPagesNextcloudSetup* self)
{
	gboolean _tmp0_ = FALSE;
	AdwEntryRow* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	_tmp1_ = self->priv->server_entry;
	_tmp2_ = gtk_editable_get_text ((GtkEditable*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (_tmp3_ != NULL) {
		AdwEntryRow* _tmp4_;
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp4_ = self->priv->server_entry;
		_tmp5_ = gtk_editable_get_text ((GtkEditable*) _tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = g_strcmp0 (_tmp6_, "") != 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gboolean is_valid = FALSE;
		AdwEntryRow* _tmp7_;
		const gchar* _tmp8_;
		const gchar* _tmp9_;
		WidgetsLoadingButton* _tmp12_;
		_tmp7_ = self->priv->server_entry;
		_tmp8_ = gtk_editable_get_text ((GtkEditable*) _tmp7_);
		_tmp9_ = _tmp8_;
		is_valid = dialogs_preferences_pages_nextcloud_setup_is_valid_url (self, _tmp9_);
		if (!is_valid) {
			AdwEntryRow* _tmp10_;
			_tmp10_ = self->priv->server_entry;
			gtk_widget_add_css_class ((GtkWidget*) _tmp10_, "error");
		} else {
			AdwEntryRow* _tmp11_;
			_tmp11_ = self->priv->server_entry;
			gtk_widget_remove_css_class ((GtkWidget*) _tmp11_, "error");
		}
		_tmp12_ = self->priv->login_button;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp12_, is_valid);
	} else {
		AdwEntryRow* _tmp13_;
		WidgetsLoadingButton* _tmp14_;
		_tmp13_ = self->priv->server_entry;
		gtk_widget_remove_css_class ((GtkWidget*) _tmp13_, "error");
		_tmp14_ = self->priv->login_button;
		gtk_widget_set_sensitive ((GtkWidget*) _tmp14_, FALSE);
	}
}

static void
__dialogs_preferences_pages_nextcloud_setup___lambda315__gtk_editable_changed (GtkEditable* _sender,
                                                                               gpointer self)
{
	_dialogs_preferences_pages_nextcloud_setup___lambda315_ ((DialogsPreferencesPagesNextcloudSetup*) self);
}

static void
_dialogs_preferences_pages_nextcloud_setup___lambda316_ (DialogsPreferencesPagesNextcloudSetup* self)
{
	WidgetsLoadingButton* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	_tmp0_ = self->priv->login_button;
	_tmp1_ = gtk_widget_get_sensitive ((GtkWidget*) _tmp0_);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		dialogs_preferences_pages_nextcloud_setup_on_login_button_clicked (self);
	}
}

static void
__dialogs_preferences_pages_nextcloud_setup___lambda316__adw_entry_row_entry_activated (AdwEntryRow* _sender,
                                                                                        gpointer self)
{
	_dialogs_preferences_pages_nextcloud_setup___lambda316_ ((DialogsPreferencesPagesNextcloudSetup*) self);
}

static void
_dialogs_preferences_pages_nextcloud_setup___lambda317_ (DialogsPreferencesPagesNextcloudSetup* self)
{
	dialogs_preferences_pages_nextcloud_setup_on_login_button_clicked (self);
}

static void
__dialogs_preferences_pages_nextcloud_setup___lambda317__gtk_button_clicked (GtkButton* _sender,
                                                                             gpointer self)
{
	_dialogs_preferences_pages_nextcloud_setup___lambda317_ ((DialogsPreferencesPagesNextcloudSetup*) self);
}

static void
_dialogs_preferences_pages_nextcloud_setup___lambda318_ (Block112Data* _data112_,
                                                         gint current,
                                                         gint total,
                                                         const gchar* message)
{
	DialogsPreferencesPagesNextcloudSetup* self;
	DialogsPreferencesPagesAccountsLoadingPage* _tmp0_;
	gdouble _tmp1_ = 0.0;
	DialogsPreferencesPagesAccountsLoadingPage* _tmp2_;
	self = _data112_->self;
	g_return_if_fail (message != NULL);
	_tmp0_ = _data112_->loading_page;
	dialogs_preferences_pages_accounts_loading_page_set_sync_label (_tmp0_, message);
	if (total > 0) {
		_tmp1_ = ((gdouble) current) / ((gdouble) total);
	} else {
		_tmp1_ = 0.0;
	}
	_tmp2_ = _data112_->loading_page;
	dialogs_preferences_pages_accounts_loading_page_set_progress (_tmp2_, _tmp1_);
}

static void
__dialogs_preferences_pages_nextcloud_setup___lambda318__services_cal_dav_core_sync_progress (ServicesCalDAVCore* _sender,
                                                                                              gint current,
                                                                                              gint total,
                                                                                              const gchar* message,
                                                                                              gpointer self)
{
	_dialogs_preferences_pages_nextcloud_setup___lambda318_ (self, current, total, message);
}

static void
_dialogs_preferences_pages_nextcloud_setup___lambda319_ (DialogsPreferencesPagesNextcloudSetup* self)
{
	dialogs_preferences_pages_base_page_clean_up ((DialogsPreferencesPagesBasePage*) self);
}

static void
__dialogs_preferences_pages_nextcloud_setup___lambda319__gtk_widget_destroy (GtkWidget* _sender,
                                                                             gpointer self)
{
	_dialogs_preferences_pages_nextcloud_setup___lambda319_ ((DialogsPreferencesPagesNextcloudSetup*) self);
}

static GObject *
dialogs_preferences_pages_nextcloud_setup_constructor (GType type,
                                                       guint n_construct_properties,
                                                       GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DialogsPreferencesPagesNextcloudSetup * self;
	Block112Data* _data112_;
	GtkImage* icon = NULL;
	gchar* _tmp0_;
	gchar** _tmp1_;
	GtkImage* _tmp2_ = NULL;
	GtkLabel* title_label = NULL;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar** _tmp5_;
	GtkLabel* _tmp6_ = NULL;
	GtkLabel* description_label = NULL;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar** _tmp9_;
	GtkLabel* _tmp10_ = NULL;
	GtkBox* header_box = NULL;
	GtkBox* _tmp11_ = NULL;
	GtkBox* _tmp12_;
	GtkImage* _tmp13_;
	GtkBox* _tmp14_;
	GtkLabel* _tmp15_;
	GtkBox* _tmp16_;
	GtkLabel* _tmp17_;
	AdwEntryRow* _tmp18_;
	AdwEntryRow* _tmp19_;
	AdwPreferencesGroup* entries_group = NULL;
	AdwPreferencesGroup* _tmp20_;
	AdwPreferencesGroup* _tmp21_;
	AdwEntryRow* _tmp22_;
	GtkLabel* step1_label = NULL;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gchar** _tmp25_;
	GtkLabel* _tmp26_ = NULL;
	GtkLabel* step2_label = NULL;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar** _tmp29_;
	GtkLabel* _tmp30_ = NULL;
	GtkBox* examples_box = NULL;
	GtkBox* _tmp31_ = NULL;
	GtkBox* _tmp32_;
	GtkLabel* _tmp33_;
	GtkBox* _tmp34_;
	GtkLabel* _tmp35_;
	AdwPreferencesGroup* examples_group = NULL;
	AdwPreferencesGroup* _tmp36_ = NULL;
	AdwPreferencesGroup* _tmp37_;
	AdwPreferencesGroup* _tmp38_;
	GtkBox* _tmp39_;
	WidgetsIgnoreSSLSwitchRow* _tmp40_;
	AdwPreferencesGroup* _tmp41_;
	WidgetsIgnoreSSLSwitchRow* _tmp42_;
	gchar* _tmp43_;
	gchar* _tmp44_;
	gchar** _tmp45_;
	WidgetsLoadingButton* _tmp46_ = NULL;
	gchar* _tmp47_;
	gchar* _tmp48_;
	gchar** _tmp49_;
	GtkButton* _tmp50_ = NULL;
	GtkBox* content_box = NULL;
	GtkBox* _tmp51_ = NULL;
	GtkBox* _tmp52_;
	GtkBox* _tmp53_;
	GtkBox* _tmp54_;
	AdwPreferencesGroup* _tmp55_;
	GtkBox* _tmp56_;
	WidgetsLoadingButton* _tmp57_;
	GtkBox* _tmp58_;
	GtkButton* _tmp59_;
	GtkBox* _tmp60_;
	AdwPreferencesGroup* _tmp61_;
	DialogsPreferencesPagesAccountsLoadingPage* _tmp62_ = NULL;
	GtkStack* _tmp63_ = NULL;
	GtkStack* _tmp64_;
	GtkBox* _tmp65_;
	GtkStack* _tmp66_;
	DialogsPreferencesPagesAccountsLoadingPage* _tmp67_;
	AdwToolbarView* toolbar_view = NULL;
	AdwToolbarView* _tmp68_;
	AdwToolbarView* _tmp69_;
	AdwHeaderBar* _tmp70_;
	AdwHeaderBar* _tmp71_;
	AdwToolbarView* _tmp72_;
	GtkStack* _tmp73_;
	AdwToolbarView* _tmp74_;
	GeeHashMap* _tmp75_;
	AdwEntryRow* _tmp76_;
	gulong _tmp77_;
	AdwEntryRow* _tmp78_;
	GeeHashMap* _tmp79_;
	AdwEntryRow* _tmp80_;
	gulong _tmp81_;
	AdwEntryRow* _tmp82_;
	GeeHashMap* _tmp83_;
	WidgetsLoadingButton* _tmp84_;
	gulong _tmp85_;
	WidgetsLoadingButton* _tmp86_;
	GeeHashMap* _tmp87_;
	ServicesCalDAVCore* _tmp88_;
	ServicesCalDAVCore* _tmp89_;
	gulong _tmp90_;
	ServicesCalDAVCore* _tmp91_;
	ServicesCalDAVCore* _tmp92_;
	parent_class = G_OBJECT_CLASS (dialogs_preferences_pages_nextcloud_setup_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP, DialogsPreferencesPagesNextcloudSetup);
	_data112_ = g_slice_new0 (Block112Data);
	_data112_->_ref_count_ = 1;
	_data112_->self = g_object_ref (self);
	_tmp0_ = g_strdup ("dimmed");
	_tmp1_ = g_new0 (gchar*, 1 + 1);
	_tmp1_[0] = _tmp0_;
	_tmp2_ = (GtkImage*) gtk_image_new_from_icon_name ("cloud-outline-thick-symbolic");
	gtk_image_set_pixel_size (_tmp2_, 48);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp2_, _tmp1_);
	_tmp1_ = (_vala_array_free (_tmp1_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp2_);
	icon = _tmp2_;
	_tmp3_ = g_strdup ("font-bold");
	_tmp4_ = g_strdup ("title-3");
	_tmp5_ = g_new0 (gchar*, 2 + 1);
	_tmp5_[0] = _tmp3_;
	_tmp5_[1] = _tmp4_;
	_tmp6_ = (GtkLabel*) gtk_label_new (_ ("Connect to Nextcloud"));
	gtk_widget_set_css_classes ((GtkWidget*) _tmp6_, _tmp5_);
	_tmp5_ = (_vala_array_free (_tmp5_, 2, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp6_, 12);
	g_object_ref_sink (_tmp6_);
	title_label = _tmp6_;
	_tmp7_ = g_strdup ("dimmed");
	_tmp8_ = g_strdup ("caption");
	_tmp9_ = g_new0 (gchar*, 2 + 1);
	_tmp9_[0] = _tmp7_;
	_tmp9_[1] = _tmp8_;
	_tmp10_ = (GtkLabel*) gtk_label_new (_ ("Sign in with your Nextcloud account to sync tasks via CalDAV"));
	gtk_widget_set_css_classes ((GtkWidget*) _tmp10_, _tmp9_);
	_tmp9_ = (_vala_array_free (_tmp9_, 2, (GDestroyNotify) g_free), NULL);
	gtk_label_set_wrap (_tmp10_, TRUE);
	gtk_label_set_justify (_tmp10_, GTK_JUSTIFY_CENTER);
	gtk_label_set_max_width_chars (_tmp10_, 40);
	g_object_ref_sink (_tmp10_);
	description_label = _tmp10_;
	_tmp11_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
	gtk_widget_set_halign ((GtkWidget*) _tmp11_, GTK_ALIGN_CENTER);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp11_, 18);
	g_object_ref_sink (_tmp11_);
	header_box = _tmp11_;
	_tmp12_ = header_box;
	_tmp13_ = icon;
	gtk_box_append (_tmp12_, (GtkWidget*) _tmp13_);
	_tmp14_ = header_box;
	_tmp15_ = title_label;
	gtk_box_append (_tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = header_box;
	_tmp17_ = description_label;
	gtk_box_append (_tmp16_, (GtkWidget*) _tmp17_);
	_tmp18_ = (AdwEntryRow*) adw_entry_row_new ();
	g_object_ref_sink (_tmp18_);
	_g_object_unref0 (self->priv->server_entry);
	self->priv->server_entry = _tmp18_;
	_tmp19_ = self->priv->server_entry;
	adw_preferences_row_set_title ((AdwPreferencesRow*) _tmp19_, _ ("Server URL"));
	_tmp20_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	g_object_ref_sink (_tmp20_);
	entries_group = _tmp20_;
	_tmp21_ = entries_group;
	_tmp22_ = self->priv->server_entry;
	adw_preferences_group_add (_tmp21_, (GtkWidget*) _tmp22_);
	_tmp23_ = g_strdup ("monospace");
	_tmp24_ = g_strdup ("caption");
	_tmp25_ = g_new0 (gchar*, 2 + 1);
	_tmp25_[0] = _tmp23_;
	_tmp25_[1] = _tmp24_;
	_tmp26_ = (GtkLabel*) gtk_label_new (_ ("https://cloud.example.com"));
	gtk_label_set_xalign (_tmp26_, (gfloat) 0);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp26_, _tmp25_);
	_tmp25_ = (_vala_array_free (_tmp25_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp26_);
	step1_label = _tmp26_;
	_tmp27_ = g_strdup ("monospace");
	_tmp28_ = g_strdup ("caption");
	_tmp29_ = g_new0 (gchar*, 2 + 1);
	_tmp29_[0] = _tmp27_;
	_tmp29_[1] = _tmp28_;
	_tmp30_ = (GtkLabel*) gtk_label_new (_ ("https://example.com/nextcloud"));
	gtk_label_set_xalign (_tmp30_, (gfloat) 0);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp30_, _tmp29_);
	_tmp29_ = (_vala_array_free (_tmp29_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp30_);
	step2_label = _tmp30_;
	_tmp31_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp31_, 8);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp31_, 8);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp31_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp31_, 12);
	g_object_ref_sink (_tmp31_);
	examples_box = _tmp31_;
	_tmp32_ = examples_box;
	_tmp33_ = step1_label;
	gtk_box_append (_tmp32_, (GtkWidget*) _tmp33_);
	_tmp34_ = examples_box;
	_tmp35_ = step2_label;
	gtk_box_append (_tmp34_, (GtkWidget*) _tmp35_);
	_tmp36_ = (AdwPreferencesGroup*) adw_preferences_group_new ();
	gtk_widget_set_margin_top ((GtkWidget*) _tmp36_, 6);
	g_object_ref_sink (_tmp36_);
	examples_group = _tmp36_;
	_tmp37_ = examples_group;
	adw_preferences_group_set_title (_tmp37_, _ ("URL examples"));
	_tmp38_ = examples_group;
	_tmp39_ = examples_box;
	adw_preferences_group_add (_tmp38_, (GtkWidget*) _tmp39_);
	_tmp40_ = widgets_ignore_ssl_switch_row_new ();
	g_object_ref_sink (_tmp40_);
	_g_object_unref0 (self->priv->ignore_ssl_row);
	self->priv->ignore_ssl_row = _tmp40_;
	_tmp41_ = entries_group;
	_tmp42_ = self->priv->ignore_ssl_row;
	adw_preferences_group_add (_tmp41_, (GtkWidget*) _tmp42_);
	_tmp43_ = g_strdup ("suggested-action");
	_tmp44_ = g_strdup ("pill");
	_tmp45_ = g_new0 (gchar*, 2 + 1);
	_tmp45_[0] = _tmp43_;
	_tmp45_[1] = _tmp44_;
	_tmp46_ = widgets_loading_button_new_with_label (_ ("Log In"));
	gtk_widget_set_margin_top ((GtkWidget*) _tmp46_, 24);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp46_, FALSE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp46_, _tmp45_);
	_tmp45_ = (_vala_array_free (_tmp45_, 2, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_halign ((GtkWidget*) _tmp46_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp46_);
	_g_object_unref0 (self->priv->login_button);
	self->priv->login_button = _tmp46_;
	_tmp47_ = g_strdup ("flat");
	_tmp48_ = g_strdup ("pill");
	_tmp49_ = g_new0 (gchar*, 2 + 1);
	_tmp49_[0] = _tmp47_;
	_tmp49_[1] = _tmp48_;
	_tmp50_ = (GtkButton*) gtk_button_new_with_label (_ ("Cancel"));
	gtk_widget_set_css_classes ((GtkWidget*) _tmp50_, _tmp49_);
	_tmp49_ = (_vala_array_free (_tmp49_, 2, (GDestroyNotify) g_free), NULL);
	gtk_widget_set_halign ((GtkWidget*) _tmp50_, GTK_ALIGN_CENTER);
	gtk_widget_set_visible ((GtkWidget*) _tmp50_, FALSE);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp50_, 12);
	g_object_ref_sink (_tmp50_);
	_g_object_unref0 (self->priv->cancel_button);
	self->priv->cancel_button = _tmp50_;
	_tmp51_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp51_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp51_, TRUE);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp51_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp51_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp51_, 24);
	g_object_ref_sink (_tmp51_);
	content_box = _tmp51_;
	_tmp52_ = content_box;
	_tmp53_ = header_box;
	gtk_box_append (_tmp52_, (GtkWidget*) _tmp53_);
	_tmp54_ = content_box;
	_tmp55_ = entries_group;
	gtk_box_append (_tmp54_, (GtkWidget*) _tmp55_);
	_tmp56_ = content_box;
	_tmp57_ = self->priv->login_button;
	gtk_box_append (_tmp56_, (GtkWidget*) _tmp57_);
	_tmp58_ = content_box;
	_tmp59_ = self->priv->cancel_button;
	gtk_box_append (_tmp58_, (GtkWidget*) _tmp59_);
	_tmp60_ = content_box;
	_tmp61_ = examples_group;
	gtk_box_append (_tmp60_, (GtkWidget*) _tmp61_);
	_tmp62_ = dialogs_preferences_pages_accounts_loading_page_new ();
	dialogs_preferences_pages_accounts_loading_page_set_show_progress (_tmp62_, TRUE);
	g_object_ref_sink (_tmp62_);
	_data112_->loading_page = _tmp62_;
	_tmp63_ = (GtkStack*) gtk_stack_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp63_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp63_, TRUE);
	gtk_stack_set_transition_type (_tmp63_, GTK_STACK_TRANSITION_TYPE_CROSSFADE);
	g_object_ref_sink (_tmp63_);
	_g_object_unref0 (self->priv->main_stack);
	self->priv->main_stack = _tmp63_;
	_tmp64_ = self->priv->main_stack;
	_tmp65_ = content_box;
	gtk_stack_add_named (_tmp64_, (GtkWidget*) _tmp65_, "main-page");
	_tmp66_ = self->priv->main_stack;
	_tmp67_ = _data112_->loading_page;
	gtk_stack_add_named (_tmp66_, (GtkWidget*) _tmp67_, "loading-page");
	_tmp68_ = (AdwToolbarView*) adw_toolbar_view_new ();
	g_object_ref_sink (_tmp68_);
	toolbar_view = _tmp68_;
	_tmp69_ = toolbar_view;
	_tmp70_ = (AdwHeaderBar*) adw_header_bar_new ();
	g_object_ref_sink (_tmp70_);
	_tmp71_ = _tmp70_;
	adw_toolbar_view_add_top_bar (_tmp69_, (GtkWidget*) _tmp71_);
	_g_object_unref0 (_tmp71_);
	_tmp72_ = toolbar_view;
	_tmp73_ = self->priv->main_stack;
	adw_toolbar_view_set_content (_tmp72_, (GtkWidget*) _tmp73_);
	_tmp74_ = toolbar_view;
	adw_navigation_page_set_child ((AdwNavigationPage*) self, (GtkWidget*) _tmp74_);
	_tmp75_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp76_ = self->priv->server_entry;
	_tmp77_ = g_signal_connect_object ((GtkEditable*) _tmp76_, "changed", (GCallback) __dialogs_preferences_pages_nextcloud_setup___lambda315__gtk_editable_changed, self, 0);
	_tmp78_ = self->priv->server_entry;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp75_, (gpointer) ((guintptr) _tmp77_), (GObject*) _tmp78_);
	_tmp79_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp80_ = self->priv->server_entry;
	_tmp81_ = g_signal_connect_object (_tmp80_, "entry-activated", (GCallback) __dialogs_preferences_pages_nextcloud_setup___lambda316__adw_entry_row_entry_activated, self, 0);
	_tmp82_ = self->priv->server_entry;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp79_, (gpointer) ((guintptr) _tmp81_), (GObject*) _tmp82_);
	_tmp83_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp84_ = self->priv->login_button;
	_tmp85_ = g_signal_connect_object ((GtkButton*) _tmp84_, "clicked", (GCallback) __dialogs_preferences_pages_nextcloud_setup___lambda317__gtk_button_clicked, self, 0);
	_tmp86_ = self->priv->login_button;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp83_, (gpointer) ((guintptr) _tmp85_), (GObject*) _tmp86_);
	_tmp87_ = ((DialogsPreferencesPagesBasePage*) self)->signal_map;
	_tmp88_ = services_cal_dav_core_get_default ();
	_tmp89_ = _tmp88_;
	_tmp90_ = g_signal_connect_data (_tmp89_, "sync-progress", (GCallback) __dialogs_preferences_pages_nextcloud_setup___lambda318__services_cal_dav_core_sync_progress, block112_data_ref (_data112_), (GClosureNotify) block112_data_unref, 0);
	_tmp91_ = services_cal_dav_core_get_default ();
	_tmp92_ = _tmp91_;
	gee_abstract_map_set ((GeeAbstractMap*) _tmp87_, (gpointer) ((guintptr) _tmp90_), (GObject*) _tmp92_);
	_g_object_unref0 (_tmp92_);
	_g_object_unref0 (_tmp89_);
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) __dialogs_preferences_pages_nextcloud_setup___lambda319__gtk_widget_destroy, self, 0);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (content_box);
	_g_object_unref0 (examples_group);
	_g_object_unref0 (examples_box);
	_g_object_unref0 (step2_label);
	_g_object_unref0 (step1_label);
	_g_object_unref0 (entries_group);
	_g_object_unref0 (header_box);
	_g_object_unref0 (description_label);
	_g_object_unref0 (title_label);
	_g_object_unref0 (icon);
	block112_data_unref (_data112_);
	_data112_ = NULL;
	return obj;
}

static void
dialogs_preferences_pages_nextcloud_setup_class_init (DialogsPreferencesPagesNextcloudSetupClass * klass,
                                                      gpointer klass_data)
{
	dialogs_preferences_pages_nextcloud_setup_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DialogsPreferencesPagesNextcloudSetup_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dialogs_preferences_pages_nextcloud_setup_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dialogs_preferences_pages_nextcloud_setup_set_property;
	G_OBJECT_CLASS (klass)->constructor = dialogs_preferences_pages_nextcloud_setup_constructor;
	G_OBJECT_CLASS (klass)->finalize = dialogs_preferences_pages_nextcloud_setup_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DIALOGS_PREFERENCES_PAGES_NEXTCLOUD_SETUP_ACCOUNTS_PAGE_PROPERTY, dialogs_preferences_pages_nextcloud_setup_properties[DIALOGS_PREFERENCES_PAGES_NEXTCLOUD_SETUP_ACCOUNTS_PAGE_PROPERTY] = g_param_spec_object ("accounts-page", "accounts-page", "accounts-page", DIALOGS_PREFERENCES_PAGES_TYPE_ACCOUNTS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
dialogs_preferences_pages_nextcloud_setup_instance_init (DialogsPreferencesPagesNextcloudSetup * self,
                                                         gpointer klass)
{
	self->priv = dialogs_preferences_pages_nextcloud_setup_get_instance_private (self);
}

static void
dialogs_preferences_pages_nextcloud_setup_finalize (GObject * obj)
{
	DialogsPreferencesPagesNextcloudSetup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP, DialogsPreferencesPagesNextcloudSetup);
	g_debug ("NextcloudSetup.vala:43: Destroying - Dialogs.Preferences.Pages.Nextclo" \
"udSetup\n");
	_g_object_unref0 (self->priv->_accounts_page);
	_g_object_unref0 (self->priv->server_entry);
	_g_object_unref0 (self->priv->login_button);
	_g_object_unref0 (self->priv->cancel_button);
	_g_object_unref0 (self->priv->main_stack);
	_g_object_unref0 (self->priv->ignore_ssl_row);
	G_OBJECT_CLASS (dialogs_preferences_pages_nextcloud_setup_parent_class)->finalize (obj);
}

static GType
dialogs_preferences_pages_nextcloud_setup_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DialogsPreferencesPagesNextcloudSetupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dialogs_preferences_pages_nextcloud_setup_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DialogsPreferencesPagesNextcloudSetup), 0, (GInstanceInitFunc) dialogs_preferences_pages_nextcloud_setup_instance_init, NULL };
	GType dialogs_preferences_pages_nextcloud_setup_type_id;
	dialogs_preferences_pages_nextcloud_setup_type_id = g_type_register_static (DIALOGS_PREFERENCES_PAGES_TYPE_BASE_PAGE, "DialogsPreferencesPagesNextcloudSetup", &g_define_type_info, 0);
	DialogsPreferencesPagesNextcloudSetup_private_offset = g_type_add_instance_private (dialogs_preferences_pages_nextcloud_setup_type_id, sizeof (DialogsPreferencesPagesNextcloudSetupPrivate));
	return dialogs_preferences_pages_nextcloud_setup_type_id;
}

GType
dialogs_preferences_pages_nextcloud_setup_get_type (void)
{
	static volatile gsize dialogs_preferences_pages_nextcloud_setup_type_id__once = 0;
	if (g_once_init_enter (&dialogs_preferences_pages_nextcloud_setup_type_id__once)) {
		GType dialogs_preferences_pages_nextcloud_setup_type_id;
		dialogs_preferences_pages_nextcloud_setup_type_id = dialogs_preferences_pages_nextcloud_setup_get_type_once ();
		g_once_init_leave (&dialogs_preferences_pages_nextcloud_setup_type_id__once, dialogs_preferences_pages_nextcloud_setup_type_id);
	}
	return dialogs_preferences_pages_nextcloud_setup_type_id__once;
}

static void
_vala_dialogs_preferences_pages_nextcloud_setup_get_property (GObject * object,
                                                              guint property_id,
                                                              GValue * value,
                                                              GParamSpec * pspec)
{
	DialogsPreferencesPagesNextcloudSetup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP, DialogsPreferencesPagesNextcloudSetup);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_NEXTCLOUD_SETUP_ACCOUNTS_PAGE_PROPERTY:
		g_value_set_object (value, dialogs_preferences_pages_nextcloud_setup_get_accounts_page (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dialogs_preferences_pages_nextcloud_setup_set_property (GObject * object,
                                                              guint property_id,
                                                              const GValue * value,
                                                              GParamSpec * pspec)
{
	DialogsPreferencesPagesNextcloudSetup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DIALOGS_PREFERENCES_PAGES_TYPE_NEXTCLOUD_SETUP, DialogsPreferencesPagesNextcloudSetup);
	switch (property_id) {
		case DIALOGS_PREFERENCES_PAGES_NEXTCLOUD_SETUP_ACCOUNTS_PAGE_PROPERTY:
		dialogs_preferences_pages_nextcloud_setup_set_accounts_page (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

