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

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

enum  {
	SEAFILE_DIR_0_PROPERTY,
	SEAFILE_DIR_ID_PROPERTY,
	SEAFILE_DIR_VERSION_PROPERTY,
	SEAFILE_DIR_NUM_PROPERTIES
};
static GParamSpec* seafile_dir_properties[SEAFILE_DIR_NUM_PROPERTIES];
enum  {
	SEAFILE_FILE_COUNT_INFO_0_PROPERTY,
	SEAFILE_FILE_COUNT_INFO_FILE_COUNT_PROPERTY,
	SEAFILE_FILE_COUNT_INFO_DIR_COUNT_PROPERTY,
	SEAFILE_FILE_COUNT_INFO_SIZE_PROPERTY,
	SEAFILE_FILE_COUNT_INFO_NUM_PROPERTIES
};
static GParamSpec* seafile_file_count_info_properties[SEAFILE_FILE_COUNT_INFO_NUM_PROPERTIES];

struct _SeafileDirPrivate {
	gint _version;
};

struct _SeafileFileCountInfoPrivate {
	gint64 _file_count;
	gint64 _dir_count;
	gint64 _size;
};

static gint SeafileDir_private_offset;
static gpointer seafile_dir_parent_class = NULL;
static gint SeafileFileCountInfo_private_offset;
static gpointer seafile_file_count_info_parent_class = NULL;

static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
static void seafile_dir_finalize (GObject * obj);
static GType seafile_dir_get_type_once (void);
static void _vala_seafile_dir_get_property (GObject * object,
                                     guint property_id,
                                     GValue * value,
                                     GParamSpec * pspec);
static void _vala_seafile_dir_set_property (GObject * object,
                                     guint property_id,
                                     const GValue * value,
                                     GParamSpec * pspec);
static void seafile_file_count_info_finalize (GObject * obj);
static GType seafile_file_count_info_get_type_once (void);
static void _vala_seafile_file_count_info_get_property (GObject * object,
                                                 guint property_id,
                                                 GValue * value,
                                                 GParamSpec * pspec);
static void _vala_seafile_file_count_info_set_property (GObject * object,
                                                 guint property_id,
                                                 const GValue * value,
                                                 GParamSpec * pspec);

static inline gpointer
seafile_dir_get_instance_private (SeafileDir* self)
{
	return G_STRUCT_MEMBER_P (self, SeafileDir_private_offset);
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static inline void
_g_list_free__g_object_unref0_ (GList* self)
{
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
}

SeafileDir*
seafile_dir_construct (GType object_type)
{
	SeafileDir * self = NULL;
	self = (SeafileDir*) g_object_new (object_type, NULL);
	return self;
}

SeafileDir*
seafile_dir_new (void)
{
	return seafile_dir_construct (SEAFILE_TYPE_DIR);
}

const gchar*
seafile_dir_get_id (SeafileDir* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = (const gchar*) self->_id;
	return result;
}

void
seafile_dir_set_id (SeafileDir* self,
                    const gchar* value)
{
	g_return_if_fail (self != NULL);
	memcpy (self->_id, value, (gsize) 40);
	self->_id[40] = '\0';
	g_object_notify_by_pspec ((GObject *) self, seafile_dir_properties[SEAFILE_DIR_ID_PROPERTY]);
}

gint
seafile_dir_get_version (SeafileDir* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_version;
	return result;
}

void
seafile_dir_set_version (SeafileDir* self,
                         gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_dir_get_version (self);
	if (old_value != value) {
		self->priv->_version = value;
		g_object_notify_by_pspec ((GObject *) self, seafile_dir_properties[SEAFILE_DIR_VERSION_PROPERTY]);
	}
}

static void
seafile_dir_class_init (SeafileDirClass * klass,
                        gpointer klass_data)
{
	seafile_dir_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SeafileDir_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_seafile_dir_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_seafile_dir_set_property;
	G_OBJECT_CLASS (klass)->finalize = seafile_dir_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_DIR_ID_PROPERTY, seafile_dir_properties[SEAFILE_DIR_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_DIR_VERSION_PROPERTY, seafile_dir_properties[SEAFILE_DIR_VERSION_PROPERTY] = g_param_spec_int ("version", "version", "version", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
seafile_dir_instance_init (SeafileDir * self,
                           gpointer klass)
{
	self->priv = seafile_dir_get_instance_private (self);
}

static void
seafile_dir_finalize (GObject * obj)
{
	SeafileDir * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEAFILE_TYPE_DIR, SeafileDir);
	(self->entries == NULL) ? NULL : (self->entries = (_g_list_free__g_object_unref0_ (self->entries), NULL));
	G_OBJECT_CLASS (seafile_dir_parent_class)->finalize (obj);
}

static GType
seafile_dir_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SeafileDirClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) seafile_dir_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeafileDir), 0, (GInstanceInitFunc) seafile_dir_instance_init, NULL };
	GType seafile_dir_type_id;
	seafile_dir_type_id = g_type_register_static (G_TYPE_OBJECT, "SeafileDir", &g_define_type_info, 0);
	SeafileDir_private_offset = g_type_add_instance_private (seafile_dir_type_id, sizeof (SeafileDirPrivate));
	return seafile_dir_type_id;
}

GType
seafile_dir_get_type (void)
{
	static volatile gsize seafile_dir_type_id__once = 0;
	if (g_once_init_enter (&seafile_dir_type_id__once)) {
		GType seafile_dir_type_id;
		seafile_dir_type_id = seafile_dir_get_type_once ();
		g_once_init_leave (&seafile_dir_type_id__once, seafile_dir_type_id);
	}
	return seafile_dir_type_id__once;
}

static void
_vala_seafile_dir_get_property (GObject * object,
                                guint property_id,
                                GValue * value,
                                GParamSpec * pspec)
{
	SeafileDir * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_DIR, SeafileDir);
	switch (property_id) {
		case SEAFILE_DIR_ID_PROPERTY:
		g_value_set_string (value, seafile_dir_get_id (self));
		break;
		case SEAFILE_DIR_VERSION_PROPERTY:
		g_value_set_int (value, seafile_dir_get_version (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_seafile_dir_set_property (GObject * object,
                                guint property_id,
                                const GValue * value,
                                GParamSpec * pspec)
{
	SeafileDir * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_DIR, SeafileDir);
	switch (property_id) {
		case SEAFILE_DIR_ID_PROPERTY:
		seafile_dir_set_id (self, g_value_get_string (value));
		break;
		case SEAFILE_DIR_VERSION_PROPERTY:
		seafile_dir_set_version (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
seafile_file_count_info_get_instance_private (SeafileFileCountInfo* self)
{
	return G_STRUCT_MEMBER_P (self, SeafileFileCountInfo_private_offset);
}

SeafileFileCountInfo*
seafile_file_count_info_construct (GType object_type)
{
	SeafileFileCountInfo * self = NULL;
	self = (SeafileFileCountInfo*) g_object_new (object_type, NULL);
	return self;
}

SeafileFileCountInfo*
seafile_file_count_info_new (void)
{
	return seafile_file_count_info_construct (SEAFILE_TYPE_FILE_COUNT_INFO);
}

gint64
seafile_file_count_info_get_file_count (SeafileFileCountInfo* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, -1LL);
	result = self->priv->_file_count;
	return result;
}

void
seafile_file_count_info_set_file_count (SeafileFileCountInfo* self,
                                        gint64 value)
{
	gint64 old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_file_count_info_get_file_count (self);
	if (old_value != value) {
		self->priv->_file_count = value;
		g_object_notify_by_pspec ((GObject *) self, seafile_file_count_info_properties[SEAFILE_FILE_COUNT_INFO_FILE_COUNT_PROPERTY]);
	}
}

gint64
seafile_file_count_info_get_dir_count (SeafileFileCountInfo* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, -1LL);
	result = self->priv->_dir_count;
	return result;
}

void
seafile_file_count_info_set_dir_count (SeafileFileCountInfo* self,
                                       gint64 value)
{
	gint64 old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_file_count_info_get_dir_count (self);
	if (old_value != value) {
		self->priv->_dir_count = value;
		g_object_notify_by_pspec ((GObject *) self, seafile_file_count_info_properties[SEAFILE_FILE_COUNT_INFO_DIR_COUNT_PROPERTY]);
	}
}

gint64
seafile_file_count_info_get_size (SeafileFileCountInfo* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, -1LL);
	result = self->priv->_size;
	return result;
}

void
seafile_file_count_info_set_size (SeafileFileCountInfo* self,
                                  gint64 value)
{
	gint64 old_value;
	g_return_if_fail (self != NULL);
	old_value = seafile_file_count_info_get_size (self);
	if (old_value != value) {
		self->priv->_size = value;
		g_object_notify_by_pspec ((GObject *) self, seafile_file_count_info_properties[SEAFILE_FILE_COUNT_INFO_SIZE_PROPERTY]);
	}
}

static void
seafile_file_count_info_class_init (SeafileFileCountInfoClass * klass,
                                    gpointer klass_data)
{
	seafile_file_count_info_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SeafileFileCountInfo_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_seafile_file_count_info_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_seafile_file_count_info_set_property;
	G_OBJECT_CLASS (klass)->finalize = seafile_file_count_info_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SEAFILE_FILE_COUNT_INFO_FILE_COUNT_PROPERTY, seafile_file_count_info_properties[SEAFILE_FILE_COUNT_INFO_FILE_COUNT_PROPERTY] = g_param_spec_int64 ("file-count", "file-count", "file-count", 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_FILE_COUNT_INFO_DIR_COUNT_PROPERTY, seafile_file_count_info_properties[SEAFILE_FILE_COUNT_INFO_DIR_COUNT_PROPERTY] = g_param_spec_int64 ("dir-count", "dir-count", "dir-count", 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_FILE_COUNT_INFO_SIZE_PROPERTY, seafile_file_count_info_properties[SEAFILE_FILE_COUNT_INFO_SIZE_PROPERTY] = g_param_spec_int64 ("size", "size", "size", G_MININT64, G_MAXINT64, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
seafile_file_count_info_instance_init (SeafileFileCountInfo * self,
                                       gpointer klass)
{
	self->priv = seafile_file_count_info_get_instance_private (self);
}

static void
seafile_file_count_info_finalize (GObject * obj)
{
	SeafileFileCountInfo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SEAFILE_TYPE_FILE_COUNT_INFO, SeafileFileCountInfo);
	G_OBJECT_CLASS (seafile_file_count_info_parent_class)->finalize (obj);
}

static GType
seafile_file_count_info_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SeafileFileCountInfoClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) seafile_file_count_info_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SeafileFileCountInfo), 0, (GInstanceInitFunc) seafile_file_count_info_instance_init, NULL };
	GType seafile_file_count_info_type_id;
	seafile_file_count_info_type_id = g_type_register_static (G_TYPE_OBJECT, "SeafileFileCountInfo", &g_define_type_info, 0);
	SeafileFileCountInfo_private_offset = g_type_add_instance_private (seafile_file_count_info_type_id, sizeof (SeafileFileCountInfoPrivate));
	return seafile_file_count_info_type_id;
}

GType
seafile_file_count_info_get_type (void)
{
	static volatile gsize seafile_file_count_info_type_id__once = 0;
	if (g_once_init_enter (&seafile_file_count_info_type_id__once)) {
		GType seafile_file_count_info_type_id;
		seafile_file_count_info_type_id = seafile_file_count_info_get_type_once ();
		g_once_init_leave (&seafile_file_count_info_type_id__once, seafile_file_count_info_type_id);
	}
	return seafile_file_count_info_type_id__once;
}

static void
_vala_seafile_file_count_info_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec)
{
	SeafileFileCountInfo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_FILE_COUNT_INFO, SeafileFileCountInfo);
	switch (property_id) {
		case SEAFILE_FILE_COUNT_INFO_FILE_COUNT_PROPERTY:
		g_value_set_int64 (value, seafile_file_count_info_get_file_count (self));
		break;
		case SEAFILE_FILE_COUNT_INFO_DIR_COUNT_PROPERTY:
		g_value_set_int64 (value, seafile_file_count_info_get_dir_count (self));
		break;
		case SEAFILE_FILE_COUNT_INFO_SIZE_PROPERTY:
		g_value_set_int64 (value, seafile_file_count_info_get_size (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_seafile_file_count_info_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec)
{
	SeafileFileCountInfo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SEAFILE_TYPE_FILE_COUNT_INFO, SeafileFileCountInfo);
	switch (property_id) {
		case SEAFILE_FILE_COUNT_INFO_FILE_COUNT_PROPERTY:
		seafile_file_count_info_set_file_count (self, g_value_get_int64 (value));
		break;
		case SEAFILE_FILE_COUNT_INFO_DIR_COUNT_PROPERTY:
		seafile_file_count_info_set_dir_count (self, g_value_get_int64 (value));
		break;
		case SEAFILE_FILE_COUNT_INFO_SIZE_PROPERTY:
		seafile_file_count_info_set_size (self, g_value_get_int64 (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

