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

/* resourcelocator.vala
 *
 * Copyright (C) 2008-2009 Florian Brosch
 *
 * 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, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Florian Brosch <flo.brosch@gmail.com>
 */

#include <glib.h>
#include <glib-object.h>
#include "valadoc.h"
#include <stdlib.h>
#include <string.h>

enum  {
	VALADOC_IMPORTER_DOCUMENTATION_IMPORTER_0_PROPERTY,
	VALADOC_IMPORTER_DOCUMENTATION_IMPORTER_FILE_EXTENSION_PROPERTY,
	VALADOC_IMPORTER_DOCUMENTATION_IMPORTER_NUM_PROPERTIES
};
static GParamSpec* valadoc_importer_documentation_importer_properties[VALADOC_IMPORTER_DOCUMENTATION_IMPORTER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _valadoc_api_tree_unref0(var) ((var == NULL) ? NULL : (var = (valadoc_api_tree_unref (var), NULL)))


static gpointer valadoc_importer_documentation_importer_parent_class = NULL;
static ValadocResourceLocatorIface * valadoc_importer_documentation_importer_valadoc_resource_locator_parent_iface = NULL;

static gchar* valadoc_importer_documentation_importer_real_resolve (ValadocImporterDocumentationImporter* self, const gchar* path);
static void valadoc_importer_documentation_importer_real_process (ValadocImporterDocumentationImporter* self, const gchar* filename);
static void valadoc_importer_documentation_importer_finalize (GObject * obj);
static void _vala_valadoc_importer_documentation_importer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static gpointer _valadoc_api_tree_ref0 (gpointer self) {
	return self ? valadoc_api_tree_ref (self) : NULL;
}


ValadocImporterDocumentationImporter* valadoc_importer_documentation_importer_construct (GType object_type, ValadocApiTree* tree, ValadocModuleLoader* modules, ValadocSettings* settings) {
	ValadocImporterDocumentationImporter * self = NULL;
	ValadocSettings* _tmp0_;
	ValadocSettings* _tmp1_;
	ValadocApiTree* _tmp2_;
	ValadocApiTree* _tmp3_;
	g_return_val_if_fail (tree != NULL, NULL);
	g_return_val_if_fail (modules != NULL, NULL);
	g_return_val_if_fail (settings != NULL, NULL);
	self = (ValadocImporterDocumentationImporter*) g_object_new (object_type, NULL);
	_tmp0_ = settings;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->settings);
	self->settings = _tmp1_;
	_g_object_unref0 (self->modules);
	self->modules = NULL;
	_tmp2_ = tree;
	_tmp3_ = _valadoc_api_tree_ref0 (_tmp2_);
	_valadoc_api_tree_unref0 (self->tree);
	self->tree = _tmp3_;
	return self;
}


static gchar* valadoc_importer_documentation_importer_real_resolve (ValadocImporterDocumentationImporter* self, const gchar* path) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (path != NULL, NULL);
	_tmp0_ = path;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


gchar* valadoc_importer_documentation_importer_resolve (ValadocImporterDocumentationImporter* self, const gchar* path) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALADOC_IMPORTER_DOCUMENTATION_IMPORTER_GET_CLASS (self)->resolve (self, path);
}


static void valadoc_importer_documentation_importer_real_process (ValadocImporterDocumentationImporter* self, const gchar* filename) {
	g_critical ("Type `%s' does not implement abstract method `valadoc_importer_documentation_importer_process'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}


void valadoc_importer_documentation_importer_process (ValadocImporterDocumentationImporter* self, const gchar* filename) {
	g_return_if_fail (self != NULL);
	VALADOC_IMPORTER_DOCUMENTATION_IMPORTER_GET_CLASS (self)->process (self, filename);
}


const gchar* valadoc_importer_documentation_importer_get_file_extension (ValadocImporterDocumentationImporter* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return VALADOC_IMPORTER_DOCUMENTATION_IMPORTER_GET_CLASS (self)->get_file_extension (self);
}


static void valadoc_importer_documentation_importer_class_init (ValadocImporterDocumentationImporterClass * klass) {
	valadoc_importer_documentation_importer_parent_class = g_type_class_peek_parent (klass);
	((ValadocImporterDocumentationImporterClass *) klass)->resolve = (gchar* (*) (ValadocImporterDocumentationImporter *, const gchar*)) valadoc_importer_documentation_importer_real_resolve;
	((ValadocImporterDocumentationImporterClass *) klass)->process = (void (*) (ValadocImporterDocumentationImporter *, const gchar*)) valadoc_importer_documentation_importer_real_process;
	G_OBJECT_CLASS (klass)->get_property = _vala_valadoc_importer_documentation_importer_get_property;
	G_OBJECT_CLASS (klass)->finalize = valadoc_importer_documentation_importer_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_IMPORTER_DOCUMENTATION_IMPORTER_FILE_EXTENSION_PROPERTY, valadoc_importer_documentation_importer_properties[VALADOC_IMPORTER_DOCUMENTATION_IMPORTER_FILE_EXTENSION_PROPERTY] = g_param_spec_string ("file-extension", "file-extension", "file-extension", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void valadoc_importer_documentation_importer_valadoc_resource_locator_interface_init (ValadocResourceLocatorIface * iface) {
	valadoc_importer_documentation_importer_valadoc_resource_locator_parent_iface = g_type_interface_peek_parent (iface);
	iface->resolve = (gchar* (*) (ValadocResourceLocator *, const gchar*)) valadoc_importer_documentation_importer_resolve;
}


static void valadoc_importer_documentation_importer_instance_init (ValadocImporterDocumentationImporter * self) {
}


static void valadoc_importer_documentation_importer_finalize (GObject * obj) {
	ValadocImporterDocumentationImporter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALADOC_IMPORTER_TYPE_DOCUMENTATION_IMPORTER, ValadocImporterDocumentationImporter);
	_g_object_unref0 (self->modules);
	_g_object_unref0 (self->settings);
	_valadoc_api_tree_unref0 (self->tree);
	G_OBJECT_CLASS (valadoc_importer_documentation_importer_parent_class)->finalize (obj);
}


GType valadoc_importer_documentation_importer_get_type (void) {
	static volatile gsize valadoc_importer_documentation_importer_type_id__volatile = 0;
	if (g_once_init_enter (&valadoc_importer_documentation_importer_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValadocImporterDocumentationImporterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_importer_documentation_importer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValadocImporterDocumentationImporter), 0, (GInstanceInitFunc) valadoc_importer_documentation_importer_instance_init, NULL };
		static const GInterfaceInfo valadoc_resource_locator_info = { (GInterfaceInitFunc) valadoc_importer_documentation_importer_valadoc_resource_locator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType valadoc_importer_documentation_importer_type_id;
		valadoc_importer_documentation_importer_type_id = g_type_register_static (G_TYPE_OBJECT, "ValadocImporterDocumentationImporter", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_type_add_interface_static (valadoc_importer_documentation_importer_type_id, VALADOC_TYPE_RESOURCE_LOCATOR, &valadoc_resource_locator_info);
		g_once_init_leave (&valadoc_importer_documentation_importer_type_id__volatile, valadoc_importer_documentation_importer_type_id);
	}
	return valadoc_importer_documentation_importer_type_id__volatile;
}


static void _vala_valadoc_importer_documentation_importer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ValadocImporterDocumentationImporter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VALADOC_IMPORTER_TYPE_DOCUMENTATION_IMPORTER, ValadocImporterDocumentationImporter);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



