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

/*
 *  pamac-vala
 *
 *  Copyright (C) 2019-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 <stdlib.h>
#include <string.h>
#include <glib.h>
#include <float.h>
#include <math.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define PAMAC_TYPE_SNAP_PLUGIN (pamac_snap_plugin_get_type ())
#define PAMAC_SNAP_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_SNAP_PLUGIN, PamacSnapPlugin))
#define PAMAC_IS_SNAP_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_SNAP_PLUGIN))
#define PAMAC_SNAP_PLUGIN_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), PAMAC_TYPE_SNAP_PLUGIN, PamacSnapPluginIface))

typedef struct _PamacSnapPlugin PamacSnapPlugin;
typedef struct _PamacSnapPluginIface PamacSnapPluginIface;

#define PAMAC_TYPE_PACKAGE (pamac_package_get_type ())
#define PAMAC_PACKAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_PACKAGE, PamacPackage))
#define PAMAC_PACKAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_PACKAGE, PamacPackageClass))
#define PAMAC_IS_PACKAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_PACKAGE))
#define PAMAC_IS_PACKAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_PACKAGE))
#define PAMAC_PACKAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_PACKAGE, PamacPackageClass))

typedef struct _PamacPackage PamacPackage;
typedef struct _PamacPackageClass PamacPackageClass;

#define PAMAC_TYPE_SNAP_PACKAGE (pamac_snap_package_get_type ())
#define PAMAC_SNAP_PACKAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_SNAP_PACKAGE, PamacSnapPackage))
#define PAMAC_SNAP_PACKAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_SNAP_PACKAGE, PamacSnapPackageClass))
#define PAMAC_IS_SNAP_PACKAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_SNAP_PACKAGE))
#define PAMAC_IS_SNAP_PACKAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_SNAP_PACKAGE))
#define PAMAC_SNAP_PACKAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_SNAP_PACKAGE, PamacSnapPackageClass))

typedef struct _PamacSnapPackage PamacSnapPackage;
typedef struct _PamacSnapPackageClass PamacSnapPackageClass;
enum  {
	PAMAC_SNAP_PLUGIN_EMIT_ACTION_PROGRESS_SIGNAL,
	PAMAC_SNAP_PLUGIN_EMIT_DOWNLOAD_PROGRESS_SIGNAL,
	PAMAC_SNAP_PLUGIN_EMIT_SCRIPT_OUTPUT_SIGNAL,
	PAMAC_SNAP_PLUGIN_EMIT_ERROR_SIGNAL,
	PAMAC_SNAP_PLUGIN_START_DOWNLOADING_SIGNAL,
	PAMAC_SNAP_PLUGIN_STOP_DOWNLOADING_SIGNAL,
	PAMAC_SNAP_PLUGIN_NUM_SIGNALS
};
static guint pamac_snap_plugin_signals[PAMAC_SNAP_PLUGIN_NUM_SIGNALS] = {0};
typedef struct _PamacPackagePrivate PamacPackagePrivate;
typedef struct _PamacSnapPackagePrivate PamacSnapPackagePrivate;
enum  {
	PAMAC_SNAP_PACKAGE_0_PROPERTY,
	PAMAC_SNAP_PACKAGE_CHANNEL_PROPERTY,
	PAMAC_SNAP_PACKAGE_PUBLISHER_PROPERTY,
	PAMAC_SNAP_PACKAGE_CONFINED_PROPERTY,
	PAMAC_SNAP_PACKAGE_CHANNELS_PROPERTY,
	PAMAC_SNAP_PACKAGE_NUM_PROPERTIES
};
static GParamSpec* pamac_snap_package_properties[PAMAC_SNAP_PACKAGE_NUM_PROPERTIES];

struct _PamacSnapPluginIface {
	GTypeInterface parent_iface;
	void (*search_snaps) (PamacSnapPlugin* self, const gchar* search_string, GPtrArray** pkgs);
	void (*search_uninstalled_snaps_sync) (PamacSnapPlugin* self, const gchar* search_string, GPtrArray** pkgs);
	gboolean (*is_installed_snap) (PamacSnapPlugin* self, const gchar* name);
	PamacSnapPackage* (*get_snap) (PamacSnapPlugin* self, const gchar* name);
	PamacSnapPackage* (*get_snap_by_app_id) (PamacSnapPlugin* self, const gchar* app_id);
	void (*get_installed_snaps) (PamacSnapPlugin* self, GPtrArray** pkgs);
	gchar* (*get_installed_snap_icon) (PamacSnapPlugin* self, const gchar* name, GError** error);
	void (*get_category_snaps) (PamacSnapPlugin* self, const gchar* category, GPtrArray** pkgs);
	gboolean (*trans_run) (PamacSnapPlugin* self, const gchar* sender, gchar** to_install, gint to_install_length1, gchar** to_remove, gint to_remove_length1);
	gboolean (*switch_channel) (PamacSnapPlugin* self, const gchar* sender, const gchar* name, const gchar* channel);
	void (*trans_cancel) (PamacSnapPlugin* self, const gchar* sender);
	void (*refresh) (PamacSnapPlugin* self);
};

struct _PamacPackage {
	GObject parent_instance;
	PamacPackagePrivate * priv;
};

struct _PamacPackageClass {
	GObjectClass parent_class;
	const gchar* (*get_name) (PamacPackage* self);
	void (*set_name) (PamacPackage* self, const gchar* value);
	const gchar* (*get_id) (PamacPackage* self);
	void (*set_id) (PamacPackage* self, const gchar* value);
	const gchar* (*get_app_name) (PamacPackage* self);
	const gchar* (*get_app_id) (PamacPackage* self);
	const gchar* (*get_version) (PamacPackage* self);
	void (*set_version) (PamacPackage* self, const gchar* value);
	const gchar* (*get_installed_version) (PamacPackage* self);
	void (*set_installed_version) (PamacPackage* self, const gchar* value);
	const gchar* (*get_desc) (PamacPackage* self);
	void (*set_desc) (PamacPackage* self, const gchar* value);
	const gchar* (*get_long_desc) (PamacPackage* self);
	const gchar* (*get_repo) (PamacPackage* self);
	void (*set_repo) (PamacPackage* self, const gchar* value);
	const gchar* (*get_launchable) (PamacPackage* self);
	const gchar* (*get_license) (PamacPackage* self);
	const gchar* (*get_url) (PamacPackage* self);
	const gchar* (*get_icon) (PamacPackage* self);
	guint64 (*get_installed_size) (PamacPackage* self);
	guint64 (*get_download_size) (PamacPackage* self);
	GDateTime* (*get_install_date) (PamacPackage* self);
	GPtrArray* (*get_screenshots) (PamacPackage* self);
};

struct _PamacSnapPackage {
	PamacPackage parent_instance;
	PamacSnapPackagePrivate * priv;
};

struct _PamacSnapPackageClass {
	PamacPackageClass parent_class;
	const gchar* (*get_channel) (PamacSnapPackage* self);
	const gchar* (*get_publisher) (PamacSnapPackage* self);
	const gchar* (*get_confined) (PamacSnapPackage* self);
	GPtrArray* (*get_channels) (PamacSnapPackage* self);
};

static gpointer pamac_snap_package_parent_class = NULL;

VALA_EXTERN GType pamac_package_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PamacPackage, g_object_unref)
VALA_EXTERN GType pamac_snap_package_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PamacSnapPackage, g_object_unref)
VALA_EXTERN GType pamac_snap_plugin_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PamacSnapPlugin, g_object_unref)
VALA_EXTERN void pamac_snap_plugin_search_snaps (PamacSnapPlugin* self,
                                     const gchar* search_string,
                                     GPtrArray** pkgs);
VALA_EXTERN void pamac_snap_plugin_search_uninstalled_snaps_sync (PamacSnapPlugin* self,
                                                      const gchar* search_string,
                                                      GPtrArray** pkgs);
VALA_EXTERN gboolean pamac_snap_plugin_is_installed_snap (PamacSnapPlugin* self,
                                              const gchar* name);
VALA_EXTERN PamacSnapPackage* pamac_snap_plugin_get_snap (PamacSnapPlugin* self,
                                              const gchar* name);
VALA_EXTERN PamacSnapPackage* pamac_snap_plugin_get_snap_by_app_id (PamacSnapPlugin* self,
                                                        const gchar* app_id);
VALA_EXTERN void pamac_snap_plugin_get_installed_snaps (PamacSnapPlugin* self,
                                            GPtrArray** pkgs);
VALA_EXTERN gchar* pamac_snap_plugin_get_installed_snap_icon (PamacSnapPlugin* self,
                                                  const gchar* name,
                                                  GError** error);
VALA_EXTERN void pamac_snap_plugin_get_category_snaps (PamacSnapPlugin* self,
                                           const gchar* category,
                                           GPtrArray** pkgs);
VALA_EXTERN gboolean pamac_snap_plugin_trans_run (PamacSnapPlugin* self,
                                      const gchar* sender,
                                      gchar** to_install,
                                      gint to_install_length1,
                                      gchar** to_remove,
                                      gint to_remove_length1);
VALA_EXTERN gboolean pamac_snap_plugin_switch_channel (PamacSnapPlugin* self,
                                           const gchar* sender,
                                           const gchar* name,
                                           const gchar* channel);
VALA_EXTERN void pamac_snap_plugin_trans_cancel (PamacSnapPlugin* self,
                                     const gchar* sender);
VALA_EXTERN void pamac_snap_plugin_refresh (PamacSnapPlugin* self);
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_STRING (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_BOXED_INT (GClosure * closure,
                                                            GValue * return_value,
                                                            guint n_param_values,
                                                            const GValue * param_values,
                                                            gpointer invocation_hint,
                                                            gpointer marshal_data);
static GType pamac_snap_plugin_get_type_once (void);
VALA_EXTERN PamacSnapPackage* pamac_snap_package_construct (GType object_type);
VALA_EXTERN PamacPackage* pamac_package_construct (GType object_type);
VALA_EXTERN const gchar* pamac_snap_package_get_channel (PamacSnapPackage* self);
VALA_EXTERN const gchar* pamac_snap_package_get_publisher (PamacSnapPackage* self);
VALA_EXTERN const gchar* pamac_snap_package_get_confined (PamacSnapPackage* self);
VALA_EXTERN GPtrArray* pamac_snap_package_get_channels (PamacSnapPackage* self);
static GType pamac_snap_package_get_type_once (void);
static void _vala_pamac_snap_package_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec);

void
pamac_snap_plugin_search_snaps (PamacSnapPlugin* self,
                                const gchar* search_string,
                                GPtrArray** pkgs)
{
	PamacSnapPluginIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = PAMAC_SNAP_PLUGIN_GET_INTERFACE (self);
	if (_iface_->search_snaps) {
		_iface_->search_snaps (self, search_string, pkgs);
	}
}

void
pamac_snap_plugin_search_uninstalled_snaps_sync (PamacSnapPlugin* self,
                                                 const gchar* search_string,
                                                 GPtrArray** pkgs)
{
	PamacSnapPluginIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = PAMAC_SNAP_PLUGIN_GET_INTERFACE (self);
	if (_iface_->search_uninstalled_snaps_sync) {
		_iface_->search_uninstalled_snaps_sync (self, search_string, pkgs);
	}
}

gboolean
pamac_snap_plugin_is_installed_snap (PamacSnapPlugin* self,
                                     const gchar* name)
{
	PamacSnapPluginIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = PAMAC_SNAP_PLUGIN_GET_INTERFACE (self);
	if (_iface_->is_installed_snap) {
		return _iface_->is_installed_snap (self, name);
	}
	return FALSE;
}

PamacSnapPackage*
pamac_snap_plugin_get_snap (PamacSnapPlugin* self,
                            const gchar* name)
{
	PamacSnapPluginIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = PAMAC_SNAP_PLUGIN_GET_INTERFACE (self);
	if (_iface_->get_snap) {
		return _iface_->get_snap (self, name);
	}
	return NULL;
}

PamacSnapPackage*
pamac_snap_plugin_get_snap_by_app_id (PamacSnapPlugin* self,
                                      const gchar* app_id)
{
	PamacSnapPluginIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = PAMAC_SNAP_PLUGIN_GET_INTERFACE (self);
	if (_iface_->get_snap_by_app_id) {
		return _iface_->get_snap_by_app_id (self, app_id);
	}
	return NULL;
}

void
pamac_snap_plugin_get_installed_snaps (PamacSnapPlugin* self,
                                       GPtrArray** pkgs)
{
	PamacSnapPluginIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = PAMAC_SNAP_PLUGIN_GET_INTERFACE (self);
	if (_iface_->get_installed_snaps) {
		_iface_->get_installed_snaps (self, pkgs);
	}
}

gchar*
pamac_snap_plugin_get_installed_snap_icon (PamacSnapPlugin* self,
                                           const gchar* name,
                                           GError** error)
{
	PamacSnapPluginIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = PAMAC_SNAP_PLUGIN_GET_INTERFACE (self);
	if (_iface_->get_installed_snap_icon) {
		return _iface_->get_installed_snap_icon (self, name, error);
	}
	return NULL;
}

void
pamac_snap_plugin_get_category_snaps (PamacSnapPlugin* self,
                                      const gchar* category,
                                      GPtrArray** pkgs)
{
	PamacSnapPluginIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = PAMAC_SNAP_PLUGIN_GET_INTERFACE (self);
	if (_iface_->get_category_snaps) {
		_iface_->get_category_snaps (self, category, pkgs);
	}
}

gboolean
pamac_snap_plugin_trans_run (PamacSnapPlugin* self,
                             const gchar* sender,
                             gchar** to_install,
                             gint to_install_length1,
                             gchar** to_remove,
                             gint to_remove_length1)
{
	PamacSnapPluginIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = PAMAC_SNAP_PLUGIN_GET_INTERFACE (self);
	if (_iface_->trans_run) {
		return _iface_->trans_run (self, sender, to_install, to_install_length1, to_remove, to_remove_length1);
	}
	return FALSE;
}

gboolean
pamac_snap_plugin_switch_channel (PamacSnapPlugin* self,
                                  const gchar* sender,
                                  const gchar* name,
                                  const gchar* channel)
{
	PamacSnapPluginIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = PAMAC_SNAP_PLUGIN_GET_INTERFACE (self);
	if (_iface_->switch_channel) {
		return _iface_->switch_channel (self, sender, name, channel);
	}
	return FALSE;
}

void
pamac_snap_plugin_trans_cancel (PamacSnapPlugin* self,
                                const gchar* sender)
{
	PamacSnapPluginIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = PAMAC_SNAP_PLUGIN_GET_INTERFACE (self);
	if (_iface_->trans_cancel) {
		_iface_->trans_cancel (self, sender);
	}
}

void
pamac_snap_plugin_refresh (PamacSnapPlugin* self)
{
	PamacSnapPluginIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = PAMAC_SNAP_PLUGIN_GET_INTERFACE (self);
	if (_iface_->refresh) {
		_iface_->refresh (self);
	}
}

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_STRING (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) (gpointer data1, const char* arg_1, const char* arg_2, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING 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_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), data2);
}

static void
g_cclosure_user_marshal_VOID__STRING_STRING_BOXED_INT (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_BOXED_INT) (gpointer data1, const char* arg_1, const char* arg_2, gpointer arg_3, gint arg_4, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING_BOXED_INT 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_BOXED_INT) (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_boxed (param_values + 3), g_value_get_int (param_values + 4), data2);
}

static void
pamac_snap_plugin_default_init (PamacSnapPluginIface * iface,
                                gpointer iface_data)
{
	pamac_snap_plugin_signals[PAMAC_SNAP_PLUGIN_EMIT_ACTION_PROGRESS_SIGNAL] = g_signal_new ("emit-action-progress", PAMAC_TYPE_SNAP_PLUGIN, 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_snap_plugin_signals[PAMAC_SNAP_PLUGIN_EMIT_DOWNLOAD_PROGRESS_SIGNAL] = g_signal_new ("emit-download-progress", PAMAC_TYPE_SNAP_PLUGIN, 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_snap_plugin_signals[PAMAC_SNAP_PLUGIN_EMIT_SCRIPT_OUTPUT_SIGNAL] = g_signal_new ("emit-script-output", PAMAC_TYPE_SNAP_PLUGIN, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
	pamac_snap_plugin_signals[PAMAC_SNAP_PLUGIN_EMIT_ERROR_SIGNAL] = g_signal_new ("emit-error", PAMAC_TYPE_SNAP_PLUGIN, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING_BOXED_INT, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRV, G_TYPE_INT);
	pamac_snap_plugin_signals[PAMAC_SNAP_PLUGIN_START_DOWNLOADING_SIGNAL] = g_signal_new ("start-downloading", PAMAC_TYPE_SNAP_PLUGIN, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	pamac_snap_plugin_signals[PAMAC_SNAP_PLUGIN_STOP_DOWNLOADING_SIGNAL] = g_signal_new ("stop-downloading", PAMAC_TYPE_SNAP_PLUGIN, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
}

static GType
pamac_snap_plugin_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PamacSnapPluginIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pamac_snap_plugin_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType pamac_snap_plugin_type_id;
	pamac_snap_plugin_type_id = g_type_register_static (G_TYPE_INTERFACE, "PamacSnapPlugin", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (pamac_snap_plugin_type_id, G_TYPE_OBJECT);
	return pamac_snap_plugin_type_id;
}

GType
pamac_snap_plugin_get_type (void)
{
	static volatile gsize pamac_snap_plugin_type_id__once = 0;
	if (g_once_init_enter (&pamac_snap_plugin_type_id__once)) {
		GType pamac_snap_plugin_type_id;
		pamac_snap_plugin_type_id = pamac_snap_plugin_get_type_once ();
		g_once_init_leave (&pamac_snap_plugin_type_id__once, pamac_snap_plugin_type_id);
	}
	return pamac_snap_plugin_type_id__once;
}

PamacSnapPackage*
pamac_snap_package_construct (GType object_type)
{
	PamacSnapPackage * self = NULL;
	self = (PamacSnapPackage*) pamac_package_construct (object_type);
	return self;
}

const gchar*
pamac_snap_package_get_channel (PamacSnapPackage* self)
{
	PamacSnapPackageClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = PAMAC_SNAP_PACKAGE_GET_CLASS (self);
	if (_klass_->get_channel) {
		return _klass_->get_channel (self);
	}
	return NULL;
}

const gchar*
pamac_snap_package_get_publisher (PamacSnapPackage* self)
{
	PamacSnapPackageClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = PAMAC_SNAP_PACKAGE_GET_CLASS (self);
	if (_klass_->get_publisher) {
		return _klass_->get_publisher (self);
	}
	return NULL;
}

const gchar*
pamac_snap_package_get_confined (PamacSnapPackage* self)
{
	PamacSnapPackageClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = PAMAC_SNAP_PACKAGE_GET_CLASS (self);
	if (_klass_->get_confined) {
		return _klass_->get_confined (self);
	}
	return NULL;
}

GPtrArray*
pamac_snap_package_get_channels (PamacSnapPackage* self)
{
	PamacSnapPackageClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = PAMAC_SNAP_PACKAGE_GET_CLASS (self);
	if (_klass_->get_channels) {
		return _klass_->get_channels (self);
	}
	return NULL;
}

static void
pamac_snap_package_class_init (PamacSnapPackageClass * klass,
                               gpointer klass_data)
{
	pamac_snap_package_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->get_property = _vala_pamac_snap_package_get_property;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PAMAC_SNAP_PACKAGE_CHANNEL_PROPERTY, pamac_snap_package_properties[PAMAC_SNAP_PACKAGE_CHANNEL_PROPERTY] = g_param_spec_string ("channel", "channel", "channel", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PAMAC_SNAP_PACKAGE_PUBLISHER_PROPERTY, pamac_snap_package_properties[PAMAC_SNAP_PACKAGE_PUBLISHER_PROPERTY] = g_param_spec_string ("publisher", "publisher", "publisher", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PAMAC_SNAP_PACKAGE_CONFINED_PROPERTY, pamac_snap_package_properties[PAMAC_SNAP_PACKAGE_CONFINED_PROPERTY] = g_param_spec_string ("confined", "confined", "confined", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PAMAC_SNAP_PACKAGE_CHANNELS_PROPERTY, pamac_snap_package_properties[PAMAC_SNAP_PACKAGE_CHANNELS_PROPERTY] = g_param_spec_boxed ("channels", "channels", "channels", G_TYPE_PTR_ARRAY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
pamac_snap_package_instance_init (PamacSnapPackage * self,
                                  gpointer klass)
{
}

static GType
pamac_snap_package_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PamacSnapPackageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pamac_snap_package_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PamacSnapPackage), 0, (GInstanceInitFunc) pamac_snap_package_instance_init, NULL };
	GType pamac_snap_package_type_id;
	pamac_snap_package_type_id = g_type_register_static (PAMAC_TYPE_PACKAGE, "PamacSnapPackage", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	return pamac_snap_package_type_id;
}

GType
pamac_snap_package_get_type (void)
{
	static volatile gsize pamac_snap_package_type_id__once = 0;
	if (g_once_init_enter (&pamac_snap_package_type_id__once)) {
		GType pamac_snap_package_type_id;
		pamac_snap_package_type_id = pamac_snap_package_get_type_once ();
		g_once_init_leave (&pamac_snap_package_type_id__once, pamac_snap_package_type_id);
	}
	return pamac_snap_package_type_id__once;
}

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

