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

class QXmlAttributesJBridge : public QXmlAttributes
{
public:
	QXmlAttributesJBridge() : QXmlAttributes() {}
	~QXmlAttributesJBridge() {QtSupport::qtKeyDeleted(this);}
};


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

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

JNIEXPORT jint JNICALL
Java_org_kde_qt_QXmlAttributes_index__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring qName)
{
static QString * _qstring_qName = 0;
	return (jint) ((QXmlAttributesJBridge*) QtSupport::getQt(env, obj))->index((QString&) * (QString *) QtSupport::toQString(env, qName, &_qstring_qName));
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QXmlAttributes_index__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring uri, jstring localPart)
{
static QString * _qstring_localPart = 0;
static QString * _qstring_uri = 0;
	return (jint) ((QXmlAttributesJBridge*) QtSupport::getQt(env, obj))->index((QString&) * (QString *) QtSupport::toQString(env, uri, &_qstring_uri), (QString&) * (QString *) QtSupport::toQString(env, localPart, &_qstring_localPart));
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QXmlAttributes_length(JNIEnv *env, jobject obj)
{
	return (jint) ((QXmlAttributesJBridge*) QtSupport::getQt(env, obj))->length();
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QXmlAttributes_count(JNIEnv *env, jobject obj)
{
	return (jint) ((QXmlAttributesJBridge*) QtSupport::getQt(env, obj))->count();
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QXmlAttributes_localName(JNIEnv *env, jobject obj, jint index)
{
	QString  _qstring;
	_qstring = ((QXmlAttributesJBridge*) QtSupport::getQt(env, obj))->localName((int) index);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QXmlAttributes_qName(JNIEnv *env, jobject obj, jint index)
{
	QString  _qstring;
	_qstring = ((QXmlAttributesJBridge*) QtSupport::getQt(env, obj))->qName((int) index);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QXmlAttributes_uri(JNIEnv *env, jobject obj, jint index)
{
	QString  _qstring;
	_qstring = ((QXmlAttributesJBridge*) QtSupport::getQt(env, obj))->uri((int) index);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QXmlAttributes_type__I(JNIEnv *env, jobject obj, jint index)
{
	QString  _qstring;
	_qstring = ((QXmlAttributesJBridge*) QtSupport::getQt(env, obj))->type((int) index);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QXmlAttributes_type__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring qName)
{
	QString  _qstring;
static QString * _qstring_qName = 0;
	_qstring = ((QXmlAttributesJBridge*) QtSupport::getQt(env, obj))->type((QString&) * (QString *) QtSupport::toQString(env, qName, &_qstring_qName));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QXmlAttributes_type__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring uri, jstring localName)
{
	QString  _qstring;
static QString * _qstring_localName = 0;
static QString * _qstring_uri = 0;
	_qstring = ((QXmlAttributesJBridge*) QtSupport::getQt(env, obj))->type((QString&) * (QString *) QtSupport::toQString(env, uri, &_qstring_uri), (QString&) * (QString *) QtSupport::toQString(env, localName, &_qstring_localName));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QXmlAttributes_value__I(JNIEnv *env, jobject obj, jint index)
{
	QString  _qstring;
	_qstring = ((QXmlAttributesJBridge*) QtSupport::getQt(env, obj))->value((int) index);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QXmlAttributes_value__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring qName)
{
	QString  _qstring;
static QString * _qstring_qName = 0;
	_qstring = ((QXmlAttributesJBridge*) QtSupport::getQt(env, obj))->value((QString&) * (QString *) QtSupport::toQString(env, qName, &_qstring_qName));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QXmlAttributes_value__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring uri, jstring localName)
{
	QString  _qstring;
static QString * _qstring_localName = 0;
static QString * _qstring_uri = 0;
	_qstring = ((QXmlAttributesJBridge*) QtSupport::getQt(env, obj))->value((QString&) * (QString *) QtSupport::toQString(env, uri, &_qstring_uri), (QString&) * (QString *) QtSupport::toQString(env, localName, &_qstring_localName));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QXmlAttributes_clear(JNIEnv *env, jobject obj)
{
	((QXmlAttributesJBridge*) QtSupport::getQt(env, obj))->clear();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QXmlAttributes_append(JNIEnv *env, jobject obj, jstring qName, jstring uri, jstring localPart, jstring value)
{
static QString * _qstring_value = 0;
static QString * _qstring_localPart = 0;
static QString * _qstring_uri = 0;
static QString * _qstring_qName = 0;
	((QXmlAttributesJBridge*) QtSupport::getQt(env, obj))->append((QString&) * (QString *) QtSupport::toQString(env, qName, &_qstring_qName), (QString&) * (QString *) QtSupport::toQString(env, uri, &_qstring_uri), (QString&) * (QString *) QtSupport::toQString(env, localPart, &_qstring_localPart), (QString&) * (QString *) QtSupport::toQString(env, value, &_qstring_value));
	return;
}

