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

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

class KShredJBridge : public KShred
{
public:
	KShredJBridge(QString arg1) : KShred(arg1) {};
	~KShredJBridge() {QtSupport::qtKeyDeleted(this);}
	void removeChild(QObject* arg1) {
		if (!QtSupport::eventDelegate(this,"removeChild",(void*)arg1,"org.kde.qt.QObject")) {
			QObject::removeChild(arg1);
		}
		return;
	}
	void customEvent(QCustomEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"customEvent",(void*)arg1,"org.kde.qt.QCustomEvent")) {
			QObject::customEvent(arg1);
		}
		return;
	}
	void timerEvent(QTimerEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"timerEvent",(void*)arg1,"org.kde.qt.QTimerEvent")) {
			QObject::timerEvent(arg1);
		}
		return;
	}
	void childEvent(QChildEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"childEvent",(void*)arg1,"org.kde.qt.QChildEvent")) {
			QObject::childEvent(arg1);
		}
		return;
	}
	void insertChild(QObject* arg1) {
		if (!QtSupport::eventDelegate(this,"insertChild",(void*)arg1,"org.kde.qt.QObject")) {
			QObject::insertChild(arg1);
		}
		return;
	}
	bool eventFilter(QObject* object,QEvent* event) {
		if (!QtSupport::eventFilterDelegate(this,"org.kde.koala.KShred",object,event)) {
			return QObject::eventFilter(object,event);
		} else {
			return TRUE;
		}
	}
};

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KShred_className(JNIEnv* env, jobject obj)
{
	const char* _qstring;
	_qstring = ((KShred*) QtSupport::getQt(env, obj))->className();
	return QtSupport::fromCharString(env, (char *) _qstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KShred_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KShred_finalize(env, obj);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KShred_fill0s(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KShred*) QtSupport::getQt(env, obj))->fill0s();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KShred_fill1s(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KShred*) QtSupport::getQt(env, obj))->fill1s();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KShred_fillbyte(JNIEnv* env, jobject obj, jint arg1)
{
	jboolean xret = (jboolean) ((KShred*) QtSupport::getQt(env, obj))->fillbyte((unsigned int) arg1);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KShred_fillpattern(JNIEnv* env, jobject obj, jshort pattern, jint size)
{
	jboolean xret = (jboolean) ((KShred*) QtSupport::getQt(env, obj))->fillpattern((unsigned char*) pattern, (unsigned int) size);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KShred_fillrandom(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KShred*) QtSupport::getQt(env, obj))->fillrandom();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KShred_finalize(JNIEnv* env, jobject obj)
{
	if (QtSupport::allocatedInJavaWorld(env, obj) && ((KShred*)QtSupport::getQt(env, obj))->parent() == 0) {
		delete (KShred*)QtSupport::getQt(env, obj);
		QtSupport::setQt(env, obj, 0);
	}
	return;
}

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

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KShred_metaObject(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KShred*) QtSupport::getQt(env, obj))->metaObject(), "org.kde.qt.QMetaObject");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KShred_newKShred(JNIEnv* env, jobject obj, jstring fileName)
{
static QString* _qstring_fileName = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KShredJBridge((QString)*(QString*) QtSupport::toQString(env, fileName, &_qstring_fileName)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KShred_shred__(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KShred*) QtSupport::getQt(env, obj))->shred();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KShred_shred__Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring fileName)
{
	(void) cls;
static QString* _qstring_fileName = 0;
	jboolean xret = (jboolean) KShredJBridge::shred((QString)*(QString*) QtSupport::toQString(env, fileName, &_qstring_fileName));
	return xret;
}

