//Auto-generated by kalyptus. DO NOT EDIT.
#include <tqglobal.h>
#include <tqstring.h>
#include <tqhostaddress.h>

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

class TQHostAddressJBridge : public TQHostAddress
{
public:
	TQHostAddressJBridge() : TQHostAddress() {};
	TQHostAddressJBridge(TQ_UINT32 arg1) : TQHostAddress(arg1) {};
	TQHostAddressJBridge(TQ_UINT8* arg1) : TQHostAddress(arg1) {};
	TQHostAddressJBridge(const TQString& arg1) : TQHostAddress(arg1) {};
	TQHostAddressJBridge(const TQHostAddress& arg1) : TQHostAddress(arg1) {};
	~TQHostAddressJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QHostAddress_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_qt_QHostAddress_finalize(env, obj);
	return;
}

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

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

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

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

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

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

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

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QHostAddress_newTQHostAddress__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring address)
{
static TQString* _qstring_address = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new TQHostAddressJBridge((const TQString&)*(TQString*) QtSupport::toTQString(env, address, &_qstring_address)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QHostAddress_setAddress__I(JNIEnv* env, jobject obj, jint ip4Addr)
{
	((TQHostAddress*) QtSupport::getQt(env, obj))->setAddress((TQ_UINT32) ip4Addr);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QHostAddress_setAddress__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring address)
{
static TQString* _qstring_address = 0;
	jboolean xret = (jboolean) ((TQHostAddress*) QtSupport::getQt(env, obj))->setAddress((const TQString&)*(TQString*) QtSupport::toTQString(env, address, &_qstring_address));
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QHostAddress_setAddress__S(JNIEnv* env, jobject obj, jshort ip6Addr)
{
	((TQHostAddress*) QtSupport::getQt(env, obj))->setAddress((TQ_UINT8*) ip6Addr);
	return;
}

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

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_qt_QHostAddress_toString(JNIEnv* env, jobject obj)
{
	TQString  _qstring;
	_qstring = ((TQHostAddress*) QtSupport::getQt(env, obj))->toString();
	return QtSupport::fromTQString(env, &_qstring);
}

