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

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

class QHostAddressJBridge : public QHostAddress
{
public:
	QHostAddressJBridge() : QHostAddress() {};
	QHostAddressJBridge(Q_UINT32 arg1) : QHostAddress(arg1) {};
	QHostAddressJBridge(Q_UINT8* arg1) : QHostAddress(arg1) {};
	QHostAddressJBridge(const QString& arg1) : QHostAddress(arg1) {};
	QHostAddressJBridge(const QHostAddress& arg1) : QHostAddress(arg1) {};
	~QHostAddressJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT void JNICALL
Java_org_kde_qt_QHostAddress_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_qt_QHostAddress_finalize(env, obj);
	return;
}

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

JNIEXPORT jint JNICALL
Java_org_kde_qt_QHostAddress_ip4Addr(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((QHostAddress*) QtSupport::getQt(env, obj))->ip4Addr();
	return xret;
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QHostAddress_isIPv4Address(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((QHostAddress*) QtSupport::getQt(env, obj))->isIPv4Address();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QHostAddress_isIPv6Address(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((QHostAddress*) QtSupport::getQt(env, obj))->isIPv6Address();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QHostAddress_isIp4Addr(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((QHostAddress*) QtSupport::getQt(env, obj))->isIp4Addr();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QHostAddress_isNull(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((QHostAddress*) QtSupport::getQt(env, obj))->isNull();
	return xret;
}

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QHostAddress_newQHostAddress__I(JNIEnv* env, jobject obj, jint ip4Addr)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QHostAddressJBridge((Q_UINT32) ip4Addr));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QHostAddress_newQHostAddress__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring address)
{
static QString* _qstring_address = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QHostAddressJBridge((const QString&)*(QString*) QtSupport::toQString(env, address, &_qstring_address)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QHostAddress_newQHostAddress__Lorg_kde_qt_QHostAddress_2(JNIEnv* env, jobject obj, jobject arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QHostAddressJBridge((const QHostAddress&)*(const QHostAddress*) QtSupport::getQt(env, arg1)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QHostAddress_newQHostAddress__S(JNIEnv* env, jobject obj, jshort ip6Addr)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QHostAddressJBridge((Q_UINT8*) ip6Addr));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QHostAddress_op_1equals(JNIEnv* env, jobject obj, jobject arg1)
{
	jboolean xret = (jboolean) ((QHostAddress*) QtSupport::getQt(env, obj))->operator==((const QHostAddress&)*(const QHostAddress*) QtSupport::getQt(env, arg1));
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QHostAddress_setAddress__I(JNIEnv* env, jobject obj, jint ip4Addr)
{
	((QHostAddress*) QtSupport::getQt(env, obj))->setAddress((Q_UINT32) ip4Addr);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QHostAddress_setAddress__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring address)
{
static QString* _qstring_address = 0;
	jboolean xret = (jboolean) ((QHostAddress*) QtSupport::getQt(env, obj))->setAddress((const QString&)*(QString*) QtSupport::toQString(env, address, &_qstring_address));
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QHostAddress_setAddress__S(JNIEnv* env, jobject obj, jshort ip6Addr)
{
	((QHostAddress*) QtSupport::getQt(env, obj))->setAddress((Q_UINT8*) ip6Addr);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QHostAddress_toIPv4Address(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((QHostAddress*) QtSupport::getQt(env, obj))->toIPv4Address();
	return xret;
}

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

