/* lightmapfuture.c generated by valac 0.25.3.11-62b1e, the Vala compiler
 * generated from lightmapfuture.vala, do not modify */

/* lightmapfuture.vala
 *
 * Copyright (C) 2013  Maciej Piechotka
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library 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
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Maciej Piechotka <uzytkownik2@gmail.com>
 */

#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>


#define GEE_TYPE_FUTURE (gee_future_get_type ())
#define GEE_FUTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_FUTURE, GeeFuture))
#define GEE_IS_FUTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_FUTURE))
#define GEE_FUTURE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_FUTURE, GeeFutureIface))

typedef struct _GeeFuture GeeFuture;
typedef struct _GeeFutureIface GeeFutureIface;

#define GEE_TYPE_LIGHT_MAP_FUTURE (gee_light_map_future_get_type ())
#define GEE_LIGHT_MAP_FUTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_LIGHT_MAP_FUTURE, GeeLightMapFuture))
#define GEE_LIGHT_MAP_FUTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_LIGHT_MAP_FUTURE, GeeLightMapFutureClass))
#define GEE_IS_LIGHT_MAP_FUTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_LIGHT_MAP_FUTURE))
#define GEE_IS_LIGHT_MAP_FUTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_LIGHT_MAP_FUTURE))
#define GEE_LIGHT_MAP_FUTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_LIGHT_MAP_FUTURE, GeeLightMapFutureClass))

typedef struct _GeeLightMapFuture GeeLightMapFuture;
typedef struct _GeeLightMapFutureClass GeeLightMapFutureClass;
typedef struct _GeeLightMapFuturePrivate GeeLightMapFuturePrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _GeeLightMapFutureWaitAsyncData GeeLightMapFutureWaitAsyncData;

typedef enum  {
	GEE_FUTURE_ERROR_ABANDON_PROMISE,
	GEE_FUTURE_ERROR_EXCEPTION
} GeeFutureError;
#define GEE_FUTURE_ERROR gee_future_error_quark ()
typedef gpointer (*GeeFutureMapFunc) (gconstpointer value, void* user_data);
typedef gconstpointer (*GeeFutureLightMapFunc) (gconstpointer value, void* user_data);
typedef gpointer (*GeeFutureZipFunc) (gconstpointer a, gconstpointer b, void* user_data);
typedef GeeFuture* (*GeeFutureFlatMapFunc) (gconstpointer value, void* user_data);
struct _GeeFutureIface {
	GTypeInterface parent_iface;
	GType (*get_g_type) (GeeFuture* self);
	GBoxedCopyFunc (*get_g_dup_func) (GeeFuture* self);
	GDestroyNotify (*get_g_destroy_func) (GeeFuture* self);
	gconstpointer (*wait) (GeeFuture* self, GError** error);
	gboolean (*wait_until) (GeeFuture* self, gint64 end_time, gconstpointer* value, GError** error);
	void (*wait_async) (GeeFuture* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gconstpointer (*wait_finish) (GeeFuture* self, GAsyncResult* _res_, GError** error);
	GeeFuture* (*map) (GeeFuture* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFutureMapFunc func, void* func_target, GDestroyNotify func_target_destroy_notify);
	GeeFuture* (*light_map) (GeeFuture* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFutureLightMapFunc func, void* func_target);
	GeeFuture* (*zip) (GeeFuture* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GType b_type, GBoxedCopyFunc b_dup_func, GDestroyNotify b_destroy_func, GeeFutureZipFunc zip_func, void* zip_func_target, GeeFuture* second);
	GeeFuture* (*flat_map) (GeeFuture* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFutureFlatMapFunc func, void* func_target, GDestroyNotify func_target_destroy_notify);
	gconstpointer (*get_value) (GeeFuture* self);
	gboolean (*get_ready) (GeeFuture* self);
	GError* (*get_exception) (GeeFuture* self);
	GeeFuture* (*light_map_fixed) (GeeFuture* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFutureLightMapFunc func, void* func_target, GDestroyNotify func_target_destroy_notify);
};

struct _GeeLightMapFuture {
	GObject parent_instance;
	GeeLightMapFuturePrivate * priv;
};

struct _GeeLightMapFutureClass {
	GObjectClass parent_class;
};

struct _GeeLightMapFuturePrivate {
	GType a_type;
	GBoxedCopyFunc a_dup_func;
	GDestroyNotify a_destroy_func;
	GType g_type;
	GBoxedCopyFunc g_dup_func;
	GDestroyNotify g_destroy_func;
	GeeFuture* _base;
	GeeFutureLightMapFunc _func;
	gpointer _func_target;
	GDestroyNotify _func_target_destroy_notify;
};

struct _GeeLightMapFutureWaitAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GeeLightMapFuture* self;
	gconstpointer result;
	gconstpointer arg;
	GeeFuture* _tmp0_;
	gconstpointer _tmp1_;
	GeeFutureLightMapFunc _tmp2_;
	void* _tmp2__target;
	gconstpointer _tmp3_;
	GError * _inner_error_;
};


static gpointer gee_light_map_future_parent_class = NULL;
static GeeFutureIface* gee_light_map_future_gee_future_parent_iface = NULL;

GQuark gee_future_error_quark (void);
GType gee_future_get_type (void) G_GNUC_CONST;
G_GNUC_INTERNAL GType gee_light_map_future_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
#define GEE_LIGHT_MAP_FUTURE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GEE_TYPE_LIGHT_MAP_FUTURE, GeeLightMapFuturePrivate))
enum  {
	GEE_LIGHT_MAP_FUTURE_DUMMY_PROPERTY,
	GEE_LIGHT_MAP_FUTURE_A_TYPE,
	GEE_LIGHT_MAP_FUTURE_A_DUP_FUNC,
	GEE_LIGHT_MAP_FUTURE_A_DESTROY_FUNC,
	GEE_LIGHT_MAP_FUTURE_G_TYPE,
	GEE_LIGHT_MAP_FUTURE_G_DUP_FUNC,
	GEE_LIGHT_MAP_FUTURE_G_DESTROY_FUNC,
	GEE_LIGHT_MAP_FUTURE_READY,
	GEE_LIGHT_MAP_FUTURE_EXCEPTION
};
G_GNUC_INTERNAL GeeLightMapFuture* gee_light_map_future_new (GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, GeeFuture* base_future, GeeFutureLightMapFunc func, void* func_target, GDestroyNotify func_target_destroy_notify);
G_GNUC_INTERNAL GeeLightMapFuture* gee_light_map_future_construct (GType object_type, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, GeeFuture* base_future, GeeFutureLightMapFunc func, void* func_target, GDestroyNotify func_target_destroy_notify);
static gconstpointer gee_light_map_future_real_wait (GeeFuture* base, GError** error);
gconstpointer gee_future_wait (GeeFuture* self, GError** error);
static gboolean gee_light_map_future_real_wait_until (GeeFuture* base, gint64 end_time, gconstpointer* value, GError** error);
gboolean gee_future_wait_until (GeeFuture* self, gint64 end_time, gconstpointer* value, GError** error);
static void gee_light_map_future_real_wait_async_data_free (gpointer _data);
static void gee_light_map_future_real_wait_async (GeeFuture* base, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean gee_light_map_future_real_wait_async_co (GeeLightMapFutureWaitAsyncData* _data_);
void gee_future_wait_async (GeeFuture* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
gconstpointer gee_future_wait_finish (GeeFuture* self, GAsyncResult* _res_, GError** error);
static void gee_light_map_future_wait_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
gboolean gee_future_get_ready (GeeFuture* self);
GError* gee_future_get_exception (GeeFuture* self);
static void gee_light_map_future_finalize (GObject* obj);
static void _vala_gee_light_map_future_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_gee_light_map_future_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


G_GNUC_INTERNAL GeeLightMapFuture* gee_light_map_future_construct (GType object_type, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, GeeFuture* base_future, GeeFutureLightMapFunc func, void* func_target, GDestroyNotify func_target_destroy_notify) {
	GeeLightMapFuture * self = NULL;
	GeeFuture* _tmp0_ = NULL;
	GeeFuture* _tmp1_ = NULL;
	GeeFutureLightMapFunc _tmp2_ = NULL;
	void* _tmp2__target = NULL;
	GDestroyNotify _tmp2__target_destroy_notify = NULL;
	g_return_val_if_fail (base_future != NULL, NULL);
	self = (GeeLightMapFuture*) g_object_new (object_type, NULL);
	self->priv->a_type = a_type;
	self->priv->a_dup_func = a_dup_func;
	self->priv->a_destroy_func = a_destroy_func;
	self->priv->g_type = g_type;
	self->priv->g_dup_func = g_dup_func;
	self->priv->g_destroy_func = g_destroy_func;
	_tmp0_ = base_future;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_base);
	self->priv->_base = _tmp1_;
	_tmp2_ = func;
	_tmp2__target = func_target;
	_tmp2__target_destroy_notify = func_target_destroy_notify;
	func_target_destroy_notify = NULL;
	(self->priv->_func_target_destroy_notify == NULL) ? NULL : (self->priv->_func_target_destroy_notify (self->priv->_func_target), NULL);
	self->priv->_func = NULL;
	self->priv->_func_target = NULL;
	self->priv->_func_target_destroy_notify = NULL;
	self->priv->_func = _tmp2_;
	self->priv->_func_target = _tmp2__target;
	self->priv->_func_target_destroy_notify = _tmp2__target_destroy_notify;
	(func_target_destroy_notify == NULL) ? NULL : (func_target_destroy_notify (func_target), NULL);
	func = NULL;
	func_target = NULL;
	func_target_destroy_notify = NULL;
	return self;
}


G_GNUC_INTERNAL GeeLightMapFuture* gee_light_map_future_new (GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, GeeFuture* base_future, GeeFutureLightMapFunc func, void* func_target, GDestroyNotify func_target_destroy_notify) {
	return gee_light_map_future_construct (GEE_TYPE_LIGHT_MAP_FUTURE, a_type, a_dup_func, a_destroy_func, g_type, g_dup_func, g_destroy_func, base_future, func, func_target, func_target_destroy_notify);
}


static gconstpointer gee_light_map_future_real_wait (GeeFuture* base, GError** error) {
	GeeLightMapFuture * self;
	gconstpointer result = NULL;
	gconstpointer _tmp0_ = NULL;
	GeeFuture* _tmp1_ = NULL;
	gconstpointer _tmp2_ = NULL;
	GeeFutureLightMapFunc _tmp3_ = NULL;
	void* _tmp3__target = NULL;
	gconstpointer _tmp4_ = NULL;
	GError * _inner_error_ = NULL;
	self = (GeeLightMapFuture*) base;
	_tmp1_ = self->priv->_base;
	_tmp2_ = gee_future_wait (_tmp1_, &_inner_error_);
	_tmp0_ = _tmp2_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		if (_inner_error_->domain == GEE_FUTURE_ERROR) {
			g_propagate_error (error, _inner_error_);
			return NULL;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return NULL;
		}
	}
	_tmp3_ = self->priv->_func;
	_tmp3__target = self->priv->_func_target;
	_tmp4_ = _tmp3_ (_tmp0_, _tmp3__target);
	result = _tmp4_;
	return result;
}


static gboolean gee_light_map_future_real_wait_until (GeeFuture* base, gint64 end_time, gconstpointer* value, GError** error) {
	GeeLightMapFuture * self;
	gconstpointer _vala_value = NULL;
	gboolean result = FALSE;
	gconstpointer arg = NULL;
	gboolean _result_ = FALSE;
	gboolean _tmp0_ = FALSE;
	GeeFuture* _tmp1_ = NULL;
	gint64 _tmp2_ = 0LL;
	gconstpointer _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	GError * _inner_error_ = NULL;
	self = (GeeLightMapFuture*) base;
	_vala_value = NULL;
	_tmp1_ = self->priv->_base;
	_tmp2_ = end_time;
	_tmp4_ = gee_future_wait_until (_tmp1_, _tmp2_, &_tmp3_, &_inner_error_);
	arg = _tmp3_;
	_tmp0_ = _tmp4_;
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		if (_inner_error_->domain == GEE_FUTURE_ERROR) {
			g_propagate_error (error, _inner_error_);
			return FALSE;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return FALSE;
		}
	}
	_result_ = _tmp0_;
	_tmp5_ = _result_;
	if (_tmp5_) {
		GeeFutureLightMapFunc _tmp6_ = NULL;
		void* _tmp6__target = NULL;
		gconstpointer _tmp7_ = NULL;
		_tmp6_ = self->priv->_func;
		_tmp6__target = self->priv->_func_target;
		_tmp7_ = _tmp6_ (arg, _tmp6__target);
		_vala_value = _tmp7_;
	}
	result = _result_;
	if (value) {
		*value = _vala_value;
	}
	return result;
}


static void gee_light_map_future_real_wait_async_data_free (gpointer _data) {
	GeeLightMapFutureWaitAsyncData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (GeeLightMapFutureWaitAsyncData, _data_);
}


static void gee_light_map_future_real_wait_async (GeeFuture* base, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GeeLightMapFuture * self;
	GeeLightMapFutureWaitAsyncData* _data_;
	GeeLightMapFuture* _tmp0_ = NULL;
	self = (GeeLightMapFuture*) base;
	_data_ = g_slice_new0 (GeeLightMapFutureWaitAsyncData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gee_light_map_future_real_wait_async);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gee_light_map_future_real_wait_async_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	gee_light_map_future_real_wait_async_co (_data_);
}


static gconstpointer gee_light_map_future_real_wait_finish (GeeFuture* base, GAsyncResult* _res_, GError** error) {
	gconstpointer result;
	GeeLightMapFutureWaitAsyncData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void gee_light_map_future_wait_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GeeLightMapFutureWaitAsyncData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	gee_light_map_future_real_wait_async_co (_data_);
}


static gboolean gee_light_map_future_real_wait_async_co (GeeLightMapFutureWaitAsyncData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _data_->self->priv->_base;
	_data_->_state_ = 1;
	gee_future_wait_async (_data_->_tmp0_, gee_light_map_future_wait_async_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = gee_future_wait_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error_);
	_data_->arg = _data_->_tmp1_;
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		if (_data_->_inner_error_->domain == GEE_FUTURE_ERROR) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
			g_clear_error (&_data_->_inner_error_);
			return FALSE;
		}
	}
	_data_->_tmp2_ = NULL;
	_data_->_tmp2__target = NULL;
	_data_->_tmp2_ = _data_->self->priv->_func;
	_data_->_tmp2__target = _data_->self->priv->_func_target;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = _data_->_tmp2_ (_data_->arg, _data_->_tmp2__target);
	_data_->result = _data_->_tmp3_;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static gboolean gee_light_map_future_real_get_ready (GeeFuture* base) {
	gboolean result;
	GeeLightMapFuture* self;
	GeeFuture* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	self = (GeeLightMapFuture*) base;
	_tmp0_ = self->priv->_base;
	_tmp1_ = gee_future_get_ready (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}


static GError* gee_light_map_future_real_get_exception (GeeFuture* base) {
	GError* result;
	GeeLightMapFuture* self;
	GeeFuture* _tmp0_ = NULL;
	GError* _tmp1_ = NULL;
	GError* _tmp2_ = NULL;
	self = (GeeLightMapFuture*) base;
	_tmp0_ = self->priv->_base;
	_tmp1_ = gee_future_get_exception (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}


static void gee_light_map_future_class_init (GeeLightMapFutureClass * klass) {
	gee_light_map_future_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GeeLightMapFuturePrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_gee_light_map_future_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gee_light_map_future_set_property;
	G_OBJECT_CLASS (klass)->finalize = gee_light_map_future_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_LIGHT_MAP_FUTURE_A_TYPE, g_param_spec_gtype ("a-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_LIGHT_MAP_FUTURE_A_DUP_FUNC, g_param_spec_pointer ("a-dup-func", "dup func", "dup func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_LIGHT_MAP_FUTURE_A_DESTROY_FUNC, g_param_spec_pointer ("a-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_LIGHT_MAP_FUTURE_G_TYPE, g_param_spec_gtype ("g-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_LIGHT_MAP_FUTURE_G_DUP_FUNC, g_param_spec_pointer ("g-dup-func", "dup func", "dup func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_LIGHT_MAP_FUTURE_G_DESTROY_FUNC, g_param_spec_pointer ("g-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_LIGHT_MAP_FUTURE_READY, g_param_spec_boolean ("ready", "ready", "ready", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_LIGHT_MAP_FUTURE_EXCEPTION, g_param_spec_pointer ("exception", "exception", "exception", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static GType gee_light_map_future_gee_future_get_g_type (GeeLightMapFuture* self) {
	return self->priv->a_type;
}


static GBoxedCopyFunc gee_light_map_future_gee_future_get_g_dup_func (GeeLightMapFuture* self) {
	return self->priv->a_dup_func;
}


static GDestroyNotify gee_light_map_future_gee_future_get_g_destroy_func (GeeLightMapFuture* self) {
	return self->priv->a_destroy_func;
}


static void gee_light_map_future_gee_future_interface_init (GeeFutureIface * iface) {
	gee_light_map_future_gee_future_parent_iface = g_type_interface_peek_parent (iface);
	iface->wait = (gconstpointer (*)(GeeFuture*, GError**)) gee_light_map_future_real_wait;
	iface->wait_until = (gboolean (*)(GeeFuture*, gint64, gconstpointer*, GError**)) gee_light_map_future_real_wait_until;
	iface->wait_async = (gconstpointer (*)(GeeFuture*, GError**)) gee_light_map_future_real_wait_async;
	iface->wait_finish = gee_light_map_future_real_wait_finish;
	iface->get_g_type = (GType(*)(GeeFuture*)) gee_light_map_future_gee_future_get_g_type;
	iface->get_g_dup_func = (GBoxedCopyFunc(*)(GeeFuture*)) gee_light_map_future_gee_future_get_g_dup_func;
	iface->get_g_destroy_func = (GDestroyNotify(*)(GeeFuture*)) gee_light_map_future_gee_future_get_g_destroy_func;
	iface->get_ready = gee_light_map_future_real_get_ready;
	iface->get_exception = gee_light_map_future_real_get_exception;
}


static void gee_light_map_future_instance_init (GeeLightMapFuture * self) {
	self->priv = GEE_LIGHT_MAP_FUTURE_GET_PRIVATE (self);
}


static void gee_light_map_future_finalize (GObject* obj) {
	GeeLightMapFuture * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TYPE_LIGHT_MAP_FUTURE, GeeLightMapFuture);
	_g_object_unref0 (self->priv->_base);
	(self->priv->_func_target_destroy_notify == NULL) ? NULL : (self->priv->_func_target_destroy_notify (self->priv->_func_target), NULL);
	self->priv->_func = NULL;
	self->priv->_func_target = NULL;
	self->priv->_func_target_destroy_notify = NULL;
	G_OBJECT_CLASS (gee_light_map_future_parent_class)->finalize (obj);
}


G_GNUC_INTERNAL GType gee_light_map_future_get_type (void) {
	static volatile gsize gee_light_map_future_type_id__volatile = 0;
	if (g_once_init_enter (&gee_light_map_future_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GeeLightMapFutureClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_light_map_future_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeLightMapFuture), 0, (GInstanceInitFunc) gee_light_map_future_instance_init, NULL };
		static const GInterfaceInfo gee_future_info = { (GInterfaceInitFunc) gee_light_map_future_gee_future_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType gee_light_map_future_type_id;
		gee_light_map_future_type_id = g_type_register_static (G_TYPE_OBJECT, "GeeLightMapFuture", &g_define_type_info, 0);
		g_type_add_interface_static (gee_light_map_future_type_id, GEE_TYPE_FUTURE, &gee_future_info);
		g_once_init_leave (&gee_light_map_future_type_id__volatile, gee_light_map_future_type_id);
	}
	return gee_light_map_future_type_id__volatile;
}


static void _vala_gee_light_map_future_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GeeLightMapFuture * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TYPE_LIGHT_MAP_FUTURE, GeeLightMapFuture);
	switch (property_id) {
		case GEE_LIGHT_MAP_FUTURE_READY:
		g_value_set_boolean (value, gee_future_get_ready ((GeeFuture*) self));
		break;
		case GEE_LIGHT_MAP_FUTURE_EXCEPTION:
		g_value_set_pointer (value, gee_future_get_exception ((GeeFuture*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_gee_light_map_future_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GeeLightMapFuture * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TYPE_LIGHT_MAP_FUTURE, GeeLightMapFuture);
	switch (property_id) {
		case GEE_LIGHT_MAP_FUTURE_A_TYPE:
		self->priv->a_type = g_value_get_gtype (value);
		break;
		case GEE_LIGHT_MAP_FUTURE_A_DUP_FUNC:
		self->priv->a_dup_func = g_value_get_pointer (value);
		break;
		case GEE_LIGHT_MAP_FUTURE_A_DESTROY_FUNC:
		self->priv->a_destroy_func = g_value_get_pointer (value);
		break;
		case GEE_LIGHT_MAP_FUTURE_G_TYPE:
		self->priv->g_type = g_value_get_gtype (value);
		break;
		case GEE_LIGHT_MAP_FUTURE_G_DUP_FUNC:
		self->priv->g_dup_func = g_value_get_pointer (value);
		break;
		case GEE_LIGHT_MAP_FUTURE_G_DESTROY_FUNC:
		self->priv->g_destroy_func = g_value_get_pointer (value);
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



