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

#include "xmpp-vala.h"
#include <gio/gio.h>
#include <gee.h>
#include <glib-object.h>
#include <glib.h>
#include <string.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  {
	XMPP_BOOKMARKS_PROVIDER_CONFERENCE_ADDED_SIGNAL,
	XMPP_BOOKMARKS_PROVIDER_CONFERENCE_REMOVED_SIGNAL,
	XMPP_BOOKMARKS_PROVIDER_CONFERENCE_CHANGED_SIGNAL,
	XMPP_BOOKMARKS_PROVIDER_RECEIVED_CONFERENCES_SIGNAL,
	XMPP_BOOKMARKS_PROVIDER_NUM_SIGNALS
};
static guint xmpp_bookmarks_provider_signals[XMPP_BOOKMARKS_PROVIDER_NUM_SIGNALS] = {0};

static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID (GClosure * closure,
                                                    GValue * return_value,
                                                    guint n_param_values,
                                                    const GValue * param_values,
                                                    gpointer invocation_hint,
                                                    gpointer marshal_data);
static GType xmpp_bookmarks_provider_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

void
xmpp_bookmarks_provider_get_conferences (XmppBookmarksProvider* self,
                                         XmppXmppStream* stream,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	XmppBookmarksProviderIface* _iface_;
	_iface_ = XMPP_BOOKMARKS_PROVIDER_GET_INTERFACE (self);
	if (_iface_->get_conferences) {
		_iface_->get_conferences (self, stream, _callback_, _user_data_);
	}
}

GeeSet*
xmpp_bookmarks_provider_get_conferences_finish (XmppBookmarksProvider* self,
                                                GAsyncResult* _res_)
{
	XmppBookmarksProviderIface* _iface_;
	_iface_ = XMPP_BOOKMARKS_PROVIDER_GET_INTERFACE (self);
	if (_iface_->get_conferences_finish) {
		return _iface_->get_conferences_finish (self, _res_);
	}
	return NULL;
}

void
xmpp_bookmarks_provider_add_conference (XmppBookmarksProvider* self,
                                        XmppXmppStream* stream,
                                        XmppConference* conference,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	XmppBookmarksProviderIface* _iface_;
	_iface_ = XMPP_BOOKMARKS_PROVIDER_GET_INTERFACE (self);
	if (_iface_->add_conference) {
		_iface_->add_conference (self, stream, conference, _callback_, _user_data_);
	}
}

void
xmpp_bookmarks_provider_add_conference_finish (XmppBookmarksProvider* self,
                                               GAsyncResult* _res_)
{
	XmppBookmarksProviderIface* _iface_;
	_iface_ = XMPP_BOOKMARKS_PROVIDER_GET_INTERFACE (self);
	if (_iface_->add_conference_finish) {
		_iface_->add_conference_finish (self, _res_);
	}
}

void
xmpp_bookmarks_provider_remove_conference (XmppBookmarksProvider* self,
                                           XmppXmppStream* stream,
                                           XmppConference* conference,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	XmppBookmarksProviderIface* _iface_;
	_iface_ = XMPP_BOOKMARKS_PROVIDER_GET_INTERFACE (self);
	if (_iface_->remove_conference) {
		_iface_->remove_conference (self, stream, conference, _callback_, _user_data_);
	}
}

void
xmpp_bookmarks_provider_remove_conference_finish (XmppBookmarksProvider* self,
                                                  GAsyncResult* _res_)
{
	XmppBookmarksProviderIface* _iface_;
	_iface_ = XMPP_BOOKMARKS_PROVIDER_GET_INTERFACE (self);
	if (_iface_->remove_conference_finish) {
		_iface_->remove_conference_finish (self, _res_);
	}
}

void
xmpp_bookmarks_provider_replace_conference (XmppBookmarksProvider* self,
                                            XmppXmppStream* stream,
                                            XmppJid* muc_jid,
                                            XmppConference* modified_conference,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_)
{
	XmppBookmarksProviderIface* _iface_;
	_iface_ = XMPP_BOOKMARKS_PROVIDER_GET_INTERFACE (self);
	if (_iface_->replace_conference) {
		_iface_->replace_conference (self, stream, muc_jid, modified_conference, _callback_, _user_data_);
	}
}

void
xmpp_bookmarks_provider_replace_conference_finish (XmppBookmarksProvider* self,
                                                   GAsyncResult* _res_)
{
	XmppBookmarksProviderIface* _iface_;
	_iface_ = XMPP_BOOKMARKS_PROVIDER_GET_INTERFACE (self);
	if (_iface_->replace_conference_finish) {
		_iface_->replace_conference_finish (self, _res_);
	}
}

static void
g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_OBJECT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), data2);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID (GClosure * closure,
                                               GValue * return_value,
                                               guint n_param_values,
                                               const GValue * param_values,
                                               gpointer invocation_hint,
                                               gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_XMPP_JID) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_XMPP_JID callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_XMPP_JID) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), xmpp_value_get_jid (param_values + 2), data2);
}

static void
xmpp_bookmarks_provider_default_init (XmppBookmarksProviderIface * iface,
                                      gpointer iface_data)
{
	xmpp_bookmarks_provider_signals[XMPP_BOOKMARKS_PROVIDER_CONFERENCE_ADDED_SIGNAL] = g_signal_new ("conference-added", XMPP_TYPE_BOOKMARKS_PROVIDER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, XMPP_TYPE_XMPP_STREAM, XMPP_TYPE_CONFERENCE);
	xmpp_bookmarks_provider_signals[XMPP_BOOKMARKS_PROVIDER_CONFERENCE_REMOVED_SIGNAL] = g_signal_new ("conference-removed", XMPP_TYPE_BOOKMARKS_PROVIDER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_XMPP_JID, G_TYPE_NONE, 2, XMPP_TYPE_XMPP_STREAM, XMPP_TYPE_JID);
	xmpp_bookmarks_provider_signals[XMPP_BOOKMARKS_PROVIDER_CONFERENCE_CHANGED_SIGNAL] = g_signal_new ("conference-changed", XMPP_TYPE_BOOKMARKS_PROVIDER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, XMPP_TYPE_XMPP_STREAM, XMPP_TYPE_CONFERENCE);
	xmpp_bookmarks_provider_signals[XMPP_BOOKMARKS_PROVIDER_RECEIVED_CONFERENCES_SIGNAL] = g_signal_new ("received-conferences", XMPP_TYPE_BOOKMARKS_PROVIDER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, XMPP_TYPE_XMPP_STREAM, GEE_TYPE_SET);
}

static GType
xmpp_bookmarks_provider_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (XmppBookmarksProviderIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) xmpp_bookmarks_provider_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType xmpp_bookmarks_provider_type_id;
	xmpp_bookmarks_provider_type_id = g_type_register_static (G_TYPE_INTERFACE, "XmppBookmarksProvider", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (xmpp_bookmarks_provider_type_id, G_TYPE_OBJECT);
	return xmpp_bookmarks_provider_type_id;
}

GType
xmpp_bookmarks_provider_get_type (void)
{
	static volatile gsize xmpp_bookmarks_provider_type_id__once = 0;
	if (g_once_init_enter (&xmpp_bookmarks_provider_type_id__once)) {
		GType xmpp_bookmarks_provider_type_id;
		xmpp_bookmarks_provider_type_id = xmpp_bookmarks_provider_get_type_once ();
		g_once_init_leave (&xmpp_bookmarks_provider_type_id__once, xmpp_bookmarks_provider_type_id);
	}
	return xmpp_bookmarks_provider_type_id__once;
}

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

