/***************************************************************************
                            KAboutData.cpp -  description
                             -------------------
    begin                : Sun Jan 27 16:22:17 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Sun Jan 27 16:22:17 2002, 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 <kaboutdata.h>
#include <qstring.h>
#include <qcstring.h>

#include <qtjava/QtSupport.h>
#include <kdejava/KDESupport.h>
#include <kdejava/KAboutData.h>

class KAboutDataJBridge : public KAboutData
{
public:
	KAboutDataJBridge(const char* appName, const char* programName, const char* version, const char* shortDescription, int licenseType, const char* copyrightStatement, const char* text, const char* homePageAddress, const char* bugsEmailAddress) : KAboutData(appName, programName, version, shortDescription, licenseType, copyrightStatement, text, homePageAddress, bugsEmailAddress) {}
	~KAboutDataJBridge() {QtSupport::qtKeyDeleted(this);}
};


JNIEXPORT void JNICALL
Java_org_kde_koala_KAboutData_newKAboutData__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2ILjava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring appName, jstring programName, jstring version, jstring shortDescription, jint licenseType, jstring copyrightStatement, jstring text, jstring homePageAddress, jstring bugsEmailAddress)
{
static QCString * _qstring_bugsEmailAddress = 0;
static QCString * _qstring_homePageAddress = 0;
static QCString * _qstring_text = 0;
static QCString * _qstring_copyrightStatement = 0;
static QCString * _qstring_shortDescription = 0;
static QCString * _qstring_version = 0;
static QCString * _qstring_programName = 0;
static QCString * _qstring_appName = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KAboutDataJBridge((char*) QtSupport::toCharString(env, appName, &_qstring_appName), (char*) QtSupport::toCharString(env, programName, &_qstring_programName), (char*) QtSupport::toCharString(env, version, &_qstring_version), (char*) QtSupport::toCharString(env, shortDescription, &_qstring_shortDescription), (int) licenseType, (char*) QtSupport::toCharString(env, copyrightStatement, &_qstring_copyrightStatement), (char*) QtSupport::toCharString(env, text, &_qstring_text), (char*) QtSupport::toCharString(env, homePageAddress, &_qstring_homePageAddress), (char*) QtSupport::toCharString(env, bugsEmailAddress, &_qstring_bugsEmailAddress)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KAboutData_newKAboutData__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring appName, jstring programName, jstring version)
{
static QCString * _qstring_version = 0;
static QCString * _qstring_programName = 0;
static QCString * _qstring_appName = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KAboutDataJBridge((char*) QtSupport::toCharString(env, appName, &_qstring_appName), (char*) QtSupport::toCharString(env, programName, &_qstring_programName), (char*) QtSupport::toCharString(env, version, &_qstring_version), 0, KAboutData::License_Unknown, 0, 0, 0, "submit@bugs.kde.org"));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KAboutData_dispose(JNIEnv *env, jobject obj)
{
	Java_org_kde_koala_KAboutData_finalize(env, obj);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KAboutData_isDisposed(JNIEnv *env, jobject obj)
{
	return (QtSupport::getQt(env, obj) == 0);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KAboutData_addAuthor__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring name, jstring task, jstring emailAddress, jstring webAddress)
{
static QCString * _qstring_webAddress = 0;
static QCString * _qstring_emailAddress = 0;
static QCString * _qstring_task = 0;
static QCString * _qstring_name = 0;
	((KAboutData*) QtSupport::getQt(env, obj))->addAuthor((char*) QtSupport::toCharString(env, name, &_qstring_name), (char*) QtSupport::toCharString(env, task, &_qstring_task), (char*) QtSupport::toCharString(env, emailAddress, &_qstring_emailAddress), (char*) QtSupport::toCharString(env, webAddress, &_qstring_webAddress));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KAboutData_addAuthor__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring name)
{
static QCString * _qstring_name = 0;
	((KAboutData*) QtSupport::getQt(env, obj))->addAuthor((char*) QtSupport::toCharString(env, name, &_qstring_name), 0, 0, 0);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KAboutData_addCredit__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring name, jstring task, jstring emailAddress, jstring webAddress)
{
static QCString * _qstring_webAddress = 0;
static QCString * _qstring_emailAddress = 0;
static QCString * _qstring_task = 0;
static QCString * _qstring_name = 0;
	((KAboutData*) QtSupport::getQt(env, obj))->addCredit((char*) QtSupport::toCharString(env, name, &_qstring_name), (char*) QtSupport::toCharString(env, task, &_qstring_task), (char*) QtSupport::toCharString(env, emailAddress, &_qstring_emailAddress), (char*) QtSupport::toCharString(env, webAddress, &_qstring_webAddress));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KAboutData_addCredit__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring name)
{
static QCString * _qstring_name = 0;
	((KAboutData*) QtSupport::getQt(env, obj))->addCredit((char*) QtSupport::toCharString(env, name, &_qstring_name), 0, 0, 0);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KAboutData_setTranslator(JNIEnv *env, jobject obj, jstring name, jstring emailAddress)
{
static QCString * _qstring_emailAddress = 0;
static QCString * _qstring_name = 0;
	((KAboutData*) QtSupport::getQt(env, obj))->setTranslator((char*) QtSupport::toCharString(env, name, &_qstring_name), (char*) QtSupport::toCharString(env, emailAddress, &_qstring_emailAddress));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KAboutData_setLicenseText(JNIEnv *env, jobject obj, jstring license)
{
static QCString * _qstring_license = 0;
	((KAboutData*) QtSupport::getQt(env, obj))->setLicenseText((char*) QtSupport::toCharString(env, license, &_qstring_license));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KAboutData_setLicenseTextFile(JNIEnv *env, jobject obj, jstring file)
{
static QString * _qstring_file = 0;
	((KAboutData*) QtSupport::getQt(env, obj))->setLicenseTextFile((QString&) * (QString *) QtSupport::toQString(env, file, &_qstring_file));
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KAboutData_appName(JNIEnv *env, jobject obj)
{
	const char * _qcstring;
	_qcstring = (const char *)((KAboutData*) QtSupport::getQt(env, obj))->appName();
	return QtSupport::fromCharString(env, (char *) _qcstring);
}

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

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

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

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

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

//JNIEXPORT  JNICALL
//Java_org_kde_koala_KAboutData_authors(JNIEnv *env, jobject obj)
//{
//	return () ((KAboutData*) QtSupport::getQt(env, obj))->authors();
//}

//JNIEXPORT  JNICALL
//Java_org_kde_koala_KAboutData_credits(JNIEnv *env, jobject obj)
//{
//	return () ((KAboutData*) QtSupport::getQt(env, obj))->credits();
//}

//JNIEXPORT  JNICALL
//Java_org_kde_koala_KAboutData_translators(JNIEnv *env, jobject obj)
//{
//	return () ((KAboutData*) QtSupport::getQt(env, obj))->translators();
//}

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

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

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

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KAboutData_aboutTranslationTeam(JNIEnv *env, jclass obj)
{
	QString  _qstring;
	_qstring = KAboutDataJBridge::aboutTranslationTeam();
	return QtSupport::fromQString(env, &_qstring);
}

