/* geary-email-header-set.c generated by valac 0.56.3, the Vala compiler
 * generated from geary-email-header-set.vala, do not modify */

/*
 * Copyright 2019 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 <glib.h>

static GType geary_email_header_set_get_type_once (void);

GearyRFC822MailboxAddresses*
geary_email_header_set_get_from (GearyEmailHeaderSet* self)
{
	GearyEmailHeaderSetIface* _iface_;
	g_return_val_if_fail (GEARY_IS_EMAIL_HEADER_SET (self), NULL);
	_iface_ = GEARY_EMAIL_HEADER_SET_GET_INTERFACE (self);
	if (_iface_->get_from) {
		return _iface_->get_from (self);
	}
	return NULL;
}

GearyRFC822MailboxAddress*
geary_email_header_set_get_sender (GearyEmailHeaderSet* self)
{
	GearyEmailHeaderSetIface* _iface_;
	g_return_val_if_fail (GEARY_IS_EMAIL_HEADER_SET (self), NULL);
	_iface_ = GEARY_EMAIL_HEADER_SET_GET_INTERFACE (self);
	if (_iface_->get_sender) {
		return _iface_->get_sender (self);
	}
	return NULL;
}

GearyRFC822MailboxAddresses*
geary_email_header_set_get_reply_to (GearyEmailHeaderSet* self)
{
	GearyEmailHeaderSetIface* _iface_;
	g_return_val_if_fail (GEARY_IS_EMAIL_HEADER_SET (self), NULL);
	_iface_ = GEARY_EMAIL_HEADER_SET_GET_INTERFACE (self);
	if (_iface_->get_reply_to) {
		return _iface_->get_reply_to (self);
	}
	return NULL;
}

GearyRFC822MailboxAddresses*
geary_email_header_set_get_to (GearyEmailHeaderSet* self)
{
	GearyEmailHeaderSetIface* _iface_;
	g_return_val_if_fail (GEARY_IS_EMAIL_HEADER_SET (self), NULL);
	_iface_ = GEARY_EMAIL_HEADER_SET_GET_INTERFACE (self);
	if (_iface_->get_to) {
		return _iface_->get_to (self);
	}
	return NULL;
}

GearyRFC822MailboxAddresses*
geary_email_header_set_get_cc (GearyEmailHeaderSet* self)
{
	GearyEmailHeaderSetIface* _iface_;
	g_return_val_if_fail (GEARY_IS_EMAIL_HEADER_SET (self), NULL);
	_iface_ = GEARY_EMAIL_HEADER_SET_GET_INTERFACE (self);
	if (_iface_->get_cc) {
		return _iface_->get_cc (self);
	}
	return NULL;
}

GearyRFC822MailboxAddresses*
geary_email_header_set_get_bcc (GearyEmailHeaderSet* self)
{
	GearyEmailHeaderSetIface* _iface_;
	g_return_val_if_fail (GEARY_IS_EMAIL_HEADER_SET (self), NULL);
	_iface_ = GEARY_EMAIL_HEADER_SET_GET_INTERFACE (self);
	if (_iface_->get_bcc) {
		return _iface_->get_bcc (self);
	}
	return NULL;
}

GearyRFC822MessageID*
geary_email_header_set_get_message_id (GearyEmailHeaderSet* self)
{
	GearyEmailHeaderSetIface* _iface_;
	g_return_val_if_fail (GEARY_IS_EMAIL_HEADER_SET (self), NULL);
	_iface_ = GEARY_EMAIL_HEADER_SET_GET_INTERFACE (self);
	if (_iface_->get_message_id) {
		return _iface_->get_message_id (self);
	}
	return NULL;
}

GearyRFC822MessageIDList*
geary_email_header_set_get_in_reply_to (GearyEmailHeaderSet* self)
{
	GearyEmailHeaderSetIface* _iface_;
	g_return_val_if_fail (GEARY_IS_EMAIL_HEADER_SET (self), NULL);
	_iface_ = GEARY_EMAIL_HEADER_SET_GET_INTERFACE (self);
	if (_iface_->get_in_reply_to) {
		return _iface_->get_in_reply_to (self);
	}
	return NULL;
}

GearyRFC822MessageIDList*
geary_email_header_set_get_references (GearyEmailHeaderSet* self)
{
	GearyEmailHeaderSetIface* _iface_;
	g_return_val_if_fail (GEARY_IS_EMAIL_HEADER_SET (self), NULL);
	_iface_ = GEARY_EMAIL_HEADER_SET_GET_INTERFACE (self);
	if (_iface_->get_references) {
		return _iface_->get_references (self);
	}
	return NULL;
}

GearyRFC822Subject*
geary_email_header_set_get_subject (GearyEmailHeaderSet* self)
{
	GearyEmailHeaderSetIface* _iface_;
	g_return_val_if_fail (GEARY_IS_EMAIL_HEADER_SET (self), NULL);
	_iface_ = GEARY_EMAIL_HEADER_SET_GET_INTERFACE (self);
	if (_iface_->get_subject) {
		return _iface_->get_subject (self);
	}
	return NULL;
}

GearyRFC822Date*
geary_email_header_set_get_date (GearyEmailHeaderSet* self)
{
	GearyEmailHeaderSetIface* _iface_;
	g_return_val_if_fail (GEARY_IS_EMAIL_HEADER_SET (self), NULL);
	_iface_ = GEARY_EMAIL_HEADER_SET_GET_INTERFACE (self);
	if (_iface_->get_date) {
		return _iface_->get_date (self);
	}
	return NULL;
}

static void
geary_email_header_set_default_init (GearyEmailHeaderSetIface * iface,
                                     gpointer iface_data)
{
	/** Value of the RFC 822 From header, an originator field. */
	g_object_interface_install_property (iface, g_param_spec_object ("from", "from", "from", GEARY_RF_C822_TYPE_MAILBOX_ADDRESSES, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/** Value of the RFC 822 Sender header, an originator field. */
	g_object_interface_install_property (iface, g_param_spec_object ("sender", "sender", "sender", GEARY_RF_C822_TYPE_MAILBOX_ADDRESS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/** Value of the RFC 822 Reply-To header, an originator field. */
	g_object_interface_install_property (iface, g_param_spec_object ("reply-to", "reply-to", "reply-to", GEARY_RF_C822_TYPE_MAILBOX_ADDRESSES, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/** Value of the RFC 822 To header, a recipient field. */
	g_object_interface_install_property (iface, g_param_spec_object ("to", "to", "to", GEARY_RF_C822_TYPE_MAILBOX_ADDRESSES, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/** Value of the RFC 822 Cc header, a recipient field. */
	g_object_interface_install_property (iface, g_param_spec_object ("cc", "cc", "cc", GEARY_RF_C822_TYPE_MAILBOX_ADDRESSES, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/** Value of the RFC 822 Bcc header, a recipient field. */
	g_object_interface_install_property (iface, g_param_spec_object ("bcc", "bcc", "bcc", GEARY_RF_C822_TYPE_MAILBOX_ADDRESSES, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/** Value of the RFC 822 Message-Id header, a reference field. */
	g_object_interface_install_property (iface, g_param_spec_object ("message-id", "message-id", "message-id", GEARY_RF_C822_TYPE_MESSAGE_ID, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/** Value of the RFC 822 In-Reply-To header, a reference field. */
	g_object_interface_install_property (iface, g_param_spec_object ("in-reply-to", "in-reply-to", "in-reply-to", GEARY_RF_C822_TYPE_MESSAGE_ID_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/** Value of the RFC 822 References header, a reference field. */
	g_object_interface_install_property (iface, g_param_spec_object ("references", "references", "references", GEARY_RF_C822_TYPE_MESSAGE_ID_LIST, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/** Value of the RFC 822 Subject header. */
	g_object_interface_install_property (iface, g_param_spec_object ("subject", "subject", "subject", GEARY_RF_C822_TYPE_SUBJECT, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/** Value of the RFC 822 Date header. */
	g_object_interface_install_property (iface, g_param_spec_object ("date", "date", "date", GEARY_RF_C822_TYPE_DATE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

/**
 * Denotes an object with the standard set of RFC822 headers.
 */
 G_GNUC_NO_INLINE static GType
geary_email_header_set_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GearyEmailHeaderSetIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) geary_email_header_set_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType geary_email_header_set_type_id;
	geary_email_header_set_type_id = g_type_register_static (G_TYPE_INTERFACE, "GearyEmailHeaderSet", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (geary_email_header_set_type_id, GEARY_TYPE_BASE_OBJECT);
	return geary_email_header_set_type_id;
}

GType
geary_email_header_set_get_type (void)
{
	static gsize geary_email_header_set_type_id__once = 0;
	if (g_once_init_enter (&geary_email_header_set_type_id__once)) {
		GType geary_email_header_set_type_id;
		geary_email_header_set_type_id = geary_email_header_set_get_type_once ();
		g_once_init_leave (&geary_email_header_set_type_id__once, geary_email_header_set_type_id);
	}
	return geary_email_header_set_type_id__once;
}

