/* app-async-folder-operation.c generated by valac 0.56.19, the Vala compiler
 * generated from app-async-folder-operation.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-object.h>
#include <gio/gio.h>
#include <gee.h>
#include <glib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#define GEARY_APP_TYPE_ASYNC_FOLDER_OPERATION (geary_app_async_folder_operation_get_type ())
#define GEARY_APP_ASYNC_FOLDER_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEARY_APP_TYPE_ASYNC_FOLDER_OPERATION, GearyAppAsyncFolderOperation))
#define GEARY_APP_ASYNC_FOLDER_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEARY_APP_TYPE_ASYNC_FOLDER_OPERATION, GearyAppAsyncFolderOperationClass))
#define GEARY_APP_IS_ASYNC_FOLDER_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEARY_APP_TYPE_ASYNC_FOLDER_OPERATION))
#define GEARY_APP_IS_ASYNC_FOLDER_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEARY_APP_TYPE_ASYNC_FOLDER_OPERATION))
#define GEARY_APP_ASYNC_FOLDER_OPERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEARY_APP_TYPE_ASYNC_FOLDER_OPERATION, GearyAppAsyncFolderOperationClass))

typedef struct _GearyAppAsyncFolderOperation GearyAppAsyncFolderOperation;
typedef struct _GearyAppAsyncFolderOperationClass GearyAppAsyncFolderOperationClass;
typedef struct _GearyAppAsyncFolderOperationPrivate GearyAppAsyncFolderOperationPrivate;
enum  {
	GEARY_APP_ASYNC_FOLDER_OPERATION_0_PROPERTY,
	GEARY_APP_ASYNC_FOLDER_OPERATION_FOLDER_TYPE_PROPERTY,
	GEARY_APP_ASYNC_FOLDER_OPERATION_NUM_PROPERTIES
};
static GParamSpec* geary_app_async_folder_operation_properties[GEARY_APP_ASYNC_FOLDER_OPERATION_NUM_PROPERTIES];

struct _GearyAppAsyncFolderOperation {
	GearyBaseObject parent_instance;
	GearyAppAsyncFolderOperationPrivate * priv;
};

struct _GearyAppAsyncFolderOperationClass {
	GearyBaseObjectClass parent_class;
	GType (*get_folder_type) (GearyAppAsyncFolderOperation* self);
	void (*execute_async) (GearyAppAsyncFolderOperation* self, GearyFolder* folder, GeeCollection* ids, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GeeCollection* (*execute_finish) (GearyAppAsyncFolderOperation* self, GAsyncResult* _res_, GError** error);
};

static gpointer geary_app_async_folder_operation_parent_class = NULL;

VALA_EXTERN GType geary_app_async_folder_operation_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType geary_app_async_folder_operation_get_folder_type (GearyAppAsyncFolderOperation* self);
VALA_EXTERN void geary_app_async_folder_operation_execute_async (GearyAppAsyncFolderOperation* self,
                                                     GearyFolder* folder,
                                                     GeeCollection* ids,
                                                     GCancellable* cancellable,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
VALA_EXTERN GeeCollection* geary_app_async_folder_operation_execute_finish (GearyAppAsyncFolderOperation* self,
                                                                GAsyncResult* _res_,
                                                                GError** error);
VALA_EXTERN GearyAppAsyncFolderOperation* geary_app_async_folder_operation_construct (GType object_type);
static GType geary_app_async_folder_operation_get_type_once (void);
static void _vala_geary_app_async_folder_operation_get_property (GObject * object,
                                                          guint property_id,
                                                          GValue * value,
                                                          GParamSpec * pspec);

GType
geary_app_async_folder_operation_get_folder_type (GearyAppAsyncFolderOperation* self)
{
	GearyAppAsyncFolderOperationClass* _klass_;
	g_return_val_if_fail (GEARY_APP_IS_ASYNC_FOLDER_OPERATION (self), G_TYPE_INVALID);
	_klass_ = GEARY_APP_ASYNC_FOLDER_OPERATION_GET_CLASS (self);
	if (_klass_->get_folder_type) {
		return _klass_->get_folder_type (self);
	}
	return G_TYPE_INVALID;
}

void
geary_app_async_folder_operation_execute_async (GearyAppAsyncFolderOperation* self,
                                                GearyFolder* folder,
                                                GeeCollection* ids,
                                                GCancellable* cancellable,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_)
{
	GearyAppAsyncFolderOperationClass* _klass_;
	_klass_ = GEARY_APP_ASYNC_FOLDER_OPERATION_GET_CLASS (self);
	if (_klass_->execute_async) {
		_klass_->execute_async (self, folder, ids, cancellable, _callback_, _user_data_);
	}
}

GeeCollection*
geary_app_async_folder_operation_execute_finish (GearyAppAsyncFolderOperation* self,
                                                 GAsyncResult* _res_,
                                                 GError** error)
{
	GearyAppAsyncFolderOperationClass* _klass_;
	_klass_ = GEARY_APP_ASYNC_FOLDER_OPERATION_GET_CLASS (self);
	if (_klass_->execute_finish) {
		return _klass_->execute_finish (self, _res_, error);
	}
	return NULL;
}

GearyAppAsyncFolderOperation*
geary_app_async_folder_operation_construct (GType object_type)
{
	GearyAppAsyncFolderOperation * self = NULL;
	self = (GearyAppAsyncFolderOperation*) geary_base_object_construct (object_type);
	return self;
}

static void
geary_app_async_folder_operation_class_init (GearyAppAsyncFolderOperationClass * klass,
                                             gpointer klass_data)
{
	geary_app_async_folder_operation_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->get_property = _vala_geary_app_async_folder_operation_get_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEARY_APP_ASYNC_FOLDER_OPERATION_FOLDER_TYPE_PROPERTY, geary_app_async_folder_operation_properties[GEARY_APP_ASYNC_FOLDER_OPERATION_FOLDER_TYPE_PROPERTY] = g_param_spec_gtype ("folder-type", "folder-type", "folder-type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
geary_app_async_folder_operation_instance_init (GearyAppAsyncFolderOperation * self,
                                                gpointer klass)
{
}

 G_GNUC_NO_INLINE static GType
geary_app_async_folder_operation_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GearyAppAsyncFolderOperationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) geary_app_async_folder_operation_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GearyAppAsyncFolderOperation), 0, (GInstanceInitFunc) geary_app_async_folder_operation_instance_init, NULL };
	GType geary_app_async_folder_operation_type_id;
	geary_app_async_folder_operation_type_id = g_type_register_static (GEARY_TYPE_BASE_OBJECT, "GearyAppAsyncFolderOperation", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	return geary_app_async_folder_operation_type_id;
}

GType
geary_app_async_folder_operation_get_type (void)
{
	static gsize geary_app_async_folder_operation_type_id__once = 0;
	if (g_once_init_enter (&geary_app_async_folder_operation_type_id__once)) {
		GType geary_app_async_folder_operation_type_id;
		geary_app_async_folder_operation_type_id = geary_app_async_folder_operation_get_type_once ();
		g_once_init_leave (&geary_app_async_folder_operation_type_id__once, geary_app_async_folder_operation_type_id);
	}
	return geary_app_async_folder_operation_type_id__once;
}

static void
_vala_geary_app_async_folder_operation_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec)
{
	GearyAppAsyncFolderOperation * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEARY_APP_TYPE_ASYNC_FOLDER_OPERATION, GearyAppAsyncFolderOperation);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

