/***************************************************************************
                            KStartupInfoId.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 <kstartupinfo.h>
#include <qstring.h>
#include <qcstring.h>

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

class KStartupInfoIdJBridge : public KStartupInfoId
{
public:
	KStartupInfoIdJBridge() : KStartupInfoId() {}
	KStartupInfoIdJBridge(const KStartupInfoId& data) : KStartupInfoId(data) {}
	~KStartupInfoIdJBridge() {QtSupport::qtKeyDeleted(this);}
};


JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KStartupInfoId_none(JNIEnv *env, jobject obj)
{
	return (jboolean) ((KStartupInfoId*) QtSupport::getQt(env, obj))->none();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KStartupInfoId_initId__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring identifier)
{
static QCString * _qcstring_identifier = 0;
	((KStartupInfoId*) QtSupport::getQt(env, obj))->initId((QCString&) * (QCString *) QtSupport::toQCString(env, identifier, &_qcstring_identifier));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KStartupInfoId_initId__(JNIEnv *env, jobject obj)
{
	((KStartupInfoId*) QtSupport::getQt(env, obj))->initId("");
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KStartupInfoId_id(JNIEnv *env, jobject obj)
{
	QCString  _qcstring;
	_qcstring = ((KStartupInfoId*) QtSupport::getQt(env, obj))->id();
	return QtSupport::fromQCString(env, &_qcstring);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KStartupInfoId_setupStartupEnv(JNIEnv *env, jobject obj)
{
	return (jboolean) ((KStartupInfoId*) QtSupport::getQt(env, obj))->setupStartupEnv();
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KStartupInfoId_newKStartupInfoId__Lorg_kde_koala_KStartupInfoId_2(JNIEnv *env, jobject obj, jobject data)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KStartupInfoIdJBridge((KStartupInfoId&) *(KStartupInfoId *) QtSupport::getQt(env, data)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KStartupInfoId_dispose(JNIEnv *env, jobject obj)
{
	Java_org_kde_koala_KStartupInfoId_finalize(env, obj);
	return;
}

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

