/* transaction_interface.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from transaction_interface.vala, do not modify */

/*
 *  pamac-vala
 *
 *  Copyright (C) 2018-2023 Guillaume Benoit <guillaume@manjaro.org>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a get of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib-object.h>
#include <gio/gio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include "pamac.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 PAMAC_TYPE_TRANSACTION_INTERFACE (pamac_transaction_interface_get_type ())
#define PAMAC_TRANSACTION_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_TRANSACTION_INTERFACE, PamacTransactionInterface))
#define PAMAC_IS_TRANSACTION_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_TRANSACTION_INTERFACE))
#define PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), PAMAC_TYPE_TRANSACTION_INTERFACE, PamacTransactionInterfaceIface))

typedef struct _PamacTransactionInterface PamacTransactionInterface;
typedef struct _PamacTransactionInterfaceIface PamacTransactionInterfaceIface;
enum  {
	PAMAC_TRANSACTION_INTERFACE_EMIT_ACTION_SIGNAL,
	PAMAC_TRANSACTION_INTERFACE_EMIT_ACTION_PROGRESS_SIGNAL,
	PAMAC_TRANSACTION_INTERFACE_START_DOWNLOADING_SIGNAL,
	PAMAC_TRANSACTION_INTERFACE_STOP_DOWNLOADING_SIGNAL,
	PAMAC_TRANSACTION_INTERFACE_START_WAITING_SIGNAL,
	PAMAC_TRANSACTION_INTERFACE_STOP_WAITING_SIGNAL,
	PAMAC_TRANSACTION_INTERFACE_EMIT_DOWNLOAD_PROGRESS_SIGNAL,
	PAMAC_TRANSACTION_INTERFACE_EMIT_HOOK_PROGRESS_SIGNAL,
	PAMAC_TRANSACTION_INTERFACE_EMIT_SCRIPT_OUTPUT_SIGNAL,
	PAMAC_TRANSACTION_INTERFACE_EMIT_WARNING_SIGNAL,
	PAMAC_TRANSACTION_INTERFACE_EMIT_ERROR_SIGNAL,
	PAMAC_TRANSACTION_INTERFACE_IMPORTANT_DETAILS_OUTPOUT_SIGNAL,
	PAMAC_TRANSACTION_INTERFACE_GENERATE_MIRRORS_LIST_DATA_SIGNAL,
	PAMAC_TRANSACTION_INTERFACE_NUM_SIGNALS
};
static guint pamac_transaction_interface_signals[PAMAC_TRANSACTION_INTERFACE_NUM_SIGNALS] = {0};

struct _PamacTransactionInterfaceIface {
	GTypeInterface parent_iface;
	void (*get_authorization) (PamacTransactionInterface* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*get_authorization_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*remove_authorization) (PamacTransactionInterface* self, GError** error);
	void (*generate_mirrors_list) (PamacTransactionInterface* self, const gchar* country, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*generate_mirrors_list_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*clean_cache) (PamacTransactionInterface* self, GPtrArray* filenames, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*clean_cache_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*clean_build_files) (PamacTransactionInterface* self, const gchar* aur_build_dir, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*clean_build_files_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*set_pkgreason) (PamacTransactionInterface* self, const gchar* pkgname, guint reason, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*set_pkgreason_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*download_updates) (PamacTransactionInterface* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*download_updates_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*download_pkgs) (PamacTransactionInterface* self, GPtrArray* urls, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gchar** (*download_pkgs_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, gint* result_length1, GError** error);
	void (*trans_refresh) (PamacTransactionInterface* self, gboolean force, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*trans_refresh_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*trans_refresh_files) (PamacTransactionInterface* self, gboolean force, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*trans_refresh_files_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*trans_refresh_aur) (PamacTransactionInterface* self, gboolean force, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*trans_refresh_aur_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*trans_run) (PamacTransactionInterface* self, gboolean sysupgrade, gboolean enable_downgrade, gboolean simple_install, gboolean keep_built_pkgs, gint trans_flags, GPtrArray* to_install, GPtrArray* to_remove, GPtrArray* to_load_local, GPtrArray* to_load_remote, GPtrArray* to_install_as_dep, GPtrArray* ignorepkgs, GPtrArray* overwrite_files, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*trans_run_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*trans_cancel) (PamacTransactionInterface* self, GError** error);
	void (*quit_daemon) (PamacTransactionInterface* self, GError** error);
	void (*snap_trans_run) (PamacTransactionInterface* self, GPtrArray* to_install, GPtrArray* to_remove, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*snap_trans_run_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*snap_switch_channel) (PamacTransactionInterface* self, const gchar* snap_name, const gchar* channel, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*snap_switch_channel_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*flatpak_trans_run) (PamacTransactionInterface* self, GPtrArray* to_install, GPtrArray* to_remove, GPtrArray* to_upgrade, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*flatpak_trans_run_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
};

VALA_EXTERN GType pamac_transaction_interface_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void pamac_transaction_interface_get_authorization (PamacTransactionInterface* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_get_authorization_finish (PamacTransactionInterface* self,
                                                               GAsyncResult* _res_,
                                                               GError** error);
VALA_EXTERN void pamac_transaction_interface_remove_authorization (PamacTransactionInterface* self,
                                                       GError** error);
VALA_EXTERN void pamac_transaction_interface_generate_mirrors_list (PamacTransactionInterface* self,
                                                        const gchar* country,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_);
VALA_EXTERN void pamac_transaction_interface_generate_mirrors_list_finish (PamacTransactionInterface* self,
                                                               GAsyncResult* _res_,
                                                               GError** error);
VALA_EXTERN void pamac_transaction_interface_clean_cache (PamacTransactionInterface* self,
                                              GPtrArray* filenames,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_clean_cache_finish (PamacTransactionInterface* self,
                                                         GAsyncResult* _res_,
                                                         GError** error);
VALA_EXTERN void pamac_transaction_interface_clean_build_files (PamacTransactionInterface* self,
                                                    const gchar* aur_build_dir,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_clean_build_files_finish (PamacTransactionInterface* self,
                                                               GAsyncResult* _res_,
                                                               GError** error);
VALA_EXTERN void pamac_transaction_interface_set_pkgreason (PamacTransactionInterface* self,
                                                const gchar* pkgname,
                                                guint reason,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_set_pkgreason_finish (PamacTransactionInterface* self,
                                                           GAsyncResult* _res_,
                                                           GError** error);
VALA_EXTERN void pamac_transaction_interface_download_updates (PamacTransactionInterface* self,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_download_updates_finish (PamacTransactionInterface* self,
                                                              GAsyncResult* _res_,
                                                              GError** error);
VALA_EXTERN void pamac_transaction_interface_download_pkgs (PamacTransactionInterface* self,
                                                GPtrArray* urls,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
VALA_EXTERN gchar** pamac_transaction_interface_download_pkgs_finish (PamacTransactionInterface* self,
                                                          GAsyncResult* _res_,
                                                          gint* result_length1,
                                                          GError** error);
VALA_EXTERN void pamac_transaction_interface_trans_refresh (PamacTransactionInterface* self,
                                                gboolean force,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_trans_refresh_finish (PamacTransactionInterface* self,
                                                           GAsyncResult* _res_,
                                                           GError** error);
VALA_EXTERN void pamac_transaction_interface_trans_refresh_files (PamacTransactionInterface* self,
                                                      gboolean force,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_trans_refresh_files_finish (PamacTransactionInterface* self,
                                                                 GAsyncResult* _res_,
                                                                 GError** error);
VALA_EXTERN void pamac_transaction_interface_trans_refresh_aur (PamacTransactionInterface* self,
                                                    gboolean force,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_trans_refresh_aur_finish (PamacTransactionInterface* self,
                                                               GAsyncResult* _res_,
                                                               GError** error);
VALA_EXTERN void pamac_transaction_interface_trans_run (PamacTransactionInterface* self,
                                            gboolean sysupgrade,
                                            gboolean enable_downgrade,
                                            gboolean simple_install,
                                            gboolean keep_built_pkgs,
                                            gint trans_flags,
                                            GPtrArray* to_install,
                                            GPtrArray* to_remove,
                                            GPtrArray* to_load_local,
                                            GPtrArray* to_load_remote,
                                            GPtrArray* to_install_as_dep,
                                            GPtrArray* ignorepkgs,
                                            GPtrArray* overwrite_files,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_trans_run_finish (PamacTransactionInterface* self,
                                                       GAsyncResult* _res_,
                                                       GError** error);
VALA_EXTERN void pamac_transaction_interface_trans_cancel (PamacTransactionInterface* self,
                                               GError** error);
VALA_EXTERN void pamac_transaction_interface_quit_daemon (PamacTransactionInterface* self,
                                              GError** error);
VALA_EXTERN void pamac_transaction_interface_snap_trans_run (PamacTransactionInterface* self,
                                                 GPtrArray* to_install,
                                                 GPtrArray* to_remove,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_snap_trans_run_finish (PamacTransactionInterface* self,
                                                            GAsyncResult* _res_,
                                                            GError** error);
VALA_EXTERN void pamac_transaction_interface_snap_switch_channel (PamacTransactionInterface* self,
                                                      const gchar* snap_name,
                                                      const gchar* channel,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_snap_switch_channel_finish (PamacTransactionInterface* self,
                                                                 GAsyncResult* _res_,
                                                                 GError** error);
VALA_EXTERN void pamac_transaction_interface_flatpak_trans_run (PamacTransactionInterface* self,
                                                    GPtrArray* to_install,
                                                    GPtrArray* to_remove,
                                                    GPtrArray* to_upgrade,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_flatpak_trans_run_finish (PamacTransactionInterface* self,
                                                               GAsyncResult* _res_,
                                                               GError** error);
static void g_cclosure_user_marshal_VOID__STRING_STRING_DOUBLE (GClosure * closure,
                                                         GValue * return_value,
                                                         guint n_param_values,
                                                         const GValue * param_values,
                                                         gpointer invocation_hint,
                                                         gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__STRING_STRING_STRING_DOUBLE (GClosure * closure,
                                                                GValue * return_value,
                                                                guint n_param_values,
                                                                const GValue * param_values,
                                                                gpointer invocation_hint,
                                                                gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__STRING_BOXED (GClosure * closure,
                                                 GValue * return_value,
                                                 guint n_param_values,
                                                 const GValue * param_values,
                                                 gpointer invocation_hint,
                                                 gpointer marshal_data);
static GType pamac_transaction_interface_get_type_once (void);

void
pamac_transaction_interface_get_authorization (PamacTransactionInterface* self,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->get_authorization) {
		_iface_->get_authorization (self, _callback_, _user_data_);
	}
}

gboolean
pamac_transaction_interface_get_authorization_finish (PamacTransactionInterface* self,
                                                      GAsyncResult* _res_,
                                                      GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->get_authorization_finish) {
		return _iface_->get_authorization_finish (self, _res_, error);
	}
	return FALSE;
}

void
pamac_transaction_interface_remove_authorization (PamacTransactionInterface* self,
                                                  GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->remove_authorization) {
		_iface_->remove_authorization (self, error);
	}
}

void
pamac_transaction_interface_generate_mirrors_list (PamacTransactionInterface* self,
                                                   const gchar* country,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->generate_mirrors_list) {
		_iface_->generate_mirrors_list (self, country, _callback_, _user_data_);
	}
}

void
pamac_transaction_interface_generate_mirrors_list_finish (PamacTransactionInterface* self,
                                                          GAsyncResult* _res_,
                                                          GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->generate_mirrors_list_finish) {
		_iface_->generate_mirrors_list_finish (self, _res_, error);
	}
}

void
pamac_transaction_interface_clean_cache (PamacTransactionInterface* self,
                                         GPtrArray* filenames,
                                         GAsyncReadyCallback _callback_,
                                         gpointer _user_data_)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->clean_cache) {
		_iface_->clean_cache (self, filenames, _callback_, _user_data_);
	}
}

gboolean
pamac_transaction_interface_clean_cache_finish (PamacTransactionInterface* self,
                                                GAsyncResult* _res_,
                                                GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->clean_cache_finish) {
		return _iface_->clean_cache_finish (self, _res_, error);
	}
	return FALSE;
}

void
pamac_transaction_interface_clean_build_files (PamacTransactionInterface* self,
                                               const gchar* aur_build_dir,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->clean_build_files) {
		_iface_->clean_build_files (self, aur_build_dir, _callback_, _user_data_);
	}
}

gboolean
pamac_transaction_interface_clean_build_files_finish (PamacTransactionInterface* self,
                                                      GAsyncResult* _res_,
                                                      GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->clean_build_files_finish) {
		return _iface_->clean_build_files_finish (self, _res_, error);
	}
	return FALSE;
}

void
pamac_transaction_interface_set_pkgreason (PamacTransactionInterface* self,
                                           const gchar* pkgname,
                                           guint reason,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->set_pkgreason) {
		_iface_->set_pkgreason (self, pkgname, reason, _callback_, _user_data_);
	}
}

gboolean
pamac_transaction_interface_set_pkgreason_finish (PamacTransactionInterface* self,
                                                  GAsyncResult* _res_,
                                                  GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->set_pkgreason_finish) {
		return _iface_->set_pkgreason_finish (self, _res_, error);
	}
	return FALSE;
}

void
pamac_transaction_interface_download_updates (PamacTransactionInterface* self,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->download_updates) {
		_iface_->download_updates (self, _callback_, _user_data_);
	}
}

gboolean
pamac_transaction_interface_download_updates_finish (PamacTransactionInterface* self,
                                                     GAsyncResult* _res_,
                                                     GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->download_updates_finish) {
		return _iface_->download_updates_finish (self, _res_, error);
	}
	return FALSE;
}

void
pamac_transaction_interface_download_pkgs (PamacTransactionInterface* self,
                                           GPtrArray* urls,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->download_pkgs) {
		_iface_->download_pkgs (self, urls, _callback_, _user_data_);
	}
}

gchar**
pamac_transaction_interface_download_pkgs_finish (PamacTransactionInterface* self,
                                                  GAsyncResult* _res_,
                                                  gint* result_length1,
                                                  GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->download_pkgs_finish) {
		return _iface_->download_pkgs_finish (self, _res_, result_length1, error);
	}
	return NULL;
}

void
pamac_transaction_interface_trans_refresh (PamacTransactionInterface* self,
                                           gboolean force,
                                           GAsyncReadyCallback _callback_,
                                           gpointer _user_data_)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->trans_refresh) {
		_iface_->trans_refresh (self, force, _callback_, _user_data_);
	}
}

gboolean
pamac_transaction_interface_trans_refresh_finish (PamacTransactionInterface* self,
                                                  GAsyncResult* _res_,
                                                  GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->trans_refresh_finish) {
		return _iface_->trans_refresh_finish (self, _res_, error);
	}
	return FALSE;
}

void
pamac_transaction_interface_trans_refresh_files (PamacTransactionInterface* self,
                                                 gboolean force,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->trans_refresh_files) {
		_iface_->trans_refresh_files (self, force, _callback_, _user_data_);
	}
}

gboolean
pamac_transaction_interface_trans_refresh_files_finish (PamacTransactionInterface* self,
                                                        GAsyncResult* _res_,
                                                        GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->trans_refresh_files_finish) {
		return _iface_->trans_refresh_files_finish (self, _res_, error);
	}
	return FALSE;
}

void
pamac_transaction_interface_trans_refresh_aur (PamacTransactionInterface* self,
                                               gboolean force,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->trans_refresh_aur) {
		_iface_->trans_refresh_aur (self, force, _callback_, _user_data_);
	}
}

gboolean
pamac_transaction_interface_trans_refresh_aur_finish (PamacTransactionInterface* self,
                                                      GAsyncResult* _res_,
                                                      GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->trans_refresh_aur_finish) {
		return _iface_->trans_refresh_aur_finish (self, _res_, error);
	}
	return FALSE;
}

void
pamac_transaction_interface_trans_run (PamacTransactionInterface* self,
                                       gboolean sysupgrade,
                                       gboolean enable_downgrade,
                                       gboolean simple_install,
                                       gboolean keep_built_pkgs,
                                       gint trans_flags,
                                       GPtrArray* to_install,
                                       GPtrArray* to_remove,
                                       GPtrArray* to_load_local,
                                       GPtrArray* to_load_remote,
                                       GPtrArray* to_install_as_dep,
                                       GPtrArray* ignorepkgs,
                                       GPtrArray* overwrite_files,
                                       GAsyncReadyCallback _callback_,
                                       gpointer _user_data_)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->trans_run) {
		_iface_->trans_run (self, sysupgrade, enable_downgrade, simple_install, keep_built_pkgs, trans_flags, to_install, to_remove, to_load_local, to_load_remote, to_install_as_dep, ignorepkgs, overwrite_files, _callback_, _user_data_);
	}
}

gboolean
pamac_transaction_interface_trans_run_finish (PamacTransactionInterface* self,
                                              GAsyncResult* _res_,
                                              GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->trans_run_finish) {
		return _iface_->trans_run_finish (self, _res_, error);
	}
	return FALSE;
}

void
pamac_transaction_interface_trans_cancel (PamacTransactionInterface* self,
                                          GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->trans_cancel) {
		_iface_->trans_cancel (self, error);
	}
}

void
pamac_transaction_interface_quit_daemon (PamacTransactionInterface* self,
                                         GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->quit_daemon) {
		_iface_->quit_daemon (self, error);
	}
}

void
pamac_transaction_interface_snap_trans_run (PamacTransactionInterface* self,
                                            GPtrArray* to_install,
                                            GPtrArray* to_remove,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->snap_trans_run) {
		_iface_->snap_trans_run (self, to_install, to_remove, _callback_, _user_data_);
	}
}

gboolean
pamac_transaction_interface_snap_trans_run_finish (PamacTransactionInterface* self,
                                                   GAsyncResult* _res_,
                                                   GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->snap_trans_run_finish) {
		return _iface_->snap_trans_run_finish (self, _res_, error);
	}
	return FALSE;
}

void
pamac_transaction_interface_snap_switch_channel (PamacTransactionInterface* self,
                                                 const gchar* snap_name,
                                                 const gchar* channel,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->snap_switch_channel) {
		_iface_->snap_switch_channel (self, snap_name, channel, _callback_, _user_data_);
	}
}

gboolean
pamac_transaction_interface_snap_switch_channel_finish (PamacTransactionInterface* self,
                                                        GAsyncResult* _res_,
                                                        GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->snap_switch_channel_finish) {
		return _iface_->snap_switch_channel_finish (self, _res_, error);
	}
	return FALSE;
}

void
pamac_transaction_interface_flatpak_trans_run (PamacTransactionInterface* self,
                                               GPtrArray* to_install,
                                               GPtrArray* to_remove,
                                               GPtrArray* to_upgrade,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->flatpak_trans_run) {
		_iface_->flatpak_trans_run (self, to_install, to_remove, to_upgrade, _callback_, _user_data_);
	}
}

gboolean
pamac_transaction_interface_flatpak_trans_run_finish (PamacTransactionInterface* self,
                                                      GAsyncResult* _res_,
                                                      GError** error)
{
	PamacTransactionInterfaceIface* _iface_;
	_iface_ = PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE (self);
	if (_iface_->flatpak_trans_run_finish) {
		return _iface_->flatpak_trans_run_finish (self, _res_, error);
	}
	return FALSE;
}

static void
g_cclosure_user_marshal_VOID__STRING_STRING_DOUBLE (GClosure * closure,
                                                    GValue * return_value,
                                                    guint n_param_values,
                                                    const GValue * param_values,
                                                    gpointer invocation_hint,
                                                    gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_STRING_DOUBLE) (gpointer data1, const char* arg_1, const char* arg_2, gdouble arg_3, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING_DOUBLE callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_STRING_DOUBLE) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), g_value_get_double (param_values + 3), data2);
}

static void
g_cclosure_user_marshal_VOID__STRING_STRING_STRING_DOUBLE (GClosure * closure,
                                                           GValue * return_value,
                                                           guint n_param_values,
                                                           const GValue * param_values,
                                                           gpointer invocation_hint,
                                                           gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING_DOUBLE) (gpointer data1, const char* arg_1, const char* arg_2, const char* arg_3, gdouble arg_4, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING_STRING_DOUBLE callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 5);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_STRING_STRING_DOUBLE) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), g_value_get_string (param_values + 3), g_value_get_double (param_values + 4), data2);
}

static void
g_cclosure_user_marshal_VOID__STRING_BOXED (GClosure * closure,
                                            GValue * return_value,
                                            guint n_param_values,
                                            const GValue * param_values,
                                            gpointer invocation_hint,
                                            gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_BOXED) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__STRING_BOXED callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_BOXED) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_boxed (param_values + 2), data2);
}

static void
pamac_transaction_interface_default_init (PamacTransactionInterfaceIface * iface,
                                          gpointer iface_data)
{
	pamac_transaction_interface_signals[PAMAC_TRANSACTION_INTERFACE_EMIT_ACTION_SIGNAL] = g_signal_new ("emit-action", PAMAC_TYPE_TRANSACTION_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	pamac_transaction_interface_signals[PAMAC_TRANSACTION_INTERFACE_EMIT_ACTION_PROGRESS_SIGNAL] = g_signal_new ("emit-action-progress", PAMAC_TYPE_TRANSACTION_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_DOUBLE, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_DOUBLE);
	pamac_transaction_interface_signals[PAMAC_TRANSACTION_INTERFACE_START_DOWNLOADING_SIGNAL] = g_signal_new ("start-downloading", PAMAC_TYPE_TRANSACTION_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	pamac_transaction_interface_signals[PAMAC_TRANSACTION_INTERFACE_STOP_DOWNLOADING_SIGNAL] = g_signal_new ("stop-downloading", PAMAC_TYPE_TRANSACTION_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	pamac_transaction_interface_signals[PAMAC_TRANSACTION_INTERFACE_START_WAITING_SIGNAL] = g_signal_new ("start-waiting", PAMAC_TYPE_TRANSACTION_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	pamac_transaction_interface_signals[PAMAC_TRANSACTION_INTERFACE_STOP_WAITING_SIGNAL] = g_signal_new ("stop-waiting", PAMAC_TYPE_TRANSACTION_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	pamac_transaction_interface_signals[PAMAC_TRANSACTION_INTERFACE_EMIT_DOWNLOAD_PROGRESS_SIGNAL] = g_signal_new ("emit-download-progress", PAMAC_TYPE_TRANSACTION_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_DOUBLE, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_DOUBLE);
	pamac_transaction_interface_signals[PAMAC_TRANSACTION_INTERFACE_EMIT_HOOK_PROGRESS_SIGNAL] = g_signal_new ("emit-hook-progress", PAMAC_TYPE_TRANSACTION_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_STRING_DOUBLE, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_DOUBLE);
	pamac_transaction_interface_signals[PAMAC_TRANSACTION_INTERFACE_EMIT_SCRIPT_OUTPUT_SIGNAL] = g_signal_new ("emit-script-output", PAMAC_TYPE_TRANSACTION_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	pamac_transaction_interface_signals[PAMAC_TRANSACTION_INTERFACE_EMIT_WARNING_SIGNAL] = g_signal_new ("emit-warning", PAMAC_TYPE_TRANSACTION_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	pamac_transaction_interface_signals[PAMAC_TRANSACTION_INTERFACE_EMIT_ERROR_SIGNAL] = g_signal_new ("emit-error", PAMAC_TYPE_TRANSACTION_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_BOXED, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_PTR_ARRAY);
	pamac_transaction_interface_signals[PAMAC_TRANSACTION_INTERFACE_IMPORTANT_DETAILS_OUTPOUT_SIGNAL] = g_signal_new ("important-details-outpout", PAMAC_TYPE_TRANSACTION_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
	pamac_transaction_interface_signals[PAMAC_TRANSACTION_INTERFACE_GENERATE_MIRRORS_LIST_DATA_SIGNAL] = g_signal_new ("generate-mirrors-list-data", PAMAC_TYPE_TRANSACTION_INTERFACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
}

static GType
pamac_transaction_interface_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PamacTransactionInterfaceIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pamac_transaction_interface_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType pamac_transaction_interface_type_id;
	pamac_transaction_interface_type_id = g_type_register_static (G_TYPE_INTERFACE, "PamacTransactionInterface", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (pamac_transaction_interface_type_id, G_TYPE_OBJECT);
	return pamac_transaction_interface_type_id;
}

GType
pamac_transaction_interface_get_type (void)
{
	static volatile gsize pamac_transaction_interface_type_id__once = 0;
	if (g_once_init_enter (&pamac_transaction_interface_type_id__once)) {
		GType pamac_transaction_interface_type_id;
		pamac_transaction_interface_type_id = pamac_transaction_interface_get_type_once ();
		g_once_init_leave (&pamac_transaction_interface_type_id__once, pamac_transaction_interface_type_id);
	}
	return pamac_transaction_interface_type_id__once;
}

