/* eds-backend-factory.c generated by valac 0.13.1.106-1068, the Vala compiler
 * generated from eds-backend-factory.vala, do not modify */

/*
 * Copyright (C) 2009 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>.
 * Copyright (C) 2009 Nokia Corporation.
 * 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: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
 *          Travis Reitter <travis.reitter@collabora.co.uk>
 *          Marco Barisione <marco.barisione@collabora.co.uk>
 *          Raul Gutierrez Segales <raul.gutierrez.segales@collabora.co.uk>
 *
 * This file was originally part of Rygel.
 */

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


#define FOLKS_BACKENDS_EDS_TYPE_BACKEND_FACTORY (folks_backends_eds_backend_factory_get_type ())
#define FOLKS_BACKENDS_EDS_BACKEND_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_BACKENDS_EDS_TYPE_BACKEND_FACTORY, FolksBackendsEdsBackendFactory))
#define FOLKS_BACKENDS_EDS_BACKEND_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_BACKENDS_EDS_TYPE_BACKEND_FACTORY, FolksBackendsEdsBackendFactoryClass))
#define FOLKS_BACKENDS_EDS_IS_BACKEND_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_BACKENDS_EDS_TYPE_BACKEND_FACTORY))
#define FOLKS_BACKENDS_EDS_IS_BACKEND_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_BACKENDS_EDS_TYPE_BACKEND_FACTORY))
#define FOLKS_BACKENDS_EDS_BACKEND_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_BACKENDS_EDS_TYPE_BACKEND_FACTORY, FolksBackendsEdsBackendFactoryClass))

typedef struct _FolksBackendsEdsBackendFactory FolksBackendsEdsBackendFactory;
typedef struct _FolksBackendsEdsBackendFactoryClass FolksBackendsEdsBackendFactoryClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _FolksBackendsEdsBackendFactoryPrivate FolksBackendsEdsBackendFactoryPrivate;

#define FOLKS_BACKENDS_EDS_TYPE_BACKEND (folks_backends_eds_backend_get_type ())
#define FOLKS_BACKENDS_EDS_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOLKS_BACKENDS_EDS_TYPE_BACKEND, FolksBackendsEdsBackend))
#define FOLKS_BACKENDS_EDS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_BACKENDS_EDS_TYPE_BACKEND, FolksBackendsEdsBackendClass))
#define FOLKS_BACKENDS_EDS_IS_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOLKS_BACKENDS_EDS_TYPE_BACKEND))
#define FOLKS_BACKENDS_EDS_IS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_BACKENDS_EDS_TYPE_BACKEND))
#define FOLKS_BACKENDS_EDS_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_BACKENDS_EDS_TYPE_BACKEND, FolksBackendsEdsBackendClass))

typedef struct _FolksBackendsEdsBackend FolksBackendsEdsBackend;
typedef struct _FolksBackendsEdsBackendClass FolksBackendsEdsBackendClass;

struct _FolksBackendsEdsBackendFactory {
	GObject parent_instance;
	FolksBackendsEdsBackendFactoryPrivate * priv;
};

struct _FolksBackendsEdsBackendFactoryClass {
	GObjectClass parent_class;
};


extern FolksBackendsEdsBackendFactory* _backend_factory;
FolksBackendsEdsBackendFactory* _backend_factory = NULL;
static gpointer folks_backends_eds_backend_factory_parent_class = NULL;

GType folks_backends_eds_backend_factory_get_type (void) G_GNUC_CONST;
void module_init (FolksBackendStore* backend_store);
FolksBackendsEdsBackendFactory* folks_backends_eds_backend_factory_new (FolksBackendStore* backend_store);
FolksBackendsEdsBackendFactory* folks_backends_eds_backend_factory_construct (GType object_type, FolksBackendStore* backend_store);
void module_finalize (FolksBackendStore* backend_store);
enum  {
	FOLKS_BACKENDS_EDS_BACKEND_FACTORY_DUMMY_PROPERTY
};
FolksBackendsEdsBackend* folks_backends_eds_backend_new (void);
FolksBackendsEdsBackend* folks_backends_eds_backend_construct (GType object_type);
GType folks_backends_eds_backend_get_type (void) G_GNUC_CONST;


/**
 * The eds backend module entry point.
 *
 * @since 0.6.0
 */
void module_init (FolksBackendStore* backend_store) {
	FolksBackendStore* _tmp0_;
	FolksBackendsEdsBackendFactory* _tmp1_;
	g_return_if_fail (backend_store != NULL);
	_tmp0_ = backend_store;
	_tmp1_ = folks_backends_eds_backend_factory_new (_tmp0_);
	_g_object_unref0 (_backend_factory);
	_backend_factory = _tmp1_;
}


/**
 * The eds backend module exit point.
 *
 * @since 0.6.0
 */
void module_finalize (FolksBackendStore* backend_store) {
	g_return_if_fail (backend_store != NULL);
	_g_object_unref0 (_backend_factory);
	_backend_factory = NULL;
}


/**
   * {@inheritDoc}
   */
FolksBackendsEdsBackendFactory* folks_backends_eds_backend_factory_construct (GType object_type, FolksBackendStore* backend_store) {
	FolksBackendsEdsBackendFactory * self = NULL;
	FolksBackendStore* _tmp0_;
	FolksBackendsEdsBackend* _tmp1_;
	FolksBackendsEdsBackend* _tmp2_;
	g_return_val_if_fail (backend_store != NULL, NULL);
	self = (FolksBackendsEdsBackendFactory*) g_object_new (object_type, NULL);
	_tmp0_ = backend_store;
	_tmp1_ = folks_backends_eds_backend_new ();
	_tmp2_ = _tmp1_;
	folks_backend_store_add_backend (_tmp0_, (FolksBackend*) _tmp2_);
	_g_object_unref0 (_tmp2_);
	return self;
}


FolksBackendsEdsBackendFactory* folks_backends_eds_backend_factory_new (FolksBackendStore* backend_store) {
	return folks_backends_eds_backend_factory_construct (FOLKS_BACKENDS_EDS_TYPE_BACKEND_FACTORY, backend_store);
}


static void folks_backends_eds_backend_factory_class_init (FolksBackendsEdsBackendFactoryClass * klass) {
	folks_backends_eds_backend_factory_parent_class = g_type_class_peek_parent (klass);
}


static void folks_backends_eds_backend_factory_instance_init (FolksBackendsEdsBackendFactory * self) {
}


/**
 * A backend factory to create a single {@link Backend}.
 */
GType folks_backends_eds_backend_factory_get_type (void) {
	static volatile gsize folks_backends_eds_backend_factory_type_id__volatile = 0;
	if (g_once_init_enter (&folks_backends_eds_backend_factory_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FolksBackendsEdsBackendFactoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) folks_backends_eds_backend_factory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FolksBackendsEdsBackendFactory), 0, (GInstanceInitFunc) folks_backends_eds_backend_factory_instance_init, NULL };
		GType folks_backends_eds_backend_factory_type_id;
		folks_backends_eds_backend_factory_type_id = g_type_register_static (G_TYPE_OBJECT, "FolksBackendsEdsBackendFactory", &g_define_type_info, 0);
		g_once_init_leave (&folks_backends_eds_backend_factory_type_id__volatile, folks_backends_eds_backend_factory_type_id);
	}
	return folks_backends_eds_backend_factory_type_id__volatile;
}



