/* copy-task.c generated by valac 0.56.19, the Vala compiler
 * generated from copy-task.vala, do not modify */

#include "seafile-object.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <glib-object.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

enum  {
	SEAFILE_COPY_TASK_0_PROPERTY,
	SEAFILE_COPY_TASK_DONE_PROPERTY,
	SEAFILE_COPY_TASK_TOTAL_PROPERTY,
	SEAFILE_COPY_TASK_CANCELED_PROPERTY,
	SEAFILE_COPY_TASK_FAILED_PROPERTY,
	SEAFILE_COPY_TASK_FAILED_REASON_PROPERTY,
	SEAFILE_COPY_TASK_SUCCESSFUL_PROPERTY,
	SEAFILE_COPY_TASK_NUM_PROPERTIES
};
static GParamSpec* seafile_copy_task_properties[SEAFILE_COPY_TASK_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
enum  {
	SEAFILE_COPY_RESULT_0_PROPERTY,
	SEAFILE_COPY_RESULT_BACKGROUND_PROPERTY,
	SEAFILE_COPY_RESULT_TASK_ID_PROPERTY,
	SEAFILE_COPY_RESULT_NUM_PROPERTIES
};
static GParamSpec* seafile_copy_result_properties[SEAFILE_COPY_RESULT_NUM_PROPERTIES];

struct _SeafileCopyTaskPrivate {
	gint64 _done;
	gint64 _total;
	gboolean _canceled;
	gboolean _failed;
	gchar* _failed_reason;
	gboolean _successful;
};

struct _SeafileCopyResultPrivate {
	gboolean _background;
	gchar* _task_id;
};

static gint SeafileCopyTask_private_offset;
static gpointer seafile_copy_task_parent_class = NULL;
static gint SeafileCopyResult_private_offset;
static gpointer seafile_copy_result_parent_class = NULL;

static void seafile_copy_task_finalize (GObject * obj);
static GType seafile_copy_task_get_type_once (void);
static void _vala_seafile_copy_task_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec);
static void _vala_seafile_copy_task_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec);
static void seafile_copy_result_finalize (GObject * obj);
static GType seafile_copy_result_get_type_once (void);
static void _vala_seafile_copy_result_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec);
static void _vala_seafile_copy_result_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec);

static inline gpointer
seafile_copy_task_get_instance_private (SeafileCopyTask* self)
{
	return G_STRUCT_MEMBER_P (self, SeafileCopyTask_private_offset);
}

SeafileCopyTask*
seafile_copy_task_construct (GType object_type)
{
	SeafileCopyTask * self = NULL;
	self = (SeafileCopyTask*) g_object_new (object_type, NULL);
	return self;
}

SeafileCopyTask*
seafile_copy_task_new (void)
{
	return seafile_copy_task_construct (SEAFILE_TYPE_COPY_TASK);
}

gint64
seafile_copy_task_get_done (SeafileCopyTask* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, -1LL);
	result = self->priv->_done;
	return result;
}

void
seafile_copy_task_set_done (SeafileCopyTask* self,
                            gint64 value)
{
	gint64 old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_copy_task_get_done (self);
	if (old_value != value) {
		self->priv->_done = value;
		g_object_notify_by_pspec ((GObject *) self, seafile_copy_task_properties[SEAFILE_COPY_TASK_DONE_PROPERTY]);
	}
}

gint64
seafile_copy_task_get_total (SeafileCopyTask* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, -1LL);
	result = self->priv->_total;
	return result;
}

void
seafile_copy_task_set_total (SeafileCopyTask* self,
                             gint64 value)
{
	gint64 old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_copy_task_get_total (self);
	if (old_value != value) {
		self->priv->_total = value;
		g_object_notify_by_pspec ((GObject *) self, seafile_copy_task_properties[SEAFILE_COPY_TASK_TOTAL_PROPERTY]);
	}
}

gboolean
seafile_copy_task_get_canceled (SeafileCopyTask* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_canceled;
	return result;
}

void
seafile_copy_task_set_canceled (SeafileCopyTask* self,
                                gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_copy_task_get_canceled (self);
	if (old_value != value) {
		self->priv->_canceled = value;
		g_object_notify_by_pspec ((GObject *) self, seafile_copy_task_properties[SEAFILE_COPY_TASK_CANCELED_PROPERTY]);
	}
}

gboolean
seafile_copy_task_get_failed (SeafileCopyTask* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_failed;
	return result;
}

void
seafile_copy_task_set_failed (SeafileCopyTask* self,
                              gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_copy_task_get_failed (self);
	if (old_value != value) {
		self->priv->_failed = value;
		g_object_notify_by_pspec ((GObject *) self, seafile_copy_task_properties[SEAFILE_COPY_TASK_FAILED_PROPERTY]);
	}
}

const gchar*
seafile_copy_task_get_failed_reason (SeafileCopyTask* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_failed_reason;
	result = _tmp0_;
	return result;
}

void
seafile_copy_task_set_failed_reason (SeafileCopyTask* self,
                                     const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_copy_task_get_failed_reason (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_failed_reason);
		self->priv->_failed_reason = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, seafile_copy_task_properties[SEAFILE_COPY_TASK_FAILED_REASON_PROPERTY]);
	}
}

gboolean
seafile_copy_task_get_successful (SeafileCopyTask* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_successful;
	return result;
}

void
seafile_copy_task_set_successful (SeafileCopyTask* self,
                                  gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_copy_task_get_successful (self);
	if (old_value != value) {
		self->priv->_successful = value;
		g_object_notify_by_pspec ((GObject *) self, seafile_copy_task_properties[SEAFILE_COPY_TASK_SUCCESSFUL_PROPERTY]);
	}
}

static void
seafile_copy_task_class_init (SeafileCopyTaskClass * klass,
                              gpointer klass_data)
{
	seafile_copy_task_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SeafileCopyTask_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_seafile_copy_task_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_seafile_copy_task_set_property;
	G_OBJECT_CLASS (klass)->finalize = seafile_copy_task_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_COPY_TASK_DONE_PROPERTY, seafile_copy_task_properties[SEAFILE_COPY_TASK_DONE_PROPERTY] = g_param_spec_int64 ("done", "done", "done", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_COPY_TASK_TOTAL_PROPERTY, seafile_copy_task_properties[SEAFILE_COPY_TASK_TOTAL_PROPERTY] = g_param_spec_int64 ("total", "total", "total", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_COPY_TASK_CANCELED_PROPERTY, seafile_copy_task_properties[SEAFILE_COPY_TASK_CANCELED_PROPERTY] = g_param_spec_boolean ("canceled", "canceled", "canceled", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_COPY_TASK_FAILED_PROPERTY, seafile_copy_task_properties[SEAFILE_COPY_TASK_FAILED_PROPERTY] = g_param_spec_boolean ("failed", "failed", "failed", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_COPY_TASK_FAILED_REASON_PROPERTY, seafile_copy_task_properties[SEAFILE_COPY_TASK_FAILED_REASON_PROPERTY] = g_param_spec_string ("failed-reason", "failed-reason", "failed-reason", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_COPY_TASK_SUCCESSFUL_PROPERTY, seafile_copy_task_properties[SEAFILE_COPY_TASK_SUCCESSFUL_PROPERTY] = g_param_spec_boolean ("successful", "successful", "successful", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
seafile_copy_task_instance_init (SeafileCopyTask * self,
                                 gpointer klass)
{
	self->priv = seafile_copy_task_get_instance_private (self);
}

static void
seafile_copy_task_finalize (GObject * obj)
{
	SeafileCopyTask * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEAFILE_TYPE_COPY_TASK, SeafileCopyTask);
	_g_free0 (self->priv->_failed_reason);
	G_OBJECT_CLASS (seafile_copy_task_parent_class)->finalize (obj);
}

static GType
seafile_copy_task_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SeafileCopyTaskClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) seafile_copy_task_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeafileCopyTask), 0, (GInstanceInitFunc) seafile_copy_task_instance_init, NULL };
	GType seafile_copy_task_type_id;
	seafile_copy_task_type_id = g_type_register_static (G_TYPE_OBJECT, "SeafileCopyTask", &g_define_type_info, 0);
	SeafileCopyTask_private_offset = g_type_add_instance_private (seafile_copy_task_type_id, sizeof (SeafileCopyTaskPrivate));
	return seafile_copy_task_type_id;
}

GType
seafile_copy_task_get_type (void)
{
	static volatile gsize seafile_copy_task_type_id__once = 0;
	if (g_once_init_enter (&seafile_copy_task_type_id__once)) {
		GType seafile_copy_task_type_id;
		seafile_copy_task_type_id = seafile_copy_task_get_type_once ();
		g_once_init_leave (&seafile_copy_task_type_id__once, seafile_copy_task_type_id);
	}
	return seafile_copy_task_type_id__once;
}

static void
_vala_seafile_copy_task_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec)
{
	SeafileCopyTask * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_COPY_TASK, SeafileCopyTask);
	switch (property_id) {
		case SEAFILE_COPY_TASK_DONE_PROPERTY:
		g_value_set_int64 (value, seafile_copy_task_get_done (self));
		break;
		case SEAFILE_COPY_TASK_TOTAL_PROPERTY:
		g_value_set_int64 (value, seafile_copy_task_get_total (self));
		break;
		case SEAFILE_COPY_TASK_CANCELED_PROPERTY:
		g_value_set_boolean (value, seafile_copy_task_get_canceled (self));
		break;
		case SEAFILE_COPY_TASK_FAILED_PROPERTY:
		g_value_set_boolean (value, seafile_copy_task_get_failed (self));
		break;
		case SEAFILE_COPY_TASK_FAILED_REASON_PROPERTY:
		g_value_set_string (value, seafile_copy_task_get_failed_reason (self));
		break;
		case SEAFILE_COPY_TASK_SUCCESSFUL_PROPERTY:
		g_value_set_boolean (value, seafile_copy_task_get_successful (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_seafile_copy_task_set_property (GObject * object,
                                      guint property_id,
                                      const GValue * value,
                                      GParamSpec * pspec)
{
	SeafileCopyTask * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_COPY_TASK, SeafileCopyTask);
	switch (property_id) {
		case SEAFILE_COPY_TASK_DONE_PROPERTY:
		seafile_copy_task_set_done (self, g_value_get_int64 (value));
		break;
		case SEAFILE_COPY_TASK_TOTAL_PROPERTY:
		seafile_copy_task_set_total (self, g_value_get_int64 (value));
		break;
		case SEAFILE_COPY_TASK_CANCELED_PROPERTY:
		seafile_copy_task_set_canceled (self, g_value_get_boolean (value));
		break;
		case SEAFILE_COPY_TASK_FAILED_PROPERTY:
		seafile_copy_task_set_failed (self, g_value_get_boolean (value));
		break;
		case SEAFILE_COPY_TASK_FAILED_REASON_PROPERTY:
		seafile_copy_task_set_failed_reason (self, g_value_get_string (value));
		break;
		case SEAFILE_COPY_TASK_SUCCESSFUL_PROPERTY:
		seafile_copy_task_set_successful (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
seafile_copy_result_get_instance_private (SeafileCopyResult* self)
{
	return G_STRUCT_MEMBER_P (self, SeafileCopyResult_private_offset);
}

SeafileCopyResult*
seafile_copy_result_construct (GType object_type)
{
	SeafileCopyResult * self = NULL;
	self = (SeafileCopyResult*) g_object_new (object_type, NULL);
	return self;
}

SeafileCopyResult*
seafile_copy_result_new (void)
{
	return seafile_copy_result_construct (SEAFILE_TYPE_COPY_RESULT);
}

gboolean
seafile_copy_result_get_background (SeafileCopyResult* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_background;
	return result;
}

void
seafile_copy_result_set_background (SeafileCopyResult* self,
                                    gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_copy_result_get_background (self);
	if (old_value != value) {
		self->priv->_background = value;
		g_object_notify_by_pspec ((GObject *) self, seafile_copy_result_properties[SEAFILE_COPY_RESULT_BACKGROUND_PROPERTY]);
	}
}

const gchar*
seafile_copy_result_get_task_id (SeafileCopyResult* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_task_id;
	result = _tmp0_;
	return result;
}

void
seafile_copy_result_set_task_id (SeafileCopyResult* self,
                                 const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_copy_result_get_task_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_task_id);
		self->priv->_task_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, seafile_copy_result_properties[SEAFILE_COPY_RESULT_TASK_ID_PROPERTY]);
	}
}

static void
seafile_copy_result_class_init (SeafileCopyResultClass * klass,
                                gpointer klass_data)
{
	seafile_copy_result_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SeafileCopyResult_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_seafile_copy_result_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_seafile_copy_result_set_property;
	G_OBJECT_CLASS (klass)->finalize = seafile_copy_result_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_COPY_RESULT_BACKGROUND_PROPERTY, seafile_copy_result_properties[SEAFILE_COPY_RESULT_BACKGROUND_PROPERTY] = g_param_spec_boolean ("background", "background", "background", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_COPY_RESULT_TASK_ID_PROPERTY, seafile_copy_result_properties[SEAFILE_COPY_RESULT_TASK_ID_PROPERTY] = g_param_spec_string ("task-id", "task-id", "task-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
seafile_copy_result_instance_init (SeafileCopyResult * self,
                                   gpointer klass)
{
	self->priv = seafile_copy_result_get_instance_private (self);
}

static void
seafile_copy_result_finalize (GObject * obj)
{
	SeafileCopyResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEAFILE_TYPE_COPY_RESULT, SeafileCopyResult);
	_g_free0 (self->priv->_task_id);
	G_OBJECT_CLASS (seafile_copy_result_parent_class)->finalize (obj);
}

static GType
seafile_copy_result_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SeafileCopyResultClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) seafile_copy_result_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeafileCopyResult), 0, (GInstanceInitFunc) seafile_copy_result_instance_init, NULL };
	GType seafile_copy_result_type_id;
	seafile_copy_result_type_id = g_type_register_static (G_TYPE_OBJECT, "SeafileCopyResult", &g_define_type_info, 0);
	SeafileCopyResult_private_offset = g_type_add_instance_private (seafile_copy_result_type_id, sizeof (SeafileCopyResultPrivate));
	return seafile_copy_result_type_id;
}

GType
seafile_copy_result_get_type (void)
{
	static volatile gsize seafile_copy_result_type_id__once = 0;
	if (g_once_init_enter (&seafile_copy_result_type_id__once)) {
		GType seafile_copy_result_type_id;
		seafile_copy_result_type_id = seafile_copy_result_get_type_once ();
		g_once_init_leave (&seafile_copy_result_type_id__once, seafile_copy_result_type_id);
	}
	return seafile_copy_result_type_id__once;
}

static void
_vala_seafile_copy_result_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	SeafileCopyResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_COPY_RESULT, SeafileCopyResult);
	switch (property_id) {
		case SEAFILE_COPY_RESULT_BACKGROUND_PROPERTY:
		g_value_set_boolean (value, seafile_copy_result_get_background (self));
		break;
		case SEAFILE_COPY_RESULT_TASK_ID_PROPERTY:
		g_value_set_string (value, seafile_copy_result_get_task_id (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_seafile_copy_result_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	SeafileCopyResult * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_COPY_RESULT, SeafileCopyResult);
	switch (property_id) {
		case SEAFILE_COPY_RESULT_BACKGROUND_PROPERTY:
		seafile_copy_result_set_background (self, g_value_get_boolean (value));
		break;
		case SEAFILE_COPY_RESULT_TASK_ID_PROPERTY:
		seafile_copy_result_set_task_id (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

