/* geary-folder-supports-remove.c generated by valac 0.56.3, the Vala compiler
 * generated from geary-folder-supports-remove.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 <gee.h>
#include <glib-object.h>
#include <glib.h>

static GType geary_folder_support_remove_get_type_once (void);

void
geary_folder_support_remove_remove_email_async (GearyFolderSupportRemove* self,
                                                GeeCollection* email_ids,
                                                GCancellable* cancellable,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_)
{
	GearyFolderSupportRemoveIface* _iface_;
	_iface_ = GEARY_FOLDER_SUPPORT_REMOVE_GET_INTERFACE (self);
	if (_iface_->remove_email_async) {
		_iface_->remove_email_async (self, email_ids, cancellable, _callback_, _user_data_);
	}
}

void
geary_folder_support_remove_remove_email_finish (GearyFolderSupportRemove* self,
                                                 GAsyncResult* _res_,
                                                 GError** error)
{
	GearyFolderSupportRemoveIface* _iface_;
	_iface_ = GEARY_FOLDER_SUPPORT_REMOVE_GET_INTERFACE (self);
	if (_iface_->remove_email_finish) {
		_iface_->remove_email_finish (self, _res_, error);
	}
}

static void
geary_folder_support_remove_default_init (GearyFolderSupportRemoveIface * iface,
                                          gpointer iface_data)
{
}

/**
 * The addition of the Geary.FolderSupport.Remove interface to a
 * {@link Geary.Folder} indicates that it supports removing (deleting)
 * email.
 *
 * This generally means that the message is deleted from the server
 * and is not recoverable.  It _may_ mean the message is moved to a
 * Trash folder where it may or may not be automatically deleted some
 * time later; this behavior is server-specific and not always
 * determinable by Geary (or worked around, either).
 *
 * The remove operation is distinct from the archive operation,
 * available via {@link Geary.FolderSupport.Archive}.
 *
 * A Folder that does not support Remove does not imply that email
 * might not be removed later, such as by the server.
 */
 G_GNUC_NO_INLINE static GType
geary_folder_support_remove_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GearyFolderSupportRemoveIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) geary_folder_support_remove_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType geary_folder_support_remove_type_id;
	geary_folder_support_remove_type_id = g_type_register_static (G_TYPE_INTERFACE, "GearyFolderSupportRemove", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (geary_folder_support_remove_type_id, GEARY_TYPE_FOLDER);
	return geary_folder_support_remove_type_id;
}

GType
geary_folder_support_remove_get_type (void)
{
	static gsize geary_folder_support_remove_type_id__once = 0;
	if (g_once_init_enter (&geary_folder_support_remove_type_id__once)) {
		GType geary_folder_support_remove_type_id;
		geary_folder_support_remove_type_id = geary_folder_support_remove_get_type_once ();
		g_once_init_leave (&geary_folder_support_remove_type_id__once, geary_folder_support_remove_type_id);
	}
	return geary_folder_support_remove_type_id__once;
}

