/* interaction-details.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from interaction-details.vala, do not modify */

/*
 * Copyright (C) 2012 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:
 *       Seif Lotfy <seif.lotfy@collabora.co.uk>
 */

#include "folks/folks.h"
#include <glib.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

static GType folks_interaction_details_get_type_once (void);

guint
folks_interaction_details_get_im_interaction_count (FolksInteractionDetails* self)
{
	FolksInteractionDetailsIface* _iface_;
	g_return_val_if_fail (self != NULL, 0U);
	_iface_ = FOLKS_INTERACTION_DETAILS_GET_INTERFACE (self);
	if (_iface_->get_im_interaction_count) {
		return _iface_->get_im_interaction_count (self);
	}
	return 0U;
}

GDateTime*
folks_interaction_details_get_last_im_interaction_datetime (FolksInteractionDetails* self)
{
	FolksInteractionDetailsIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = FOLKS_INTERACTION_DETAILS_GET_INTERFACE (self);
	if (_iface_->get_last_im_interaction_datetime) {
		return _iface_->get_last_im_interaction_datetime (self);
	}
	return NULL;
}

guint
folks_interaction_details_get_call_interaction_count (FolksInteractionDetails* self)
{
	FolksInteractionDetailsIface* _iface_;
	g_return_val_if_fail (self != NULL, 0U);
	_iface_ = FOLKS_INTERACTION_DETAILS_GET_INTERFACE (self);
	if (_iface_->get_call_interaction_count) {
		return _iface_->get_call_interaction_count (self);
	}
	return 0U;
}

GDateTime*
folks_interaction_details_get_last_call_interaction_datetime (FolksInteractionDetails* self)
{
	FolksInteractionDetailsIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = FOLKS_INTERACTION_DETAILS_GET_INTERFACE (self);
	if (_iface_->get_last_call_interaction_datetime) {
		return _iface_->get_last_call_interaction_datetime (self);
	}
	return NULL;
}

static void
folks_interaction_details_default_init (FolksInteractionDetailsIface * iface,
                                        gpointer iface_data)
{
	/**
	   * The IM interaction associated with a Persona
	   *
	   * @since 0.7.1
	   */
	g_object_interface_install_property (iface, g_param_spec_uint ("im-interaction-count", "im-interaction-count", "im-interaction-count", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	   * The latest IM interaction timestamp associated with a Persona
	   *
	   * @since 0.7.1
	   */
	g_object_interface_install_property (iface, g_param_spec_boxed ("last-im-interaction-datetime", "last-im-interaction-datetime", "last-im-interaction-datetime", G_TYPE_DATE_TIME, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	   * The call interaction associated with a Persona
	   *
	   * @since 0.7.1
	   */
	g_object_interface_install_property (iface, g_param_spec_uint ("call-interaction-count", "call-interaction-count", "call-interaction-count", 0, G_MAXUINT, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	   * The latest call interaction timestamp associated with a Persona
	   *
	   * @since 0.7.1
	   */
	g_object_interface_install_property (iface, g_param_spec_boxed ("last-call-interaction-datetime", "last-call-interaction-datetime", "last-call-interaction-datetime", G_TYPE_DATE_TIME, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

/**
 * Interaction details of a contact.
 *
 * Interaction details are the number and date/time of calls or IM interactions
 * with a contact, giving an idea of the recent interactions the user has had
 * with that contact.
 *
 * @since 0.7.1
 */
static GType
folks_interaction_details_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FolksInteractionDetailsIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folks_interaction_details_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType folks_interaction_details_type_id;
	folks_interaction_details_type_id = g_type_register_static (G_TYPE_INTERFACE, "FolksInteractionDetails", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (folks_interaction_details_type_id, G_TYPE_OBJECT);
	return folks_interaction_details_type_id;
}

GType
folks_interaction_details_get_type (void)
{
	static volatile gsize folks_interaction_details_type_id__once = 0;
	if (g_once_init_enter (&folks_interaction_details_type_id__once)) {
		GType folks_interaction_details_type_id;
		folks_interaction_details_type_id = folks_interaction_details_get_type_once ();
		g_once_init_leave (&folks_interaction_details_type_id__once, folks_interaction_details_type_id);
	}
	return folks_interaction_details_type_id__once;
}

