/* post-processor.c generated by valac 0.56.17, the Vala compiler
 * generated from post-processor.vala, do not modify */

/*
Peek Copyright (c) 2016-2017 by Philipp Wolfer <ph.wolfer@gmail.com>

This file is part of Peek.

This software is licensed under the GNU General Public License
(version 3 or later). See the LICENSE file in this distribution.
*/

#include "../../application.h"
#include <gio/gio.h>
#include <glib.h>
#include <string.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

static GType peek_post_processing_post_processor_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

void
peek_post_processing_post_processor_process_async (PeekPostProcessingPostProcessor* self,
                                                   GArray* files,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_)
{
	PeekPostProcessingPostProcessorIface* _iface_;
	_iface_ = PEEK_POST_PROCESSING_POST_PROCESSOR_GET_INTERFACE (self);
	if (_iface_->process_async) {
		_iface_->process_async (self, files, _callback_, _user_data_);
	}
}

GArray*
peek_post_processing_post_processor_process_finish (PeekPostProcessingPostProcessor* self,
                                                    GAsyncResult* _res_,
                                                    GError** error)
{
	PeekPostProcessingPostProcessorIface* _iface_;
	_iface_ = PEEK_POST_PROCESSING_POST_PROCESSOR_GET_INTERFACE (self);
	if (_iface_->process_finish) {
		return _iface_->process_finish (self, _res_, error);
	}
	return NULL;
}

void
peek_post_processing_post_processor_cancel (PeekPostProcessingPostProcessor* self)
{
	PeekPostProcessingPostProcessorIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = PEEK_POST_PROCESSING_POST_PROCESSOR_GET_INTERFACE (self);
	if (_iface_->cancel) {
		_iface_->cancel (self);
	}
}

static void
peek_post_processing_post_processor_default_init (PeekPostProcessingPostProcessorIface * iface,
                                                  gpointer iface_data)
{
}

static GType
peek_post_processing_post_processor_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PeekPostProcessingPostProcessorIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) peek_post_processing_post_processor_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType peek_post_processing_post_processor_type_id;
	peek_post_processing_post_processor_type_id = g_type_register_static (G_TYPE_INTERFACE, "PeekPostProcessingPostProcessor", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (peek_post_processing_post_processor_type_id, G_TYPE_OBJECT);
	return peek_post_processing_post_processor_type_id;
}

GType
peek_post_processing_post_processor_get_type (void)
{
	static volatile gsize peek_post_processing_post_processor_type_id__once = 0;
	if (g_once_init_enter (&peek_post_processing_post_processor_type_id__once)) {
		GType peek_post_processing_post_processor_type_id;
		peek_post_processing_post_processor_type_id = peek_post_processing_post_processor_get_type_once ();
		g_once_init_leave (&peek_post_processing_post_processor_type_id__once, peek_post_processing_post_processor_type_id);
	}
	return peek_post_processing_post_processor_type_id__once;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

