You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdebindings/qtjava/javalib/qtjava/TQSocketDevice.cpp

368 lines
12 KiB

//Auto-generated by kalyptus. DO NOT EDIT.
#include <tqglobal.h>
#include <tqiodevice.h>
#include <tqsocketdevice.h>
#include <tqhostaddress.h>
#include <qtjava/QtSupport.h>
#include <qtjava/TQSocketDevice.h>
class TQSocketDeviceJBridge : public TQSocketDevice
{
public:
TQSocketDeviceJBridge(TQSocketDevice::Type arg1) : TQSocketDevice(arg1) {};
TQSocketDeviceJBridge() : TQSocketDevice() {};
TQSocketDeviceJBridge(TQSocketDevice::Type arg1,TQSocketDevice::Protocol arg2,int arg3) : TQSocketDevice(arg1,arg2,arg3) {};
TQSocketDeviceJBridge(int arg1,TQSocketDevice::Type arg2) : TQSocketDevice(arg1,arg2) {};
void protected_setError(TQSocketDevice::Error arg1) {
TQSocketDevice::setError(arg1);
return;
}
~TQSocketDeviceJBridge() {QtSupport::qtKeyDeleted(this);}
};
JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_accept(JNIEnv* env, jobject obj)
{
jint xret = (jint) ((TQSocketDevice*) QtSupport::getQt(env, obj))->accept();
return xret;
}
JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_addressReusable(JNIEnv* env, jobject obj)
{
jboolean xret = (jboolean) ((TQSocketDevice*) QtSupport::getQt(env, obj))->addressReusable();
return xret;
}
JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_address(JNIEnv* env, jobject obj)
{
jobject xret = QtSupport::objectForQtKey(env, (void*)new TQHostAddress(((TQSocketDevice*) QtSupport::getQt(env, obj))->address()), "org.trinitydesktop.qt.TQHostAddress", TRUE);
return xret;
}
JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_atEnd(JNIEnv* env, jobject obj)
{
jboolean xret = (jboolean) ((TQSocketDevice*) QtSupport::getQt(env, obj))->atEnd();
return xret;
}
JNIEXPORT jlong JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_at__(JNIEnv* env, jobject obj)
{
jlong xret = (jlong) ((TQSocketDevice*) QtSupport::getQt(env, obj))->at();
return xret;
}
JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_at__J(JNIEnv* env, jobject obj, jlong arg1)
{
jboolean xret = (jboolean) ((TQSocketDevice*) QtSupport::getQt(env, obj))->at((TQIODevice::Offset) arg1);
return xret;
}
JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_bind(JNIEnv* env, jobject obj, jobject arg1, jshort arg2)
{
jboolean xret = (jboolean) ((TQSocketDevice*) QtSupport::getQt(env, obj))->bind((const TQHostAddress&)*(const TQHostAddress*) QtSupport::getQt(env, arg1), (TQ_UINT16) arg2);
return xret;
}
JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_blocking(JNIEnv* env, jobject obj)
{
jboolean xret = (jboolean) ((TQSocketDevice*) QtSupport::getQt(env, obj))->blocking();
return xret;
}
JNIEXPORT jlong JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_bytesAvailable(JNIEnv* env, jobject obj)
{
jlong xret = (jlong) ((TQSocketDevice*) QtSupport::getQt(env, obj))->bytesAvailable();
return xret;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_close(JNIEnv* env, jobject obj)
{
((TQSocketDevice*) QtSupport::getQt(env, obj))->close();
return;
}
JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_connect(JNIEnv* env, jobject obj, jobject arg1, jshort arg2)
{
jboolean xret = (jboolean) ((TQSocketDevice*) QtSupport::getQt(env, obj))->connect((const TQHostAddress&)*(const TQHostAddress*) QtSupport::getQt(env, arg1), (TQ_UINT16) arg2);
return xret;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_dispose(JNIEnv* env, jobject obj)
{
Java_org_trinitydesktop_qt_QSocketDevice_finalize(env, obj);
return;
}
JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_error(JNIEnv* env, jobject obj)
{
jint xret = (jint) ((TQSocketDevice*) QtSupport::getQt(env, obj))->error();
return xret;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_finalize(JNIEnv* env, jobject obj)
{
if (QtSupport::allocatedInJavaWorld(env, obj)) {
delete (TQSocketDevice*)QtSupport::getQt(env, obj);
QtSupport::setQt(env, obj, 0);
}
return;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_flush(JNIEnv* env, jobject obj)
{
((TQSocketDevice*) QtSupport::getQt(env, obj))->flush();
return;
}
JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_getch(JNIEnv* env, jobject obj)
{
jint xret = (jint) ((TQSocketDevice*) QtSupport::getQt(env, obj))->getch();
return xret;
}
JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_isDisposed(JNIEnv* env, jobject obj)
{
return (QtSupport::getQt(env, obj) == 0);
}
JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_isValid(JNIEnv* env, jobject obj)
{
jboolean xret = (jboolean) ((TQSocketDevice*) QtSupport::getQt(env, obj))->isValid();
return xret;
}
JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_listen(JNIEnv* env, jobject obj, jint backlog)
{
jboolean xret = (jboolean) ((TQSocketDevice*) QtSupport::getQt(env, obj))->listen((int) backlog);
return xret;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_newTQSocketDevice__(JNIEnv* env, jobject obj)
{
if (QtSupport::getQt(env, obj) == 0) {
QtSupport::setQt(env, obj, new TQSocketDeviceJBridge());
QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
}
return;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_newTQSocketDevice__I(JNIEnv* env, jobject obj, jint type)
{
if (QtSupport::getQt(env, obj) == 0) {
QtSupport::setQt(env, obj, new TQSocketDeviceJBridge((TQSocketDevice::Type) type));
QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
}
return;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_newTQSocketDevice__II(JNIEnv* env, jobject obj, jint socket, jint type)
{
if (QtSupport::getQt(env, obj) == 0) {
QtSupport::setQt(env, obj, new TQSocketDeviceJBridge((int) socket, (TQSocketDevice::Type) type));
QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
}
return;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_newTQSocketDevice__III(JNIEnv* env, jobject obj, jint type, jint protocol, jint dummy)
{
if (QtSupport::getQt(env, obj) == 0) {
QtSupport::setQt(env, obj, new TQSocketDeviceJBridge((TQSocketDevice::Type) type, (TQSocketDevice::Protocol) protocol, (int) dummy));
QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
}
return;
}
JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_open(JNIEnv* env, jobject obj, jint mode)
{
jboolean xret = (jboolean) ((TQSocketDevice*) QtSupport::getQt(env, obj))->open((int) mode);
return xret;
}
JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_peerAddress(JNIEnv* env, jobject obj)
{
jobject xret = QtSupport::objectForQtKey(env, (void*)new TQHostAddress(((TQSocketDevice*) QtSupport::getQt(env, obj))->peerAddress()), "org.trinitydesktop.qt.TQHostAddress", TRUE);
return xret;
}
JNIEXPORT jshort JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_peerPort(JNIEnv* env, jobject obj)
{
jshort xret = (jshort) ((TQSocketDevice*) QtSupport::getQt(env, obj))->peerPort();
return xret;
}
JNIEXPORT jshort JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_port(JNIEnv* env, jobject obj)
{
jshort xret = (jshort) ((TQSocketDevice*) QtSupport::getQt(env, obj))->port();
return xret;
}
JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_protocol(JNIEnv* env, jobject obj)
{
jint xret = (jint) ((TQSocketDevice*) QtSupport::getQt(env, obj))->protocol();
return xret;
}
JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_putch(JNIEnv* env, jobject obj, jint arg1)
{
jint xret = (jint) ((TQSocketDevice*) QtSupport::getQt(env, obj))->putch((int) arg1);
return xret;
}
JNIEXPORT jlong JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_readBlock(JNIEnv* env, jobject obj, jobject data, jlong maxlen)
{
static TQCString* _qstring_data = 0;
if (_qstring_data == 0) { _qstring_data = new TQCString(); }
_qstring_data->resize((uint) maxlen);
jlong xret = (jlong) ((TQSocketDevice*) QtSupport::getQt(env, obj))->readBlock((char*) _qstring_data->data(), (TQ_ULONG) maxlen);
QtSupport::fromTQCStringToStringBuffer(env, _qstring_data, data);
return xret;
}
JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_receiveBufferSize(JNIEnv* env, jobject obj)
{
jint xret = (jint) ((TQSocketDevice*) QtSupport::getQt(env, obj))->receiveBufferSize();
return xret;
}
JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_sendBufferSize(JNIEnv* env, jobject obj)
{
jint xret = (jint) ((TQSocketDevice*) QtSupport::getQt(env, obj))->sendBufferSize();
return xret;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_setAddressReusable(JNIEnv* env, jobject obj, jboolean arg1)
{
((TQSocketDevice*) QtSupport::getQt(env, obj))->setAddressReusable((bool) arg1);
return;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_setBlocking(JNIEnv* env, jobject obj, jboolean arg1)
{
((TQSocketDevice*) QtSupport::getQt(env, obj))->setBlocking((bool) arg1);
return;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_setError(JNIEnv* env, jobject obj, jint err)
{
((TQSocketDeviceJBridge*) QtSupport::getQt(env, obj))->protected_setError((TQSocketDevice::Error) err);
return;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_setReceiveBufferSize(JNIEnv* env, jobject obj, jint arg1)
{
((TQSocketDevice*) QtSupport::getQt(env, obj))->setReceiveBufferSize((uint) arg1);
return;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_setSendBufferSize(JNIEnv* env, jobject obj, jint arg1)
{
((TQSocketDevice*) QtSupport::getQt(env, obj))->setSendBufferSize((uint) arg1);
return;
}
JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_setSocket(JNIEnv* env, jobject obj, jint socket, jint type)
{
((TQSocketDevice*) QtSupport::getQt(env, obj))->setSocket((int) socket, (TQSocketDevice::Type) type);
return;
}
JNIEXPORT jlong JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_size(JNIEnv* env, jobject obj)
{
jlong xret = (jlong) ((TQSocketDevice*) QtSupport::getQt(env, obj))->size();
return xret;
}
JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_socket(JNIEnv* env, jobject obj)
{
jint xret = (jint) ((TQSocketDevice*) QtSupport::getQt(env, obj))->socket();
return xret;
}
JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_type(JNIEnv* env, jobject obj)
{
jint xret = (jint) ((TQSocketDevice*) QtSupport::getQt(env, obj))->type();
return xret;
}
JNIEXPORT jint JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_ungetch(JNIEnv* env, jobject obj, jint arg1)
{
jint xret = (jint) ((TQSocketDevice*) QtSupport::getQt(env, obj))->ungetch((int) arg1);
return xret;
}
JNIEXPORT jlong JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_waitForMore__I(JNIEnv* env, jobject obj, jint msecs)
{
jlong xret = (jlong) ((TQSocketDevice*) QtSupport::getQt(env, obj))->waitForMore((int) msecs);
return xret;
}
JNIEXPORT jlong JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_waitForMore__I_3Z(JNIEnv* env, jobject obj, jint msecs, jbooleanArray timeout)
{
bool* _bool_timeout = QtSupport::toBooleanPtr(env, timeout);
jlong xret = (jlong) ((TQSocketDevice*) QtSupport::getQt(env, obj))->waitForMore((int) msecs, (bool*) _bool_timeout);
env->SetBooleanArrayRegion(timeout, 0, 1, (jboolean*) _bool_timeout);
return xret;
}
JNIEXPORT jlong JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_writeBlock__Ljava_lang_String_2J(JNIEnv* env, jobject obj, jstring data, jlong len)
{
static TQCString* _qstring_data = 0;
jlong xret = (jlong) ((TQSocketDevice*) QtSupport::getQt(env, obj))->writeBlock((const char*) QtSupport::toCharString(env, data, &_qstring_data), (TQ_ULONG) len);
return xret;
}
JNIEXPORT jlong JNICALL
Java_org_trinitydesktop_qt_QSocketDevice_writeBlock__Ljava_lang_String_2JLorg_trinitydesktop_qt_QHostAddress_2S(JNIEnv* env, jobject obj, jstring data, jlong len, jobject host, jshort port)
{
static TQCString* _qstring_data = 0;
jlong xret = (jlong) ((TQSocketDevice*) QtSupport::getQt(env, obj))->writeBlock((const char*) QtSupport::toCharString(env, data, &_qstring_data), (TQ_ULONG) len, (const TQHostAddress&)*(const TQHostAddress*) QtSupport::getQt(env, host), (TQ_UINT16) port);
return xret;
}