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

#include "libdino.h"
#include <glib-object.h>
#include <glib.h>
#include <gio/gio.h>
#include "xmpp-vala.h"
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <gobject/gvaluecollector.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

enum  {
	DINO_REGISTER_0_PROPERTY,
	DINO_REGISTER_ID_PROPERTY,
	DINO_REGISTER_NUM_PROPERTIES
};
static GParamSpec* dino_register_properties[DINO_REGISTER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _qlite_database_unref0(var) ((var == NULL) ? NULL : (var = (qlite_database_unref (var), NULL)))
#define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL)))
typedef struct _Block39Data Block39Data;
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))
#define _xmpp_xmpp_stream_result_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xmpp_stream_result_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _DinoRegisterAddCheckAccountData DinoRegisterAddCheckAccountData;
#define _xmpp_error_stanza_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_error_stanza_unref (var), NULL)))
typedef struct _DinoRegisterChangePasswordData DinoRegisterChangePasswordData;
#define _dino_register_server_availability_return_unref0(var) ((var == NULL) ? NULL : (var = (dino_register_server_availability_return_unref (var), NULL)))
typedef struct _Block40Data Block40Data;
typedef struct _DinoRegisterCheckServerAvailabilityData DinoRegisterCheckServerAvailabilityData;
#define _dino_register_registration_form_return_unref0(var) ((var == NULL) ? NULL : (var = (dino_register_registration_form_return_unref (var), NULL)))
typedef struct _Block41Data Block41Data;
#define _xmpp_xep_data_forms_data_form_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_xep_data_forms_data_form_unref (var), NULL)))
typedef struct _DinoRegisterGetRegistrationFormData DinoRegisterGetRegistrationFormData;
typedef struct _Block42Data Block42Data;
typedef struct _DinoRegisterSubmitFormData DinoRegisterSubmitFormData;
typedef struct _DinoRegisterParamSpecServerAvailabilityReturn DinoRegisterParamSpecServerAvailabilityReturn;
typedef struct _DinoRegisterParamSpecRegistrationFormReturn DinoRegisterParamSpecRegistrationFormReturn;

struct _DinoRegisterPrivate {
	DinoStreamInteractor* stream_interactor;
	DinoDatabase* db;
};

struct _Block39Data {
	int _ref_count_;
	DinoRegister* self;
	DinoConnectionManagerConnectionErrorSource* ret;
	XmppXmppStream* stream;
	GSourceFunc callback;
	gpointer callback_target;
	GDestroyNotify callback_target_destroy_notify;
	DinoEntitiesAccount* account;
	gpointer _async_data_;
};

struct _DinoRegisterAddCheckAccountData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DinoRegister* self;
	DinoEntitiesAccount* account;
	DinoConnectionManagerConnectionErrorSource* result;
	Block39Data* _data39_;
	GeeList* list;
	GeeArrayList* _tmp0_;
	GeeList* _tmp1_;
	XmppIqModule* _tmp2_;
	XmppIqModule* _tmp3_;
	GeeList* _tmp4_;
	XmppJid* _tmp5_;
	XmppJid* _tmp6_;
	XmppJid* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	XmppSaslModule* _tmp12_;
	XmppSaslModule* _tmp13_;
	XmppXmppStreamResult* stream_result;
	XmppJid* _tmp14_;
	XmppJid* _tmp15_;
	XmppJid* _tmp16_;
	XmppJid* _tmp17_;
	XmppJid* _tmp18_;
	XmppJid* _tmp19_;
	GeeList* _tmp20_;
	const gchar* _tmp21_;
	XmppXmppStreamResult* _tmp22_;
	XmppXmppStreamResult* _tmp23_;
	XmppXmppStreamResult* _tmp24_;
	XmppTlsXmppStream* _tmp25_;
	XmppTlsXmppStream* _tmp26_;
	XmppXmppStreamResult* _tmp27_;
	GTlsCertificateFlags* _tmp28_;
	GTlsCertificateFlags* _tmp29_;
	DinoConnectionManagerConnectionErrorSource _tmp30_;
	DinoConnectionManagerConnectionErrorSource* _tmp31_;
	DinoConnectionManagerConnectionErrorSource* _tmp32_;
	DinoConnectionManagerConnectionErrorSource* _tmp33_;
	XmppXmppStreamResult* _tmp34_;
	XmppTlsXmppStream* _tmp35_;
	XmppTlsXmppStream* _tmp36_;
	XmppXmppStream* _tmp37_;
	XmppXmppStream* _tmp38_;
	XmppXmppStream* _tmp39_;
	XmppModuleIdentity* _tmp40_;
	gpointer _tmp41_;
	XmppSaslModule* _tmp42_;
	XmppXmppStream* _tmp43_;
	XmppXmppStreamResult* _tmp44_;
	XmppTlsXmppStream* _tmp45_;
	XmppTlsXmppStream* _tmp46_;
	DinoConnectionManagerConnectionErrorSource* _tmp47_;
	DinoConnectionManagerConnectionErrorSource* _tmp48_;
	GError* _inner_error0_;
};

struct _DinoRegisterChangePasswordData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	DinoRegister* self;
	DinoEntitiesAccount* account;
	gchar* new_pw;
	gchar* result;
	XmppXmppStream* stream;
	DinoStreamInteractor* _tmp0_;
	XmppXmppStream* _tmp1_;
	XmppXmppStream* _tmp2_;
	XmppXmppStream* _tmp3_;
	XmppModuleIdentity* _tmp4_;
	gpointer _tmp5_;
	XmppXepInBandRegistrationModule* _tmp6_;
	XmppXmppStream* _tmp7_;
	XmppJid* _tmp8_;
	XmppJid* _tmp9_;
	XmppErrorStanza* _tmp10_;
	XmppErrorStanza* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
};

struct _Block40Data {
	int _ref_count_;
	DinoRegisterServerAvailabilityReturn* ret;
	XmppXmppStream* stream;
	GSourceFunc callback;
	gpointer callback_target;
	GDestroyNotify callback_target_destroy_notify;
	XmppJid* jid;
	gpointer _async_data_;
};

struct _DinoRegisterCheckServerAvailabilityData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppJid* jid;
	DinoRegisterServerAvailabilityReturn* result;
	Block40Data* _data40_;
	DinoRegisterServerAvailabilityReturn* _tmp0_;
	GeeList* list;
	GeeArrayList* _tmp1_;
	GeeList* _tmp2_;
	XmppIqModule* _tmp3_;
	XmppIqModule* _tmp4_;
	XmppXmppStreamResult* stream_result;
	XmppJid* _tmp5_;
	XmppJid* _tmp6_;
	XmppJid* _tmp7_;
	GeeList* _tmp8_;
	const gchar* _tmp9_;
	XmppXmppStreamResult* _tmp10_;
	XmppXmppStreamResult* _tmp11_;
	XmppXmppStreamResult* _tmp12_;
	XmppTlsXmppStream* _tmp13_;
	XmppTlsXmppStream* _tmp14_;
	XmppXmppStreamResult* _tmp15_;
	GError* _tmp16_;
	GError* _tmp17_;
	XmppXmppStreamResult* _tmp18_;
	GError* _tmp19_;
	GError* _tmp20_;
	const gchar* _tmp21_;
	XmppXmppStreamResult* _tmp22_;
	GTlsCertificateFlags* _tmp23_;
	GTlsCertificateFlags* _tmp24_;
	DinoRegisterServerAvailabilityReturn* _tmp25_;
	XmppXmppStreamResult* _tmp26_;
	GTlsCertificateFlags* _tmp27_;
	GTlsCertificateFlags* _tmp28_;
	DinoRegisterServerAvailabilityReturn* _tmp29_;
	DinoRegisterServerAvailabilityReturn* _tmp30_;
	XmppXmppStreamResult* _tmp31_;
	XmppTlsXmppStream* _tmp32_;
	XmppTlsXmppStream* _tmp33_;
	XmppXmppStream* _tmp34_;
	XmppXmppStream* _tmp35_;
	XmppXmppStream* _tmp36_;
	XmppXmppStream* _tmp37_;
	DinoRegisterServerAvailabilityReturn* _tmp38_;
	DinoRegisterServerAvailabilityReturn* _tmp39_;
	GError* _inner_error0_;
};

struct _Block41Data {
	int _ref_count_;
	XmppXmppStream* stream;
	GSourceFunc callback;
	gpointer callback_target;
	GDestroyNotify callback_target_destroy_notify;
	XmppJid* jid;
	gpointer _async_data_;
};

struct _DinoRegisterGetRegistrationFormData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppJid* jid;
	DinoRegisterRegistrationFormReturn* result;
	Block41Data* _data41_;
	DinoRegisterRegistrationFormReturn* ret;
	DinoRegisterRegistrationFormReturn* _tmp0_;
	GeeList* list;
	GeeArrayList* _tmp1_;
	GeeList* _tmp2_;
	XmppIqModule* _tmp3_;
	XmppIqModule* _tmp4_;
	GeeList* _tmp5_;
	XmppXepInBandRegistrationModule* _tmp6_;
	XmppXepInBandRegistrationModule* _tmp7_;
	XmppXmppStreamResult* stream_result;
	XmppJid* _tmp8_;
	XmppJid* _tmp9_;
	XmppJid* _tmp10_;
	GeeList* _tmp11_;
	const gchar* _tmp12_;
	XmppXmppStreamResult* _tmp13_;
	XmppXmppStreamResult* _tmp14_;
	XmppXmppStreamResult* _tmp15_;
	XmppTlsXmppStream* _tmp16_;
	XmppTlsXmppStream* _tmp17_;
	XmppXmppStreamResult* _tmp18_;
	GError* _tmp19_;
	GError* _tmp20_;
	XmppXmppStreamResult* _tmp21_;
	GError* _tmp22_;
	GError* _tmp23_;
	const gchar* _tmp24_;
	XmppXmppStreamResult* _tmp25_;
	GTlsCertificateFlags* _tmp26_;
	GTlsCertificateFlags* _tmp27_;
	DinoRegisterRegistrationFormReturn* _tmp28_;
	XmppXmppStreamResult* _tmp29_;
	GTlsCertificateFlags* _tmp30_;
	GTlsCertificateFlags* _tmp31_;
	XmppXmppStreamResult* _tmp32_;
	XmppTlsXmppStream* _tmp33_;
	XmppTlsXmppStream* _tmp34_;
	XmppXmppStream* _tmp35_;
	XmppXmppStream* _tmp36_;
	XmppXmppStream* _tmp37_;
	XmppXmppStream* _tmp38_;
	gboolean _tmp39_;
	gboolean _tmp40_;
	DinoRegisterRegistrationFormReturn* _tmp41_;
	XmppXmppStream* _tmp42_;
	XmppModuleIdentity* _tmp43_;
	gpointer _tmp44_;
	XmppXepInBandRegistrationModule* _tmp45_;
	XmppXmppStream* _tmp46_;
	XmppXepInBandRegistrationForm* _tmp47_;
	XmppXepInBandRegistrationForm* _tmp48_;
	XmppXmppStream* _tmp49_;
	GError* _inner_error0_;
};

struct _Block42Data {
	int _ref_count_;
	XmppXmppStream* stream;
	GSourceFunc callback;
	gpointer callback_target;
	GDestroyNotify callback_target_destroy_notify;
	XmppJid* jid;
	gpointer _async_data_;
};

struct _DinoRegisterSubmitFormData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	XmppJid* jid;
	XmppXepInBandRegistrationForm* form;
	gchar* result;
	Block42Data* _data42_;
	GeeList* list;
	GeeArrayList* _tmp0_;
	GeeList* _tmp1_;
	XmppIqModule* _tmp2_;
	XmppIqModule* _tmp3_;
	GeeList* _tmp4_;
	XmppXepInBandRegistrationModule* _tmp5_;
	XmppXepInBandRegistrationModule* _tmp6_;
	XmppXmppStreamResult* stream_result;
	XmppJid* _tmp7_;
	XmppJid* _tmp8_;
	XmppJid* _tmp9_;
	GeeList* _tmp10_;
	const gchar* _tmp11_;
	XmppXmppStreamResult* _tmp12_;
	XmppXmppStreamResult* _tmp13_;
	XmppXmppStreamResult* _tmp14_;
	XmppTlsXmppStream* _tmp15_;
	XmppTlsXmppStream* _tmp16_;
	XmppXmppStreamResult* _tmp17_;
	XmppTlsXmppStream* _tmp18_;
	XmppTlsXmppStream* _tmp19_;
	XmppXmppStream* _tmp20_;
	XmppXmppStream* _tmp21_;
	XmppXmppStream* _tmp22_;
	gchar* ret;
	XmppXmppStream* _tmp23_;
	gboolean _tmp24_;
	gboolean _tmp25_;
	XmppXmppStream* _tmp26_;
	XmppModuleIdentity* _tmp27_;
	gpointer _tmp28_;
	XmppXepInBandRegistrationModule* _tmp29_;
	XmppXmppStream* _tmp30_;
	gchar* _tmp31_;
	XmppXmppStream* _tmp32_;
	GError* _inner_error0_;
};

struct _DinoRegisterServerAvailabilityReturnPrivate {
	gboolean _available;
	GTlsCertificateFlags* _error_flags;
};

struct _DinoRegisterParamSpecServerAvailabilityReturn {
	GParamSpec parent_instance;
};

struct _DinoRegisterRegistrationFormReturnPrivate {
	XmppXepInBandRegistrationForm* _form;
	GTlsCertificateFlags* _error_flags;
};

struct _DinoRegisterParamSpecRegistrationFormReturn {
	GParamSpec parent_instance;
};

static gint DinoRegister_private_offset;
static gpointer dino_register_parent_class = NULL;
DinoModuleIdentity* dino_register_IDENTITY = NULL;
VALA_EXTERN gchar* dino_application_print_xmpp;
static gint DinoRegisterServerAvailabilityReturn_private_offset;
static gpointer dino_register_server_availability_return_parent_class = NULL;
static gint DinoRegisterRegistrationFormReturn_private_offset;
static gpointer dino_register_registration_form_return_parent_class = NULL;
static DinoStreamInteractionModuleIface * dino_register_dino_stream_interaction_module_parent_iface = NULL;

static DinoRegister* dino_register_new (DinoStreamInteractor* stream_interactor,
                                 DinoDatabase* db);
static DinoRegister* dino_register_construct (GType object_type,
                                       DinoStreamInteractor* stream_interactor,
                                       DinoDatabase* db);
static void dino_register_add_check_account_data_free (gpointer _data);
static gboolean dino_register_add_check_account_co (DinoRegisterAddCheckAccountData* _data_);
static Block39Data* block39_data_ref (Block39Data* _data39_);
static void block39_data_unref (void * _userdata_);
static gboolean __lambda123_ (Block39Data* _data39_,
                       GTlsCertificate* peer_cert,
                       GTlsCertificateFlags errors);
static gboolean ___lambda123__xmpp_tls_xmpp_stream_on_invalid_cert (GTlsCertificate* peer_cert,
                                                             GTlsCertificateFlags errors,
                                                             gpointer self);
static void dino_register_add_check_account_ready (GObject* source_object,
                                            GAsyncResult* _res_,
                                            gpointer _user_data_);
static DinoConnectionManagerConnectionErrorSource* _dino_connection_manager_connection_error_source_dup (DinoConnectionManagerConnectionErrorSource* self);
static gboolean _dino_register_add_check_account_co_gsource_func (gpointer self);
static void __lambda124_ (Block39Data* _data39_);
static void ___lambda124__xmpp_xmpp_stream_stream_negotiated (XmppXmppStream* _sender,
                                                       XmppXmppStream* stream,
                                                       gpointer self);
static void __lambda125_ (Block39Data* _data39_,
                   XmppXmppStream* stream,
                   XmppStanzaNode* node);
static void ___lambda125__xmpp_sasl_module_received_auth_failure (XmppSaslModule* _sender,
                                                           XmppXmppStream* stream,
                                                           XmppStanzaNode* node,
                                                           gpointer self);
static void __lambda126_ (Block39Data* _data39_,
                   GObject* _,
                   GAsyncResult* res);
static void ___lambda126__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void dino_register_change_password_data_free (gpointer _data);
static gboolean dino_register_change_password_co (DinoRegisterChangePasswordData* _data_);
static void dino_register_change_password_ready (GObject* source_object,
                                          GAsyncResult* _res_,
                                          gpointer _user_data_);
static void dino_register_check_server_availability_data_free (gpointer _data);
static gboolean dino_register_check_server_availability_co (DinoRegisterCheckServerAvailabilityData* _data_);
static Block40Data* block40_data_ref (Block40Data* _data40_);
static void block40_data_unref (void * _userdata_);
static gboolean __lambda127_ (Block40Data* _data40_,
                       GTlsCertificate* peer_cert,
                       GTlsCertificateFlags errors);
static gboolean ___lambda127__xmpp_tls_xmpp_stream_on_invalid_cert (GTlsCertificate* peer_cert,
                                                             GTlsCertificateFlags errors,
                                                             gpointer self);
static void dino_register_check_server_availability_ready (GObject* source_object,
                                                    GAsyncResult* _res_,
                                                    gpointer _user_data_);
static gboolean _dino_register_check_server_availability_co_gsource_func (gpointer self);
static void __lambda128_ (Block40Data* _data40_);
static void ___lambda128__xmpp_xmpp_stream_stream_negotiated (XmppXmppStream* _sender,
                                                       XmppXmppStream* stream,
                                                       gpointer self);
static void __lambda129_ (Block40Data* _data40_,
                   GObject* _,
                   GAsyncResult* res);
static void ___lambda129__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void dino_register_get_registration_form_data_free (gpointer _data);
static gboolean dino_register_get_registration_form_co (DinoRegisterGetRegistrationFormData* _data_);
static Block41Data* block41_data_ref (Block41Data* _data41_);
static void block41_data_unref (void * _userdata_);
static gboolean __lambda130_ (Block41Data* _data41_,
                       GTlsCertificate* peer_cert,
                       GTlsCertificateFlags errors);
static gboolean ___lambda130__xmpp_tls_xmpp_stream_on_invalid_cert (GTlsCertificate* peer_cert,
                                                             GTlsCertificateFlags errors,
                                                             gpointer self);
static void dino_register_get_registration_form_ready (GObject* source_object,
                                                GAsyncResult* _res_,
                                                gpointer _user_data_);
static gboolean _dino_register_get_registration_form_co_gsource_func (gpointer self);
static void __lambda131_ (Block41Data* _data41_);
static void ___lambda131__xmpp_xmpp_stream_stream_negotiated (XmppXmppStream* _sender,
                                                       XmppXmppStream* stream,
                                                       gpointer self);
static void __lambda132_ (Block41Data* _data41_,
                   GObject* _,
                   GAsyncResult* res);
static void ___lambda132__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static void dino_register_submit_form_data_free (gpointer _data);
static gboolean dino_register_submit_form_co (DinoRegisterSubmitFormData* _data_);
static Block42Data* block42_data_ref (Block42Data* _data42_);
static void block42_data_unref (void * _userdata_);
static gboolean __lambda133_ (Block42Data* _data42_,
                       GTlsCertificate* peer_cert,
                       GTlsCertificateFlags errors);
static gboolean ___lambda133__xmpp_tls_xmpp_stream_on_invalid_cert (GTlsCertificate* peer_cert,
                                                             GTlsCertificateFlags errors,
                                                             gpointer self);
static void dino_register_submit_form_ready (GObject* source_object,
                                      GAsyncResult* _res_,
                                      gpointer _user_data_);
static gboolean _dino_register_submit_form_co_gsource_func (gpointer self);
static void __lambda134_ (Block42Data* _data42_);
static void ___lambda134__xmpp_xmpp_stream_stream_negotiated (XmppXmppStream* _sender,
                                                       XmppXmppStream* stream,
                                                       gpointer self);
static void __lambda135_ (Block42Data* _data42_,
                   GObject* _,
                   GAsyncResult* res);
static void ___lambda135__gasync_ready_callback (GObject* source_object,
                                          GAsyncResult* res,
                                          gpointer self);
static GTlsCertificateFlags* _g_tls_certificate_flags_dup (GTlsCertificateFlags* self);
static void dino_register_server_availability_return_finalize (DinoRegisterServerAvailabilityReturn * obj);
static GType dino_register_server_availability_return_get_type_once (void);
static void dino_register_registration_form_return_finalize (DinoRegisterRegistrationFormReturn * obj);
static GType dino_register_registration_form_return_get_type_once (void);
static void dino_register_finalize (GObject * obj);
static GType dino_register_get_type_once (void);
static void _vala_dino_register_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dino_register_get_instance_private (DinoRegister* self)
{
	return G_STRUCT_MEMBER_P (self, DinoRegister_private_offset);
}

void
dino_register_start (DinoStreamInteractor* stream_interactor,
                     DinoDatabase* db)
{
	DinoRegister* m = NULL;
	DinoRegister* _tmp0_;
	g_return_if_fail (stream_interactor != NULL);
	g_return_if_fail (db != NULL);
	_tmp0_ = dino_register_new (stream_interactor, db);
	m = _tmp0_;
	dino_stream_interactor_add_module (stream_interactor, (DinoStreamInteractionModule*) m);
	_g_object_unref0 (m);
}

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

static gpointer
_qlite_database_ref0 (gpointer self)
{
	return self ? qlite_database_ref (self) : NULL;
}

static DinoRegister*
dino_register_construct (GType object_type,
                         DinoStreamInteractor* stream_interactor,
                         DinoDatabase* db)
{
	DinoRegister * self = NULL;
	DinoStreamInteractor* _tmp0_;
	DinoDatabase* _tmp1_;
	g_return_val_if_fail (stream_interactor != NULL, NULL);
	g_return_val_if_fail (db != NULL, NULL);
	self = (DinoRegister*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (stream_interactor);
	_g_object_unref0 (self->priv->stream_interactor);
	self->priv->stream_interactor = _tmp0_;
	_tmp1_ = _qlite_database_ref0 (db);
	_qlite_database_unref0 (self->priv->db);
	self->priv->db = _tmp1_;
	return self;
}

static DinoRegister*
dino_register_new (DinoStreamInteractor* stream_interactor,
                   DinoDatabase* db)
{
	return dino_register_construct (DINO_TYPE_REGISTER, stream_interactor, db);
}

static void
dino_register_add_check_account_data_free (gpointer _data)
{
	DinoRegisterAddCheckAccountData* _data_;
	_data_ = _data;
	_g_free0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (DinoRegisterAddCheckAccountData, _data_);
}

void
dino_register_add_check_account (DinoRegister* self,
                                 DinoEntitiesAccount* account,
                                 GAsyncReadyCallback _callback_,
                                 gpointer _user_data_)
{
	DinoRegisterAddCheckAccountData* _data_;
	DinoRegister* _tmp0_;
	DinoEntitiesAccount* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (account != NULL);
	_data_ = g_slice_new0 (DinoRegisterAddCheckAccountData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dino_register_add_check_account_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (account);
	_g_object_unref0 (_data_->account);
	_data_->account = _tmp1_;
	dino_register_add_check_account_co (_data_);
}

DinoConnectionManagerConnectionErrorSource*
dino_register_add_check_account_finish (DinoRegister* self,
                                        GAsyncResult* _res_)
{
	DinoConnectionManagerConnectionErrorSource* result;
	DinoRegisterAddCheckAccountData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static Block39Data*
block39_data_ref (Block39Data* _data39_)
{
	g_atomic_int_inc (&_data39_->_ref_count_);
	return _data39_;
}

static void
block39_data_unref (void * _userdata_)
{
	Block39Data* _data39_;
	_data39_ = (Block39Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data39_->_ref_count_)) {
		DinoRegister* self;
		self = _data39_->self;
		(_data39_->callback_target_destroy_notify == NULL) ? NULL : (_data39_->callback_target_destroy_notify (_data39_->callback_target), NULL);
		_data39_->callback = NULL;
		_data39_->callback_target = NULL;
		_data39_->callback_target_destroy_notify = NULL;
		_g_object_unref0 (_data39_->stream);
		_g_free0 (_data39_->ret);
		_g_object_unref0 (_data39_->account);
		_g_object_unref0 (self);
		g_slice_free (Block39Data, _data39_);
	}
}

static gboolean
__lambda123_ (Block39Data* _data39_,
              GTlsCertificate* peer_cert,
              GTlsCertificateFlags errors)
{
	DinoRegister* self;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gboolean result;
	self = _data39_->self;
	g_return_val_if_fail (peer_cert != NULL, FALSE);
	_tmp0_ = dino_entities_account_get_domainpart (_data39_->account);
	_tmp1_ = _tmp0_;
	result = dino_connection_manager_on_invalid_certificate (_tmp1_, peer_cert, errors);
	return result;
}

static gboolean
___lambda123__xmpp_tls_xmpp_stream_on_invalid_cert (GTlsCertificate* peer_cert,
                                                    GTlsCertificateFlags errors,
                                                    gpointer self)
{
	gboolean result;
	result = __lambda123_ (self, peer_cert, errors);
	return result;
}

static void
dino_register_add_check_account_ready (GObject* source_object,
                                       GAsyncResult* _res_,
                                       gpointer _user_data_)
{
	DinoRegisterAddCheckAccountData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dino_register_add_check_account_co (_data_);
}

static DinoConnectionManagerConnectionErrorSource*
_dino_connection_manager_connection_error_source_dup (DinoConnectionManagerConnectionErrorSource* self)
{
	DinoConnectionManagerConnectionErrorSource* dup;
	dup = g_new0 (DinoConnectionManagerConnectionErrorSource, 1);
	memcpy (dup, self, sizeof (DinoConnectionManagerConnectionErrorSource));
	return dup;
}

static gpointer
__dino_connection_manager_connection_error_source_dup0 (gpointer self)
{
	return self ? _dino_connection_manager_connection_error_source_dup (self) : NULL;
}

static gboolean
_dino_register_add_check_account_co_gsource_func (gpointer self)
{
	gboolean result;
	result = dino_register_add_check_account_co (self);
	return result;
}

static void
__lambda124_ (Block39Data* _data39_)
{
	DinoRegister* self;
	GSourceFunc _tmp0_;
	gpointer _tmp0__target;
	GSourceFunc _tmp1_;
	gpointer _tmp1__target;
	GDestroyNotify _tmp1__target_destroy_notify;
	self = _data39_->self;
	_tmp0_ = _data39_->callback;
	_tmp0__target = _data39_->callback_target;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = _data39_->callback;
	_tmp1__target = _data39_->callback_target;
	_tmp1__target_destroy_notify = _data39_->callback_target_destroy_notify;
	_data39_->callback = NULL;
	_data39_->callback_target = NULL;
	_data39_->callback_target_destroy_notify = NULL;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tmp1_, _tmp1__target, _tmp1__target_destroy_notify);
}

static void
___lambda124__xmpp_xmpp_stream_stream_negotiated (XmppXmppStream* _sender,
                                                  XmppXmppStream* stream,
                                                  gpointer self)
{
	__lambda124_ (self);
}

static void
__lambda125_ (Block39Data* _data39_,
              XmppXmppStream* stream,
              XmppStanzaNode* node)
{
	DinoRegister* self;
	GSourceFunc _tmp0_;
	gpointer _tmp0__target;
	DinoConnectionManagerConnectionErrorSource _tmp1_;
	DinoConnectionManagerConnectionErrorSource* _tmp2_;
	GSourceFunc _tmp3_;
	gpointer _tmp3__target;
	GDestroyNotify _tmp3__target_destroy_notify;
	self = _data39_->self;
	g_return_if_fail (stream != NULL);
	g_return_if_fail (node != NULL);
	_tmp0_ = _data39_->callback;
	_tmp0__target = _data39_->callback_target;
	if (_tmp0_ == NULL) {
		return;
	}
	_tmp1_ = DINO_CONNECTION_MANAGER_CONNECTION_ERROR_SOURCE_SASL;
	_tmp2_ = __dino_connection_manager_connection_error_source_dup0 (&_tmp1_);
	_g_free0 (_data39_->ret);
	_data39_->ret = _tmp2_;
	_tmp3_ = _data39_->callback;
	_tmp3__target = _data39_->callback_target;
	_tmp3__target_destroy_notify = _data39_->callback_target_destroy_notify;
	_data39_->callback = NULL;
	_data39_->callback_target = NULL;
	_data39_->callback_target_destroy_notify = NULL;
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tmp3_, _tmp3__target, _tmp3__target_destroy_notify);
}

static void
___lambda125__xmpp_sasl_module_received_auth_failure (XmppSaslModule* _sender,
                                                      XmppXmppStream* stream,
                                                      XmppStanzaNode* node,
                                                      gpointer self)
{
	__lambda125_ (self, stream, node);
}

static void
__lambda126_ (Block39Data* _data39_,
              GObject* _,
              GAsyncResult* res)
{
	DinoRegister* self;
	GSourceFunc _tmp3_;
	gpointer _tmp3__target;
	GError* _inner_error0_ = NULL;
	self = _data39_->self;
	g_return_if_fail (res != NULL);
	{
		XmppXmppStream* _tmp0_;
		_tmp0_ = _data39_->stream;
		xmpp_xmpp_stream_loop_finish (_tmp0_, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_debug ("registration.vala:58: Error connecting to stream: %s", _tmp2_);
		_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;
	}
	_tmp3_ = _data39_->callback;
	_tmp3__target = _data39_->callback_target;
	if (_tmp3_ != NULL) {
		DinoConnectionManagerConnectionErrorSource _tmp4_;
		DinoConnectionManagerConnectionErrorSource* _tmp5_;
		GSourceFunc _tmp6_;
		gpointer _tmp6__target;
		GDestroyNotify _tmp6__target_destroy_notify;
		_tmp4_ = DINO_CONNECTION_MANAGER_CONNECTION_ERROR_SOURCE_CONNECTION;
		_tmp5_ = __dino_connection_manager_connection_error_source_dup0 (&_tmp4_);
		_g_free0 (_data39_->ret);
		_data39_->ret = _tmp5_;
		_tmp6_ = _data39_->callback;
		_tmp6__target = _data39_->callback_target;
		_tmp6__target_destroy_notify = _data39_->callback_target_destroy_notify;
		_data39_->callback = NULL;
		_data39_->callback_target = NULL;
		_data39_->callback_target_destroy_notify = NULL;
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tmp6_, _tmp6__target, _tmp6__target_destroy_notify);
	}
}

static void
___lambda126__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda126_ (self, source_object, res);
	block39_data_unref (self);
}

static gboolean
dino_register_add_check_account_co (DinoRegisterAddCheckAccountData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data39_ = g_slice_new0 (Block39Data);
	_data_->_data39_->_ref_count_ = 1;
	_data_->_data39_->self = g_object_ref (_data_->self);
	_g_object_unref0 (_data_->_data39_->account);
	_data_->_data39_->account = _data_->account;
	_data_->_data39_->_async_data_ = _data_;
	_data_->_data39_->ret = NULL;
	_data_->_tmp0_ = gee_array_list_new (XMPP_TYPE_XMPP_STREAM_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_data_->list = (GeeList*) _data_->_tmp0_;
	_data_->_tmp1_ = _data_->list;
	_data_->_tmp2_ = xmpp_iq_module_new ();
	_data_->_tmp3_ = _data_->_tmp2_;
	gee_collection_add ((GeeCollection*) _data_->_tmp1_, (XmppXmppStreamModule*) _data_->_tmp3_);
	_g_object_unref0 (_data_->_tmp3_);
	_data_->_tmp4_ = _data_->list;
	_data_->_tmp5_ = dino_entities_account_get_bare_jid (_data_->_data39_->account);
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = xmpp_jid_to_string (_data_->_tmp7_);
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->_tmp10_ = dino_entities_account_get_password (_data_->_data39_->account);
	_data_->_tmp11_ = _data_->_tmp10_;
	_data_->_tmp12_ = xmpp_sasl_module_new (_data_->_tmp9_, _data_->_tmp11_);
	_data_->_tmp13_ = _data_->_tmp12_;
	gee_collection_add ((GeeCollection*) _data_->_tmp4_, (XmppXmppStreamModule*) _data_->_tmp13_);
	_g_object_unref0 (_data_->_tmp13_);
	_g_free0 (_data_->_tmp9_);
	_xmpp_jid_unref0 (_data_->_tmp7_);
	_data_->_tmp14_ = dino_entities_account_get_bare_jid (_data_->_data39_->account);
	_data_->_tmp15_ = _data_->_tmp14_;
	_data_->_tmp16_ = _data_->_tmp15_;
	_data_->_tmp17_ = xmpp_jid_get_domain_jid (_data_->_tmp16_);
	_data_->_tmp18_ = _data_->_tmp17_;
	_data_->_tmp19_ = _data_->_tmp18_;
	_data_->_tmp20_ = _data_->list;
	_data_->_tmp21_ = dino_application_print_xmpp;
	_data_->_state_ = 1;
	xmpp_establish_stream (_data_->_tmp19_, _data_->_tmp20_, _data_->_tmp21_, ___lambda123__xmpp_tls_xmpp_stream_on_invalid_cert, block39_data_ref (_data_->_data39_), block39_data_unref, dino_register_add_check_account_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp22_ = xmpp_establish_stream_finish (_data_->_res_);
	_data_->_tmp23_ = _data_->_tmp22_;
	_xmpp_jid_unref0 (_data_->_tmp19_);
	_xmpp_jid_unref0 (_data_->_tmp16_);
	_data_->stream_result = _data_->_tmp23_;
	_data_->_tmp24_ = _data_->stream_result;
	_data_->_tmp25_ = xmpp_xmpp_stream_result_get_stream (_data_->_tmp24_);
	_data_->_tmp26_ = _data_->_tmp25_;
	if (_data_->_tmp26_ == NULL) {
		_data_->_tmp27_ = _data_->stream_result;
		_data_->_tmp28_ = xmpp_xmpp_stream_result_get_tls_errors (_data_->_tmp27_);
		_data_->_tmp29_ = _data_->_tmp28_;
		if (_data_->_tmp29_ != NULL) {
			_data_->_tmp30_ = DINO_CONNECTION_MANAGER_CONNECTION_ERROR_SOURCE_TLS;
			_data_->_tmp31_ = __dino_connection_manager_connection_error_source_dup0 (&_data_->_tmp30_);
			_g_free0 (_data_->_data39_->ret);
			_data_->_data39_->ret = _data_->_tmp31_;
		}
		_data_->_tmp32_ = _data_->_data39_->ret;
		_data_->_tmp33_ = __dino_connection_manager_connection_error_source_dup0 (_data_->_tmp32_);
		_data_->result = _data_->_tmp33_;
		_xmpp_xmpp_stream_result_unref0 (_data_->stream_result);
		_g_object_unref0 (_data_->list);
		block39_data_unref (_data_->_data39_);
		_data_->_data39_ = NULL;
		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;
	}
	_data_->_tmp34_ = _data_->stream_result;
	_data_->_tmp35_ = xmpp_xmpp_stream_result_get_stream (_data_->_tmp34_);
	_data_->_tmp36_ = _data_->_tmp35_;
	_data_->_tmp37_ = _g_object_ref0 ((XmppXmppStream*) _data_->_tmp36_);
	_data_->_data39_->stream = _data_->_tmp37_;
	_data_->_data39_->callback = _dino_register_add_check_account_co_gsource_func;
	_data_->_data39_->callback_target = _data_;
	_data_->_data39_->callback_target_destroy_notify = NULL;
	_data_->_tmp38_ = _data_->_data39_->stream;
	g_signal_connect_data (_data_->_tmp38_, "stream-negotiated", (GCallback) ___lambda124__xmpp_xmpp_stream_stream_negotiated, block39_data_ref (_data_->_data39_), (GClosureNotify) block39_data_unref, 0);
	_data_->_tmp39_ = _data_->_data39_->stream;
	_data_->_tmp40_ = xmpp_sasl_module_IDENTITY;
	_data_->_tmp41_ = xmpp_xmpp_stream_get_module (_data_->_tmp39_, XMPP_SASL_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp40_);
	_data_->_tmp42_ = (XmppSaslModule*) _data_->_tmp41_;
	g_signal_connect_data (_data_->_tmp42_, "received-auth-failure", (GCallback) ___lambda125__xmpp_sasl_module_received_auth_failure, block39_data_ref (_data_->_data39_), (GClosureNotify) block39_data_unref, 0);
	_g_object_unref0 (_data_->_tmp42_);
	_data_->_tmp43_ = _data_->_data39_->stream;
	xmpp_xmpp_stream_loop (_data_->_tmp43_, ___lambda126__gasync_ready_callback, block39_data_ref (_data_->_data39_));
	_data_->_state_ = 2;
	return FALSE;
	_state_2:
	;
	{
		_data_->_tmp44_ = _data_->stream_result;
		_data_->_tmp45_ = xmpp_xmpp_stream_result_get_stream (_data_->_tmp44_);
		_data_->_tmp46_ = _data_->_tmp45_;
		_data_->_state_ = 3;
		xmpp_xmpp_stream_disconnect ((XmppXmppStream*) _data_->_tmp46_, dino_register_add_check_account_ready, _data_);
		return FALSE;
		_state_3:
		xmpp_xmpp_stream_disconnect_finish ((XmppXmppStream*) _data_->_tmp46_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_xmpp_xmpp_stream_result_unref0 (_data_->stream_result);
		_g_object_unref0 (_data_->list);
		block39_data_unref (_data_->_data39_);
		_data_->_data39_ = 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;
	}
	_data_->_tmp47_ = _data_->_data39_->ret;
	_data_->_tmp48_ = __dino_connection_manager_connection_error_source_dup0 (_data_->_tmp47_);
	_data_->result = _data_->_tmp48_;
	_xmpp_xmpp_stream_result_unref0 (_data_->stream_result);
	_g_object_unref0 (_data_->list);
	block39_data_unref (_data_->_data39_);
	_data_->_data39_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
dino_register_change_password_data_free (gpointer _data)
{
	DinoRegisterChangePasswordData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->account);
	_g_free0 (_data_->new_pw);
	_g_free0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (DinoRegisterChangePasswordData, _data_);
}

void
dino_register_change_password (DinoRegister* self,
                               DinoEntitiesAccount* account,
                               const gchar* new_pw,
                               GAsyncReadyCallback _callback_,
                               gpointer _user_data_)
{
	DinoRegisterChangePasswordData* _data_;
	DinoRegister* _tmp0_;
	DinoEntitiesAccount* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (account != NULL);
	g_return_if_fail (new_pw != NULL);
	_data_ = g_slice_new0 (DinoRegisterChangePasswordData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dino_register_change_password_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (account);
	_g_object_unref0 (_data_->account);
	_data_->account = _tmp1_;
	_tmp2_ = g_strdup (new_pw);
	_g_free0 (_data_->new_pw);
	_data_->new_pw = _tmp2_;
	dino_register_change_password_co (_data_);
}

gchar*
dino_register_change_password_finish (DinoRegister* self,
                                      GAsyncResult* _res_)
{
	gchar* result;
	DinoRegisterChangePasswordData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static void
dino_register_change_password_ready (GObject* source_object,
                                     GAsyncResult* _res_,
                                     gpointer _user_data_)
{
	DinoRegisterChangePasswordData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dino_register_change_password_co (_data_);
}

static gboolean
dino_register_change_password_co (DinoRegisterChangePasswordData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->stream_interactor;
	_data_->_tmp1_ = dino_stream_interactor_get_stream (_data_->_tmp0_, _data_->account);
	_data_->stream = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->stream;
	if (_data_->_tmp2_ == NULL) {
		_data_->result = NULL;
		_g_object_unref0 (_data_->stream);
		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;
	}
	_data_->_tmp3_ = _data_->stream;
	_data_->_tmp4_ = xmpp_xep_in_band_registration_module_IDENTITY;
	_data_->_tmp5_ = xmpp_xmpp_stream_get_module (_data_->_tmp3_, XMPP_XEP_IN_BAND_REGISTRATION_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp4_);
	_data_->_tmp6_ = (XmppXepInBandRegistrationModule*) _data_->_tmp5_;
	_data_->_tmp7_ = _data_->stream;
	_data_->_tmp8_ = dino_entities_account_get_full_jid (_data_->account);
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->_state_ = 1;
	xmpp_xep_in_band_registration_module_change_password (_data_->_tmp6_, _data_->_tmp7_, _data_->_tmp9_, _data_->new_pw, dino_register_change_password_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp10_ = xmpp_xep_in_band_registration_module_change_password_finish (_data_->_tmp6_, _data_->_res_);
	_data_->_tmp11_ = _data_->_tmp10_;
	_data_->_tmp12_ = xmpp_error_stanza_get_condition (_data_->_tmp11_);
	_data_->_tmp13_ = _data_->_tmp12_;
	_data_->_tmp14_ = g_strdup (_data_->_tmp13_);
	_data_->_tmp15_ = _data_->_tmp14_;
	_xmpp_error_stanza_unref0 (_data_->_tmp11_);
	_g_object_unref0 (_data_->_tmp6_);
	_data_->result = _data_->_tmp15_;
	_g_object_unref0 (_data_->stream);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
dino_register_check_server_availability_data_free (gpointer _data)
{
	DinoRegisterCheckServerAvailabilityData* _data_;
	_data_ = _data;
	_dino_register_server_availability_return_unref0 (_data_->result);
	g_slice_free (DinoRegisterCheckServerAvailabilityData, _data_);
}

static gpointer
_xmpp_jid_ref0 (gpointer self)
{
	return self ? xmpp_jid_ref (self) : NULL;
}

void
dino_register_check_server_availability (XmppJid* jid,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	DinoRegisterCheckServerAvailabilityData* _data_;
	XmppJid* _tmp0_;
	g_return_if_fail (jid != NULL);
	_data_ = g_slice_new0 (DinoRegisterCheckServerAvailabilityData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dino_register_check_server_availability_data_free);
	_tmp0_ = _xmpp_jid_ref0 (jid);
	_xmpp_jid_unref0 (_data_->jid);
	_data_->jid = _tmp0_;
	dino_register_check_server_availability_co (_data_);
}

DinoRegisterServerAvailabilityReturn*
dino_register_check_server_availability_finish (GAsyncResult* _res_)
{
	DinoRegisterServerAvailabilityReturn* result;
	DinoRegisterCheckServerAvailabilityData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static Block40Data*
block40_data_ref (Block40Data* _data40_)
{
	g_atomic_int_inc (&_data40_->_ref_count_);
	return _data40_;
}

static void
block40_data_unref (void * _userdata_)
{
	Block40Data* _data40_;
	_data40_ = (Block40Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data40_->_ref_count_)) {
		(_data40_->callback_target_destroy_notify == NULL) ? NULL : (_data40_->callback_target_destroy_notify (_data40_->callback_target), NULL);
		_data40_->callback = NULL;
		_data40_->callback_target = NULL;
		_data40_->callback_target_destroy_notify = NULL;
		_g_object_unref0 (_data40_->stream);
		_dino_register_server_availability_return_unref0 (_data40_->ret);
		_xmpp_jid_unref0 (_data40_->jid);
		g_slice_free (Block40Data, _data40_);
	}
}

static gboolean
__lambda127_ (Block40Data* _data40_,
              GTlsCertificate* peer_cert,
              GTlsCertificateFlags errors)
{
	const gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (peer_cert != NULL, FALSE);
	_tmp0_ = _data40_->jid->domainpart;
	result = dino_connection_manager_on_invalid_certificate (_tmp0_, peer_cert, errors);
	return result;
}

static gboolean
___lambda127__xmpp_tls_xmpp_stream_on_invalid_cert (GTlsCertificate* peer_cert,
                                                    GTlsCertificateFlags errors,
                                                    gpointer self)
{
	gboolean result;
	result = __lambda127_ (self, peer_cert, errors);
	return result;
}

static void
dino_register_check_server_availability_ready (GObject* source_object,
                                               GAsyncResult* _res_,
                                               gpointer _user_data_)
{
	DinoRegisterCheckServerAvailabilityData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dino_register_check_server_availability_co (_data_);
}

static gpointer
_dino_register_server_availability_return_ref0 (gpointer self)
{
	return self ? dino_register_server_availability_return_ref (self) : NULL;
}

static gboolean
_dino_register_check_server_availability_co_gsource_func (gpointer self)
{
	gboolean result;
	result = dino_register_check_server_availability_co (self);
	return result;
}

static void
__lambda128_ (Block40Data* _data40_)
{
	GSourceFunc _tmp0_;
	gpointer _tmp0__target;
	_tmp0_ = _data40_->callback;
	_tmp0__target = _data40_->callback_target;
	if (_tmp0_ != NULL) {
		DinoRegisterServerAvailabilityReturn* _tmp1_;
		GSourceFunc _tmp2_;
		gpointer _tmp2__target;
		GDestroyNotify _tmp2__target_destroy_notify;
		_tmp1_ = _data40_->ret;
		dino_register_server_availability_return_set_available (_tmp1_, TRUE);
		_tmp2_ = _data40_->callback;
		_tmp2__target = _data40_->callback_target;
		_tmp2__target_destroy_notify = _data40_->callback_target_destroy_notify;
		_data40_->callback = NULL;
		_data40_->callback_target = NULL;
		_data40_->callback_target_destroy_notify = NULL;
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tmp2_, _tmp2__target, _tmp2__target_destroy_notify);
	}
}

static void
___lambda128__xmpp_xmpp_stream_stream_negotiated (XmppXmppStream* _sender,
                                                  XmppXmppStream* stream,
                                                  gpointer self)
{
	__lambda128_ (self);
}

static void
__lambda129_ (Block40Data* _data40_,
              GObject* _,
              GAsyncResult* res)
{
	GSourceFunc _tmp3_;
	gpointer _tmp3__target;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		XmppXmppStream* _tmp0_;
		_tmp0_ = _data40_->stream;
		xmpp_xmpp_stream_loop_finish (_tmp0_, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_debug ("registration.vala:118: Error connecting to stream: %s", _tmp2_);
		_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;
	}
	_tmp3_ = _data40_->callback;
	_tmp3__target = _data40_->callback_target;
	if (_tmp3_ != NULL) {
		GSourceFunc _tmp4_;
		gpointer _tmp4__target;
		GDestroyNotify _tmp4__target_destroy_notify;
		_tmp4_ = _data40_->callback;
		_tmp4__target = _data40_->callback_target;
		_tmp4__target_destroy_notify = _data40_->callback_target_destroy_notify;
		_data40_->callback = NULL;
		_data40_->callback_target = NULL;
		_data40_->callback_target_destroy_notify = NULL;
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tmp4_, _tmp4__target, _tmp4__target_destroy_notify);
	}
}

static void
___lambda129__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda129_ (self, source_object, res);
	block40_data_unref (self);
}

static gboolean
dino_register_check_server_availability_co (DinoRegisterCheckServerAvailabilityData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data40_ = g_slice_new0 (Block40Data);
	_data_->_data40_->_ref_count_ = 1;
	_xmpp_jid_unref0 (_data_->_data40_->jid);
	_data_->_data40_->jid = _data_->jid;
	_data_->_data40_->_async_data_ = _data_;
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = dino_register_server_availability_return_new ();
	dino_register_server_availability_return_set_available (_data_->_tmp0_, FALSE);
	_data_->_data40_->ret = _data_->_tmp0_;
	_data_->_tmp1_ = gee_array_list_new (XMPP_TYPE_XMPP_STREAM_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_data_->list = (GeeList*) _data_->_tmp1_;
	_data_->_tmp2_ = _data_->list;
	_data_->_tmp3_ = xmpp_iq_module_new ();
	_data_->_tmp4_ = _data_->_tmp3_;
	gee_collection_add ((GeeCollection*) _data_->_tmp2_, (XmppXmppStreamModule*) _data_->_tmp4_);
	_g_object_unref0 (_data_->_tmp4_);
	_data_->_tmp5_ = xmpp_jid_get_domain_jid (_data_->_data40_->jid);
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = _data_->_tmp6_;
	_data_->_tmp8_ = _data_->list;
	_data_->_tmp9_ = dino_application_print_xmpp;
	_data_->_state_ = 1;
	xmpp_establish_stream (_data_->_tmp7_, _data_->_tmp8_, _data_->_tmp9_, ___lambda127__xmpp_tls_xmpp_stream_on_invalid_cert, block40_data_ref (_data_->_data40_), block40_data_unref, dino_register_check_server_availability_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp10_ = xmpp_establish_stream_finish (_data_->_res_);
	_data_->_tmp11_ = _data_->_tmp10_;
	_xmpp_jid_unref0 (_data_->_tmp7_);
	_data_->stream_result = _data_->_tmp11_;
	_data_->_tmp12_ = _data_->stream_result;
	_data_->_tmp13_ = xmpp_xmpp_stream_result_get_stream (_data_->_tmp12_);
	_data_->_tmp14_ = _data_->_tmp13_;
	if (_data_->_tmp14_ == NULL) {
		_data_->_tmp15_ = _data_->stream_result;
		_data_->_tmp16_ = xmpp_xmpp_stream_result_get_io_error (_data_->_tmp15_);
		_data_->_tmp17_ = _data_->_tmp16_;
		if (_data_->_tmp17_ != NULL) {
			_data_->_tmp18_ = _data_->stream_result;
			_data_->_tmp19_ = xmpp_xmpp_stream_result_get_io_error (_data_->_tmp18_);
			_data_->_tmp20_ = _data_->_tmp19_;
			_data_->_tmp21_ = _data_->_tmp20_->message;
			g_debug ("registration.vala:97: Error connecting to stream: %s", _data_->_tmp21_);
		}
		_data_->_tmp22_ = _data_->stream_result;
		_data_->_tmp23_ = xmpp_xmpp_stream_result_get_tls_errors (_data_->_tmp22_);
		_data_->_tmp24_ = _data_->_tmp23_;
		if (_data_->_tmp24_ != NULL) {
			_data_->_tmp25_ = _data_->_data40_->ret;
			_data_->_tmp26_ = _data_->stream_result;
			_data_->_tmp27_ = xmpp_xmpp_stream_result_get_tls_errors (_data_->_tmp26_);
			_data_->_tmp28_ = _data_->_tmp27_;
			dino_register_server_availability_return_set_error_flags (_data_->_tmp25_, _data_->_tmp28_);
		}
		_data_->_tmp29_ = _data_->_data40_->ret;
		_data_->_tmp30_ = _dino_register_server_availability_return_ref0 (_data_->_tmp29_);
		_data_->result = _data_->_tmp30_;
		_xmpp_xmpp_stream_result_unref0 (_data_->stream_result);
		_g_object_unref0 (_data_->list);
		block40_data_unref (_data_->_data40_);
		_data_->_data40_ = NULL;
		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;
	}
	_data_->_tmp31_ = _data_->stream_result;
	_data_->_tmp32_ = xmpp_xmpp_stream_result_get_stream (_data_->_tmp31_);
	_data_->_tmp33_ = _data_->_tmp32_;
	_data_->_tmp34_ = _g_object_ref0 ((XmppXmppStream*) _data_->_tmp33_);
	_data_->_data40_->stream = _data_->_tmp34_;
	_data_->_data40_->callback = _dino_register_check_server_availability_co_gsource_func;
	_data_->_data40_->callback_target = _data_;
	_data_->_data40_->callback_target_destroy_notify = NULL;
	_data_->_tmp35_ = _data_->_data40_->stream;
	g_signal_connect_data (_data_->_tmp35_, "stream-negotiated", (GCallback) ___lambda128__xmpp_xmpp_stream_stream_negotiated, block40_data_ref (_data_->_data40_), (GClosureNotify) block40_data_unref, 0);
	_data_->_tmp36_ = _data_->_data40_->stream;
	xmpp_xmpp_stream_loop (_data_->_tmp36_, ___lambda129__gasync_ready_callback, block40_data_ref (_data_->_data40_));
	_data_->_state_ = 2;
	return FALSE;
	_state_2:
	;
	{
		_data_->_tmp37_ = _data_->_data40_->stream;
		_data_->_state_ = 3;
		xmpp_xmpp_stream_disconnect (_data_->_tmp37_, dino_register_check_server_availability_ready, _data_);
		return FALSE;
		_state_3:
		xmpp_xmpp_stream_disconnect_finish (_data_->_tmp37_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_xmpp_xmpp_stream_result_unref0 (_data_->stream_result);
		_g_object_unref0 (_data_->list);
		block40_data_unref (_data_->_data40_);
		_data_->_data40_ = 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;
	}
	_data_->_tmp38_ = _data_->_data40_->ret;
	_data_->_tmp39_ = _dino_register_server_availability_return_ref0 (_data_->_tmp38_);
	_data_->result = _data_->_tmp39_;
	_xmpp_xmpp_stream_result_unref0 (_data_->stream_result);
	_g_object_unref0 (_data_->list);
	block40_data_unref (_data_->_data40_);
	_data_->_data40_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
dino_register_get_registration_form_data_free (gpointer _data)
{
	DinoRegisterGetRegistrationFormData* _data_;
	_data_ = _data;
	_dino_register_registration_form_return_unref0 (_data_->result);
	g_slice_free (DinoRegisterGetRegistrationFormData, _data_);
}

void
dino_register_get_registration_form (XmppJid* jid,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_)
{
	DinoRegisterGetRegistrationFormData* _data_;
	XmppJid* _tmp0_;
	g_return_if_fail (jid != NULL);
	_data_ = g_slice_new0 (DinoRegisterGetRegistrationFormData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dino_register_get_registration_form_data_free);
	_tmp0_ = _xmpp_jid_ref0 (jid);
	_xmpp_jid_unref0 (_data_->jid);
	_data_->jid = _tmp0_;
	dino_register_get_registration_form_co (_data_);
}

DinoRegisterRegistrationFormReturn*
dino_register_get_registration_form_finish (GAsyncResult* _res_)
{
	DinoRegisterRegistrationFormReturn* result;
	DinoRegisterGetRegistrationFormData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static Block41Data*
block41_data_ref (Block41Data* _data41_)
{
	g_atomic_int_inc (&_data41_->_ref_count_);
	return _data41_;
}

static void
block41_data_unref (void * _userdata_)
{
	Block41Data* _data41_;
	_data41_ = (Block41Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data41_->_ref_count_)) {
		(_data41_->callback_target_destroy_notify == NULL) ? NULL : (_data41_->callback_target_destroy_notify (_data41_->callback_target), NULL);
		_data41_->callback = NULL;
		_data41_->callback_target = NULL;
		_data41_->callback_target_destroy_notify = NULL;
		_g_object_unref0 (_data41_->stream);
		_xmpp_jid_unref0 (_data41_->jid);
		g_slice_free (Block41Data, _data41_);
	}
}

static gboolean
__lambda130_ (Block41Data* _data41_,
              GTlsCertificate* peer_cert,
              GTlsCertificateFlags errors)
{
	const gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (peer_cert != NULL, FALSE);
	_tmp0_ = _data41_->jid->domainpart;
	result = dino_connection_manager_on_invalid_certificate (_tmp0_, peer_cert, errors);
	return result;
}

static gboolean
___lambda130__xmpp_tls_xmpp_stream_on_invalid_cert (GTlsCertificate* peer_cert,
                                                    GTlsCertificateFlags errors,
                                                    gpointer self)
{
	gboolean result;
	result = __lambda130_ (self, peer_cert, errors);
	return result;
}

static void
dino_register_get_registration_form_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_)
{
	DinoRegisterGetRegistrationFormData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dino_register_get_registration_form_co (_data_);
}

static gboolean
_dino_register_get_registration_form_co_gsource_func (gpointer self)
{
	gboolean result;
	result = dino_register_get_registration_form_co (self);
	return result;
}

static void
__lambda131_ (Block41Data* _data41_)
{
	GSourceFunc _tmp0_;
	gpointer _tmp0__target;
	_tmp0_ = _data41_->callback;
	_tmp0__target = _data41_->callback_target;
	if (_tmp0_ != NULL) {
		GSourceFunc _tmp1_;
		gpointer _tmp1__target;
		GDestroyNotify _tmp1__target_destroy_notify;
		_tmp1_ = _data41_->callback;
		_tmp1__target = _data41_->callback_target;
		_tmp1__target_destroy_notify = _data41_->callback_target_destroy_notify;
		_data41_->callback = NULL;
		_data41_->callback_target = NULL;
		_data41_->callback_target_destroy_notify = NULL;
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tmp1_, _tmp1__target, _tmp1__target_destroy_notify);
	}
}

static void
___lambda131__xmpp_xmpp_stream_stream_negotiated (XmppXmppStream* _sender,
                                                  XmppXmppStream* stream,
                                                  gpointer self)
{
	__lambda131_ (self);
}

static void
__lambda132_ (Block41Data* _data41_,
              GObject* _,
              GAsyncResult* res)
{
	GSourceFunc _tmp3_;
	gpointer _tmp3__target;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		XmppXmppStream* _tmp0_;
		_tmp0_ = _data41_->stream;
		xmpp_xmpp_stream_loop_finish (_tmp0_, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_debug ("registration.vala:172: Error connecting to stream: %s", _tmp2_);
		_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;
	}
	_tmp3_ = _data41_->callback;
	_tmp3__target = _data41_->callback_target;
	if (_tmp3_ != NULL) {
		GSourceFunc _tmp4_;
		gpointer _tmp4__target;
		GDestroyNotify _tmp4__target_destroy_notify;
		_tmp4_ = _data41_->callback;
		_tmp4__target = _data41_->callback_target;
		_tmp4__target_destroy_notify = _data41_->callback_target_destroy_notify;
		_data41_->callback = NULL;
		_data41_->callback_target = NULL;
		_data41_->callback_target_destroy_notify = NULL;
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tmp4_, _tmp4__target, _tmp4__target_destroy_notify);
	}
}

static void
___lambda132__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda132_ (self, source_object, res);
	block41_data_unref (self);
}

static gboolean
dino_register_get_registration_form_co (DinoRegisterGetRegistrationFormData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data41_ = g_slice_new0 (Block41Data);
	_data_->_data41_->_ref_count_ = 1;
	_xmpp_jid_unref0 (_data_->_data41_->jid);
	_data_->_data41_->jid = _data_->jid;
	_data_->_data41_->_async_data_ = _data_;
	_data_->_tmp0_ = dino_register_registration_form_return_new ();
	_data_->ret = _data_->_tmp0_;
	_data_->_tmp1_ = gee_array_list_new (XMPP_TYPE_XMPP_STREAM_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_data_->list = (GeeList*) _data_->_tmp1_;
	_data_->_tmp2_ = _data_->list;
	_data_->_tmp3_ = xmpp_iq_module_new ();
	_data_->_tmp4_ = _data_->_tmp3_;
	gee_collection_add ((GeeCollection*) _data_->_tmp2_, (XmppXmppStreamModule*) _data_->_tmp4_);
	_g_object_unref0 (_data_->_tmp4_);
	_data_->_tmp5_ = _data_->list;
	_data_->_tmp6_ = xmpp_xep_in_band_registration_module_new ();
	_data_->_tmp7_ = _data_->_tmp6_;
	gee_collection_add ((GeeCollection*) _data_->_tmp5_, (XmppXmppStreamModule*) _data_->_tmp7_);
	_g_object_unref0 (_data_->_tmp7_);
	_data_->_tmp8_ = xmpp_jid_get_domain_jid (_data_->_data41_->jid);
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->_tmp10_ = _data_->_tmp9_;
	_data_->_tmp11_ = _data_->list;
	_data_->_tmp12_ = dino_application_print_xmpp;
	_data_->_state_ = 1;
	xmpp_establish_stream (_data_->_tmp10_, _data_->_tmp11_, _data_->_tmp12_, ___lambda130__xmpp_tls_xmpp_stream_on_invalid_cert, block41_data_ref (_data_->_data41_), block41_data_unref, dino_register_get_registration_form_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp13_ = xmpp_establish_stream_finish (_data_->_res_);
	_data_->_tmp14_ = _data_->_tmp13_;
	_xmpp_jid_unref0 (_data_->_tmp10_);
	_data_->stream_result = _data_->_tmp14_;
	_data_->_tmp15_ = _data_->stream_result;
	_data_->_tmp16_ = xmpp_xmpp_stream_result_get_stream (_data_->_tmp15_);
	_data_->_tmp17_ = _data_->_tmp16_;
	if (_data_->_tmp17_ == NULL) {
		_data_->_tmp18_ = _data_->stream_result;
		_data_->_tmp19_ = xmpp_xmpp_stream_result_get_io_error (_data_->_tmp18_);
		_data_->_tmp20_ = _data_->_tmp19_;
		if (_data_->_tmp20_ != NULL) {
			_data_->_tmp21_ = _data_->stream_result;
			_data_->_tmp22_ = xmpp_xmpp_stream_result_get_io_error (_data_->_tmp21_);
			_data_->_tmp23_ = _data_->_tmp22_;
			_data_->_tmp24_ = _data_->_tmp23_->message;
			g_debug ("registration.vala:151: Error connecting to stream: %s", _data_->_tmp24_);
		}
		_data_->_tmp25_ = _data_->stream_result;
		_data_->_tmp26_ = xmpp_xmpp_stream_result_get_tls_errors (_data_->_tmp25_);
		_data_->_tmp27_ = _data_->_tmp26_;
		if (_data_->_tmp27_ != NULL) {
			_data_->_tmp28_ = _data_->ret;
			_data_->_tmp29_ = _data_->stream_result;
			_data_->_tmp30_ = xmpp_xmpp_stream_result_get_tls_errors (_data_->_tmp29_);
			_data_->_tmp31_ = _data_->_tmp30_;
			dino_register_registration_form_return_set_error_flags (_data_->_tmp28_, _data_->_tmp31_);
		}
		_data_->result = _data_->ret;
		_xmpp_xmpp_stream_result_unref0 (_data_->stream_result);
		_g_object_unref0 (_data_->list);
		block41_data_unref (_data_->_data41_);
		_data_->_data41_ = NULL;
		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;
	}
	_data_->_tmp32_ = _data_->stream_result;
	_data_->_tmp33_ = xmpp_xmpp_stream_result_get_stream (_data_->_tmp32_);
	_data_->_tmp34_ = _data_->_tmp33_;
	_data_->_tmp35_ = _g_object_ref0 ((XmppXmppStream*) _data_->_tmp34_);
	_data_->_data41_->stream = _data_->_tmp35_;
	_data_->_data41_->callback = _dino_register_get_registration_form_co_gsource_func;
	_data_->_data41_->callback_target = _data_;
	_data_->_data41_->callback_target_destroy_notify = NULL;
	_data_->_tmp36_ = _data_->_data41_->stream;
	g_signal_connect_data (_data_->_tmp36_, "stream-negotiated", (GCallback) ___lambda131__xmpp_xmpp_stream_stream_negotiated, block41_data_ref (_data_->_data41_), (GClosureNotify) block41_data_unref, 0);
	_data_->_tmp37_ = _data_->_data41_->stream;
	xmpp_xmpp_stream_loop (_data_->_tmp37_, ___lambda132__gasync_ready_callback, block41_data_ref (_data_->_data41_));
	_data_->_state_ = 2;
	return FALSE;
	_state_2:
	;
	_data_->_tmp38_ = _data_->_data41_->stream;
	_data_->_tmp39_ = xmpp_xmpp_stream_get_negotiation_complete (_data_->_tmp38_);
	_data_->_tmp40_ = _data_->_tmp39_;
	if (_data_->_tmp40_) {
		_data_->_tmp41_ = _data_->ret;
		_data_->_tmp42_ = _data_->_data41_->stream;
		_data_->_tmp43_ = xmpp_xep_in_band_registration_module_IDENTITY;
		_data_->_tmp44_ = xmpp_xmpp_stream_get_module (_data_->_tmp42_, XMPP_XEP_IN_BAND_REGISTRATION_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp43_);
		_data_->_tmp45_ = (XmppXepInBandRegistrationModule*) _data_->_tmp44_;
		_data_->_tmp46_ = _data_->_data41_->stream;
		_data_->_state_ = 3;
		xmpp_xep_in_band_registration_module_get_from_server (_data_->_tmp45_, _data_->_tmp46_, _data_->_data41_->jid, dino_register_get_registration_form_ready, _data_);
		return FALSE;
		_state_3:
		_data_->_tmp47_ = xmpp_xep_in_band_registration_module_get_from_server_finish (_data_->_tmp45_, _data_->_res_);
		_data_->_tmp48_ = _data_->_tmp47_;
		dino_register_registration_form_return_set_form (_data_->_tmp41_, _data_->_tmp48_);
		_xmpp_xep_data_forms_data_form_unref0 (_data_->_tmp48_);
		_g_object_unref0 (_data_->_tmp45_);
	}
	{
		_data_->_tmp49_ = _data_->_data41_->stream;
		_data_->_state_ = 4;
		xmpp_xmpp_stream_disconnect (_data_->_tmp49_, dino_register_get_registration_form_ready, _data_);
		return FALSE;
		_state_4:
		xmpp_xmpp_stream_disconnect_finish (_data_->_tmp49_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_xmpp_xmpp_stream_result_unref0 (_data_->stream_result);
		_g_object_unref0 (_data_->list);
		_dino_register_registration_form_return_unref0 (_data_->ret);
		block41_data_unref (_data_->_data41_);
		_data_->_data41_ = 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;
	}
	_data_->result = _data_->ret;
	_xmpp_xmpp_stream_result_unref0 (_data_->stream_result);
	_g_object_unref0 (_data_->list);
	block41_data_unref (_data_->_data41_);
	_data_->_data41_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
dino_register_submit_form_data_free (gpointer _data)
{
	DinoRegisterSubmitFormData* _data_;
	_data_ = _data;
	_xmpp_xep_data_forms_data_form_unref0 (_data_->form);
	_g_free0 (_data_->result);
	g_slice_free (DinoRegisterSubmitFormData, _data_);
}

static gpointer
_xmpp_xep_data_forms_data_form_ref0 (gpointer self)
{
	return self ? xmpp_xep_data_forms_data_form_ref (self) : NULL;
}

void
dino_register_submit_form (XmppJid* jid,
                           XmppXepInBandRegistrationForm* form,
                           GAsyncReadyCallback _callback_,
                           gpointer _user_data_)
{
	DinoRegisterSubmitFormData* _data_;
	XmppJid* _tmp0_;
	XmppXepInBandRegistrationForm* _tmp1_;
	g_return_if_fail (jid != NULL);
	g_return_if_fail (form != NULL);
	_data_ = g_slice_new0 (DinoRegisterSubmitFormData);
	_data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, dino_register_submit_form_data_free);
	_tmp0_ = _xmpp_jid_ref0 (jid);
	_xmpp_jid_unref0 (_data_->jid);
	_data_->jid = _tmp0_;
	_tmp1_ = _xmpp_xep_data_forms_data_form_ref0 (form);
	_xmpp_xep_data_forms_data_form_unref0 (_data_->form);
	_data_->form = _tmp1_;
	dino_register_submit_form_co (_data_);
}

gchar*
dino_register_submit_form_finish (GAsyncResult* _res_)
{
	gchar* result;
	DinoRegisterSubmitFormData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	_data_->result = NULL;
	return result;
}

static Block42Data*
block42_data_ref (Block42Data* _data42_)
{
	g_atomic_int_inc (&_data42_->_ref_count_);
	return _data42_;
}

static void
block42_data_unref (void * _userdata_)
{
	Block42Data* _data42_;
	_data42_ = (Block42Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data42_->_ref_count_)) {
		(_data42_->callback_target_destroy_notify == NULL) ? NULL : (_data42_->callback_target_destroy_notify (_data42_->callback_target), NULL);
		_data42_->callback = NULL;
		_data42_->callback_target = NULL;
		_data42_->callback_target_destroy_notify = NULL;
		_g_object_unref0 (_data42_->stream);
		_xmpp_jid_unref0 (_data42_->jid);
		g_slice_free (Block42Data, _data42_);
	}
}

static gboolean
__lambda133_ (Block42Data* _data42_,
              GTlsCertificate* peer_cert,
              GTlsCertificateFlags errors)
{
	const gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (peer_cert != NULL, FALSE);
	_tmp0_ = _data42_->jid->domainpart;
	result = dino_connection_manager_on_invalid_certificate (_tmp0_, peer_cert, errors);
	return result;
}

static gboolean
___lambda133__xmpp_tls_xmpp_stream_on_invalid_cert (GTlsCertificate* peer_cert,
                                                    GTlsCertificateFlags errors,
                                                    gpointer self)
{
	gboolean result;
	result = __lambda133_ (self, peer_cert, errors);
	return result;
}

static void
dino_register_submit_form_ready (GObject* source_object,
                                 GAsyncResult* _res_,
                                 gpointer _user_data_)
{
	DinoRegisterSubmitFormData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	dino_register_submit_form_co (_data_);
}

static gboolean
_dino_register_submit_form_co_gsource_func (gpointer self)
{
	gboolean result;
	result = dino_register_submit_form_co (self);
	return result;
}

static void
__lambda134_ (Block42Data* _data42_)
{
	GSourceFunc _tmp0_;
	gpointer _tmp0__target;
	_tmp0_ = _data42_->callback;
	_tmp0__target = _data42_->callback_target;
	if (_tmp0_ != NULL) {
		GSourceFunc _tmp1_;
		gpointer _tmp1__target;
		GDestroyNotify _tmp1__target_destroy_notify;
		_tmp1_ = _data42_->callback;
		_tmp1__target = _data42_->callback_target;
		_tmp1__target_destroy_notify = _data42_->callback_target_destroy_notify;
		_data42_->callback = NULL;
		_data42_->callback_target = NULL;
		_data42_->callback_target_destroy_notify = NULL;
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tmp1_, _tmp1__target, _tmp1__target_destroy_notify);
	}
}

static void
___lambda134__xmpp_xmpp_stream_stream_negotiated (XmppXmppStream* _sender,
                                                  XmppXmppStream* stream,
                                                  gpointer self)
{
	__lambda134_ (self);
}

static void
__lambda135_ (Block42Data* _data42_,
              GObject* _,
              GAsyncResult* res)
{
	GSourceFunc _tmp3_;
	gpointer _tmp3__target;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (res != NULL);
	{
		XmppXmppStream* _tmp0_;
		_tmp0_ = _data42_->stream;
		xmpp_xmpp_stream_loop_finish (_tmp0_, res, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_debug ("registration.vala:217: Error connecting to stream: %s", _tmp2_);
		_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;
	}
	_tmp3_ = _data42_->callback;
	_tmp3__target = _data42_->callback_target;
	if (_tmp3_ != NULL) {
		GSourceFunc _tmp4_;
		gpointer _tmp4__target;
		GDestroyNotify _tmp4__target_destroy_notify;
		_tmp4_ = _data42_->callback;
		_tmp4__target = _data42_->callback_target;
		_tmp4__target_destroy_notify = _data42_->callback_target_destroy_notify;
		_data42_->callback = NULL;
		_data42_->callback_target = NULL;
		_data42_->callback_target_destroy_notify = NULL;
		g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _tmp4_, _tmp4__target, _tmp4__target_destroy_notify);
	}
}

static void
___lambda135__gasync_ready_callback (GObject* source_object,
                                     GAsyncResult* res,
                                     gpointer self)
{
	__lambda135_ (self, source_object, res);
	block42_data_unref (self);
}

static gboolean
dino_register_submit_form_co (DinoRegisterSubmitFormData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data42_ = g_slice_new0 (Block42Data);
	_data_->_data42_->_ref_count_ = 1;
	_xmpp_jid_unref0 (_data_->_data42_->jid);
	_data_->_data42_->jid = _data_->jid;
	_data_->_data42_->_async_data_ = _data_;
	_data_->_tmp0_ = gee_array_list_new (XMPP_TYPE_XMPP_STREAM_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_data_->list = (GeeList*) _data_->_tmp0_;
	_data_->_tmp1_ = _data_->list;
	_data_->_tmp2_ = xmpp_iq_module_new ();
	_data_->_tmp3_ = _data_->_tmp2_;
	gee_collection_add ((GeeCollection*) _data_->_tmp1_, (XmppXmppStreamModule*) _data_->_tmp3_);
	_g_object_unref0 (_data_->_tmp3_);
	_data_->_tmp4_ = _data_->list;
	_data_->_tmp5_ = xmpp_xep_in_band_registration_module_new ();
	_data_->_tmp6_ = _data_->_tmp5_;
	gee_collection_add ((GeeCollection*) _data_->_tmp4_, (XmppXmppStreamModule*) _data_->_tmp6_);
	_g_object_unref0 (_data_->_tmp6_);
	_data_->_tmp7_ = xmpp_jid_get_domain_jid (_data_->_data42_->jid);
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_tmp9_ = _data_->_tmp8_;
	_data_->_tmp10_ = _data_->list;
	_data_->_tmp11_ = dino_application_print_xmpp;
	_data_->_state_ = 1;
	xmpp_establish_stream (_data_->_tmp9_, _data_->_tmp10_, _data_->_tmp11_, ___lambda133__xmpp_tls_xmpp_stream_on_invalid_cert, block42_data_ref (_data_->_data42_), block42_data_unref, dino_register_submit_form_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp12_ = xmpp_establish_stream_finish (_data_->_res_);
	_data_->_tmp13_ = _data_->_tmp12_;
	_xmpp_jid_unref0 (_data_->_tmp9_);
	_data_->stream_result = _data_->_tmp13_;
	_data_->_tmp14_ = _data_->stream_result;
	_data_->_tmp15_ = xmpp_xmpp_stream_result_get_stream (_data_->_tmp14_);
	_data_->_tmp16_ = _data_->_tmp15_;
	if (_data_->_tmp16_ == NULL) {
		_data_->result = NULL;
		_xmpp_xmpp_stream_result_unref0 (_data_->stream_result);
		_g_object_unref0 (_data_->list);
		block42_data_unref (_data_->_data42_);
		_data_->_data42_ = NULL;
		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;
	}
	_data_->_tmp17_ = _data_->stream_result;
	_data_->_tmp18_ = xmpp_xmpp_stream_result_get_stream (_data_->_tmp17_);
	_data_->_tmp19_ = _data_->_tmp18_;
	_data_->_tmp20_ = _g_object_ref0 ((XmppXmppStream*) _data_->_tmp19_);
	_data_->_data42_->stream = _data_->_tmp20_;
	_data_->_data42_->callback = _dino_register_submit_form_co_gsource_func;
	_data_->_data42_->callback_target = _data_;
	_data_->_data42_->callback_target_destroy_notify = NULL;
	_data_->_tmp21_ = _data_->_data42_->stream;
	g_signal_connect_data (_data_->_tmp21_, "stream-negotiated", (GCallback) ___lambda134__xmpp_xmpp_stream_stream_negotiated, block42_data_ref (_data_->_data42_), (GClosureNotify) block42_data_unref, 0);
	_data_->_tmp22_ = _data_->_data42_->stream;
	xmpp_xmpp_stream_loop (_data_->_tmp22_, ___lambda135__gasync_ready_callback, block42_data_ref (_data_->_data42_));
	_data_->_state_ = 2;
	return FALSE;
	_state_2:
	;
	_data_->ret = NULL;
	_data_->_tmp23_ = _data_->_data42_->stream;
	_data_->_tmp24_ = xmpp_xmpp_stream_get_negotiation_complete (_data_->_tmp23_);
	_data_->_tmp25_ = _data_->_tmp24_;
	if (_data_->_tmp25_) {
		_data_->_tmp26_ = _data_->_data42_->stream;
		_data_->_tmp27_ = xmpp_xep_in_band_registration_module_IDENTITY;
		_data_->_tmp28_ = xmpp_xmpp_stream_get_module (_data_->_tmp26_, XMPP_XEP_IN_BAND_REGISTRATION_TYPE_MODULE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp27_);
		_data_->_tmp29_ = (XmppXepInBandRegistrationModule*) _data_->_tmp28_;
		_data_->_tmp30_ = _data_->_data42_->stream;
		_data_->_state_ = 3;
		xmpp_xep_in_band_registration_module_submit_to_server (_data_->_tmp29_, _data_->_tmp30_, _data_->_data42_->jid, _data_->form, dino_register_submit_form_ready, _data_);
		return FALSE;
		_state_3:
		_data_->_tmp31_ = xmpp_xep_in_band_registration_module_submit_to_server_finish (_data_->_tmp29_, _data_->_res_);
		_g_free0 (_data_->ret);
		_data_->ret = _data_->_tmp31_;
		_g_object_unref0 (_data_->_tmp29_);
	}
	{
		_data_->_tmp32_ = _data_->_data42_->stream;
		_data_->_state_ = 4;
		xmpp_xmpp_stream_disconnect (_data_->_tmp32_, dino_register_submit_form_ready, _data_);
		return FALSE;
		_state_4:
		xmpp_xmpp_stream_disconnect_finish (_data_->_tmp32_, _data_->_res_, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_g_free0 (_data_->ret);
		_xmpp_xmpp_stream_result_unref0 (_data_->stream_result);
		_g_object_unref0 (_data_->list);
		block42_data_unref (_data_->_data42_);
		_data_->_data42_ = 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;
	}
	_data_->result = _data_->ret;
	_xmpp_xmpp_stream_result_unref0 (_data_->stream_result);
	_g_object_unref0 (_data_->list);
	block42_data_unref (_data_->_data42_);
	_data_->_data42_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static const gchar*
dino_register_real_get_id (DinoStreamInteractionModule* base)
{
	const gchar* result;
	DinoRegister* self;
	DinoModuleIdentity* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	self = (DinoRegister*) base;
	_tmp0_ = dino_register_IDENTITY;
	_tmp1_ = dino_module_identity_get_id (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

static inline gpointer
dino_register_server_availability_return_get_instance_private (DinoRegisterServerAvailabilityReturn* self)
{
	return G_STRUCT_MEMBER_P (self, DinoRegisterServerAvailabilityReturn_private_offset);
}

DinoRegisterServerAvailabilityReturn*
dino_register_server_availability_return_construct (GType object_type)
{
	DinoRegisterServerAvailabilityReturn* self = NULL;
	self = (DinoRegisterServerAvailabilityReturn*) g_type_create_instance (object_type);
	return self;
}

DinoRegisterServerAvailabilityReturn*
dino_register_server_availability_return_new (void)
{
	return dino_register_server_availability_return_construct (DINO_REGISTER_TYPE_SERVER_AVAILABILITY_RETURN);
}

gboolean
dino_register_server_availability_return_get_available (DinoRegisterServerAvailabilityReturn* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_available;
	return result;
}

void
dino_register_server_availability_return_set_available (DinoRegisterServerAvailabilityReturn* self,
                                                        gboolean value)
{
	g_return_if_fail (self != NULL);
	self->priv->_available = value;
}

GTlsCertificateFlags*
dino_register_server_availability_return_get_error_flags (DinoRegisterServerAvailabilityReturn* self)
{
	GTlsCertificateFlags* result;
	GTlsCertificateFlags* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_error_flags;
	result = _tmp0_;
	return result;
}

static GTlsCertificateFlags*
_g_tls_certificate_flags_dup (GTlsCertificateFlags* self)
{
	GTlsCertificateFlags* dup;
	dup = g_new0 (GTlsCertificateFlags, 1);
	memcpy (dup, self, sizeof (GTlsCertificateFlags));
	return dup;
}

static gpointer
__g_tls_certificate_flags_dup0 (gpointer self)
{
	return self ? _g_tls_certificate_flags_dup (self) : NULL;
}

void
dino_register_server_availability_return_set_error_flags (DinoRegisterServerAvailabilityReturn* self,
                                                          GTlsCertificateFlags* value)
{
	GTlsCertificateFlags* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = __g_tls_certificate_flags_dup0 (value);
	_g_free0 (self->priv->_error_flags);
	self->priv->_error_flags = _tmp0_;
}

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

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

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

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

static gchar*
dino_register_value_server_availability_return_collect_value (GValue* value,
                                                              guint n_collect_values,
                                                              GTypeCValue* collect_values,
                                                              guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		DinoRegisterServerAvailabilityReturn * 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 = dino_register_server_availability_return_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
dino_register_value_server_availability_return_lcopy_value (const GValue* value,
                                                            guint n_collect_values,
                                                            GTypeCValue* collect_values,
                                                            guint collect_flags)
{
	DinoRegisterServerAvailabilityReturn ** 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 = dino_register_server_availability_return_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
dino_register_param_spec_server_availability_return (const gchar* name,
                                                     const gchar* nick,
                                                     const gchar* blurb,
                                                     GType object_type,
                                                     GParamFlags flags)
{
	DinoRegisterParamSpecServerAvailabilityReturn* spec;
	g_return_val_if_fail (g_type_is_a (object_type, DINO_REGISTER_TYPE_SERVER_AVAILABILITY_RETURN), 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
dino_register_value_get_server_availability_return (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DINO_REGISTER_TYPE_SERVER_AVAILABILITY_RETURN), NULL);
	return value->data[0].v_pointer;
}

void
dino_register_value_set_server_availability_return (GValue* value,
                                                    gpointer v_object)
{
	DinoRegisterServerAvailabilityReturn * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DINO_REGISTER_TYPE_SERVER_AVAILABILITY_RETURN));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DINO_REGISTER_TYPE_SERVER_AVAILABILITY_RETURN));
		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;
		dino_register_server_availability_return_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		dino_register_server_availability_return_unref (old);
	}
}

void
dino_register_value_take_server_availability_return (GValue* value,
                                                     gpointer v_object)
{
	DinoRegisterServerAvailabilityReturn * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DINO_REGISTER_TYPE_SERVER_AVAILABILITY_RETURN));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DINO_REGISTER_TYPE_SERVER_AVAILABILITY_RETURN));
		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) {
		dino_register_server_availability_return_unref (old);
	}
}

static void
dino_register_server_availability_return_class_init (DinoRegisterServerAvailabilityReturnClass * klass,
                                                     gpointer klass_data)
{
	dino_register_server_availability_return_parent_class = g_type_class_peek_parent (klass);
	((DinoRegisterServerAvailabilityReturnClass *) klass)->finalize = dino_register_server_availability_return_finalize;
	g_type_class_adjust_private_offset (klass, &DinoRegisterServerAvailabilityReturn_private_offset);
}

static void
dino_register_server_availability_return_instance_init (DinoRegisterServerAvailabilityReturn * self,
                                                        gpointer klass)
{
	self->priv = dino_register_server_availability_return_get_instance_private (self);
	self->ref_count = 1;
}

static void
dino_register_server_availability_return_finalize (DinoRegisterServerAvailabilityReturn * obj)
{
	DinoRegisterServerAvailabilityReturn * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_REGISTER_TYPE_SERVER_AVAILABILITY_RETURN, DinoRegisterServerAvailabilityReturn);
	g_signal_handlers_destroy (self);
	_g_free0 (self->priv->_error_flags);
}

static GType
dino_register_server_availability_return_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { dino_register_value_server_availability_return_init, dino_register_value_server_availability_return_free_value, dino_register_value_server_availability_return_copy_value, dino_register_value_server_availability_return_peek_pointer, "p", dino_register_value_server_availability_return_collect_value, "p", dino_register_value_server_availability_return_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (DinoRegisterServerAvailabilityReturnClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_register_server_availability_return_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoRegisterServerAvailabilityReturn), 0, (GInstanceInitFunc) dino_register_server_availability_return_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 dino_register_server_availability_return_type_id;
	dino_register_server_availability_return_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DinoRegisterServerAvailabilityReturn", &g_define_type_info, &g_define_type_fundamental_info, 0);
	DinoRegisterServerAvailabilityReturn_private_offset = g_type_add_instance_private (dino_register_server_availability_return_type_id, sizeof (DinoRegisterServerAvailabilityReturnPrivate));
	return dino_register_server_availability_return_type_id;
}

GType
dino_register_server_availability_return_get_type (void)
{
	static volatile gsize dino_register_server_availability_return_type_id__once = 0;
	if (g_once_init_enter (&dino_register_server_availability_return_type_id__once)) {
		GType dino_register_server_availability_return_type_id;
		dino_register_server_availability_return_type_id = dino_register_server_availability_return_get_type_once ();
		g_once_init_leave (&dino_register_server_availability_return_type_id__once, dino_register_server_availability_return_type_id);
	}
	return dino_register_server_availability_return_type_id__once;
}

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

void
dino_register_server_availability_return_unref (gpointer instance)
{
	DinoRegisterServerAvailabilityReturn * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		DINO_REGISTER_SERVER_AVAILABILITY_RETURN_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static inline gpointer
dino_register_registration_form_return_get_instance_private (DinoRegisterRegistrationFormReturn* self)
{
	return G_STRUCT_MEMBER_P (self, DinoRegisterRegistrationFormReturn_private_offset);
}

DinoRegisterRegistrationFormReturn*
dino_register_registration_form_return_construct (GType object_type)
{
	DinoRegisterRegistrationFormReturn* self = NULL;
	self = (DinoRegisterRegistrationFormReturn*) g_type_create_instance (object_type);
	return self;
}

DinoRegisterRegistrationFormReturn*
dino_register_registration_form_return_new (void)
{
	return dino_register_registration_form_return_construct (DINO_REGISTER_TYPE_REGISTRATION_FORM_RETURN);
}

XmppXepInBandRegistrationForm*
dino_register_registration_form_return_get_form (DinoRegisterRegistrationFormReturn* self)
{
	XmppXepInBandRegistrationForm* result;
	XmppXepInBandRegistrationForm* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_form;
	result = _tmp0_;
	return result;
}

void
dino_register_registration_form_return_set_form (DinoRegisterRegistrationFormReturn* self,
                                                 XmppXepInBandRegistrationForm* value)
{
	XmppXepInBandRegistrationForm* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _xmpp_xep_data_forms_data_form_ref0 (value);
	_xmpp_xep_data_forms_data_form_unref0 (self->priv->_form);
	self->priv->_form = _tmp0_;
}

GTlsCertificateFlags*
dino_register_registration_form_return_get_error_flags (DinoRegisterRegistrationFormReturn* self)
{
	GTlsCertificateFlags* result;
	GTlsCertificateFlags* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_error_flags;
	result = _tmp0_;
	return result;
}

void
dino_register_registration_form_return_set_error_flags (DinoRegisterRegistrationFormReturn* self,
                                                        GTlsCertificateFlags* value)
{
	GTlsCertificateFlags* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = __g_tls_certificate_flags_dup0 (value);
	_g_free0 (self->priv->_error_flags);
	self->priv->_error_flags = _tmp0_;
}

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

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

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

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

static gchar*
dino_register_value_registration_form_return_collect_value (GValue* value,
                                                            guint n_collect_values,
                                                            GTypeCValue* collect_values,
                                                            guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		DinoRegisterRegistrationFormReturn * 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 = dino_register_registration_form_return_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
dino_register_value_registration_form_return_lcopy_value (const GValue* value,
                                                          guint n_collect_values,
                                                          GTypeCValue* collect_values,
                                                          guint collect_flags)
{
	DinoRegisterRegistrationFormReturn ** 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 = dino_register_registration_form_return_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
dino_register_param_spec_registration_form_return (const gchar* name,
                                                   const gchar* nick,
                                                   const gchar* blurb,
                                                   GType object_type,
                                                   GParamFlags flags)
{
	DinoRegisterParamSpecRegistrationFormReturn* spec;
	g_return_val_if_fail (g_type_is_a (object_type, DINO_REGISTER_TYPE_REGISTRATION_FORM_RETURN), 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
dino_register_value_get_registration_form_return (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DINO_REGISTER_TYPE_REGISTRATION_FORM_RETURN), NULL);
	return value->data[0].v_pointer;
}

void
dino_register_value_set_registration_form_return (GValue* value,
                                                  gpointer v_object)
{
	DinoRegisterRegistrationFormReturn * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DINO_REGISTER_TYPE_REGISTRATION_FORM_RETURN));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DINO_REGISTER_TYPE_REGISTRATION_FORM_RETURN));
		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;
		dino_register_registration_form_return_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		dino_register_registration_form_return_unref (old);
	}
}

void
dino_register_value_take_registration_form_return (GValue* value,
                                                   gpointer v_object)
{
	DinoRegisterRegistrationFormReturn * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, DINO_REGISTER_TYPE_REGISTRATION_FORM_RETURN));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, DINO_REGISTER_TYPE_REGISTRATION_FORM_RETURN));
		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) {
		dino_register_registration_form_return_unref (old);
	}
}

static void
dino_register_registration_form_return_class_init (DinoRegisterRegistrationFormReturnClass * klass,
                                                   gpointer klass_data)
{
	dino_register_registration_form_return_parent_class = g_type_class_peek_parent (klass);
	((DinoRegisterRegistrationFormReturnClass *) klass)->finalize = dino_register_registration_form_return_finalize;
	g_type_class_adjust_private_offset (klass, &DinoRegisterRegistrationFormReturn_private_offset);
}

static void
dino_register_registration_form_return_instance_init (DinoRegisterRegistrationFormReturn * self,
                                                      gpointer klass)
{
	self->priv = dino_register_registration_form_return_get_instance_private (self);
	self->ref_count = 1;
}

static void
dino_register_registration_form_return_finalize (DinoRegisterRegistrationFormReturn * obj)
{
	DinoRegisterRegistrationFormReturn * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_REGISTER_TYPE_REGISTRATION_FORM_RETURN, DinoRegisterRegistrationFormReturn);
	g_signal_handlers_destroy (self);
	_xmpp_xep_data_forms_data_form_unref0 (self->priv->_form);
	_g_free0 (self->priv->_error_flags);
}

static GType
dino_register_registration_form_return_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { dino_register_value_registration_form_return_init, dino_register_value_registration_form_return_free_value, dino_register_value_registration_form_return_copy_value, dino_register_value_registration_form_return_peek_pointer, "p", dino_register_value_registration_form_return_collect_value, "p", dino_register_value_registration_form_return_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (DinoRegisterRegistrationFormReturnClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_register_registration_form_return_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoRegisterRegistrationFormReturn), 0, (GInstanceInitFunc) dino_register_registration_form_return_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 dino_register_registration_form_return_type_id;
	dino_register_registration_form_return_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DinoRegisterRegistrationFormReturn", &g_define_type_info, &g_define_type_fundamental_info, 0);
	DinoRegisterRegistrationFormReturn_private_offset = g_type_add_instance_private (dino_register_registration_form_return_type_id, sizeof (DinoRegisterRegistrationFormReturnPrivate));
	return dino_register_registration_form_return_type_id;
}

GType
dino_register_registration_form_return_get_type (void)
{
	static volatile gsize dino_register_registration_form_return_type_id__once = 0;
	if (g_once_init_enter (&dino_register_registration_form_return_type_id__once)) {
		GType dino_register_registration_form_return_type_id;
		dino_register_registration_form_return_type_id = dino_register_registration_form_return_get_type_once ();
		g_once_init_leave (&dino_register_registration_form_return_type_id__once, dino_register_registration_form_return_type_id);
	}
	return dino_register_registration_form_return_type_id__once;
}

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

void
dino_register_registration_form_return_unref (gpointer instance)
{
	DinoRegisterRegistrationFormReturn * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		DINO_REGISTER_REGISTRATION_FORM_RETURN_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static void
dino_register_class_init (DinoRegisterClass * klass,
                          gpointer klass_data)
{
	DinoModuleIdentity* _tmp0_;
	dino_register_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoRegister_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_register_get_property;
	G_OBJECT_CLASS (klass)->finalize = dino_register_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_REGISTER_ID_PROPERTY, dino_register_properties[DINO_REGISTER_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	_tmp0_ = dino_module_identity_new (DINO_TYPE_REGISTER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, "registration");
	dino_register_IDENTITY = _tmp0_;
}

static void
dino_register_dino_stream_interaction_module_interface_init (DinoStreamInteractionModuleIface * iface,
                                                             gpointer iface_data)
{
	dino_register_dino_stream_interaction_module_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_id = dino_register_real_get_id;
}

static void
dino_register_instance_init (DinoRegister * self,
                             gpointer klass)
{
	self->priv = dino_register_get_instance_private (self);
}

static void
dino_register_finalize (GObject * obj)
{
	DinoRegister * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_TYPE_REGISTER, DinoRegister);
	_g_object_unref0 (self->priv->stream_interactor);
	_qlite_database_unref0 (self->priv->db);
	G_OBJECT_CLASS (dino_register_parent_class)->finalize (obj);
}

static GType
dino_register_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoRegisterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_register_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoRegister), 0, (GInstanceInitFunc) dino_register_instance_init, NULL };
	static const GInterfaceInfo dino_stream_interaction_module_info = { (GInterfaceInitFunc) dino_register_dino_stream_interaction_module_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType dino_register_type_id;
	dino_register_type_id = g_type_register_static (G_TYPE_OBJECT, "DinoRegister", &g_define_type_info, 0);
	g_type_add_interface_static (dino_register_type_id, DINO_TYPE_STREAM_INTERACTION_MODULE, &dino_stream_interaction_module_info);
	DinoRegister_private_offset = g_type_add_instance_private (dino_register_type_id, sizeof (DinoRegisterPrivate));
	return dino_register_type_id;
}

GType
dino_register_get_type (void)
{
	static volatile gsize dino_register_type_id__once = 0;
	if (g_once_init_enter (&dino_register_type_id__once)) {
		GType dino_register_type_id;
		dino_register_type_id = dino_register_get_type_once ();
		g_once_init_leave (&dino_register_type_id__once, dino_register_type_id);
	}
	return dino_register_type_id__once;
}

static void
_vala_dino_register_get_property (GObject * object,
                                  guint property_id,
                                  GValue * value,
                                  GParamSpec * pspec)
{
	DinoRegister * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_TYPE_REGISTER, DinoRegister);
	switch (property_id) {
		case DINO_REGISTER_ID_PROPERTY:
		g_value_set_string (value, dino_stream_interaction_module_get_id ((DinoStreamInteractionModule*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

