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

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

class QIODeviceSourceJBridge : public QIODeviceSource
{
public:
	QIODeviceSourceJBridge(QIODevice* arg1,int arg2) : QIODeviceSource(arg1,arg2) {};
	QIODeviceSourceJBridge(QIODevice* arg1) : QIODeviceSource(arg1) {};
	~QIODeviceSourceJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT void JNICALL
Java_org_kde_qt_QIODeviceSource_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_qt_QIODeviceSource_finalize(env, obj);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QIODeviceSource_enableRewind(JNIEnv* env, jobject obj, jboolean on)
{
	((QIODeviceSource*) QtSupport::getQt(env, obj))->enableRewind((bool) on);
	return;
}

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

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

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QIODeviceSource_newQIODeviceSource__Lorg_kde_qt_QIODeviceInterface_2I(JNIEnv* env, jobject obj, jobject arg1, jint bufsize)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QIODeviceSourceJBridge((QIODevice*) QtSupport::getQt(env, arg1), (int) bufsize));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QIODeviceSource_readyToSend(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((QIODeviceSource*) QtSupport::getQt(env, obj))->readyToSend();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QIODeviceSource_rewind(JNIEnv* env, jobject obj)
{
	((QIODeviceSource*) QtSupport::getQt(env, obj))->rewind();
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QIODeviceSource_rewindable(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((QIODeviceSource*) QtSupport::getQt(env, obj))->rewindable();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QIODeviceSource_sendTo(JNIEnv* env, jobject obj, jobject sink, jint n)
{
	((QIODeviceSource*) QtSupport::getQt(env, obj))->sendTo((QDataSink*) QtSupport::getQt(env, sink), (int) n);
	return;
}

