/* imap-list-return-parameter.c generated by valac 0.56.3, the Vala compiler
 * generated from imap-list-return-parameter.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 <glib.h>

enum  {
	GEARY_IMAP_LIST_RETURN_PARAMETER_0_PROPERTY,
	GEARY_IMAP_LIST_RETURN_PARAMETER_NUM_PROPERTIES
};
static GParamSpec* geary_imap_list_return_parameter_properties[GEARY_IMAP_LIST_RETURN_PARAMETER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

static gpointer geary_imap_list_return_parameter_parent_class = NULL;

static GType geary_imap_list_return_parameter_get_type_once (void);

/**
     * Creates an empty {@link ListReturnParameter}.
     *
     * If passed in without additions, this will be ignored by {@link ListCommand}.
     */
GearyImapListReturnParameter*
geary_imap_list_return_parameter_construct (GType object_type)
{
	GearyImapListReturnParameter * self = NULL;
	self = (GearyImapListReturnParameter*) geary_imap_list_parameter_construct (object_type);
	return self;
}

GearyImapListReturnParameter*
geary_imap_list_return_parameter_new (void)
{
	return geary_imap_list_return_parameter_construct (GEARY_IMAP_TYPE_LIST_RETURN_PARAMETER);
}

void
geary_imap_list_return_parameter_add_special_use (GearyImapListReturnParameter* self)
{
	GearyImapStringParameter* _tmp0_;
	GearyImapStringParameter* _tmp1_;
	g_return_if_fail (GEARY_IMAP_IS_LIST_RETURN_PARAMETER (self));
	_tmp0_ = geary_imap_string_parameter_get_best_for_unchecked (GEARY_IMAP_LIST_RETURN_PARAMETER_SPECIAL_USE);
	_tmp1_ = _tmp0_;
	geary_imap_list_parameter_add (G_TYPE_CHECK_INSTANCE_CAST (self, GEARY_IMAP_TYPE_LIST_PARAMETER, GearyImapListParameter), G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEARY_IMAP_TYPE_PARAMETER, GearyImapParameter));
	_g_object_unref0 (_tmp1_);
}

static void
geary_imap_list_return_parameter_class_init (GearyImapListReturnParameterClass * klass,
                                             gpointer klass_data)
{
	geary_imap_list_return_parameter_parent_class = g_type_class_peek_parent (klass);
}

static void
geary_imap_list_return_parameter_instance_init (GearyImapListReturnParameter * self,
                                                gpointer klass)
{
}

/**
 * RETURN parameters for {@link ListCommand}.
 *
 * LIST's extended syntax allows for special RETURN parameters to be included indicating additional
 * information for the server to return as part of the LIST results.  ListReturnParameters allows
 * for the well-known parameters to be easily generated and added to ListCommand.
 *
 * See the LIST-STATUS ([[https://tools.ietf.org/html/rfc5819]]) and SPECIAL-USE
 * ([[https://tools.ietf.org/html/rfc6154]]) RFCs for examples of this in use.
 */
 G_GNUC_NO_INLINE static GType
geary_imap_list_return_parameter_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GearyImapListReturnParameterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) geary_imap_list_return_parameter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GearyImapListReturnParameter), 0, (GInstanceInitFunc) geary_imap_list_return_parameter_instance_init, NULL };
	GType geary_imap_list_return_parameter_type_id;
	geary_imap_list_return_parameter_type_id = g_type_register_static (GEARY_IMAP_TYPE_LIST_PARAMETER, "GearyImapListReturnParameter", &g_define_type_info, 0);
	return geary_imap_list_return_parameter_type_id;
}

GType
geary_imap_list_return_parameter_get_type (void)
{
	static gsize geary_imap_list_return_parameter_type_id__once = 0;
	if (g_once_init_enter (&geary_imap_list_return_parameter_type_id__once)) {
		GType geary_imap_list_return_parameter_type_id;
		geary_imap_list_return_parameter_type_id = geary_imap_list_return_parameter_get_type_once ();
		g_once_init_leave (&geary_imap_list_return_parameter_type_id__once, geary_imap_list_return_parameter_type_id);
	}
	return geary_imap_list_return_parameter_type_id__once;
}

