/* geary-folder-supports-create.c generated by valac 0.56.3, the Vala compiler
 * generated from geary-folder-supports-create.vala, do not modify */

/*
 * Copyright 2016 Software Freedom Conservancy Inc.
 *
 * 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_folder_support_create_get_type_once (void);

void
geary_folder_support_create_create_email_async (GearyFolderSupportCreate* self,
                                                GearyRFC822Message* rfc822,
                                                GearyEmailFlags* flags,
                                                GDateTime* date_received,
                                                GCancellable* cancellable,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_)
{
	GearyFolderSupportCreateIface* _iface_;
	_iface_ = GEARY_FOLDER_SUPPORT_CREATE_GET_INTERFACE (self);
	if (_iface_->create_email_async) {
		_iface_->create_email_async (self, rfc822, flags, date_received, cancellable, _callback_, _user_data_);
	}
}

GearyEmailIdentifier*
geary_folder_support_create_create_email_finish (GearyFolderSupportCreate* self,
                                                 GAsyncResult* _res_,
                                                 GError** error)
{
	GearyFolderSupportCreateIface* _iface_;
	_iface_ = GEARY_FOLDER_SUPPORT_CREATE_GET_INTERFACE (self);
	if (_iface_->create_email_finish) {
		return _iface_->create_email_finish (self, _res_, error);
	}
	return NULL;
}

static void
geary_folder_support_create_default_init (GearyFolderSupportCreateIface * iface,
                                          gpointer iface_data)
{
}

/**
 * The addition of the Geary.FolderSupport.Create interface on a
 * {@link Geary.Folder} indicates it supports creating email.
 *
 * Created emails are uploaded to the Folder and stored there.
 *
 * Note that creating an email in the Outbox will queue it for
 * sending.  Thus, it may be removed without user interaction at some
 * point in the future.
 */
 G_GNUC_NO_INLINE static GType
geary_folder_support_create_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GearyFolderSupportCreateIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) geary_folder_support_create_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType geary_folder_support_create_type_id;
	geary_folder_support_create_type_id = g_type_register_static (G_TYPE_INTERFACE, "GearyFolderSupportCreate", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (geary_folder_support_create_type_id, GEARY_TYPE_FOLDER);
	return geary_folder_support_create_type_id;
}

GType
geary_folder_support_create_get_type (void)
{
	static gsize geary_folder_support_create_type_id__once = 0;
	if (g_once_init_enter (&geary_folder_support_create_type_id__once)) {
		GType geary_folder_support_create_type_id;
		geary_folder_support_create_type_id = geary_folder_support_create_get_type_once ();
		g_once_init_leave (&geary_folder_support_create_type_id__once, geary_folder_support_create_type_id);
	}
	return geary_folder_support_create_type_id__once;
}

