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

/* -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*-*/
/*-
 * Copyright (c) 2013 Maya Developers (https://launchpad.net/maya)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library 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.
 *
 * Authored by: Corentin Noël <tintou@mailoo.org>
 */

#include "elementary-calendar.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <libedataserver/libedataserver.h>
#include <gee.h>
#include <glib-object.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 maya_backend_get_type_once (void);

gchar*
maya_backend_get_name (MayaBackend* self)
{
	MayaBackendIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = MAYA_BACKEND_GET_INTERFACE (self);
	if (_iface_->get_name) {
		return _iface_->get_name (self);
	}
	return NULL;
}

gchar*
maya_backend_get_uid (MayaBackend* self)
{
	MayaBackendIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = MAYA_BACKEND_GET_INTERFACE (self);
	if (_iface_->get_uid) {
		return _iface_->get_uid (self);
	}
	return NULL;
}

GeeCollection*
maya_backend_get_new_calendar_widget (MayaBackend* self,
                                      ESource* to_edit)
{
	MayaBackendIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = MAYA_BACKEND_GET_INTERFACE (self);
	if (_iface_->get_new_calendar_widget) {
		return _iface_->get_new_calendar_widget (self, to_edit);
	}
	return NULL;
}

void
maya_backend_add_new_calendar (MayaBackend* self,
                               const gchar* name,
                               const gchar* color,
                               gboolean set_default,
                               GeeCollection* widgets)
{
	MayaBackendIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = MAYA_BACKEND_GET_INTERFACE (self);
	if (_iface_->add_new_calendar) {
		_iface_->add_new_calendar (self, name, color, set_default, widgets);
	}
}

void
maya_backend_modify_calendar (MayaBackend* self,
                              const gchar* name,
                              const gchar* color,
                              gboolean set_default,
                              GeeCollection* widgets,
                              ESource* source)
{
	MayaBackendIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = MAYA_BACKEND_GET_INTERFACE (self);
	if (_iface_->modify_calendar) {
		_iface_->modify_calendar (self, name, color, set_default, widgets, source);
	}
}

static void
maya_backend_default_init (MayaBackendIface * iface,
                           gpointer iface_data)
{
}

static GType
maya_backend_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (MayaBackendIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) maya_backend_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType maya_backend_type_id;
	maya_backend_type_id = g_type_register_static (G_TYPE_INTERFACE, "MayaBackend", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (maya_backend_type_id, G_TYPE_OBJECT);
	return maya_backend_type_id;
}

GType
maya_backend_get_type (void)
{
	static volatile gsize maya_backend_type_id__once = 0;
	if (g_once_init_enter (&maya_backend_type_id__once)) {
		GType maya_backend_type_id;
		maya_backend_type_id = maya_backend_get_type_once ();
		g_once_init_leave (&maya_backend_type_id__once, maya_backend_type_id);
	}
	return maya_backend_type_id__once;
}

