/* gender-details.c generated by valac 0.13.1.106-1068, the Vala compiler
 * generated from gender-details.vala, do not modify */

/*
 * Copyright (C) 2011 Collabora Ltd.
 *
 * 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:
 *       Marco Barisione <marco.barisione@collabora.co.uk>
 *       Travis Reitter <travis.reitter@collabora.co.uk>
 */

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


#define FOLKS_TYPE_GENDER (folks_gender_get_type ())

#define FOLKS_TYPE_GENDER_DETAILS (folks_gender_details_get_type ())
#define FOLKS_GENDER_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_TYPE_GENDER_DETAILS, FolksGenderDetails))
#define FOLKS_IS_GENDER_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_TYPE_GENDER_DETAILS))
#define FOLKS_GENDER_DETAILS_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), FOLKS_TYPE_GENDER_DETAILS, FolksGenderDetailsIface))

typedef struct _FolksGenderDetails FolksGenderDetails;
typedef struct _FolksGenderDetailsIface FolksGenderDetailsIface;

typedef enum  {
	FOLKS_GENDER_UNSPECIFIED,
	FOLKS_GENDER_MALE,
	FOLKS_GENDER_FEMALE
} FolksGender;

struct _FolksGenderDetailsIface {
	GTypeInterface parent_iface;
	FolksGender (*get_gender) (FolksGenderDetails* self);
	void (*set_gender) (FolksGenderDetails* self, FolksGender value);
};



GType folks_gender_get_type (void) G_GNUC_CONST;
GType folks_gender_details_get_type (void) G_GNUC_CONST;
FolksGender folks_gender_details_get_gender (FolksGenderDetails* self);
void folks_gender_details_set_gender (FolksGenderDetails* self, FolksGender value);


/**
 * The gender of a contact
 *
 * @since 0.3.5
 */
GType folks_gender_get_type (void) {
	static volatile gsize folks_gender_type_id__volatile = 0;
	if (g_once_init_enter (&folks_gender_type_id__volatile)) {
		static const GEnumValue values[] = {{FOLKS_GENDER_UNSPECIFIED, "FOLKS_GENDER_UNSPECIFIED", "unspecified"}, {FOLKS_GENDER_MALE, "FOLKS_GENDER_MALE", "male"}, {FOLKS_GENDER_FEMALE, "FOLKS_GENDER_FEMALE", "female"}, {0, NULL, NULL}};
		GType folks_gender_type_id;
		folks_gender_type_id = g_enum_register_static ("FolksGender", values);
		g_once_init_leave (&folks_gender_type_id__volatile, folks_gender_type_id);
	}
	return folks_gender_type_id__volatile;
}


FolksGender folks_gender_details_get_gender (FolksGenderDetails* self) {
	return FOLKS_GENDER_DETAILS_GET_INTERFACE (self)->get_gender (self);
}


void folks_gender_details_set_gender (FolksGenderDetails* self, FolksGender value) {
	FOLKS_GENDER_DETAILS_GET_INTERFACE (self)->set_gender (self, value);
}


static void folks_gender_details_base_init (FolksGenderDetailsIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
		/**
		   * The gender of the contact.
		   *
		   * @since 0.3.5
		   */
		g_object_interface_install_property (iface, g_param_spec_enum ("gender", "gender", "gender", FOLKS_TYPE_GENDER, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	}
}


/**
 * Interface for specifying the gender of a contact.
 *
 * @since 0.3.5
 */
GType folks_gender_details_get_type (void) {
	static volatile gsize folks_gender_details_type_id__volatile = 0;
	if (g_once_init_enter (&folks_gender_details_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FolksGenderDetailsIface), (GBaseInitFunc) folks_gender_details_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType folks_gender_details_type_id;
		folks_gender_details_type_id = g_type_register_static (G_TYPE_INTERFACE, "FolksGenderDetails", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (folks_gender_details_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&folks_gender_details_type_id__volatile, folks_gender_details_type_id);
	}
	return folks_gender_details_type_id__volatile;
}



