//Auto-generated by kalyptus. DO NOT EDIT.
#include <qlibrary.h>
#include <qstring.h>

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

class QLibraryJBridge : public QLibrary
{
public:
	QLibraryJBridge(const QString& arg1) : QLibrary(arg1) {};
	~QLibraryJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QLibrary_autoUnload(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((QLibrary*) QtSupport::getQt(env, obj))->autoUnload();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QLibrary_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_qt_QLibrary_finalize(env, obj);
	return;
}

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

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

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QLibrary_isLoaded(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((QLibrary*) QtSupport::getQt(env, obj))->isLoaded();
	return xret;
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QLibrary_load(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((QLibrary*) QtSupport::getQt(env, obj))->load();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QLibrary_newQLibrary(JNIEnv* env, jobject obj, jstring filename)
{
static QString* _qstring_filename = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QLibraryJBridge((const QString&)*(QString*) QtSupport::toQString(env, filename, &_qstring_filename)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QLibrary_setAutoUnload(JNIEnv* env, jobject obj, jboolean enable)
{
	((QLibrary*) QtSupport::getQt(env, obj))->setAutoUnload((bool) enable);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QLibrary_unload(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((QLibrary*) QtSupport::getQt(env, obj))->unload();
	return xret;
}

