/***************************************************************************
                            QXmlParseException.cpp -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 17:05:56 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
***************************************************************************/

#define _BOOL_H_
#include <qxml.h>
#include <qstring.h>
#include <qcstring.h>

#include <qtjava/QtSupport.h>
#include <qtjava/QXmlParseException.h>

class QXmlParseExceptionJBridge : public QXmlParseException
{
public:
	QXmlParseExceptionJBridge(const QString& name, int c, int l, const QString& p, const QString& s) : QXmlParseException(name, c, l, p, s) {}
};


JNIEXPORT void JNICALL
Java_org_kde_qt_QXmlParseException_newQXmlParseException__Ljava_lang_String_2IILjava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring name, jint c, jint l, jstring p, jstring s)
{
static QString * _qstring_s = 0;
static QString * _qstring_p = 0;
static QString * _qstring_name = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QXmlParseExceptionJBridge((QString&) * (QString *) QtSupport::toQString(env, name, &_qstring_name), (int) c, (int) l, (QString&) * (QString *) QtSupport::toQString(env, p, &_qstring_p), (QString&) * (QString *) QtSupport::toQString(env, s, &_qstring_s)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QXmlParseException_newQXmlParseException__(JNIEnv *env, jobject obj)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QXmlParseExceptionJBridge("", -1, -1, "", ""));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QXmlParseException_columnNumber(JNIEnv *env, jobject obj)
{
	return (jint) ((QXmlParseExceptionJBridge*) QtSupport::getQt(env, obj))->columnNumber();
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QXmlParseException_lineNumber(JNIEnv *env, jobject obj)
{
	return (jint) ((QXmlParseExceptionJBridge*) QtSupport::getQt(env, obj))->lineNumber();
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QXmlParseException_publicId(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((QXmlParseExceptionJBridge*) QtSupport::getQt(env, obj))->publicId();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QXmlParseException_systemId(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((QXmlParseExceptionJBridge*) QtSupport::getQt(env, obj))->systemId();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QXmlParseException_message(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((QXmlParseExceptionJBridge*) QtSupport::getQt(env, obj))->message();
	return QtSupport::fromQString(env, &_qstring);
}

