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

#include <glib-object.h>
#include "libdino.h"
#include "openpgp.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gpgme.h>
#include <gpgme_fix.h>
#include "xmpp-vala.h"
#include <gee.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

#define DINO_PLUGINS_OPEN_PGP_TYPE_ENCRYPTION_LIST_ENTRY (dino_plugins_open_pgp_encryption_list_entry_get_type ())
#define DINO_PLUGINS_OPEN_PGP_ENCRYPTION_LIST_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_PLUGINS_OPEN_PGP_TYPE_ENCRYPTION_LIST_ENTRY, DinoPluginsOpenPgpEncryptionListEntry))
#define DINO_PLUGINS_OPEN_PGP_ENCRYPTION_LIST_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_PLUGINS_OPEN_PGP_TYPE_ENCRYPTION_LIST_ENTRY, DinoPluginsOpenPgpEncryptionListEntryClass))
#define DINO_PLUGINS_OPEN_PGP_IS_ENCRYPTION_LIST_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_PLUGINS_OPEN_PGP_TYPE_ENCRYPTION_LIST_ENTRY))
#define DINO_PLUGINS_OPEN_PGP_IS_ENCRYPTION_LIST_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_PLUGINS_OPEN_PGP_TYPE_ENCRYPTION_LIST_ENTRY))
#define DINO_PLUGINS_OPEN_PGP_ENCRYPTION_LIST_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_PLUGINS_OPEN_PGP_TYPE_ENCRYPTION_LIST_ENTRY, DinoPluginsOpenPgpEncryptionListEntryClass))

typedef struct _DinoPluginsOpenPgpEncryptionListEntry DinoPluginsOpenPgpEncryptionListEntry;
typedef struct _DinoPluginsOpenPgpEncryptionListEntryClass DinoPluginsOpenPgpEncryptionListEntryClass;
typedef struct _DinoPluginsOpenPgpEncryptionListEntryPrivate DinoPluginsOpenPgpEncryptionListEntryPrivate;
enum  {
	DINO_PLUGINS_OPEN_PGP_ENCRYPTION_LIST_ENTRY_0_PROPERTY,
	DINO_PLUGINS_OPEN_PGP_ENCRYPTION_LIST_ENTRY_ENCRYPTION_PROPERTY,
	DINO_PLUGINS_OPEN_PGP_ENCRYPTION_LIST_ENTRY_NAME_PROPERTY,
	DINO_PLUGINS_OPEN_PGP_ENCRYPTION_LIST_ENTRY_NUM_PROPERTIES
};
static GParamSpec* dino_plugins_open_pgp_encryption_list_entry_properties[DINO_PLUGINS_OPEN_PGP_ENCRYPTION_LIST_ENTRY_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 = (g_free (var), NULL))
#define _gpgme_key_unref_vapi0(var) ((var == NULL) ? NULL : (var = (gpgme_key_unref_vapi (var), NULL)))
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))

struct _DinoPluginsOpenPgpEncryptionListEntry {
	GObject parent_instance;
	DinoPluginsOpenPgpEncryptionListEntryPrivate * priv;
};

struct _DinoPluginsOpenPgpEncryptionListEntryClass {
	GObjectClass parent_class;
};

struct _DinoPluginsOpenPgpEncryptionListEntryPrivate {
	DinoStreamInteractor* stream_interactor;
	DinoPluginsOpenPgpDatabase* db;
};

static gint DinoPluginsOpenPgpEncryptionListEntry_private_offset;
static gpointer dino_plugins_open_pgp_encryption_list_entry_parent_class = NULL;
static DinoPluginsEncryptionListEntryIface * dino_plugins_open_pgp_encryption_list_entry_dino_plugins_encryption_list_entry_parent_iface = NULL;

VALA_EXTERN GType dino_plugins_open_pgp_encryption_list_entry_get_type (void) G_GNUC_CONST ;
VALA_EXTERN DinoPluginsOpenPgpEncryptionListEntry* dino_plugins_open_pgp_encryption_list_entry_new (DinoStreamInteractor* stream_interactor,
                                                                                        DinoPluginsOpenPgpDatabase* db);
VALA_EXTERN DinoPluginsOpenPgpEncryptionListEntry* dino_plugins_open_pgp_encryption_list_entry_construct (GType object_type,
                                                                                              DinoStreamInteractor* stream_interactor,
                                                                                              DinoPluginsOpenPgpDatabase* db);
static GObject* dino_plugins_open_pgp_encryption_list_entry_real_get_encryption_icon (DinoPluginsEncryptionListEntry* base,
                                                                               DinoEntitiesConversation* conversation,
                                                                               DinoContentItem* content_item);
static gchar* dino_plugins_open_pgp_encryption_list_entry_real_get_encryption_icon_name (DinoPluginsEncryptionListEntry* base,
                                                                                  DinoEntitiesConversation* conversation,
                                                                                  DinoContentItem* content_item);
static void dino_plugins_open_pgp_encryption_list_entry_real_encryption_activated (DinoPluginsEncryptionListEntry* base,
                                                                            DinoEntitiesConversation* conversation,
                                                                            DinoPluginsSetInputFieldStatus input_status_callback,
                                                                            gpointer input_status_callback_target);
static void dino_plugins_open_pgp_encryption_list_entry_finalize (GObject * obj);
static GType dino_plugins_open_pgp_encryption_list_entry_get_type_once (void);
static void _vala_dino_plugins_open_pgp_encryption_list_entry_get_property (GObject * object,
                                                                     guint property_id,
                                                                     GValue * value,
                                                                     GParamSpec * pspec);

static inline gpointer
dino_plugins_open_pgp_encryption_list_entry_get_instance_private (DinoPluginsOpenPgpEncryptionListEntry* self)
{
	return G_STRUCT_MEMBER_P (self, DinoPluginsOpenPgpEncryptionListEntry_private_offset);
}

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

DinoPluginsOpenPgpEncryptionListEntry*
dino_plugins_open_pgp_encryption_list_entry_construct (GType object_type,
                                                       DinoStreamInteractor* stream_interactor,
                                                       DinoPluginsOpenPgpDatabase* db)
{
	DinoPluginsOpenPgpEncryptionListEntry * self = NULL;
	DinoStreamInteractor* _tmp0_;
	DinoPluginsOpenPgpDatabase* _tmp1_;
	g_return_val_if_fail (stream_interactor != NULL, NULL);
	g_return_val_if_fail (db != NULL, NULL);
	self = (DinoPluginsOpenPgpEncryptionListEntry*) 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;
}

DinoPluginsOpenPgpEncryptionListEntry*
dino_plugins_open_pgp_encryption_list_entry_new (DinoStreamInteractor* stream_interactor,
                                                 DinoPluginsOpenPgpDatabase* db)
{
	return dino_plugins_open_pgp_encryption_list_entry_construct (DINO_PLUGINS_OPEN_PGP_TYPE_ENCRYPTION_LIST_ENTRY, stream_interactor, db);
}

static GObject*
dino_plugins_open_pgp_encryption_list_entry_real_get_encryption_icon (DinoPluginsEncryptionListEntry* base,
                                                                      DinoEntitiesConversation* conversation,
                                                                      DinoContentItem* content_item)
{
	DinoPluginsOpenPgpEncryptionListEntry * self;
	GObject* result;
	self = (DinoPluginsOpenPgpEncryptionListEntry*) base;
	g_return_val_if_fail (conversation != NULL, NULL);
	g_return_val_if_fail (content_item != NULL, NULL);
	result = NULL;
	return result;
}

static gchar*
dino_plugins_open_pgp_encryption_list_entry_real_get_encryption_icon_name (DinoPluginsEncryptionListEntry* base,
                                                                           DinoEntitiesConversation* conversation,
                                                                           DinoContentItem* content_item)
{
	DinoPluginsOpenPgpEncryptionListEntry * self;
	gchar* result;
	self = (DinoPluginsOpenPgpEncryptionListEntry*) base;
	g_return_val_if_fail (conversation != NULL, NULL);
	g_return_val_if_fail (content_item != NULL, NULL);
	result = NULL;
	return result;
}

static void
dino_plugins_open_pgp_encryption_list_entry_real_encryption_activated (DinoPluginsEncryptionListEntry* base,
                                                                       DinoEntitiesConversation* conversation,
                                                                       DinoPluginsSetInputFieldStatus input_status_callback,
                                                                       gpointer input_status_callback_target)
{
	DinoPluginsOpenPgpEncryptionListEntry * self;
	DinoEntitiesConversationType _tmp10_;
	DinoEntitiesConversationType _tmp11_;
	GError* _inner_error0_ = NULL;
	self = (DinoPluginsOpenPgpEncryptionListEntry*) base;
	g_return_if_fail (conversation != NULL);
	{
		gchar* _tmp0_ = NULL;
		DinoPluginsOpenPgpDatabase* _tmp1_;
		DinoEntitiesAccount* _tmp2_;
		DinoEntitiesAccount* _tmp3_;
		gchar* _tmp4_;
		struct _gpgme_key* _tmp6_;
		struct _gpgme_key* _tmp7_;
		_tmp1_ = self->priv->db;
		_tmp2_ = dino_entities_conversation_get_account (conversation);
		_tmp3_ = _tmp2_;
		_tmp4_ = dino_plugins_open_pgp_database_get_account_key (_tmp1_, _tmp3_);
		_tmp0_ = _tmp4_;
		if (_tmp0_ == NULL) {
			gchar* _tmp5_;
			_tmp5_ = g_strdup ("");
			_g_free0 (_tmp0_);
			_tmp0_ = _tmp5_;
		}
		_tmp6_ = gpg_helper_get_public_key (_tmp0_, &_inner_error0_);
		_tmp7_ = _tmp6_;
		_gpgme_key_unref_vapi0 (_tmp7_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (_tmp0_);
			goto __catch0_g_error;
		}
		_g_free0 (_tmp0_);
	}
	goto __finally0;
	__catch0_g_error:
	{
		DinoPluginsInputFieldStatus* _tmp8_;
		DinoPluginsInputFieldStatus* _tmp9_;
		g_clear_error (&_inner_error0_);
		_tmp8_ = dino_plugins_input_field_status_new ("You didn't configure OpenPGP for this account. You can do that in the " \
"Accounts Dialog.", DINO_PLUGINS_INPUT_FIELD_STATUS_MESSAGE_TYPE_ERROR, DINO_PLUGINS_INPUT_FIELD_STATUS_INPUT_STATE_NO_SEND, FALSE);
		_tmp9_ = _tmp8_;
		input_status_callback (_tmp9_, input_status_callback_target);
		_g_object_unref0 (_tmp9_);
		return;
	}
	__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;
	}
	_tmp10_ = dino_entities_conversation_get_type_ (conversation);
	_tmp11_ = _tmp10_;
	if (_tmp11_ == DINO_ENTITIES_CONVERSATION_TYPE_CHAT) {
		gchar* key_id = NULL;
		DinoStreamInteractor* _tmp12_;
		DinoModuleIdentity* _tmp13_;
		gpointer _tmp14_;
		DinoPluginsOpenPgpManager* _tmp15_;
		DinoEntitiesAccount* _tmp16_;
		DinoEntitiesAccount* _tmp17_;
		XmppJid* _tmp18_;
		XmppJid* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		const gchar* _tmp22_;
		_tmp12_ = self->priv->stream_interactor;
		_tmp13_ = dino_plugins_open_pgp_manager_IDENTITY;
		_tmp14_ = dino_stream_interactor_get_module (_tmp12_, DINO_PLUGINS_OPEN_PGP_TYPE_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp13_);
		_tmp15_ = (DinoPluginsOpenPgpManager*) _tmp14_;
		_tmp16_ = dino_entities_conversation_get_account (conversation);
		_tmp17_ = _tmp16_;
		_tmp18_ = dino_entities_conversation_get_counterpart (conversation);
		_tmp19_ = _tmp18_;
		_tmp20_ = dino_plugins_open_pgp_manager_get_key_id (_tmp15_, _tmp17_, _tmp19_);
		_tmp21_ = _tmp20_;
		_g_object_unref0 (_tmp15_);
		key_id = _tmp21_;
		_tmp22_ = key_id;
		if (_tmp22_ == NULL) {
			gchar* _tmp23_;
			gchar* _tmp24_;
			DinoPluginsInputFieldStatus* _tmp25_;
			DinoPluginsInputFieldStatus* _tmp26_;
			_tmp23_ = g_strdup_printf ("This contact does not support %s encryption.", "OpenPGP");
			_tmp24_ = _tmp23_;
			_tmp25_ = dino_plugins_input_field_status_new (_tmp24_, DINO_PLUGINS_INPUT_FIELD_STATUS_MESSAGE_TYPE_ERROR, DINO_PLUGINS_INPUT_FIELD_STATUS_INPUT_STATE_NO_SEND, FALSE);
			_tmp26_ = _tmp25_;
			input_status_callback (_tmp26_, input_status_callback_target);
			_g_object_unref0 (_tmp26_);
			_g_free0 (_tmp24_);
			_g_free0 (key_id);
			return;
		}
		{
			const gchar* _tmp27_;
			GeeList* _tmp28_;
			GeeList* _tmp29_;
			_tmp27_ = key_id;
			_tmp28_ = gpg_helper_get_keylist (_tmp27_, FALSE, &_inner_error0_);
			_tmp29_ = _tmp28_;
			_g_object_unref0 (_tmp29_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch1_g_error;
			}
		}
		goto __finally1;
		__catch1_g_error:
		{
			DinoPluginsInputFieldStatus* _tmp30_;
			DinoPluginsInputFieldStatus* _tmp31_;
			g_clear_error (&_inner_error0_);
			_tmp30_ = dino_plugins_input_field_status_new ("This contact's OpenPGP key is not in your keyring.", DINO_PLUGINS_INPUT_FIELD_STATUS_MESSAGE_TYPE_ERROR, DINO_PLUGINS_INPUT_FIELD_STATUS_INPUT_STATE_NO_SEND, FALSE);
			_tmp31_ = _tmp30_;
			input_status_callback (_tmp31_, input_status_callback_target);
			_g_object_unref0 (_tmp31_);
		}
		__finally1:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_free0 (key_id);
			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;
		}
		_g_free0 (key_id);
	} else {
		DinoEntitiesConversationType _tmp32_;
		DinoEntitiesConversationType _tmp33_;
		_tmp32_ = dino_entities_conversation_get_type_ (conversation);
		_tmp33_ = _tmp32_;
		if (_tmp33_ == DINO_ENTITIES_CONVERSATION_TYPE_GROUPCHAT) {
			GeeList* muc_jids = NULL;
			GeeArrayList* _tmp34_;
			GeeList* occupants = NULL;
			DinoStreamInteractor* _tmp35_;
			DinoModuleIdentity* _tmp36_;
			gpointer _tmp37_;
			DinoMucManager* _tmp38_;
			XmppJid* _tmp39_;
			XmppJid* _tmp40_;
			DinoEntitiesAccount* _tmp41_;
			DinoEntitiesAccount* _tmp42_;
			GeeList* _tmp43_;
			GeeList* _tmp44_;
			GeeList* _tmp45_;
			GeeList* offline_members = NULL;
			DinoStreamInteractor* _tmp48_;
			DinoModuleIdentity* _tmp49_;
			gpointer _tmp50_;
			DinoMucManager* _tmp51_;
			XmppJid* _tmp52_;
			XmppJid* _tmp53_;
			DinoEntitiesAccount* _tmp54_;
			DinoEntitiesAccount* _tmp55_;
			GeeList* _tmp56_;
			GeeList* _tmp57_;
			GeeList* _tmp58_;
			_tmp34_ = gee_array_list_new (XMPP_TYPE_JID, (GBoxedCopyFunc) xmpp_jid_ref, (GDestroyNotify) xmpp_jid_unref, NULL, NULL, NULL);
			muc_jids = (GeeList*) _tmp34_;
			_tmp35_ = self->priv->stream_interactor;
			_tmp36_ = dino_muc_manager_IDENTITY;
			_tmp37_ = dino_stream_interactor_get_module (_tmp35_, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp36_);
			_tmp38_ = (DinoMucManager*) _tmp37_;
			_tmp39_ = dino_entities_conversation_get_counterpart (conversation);
			_tmp40_ = _tmp39_;
			_tmp41_ = dino_entities_conversation_get_account (conversation);
			_tmp42_ = _tmp41_;
			_tmp43_ = dino_muc_manager_get_occupants (_tmp38_, _tmp40_, _tmp42_);
			_tmp44_ = _tmp43_;
			_g_object_unref0 (_tmp38_);
			occupants = _tmp44_;
			_tmp45_ = occupants;
			if (_tmp45_ != NULL) {
				GeeList* _tmp46_;
				GeeList* _tmp47_;
				_tmp46_ = muc_jids;
				_tmp47_ = occupants;
				gee_collection_add_all ((GeeCollection*) _tmp46_, (GeeCollection*) _tmp47_);
			}
			_tmp48_ = self->priv->stream_interactor;
			_tmp49_ = dino_muc_manager_IDENTITY;
			_tmp50_ = dino_stream_interactor_get_module (_tmp48_, DINO_TYPE_MUC_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp49_);
			_tmp51_ = (DinoMucManager*) _tmp50_;
			_tmp52_ = dino_entities_conversation_get_counterpart (conversation);
			_tmp53_ = _tmp52_;
			_tmp54_ = dino_entities_conversation_get_account (conversation);
			_tmp55_ = _tmp54_;
			_tmp56_ = dino_muc_manager_get_offline_members (_tmp51_, _tmp53_, _tmp55_);
			_tmp57_ = _tmp56_;
			_g_object_unref0 (_tmp51_);
			offline_members = _tmp57_;
			_tmp58_ = offline_members;
			if (_tmp58_ != NULL) {
				GeeList* _tmp59_;
				GeeList* _tmp60_;
				_tmp59_ = muc_jids;
				_tmp60_ = offline_members;
				gee_collection_add_all ((GeeCollection*) _tmp59_, (GeeCollection*) _tmp60_);
			}
			{
				GeeList* _jid_list = NULL;
				GeeList* _tmp61_;
				gint _jid_size = 0;
				GeeList* _tmp62_;
				gint _tmp63_;
				gint _tmp64_;
				gint _jid_index = 0;
				_tmp61_ = muc_jids;
				_jid_list = _tmp61_;
				_tmp62_ = _jid_list;
				_tmp63_ = gee_collection_get_size ((GeeCollection*) _tmp62_);
				_tmp64_ = _tmp63_;
				_jid_size = _tmp64_;
				_jid_index = -1;
				while (TRUE) {
					gint _tmp65_;
					gint _tmp66_;
					XmppJid* jid = NULL;
					GeeList* _tmp67_;
					gpointer _tmp68_;
					gchar* key_id = NULL;
					DinoStreamInteractor* _tmp69_;
					DinoModuleIdentity* _tmp70_;
					gpointer _tmp71_;
					DinoPluginsOpenPgpManager* _tmp72_;
					DinoEntitiesAccount* _tmp73_;
					DinoEntitiesAccount* _tmp74_;
					XmppJid* _tmp75_;
					gchar* _tmp76_;
					gchar* _tmp77_;
					const gchar* _tmp78_;
					_jid_index = _jid_index + 1;
					_tmp65_ = _jid_index;
					_tmp66_ = _jid_size;
					if (!(_tmp65_ < _tmp66_)) {
						break;
					}
					_tmp67_ = _jid_list;
					_tmp68_ = gee_list_get (_tmp67_, _jid_index);
					jid = (XmppJid*) _tmp68_;
					_tmp69_ = self->priv->stream_interactor;
					_tmp70_ = dino_plugins_open_pgp_manager_IDENTITY;
					_tmp71_ = dino_stream_interactor_get_module (_tmp69_, DINO_PLUGINS_OPEN_PGP_TYPE_MANAGER, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _tmp70_);
					_tmp72_ = (DinoPluginsOpenPgpManager*) _tmp71_;
					_tmp73_ = dino_entities_conversation_get_account (conversation);
					_tmp74_ = _tmp73_;
					_tmp75_ = jid;
					_tmp76_ = dino_plugins_open_pgp_manager_get_key_id (_tmp72_, _tmp74_, _tmp75_);
					_tmp77_ = _tmp76_;
					_g_object_unref0 (_tmp72_);
					key_id = _tmp77_;
					_tmp78_ = key_id;
					if (_tmp78_ == NULL) {
						XmppJid* _tmp79_;
						gchar* _tmp80_;
						gchar* _tmp81_;
						const gchar* _tmp82_;
						gchar* _tmp83_;
						gchar* _tmp84_;
						DinoPluginsInputFieldStatus* _tmp85_;
						DinoPluginsInputFieldStatus* _tmp86_;
						_tmp79_ = jid;
						_tmp80_ = xmpp_jid_to_string (_tmp79_);
						_tmp81_ = _tmp80_;
						_tmp82_ = key_id;
						_tmp83_ = g_strdup_printf ("A member's OpenPGP key is not in your keyring: %s / %s.", _tmp81_, _tmp82_);
						_tmp84_ = _tmp83_;
						_tmp85_ = dino_plugins_input_field_status_new (_tmp84_, DINO_PLUGINS_INPUT_FIELD_STATUS_MESSAGE_TYPE_ERROR, DINO_PLUGINS_INPUT_FIELD_STATUS_INPUT_STATE_NO_SEND, FALSE);
						_tmp86_ = _tmp85_;
						input_status_callback (_tmp86_, input_status_callback_target);
						_g_object_unref0 (_tmp86_);
						_g_free0 (_tmp84_);
						_g_free0 (_tmp81_);
						_g_free0 (key_id);
						_xmpp_jid_unref0 (jid);
						_g_object_unref0 (offline_members);
						_g_object_unref0 (occupants);
						_g_object_unref0 (muc_jids);
						return;
					}
					_g_free0 (key_id);
					_xmpp_jid_unref0 (jid);
				}
			}
			_g_object_unref0 (offline_members);
			_g_object_unref0 (occupants);
			_g_object_unref0 (muc_jids);
		}
	}
}

static DinoEntitiesEncryption
dino_plugins_open_pgp_encryption_list_entry_real_get_encryption (DinoPluginsEncryptionListEntry* base)
{
	DinoEntitiesEncryption result;
	DinoPluginsOpenPgpEncryptionListEntry* self;
	self = (DinoPluginsOpenPgpEncryptionListEntry*) base;
	result = DINO_ENTITIES_ENCRYPTION_PGP;
	return result;
}

static const gchar*
dino_plugins_open_pgp_encryption_list_entry_real_get_name (DinoPluginsEncryptionListEntry* base)
{
	const gchar* result;
	DinoPluginsOpenPgpEncryptionListEntry* self;
	self = (DinoPluginsOpenPgpEncryptionListEntry*) base;
	result = "OpenPGP";
	return result;
}

static void
dino_plugins_open_pgp_encryption_list_entry_class_init (DinoPluginsOpenPgpEncryptionListEntryClass * klass,
                                                        gpointer klass_data)
{
	dino_plugins_open_pgp_encryption_list_entry_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoPluginsOpenPgpEncryptionListEntry_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_plugins_open_pgp_encryption_list_entry_get_property;
	G_OBJECT_CLASS (klass)->finalize = dino_plugins_open_pgp_encryption_list_entry_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_PLUGINS_OPEN_PGP_ENCRYPTION_LIST_ENTRY_ENCRYPTION_PROPERTY, dino_plugins_open_pgp_encryption_list_entry_properties[DINO_PLUGINS_OPEN_PGP_ENCRYPTION_LIST_ENTRY_ENCRYPTION_PROPERTY] = g_param_spec_enum ("encryption", "encryption", "encryption", DINO_ENTITIES_TYPE_ENCRYPTION, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_PLUGINS_OPEN_PGP_ENCRYPTION_LIST_ENTRY_NAME_PROPERTY, dino_plugins_open_pgp_encryption_list_entry_properties[DINO_PLUGINS_OPEN_PGP_ENCRYPTION_LIST_ENTRY_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
dino_plugins_open_pgp_encryption_list_entry_dino_plugins_encryption_list_entry_interface_init (DinoPluginsEncryptionListEntryIface * iface,
                                                                                               gpointer iface_data)
{
	dino_plugins_open_pgp_encryption_list_entry_dino_plugins_encryption_list_entry_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_encryption_icon = (GObject* (*) (DinoPluginsEncryptionListEntry*, DinoEntitiesConversation*, DinoContentItem*)) dino_plugins_open_pgp_encryption_list_entry_real_get_encryption_icon;
	iface->get_encryption_icon_name = (gchar* (*) (DinoPluginsEncryptionListEntry*, DinoEntitiesConversation*, DinoContentItem*)) dino_plugins_open_pgp_encryption_list_entry_real_get_encryption_icon_name;
	iface->encryption_activated = (void (*) (DinoPluginsEncryptionListEntry*, DinoEntitiesConversation*, DinoPluginsSetInputFieldStatus, gpointer)) dino_plugins_open_pgp_encryption_list_entry_real_encryption_activated;
	iface->get_encryption = dino_plugins_open_pgp_encryption_list_entry_real_get_encryption;
	iface->get_name = dino_plugins_open_pgp_encryption_list_entry_real_get_name;
}

static void
dino_plugins_open_pgp_encryption_list_entry_instance_init (DinoPluginsOpenPgpEncryptionListEntry * self,
                                                           gpointer klass)
{
	self->priv = dino_plugins_open_pgp_encryption_list_entry_get_instance_private (self);
}

static void
dino_plugins_open_pgp_encryption_list_entry_finalize (GObject * obj)
{
	DinoPluginsOpenPgpEncryptionListEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_PLUGINS_OPEN_PGP_TYPE_ENCRYPTION_LIST_ENTRY, DinoPluginsOpenPgpEncryptionListEntry);
	_g_object_unref0 (self->priv->stream_interactor);
	_qlite_database_unref0 (self->priv->db);
	G_OBJECT_CLASS (dino_plugins_open_pgp_encryption_list_entry_parent_class)->finalize (obj);
}

static GType
dino_plugins_open_pgp_encryption_list_entry_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoPluginsOpenPgpEncryptionListEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_plugins_open_pgp_encryption_list_entry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoPluginsOpenPgpEncryptionListEntry), 0, (GInstanceInitFunc) dino_plugins_open_pgp_encryption_list_entry_instance_init, NULL };
	static const GInterfaceInfo dino_plugins_encryption_list_entry_info = { (GInterfaceInitFunc) dino_plugins_open_pgp_encryption_list_entry_dino_plugins_encryption_list_entry_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType dino_plugins_open_pgp_encryption_list_entry_type_id;
	dino_plugins_open_pgp_encryption_list_entry_type_id = g_type_register_static (G_TYPE_OBJECT, "DinoPluginsOpenPgpEncryptionListEntry", &g_define_type_info, 0);
	g_type_add_interface_static (dino_plugins_open_pgp_encryption_list_entry_type_id, DINO_PLUGINS_TYPE_ENCRYPTION_LIST_ENTRY, &dino_plugins_encryption_list_entry_info);
	DinoPluginsOpenPgpEncryptionListEntry_private_offset = g_type_add_instance_private (dino_plugins_open_pgp_encryption_list_entry_type_id, sizeof (DinoPluginsOpenPgpEncryptionListEntryPrivate));
	return dino_plugins_open_pgp_encryption_list_entry_type_id;
}

GType
dino_plugins_open_pgp_encryption_list_entry_get_type (void)
{
	static volatile gsize dino_plugins_open_pgp_encryption_list_entry_type_id__once = 0;
	if (g_once_init_enter (&dino_plugins_open_pgp_encryption_list_entry_type_id__once)) {
		GType dino_plugins_open_pgp_encryption_list_entry_type_id;
		dino_plugins_open_pgp_encryption_list_entry_type_id = dino_plugins_open_pgp_encryption_list_entry_get_type_once ();
		g_once_init_leave (&dino_plugins_open_pgp_encryption_list_entry_type_id__once, dino_plugins_open_pgp_encryption_list_entry_type_id);
	}
	return dino_plugins_open_pgp_encryption_list_entry_type_id__once;
}

static void
_vala_dino_plugins_open_pgp_encryption_list_entry_get_property (GObject * object,
                                                                guint property_id,
                                                                GValue * value,
                                                                GParamSpec * pspec)
{
	DinoPluginsOpenPgpEncryptionListEntry * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_PLUGINS_OPEN_PGP_TYPE_ENCRYPTION_LIST_ENTRY, DinoPluginsOpenPgpEncryptionListEntry);
	switch (property_id) {
		case DINO_PLUGINS_OPEN_PGP_ENCRYPTION_LIST_ENTRY_ENCRYPTION_PROPERTY:
		g_value_set_enum (value, dino_plugins_encryption_list_entry_get_encryption ((DinoPluginsEncryptionListEntry*) self));
		break;
		case DINO_PLUGINS_OPEN_PGP_ENCRYPTION_LIST_ENTRY_NAME_PROPERTY:
		g_value_set_string (value, dino_plugins_encryption_list_entry_get_name ((DinoPluginsEncryptionListEntry*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

