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

class QXmlSimpleReaderJBridge : public QXmlSimpleReader
{
public:
	QXmlSimpleReaderJBridge() : QXmlSimpleReader() {}
	~QXmlSimpleReaderJBridge() {QtSupport::qtKeyDeleted(this);}
};


JNIEXPORT void JNICALL
Java_org_kde_qt_QXmlSimpleReader_newQXmlSimpleReader(JNIEnv *env, jobject obj)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QXmlSimpleReaderJBridge());
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QXmlSimpleReader_finalize(JNIEnv *env, jobject obj)
{
	if (QtSupport::allocatedInJavaWorld(env, obj)) {
		delete (QXmlSimpleReader*)QtSupport::getQt(env, obj);
		QtSupport::setQt(env, obj, 0);
	}
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QXmlSimpleReader_feature__Ljava_lang_String_2_3I(JNIEnv *env, jobject obj, jstring name, jintArray ok)
{
static QString * _qstring_name = 0;
	return (jboolean) ((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->feature((QString&) * (QString *) QtSupport::toQString(env, name, &_qstring_name),  (bool*) QtSupport::toIntPtr(env, ok));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QXmlSimpleReader_feature__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring name)
{
static QString * _qstring_name = 0;
	return (jboolean) ((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->feature((QString&) * (QString *) QtSupport::toQString(env, name, &_qstring_name), 0);
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QXmlSimpleReader_setFeature(JNIEnv *env, jobject obj, jstring name, jboolean value)
{
static QString * _qstring_name = 0;
	((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->setFeature((QString&) * (QString *) QtSupport::toQString(env, name, &_qstring_name), (bool) value);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QXmlSimpleReader_hasFeature(JNIEnv *env, jobject obj, jstring name)
{
static QString * _qstring_name = 0;
	return (jboolean) ((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->hasFeature((QString&) * (QString *) QtSupport::toQString(env, name, &_qstring_name));
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QXmlSimpleReader_property__Ljava_lang_String_2_3I(JNIEnv *env, jobject obj, jstring name, jintArray ok)
{
static QString * _qstring_name = 0;
	return (jint) ((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->property((QString&) * (QString *) QtSupport::toQString(env, name, &_qstring_name),  (bool*) QtSupport::toIntPtr(env, ok));
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QXmlSimpleReader_property__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring name)
{
static QString * _qstring_name = 0;
	return (jint) ((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->property((QString&) * (QString *) QtSupport::toQString(env, name, &_qstring_name), 0);
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QXmlSimpleReader_setProperty(JNIEnv *env, jobject obj, jstring name, jint value)
{
static QString * _qstring_name = 0;
	((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->setProperty((QString&) * (QString *) QtSupport::toQString(env, name, &_qstring_name), (void*) value);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QXmlSimpleReader_hasProperty(JNIEnv *env, jobject obj, jstring name)
{
static QString * _qstring_name = 0;
	return (jboolean) ((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->hasProperty((QString&) * (QString *) QtSupport::toQString(env, name, &_qstring_name));
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QXmlSimpleReader_setEntityResolver(JNIEnv *env, jobject obj, jobject handler)
{
	((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->setEntityResolver((QXmlEntityResolver*) QtSupport::getQt(env, handler));
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QXmlSimpleReader_entityResolver(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->entityResolver(), "org.kde.qt.QXmlEntityResolverInterface");
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QXmlSimpleReader_setDTDHandler(JNIEnv *env, jobject obj, jobject handler)
{
	((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->setDTDHandler((QXmlDTDHandler*) QtSupport::getQt(env, handler));
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QXmlSimpleReader_DTDHandler(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->DTDHandler(), "org.kde.qt.QXmlDTDHandlerInterface");
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QXmlSimpleReader_setContentHandler(JNIEnv *env, jobject obj, jobject handler)
{
	((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->setContentHandler((QXmlContentHandler*) QtSupport::getQt(env, handler));
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QXmlSimpleReader_contentHandler(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->contentHandler(), "org.kde.qt.QXmlContentHandlerInterface");
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QXmlSimpleReader_setErrorHandler(JNIEnv *env, jobject obj, jobject handler)
{
	((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->setErrorHandler((QXmlErrorHandler*) QtSupport::getQt(env, handler));
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QXmlSimpleReader_errorHandler(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->errorHandler(), "org.kde.qt.QXmlErrorHandlerInterface");
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QXmlSimpleReader_setLexicalHandler(JNIEnv *env, jobject obj, jobject handler)
{
	((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->setLexicalHandler((QXmlLexicalHandler*) QtSupport::getQt(env, handler));
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QXmlSimpleReader_lexicalHandler(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->lexicalHandler(), "org.kde.qt.QXmlLexicalHandlerInterface");
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QXmlSimpleReader_setDeclHandler(JNIEnv *env, jobject obj, jobject handler)
{
	((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->setDeclHandler((QXmlDeclHandler*) QtSupport::getQt(env, handler));
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QXmlSimpleReader_declHandler(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->declHandler(), "org.kde.qt.QXmlDeclHandlerInterface");
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QXmlSimpleReader_parse__Lorg_kde_qt_QXmlInputSource_2(JNIEnv *env, jobject obj, jobject input)
{
	return (jboolean) ((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->parse((QXmlInputSource&) *(QXmlInputSource *) QtSupport::getQt(env, input));
}

//JNIEXPORT jboolean JNICALL
//Java_org_kde_qt_QXmlSimpleReader_parse__Lorg_kde_qt_QXmlInputSource_2(JNIEnv *env, jobject obj, jobject input)
//{
//	return (jboolean) ((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->parse((QXmlInputSource*) QtSupport::getQt(env, input));
//}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QXmlSimpleReader_parse__Lorg_kde_qt_QXmlInputSource_2Z(JNIEnv *env, jobject obj, jobject input, jboolean incremental)
{
	return (jboolean) ((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->parse((QXmlInputSource*) QtSupport::getQt(env, input), (bool) incremental);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QXmlSimpleReader_parseContinue(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QXmlSimpleReaderJBridge*) QtSupport::getQt(env, obj))->parseContinue();
}

