/* note-details.c generated by valac 0.14.0.3-1a311, the Vala compiler
 * generated from note-details.vala, do not modify */

/*
 * Copyright (C) 2011 Collabora Ltd.
 * Copyright (C) 2011 Philip Withnall
 *
 * 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, see <http://www.gnu.org/licenses/>.
 *
 * Authors:
 *       Raul Gutierrez Segales <raul.gutierrez.segales@collabora.co.uk>
 *       Philip Withnall <philip@tecnocode.co.uk>
 */

#include <glib.h>
#include <glib-object.h>
#include <gee.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <glib/gi18n-lib.h>


#define FOLKS_TYPE_ABSTRACT_FIELD_DETAILS (folks_abstract_field_details_get_type ())
#define FOLKS_ABSTRACT_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_ABSTRACT_FIELD_DETAILS, FolksAbstractFieldDetails))
#define FOLKS_ABSTRACT_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_ABSTRACT_FIELD_DETAILS, FolksAbstractFieldDetailsClass))
#define FOLKS_IS_ABSTRACT_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_ABSTRACT_FIELD_DETAILS))
#define FOLKS_IS_ABSTRACT_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_ABSTRACT_FIELD_DETAILS))
#define FOLKS_ABSTRACT_FIELD_DETAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_ABSTRACT_FIELD_DETAILS, FolksAbstractFieldDetailsClass))

typedef struct _FolksAbstractFieldDetails FolksAbstractFieldDetails;
typedef struct _FolksAbstractFieldDetailsClass FolksAbstractFieldDetailsClass;
typedef struct _FolksAbstractFieldDetailsPrivate FolksAbstractFieldDetailsPrivate;

#define FOLKS_TYPE_NOTE_FIELD_DETAILS (folks_note_field_details_get_type ())
#define FOLKS_NOTE_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_NOTE_FIELD_DETAILS, FolksNoteFieldDetails))
#define FOLKS_NOTE_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_NOTE_FIELD_DETAILS, FolksNoteFieldDetailsClass))
#define FOLKS_IS_NOTE_FIELD_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_NOTE_FIELD_DETAILS))
#define FOLKS_IS_NOTE_FIELD_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_NOTE_FIELD_DETAILS))
#define FOLKS_NOTE_FIELD_DETAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_NOTE_FIELD_DETAILS, FolksNoteFieldDetailsClass))

typedef struct _FolksNoteFieldDetails FolksNoteFieldDetails;
typedef struct _FolksNoteFieldDetailsClass FolksNoteFieldDetailsClass;
typedef struct _FolksNoteFieldDetailsPrivate FolksNoteFieldDetailsPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define FOLKS_TYPE_NOTE_DETAILS (folks_note_details_get_type ())
#define FOLKS_NOTE_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_NOTE_DETAILS, FolksNoteDetails))
#define FOLKS_IS_NOTE_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_NOTE_DETAILS))
#define FOLKS_NOTE_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_NOTE_DETAILS, FolksNoteDetailsIface))

typedef struct _FolksNoteDetails FolksNoteDetails;
typedef struct _FolksNoteDetailsIface FolksNoteDetailsIface;
typedef struct _FolksNoteDetailsChangeNotesData FolksNoteDetailsChangeNotesData;

struct _FolksAbstractFieldDetails {
	GObject parent_instance;
	FolksAbstractFieldDetailsPrivate * priv;
};

struct _FolksAbstractFieldDetailsClass {
	GObjectClass parent_class;
	gboolean (*equal) (FolksAbstractFieldDetails* self, FolksAbstractFieldDetails* that);
	guint (*hash) (FolksAbstractFieldDetails* self);
	gconstpointer (*get_value) (FolksAbstractFieldDetails* self);
	void (*set_value) (FolksAbstractFieldDetails* self, gconstpointer value);
	GeeMultiMap* (*get_parameters) (FolksAbstractFieldDetails* self);
	void (*set_parameters) (FolksAbstractFieldDetails* self, GeeMultiMap* value);
};

struct _FolksNoteFieldDetails {
	FolksAbstractFieldDetails parent_instance;
	FolksNoteFieldDetailsPrivate * priv;
};

struct _FolksNoteFieldDetailsClass {
	FolksAbstractFieldDetailsClass parent_class;
};

struct _FolksNoteFieldDetailsPrivate {
	gchar* _uid;
};

typedef enum  {
	FOLKS_PROPERTY_ERROR_NOT_WRITEABLE,
	FOLKS_PROPERTY_ERROR_INVALID_VALUE,
	FOLKS_PROPERTY_ERROR_UNKNOWN_ERROR
} FolksPropertyError;
#define FOLKS_PROPERTY_ERROR folks_property_error_quark ()
struct _FolksNoteDetailsIface {
	GTypeInterface parent_iface;
	void (*change_notes) (FolksNoteDetails* self, GeeSet* notes, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*change_notes_finish) (FolksNoteDetails* self, GAsyncResult* _res_, GError** error);
	GeeSet* (*get_notes) (FolksNoteDetails* self);
	void (*set_notes) (FolksNoteDetails* self, GeeSet* value);
};

struct _FolksNoteDetailsChangeNotesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	FolksNoteDetails* self;
	GeeSet* notes;
	const gchar* _tmp0_;
	GError* _tmp1_;
	GError * _inner_error_;
};


static gpointer folks_note_field_details_parent_class = NULL;

GType folks_abstract_field_details_get_type (void) G_GNUC_CONST;
GType folks_note_field_details_get_type (void) G_GNUC_CONST;
#define FOLKS_NOTE_FIELD_DETAILS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), FOLKS_TYPE_NOTE_FIELD_DETAILS, FolksNoteFieldDetailsPrivate))
enum  {
	FOLKS_NOTE_FIELD_DETAILS_DUMMY_PROPERTY,
	FOLKS_NOTE_FIELD_DETAILS_UID
};
FolksNoteFieldDetails* folks_note_field_details_new (const gchar* value, GeeMultiMap* parameters, const gchar* uid);
FolksNoteFieldDetails* folks_note_field_details_construct (GType object_type, const gchar* value, GeeMultiMap* parameters, const gchar* uid);
FolksAbstractFieldDetails* folks_abstract_field_details_construct (GType object_type, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func);
void folks_abstract_field_details_set_value (FolksAbstractFieldDetails* self, gconstpointer value);
void folks_abstract_field_details_set_parameters (FolksAbstractFieldDetails* self, GeeMultiMap* value);
void folks_note_field_details_set_uid (FolksNoteFieldDetails* self, const gchar* value);
static gboolean folks_note_field_details_real_equal (FolksAbstractFieldDetails* base, FolksAbstractFieldDetails* that);
const gchar* folks_note_field_details_get_uid (FolksNoteFieldDetails* self);
gconstpointer folks_abstract_field_details_get_value (FolksAbstractFieldDetails* self);
static guint folks_note_field_details_real_hash (FolksAbstractFieldDetails* base);
static void folks_note_field_details_finalize (GObject* obj);
static void _vala_folks_note_field_details_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_folks_note_field_details_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GQuark folks_property_error_quark (void);
GType folks_note_details_get_type (void) G_GNUC_CONST;
static void folks_note_details_real_change_notes_data_free (gpointer _data);
static void folks_note_details_real_change_notes (FolksNoteDetails* self, GeeSet* notes, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_note_details_change_notes (FolksNoteDetails* self, GeeSet* notes, GAsyncReadyCallback _callback_, gpointer _user_data_);
void folks_note_details_change_notes_finish (FolksNoteDetails* self, GAsyncResult* _res_, GError** error);
static gboolean folks_note_details_real_change_notes_co (FolksNoteDetailsChangeNotesData* _data_);
GeeSet* folks_note_details_get_notes (FolksNoteDetails* self);
void folks_note_details_set_notes (FolksNoteDetails* self, GeeSet* value);


/**
   * Create a new NoteFieldDetails.
   *
   * @param value the value of the field
   * @param parameters initial parameters. See
   * {@link AbstractFieldDetails.parameters}. A `null` value is equivalent to a
   * empty map of parameters.
   *
   * @return a new NoteFieldDetails
   *
   * @since 0.6.0
   */
FolksNoteFieldDetails* folks_note_field_details_construct (GType object_type, const gchar* value, GeeMultiMap* parameters, const gchar* uid) {
	FolksNoteFieldDetails * self = NULL;
	const gchar* _tmp0_;
	GeeMultiMap* _tmp1_;
	const gchar* _tmp3_;
	g_return_val_if_fail (value != NULL, NULL);
	self = (FolksNoteFieldDetails*) folks_abstract_field_details_construct (object_type, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free);
	_tmp0_ = value;
	folks_abstract_field_details_set_value ((FolksAbstractFieldDetails*) self, _tmp0_);
	_tmp1_ = parameters;
	if (_tmp1_ != NULL) {
		GeeMultiMap* _tmp2_;
		_tmp2_ = parameters;
		folks_abstract_field_details_set_parameters ((FolksAbstractFieldDetails*) self, _tmp2_);
	}
	_tmp3_ = uid;
	folks_note_field_details_set_uid (self, _tmp3_);
	return self;
}


FolksNoteFieldDetails* folks_note_field_details_new (const gchar* value, GeeMultiMap* parameters, const gchar* uid) {
	return folks_note_field_details_construct (FOLKS_TYPE_NOTE_FIELD_DETAILS, value, parameters, uid);
}


/**
   * {@inheritDoc}
   *
   * @since 0.6.0
   */
static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static gboolean folks_note_field_details_real_equal (FolksAbstractFieldDetails* base, FolksAbstractFieldDetails* that) {
	FolksNoteFieldDetails * self;
	gboolean result = FALSE;
	FolksAbstractFieldDetails* _tmp0_;
	FolksNoteFieldDetails* _tmp1_;
	FolksNoteFieldDetails* that_nfd;
	FolksNoteFieldDetails* _tmp2_;
	gboolean _tmp3_ = FALSE;
	const gchar* _tmp4_;
	FolksNoteFieldDetails* _tmp5_;
	const gchar* _tmp6_;
	gboolean _tmp12_;
	self = (FolksNoteFieldDetails*) base;
	g_return_val_if_fail (that != NULL, FALSE);
	_tmp0_ = that;
	_tmp1_ = _g_object_ref0 (FOLKS_IS_NOTE_FIELD_DETAILS (_tmp0_) ? ((FolksNoteFieldDetails*) _tmp0_) : NULL);
	that_nfd = _tmp1_;
	_tmp2_ = that_nfd;
	if (_tmp2_ == NULL) {
		result = FALSE;
		_g_object_unref0 (that_nfd);
		return result;
	}
	_tmp4_ = self->priv->_uid;
	_tmp5_ = that_nfd;
	_tmp6_ = _tmp5_->priv->_uid;
	if (g_strcmp0 (_tmp4_, _tmp6_) == 0) {
		gconstpointer _tmp7_;
		const gchar* _tmp8_;
		FolksNoteFieldDetails* _tmp9_;
		gconstpointer _tmp10_;
		const gchar* _tmp11_;
		_tmp7_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) self);
		_tmp8_ = _tmp7_;
		_tmp9_ = that_nfd;
		_tmp10_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) _tmp9_);
		_tmp11_ = _tmp10_;
		_tmp3_ = g_strcmp0 ((const gchar*) _tmp8_, (const gchar*) _tmp11_) == 0;
	} else {
		_tmp3_ = FALSE;
	}
	_tmp12_ = _tmp3_;
	result = _tmp12_;
	_g_object_unref0 (that_nfd);
	return result;
}


/**
   * {@inheritDoc}
   *
   * @since 0.6.0
   */
static guint folks_note_field_details_real_hash (FolksAbstractFieldDetails* base) {
	FolksNoteFieldDetails * self;
	guint result = 0U;
	guint retval;
	gconstpointer _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp6_;
	self = (FolksNoteFieldDetails*) base;
	retval = (guint) 0;
	_tmp0_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) self);
	_tmp1_ = _tmp0_;
	if (((const gchar*) _tmp1_) != NULL) {
		guint _tmp2_;
		gconstpointer _tmp3_;
		const gchar* _tmp4_;
		guint _tmp5_ = 0U;
		_tmp2_ = retval;
		_tmp3_ = folks_abstract_field_details_get_value ((FolksAbstractFieldDetails*) self);
		_tmp4_ = _tmp3_;
		_tmp5_ = g_str_hash ((const gchar*) _tmp4_);
		retval = _tmp2_ + _tmp5_;
	}
	_tmp6_ = self->priv->_uid;
	if (_tmp6_ != NULL) {
		guint _tmp7_;
		const gchar* _tmp8_;
		guint _tmp9_ = 0U;
		_tmp7_ = retval;
		_tmp8_ = self->priv->_uid;
		_tmp9_ = g_str_hash (_tmp8_);
		retval = _tmp7_ + _tmp9_;
	}
	result = retval;
	return result;
}


const gchar* folks_note_field_details_get_uid (FolksNoteFieldDetails* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_uid;
	result = _tmp0_;
	return result;
}


void folks_note_field_details_set_uid (FolksNoteFieldDetails* self, const gchar* value) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->_uid);
	self->priv->_uid = _tmp1_;
	g_object_notify ((GObject *) self, "uid");
}


static void folks_note_field_details_class_init (FolksNoteFieldDetailsClass * klass) {
	folks_note_field_details_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (FolksNoteFieldDetailsPrivate));
	FOLKS_ABSTRACT_FIELD_DETAILS_CLASS (klass)->equal = folks_note_field_details_real_equal;
	FOLKS_ABSTRACT_FIELD_DETAILS_CLASS (klass)->hash = folks_note_field_details_real_hash;
	G_OBJECT_CLASS (klass)->get_property = _vala_folks_note_field_details_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_folks_note_field_details_set_property;
	G_OBJECT_CLASS (klass)->finalize = folks_note_field_details_finalize;
	/**
	   * The UID of the note (if any).
	   */
	g_object_class_install_property (G_OBJECT_CLASS (klass), FOLKS_NOTE_FIELD_DETAILS_UID, g_param_spec_string ("uid", "uid", "uid", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void folks_note_field_details_instance_init (FolksNoteFieldDetails * self) {
	self->priv = FOLKS_NOTE_FIELD_DETAILS_GET_PRIVATE (self);
}


static void folks_note_field_details_finalize (GObject* obj) {
	FolksNoteFieldDetails * self;
	self = FOLKS_NOTE_FIELD_DETAILS (obj);
	_g_free0 (self->priv->_uid);
	G_OBJECT_CLASS (folks_note_field_details_parent_class)->finalize (obj);
}


/**
 * Object representing a note that can have some parameters associated with it.
 *
 * See {@link Folks.AbstractFieldDetails} for details on common parameter names
 * and values.
 *
 * @since 0.6.0
 */
GType folks_note_field_details_get_type (void) {
	static volatile gsize folks_note_field_details_type_id__volatile = 0;
	if (g_once_init_enter (&folks_note_field_details_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FolksNoteFieldDetailsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folks_note_field_details_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FolksNoteFieldDetails), 0, (GInstanceInitFunc) folks_note_field_details_instance_init, NULL };
		GType folks_note_field_details_type_id;
		folks_note_field_details_type_id = g_type_register_static (FOLKS_TYPE_ABSTRACT_FIELD_DETAILS, "FolksNoteFieldDetails", &g_define_type_info, 0);
		g_once_init_leave (&folks_note_field_details_type_id__volatile, folks_note_field_details_type_id);
	}
	return folks_note_field_details_type_id__volatile;
}


static void _vala_folks_note_field_details_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	FolksNoteFieldDetails * self;
	self = FOLKS_NOTE_FIELD_DETAILS (object);
	switch (property_id) {
		case FOLKS_NOTE_FIELD_DETAILS_UID:
		g_value_set_string (value, folks_note_field_details_get_uid (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_folks_note_field_details_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	FolksNoteFieldDetails * self;
	self = FOLKS_NOTE_FIELD_DETAILS (object);
	switch (property_id) {
		case FOLKS_NOTE_FIELD_DETAILS_UID:
		folks_note_field_details_set_uid (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void folks_note_details_real_change_notes_data_free (gpointer _data) {
	FolksNoteDetailsChangeNotesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->notes);
	_g_object_unref0 (_data_->self);
	g_slice_free (FolksNoteDetailsChangeNotesData, _data_);
}


static void folks_note_details_real_change_notes (FolksNoteDetails* self, GeeSet* notes, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FolksNoteDetailsChangeNotesData* _data_;
	FolksNoteDetails* _tmp0_;
	GeeSet* _tmp1_;
	GeeSet* _tmp2_;
	_data_ = g_slice_new0 (FolksNoteDetailsChangeNotesData);
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, folks_note_details_real_change_notes);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, folks_note_details_real_change_notes_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = notes;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data_->notes = _tmp2_;
	folks_note_details_real_change_notes_co (_data_);
}


static void folks_note_details_real_change_notes_finish (FolksNoteDetails* self, GAsyncResult* _res_, GError** error) {
	FolksNoteDetailsChangeNotesData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


/**
   * Change the contact's notes.
   *
   * It's preferred to call this rather than setting {@link NoteDetails.notes}
   * directly, as this method gives error notification and will only return once
   * the notes have been written to the relevant backing store (or the
   * operation's failed).
   *
   * @param notes the set of notes
   * @throws PropertyError if setting the notes failed
   * @since 0.6.2
   */
static gboolean folks_note_details_real_change_notes_co (FolksNoteDetailsChangeNotesData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = _ ("Notes are not writeable on this contact.");
	_data_->_tmp1_ = g_error_new_literal (FOLKS_PROPERTY_ERROR, FOLKS_PROPERTY_ERROR_NOT_WRITEABLE, _data_->_tmp0_);
	_data_->_inner_error_ = _data_->_tmp1_;
	if (_data_->_inner_error_->domain == FOLKS_PROPERTY_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;
	}
	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;
}


void folks_note_details_change_notes (FolksNoteDetails* self, GeeSet* notes, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	FOLKS_NOTE_DETAILS_GET_INTERFACE (self)->change_notes (self, notes, _callback_, _user_data_);
}


void folks_note_details_change_notes_finish (FolksNoteDetails* self, GAsyncResult* _res_, GError** error) {
	FOLKS_NOTE_DETAILS_GET_INTERFACE (self)->change_notes_finish (self, _res_, error);
}


GeeSet* folks_note_details_get_notes (FolksNoteDetails* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return FOLKS_NOTE_DETAILS_GET_INTERFACE (self)->get_notes (self);
}


void folks_note_details_set_notes (FolksNoteDetails* self, GeeSet* value) {
	g_return_if_fail (self != NULL);
	FOLKS_NOTE_DETAILS_GET_INTERFACE (self)->set_notes (self, value);
}


static void folks_note_details_base_init (FolksNoteDetailsIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
		/**
		   * The notes about the contact.
		   *
		   * @since 0.5.1
		   */
		g_object_interface_install_property (iface, g_param_spec_object ("notes", "notes", "notes", GEE_TYPE_SET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
		iface->change_notes = folks_note_details_real_change_notes;
		iface->change_notes_finish = folks_note_details_real_change_notes_finish;
	}
}


/**
 * This interface represents the list of notes associated
 * to a {@link Persona} and {@link Individual}.
 *
 * @since 0.4.0
 */
GType folks_note_details_get_type (void) {
	static volatile gsize folks_note_details_type_id__volatile = 0;
	if (g_once_init_enter (&folks_note_details_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FolksNoteDetailsIface), (GBaseInitFunc) folks_note_details_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType folks_note_details_type_id;
		folks_note_details_type_id = g_type_register_static (G_TYPE_INTERFACE, "FolksNoteDetails", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (folks_note_details_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&folks_note_details_type_id__volatile, folks_note_details_type_id);
	}
	return folks_note_details_type_id__volatile;
}



