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

#include "xmpp-vala.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib-object.h>
#include <gee.h>

#define XMPP_XEP_BOOKMARKS_NS_URI "storage:bookmarks"
#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  {
	XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_0_PROPERTY,
	XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_AUTOJOIN_PROPERTY,
	XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_JID_PROPERTY,
	XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NAME_PROPERTY,
	XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NICK_PROPERTY,
	XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_PASSWORD_PROPERTY,
	XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NUM_PROPERTIES
};
static GParamSpec* xmpp_xep_bookmarks_bookmarks1_conference_properties[XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NUM_PROPERTIES];
#define _xmpp_stanza_entry_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_stanza_entry_unref (var), NULL)))
#define _xmpp_jid_unref0(var) ((var == NULL) ? NULL : (var = (xmpp_jid_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

struct _XmppXepBookmarksBookmarks1ConferencePrivate {
	XmppJid* jid_;
};

static gint XmppXepBookmarksBookmarks1Conference_private_offset;
static gpointer xmpp_xep_bookmarks_bookmarks1_conference_parent_class = NULL;

static XmppXepBookmarksBookmarks1Conference* xmpp_xep_bookmarks_bookmarks1_conference_new_from_stanza_node (XmppStanzaNode* stanza_node);
static XmppXepBookmarksBookmarks1Conference* xmpp_xep_bookmarks_bookmarks1_conference_construct_from_stanza_node (GType object_type,
                                                                                                           XmppStanzaNode* stanza_node);
static void xmpp_xep_bookmarks_bookmarks1_conference_finalize (GObject * obj);
static GType xmpp_xep_bookmarks_bookmarks1_conference_get_type_once (void);
static void _vala_xmpp_xep_bookmarks_bookmarks1_conference_get_property (GObject * object,
                                                                  guint property_id,
                                                                  GValue * value,
                                                                  GParamSpec * pspec);
static void _vala_xmpp_xep_bookmarks_bookmarks1_conference_set_property (GObject * object,
                                                                  guint property_id,
                                                                  const GValue * value,
                                                                  GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
xmpp_xep_bookmarks_bookmarks1_conference_get_instance_private (XmppXepBookmarksBookmarks1Conference* self)
{
	return G_STRUCT_MEMBER_P (self, XmppXepBookmarksBookmarks1Conference_private_offset);
}

XmppXepBookmarksBookmarks1Conference*
xmpp_xep_bookmarks_bookmarks1_conference_construct (GType object_type,
                                                    XmppJid* jid)
{
	XmppXepBookmarksBookmarks1Conference * self = NULL;
	XmppStanzaNode* _tmp0_;
	g_return_val_if_fail (jid != NULL, NULL);
	self = (XmppXepBookmarksBookmarks1Conference*) xmpp_conference_construct (object_type);
	_tmp0_ = xmpp_stanza_node_new_build ("conference", XMPP_XEP_BOOKMARKS_NS_URI, NULL, NULL);
	_xmpp_stanza_entry_unref0 (self->stanza_node);
	self->stanza_node = _tmp0_;
	xmpp_conference_set_jid ((XmppConference*) self, jid);
	return self;
}

XmppXepBookmarksBookmarks1Conference*
xmpp_xep_bookmarks_bookmarks1_conference_new (XmppJid* jid)
{
	return xmpp_xep_bookmarks_bookmarks1_conference_construct (XMPP_XEP_BOOKMARKS_TYPE_BOOKMARKS1_CONFERENCE, jid);
}

XmppConference*
xmpp_xep_bookmarks_bookmarks1_conference_create_from_stanza_node (XmppStanzaNode* stanza_node)
{
	const gchar* _tmp0_;
	XmppConference* result;
	g_return_val_if_fail (stanza_node != NULL, NULL);
	_tmp0_ = xmpp_stanza_node_get_attribute (stanza_node, XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_ATTRIBUTE_JID, NULL);
	if (_tmp0_ != NULL) {
		XmppXepBookmarksBookmarks1Conference* _tmp1_;
		_tmp1_ = xmpp_xep_bookmarks_bookmarks1_conference_new_from_stanza_node (stanza_node);
		result = (XmppConference*) _tmp1_;
		return result;
	}
	result = NULL;
	return result;
}

static gpointer
_xmpp_stanza_entry_ref0 (gpointer self)
{
	return self ? xmpp_stanza_entry_ref (self) : NULL;
}

static XmppXepBookmarksBookmarks1Conference*
xmpp_xep_bookmarks_bookmarks1_conference_construct_from_stanza_node (GType object_type,
                                                                     XmppStanzaNode* stanza_node)
{
	XmppXepBookmarksBookmarks1Conference * self = NULL;
	XmppStanzaNode* _tmp0_;
	g_return_val_if_fail (stanza_node != NULL, NULL);
	self = (XmppXepBookmarksBookmarks1Conference*) xmpp_conference_construct (object_type);
	_tmp0_ = _xmpp_stanza_entry_ref0 (stanza_node);
	_xmpp_stanza_entry_unref0 (self->stanza_node);
	self->stanza_node = _tmp0_;
	return self;
}

static XmppXepBookmarksBookmarks1Conference*
xmpp_xep_bookmarks_bookmarks1_conference_new_from_stanza_node (XmppStanzaNode* stanza_node)
{
	return xmpp_xep_bookmarks_bookmarks1_conference_construct_from_stanza_node (XMPP_XEP_BOOKMARKS_TYPE_BOOKMARKS1_CONFERENCE, stanza_node);
}

static gboolean
xmpp_xep_bookmarks_bookmarks1_conference_real_get_autojoin (XmppConference* base)
{
	gboolean result;
	XmppXepBookmarksBookmarks1Conference* self;
	gchar* attr = NULL;
	XmppStanzaNode* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gboolean _tmp3_ = FALSE;
	const gchar* _tmp4_;
	self = (XmppXepBookmarksBookmarks1Conference*) base;
	_tmp0_ = self->stanza_node;
	_tmp1_ = xmpp_stanza_node_get_attribute (_tmp0_, XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_ATTRIBUTE_AUTOJOIN, NULL);
	_tmp2_ = g_strdup (_tmp1_);
	attr = _tmp2_;
	_tmp4_ = attr;
	if (g_strcmp0 (_tmp4_, "true") == 0) {
		_tmp3_ = TRUE;
	} else {
		const gchar* _tmp5_;
		_tmp5_ = attr;
		_tmp3_ = g_strcmp0 (_tmp5_, "1") == 0;
	}
	result = _tmp3_;
	_g_free0 (attr);
	return result;
}

static gchar*
bool_to_string (gboolean self)
{
	gchar* result;
	if (self) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup ("true");
		result = _tmp0_;
		return result;
	} else {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("false");
		result = _tmp1_;
		return result;
	}
}

static void
xmpp_xep_bookmarks_bookmarks1_conference_real_set_autojoin (XmppConference* base,
                                                            gboolean value)
{
	XmppXepBookmarksBookmarks1Conference* self;
	XmppStanzaNode* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	self = (XmppXepBookmarksBookmarks1Conference*) base;
	_tmp0_ = self->stanza_node;
	_tmp1_ = bool_to_string (value);
	_tmp2_ = _tmp1_;
	xmpp_stanza_node_set_attribute (_tmp0_, XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_ATTRIBUTE_AUTOJOIN, _tmp2_, NULL);
	_g_free0 (_tmp2_);
	g_object_notify_by_pspec ((GObject *) self, xmpp_xep_bookmarks_bookmarks1_conference_properties[XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_AUTOJOIN_PROPERTY]);
}

static XmppJid*
xmpp_xep_bookmarks_bookmarks1_conference_real_get_jid (XmppConference* base)
{
	XmppJid* result;
	XmppXepBookmarksBookmarks1Conference* self;
	GError* _inner_error0_ = NULL;
	self = (XmppXepBookmarksBookmarks1Conference*) base;
	{
		XmppJid* _tmp0_ = NULL;
		XmppJid* _tmp1_;
		_tmp1_ = self->priv->jid_;
		_tmp0_ = _tmp1_;
		if (_tmp0_ == NULL) {
			XmppJid* _tmp2_ = NULL;
			XmppStanzaNode* _tmp3_;
			const gchar* _tmp4_;
			XmppJid* _tmp5_;
			XmppJid* _tmp6_;
			XmppJid* _tmp7_;
			_tmp3_ = self->stanza_node;
			_tmp4_ = xmpp_stanza_node_get_attribute (_tmp3_, XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_ATTRIBUTE_JID, NULL);
			_tmp5_ = xmpp_jid_new (_tmp4_, &_inner_error0_);
			_tmp2_ = _tmp5_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				if (_inner_error0_->domain == XMPP_INVALID_JID_ERROR) {
					goto __catch0_xmpp_invalid_jid_error;
				}
				g_critical ("file %s: line %d: unexpected 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 NULL;
			}
			_tmp6_ = _tmp2_;
			_tmp2_ = NULL;
			_xmpp_jid_unref0 (self->priv->jid_);
			self->priv->jid_ = _tmp6_;
			_tmp7_ = self->priv->jid_;
			_tmp0_ = _tmp7_;
			_xmpp_jid_unref0 (_tmp2_);
		}
		result = _tmp0_;
		return result;
	}
	goto __finally0;
	__catch0_xmpp_invalid_jid_error:
	{
		g_clear_error (&_inner_error0_);
		result = NULL;
		return result;
	}
	__finally0:
	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 NULL;
}

static void
xmpp_xep_bookmarks_bookmarks1_conference_real_set_jid (XmppConference* base,
                                                       XmppJid* value)
{
	XmppXepBookmarksBookmarks1Conference* self;
	XmppStanzaNode* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	self = (XmppXepBookmarksBookmarks1Conference*) base;
	_tmp0_ = self->stanza_node;
	_tmp1_ = xmpp_jid_to_string (value);
	_tmp2_ = _tmp1_;
	xmpp_stanza_node_set_attribute (_tmp0_, XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_ATTRIBUTE_JID, _tmp2_, NULL);
	_g_free0 (_tmp2_);
	g_object_notify_by_pspec ((GObject *) self, xmpp_xep_bookmarks_bookmarks1_conference_properties[XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_JID_PROPERTY]);
}

static const gchar*
xmpp_xep_bookmarks_bookmarks1_conference_real_get_name (XmppConference* base)
{
	const gchar* result;
	XmppXepBookmarksBookmarks1Conference* self;
	XmppStanzaNode* _tmp0_;
	const gchar* _tmp1_;
	self = (XmppXepBookmarksBookmarks1Conference*) base;
	_tmp0_ = self->stanza_node;
	_tmp1_ = xmpp_stanza_node_get_attribute (_tmp0_, XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_ATTRIBUTE_NAME, NULL);
	result = _tmp1_;
	return result;
}

static void
xmpp_xep_bookmarks_bookmarks1_conference_real_set_name (XmppConference* base,
                                                        const gchar* value)
{
	XmppXepBookmarksBookmarks1Conference* self;
	XmppStanzaNode* _tmp0_;
	self = (XmppXepBookmarksBookmarks1Conference*) base;
	if (value == NULL) {
		return;
	}
	_tmp0_ = self->stanza_node;
	xmpp_stanza_node_set_attribute (_tmp0_, XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_ATTRIBUTE_NAME, value, NULL);
	g_object_notify_by_pspec ((GObject *) self, xmpp_xep_bookmarks_bookmarks1_conference_properties[XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NAME_PROPERTY]);
}

static const gchar*
xmpp_xep_bookmarks_bookmarks1_conference_real_get_nick (XmppConference* base)
{
	const gchar* result;
	XmppXepBookmarksBookmarks1Conference* self;
	XmppStanzaNode* nick_node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	const gchar* _tmp2_ = NULL;
	XmppStanzaNode* _tmp3_;
	self = (XmppXepBookmarksBookmarks1Conference*) base;
	_tmp0_ = self->stanza_node;
	_tmp1_ = xmpp_stanza_node_get_subnode (_tmp0_, XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NODE_NICK, NULL, FALSE);
	nick_node = _tmp1_;
	_tmp3_ = nick_node;
	if (_tmp3_ == NULL) {
		_tmp2_ = NULL;
	} else {
		XmppStanzaNode* _tmp4_;
		const gchar* _tmp5_;
		_tmp4_ = nick_node;
		_tmp5_ = xmpp_stanza_entry_get_string_content ((XmppStanzaEntry*) _tmp4_);
		_tmp2_ = _tmp5_;
	}
	result = _tmp2_;
	_xmpp_stanza_entry_unref0 (nick_node);
	return result;
}

static void
xmpp_xep_bookmarks_bookmarks1_conference_real_set_nick (XmppConference* base,
                                                        const gchar* value)
{
	XmppXepBookmarksBookmarks1Conference* self;
	XmppStanzaNode* nick_node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp6_;
	XmppStanzaNode* _tmp12_;
	GeeList* _tmp13_;
	XmppStanzaNode* _tmp14_;
	XmppStanzaNode* _tmp15_;
	XmppStanzaNode* _tmp16_;
	XmppStanzaNode* _tmp17_;
	XmppStanzaNode* _tmp18_;
	self = (XmppXepBookmarksBookmarks1Conference*) base;
	_tmp0_ = self->stanza_node;
	_tmp1_ = xmpp_stanza_node_get_subnode (_tmp0_, XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NODE_NICK, NULL, FALSE);
	nick_node = _tmp1_;
	if (value == NULL) {
		XmppStanzaNode* _tmp2_;
		_tmp2_ = nick_node;
		if (_tmp2_ != NULL) {
			XmppStanzaNode* _tmp3_;
			GeeList* _tmp4_;
			XmppStanzaNode* _tmp5_;
			_tmp3_ = self->stanza_node;
			_tmp4_ = _tmp3_->sub_nodes;
			_tmp5_ = nick_node;
			gee_collection_remove ((GeeCollection*) _tmp4_, _tmp5_);
		}
		_xmpp_stanza_entry_unref0 (nick_node);
		return;
	}
	_tmp6_ = nick_node;
	if (_tmp6_ == NULL) {
		XmppStanzaNode* _tmp7_;
		XmppStanzaNode* _tmp8_;
		XmppStanzaNode* _tmp9_;
		XmppStanzaNode* _tmp10_;
		XmppStanzaNode* _tmp11_;
		_tmp7_ = xmpp_stanza_node_new_build (XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NODE_NICK, XMPP_XEP_BOOKMARKS_NS_URI, NULL, NULL);
		_xmpp_stanza_entry_unref0 (nick_node);
		nick_node = _tmp7_;
		_tmp8_ = self->stanza_node;
		_tmp9_ = nick_node;
		_tmp10_ = xmpp_stanza_node_put_node (_tmp8_, _tmp9_);
		_tmp11_ = _tmp10_;
		_xmpp_stanza_entry_unref0 (_tmp11_);
	}
	_tmp12_ = nick_node;
	_tmp13_ = _tmp12_->sub_nodes;
	gee_collection_clear ((GeeCollection*) _tmp13_);
	_tmp14_ = nick_node;
	_tmp15_ = xmpp_stanza_node_new_text (value);
	_tmp16_ = _tmp15_;
	_tmp17_ = xmpp_stanza_node_put_node (_tmp14_, _tmp16_);
	_tmp18_ = _tmp17_;
	_xmpp_stanza_entry_unref0 (_tmp18_);
	_xmpp_stanza_entry_unref0 (_tmp16_);
	_xmpp_stanza_entry_unref0 (nick_node);
	g_object_notify_by_pspec ((GObject *) self, xmpp_xep_bookmarks_bookmarks1_conference_properties[XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NICK_PROPERTY]);
}

static const gchar*
xmpp_xep_bookmarks_bookmarks1_conference_real_get_password (XmppConference* base)
{
	const gchar* result;
	XmppXepBookmarksBookmarks1Conference* self;
	XmppStanzaNode* password_node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	const gchar* _tmp2_ = NULL;
	XmppStanzaNode* _tmp3_;
	self = (XmppXepBookmarksBookmarks1Conference*) base;
	_tmp0_ = self->stanza_node;
	_tmp1_ = xmpp_stanza_node_get_subnode (_tmp0_, XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NODE_PASSWORD, NULL, FALSE);
	password_node = _tmp1_;
	_tmp3_ = password_node;
	if (_tmp3_ == NULL) {
		_tmp2_ = NULL;
	} else {
		XmppStanzaNode* _tmp4_;
		const gchar* _tmp5_;
		_tmp4_ = password_node;
		_tmp5_ = xmpp_stanza_entry_get_string_content ((XmppStanzaEntry*) _tmp4_);
		_tmp2_ = _tmp5_;
	}
	result = _tmp2_;
	_xmpp_stanza_entry_unref0 (password_node);
	return result;
}

static void
xmpp_xep_bookmarks_bookmarks1_conference_real_set_password (XmppConference* base,
                                                            const gchar* value)
{
	XmppXepBookmarksBookmarks1Conference* self;
	XmppStanzaNode* password_node = NULL;
	XmppStanzaNode* _tmp0_;
	XmppStanzaNode* _tmp1_;
	XmppStanzaNode* _tmp6_;
	XmppStanzaNode* _tmp12_;
	GeeList* _tmp13_;
	XmppStanzaNode* _tmp14_;
	XmppStanzaNode* _tmp15_;
	XmppStanzaNode* _tmp16_;
	XmppStanzaNode* _tmp17_;
	XmppStanzaNode* _tmp18_;
	self = (XmppXepBookmarksBookmarks1Conference*) base;
	_tmp0_ = self->stanza_node;
	_tmp1_ = xmpp_stanza_node_get_subnode (_tmp0_, XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NODE_PASSWORD, NULL, FALSE);
	password_node = _tmp1_;
	if (value == NULL) {
		XmppStanzaNode* _tmp2_;
		_tmp2_ = password_node;
		if (_tmp2_ != NULL) {
			XmppStanzaNode* _tmp3_;
			GeeList* _tmp4_;
			XmppStanzaNode* _tmp5_;
			_tmp3_ = self->stanza_node;
			_tmp4_ = _tmp3_->sub_nodes;
			_tmp5_ = password_node;
			gee_collection_remove ((GeeCollection*) _tmp4_, _tmp5_);
		}
		_xmpp_stanza_entry_unref0 (password_node);
		return;
	}
	_tmp6_ = password_node;
	if (_tmp6_ == NULL) {
		XmppStanzaNode* _tmp7_;
		XmppStanzaNode* _tmp8_;
		XmppStanzaNode* _tmp9_;
		XmppStanzaNode* _tmp10_;
		XmppStanzaNode* _tmp11_;
		_tmp7_ = xmpp_stanza_node_new_build (XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NODE_PASSWORD, XMPP_XEP_BOOKMARKS_NS_URI, NULL, NULL);
		_xmpp_stanza_entry_unref0 (password_node);
		password_node = _tmp7_;
		_tmp8_ = self->stanza_node;
		_tmp9_ = password_node;
		_tmp10_ = xmpp_stanza_node_put_node (_tmp8_, _tmp9_);
		_tmp11_ = _tmp10_;
		_xmpp_stanza_entry_unref0 (_tmp11_);
	}
	_tmp12_ = password_node;
	_tmp13_ = _tmp12_->sub_nodes;
	gee_collection_clear ((GeeCollection*) _tmp13_);
	_tmp14_ = password_node;
	_tmp15_ = xmpp_stanza_node_new_text (value);
	_tmp16_ = _tmp15_;
	_tmp17_ = xmpp_stanza_node_put_node (_tmp14_, _tmp16_);
	_tmp18_ = _tmp17_;
	_xmpp_stanza_entry_unref0 (_tmp18_);
	_xmpp_stanza_entry_unref0 (_tmp16_);
	_xmpp_stanza_entry_unref0 (password_node);
	g_object_notify_by_pspec ((GObject *) self, xmpp_xep_bookmarks_bookmarks1_conference_properties[XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_PASSWORD_PROPERTY]);
}

static void
xmpp_xep_bookmarks_bookmarks1_conference_class_init (XmppXepBookmarksBookmarks1ConferenceClass * klass,
                                                     gpointer klass_data)
{
	xmpp_xep_bookmarks_bookmarks1_conference_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &XmppXepBookmarksBookmarks1Conference_private_offset);
	XMPP_CONFERENCE_CLASS (klass)->get_autojoin = (gboolean (*) (XmppConference*)) xmpp_xep_bookmarks_bookmarks1_conference_real_get_autojoin;
	XMPP_CONFERENCE_CLASS (klass)->set_autojoin = (void (*) (XmppConference*, gboolean)) xmpp_xep_bookmarks_bookmarks1_conference_real_set_autojoin;
	XMPP_CONFERENCE_CLASS (klass)->get_jid = (XmppJid* (*) (XmppConference*)) xmpp_xep_bookmarks_bookmarks1_conference_real_get_jid;
	XMPP_CONFERENCE_CLASS (klass)->set_jid = (void (*) (XmppConference*, XmppJid*)) xmpp_xep_bookmarks_bookmarks1_conference_real_set_jid;
	XMPP_CONFERENCE_CLASS (klass)->get_name = (const gchar* (*) (XmppConference*)) xmpp_xep_bookmarks_bookmarks1_conference_real_get_name;
	XMPP_CONFERENCE_CLASS (klass)->set_name = (void (*) (XmppConference*, const gchar*)) xmpp_xep_bookmarks_bookmarks1_conference_real_set_name;
	XMPP_CONFERENCE_CLASS (klass)->get_nick = (const gchar* (*) (XmppConference*)) xmpp_xep_bookmarks_bookmarks1_conference_real_get_nick;
	XMPP_CONFERENCE_CLASS (klass)->set_nick = (void (*) (XmppConference*, const gchar*)) xmpp_xep_bookmarks_bookmarks1_conference_real_set_nick;
	XMPP_CONFERENCE_CLASS (klass)->get_password = (const gchar* (*) (XmppConference*)) xmpp_xep_bookmarks_bookmarks1_conference_real_get_password;
	XMPP_CONFERENCE_CLASS (klass)->set_password = (void (*) (XmppConference*, const gchar*)) xmpp_xep_bookmarks_bookmarks1_conference_real_set_password;
	G_OBJECT_CLASS (klass)->get_property = _vala_xmpp_xep_bookmarks_bookmarks1_conference_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_xmpp_xep_bookmarks_bookmarks1_conference_set_property;
	G_OBJECT_CLASS (klass)->finalize = xmpp_xep_bookmarks_bookmarks1_conference_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_AUTOJOIN_PROPERTY, xmpp_xep_bookmarks_bookmarks1_conference_properties[XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_AUTOJOIN_PROPERTY] = g_param_spec_boolean ("autojoin", "autojoin", "autojoin", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_JID_PROPERTY, xmpp_xep_bookmarks_bookmarks1_conference_properties[XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_JID_PROPERTY] = xmpp_param_spec_jid ("jid", "jid", "jid", XMPP_TYPE_JID, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NAME_PROPERTY, xmpp_xep_bookmarks_bookmarks1_conference_properties[XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NICK_PROPERTY, xmpp_xep_bookmarks_bookmarks1_conference_properties[XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NICK_PROPERTY] = g_param_spec_string ("nick", "nick", "nick", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_PASSWORD_PROPERTY, xmpp_xep_bookmarks_bookmarks1_conference_properties[XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_PASSWORD_PROPERTY] = g_param_spec_string ("password", "password", "password", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
xmpp_xep_bookmarks_bookmarks1_conference_instance_init (XmppXepBookmarksBookmarks1Conference * self,
                                                        gpointer klass)
{
	self->priv = xmpp_xep_bookmarks_bookmarks1_conference_get_instance_private (self);
}

static void
xmpp_xep_bookmarks_bookmarks1_conference_finalize (GObject * obj)
{
	XmppXepBookmarksBookmarks1Conference * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, XMPP_XEP_BOOKMARKS_TYPE_BOOKMARKS1_CONFERENCE, XmppXepBookmarksBookmarks1Conference);
	_xmpp_stanza_entry_unref0 (self->stanza_node);
	_xmpp_jid_unref0 (self->priv->jid_);
	G_OBJECT_CLASS (xmpp_xep_bookmarks_bookmarks1_conference_parent_class)->finalize (obj);
}

static GType
xmpp_xep_bookmarks_bookmarks1_conference_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppXepBookmarksBookmarks1ConferenceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_xep_bookmarks_bookmarks1_conference_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (XmppXepBookmarksBookmarks1Conference), 0, (GInstanceInitFunc) xmpp_xep_bookmarks_bookmarks1_conference_instance_init, NULL };
	GType xmpp_xep_bookmarks_bookmarks1_conference_type_id;
	xmpp_xep_bookmarks_bookmarks1_conference_type_id = g_type_register_static (XMPP_TYPE_CONFERENCE, "XmppXepBookmarksBookmarks1Conference", &g_define_type_info, 0);
	XmppXepBookmarksBookmarks1Conference_private_offset = g_type_add_instance_private (xmpp_xep_bookmarks_bookmarks1_conference_type_id, sizeof (XmppXepBookmarksBookmarks1ConferencePrivate));
	return xmpp_xep_bookmarks_bookmarks1_conference_type_id;
}

GType
xmpp_xep_bookmarks_bookmarks1_conference_get_type (void)
{
	static volatile gsize xmpp_xep_bookmarks_bookmarks1_conference_type_id__once = 0;
	if (g_once_init_enter (&xmpp_xep_bookmarks_bookmarks1_conference_type_id__once)) {
		GType xmpp_xep_bookmarks_bookmarks1_conference_type_id;
		xmpp_xep_bookmarks_bookmarks1_conference_type_id = xmpp_xep_bookmarks_bookmarks1_conference_get_type_once ();
		g_once_init_leave (&xmpp_xep_bookmarks_bookmarks1_conference_type_id__once, xmpp_xep_bookmarks_bookmarks1_conference_type_id);
	}
	return xmpp_xep_bookmarks_bookmarks1_conference_type_id__once;
}

static void
_vala_xmpp_xep_bookmarks_bookmarks1_conference_get_property (GObject * object,
                                                             guint property_id,
                                                             GValue * value,
                                                             GParamSpec * pspec)
{
	XmppXepBookmarksBookmarks1Conference * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_BOOKMARKS_TYPE_BOOKMARKS1_CONFERENCE, XmppXepBookmarksBookmarks1Conference);
	switch (property_id) {
		case XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_AUTOJOIN_PROPERTY:
		g_value_set_boolean (value, xmpp_conference_get_autojoin ((XmppConference*) self));
		break;
		case XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_JID_PROPERTY:
		xmpp_value_set_jid (value, xmpp_conference_get_jid ((XmppConference*) self));
		break;
		case XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NAME_PROPERTY:
		g_value_set_string (value, xmpp_conference_get_name ((XmppConference*) self));
		break;
		case XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NICK_PROPERTY:
		g_value_set_string (value, xmpp_conference_get_nick ((XmppConference*) self));
		break;
		case XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_PASSWORD_PROPERTY:
		g_value_set_string (value, xmpp_conference_get_password ((XmppConference*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_xmpp_xep_bookmarks_bookmarks1_conference_set_property (GObject * object,
                                                             guint property_id,
                                                             const GValue * value,
                                                             GParamSpec * pspec)
{
	XmppXepBookmarksBookmarks1Conference * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, XMPP_XEP_BOOKMARKS_TYPE_BOOKMARKS1_CONFERENCE, XmppXepBookmarksBookmarks1Conference);
	switch (property_id) {
		case XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_AUTOJOIN_PROPERTY:
		xmpp_conference_set_autojoin ((XmppConference*) self, g_value_get_boolean (value));
		break;
		case XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_JID_PROPERTY:
		xmpp_conference_set_jid ((XmppConference*) self, xmpp_value_get_jid (value));
		break;
		case XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NAME_PROPERTY:
		xmpp_conference_set_name ((XmppConference*) self, g_value_get_string (value));
		break;
		case XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_NICK_PROPERTY:
		xmpp_conference_set_nick ((XmppConference*) self, g_value_get_string (value));
		break;
		case XMPP_XEP_BOOKMARKS_BOOKMARKS1_CONFERENCE_PASSWORD_PROPERTY:
		xmpp_conference_set_password ((XmppConference*) self, g_value_get_string (value));
		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;
}

