/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
 *  ianjuta-file-manager.c -- Autogenerated from libanjuta.idl
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program 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 General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

/**
 * SECTION:ianjuta-file-manager
 * @title: IAnjutaFileManager
 * @short_description: File manager plugin
 * @see_also:
 * @stability: Unstable
 * @include: libanjuta/interfaces/ianjuta-file-manager.h
 *
 */

#include "ianjuta-file-manager.h"
#include "libanjuta-iface-marshallers.h"

GQuark 
ianjuta_file_manager_error_quark (void)
{
	static GQuark quark = 0;
	
	if (quark == 0) {
		quark = g_quark_from_static_string ("ianjuta-file-manager-quark");
	}
	
	return quark;
}

/**
* ianjuta_file_manager_get_selected:
* @obj: Self
* @err: Error propagation and reporting.
*
* fixme
*/
GFile*
ianjuta_file_manager_get_selected (IAnjutaFileManager *obj, GError **err)
{
	g_return_val_if_fail (IANJUTA_IS_FILE_MANAGER(obj), NULL);
	return IANJUTA_FILE_MANAGER_GET_IFACE (obj)->get_selected (obj, err);
}

/* Default implementation */
static GFile*
ianjuta_file_manager_get_selected_default (IAnjutaFileManager *obj, GError **err)
{
	g_return_val_if_reached (NULL);
}

/**
* ianjuta_file_manager_set_root:
* @obj: Self
* @root_uri: fixme
* @err: Error propagation and reporting.
*
* fixme
*/
void
ianjuta_file_manager_set_root (IAnjutaFileManager *obj, const gchar *root_uri, GError **err)
{
	g_return_if_fail (IANJUTA_IS_FILE_MANAGER(obj));
	IANJUTA_FILE_MANAGER_GET_IFACE (obj)->set_root (obj, root_uri, err);
}

/* Default implementation */
static void
ianjuta_file_manager_set_root_default (IAnjutaFileManager *obj, const gchar *root_uri, GError **err)
{
	g_return_if_reached ();
}

/**
* ianjuta_file_manager_set_selected:
* @obj: Self
* @file: File to select
* @err: Error propagation and reporting.
*
* fixme.
*/
void
ianjuta_file_manager_set_selected (IAnjutaFileManager *obj, GFile* file, GError **err)
{
	g_return_if_fail (IANJUTA_IS_FILE_MANAGER(obj));
	IANJUTA_FILE_MANAGER_GET_IFACE (obj)->set_selected (obj, file, err);
}

/* Default implementation */
static void
ianjuta_file_manager_set_selected_default (IAnjutaFileManager *obj, GFile* file, GError **err)
{
	g_return_if_reached ();
}

static void
ianjuta_file_manager_base_init (IAnjutaFileManagerIface* klass)
{
	static gboolean initialized = FALSE;

	klass->get_selected = ianjuta_file_manager_get_selected_default;
	klass->set_root = ianjuta_file_manager_set_root_default;
	klass->set_selected = ianjuta_file_manager_set_selected_default;
	
	if (!initialized) {

		/**
		* IAnjutaFileManager::section-changed:
		* @obj: Self
		* @err: Error propagation and reporting.
		*
		* fixme
		*/
		g_signal_new ("section-changed",
			IANJUTA_TYPE_FILE_MANAGER,
			G_SIGNAL_RUN_LAST,
			G_STRUCT_OFFSET (IAnjutaFileManagerIface, section_changed),
			NULL, NULL,
			libanjuta_iface_cclosure_marshal_VOID__OBJECT,
			G_TYPE_NONE,
			1,
			G_TYPE_FILE);


		initialized = TRUE;
	}
}

GType
ianjuta_file_manager_get_type (void)
{
	static GType type = 0;
	if (!type) {
		static const GTypeInfo info = {
			sizeof (IAnjutaFileManagerIface),
			(GBaseInitFunc) ianjuta_file_manager_base_init,
			NULL, 
			NULL,
			NULL,
			NULL,
			0,
			0,
			NULL
		};
		type = g_type_register_static (G_TYPE_INTERFACE, "IAnjutaFileManager", &info, 0);
		g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
	}
	return type;			
}
