/* geary-credentials-mediator.c generated by valac 0.56.3, the Vala compiler
 * generated from geary-credentials-mediator.vala, do not modify */

/*
 * Copyright 2016 Software Freedom Conservancy Inc.
 * Copyright 2018 Michael Gratton <mike@vee.net>
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */

#include "geary-engine.h"
#include <gio/gio.h>
#include <glib.h>

static GType geary_credentials_mediator_get_type_once (void);

void
geary_credentials_mediator_load_token (GearyCredentialsMediator* self,
                                       GearyAccountInformation* account,
                                       GearyServiceInformation* service,
                                       GCancellable* cancellable,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	GearyCredentialsMediatorIface* _iface_;
	_iface_ = GEARY_CREDENTIALS_MEDIATOR_GET_INTERFACE (self);
	if (_iface_->load_token) {
		_iface_->load_token (self, account, service, cancellable, _callback_, _user_data_);
	}
}

gboolean
geary_credentials_mediator_load_token_finish (GearyCredentialsMediator* self,
                                              GAsyncResult* _res_,
                                              GError** error)
{
	GearyCredentialsMediatorIface* _iface_;
	_iface_ = GEARY_CREDENTIALS_MEDIATOR_GET_INTERFACE (self);
	if (_iface_->load_token_finish) {
		return _iface_->load_token_finish (self, _res_, error);
	}
	return FALSE;
}

static void
geary_credentials_mediator_default_init (GearyCredentialsMediatorIface * iface,
                                         gpointer iface_data)
{
}

/**
 * A store for authentication tokens.
 */
 G_GNUC_NO_INLINE static GType
geary_credentials_mediator_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GearyCredentialsMediatorIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) geary_credentials_mediator_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType geary_credentials_mediator_type_id;
	geary_credentials_mediator_type_id = g_type_register_static (G_TYPE_INTERFACE, "GearyCredentialsMediator", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (geary_credentials_mediator_type_id, G_TYPE_OBJECT);
	return geary_credentials_mediator_type_id;
}

GType
geary_credentials_mediator_get_type (void)
{
	static gsize geary_credentials_mediator_type_id__once = 0;
	if (g_once_init_enter (&geary_credentials_mediator_type_id__once)) {
		GType geary_credentials_mediator_type_id;
		geary_credentials_mediator_type_id = geary_credentials_mediator_get_type_once ();
		g_once_init_leave (&geary_credentials_mediator_type_id__once, geary_credentials_mediator_type_id);
	}
	return geary_credentials_mediator_type_id__once;
}

