/* libxml-DomException.c generated by valac 0.28.1, the Vala compiler
 * generated from libxml-DomException.vala, do not modify */

/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
/* DomException.vala
 *
 * Copyright (C) 2011-2013  Richard Schwarting <aquarichy@gmail.com>
 * Copyright (C) 2011  Daniel Espinosa <esodan@gmail.com>
 *
 * 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:
 *      Richard Schwarting <aquarichy@gmail.com>
 *      Daniel Espinosa <esodan@gmail.com>
 */

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


#define GXML_TYPE_DOM_EXCEPTION (gxml_dom_exception_get_type ())

typedef enum  {
	GXML_DOM_EXCEPTION_NONE,
	GXML_DOM_EXCEPTION_INDEX_SIZE,
	GXML_DOM_EXCEPTION_DOMSTRING_SIZE,
	GXML_DOM_EXCEPTION_HIERARCHY_REQUEST,
	GXML_DOM_EXCEPTION_WRONG_DOCUMENT,
	GXML_DOM_EXCEPTION_INVALID_CHARACTER,
	GXML_DOM_EXCEPTION_NO_DATA_ALLOWED,
	GXML_DOM_EXCEPTION_NO_MODIFICATION_ALLOWED,
	GXML_DOM_EXCEPTION_NOT_FOUND,
	GXML_DOM_EXCEPTION_NOT_SUPPORTED,
	GXML_DOM_EXCEPTION_INUSE_ATTRIBUTE,
	GXML_DOM_EXCEPTION_DOM,
	GXML_DOM_EXCEPTION_INVALID_DOC,
	GXML_DOM_EXCEPTION_INVALID_ROOT,
	GXML_DOM_EXCEPTION_NAMESPACE,
	GXML_DOM_EXCEPTION_X_OTHER
} GXmlDomException;


extern GXmlDomException gxml_last_error;
GXmlDomException gxml_last_error = GXML_DOM_EXCEPTION_NONE;

GType gxml_dom_exception_get_type (void) G_GNUC_CONST;
void gxml_warning (GXmlDomException ex, const gchar* message) G_GNUC_DEPRECATED;
void gxml_exception (GXmlDomException ex, const gchar* message);


/**
 * Log DOM exception warnings.
 * 
 * @param exception rised
 * @param message message to log
 */
void gxml_warning (GXmlDomException ex, const gchar* message) {
	GXmlDomException _tmp0_ = 0;
	const gchar* _tmp1_ = NULL;
	g_return_if_fail (message != NULL);
	_tmp0_ = ex;
	_tmp1_ = message;
	gxml_exception (_tmp0_, _tmp1_);
}


/**
 * Log DOM exception warnings.
 * 
 * @param exception rised
 * @param message message to log
 */
void gxml_exception (GXmlDomException ex, const gchar* message) {
	GXmlDomException _tmp0_ = 0;
	g_return_if_fail (message != NULL);
	_tmp0_ = ex;
	gxml_last_error = _tmp0_;
}


/**
 * Describes various error states. For more, see
 * 
 * Version: DOM Level 1 Core<<BR>>
 * URL: [[http://www.w3.org/TR/DOM-Level-1/level-one-core.html#ID-BBACDC08]]
 */
GType gxml_dom_exception_get_type (void) {
	static volatile gsize gxml_dom_exception_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_dom_exception_type_id__volatile)) {
		static const GEnumValue values[] = {{GXML_DOM_EXCEPTION_NONE, "GXML_DOM_EXCEPTION_NONE", "none"}, {GXML_DOM_EXCEPTION_INDEX_SIZE, "GXML_DOM_EXCEPTION_INDEX_SIZE", "index-size"}, {GXML_DOM_EXCEPTION_DOMSTRING_SIZE, "GXML_DOM_EXCEPTION_DOMSTRING_SIZE", "domstring-size"}, {GXML_DOM_EXCEPTION_HIERARCHY_REQUEST, "GXML_DOM_EXCEPTION_HIERARCHY_REQUEST", "hierarchy-request"}, {GXML_DOM_EXCEPTION_WRONG_DOCUMENT, "GXML_DOM_EXCEPTION_WRONG_DOCUMENT", "wrong-document"}, {GXML_DOM_EXCEPTION_INVALID_CHARACTER, "GXML_DOM_EXCEPTION_INVALID_CHARACTER", "invalid-character"}, {GXML_DOM_EXCEPTION_NO_DATA_ALLOWED, "GXML_DOM_EXCEPTION_NO_DATA_ALLOWED", "no-data-allowed"}, {GXML_DOM_EXCEPTION_NO_MODIFICATION_ALLOWED, "GXML_DOM_EXCEPTION_NO_MODIFICATION_ALLOWED", "no-modification-allowed"}, {GXML_DOM_EXCEPTION_NOT_FOUND, "GXML_DOM_EXCEPTION_NOT_FOUND", "not-found"}, {GXML_DOM_EXCEPTION_NOT_SUPPORTED, "GXML_DOM_EXCEPTION_NOT_SUPPORTED", "not-supported"}, {GXML_DOM_EXCEPTION_INUSE_ATTRIBUTE, "GXML_DOM_EXCEPTION_INUSE_ATTRIBUTE", "inuse-attribute"}, {GXML_DOM_EXCEPTION_DOM, "GXML_DOM_EXCEPTION_DOM", "dom"}, {GXML_DOM_EXCEPTION_INVALID_DOC, "GXML_DOM_EXCEPTION_INVALID_DOC", "invalid-doc"}, {GXML_DOM_EXCEPTION_INVALID_ROOT, "GXML_DOM_EXCEPTION_INVALID_ROOT", "invalid-root"}, {GXML_DOM_EXCEPTION_NAMESPACE, "GXML_DOM_EXCEPTION_NAMESPACE", "namespace"}, {GXML_DOM_EXCEPTION_X_OTHER, "GXML_DOM_EXCEPTION_X_OTHER", "x-other"}, {0, NULL, NULL}};
		GType gxml_dom_exception_type_id;
		gxml_dom_exception_type_id = g_enum_register_static ("GXmlDomException", values);
		g_once_init_leave (&gxml_dom_exception_type_id__volatile, gxml_dom_exception_type_id);
	}
	return gxml_dom_exception_type_id__volatile;
}



